#! /bin/sh

. $MODULESHOME/init/sh

./clean -a

module purge

module load ncep

module unload craype-haswell
module load craype-sandybridge

module load ip-intel/2.0.0
module load bacio-intel/2.0.1
module load w3nco-intel/2.0.6
module load w3emc-intel/2.2.0
module load g2-intel/2.5.0
module load g2tmpl-intel/1.3.0
module load jasper-gnu-sandybridge/1.900.1
module load png-intel-sandybridge/1.2.44
module load zlib-intel-sandybridge/1.2.7
module load nemsio-intel/2.2.2
module load sfcio-intel/1.0.0
module load sp-intel/2.0.2
module load landsfcutil-intel/2.0.0
module load NetCDF-intel-sandybridge/3.6.3
module load sigio-intel/2.0.1
module load gfsio-intel/1.1.0


# Known conflicts ???

# Loading Intel Compiler Suite
module load PrgEnv-intel
module load cray-mpich

export COMPILERS=ftns
export COMPILER=ftn
export COMP_MP=ftn
export COMP_MPI=ftn
export C_COMP=cc
export C_COMP_MP=cc

./conf wcosscray

./configure wcosscray << EOF
3
EOF

echo
echo
echo
module list
echo
echo
echo

./compile nps > ../make_log 2>&1