Skip to content

Commit

Permalink
release of JAGURS-D_V0513(src)
Browse files Browse the repository at this point in the history
  • Loading branch information
jagurs-admin authored Oct 25, 2019
1 parent 16df0fc commit f9c9eb7
Show file tree
Hide file tree
Showing 21 changed files with 2,430 additions and 3 deletions.
577 changes: 577 additions & 0 deletions src/HISTORY

Large diffs are not rendered by default.

289 changes: 286 additions & 3 deletions src/JAGURS.f90

Large diffs are not rendered by default.

272 changes: 272 additions & 0 deletions src/Makefile.Aurora
Original file line number Diff line number Diff line change
@@ -0,0 +1,272 @@
# FC: Specify Fortran90 compiler command.
FC=mpinfort

# Added for displacement.
# PRJ4_DIR: Specify PROJ.4 install directory.
# CC&CFLAGS: Specify C compiler command and flags.
PROJ4_DIR=$(HOME)/aurora/local
CC=ncc
CFLAGS=-g -traceback -I$(PROJ4_DIR)/include

# BASE: Specify basic compiler options.
BASE=-fpp #-ftrace

# FFTW3_INCLUDE_DIR: Specify FFTW3 include directory.
FFTW3_INCLUDE_DIR=/opt/nec/ve/nlc/1.0.0/include

# FFTW3_LIB: Specify linker options to link FFTW3.
FFTW3_LIB=-L/opt/nec/ve/nlc/1.0.0/lib -laslfftw3 -lasl_sequential

# OPT: Specify compiler options about optimization level.
OPT=-O2 -fopenmp -report-all -fdiag-vector=2 -I$(FFTW3_INCLUDE_DIR) #-mno-vector-fma
OPT=-O2 -report-all -fdiag-vector=2 -I$(FFTW3_INCLUDE_DIR) #-mno-vector-fma

# NETCDF: Specify the path to NetCDF library.
NETCDF=$(HOME)/aurora/local

# LIBS: Specify linker options.
LIBS=-Bstatic -L$(NETCDF)/lib -lnetcdff -lnetcdf -lhdf5_hl -lhdf5 -lsz -lz -L$(PROJ4_DIR)/lib -lproj $(FFTW3_LIB)

# 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

# PIXELIN=ON: Format of input files is changed into pixel format.
#PIXELIN=ON
# PIXELOUT=ON: Format of output files is changed into pixel format.
#PIXELOUT=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
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)
FFLAGS+=-DMULTI
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

ifeq ($(PIXELIN),ON)
FFLAGS+=-DPIXELIN
endif
ifeq ($(PIXELOUT),ON)
FFLAGS+=-DPIXELOUT
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 *.L $(EXEC)
12 changes: 12 additions & 0 deletions src/Makefile.DA
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,11 @@ ONEFILE=ON
# HZMINOUT=ON: Min. height is output.
#HZMINOUT=ON

# PIXELIN=ON: Format of input files is changed into pixel format.
#PIXELIN=ON
# PIXELOUT=ON: Format of output files is changed into pixel format.
#PIXELOUT=ON

#DUMP1D=ON

################################################################################
Expand Down Expand Up @@ -242,6 +247,13 @@ ifeq ($(DUMP1D),ON)
FFLAGS+=-DDUMP1D
endif

ifeq ($(PIXELIN),ON)
FFLAGS+=-DPIXELIN
endif
ifeq ($(PIXELOUT),ON)
FFLAGS+=-DPIXELOUT
endif

################################################################################
### Make rules ###
################################################################################
Expand Down
12 changes: 12 additions & 0 deletions src/Makefile.K
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,11 @@ ONEFILE=ON
# HZMINOUT=ON: Min. height is output.
#HZMINOUT=ON

# PIXELIN=ON: Format of input files is changed into pixel format.
#PIXELIN=ON
# PIXELOUT=ON: Format of output files is changed into pixel format.
#PIXELOUT=ON

#DUMP1D=ON

################################################################################
Expand Down Expand Up @@ -241,6 +246,13 @@ ifeq ($(DUMP1D),ON)
FFLAGS+=-DDUMP1D
endif

ifeq ($(PIXELIN),ON)
FFLAGS+=-DPIXELIN
endif
ifeq ($(PIXELOUT),ON)
FFLAGS+=-DPIXELOUT
endif

################################################################################
### Make rules ###
################################################################################
Expand Down
12 changes: 12 additions & 0 deletions src/Makefile.NEC
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,11 @@ ONEFILE=ON
# HZMINOUT=ON: Min. height is output.
#HZMINOUT=ON

# PIXELIN=ON: Format of input files is changed into pixel format.
#PIXELIN=ON
# PIXELOUT=ON: Format of output files is changed into pixel format.
#PIXELOUT=ON

#DUMP1D=ON

################################################################################
Expand Down Expand Up @@ -242,6 +247,13 @@ ifeq ($(DUMP1D),ON)
FFLAGS+=-DDUMP1D
endif

ifeq ($(PIXELIN),ON)
FFLAGS+=-DPIXELIN
endif
ifeq ($(PIXELOUT),ON)
FFLAGS+=-DPIXELOUT
endif

################################################################################
### Make rules ###
################################################################################
Expand Down
12 changes: 12 additions & 0 deletions src/Makefile.SC_ICE
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,11 @@ ONEFILE=ON
# HZMINOUT=ON: Min. height is output.
#HZMINOUT=ON

# PIXELIN=ON: Format of input files is changed into pixel format.
#PIXELIN=ON
# PIXELOUT=ON: Format of output files is changed into pixel format.
#PIXELOUT=ON

#DUMP1D=ON

################################################################################
Expand Down Expand Up @@ -248,6 +253,13 @@ ifeq ($(DUMP1D),ON)
FFLAGS+=-DDUMP1D
endif

ifeq ($(PIXELIN),ON)
FFLAGS+=-DPIXELIN
endif
ifeq ($(PIXELOUT),ON)
FFLAGS+=-DPIXELOUT
endif

################################################################################
### Make rules ###
################################################################################
Expand Down
Loading

0 comments on commit f9c9eb7

Please sign in to comment.