function main(arg) datum=subwrd(arg,1) 'open posshort.ctl.'datum 'open work.ctl.'datum *'open work.ctl' 'set display color white' 'set gxout shaded' 'c' 'set grads off' 'set mpdraw off' 'set mproj nps' 'set mpvals -27 1.2 50 68.5' *----- odredjivanje start date ------ 'set t 1' 'q time' time=sublin(result,1) print 'time' time stime=subwrd(time,3) print 'stime 'stime days=substr(stime,4,2) months=substr(stime,6,3) years=substr(stime,9,4) ihrs=substr(stime,1,2) fmt = '%02.0f' ihrs= math_format(fmt,ihrs) start=days''months''years' 'ihrs'UTC' *------------------------------------ it=1 *while(it<29) while(it<26) hh=(it-1)*3 fmt = '%02.0f' hh = math_format(fmt,hh) 'c' 'set grads off' 'set z 1' print it 'set t '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 *------------------------------------ naslov='DREAM8-assim: Wet dust deposition (mg/m`a2`n) and 700 hPa geopotential (gpdm)' naslov='DREAM8-Iceland: Wet dust deposition (mg/m`a2`n) and 700 hPa geopotential (gpdm)' 'set clab forced' 'set gxout shaded' 'set clopts 1 1 0.25' 'run WF_sds.gs' 'set clevs 0.5 2 5 10 50 100 500 1000 1500' 'd 1.e+6*(dwsvi)' 'set gxout contour' 'set clab forced' 'set cint 4' 'set ccolor 11 ' * 'set map 0' 'set clopts 11 3 0.1' 'set clab forced' * 'set clab masked' 'd smth9(smth9(0.1*z7.2))' 'set strsiz 0.12 0.13' 'set string 1 bl 5' '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) *** naslov2='Forecast base time: 'start' Valid time: 'valid ' (+'hh')' naslov2='Forecast base time: 'start' Valid time: 'valid 'draw string 'xlb' 'yur+0.3' 'naslov 'draw string 'xlb' 'yur+0.1' 'naslov2 'run bwfulllogo_bojan.gs 'xlb' 'ylb-0.33' 1.35' 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' -fh 'fh' -fw 'fw * rc=arrow(xlo-0.03,ylo-0.045,0.5,20) 'set line 1 1 1' 'draw shp /clima/grads/data/RWDB_Ad1-Ln.shp' 'dlatlon_novooper.gs' 'set strsiz 0.06 0.06' 'polarg_novooper.gs -35 5 5 50 68 2' 'print q.eps' *'!convert -rotate 90 -density 300x300 +antialias -flatten q.eps p.gif' '!convert -rotate 90 -density 300x400 +antialias -flatten q.eps p.gif' '!convert p.gif -resize 40% +antialias q.gif' '!cp q.gif dw_'hh'.gif' '!mv dw_'hh'.gif slike/'datum'/.' '!rm -v q.eps' '!rm -v p.gif' it=it+1 endwhile 'close 2' 'close 1' 'quit' function arrow(x,y,len,scale) 'set line 1 1 4' 'draw line 'x-len/2.' 'y' 'x+len/2.' 'y 'draw line 'x+len/2.-0.05' 'y+0.025' 'x+len/2.' 'y 'draw line 'x+len/2.-0.05' 'y-0.025' 'x+len/2.' 'y 'set string 1 c' 'set strsiz 0.1' 'draw string 'x' 'y-0.1' 'scale return