Commit c56120d8 authored by laura.gassner's avatar laura.gassner

Changed naming convention of individual spatial tapers for gradients, updated...

Changed naming convention of individual spatial tapers for gradients, updated to usage with WORKFLOW
parent 4a288b60
...@@ -439,7 +439,7 @@ INV_VP_ITER=0 ...@@ -439,7 +439,7 @@ INV_VP_ITER=0
INV_VS_ITER=0 INV_VS_ITER=0
\end{verbatim}}} \end{verbatim}}}
This section covers some general inversion parameters. The maximum number of iterations is defined by ITERMAX. The switch FORWARD\_ONLY controls if only the forward modeling code should be used (FORWARD\_ONLY=1), e.\,g. to calculate synthetic seismograms or a complete FWT run (FORWARD\_ONLY=0). The seismic sections of the real data need to be located in DATA\_DIR and should have the ending \_x.su.shot<shotnumber> for the x-component and so on. As noted in section \ref{model parametrizations} the gradients can be expressed for different model parameterizations. The switch PARAMETERIZATION defines which parameterization should be used, seismic velocities and density (Vp,Vs,rho, PARAMETERIZATION=1), seismic impedances (Zp,Zs,rho, PARAMETERIZATION=2) or Lam$\rm{\acute{e}}$ parameters ($\rm{\lambda,\mu,\rho}$, PARAMETERIZATION=3). Please use PARAMETERIZATION>1 with care, as current developers are only working with PARAMETERIZATION=1. This section covers some general inversion parameters. The maximum number of iterations is defined by ITERMAX. The switch FORWARD\_ONLY controls if only the forward modeling code should be used (FORWARD\_ONLY=1), e.\,g. to calculate synthetic seismograms or a complete FWT run (FORWARD\_ONLY=0). The seismic sections of the real data need to be located in DATA\_DIR and should have the ending \_vx.su.shot<shotnumber> for the x-component and so on. As noted in section \ref{model parametrizations} the gradients can be expressed for different model parameterizations. The switch PARAMETERIZATION defines which parameterization should be used, seismic velocities and density (Vp,Vs,rho, PARAMETERIZATION=1), seismic impedances (Zp,Zs,rho, PARAMETERIZATION=2) or Lam$\rm{\acute{e}}$ parameters ($\rm{\lambda,\mu,\rho}$, PARAMETERIZATION=3). Please use PARAMETERIZATION>1 with care, as current developers are only working with PARAMETERIZATION=1.
If models are read from binary files appropriate file extensions are required for the different models (see section \ref{gen_of_mod}). Depending on the data different components of the seismic sections can be back propagated. For two component data (x- and y-component) set ADJOINT\_TYPE=1, only the y-component (ADJOINT\_TYPE=2) and only the x-component (ADJOINT\_TYPE=3). For the inversion of pressure seismograms ADJOINT\_TYPE=4 has to be used. If models are read from binary files appropriate file extensions are required for the different models (see section \ref{gen_of_mod}). Depending on the data different components of the seismic sections can be back propagated. For two component data (x- and y-component) set ADJOINT\_TYPE=1, only the y-component (ADJOINT\_TYPE=2) and only the x-component (ADJOINT\_TYPE=3). For the inversion of pressure seismograms ADJOINT\_TYPE=4 has to be used.
...@@ -768,9 +768,7 @@ Moreover, you can directly define a offset range that should be killed. Simply s ...@@ -768,9 +768,7 @@ Moreover, you can directly define a offset range that should be killed. Simply s
"FILTSIZE" : "1", "FILTSIZE" : "1",
"SWS_TAPER_FILE" : "0", "SWS_TAPER_FILE" : "0",
"SWS_TAPER_FILE_PER_SHOT" : "0", "SWS_TAPER_FILE_PER_SHOT" : "0",
"TAPER_FILE_NAME" : "taper.bin", "TAPER_FILE_NAME" : "taper",
"TAPER_FILE_NAME_U" : "taper_u.bin",
"TAPER_FILE_NAME_RHO" : "taper_rho.bin",
\end{verbatim}}} \end{verbatim}}}
{\color{red}{\begin{verbatim} {\color{red}{\begin{verbatim}
...@@ -785,9 +783,11 @@ SWS_TAPER_FILE_PER_SHOT=0 ...@@ -785,9 +783,11 @@ SWS_TAPER_FILE_PER_SHOT=0
Different preconditioning matrices can be created and applied to the gradients (using the function \texttt{taper\_grad.c}). To apply a vertical taper one has to set the switch SWS\_TAPER\_GRAD\_VERT to one and for a horizontaltaper SWS\_TAPER\_GRAD\_HOR has to be 1. The parameters for the vertical and the horizontal window are defined by the input file paramters GRADT1, GRADT2, GRADT3 and GRADT4. Please have a look at the function \texttt{taper\_grad.c} directly to obtain more information about the actual definition of the tapers. It is also possible to apply cylindrical tapers around the source positions. This can be done by either setting the switch SWS\_TAPER\_GRAD\_SOURCES or SWS\_TAPER\_CIRCULAR\_PER\_SHOT to 1. If one uses SWS\_TAPER\_GRAD\_SOURCES=1 only the final gradients (that means the gradients obtained by the summation of the gradients of each shots) are multiplied with a taper that decreases the gradients at all shot positions. Therefore, one looses the update information at the source positions. To avoid this one can use SWS\_TAPER\_CIRCULAR\_PER\_SHOT=1. In this case the gradients of the single shots are preconditioned with a window that only decreases at the current shot position. This is done before the summation of all gradients to keep model update information also at the shot positions. The actual tapers are generated by the function \texttt{taper\_grad.c} and \texttt{taper\_grad\_shot.c}, respectively. The circular taper around the source positions decrease from a value of one at the edge of the taper to a value of zero at the source position. The shape of the decrease can be defined by an error function (SRTSHAPE=1) or a log-function (SRTSHAPE=2). The radius of the taper is defined in meter by SRTRADIUS. Note, that this radius must be at least 5 gridpoints. With the parameter FILTSIZE one can extend the region where the taper is zero around the source. The taper is set to zero in a square region of (2*FILTSIZE+1 times 2*FILTSIZE+1) gridpoints. All preconditioning matrices that are applied are saved in the par directory with the file names taper\_coeff\_vert.bin, taper\_coeff\_horz.bin and taper\_coeff\_sources.bin.\\ Different preconditioning matrices can be created and applied to the gradients (using the function \texttt{taper\_grad.c}). To apply a vertical taper one has to set the switch SWS\_TAPER\_GRAD\_VERT to one and for a horizontaltaper SWS\_TAPER\_GRAD\_HOR has to be 1. The parameters for the vertical and the horizontal window are defined by the input file paramters GRADT1, GRADT2, GRADT3 and GRADT4. Please have a look at the function \texttt{taper\_grad.c} directly to obtain more information about the actual definition of the tapers. It is also possible to apply cylindrical tapers around the source positions. This can be done by either setting the switch SWS\_TAPER\_GRAD\_SOURCES or SWS\_TAPER\_CIRCULAR\_PER\_SHOT to 1. If one uses SWS\_TAPER\_GRAD\_SOURCES=1 only the final gradients (that means the gradients obtained by the summation of the gradients of each shots) are multiplied with a taper that decreases the gradients at all shot positions. Therefore, one looses the update information at the source positions. To avoid this one can use SWS\_TAPER\_CIRCULAR\_PER\_SHOT=1. In this case the gradients of the single shots are preconditioned with a window that only decreases at the current shot position. This is done before the summation of all gradients to keep model update information also at the shot positions. The actual tapers are generated by the function \texttt{taper\_grad.c} and \texttt{taper\_grad\_shot.c}, respectively. The circular taper around the source positions decrease from a value of one at the edge of the taper to a value of zero at the source position. The shape of the decrease can be defined by an error function (SRTSHAPE=1) or a log-function (SRTSHAPE=2). The radius of the taper is defined in meter by SRTRADIUS. Note, that this radius must be at least 5 gridpoints. With the parameter FILTSIZE one can extend the region where the taper is zero around the source. The taper is set to zero in a square region of (2*FILTSIZE+1 times 2*FILTSIZE+1) gridpoints. All preconditioning matrices that are applied are saved in the par directory with the file names taper\_coeff\_vert.bin, taper\_coeff\_horz.bin and taper\_coeff\_sources.bin.\\
To apply an externally defined taper on the gradients in IFOS2D, the parameter SWS\_TAPER\_FILE has to be set to 1. Each model parameter requires a taper file which needs to be located in TAPER\_FILE\_NAME for vp, in TAPER\_FILE\_NAME\_U for vs and in TAPER\_FILE\_NAME\_RHO for the density.\\ To apply an externally defined taper on the gradients in IFOS2D, the parameter SWS\_TAPER\_FILE has to be set to 1. Each model parameter requires a taper file which needs to be located in TAPER\_FILE\_NAME.vp for vp, in TAPER\_FILE\_NAME.vs for vs and in TAPER\_FILE\_NAME.rho for the density.\\
It is also possible to apply externally defined taper files to the gradients of the single shots before summation of these gradients. This can be done by setting SWS\_TAPER\_FILE\_PER\_SHOT to one. IFOS2D expects the tapers in TAPER\_FILE\_NAME.shot<shotnumber> for the vp gradients, in TAPER\_FILE\_NAME\_U.shot<shotnumber> for the vs gradients and in TAPER\_FILE\_NAME\_RHO.shot<shotnumber> for the density gradients. It is also possible to apply externally defined taper files to the gradients of the single shots before summation of these gradients. This can be done by setting SWS\_TAPER\_FILE\_PER\_SHOT to one. IFOS2D expects the tapers in TAPER\_FILE\_NAME.shot<shotnumber>.vp for the vp gradients, in TAPER\_FILE\_NAME.shot<shotnumber>.vs for the vs gradients and in TAPER\_FILE\_NAME.shot<shotnumber>.rho for the density gradients.\\
If you use the option "Workflow" (section \ref{sec:workflow}) it is possible to define separate files for each workflow stage. They have to be named TAPER\_FILE\_NAME(.shot<shotnumber>)\_<workflowstage>.vp etc. If you don't provide separate files for some or all stages the standard file (TAPER\_FILE\_NAME(.shot<shotnumber>).vp etc.) is used. This means a standard file should exist in any case.
\subsection{Spatial filtering of the gradients} \subsection{Spatial filtering of the gradients}
{\color{blue}{\begin{verbatim} {\color{blue}{\begin{verbatim}
......
/*----------------------------------------------------------------------------------------- /*-----------------------------------------------------------------------------------------
* Copyright (C) 2005 <name of author> * Copyright (C) 2016 For the list of authors, see file AUTHORS.
* *
* This file is part of DENISE. * This file is part of IFOS.
* *
* DENISE is free software: you can redistribute it and/or modify * IFOS is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation, version 2.0 of the License only. * the Free Software Foundation, version 2.0 of the License only.
* *
* DENISE is distributed in the hope that it will be useful, * IFOS is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with DENISE. See file COPYING and/or <http://www.gnu.org/licenses/gpl-2.0.html>. * along with IFOS. See file COPYING and/or <http://www.gnu.org/licenses/gpl-2.0.html>.
-----------------------------------------------------------------------------------------*/ -----------------------------------------------------------------------------------------*/
/* $Id: hh_el.c,v 2.3 2007/08/21 13:16:19 tbohlen Exp $*/ /*------------------------------------------------------------------------
/*
* Model defined by flnode file. * Model defined by flnode file.
*/ ------------------------------------------------------------------------*/
#include "fd.h" #include "fd.h"
#include "../src/fd.h" #include "../src/fd.h"
...@@ -31,7 +30,7 @@ void model_acoustic(float **rho, float **pi){ ...@@ -31,7 +30,7 @@ void model_acoustic(float **rho, float **pi){
extern float DH, DT; extern float DH, DT;
extern char MFILE[STRING_SIZE]; extern char MFILE[STRING_SIZE];
extern char INV_MODELFILE[STRING_SIZE]; extern char INV_MODELFILE[STRING_SIZE];
extern char TAPER_FILE_NAME[STRING_SIZE], TAPER_FILE_NAME_RHO[STRING_SIZE]; extern char TAPER_FILE_NAME[STRING_SIZE];
extern int SWS_TAPER_FILE; extern int SWS_TAPER_FILE;
/* local variables */ /* local variables */
...@@ -261,7 +260,7 @@ void model_acoustic(float **rho, float **pi){ ...@@ -261,7 +260,7 @@ void model_acoustic(float **rho, float **pi){
free_vector(flvp,1,nodes); free_vector(flvp,1,nodes);
sprintf(modfile,"%s_rho_it0.bin",INV_MODELFILE); sprintf(modfile,"%s_rho_it0.bin",INV_MODELFILE);
writemod(modfile,rho,3); writemod(modfile,rho,3);
MPI_Barrier(MPI_COMM_WORLD); MPI_Barrier(MPI_COMM_WORLD);
if (MYID==0) mergemod(modfile,3); if (MYID==0) mergemod(modfile,3);
...@@ -278,20 +277,20 @@ void model_acoustic(float **rho, float **pi){ ...@@ -278,20 +277,20 @@ void model_acoustic(float **rho, float **pi){
remove(modfile); remove(modfile);
if(SWS_TAPER_FILE){ if(SWS_TAPER_FILE){
sprintf(modfile,"%s",TAPER_FILE_NAME); sprintf(modfile,"%s.vp",TAPER_FILE_NAME);
writemod(modfile,taper,3); writemod(modfile,taper,3);
MPI_Barrier(MPI_COMM_WORLD); MPI_Barrier(MPI_COMM_WORLD);
if (MYID==0) mergemod(modfile,3); if (MYID==0) mergemod(modfile,3);
MPI_Barrier(MPI_COMM_WORLD); MPI_Barrier(MPI_COMM_WORLD);
sprintf(modfile,"%s.%i%i",TAPER_FILE_NAME,POS[1],POS[2]); sprintf(modfile,"%s.vp.%i%i",TAPER_FILE_NAME,POS[1],POS[2]);
remove(modfile); remove(modfile);
sprintf(modfile,"%s",TAPER_FILE_NAME_RHO); sprintf(modfile,"%s.rho",TAPER_FILE_NAME);
writemod(modfile,taper,3); writemod(modfile,taper,3);
MPI_Barrier(MPI_COMM_WORLD); MPI_Barrier(MPI_COMM_WORLD);
if (MYID==0) mergemod(modfile,3); if (MYID==0) mergemod(modfile,3);
MPI_Barrier(MPI_COMM_WORLD); MPI_Barrier(MPI_COMM_WORLD);
sprintf(modfile,"%s.%i%i",TAPER_FILE_NAME_RHO,POS[1],POS[2]); sprintf(modfile,"%s.rho.%i%i",TAPER_FILE_NAME,POS[1],POS[2]);
remove(modfile); remove(modfile);
} }
......
...@@ -201,9 +201,7 @@ ...@@ -201,9 +201,7 @@
"FILTSIZE" : "1", "FILTSIZE" : "1",
"SWS_TAPER_FILE" : "0", "SWS_TAPER_FILE" : "0",
"SWS_TAPER_FILE_PER_SHOT" : "0", "SWS_TAPER_FILE_PER_SHOT" : "0",
"TAPER_FILE_NAME" : "taper.bin", "TAPER_FILE_NAME" : "taper",
"TAPER_FILE_NAME_U" : "taper_u.bin",
"TAPER_FILE_NAME_RHO" : "taper_rho.bin",
"Definition of spatial filtering of the gradients" : "comment", "Definition of spatial filtering of the gradients" : "comment",
"SPATFILTER" : "0", "SPATFILTER" : "0",
......
...@@ -171,9 +171,7 @@ ...@@ -171,9 +171,7 @@
"SRTRADIUS" : "3.0", "SRTRADIUS" : "3.0",
"FILTSIZE" : "1", "FILTSIZE" : "1",
"SWS_TAPER_FILE" : "1", "SWS_TAPER_FILE" : "1",
"TAPER_FILE_NAME" : "taper_te_ac.bin", "TAPER_FILE_NAME" : "taper_te_ac",
"TAPER_FILE_NAME_U" : "taper_te_ac_u.bin",
"TAPER_FILE_NAME_RHO" : "taper_te_ac_rho.bin",
"Upper and lower limits for model parameters" : "comment", "Upper and lower limits for model parameters" : "comment",
"VPUPPERLIM" : "5000", "VPUPPERLIM" : "5000",
......
...@@ -16,11 +16,8 @@ ...@@ -16,11 +16,8 @@
* along with IFOS. See file COPYING and/or <http://www.gnu.org/licenses/gpl-2.0.html>. * along with IFOS. See file COPYING and/or <http://www.gnu.org/licenses/gpl-2.0.html>.
-----------------------------------------------------------------------------------------*/ -----------------------------------------------------------------------------------------*/
/**/
/*------------------------------------------------------------------------ /*------------------------------------------------------------------------
* Exchange FD-Parameters between PEs * Exchange FD-Parameters between PEs
* last update 29/06/2002
*
* ----------------------------------------------------------------------*/ * ----------------------------------------------------------------------*/
#include "fd.h" #include "fd.h"
...@@ -52,7 +49,7 @@ void exchange_par(void){ ...@@ -52,7 +49,7 @@ void exchange_par(void){
extern int SWS_TAPER_GRAD_VERT, SWS_TAPER_GRAD_HOR, SWS_TAPER_GRAD_SOURCES, SWS_TAPER_CIRCULAR_PER_SHOT, SRTSHAPE, FILTSIZE; extern int SWS_TAPER_GRAD_VERT, SWS_TAPER_GRAD_HOR, SWS_TAPER_GRAD_SOURCES, SWS_TAPER_CIRCULAR_PER_SHOT, SRTSHAPE, FILTSIZE;
extern int SWS_TAPER_FILE, SWS_TAPER_FILE_PER_SHOT; extern int SWS_TAPER_FILE, SWS_TAPER_FILE_PER_SHOT;
extern float SRTRADIUS; extern float SRTRADIUS;
extern char TAPER_FILE_NAME[STRING_SIZE], TAPER_FILE_NAME_U[STRING_SIZE], TAPER_FILE_NAME_RHO[STRING_SIZE]; extern char TAPER_FILE_NAME[STRING_SIZE];
extern int SPATFILTER, SPAT_FILT_SIZE, SPAT_FILT_1, SPAT_FILT_ITER; extern int SPATFILTER, SPAT_FILT_SIZE, SPAT_FILT_1, SPAT_FILT_ITER;
extern int INV_RHO_ITER, INV_VP_ITER, INV_VS_ITER; extern int INV_RHO_ITER, INV_VP_ITER, INV_VS_ITER;
extern int MIN_ITER; extern int MIN_ITER;
...@@ -409,8 +406,6 @@ void exchange_par(void){ ...@@ -409,8 +406,6 @@ void exchange_par(void){
MPI_Bcast(&PICKS_FILE,STRING_SIZE,MPI_CHAR,0,MPI_COMM_WORLD); MPI_Bcast(&PICKS_FILE,STRING_SIZE,MPI_CHAR,0,MPI_COMM_WORLD);
MPI_Bcast(&TAPER_FILE_NAME,STRING_SIZE,MPI_CHAR,0,MPI_COMM_WORLD); MPI_Bcast(&TAPER_FILE_NAME,STRING_SIZE,MPI_CHAR,0,MPI_COMM_WORLD);
MPI_Bcast(&TAPER_FILE_NAME_U,STRING_SIZE,MPI_CHAR,0,MPI_COMM_WORLD);
MPI_Bcast(&TAPER_FILE_NAME_RHO,STRING_SIZE,MPI_CHAR,0,MPI_COMM_WORLD);
MPI_Barrier(MPI_COMM_WORLD); MPI_Barrier(MPI_COMM_WORLD);
......
...@@ -51,7 +51,7 @@ int TESTSHOT_START, TESTSHOT_END, TESTSHOT_INCR, NO_OF_TESTSHOTS; ...@@ -51,7 +51,7 @@ int TESTSHOT_START, TESTSHOT_END, TESTSHOT_INCR, NO_OF_TESTSHOTS;
int SWS_TAPER_GRAD_VERT, SWS_TAPER_GRAD_HOR, SWS_TAPER_GRAD_SOURCES, SWS_TAPER_CIRCULAR_PER_SHOT, SRTSHAPE, FILTSIZE; int SWS_TAPER_GRAD_VERT, SWS_TAPER_GRAD_HOR, SWS_TAPER_GRAD_SOURCES, SWS_TAPER_CIRCULAR_PER_SHOT, SRTSHAPE, FILTSIZE;
int SWS_TAPER_FILE, SWS_TAPER_FILE_PER_SHOT; int SWS_TAPER_FILE, SWS_TAPER_FILE_PER_SHOT;
float SRTRADIUS; float SRTRADIUS;
char TAPER_FILE_NAME[STRING_SIZE], TAPER_FILE_NAME_U[STRING_SIZE], TAPER_FILE_NAME_RHO[STRING_SIZE]; char TAPER_FILE_NAME[STRING_SIZE];
int SPATFILTER, SPAT_FILT_SIZE, SPAT_FILT_1, SPAT_FILT_ITER; int SPATFILTER, SPAT_FILT_SIZE, SPAT_FILT_1, SPAT_FILT_ITER;
......
...@@ -51,7 +51,7 @@ void read_par_json(FILE *fp, char *fileinp){ ...@@ -51,7 +51,7 @@ void read_par_json(FILE *fp, char *fileinp){
extern int SWS_TAPER_GRAD_VERT, SWS_TAPER_GRAD_HOR, SWS_TAPER_GRAD_SOURCES, SWS_TAPER_CIRCULAR_PER_SHOT, SRTSHAPE, FILTSIZE; extern int SWS_TAPER_GRAD_VERT, SWS_TAPER_GRAD_HOR, SWS_TAPER_GRAD_SOURCES, SWS_TAPER_CIRCULAR_PER_SHOT, SRTSHAPE, FILTSIZE;
extern int SWS_TAPER_FILE, SWS_TAPER_FILE_PER_SHOT; extern int SWS_TAPER_FILE, SWS_TAPER_FILE_PER_SHOT;
extern float SRTRADIUS; extern float SRTRADIUS;
extern char TAPER_FILE_NAME[STRING_SIZE], TAPER_FILE_NAME_U[STRING_SIZE], TAPER_FILE_NAME_RHO[STRING_SIZE]; extern char TAPER_FILE_NAME[STRING_SIZE];
extern int SPATFILTER, SPAT_FILT_SIZE, SPAT_FILT_1, SPAT_FILT_ITER; extern int SPATFILTER, SPAT_FILT_SIZE, SPAT_FILT_1, SPAT_FILT_ITER;
extern int INV_RHO_ITER, INV_VS_ITER, INV_VP_ITER; extern int INV_RHO_ITER, INV_VS_ITER, INV_VP_ITER;
extern char INV_MODELFILE[STRING_SIZE]; extern char INV_MODELFILE[STRING_SIZE];
...@@ -563,26 +563,20 @@ void read_par_json(FILE *fp, char *fileinp){ ...@@ -563,26 +563,20 @@ void read_par_json(FILE *fp, char *fileinp){
} }
if (get_int_from_objectlist("SWS_TAPER_FILE",number_readobjects,&SWS_TAPER_FILE,varname_list, value_list)){ if (get_int_from_objectlist("SWS_TAPER_FILE",number_readobjects,&SWS_TAPER_FILE,varname_list, value_list)){
SWS_TAPER_FILE=0; SWS_TAPER_FILE=0;
fprintf(fp,"Variable SWS_TAPER_FILE is set to default value %d.\n",SWS_TAPER_FILE);} fprintf(fp,"Variable SWS_TAPER_FILE is set to default value %d.\n",SWS_TAPER_FILE);
}
if (SWS_TAPER_FILE==1){ if (SWS_TAPER_FILE==1){
if (get_string_from_objectlist("TAPER_FILE_NAME",number_readobjects,TAPER_FILE_NAME,varname_list, value_list)) if (get_string_from_objectlist("TAPER_FILE_NAME",number_readobjects,TAPER_FILE_NAME,varname_list, value_list))
err("Variable TAPER_FILE_NAME could not be retrieved from the json input file!"); err("Variable TAPER_FILE_NAME could not be retrieved from the json input file!");
if(!ACOUSTIC){ }
if (get_string_from_objectlist("TAPER_FILE_NAME_U",number_readobjects,TAPER_FILE_NAME_U,varname_list, value_list))
err("Variable TAPER_FILE_NAME_U could not be retrieved from the json input file!");
}
if (get_string_from_objectlist("TAPER_FILE_NAME_RHO",number_readobjects,TAPER_FILE_NAME_RHO,varname_list, value_list))
err("Variable TAPER_FILE_NAME_RHO could not be retrieved from the json input file!");}
if (get_int_from_objectlist("SWS_TAPER_FILE_PER_SHOT",number_readobjects,&SWS_TAPER_FILE_PER_SHOT,varname_list, value_list)){ if (get_int_from_objectlist("SWS_TAPER_FILE_PER_SHOT",number_readobjects,&SWS_TAPER_FILE_PER_SHOT,varname_list, value_list)){
SWS_TAPER_FILE_PER_SHOT=0; SWS_TAPER_FILE_PER_SHOT=0;
fprintf(fp,"Variable SWS_TAPER_FILE_PER_SHOT is set to default value %d.\n",SWS_TAPER_FILE_PER_SHOT);} fprintf(fp,"Variable SWS_TAPER_FILE_PER_SHOT is set to default value %d.\n",SWS_TAPER_FILE_PER_SHOT);
}
if (SWS_TAPER_FILE_PER_SHOT==1){ if (SWS_TAPER_FILE_PER_SHOT==1){
if (get_string_from_objectlist("TAPER_FILE_NAME",number_readobjects,TAPER_FILE_NAME,varname_list, value_list)) if (get_string_from_objectlist("TAPER_FILE_NAME",number_readobjects,TAPER_FILE_NAME,varname_list, value_list))
err("Variable TAPER_FILE_NAME could not be retrieved from the json input file!"); err("Variable TAPER_FILE_NAME could not be retrieved from the json input file!");
if (get_string_from_objectlist("TAPER_FILE_NAME_U",number_readobjects,TAPER_FILE_NAME_U,varname_list, value_list)) }
err("Variable TAPER_FILE_NAME_U could not be retrieved from the json input file!");
if (get_string_from_objectlist("TAPER_FILE_NAME_RHO",number_readobjects,TAPER_FILE_NAME_RHO,varname_list, value_list))
err("Variable TAPER_FILE_NAME_RHO could not be retrieved from the json input file!");}
......
This diff is collapsed.
This diff is collapsed.
...@@ -18,9 +18,6 @@ ...@@ -18,9 +18,6 @@
/*------------------------------------------------------------------------ /*------------------------------------------------------------------------
* Write FD-Parameters to stdout * Write FD-Parameters to stdout
* last update 20/02/2001
*
* See COPYING file for copying and redistribution conditions.
* ----------------------------------------------------------------------*/ * ----------------------------------------------------------------------*/
#include "fd.h" #include "fd.h"
...@@ -53,7 +50,7 @@ void write_par(FILE *fp){ ...@@ -53,7 +50,7 @@ void write_par(FILE *fp){
extern int SWS_TAPER_GRAD_VERT, SWS_TAPER_GRAD_HOR, SWS_TAPER_GRAD_SOURCES, SWS_TAPER_CIRCULAR_PER_SHOT, SRTSHAPE, FILTSIZE; extern int SWS_TAPER_GRAD_VERT, SWS_TAPER_GRAD_HOR, SWS_TAPER_GRAD_SOURCES, SWS_TAPER_CIRCULAR_PER_SHOT, SRTSHAPE, FILTSIZE;
extern int SWS_TAPER_FILE, SWS_TAPER_FILE_PER_SHOT; extern int SWS_TAPER_FILE, SWS_TAPER_FILE_PER_SHOT;
extern float SRTRADIUS; extern float SRTRADIUS;
extern char TAPER_FILE_NAME[STRING_SIZE], TAPER_FILE_NAME_U[STRING_SIZE], TAPER_FILE_NAME_RHO[STRING_SIZE]; extern char TAPER_FILE_NAME[STRING_SIZE];
extern int SPATFILTER, SPAT_FILT_SIZE, SPAT_FILT_1, SPAT_FILT_ITER; extern int SPATFILTER, SPAT_FILT_SIZE, SPAT_FILT_1, SPAT_FILT_ITER;
extern int INV_RHO_ITER, INV_VP_ITER, INV_VS_ITER; extern int INV_RHO_ITER, INV_VP_ITER, INV_VS_ITER;
extern int MIN_ITER;; extern int MIN_ITER;;
...@@ -447,9 +444,9 @@ void write_par(FILE *fp){ ...@@ -447,9 +444,9 @@ void write_par(FILE *fp){
if (SWS_TAPER_FILE_PER_SHOT==1){ if (SWS_TAPER_FILE_PER_SHOT==1){
fprintf(fp," SWS_TAPER_FILE_PER_SHOT=%d: Taper files for single shots are read in and applied to the gradients.\n",SWS_TAPER_FILE_PER_SHOT); fprintf(fp," SWS_TAPER_FILE_PER_SHOT=%d: Taper files for single shots are read in and applied to the gradients.\n",SWS_TAPER_FILE_PER_SHOT);
fprintf(fp," File for vp or lambda gradients: %s\n",TAPER_FILE_NAME); fprintf(fp," File for vp or lambda gradients: %s.vp\n",TAPER_FILE_NAME);
fprintf(fp," File for vs or mu gradients: %s\n",TAPER_FILE_NAME_U); fprintf(fp," File for vs or mu gradients: %s.vs\n",TAPER_FILE_NAME);
fprintf(fp," File for rho gradients: %s\n",TAPER_FILE_NAME_RHO);} fprintf(fp," File for rho gradients: %s.rho\n",TAPER_FILE_NAME);}
else fprintf(fp," SWS_TAPER_FILE_PER_SHOT=%d: No taper files are applied to the gradients before summation.\n\n",SWS_TAPER_FILE_PER_SHOT); else fprintf(fp," SWS_TAPER_FILE_PER_SHOT=%d: No taper files are applied to the gradients before summation.\n\n",SWS_TAPER_FILE_PER_SHOT);
fprintf(fp,"\n"); fprintf(fp,"\n");
...@@ -551,14 +548,14 @@ void write_par(FILE *fp){ ...@@ -551,14 +548,14 @@ void write_par(FILE *fp){
fprintf(fp,"\n\n"); fprintf(fp,"\n\n");
fprintf(fp," --------------- Time windowing and VPPML -------------------\n"); fprintf(fp," --------------- Time windowing and damping -------------------\n");
if (TIMEWIN){ if (TIMEWIN){
fprintf(fp," TIMEWIN=%d: Time windowing and VPPML is applied \n",TIMEWIN); fprintf(fp," TIMEWIN=%d: Time windowing and damping is applied \n",TIMEWIN);
fprintf(fp," Reading picked times from files: %s \n",PICKS_FILE); fprintf(fp," Reading picked times from files: %s \n",PICKS_FILE);
fprintf(fp," length of window after pick in s is: %f \n",TWLENGTH_PLUS); fprintf(fp," length of window after pick in s is: %f \n",TWLENGTH_PLUS);
fprintf(fp," length of window befor pick in s is: %f \n",TWLENGTH_MINUS); fprintf(fp," length of window befor pick in s is: %f \n",TWLENGTH_MINUS);
fprintf(fp," gamma is : %f \n\n",GAMMA);} fprintf(fp," gamma is : %f \n\n",GAMMA);}
else fprintf(fp," TIMEWIN=%d: No time windowing and VPPML is applied \n",TIMEWIN); else fprintf(fp," TIMEWIN=%d: No time windowing and damping is applied \n",TIMEWIN);
......
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