[gradsusr] problems opening netcdf variable
Jeff Duda
jeffduda319 at gmail.com
Wed Jul 17 12:15:05 EDT 2013
Andrew,
When writing a control file for a netCDF file, you need to specify the
dimensions using t,z,x,y in the VARS listing for each variable. See this
link (http://www.iges.org/grads/gadoc/descriptorfile.html#VARS),
specifically the section that talks about units for DTYPE netcdf (which you
also need to include in your control file). It also looks like you need a
TDEF and ZDEF line. The VARS entry should probably then look like
h18_hc=>OHC 1 t,z,y,x
since that is the order of the dimensions as given from the ncdump.
Jeff Duda
On Wed, Jul 17, 2013 at 5:50 AM, Andrew Friedman <andfried at berkeley.edu>wrote:
> Hi everyone,
>
> I found one way to solve the problem using NCO: I extracted the relevant
> variable, and then removed the depth dimension as follows:
>
> ncks -O -v lat,lon,time,h18_hc NODC_heat_content_anomaly_0-700_yearly.nc
> NODC_yearly_h18_hc.nc
> ncwa -a depth NODC_yearly_h18_hc.nc NODC_yearly_h18_hc.nc
>
> Best,
> Andrew
>
>
> Andrew Friedman wrote:
> > Hi GrADS users,
> >
> > I'm having trouble opening a particular variable of a netcdf file.
> >
> > I'm trying to examine NODC gridded ocean heat content, downloaded from
> >
> http://data.nodc.noaa.gov/woa/DATA_ANALYSIS/3M_HEAT_CONTENT/NETCDF/heat_content/heat_content_anomaly_0-700_yearly.nc
> >
> >
> > I'm attaching the output of ncdump -h to this message.
> >
> > I am interested in the gridded variable h18_hc, but GrADS doesn't load
> > it when I open the file using sdfopen. I tried writing the attached
> > control file to open the particular variable h18_hc, but this yielded
> > the following error:
> >
> > Scanning Descriptor File: OHC.ctl
> > gadxdf error: Missing or invalid dimension size.
> > --> The invalid description file record is:
> > --> xdef 360 linear -179.5 1
> > The data file was not opened.
> >
> > Do you have any suggestions to either modify the netcdf or control file?
> >
> > Thanks,
> > Andrew
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
>
--
Jeff Duda
Graduate research assistant
University of Oklahoma School of Meteorology
Center for Analysis and Prediction of Storms
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20130717/a8c59f25/attachment-0003.html
More information about the gradsusr
mailing list