Skip to content

Commit

Permalink
renames parameters (NSTEP_BETWEEN_OUTPUT_INFO -> NTSTEP_BETWEEN_OUTPU…
Browse files Browse the repository at this point in the history
…T_INFO, partitioning_method -> PARTITIONING_TYPE, ngnod -> NGNOD, subsamp_seismos -> NTSTEP_BETWEEN_OUTPUT_SAMPLE, NSTEP_BETWEEN_OUTPUT_SEISMOS -> NTSTEP_BETWEEN_OUTPUT_SEISMOS, NSTEP_BETWEEN_COMPUTE_KERNELS -> NTSTEP_BETWEEN_COMPUTE_KERNELS, NSTEP_BETWEEN_OUTPUT_IMAGES -> NTSTEP_BETWEEN_OUTPUT_IMAGES) for better compatibility between different SPECFEM versions
  • Loading branch information
danielpeter committed Nov 18, 2021
1 parent 1737502 commit 10c2996
Show file tree
Hide file tree
Showing 129 changed files with 5,983 additions and 4,822 deletions.
4 changes: 2 additions & 2 deletions .travis/run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ else
# elastic kernel example Tromp2005_kernel/ w/ NO_BACKWARD_RECONSTRUCTION
if [ "$TESTID" == "26" ]; then
sed -i "s:^NO_BACKWARD_RECONSTRUCTION .*:NO_BACKWARD_RECONSTRUCTION = .true.:" DATA/Par_file
sed -i "s:^NSTEP_BETWEEN_COMPUTE_KERNELS .*:NSTEP_BETWEEN_COMPUTE_KERNELS = 12:" DATA/Par_file
sed -i "s:^NTSTEP_BETWEEN_COMPUTE_KERNELS .*:NTSTEP_BETWEEN_COMPUTE_KERNELS = 12:" DATA/Par_file
fi

# coverage run
Expand Down Expand Up @@ -393,7 +393,7 @@ if [ "$TESTCOV" == "1" ] && [ "$TESTID" == "1" ]; then
cd EXAMPLES/Tromp2005_kernel/
sed -i "s:^NSTEP .*:NSTEP = 500:" DATA/Par_file
sed -i "s:^NO_BACKWARD_RECONSTRUCTION .*:NO_BACKWARD_RECONSTRUCTION = .true.:" DATA/Par_file
sed -i "s:^NSTEP_BETWEEN_COMPUTE_KERNELS .*:NSTEP_BETWEEN_COMPUTE_KERNELS = 12:" DATA/Par_file
sed -i "s:^NTSTEP_BETWEEN_COMPUTE_KERNELS .*:NTSTEP_BETWEEN_COMPUTE_KERNELS = 12:" DATA/Par_file
./run_this_example_kernel.sh
if [[ $? -ne 0 ]]; then exit 1; fi
# no kernel value testing: only execution failure
Expand Down
122 changes: 68 additions & 54 deletions DATA/Par_file
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#-----------------------------------------------------------------------------
#-----------------------------------------------------------
#
# simulation input parameters
# Simulation input parameters
#
#-----------------------------------------------------------------------------
#-----------------------------------------------------------

# title of job
title = Test of SPECFEM2D with curved interfaces
Expand All @@ -18,29 +18,35 @@ SAVE_FORWARD = .false.

# parameters concerning partitioning
NPROC = 1 # number of processes
partitioning_method = 3 # SCOTCH = 3, ascending order (very bad idea) = 1

# number of control nodes per element (4 or 9)
ngnod = 9

# time step parameters
# total number of time steps
NSTEP = 1600

# duration of a time step (see section "How to choose the time step" of the manual for how to do this)
DT = 1.1d-3

# time stepping
# 1 = Newmark (2nd order), 2 = LDDRK4-6 (4th-order 6-stage low storage Runge-Kutta), 3 = classical RK4 4th-order 4-stage Runge-Kutta
time_stepping_scheme = 1

# set the type of calculation (P-SV or SH/membrane waves)
P_SV = .true.

# axisymmetric (2.5D) or Cartesian planar (2D) simulation
AXISYM = .false.

# set the type of calculation (P-SV or SH/membrane waves)
P_SV = .true.
#-----------------------------------------------------------
#
# Mesh
#
#-----------------------------------------------------------

# set to true to use GPUs
GPU_MODE = .false.
# Partitioning algorithm for decompose_mesh
PARTITIONING_TYPE = 3 # SCOTCH = 3, ascending order (very bad idea) = 1

# number of control nodes per element (4 or 9)
NGNOD = 9

# creates/reads a binary database that allows to skip all time consuming setup steps in initialization
# 0 = does not read/create database
Expand All @@ -63,11 +69,11 @@ MODEL = default
SAVE_MODEL = default


#-----------------------------------------------------------------------------
#-----------------------------------------------------------
#
# attenuation
# Attenuation
#
#-----------------------------------------------------------------------------
#-----------------------------------------------------------

