Metview's documentation is now on readthedocs!

Description

Metview Macro Library function. Interpolates a fieldset currently on model levels onto pressure levels (in hPa). Locations where interpolation is not possible are returned as missing.

Usage

fieldset mvl_ml2hPa(lnsp: fieldset, mfld: fieldset, plist: list)

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.

 

Example

# 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)
return tpres