[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: questions about gribtonc.
- Subject: Re: questions about gribtonc.
- Date: Fri, 31 Jan 2003 10:27:53 -0700 (MST)
Yan,
Thanks for pointing out the bug and including the grib file. I believed
that the bugs are now fixed for the Gausian lat/lon grid. I created a new
cdl file by:
% gribtocdl -v test.grib > rtest.cdl
I'm also including the cdl as a reference. I made a decoders release in
the ftp dir pub/decoders/decoders-2.4.1.tar.Z that has all the changes.
Get via ftp:
% ftp www.unidata.ucar.edu
Let me know if any problems occur.
Robb...
On Wed, 29 Jan 2003, Yan Gu wrote:
> Hello Mr. Kambic,
>
> I have some questions about "gribtonc". I have downloaded it from ucar. It
> has been sucefully installed. However, when I used it to transfer a grib
> file to netCDF file, I got a "Bus error". I checked the log file. It gave
> me such message:
>
> Jan 29 16:29:36 gribtonc[724504]: Starting Up
> Jan 29 16:29:36 gribtonc[724504]: test.nc: no variable for N
> Jan 29 16:29:36 gribtonc[724504]: test.nc: can't get navigation
> information
> Jan 29 16:29:36 gribtonc[724504]: make_ncfile failed
>
> I checked my cdl file. The line related to this is:
>
> float n(nav) ;
> n:long_name = "XXX" ;
> n:units = "" ;
>
> When I used gribdump -h to get the header of my grib file, it said:
>
> Parameter : 71 (N)
> Units : percent
>
> After I changed the units of n to "persent", I still got error message in
> the log file.
>
> Jan 29 16:41:36 gribtonc[711032]: Starting Up
> Jan 29 16:41:36 gribtonc[711032]: Error parsing units: persent
> Jan 29 16:41:36 gribtonc[711032]: test.nc: can't get units attribute for
> variable n
> Jan 29 16:41:36 gribtonc[711032]: test.nc: no variable for N
> Jan 29 16:41:36 gribtonc[711032]: test.nc: can't get navigation
> information
> Jan 29 16:41:36 gribtonc[711032]: make_ncfile failed
>
> Attached is the cdl file I am using and the grib file I used to test. Do
> you have some clue about this and would you please help me out?
>
> Yan
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Yan Gu
>
> Sr. Computer Program Analyst
> Center For Ocean-Atmospheric Prediction Studies
> Florida State University
>
> Express Mail: 2035 E. Paul Dirac Drive
> R. M. Johnson Bldg. -Suite 233
> Tallahassee, FL32310
>
> Tel: (850)644-6935 (OFFICE) (850)574-9877 (HOME)
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
>
===============================================================================
Robb Kambic Unidata Program Center
Software Engineer III Univ. Corp for Atmospheric Research
address@hidden WWW: http://www.unidata.ucar.edu/
===============================================================================
netcdf test.grib{
dimensions:
record = UNLIMITED ; // (reference time, forecast time)
lat = 94 ;
lon = 192 ;
lbls = 2 ;
fhg = 2 ;
datetime_len = 21 ;
nmodels = 1 ;
ngrids = 1 ;
nav = 1 ;
nav_len = 100 ;
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, datetime_len) ; // derived from reftime
datetime:long_name = "reference date and time" ;
// units YYYY-MM-DD hh:mm:ssZ (ISO 8601)
float valtime_offset(record) ; // derived as valtime-reftime
valtime_offset:long_name = "hours from reference time" ;
valtime_offset:units = "hours" ;
:lbls = "lbls_bot, lbls_top" ; // ("lbls_bot, lbls_top") uniquely
// determines lbls
float lbls_bot(lbls) ;
lbls_bot:long_name = "bottom level of Layer between 2 depths
below land surface " ;
lbls_bot:units = "cm" ;
float lbls_top(lbls) ;
lbls_top:long_name = "top level of Layer between 2 depths below
land surface " ;
lbls_top:units = "cm" ;
float fhg(fhg) ;
fhg:long_name = "fixed height above ground" ;
fhg:units = "meters" ;
// 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 N(nav) ;
N:long_name = "# of parallels between a pole and equator" ;
N:units = "" ;
byte ResCompFlag(nav) ;
ResCompFlag:long_name = "resolution and component flags" ;
// end of navigation variables
float u_flx_sfc(record,lat,lon) ;
u_flx_sfc:long_name = "Momentum flux, u component, N/m2" ;
u_flx_sfc:units = "N/m2" ;
u_flx_sfc:_FillValue = -9999.f ;
u_flx_sfc:navigation = "nav" ;
float v_flx_sfc(record,lat,lon) ;
v_flx_sfc:long_name = "Momentum flux, v component, N/m2" ;
v_flx_sfc:units = "N/m2" ;
v_flx_sfc:_FillValue = -9999.f ;
v_flx_sfc:navigation = "nav" ;
float sen_ht_sfc(record,lat,lon) ;
sen_ht_sfc:long_name = "Sensible heat flux, W/m2" ;
sen_ht_sfc:units = "W/m2" ;
sen_ht_sfc:_FillValue = -9999.f ;
sen_ht_sfc:navigation = "nav" ;
float lat_ht_sfc(record,lat,lon) ;
lat_ht_sfc:long_name = "Latent heat flux, W/m2" ;
lat_ht_sfc:units = "W/m2" ;
lat_ht_sfc:_FillValue = -9999.f ;
lat_ht_sfc:navigation = "nav" ;
float T_sfc(record,lat,lon) ;
T_sfc:long_name = "Temperature, deg. K" ;
T_sfc:units = "degK" ;
T_sfc:_FillValue = -9999.f ;
T_sfc:navigation = "nav" ;
float T_lbls(record,lbls,lat,lon) ;
T_lbls:long_name = "Temperature, deg. K" ;
T_lbls:units = "degK" ;
T_lbls:_FillValue = -9999.f ;
T_lbls:navigation = "nav" ;
float T_hctl(record,lat,lon) ;
T_hctl:long_name = "Temperature, deg. K" ;
T_hctl:units = "degK" ;
T_hctl:_FillValue = -9999.f ;
T_hctl:navigation = "nav" ;
float T_mctl(record,lat,lon) ;
T_mctl:long_name = "Temperature, deg. K" ;
T_mctl:units = "degK" ;
T_mctl:_FillValue = -9999.f ;
T_mctl:navigation = "nav" ;
float T_lctl(record,lat,lon) ;
T_lctl:long_name = "Temperature, deg. K" ;
T_lctl:units = "degK" ;
T_lctl:_FillValue = -9999.f ;
T_lctl:navigation = "nav" ;
float T_fhg(record,fhg,lat,lon) ;
T_fhg:long_name = "Temperature, deg. K" ;
T_fhg:units = "degK" ;
T_fhg:_FillValue = -9999.f ;
T_fhg:navigation = "nav" ;
float soilw_lbls(record,lbls,lat,lon) ;
soilw_lbls:long_name = "Volumetric soil moisture content" ;
soilw_lbls:units = "" ;
soilw_lbls:_FillValue = -9999.f ;
soilw_lbls:navigation = "nav" ;
float snow_wat(record,lat,lon) ;
snow_wat:long_name = "Water equiv. of accum. snow depth, kg/m2" ;
snow_wat:units = "kg/m2" ;
snow_wat:_FillValue = -9999.f ;
snow_wat:navigation = "nav" ;
float dlwrf_sfc(record,lat,lon) ;
dlwrf_sfc:long_name = "downward long wave rad. flux, W/m2" ;
dlwrf_sfc:units = "W/m2" ;
dlwrf_sfc:_FillValue = -9999.f ;
dlwrf_sfc:navigation = "nav" ;
float ulwrf_sfc(record,lat,lon) ;
ulwrf_sfc:long_name = "upward long wave rad. flux, W/m2" ;
ulwrf_sfc:units = "W/m2" ;
ulwrf_sfc:_FillValue = -9999.f ;
ulwrf_sfc:navigation = "nav" ;
float ulwrf_topa(record,lat,lon) ;
ulwrf_topa:long_name = "upward long wave rad. flux, W/m2" ;
ulwrf_topa:units = "W/m2" ;
ulwrf_topa:_FillValue = -9999.f ;
ulwrf_topa:navigation = "nav" ;
float uswrf_topa(record,lat,lon) ;
uswrf_topa:long_name = "upward short wave rad. flux, W/m2" ;
uswrf_topa:units = "W/m2" ;
uswrf_topa:_FillValue = -9999.f ;
uswrf_topa:navigation = "nav" ;
float uswrf_sfc(record,lat,lon) ;
uswrf_sfc:long_name = "upward short wave rad. flux, W/m2" ;
uswrf_sfc:units = "W/m2" ;
uswrf_sfc:_FillValue = -9999.f ;
uswrf_sfc:navigation = "nav" ;
float dswrf_sfc(record,lat,lon) ;
dswrf_sfc:long_name = "downward short wave rad. flux, W/m2" ;
dswrf_sfc:units = "W/m2" ;
dswrf_sfc:_FillValue = -9999.f ;
dswrf_sfc:navigation = "nav" ;
float dswrf_topa(record,lat,lon) ;
dswrf_topa:long_name = "downward short wave rad. flux, W/m2" ;
dswrf_topa:units = "W/m2" ;
dswrf_topa:_FillValue = -9999.f ;
dswrf_topa:navigation = "nav" ;
float N_hcy(record,lat,lon) ;
N_hcy:long_name = "Total cloud cover, %" ;
N_hcy:units = "percent" ;
N_hcy:_FillValue = -9999.f ;
N_hcy:navigation = "nav" ;
float N_mcy(record,lat,lon) ;
N_mcy:long_name = "Total cloud cover, %" ;
N_mcy:units = "percent" ;
N_mcy:_FillValue = -9999.f ;
N_mcy:navigation = "nav" ;
float N_lcy(record,lat,lon) ;
N_lcy:long_name = "Total cloud cover, %" ;
N_lcy:units = "percent" ;
N_lcy:_FillValue = -9999.f ;
N_lcy:navigation = "nav" ;
float N_atm(record,lat,lon) ;
N_atm:long_name = "Total cloud cover, %" ;
N_atm:units = "percent" ;
N_atm:_FillValue = -9999.f ;
N_atm:navigation = "nav" ;
float P_hctl(record,lat,lon) ;
P_hctl:long_name = "Pressure, Pa" ;
P_hctl:units = "Pa" ;
P_hctl:_FillValue = -9999.f ;
P_hctl:navigation = "nav" ;
float P_hcbl(record,lat,lon) ;
P_hcbl:long_name = "Pressure, Pa" ;
P_hcbl:units = "Pa" ;
P_hcbl:_FillValue = -9999.f ;
P_hcbl:navigation = "nav" ;
float P_mctl(record,lat,lon) ;
P_mctl:long_name = "Pressure, Pa" ;
P_mctl:units = "Pa" ;
P_mctl:_FillValue = -9999.f ;
P_mctl:navigation = "nav" ;
float P_mcbl(record,lat,lon) ;
P_mcbl:long_name = "Pressure, Pa" ;
P_mcbl:units = "Pa" ;
P_mcbl:_FillValue = -9999.f ;
P_mcbl:navigation = "nav" ;
float P_lctl(record,lat,lon) ;
P_lctl:long_name = "Pressure, Pa" ;
P_lctl:units = "Pa" ;
P_lctl:_FillValue = -9999.f ;
P_lctl:navigation = "nav" ;
float P_lcbl(record,lat,lon) ;
P_lcbl:long_name = "Pressure, Pa" ;
P_lcbl:units = "Pa" ;
P_lcbl:_FillValue = -9999.f ;
P_lcbl:navigation = "nav" ;
float P_sfc(record,lat,lon) ;
P_sfc:long_name = "Pressure, Pa" ;
P_sfc:units = "Pa" ;
P_sfc:_FillValue = -9999.f ;
P_sfc:navigation = "nav" ;
float precip_rt(record,lat,lon) ;
precip_rt:long_name = "Precipitation rate, kg/m2/s" ;
precip_rt:units = "kg/(m2 s)" ;
precip_rt:_FillValue = -9999.f ;
precip_rt:navigation = "nav" ;
float cprat(record,lat,lon) ;
cprat:long_name = "Convective Precipitation rate, kg/m2/s" ;
cprat:units = "kg/m2/s" ;
cprat:_FillValue = -9999.f ;
cprat:navigation = "nav" ;
float gflux(record,lat,lon) ;
gflux:long_name = "Ground Heat Flux, W/m2" ;
gflux:units = "W/m2" ;
gflux:_FillValue = -9999.f ;
gflux:navigation = "nav" ;
float land_mask_sfc(record,lat,lon) ;
land_mask_sfc:long_name = "Land-sea mask (1=land; 0=sea), 1/0" ;
land_mask_sfc:units = "bit" ;
land_mask_sfc:_FillValue = -9999.f ;
land_mask_sfc:navigation = "nav" ;
float ice_conc(record,lat,lon) ;
ice_conc:long_name = "Ice concentration (ice=l; no ice=O), 1/0" ;
ice_conc:units = "bit" ;
ice_conc:_FillValue = -9999.f ;
ice_conc:navigation = "nav" ;
float u_fhg(record,fhg,lat,lon) ;
u_fhg:long_name = "u-component of wind, m/s" ;
u_fhg:units = "m/s" ;
u_fhg:_FillValue = -9999.f ;
u_fhg:navigation = "nav" ;
float v_fhg(record,fhg,lat,lon) ;
v_fhg:long_name = "v-component of wind, m/s" ;
v_fhg:units = "m/s" ;
v_fhg:_FillValue = -9999.f ;
v_fhg:navigation = "nav" ;
float spec_hum_fhg(record,fhg,lat,lon) ;
spec_hum_fhg:long_name = "Specific humidity, kg/kg" ;
spec_hum_fhg:units = "kg/kg" ;
spec_hum_fhg:_FillValue = -9999.f ;
spec_hum_fhg:navigation = "nav" ;
float Tmax_fhg(record,fhg,lat,lon) ;
Tmax_fhg:long_name = "Maximum temperature, deg. K" ;
Tmax_fhg:units = "degK" ;
Tmax_fhg:_FillValue = -9999.f ;
Tmax_fhg:navigation = "nav" ;
float Tmin_fhg(record,fhg,lat,lon) ;
Tmin_fhg:long_name = "Minimum temperature, deg. K" ;
Tmin_fhg:units = "degK" ;
Tmin_fhg:_FillValue = -9999.f ;
Tmin_fhg:navigation = "nav" ;
float watr(record,lat,lon) ;
watr:long_name = "Water runoff, kg/m2" ;
watr:units = "kg/m2" ;
watr:_FillValue = -9999.f ;
watr:navigation = "nav" ;
float pevpr_sfc(record,lat,lon) ;
pevpr_sfc:long_name = "Potential evaporation rate" ;
pevpr_sfc:units = "W/m2" ;
pevpr_sfc:_FillValue = -9999.f ;
pevpr_sfc:navigation = "nav" ;
float cwork_atm(record,lat,lon) ;
cwork_atm:long_name = "Cloud workfunction" ;
cwork_atm:units = "J/kg" ;
cwork_atm:_FillValue = -9999.f ;
cwork_atm:navigation = "nav" ;
float u-gwd_sfc(record,lat,lon) ;
u-gwd_sfc:long_name = "Zonal flux of gravity wave stress" ;
u-gwd_sfc:units = "N/m2" ;
u-gwd_sfc:_FillValue = -9999.f ;
u-gwd_sfc:navigation = "nav" ;
float v-gwd_sfc(record,lat,lon) ;
v-gwd_sfc:long_name = "Meridional flux of gravity wave stress" ;
v-gwd_sfc:units = "N/m2" ;
v-gwd_sfc:_FillValue = -9999.f ;
v-gwd_sfc:navigation = "nav" ;
float hpbl_sfc(record,lat,lon) ;
hpbl_sfc:long_name = "Planetary boundary layer height, m" ;
hpbl_sfc:units = "m" ;
hpbl_sfc:_FillValue = -9999.f ;
hpbl_sfc:navigation = "nav" ;
float pr_water_atm(record,lat,lon) ;
pr_water_atm:long_name = "Precipitable water, kg/m2" ;
pr_water_atm:units = "kg/m2" ;
pr_water_atm:_FillValue = -9999.f ;
pr_water_atm:navigation = "nav" ;
float snow_rt(record,lat,lon) ;
snow_rt:long_name = "Snowfall rate water equivalent, kg/m2s" ;
snow_rt:units = "kg/m2/s" ;
snow_rt:_FillValue = -9999.f ;
snow_rt:navigation = "nav" ;
float gpt_hgta5_sfc(record,lat,lon) ;
gpt_hgta5_sfc:long_name = "5-wave geopotential height anomaly" ;
gpt_hgta5_sfc:units = "gp m" ;
gpt_hgta5_sfc:_FillValue = -9999.f ;
gpt_hgta5_sfc:navigation = "nav" ;
float snohf(record,lat,lon) ;
snohf:long_name = "Snow phase-change heat flux, W/m2" ;
snohf:units = "W/m2" ;
snohf:_FillValue = -9999.f ;
snohf:navigation = "nav" ;
// global attributes
:history = "2003-01-30 13:01:21 - created by gribtocdl 1.4 -
12.12.2002" ;
:title = "test.grib" ;
:Conventions = "NUWG" ;
:version = 0.0 ;
data:
lbls_bot = 10.0, 200.0 ;
lbls_top = 0.0, 10.0 ;
fhg = 2.0, 10.0 ;
model_id = 80 ;
// Navigation
nav_model = "GRIB1" ;
grid_type_code = 4 ;
grid_type = "Gaussian latitude/longitude" ;
grid_name = " " ;
grid_center = 7 ;
grid_number = 98 ;
Ni = 192 ;
Nj = 94 ;
La1 = -88.542000 ;
Lo1 = 0.000000 ;
La2 = 88.542000 ;
Lo2 = -1.875000 ;
Di = 1.875000 ;
N = 47 ;
ResCompFlag = 128 ;
lon = 0.00, 1.88, 3.75, 5.62, 7.50, 9.38, 11.25, 13.12,
15.00, 16.88, 18.75, 20.62, 22.50, 24.38, 26.25, 28.12,
30.00, 31.88, 33.75, 35.62, 37.50, 39.38, 41.25, 43.12,
45.00, 46.88, 48.75, 50.62, 52.50, 54.38, 56.25, 58.12,
60.00, 61.88, 63.75, 65.62, 67.50, 69.38, 71.25, 73.12,
75.00, 76.88, 78.75, 80.62, 82.50, 84.38, 86.25, 88.12,
90.00, 91.88, 93.75, 95.62, 97.50, 99.38,101.25,103.12,
105.00,106.88,108.75,110.62,112.50,114.38,116.25,118.12,
120.00,121.88,123.75,125.62,127.50,129.38,131.25,133.12,
135.00,136.88,138.75,140.62,142.50,144.38,146.25,148.12,
150.00,151.88,153.75,155.62,157.50,159.38,161.25,163.12,
165.00,166.88,168.75,170.62,172.50,174.38,176.25,178.12,
180.00,181.88,183.75,185.62,187.50,189.38,191.25,193.12,
195.00,196.88,198.75,200.62,202.50,204.38,206.25,208.12,
210.00,211.88,213.75,215.62,217.50,219.38,221.25,223.12,
225.00,226.88,228.75,230.62,232.50,234.38,236.25,238.12,
240.00,241.88,243.75,245.62,247.50,249.38,251.25,253.12,
255.00,256.88,258.75,260.62,262.50,264.38,266.25,268.12,
270.00,271.88,273.75,275.62,277.50,279.38,281.25,283.12,
285.00,286.88,288.75,290.62,292.50,294.38,296.25,298.12,
300.00,301.88,303.75,305.62,307.50,309.38,311.25,313.12,
315.00,316.88,318.75,320.62,322.50,324.38,326.25,328.12,
330.00,331.88,333.75,335.62,337.50,339.38,341.25,343.12,
345.00,346.88,348.75,350.62,352.50,354.38,356.25,358.12 ;
lat =-88.54,-86.63,-84.72,-82.80,-80.89,-78.98,-77.06,-75.15,
-73.24,-71.32,-69.41,-67.50,-65.59,-63.67,-61.76,-59.85,
-57.93,-56.02,-54.11,-52.19,-50.28,-48.37,-46.46,-44.54,
-42.63,-40.72,-38.80,-36.89,-34.98,-33.06,-31.15,-29.24,
-27.32,-25.41,-23.50,-21.59,-19.67,-17.76,-15.85,-13.93,
-12.02,-10.11, -8.19, -6.28, -4.37, -2.46, -0.54, 1.37,
3.28, 5.20, 7.11, 9.02, 10.94, 12.85, 14.76, 16.68,
18.59, 20.50, 22.41, 24.33, 26.24, 28.15, 30.07, 31.98,
33.89, 35.81, 37.72, 39.63, 41.54, 43.46, 45.37, 47.28,
49.20, 51.11, 53.02, 54.94, 56.85, 58.76, 60.68, 62.59,
64.50, 66.41, 68.33, 70.24, 72.15, 74.07, 75.98, 77.89,
79.81, 81.72, 83.63, 85.54, 87.46, 89.37 ;
}