Project

General

Profile

Variable is not recognized

Added by Thomas Adams about 12 years ago

Hi…

I have a grib2 file, NAEFS16.t12z.20120111.pgrb2, which consists of 6-hourly grids out 384 hours for 2-meter temperatures and accumulated precipitation for 21 ensemble members.

When I run the command:

cdo hourmean NAEFS16.t12z.20120111.pgrb2 NAEFS16.t12z.20120111.mean.pgrb2

I am hoping to get ensemble mean grids for the two variables at each time step. The command (shown above) works wonderfully for the temperature grids and I get what I would expect (and it is blazingly fast!), but cdo does not recognize the APCP (accumulated precipitation) variable, so nothing is produced for it. Using NCEP's wgrib2 (simple inventory) I get:

adams% wgrib2 NAEFS16.t12z.20120111.pgrb2
1:512:d=2012011112:TMP:2 m above ground:anl:ens=low-res ctl
2:3584:d=2012011112:TMP:2 m above ground:6 hour fcst:ens=low-res ctl
3:7680:d=2012011112:TMP:2 m above ground:102 hour fcst:ens=low-res ctl
4:11776:d=2012011112:TMP:2 m above ground:108 hour fcst:ens=low-res ctl
5:15872:d=2012011112:TMP:2 m above ground:114 hour fcst:ens=low-res ctl
6:19968:d=2012011112:TMP:2 m above ground:12 hour fcst:ens=low-res ctl
7:24064:d=2012011112:TMP:2 m above ground:120 hour fcst:ens=low-res ctl
8:28160:d=2012011112:TMP:2 m above ground:126 hour fcst:ens=low-res ctl
9:32256:d=2012011112:TMP:2 m above ground:132 hour fcst:ens=low-res ctl
10:36352:d=2012011112:TMP:2 m above ground:138 hour fcst:ens=low-res ctl
11:40448:d=2012011112:TMP:2 m above ground:144 hour fcst:ens=low-res ctl
12:44544:d=2012011112:TMP:2 m above ground:150 hour fcst:ens=low-res ctl
13:48640:d=2012011112:TMP:2 m above ground:156 hour fcst:ens=low-res ctl
14:52736:d=2012011112:TMP:2 m above ground:162 hour fcst:ens=low-res ctl
15:56832:d=2012011112:TMP:2 m above ground:168 hour fcst:ens=low-res ctl
16:59904:d=2012011112:TMP:2 m above ground:174 hour fcst:ens=low-res ctl
17:64000:d=2012011112:TMP:2 m above ground:18 hour fcst:ens=low-res ctl
18:68096:d=2012011112:TMP:2 m above ground:180 hour fcst:ens=low-res ctl
19:72192:d=2012011112:TMP:2 m above ground:186 hour fcst:ens=low-res ctl
20:75264:d=2012011112:TMP:2 m above ground:192 hour fcst:ens=low-res ctl
21:78336:d=2012011112:TMP:2 m above ground:198 hour fcst:ens=low-res ctl
22:82432:d=2012011112:TMP:2 m above ground:204 hour fcst:ens=low-res ctl



2718:10016768:d=2012011112:APCP:surface:366 hour fcst:ens=-20
2719:10020352:d=2012011112:APCP:surface:372 hour fcst:ens=-20
2720:10023936:d=2012011112:APCP:surface:378 hour fcst:ens=-20
2721:10027520:d=2012011112:APCP:surface:36 hour fcst:ens=-20
2722:10031104:d=2012011112:APCP:surface:42 hour fcst:ens=-20
2723:10034688:d=2012011112:APCP:surface:48 hour fcst:ens=-20
2724:10038272:d=2012011112:APCP:surface:54 hour fcst:ens=-20
2725:10041856:d=2012011112:APCP:surface:60 hour fcst:ens=-20
2726:10044416:d=2012011112:APCP:surface:66 hour fcst:ens=-20
2727:10048000:d=2012011112:APCP:surface:72 hour fcst:ens=-20
2728:10051072:d=2012011112:APCP:surface:78 hour fcst:ens=-20
2729:10054656:d=2012011112:APCP:surface:84 hour fcst:ens=-20
2730:10057216:d=2012011112:APCP:surface:90 hour fcst:ens=-20

Does anyone have any ideas why nothing is done for the APCP (accumulated precipitation) variable? What can I do?

Regards,
Tom


Replies (1)

RE: Variable is not recognized - Added by Uwe Schulzweida about 12 years ago

There is a limitation for GRIB files in CDO. A GRIB dataset has to be consistent, similar to netCDF. That means all time steps needs to have the same variables, and within a time step each variable may occur only once.
Your GRIB file contains all timesteps of variable TMP followed by all timesteps of APCP. In order to process this file with CDO the record structure have to look like:

1:d=2012011112:TMP:2 m above ground:anl:ens=low-res ctl
2:d=2012011112:APCP:surface:        anl:ens=-20
3:d=2012011112:TMP:2 m above ground:6 hour fcst:ens=low-res ctl
4:d=2012011112:APCP:surface:        6 hour fcst:ens=-20
5:d=2012011112:TMP:2 m above ground:12 hour fcst:ens=low-res ctl
6:d=2012011112:APCP:surface:        12 hour fcst:ens=-20
7:d=2012011112:TMP:2 m above ground:18 hour fcst:ens=low-res ctl
8:d=2012011112:APCP:surface:        18 hour fcst:ens=-20
...

Otherwise you have to process both variables separately.

Best regards,
Uwe

    (1-1/1)