Skip to content

pbogden/wind

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

wind

Visualize GFS winds from NOMADS file in GRIB format

There are 2 code options for processing GRIB data: NCAR or ECMWF (both have Python APIs). I'm using the NCAR code, PyNIO.

  • Data -- description of GRIB data format
  • PyNIO -- instructions to install and run

Process GRIB file

To create data.json with wind vectors

$ make

To print some metadata (including date of the forecast)

$ make metadata

To list all the variables in the GRIB file

$ make list 

Source data

  • GRIB
    • The date part of the filename.
    • GRIB files have wind for 8 level types. Relevant metadata is in the filename. For example:
      • UGRD_P0_L6_GLL0 # maximum wind level -- (1)
      • UGRD_P0_L7_GLL0 # tropopause -- (1)
      • UGRD_P0_L100_GLL0 # isobaric surface -- (31)
      • UGRD_P0_L102_GLL0 # specified altitude above sea level (m) -- (3) -- lv_AMSL1: [1829..3658]
      • UGRD_P0_L103_GLL0 # specified height above ground (m) -- (6) -- lv_HTGL7: [20..100]
      • UGRD_P0_L104_GLL0 # Sigma level (sigma value) -- (1)
      • UGRD_P0_2L108_GLL0 # Level at specified pressure difference from ground to level (Pa) -- (1)
      • UGRD_P0_L109_GLL0 # Potential vorticity (K m2 kg-1 s-1) -- (2)
    • Two levels: height of maximum wind, height of tropopause
    • Height of maximum wind is available in pressure (Pa) and ICAO standard atmosphere reference height (m)
    • Height of maximum wind and height of tropopoause in (m) use ICAO standard atmosphere reference height
  • ICAO
    • The International Civil Aviation Organization (ICAO) published an "ICAO Standard Atmosphere" in 1993.
    • It has the same model as the ISA, but extends the altitude coverage to 80 kilometers (262,500 feet)
    • The ICAO Standard Atmosphere, like the ISA, does not contain water vapor.

PyNIO

Installed PyNIO as directed with a separate conda environment. The PyNIO github site is well documented.

$ conda create --name pynio_env --channel conda-forge pynio
$ source activate pynio_env

To use it, first activate the environment, and deactivate when done:

$ conda activate pynio_env
$ python
>>> import Nio
>>> print(Nio.__version)
>>> print(Nio.__doc__)
$ conda deactivate
  • PyNIO API docs -- ucar.edu
    • Filename extension indicates expected format
    • For GRIB 1 & 2: .gr, .gr1, .grb, .grib, .grb1, .grib1, .gr2, .grb2, .grib2

References

Releases

No releases published

Packages

No packages published