#! /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 elif [ $WHERE_AM_I == 'l' ] || [ $WHERE_AM_I == 's' ]; then 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 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 -a find . -name '*.o' -o -name '*.a' -o -name '*.mod' | xargs rm -f rm -f hwrf_metgrid hwrf_geogrid hwrf_ungrib export WRF_DIR=`pwd`/../hwrf_v4.0.0.fd/ export PNETCDF_QUILT=1 HWRF=1 WRF_NMM_CORE=1 WRF_NMM_NEST=1 export WRFIO_NCD_LARGE_FILE_SUPPORT=1 echo 29 | ./configure 2>&1 | head -30000 # Configure with MPI and GRIB2 support: # Compile: ./compile > make_log 2>&1 # Rename executables for HWRF: cp -p metgrid.exe hwrf_metgrid || exit 1 cp -p geogrid.exe hwrf_geogrid || exit 1 cp -p ungrib.exe hwrf_ungrib || exit 1