Commit c8370d02 authored by Tilman Steinweg's avatar Tilman Steinweg

implemented json input

+ few addidtional changes:
SRCREC is now the switch to either read from .dat file =1 or use plane wave =2
reduced some arrays (currently unused) to variables
parent 7bdc5fd9
{
"MODELING PARAMETERS" : "comment",
"Domain Decomposition" : "comment",
"NPROCX" : "2",
"NPROCY" : "2",
"NPROCZ" : "2",
"3-D Grid" : "comment",
"NX" : "160",
"NY" : "160",
"NZ" : "184",
"DX" : "0.8",
"DY" : "0.8",
"DZ" : "0.8",
"FD order" : "comment",
"FDORDER" : "4",
"FDCOEFF" : "2",
"Time Stepping" : "comment",
"TIME" : "0.06",
"DT" : "5.0e-05",
"Source" : "comment",
"SOURCE_SHAPE" : "4",
"SOURCE_TYPE" : "4",
"ALPHA" : "45.0",
"BETA" : "45.0",
"PLANE_WAVE_DEPTH" : "0.0",
"PHI" : "0.0",
"TS" : "0.0033",
"SIGNAL_FILE" : "./STF/stf.su",
"SRCREC" : "1",
"SOURCE_FILE" : "./sources/sources_toy.dat",
"RUN_MULTIPLE_SHOTS" : "1",
"Model" : "comment",
"READMOD" : "0",
"MFILE" : "model/toy",
"Q-approximation" : "comment",
"L" : "0",
"FL1" : "1000.0",
"TAU" : "0.000001",
"Free Surface" : "comment",
"FREE_SURF" : "0",
"Absorbing Boundary" : "comment",
"ABS_TYPE" : "1",
"FW" : "10",
"DAMPING" : "8.0",
"VPPML" : "6200.0",
"FPML" : "200.00",
"BOUNDARY" : "0",
"Snapshots" : "comment",
"SNAP" : "0",
"TSNAP1" : "0.01",
"TSNAP2" : "0.24",
"TSNAPINC" : "0.0075",
"IDX, IDY, IDZ" : "1,1,1",
"SNAP_FORMAT" : "4",
"SNAP_FILE" : "./snap/back",
"SNAP_PLANE" : "1",
"Receiver" : "comment",
"SEISMO" : "1",
"READREC" : "0",
"REC_FILE" : "./receiver/receiver.dat",
"REFRECX, REFRECY, REFRECZ" : "0.0 , 0.0, 0.0",
"XREC1, YREC1, ZREC1" : "90.0 , 90.0, 90.0",
"XREC2, YREC2, ZREC2" : "90.0 , 90.0, 90.0",
"NGEOPH" : "1",
"Receiver array" : "comment",
"REC_ARRAY" : "1",
"REC_ARRAY_DEPTH" : "24.0",
"REC_ARRAY_DIST" : "30.0",
"DRX" : "10",
"DRY" : "10",
"Seismograms" : "comment",
"NDT" : "1",
"NDTSHIFT" : "0",
"SEIS_FORMAT" : "1",
"SEIS_FILE" : "su/IFOS",
"Method" : "comment",
"METHOD" : "0",
"INVERSION PARAMETERS" : "comment",
"In- and Output Files" : "comment",
"GRAD_FILE" : "./grad/toy_grad",
"MOD_OUT_FILE" : "./model/toy",
"SEIS_OBS_FILE" : "./su_obs/obs_toy",
"EXTOBS" : "0",
"INV_FILE" : "./in_and_out/workflow_toy.dat",
"HESS_FILE" : "./hess/toy_hess",
"General" : "comment",
"ITMIN, ITMAX" : "1 , 80",
"FILT" : "1",
"NFMAX" : "5",
"TAST" : "100",
"VP0, VS0, RHO0" : "6200.0, 3600.0, 2800.0",
"WEIGHT_VP,WEIGHT_VS,WEIGHT_RHO" : "1.0, 1.0, 0.0",
"Steplength estimation" : "comment",
"NSHOTS_STEP" : "4",
"TESTSTEP" : "0.02",
"Gradient preconditioning" : "comment",
"DAMPTYPE" : "2",
"Hessian" : "comment",
"HESS" : "0",
"READ_HESS" : "0",
"REC_HESS" : "1",
"WATER_HESS_VP, WATER_HESS_VS, WATER_HESS_RHO" : "0.0192, 0.0192, 1.0e-14",
"L-BFGS" : "comment",
"LBFGS" : "0",
"NUMPAR" : "2",
"BFGSNUM" : "5"
}
{
"MODELING PARAMETERS" : "comment",
"Note that z denotes the vertical direction !" : "comment",
"Domain Decomposition" : "comment",
"NPROCX" : "2",
"NPROCY" : "2",
"NPROCZ" : "2",
"3-D Grid" : "comment",
"NX" : "160",
"NY" : "160",
"NZ" : "184",
"DX" : "0.8",
"DY" : "0.8",
"DZ" : "0.8",
"Caution: first gridpoint is not at {0.0,0.0,0.0} but at {dx,dy,dz}!" : "comment",
"FD order" : "comment",
"FDORDER" : "4",
"possible values are 2, 4, 6, 8, 10, 12" : "comment",
"fd_coefficients_(Taylor=1;Holberg=2)" : "comment",
"FDCOEFF" : "2",
"Time Stepping" : "comment",
"time_of_wave_propagation_(in_sec)" : "comment",
"TIME" : "0.06",
"timestep_(in_seconds)" : "comment",
"DT" : "5.0e-05",
"Source" : "comment",
"Shape_of_source-signal:" : "comment",
"SOURCE_SHAPE" : "4",
"SOURCE_SHAPE values: ricker=1;fumue=2;from_SIGNAL_FILE=3;SIN**3=4;deltapulse=5" : "comment",
"External signal input instead of SOURCE_SHAPE" : "comment",
"SIGNAL_FILE" : "./STF/stf.su",
"SOURCE_TYPE" : "4",
"SOURCE_TYPE values (point_source): explosive=1;force_in_x=2;force_in_y=3;force_in_z=4;custom=5" : "comment",
"If SOURCE_TYPE <5 the following two lines are ignored" : "comment",
"ALPHA" : "45.0",
"BETA" : "45.0",
"ALPHA=force_angle_between_x_y_(in_degree) (BETA between x_z)" : "comment",
"read_source_positions_from_SOURCE_FILE_(yes=1;Plane wave=2) " : "comment",
"SRCREC" : "1",
"SOURCE_FILE" : "./sources/sources_toy.dat",
"run_multiple_shots_defined_in_SOURCE_FILE_(yes=1)" : "comment",
"RUN_MULTIPLE_SHOTS" : "1",
"Following lines can be ignored if SRCREC!=2" : "comment",
"Plane wave (PW) excitation,if PLANE_WAVE_DEPTH>0, SRCREC is treated as 0" : "comment",
"depth_of_PW_excitation_(no<=0)_(in_meter)" : "comment",
"PLANE_WAVE_DEPTH" : "0.0",
"dip_of_PW_from_vertical_(in_degrees)" : "comment",
"PHI" : "0.0",
"duration_of_source-signal_PW_(in_seconds)" : "comment",
"TS" : "0.0033",
"Model" : "comment",
"read_model_from_MFILE(yes=1)" : "comment",
"READMOD" : "0",
"MFILE" : "model/toy",
"Q-approximation" : "comment",
"Number_of_relaxation_mechanisms" : "comment",
"L" : "0",
"L_Relaxation_frequencies" : "comment",
"FL1" : "1000.0",
"Tau_value_for_entire_model" : "comment",
"TAU" : "0.000001",
"Free Surface" : "comment",
"free_surface_(yes=1)" : "comment",
"FREE_SURF" : "0",
"Absorbing Boundary" : "comment",
"type_of_boundary_condition_(ABS_TYPE)_(PML=1/ABS=2)" : "comment",
"ABS_TYPE" : "1",
"width_of_absorbing_frame_(in_grid_points)_(No<=0)" : "comment",
"FW" : "10",
"percentage_of_amplitude_decay_at_outer_edge" : "comment",
"DAMPING" : "8.0",
"parameter for PML:" : "comment",
"P_wave_velocity_near_the_grid_boundary(in_m/s)" : "comment",
"VPPML" : "6200.0",
"Dominant_frequency_(in_Hz)" : "comment",
"FPML" : "200.00",
"apply_periodic_boundary_condition_at_edges" : "comment",
"BOUNDARY" : "0",
"Snapshots" : "comment",
"output_of_snapshots(yes>0)" : "comment",
"SNAP" : "0",
"output of particle velocities: SNAP=1" : "comment",
"output of pressure field: SNAP=2" : "comment",
"output of curl and divergence energy: SNAP=3" : "comment",
"output of both particle velocities and energy : SNAP=4" : "comment",
"first_snapshot_(in_sec)" : "comment",
"TSNAP1" : "0.01",
"last_snapshot_(in_sec)" : "comment",
"TSNAP2" : "0.24",
"increment_(in_sec)" : "comment",
"TSNAPINC" : "0.0075",
"increment_x,y,z-direction" : "comment",
"IDX, IDY, IDZ" : "1,1,1",
"data-format(ASCII(2);BINARY(3))" : "comment",
"SNAP_FORMAT" : "4",
"basic_filename" : "comment",
"SNAP_FILE" : "./snap/back",
"if SNAP !=3 the following line is ignored" : "comment",
"SNAP_PLANE" : "1",
"output of snapshots as energy wihout sign SNAP_PLANE=1" : "comment",
"energy with sign true for x-z-plane SNAP_PLANE=2" : "comment",
"energy with sign true for x-y-plane SNAP_PLANE=3" : "comment",
"energy with sign true for y-z-plane SNAP_PLANE=4" : "comment",
"Receiver" : "comment",
"output_of_seismograms" : "comment",
"SEISMO" : "1",
"SEISMO=0: no seismograms" : "comment",
"SEISMO=1: particle-velocities" : "comment",
"SEISMO=2: pressure (hydrophones)" : "comment",
"SEISMO=3: curl and div" : "comment",
"SEISMO=4: everything" : "comment",
"Warning: "curl" is not really curl in 3D" : "comment",
"read_receiver_positions_from_file_(yes=1)" : "comment",
"READREC" : "0",
"REC_FILE" : "./receiver/receiver.dat",
"reference_point_for_receiver_coordinate_system" : "comment",
"REFRECX, REFRECY, REFRECZ" : "0.0 , 0.0, 0.0",
"if READREC=1 the following three lines are ignored" : "comment",
"Note that z denotes the vertical direction !" : "comment",
"position_of_first_receiver_(in_m)" : "comment",
"XREC1, YREC1, ZREC1" : "90.0 , 90.0, 90.0",
"position_of_last_receiver_(in_m)" : "comment",
"XREC2, YREC2, ZREC2" : "90.0 , 90.0, 90.0",
"distance_between_two_adjacent_receivers" : "comment",
"NGEOPH" : "1",
"Receiver array" : "comment",
"parameters for horizontal plane of receivers" : "comment",
"number_of_planes_(no<=0)" : "comment",
"REC_ARRAY" : "1",
"depth_of_first_(upper)_plane_(in_m)" : "comment",
"REC_ARRAY_DEPTH" : "24.0",
"vertical_distance_between_planes_(in_m)" : "comment",
"REC_ARRAY_DIST" : "30.0",
"distance_between_receivers_in_x/y-direction" : "comment",
"DRX" : "10",
"DRY" : "10",
"Seismograms" : "comment",
"samplingrate_and_timelag_(in_timesteps!)" : "comment",
"NDT" : "1",
"NDTSHIFT" : "0",
"write every (ndt)th sample, leaving ndtshift samples at the beginning out" : "comment",
"default: ndt=1 and ndtshift=0. (ndt=0 is set to ndt=1, ndt<0 are set to -ndt.)" : "comment",
"data-format" : "comment",
"SEIS_FORMAT" : "1",
"0: SEG-Y (ASCII-text/native 4-byte-floats (IEEE on PC)/little endian on PC)" : "comment",
"1: SU (native 4-byte-floats (IEEE on PC)/little endian on PC)" : "comment",
"2: TEXTUAL (native ASCII)" : "comment",
"3: BINARY (IEEE-4-byte-floats on PC/little endian on PC)" : "comment",
"4: SEG-Y (ASCII-text/native 4-byte-floats (IEEE on PC)/little endian on PC)" : "comment",
"5: SEG-Y (ASCII-text/IBM-4-byte-floats on PC/big endian on PC) " : "comment",
"basic_filename" : "comment",
"SEIS_FILE" : "su/IFOS",
"Method" : "comment",
"METHOD" : "0",
"0: only forward simulation" : "comment",
"1: conjugate_gradient_FWI" : "comment",
"INVERSION PARAMETERS" : "comment",
"In- and Output Files" : "comment",
"gradient_filename" : "comment",
"GRAD_FILE" : "./grad/toy_grad",
"model_output_filename" : "comment",
"MOD_OUT_FILE" : "./model/toy",
"observed_data_fileneame" : "comment",
"SEIS_OBS_FILE" : "./su_obs/obs_toy",
"external_or_internal_observed_data" : "comment",
"EXTOBS" : "0",
"inversion_parameter_file" : "comment",
"INV_FILE" : "./in_and_out/workflow_toy.dat",
"hessian_file" : "comment",
"HESS_FILE" : "./hess/toy_hess",
"General" : "comment",
"minimum/maximum_iteration_number >0" : "comment",
"ITMIN, ITMAX" : "1 , 80",
"filtering_(yes=1/no=0)" : "comment",
"FILT" : "1",
"maximum_number_frequencies_per_iteration" : "comment",
"NFMAX" : "5",
"number_of_timestep_per_period_used_for_inversion" : "comment",
"TAST" : "100",
"average_model_parameter" : "comment",
"VP0, VS0, RHO0" : "6200.0, 3600.0, 2800.0",
"velocities in m/s, density in kg/m³" : "comment",
"parameter_class_weighting_factors_for_vp/vs/rho_" : "comment",
"WEIGHT_VP,WEIGHT_VS,WEIGHT_RHO" : "1.0, 1.0, 0.0",
"choose from 1.0 (full update) to 0.0 (no update)" : "comment",
"Steplength estimation" : "comment",
"number_of_shots_used_for_steplength_estimation" : "comment",
"NSHOTS_STEP" : "4",
"initial_test_steplength" : "comment",
"TESTSTEP" : "0.02",
"Gradient preconditioning" : "comment",
"Type_of_preconditioning" : "comment",
"DAMPTYPE" : "2",
"0: no damping; 1: Circular taper around receivers;" : "comment",
"2: Cicular taper around sources and receivers; 3: Tapering of source and receiver planes" : "comment",
"Hessian" : "comment",
"Apply_Hessian_(yes=1/no=0)" : "comment",
"HESS" : "0",
"Read_Hessian_from_file" : "comment",
"READ_HESS" : "0",
"Part_of_receivers_used_for_Hessian" : "comment",
"REC_HESS" : "1",
"(Each REC_HESS Receiver is used to calculate the Hessian, not yet implemented)" : "comment",
"Water_level_Hessian_for_vp/vs/rho" : "comment",
"WATER_HESS_VP, WATER_HESS_VS, WATER_HESS_RHO" : "0.0192, 0.0192, 1.0e-14",
"L-BFGS" : "comment",
"Apply_L_BFGS" : "comment",
"LBFGS" : "0",
"Number_of_inverted_parameters" : "comment",
"NUMPAR" : "2",
"Number_iterations_used_for_LBFGS" : "comment",
"BFGSNUM" : "5"
}
{
"MODELING PARAMETERS" : "comment",
"Domain Decomposition" : "comment",
"NPROCX" : "2",
"NPROCY" : "2",
"NPROCZ" : "2",
"3-D Grid" : "comment",
"NX" : "160",
"NY" : "160",
"NZ" : "184",
"DX" : "0.8",
"DY" : "0.8",
"DZ" : "0.8",
"FD order" : "comment",
"FDORDER" : "4",
"FDCOEFF" : "2",
"Time Stepping" : "comment",
"TIME" : "0.06",
"DT" : "5.0e-05",
"Source" : "comment",
"SOURCE_SHAPE" : "4",
"SOURCE_TYPE" : "4",
"SIGNAL_FILE" : "./STF/stf.su",
"SRCREC" : "1",
"SOURCE_FILE" : "./sources/sources_toy.dat",
"RUN_MULTIPLE_SHOTS" : "1",
"Model" : "comment",
"READMOD" : "0",
"MFILE" : "model/toy",
"Q-approximation" : "comment",
"L" : "0",
"FL1" : "1000.0",
"TAU" : "0.000001",
"Free Surface" : "comment",
"FREE_SURF" : "0",
"Absorbing Boundary" : "comment",
"ABS_TYPE" : "1",
"FW" : "10",
"VPPML" : "6200.0",
"FPML" : "200.00",
"BOUNDARY" : "0",
"Snapshots" : "comment",
"SNAP" : "0",
"TSNAP1" : "0.01",
"TSNAP2" : "0.24",
"TSNAPINC" : "0.0075",
"IDX, IDY, IDZ" : "1,1,1",
"SNAP_FORMAT" : "4",
"SNAP_FILE" : "./snap/back",
"SNAP_PLANE" : "1",
"Receiver" : "comment",
"SEISMO" : "1",
"READREC" : "0",
"REC_FILE" : "./receiver/receiver.dat",
"REFRECX, REFRECY, REFRECZ" : "0.0 , 0.0, 0.0",
"XREC1, YREC1, ZREC1" : "90.0 , 90.0, 90.0",
"XREC2, YREC2, ZREC2" : "90.0 , 90.0, 90.0",
"NGEOPH" : "1",
"Receiver array" : "comment",
"REC_ARRAY" : "1",
"REC_ARRAY_DEPTH" : "24.0",
"REC_ARRAY_DIST" : "30.0",
"DRX" : "10",
"DRY" : "10",
"Seismograms" : "comment",
"NDT" : "1",
"NDTSHIFT" : "0",
"SEIS_FORMAT" : "1",
"SEIS_FILE" : "./su_obs/obs_toy",
"Method" : "comment",
"METHOD" : "0",
"INVERSION PARAMETERS" : "comment",
"In- and Output Files" : "comment",
"GRAD_FILE" : "./grad/toy_grad",
"MOD_OUT_FILE" : "./model/toy",
"SEIS_OBS_FILE" : "./su_obs/obs_toy",
"EXTOBS" : "0",
"INV_FILE" : "./in_and_out/workflow_toy.dat",
"HESS_FILE" : "./hess/toy_hess",
"General" : "comment",
"ITMIN, ITMAX" : "1 , 60",
"FILT" : "0",
"NFMAX" : "5",
"TAST" : "100",
"VP0, VS0, RHO0" : "6200.0, 3600.0, 2800.0",
"WEIGHT" : "1.0, 1.0, 0.0",
"Steplength estimation" : "comment",
"NSHOTS_STEP" : "4",
"TESTSTEP" : "0.02",
"Gradient preconditioning" : "comment",
"DAMPTYPE" : "2",
"Hessian" : "comment",
"HESS" : "0",
"READ_HESS" : "0",
"REC_HESS" : "1",
"WATER_HESS_VP, WATER_HESS_VS, WATER_HESS_RHO" : "0.0192, 0.0192, 1.0e-14",
"L-BFGS" : "comment",
"LBFGS" : "0",
"NUMPAR" : "2",
"BFGSNUM" : "5"
}
{
"MODELING PARAMETERS" : "comment",
"Domain Decomposition" : "comment",
"NPROCX" : "2",
"NPROCY" : "2",
"NPROCZ" : "2",
"3-D Grid" : "comment",
"NX" : "160",
"NY" : "160",
"NZ" : "184",
"DX" : "0.8",
"DY" : "0.8",
"DZ" : "0.8",
"FD order" : "comment",
"FDORDER" : "4",
"FDCOEFF" : "2",
"Time Stepping" : "comment",
"TIME" : "0.06",
"DT" : "5.0e-05",
"Source" : "comment",
"SOURCE_SHAPE" : "4",
"SOURCE_TYPE" : "4",
"SIGNAL_FILE" : "./STF/stf.su",
"SRCREC" : "1",
"SOURCE_FILE" : "./sources/sources_toy.dat",
"RUN_MULTIPLE_SHOTS" : "1",
"Model" : "comment",
"READMOD" : "0",
"MFILE" : "model/toy",
"Q-approximation" : "comment",
"L" : "0",
"FL1" : "1000.0",
"TAU" : "0.000001",
"Free Surface" : "comment",
"FREE_SURF" : "0",
"Absorbing Boundary" : "comment",
"ABS_TYPE" : "1",
"FW" : "10",
"VPPML" : "6200.0",
"FPML" : "200.00",
"BOUNDARY" : "0",
"Snapshots" : "comment",
"SNAP" : "0",
"TSNAP1" : "0.01",
"TSNAP2" : "0.24",
"TSNAPINC" : "0.0075",
"IDX, IDY, IDZ" : "1,1,1",
"SNAP_FORMAT" : "4",
"SNAP_FILE" : "./snap/back",
"SNAP_PLANE" : "1",
"Receiver" : "comment",
"SEISMO" : "1",
"READREC" : "0",
"REC_FILE" : "./receiver/receiver.dat",
"REFRECX, REFRECY, REFRECZ" : "0.0 , 0.0, 0.0",
"XREC1, YREC1, ZREC1" : "90.0 , 90.0, 90.0",
"XREC2, YREC2, ZREC2" : "90.0 , 90.0, 90.0",
"NGEOPH" : "1",
"Receiver array" : "comment",
"REC_ARRAY" : "1",
"REC_ARRAY_DEPTH" : "24.0",
"REC_ARRAY_DIST" : "30.0",
"DRX" : "10",
"DRY" : "10",
"Seismograms" : "comment",
"NDT" : "1",
"NDTSHIFT" : "0",
"SEIS_FORMAT" : "1",
"SEIS_FILE" : "./su_obs/obs_toy",
"Method" : "comment",
"METHOD" : "0"
}
35.0 32.0 92.0
35.8 32.0 92.0
36.6 32.0 92.0
37.4 32.0 92.0
38.2 32.0 92.0
39.0 32.0 92.0
39.8 32.0 92.0
40.6 32.0 92.0
41.4 32.0 92.0
#
#(comment line is indicated by # or % as first character)
#
# Parameters for each receiver postiton (one receiver per line):
#
# XSRC YSRC ZSRC
#
# Symbols:
# XSRC= x-coordinate of source point [meter]
# YSRC= y-coordinate of source point [meter]
# ZSRC= z-coordinate of source point [meter] (vertical)
......@@ -47,6 +47,7 @@ IFLAGS=-I./../libcseife
.c.o:
$(CC) -c $(CFLAGS) $< $(IFLAGS)
SNAPMERGE_OBJ = $(SNAPMERGE_SCR:%.c=%.o)
SEISMERGE_SCR = seismerge.c
......@@ -54,7 +55,9 @@ SEISMERGE_SCR = seismerge.c
SNAPMERGE_SCR = \
snapmerge.c \
merge.c \
json_parser.c \
read_par.c \
read_par_json.c \
readdsk.c \
writedsk.c \
util.c
......@@ -62,6 +65,7 @@ SNAPMERGE_SCR = \
PARTMODEL_SCR = \
part_model.c \
read_par.c \
read_par_json.c \
util.c
......@@ -79,6 +83,8 @@ FDMPI_UTIL = \
rd_sour.c \
readdsk.c \
read_par.c \
json_parser.c \
read_par_json.c \
exchange_par.c \
receiver.c \
readmod.c \
......@@ -155,7 +161,7 @@ seismerge: $(SEISMERGE_OBJ)
$(CC) $(LFLAGS) $(SEISMERGE_OBJ) -o ../bin/seismerge
snapmerge: $(SNAPMERGE_OBJ)
$(CC) $(LFLAGS) $(SNAPMERGE_OBJ) -o ../bin/snapmerge
$(CC) $(SFLAGS) $(SNAPMERGE_OBJ) -o ../bin/snapmerge $(LFLAGS)
# part_model: $(PARTMODEL_OBJ)
# $(CC) $(LFLAGS) $(PARTMODEL_OBJ) -o ../bin/partmodel
......
......@@ -40,6 +40,7 @@
#define PI (3.141592653589793)
#define NPAR 45
#define STRING_SIZE 74
#define STRING_SIZE2 256
#define REQUEST_COUNT 6
#define NPROCX_MAX 100
#define NPROCY_MAX 100
......@@ -182,6 +183,8 @@ float readdsk(FILE *fp_in, int format);
int read_par(FILE *fp);
void read_par_json(FILE *fp, char *fileinp);
void readmod_acoustic(float *** rho, float *** pi, int ishot);
int **receiver(FILE *fp, int *ntr);
......@@ -309,7 +312,7 @@ float *** sxx, float *** syy, float *** szz, float *** sxy,
float *** syz, float *** sxz, float *** rho,
float ** srcpos_loc, float ** signals, int nsrc, float ***absorb_coeff);
void wavelet(float **srcpos_loc, int nsrc, int quelltype, float ** signals);
void wavelet(float **srcpos_loc, int nsrc, int sourceshape, float ** signals);
void writebufs(float *** sxx, float *** syy, float *** szz,
float *** sxy, float *** syz, float *** sxz,
......@@ -328,6 +331,32 @@ void writemod(char modfile[STRING_SIZE], float *** rho, int format);
void writepar(FILE *fp, int ns);
/* declaration of functions for json parser in json_parser.c*/
int read_objects_from_intputfile(FILE *fp, char input_file[STRING_SIZE],char ** varname_list,char ** value_list);
void print_objectlist_screen(FILE *fp, int number_readobject,char ** varname_list,char ** value_list);
int count_occure_charinstring(char stringline[STRING_SIZE], char teststring[]);
void copy_str2str_uptochar(char string_in[STRING_SIZE], char string_out[STRING_SIZE], char teststring[]);
int get_int_from_objectlist(char string_in[STRING_SIZE], int number_readobject, int * int_buffer,
char ** varname_list,char ** value_list);
int get_float_from_objectlist(char string_in[STRING_SIZE], int number_readobject, float * double_buffer,
char ** varname_list,char ** value_list);
int get_string_from_objectlist(char string_in[STRING_SIZE], int number_readobject, char string_buffer[STRING_SIZE],
char ** varname_list,char ** value_list);
int is_string_blankspace(char string_in[STRING_SIZE]);
void remove_blankspaces_around_string(char string_in[STRING_SIZE] );