[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[python #PHR-160601]: MetPy Help

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.


  • Subject: [python #PHR-160601]: MetPy Help
  • Date: Wed, 17 Feb 2021 14:18:44 -0700

Greetings!

There are two "potential vorticity" functions in MetPy:  
potential_vorticity_barotropic and potential_vorticity_baroclinic. The 
barotropic version does not require a 3D field, but the baroclinic version 
definitely does because it requires estimating vertical derivatives.

What 2D GFS fields are you trying to use? Is the function you're trying to 
replace publicly available somewhere?

Ryan

> Hello Ryan,
> 
> I am trying to convert a python script that calculates potential vorticity
> to use the MetPy PV function. The main problem is that in order to use this
> function, from what I understand from the documentation, I must restructure
> the grib data into a 3D array with the following coordinates (Pressure,
> Longitude, Latitude). The GFS data is a 2D array (Lat, Lon).
> 
> Do you have some ideas for how I can make this work?


Ticket Details
===================
Ticket ID: PHR-160601
Department: Support Python
Priority: Low
Status: Closed
===================
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.