Versions Compared

Key

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

Introduction

Some users are interested on the height of the different model levels. This Python script will allow you to compute the geopotential on each model level.one. The starting point is the geopotential and the pressure (z and lnsp) on the surface.

For this use case, you need to retrieve in grib format both temperature (t) and Specific humidity (q) for each model level. Besides, you need both geopotential (z) and logarithm of surface pressure (lnsp) for model level = 1.

Download

 

Examples

...

Code Block
languagebash
python compute_geopotential_on_ml.py tq_ml_20151008_00.grib zlnsp_ml_20151008_00.grib
python compute_geopotential_on_ml.py tq_ml_20151008_00.grib zlnsp_ml_20151008_00.grib -o my_grib.grib
  • tq_ml_20151008_00.grib

    Expand
    No Format
    retrieve, 
      date= 20150801, 
      class = od,
      time= 0, 
      stream = oper,
      levtype= ml, 
      grid= 1.5/1.5,
      type= an,
      param= t/q, 
      levelist= all,
      target="tq_ml_20150801_00.grib"
  • zlnsp_ml_20151008_00.grib

    Expand
    No Format
    retrieve,
      date= 20150801, 
      class = od,
      time= 0, 
      stream = oper,
      levtype= ml, 
      grid= 1.5/1.5,
      type= an,
      param=lnsp,
      levelist=1,
      target="zlnsp_ml_20151008_00.grib"
    
    retrieve,
      type= an,
      param=z, 
      levelist=1,
      target="zlnsp_ml_20151008_00.grib"

...