[gradsusr] xdfopen cdf file dimension problem/question / Thanks!

Thomas W. Collow tcollow at eden.rutgers.edu
Tue Aug 31 14:33:22 EDT 2010


Thank you Jennifer...the files are working as desired!

Tom


-----Original Message-----

> Date: Mon Aug 30 10:26:17 EDT 2010
> From: "Jennifer Adams" <jma at cola.iges.org>
> Subject: Re: [gradsusr] xdfopen cdf file dimension problem/question
> To: "GrADS Users Forum" <gradsusr at gradsusr.org>
> 
> Use these entries in your descriptor instead:
> 
> XDEF time 1 levels -98
> YDEF time 1 levels 35
> 
> It doesn't matter what dimension name you use if you provide all the  
> axis metadata in your descriptor file.
> --Jennifer
> 
> On Aug 29, 2010, at 9:39 PM, Thomas W. Collow wrote:
> 
> > Jim
> >
> > Thanks for the response.  Actually there is no lat and lon dimension  
> > specified in the header.   The only dimensions are depth and time.   
> > Here is some of the ncdump output.  I don't know if what I'm trying  
> > to do is possible with only the two provided dimensions.
> >
> > ncdump -c file.cdf
> > netcdf file {
> > dimensions:
> >        time = UNLIMITED ; // (24 currently)
> >        depth = 8 ;
> > variables:
> >        int base_time ;
> >                base_time:string = "31-Jul-2010,18:07:00 GMT" ;
> >                base_time:long_name = "Base time in Epoch" ;
> >                base_time:units = "seconds since 1970-1-1 0:00:00  
> > 0:00" ;
> >
> > and so on (there are several variables including the two I'm  
> > interested in, watcont_W and watcont_E)
> >
> > Thanks for your help
> >
> > Tom
> >
> >
> >
> > -----Original Message-----
> >
> >> Date: Sat Aug 28 15:51:15 EDT 2010
> >> From: "James T. Potemra" <jimp at hawaii.edu>
> >> Subject: Re: [gradsusr] xdfopen cdf file dimension problem/question
> >> To: "GrADS Users Forum" <gradsusr at gradsusr.org>
> >>
> >> Tom:
> >>
> >> Make sure that the dimensions in your netcdf file are actually  
> >> "lon" and
> >> "lat".  If not (e.g., they are latitude and longitude) you'll need to
> >> put that in the CTL file as XDEF/YDEF.  Maybe providing the output  
> >> from
> >> "ncdump" on your cdf file would help see what's going on.
> >>
> >> Jim
> >>
> >> Thomas W. Collow wrote:
> >>> Hello, I am having an issue with displaying a .cdf file using  
> >>> GrADS.  To keep it simple I will refer to the file as ?file.cdf.?  
> >>> The file is a time series of soil water content at different depths.
> >>>
> >>> The header of the file contains only two dimensions, depth and  
> >>> time.  I want to read this file using GrADS.
> >>> This is what happens when I use sdfopen:
> >>>
> >>> ga->sdfopen  file.cdf
> >>> Scanning self-describing file file.cdf
> >>> SDF file has no discernable X coordinate.
> >>>
> >>> My next approach is to use xdfopen and create a control file using  
> >>> information in the header and to specify the latitude and  
> >>> longitude.   Here is my control file, call it ?control?
> >>>
> >>> DSET file.cdf
> >>> TITLE Data
> >>> UNDEF -9999
> >>> XDEF lon 01 levels -98
> >>> YDEF lat 01 levels 35
> >>> TDEF time 24 18:07Z31jul2010 1hr
> >>> ZDEF depth 8 levels 5 15 25 35 60 85 125 175
> >>> VARS 2
> >>> watcont_W=>smw 8 99 water content west
> >>> watcont_E=>sme 8 99 water content east
> >>> ENDVARS
> >>>
> >>> Now I do xdfopen control and get this error
> >>>
> >>> ga-> xdfopen control
> >>> Scanning Descriptor File:  control
> >>> Alleged lon dimension (from YDEF) is not an SDF dimension.  Cannot  
> >>> continue.
> >>> Lon dimension name is:
> >>> lat
> >>> .
> >>> Alleged lat dimension (from XDEF) is not an SDF dimension.  Cannot  
> >>> continue.
> >>> Lat dimension name is:
> >>> lon
> >>> .
> >>> SDF file file.cdf was not successfully opened & parsed.
> >>>
> >>> I am trying to specify a specific latitude and longitude since I  
> >>> know what it is.  It is just not a dimension in the cdf file  
> >>> header.  Any suggestions on how I can fix this problem or is this  
> >>> file not able to be read by GrADS?
> >>>
> >>> Thanks
> >>> Tom
> >>> _______________________________________________
> >>> 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
> 
> --
> Jennifer M. Adams
> IGES/COLA
> 4041 Powder Mill Road, Suite 302
> Calverton, MD 20705
> jma at cola.iges.org
> 
> 
>



More information about the gradsusr mailing list