[gradsusr] NetCDF file descriptor

Oriol Ciurana uri at uriens.cat
Fri May 2 17:29:25 EDT 2014


Hello,

I'm having problems trying to open a WRF NetCDF file with GrADS.

When I try to open it using "xdfopen" command I get the following error
message:

ga-> xdfopen eu12-pp_2014050200_0.nc
Scanning Descriptor File:  eu12-pp_2014050200_0.nc
gadxdf error: Unknown keyword in description file
  --> The invalid description file record is:
  --> cdf
  The data file was not opened.

After checking the GrADS documentation I have realised that a file
descriptor (ctl) is needed in order to open it using the "open" command, so
I need some help at this point. The dump of "ncdump -c" command is
attached. The dump shows that the NetCDF file is in LCC projection and due
to this I'm having problems defining the PDEF, XDEF and YDEF components. At
first attempt, the ctl i'm writing looks something like this:

DSET ^eu12-pp_2014050200_0.nc
DTYPE netcdf
UNDEF 9.999E+20
TITLE WRF-Europe model 12km
PDEF 495 309 lcc 26.36833 -24.60645f 1 1 47.5 47.5 4 12000 12000
XDEF 495 linear 1 1
YDEF 309 linear 1 1
ZDEF 36 levels 1000 975 950 925 900 875 850 825 800 775 750 725 700 675 650
625 600 575 550 525 500 475 450 425 400 $
TDEF 1 linear 00Z02may2014 1hr
VARS 3
LON=>glon     0  t,y,x  ** grid longitude
LAT=>glat     0  t,y,x  ** grid latitude
TMP2M=>tmp2m  0  t,y,x  ** tmp2m
...
ENDVARS

I'm pretty sure that PDEF,XDEF,YDEF are incorrect. Could you help me please
on writting it correctly please?

Thanks in advance,

