#!/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 and Echo Variables # ---------------------- set arch = `uname` set host = `hostname` set cdir = `pwd` set name = `echo $host`; if ( ($name =~ pfe*) || ($name =~ r[0-9]*i[0-9]*n[0-9]*) || ($name =~ bridge*) ) set host = pleiades set name = `echo $host | cut -b 1-8` ; if( $name == 'discover' ) set host = $name set name = `echo $host | cut -b 1-3` ; if( $name == 'vis' ) set host = discover set name = `echo $host | cut -b 1-4` ; if( $name == 'borg' ) set host = discover set name = `echo $host | cut -b 1-4` ; if( $name == 'warp' ) set host = discover set name = `echo $host | cut -b 1-4` ; if( $name == 'dali' ) set host = discover if( $arch == 'Linux' ) then if( $host == 'pleiades' ) then setenv TOPODIR /nobackup/gmao_SIteam/ModelData/bcs/Ganymed-4_0/TOPO setenv VERIFICATION /nobackup/gmao_SIteam/ModelData/verification setenv OPENGADIR /nobackup/gmao_SIteam/Utilities/opengrads/Contents setenv GAVERSION 2.0.1.oga.1 setenv GRADS_LOC ${OPENGADIR} setenv PATH ${OPENGADIR}:${PATH} set path = ( ${OPENGADIR} ${path} ) setenv GRADS `which grads` setenv GXYAT `which gxyat` setenv ImagMag_lib /nasa/imagemagick/6.4.0-3/lib setenv ImagMag_bin /nasa/imagemagick/6.4.0-3/bin setenv PATH ${PATH}:${ImagMag_bin} set path = ( ${path} ${ImagMag_bin} ) else if( $host == 'discover' ) then setenv TOPODIR /discover/nobackup/ltakacs/bcs/Ganymed-4_0/TOPO setenv NCCS_SHARE ${SHARE}/gmao_ops/ setenv VERIFICATION ${NCCS_SHARE}/verification setenv OPENGADIR ${SHARE}/gmao_ops/opengrads/Contents setenv GAVERSION 2.0.1.oga.1 setenv GRADS_LOC ${OPENGADIR} setenv PATH ${OPENGADIR}:${PATH} set path = ( ${OPENGADIR} ${path} ) setenv GRADS `which grads` setenv GXYAT `which gxyat` setenv ImagMag_lib ${NCCS_SHARE}/lib setenv ImagMag_bin ${NCCS_SHARE}/bin setenv PATH ${PATH}:${ImagMag_bin} set path = ( ${path} ${ImagMag_bin} ) else # Here we assume GEOS-5 desktop. These edits are mainly to enable use of the # dc script to view native cube-sphere output. They do not enable the complete # plotting package of GEOS-5. setenv TOPODIR /ford1/share/gmao_SIteam/ModelData/bcs/Ganymed-4_0/TOPO setenv VERIFICATION /ford1/share/gmao_SIteam/ModelData/verification # Note: A dead link, but needed setenv OPENGADIR /ford1/local/opengrads/Contents/opengrads setenv GRADS_LOC ${OPENGADIR} setenv PATH ${OPENGADIR}:${PATH} set path = ( ${OPENGADIR} ${path} ) setenv GRADS `which grads` setenv GXYAT `which gxyat` # For ImageMagick, assume any desktop will have it. If not, GMAO Support # can install it endif endif # Set GRADS Environment Variables # ------------------------------- setenv GASCRP $GEOSUTIL/plots/grads_util setenv GAUDFT $GEOSUTIL/plots/grads_util/udft_$arch.tools setenv GAUDXT $GEOSUTIL/plots/grads_util/udxt if( -e sedfile ) /bin/rm sedfile cat > sedfile << EOF s?GEOSUTIL?$GEOSUTIL?g s?ARCH?$arch?g EOF sed -f sedfile $GASCRP/udft.template > $GAUDFT # Build Grads UDF Utilities # ------------------------- set files = `echo regrid2` foreach file ($files) if(! -e $GASCRP/${file}_$arch.x ) then if( $arch == 'Linux' ) ifort -o $GASCRP/${file}_$arch.x $GASCRP/${file}.f endif end # Link Cubed-Sphere FRAC Dataset for dc.gs Utility and CONST_2d Dataset for TopoShade # ----------------------------------------------------------------------------------- cd $GEOSUTIL/plots/grads_util /bin/ln -sf $TOPODIR/TOPO_CF0720x6C/FRAC_720x4320.nc4 . /bin/ln -sf $TOPODIR/TOPO_CF0720x6C/CONST_2D.2880x1441.nc4 . /bin/ln -sf $TOPODIR/TOPO_CF1440x6C/CONST_2D.5760x2881.nc4 . cd $cdir # Create .cshrc for QuickPlot (Note: unsetenv GAUDXT to removed Arlindo Setup Conflicts) # -------------------------------------------------------------------------------------- if( -e .quickplotrc ) /bin/rm .quickplotrc echo \#\!/bin/csh > .quickplotrc echo setenv VERIFICATION $VERIFICATION >> .quickplotrc echo setenv LOCHOST $host >> .quickplotrc echo setenv GRADS $GRADS >> .quickplotrc echo setenv GXYAT $GXYAT >> .quickplotrc echo setenv GASCRP $GASCRP >> .quickplotrc echo setenv GAUDFT $GAUDFT >> .quickplotrc echo setenv GAUDXT $GAUDXT >> .quickplotrc if ( $?GAVERSION ) then echo setenv GAVERSION $GAVERSION >> .quickplotrc endif echo " " >> .quickplotrc echo "set path = ( $path $GRADS_LOC $GASCRP )" >> .quickplotrc chmod 755 .quickplotrc