[ncl-talk] reading ensemble grib files in NCL

Dennis Shea shea at ucar.edu
Wed Feb 22 08:34:53 MST 2017


FTR only: the beta version of NCL seems to have the same issue.

%> ncl_filedump air.2m.1901.grb | less

--

 NCAR Command Language Version 6.4.0 -22Feb2017_0149


Variable: f
Type: file
filename:       air.2m.1901
path:   air.2m.1901.grb
   file global attributes:
   dimensions:
      initial_time0_hours = 12
      g0_lat_1 = 121
      g0_lon_2 = 240
   variables:
      float 2T_GDS0_SFC_S123 ( initial_time0_hours, g0_lat_1, g0_lon_2 )
         center :       European Center for Medium-Range Weather Forecasts
(RSMC)
         long_name :    2 metre temperature
         units :        K
         _FillValue :   1e+20
         level_indicator :      1
         gds_grid_type :        0
         parameter_table_version :      128
         parameter_number :     167
         forecast_time :        0
         forecast_time_units :  hours
         statistical_process_descriptor :       average of N uninitialized
analyses
         statistical_process_duration : instantaneous (beginning at
reference time at intervals of 3 hours)
         N :    <ARRAY of 12 elements>

      double initial_time0_hours ( initial_time0_hours )
         long_name :    initial time
         units :        hours since 1800-01-01 00:00

      double initial_time0_encoded ( initial_time0_hours )
         long_name :    initial time encoded as double
         units :        yyyymmddhh.hh_frac

      float g0_lat_1 ( g0_lat_1 )
         long_name :    latitude
         GridType :     Cylindrical Equidistant Projection Grid
         units :        degrees_north
         Dj :   1.5
         Di :   1.5
         Lo2 :  358.5
         La2 :  -90
         Lo1 :   0
         La1 :  90

      float g0_lon_2 ( g0_lon_2 )
         long_name :    longitude
         GridType :     Cylindrical Equidistant Projection Grid
         units :        degrees_east
         Dj :   1.5
         Di :   1.5
         Lo2 :  358.5
         La2 :  -90
         Lo1 :   0
         La1 :  90

      string initial_time0 ( initial_time0_hours )
         long_name :    Initial time of first record
         units :        mm/dd/yyyy (hh:mm)

=========================================
Note the attributes

         statistical_process_descriptor :       average of N uninitialized
analyses
         statistical_process_duration : instantaneous (beginning at
reference time at intervals of 3 hours)
         N :    <ARRAY of 12 elements>

 f      = addfile("air.2m.1901.grb","r")
T2m = f-> 2T_GDS0_SFC_S123
 printVarSummary(T2m)

 print(T2m at N)

(0)     248
(1)     224
(2)     248
(3)     240
(4)     248
(5)     240
(6)     248
(7)     248
(8)     240
(9)     248
(10)    240
(11)    248




On Wed, Feb 22, 2017 at 8:18 AM, Cathy Smith (NOAA Affiliate) <
cathy.smith at noaa.gov> wrote:

