...
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:
Anchor mvl_geopotential_on_ml mvl_geopotential_on_ml
fieldset mvl_geopotential_on_ml(t:fieldset, q:fieldset, lnsp:fieldset, zs:fieldset)
Computes geopotential on model levels.
Parameter t
should be a fieldset of temperature on model levels in ascending numeric order (e.g. 1-137), q
a fieldset of specific humidity on model levels in ascending numeric order, lnsp
a field of log of surface pressure on model level 1, zs
a field of geopotential on model level 1 (available from MARS). All fields must be GRIDDED data - no spherical harmonics, and they must all be on the same grid, with the same number of points. The function assumes that there are no other dimensions contained in the data, e.g. all fields should have the same date and time. The return value is a fieldset of geopotential on model levels.
The code below illustrates how to use this function:
# retrieves the data in model levels
r = (date: -1, time: 12, levtype: "ml", grid: [1.5,1.5])
t = retrieve(r,levelist: [1,"to",137],param: "t")
q = retrieve(r,levelist: [1,"to",137],param: "q")
zs = retrieve(r,levelist: 1,param: "z")
lnsp = retrieve(r,levelist: 1,param: "lnsp")
# computes the geopotential
z_ml = mvl_geopotential_on_ml(t, q, lnsp, zs)
Anchor mvl_ml2hpa mvl_ml2hpa
fieldset mvl_ml2hPa(lnsp: fieldset, mfld: fieldset, plist: list)
...