Thursday, March 12, 2009

Spatial distribution

Prompt 'Enter the folder name: '
pull fld
'!mkdir ../'fld

prompt 'Enter the starting year:'
pull y1
prompt 'Enter the starting year:'
pull yn
yyyy=y1
While (yyyy<=yn)

ans='yes'
while(ans='yes')
'reinit'
prompt 'enter the onset month as number'
pull m1
n=m1
if(n=1)
mmm='jan'
endif
if(n=2)
mmm='feb'
endif
if(n=3)
mmm='mar'
endif
if(n=4)
mmm='apr'
endif
if(n=5)
mmm='may'
endif
if(n=6)
mmm='jun'
endif
if(n=7)
mmm='jul'
endif
if(n=8)
mmm='aug'
endif
if(n=9)
mmm='sep'
endif
if(n=10)
mmm='oct'
endif
if(n=11)
mmm='nov'
endif
if(n=12)
mmm='dec'
endif
mmm1=mmm
prompt mmm1' '
prompt 'Enter the onset day: '
pull d1
prompt 'enter the withdrowal month as number'
pull mn
n=mn
if(n=1)
mmm='jan'
endif
if(n=2)
mmm='feb'
endif
if(n=3)
mmm='mar'
endif
if(n=4)
mmm='apr'
endif
if(n=5)
mmm='may'
endif
if(n=6)
mmm='jun'
endif
if(n=7)
mmm='jul'
endif
if(n=8)
mmm='aug'
endif
if(n=9)
mmm='sep'
endif
if(n=10)
mmm='oct'
endif
if(n=11)
mmm='nov'
endif
if(n=12)
mmm='dec'
endif
mmmn=mmm
prompt mmmn' '
prompt 'Enter the withdraw day: '
pull dn
'open rf_5103.ctl'
'set lat 5 25'
'set lon 60 90'
'set time 'dn''mmm''yyyy''
'define smr=ave(rf,time='d1''mmm1''yyyy',time='dn''mmmn''yyyy')'
'set grads off'
'set gxout shaded'
'set clev 10 20 30 40 50 60 70 80 90 100'
'd r'
'undefine r'
'close 1'

if (yyyy<=1998)
'open sst6098.ctl'
'set lat 5 25'
'set lon 60 90'
'set time 'dd''mmm''yyyy''
'define t=ave(sst,time='d1''mmm1''yyyy',time='dn''mmmn''yyyy')'
'set grads off'
'set gxout shaded'
'set clev 298 298.5 299 299.5 300 300.5 301 301.5 302'
'd t'
'undefine t'
'close 1'
endif

'sdfopen slp.nc'
'set lat 5 25'
'set lon 60 90'
'set time 'dd''mmm''yyyy''
'define p=ave(slp,time='d1''mmm1''yyyy',time='dn''mmmn''yyyy')'
'set grads off'
'set gxout contour'
'set ccolor 15'
'd p'
'undefine p'
'close 1'

'open u850.ctl'
'set lat 5 25'
'set lon 60 90'
'set time 'dd''mmm''yyyy''
'define uwnd=ave(u,t-2,t+2)'
'set grads off'
'set gxout contour'
'set ccolor 2'
*'d uwnd'
'undefine uwnd'
'close 1'

'draw title contour 'yyyy' 'mmm' 'dd' '
'printim ../'fld'/contour'yyyy''n''dd'.jpg white'


prompt 'Do you want to plot another pulse: '
pull ans
endwhile
yyyy=yyyy+1
endwhile

No comments: