racmo_downscaled_cumulative.py
Calculates cumulative anomalies of downscaled RACMO surface mass balance products
General Methods
- SMBcorr.racmo_downscaled_cumulative(base_dir, VERSION, PRODUCT, RANGE=[1961, 1990], GZIP=False, VERBOSE=False, MODE=509)[source]
Calculate RACMO cumulative anomalies with respect to a mean field
- 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_cumulative.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_cumulative.yearly_file_cumulative(input_dir, VERSION, PRODUCT, MEAN, GZIP=False)[source]
Read individual yearly netcdf files and calculate cumulative anomalies
- 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
- MEAN: list
Start and end year for mean
- GZIP: bool, default False
netCDF data files are compressed
- SMBcorr.racmo_downscaled_cumulative.compressed_file_cumulative(input_dir, VERSION, PRODUCT, MEAN, GZIP=False)[source]
Read compressed netCDF4 files and calculate cumulative anomalies
- 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
- MEAN: list
Start and end year for mean
- GZIP: bool, default False
netCDF data files are compressed
Calling Sequence
usage: racmo_downscaled_cumulative.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