[gradsusr] SDF Error: 365 day calendars are no longer supported by sdfopen.

Tummuri, Spandana tummuris at cdm.com
Tue Jun 14 10:13:57 EDT 2011


Thank you for the response.  I have tried following the description provided for previous queries.  I created a descriptor file and am using "xdfopen" to access the descriptor file.  But looks like there is something wrong with my "TDEF" in the descriptor file because I get an error when I use "xdfopen".  Can anyone help me specify the correct "TDEF"?


1.       I am running Grads v 2.0.a9 and am running it on linux

2.       My descriptor file looks as shown below.

DSET ^test.nc

DTYPE netcdf

Title GFDL data

UNDEF -9.99e8_FillValue

OPTIONS 365_day_calendar

TDEF time LINEAR 0Z01JAN1861 1mo

3.       The error I get when I use xdfopen is as follows.
ga-> xdfopen test.dat
Scanning Descriptor File:  test.dat
gadxdf error: Missing or invalid dimension size.
  -> The invalid description file record is:
                 --> tdef time linear 0z01jan1861 1mo
                The data file was not opened.

4.       Below is the output from ncdump -c for my netcdf file

dimensions:
        lon = 144 ;
        lat = 90 ;
        time = UNLIMITED ; // (1680 currently)
        bnds = 2 ;
variables:
        double lon(lon) ;
                lon:standard_name = "longitude" ;
                lon:long_name = "longitude" ;
                lon:units = "degrees_east" ;
                lon:axis = "X" ;
                lon:bounds = "lon_bnds" ;
        double lon_bnds(lon, bnds) ;
        double lat(lat) ;
                lat:standard_name = "latitude" ;
                lat:long_name = "latitude" ;
                lat:units = "degrees_north" ;
                lat:axis = "Y" ;
                lat:bounds = "lat_bnds" ;
        double lat_bnds(lat, bnds) ;
        double time(time) ;
                time:standard_name = "time" ;
                time:long_name = "time" ;
                time:units = "days since 1861-01-01 00:00:00" ;
                time:axis = "T" ;
                time:calendar = "noleap" ;
                time:bounds = "time_bnds" ;
        double time_bnds(time, bnds) ;
        float pr(time, lat, lon) ;
                pr:standard_name = "precipitation_flux" ;
                pr:long_name = "Precipitation" ;
                pr:units = "kg m-2 s-1" ;
                pr:cell_methods = "time: mean" ;
                pr:original_name = "precip" ;
                pr:comment = "includes all types (rain, snow, large-scale, convective, etc.)" ;

Thanks
Spandana

From: gradsusr-bounces at gradsusr.org [mailto:gradsusr-bounces at gradsusr.org] On Behalf Of Jennifer Adams
Sent: Tuesday, June 14, 2011 8:54 AM
To: GrADS Users Forum
Subject: Re: [gradsusr] SDF Error: 365 day calendars are no longer supported by sdfopen.

This question has already been answered many times in the forum. Here are just a few threads to choose from (search string was "site:gradsusr.org 365 calendar sdfopen") :

http://gradsusr.org/pipermail/gradsusr/2009-December/010064.html
http://gradsusr.org/pipermail/gradsusr/2009-April/008489.html
http://gradsusr.org/pipermail/gradsusr/2009-January/008103.html
http://gradsusr.org/pipermail/gradsusr/2011-April/013123.html

The error message delivered by GrADS is carefully written to give you the information you need -- you must write a descriptor file to open this file with GrADS. Your descriptor file must have the following entries:
DSET
TDEF
OPTIONS 365_day_calendar
The link to the documentation in the error message shows you how to create these entries, and help you decide whether you need to use 'xdfopen' or the 'open' command. If the documentation is incomplete in any way, I welcome suggestions for improvements.

If you read the documentation carefully, and go through the previous emails on this subject, and still don't understand what to do, then please follow these guidelines:

Include the version of GrADS you are running, and the OS you are running it on.
Include the output from ncdump -c on your netcdf file
Include the descriptor file you've written
Include the complete text of your GrADS session including the error message

This is the last time I will answer this question.
--Jennifer




On Jun 13, 2011, at 12:53 PM, Tummuri, Spandana wrote:


Hello Everyone,

I was wondering if one of you would be able to tell me how you addressed this issue.

I am not very good at GRADS programming.  I only needed to use it to open a ".nc" file and get some values averaged over a period of time.  So I typically use the following three commands in grads.

Sdfopen "filename.nc"
Run monmask.gs N           ...................(N = month)
d ave(aave(pr*mmask, lon=lon1, lon = lon2, lat = lat1, lat = lat2),t=time1,t=time2)

This worked for a few files but when I tried to use it on some others, I get the following error


ga-> sdfopen pr_A1.nc
Scanning self-describing file:  pr_A1.nc
SDF Error: 365 day calendars are no longer supported by sdfopen.
  To open this file with GrADS, use a descriptor file with
  a complete TDEF entry and OPTIONS 365_day_calendar.
  Documentation is at http://iges.org/grads/gadoc/SDFdescriptorfile.html

When I compared NCDUMP for the files for which "sdfopen" worked with the those for which "sdfopen" did not work, I noticed that the calendar has to be gregarian for sdfopen to work.

Can you tell me how I can open files that have "noleap" calendars and work around the 365_day_calendar issue?

I greatly appreciated your help in this matter.

Thank you.
Spandana


_______________________________________________
gradsusr mailing list
gradsusr at gradsusr.org<mailto: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<mailto:jma at cola.iges.org>



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20110614/6dd21954/attachment-0001.html 


More information about the gradsusr mailing list