Oriol Ciurana
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20140502/d91530ee/attachment.html 
-------------- next part --------------
netcdf eu12-pp_2014050200_0 {
dimensions:
	model_level = 39 ;
	y = 309 ;
	x = 495 ;
	press_level = 36 ;
	alti_level = 38 ;
variables:
	float lat(y, x) ;
		lat:_FillValue = 9.96921e+36f ;
		lat:long_name = "latitude" ;
		lat:standard_name = "latitude" ;
		lat:units = "degrees_north" ;
		lat:reference = "http://doc.omd.li/wrfpp/latlon" ;
		lat:_CoordinateAxisType = "Lat" ;
		lat:coordinates = "lon lat" ;
	float lon(y, x) ;
		lon:_FillValue = 9.96921e+36f ;
		lon:long_name = "longitude" ;
		lon:standard_name = "longitude" ;
		lon:units = "degrees_east" ;
		lon:reference = "http://doc.omd.li/wrfpp/latlon" ;
		lon:_CoordinateAxisType = "Lon" ;
		lon:coordinates = "lon lat" ;
	int Lambert_Conformal ;
		Lambert_Conformal:grid_mapping_name = "lambert_conformal_conic" ;
		Lambert_Conformal:standard_parallel = 47.5f, 47.5f ;
		Lambert_Conformal:longitude_of_central_meridian = 4.f ;
		Lambert_Conformal:latitude_of_projection_origin = 47.5f ;
		Lambert_Conformal:earth_radius = 6370000.f ;
		Lambert_Conformal:grid_dx = 12000.f ;
		Lambert_Conformal:grid_dy = 12000.f ;
		Lambert_Conformal:grid_nx = 495 ;
		Lambert_Conformal:grid_ny = 309 ;
		Lambert_Conformal:grid_center_lat = 47.5f ;
		Lambert_Conformal:grid_center_lon = 4.f ;
		Lambert_Conformal:sw_corner_lat = 26.36833f ;
		Lambert_Conformal:sw_corner_lon = -24.60645f ;
		Lambert_Conformal:reference = "http://doc.omd.li/wrfpp/lambert_conformal" ;
	float model_level(model_level) ;
		model_level:_FillValue = 9.96921e+36f ;
		model_level:long_name = "model_sigma_levels" ;
		model_level:standard_name =  ;
		model_level:description = "Vertical levels of the model grid" ;
		model_level:reference = "http://doc.omd.li/wrfpp/model_level" ;
		model_level:units =  ;
		model_level:coordinates = "model_level" ;
	float alti_level(alti_level) ;
		alti_level:_FillValue = 9.96921e+36f ;
		alti_level:long_name = "altitude_levels" ;
		alti_level:standard_name =  ;
		alti_level:description = "Interpolated altitude levels above mean sea level." ;
		alti_level:units = "m" ;
		alti_level:reference = "http://doc.omd.li/wrfpp/alti_level" ;
		alti_level:_CoordinateAxisType = "Height" ;
		alti_level:coordinates = "alti_level" ;
	float press_level(press_level) ;
		press_level:_FillValue = 9.96921e+36f ;
		press_level:long_name = "pressure_levels" ;
		press_level:standard_name =  ;
		press_level:description = "Interpolated pressure levels." ;
		press_level:units = "hPa" ;
		press_level:reference = "http://doc.omd.li/wrfpp/press_level" ;
		press_level:_CoordinateAxisType = "Pressure" ;
		press_level:coordinates = "press_level" ;
	float topo(y, x) ;
		topo:_FillValue = 9.96921e+36f ;
		topo:long_name = "model_terrain_elevation" ;
		topo:standard_name =  ;
		topo:description = "Terrain elevation above mean sea level, as seen by the numerical model. Terrain is smoothed to the model\'s grid resolution." ;
		topo:reference = "http://doc.omd.li/wrfpp/topo" ;
		topo:units = "m" ;
		topo:coordinates = "lon lat" ;
	float pblh(y, x) ;
		pblh:_FillValue = 9.96921e+36f ;
		pblh:long_name = "atmosphere_boundary_layer_thickness" ;
		pblh:standard_name = "atmosphere_boundary_layer_thickness" ;
		pblh:description = "The atmosphere boundary layer thickness is the \"depth\" or \"height\" of the (atmosphere) planetary boundary layer." ;
		pblh:reference = "http://doc.omd.li/wrfpp/pblh" ;
		pblh:units = "m" ;
		pblh:coordinates = "lon lat" ;
	float press(model_level, y, x) ;
		press:_FillValue = 9.96921e+36f ;
		press:long_name = "air_pressure" ;
		press:standard_name = "air_pressure" ;
		press:description =  ;
		press:reference = "http://doc.omd.li/wrfpp/press" ;
		press:units = "hPa" ;
		press:coordinates = "model_level lon lat" ;
	float geopotential(model_level, y, x) ;
		geopotential:_FillValue = 9.96921e+36f ;
		geopotential:long_name = "geopotential" ;
		geopotential:standard_name = "geopotential" ;
		geopotential:description = "Geopotential is the sum of the specific gravitational potential energy relative to the geoid and the specific centripetal potential energy." ;
		geopotential:reference = "http://doc.omd.li/wrfpp/geopotential" ;
		geopotential:units = "m2 s-2" ;
		geopotential:coordinates = "model_level lon lat" ;
	float height(model_level, y, x) ;
		height:_FillValue = 9.96921e+36f ;
		height:long_name = "geopotential_height" ;
		height:standard_name = "geopotential_height" ;
		height:description = "Geopotential is the sum of the specific gravitational potential energy relative to the geoid and the specific centripetal potential energy. Geopotential height is the geopotential divided by the standard acceleration due to gravity. It is numerically similar to the altitude (or geometric height) and not to the quantity with standard name height, which is relative to the surface." ;
		height:reference = "http://doc.omd.li/wrfpp/height" ;
		height:units = "m" ;
		height:coordinates = "model_level lon lat" ;
	float temp(model_level, y, x) ;
		temp:_FillValue = 9.96921e+36f ;
		temp:long_name = "air_temperature" ;
		temp:standard_name = "air_temperature" ;
		temp:description =  ;
		temp:reference = "http://doc.omd.li/wrfpp/temp" ;
		temp:units = "degree_Celsius" ;
		temp:coordinates = "model_level lon lat" ;
	float temp2m(y, x) ;
		temp2m:_FillValue = 9.96921e+36f ;
		temp2m:long_name = "air_temperature_2m_above_surface" ;
		temp2m:standard_name = "air_temperature_2m_above_surface" ;
		temp2m:description = "2m Air temperature is the bulk temperature of the air, 2 meters above surface. " ;
		temp2m:reference = "http://doc.omd.li/wrfpp/temp2m" ;
		temp2m:units = "degree_Celsius" ;
		temp2m:coordinates = "lon lat" ;
	float rain(y, x) ;
		rain:_FillValue = 9.96921e+36f ;
		rain:long_name = "rainfall_over_last_hour" ;
		rain:standard_name =  ;
		rain:description = "Total rainfall accumulated over last hour. Convective rainfall is included." ;
		rain:reference = "http://doc.omd.li/wrfpp/rain" ;
		rain:units = "mm h-1" ;
		rain:coordinates = "lon lat" ;
	float rainc(y, x) ;
		rainc:_FillValue = 9.96921e+36f ;
		rainc:long_name = "convective_rainfall_over_last_hour" ;
		rainc:standard_name =  ;
		rainc:description = "Rainfall from convective clouds accumulated over last hour" ;
		rainc:reference = "http://doc.omd.li/wrfpp/rainc" ;
		rainc:units = "mm h-1" ;
		rainc:coordinates = "lon lat" ;
	float rh(model_level, y, x) ;
		rh:_FillValue = 9.96921e+36f ;
		rh:long_name = "relative_humidity" ;
		rh:standard_name = "relative_humidity" ;
		rh:description =  ;
		rh:reference = "http://doc.omd.li/wrfpp/rh" ;
		rh:units = "percent" ;
		rh:coordinates = "model_level lon lat" ;
	float wind_u(model_level, y, x) ;
		wind_u:_FillValue = 9.96921e+36f ;
		wind_u:long_name = "wind_u_vector" ;
		wind_u:standard_name =  ;
		wind_u:description = "Wind vector on X axis." ;
		wind_u:reference = "http://doc.omd.li/wrfpp/wind_u" ;
		wind_u:units = "m s-1" ;
		wind_u:coordinates = "model_level lon lat" ;
	float wind_v(model_level, y, x) ;
		wind_v:_FillValue = 9.96921e+36f ;
		wind_v:long_name = "wind_v_vector" ;
		wind_v:standard_name =  ;
		wind_v:description = "Wind vector on Y axis." ;
		wind_v:reference = "http://doc.omd.li/wrfpp/wind_v" ;
		wind_v:units = "m s-1" ;
		wind_v:coordinates = "model_level lon lat" ;
	float wind_w(model_level, y, x) ;
		wind_w:_FillValue = 9.96921e+36f ;
		wind_w:long_name = "wind_w_vector" ;
		wind_w:standard_name =  ;
		wind_w:description = "Wind vector on Z axis." ;
		wind_w:reference = "http://doc.omd.li/wrfpp/wind_w" ;
		wind_w:units = "m s-1" ;
		wind_w:coordinates = "model_level lon lat" ;
	float wind10m_u(y, x) ;
		wind10m_u:_FillValue = 9.96921e+36f ;
		wind10m_u:long_name = "wind10m_u_vector" ;
		wind10m_u:standard_name =  ;
		wind10m_u:description = "Wind vector on X axis. 10 meters above ground level." ;
		wind10m_u:reference = "http://doc.omd.li/wrfpp/wind10m_u" ;
		wind10m_u:units = "m s-1" ;
		wind10m_u:coordinates = "lon lat" ;
	float wind10m_v(y, x) ;
		wind10m_v:_FillValue = 9.96921e+36f ;
		wind10m_v:long_name = "wind10m_v_vector" ;
		wind10m_v:standard_name =  ;
		wind10m_v:description = "Wind vector on Y axis. 10 meters above ground level." ;
		wind10m_v:reference = "http://doc.omd.li/wrfpp/wind10m_v" ;
		wind10m_v:units = "m s-1" ;
		wind10m_v:coordinates = "lon lat" ;
	float cloud(model_level, y, x) ;
		cloud:_FillValue = 9.96921e+36f ;
		cloud:long_name = "cloud" ;
		cloud:standard_name = "cloud" ;
		cloud:description = "Cloud presence in model grid point." ;
		cloud:reference = "http://doc.omd.li/wrfpp/cloud" ;
		cloud:units = "0=no cloud, 1=cloud" ;
		cloud:coordinates = "model_level lon lat" ;
	float cloudpct_h(y, x) ;
		cloudpct_h:_FillValue = 9.96921e+36f ;
		cloudpct_h:long_name = "high_clouds_percentage" ;
		cloudpct_h:standard_name =  ;
		cloudpct_h:description = "Percentage of clouds on vertical grid points above 450hPa level." ;
		cloudpct_h:reference = "http://doc.omd.li/wrfpp/cloudpct_h" ;
		cloudpct_h:units = "percent" ;
		cloudpct_h:coordinates = "lon lat" ;
	float cloudpct_m(y, x) ;
		cloudpct_m:_FillValue = 9.96921e+36f ;
		cloudpct_m:long_name = "medium_clouds_percentage" ;
		cloudpct_m:standard_name =  ;
		cloudpct_m:description = "Percentage of clouds on vertical grid points between 800hPa and 450hPa levels." ;
		cloudpct_m:reference = "http://doc.omd.li/wrfpp/cloudpct_m" ;
		cloudpct_m:units = "percent" ;
		cloudpct_m:coordinates = "lon lat" ;
	float cloudpct_l(y, x) ;
		cloudpct_l:_FillValue = 9.96921e+36f ;
		cloudpct_l:long_name = "low_clouds_percentage" ;
		cloudpct_l:standard_name =  ;
		cloudpct_l:description = "Percentage of clouds on vertical grid points below 800hPa level." ;
		cloudpct_l:reference = "http://doc.omd.li/wrfpp/cloudpct_l" ;
		cloudpct_l:units = "percent" ;
		cloudpct_l:coordinates = "lon lat" ;

// global attributes:
		:title = "OpenMeteoData WRF-Europe model" ;
		:institution = "OpenMeteoData http://openmeteodata.org" ;
		:source = "WRF-ARW initialized from NCEP GFS + OMD Post-processing" ;
		:references = "http://wiki.openmeteodata.org/wiki/OMD_Forecasts" ;
		:conventions = "CF-1.6" ;
		:license = "ODC-By http://opendatacommons.org/licenses/by/summary/" ;
		:run = "2014-05-02_00:00:00" ;
		:frame = "2014-05-02_00:00:00" ;
		:domain = "eu12" ;
		:_wrfpp-git-commit = "13d91d501d0710deb61c97a41074a3a3bda6918b" ;
		:_wrfpp-git-status = "M src/fields/geopotential/geopotential.c M src/fields/humidity/rh.c M src/fields/temp/temp.c M src/fields/wind/wind.c ?? wrfpp.sh" ;
data:

 model_level = 0.9965, 0.988, 0.9765, 0.962, 0.944, 0.9215, 0.8945, 
    0.8656942, 0.8370826, 0.808471, 0.7798594, 0.7390357, 0.6873198, 
    0.6381891, 0.5915364, 0.5472585, 0.5052555, 0.4654312, 0.4276927, 
    0.3919505, 0.3581182, 0.3261127, 0.2958537, 0.2672638, 0.2402686, 
    0.2147963, 0.1907778, 0.1681467, 0.1468397, 0.1269749, 0.10864, 
    0.09171696, 0.07609721, 0.06168032, 0.04837368, 0.03609178, 0.02475571, 
    0.01429262, 0.004635295 ;

 alti_level = 50, 200, 400, 600, 800, 1000, 1200, 1400, 1600, 1800, 2000, 
    2200, 2400, 2600, 2800, 3000, 3200, 3400, 3600, 3800, 4000, 4200, 4400, 
    4600, 4800, 5000, 5500, 6000, 6500, 7000, 7500, 8000, 8500, 9000, 9500, 
    10000, 10500, 11000 ;

 press_level = 1000, 975, 950, 925, 900, 875, 850, 825, 800, 775, 750, 725, 
    700, 675, 650, 625, 600, 575, 550, 525, 500, 475, 450, 425, 400, 375, 
    350, 325, 300, 275, 250, 225, 200, 175, 150, 125 ;
}


More information about the gradsusr mailing list