[gradsusr] Error in opening NetCDF file

Jennifer Adams jma at cola.iges.org
Thu Dec 16 11:51:03 EST 2010


GrADS can only manage one grid per descriptor file. You must write  
multiple descriptors to describe all the variables in a netcdf file if  
they do not all share the same coordinate axes.

As for the problem described in the original post, you need an extra  
keyword in your XDEF entry when using xdfopen, and that is the name of  
a coordinate variable. E.g.

xdef lon 360 linear 0.5 1

The keyword ('lon' in my example) can be any coordinate name, as long  
as you are providing a complete axis definition. Please look at the  
docs for xdfopen and descriptors for self-describing files.

--Jennifer


On Dec 16, 2010, at 7:20 AM, Edward wrote:

> hi,
>
> it seems common to encounter this problem. Does anyone has simple  
> way to do within Grads?  Can Grads solve this problem? or does  
> anybody know how to describe two grid in ctl (that's common for  
> model results based on C-grid)?
>
> Dawn
>
> On Thu, Dec 16, 2010 at 12:51 PM, Muhammad Rahiz <muhammad.rahiz at ouce.ox.ac.uk 
> > wrote:
> Hi,
>
> I have this error recently. For my file, there were two problems.
> 1 - each variable in my netcdf file has two grid descriptions.
> 2 - missing 'axis' attribute for the coordinate variables.
>
> I can't remember what I did but I think I changed the grid  
> description and regridded the data, both in CDO. If you could attach  
> the sample nc file, I may be able to test it.
>
>
> -- 
> Muhammad Rahiz
> Researcher & DPhil Candidate (Climate Systems & Policy)
> School of Geography & the Environment
> University of Oxford
>
>
> On Thu, 16 Dec 2010, sudev das M P wrote:
>
> Hai All,
>
> I have a NetCDF data file "evapr_oaflux_1958.nc".
>
> I got it from the following link:
> http://dss.ucar.edu/dsszone/ds260.1/index.html?g=2#MONTHLY-TURBULENCE
>
> While I  am trying to open this file in GrADS I am getting following  
> message.
>
> *****************************************************************
> ga-> sdfopen evapr_oaflux_1958.nc
> Scanning self-describing file:  evapr_oaflux_1958.nc
> gadsdf: SDF file has no discernable X coordinate.
> *****************************************************************
> Since it is showing "SDF file has no discernable X coordinate", I  
> made a descriptor file
>
> and tried to open it using "xdfopen" command.
>
> *****************************************************
> DSET ^evapr_oaflux_1958.nc
> XDEF 360 linear 0.5 1.0
> ******************************************************
>
> This time too I got an error message.
>
> ************************************************************
> ga-> xdfopen evapr_oaflux_1958.ctl
> Scanning Descriptor File:  evapr_oaflux_1958.ctl
> gadxdf error: Missing or invalid dimension size.
>   --> The invalid description file record is:
>   --> xdef 360 linear 0.5 1.0
>   The data file was not opened.
> *************************************************************
>
> Please tell me how to fix this problem. Hope someone will
>
> give me a reply.
>
> Thanking You,
> Sudev.
>
>
>
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
>
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr

--
Jennifer M. Adams
IGES/COLA
4041 Powder Mill Road, Suite 302
Calverton, MD 20705
jma at cola.iges.org



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20101216/780557f2/attachment-0003.html 


More information about the gradsusr mailing list