[pyngl-talk] Skew T

Kevin Hallock hallock at ucar.edu
Thu Jun 6 15:52:42 MDT 2019


Hi Mateus,

Thanks for reporting this behavior.

After taking a closer look, this does appear to be a bug with sktTemperatureUnits (as well as sktHeightScaleUnits). I fixed the bug in the “develop” branch of the PyNGL code, so it will be included with our next release of PyNGL.

In the meantime, a temporary workaround is to use essentially any other skew-T resource (such as sktHeightScaleOn, as you discovered) along with sktTemperatureUnits. You can even set the other resource to its normal default value, it just needs to be included on the cfg Resources() object.

A full list of resources that can be used to trigger the correct sktTemperatureUnits behavior can be found by running the following code:
from ngl import RscConv
print(RscConv.keys())

I hope this helps!
Kevin

> On Jun 6, 2019, at 2:29 PM, Mateus da Silva Teixeira via pyngl-talk <pyngl-talk at ucar.edu> wrote:
> 
> Dear users,
> 
> I've plotted a skewT log p chart and noted a strange behaviour of resource sktTemperatureUnits.
> It seems only work and it`s used along with the resource sktHeightScaleOn. 
> 
> import Ngl
> 
> ag = Ngl.open_wks( 'pdf', 'skewT' )
> 
> cfg = Ngl.Resources()
> cfg.sktHeightScaleOn = True
> cfg.sktTemperatureUnits = 'celsius'  # only works with above line
> bkg = Ngl.skewt_bkg( ag, cfg )
> 
> Ngl.draw( bkg ) # deve ser desenhandos
> Ngl.end()
> 
> Is that correct?
> 
> I'm using Python 3.6.7 and PyNGL 1.6.1.
> 
> Best regards,
> 
> Mateus
> 
> 
> _______________________________________________
> pyngl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/pyngl-talk

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/pyngl-talk/attachments/20190606/2b7e7e36/attachment.html>


More information about the pyngl-talk mailing list