'reinit'
'set display color white'
'c'
*'open CST/JACKSON/SAIDAMODELIBIS.S001.ctl'
*'open CST/MILENA/SAIDAMODELIBIS.S001.ctl'
'open Sa3/JACKSON/SAIDAMODELIBIS.S001.ctl'
'open Sa3/MILENA/SAIDAMODELIBIS.S001.ctl'


'set z 1'
'set time 00z01jsep2003'
'q dims'
lin=sublin(result,5)
tti=subwrd(lin,9)

'set time 00z28nov2003'
'q dims'
lin=sublin(result,5)
ttf=subwrd(lin,9)
xmin=1.0 
xmax=10.5 
ymin=1 
ymax=7.5
'set parea 'xmin' 'xmax' 'ymin' 'ymax''
'set font 5'
'set xlopts 1 5 0.2'
'set ylopts 1 5 0.2'
'set grads off'
'set grid off'
'set xlabs 0|3|6|9|12|15|18|21|'
'set t 'tti' 'tti+23''
'set vrange -20 900'
* no markers, solid line style, white color and thick line 

'set strsiz 0.1 0.1'
'set string 1 l 0.25 0'

 mak=0;sty=1;cor=1;thk=6
'set cmark 'mak'';'set cstyle 'sty'';'set ccolor 'cor'';'set cthick 'thk''
'd tloop(ave(swrad.1 ,t+1,t='ttf',24)) '
'set line 'cor' 'sty' 'thk''
'draw line    'xmax-1' 'ymax-0.3' 'xmax-0.5'  'ymax-0.3''
'draw string  'xmax-0.45' 'ymax-0.3'  SW'


 mak=0;sty=1;cor=2;thk=6
'set cmark 'mak'';'set cstyle 'sty'';'set ccolor 'cor'';'set cthick 'thk''
'd tloop(ave(evap.1  ,t+1,t='ttf',24)) '
'set line 'cor' 'sty' 'thk''
'draw line    'xmax-1' 'ymax-0.6' 'xmax-0.5'  'ymax-0.6''
'draw string  'xmax-0.45' 'ymax-0.6'  LE_J'


 mak=0;sty=1;cor=3;thk=6
'set cmark 'mak'';'set cstyle 'sty'';'set ccolor 'cor'';'set cthick 'thk''
'd tloop(ave(evap.2  ,t+1,t='ttf',24)) '
'set line 'cor' 'sty' 'thk''
'draw line    'xmax-1' 'ymax-0.9' 'xmax-0.5'  'ymax-0.9''
'draw string  'xmax-0.45' 'ymax-0.9'  LE_M'

 mak=0;sty=1;cor=4;thk=6
'set cmark 'mak'';'set cstyle 'sty'';'set ccolor 'cor'';'set cthick 'thk''
'd tloop(ave(slhf.2  ,t+1,t='ttf',24)) '
'set line 'cor' 'sty' 'thk''
'draw line    'xmax-1' 'ymax-1.2' 'xmax-0.5'  'ymax-1.2''
'draw string  'xmax-0.45' 'ymax-1.2'  LE_O'


'set strsiz 0.25 0.25'
'set string 1 c 0.25 0'
'draw string  'xmin+4.5' 'ymin-0.7' Local Time '
'draw string  'xmin+5.0' 'ymax+0.7' [Drie Season] Latent Heat Fluxo (W/m^2)  '
'draw string  'xmin+5.0' 'ymax+0.3' Sa1 Amazonia  '
'printim Sa3_Amazonia_LE.png x1000 y800'

'q pos'
'c'
'set grads off'
'set grid off'
'set xlabs 0|3|6|9|12|15|18|21|'
'set t 'tti' 'tti+23''
'set vrange -20 900'
'set strsiz 0.1 0.1'
'set string 1 l 0.25 0'

 mak=0;sty=1;cor=1;thk=6
'set cmark 'mak'';'set cstyle 'sty'';'set ccolor 'cor'';'set cthick 'thk''
'd tloop(ave(swrad.1 ,t+1,t='ttf',24)) '
'set line 'cor' 'sty' 'thk''
'draw line    'xmax-1' 'ymax-0.3' 'xmax-0.5'  'ymax-0.3''
'draw string  'xmax-0.45' 'ymax-0.3'  SW'

 mak=0;sty=1;cor=2;thk=6
'set cmark 'mak'';'set cstyle 'sty'';'set ccolor 'cor'';'set cthick 'thk''
'd tloop(ave(sens.1  ,t+1,t='ttf',24)) '
'set line 'cor' 'sty' 'thk''
'draw line    'xmax-1' 'ymax-0.6' 'xmax-0.5'  'ymax-0.6''
'draw string  'xmax-0.45' 'ymax-0.6'  SH_J'

 mak=0;sty=1;cor=3;thk=6
'set cmark 'mak'';'set cstyle 'sty'';'set ccolor 'cor'';'set cthick 'thk''
'd tloop(ave(sens.2  ,t+1,t='ttf',24)) '
'set line 'cor' 'sty' 'thk''
'draw line    'xmax-1' 'ymax-0.9' 'xmax-0.5'  'ymax-0.9''
'draw string  'xmax-0.45' 'ymax-0.9'  SH_M'

 mak=0;sty=1;cor=4;thk=6
'set cmark 'mak'';'set cstyle 'sty'';'set ccolor 'cor'';'set cthick 'thk''
'd tloop(ave(sshf.2  ,t+1,t='ttf',24)) '
'set line 'cor' 'sty' 'thk''
'draw line    'xmax-1' 'ymax-1.2' 'xmax-0.5'  'ymax-1.2''
'draw string  'xmax-0.45' 'ymax-1.2'  SH_O'



'set strsiz 0.25 0.25'
'set string 1 c 0.25 0'
'draw string  'xmin+4.5' 'ymin-0.7' Local Time '
'draw string  'xmin+5.0' 'ymax+0.7' [Drie Season] Sensible Heat Fluxo (W/m^2)  '
'draw string  'xmin+5.0' 'ymax+0.3' Sa1 Amazonia  '
'printim Sa3_Amazonia_SH.png x1000 y800'

'q pos'
*'c'
*'set grads off'
*'set grid off'
*'set xlabs 0|3|6|9|12|15|18|21|'
*'set t 'tti' 'tti+23''
*'set vrange -20 500'
*'d tloop(ave(swrad.2 ,t+1,t='ttf',24)) '
*'d tloop(ave((swrad.1-swup.1) +(lwrad.1 -firb.1)-evap.1-sens.1 ,t+1,t='ttf',24)) '
*'d tloop(ave((swrad.2-swup.2) +(lwrad.2 -firb.2)-evap.2-sens.2 ,t+1,t='ttf',24)) '
*'set strsiz 0.25 0.25'
*'set string 1 c 0.25 0'
*'draw string  'xmin+4.5' 'ymin-0.7' Local Time '
*'draw string  'xmin+5.0' 'ymax+0.7' [Drie Season] Net Radiation (W/m^2)  '
