* +-======-+ * 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 makplotz (args) k = 1 name = subwrd(args,k) ; k = k+1 expid = subwrd(args,k) ; k = k+1 prefix = subwrd(args,k) ; k = k+1 season = subwrd(args,k) ; k = k+1 output = subwrd(args,k) ; k = k+1 mfile = subwrd(args,k) ; k = k+1 mdesc = subwrd(args,k) ; k = k+1 ofile = subwrd(args,k) ; k = k+1 oname = subwrd(args,k) ; k = k+1 odesc = subwrd(args,k) ; k = k+1 bdate = subwrd(args,k) ; k = k+1 edate = subwrd(args,k) ; k = k+1 bdateo = subwrd(args,k) ; k = k+1 edateo = subwrd(args,k) ; k = k+1 climate = subwrd(args,k) ; k = k+1 'run getenv "GEOSUTIL"' geosutil = result if( prefix != NULL ) PFX = prefix'_' else PFX = '' endif say '' 'getresource 'geosutil'/plots/'name'/plot.rc 'PFX'TITLE' if( result = 'NULL' ) ; 'getresource 'geosutil'/plots/'name'/plot.rc TITLE' ; endif title = result 'getresource 'geosutil'/plots/'name'/plot.rc 'PFX'CLEVS' if( result = 'NULL' ) ; 'getresource 'geosutil'/plots/'name'/plot.rc CLEVS' ; endif clevs = result 'getresource 'geosutil'/plots/'name'/plot.rc 'PFX'DLEVS' if( result = 'NULL' ) ; 'getresource 'geosutil'/plots/'name'/plot.rc DLEVS' ; endif dlevs = result 'getresource 'geosutil'/plots/'name'/plot.rc 'PFX'CCOLS' if( result = 'NULL' ) ; 'getresource 'geosutil'/plots/'name'/plot.rc CCOLS' ; endif ccols = result 'getresource 'geosutil'/plots/'name'/plot.rc 'PFX'DCOLS' if( result = 'NULL' ) ; 'getresource 'geosutil'/plots/'name'/plot.rc DCOLS' ; endif dcols = result 'getresource 'geosutil'/plots/'name'/plot.rc 'PFX'AXLIM' if( result = 'NULL' ) ; 'getresource 'geosutil'/plots/'name'/plot.rc AXLIM' ; endif axlim = result 'getresource 'geosutil'/plots/'name'/plot.rc 'PFX'YLAB' if( result = 'NULL' ) ; 'getresource 'geosutil'/plots/'name'/plot.rc YLAB' ; endif ylab = result 'getresource 'geosutil'/plots/'name'/plot.rc 'PFX'GRID' if( result = 'NULL' ) ; 'getresource 'geosutil'/plots/'name'/plot.rc GRID' ; endif grid = result say '' axmin = subwrd(axlim,1) axmax = subwrd(axlim,2) 'set vpage off' 'set parea off' 'set mproj scaled' 'set grid on' 'set frame on' 'set xlopts 1 3 .11' 'set ylopts 1 3 .11' * Count Seasons * ------------- 'set dfile 'ofile 'count "'season'"' nobs = result 'setlons' 'set lat -90 90' 'makez qobs'season' z' 'set dfile 'mfile 'count "'season'" 'bdate' 'edate nmod = result 'setlons' 'set lat -90 90' 'makez qmod'season' z' 'set t 1' 'set lon 0' 'set vpage 0 8.5 0 11' 'set parea .8 8 4 9' 'set ylab 'ylab 'set axlim 'axlim if( grid != 'NULL' ) ; 'set grid 'grid ; endif 'set grads off' 'set cmark 0' 'set cstyle 1' 'set ccolor 1' 'd qobs'season'z' 'set cmark 0' 'set cstyle 1' 'set ccolor 4' 'd qmod'season'z' * Draw Zero Line * -------------- if( axmin*axmax < 0 ) 'set cmark 0' 'set cstyle 1' 'set cthick 1' 'set ccolor 2' 'd lon-lon' endif 'setlons' 'set vpage off' 'set string 1 c 6' 'set strsiz .11' *'xlabel 1 4.25 10.5' 'draw string 4.25 10.5 EXPID: 'expid' 'mdesc 'draw string 4.25 9.95 'title' 'season' ('nmod')' 'draw string 4.25 9.70 vs' 'draw string 4.25 9.45 'odesc' 'season' ('nobs') ('climate')' * Print Beginning and Ending Dates * -------------------------------- date = getdate (bdate) bmnthm = subwrd(date,1) byearm = subwrd(date,2) date = getdate (edate) emnthm = subwrd(date,1) eyearm = subwrd(date,2) date = getdate (bdateo) bmntho = subwrd(date,1) byearo = subwrd(date,2) date = getdate (edateo) emntho = subwrd(date,1) eyearo = subwrd(date,2) 'set string 4 l 4' 'set strsiz .08' 'draw string 2.50 3.37 Beg: 'bmnthm' 'byearm 'draw string 2.50 3.24 End: 'emnthm' 'eyearm 'set string 1 l 4' 'draw string 2.50 3.50 Mod Dates:' 'draw string 5.00 3.50 Obs Dates:' 'draw string 5.00 3.37 Beg: 'bmntho' 'byearo 'draw string 5.00 3.24 End: 'emntho' 'eyearo 'set string 1 c 6' * -------------------------------- 'myprint -name 'output'/'name'_z_'PFX''oname'.'season 'set mproj latlon' 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