error in xdef ctl file

Kevin M Levey klevey at CUSTOMWEATHER.COM
Tue Nov 17 17:27:53 EST 2009


Luis,

the 5th argument is the data resolution, i.e. the incremental value, so if your x grid is 2 degrees, then your line should look like this

> xdef 97 linear -84.120000 2.00



Your y increment is set to 2 degrees, so I am assuming your data resolution is 2x2 degrees.

Here is the documentation: 

XDEF xnum mapping <additional arguments>

back to top
This entry defines the grid point values for the X dimension, or longitude. The first argument, xnum, specifies the number of grid points in the X direction. xnum must be an integer >= 1. mapping defines the method by which longitudes are assigned to X grid points. There are two options for mapping:

LINEAR    Linear mapping 
LEVELS    Longitudes specified individually
The LINEAR mapping method requires two additional arguments: start and increment. start is a floating point value that indicates the longitude at grid point X=1. Negative values indicate western longitudes. increment is the spacing between grid point values, given as a positive floating point value.

The LEVELS mapping method requires one additional argument, value-list, which explicitly specifies the longitude value for each grid point. value-list should contain xnum floating point values. It may continue into the next record in the descriptor file, but note that records may not have more than 255 characters. There must be at least 2 levels in value-list; otherwise use the LINEAR method.

Here are some examples:

XDEF    144     LINEAR  0.0 2.5
XDEF    72      LINEAR  0.0 5.0
XDEF    12       LEVELS 0 30 60 90 120 150 180 210 240 270 300 330
XDEF    12       LEVELS 15 45 75 105 135 165 195 225 255 285 315 345


Regards,

Kevin M Levey, MSc in Oceans and Atmospheric Sciences (University of Cape Town)
Director of Meteorological Operations
CustomWeather, Inc.
San Francisco, California, USA

"Taking the World by Storm!"

http://www.customweather.com
http://www.myforecast.com
http://www.1stweather.com

cell: 415-794-0411
work: 415-777-3566
email: klevey at customweather.com

On Nov 17, 2009, at 11/17/09 - 2:07 PM, luis blacutt wrote:

> Dear Grads users
> I'm doing my first ctl file, it will have two variables, so far I have the following commands:
> 
> dset /home/lucho/Desktop/GlueNC/bolbia.pag%x1%mc.%.nc
> options template
> undef 9.999E+20
> title baseline 60-90
> *produced by LFA
> dtype netcdf
> options yrev
> ydef 82 linear -33.640000 2.0000
> xdef 97 linear -84.120000 -41.880000
> tdef 1 linear 00Z01jul1961 1mo
> zdef 1 linear 1 1
> vars 2
> total_precipita 0 216,1,0  **
> temperature_at_ 0 216,1,0  **
> ENDVARS
> 
> When I try to run it, it gives me the following error message
> 
> Scanning description file:  baseline.ctl
> Open Error:  Missing or invalid dimension increment value
>   --> The invalid description file record is: 
>   --> xdef 97 linear -84.120000 -41.880000
>   The data file was not opened. 
> 
> MyI checked by creating a grib file and those are the right numbers, the domain is for Southamerica. What am I missing?
> Regards
> Luis

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20091117/17b8717d/attachment.html 


More information about the gradsusr mailing list