#! /bin/sh current_dir=`pwd` export WHERE_AM_I=$( hostname | cut -c1-1 ) cd ../../.. source ./versions/build.ver env | grep ver module purge module use modulefiles module load HWRF/build if [ $WHERE_AM_I == 'c' ] || [ $WHERE_AM_I == 'd' ]; then echo "Host is Dogwood or Cactus" export NETCDF=$NetCDF_ROOT export HDF5=$HDF5_ROOT export JASPERLIB=$JASPER_LIBDIR export JASPERINC=$JASPER_INC export PNG_LDFLAGS="-L$LIBPNG_LIBDIR -lpng" elif [ $WHERE_AM_I == 'l' ] || [ $WHERE_AM_I == 's' ]; then echo"Host is Luna or Surge" module load w3emc-intel/2.2.0 module load w3nco-intel/2.0.6 export NETCDF=/gpfs/hps/usrx/local/prod/NetCDF/4.2/intel/sandybridge/ export HDF5=/gpfs/hps/usrx/local/prod/HDF5/1.8.9/serial/intel/sandybridge export JASPERLIB=/usrx/local/prod/jasper/1.900.1/intel/sandybridge/lib export JASPERINC=/usrx/local/prod/jasper/1.900.1/intel/sandybridge/include export PNG_LDFLAGS="-L/usrx/local/prod//png/1.2.49/intel/sandybridge/lib -lpng" fi export HDF5_LDFLAGS="-L${HDF5}/lib -lhdf5_hl -lhdf5hl_fortran -lhdf5 -lhdf5_fortran -lz"; export NETCDF_LDFLAGS="-L${NETCDF}/lib -lnetcdff -lnetcdf -lz ${HDF5_LDFLAGS}"; cd $current_dir set -x # Ensure a clean compile: ./clean rm -fr include find . -name '*.o' -o -name '*.a' -o -name '*.mod' -o -name '*.exe' | xargs rm -f mkdir -p include mkdir -p lib #module load w3emc-intel/2.2.0 #module load w3nco-intel/2.0.6 #module load crtm-intel/2.2.6 #module load g2tmpl/1.6.0 #module load bacio-intel/2.0.1 #module load g2-intel/3.1.0 #module load gfsio-intel/1.1.0 #module load ip-intel/3.0.0 #module load sp-intel/2.0.2 #module load sfcio-intel/1.0.0 #module load sigio-intel/2.1.0 #module load nemsio-intel/2.2.2 #module load xmlparse-cray-sandybridge/2.0.0 /bin/cp $W3EMC_LIB4 lib/libw3emc.a /bin/cp $W3NCO_LIB4 lib/libw3nco.a /bin/cp $W3EMC_INC4/* include/. export WRF_DIR=`pwd`../../hwrf_v4.0.0.fd/ export LIB_G2_PATH=`pwd`../../../libs export WRF_LIB_EXTRA="-L`pwd`/../../hwrf_v4.0.0.fd/external/RSL_LITE -lrsl_lite" export PNETCDF_QUILT=1 HWRF=1 WRF_NMM_CORE=1 WRF_NMM_NEST=1 export WRFIO_NCD_LARGE_FILE_SUPPORT=1 echo 15 | ./configure 2>&1 # Compile: ./compile > make_log 2>&1 # Rename executable for HWRF #cp -p bin/unipost.exe hwrf_post #cp -p bin/copygb.exe copygb #cp -p bin/cnvgrib.exe cnvgrib