function hflux (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 Model Variables * ------------------- 'getvar SH SURFACE' qname.1 = subwrd(result,1) qfile.1 = subwrd(result,2) scale.1 = subwrd(result,3) expdsc = subwrd(result,4) 'getvar LWI SURFACE' qname.2 = subwrd(result,1) qfile.2 = subwrd(result,2) scale.2 = subwrd(result,3) numvar = 2 rc = 0 n = 1 while( n<=numvar ) if( qname.n = 'NULL' ) ; rc = 1 ; endif n = n + 1 endwhile if( rc = 1 ) ; return ; endif 'getenv "GEOSUTIL"' geosutil = result 'getenv "VERIFICATION"' verification = result * Ensure NAMES have no underscores * -------------------------------- num=2 m=1 while ( m 0 ) season = subwrd(seasons,m) if( season = '' ) m = -1 else m = m+1 say 'Processing Season: 'season 'set dfile 'qfile.1 'set gxout shaded' 'run 'geosutil'/plots/hflux/hflux_2 'expid' 'season' 'output' 'expdsc '! 'geosutil'/plots/grads_util/make_gif -name hflux_ocean -season 'season' -output 'output' &' if( debug = "debug" ) say "Hit ENTER to continue" pull flag endif 'c' endif endwhile