#-----------------------------------------------------------
#
# Simulation input parameters
#
#-----------------------------------------------------------

# title of job
title                           = Marmousi2 simulation

# parameters concerning partitioning
NPROC                           = 1              # number of processes

# Output folder
OUTPUT_FILES                    = OUTPUT_FILES

#-----------------------------------------------------------
#
# Mesh
#
#-----------------------------------------------------------

# 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                           = 4

# location to store the mesh
database_filename               = OUTPUT_FILES/database.bin

# available models
#   default       - define model using nbmodels below
#   ascii         - read model from ascii database file
#   binary        - read model from binary databse file
#   binary_voigt  - read Voigt model from binary database file
#   external      - define model using define_external_model subroutine
#   gll           - read GLL model from binary database file
#   legacy        - read model from model_velocity.dat_input
MODEL                           = default

# Output the model with the requested type, does not save if turn to default or .false.
# (available output formats: ascii,binary,gll,legacy)
SAVE_MODEL                      = default



#-----------------------------------------------------------
#
# Receivers
#
#-----------------------------------------------------------

# use an existing STATION file found in ./DATA or create a new one from the receiver positions below in this Par_file
use_existing_STATIONS           = .false.

# number of receiver sets (i.e. number of receiver lines to create below)
nreceiversets                   = 1

# orientation
anglerec                        = 0.d0           # angle to rotate components at receivers
rec_normal_to_surface           = .false.        # base anglerec normal to surface (external mesh and curve file needed)

# first receiver set (repeat these 6 lines and adjust nreceiversets accordingly)
nrec                            = 11             # number of receivers
xdeb                            = 1000.          # first receiver x in meters
zdeb                            = 3450.          # first receiver z in meters
xfin                            = 11000.         # last receiver x in meters (ignored if only one receiver)
zfin                            = 3450.          # last receiver z in meters (ignored if only one receiver)
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)


# Stationsfilename
stations_filename               = STATIONS       # file containing the receivers positions and orientations (if not using an existing STATION file)


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

# Stacey ABC
STACEY_ABSORBING_CONDITIONS     = .true.

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


# material properties
# number of model materials
nbmodels                        = 1
# 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)
#   elastic:               model_number 1 rho Vp Vs 0 0 QKappa Qmu  0 0 0 0 0 0 (for QKappa and Qmu use 9999 to ignore them)
#   anisotropic:           model_number 2 rho c11 c13 c15 c33 c35 c55 c12 c23 c25   0 QKappa Qmu
#   anisotropic in AXISYM: model_number 2 rho c11 c13 c15 c33 c35 c55 c12 c23 c25 c22 QKappa Qmu
#   poroelastic:           model_number 3 rhos rhof phi c kxx kxz kzz Ks Kf Kfr etaf mufr Qmu
#   electromagnetic:       model_number 4 mu0 e0 e11(e0) e33(e0) sig11 sig33 Qe11 Qe33 Qs11 Qs33 0 0 0
#   tomo:                  model_number -1 0 0 A 0 0 0 0 0 0 0 0 0 0
#
# note: When viscoelasticity or viscoacousticity is turned on,
#       the Vp and Vs values that are read here are the UNRELAXED ones i.e. the values at infinite frequency
#       unless the READ_VELOCITIES_AT_f0 parameter above is set to true, in which case they are the values at frequency f0.
#
#       Please also note that Qmu is always equal to Qs, but Qkappa is in general not equal to Qp.
#       To convert one to the other see doc/Qkappa_Qmu_versus_Qp_Qs_relationship_in_2D_plane_strain.pdf and
#       utils/attenuation/conversion_from_Qkappa_Qmu_to_Qp_Qs_from_Dahlen_Tromp_959_960.f90.
#
1 1 2700.d0 3000.d0 1732.051d0 0.2 0 9999 9999 0 0 0 0 0 0


# external tomography file
# (used for tomography materials with negative material ids and/or MODEL==tomo settings)
TOMOGRAPHY_FILE                 = dummy

# use an external mesh created by an external meshing tool or use the internal mesher
read_external_mesh              = .true.

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

# data concerning mesh, when generated using third-party app (more info in README)
# (see also absorbing_conditions above)
mesh_file                       = MESH-default/mesh_file                # file containing the mesh
nodes_coords_file               = MESH-default/nodes_coords_file        # file containing the nodes coordinates
materials_file                  = MESH-default/materials_file           # file containing the material number for each element
nummaterial_velocity_file       = MESH-default/nummaterial_velocity_file_marmousi2   # file containing the material properties for each material
free_surface_file               = MESH-default/free_surface_file        # file containing the free surface
axial_elements_file             = dummy                                   # file containing the axial elements if AXISYM is true
absorbing_surface_file          = MESH-default/absorbing_surface_file   # file containing the absorbing surface
acoustic_forcing_surface_file   = dummy                                   # file containing the acoustic forcing surface
absorbing_cpml_file             = dummy                                   # file containing the CPML element numbers
tangential_detection_curve_file = dummy                                   # file containing the curve delimiting the velocity model

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


# file containing interfaces for internal mesh
interfacesfile                  = dummy

# geometry of the model (origin lower-left corner = 0,0) and mesh description
xmin                            = 0.d0           # abscissa of left side of the model
xmax                            = 0.d0           # abscissa of right side of the model
nx                              = 0              # number of elements along X

# absorbing boundary parameters (see absorbing_conditions above)
absorbbottom                    = .true.
absorbright                     = .true.
absorbtop                       = .false.
absorbleft                      = .true.


# define the different regions of the model in the (nx,nz) spectral-element mesh
nbregions                       = 1              # then set below the different regions and model number for each region
# format of each line: nxmin nxmax nzmin nzmax material_number
1 0  1 0 1

#-----------------------------------------------------------
#
# Display parameters
#
#-----------------------------------------------------------
# meshing output
output_grid_Gnuplot             = .false.        # generate a GNUPLOT file containing the grid, and a script to plot it
output_grid_ASCII               = .false.        # dump the grid in an ASCII text file consisting of a set of X,Y,Z points or not
