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

[Support #TWK-728245]: Re: Python support post AMS workshop



Greetings!

(1) In order to save your plot as an image, all you need to add is a call to 
`plt.savefig`:

    plt.savefig('myfigure.png')

The format of the image is dictated by the file extension.

(2) Right now there are quite a few MetPy calculations (especially ones like 
wet bulb that rely on the calculation of moist adiabats) that do not 
intrinsically work with grids of data--thus the only solution is manual looping 
over the grids. As you noted, this is really slow. We have definite plans to 
address these limitations in the future, but at the moment unfortunately manual 
looping over grid points is the only solution.

Cheers,

Ryan

> Thanks again for your time, efforts and instructions at the training.
> Very helpful to me.
> 
> Now, I am trying to understand/practice how  to use MetPy functions and
> do have a couple of questions:
> 
> (1)  How can I save the output from  " *plt.imshow*(cmi)" as an image,  so
> that I can see/use it with other
> tools (e.g. powerpoint).
> 
> Also, I tried to run the example in a platform without GUI (so, no
> jupyter notebook and
> the output of plt.imshow() cannot be seen on the screen/window).  In
> this case, what should be
> the plotting method/function to use to generate and save the image?
> 
> 
> (2) How can I use the function like  the "
> *equivalent_potential_temperature(*pres, temp, dewp)" in a way of array
> operation?
> I wish to calculate mixed_layer_cape_cin, storm_relative_helicity for
> a large ensemble of model simulations. Calling the
> function grid by grid and time-step by time-step is time consuming.
> How can I make it faster?
> 
> 
> Looking forward to your guidance, ...
> 


Ticket Details
===================
Ticket ID: TWK-728245
Department: Support Python
Priority: Normal
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.