<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
Sorry for being late the the party. If I have correctly interpreted the messages in this thread so far, Wesley has established that cnvgrib is not working properly for the conversion from grib1 to grib2 because it can’t deal with a 30-minute time unit and messes
up the time metadata in the grib2 files. So forget grib2; you must use your data in grib1 format.
<div class=""><br class="">
</div>
<div class="">I can get GrADS to read this data using the descriptor file copied below.</div>
<div class=""><br class="">
</div>
<div class="">
<div class=""><font face="Courier" size="2" class="">dset ^%ch<br class="">
options template<br class="">
chsub 3 3 WRFPRS_d01.00_20<br class="">
chsub 4 4 WRFPRS_d01.00_30<br class="">
dtype grib </font></div>
<div class=""><font face="Courier" size="2" class="">index ^WRFPRS_d01.idx<br class="">
undef 9.999E+20<br class="">
title WRF sample<br class="">
pdef 149 149 lccr -29.363000 45.203000 1 1 -21.633000 -21.633000 54.288000 12000 12000<br class="">
xdef 149 linear 45.203000 0.12517162785946<br class="">
ydef 149 linear -29.363000 0.109090909090909<br class="">
zdef 25 levels 1000 975 950 925 900 875 850 825 800 775 750 700 650 600 550 500 450 400 350 300 250 200 150 100 50<br class="">
tdef 4 linear 00Z17nov2017 10mn<br class="">
vars 82<br class="">
*SNOHF10m 0 229,105,10 ** 10 m above ground Snow phase-change heat flux [W/m^2]<br class="">
*MAXREF1000m 0 235,105,1000 ** 1000 m above ground Hourly max of sim. reflect at 1km AGL [dbZ]<br class="">
*MXUPHL2000_5000m 0 236,106,12820 ** 2000-5000 m above ground Hourly max updraft helicity 2-5km AGL [m^2/s^2]<br class="">
*MAXUVV400_1000mb 0 237,101,10340 ** 400-1000 mb Hourly max upward vert vel in lowest 400mb [m/s]<br class="">
*MAXDVV400_1000mb 0 238,101,10340 ** 400-1000 mb Hourly max downward vert fel in lowest 400mb [m/s]<br class="">
no4LFTX180_0mb 0 132,116,46080 ** 180-0 mb above gnd Best (4-layer) lifted index [K]<br class="">
ACPCPsfc 0 63,1,0 ** surface Convective precipitation [kg/m^2]<br class="">
APCPsfc 0 61,1,0 ** surface Total precipitation [kg/m^2]<br class="">
CAPEsfc 0 157,1,0 ** surface Convective Avail. Pot. Energy [J/kg]<br class="">
CAPE90_0mb 0 157,116,23040 ** 90-0 mb above gnd Convective Avail. Pot. Energy [J/kg]<br class="">
CAPE180_0mb 0 157,116,46080 ** 180-0 mb above gnd Convective Avail. Pot. Energy [J/kg]<br class="">
CAPE255_0mb 0 157,116,65280 ** 255-0 mb above gnd Convective Avail. Pot. Energy [J/kg]<br class="">
CDCONclm 0 72,200,0 ** atmos column Convective cloud cover [%]<br class="">
CFRZRsfc 0 141,1,0 ** surface Categorical freezing rain [yes=1;no=0]<br class="">
CICEPsfc 0 142,1,0 ** surface Categorical ice pellets [yes=1;no=0]<br class="">
CINsfc 0 156,1,0 ** surface Convective inhibition [J/kg]<br class="">
CIN90_0mb 0 156,116,23040 ** 90-0 mb above gnd Convective inhibition [J/kg]<br class="">
CIN180_0mb 0 156,116,46080 ** 180-0 mb above gnd Convective inhibition [J/kg]<br class="">
CIN255_0mb 0 156,116,65280 ** 255-0 mb above gnd Convective inhibition [J/kg]<br class="">
CPRATsfc 0 214,1,0 ** surface Convective precip. rate [kg/m^2/s]<br class="">
CRAINsfc 0 140,1,0 ** surface Categorical rain [yes=1;no=0]<br class="">
CSNOWsfc 0 143,1,0 ** surface Categorical snow [yes=1;no=0]<br class="">
DLWRFsfc 0 205,1,0 ** surface Downward long wave flux [W/m^2]<br class="">
DPTprs 25 17,100,0 ** (profile) Dew point temp. [K]<br class="">
DPT2m 0 17,105,2 ** 2 m above ground Dew point temp. [K]<br class="">
DSWRFsfc 0 204,1,0 ** surface Downward short wave flux [W/m^2]<br class="">
ELONsfc 0 177,1,0 ** surface East longitude (0-360) [deg]<br class="">
GFLUXsfc 0 155,1,0 ** surface Ground heat flux [W/m^2]<br class="">
GUSTsfc 0 180,1,0 ** surface Surface wind gust [m/s]<br class="">
HCDChcl 0 75,234,0 ** high cloud level High level cloud cover [%]<br class="">
HGTsfc 0 7,1,0 ** surface Geopotential height [gpm]<br class="">
HGTprs 25 7,100,0 ** (profile) Geopotential height [gpm]<br class="">
HGT0deg 0 7,4,0 ** 0C isotherm level Geopotential height [gpm]<br class="">
HGTadcl 0 7,5,0 ** adiabatic lifting condensation level Geopotential height [gpm]<br class="">
HINDEXsfc 0 250,1,0 ** surface Haines index []<br class="">
HLCY0_3000m 0 190,106,7680 ** 0-3000 m above ground Storm relative helicity [m^2/s^2]<br class="">
HPBLsfc 0 221,1,0 ** surface Planetary boundary layer height [m]<br class="">
LANDsfc 0 81,1,0 ** surface Land cover (land=1;sea=0) [fraction]<br class="">
LCDClcl 0 73,214,0 ** low cloud level Low level cloud cover [%]<br class="">
LFTX500_1000mb 0 131,101,12900 ** 500-1000 mb Surface lifted index [K]<br class="">
LTNGsfc 0 187,1,0 ** surface Lightning [non-dim]<br class="">
MCDCmcl 0 74,224,0 ** mid-cloud level Mid level cloud cover [%]<br class="">
MSLETmsl 0 130,102,0 ** mean-sea level Mean sea level pressure (ETA model) [Pa]<br class="">
MSLMAmsl 0 129,102,0 ** mean-sea level Mean sea level pressure (MAPS) [Pa]<br class="">
NCPCPsfc 0 62,1,0 ** surface Large scale precipitation [kg/m^2]<br class="">
NLATsfc 0 176,1,0 ** surface Latitude (-90 to +90) [deg]<br class="">
PLI30_0mb 0 24,116,7680 ** 30-0 mb above gnd Parcel lifted index (to 500 hPa) [K]<br class="">
PRATEsfc 0 59,1,0 ** surface Precipitation rate [kg/m^2/s]<br class="">
PWAT30_0mb 0 54,116,7680 ** 30-0 mb above gnd Precipitable water [kg/m^2]<br class="">
PWATclm 0 54,200,0 ** atmos column Precipitable water [kg/m^2]<br class="">
REFCclm 0 212,200,0 ** atmos column Maximum/Composite radar reflectivity [dbZ]<br class="">
RHprs 25 52,100,0 ** (profile) Relative humidity [%]<br class="">
RH2m 0 52,105,2 ** 2 m above ground Relative humidity [%]<br class="">
RWMRhlev1 0 170,109,1 ** hybrid level 1 Rain water mixing ratio [kg/kg]<br class="">
SNMRhlev1 0 171,109,1 ** hybrid level 1 Snow mixing ratio [kg/kg]<br class="">
SNODsfc 0 66,1,0 ** surface Snow depth [m]<br class="">
SNOLsfc 0 79,1,0 ** surface Large scale snow [kg/m^2]<br class="">
SNOMsfc 0 99,1,0 ** surface Snow melt [kg/m^2]<br class="">
SNOWCsfc 0 238,1,0 ** surface Snow cover [%]<br class="">
SSRUNsfc 0 235,1,0 ** surface Storm surface runoff [kg/m^2]<br class="">
SUNSDsfc 0 191,1,0 ** surface Sunshine duration [s]<br class="">
TCDCclm 0 71,200,0 ** atmos column Total cloud cover [%]<br class="">
TMPsfc 0 11,1,0 ** surface Temp. [K]<br class="">
TMPprs 25 11,100,0 ** (profile) Temp. [K]<br class="">
TMP100m 0 11,105,100 ** 100 m above ground Temp. [K]<br class="">
TMP2m 0 11,105,2 ** 2 m above ground Temp. [K]<br class="">
UGRDprs 25 33,100,0 ** (profile) u wind [m/s]<br class="">
UGRD305m 0 33,105,305 ** 305 m above ground u wind [m/s]<br class="">
UGRD100m 0 33,105,100 ** 100 m above ground u wind [m/s]<br class="">
UGRD80m 0 33,105,80 ** 80 m above ground u wind [m/s]<br class="">
UGRD50m 0 33,105,50 ** 50 m above ground u wind [m/s]<br class="">
UGRD30m 0 33,105,30 ** 30 m above ground u wind [m/s]<br class="">
UGRD10m 0 33,105,10 ** 10 m above ground u wind [m/s]<br class="">
ULWRFsfc 0 212,1,0 ** surface Upward long wave flux [W/m^2]<br class="">
USWRFsfc 0 211,1,0 ** surface Upward short wave flux [W/m^2]<br class="">
VGRDprs 25 34,100,0 ** (profile) v wind [m/s]<br class="">
VGRD305m 0 34,105,305 ** 305 m above ground v wind [m/s]<br class="">
VGRD100m 0 34,105,100 ** 100 m above ground v wind [m/s]<br class="">
VGRD80m 0 34,105,80 ** 80 m above ground v wind [m/s]<br class="">
VGRD50m 0 34,105,50 ** 50 m above ground v wind [m/s]<br class="">
VGRD30m 0 34,105,30 ** 30 m above ground v wind [m/s]<br class="">
VGRD10m 0 34,105,10 ** 10 m above ground v wind [m/s]<br class="">
VISsfc 0 20,1,0 ** surface Visibility [m]<br class="">
VISclt 0 20,3,0 ** cloud top Visibility [m]<br class="">
VVELprs 25 39,100,0 ** (profile) Pressure vertical velocity [Pa/s]<br class="">
WEASDsfc 0 65,1,0 ** surface Accum. snow [kg/m^2]<br class="">
WTMPsfc 0 80,1,0 ** surface Water temp. [K]<br class="">
ENDVARS<br class="">
</font></div>
</div>
<div class=""><br class="">
</div>
<div class=""> There were a few complexities:</div>
<div class=""><br class="">
</div>
<div class="">1. The first five variables listed (commented out in my descriptor) are missing the forecast interval metadata and so appear to be valid at the base time (00z17nov) in both the 20- and 30-minute data files. If these variables are important to
you, you will have to jump through some extra hoops. For the moment, I will assume we can ignore them.</div>
<div class=""><br class="">
</div>
<div class="">2. Your grib1 files have two different syntaxes for expressing the forecast interval -- for the 20-minute data file the unit is minutes and the interval value is 20; for the 30-minute data file the unit is 30 minutes and the interval value is
1. This is unusual (and confusing), but GrADS (and gribmap in particular) can deal with it. My descriptor specifies the base time in the TDEF entry as the same base time in the data files, so there will be no data for t=1 and t=2, which have forecast interval
values of 0 and 10 minutes respectively. The 20-minute file is valid at t=3, and the 30-minute file is valid at t=4. You could also have used</div>
<div class=""> </div>
<span style="font-family: Courier; font-size: small;" class="">chsub 1 1 WRFPRS_d01.00_20</span><br style="font-family: Courier;" class="">
<span style="font-family: Courier; font-size: small;" class="">chsub 2 2 WRFPRS_d01.00_30</span><br style="font-family: Courier;" class="">
<div class=""><span style="font-family: Courier; font-size: small;" class="">tdef 2 linear 00:20Z17nov2017 10mn</span><br style="font-family: Courier;" class="">
</div>
<div class=""><br class="">
</div>
<div class="">But I find it is more intuitive to have the t=1 value be the start of a forecast. Either way will work. </div>
<div class=""><br class="">
</div>
<div class="">—Jennifer</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class="">
<div class=""><br class="">
<blockquote type="cite" class="">On Nov 21, 2017, at 3:47 PM, Wesley Ebisuzaki - NOAA Federal <<a href="mailto:wesley.ebisuzaki@noaa.gov" class="">wesley.ebisuzaki@noaa.gov</a>> wrote:<br class="">
<br class="">
Ivan,<br class="">
<br class="">
New plan: don't fix g2ctl and alt_g2ctl.<br class="">
<br class="">
Turns out that the problem was in your grib1 files. Your grib1 <br class="">
20 minute forecast file had items like "20min fcst" and "valid 0-0min".<br class="">
The last one should have been "valid 10-20min" or "valid 0-20min".<br class="">
This error makes templating impossible.<br class="">
<br class="">
Wesley<br class="">
<br class="">
On Tue, Nov 21, 2017 at 2:42 PM, Wesley Ebisuzaki - NOAA Federal <<a href="mailto:wesley.ebisuzaki@noaa.gov" class="">wesley.ebisuzaki@noaa.gov</a>> wrote:<br class="">
Ivan,<br class="">
<br class="">
The error message, "add_time: undefined time unit 14", comes from wgrib2.<br class="">
So you have to be processing the grib2 files.<br class="">
<br class="">
I don't work with files that are sub-hourly. So the support for<br class="">
minutes is not robust. There is no support for minutes by<br class="">
the program grib2ctl.pl. G2ctl has some support for minutes<br class="">
but it appears to be broken for your files. <br class="">
<br class="">
Plan: fix g2ctl and alt_g2ctl. I stopped working<br class="">
on grib1 utilities about 10 years ago.<br class="">
<br class="">
Wesley<br class="">
<br class="">
<br class="">
On Tue, Nov 21, 2017 at 1:20 PM, Ivan Toman <ivtoman@inet.hr> wrote:<br class="">
Wesley,<br class="">
<br class="">
Thank you very much for your efforts to help. However I'm still not sure we understand each other well? It is not important to me to use grib2 format. I just want to be<br class="">
<br class="">
able to get data from model using GrADS, regardless of format or tools used. But I can't postprocess grib1 also, if I use grib2ctl.pl on grib1 format, I again get same error like when I use g2ctl on grib2, as I pasted below.<br class="">
<br class="">
So basically for me neither grib2 nor grib1 work.<br class="">
<br class="">
Ivan<br class="">
<br class="">
<br class="">
<br class="">
On 11/21/2017 04:48 PM, Wesley Ebisuzaki - NOAA Federal wrote:<br class="">
<blockquote type="cite" class="">Ivan,<br class="">
<br class="">
I just modified grb1to2.pl to add support for minutes time units. Both<br class="">
g2ctl and alt_g2ctl need some changes to add support for templates<br class="">
that use minutes and forecast minutes. I'll get to it soon.<br class="">
<br class="">
The problem is that you are using cnvgrib to convert from grib1<br class="">
to grib2. Cnvgrib does not handle grib1 files that use a 30-minute<br class="">
time units (value=14) and produces invalid grib2 files.<br class="">
<br class="">
I talked with the person who use to support cnvgrib and he stated that <br class="">
another person complained about a similar problem and that cnvgrib <br class="">
is no longer supported. So you are not going to get the fix from<br class="">
the official source of the program. The fix is straight forward;<br class="">
however, you should reconsider how you do your processing.<br class="">
<br class="">
Wesley<br class="">
<br class="">
On Mon, Nov 20, 2017 at 6:47 PM, Ivan Toman <ivtoman@inet.hr> wrote:<br class="">
Thank you Wesley,<br class="">
<br class="">
but it seems that same problem happens with grib1 format, directly from UPP postprocessor:<br class="">
<br class="">
grib2ctl.pl
<div class=""> -verf WRFPRS_d01.00_30 >30.ctl</div>
<div class="">add_time: undefined time unit 14</div>
<div class="">PDS_date: problem</div>
<div class="">add_time: undefined time unit 14</div>
<div class="">PDS_date: problem</div>
<br class="">
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class="">wgrib WRFPRS_d01.00_20</div>
<div class="">1:0:d=17111700:RWMR:kpds5=170:</div>
kpds6=109:kpds7=1:TR=10:P1=0:P
<div class="">2=20:TimeU=0:hybrid lev 1:20min fcst:NAve=0</div>
<div class="">2:44496:d=17111700:SNMR:kpds5=</div>
171:kpds6=109:kpds7=1:TR=10:P1
<div class="">=0:P2=20:TimeU=0:hybrid lev 1:20min fcst:NAve=0</div>
<div class="">3:88992:d=17111700:REFC:kpds5=</div>
212:kpds6=200:kpds7=0:TR=10:P1
<div class="">=0:P2=20:TimeU=0:atmos col:20min fcst:NAve=0</div>
<div class=""><br class="">
</div>
<div class="">But:</div>
<div class=""><br class="">
</div>
<div class="">wgrib WRFPRS_d01.00_30</div>
<div class="">1:0:d=17111700:RWMR:kpds5=170:</div>
kpds6=109:kpds7=1:TR=10:P1=0:P
<div class="">2=1:TimeU=14:hybrid lev 1:30min fcst:NAve=0</div>
<div class="">2:44496:d=17111700:SNMR:kpds5=</div>
171:kpds6=109:kpds7=1:TR=10:P1
<div class="">=0:P2=1:TimeU=14:hybrid lev 1:30min fcst:NAve=0</div>
<div class="">3:88992:d=17111700:REFC:kpds5=</div>
212:kpds6=200:kpds7=0:TR=10:P1
<div class="">=0:P2=1:TimeU=14:atmos col:30min fcst:NAve=0</div>
<div class=""><br class="">
</div>
<br class="Apple-interchange-newline">
I believe, pretty much the same response on time units on grib1 format.<br class="">
<br class="">
Is this expected behaviour or grib files look wrong? I uploaded them here if you want to take a look:<br class="">
http://gamma.meteoadriatic.net/tmp/jennifer/<br class="">
<br class="">
Thx<br class="">
Ivan<br class="">
<br class="">
<br class="">
On 11/20/2017 01:52 AM, Wesley Ebisuzaki - NOAA Federal wrote:<br class="">
<blockquote type="cite" class="">Ivan,<br class="">
<br class="">
Back from a conference. 14 = 1/2 hour for grib1. However<br class="">
there isn't a 1/2 hour time unit for grib2.<br class="">
<br class="">
http://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_table4-4.shtml<br class="">
<br class="">
The code needs to be changed to use minutes as the grib2 time units.<br class="">
Note: grib1 only used 1 byte or 2 bytes to store the forecast length.<br class="">
Therefore they invented a large number of time units. Grib2 uses<br class="">
4 bytes to store the number of time units.<br class="">
<br class="">
You can try to convince NCO to fix cnvgrib. I know the person<br class="">
responsible for cnvgrib and good luck. <br class="">
<br class="">
My suggestion #1 doesn't work<br class="">
<br class="">
$ wgrib2 wrfprs_d01.00_30.g2 -if ":30 min fcst:" -set_ftime "30 min fcst" -fi -grib wrfprs_d01.00_30.g2.con<br class="">
add_time: undefined time unit 14<br class="">
add_time: undefined time unit 14<br class="">
add_time: undefined time unit 14<br class="">
<br class="">
-if ":30 min fcst:" will always fail because wgrib2 doesn't understand the time code 14.<br class="">
The error message "add_time: undefined time unit 14" comes from the calculation of<br class="">
the verification time.<br class="">
<br class="">
Wesley<br class="">
<br class="">
<br class="">
On Fri, Nov 17, 2017 at 3:34 AM, Ivan Toman <ivtoman@inet.hr> wrote:<br class="">
Wesley,<br class="">
<br class="">
I think this comes from here:<br class="">
<br class="">
On grib1 output from UPP - this is for 10min record, all normal:<br class="">
<br class="">
$ wgrib WRFPRS_d01.00_10<br class="">
1:0:d=17111700:RWMR:kpds5=170:kpds6=109:kpds7=1:TR=10:P1=0:P2=10:TimeU=0:hybrid lev 1:10min fcst:NAve=0<br class="">
2:44496:d=17111700:SNMR:kpds5=171:kpds6=109:kpds7=1:TR=10:P1=0:P2=10:TimeU=0:hybrid lev 1:10min fcst:NAve=0<br class="">
3:88992:d=17111700:REFC:kpds5=212:kpds6=200:kpds7=0:TR=10:P1=0:P2=10:TimeU=0:atmos col:10min fcst:NAve=0<br class="">
...<br class="">
<br class="">
however, for 30min record:<br class="">
<br class="">
$ wgrib WRFPRS_d01.00_30 <br class="">
1:0:d=17111700:RWMR:kpds5=170:kpds6=109:kpds7=1:TR=10:P1=0:P2=1:TimeU=14:hybrid lev 1:30min fcst:NAve=0<br class="">
2:44496:d=17111700:SNMR:kpds5=171:kpds6=109:kpds7=1:TR=10:P1=0:P2=1:TimeU=14:hybrid lev 1:30min fcst:NAve=0<br class="">
3:88992:d=17111700:REFC:kpds5=212:kpds6=200:kpds7=0:TR=10:P1=0:P2=1:TimeU=14:atmos col:30min fcst:NAve=0<br class="">
...<br class="">
<br class="">
TimeU=14<br class="">
<br class="">
<br class="">
Where this comes from? <br class="">
<br class="">
As far as I understand it, UPP follows this time designation for time units:<br class="">
http://www.nco.ncep.noaa.gov/pmb/docs/on388/table4.html<br class="">
14 = "Half an hour"<br class="">
<br class="">
This is from UPP code that sets it:<br class="">
<br class="">
! J. HALLEY GOTWAY, MODIFY HOW THE TIME INFORMATION IS STORED IN ID(17-20),<br class="">
! (FCST TIME UNIT, P1, P2, TIME RANGE INDICATOR).<br class="">
! CHECK IF THE NUMBER OF FORECAST MINUTES IS ZERO FOR HOURS OR NON-ZERO FOR<br class="">
! OFF-HOUR FORECASTS. FOR OFF-HOUR FORECASTS, CHECK IF THE TOTAL NUMBER<br class="">
! OF MINUTES IS DIVISIBLE BY 30, 15, OR NEITHER, AND USE THE APPROPRIATE<br class="">
! FCST TIME UNIT VALUE. FOR ANY FIELD OTHER THAN AN INSTANTANEOUS FIELD,<br class="">
! ASSUME ID(18-20), ARE PASSED IN CORRECTLY.<br class="">
<br class="">
IF(IFMIN .GE. 1)THEN<br class="">
! ID(17) = 0<br class="">
! COMPUTE THE TOTAL FORECAST MINUTES.<br class="">
TOTMIN=IFHR*60+IFMIN<br class="">
<br class="">
! CHECK FOR 1/2 HOURLY INCREMENTS.<br class="">
IF (MOD(TOTMIN, 30) == 0) THEN<br class="">
ID(17) = 14<br class="">
DIV = 30<br class="">
! CHECK FOR 1/4 HOURLY INCREMENTS.<br class="">
ELSEIF (MOD(TOTMIN, 15) == 0) THEN<br class="">
ID(17) = 13<br class="">
DIV = 15<br class="">
! OTHERWISE, USE MINUTES.<br class="">
ELSE<br class="">
ID(17) = 0<br class="">
DIV = 1<br class="">
ENDIF<br class="">
<br class="">
<br class="">
Does this look OK to you?<br class="">
<br class="">
Thx<br class="">
Ivan<br class="">
<br class="">
<br class="">
<br class="">
<br class="">
<br class="">
On 11/15/2017 02:39 PM, Wesley Ebisuzaki - NOAA Federal wrote:<br class="">
<blockquote type="cite" class="">Ivan,<br class="">
<br class="">
I am not aware of a time unit 14. It's not in NCEP's documentation.<br class="">
<br class="">
Wesley<br class="">
<br class="">
http://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_table4-4.shtml<br class="">
<br class="">
On Wed, Nov 15, 2017 at 4:27 AM, Ivan Toman <ivtoman@inet.hr> wrote:<br class="">
Wesley,<br class="">
<br class="">
I finally found time to dig into this.<br class="">
<br class="">
I actually get "undefined time unit 14" from wgrib2 when trying to handle 30 min records. That's probably why g2ctl, alt_g2ctl also does not do the job (throwing this message) and so on.<br class="">
<br class="">
For example, your suggestion #2:<br class="">
<br class="">
$ wgrib2 wrfprs_d01.00_30.g2 -if ":30 min fcst:" -set_ftime "30 min fcst" -fi -grib wrfprs_d01.00_30.g2.con<br class="">
add_time: undefined time unit 14<br class="">
add_time: undefined time unit 14<br class="">
add_time: undefined time unit 14<br class="">
1:0:d=2017111500:RWMR:1 hybrid level:1 ? fcst:<br class="">
add_time: undefined time unit 14<br class="">
add_time: undefined time unit 14<br class="">
add_time: undefined time unit 14<br class="">
2:2310:d=2017111500:SNMR:1 hybrid level:1 ? fcst:<br class="">
add_time: undefined time unit 14<br class="">
...<br class="">
<br class="">
<br class="">
Or...<br class="">
<br class="">
$ alt_gmp -i wrfprs_d01.grib2.ctl <br class="">
wgrib2_flags=-npts -set_ext_name 1 -end_FT -ext_name -lev<br class="">
wgrib2_inv=.invd01<br class="">
dtype: dtype grib2<br class="">
pdef: pdef 149 149 lccr -29.363000 45.203000 1 1 -21.633000 -21.633000 54.288000 12000.000000 12000.000000tdef: nt=7 start=00Z15nov2017 by=10mn<br class="">
zdef: nlevel=25<br class="">
resolve_dsets dset=wrfprs_d01.grib2 inctime=10mn<br class="">
resolve_dsets: no template<br class="">
scanning wrfprs_d01.grib2 (process=0)<br class="">
add_time: undefined time unit 14<br class="">
add_time: undefined time unit 14<br class="">
add_time: undefined time unit 14<br class="">
add_time: undefined time unit 14<br class="">
add_time: undefined time unit 14<br class="">
<br class="">
<br class="">
<br class="">
grib1to2.pl did not work either, it failed:<br class="">
<br class="">
$ for i in WRFPRS_d01.0* ; do ./grb1to2.pl -o $i.g2 $i ; done<br class="">
(((rec 1:0:date 2017111500 RWMR kpds5=170 kpds6=109 kpds7=1 levels=(0,1) grid=255 hybrid lev 1 anl:<br class="">
RWMR=Rain water mixing ratio [kg/kg]<br class="">
timerange 0 P1 0 P2 0 TimeU 1 nx 149 ny 149 GDS grid 3 num_in_ave 0 missing 0<br class="">
center 7 subcenter 0 process 125 Table 2 scan: WE:SN winds(grid) <br class="">
Lambert Conf: Lat1 -29.363000 Lon1 45.203000 Lov 54.288000<br class="">
Latin1 -21.633000 Latin2 -21.633000 LatSP -90.000000 LonSP 0.000000<br class="">
South Pole (149 x 149) Dx 12.000000 Dy 12.000000 scan 64 mode 136<br class="">
min/max data 0 0 num bits 0 BDS_Ref 0 DecScale 0 BinScale 0<br class="">
<br class="">
)))<br class="">
>> grib2_metadata --- WRFPRS_d01.00_00 wgrib=./wgrib wgrib2=./wgrib2<br class="">
Use of uninitialized value $1 in negation (-) at ./grib1to2_metadata.pl line 74, <INV> line 1.<br class="">
no scan mode at ./grib1to2_metadata.pl line 83, <INV> line 1.<br class="">
missing GRIB record(s)<br class="">
((()))<br class="">
Problem, winds not defined! old ./wgrib?<br class="">
grib2 message ignored (use wgrib2)<br class="">
missing GRIB record(s)<br class="">
((()))<br class="">
Problem, winds not defined! old ./wgrib?<br class="">
(((rec 1:0:date 2017111500 RWMR kpds5=170 kpds6=109 kpds7=1 levels=(0,1) grid=255 hybrid lev 1 10min fcst:<br class="">
RWMR=Rain water mixing ratio [kg/kg]<br class="">
timerange 10 P1 0 P2 10 TimeU 0 nx 149 ny 149 GDS grid 3 num_in_ave 0 missing 0<br class="">
center 7 subcenter 0 process 125 Table 2 scan: WE:SN winds(grid) <br class="">
Lambert Conf: Lat1 -29.363000 Lon1 45.203000 Lov 54.288000<br class="">
Latin1 -21.633000 Latin2 -21.633000 LatSP -90.000000 LonSP 0.000000<br class="">
South Pole (149 x 149) Dx 12.000000 Dy 12.000000 scan 64 mode 136<br class="">
min/max data 0 5.31824e-06 num bits 16 BDS_Ref 0 DecScale 11 BinScale 4<br class="">
<br class="">
<br class="">
<br class="">
I have no idea how to proceed further.<br class="">
Tks,<br class="">
Ivan<br class="">
<br class="">
<br class="">
<br class="">
<br class="">
On 11/07/2017 08:12 PM, Wesley Ebisuzaki - NOAA Federal wrote:<br class="">
<blockquote type="cite" class="">Ivan,<br class="">
<br class="">
"UPP follows NCEP code table for timing grib records - for 15 and 30<br class="">
minute records use codes 13 and 14 respectively instead of simple<br class="">
minutes. This seems to confuse GrADS (or g2ctl/gribmap, I'm not sure)."<br class="">
<br class="">
"Yes it is fixed. I'm currently need to output 10 min intervals. So, for <br class="">
full hour, 10m, 20m, 40m and 50m I get OK data. But for 30m I do not."<br class="">
<br class="">
These quotes suggests that it is a problem with gribmap expecting<br class="">
30 minute_time_units and not being able to handle 1 30_minute_time_units.<br class="">
<br class="">
Suggestion #1<br class="">
<br class="">
use alt_g2ctl/alt_gmp<br class="">
<br class="">
Both are based on wgrib2 which uses english rather than code table numbers.<br class="">
<br class="">
Suggestion #2<br class="">
<br class="">
convert forecast time from 1 (30 minutes) to 30 (minutes)<br class="">
<br class="">
wgrib2 IN.grb -if ":30 min fcst:" -set_ftime "30 min fcst" -fi -grib OUT.grb<br class="">
<br class="">
Wesley<br class="">
<br class="">
<br class="">
<br class="">
<br class="">
<br class="">
<br class="">
On Tue, Nov 7, 2017 at 1:21 PM, Jeff Duda <jeffduda319@gmail.com> wrote:<br class="">
What result do you get when you do<br class="">
<br class="">
wgrib2 -T (grib file)<br class="">
<br class="">
?<br class="">
<br class="">
Look after the "D=", as the represents the time in the GRIB2 file.<br class="">
<br class="">
Jeff<br class="">
<br class="">
On Tue, Nov 7, 2017 at 12:10 PM, Ivan Toman <ivtoman@inet.hr> wrote:<br class="">
Hello,<br class="">
<br class="">
Yes it is fixed. I'm currently need to output 10 min intervals. So, for full hour, 10m, 20m, 40m and 50m I get OK data. But for 30m I do not.<br class="">
<br class="">
Thank you!<br class="">
Ivan<br class="">
<br class="">
<br class="">
<br class="">
<br class="">
On 11/07/2017 05:50 PM, Jeff Duda wrote:<br class="">
<blockquote type="cite" class="">What is your time interval? If it's not fixed, that's one problem. If it is fixed, then I don't see why regular templating wouldn't work unless the time being written to the grib2 file is not right. But there are ways to fix
that.<br class="">
<br class="">
Jeff Duda<br class="">
<br class="">
On Tue, Nov 7, 2017 at 10:12 AM, Ivan Toman <ivtoman@inet.hr> wrote:<br class="">
Hello,<br class="">
<br class="">
I'm having difficulties reading sub-hourly time records from WRF grib<br class="">
files in GrADS.<br class="">
<br class="">
UPP follows NCEP code table for timing grib records - for 15 and 30<br class="">
minute records use codes 13 and 14 respectively instead of simple<br class="">
minutes. This seems to confuse GrADS (or g2ctl/gribmap, I'm not sure).<br class="">
<br class="">
What I get as result is that I can read any sub-hourly record as long as<br class="">
it is not 15 or 30 minute record. For those, I get undefined grid<br class="">
instead of data.<br class="">
<br class="">
I use this workflow for postprocessing: wfrout >(UPP)> grib1 >(cnvgrib)><br class="">
grib2 >(g2ctl,gribmap)> GrADS<br class="">
<br class="">
Does anybody know what is going on there?<br class="">
<br class="">
Thank you in advance<br class="">
<br class="">
Ivan Toman<br class="">
<br class="">
_______________________________________________<br class="">
gradsusr mailing list<br class="">
gradsusr@gradsusr.org<br class="">
http://gradsusr.org/mailman/listinfo/gradsusr<br class="">
<br class="">
<br class="">
<br class="">
-- <br class="">
Jeff Duda<br class="">
Post-doctoral research fellow<br class="">
University of Oklahoma School of Meteorology<br class="">
<br class="">
<br class="">
______________________________
<div class="">_________________</div>
<div class="">gradsusr mailing list</div>
<br class="Apple-interchange-newline">
gradsusr@gradsusr.org<br class="">
http://gradsusr.org/mailman/listinfo/gradsusr<br class="">
</blockquote>
<br class="">
<br class="">
_______________________________________________<br class="">
gradsusr mailing list<br class="">
gradsusr@gradsusr.org<br class="">
http://gradsusr.org/mailman/listinfo/gradsusr<br class="">
<br class="">
<br class="">
<br class="">
<br class="">
-- <br class="">
Jeff Duda<br class="">
Post-doctoral research fellow<br class="">
University of Oklahoma School of Meteorology<br class="">
<br class="">
_______________________________________________<br class="">
gradsusr mailing list<br class="">
gradsusr@gradsusr.org<br class="">
http://gradsusr.org/mailman/listinfo/gradsusr<br class="">
<br class="">
<br class="">
<br class="">
<br class="">
______________________________
<div class="">_________________</div>
<div class="">gradsusr mailing list</div>
<br class="Apple-interchange-newline">
gradsusr@gradsusr.org<br class="">
http://gradsusr.org/mailman/listinfo/gradsusr<br class="">
</blockquote>
<br class="">
<br class="">
_______________________________________________<br class="">
gradsusr mailing list<br class="">
gradsusr@gradsusr.org<br class="">
http://gradsusr.org/mailman/listinfo/gradsusr<br class="">
<br class="">
<br class="">
<br class="">
<br class="">
______________________________
<div class="">_________________</div>
<div class="">gradsusr mailing list</div>
<br class="Apple-interchange-newline">
gradsusr@gradsusr.org<br class="">
http://gradsusr.org/mailman/listinfo/gradsusr<br class="">
</blockquote>
<br class="">
<br class="">
_______________________________________________<br class="">
gradsusr mailing list<br class="">
gradsusr@gradsusr.org<br class="">
http://gradsusr.org/mailman/listinfo/gradsusr<br class="">
<br class="">
<br class="">
<br class="">
<br class="">
______________________________
<div class="">_________________</div>
<div class="">gradsusr mailing list</div>
<br class="Apple-interchange-newline">
gradsusr@gradsusr.org<br class="">
http://gradsusr.org/mailman/listinfo/gradsusr<br class="">
</blockquote>
<br class="">
<br class="">
_______________________________________________<br class="">
gradsusr mailing list<br class="">
gradsusr@gradsusr.org<br class="">
http://gradsusr.org/mailman/listinfo/gradsusr<br class="">
<br class="">
<br class="">
<br class="">
<br class="">
______________________________
<div class="">_________________</div>
<div class="">gradsusr mailing list</div>
<br class="Apple-interchange-newline">
gradsusr@gradsusr.org<br class="">
http://gradsusr.org/mailman/listinfo/gradsusr<br class="">
</blockquote>
<br class="">
<br class="">
_______________________________________________<br class="">
gradsusr mailing list<br class="">
gradsusr@gradsusr.org<br class="">
http://gradsusr.org/mailman/listinfo/gradsusr<br class="">
<br class="">
<br class="">
<br class="">
_______________________________________________<br class="">
gradsusr mailing list<br class="">
gradsusr@gradsusr.org<br class="">
http://gradsusr.org/mailman/listinfo/gradsusr<br class="">
</blockquote>
<br class="">
<div class="">--<br class="">
Jennifer Miletta Adams<br class="">
Center for Ocean-Land-Atmosphere Studies (COLA)<br class="">
George Mason University<br class="">
<br class="">
<br class="">
</div>
<br class="">
</div>
</div>
</body>
</html>