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

[python #SXQ-775314]: MetPy Cross section vs time analyses



Hello, and thanks for reaching out!

MetPy does not contain any tools specifically for creating pressure-time cross 
sections. However, xarray and Matplotlib should have all the tools you need to 
subset and visualize your data in such a way. Here is a similar existing 
example (that needs some clean-up!) of creating a Hovmoller Diagram: 
https://github.com/Unidata/python-training/blob/master/pages/gallery/Hovmoller_Diagram.ipynb

As you note, MetPy does have a few tools to help you interpolate data 
vertically, but I'm not sure your particular goal here. If you can provide or 
link to some sample data and follow up with the code snippets you're already 
exploring, I'd be glad to help create an example of such a cross section to 
share in our gallery! We may take some time to generate a simplified example of 
this anyway, but please do follow up and let us know how we can further help 
with this. For now, I hope this helps.


All the best,

Drew


> I am reaching out because I saw your comments on a few GitHub discussions
> regarding the use of the metpy Cross-section function.
> I have recently been trying to work with the metpy cross-section function,
> but with pressure wrt time and not lat/lon. I wondered if Metpy has this
> capability. I have found a bit of a workaround with the cross-section
> function by implementing 4 fake equidistant lat/lon values and then using
> my pressure vs time data (length 4) where time becomes the x-axis instead
> of longitude/lat, but I notice that the behavior doesn't seem linear still,
> even after removing the np.log() feature from the
> function vertical_interpolate() function, and setting # Interpolate to 2D
> grid using scipy.interpolate.griddata method = 'linear'. I have attached a
> sample plot as well.
> 


Ticket Details
===================
Ticket ID: SXQ-775314
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.