# attenuation parameters
ATTENUATION_VISCOELASTIC = .false. # turn attenuation (viscoelasticity) on or off for non-poroelastic solid parts of the model
Expand All @@ -92,14 +98,14 @@ UNDO_ATTENUATION_AND_OR_PML = .false.
NT_DUMP_ATTENUATION = 500

# Instead of reconstructing the forward wavefield, this option reads it from the disk using asynchronous I/O.
# Outperforms conventional mode using a value of NSTEP_BETWEEN_COMPUTE_KERNELS high enough.
# Outperforms conventional mode using a value of NTSTEP_BETWEEN_COMPUTE_KERNELS high enough.
NO_BACKWARD_RECONSTRUCTION = .false.

#-----------------------------------------------------------------------------
#-----------------------------------------------------------
#
# sources
# Sources
#
#-----------------------------------------------------------------------------
#-----------------------------------------------------------

# source parameters
NSOURCES = 1 # number of sources (source information is then read from the DATA/SOURCE file)
Expand Down Expand Up @@ -128,26 +134,28 @@ noise_source_time_function_type = 4
# This is only useful for GPU version (for now)
write_moving_sources_database = .false.

#-----------------------------------------------------------------------------
#-----------------------------------------------------------
#
# receivers
# Receivers
#
#-----------------------------------------------------------------------------
#-----------------------------------------------------------

# receiver set parameters for recording stations (i.e. recording points)
# seismotype : record 1=displ 2=veloc 3=accel 4=pressure 5=curl of displ 6=the fluid potential
seismotype = 1 # several values can be chosen. For example : 1,2,4

# subsampling of the seismograms to create smaller files (but less accurately sampled in time)
subsamp_seismos = 1

# so far, this option can only be used if all the receivers are in acoustic elements
USE_TRICK_FOR_BETTER_PRESSURE = .false.

# interval in time steps for writing of seismograms
# every how many time steps we save the seismograms
# (costly, do not use a very small value; if you use a very large value that is larger than the total number
# of time steps of the run, the seismograms will automatically be saved once at the end of the run anyway)
NSTEP_BETWEEN_OUTPUT_SEISMOS = 1000
NTSTEP_BETWEEN_OUTPUT_SEISMOS = 10000

# set to n to reduce the sampling rate of output seismograms by a factor of n
# defaults to 1, which means no down-sampling
NTSTEP_BETWEEN_OUTPUT_SAMPLE = 1

# so far, this option can only be used if all the receivers are in acoustic elements
USE_TRICK_FOR_BETTER_PRESSURE = .false.

# use this t0 as earliest starting time rather than the automatically calculated one
USER_T0 = 0.0d0
Expand Down Expand Up @@ -185,23 +193,23 @@ zfin = 0. # last receiver z in meters (ig
record_at_surface_same_vertical = .false. # receivers inside the medium or at the surface (z values are ignored if this is set to true, they are replaced with the topography height)


#-----------------------------------------------------------------------------
#-----------------------------------------------------------
#
# adjoint kernel outputs
#
#-----------------------------------------------------------------------------
#-----------------------------------------------------------

# save sensitivity kernels in ASCII format (much bigger files, but compatible with current GMT scripts) or in binary format
save_ASCII_kernels = .true.

# since the accuracy of kernel integration may not need to respect the CFL, this option permits to save computing time, and memory with UNDO_ATTENUATION_AND_OR_PML mode
NSTEP_BETWEEN_COMPUTE_KERNELS = 1
NTSTEP_BETWEEN_COMPUTE_KERNELS = 1

#-----------------------------------------------------------------------------
#-----------------------------------------------------------
#
# boundary conditions
# Boundary conditions
#
#-----------------------------------------------------------------------------
#-----------------------------------------------------------

# Perfectly Matched Layer (PML) boundaries
# absorbing boundary active or not
Expand All @@ -226,12 +234,13 @@ STACEY_ABSORBING_CONDITIONS = .false.
ADD_PERIODIC_CONDITIONS = .false.
PERIODIC_HORIZ_DIST = 4000.d0


#-----------------------------------------------------------------------------
#-----------------------------------------------------------
#
# velocity and density models
# Velocity and density models
#
#-----------------------------------------------------------------------------
#-----------------------------------------------------------

# number of model materials
nbmodels = 4
# available material types (see user manual for more information)
# acoustic: model_number 1 rho Vp 0 0 0 QKappa 9999 0 0 0 0 0 0 (for QKappa use 9999 to ignore it)
Expand Down Expand Up @@ -259,12 +268,11 @@ TOMOGRAPHY_FILE = ./DATA/tomo_file.xyz
# use an external mesh created by an external meshing tool or use the internal mesher
read_external_mesh = .false.


#-----------------------------------------------------------------------------
#-----------------------------------------------------------
#
# PARAMETERS FOR EXTERNAL MESHING
#
#-----------------------------------------------------------------------------
#-----------------------------------------------------------

