#########
#  Mistral (DKRZ) / Intel Compiler
#########
#
# modules and libraries
#

#... MPI
MPI_INC  = -I/usr/include/openmpi-x86_64 
MPI_LIB  = -L/usr/lib64/openmpi/lib

#... netCDF

NC_INC  = -I/usr/include
NC_LIB  = -L/usr/lib64/ -lnetcdf -lnetcdff
NC_LIB  += -lhdf5_hl -lhdf5

#... GRIB
#
GRIB_LIB =

#... other libs, if needed on the computer system (e.g. mathematical packages)
OTHLIBS1=

#
# name and path of standard binary to be produced
PROGRAM      = bin/int2lm.exe
#
# compiler, options and libraries
#
# important note wiith respect to the compiler
# I recommend to use the BULL MPI environmet. For this the nake of the compiler is "mpif90"
# If you want to use the INTEL MPI environment, then you have to change the name to "mpiifort"
# 
F90          = /usr/lib64/openmpi/bin/mpif90

CPPFLAGS     = -DNETCDF   # separator is compiler dependend (e.g. comma or blank)

# for purposes of first tests you may use in addition to the option below the options -fpe0 -traceback
COMFLG        = -c -cpp -O2 $(CPPFLAGS) -I. -I$(SRCDIR) $(MPI_INC) ${NC_INC} -I/usr/lib64/gfortran/modules

COMFLG1        = $(COMFLG)
COMFLG2        = $(COMFLG)
COMFLG3        = $(COMFLG)
COMFLG4        = $(COMFLG)


LDSEQ        = /usr/lib64/openmpi/bin/mpif90 
LDPAR        = /usr/lib64/openmpi/bin/mpif90
LDFLG        = -I$(SRCDIR)
LIB          = ${GRIB_LIB} ${NC_LIB} ${MPI_LIB} ${OTHLIBS1}
