*from shell command line type: gradsc -blc "climo 1 1990 1999" *or from grads command line: climo 1 1990 1999 *two ouput files, climo1.png and climo1.dat function main(args) month=subwrd(args,1) ni=subwrd(args,2) nf=subwrd(args,3) n=ni m=1 while (n<=nf) say n ctlname='/REANALYSIS/'n'/ctl/monthly/sfc/tmp.sfc' say ctlname 'open 'ctlname if (n=ni) 'ta=tmp(t='month')' else fb=1./n fa=1.-fb 'ta='fa'*ta+'fb'*tmp(t='month')' endif 'close 1' n=n+1 m=m+1 endwhile title='avg in month 'month' from 'ni' to 'nf 'd ta' 'set strsiz .25' 'set string 1 l' 'draw string .5 8.00 'title 'printim climo'month'.png' 'set fwrite climo'month'.dat' 'set gxout fwrite' 'd ta' 'disable fwrite' quit