open NETCDF and CTL files

Michael Timlin timlin at ATMOS.UIUC.EDU
Mon Nov 7 11:51:39 EST 2005


This error message indicates that the data from file 2 is outside the
current range of x, y, z, or t.  Try this:

'sdfopen /u/wx52bh/gpcp/gpcp.nc'
'open /u/wx52bh/r2/mnth/erate_clm_13.ctl'
'd pcp.1'

It should work because the default range of the dimensions will be
determined by the netCDF file which is now opened first.  The most
likely problem is that the time is not matched up.  Try this:

'open /u/wx52bh/r2/mnth/erate_clm_13.ctl'
'sdfopen /u/wx52bh/gpcp/gpcp.nc'
'd pcp.2(t=1)'

The only difference from your example is that the data is plotted for
the first time step of the netCDF file.  If this works you know that
the time dimension is the issue.

As an example, if your ctl file has a time range from Jan1950 to
Dec2000 and the netCDF file goes from Jan1980 to Dec2000 you will get
the error message you cite below.  The reason is that the time
dimension is set to Jan1950 when the first file is opened.  The
second file's opening does not affect the current working dimensions
so when you try to plot 'd pcp.2' you are plotting the data from the
netCDF file for Jan1950.  There is no such data in the netCDF file so
you get a warning that you are requesting data beyond the limits of
the file.

If it isn't the time dimension you need to determine the dimensions
of x, y, z, and t for each file.  That should lead you to the problem.

'reinit'
'open /u/wx52bh/r2/mnth/erate_clm_13.ctl'
'q dims'
'reinit'
'sdfopen /u/wx52bh/gpcp/gpcp.nc'
'q dims'

The above example will give you the default dimension when you open
each file alone (which you said works) and the dimension mismatch
should be apparent.

Mike Timlin
timlin at atmos.uiuc.edu


>This is a dimension environment issue.  If the grids are not 100%
>identical, there's a mismatch of grids, or dimension environments.
>As I recall, sdfopen uses "by level" defs for X, Y, and Z, so if
>the Data Descriptor File (DDF, you say "CTL") uses "LINEAR" dimension
>definitions, these would probably be considered non-identical.
>
>So, you would do "set dfile 2", and set the lat, lon, time, etc., before
>your display ("d") command.
>
>-Hoop
>>  From owner-gradsusr at LIST.CINECA.IT  Thu Nov  3 12:46:16 2005
>>  From: Boyin Huang <boyin.huang at NOAA.GOV>
>>
>>  Can grads open NETCDF and CTL files at the same time?
>>
>>  Here is my example:
>>
>>  'open /u/wx52bh/r2/mnth/erate_clm_13.ctl'
>>  'sdfopen /u/wx52bh/gpcp/gpcp.nc'
>>  'd pcp.2'
>>
>>  The error message is:
>>  Data Request Warning:  Request beyond file limits
>>  Cannot contour grid - all undefined values
>>
>>  When each file is opened separately, it can be displayed successfully.
>>  When both are CTL or NC files, they can also be displayed.
>>
>>  Thanks



More information about the gradsusr mailing list