Project

General

Profile

Setting GRIB 6hr forecast to anl/0hr (instantaneous forecast)

Added by judy hertz over 5 years ago

I'm trying to change the forecast time in my GRIB file, it has a 6hr forecast and I need it to be anl (as 0hr forecasts are represented). Using cdo settaxis the output reftime (cdo sinfo) and times in cdo infon are correct but using wgrib -v:
  • the date isn't incremented, it's a single date of 2018120100 throughout the file.
  • the forecast time is 'anl' for the first timestep only and reverts to 6hr forecast incremented by 6 hours for each following time step.

Thanks for any help!

Example, input file 6hr increments of 6hr forecast, cdo sinfo (CDO version 1.9.7.1):

   RefTime =  2018-11-30 18:00:00  Units = hours  Calendar = proleptic_gregorian
  YYYY-MM-DD hh:mm:ss  YYYY-MM-DD hh:mm:ss  YYYY-MM-DD hh:mm:ss  YYYY-MM-DD hh:mm:ss
  2018-12-01 00:00:00  2018-12-01 06:00:00  2018-12-01 12:00:00  2018-12-01 18:00:00
  2018-12-02 00:00:00  2018-12-02 06:00:00  2018-12-02 12:00:00  2018-12-02 18:00:00
  2018-12-03 00:00:00  2018-12-03 06:00:00  2018-12-03 12:00:00  2018-12-03 18:00:00

Using wgrib:

7378:2266834068:d=18123112:OZONE:kpds5=237:kpds6=109:kpds7=58:TR=0:P1=6:P2=0:TimeU=1:hybrid lev 58:6hr fcst:NAve=0
7379:2267141352:d=18123112:OZONE:kpds5=237:kpds6=109:kpds7=59:TR=0:P1=6:P2=0:TimeU=1:hybrid lev 59:6hr fcst:NAve=0
7380:2267448636:d=18123112:OZONE:kpds5=237:kpds6=109:kpds7=60:TR=0:P1=6:P2=0:TimeU=1:hybrid lev 60:6hr fcst:NAve=0

cdo settaxis:

cdo -r -f grb -settaxis,2018-12-01,00:00:00,6hour infile outfile

cdo sinfo:

  RefTime =  2018-12-01 00:00:00  Units = 6hours  Calendar = proleptic_gregorian

Using wgrib:

59:17822704:d=18120100:OZONE:kpds5=237:kpds6=109:kpds7=59:TR=0:P1=0:P2=0:TimeU=11:hybrid lev 59:anl:NAve=0
60:18129992:d=18120100:OZONE:kpds5=237:kpds6=109:kpds7=60:TR=0:P1=0:P2=0:TimeU=11:hybrid lev 60:anl:NAve=0
61:18437280:d=18120100:OZONE:kpds5=237:kpds6=109:kpds7=1:TR=0:P1=1:P2=0:TimeU=11:hybrid lev 1:6hr fcst:NAve=0
62:18744568:d=18120100:OZONE:kpds5=237:kpds6=109:kpds7=2:TR=0:P1=1:P2=0:TimeU=11:hybrid lev 2:6hr fcst:NAve=0
63:19051856:d=18120100:OZONE:kpds5=237:kpds6=109:kpds7=3:TR=0:P1=1:P2=0:TimeU=11:hybrid lev 3:6hr fcst:NAve=0

Replies (1)

RE: Setting GRIB 6hr forecast to anl/0hr (instantaneous forecast) - Added by Uwe Schulzweida over 5 years ago

Have you tried it with option -a instead of -r:

cdo -a -f grb -settaxis,2018-12-01,00:00:00,6hour infile outfile

    (1-1/1)