Commit cec16036 authored by Florian Wittkamp's avatar Florian Wittkamp

JSON: IFOS now compatible to the JSON standard

IFOS is now able to read in input files, that are formatted according the JSON standard. Nevertheless, the old files will work as well.

In addition, I fixed some compiler warnings.
parent 94121d66
#-----------------------------------------------------------------
# JSON PARAMETER FILE FOR IFOS
#-----------------------------------------------------------------
# description:
# description/name of the model: 2 layer example, model grid created by ../genmod/2layer.c
#
{
"Domain Decomposition" : "comment",
"NPROCX" : "4",
......@@ -68,5 +61,5 @@
"FORWARD_ONLY" : "10",
"Verbose mode" : "comment",
"VERBOSE" : "0",
"VERBOSE" : "0"
}
#-----------------------------------------------------------------
# JSON PARAMETER FILE FOR IFOS
#-----------------------------------------------------------------
# description:
# description/name of the model: 2 layer example, model grid created by ../genmod/2layer.c
#
{
"Domain Decomposition" : "comment",
"NPROCX" : "4",
......@@ -98,5 +91,5 @@
"FORWARD_ONLY" : "10",
"Verbose mode" : "comment",
"VERBOSE" : "0",
"VERBOSE" : "0"
}
#-----------------------------------------------------------------
# JSON PARAMETER FILE FOR IFOS
#-----------------------------------------------------------------
# description:
# description/name of the model: 2 layer example, model grid created by ../genmod/2layer.c
#
{
"Domain Decomposition" : "comment",
"NPROCX" : "4",
......@@ -99,5 +92,5 @@
"PRO" : "0.01",
"Verbose mode" : "comment",
"VERBOSE" : "0",
"VERBOSE" : "0"
}
#-----------------------------------------------------------------
# JSON PARAMETER FILE FOR IFOS
#-----------------------------------------------------------------
# description:
# description/name of the model: 2 layer example, model grid created by ../genmod/2layer.c
#
{
"Domain Decomposition" : "comment",
"NPROCX" : "4",
......@@ -237,5 +230,5 @@
"FILT_SIZE" : "5",
"Verbose mode" : "comment",
"VERBOSE" : "0",
"VERBOSE" : "0"
}
#-----------------------------------------------------------------
# JSON PARAMETER FILE FOR IFOS
#-----------------------------------------------------------------
# description:
# description/name of the model: toy_example_true.c with flnodes.toy_example
#
{
"Domain Decomposition" : "comment",
"NPROCX" : "4",
......@@ -83,5 +76,5 @@
"FORWARD_ONLY" : "10",
"Verbose mode" : "comment",
"VERBOSE" : "0",
"VERBOSE" : "0"
}
#-----------------------------------------------------------------
# JSON PARAMETER FILE FOR IFOS
#-----------------------------------------------------------------
# description:
# description/name of the model: toy_example_true.c with flnodes.toy_example
#
{
"Domain Decomposition" : "comment",
"NPROCX" : "4",
......@@ -97,5 +90,5 @@
"FORWARD_ONLY" : "10",
"Verbose" : "comment",
"VERBOSE" : "0",
"VERBOSE" : "0"
}
#-----------------------------------------------------------------
# JSON PARAMETER FILE FOR IFOS
#-----------------------------------------------------------------
# description:
# description/name of the model: genmod/toy_example_start.c with flnodes.toy_example.start
#
{
"Domain Decomposition" : "comment",
"NPROCX" : "4",
......@@ -161,5 +154,5 @@
"FILT_SIZE" : "3",
"Verbose mode" : "comment",
"VERBOSE" : "0",
"VERBOSE" : "0"
}
#-----------------------------------------------------------------
# JSON PARAMETER FILE FOR IFOS
#-----------------------------------------------------------------
# description:
# description/name of the model: genmod/toy_example_start.c with flnodes.toy_example.start
#
{
"Domain Decomposition" : "comment",
"NPROCX" : "4",
......@@ -175,5 +168,5 @@
"FILT_SIZE" : "3",
"Verbose" : "comment",
"VERBOSE" : "0",
"VERBOSE" : "0"
}
#-----------------------------------------------------------------
# JSON PARAMETER FILE FOR IFOS
#-----------------------------------------------------------------
# description:
# description/name of the model: toy_example_true.c with flnodes.toy_example
#
{
"Domain Decomposition" : "comment",
"NPROCX" : "2",
......@@ -89,5 +82,5 @@
"FORWARD_ONLY" : "10",
"Verbose mode" : "comment",
"VERBOSE" : "0",
"VERBOSE" : "0"
}
#-----------------------------------------------------------------
# JSON PARAMETER FILE FOR IFOS
#-----------------------------------------------------------------
# description:
# description/name of the model: genmod/toy_example_start.c with flnodes.toy_example.start
#
{
"Domain Decomposition" : "comment",
"NPROCX" : "2",
......@@ -186,5 +179,5 @@
"FILT_SIZE" : "3",
"Verbose mode" : "comment",
"VERBOSE" : "0",
"VERBOSE" : "0"
}
......@@ -46,7 +46,8 @@ void count_killed_traces(int ntr, int swstestshot, int ntr_glob, int **recpos_lo
if(TRKILL_OFFSET) {
if(MYID==0) {
printf("Automatic offset based TraceKill: Experimental feature");
printf("\n\n ----- Offset based Tracekill ------");
printf("\n Kill offsets between %.1f m and %.1f m",TRKILL_OFFSET_LOWER,TRKILL_OFFSET_UPPER);
}
/* Generate TraceKill file on the fly */
......
......@@ -9,7 +9,7 @@ void eprecond1(float ** We, float ** Ws, float ** Wr, float epsilon){
extern int NX, NY, IDX, IDY, DTINV, EPRECOND, VERBOSE;
extern int POS[3], NXG;
extern float DH;
int i, j, k, l, ii, jj;
int i, j, ii, jj;
float maxWetmp, maxWe, x, y, xmin, xmax;
xmin = DH;
xmax = NXG*DH;
......
......@@ -468,7 +468,7 @@ int *ivector(int nl, int nh);
double *dvector(int nl, int nh);
float **fmatrix(int nrl, int nrh, int ncl, int nch);
int *ivector(int nl, int nh);
void quicksort(float *arr, int dummy, int elements);
float **matrix(int nrl, int nrh, int ncl, int nch);
int **imatrix(int nrl, int nrh, int ncl, int nch);
float ***f3tensor(int nrl, int nrh, int ncl, int nch,int ndl, int ndh);
......
This diff is collapsed.
......@@ -2,14 +2,14 @@
float median2d(float **mat, int ny, int nx){
signed long k;
int k;
float *t, med=0.0;
t = vector(1,nx*ny);
k = nx*ny;
memmove(&t[1], &mat[1][1], k*sizeof(float));
quicksort(&t[1],1,k);
quicksort(t,1,k);
if (k%2) med = t[k/2+1];
else med = (t[k/2] + t[k/2+1]) / 2.0;
......
......@@ -36,14 +36,13 @@ void read_par_json(FILE *fp, char *fileinp){
extern int BOUNDARY, REC_ARRAY, DRX, TAPER, TAPERLENGTH, INVTYPE, FW;
extern float TSNAP1, TSNAP2, TSNAPINC, REFREC[4];
extern int SNAPSHOT_START,SNAPSHOT_END,SNAPSHOT_INCR;
extern char MFILE[STRING_SIZE], SIGNAL_FILE[STRING_SIZE], SIGNAL_FILE_SH[STRING_SIZE], LOG_FILE[STRING_SIZE];
extern char MFILE[STRING_SIZE], SIGNAL_FILE[STRING_SIZE], SIGNAL_FILE_SH[STRING_SIZE];
extern char SNAP_FILE[STRING_SIZE], SOURCE_FILE[STRING_SIZE], REC_FILE[STRING_SIZE];
extern char SEIS_FILE[STRING_SIZE];
extern char JACOBIAN[STRING_SIZE],DATA_DIR[STRING_SIZE],FREQ_FILE[STRING_SIZE];
extern int NPROCX, NPROCY, MYID, IDX, IDY;
extern int GRADT1, GRADT2, GRADT3, GRADT4, ITERMAX, PARAMETERIZATION, FORWARD_ONLY, ADJOINT_TYPE;
extern int GRAD_METHOD;
extern float TSHIFT_back;
extern int FILT_SIZE, MODEL_FILTER;
extern int FILT_SIZE_GRAD, GRAD_FILTER;
......
This diff is collapsed.
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