* +-======-+ * 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 getvar (args) EXPORT = subwrd(args,1) GC = subwrd(args,2) SOURCE = subwrd(args,3) * Ensure UpperCase EXPORT and GC * ------------------------------ 'run uppercase 'EXPORT EXPORT = result 'run uppercase 'GC GC = result * Get Info from HISTORY.rc File * ----------------------------- 'run getenv "GEOSUTIL"' geosutil = result '!./chckhist 'EXPORT' 'GC' 'SOURCE expdsc = sublin( read(hist.txt),2 ) qname = sublin( read(hist.txt),2 ) qfile = sublin( read(hist.txt),2 ) scale = sublin( read(hist.txt),2 ) format = sublin( read(hist.txt),2 ) base = sublin( read(hist.txt),2 ) rc = close(hist.txt) if( qfile = "NULL" ) say EXPORT' from 'GC' not found in HISTORY.rc!' return 'NULL NULL 1 NULL NULL NULL' endif 'getfile 'qfile file = result * Open New Experiment Dataset * --------------------------- say 'Opening: 'qfile say ' Desc: 'expdsc say ' ' if( file = "NULL" ) if( format = "flat" ) ; ' open 'qfile ; endif if( format = "CFIO" ) ; 'xdfopen 'qfile ; endif if( format = "HDF" ) ; 'sdfopen 'qfile ; endif * Set Dimension Environment * ------------------------- 'getinfo numfiles' file = result endif return qname' 'file' 'scale' 'expdsc' 'base