[ncl-talk] reading ensemble grib files in NCL

Cathy Smith (NOAA Affiliate) cathy.smith at noaa.gov
Wed Feb 22 08:09:13 MST 2017


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
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



More information about the ncl-talk mailing list