script Help
Dimitrios Katsanos
katsanos at METEO.NOA.GR
Wed Mar 18 03:44:04 EDT 2009
Maybe you could merge all .dat files into one and control it by a single .ctl file. At least it worked for me.
Here is what you could have in your script:
'open YOUR_NEW.ctl'
count=1
rec=3 (example for the 3 files)
while(count<=rec)
'set z 21'
'set lat -60 90'
'set lon -180 180'
'set mpdset hires'
'set gxout shaded'
'set t 'count
'd rh'
'draw map'
'run cbar.gs'
'q time' (this will give you a string which I call "alldate")
alldate=subwrd(result,3)
date=substr(alldate,4,9) (This gives date as "05MAR2006" )
hour=substr(alldate,1,2) (This gives hour as "00")
'draw title Relative Humidity 'date' at 'hour'UTC '
'printim 'date'_'hour'.png x1600 y1200'
'clear'
count=count+1
endwhile
Don't forget to "modify" TDEF in YOUR_NEW.ctl
I hope this helps,
Dimitris.
----- Original Message -----
From: Dizzle Man
To: GRADSUSR at LIST.CINECA.IT
Sent: Tuesday, March 17, 2009 9:33 PM
Subject: script Help
I have several NCEP data files I would like to loop in a script without having to open each file one by one. Any suggestions?
'reinit'
'open gfsanl_3_20060805_0000_000.ctl'
'set z 21'
'set lat -60 90'
'set lon -180 180'
'set mpdset hires'
'set gxout shaded'
'd rh'
'draw map'
'run cbar.gs'
'draw title Relative Humidity Along ITCZ: 2006-08-05_0000'
'printim 05_0000.png x1600 y1200'
'reinit'
'open gfsanl_3_20060805_0600_000.ctl'
'set z 21'
'set lat -60 90'
'set lon -180 180'
'set mpdset hires'
'set gxout shaded'
'd rh'
'draw map'
'run cbar.gs'
'draw title Relative Humidity Along ITCZ: 2006-08-05_0600'
'printim 05_0600.png x1600 y1200'
'reinit'
'open gfsanl_3_20060805_1200_000.ctl'
'set z 21'
'set lat -60 90'
'set lon -180 180'
'set mpdset hires'
'set gxout shaded'
'd rh'
'draw map'
'run cbar.gs'
'draw title Relative Humidity Along ITCZ: 2006-08-05_1200'
'printim 05_1200.png x1600 y1200'
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20090318/769248be/attachment.html
More information about the gradsusr
mailing list