[gradsusr] SDF file does not have any non-coordinate variables

Song Feng sfeng2 at unlnotes.unl.edu
Tue Feb 8 12:34:40 EST 2011


Steve:

I can received the information posted on the GrADs Users Forum but cannot 
post my own reply on the forum. So I send my email directly to you.

You are trying to use 't.ddf' to display your model output which use 365 
day calendars. You can easily solve this problem using NCO. The following 
are an example:

ncatted -a calendar,time,d,, mam3_aerocom2.cam2.h0.0001-0005.avg.nc

Then you can directly open the file 
"mam3_aerocom2.cam2.h0.0001-0005.avg.nc" using sdfopen on GrADs. You do 
not need to prepare the 'ddf' file each time. 

This works for me, I hope it is also works for you.

Blessings,

Song 
********************************************
Song Feng, Ph.D. 
Climatologist/Research Assistant Professor
School of Natural Resources
University of Nebraska-Lincoln
702 Hardin Hall
3310 Holdrege Street
Lincoln, NE 68583-0987 U.S.A.

Phone: (402) 472-6660 
Fax:      (402) 472-2946
Email:  sfeng2 at unl.edu
SNR web site: http://snr.unl.edu
http://snr.unl.edu/aboutus/who/people/faculty-member.asp?pid=559



From:
"Ghan, Steven J" <Steve.Ghan at pnl.gov>
To:
GrADS Users Forum <gradsusr at gradsusr.org>
Date:
02/08/2011 11:16 AM
Subject:
Re: [gradsusr] SDF file does not have any non-coordinate variables



Thanks, but it doesn't help.

Note that when I don't have VARS/ENDVARS in my ddf file, grads can open 
the file but when I query the variables it lists them but they have no 
names. So for some reason grads isn't getting the variable names from the 
netcdf file.

-Steve


On 2/8/11 8:54 AM, "Feudale Laura" <feudale at ictp.it> wrote:

Hi Steve,
try the following format in your variable declaration:

T=>t  30 t,z,y,x Temperature

Regards,

-- Laura

****************************************************************
* Laura Feudale, Ph.D. (GMU/COLA)                              *
* Earth System Physics Section: Physics of Weather and Climate *
* The Abdus Salam International Centre for Theoretical Physics *
*                     Trieste, ITALY                           *
* mailto:feudale at ictp.it        http://esp.ictp.it             *
****************************************************************



Ghan, Steven J wrote:
> Jennifer, thanks for your suggestion, but it makes no difference whether 
I declare it t or T.  I had tried both.
>
> -Steve
>
>
> On 2/8/11 7:54 AM, "Jennifer Adams" <jma at COLA.IGES.ORG> wrote:
>
> The variable in the netcdf file is "T" so your variable declaration in 
t.ddf should be
> T=>t
> instead of
> t=>t
>
> --Jennifer
>
>
>
> On Feb 8, 2011, at 10:42 AM, Ghan, Steven J wrote:
>
> I am using Grads version 2.0.a7.1 to open a netcdf file with xdfopen:
>
> ga-> xdfopen t.ddf
> Scanning Descriptor File:  t.ddf
> gadsdf: SDF file does not have any non-coordinate variables.
> SDF Descriptor file t.ddf was not successfully opened & parsed.
>
> Where
> t.ddf =
> dset ^mam3_aerocom2.cam2.h0.0001-0005.avg.nc
> TITLE AeroCom Present Day
> UNDEF 1.e36
> OPTIONS 365_day_calendar
> tdef time 1 linear jan2000 1mo
> VARS 1
> t=>t 30 99
> ENDVARS
>
> According to ncdump,
>
> netcdf mam3_aerocom2.cam2.h0.0001-0005.avg {
> dimensions:
>     lat = 96 ;
>     lon = 144 ;
>     lev = 30 ;
>     time = UNLIMITED ; // (1 currently)
>     double lat(lat) ;
>         lat:long_name = "latitude" ;
>         lat:units = "degrees_north" ;
>     double lon(lon) ;
>         lon:long_name = "longitude" ;
>         lon:units = "degrees_east" ;
>     double lev(lev) ;
>         lev:long_name = "hybrid level at midpoints (1000*(A+B))" ;
>         lev:units = "level" ;
>         lev:positive = "down" ;
>         lev:standard_name = 
"atmosphere_hybrid_sigma_pressure_coordinate" ;
>         lev:formula_terms = "a: hyam b: hybm p0: P0 ps: PS" ;
>     double time(time) ;
>         time:long_name = "time" ;
>         time:units = "days since 0000-01-01 00:00:00" ;
>         time:calendar = "noleap" ;
>         time:bounds = "time_bnds" ;
>     float T(time, lev, lat, lon) ;
>         T:units = "K" ;
>         T:long_name = "Temperature" ;
>         T:cell_methods = "time: mean" ;
> // global attributes:
>         :Conventions = "CF-1.0" ;
>         :source = "CAM" ;
>         :case = "mam3_aerocom2" ;
> }
> Interestingly, if I remove the
> VARS 1
> t=>t 30 99
> ENDVARS
> from t.ddf, I can open the netcdf file, but query tells me
> ga-> q file
> File 1 : AeroCom Present Day
>   Descriptor: t.ddf
>   Binary: mam3_aerocom2.cam2.h0.0001-0005.avg.nc
>   Type = Gridded
>   Xsize = 144  Ysize = 96  Zsize = 30  Tsize = 1  Esize = 1
>   Number of Variables = 1
>        30  t,z,y,x  Temperature
>
> The variable name is missing! So grads is unable to get the variable 
name. And of course I have no way of identifying the variable.
>
> The curious thing is that I was not having any such trouble until I 
produced a new batch of model history.  I compared the ncdumps from the 
history that I could read with history that I could not, and found only 
trivial differences unrelated to variable names.
>
> Any suggestions out there regarding this puzzler?
>
> -Steve Ghan
>
> _________________________________
> Steven Ghan, PhD.
> FUNDAMENTAL & COMPUTATIONAL SCIENCES DIRECTORATE
> Atmospheric Sciences and Global Change Division
> Pacific Northwest National Laboratory
> 902 Battelle Boulevard
> P.O. Box 999, MSIN K9-24
> Richland, WA 99352 USA
> Tel: 509-372-6169
> Fax: 509-372-6168
> steve.ghan at pnl.gov
> http://www.pnl.gov/atmospheric/staff/staff_info.asp?staff_num=5663
>
>
>
>
> _______________________________________________
> 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
>
_______________________________________________
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


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20110208/b2001ccb/attachment-0003.html 


More information about the gradsusr mailing list