Commit 9cd7c043 authored by Don Morton's avatar Don Morton
Browse files

Set up makefiles for gfortran and ifort, for general

FLEXPART and CTBTO FLEXPART.

The only difference between general and CTBTO is the -DCTBTO flag.
parent dfb516e9
SHELL = /bin/bash
MAIN = FLEXPART_IFORT
FLEXPART_EXECUTABLE = flexpart_ifort
GRIB2FLEXPART_EXECUTABLE = grib2flexpart_ifort
#############################################
DEFS = -DCTBTO
#############################################
# Set up for devlan ifort
INTEL_ROOT = /cots/intel/composer_xe_2013.2.146
GRIB_API_ROOT = /dvl/atm/klinkl/tmp/ifort_grib_api/grib_api-1.12.3
FC = $(INTEL_ROOT)/bin/ifort
INCPATH = $(GRIB_API_ROOT)/fortran
LIBPATH1 = $(GRIB_API_ROOT)/fortran/.libs
LIBPATH2 = $(GRIB_API_ROOT)/src/.libs
FFLAGS = -O2 -mcmodel=medium -convert little_endian -I$(INCPATH)
FC = ifort
INCPATH = /usr/local/grib-api/include
LIBPATH1 = /usr/local/grib-api/lib
LIBPATH2 = /usr/lib/x86_64-linux-gnu
FFLAGS = -g -O2 -mcmodel=medium -shared-intel -convert little_endian -I$(INCPATH)
LDFLAGS = $(FFLAGS) -L$(LIBPATH2) -L$(LIBPATH1) -lgrib_api_f90 -lgrib_api -lm -ljasper
......@@ -16,11 +29,11 @@ interpol_mod.o cmapf_mod.o \
unc_mod.o oh_mod.o \
xmass_mod.o flux_mod.o \
point_mod.o outg_mod.o \
fpmetbinary_mod.o
fpmetbinary_mod.o class_vtable_mod.o
OBJECTS = \
grib2check.o fpgricheck.o \
grib2check.o fpgridcheck.o \
writeheader.o assignland.o\
calcpar.o part0.o \
calcpar_gfs.o detectformat.o \
......@@ -81,7 +94,6 @@ ohreaction.o getvdep_nests.o \
initial_cond_calc.o initial_cond_output.o \
dynamic_viscosity.o get_settling.o
all: $(FLEXPART_EXECUTABLE) $(GRIB2FLEXPART_EXECUTABLE)
flexpart: $(FLEXPART_EXECUTABLE)
......@@ -104,7 +116,8 @@ GRIB2FLEXPART.o: $(MODOBJS)
$(FC) -c $(FFLAGS) $<
%.o: %.F90
$(FC) -c $(FFLAGS) $<
$(FC) -c $(FFLAGS) $(DEFS) $<
clean:
rm -f *.o *.mod
......
......@@ -5,14 +5,25 @@ GRIB2FLEXPART_EXECUTABLE = GRIB2FLEXPART_GFORTRAN
#############################################
#### Uncomment this to activate performance timing
#DEFS = -DPERFTIMER -DCTBTO
DEFS = -DPERFTIMER
#DEFS = -DPERFTIMER
# DEFS = -DCTBTO
DEFS =
#############################################
FC = gfortran
INCPATH = /opt/grib-api/include
LIBPATH1 = /opt/grib-api/lib
# devlan
INCPATH = /dvl/atm/software/local/include
LIBPATH1 = /dvl/atm/software/usr/lib
LIBPATH2 = /usr/lib/x86_64-linux-gnu
FFLAGS = -O2 -m64 -mcmodel=medium -fcheck=all -fconvert=little-endian -frecord-marker=4 -I$(INCPATH)
# alaskawx
#INCPATH = /opt/grib-api/include
#LIBPATH1 = /opt/grib-api/lib
#LIBPATH2 = /usr/lib/x86_64-linux-gnu
FFLAGS = -O2 -m64 -mcmodel=medium -fconvert=little-endian -frecord-marker=4 -I$(INCPATH)
LDFLAGS = $(FFLAGS) -L$(LIBPATH2) -L$(LIBPATH1) -lgrib_api_f90 -lgrib_api -lm -ljasper
......
SHELL = /bin/bash
MAIN = FLEXPART_GFORTRAN
FLEXPART_EXECUTABLE = flexpart_ifort
GRIB2FLEXPART_EXECUTABLE = grib2flexpart_ifort
#############################################
#DEFS = -DCTBTO
DEFS = -DCTBTO
#############################################
# Set up for devlan ifort
INTEL_ROOT = /cots/intel/composer_xe_2013.2.146
GRIB_API_ROOT = /dvl/atm/klinkl/tmp/ifort_grib_api/grib_api-1.12.3
FC = $(INTEL_ROOT)/bin/ifort
INCPATH = $(GRIB_API_ROOT)/fortran
LIBPATH1 = $(GRIB_API_ROOT)/fortran/.libs
LIBPATH2 = $(GRIB_API_ROOT)/src/.libs
FFLAGS = -O2 -mcmodel=medium -convert little_endian -I$(INCPATH)
FC = gfortran
INCPATH = /opt/grib-api/include
LIBPATH1 = /opt/grib-api/lib
LIBPATH2 = /usr/lib/x86_64-linux-gnu
FFLAGS = -O2 -m64 -mcmodel=medium -fconvert=little-endian -frecord-marker=4 -I$(INCPATH)
LDFLAGS = $(FFLAGS) -L$(LIBPATH2) -L$(LIBPATH1) -lgrib_api_f90 -lgrib_api -lm -ljasper
......@@ -16,22 +30,23 @@ interpol_mod.o cmapf_mod.o \
unc_mod.o oh_mod.o \
xmass_mod.o flux_mod.o \
point_mod.o outg_mod.o \
fpmetbinary_mod.o
fpmetbinary_mod.o class_vtable_mod.o
OBJECTS = \
grib2check.o fpgridcheck.o \
writeheader.o assignland.o\
calcpar.o part0.o \
calcpar_gfs.o detectformat.o \
caldate.o partdep.o \
coordtrafo.o psih.o \
raerod.o \
raerod.o convertfields.o \
drydepokernel.o random.o \
erf.o readavailable.o \
ew.o readcommand.o \
advance.o readdepo.o \
releaseparticles.o psim.o \
FLEXPART.o readlanduse.o \
readlanduse.o getfpfields.o \
getfields.o init_domainfill.o\
interpol_wind.o readoutgrid.o \
interpol_all.o readpaths.o \
......@@ -58,7 +73,6 @@ readwind_nests.o calcpar_nests.o \
verttransform_nests.o interpol_all_nests.o \
interpol_wind_nests.o interpol_misslev_nests.o \
interpol_vdep_nests.o interpol_rain_nests.o \
getvdep_nests.o \
readageclasses.o readpartpositions.o \
calcfluxes.o fluxoutput.o \
qvsat.o skplin.o \
......@@ -81,16 +95,32 @@ ohreaction.o getvdep_nests.o \
initial_cond_calc.o initial_cond_output.o \
dynamic_viscosity.o get_settling.o
all: $(FLEXPART_EXECUTABLE) $(GRIB2FLEXPART_EXECUTABLE)
flexpart: $(FLEXPART_EXECUTABLE)
$(MAIN): $(MODOBJS) $(OBJECTS)
$(FC) *.o -o $(MAIN) $(LDFLAGS)
grib2flexpart: $(GRIB2FLEXPART_EXECUTABLE)
$(FLEXPART_EXECUTABLE): $(MODOBJS) $(OBJECTS) FLEXPART.o
$(FC) FLEXPART.o $(OBJECTS) $(MODOBJS) -o $(FLEXPART_EXECUTABLE) $(LDFLAGS)
$(GRIB2FLEXPART_EXECUTABLE): $(MODOBJS) $(OBJECTS) GRIB2FLEXPART.o
$(FC) GRIB2FLEXPART.o $(OBJECTS) $(MODOBJS) -o $(GRIB2FLEXPART_EXECUTABLE) $(LDFLAGS)
$(OBJECTS): $(MODOBJS)
%.o: %.f90
FLEXPART.o: $(MODOBJS)
GRIB2FLEXPART.o: $(MODOBJS)
%.o: %.f90
$(FC) -c $(FFLAGS) $<
%.o: %.F90
$(FC) -c $(FFLAGS) $(DEFS) $<
clean:
rm *.o *.mod
rm -f *.o *.mod
###############################################################
#
# DJM 2015-09-17
# This is an evolving, experimental Makefile in which we explore
# the incorporation of libraries - no change in the fundamental FLEXPART
# code, just the use of libraries in compilation
#
###############################################################
SHELL = /bin/bash
MAIN = FLEXPART_GFORTRAN
FC = gfortran
############## Conditional compilation for testing #################
#### These are used for development and testing of .fp file functionality
#### Hopefully they will be obsolete once WO4 is completed
####
#### For normal FLEXPART usage (no dumping or loading of .fp files), both
#### of the DEFS should be commented out.
####
#### Users should uncomment only one of the following. They are mutually
#### exclusive
####
#### Uncommenting GENFPFILESANDTEST will run FLEXPART normally, reading from
#### met files, but every time a met file is processed, a .fp file with the
#### same basename will be created. You will need to edit the destination
#### of the .fp files, FPDIR, in getfields.F90
#DEFS = -DGENFPFILESANDTEST
####
#### Uncommenting TESTUSEGETFPFIELDS will cause FLEXPART to run from .fp files
#### rather than met files. The path to the .fp files, FPDIR, must be
#### hardcoded in
#### FLEXPART.f90.
DEFS = -DTESTUSEGETFPFIELDS
#######################################################################
INCPATH = /opt/grib-api/include
LIBPATH1 = /opt/grib-api/lib
LIBPATH2 = /usr/lib/x86_64-linux-gnu
FFLAGS = -O2 -m64 -mcmodel=medium -fconvert=little-endian -frecord-marker=4 -I$(INCPATH)
LDFLAGS = $(FFLAGS) -L$(LIBPATH2) -L$(LIBPATH1) -L./ -lmetio -lfputil -lgrib_api_f90 -lgrib_api -lm -ljasper
METIO_LIB = libmetio.a
FPUTIL_LIB = libfputil.a
METIO_LIB_OBJS = fpmetbinary_mod.o getfields.o \
fpgridcheck.o getfpfields.o \
readwind.o readwind_gfs.o readwind_nests.o \
calcpar.o calcpar_gfs.o calcpar_nests.o \
gridcheck_gfs.o \
gridcheck.o \
gridcheck_nests.o \
verttransform.o verttransform_gfs.o verttransform_nests.o
FPUTIL_LIB_OBJS = calcpv.o calcpv_nests.o caldate.o cmapf_mod.o \
com_mod.o conv_mod.o ew.o flux_mod.o getrb.o getrc.o getvdep.o \
getvdep_nests.o juldate.o shift_field_0.o obukhov.o obukhov_gfs.o \
par_mod.o partdep.o pbl_profile.o psih.o psim.o qvsat.o raerod.o \
richardson.o richardson_gfs.o scalev.o shift_field.o
MODOBJS = \
par_mod.o com_mod.o \
conv_mod.o hanna_mod.o \
interpol_mod.o cmapf_mod.o \
unc_mod.o oh_mod.o \
xmass_mod.o flux_mod.o \
point_mod.o outg_mod.o \
fpmetbinary_mod.o
OBJECTS = \
writeheader.o assignland.o\
part0.o \
detectformat.o \
coordtrafo.o \
drydepokernel.o random.o \
erf.o readavailable.o \
readcommand.o \
advance.o readdepo.o \
releaseparticles.o \
FLEXPART.o readlanduse.o \
getfields.o init_domainfill.o\
interpol_wind.o readoutgrid.o \
interpol_all.o readpaths.o \
readreceptors.o \
readreleases.o \
readspecies.o \
interpol_misslev.o \
conccalc.o \
concoutput.o \
readOHfield.o\
timemanager.o \
interpol_vdep.o interpol_rain.o \
partoutput.o \
hanna.o wetdepokernel.o \
mean.o wetdepo.o \
hanna_short.o windalign.o \
hanna1.o initialize.o \
interpol_all_nests.o \
interpol_wind_nests.o interpol_misslev_nests.o \
interpol_vdep_nests.o interpol_rain_nests.o \
readageclasses.o readpartpositions.o \
calcfluxes.o fluxoutput.o \
skplin.o \
convmix.o calcmatrix.o \
convmix_gfs.o calcmatrix_gfs.o \
convect43c.o redist.o \
sort2.o distance.o \
centerofmass.o plumetraj.o \
openouttraj.o \
distance2.o \
clustering.o interpol_wind_short.o \
interpol_wind_short_nests.o shift_field_0.o \
outgrid_init.o \
openreceptors.o boundcond_domainfill.o\
partoutput_short.o readoutgrid_nest.o \
outgrid_init_nest.o writeheader_nest.o \
concoutput_nest.o wetdepokernel_nest.o \
drydepokernel_nest.o zenithangle.o \
ohreaction.o \
initial_cond_calc.o initial_cond_output.o \
dynamic_viscosity.o get_settling.o
$(MAIN): $(MODOBJS) $(OBJECTS) $(METIO_LIB) $(FPUTIL_LIB)
$(FC) *.o -o $(MAIN) $(LDFLAGS)
$(OBJECTS): $(MODOBJS)
$(METIO_LIB): $(METIO_LIB_OBJS)
ar rcs $@ $^
rm $^
$(FPUTIL_LIB): $(FPUTIL_LIB_OBJS)
ar rcs $@ $^
rm $^
%.o: %.f90
$(FC) -c $(FFLAGS) $<
%.o: %.F90
$(FC) -c $(FFLAGS) $(DEFS) $<
clean:
rm *.o *.mod *.a
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment