merra_hybrid_interp.py
Interpolates and extrapolates MERRA-2 hybrid variables to times and coordinates using surface splines
General Methods
- SMBcorr.interpolate_merra_hybrid(base_dir, EPSG, REGION, tdec, X, Y, VERSION='v1', VARIABLE='FAC', SIGMA=1.5, FILL_VALUE=None, EXTRAPOLATE=False, GZIP=False)[source]
Reads and interpolates 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
- 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