This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
> I am just starting to learn about GEMPAK's enormous capabilities and I > had a question regarding the calculation of relative vorticity. In the > documentation here - > > https://www.unidata.ucar.edu/software/gempak/man/parm/apxB.html > > you have vorticity defined as - > > VOR ( V ) = DDX ( v ) - DDY ( u ) > > but in the code comments you have it defined as - > > * * > * VOR ( V ) = DDX(v) - DDY(u) - v*{(mx/my)*[d(my)/dx]} + * > * + u*{(my/mx)*[d(mx)/dy]} It appears that you are comparing the calculation for vorticity from apxB.html to a code comment rather than the actual code that calculated vorticity. The commented formula includes second-order components which are not included in the calculation (guessing here, since I've not dug through code to find where this is from - that's where a reference would help, source code file name and line number). I do not have a test script to calculate PV from reanalysis data, I do now know what exactly your reanalysis data are - already in GEMPAK grid form or is it in grib2 (or something else?) If the data exists as a GEMPAK file then you are good to go and can just use the PVOR grid parameter from https://www.unidata.ucar.edu/software/gempak/man/parm/apxB.html PVOR Potential vorticity in a layer PVOR ( S, V ) = - GRAVTY * AVOR ( VLAV (V) ) * LDF ( THTA ) / ( 100 * LDF ( PRES ) ) The 100 converts millibars to Pascals. Units are Kelvins / meters / Pascals / seconds**3 (note that GRAVTY is included). PVOR works on a layer in PRES or THTA coordinates. In isobaric coordinates, the scalar operand, S, is THTA, THTE, or THES. In isentropic coordinates, the scalar operand, S, is PRES. Multiplying by 10**6 gives standard PV units. Ticket Details =================== Ticket ID: ROY-668075 Department: Support GEMPAK Priority: Normal Status: Open =================== NOTE: All email exchanges with Unidata User Support are recorded in the Unidata inquiry tracking system and then made publicly available through the web. If you do not want to have your interactions made available in this way, you must let us know in each email you send to us.