# data concerning mesh, when generated using third-party app (more info in README)
# (see also absorbing_conditions above)
Expand All @@ -278,11 +286,11 @@ acoustic_forcing_surface_file = ./DATA/MSH/Surf_acforcing_Bottom_enforcing_mes
absorbing_cpml_file = ./DATA/absorbing_cpml_file # file containing the CPML element numbers
tangential_detection_curve_file = ./DATA/courbe_eros_nodes # file containing the curve delimiting the velocity model

#-----------------------------------------------------------------------------
#-----------------------------------------------------------
#
# PARAMETERS FOR INTERNAL MESHING
#
#-----------------------------------------------------------------------------
#-----------------------------------------------------------

# file containing interfaces for internal mesh
interfacesfile = ../EXAMPLES/simple_topography_and_also_a_simple_fluid_layer/DATA/interfaces_simple_topo_curved.dat
Expand All @@ -307,14 +315,15 @@ nbregions = 5 # then set below the different
1 80 41 60 3
60 70 21 40 4

#-----------------------------------------------------------------------------
#-----------------------------------------------------------
#
# display parameters
# Display parameters
#
#-----------------------------------------------------------------------------
#-----------------------------------------------------------

# every how many time steps we display information about the simulation (costly, do not use a very small value)
NSTEP_BETWEEN_OUTPUT_INFO = 100
# interval at which we output time step info and max of norm of displacement
# (every how many time steps we display information about the simulation. costly, do not use a very small value)
NTSTEP_BETWEEN_OUTPUT_INFO = 100

# meshing output
output_grid_Gnuplot = .false. # generate a GNUPLOT file containing the grid, and a script to plot it
Expand All @@ -331,21 +340,21 @@ NTSTEP_BETWEEN_OUTPUT_ENERGY = 10
# the script utils/visualisation/plotIntegratedEnergyFile.py to watch. It is refreshed at the same time than the seismograms
COMPUTE_INTEGRATED_ENERGY_FIELD = .false.

#-----------------------------------------------------------------------------
#-----------------------------------------------------------
#
# movies/images/snaphots
# Movies/images/snaphots visualizations
#
#-----------------------------------------------------------------------------
#-----------------------------------------------------------

# every how many time steps we draw JPEG or PostScript pictures of the simulation
# and/or we dump results of the simulation as ASCII or binary files (costly, do not use a very small value)
NSTEP_BETWEEN_OUTPUT_IMAGES = 100
NTSTEP_BETWEEN_OUTPUT_IMAGES = 100

# minimum amplitude kept in % for the JPEG and PostScript snapshots; amplitudes below that are muted
cutsnaps = 1.

#### for JPEG color images ####
output_color_image = .true. # output JPEG color image of the results every NSTEP_BETWEEN_OUTPUT_IMAGES time steps or not
output_color_image = .true. # output JPEG color image of the results every NTSTEP_BETWEEN_OUTPUT_IMAGES time steps or not
imagetype_JPEG = 2 # display 1=displ_Ux 2=displ_Uz 3=displ_norm 4=veloc_Vx 5=veloc_Vz 6=veloc_norm 7=accel_Ax 8=accel_Az 9=accel_norm 10=pressure
factor_subsample_image = 1.0d0 # (double precision) factor to subsample or oversample (if set to e.g. 0.5) color images output by the code (useful for very large models, or to get nicer looking denser pictures)
USE_CONSTANT_MAX_AMPLITUDE = .false. # by default the code normalizes each image independently to its maximum; use this option to use the global maximum below instead
Expand All @@ -356,7 +365,7 @@ DRAW_WATER_IN_BLUE = .true. # display acoustic layers as co
USE_SNAPSHOT_NUMBER_IN_FILENAME = .false. # use snapshot number in the file name of JPEG color snapshots instead of the time step (for instance to create movies in an easier way later)

#### for PostScript snapshots ####
output_postscript_snapshot = .true. # output Postscript snapshot of the results every NSTEP_BETWEEN_OUTPUT_IMAGES time steps or not
output_postscript_snapshot = .true. # output Postscript snapshot of the results every NTSTEP_BETWEEN_OUTPUT_IMAGES time steps or not
imagetype_postscript = 1 # display 1=displ vector 2=veloc vector 3=accel vector; small arrows are displayed for the vectors
meshvect = .true. # display mesh on PostScript plots or not
modelvect = .false. # display velocity model on PostScript plots or not
Expand Down Expand Up @@ -420,3 +429,8 @@ NUMBER_OF_SIMULTANEOUS_RUNS = 1
# and the code will broadcast it to the others)
BROADCAST_SAME_MESH_AND_MODEL = .true.

#-----------------------------------------------------------

# set to true to use GPUs
GPU_MODE = .false.

Loading

0 comments on commit 10c2996

Please sign in to comment.