mar_smb_mean.py
Calculates the temporal mean of MAR surface mass balance products
General Methods
- SMBcorr.mar_smb_mean(input_dir, VERSION, PRODUCT, RANGE=[1961, 1990], DOWNSCALED=False, VERBOSE=False, MODE=509)[source]
Calculates the temporal mean of MAR surface mass balance products
- Parameters:
- input_dir: str
Working data directory
- VERSION: str
MAR Version
v3.5.2v3.9v3.10v3.11
- PRODUCT: str
MAR product to calculate
SMB: Surface Mass BalancePRECIP: PrecipitationSNOWFALL: SnowfallRAINFALL: RainfallRUNOFF: Melt Water RunoffSNOWMELT: SnowmeltREFREEZE: Melt Water RefreezeSUBLIM: Sublimation
- RANGE: list, default [1961,1990]
Start and end year of mean
- DOWNSCALED: bool, default False
Run downscaled MAR products
- VERBOSE: bool, default False
Verbose output of netCDF4 variables
- MODE: oct, default 0o775
Permission mode of directories and files created
- SMBcorr.mar_smb_mean.sort_files(regex, input_files)[source]
Sort the list of input files by date
- Parameters:
- regex: obj
Regular expression object for matching files
- input_files: list
Input MAR surface mass balance files
- SMBcorr.mar_smb_mean.get_dimensions(directory, input_files, XNAME=None, YNAME=None)[source]
Get the total dimensions of the input data
- Parameters:
- directory: str
Working data directory
- input_files: list
Input MAR surface mass balance files
- XNAME: str or NoneType, default None
Name of the x-coordinate variable
- YNAME: str or NoneType, default None
Name of the y-coordinate variable
Calling Sequence
usage: mar_smb_mean.py [-h] [--directory DIRECTORY] [--version VERSION]
[--product PRODUCT [PRODUCT ...]] [--mean START END]
[--downscaled] [--verbose] [--mode MODE]
Named Arguments
- --directory, -D
Working data directory
- --version, -v
Possible choices: v3.5.2, v3.9, v3.10, v3.11
MAR version to run
- --product, -p
Possible choices: SMB, PRECIP, SNOWFALL, RAINFALL, RUNOFF, SNOWMELT, REFREEZE, SUBLIM
MAR product to calculate
- --mean, -m
Start and end year range for mean
- --downscaled, -d
Run downscaled MAR
- --verbose, -V
Verbose output of netCDF4 variables
- --mode, -M
Permission mode of directories and files