-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
release of JAGURS-D_V0502Revised(src)
- Loading branch information
1 parent
cbdf425
commit ee752a7
Showing
7 changed files
with
360 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,265 @@ | ||
# FC: Specify Fortran90 compiler command. | ||
FC=mpif90 | ||
|
||
# Added for displacement. | ||
# PRJ4_DIR: Specify PROJ.4 install directory. | ||
# CC&CFLAGS: Specify C compiler command and flags. | ||
PROJ4_DIR=/home/baba/proj4 | ||
CC=mpicc | ||
CFLAGS=-g -I$(PROJ4_DIR)/include | ||
|
||
# BASE: Specify basic compiler options. | ||
BASE=-cpp | ||
|
||
# FFTW3_INCLUDE_DIR: Specify FFTW3 include directory. | ||
FFTW3_INCLUDE_DIR=/home/baba/fftw3/include | ||
|
||
# FFTW3_LIB: Specify linker options to link FFTW3. | ||
FFTW3_LIB=-L/home/baba/fftw3/lib -lfftw3 | ||
|
||
# OPT: Specify compiler options about optimization level. | ||
#OPT=-O2 -fopenmp -I$(FFTW3_INCLUDE_DIR) -march=native | ||
OPT=-O2 -fopenmp -I$(FFTW3_INCLUDE_DIR) | ||
#OPT=-O2 -I$(FFTW3_INCLUDE_DIR) | ||
|
||
# NETCDF: Specify the path to NetCDF library. | ||
NETCDF=/home/baba/netcdf-fortran | ||
|
||
# LIBS: Specify linker options. | ||
LIBS=-L$(NETCDF)/lib -lnetcdff -lnetcdf -L/home/baba/hdf5/lib -lhdf5_hl -lhdf5 -lcurl -lsz -L$(PROJ4_DIR)/lib -lproj $(FFTW3_LIB) # for NetCDF4! | ||
|
||
# EXEC: Specify the name of executable. | ||
EXEC=jagurs | ||
|
||
################################################################################ | ||
### Set parameters here! ### | ||
################################################################################ | ||
# PREC=REAL_DBLE: All calc. (except file I/O) is performed with double precision. | ||
# DBLE_MATH: Only intrinsic math functions are performed with double precision. | ||
# Else, all calc. is performed with single precision. | ||
#PREC=DBLE_MATH | ||
PREC=REAL_DBLE | ||
|
||
# MPI=ON: MPI version is made. | ||
# Else, serial version is made. | ||
#MPI=ON | ||
|
||
# USE_ALLTOALLV=ON: Use MPI_Alltoallv for inter-nest communications. | ||
# Else, MPI_Allreduce is used. | ||
#USE_ALLTOALLV=ON | ||
|
||
# A2A3D=ON: Use A2A3D for inter-nest communications. | ||
# This is valid only if USE_ALLTOALLV=ON. | ||
#A2A3D=ON | ||
|
||
# SINGLE_A2A=ON: Use SINGLE_A2A for inter-nest communications. | ||
# This is valid only if USE_ALLTOALLV=ON. | ||
#SINGLE_A2A=ON | ||
|
||
# TIMER=ON: Built-in timer is available. | ||
# DETAIL: More detail. | ||
# Else, built-in timer is disabled. | ||
TIMER=ON | ||
#TIMER=DETAIL | ||
|
||
# CONV_CHECK=ON: Convergence check is available on dispersive calc. | ||
# Else, convergence check is disabled. | ||
#CONV_CHECK=ON | ||
|
||
# OUTPUT=NCDIO: Output is put into single NetCDF file for each domain/MPI processes. | ||
# DIROUT: GMT snapshot files are written into directories. | ||
# Else, original GMT output. | ||
#OUTPUT=DIROUT | ||
#OUTPUT=NCDIO | ||
|
||
# MULTI=ON: Multi-members on a job is supported. | ||
#MULTI=ON | ||
|
||
# SINGLE_TGS=ON: Station (tgs) output is written into single file per process. | ||
# This file can be split into files for each station by "splittgs.sh". | ||
#SINGLE_TGS=ON | ||
|
||
# CARTESIAN=ON: Cartesian axis is utilized. | ||
#CARTESIAN=ON | ||
|
||
# UPWIND3=ON: Difference scheme for advective term is changed into 3rd-order upwind | ||
# from original 1st-order upwind. | ||
#UPWIND3=ON | ||
|
||
# SKIP_MAX_VEL=ON: Do not compute max velocity (saves time, most noticeably for | ||
# linear computation) | ||
#SKIP_MAX_VEL=ON | ||
|
||
# LESS_CC=ON: Convergence check on dispersive calc. is done only every 10 steps. | ||
LESS_CC=ON | ||
|
||
# ONEFILE=ON: MPI parallelized version can read/write non-splitted GMT file. | ||
ONEFILE=ON | ||
|
||
# BANKFILE=ON: Bank line data becomes available. | ||
#BANKFILE=ON | ||
|
||
# HZMINOUT=ON: Min. height is output. | ||
#HZMINOUT=ON | ||
|
||
#DUMP1D=ON | ||
|
||
################################################################################ | ||
################################################################################ | ||
### DON'T CHANGE THE FOLLOWINGS!!!! ### | ||
################################################################################ | ||
################################################################################ | ||
|
||
################################################################################ | ||
### Parameters are processed here. ### | ||
################################################################################ | ||
FFLAGS=$(BASE) $(OPT) -I$(NETCDF)/include | ||
|
||
# Precision | ||
ifeq ($(PREC),REAL_DBLE) | ||
FFLAGS+=-DREAL_DBLE | ||
else | ||
ifeq ($(PREC),DBLE_MATH) | ||
FFLAGS+=-DDBLE_MATH | ||
endif | ||
endif | ||
|
||
# MPI | ||
ifeq ($(MPI),ON) | ||
FFLAGS+=-DMPI -lmpi | ||
ifeq ($(CARTESIAN),ON) | ||
OBJS=mapproject.o okada.sub.o \ | ||
mod_multi.o \ | ||
mod_a2a3d.o mod_truncation.o mod_timer.o mod_mpi_fatal.o mod_grid.o mod_params.o mod_mpi.o mod_onefile.o mod_mygmt_gridio.o \ | ||
mod_fxy.o mod_fxy_cartesian.o mod_nest.o mod_interpolation.o mod_fxy_disp.o mod_fxy_disp_cartesian.o mod_hxy.o mod_hxy_cartesian.o mod_bank.o \ | ||
mod_displacement.o mod_rwg.o \ | ||
mod_tgs.o mod_newsubs.o mod_ncdio.o mod_init_disp_gaussian.o mod_init_disp_sinwave.o mod_restart.o mod_dump1d.o JAGURS.o | ||
else | ||
OBJS=mapproject.o okada.sub.o \ | ||
mod_multi.o \ | ||
mod_a2a3d.o mod_truncation.o mod_timer.o mod_mpi_fatal.o mod_grid.o mod_params.o mod_mpi.o mod_onefile.o mod_mygmt_gridio.o \ | ||
mod_fxy.o mod_fxy_cartesian.o mod_nest.o mod_interpolation.o mod_fxy_disp.o mod_fxy_disp_cartesian.o mod_hxy.o mod_hxy_cartesian.o mod_bank.o \ | ||
mod_fxy_linear_Coriolis.o mod_fxy_linear_Coriolis_disp.o \ | ||
mod_density.o mod_displacement.o mod_loading.o mod_rwg.o \ | ||
mod_tgs.o mod_newsubs.o mod_ncdio.o mod_init_disp_gaussian.o mod_init_disp_sinwave.o mod_restart.o mod_dump1d.o JAGURS.o | ||
endif | ||
ifeq ($(USE_ALLTOALLV),ON) | ||
FFLAGS+=-DUSE_ALLTOALLV | ||
ifeq ($(A2A3D),ON) | ||
FFLAGS+=-DA2A3D | ||
endif | ||
ifeq ($(SINGLE_A2A),ON) | ||
FFLAGS+=-DSINGLE_A2A | ||
endif | ||
endif | ||
else | ||
ifeq ($(CARTESIAN),ON) | ||
OBJS=mapproject.o okada.sub.o \ | ||
mod_multi.o \ | ||
mod_truncation.o mod_timer.o mod_grid.o mod_params.o mod_mygmt_gridio.o \ | ||
mod_fxy.o mod_fxy_cartesian.o mod_nest.o mod_interpolation.o mod_fxy_disp.o mod_fxy_disp_cartesian.o mod_hxy.o mod_hxy_cartesian.o mod_bank.o \ | ||
mod_displacement.o mod_rwg.o \ | ||
mod_tgs.o mod_newsubs.o mod_ncdio.o mod_init_disp_gaussian.o mod_init_disp_sinwave.o mod_restart.o mod_dump1d.o JAGURS.o | ||
else | ||
OBJS=mapproject.o okada.sub.o \ | ||
mod_multi.o \ | ||
mod_truncation.o mod_timer.o mod_grid.o mod_params.o mod_mygmt_gridio.o \ | ||
mod_fxy.o mod_fxy_cartesian.o mod_nest.o mod_interpolation.o mod_fxy_disp.o mod_fxy_disp_cartesian.o mod_hxy.o mod_hxy_cartesian.o mod_bank.o \ | ||
mod_fxy_linear_Coriolis.o mod_fxy_linear_Coriolis_disp.o \ | ||
mod_density.o mod_displacement.o mod_loading.o mod_rwg.o \ | ||
mod_tgs.o mod_newsubs.o mod_ncdio.o mod_init_disp_gaussian.o mod_init_disp_sinwave.o mod_restart.o mod_dump1d.o JAGURS.o | ||
endif | ||
endif | ||
|
||
# Timer | ||
ifeq ($(TIMER),DETAIL) | ||
FFLAGS+=-DTIMER -DTIMER_DETAIL | ||
else | ||
ifeq ($(TIMER),ON) | ||
FFLAGS+=-DTIMER | ||
endif | ||
endif | ||
|
||
# Convergence check | ||
ifeq ($(CONV_CHECK),ON) | ||
FFLAGS+=-DCONV_CHECK | ||
endif | ||
|
||
# File output | ||
ifeq ($(OUTPUT),NCDIO) | ||
FFLAGS+=-DNCDIO | ||
else | ||
ifeq ($(OUTPUT),DIROUT) | ||
FFLAGS+=-DDIROUT | ||
endif | ||
endif | ||
|
||
# Multi-members | ||
ifeq ($(MULTI),ON) | ||
ifeq ($(MPI),ON) | ||
FFLAGS+=-DMULTI | ||
else | ||
FFLAGS+=-DMULTI -lmpi | ||
endif | ||
endif | ||
|
||
# Single tgs output | ||
ifeq ($(SINGLE_TGS),ON) | ||
FFLAGS+=-DSINGLE_TGS | ||
endif | ||
|
||
# Cartesian axis | ||
ifeq ($(CARTESIAN),ON) | ||
FFLAGS+=-DCARTESIAN | ||
endif | ||
|
||
# 3rd-order upwind | ||
ifeq ($(UPWIND3),ON) | ||
FFLAGS+=-DUPWIND3 | ||
endif | ||
|
||
# Skip max velocity computation | ||
ifeq ($(SKIP_MAX_VEL),ON) | ||
FFLAGS+=-DSKIP_MAX_VEL | ||
endif | ||
|
||
# Convergence check on dispersive calc. is done only every 10 steps. | ||
ifeq ($(LESS_CC),ON) | ||
FFLAGS+=-DLESS_CC | ||
endif | ||
|
||
ifeq ($(ONEFILE),ON) | ||
FFLAGS+=-DONEFILE | ||
endif | ||
|
||
# Bank line data becomes available. | ||
ifeq ($(BANKFILE),ON) | ||
FFLAGS+=-DBANKFILE | ||
endif | ||
|
||
# Min. height is output. | ||
ifeq ($(HZMINOUT),ON) | ||
FFLAGS+=-DHZMINOUT | ||
endif | ||
|
||
ifeq ($(DUMP1D),ON) | ||
FFLAGS+=-DDUMP1D | ||
endif | ||
|
||
################################################################################ | ||
### Make rules ### | ||
################################################################################ | ||
$(EXEC): $(OBJS) | ||
$(FC) -o $@ $(FFLAGS) $^ $(LIBS) | ||
|
||
%.o: %.f90 | ||
$(FC) -c $(FFLAGS) $^ | ||
|
||
%.o: %.f | ||
$(FC) -c $(FFLAGS) $^ | ||
|
||
%.o: %.c | ||
$(CC) -c $(CFLAGS) $^ | ||
|
||
clean: | ||
rm -f *.o *.mod *__genmod.f90 $(EXEC) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.