[gradsusr] R: Re: gancgrid error

pigiottini at libero.it pigiottini at libero.it
Wed May 30 07:28:27 EDT 2012


Hi Jennifer,I followed your advice (I removed t from variable declarations and changed XDEF and YDEF)  but nothing changed: the error is the same!I'm interested in RegridWeightGen!
ThanksGiorgia


----Messaggio originale----

Da: jma at cola.iges.org

Data: 29/05/2012 19.45

A: "GrADS Users Forum"<gradsusr at gradsusr.org>

Cc: <pigiottini at libero.it>

Ogg: Re: [gradsusr] gancgrid error



Hi, Georgia -- There are two problems:1. The time_counter coordinate has size 0, but the variables vomecrty and sometauy list this as one of their dimensions. I don't think I've ever seen a netcdf file like this; I would try removing the "t," from your variable declarations and see if that fixes anything. 2. The variables nav_lon and nav_lat reveal that the data are not on a rectilinear grid -- GrADS requires 1-dimensional grid coordinates. 
If you want to look at the data in GrADS on an abstract grid that won't be georegistered, you will have to change your XDEF and YDEF statements to:   XDEF 198 linear 1 1   YDEF 224 linear 1 1Then use 'set mproj off'. This is obviously not ideal. 
I have been working on a solution to this problem, using PDEF and a regridding tool from ESMF called RegridWeightGen that will interpolate this kind of ocean model output on a curvilinear grid to a rectilinear grid that GrADS can handle. It is still in the testing/development stage. If you want to know more about how to make this work, please write to me offline. --Jennifer

On May 29, 2012, at 12:26 PM, pigiottini at libero.it wrote:Hi all,I have some output data in NetCDF4 format from NEMO model.
I'd like to display my output variables.

I used the "open" command to open the file.nc because "sdfopen" had failed. So I wrote a GrADS descriptor file .ctl 
When I try to display a variable, for example ga-> d vomecrty, I get the following error: 
  gancgrid error: nc_get_vara_double failed; NetCDF: Index exceeds dimension bound
  Data Request Error:  Error for variable 'vomecrty'
  Error ocurred at column 1
  DISPLAY error:  Invalid expression 
  Expression = vomecrty

This is my AMM12_5d_20070101_20070101_grid_V.ctl:
DSET ^AMM12_5d_20070101_20070101_grid_V.nc
DTYPE netcdf
TITLE 4-D Ocean Variables: Meridional Components
UNDEF 9.96921e+36f
OPTIONS zrev
XDEF 198 linear -19.8333 0.16667 
    
YDEF 224 linear 40.16667 0.11111
  
ZDEF 33 levels  3.107505 10.04362 18.13503 27.66259 38.97338 52.49526 
    68.75394 88.39286 112.1955 141.1104 176.2764 219.0491 271.0224 
    334.0439 410.218 501.8885 611.5969 742.007 895.795 1075.506 
    1283.386 1521.216 1790.151 2090.625 2422.302 2784.11 3174.342 
    3590.799 4030.965 4492.172 4971.748 5467.131 5975.949   
    
TDEF 0 linear 01jan2007 5dy
VARS 2
vomecrty    33  t,z,y,x   ocean current along j-axis(m/s)
sometauy     0  t,y,x  Wind Stress along j-axis (N/m^2)
ENDVARS
___
And This is the first part of my AMM12_5d_20070101_20070101_grid_V.cdl (output of ncdump -b):
netcdf AMM12_5d_20070101_20070101_grid_V {
dimensions:
	x = 198 ;
	y = 224 ;
	depthv = 33 ;
	time_counter = UNLIMITED ; // (0 currently)
	tbnds = 2 ;
variables:
	float nav_lon(y, x) ;
		nav_lon:standard_name = "longitude" ;
		nav_lon:units = "degrees_east" ;
		nav_lon:valid_min = 4.002733e-05f ;
		nav_lon:valid_max = 359.8334f ;
		nav_lon:long_name = "Longitude" ;
		nav_lon:nav_model = "Default grid" ;
	float nav_lat(y, x) ;
		nav_lat:standard_name = "latitude" ;
		nav_lat:units = "degrees_north" ;
		nav_lat:valid_min = 40.16667f ;
		nav_lat:valid_max = 64.94442f ;
		nav_lat:long_name = "Latitude" ;
		nav_lat:nav_model = "Default grid" ;
	float depthv(depthv) ;
		depthv:axis = "Z" ;
		depthv:standard_name = "model_level_number" ;
		depthv:units = "m" ;
		depthv:positive = "down" ;
		depthv:valid_min = 3.107505f ;
		depthv:valid_max = 5975.949f ;
		depthv:title = "depthv" ;
		depthv:long_name = "Vertical V levels" ;
	double time_counter(time_counter) ;
		time_counter:axis = "T" ;
		time_counter:standard_name = "time" ;
		time_counter:units = "seconds since 2007-01-01 00:00:00" ;
		time_counter:calendar = "gregorian" ;
		time_counter:title = "Time" ;
		time_counter:long_name = "Time axis" ;
		time_counter:time_origin = " 2007-JAN-01 00:00:00" ;
		time_counter:bounds = "time_counter_bnds" ;
	double time_counter_bnds(time_counter, tbnds) ;
	float vomecrty(time_counter, depthv, y, x) ;
		vomecrty:units = "m/s" ;
		vomecrty:standard_name = "ocean current along j-axis" ;
		vomecrty:_FillValue = 9.96921e+36f ;
		vomecrty:long_name = "ocean current along j-axis" ;
		vomecrty:online_operation = "ave(X)" ;
		vomecrty:interval_operation = 150.f ;
		vomecrty:interval_write = 432000.f ;
		vomecrty:coordinates = "time_counter depthv nav_lat nav_lon" ;
	float vomeeivv(time_counter, depthv, y, x) ;
		vomeeivv:units = "m/s" ;
		vomeeivv:standard_name = "EIV ocean current along j-axis" ;
		vomeeivv:_FillValue = 9.96921e+36f ;
		vomeeivv:long_name = "EIV ocean current along j-axis" ;
		vomeeivv:online_operation = "ave(X)" ;
		vomeeivv:interval_operation = 150.f ;
		vomeeivv:interval_write = 432000.f ;
		vomeeivv:coordinates = "time_counter depthv nav_lat nav_lon" ;
	float sometauy(time_counter, y, x) ;
		sometauy:units = "N/m2" ;
		sometauy:standard_name = "Wind Stress along j-axis" ;
		sometauy:_FillValue = 9.96921e+36f ;
		sometauy:long_name = "Wind Stress along j-axis" ;
		sometauy:online_operation = "ave(X)" ;
		sometauy:interval_operation = 150.f ;
		sometauy:interval_write = 432000.f ;
		sometauy:coordinates = "time_counter nav_lat nav_lon" ;

// global attributes:
		:Conventions = "CF-1.1" ;
		:file_name = "AMM12_5d_20070101_20070101_grid_V.nc" ;
		:production = "An IPSL model" ;
		:TimeStamp = "2012-MAY-25 12:53:46 GMT+0200" ;
 .......

Thanks in advance for your help!
Regards
Giorgia
 <AMM12_5d_20070101_20070101_grid_V.cdl>_______________________________________________
gradsusr mailing list
gradsusr at gradsusr.org
http://gradsusr.org/mailman/listinfo/gradsusr


--Jennifer M. AdamsIGES/COLA4041 Powder Mill Road, Suite 302Calverton, MD 20705jma at cola.iges.org






-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20120530/9e5ced3b/attachment-0003.html 


More information about the gradsusr mailing list