! +-======-+ ! Copyright (c) 2003-2007 United States Government as represented by ! the Admistrator of the National Aeronautics and Space Administration. ! All Rights Reserved. ! ! THIS OPEN SOURCE AGREEMENT ("AGREEMENT") DEFINES THE RIGHTS OF USE, ! REPRODUCTION, DISTRIBUTION, MODIFICATION AND REDISTRIBUTION OF CERTAIN ! COMPUTER SOFTWARE ORIGINALLY RELEASED BY THE UNITED STATES GOVERNMENT AS ! REPRESENTED BY THE GOVERNMENT AGENCY LISTED BELOW ("GOVERNMENT AGENCY"). ! THE UNITED STATES GOVERNMENT, AS REPRESENTED BY GOVERNMENT AGENCY, IS AN ! INTENDED THIRD-PARTY BENEFICIARY OF ALL SUBSEQUENT DISTRIBUTIONS OR ! REDISTRIBUTIONS OF THE SUBJECT SOFTWARE. ANYONE WHO USES, REPRODUCES, ! DISTRIBUTES, MODIFIES OR REDISTRIBUTES THE SUBJECT SOFTWARE, AS DEFINED ! HEREIN, OR ANY PART THEREOF, IS, BY THAT ACTION, ACCEPTING IN FULL THE ! RESPONSIBILITIES AND OBLIGATIONS CONTAINED IN THIS AGREEMENT. ! ! Government Agency: National Aeronautics and Space Administration ! Government Agency Original Software Designation: GSC-15354-1 ! Government Agency Original Software Title: GEOS-5 GCM Modeling Software ! User Registration Requested. Please Visit http://opensource.gsfc.nasa.gov ! Government Agency Point of Contact for Original Software: ! Dale Hithon, SRA Assistant, (301) 286-2691 ! ! +-======-+ function precipz (args) season = subwrd (args,1) modfile = subwrd (args,2) obsfile = subwrd (args,3) obsnam = subwrd (args,4) expdsc = subwrd (args,5) 'run getenv "GEOSUTIL"' geosutil = result'/plots' 'set dfile 'obsfile 'setlons' 'getinfo lonmin' lonmin = result 'getinfo lonmax' lonmax = result 'run getenv "CLIMATE"' climate = result * Count Seasons * ------------- 'set dfile 'obsfile 'count "'season'"' nobs = result 'set dfile 'modfile 'run getenv "BEGDATE"' begdate = result 'run getenv "ENDDATE"' enddate = result 'count "'season'" 'begdate' 'enddate nmod = result * Create Zonal Mean Variables * --------------------------- 'set dfile 'obsfile 'setlons' 'set lat -90 90' 'set t 1' 'set z 1' 'define qobs = precip'season'obs' 'set lon 0' 'define qobsz = ave( qobs,lon='lonmin',lon='lonmax',-b)' 'set dfile 'modfile 'setlons' 'set lat -90 90' 'set t 1' 'set z 1' 'define qmod = preacc'season'geos' 'set lon 0' 'define qmodz = ave( qmod,lon='lonmin',lon='lonmax',-b)' 'set dfile 'obsfile 'set lat -30 30' 'minmax qobsz' qmaxo = subwrd( result,1 ) 'set dfile 'modfile 'minmax qmodz' qmaxm = subwrd( result,1 ) 'set lat -90 90' if( qmaxm >= qmaxo ) ; axlim = 1.1*qmaxm ; endif if( qmaxo >= qmaxm ) ; axlim = 1.1*qmaxo ; endif axlim = 8.0 * Precipitation * ------------- 'set vpage 0 8.5 5.3 10.8' 'set grads off' 'set xlopts 1 4 .14' 'set ylopts 1 4 .14' 'set axlim 0 'axlim 'set ylab %.1f' 'set dfile 'obsfile 'set t 1' 'set cstyle 1' 'set cthick 7' 'set cmark 0' 'set ccolor 1' 'd qobsz' 'set dfile 'modfile 'set cstyle 1' 'set cthick 7' 'set cmark 0' 'set ccolor 4' 'd qmodz' 'set vpage off' 'lines "'geosutil'/precip/precip1.stk" 1' * Convective & Large-Scale Precip * ------------------------------- axlim = 8 if( qmaxm > axlim ) ; axlim = 10 ; endif if( qmaxm > axlim ) ; axlim = 12 ; endif if( qmaxm > axlim ) ; axlim = 1.1*qmaxm ; endif 'set vpage 0 8.5 0 5.5' 'set grads off' 'set xlopts 1 4 .14' 'set ylopts 1 4 .14' 'set dfile 'modfile 'setlons' 'set t 1' 'set axlim 0 'axlim 'set ylab %.1f' 'set cstyle 1' 'set cthick 7' 'set cmark 0' 'set ccolor 3' 'd ave( preacc'season'geos-precon'season'geos,lon='lonmin',lon='lonmax' )' 'set cstyle 1' 'set cthick 7' 'set cmark 0' 'set ccolor 2' 'd ave( precon'season'geos,lon='lonmin',lon='lonmax' )' 'set cstyle 1' 'set cthick 7' 'set cmark 0' 'set ccolor 4' 'd ave( preacc'season'geos,lon='lonmin',lon='lonmax' )' 'set vpage off' 'set string 1 c 5' 'lines "'geosutil'/precip/precip2.stk" 1' 'set strsiz .13' 'set string 1 c 6' 'draw string 4.967 10.31 Total Precipitation (mm/day) vs 'obsnam' 'season' ('nobs')' 'draw string 4.967 5.08 Total, Convective+Anvil, Large-Scale (mm/day) 'season' ('nmod')' *'xlabel 1 4.967 10.8' 'draw string 4.967 10.8 'expdsc 'print'