* +-======-+ * 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 stdiff (args) field = subwrd (args,1) type = subwrd (args,2) tag1 = subwrd (args,3) tag2 = subwrd (args,4) cint = subwrd (args,5) if( type = std ) ; string = "Std.Dev. (Forecast-Analysis)" ; endif if( type = var ) ; string = "Variance (Forecast-Analysis)" ; endif if( type = rms ) ; string = "RMS (Forecast-Analysis)" ; endif if( type = fma ) ; string = "MEAN (Forecast-Analysis)" ; endif if( type = fmc ) ; string = "MEAN (Forecast-Climatology)" ; endif if( type = mse ) ; string = "Mean_Square_Error (Forecast-Analysis)" ; endif if( type = mes ) ; string = "Mean_Error_Squared (Forecast-Analysis)" ; endif 'getinfo level' level = result 'run getinfo tinc' tinc = result if( tinc = "NULL" ) ; tinc = 6 ; endif 'run getinfo time' time = result hour = (time-1)*tinc if( hour < 10 ) ; hour = 0hour ; endif if( hour < 100 ) ; hour = 0hour ; endif 'set vpage off' 'set grid off' 'set grads off' 'set gxout shaded' 'set ccols 92 0' 'set clevs 0.5' 'd mask' 'define diff = regrid2( 'field''type''tag1'-'field''type''tag2',.25, .25, bs_p1, 0, -90 )' 'define NHEM = aave( diff,lon=0,lon=360,lat= 20,lat= 80 )' 'define SHEM = aave( diff,lon=0,lon=360,lat=-80,lat=-20 )' 'define GLOB = aave( diff,lon=0,lon=360,lat=-90,lat= 90 )' 'define TROP = aave( diff,lon=0,lon=360,lat=-20,lat= 20 )' 'd NHEM' NHEM = subwrd(result,4) 'd SHEM' SHEM = subwrd(result,4) 'd GLOB' GLOB = subwrd(result,4) 'd TROP' TROP = subwrd(result,4) if( cint = '' ) 'stats 'diff aGLOB = subwrd(result,2) 'getint 'aGLOB cint = result if( aGLOB = 0 ) ; cint = 1 ; endif n = 0 while( cint = 0 ) say 'N: 'n' CINT: 'cint' aGLOB: 'aGLOB * say 'Hit ENTER to continue' * pull flag n = n + 1 aGLOB = 10*aGLOB 'getint 'aGLOB cint = result endwhile 'd pow(10,'n')' fact = subwrd(result,4) cint = cint/fact endif clevs = '' n = -9 while ( n <= 9 ) val = n * cint if( n != 0 ) ; clevs = clevs' 'val ; endif n = n + 1 endwhile 'set ccols 59 57 55 47 44 37 36 34 33 0 21 22 23 24 25 26 27 28 29' 'set clevs 'clevs 'd maskout( diff,abs(diff)-'cint' )' 'cbarn -snum 0.75' 'draw title 'tag1' minus 'tag2 'set string 1 c 6' 'getinfo month' month = result 'getinfo year' year = result 'set vpage off' 'set string 1 c 6' 'set strsiz 0.14' 'draw string 5.5 7.9 'month' 'year' Forecast Hour: 'hour 'draw string 5.42238 8.20392 'level'-mb 'field' 'string 'set string 1 l 6' 'set strsiz 0.12' 'draw string 9.0 8.10 NHEM: 'NHEM 'draw string 9.0 7.90 SHEM: 'SHEM 'draw string 9.0 7.70 GLOB: 'GLOB 'draw string 9.0 7.50 TROP: 'TROP