'reinit' 'set display color white' 'c' * set value of Tproj accordyling to the target season. * This value is relative to month of initiation * For exemple, if you have IC is Jun, the value is : * 1 for JAS, 2 for ASO, 3 for SON, etc ... Tproj=1 * 'open /cpc/consistency/id/nmme/hcst/NMME.prate.ss.clim_std.jun_ic.1982-2010.ld1-7.esm.ctl' 'open NMME.prate.ss.clim_std.jun_ic.1982-2010.ld1-7.esm.ctl' 'set lon -190 190' * 'set lon -20 380' 'set lat -90 90' 'set t 'Tproj 'define clim = clm' 'close 1' * * 'open /cpc/consistency/id/nmme/hcst/NMME.prate.ss.jun_ic.1982-2019.ld1-7.esm.ctl' 'open NMME.prate.ss.jun_ic.1982-2019.ld1-7.esm.ctl' 'set lon -190 190' * 'set lon -20 380' 'set lat -90 90' * yrfirst=1982 yrlast=2019 year=2009 i=(year-yrfirst)*7+Tproj istop=(yrlast-yrfirst)*7+7 while(i<=istop) say "----current t is : "i". The corresponding year is "year 'set t 'i 'define rvar = f' ***************************** Plot Anomaly *************************** 'define_colors' 'set gxout shaded' 'set grads off' 'set xlint 20' 'set ylint 20' 'set xlopts 1 5 0.13' 'set ylopts 1 5 0.13' 'set grads off' 'set clevs -6 -4 -3 -2 -1 -0.5 0.5 1 2 3 4 6' 'set ccols 29 28 27 25 23 21 0 31 33 35 37 38 39' 'd rvar-clim' ** ------ Figure out where the title will go ------------------------- 'q gxinfo' xlims=sublin(result,3) ylims=sublin(result,4) ybel=subwrd(ylims,4) ytop=subwrd(ylims,6) xleft=subwrd(xlims,4) xright=subwrd(xlims,6) xmid=xleft+(xright-xleft)/2 width=xright-xleft height=ytop-ybel 'set string 1 c 6' 'set strsiz 0.2' 'draw string 'xmid' 'ytop+0.375' NMME Precip Anom. Jun'year' IC JAS Fcst' if( width > height ) 'xcbar 'xleft' 'xright' 'ybel-0.55' 'ybel-0.35' -fw 0.14 -fh 0.14 -edge square -line on' else 'xcbar 'xright+0.1' 'xright+0.3' 'ybel' 'ytop' -fw 0.14 -fh 0.14 -edge square -line on' endif *pull pause 'printim NMME_Precip_Anom_JunIC_JAS_'year'.png' '!convert -trim NMME_Precip_Anom_JunIC_JAS_'year'.png NMME_Precip_Anom_JunIC_JAS_'year'.png' 'c' i=i+7 year=year+1 endwhile 'quit'