#!/bin/csh -f # +-======-+ # 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 # # +-======-+ set datetime = `date +%Y%m%d_%H%M%S` cat $1 | sed -e 's/,/ , /g' > HISTORYRC.$datetime if( .$2 == . ) then set PLOT_SCRIPTS = `echo $GEOSUTIL/plots/landscape.script $GEOSUTIL/plots/portrait.script` else set PLOT_SCRIPTS = `echo $GEOSUTIL/plots/$2` endif set exports = '' set collections = `$GEOSUTIL/post/get_streams HISTORYRC.$datetime` set found = false foreach line ("`cat HISTORYRC.$datetime`") set word1 = `echo $line | awk '{print $1}'` set word2 = `echo $line | awk '{print $2}'` set word3 = `echo $line | awk '{print $3}'` set word4 = `echo $line | awk '{print $4}'` set word5 = `echo $line | awk '{print $5}'` if( $found == false ) then foreach collection ($collections) if ( $word1 == "$collection.fields:" ) then set coll = $collection set found = true set word2 = `echo $line | awk '{print $2}'` set word3 = `echo $line | awk '{print $3}'` set word4 = `echo $line | awk '{print $4}'` set word5 = `echo $line | awk '{print $5}'` if( $word2 != '' ) then set len1 = `echo $word2 | awk '{print length}'` set len2 = `echo $word4 | awk '{print length}'` @ len1 = $len1 - 1 @ len2 = $len2 - 1 set word2 = `echo ${word2} | cut -b2-$len1` set word4 = `echo ${word4} | cut -b2-$len2` set export = "${word2}:${word4}" # echo ${coll}: $export set new = true foreach item ($exports) if( $item == $export ) set new = false end if( $new == true ) set exports = `echo $exports $export` endif endif end else if ( $word1 != "::" ) then if( $word1 != "#" ) then set len1 = `echo $word1 | awk '{print length}'` set len2 = `echo $word3 | awk '{print length}'` @ len1 = $len1 - 1 @ len2 = $len2 - 1 set word1 = `echo ${word1} | cut -b2-$len1` set word3 = `echo ${word3} | cut -b2-$len2` set export = "${word1}:${word3}" # echo ${coll}: $export set new = true foreach item ($exports) if( $item == $export ) set new = false end if( $new == true ) set exports = `echo $exports $export` endif else # echo " " set found = false endif endif end set dum = '' foreach export ($exports) set tst1 = `echo $export | grep -v "SLP:DYN" \ | grep -v "U:DYN" \ | grep -v "V:DYN" \ | grep -v "T:DYN" \ | grep -v "ZLE:DYN" \ | grep -v "OMEGA:DYN" \ | grep -v "Q:MOIST" \ | grep -v "RH2:MOIST" \ | grep -v "O3:CHEMISTRY" ` if( $#tst1 != 0 ) then set tst2 = `grep $tst1 $PLOT_SCRIPTS` if( $#tst2 == 0 | .$2 == .Check_ALL ) set dum = `echo $dum $tst1` endif end /bin/rm -f HISTORYRC.$datetime echo $dum