Skip to content

ENH: Add potentialVorticity coordinate metadata#426

Open
DWesl wants to merge 2 commits into
ecmwf:masterfrom
DWesl:patch-1
Open

ENH: Add potentialVorticity coordinate metadata#426
DWesl wants to merge 2 commits into
ecmwf:masterfrom
DWesl:patch-1

Conversation

@DWesl

@DWesl DWesl commented Aug 6, 2025

Copy link
Copy Markdown
Contributor

Description

Add metadata for the potential vorticity vertical coordinate/typeOfLevel=potentialVorticity

Units copied from https://codes.ecmwf.int/grib/param-db/60 https://codes.ecmwf.int/grib/format/grib2/ctables/4/5/ agrees

NCEP has slightly different units for the GRIB2 vertical coordinate: https://www.nco.ncep.noaa.gov/pmb/docs/on388/table3.html

I had variables with typeOfLevel=potentialVorticity and noticed I couldn't convert the vertical coordinate to PVU using pint_xarray without setting the units. This PR should allow such a use-case.

Contributor Declaration

By opening this pull request, I affirm the following:

  • All authors agree to the Contributor License Agreement.
  • The code follows the project's coding standards.
  • I have performed self-review and added comments where needed.
  • I have added or updated tests to verify that my changes are effective and functional.
  • I have run all existing tests and confirmed they pass.

Units copied from https://codes.ecmwf.int/grib/param-db/60
https://codes.ecmwf.int/grib/format/grib2/ctables/4/5/ agrees

NCEP has slightly different units for the GRIB2 vertical coordinate:
https://www.nco.ncep.noaa.gov/pmb/docs/on388/table3.html

I had variables with typeOfLevel=potentialVorticity and noticed I couldn't convert the vertical coordinate to PVU
Comment thread cfgrib/dataset.py Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant