[pyngl-talk] function of pyngl
Mary Haley
haley at ucar.edu
Wed Jan 18 22:24:23 MST 2017
There's no specific "printVarSummary" type of command, but if you read the
data using PyNIO, and you don't subset the array, then "print" should give
you printVarSummary like output:
>>> import Nio
>>> a = Nio.open_file("atmos.nc")
>>> u = a.variables['u']
>>> print(u)
Variable: u
Type: float
Total Size: 32768 bytes
8192 values
Number of Dimensions: 2
Dimensions and sizes: [lat | 64] x [lon | 128]
Coordinates:
lat: [-87.8638..87.8638]
lon: [ 0..357.1875]
Number of Attributes: 5
lev : 7.59482
time : 791
long_name : zonal wind component
units : m/s
time_op : average
Unfortunately we don't have many of our computational functions imported to
python, including month_to_annual. This particular function is written
entirely in NCL and involves many lines of code. You might be able to
convert it to python yourself, as it seems like you know a little bit of
NCL.
Good luck,
--Mary
On Tue, Jan 17, 2017 at 7:58 PM, Guoanboyu <201521490002 at mail.bnu.edu.cn>
wrote:
> Hi
> Do pyngl have some function like ncl to prints a summary of a
> variable's information(printVarSummary) or to converts monthly values to
> annual values(month_to_annual)?
>
> Thanks
> Anboyu
>
>
> _______________________________________________
> 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/20170118/44d2969b/attachment.html
More information about the pyngl-talk
mailing list