#!/bin/csh # +-======-+ # 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 plots = "hght tmpu uwnd vwnd" set types = "tcor cor rms" set seasons = "JAN" set regions = "EUR GLO NAM NEQ NHE NWQ SEQ SHE SWQ TRO" set levs = "1000 850 700 500 400 300 250 200 150 100 z" # Create Postscript from Grads # ---------------------------- foreach plot ($plots) foreach type ($types) foreach season ($seasons) foreach reg ($regions) @ cnt = 0 foreach lev ($levs) set file = stats_${plot}_${type}_${reg}_${lev}_$season if ( -e $file.out ) then gxps -c -i $file.out -o $file.ps & @ cnt = $cnt + 1 if( $cnt == 5 ) then @ cnt = 0 wait endif endif end end end end end wait # Create GIF from Postscript # -------------------------- foreach plot ($plots) foreach type ($types) foreach season ($seasons) foreach reg ($regions) @ cnt = 0 foreach lev ($levs) set file = stats_${plot}_${type}_${reg}_${lev}_$season if ( -e $file.out ) then if ( $type == 'rms' & $lev == 'z' ) then convert -seed 1 -density 90x90 $file.ps $file.gif & else convert -seed 1 -rotate 90 -density 90x90 $file.ps $file.gif & endif @ cnt = $cnt + 1 if( $cnt == 5 ) then @ cnt = 0 wait endif endif end end end end end wait # Remove Intermediate Files # ------------------------- foreach plot ($plots) foreach type ($types) foreach season ($seasons) foreach reg ($regions) @ cnt = 0 foreach lev ($levs) set file = stats_${plot}_${type}_${reg}_${lev}_$season if ( -e $file.out ) then /bin/rm $file.out $file.ps & @ cnt = $cnt + 1 if( $cnt == 5 ) then @ cnt = 0 wait endif endif end end end end end wait