[gradsusr] Automation my (ctl) descriptor file

James T. Potemra jimp at hawaii.edu
Tue Mar 8 13:29:22 EST 2011


Here's another way using a csh script.  Like Jennifer's method we have 
the top part
of the ctl file in a file called "ctl_template1" (basically everything 
before the "tdef"
line, and the bottom part in another file called "ctl_template2" 
(everything after the
"tdef" line.  We then cat the first file, get today's date, and cat the 
second file.
The resulting ctl file (final.ctl) has today's date as the tdef.

Jim


#!/bin/csh -f
cat ctl_template1 >! final.ctl
set day = `date +%d`
set cmon = `date +%b`
set year = `date +%Y`
echo "tdef ocean_time 29 linear 00Z$day$cmon$year 6hr" >> final.ctl
cat ctl_template2 >> final.ctl



Reynaldo Capia wrote:
> Hi everyone;
>
> I need to automate my tasks of GrADS;
>
> I have everything advanced, and I just want the following:
>
> => How can I do, to update the date every day of my descriptor file(ctl)
>       in this line (31 linear *00z08MAR2011* TDEF 06hr)?.
>
> I accept suggestions.
> Thanks.
> ------------------------------------------------------------------------
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
>   



More information about the gradsusr mailing list