* +-======-+ * 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 shades (args) ******************************************************* **** INPUT Variables **** ******************************************************* 'numargs 'args numargs = result cntval = NULL maxval = NULL minval = NULL num = 0 while ( num < numargs ) num = num + 1 if( subwrd(args,num) = '-cint' ) ; cntval = subwrd(args,num+1) ; endif if( subwrd(args,num) = '-maxval' ) ; maxval = subwrd(args,num+1) ; endif if( subwrd(args,num) = '-minval' ) ; minval = subwrd(args,num+1) ; endif endwhile ************************************************************************************* * Utilitiy for EASY shading * * eg 1) shades 0.5 * produces shades for a +/- difference map with CINT=0.5 * * eg 2) shades uwnd 0 * produces shades for a field map with time-varying CINT * * eg 3) shades uwnd 3 * produces shades for a field map with constant CINT after t=3 * * eg 4) shades uwnd 3 TAG * produces TAG-Identified shades for a field map with constant CINT after t=3 * ************************************************************************************* name = subwrd(args,1) 'lowercase 'name name = result 'query file' numvar = sublin(result,6) numvar = subwrd(numvar,5) * Determine whether ARG1 is a Field (flag=true) or a CINT (flag=false) * -------------------------------------------------------------------- flag = false n = 1 while ( n SHADES'tag'.txt' 'set gxout shaded' else 'run getenv SHADES'tag clevs = result endif 'set ccols 0 50 42 44 46 48 39 37 36 34 32 31 21 22 24 25 26 27 28 29' 'set clevs 'clevs say 'CLEVS: 'clevs return CINT endif return CINT