function qbo (args) EXPORT = subwrd(args,1) GC = subwrd(args,2) expid = subwrd(args,3) output = subwrd(args,4) debug = subwrd(args,5) * Initialize * ---------- 'reinit' 'set display color white' 'rgbset' 'set csmooth on' 'set clab off' 'c' * Determine Variable Name and Location * ------------------------------------ 'getvar 'EXPORT' 'GC mname = subwrd(result,1) mfile = subwrd(result,2) scale = subwrd(result,3) expdsc = subwrd(result,4) if( mfile = "NULL" ) ; return ; endif 'getenv "GEOSUTIL"' geosutil = result 'getenv "VERIFICATION"' verification = result 'getenv "ANALYSIS"' analysis = result * Model Experiment Data * --------------------- 'set dfile 'mfile 'setdates' 'run getenv "BEGDATE"' begdate = result 'run getenv "ENDDATE"' enddate = result 'setlons' 'sety' 'setz' 'sett' 'getinfo tmin' tmin = result 'getinfo tmax' tmax = result 'set t 'tmin 'getinfo month' begmonth = getmon(result) 'getinfo year' begyear = result 'set t 'tmax 'getinfo month' endmonth = getmon(result) 'getinfo year' endyear = result mbegdate = begyear''begmonth menddate = endyear''endmonth 'sett' * Get Dimension of Model Environment * ---------------------------------- 'getinfo lonmin' lonmin = result 'getinfo lonmax' lonmax = result 'getinfo latmin' latmin = result 'getinfo latmax' latmax = result ' alias ' mname malias = result 'chckname 'malias 'makezf 'malias' umod z' 'set x 1' 'set y 1' 'define umodzg = ave( umodz,lat=-10,lat=10 )' ********************************************************************* **** Loop over Possible Verification Datasets for Comparison **** ********************************************************************* facm = 1 faco = 1 * Get Plotting Values from Resource File * -------------------------------------- 'getenv "GEOSUTIL"' geosutil = result PLOTRC = geosutil'/plots/grads_util/plot.rc' ' getnumrc 'geosutil'/plots/zcmp1' rcinfo = result numrc = subwrd( rcinfo,1 ) num = 1 cnt = 0 while( num <= numrc ) loc = num + 1 rcfile = subwrd( rcinfo,loc ) OBS = EXPORT 'getobs 'OBS' 'GC' 'rcfile oname = subwrd(result,1) ofile = subwrd(result,2) oscale = subwrd(result,3) obsdsc = subwrd(result,4) obsnam = subwrd(result,5) if( analysis != "false" ) 'run setenv "LEVTYPE" 'A else 'run setenv "LEVTYPE" 'D endif * Compute PLOT for Specific Verification * -------------------------------------- if( oname != 'NULL' ) 'set dfile 'ofile 'getdates' 'getinfo tmin' tmin = result 'getinfo tmax' tmax = result 'set t 'tmin 'getinfo month' begmonth = getmon(result) 'getinfo year' begyear = result 'getinfo date' begdateo = result 'set t 'tmax 'getinfo month' endmonth = getmon(result) 'getinfo year' endyear = result 'getinfo date' enddateo = result 'set time 'begdateo' 'enddateo obegdate = begyear''begmonth oenddate = endyear''endmonth say 'Mbegdate: 'mbegdate say 'Menddate: 'menddate say 'Obegdate: 'obegdate say 'Oenddate: 'oenddate 'set lon 'lonmin' 'lonmax 'set lat 'latmin' 'latmax 'setz' ' alias ' oname oalias = result 'chckname 'oalias 'makezf 'oalias' uobs z' 'set x 1' 'set y 1' 'define uobszg = ave( uobsz,lat=-10,lat=10 )' * Make PLT * -------- flag = "" while ( flag = "" ) 'set dfile 'mfile 'getdates' 'getinfo tmin' tmin = result 'getinfo tmax' tmax = result 'set t 'tmin 'getinfo date' begtime = result 'set t 'tmax 'getinfo date' endtime = result if( obegdate < mbegdate ) 'set dfile 'ofile 'getdates' 'getinfo tmin' tmin = result 'set t 'tmin 'getinfo date' begtime = result endif if( oenddate > menddate ) 'set dfile 'ofile 'getdates' 'getinfo tmax' tmax = result 'set t 'tmax 'getinfo date' endtime = result endif 'set time 'begtime' 'endtime say 'set time 'begtime' 'endtime 'run 'geosutil'/plots/zcmp1/qbo.plt umodzg uobszg 'expdsc' 'obsdsc' 'obsnam' 'output if( debug = "debug" ) say "Hit ENTER to repeat plot" say "Type 'next' for next plot, 'done' for next field" pull flag else flag = "next" endif endwhile 'c' * End check for valid OBS * ----------------------- endif * Check next Verification Dataset * ------------------------------- num = num + 1 endwhile return function getdate (date,month,year) num = 1 bit = substr(date,num,1) while( bit != '' ) num = num+1 bit = substr(date,num,1) endwhile loc = num-7 month = substr(date,loc ,3) year = substr(date,loc+3,4) return month' 'year function getmon(month) if( month = JAN ) ; num = "01" ; endif if( month = FEB ) ; num = "02" ; endif if( month = MAR ) ; num = "03" ; endif if( month = APR ) ; num = "04" ; endif if( month = MAY ) ; num = "05" ; endif if( month = JUN ) ; num = "06" ; endif if( month = JUL ) ; num = "07" ; endif if( month = AUG ) ; num = "08" ; endif if( month = SEP ) ; num = "09" ; endif if( month = OCT ) ; num = "10" ; endif if( month = NOV ) ; num = "11" ; endif if( month = DEC ) ; num = "12" ; endif return num