function main(arg) hh=123 "open pout.ctl" * "open /data_nfs/NMMB_CIST/nems/job/run/pout.ctl" "set lon -15 55" "set lat 28 70" "set display color white " "c" 'set grads off' 'set mpdraw off' *-----odredjivanje start date 'q time' time=sublin(result,1) print 'time' time stime=subwrd(time,3) *print 'stime' stime sday=subwrd(time,6) *print 'dan' sday month=substr(stime,6,3) print 'month' month year=substr(stime,9,4) print 'year' year *------------- it=2 *while(it<3) while(it<82) hh=(it-1)*3 fmt = '%03.0f' hh3= math_format(fmt,hh) 'c' 'set t 'it *print 'IT IT 'it *----- odredjivanje valid date -------- 'q time' time=sublin(result,1) ztime=subwrd(time,3) vmonth=substr(ztime,6,3) vday=substr(ztime,4,2) vyear=substr(ztime,9,4) vihr=substr(ztime,1,2) fmt = '%02.0f' vihr = math_format(fmt,vihr) if (vmonth = 'JAN') ; vcm='01' ; endif if (vmonth = 'FEB') ; vcm='02' ; endif if (vmonth = 'MAR') ; vcm='03' ; endif if (vmonth = 'APR') ; vcm='04' ; endif if (vmonth = 'MAR') ; vcm='05' ; endif if (vmonth = 'JUN') ; vcm='06' ; endif if (vmonth = 'JUL') ; vcm='07' ; endif if (vmonth = 'AUG') ; vcm='08' ; endif if (vmonth = 'SEP') ; vcm='09' ; endif if (vmonth = 'OCT') ; vcm='10' ; endif if (vmonth = 'NOV') ; vcm='11' ; endif if (vmonth = 'DEC') ; vcm='12' ; endif valid=vday' 'vmonth' 'vyear' 'vihr'UTC' print 'valid date 'valid *------------------------------------ 'set gxout shaded' 'set grads off' *'run /clima_nfs/film/hladno.gs' 'run col19.gs' if (month = 'JAN') ; 'set clevs -20 -16 -14 -12 -10 -8 -6 -4 -2 0 2 4 6 8 10 12 14 16' ; endif if (month = 'FEB') ; 'set clevs -20 -16 -14 -12 -10 -8 -6 -4 -2 0 2 4 6 8 10 12 14 16' ; endif if (month = 'MAR') ; 'set clevs -10 -8 -6 -4 -2 0 2 4 6 8 10 12 14 16 18 20 22 24' ; endif if (month = 'APR') ; 'set clevs -6 -4 -2 0 2 4 6 8 10 12 14 16 18 20 22 24 26 28' ; endif if (month = 'MAY') ; 'set clevs -2 0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32' ; endif if (month = 'JUN') ; 'set clevs 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38' ; endif if (month = 'JUL') ; 'set clevs 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38' ; endif if (month = 'AUG') ; 'set clevs 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38' ; endif if (month = 'SEP') ; 'set clevs -2 0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32' ; endif if (month = 'OCT') ; 'set clevs -6 -4 -2 0 2 4 6 8 10 12 14 16 18 20 22 24 26 28' ; endif if (month = 'NOV') ; 'set clevs -10 -8 -6 -4 -2 0 2 4 6 8 10 12 14 16 18 20 22 24' ; endif if (month = 'DEC') ; 'set clevs -16 -14 -12 -10 -8 -6 -4 -2 0 2 4 6 8 10 12 14 16 ' ; endif *'set clevs -16 -14 -12 -10 -8 -6 -4 -2 0 2 4 6 8 10 12 14 16 18' 'set ccols 16 17 18 19 20 21 22 23 0 83 32 33 34 35 36 37 38 39' ** pot.temp(th02) to t2m 'define fact=pow(100000/pshltr,0.2854)' 'define t2m=th02/fact' 'd t2m-273.16' *'run cbarn_mv.gs' * 'set gxout contour' * 'set clevs -2 0 2' * 'set clab forced' * 'set ccolor 13' * *'set cint 4' * 'set clopts 13 3 0.07' * 'set clab masked' * 'set clab forced' * 'd smth9(smth9(t-273.16))' 'q gxinfo' xline=sublin(result,3) yline=sublin(result,4) rec3 = sublin(result,3) rec4 = sublin(result,4) xlb=subwrd(xline,4) ylb=subwrd(yline,4) xur=subwrd(xline,6) yur=subwrd(yline,6) rec3 = sublin(result,3) rec4 = sublin(result,4) 'set strsiz 0.12 0.13' 'set string 1 bl 5' naslov1='RHMZ Srbije: Globalni NMMB model - prognoza za Evropu ' *naslov2='Temperatura na 2m [`3.`0C] 'ztime' (+'hh3'h)' naslov2='Vreme: 'valid' (+'hh3'h) Temperatura na 2m [`3.`0C]' 'draw string 'xlb' 'yur+0.45' 'naslov1 'draw string 'xlb' 'yur+0.15' 'naslov2 ylo = subwrd(yline,4)-0.55 ymx=ylo+0.07 xlo = subwrd(xline,4) xmx = subwrd(xline,6) fh=0.1 fw=0.1 'xcbar 'xlo' 'xmx' 'ylo' 'ymx+0.03' -fh 'fh' -fw 'fw 'set line 1 1 1' 'draw shp /clima_nfs/msgrads/grads-2.0.a7.oga.2/Contents/Resources/SupportData/RWDB_Ad1-Ln.shp' *'run bwfulllogo.gs 'xur-1.2' 'yur+0.1' 1.2' 'printim et_'hh3'.gif' it=it+1 endwhile '!convert -delay 80 -loop 0 et_*.gif et'stime'_'sday'.gif' '!scp et'stime'_'sday'.gif developer@www.seevccc.rs:/var/www/IDX/NMMB_daily_anim/'year'/Evropa/.' '!rm et_*.gif' "close 1" "quit"