This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
Lori, I received the grib file and created a cdl file for your isabel data. The cdl from gribtocdl had to be modified a litte because it had valtime offsets of 0 and 6 because the PRECIP var is actually a time range and gribtocdl doesn't handle that well. ie From gribdump: Time Range Indicator : Accumulation from P1 to P2 Time 1 (P1) : 0 Time 2 (P2) : 6 other vars were similar too: Time Range Indicator : Reference Time + P1 Time 1 (P1) : 6 When gribtonc ran on the data, it only created one record for the 6 hr data. The cdl is a attached. Robb... On Thu, 26 Feb 2004, Robb Kambic wrote: > On Thu, 26 Feb 2004, Unidata Support wrote: > > > > > ------- Forwarded Message > > > > >To: address@hidden > > >From: Lori Thompson <address@hidden> > > >Subject: valtime_offset problems > > >Organization: UCAR/Unidata > > >Keywords: 200402261855.i1QItjrV024503 > > > > We recently upgraded to the decoders version 3.0.2. I am converting a > > dataset from grib to NetCDF. During the conversion, each snapshot file was > > concatenated using nccatm to produce a time series file. I seem to be > > running into problems with this newer version where additional points are > > added to the record dimension during gribtonc, creating additional > > 9actually doubling) blank frames in the time series. I have made several > > attempts to manipulate the CDL file so that the record dimension will only > > have 1 value per file but these efforts failed. Is there a new feature > > with the upgrade that is causing this, or am I doing something wrong? > > > Lori, > > I am not quite sure that what your question is? > > The valtime_offsets are extracted from the data files. The > offsets must be in the raw grib data you used to make the cdl. You could > use use the gribdump utility to check your grib input file. ie > > % gribdump <rawgrib> | less > ... > Time Range Indicator : Reference Time + Long P1 > Time 1 (P1) : 0 > Time 2 (P2) : 12 > ... > > This would result in a valtime_offset of 12. You could edit the cdl file > in the data section. Removing some of the values for the > valtime_offset, only used the offsets in the data that you are decoding. > > I don't know what the result would be if the variable valtime_offset was > removed from the data section. You would get some errors but not fatal > errors. > > > If none of the above ideas work, you might want to use the old version of > the decoder and modify the gribtocdl file section to look like lines > 1882-1937 in the latest gribtocdl. I think that the actual changes might > be only a couple lines in that section. A simple recompile might solve > your problem. > > Let me know your findings. If you are still having problems, send me your > cdl an a sample grib file. > > Robb.... > > > > > > Thanks, > > Lori > > > > -- > > ---------------------------------------------------- > > Lori A. Thompson > > Applications Programmer/RS Information Systems, Inc. > > Geophysical Fluid Dynamics Laboratory/NOAA > > Princeton University Forrestal Campus/Route 1 > > PO Box 308 > > Princeton, NJ 08542 > > Phone: 609-452-6563 > > Fax: 609-987-5063 > > http://www.gfdl.noaa.gov/~lat > > > > -- > > NOTE: All email exchanges with Unidata User Support are recorded in the > > Unidata inquiry tracking system and then made publically available > > through the web. If you do not want to have your interactions made > > available in this way, you must let us know in each email you send to us. > > > > ------- End of Forwarded Message > > > > =============================================================================== > Robb Kambic Unidata Program Center > Software Engineer III Univ. Corp for Atmospheric Research > address@hidden WWW: http://www.unidata.ucar.edu/ > =============================================================================== > =============================================================================== Robb Kambic Unidata Program Center Software Engineer III Univ. Corp for Atmospheric Research address@hidden WWW: http://www.unidata.ucar.edu/ ===============================================================================
netcdf Replace_with_model_name{ dimensions: record = UNLIMITED ; // (reference time, forecast time) lat = 225 ; // latitude lon = 225 ; // longitude fhg = 1 ; // fixed height above ground bls = 1 ; // depth below land surface level = 21 ; // isobaric levels time_len = 21 ; // string length for datetime strings valtime_offset = 1 ; // number of offset times nmodels = 1 ; // number of models ngrids = 1 ; // number of grids nav = 1 ; // for navigation nav_len = 100 ; // max string length for navigation strings variables: double reftime(record) ; // reference time of the model reftime:long_name = "reference time" ; reftime:units = "hours since 1992-1-1" ; double valtime(record) ; // forecast time ("valid" time) valtime:long_name = "valid time" ; valtime:units = "hours since 1992-1-1" ; :record = "reftime, valtime" ; // "dimension attribute" -- means // (reftime, valtime) uniquely // determine record char datetime(record, time_len) ; // derived from reftime datetime:long_name = "reference date and time" ; // units YYYY-MM-DD hh:mm:ssZ (ISO 8601) double valtime_offset(valtime_offset) ; // valtime - reftime valtime_offset:long_name = "hours from reference time" ; valtime_offset:units = "hours" ; char forecasttime(record, time_len) ; // derived from valtime forecasttime:long_name = "forecast date and time" ; // units YYYY-MM-DD hh:mm:ssZ (ISO 8601) float fhg(fhg) ; fhg:long_name = "fixed height above ground" ; fhg:units = "meters" ; float bls(bls) ; bls:long_name = "depth below land surface" ; bls:units = "cm" ; float level(level) ; level:long_name = "isobaric level" ; level:units = "hectopascals" ; // The following lat and lon coordinate variables are redundant, // since the navigation variables provide the necessary information. // The extra information is included here for human readability. float lat(lat) ; lat:long_name = "latitude" ; lat:units = "degrees_north" ; float lon(lon) ; lon:long_name = "longitude" ; lon:units = "degrees_east" ; long model_id(nmodels) ; model_id:long_name = "generating process ID number" ; // navigation variables all use nav dimension char nav_model(nav, nav_len) ; // navigation parameterization nav_model:long_name = "navigation model name" ; int grid_type_code(nav) ; grid_type_code:long_name = "GRIB-1 GDS data representation type" ; char grid_type(nav, nav_len) ; grid_type:long_name = "GRIB-1 grid type" ; char grid_name(nav, nav_len) ; grid_name:long_name = "grid name" ; int grid_center(nav) ; grid_center:long_name = "GRIB-1 originating center ID" ; int grid_number(nav, ngrids) ; grid_number:long_name = "GRIB-1 catalogued grid numbers" ; grid_number:_FillValue = -9999 ; char i_dim(nav, nav_len) ; i_dim:long_name = "longitude dimension name" ; char j_dim(nav, nav_len) ; j_dim:long_name = "latitude dimension name" ; int Ni(nav) ; Ni:long_name = "number of points along a latitude circle" ; int Nj(nav) ; Nj:long_name = "number of points along a longitude circle" ; float La1(nav) ; La1:long_name = "latitude of first grid point" ; La1:units = "degrees_north" ; float Lo1(nav) ; Lo1:long_name = "longitude of first grid point" ; Lo1:units = "degrees_east" ; float La2(nav) ; La2:long_name = "latitude of last grid point" ; La2:units = "degrees_north" ; float Lo2(nav) ; Lo2:long_name = "longitude of last grid point" ; Lo2:units = "degrees_east" ; float Di(nav) ; Di:long_name = "longitudinal direction increment" ; Di:units = "degrees" ; float Dj(nav) ; Dj:long_name = "latitudinal direction increment" ; Dj:units = "degrees" ; byte ResCompFlag(nav) ; ResCompFlag:long_name = "resolution and component flags" ; // end of navigation variables float P_msl(record,lat,lon) ; P_msl:long_name = "Pressure reduced to MSL at mean sea level" ; P_msl:GRIB_parameter_number = 2 ; P_msl:GRIB_level_flag = 102 ; P_msl:units = "Pa" ; P_msl:_FillValue = -9999.f ; P_msl:navigation = "nav" ; float PRECIP(record,lat,lon) ; PRECIP:long_name = "Total precipitation at surface of the earth" ; PRECIP:GRIB_parameter_number = 61 ; PRECIP:GRIB_level_flag = 1 ; PRECIP:units = "kg/m2" ; PRECIP:_FillValue = -9999.f ; PRECIP:navigation = "nav" ; float u_fhg(record,fhg,lat,lon) ; u_fhg:long_name = "u-component of wind at fixed height above ground" ; u_fhg:GRIB_parameter_number = 33 ; u_fhg:GRIB_level_flag = 105 ; u_fhg:units = "m/s" ; u_fhg:_FillValue = -9999.f ; u_fhg:navigation = "nav" ; float u(record,level,lat,lon) ; u:long_name = "u-component of wind at isobaric levels" ; u:GRIB_parameter_number = 33 ; u:GRIB_level_flag = 100 ; u:units = "m/s" ; u:_FillValue = -9999.f ; u:navigation = "nav" ; float v_fhg(record,fhg,lat,lon) ; v_fhg:long_name = "v-component of wind at fixed height above ground" ; v_fhg:GRIB_parameter_number = 34 ; v_fhg:GRIB_level_flag = 105 ; v_fhg:units = "m/s" ; v_fhg:_FillValue = -9999.f ; v_fhg:navigation = "nav" ; float v(record,level,lat,lon) ; v:long_name = "v-component of wind at isobaric levels" ; v:GRIB_parameter_number = 34 ; v:GRIB_level_flag = 100 ; v:units = "m/s" ; v:_FillValue = -9999.f ; v:navigation = "nav" ; float T_sfc(record,lat,lon) ; T_sfc:long_name = "Temperature at surface of the earth" ; T_sfc:GRIB_parameter_number = 11 ; T_sfc:GRIB_level_flag = 1 ; T_sfc:units = "degK" ; T_sfc:_FillValue = -9999.f ; T_sfc:navigation = "nav" ; float T_bls(record,bls,lat,lon) ; T_bls:long_name = "Temperature at depth below land surface" ; T_bls:GRIB_parameter_number = 11 ; T_bls:GRIB_level_flag = 111 ; T_bls:units = "degK" ; T_bls:_FillValue = -9999.f ; T_bls:navigation = "nav" ; float T(record,level,lat,lon) ; T:long_name = "Temperature at isobaric levels" ; T:GRIB_parameter_number = 11 ; T:GRIB_level_flag = 100 ; T:units = "degK" ; T:_FillValue = -9999.f ; T:navigation = "nav" ; float RH(record,level,lat,lon) ; RH:long_name = "Relative humidity at isobaric levels" ; RH:GRIB_parameter_number = 52 ; RH:GRIB_level_flag = 100 ; RH:units = "percent" ; RH:_FillValue = -9999.f ; RH:navigation = "nav" ; float Z(record,level,lat,lon) ; Z:long_name = "Geopotential height at isobaric levels" ; Z:GRIB_parameter_number = 7 ; Z:GRIB_level_flag = 100 ; Z:units = "gp m" ; Z:_FillValue = -9999.f ; Z:navigation = "nav" ; // global attributes :history = "2004-03-01 09:43:36 - created by gribtocdl" ; :title = "Enter model definition here" ; :Conventions = "NUWG" ; :GRIB_reference = "Office Note 388 GRIB" ; :GRIB_URL = "http://www.nco.ncep.noaa.gov/pmb/docs/on388/" ; :version = 0.0 ; data: fhg = 35.0 ; bls = 50.0 ; level = 1000.0, 950.0, 900.0, 850.0, 800.0, 750.0, 700.0, 650.0, 600.0, 550.0, 500.0, 450.0, 400.0, 350.0, 300.0, 250.0, 200.0, 150.0, 100.0, 50.0, 10.0 ; model_id = 70 ; valtime_offset = 6 ; // Navigation nav_model = "GRIB1" ; grid_type_code = 0 ; grid_type = "Latitude/Longitude" ; grid_name = " " ; grid_center = 7 ; grid_number = 255 ; i_dim = "lon" ; j_dim = "lat" ; Ni = 225 ; Nj = 225 ; La1 = -14.833000 ; Lo1 = -104.833000 ; La2 = 59.833000 ; Lo2 = -30.167000 ; Di = 0.333000 ; Dj = 0.333000 ; ResCompFlag = 128 ; lon =-104.83,-104.50,-104.17,-103.83,-103.50,-103.17,-102.83,-102.50, -102.17,-101.84,-101.50,-101.17,-100.84,-100.50,-100.17,-99.84, -99.50,-99.17,-98.84,-98.51,-98.17,-97.84,-97.51,-97.17, -96.84,-96.51,-96.17,-95.84,-95.51,-95.18,-94.84,-94.51, -94.18,-93.84,-93.51,-93.18,-92.84,-92.51,-92.18,-91.85, -91.51,-91.18,-90.85,-90.51,-90.18,-89.85,-89.51,-89.18, -88.85,-88.52,-88.18,-87.85,-87.52,-87.18,-86.85,-86.52, -86.18,-85.85,-85.52,-85.19,-84.85,-84.52,-84.19,-83.85, -83.52,-83.19,-82.85,-82.52,-82.19,-81.86,-81.52,-81.19, -80.86,-80.52,-80.19,-79.86,-79.52,-79.19,-78.86,-78.53, -78.19,-77.86,-77.53,-77.19,-76.86,-76.53,-76.19,-75.86, -75.53,-75.20,-74.86,-74.53,-74.20,-73.86,-73.53,-73.20, -72.86,-72.53,-72.20,-71.87,-71.53,-71.20,-70.87,-70.53, -70.20,-69.87,-69.53,-69.20,-68.87,-68.54,-68.20,-67.87, -67.54,-67.20,-66.87,-66.54,-66.20,-65.87,-65.54,-65.21, -64.87,-64.54,-64.21,-63.87,-63.54,-63.21,-62.87,-62.54, -62.21,-61.88,-61.54,-61.21,-60.88,-60.54,-60.21,-59.88, -59.54,-59.21,-58.88,-58.55,-58.21,-57.88,-57.55,-57.21, -56.88,-56.55,-56.21,-55.88,-55.55,-55.22,-54.88,-54.55, -54.22,-53.88,-53.55,-53.22,-52.88,-52.55,-52.22,-51.89, -51.55,-51.22,-50.89,-50.55,-50.22,-49.89,-49.55,-49.22, -48.89,-48.56,-48.22,-47.89,-47.56,-47.22,-46.89,-46.56, -46.22,-45.89,-45.56,-45.23,-44.89,-44.56,-44.23,-43.89, -43.56,-43.23,-42.89,-42.56,-42.23,-41.90,-41.56,-41.23, -40.90,-40.56,-40.23,-39.90,-39.56,-39.23,-38.90,-38.57, -38.23,-37.90,-37.57,-37.23,-36.90,-36.57,-36.23,-35.90, -35.57,-35.24,-34.90,-34.57,-34.24,-33.90,-33.57,-33.24, -32.90,-32.57,-32.24,-31.91,-31.57,-31.24,-30.91,-30.57, -30.24 ; lat =-14.83,-14.50,-14.17,-13.83,-13.50,-13.17,-12.83,-12.50, -12.17,-11.84,-11.50,-11.17,-10.84,-10.50,-10.17, -9.84, -9.50, -9.17, -8.84, -8.51, -8.17, -7.84, -7.51, -7.17, -6.84, -6.51, -6.17, -5.84, -5.51, -5.18, -4.84, -4.51, -4.18, -3.84, -3.51, -3.18, -2.84, -2.51, -2.18, -1.85, -1.51, -1.18, -0.85, -0.51, -0.18, 0.15, 0.49, 0.82, 1.15, 1.48, 1.82, 2.15, 2.48, 2.82, 3.15, 3.48, 3.82, 4.15, 4.48, 4.81, 5.15, 5.48, 5.81, 6.15, 6.48, 6.81, 7.15, 7.48, 7.81, 8.14, 8.48, 8.81, 9.14, 9.48, 9.81, 10.14, 10.48, 10.81, 11.14, 11.47, 11.81, 12.14, 12.47, 12.81, 13.14, 13.47, 13.81, 14.14, 14.47, 14.80, 15.14, 15.47, 15.80, 16.14, 16.47, 16.80, 17.14, 17.47, 17.80, 18.13, 18.47, 18.80, 19.13, 19.47, 19.80, 20.13, 20.47, 20.80, 21.13, 21.46, 21.80, 22.13, 22.46, 22.80, 23.13, 23.46, 23.80, 24.13, 24.46, 24.79, 25.13, 25.46, 25.79, 26.13, 26.46, 26.79, 27.13, 27.46, 27.79, 28.12, 28.46, 28.79, 29.12, 29.46, 29.79, 30.12, 30.46, 30.79, 31.12, 31.45, 31.79, 32.12, 32.45, 32.79, 33.12, 33.45, 33.79, 34.12, 34.45, 34.78, 35.12, 35.45, 35.78, 36.12, 36.45, 36.78, 37.12, 37.45, 37.78, 38.11, 38.45, 38.78, 39.11, 39.45, 39.78, 40.11, 40.45, 40.78, 41.11, 41.44, 41.78, 42.11, 42.44, 42.78, 43.11, 43.44, 43.78, 44.11, 44.44, 44.77, 45.11, 45.44, 45.77, 46.11, 46.44, 46.77, 47.11, 47.44, 47.77, 48.10, 48.44, 48.77, 49.10, 49.44, 49.77, 50.10, 50.44, 50.77, 51.10, 51.43, 51.77, 52.10, 52.43, 52.77, 53.10, 53.43, 53.77, 54.10, 54.43, 54.76, 55.10, 55.43, 55.76, 56.10, 56.43, 56.76, 57.10, 57.43, 57.76, 58.09, 58.43, 58.76, 59.09, 59.43, 59.76 ; }