> 6.3.0 linux.
>
> file is
>
> air.2m.1901.grb
>
> Cathy
>
>
> On 2/22/17 8:13 AM, Dennis Shea wrote:
>
> What version of NCL are you using?
>
> ===
>
> Please do put sample file at:
>
> ftp ftp.cgd.ucar.edu
> anonymous
> your_email
> cd incoming
> put ...
> quit
>
>
> On Wed, Feb 22, 2017 at 8:09 AM, Cathy Smith (NOAA Affiliate) <
> cathy.smith at noaa.gov> wrote:
>
>> Hi
>> We have some grib files that have 10 ensemble members for each month.
>> NCL reads the data as one 1 value per month using ncl_convert2nc.
>> Looking at the grib1 files, the 1st 10 headers are the same, the 2nd,
>> and so forth (except for the starting value). Is it possible to read
>> these with ncl or should we try to create 120 grib files and then
>> process them? Maybe one can use -sed?
>>
>> Here is the header for the 1st 12 grib records of the 120.
>>
>> 1:0:d=01010100:2T:kpds5=167:kpds6=1:kpds7=0:TR=123:P1=0:P2=
>> 3:TimeU=1:sfc:anl:ave at 3hr:type=analysis:NAve=248
>> 2:58192:d=01010100:2T:kpds5=167:kpds6=1:kpds7=0:TR=123:P1=0:
>> P2=3:TimeU=1:sfc:anl:ave at 3hr:type=analysis:NAve=248
>> 3:116384:d=01010100:2T:kpds5=167:kpds6=1:kpds7=0:TR=123:P1=0
>> :P2=3:TimeU=1:sfc:anl:ave at 3hr:type=analysis:NAve=248
>> 4:174576:d=01010100:2T:kpds5=167:kpds6=1:kpds7=0:TR=123:P1=0
>> :P2=3:TimeU=1:sfc:anl:ave at 3hr:type=analysis:NAve=248
>> 5:232768:d=01010100:2T:kpds5=167:kpds6=1:kpds7=0:TR=123:P1=0
>> :P2=3:TimeU=1:sfc:anl:ave at 3hr:type=analysis:NAve=248
>> 6:290960:d=01010100:2T:kpds5=167:kpds6=1:kpds7=0:TR=123:P1=0
>> :P2=3:TimeU=1:sfc:anl:ave at 3hr:type=analysis:NAve=248
>> 7:349152:d=01010100:2T:kpds5=167:kpds6=1:kpds7=0:TR=123:P1=0
>> :P2=3:TimeU=1:sfc:anl:ave at 3hr:type=analysis:NAve=248
>> 8:407344:d=01010100:2T:kpds5=167:kpds6=1:kpds7=0:TR=123:P1=0
>> :P2=3:TimeU=1:sfc:anl:ave at 3hr:type=analysis:NAve=248
>> 9:465536:d=01010100:2T:kpds5=167:kpds6=1:kpds7=0:TR=123:P1=0
>> :P2=3:TimeU=1:sfc:anl:ave at 3hr:type=analysis:NAve=248
>> 10:523728:d=01010100:2T:kpds5=167:kpds6=1:kpds7=0:TR=123:P1=
>> 0:P2=3:TimeU=1:sfc:anl:ave at 3hr:type=analysis:NAve=248
>> 11:581920:d=01020100:2T:kpds5=167:kpds6=1:kpds7=0:TR=123:P1=
>> 0:P2=3:TimeU=1:sfc:anl:ave at 3hr:type=analysis:NAve=224
>> 12:640112:d=01020100:2T:kpds5=167:kpds6=1:kpds7=0:TR=123:P1=
>> 0:P2=3:TimeU=1:sfc:anl:ave at 3hr:type=analysis:NAve=224
>>
>> ncl_convert2nc produces
>>
>> netcdf air.2m.1901 {
>> dimensions:
>>          initial_time0_hours = 12 ;
>>          g0_lat_1 = 121 ;
>>          g0_lon_2 = 240 ;
>>          ncl_strlen_0 = 18 ;
>> variables:
>>          float \2T_GDS0_SFC_S123(initial_time0_hours, g0_lat_1,
>> g0_lon_2) ;
>>                  \2T_GDS0_SFC_S123:N = 248, 224, 248, 240, 248, 240,
>> 248, 248, 240, 248, 240, 248 ;
>>
>> etc.
>>
>>
>> I can put a file in ftp if that helps.
>>
>> Cathy
>>
>> --
>> ----------------------------------------------
>> NOAA/ESRL PSD and CU CIRES
>> 303-497-6263 <(303)%20497-6263>
>> http://www.esrl.noaa.gov/psd/people/cathy.smith/
>>
>> Emails about data/webpages may get quicker responses from emailing
>> esrl.psd.data at noaa.gov
>>
>> _______________________________________________
>> ncl-talk mailing list
>> ncl-talk at ucar.edu
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
>
>
> --
> ----------------------------------------------
> NOAA/ESRL PSD and CU CIRES303-497-6263 <(303)%20497-6263>http://www.esrl.noaa.gov/psd/people/cathy.smith/
>
> Emails about data/webpages may get quicker responses from emailing esrl.psd.data at noaa.gov
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170222/0d111b0d/attachment.html 


More information about the ncl-talk mailing list