[ncl-talk] exact numbers of initial_time0_hours in grib data

Dave Allured - NOAA Affiliate dave.allured at noaa.gov
Thu Dec 22 16:46:25 MST 2016


Yi-Chih,

I get exact values with the regular NCL print command:

 NCAR Command Language Version 6.3.0
ncl 0> f = addfile ("ei.oper.fc.sfc.regn128sc.tp_228.201601.grb", "r")
ncl 1> print (f->initial_time0_hours)

Variable: initial_time0_hours (file variable)
Type: double
Total Size: 496 bytes
            62 values
Number of Dimensions: 1
Dimensions and sizes:   [initial_time0_hours | 62]
Coordinates:
            initial_time0_hours: [1893408..1894140]
Number Of Attributes: 2
  long_name :   initial time
  units :       hours since 1800-01-01 00:00
(0)     1893408
(1)     1893420
(2)     1893432
(3)     1893444
etc.

--Dave


On Thu, Dec 22, 2016 at 4:22 PM, Yi-Chih Huang <dscpln at gmail.com> wrote:

> Hello,
>
>     I am trying to read ERA INTERIM grib data with NCL scripts.  I used
> the command "ncl_filedump -c" to get the information of dimensions as
> follows.  The time information of initial_time0_hours is exponential
> numbers that seem to be the same.  But I need exact numbers of
> initial_time0_hours in the NCL scripts.  Hence, I wonder is there any way
> to obtain the exact numbers of initial_time0_hours in grib data?
>
>     Thanks much,
>
>                             Yi-Chih
>
> Variable: f
> Type: file
> filename:       ei.oper.an.sfc.regn128sc.tco3_206.201502
> path:   ei.oper.an.sfc.regn128sc.tco3_206.201502.grb1
>    file global attributes:
>    dimensions:
>       initial_time0_hours = 112
>       g4_lat_1 = 256
>       g4_lon_2 = 512
> .....................................................
>      initial_time0_hours:
>
>   0.1885E+07  0.1885E+07  0.1885E+07  0.1885E+07  0.1885E+07  0.1885E+07
>   0.1885E+07  0.1885E+07  0.1885E+07  0.1885E+07  0.1885E+07  0.1885E+07
>   0.1885E+07  0.1885E+07  0.1885E+07  0.1885E+07  0.1885E+07  0.1885E+07
>   0.1886E+07  0.1886E+07  0.1886E+07  0.1886E+07  0.1886E+07  0.1886E+07
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20161222/72883251/attachment.html 


More information about the ncl-talk mailing list