racmo_downscaled_mean.py
Calculates the temporal mean of downscaled RACMO surface mass balance products
General Methods
- SMBcorr.racmo_downscaled_mean(base_dir, VERSION, PRODUCT, RANGE=[1961, 1990], GZIP=False, VERBOSE=False, MODE=509)[source]
Calculates the temporal mean of downscaled RACMO surface mass balance products
- Parameters:
- base_dir: str
Working data directory
- VERSION: str
Downscaled RACMO Version
1.0: RACMO2.3/XGRN112.0: RACMO2.3p2/XGRN113.0: RACMO2.3p2/FGRN055
- PRODUCT: str
RACMO product to calculate
SMB: Surface Mass BalancePRECIP: PrecipitationRUNOFF: Melt Water RunoffSNOWMELT: SnowmeltREFREEZE: Melt Water Refreeze
- RANGE: list, default [1961,1990]
Start and end year of mean
- GZIP: bool, default False
netCDF data files are compressed
- VERBOSE: bool, default False
Verbose output of netCDF4 variables
- MODE: oct, default 0o775
Permission mode of directories and files created
- SMBcorr.racmo_downscaled_mean.get_dimensions(input_dir, VERSION, PRODUCT, GZIP=False)[source]
Get the total dimensions of the input data
- Parameters:
- input_dir: str
Working data directory
- VERSION: str
Downscaled RACMO Version
- VARIABLE: str
RACMO product to run
SMB: Surface Mass BalancePRECIP: PrecipitationRUNOFF: Melt Water RunoffSNOWMELT: SnowmeltREFREEZE: Melt Water Refreeze
- GZIP: bool, default False
netCDF data files are compressed
- SMBcorr.racmo_downscaled_mean.yearly_file_mean(input_dir, VERSION, PRODUCT, START, END, GZIP=False)[source]
Read individual yearly netcdf files and calculate mean
- Parameters:
- input_dir: str
Working data directory
- VERSION: str
Downscaled RACMO Version
- PRODUCT: str
RACMO product to run
SMB: Surface Mass BalancePRECIP: PrecipitationRUNOFF: Melt Water RunoffSNOWMELT: SnowmeltREFREEZE: Melt Water Refreeze
- START: int
Starting year to run
- END: int
Ending year to run
- GZIP: bool, default False
netCDF data files are compressed
- SMBcorr.racmo_downscaled_mean.compressed_file_mean(input_dir, VERSION, PRODUCT, START, END, GZIP=False)[source]
Read compressed netCDF4 files and calculate mean
- Parameters:
- input_dir: str
Working data directory
- VERSION: str
Downscaled RACMO Version
- PRODUCT: str
RACMO product to run
SMB: Surface Mass BalancePRECIP: PrecipitationRUNOFF: Melt Water RunoffSNOWMELT: SnowmeltREFREEZE: Melt Water Refreeze
- START: int
Starting year to run
- END: int
Ending year to run
- GZIP: bool, default False
netCDF data files are compressed
Calling Sequence
usage: racmo_downscaled_mean.py [-h] [--directory DIRECTORY]
[--version {1.0,2.0,3.0,4.0}]
[--product PRODUCT [PRODUCT ...]]
[--mean START END] [--gzip] [--verbose]
[--mode MODE]
Named Arguments
- --directory, -D
Working data directory
- --version, -v
Possible choices: 1.0, 2.0, 3.0, 4.0
Downscaled RACMO Version
- --product, -p
Possible choices: SMB, PRECIP, RUNOFF, SNOWMELT, REFREEZE
RACMO product to calculate
- --mean, -m
Start and end year range for mean
- --gzip, -G
netCDF4 file is locally gzip compressed
- --verbose, -V
Verbose output of run
- --mode, -M
Permission mode of directories and files