[gradsusr] Problem in opening different netcdf files as one

Eric Altshuler ela at cola.iges.org
Fri Apr 9 17:12:43 EDT 2010


Dear Marie,

The problem is most likely in the variable declaration:

tg=>tas 0 99 Mean daily temperature (Celsius)

You can't use '99' there if you have a netcdf file. You need a comma-delimited list of the dimensions in which the variable varies, in the correct order. You can obtain this information by running 'ncdump -h' on one of your netcdf files. It's easier to explain the details if you can send the output of 'ncdump -h your_netcdf_file.nc' to the grads user list. See also the documentation at http://grads.iges.org/grads/gadoc/SDFdescriptorfile.html

Best regards,

Eric L. Altshuler
Assistant Research Scientist
Center for Ocean-Land-Atmosphere Studies
4041 Powder Mill Road, Suite 302
Calverton, MD 20705-3106
USA

E-mail: ela at cola.iges.org
Phone: (301) 902-1257
Fax: (301) 595-9793

----- Original Message -----
From: "Marie Gantois" <marie.gantois at wur.nl>
To: gradsusr at gradsusr.org
Sent: Friday, April 9, 2010 9:38:06 AM
Subject: [gradsusr] Problem in opening different netcdf files as one



Hi all, 

I'm a pretty new user of GrADS, I just installed the v2.0a7 version and I have some difficulties in opening different netcdf files as one. 
My files are data for the end of the 20th century (e.g. 1950-2008), and since the files are too big they are split into e.g. 4 different files of 14 to 15 years. I wrote the following control file to open the netcdf files at once: 


dset ^tg_0.25deg_reg_%ch_v2.0.nc 

chsub 1 5479 1950-1964 

chsub 5480 10957 1965-1979 

chsub 10958 16436 1980-1994 

chsub 16437 21550 1995-2008 

tdef 21550 linear 0Z01jan1950 1dy 

dtype netcdf 

title tg_0.25deg_reg 

undef -999.999 

options template 

options yrev 

xdef 464 linear -40.375 0.25 

ydef 201 linear 25.375 0.25 

zdef 1 linear 1 1 

vars 1 

tg=>tas 0 99 Mean daily temperature (Celsius) 

endvars 



GrADS makes no problem opening the control file, but I can't display my variable at all, there's an error message: 
Scanning description file: E:/tg_0.25deg_reg1.ctl 
Data file E:/tg_0.25deg_reg_%ch_v2.0.nc is open as file 1 
LON set to -40.375 75.375 
LAT set to 25.375 75.375 
LEV set to 1 1 
Time values set: 1950:1:1:0 1950:1:1:0 
E set to 1 1 

ga-> d tas 
NetCDF Error (gancrow, nc_get_vara_double): NetCDF: Index exceeds dimension bound 
Data Request Error: Error for variable 'tas' 
Error ocurred at column 1 
DISPLAY error: Invalid expression 
Expression = tas 

If anyone can help me about that... That would be great! 



Thanks, 

Marie 

MSc Student Wageningen University 
_______________________________________________
gradsusr mailing list
gradsusr at gradsusr.org
http://gradsusr.org/mailman/listinfo/gradsusr



More information about the gradsusr mailing list