#matt munnich ### @ places to update function trend(arg) yr=subwrd(arg,1) mo=subwrd(arg,2) p=subwrd(arg,3) if(yr='') say 'Usage: cmaptrend <%sig>' say ' e.g. cmap_trend 1979 7 5' *<%sig> - 5 signifies a 95% significance return endif if(p='') p=5 endif pp=100-p ses='djf jfm fma mam amj mjj jja jas aso son ond ndj' sebs='DJF JFM FMA MAM AMJ MJJ JJA JAS ASO SON OND NDJ' mons='jan feb mar apr may jun jul aug sep oct nov dec' se=subwrd(ses,mo) seb=subwrd(sebs,mo) mon=subwrd(mons,mo) say 'season = 'se', month = 'mon ### @ Dataset ' sdfopen /large/obs/CMAP/precip.mon.mean.nc' ' set t 1 369' ' runmean precip 1 1' 'lmean preciprmn' ### @ update dataset, name, mon, yr in the next few lines say ' set time 'mon yr' sep2009' ' set time 'mon yr' sep2009' say ' regress -f reg_cmap_'se'_'yr'_2009 -dt 12 -mlag 1 -rank -lcorr time preciprmn' ' regress -f reg_cmap_'se'_'yr'_2009 -dt 12 -mlag 1 -rank -lcorr time preciprmn' pltr(yr,se,seb,p) #clim(mo) ' print cmap_trend_'seb'_'yr'_2009_p'pp'_carib.eps' #' print cmap_trend_'seb'_'yr'_2009_p'pp'.eps' return function pltr(yr,se,seb,p) 'c' #' reinit' p1=p/100 ### @ update dataset, year ' open reg_cmap_'se'_'yr'_2009.ctl' 'set dfile 2' ' set t 2' ' set gxout grfill' ' brownblue12 1' ' set grads off' ' set lat 0 30' 'set lon 240 360' #' set clevs -30 -25 -20 -15 -10 -5 0 5 10 15 20 25 30' #' set clevs -10 -8 -6 -4 -2 0 2 4 6 8 10' ' set clevs -8 -6 -4 -2 0 2 4 6 8' say ' d maskout(beta,'p1'-probr)*100/30' ' d maskout(beta,'p1'-probr)*100/30' ' cbarn' pp=100-p ### @@@ update title ' draw title Precip Trend 'yr'-2009 'seb ' draw xlab CMAP, P'pp'% [mm/day/100 year]' return function clim(mo) 'set cthick 7' 'set clevs 4' 'set ccolor 3' say 'd preciprmn(t='mo')-preciprmnmn(t='mo')' 'd preciprmn(t='mo')-preciprmnmn(t='mo')' return