#!/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 KEY for finding RESTART Names # --------------------------------- @ nmax = $#argv if( $nmax == 0 ) then set expid = d500_eros_01. set key = _rst.20060104_21z.bin else set expid = '' set key = $1 endif # Check for Executables # --------------------- if(! -e swapendian.x ) cc -o swapendian.x swapendian.c if(! -e swapendian_FV.x ) ifort -o swapendian_FV.x swapendian_FV.f90 # Convert FV RESTART # ------------------ set file = `ls -1 ${expid}*${key} | grep -i fvcore_internal` swapendian_FV.x $file $file.swap # Convert Generic RESTARTS # ------------------------ set files = `ls -1 ${expid}*${key} | grep -v cap | grep -iv fvcore_internal` foreach file ( $files ) set base = `basename $file` swapendian.x $file $base.swap end