[gradsusr] Error in opening NetCDF file

sudev das M P devdas.pnr at gmail.com
Thu Dec 16 12:20:26 EST 2010


Hai,

Thank you all for the reply. I got the problem solved.

I changed the descriptor file as given below.

*****************************************************
DSET ^evapr_oaflux_1958.nc
XDEF lon 360 linear 0.5 1.0
YDEF lat 180 linear -89.5 1.0
*****************************************************
Now I can open and display the variables.

*******************************************************
ga-> xdfopen evapr_oaflux_1958.ctl
Scanning Descriptor File:  evapr_oaflux_1958.ctl
SDF file evapr_oaflux_1958.nc is open as file 1
LON set to 0 360
LAT set to -89.5 89.5
LEV set to 0 0
Time values set: 1:1:31:10 1:1:31:10
E set to 1 1
*******************************************************
I am attaching the NetCDF file.

Thanking You,
sudev

On Thu, Dec 16, 2010 at 10:21 PM, Jennifer Adams <jma at cola.iges.org> wrote:

> 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
>
>
>
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20101216/7f3e7dfc/attachment-0003.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: evapr_oaflux_1958.nc
Type: application/x-netcdf
Size: 3113648 bytes
Desc: not available
Url : http://gradsusr.org/pipermail/gradsusr/attachments/20101216/7f3e7dfc/attachment-0003.nc 


More information about the gradsusr mailing list