merra_hybrid_extrap.py
Interpolates and extrapolates MERRA-2 hybrid variables to times and coordinates using inverse distance weighting
General Methods
- SMBcorr.extrapolate_merra_hybrid(base_dir, EPSG, REGION, tdec, X, Y, VERSION='v1', VARIABLE='FAC', SEARCH='BallTree', N=10, POWER=2.0, SIGMA=1.5, FILL_VALUE=None, EXTRAPOLATE=False, GZIP=False)[source]
Spatially extrapolates MERRA-2 hybrid variables
- Parameters:
- base_dir: str
Working data directory
- EPSG: str or int
input coordinate reference system
- REGION: str
MERRA-2 region to interpolate
ais: Antarcticagris: Greenland
- tdec: float
time coordinates to interpolate in year-decimal
- X: float
x-coordinates to interpolate
- Y: float
y-coordinates to interpolate
- VERSION: str, default ‘v1’
MERRA-2 hybrid model version
- VARIABLE: str, default ‘FAC’
MERRA-2 hybrid product to interpolate
FAC: firn air contentp_minus_e: precipitation minus evaporationmelt: snowmelt
- SEARCH: str, default ‘BallTree’
nearest-neighbor search algorithm
- NN: int, default 10
number of nearest-neighbor points to use
- POWER: int or float, default 2.0
Inverse distance weighting power
- SIGMA: float, default 1.5
Standard deviation for Gaussian kernel
- FILL_VALUE: float or NoneType, default None
Output fill_value for invalid points
Default will use fill values from data file
- EXTRAPOLATE: bool, default False
Create a regression model to extrapolate in time
- GZIP: bool, default False
netCDF4 file is gzip compressed