# configure.upp
#
# This file was automatically generated by the configure script in the
# top level directory. You may make changes to the settings in this
# file but be aware they will be overwritten each time you run configure.
# Ordinarily, it is necessary to run configure once, when the code is
# first installed.
#
# To permanently change options, change the settings for your platform
# in the file arch/configure.defaults then rerun configure.
#

SHELL           	=       /bin/sh

LDFLAGS_MPI             =     # to be overridden later

#### Architecture specific settings ####

# Settings for Linux x86_64, Intel compiler, CrayPE	 (dmpar)#
SFC     = ftn
SF90    = ftn -free
SCC     = cc

DM_FC   = ftn
DM_F90  = ftn -free
DM_CC   = cc

FC      = $(DM_FC)
F90     = $(DM_F90)
CC      = $(DM_CC)
CPP     = /lib/cpp

LINUX_OBJ   =
BYTE_ORDER  = UPPLITTLEENDIAN
SIZE_I8R8   = -i8 -r8
SIZE_I4R8   = -i4 -r8
SIZE_I4R4   = -i4 -r4
SIZE        =

PPDEFINE   = -DLINUX -D$(BYTE_ORDER)
FPPDEFINE  = $(PPDEFINE)

FDEBUG  = -O0 -g -check all -ftrapuv -fpe0
CRTMDBUG= -O0 -g -check all -ftrapuv -fpe0
CDEBUG  = -O0 -g -debug all -Wall -check-uninit

FOPT    = -O3 
CRTMOPT = -O3 
COPT    = -O3 

CPP_FLAGS = -P -traditional $(FPPDEFINE)
INC_FLAGS = -I$(MPI_ROOT)/include
LDFLAGS   = -Wl,-noinhibit-exec -L$(MPI_ROOT)/lib
FFLAGS    = -fp-model precise -ftz -assume byterecl -convert big_endian \
            -heap-arrays $(SIZE) $(FPPDEFINE) -I$(MPI_ROOT)/include     \
            $(FOPT)
CFLAGS    = $(PPDEFINE) $(COPT)
ARFLAGS   = ru

FFLAGS_CRTM  = -c -fp-model precise -ftz  -assume byterecl -convert big_endian \
               $(SIZE) $(FOPT)
FL_CRTM     =

##################################################################
#
#	Macros, these should be generic for all machines
LN		=   ln -sf
MAKE  =   make
RM		=   /bin/rm -f
CP		=   /bin/cp
MV              =   /bin/mv
AR		=   ar
RANLIB		=   ranlib

WRF_DIR         =    /lfs/h1/ops/para/packages/hwrf.v13.2.0/sorc/hwrf_post.fd/comupp/src/lib/wrf_io
WRF_LIB2        =    
NETCDFPATH      =    /apps/prod/hpc-stack/intel-19.1.3.304/cray-mpich-8.1.4/netcdf/4.7.4
NETCDFLIBS      =    -lnetcdff -lnetcdf

COMMS_ADD_OBJ   =    
COMMS_ADD_OBJST =    
COMMS_LIB       =    

SERIAL_MPI_STUB =    
SERIAL_MPI_LIB  =    

PARALLEL_FLAG   =    -DDM_PARALLEL

GRIB2SUPT_LIB   =    -L/apps/spack/jasper/2.0.25/intel/19.1.3.304/sjib74krrorkyczqpqah4tvewmlnqdx4/lib64 -L/apps/spack/libpng/1.6.37/intel/19.1.3.304/4ohkronuhlyherusoszzrmur5ewvlwzh/lib -lpng -lz -ljasper
GRIB2SUPT_INC   =    -I/apps/spack/jasper/2.0.25/intel/19.1.3.304/sjib74krrorkyczqpqah4tvewmlnqdx4/include

BINDIR          =    /lfs/h1/ops/para/packages/hwrf.v13.2.0/sorc/hwrf_post.fd/comupp/bin
INCMOD          =    /lfs/h1/ops/para/packages/hwrf.v13.2.0/sorc/hwrf_post.fd/comupp/include
LIBDIR          =    /lfs/h1/ops/para/packages/hwrf.v13.2.0/sorc/hwrf_post.fd/comupp/lib

WRF_LIB         = -L$(WRF_DIR) -lwrfio_nf

#
# These files may be changed to enable other files with the same 
# functions definitions, but different logic.  This is typically
# how backward compatibilty is achieved for the community code.
GRIBIT = GRIBIT.f
CALRAD = CALRAD_WCLOUD_crtm.f

# There is probably no reason to modify these rules
.SUFFIXES : .c .f .f90
.c.o:
	$(CC) $(CFLAGS) $(EXTRA_CFLAGS)  $<

.f.o:
	$(FC) $(FFLAGS) $(EXTRA_FFLAGS) $<

.f90.o :
	$(F90) $(FFLAGS) $(EXTRA_FFLAGS) $<

.F.o:
	$(CPP) $(CPP_FLAGS) $< > $*.f
	$(FC) $(FFLAGS) $(EXTRA_FFLAGS) $<

.F90.o:
	$(CPP) $(CPP_FLAGS) $< > $*.f90
	$(F90) $(FFLAGS) $(EXTRA_FFLAGS) $<