[gradsusr] problem with a .ctl script.

Nick Heath nkh09 at fsu.edu
Mon Dec 27 18:26:41 EST 2010


Ismaila,

To write a .ctl file for your new .dat file, you will need the resolution from the original NetCDf file you are opening.  Then, you will have no problem writing the ctl file.  It will look something like this:

dset rain.day.sahelregcm.dat
title sahel region
undef 999E999
xdef __ linear ___  ___
ydef __ linear -10 ___
zdef 1 levels 1
tdef __ linear _Z__jan1997 __
vars 1
aa  0  99  average
endvars

The blanks will have to be filled in with information about the original netcdf file.  Also, I believe the xdef is on a 0 - 360 scale, so there are no negative values.  Therefore, you will have to translate your negative longitude into a positive value on the 0-360 scale.
Hope this helps!
-Nick
----- Original Message -----
From: Ismaila Diallo <ismailadiallo64 at yahoo.fr>
Date: Monday, December 27, 2010 4:39 pm
Subject: [gradsusr] problem with a .ctl script.
To: gradsusr-request at gradsusr.org
Cc: gradsusr at gradsusr.org

> Dear Grads User's
> 
> I have daily data of a model simulation for 10 years over Africa. 
> So i want to 
> extract the data for the sahel region (between lon -10 to 10 and 
> lat 10 at 18). 
> for that i have wrote this script for getting .dat file:
> 
> sdfopen /home/lpaosf/izo_moctar/RT.1996-2007_DAY.AVG.NC
> 
> set time jan1997 dec2006
> set lon -25 30
> set lat -10 30
> define aa=aave(rt,lon=-8.5,lon=8.5,lat=10,lat=16)
> set x 1
> set y 1
> set fwrite rain.day.sahelregcm.dat
> set gxout fwrite
> d aa
> disable fwrite 
> 
> 
> after the .dat script i need a .ctl program to use my data inj 
> grads but i met 
> many difficult when performing the .ctl program. 
> 
> So could someone taught me how must i do this script.
> Believe in your great help
> 
> Sincerely
> Ismaila
> 
> 
> 
>      
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
> 



More information about the gradsusr mailing list