function precip (args) expid = subwrd(args,1) output = subwrd(args,2) debug = subwrd(args,3) * Define Seasons to Process * ------------------------- seasons = '' k = 4 while( k > 0 ) season = subwrd(args,k) if( season = '' ) k = -1 else seasons = seasons % ' ' % season k = k+1 endif endwhile 'uppercase 'seasons seasons = result * Initialize * ---------- 'reinit' 'set display color white' 'set clab off' 'c' * Get Precipitation Variables * --------------------------- 'run getvar CN_PRCP MOIST' qname.1 = subwrd(result,1) qfile.1 = subwrd(result,2) scale.1 = subwrd(result,3) expdsc = subwrd(result,4) 'run getvar LS_PRCP MOIST' qname.2 = subwrd(result,1) qfile.2 = subwrd(result,2) scale.2 = subwrd(result,3) 'run getvar AN_PRCP MOIST' qname.3 = subwrd(result,1) qfile.3 = subwrd(result,2) scale.3 = subwrd(result,3) if( qname.1 = 'NULL' & qname.2 = 'NULL' & qname.3 = 'NULL') 'run getvar TPREC MOIST' qname.1 = subwrd(result,1) qfile.1 = subwrd(result,2) scale.1 = subwrd(result,3) expdsc = subwrd(result,4) components = false num = 1 else components = true num = 3 endif 'run getenv "GEOSUTIL"' geosutil = result 'run getenv "VERIFICATION"' verification = result * Ensure NAMES have no underscores * -------------------------------- m=1 while ( m 0 ) season = subwrd(seasons,m) if( season = '' ) m = -1 else m = m+1 say 'Processing Season: 'season * Perform Horizontal Plots * ------------------------ 'set gxout shaded' 'set csmooth on' *'run 'geosutil'/plots/precip/precip_3 'expid' 'season' 'output' 'obsfile' 'obsdsc' 'expdsc *'myprint -name 'output'/precip3_'obsnam'.'season *'set vpage off' *'set parea off' * if( debug = "debug" ) * say "Hit ENTER to continue" * pull flag * endif *'c' *'run 'geosutil'/plots/precip/precip_1 'season' 'obsfile' 'obsdsc' 'expdsc *'myprint -name 'output'/precip1_'obsnam'.'season * if( debug = "debug" ) * say "Hit ENTER to continue" * pull flag * endif *'c' if( components = 'true' ) flag = "" while ( flag = "" ) 'run 'geosutil'/plots/precip/precip_2 'season' 'expdsc 'myprint -name 'output'/precip2.'season if( debug = "debug" ) say "Hit ENTER to continue" pull flag else flag = "next" endif 'c' endwhile flag = "" while ( flag = "" ) 'run 'geosutil'/plots/precip/precipz 'season' 'qfile.1' 'obsfile' 'obsnam' 'expdsc 'myprint -name 'output'/precipz_'obsnam'.'season if( debug = "debug" ) say "Hit ENTER to continue" pull flag else flag = "next" endif 'c' endwhile endif endif endwhile k = k + 1 endwhile