...
With n fields in the input fieldsets, if xik, yik are the ith value of the kth input fieldsets and zi is the ith value of the resulting field:
fieldset mvl_ml2hPa(lnsp: fieldset, mfld: fieldset, plist: list) Anchor mvl_ml2hpa mvl_ml2hpa
Interpolates a fieldset currently on model levels onto pressure levels (in hPa). Locations where interpolation is not possible are returned as missing.
Parameter lnsp
is a field of logarithm of surface pressure; mfld
is the fieldset to be interpolated and should be on model levels; plist
is a list of pressure levels in hPa - the result will be the mfld
fieldset interpolated onto these levels. Neither mfld
nor plist
need to be sorted.
Code Block | ||
---|---|---|
| ||
# retrieve the data in model levels
common_retrieve_params = (
type : "fc",
levtype : "ml",
step : 12,
grid : [1.5,1.5] )
tmod = retrieve(
param : "t",
levelist : [1, 'to', 91],
common_retrieve_params)
lnsp = retrieve(
param : "lnsp",
levelist : 1,
common_retrieve_params)
# interpolate onto a list of pressure levels
plevels = [1000, 900, 850, 500, 300, 100, 10, 1, 0.1]
tpres = mvl_ml2hPa (lnsp, tmod, plevels)
|
number or list Anchor nearest_gridpoint nearest_gridpoint nearest_gridpoint
( fieldset,list )
number or list nearest_gridpoint
( fieldset,number,number )vector or list nearest_gridpoint ( fieldset,vector,vector )
...