Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Step-by-step guide

You need to use the ml_to_hl() function. It needs the geopotential field on model levels as an input, which can be computed with the mvl_geopotential_on_ml() function. The following example shows how these two functions can be used together:

Code Block
languagepy
import metview as mv

# computes geopotential on model levels
# requires temperature (t), specific humidity(q), log surface pressure (lnsp) 
# and surface geopotential (zs) fields
z = mv.mvl_geopotential_on_ml(t, q, lnsp, zs)
 
# interpolates the t field onto a list of height levels above sea level
hlevs = [1000, 2000, 3000, 4000, 5000]
th = mv.mvml_to_hl (t, z, nil, hlevs, "sea", "linear")


Content by Label
showLabelsfalse
max5
spacesUDOC
showSpacefalse
sortmodified
reversetrue
typepage
cqllabel in ("interpolation","grib","height","vertical") and type = "page" and space = "UDOC"
labelsheight grib interpolation vertical

...