writepar.c 19.9 KB
Newer Older
Simone Butzer's avatar
Simone Butzer committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/*------------------------------------------------------------------------
 * Copyright (C) 2015 For the list of authors, see file AUTHORS.
 *
 * This file is part of IFOS3D.
 * 
 * IFOS3D is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, version 2.0 of the License only.
 * 
 * IFOS3D is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with IFOS3D. See file COPYING and/or 
 * <http://www.gnu.org/licenses/gpl-2.0.html>.
--------------------------------------------------------------------------*/

/*--------------------------------------------------------------------------
 * Writing FD-Parameters to stdout or log-file                           
----------------------------------------------------------------------------*/

#include "fd.h"

/* printing all important parameters to FILE *fp */
void writepar(FILE *fp, int ns){

	/* declaration of extern variables */
	extern int   NX, NY, NZ, NT, QUELLART, QUELLTYP, FDORDER, RUN_MULTIPLE_SHOTS;
	extern int  SNAP, SNAP_FORMAT, REC_ARRAY, L, SNAP_PLANE,FW;
	extern float DX, DY, DZ, TIME, DT, TS, *FL, TAU, PLANE_WAVE_DEPTH;
	extern float XREC1, XREC2, YREC1, YREC2, ZREC1, ZREC2;
	extern float ALPHA, BETA;
	extern float REC_ARRAY_DEPTH, REC_ARRAY_DIST;
	extern int SEISMO, NDT, NDTSHIFT, NGEOPH, SEIS_FORMAT[6], FREE_SURF;
	extern int  READMOD, READREC, DRX, DRY, BOUNDARY, SRCREC, IDX, IDY, IDZ;
	extern float TSNAP1, TSNAP2, TSNAPINC, REFREC[4], DAMPING;
	extern char SNAP_FILE[STRING_SIZE], SOURCE_FILE[], SIGNAL_FILE[], REC_FILE[], SEIS_FILE[STRING_SIZE];
	extern char  MFILE[STRING_SIZE],GRAD_FILE[STRING_SIZE],INV_FILE[STRING_SIZE],SEIS_OBS_FILE[STRING_SIZE];
	extern char  MOD_OUT_FILE[STRING_SIZE],HESS_FILE[STRING_SIZE];
	extern int METHOD;
	extern int NP, NPROCX, NPROCY, NPROCZ, MYID;
	extern int ITMIN, ITMAX, FILT, NFMAX, TAST, NSHOTS_STEP, DAMPTYPE, HESS, READ_HESS, REC_HESS, LBFGS,EXTOBS;
45
46
	extern int NUMPAR, BFGSNUM;
	
47
	extern float TESTSTEP,WATER_HESS[3], WEIGHT[3], VP0, VS0, RHO0;
Simone Butzer's avatar
Simone Butzer committed
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
	/* definition of local variables */
	char th1[3], file_ext[8];
	char th2[3];	
	int l;

	fprintf(fp,"\n **********************************************************");
	fprintf(fp,"\n ********* PARAMETERS AS SPECIFIED IN INPUT FILE **********");
	fprintf(fp,"\n **********************************************************\n\n");
	
	/*note that internally "y" is used for the vertical coordinate,
	for usability reasons, we switch the "y" and "z" coordinate 
	so that "z" - as commonly used - denotes the depth (vertical direction)*/
	fprintf(fp,"\n\n **Message from write_par (printed by PE %d):\n\n",MYID);
	fprintf(fp,"------------------------- Processors ------------------------\n");
	fprintf(fp," Number of PEs in horizontal x-direction (NPROCX): %d\n",NPROCX);
	fprintf(fp," Number of PEs in horizontal y-direction (NPROCY): %d\n",NPROCZ);
	fprintf(fp," Number of PEs in vertical   z-direction (NPROCZ): %d\n",NPROCY);
	fprintf(fp," Total number of PEs in use: %d\n",NP);
	fprintf(fp,"\n");
	fprintf(fp," ----------------------- Discretization  ---------------------\n");
	fprintf(fp," Number of gridpoints in x-direction (NX): %i\n", NX);
	fprintf(fp," Number of gridpoints in y-direction (NY): %i\n", NZ);
	fprintf(fp," Number of gridpoints in z-direction (NZ): %i\n", NY);
	fprintf(fp," Grid-spacing in x-direction (DX): %e meter\n", DX);
	fprintf(fp," Grid-spacing in y-direction (DY): %e meter\n", DZ);
	fprintf(fp," Grid-spacing in z-direction (DZ): %e meter\n", DY);
	fprintf(fp," Time of wave propagation (T): %e seconds\n",TIME);
	fprintf(fp," Timestep (DT): %e seconds\n", DT);
	fprintf(fp," Number of timesteps: %i \n",NT);
	fprintf(fp,"\n");
	fprintf(fp," ------------------------- ORDER OF FD OPERATORS --------------\n");
	fprintf(fp," Order of FD operators: %i \n",FDORDER);
	if ((FDORDER<0)||(FDORDER%2!=0)||(FDORDER>12))
		err(" Incorrect FDORDER (must be 2, 4, 8, or 12) ! ");

	fprintf(fp,"\n");
	fprintf(fp," ------------------------- SOURCE -----------------------------\n");

	if ((SRCREC) && (!PLANE_WAVE_DEPTH)){
		fprintf(fp," Reading source positions, time delay, centre frequency \n");
		fprintf(fp," and initial amplitude from ASCII-file \n");
		fprintf(fp,"\t%s\n\n",SOURCE_FILE);
Simone Butzer's avatar
Simone Butzer committed
90
		if (RUN_MULTIPLE_SHOTS)	fprintf(fp,"\n IFOS will run (independent) simulations for each source defined in %s\n\n", SOURCE_FILE);
Simone Butzer's avatar
Simone Butzer committed
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
 
	} else {
		fprintf(fp," Plane wave excitation: depth= %5.2f meter \n",PLANE_WAVE_DEPTH);
 		fprintf(fp," duration of source signal: %e seconds\n",TS);
 		fprintf(fp," (centre frequency is approximately %e Hz)\n",1.0/TS);
	}


	
	fprintf(fp," Wavelet of source:");

	switch (QUELLART){
	case 1 :
		fprintf(fp," Ricker\n");
		break;
	case 2 :
		fprintf(fp," Fuchs-Mueller\n");
		break;
	case 3 :
		fprintf(fp," reading from \n\t %s\n",SIGNAL_FILE);
		break;
	case 4 :
		fprintf(fp," sinus raised to the power of 3.0 \n");
		break;
	case 5 :
		fprintf(fp," spike function \n");
		break;	
	case 6: break;
	
	default :
		err(" Sorry, incorrect specification of source wavelet ! ");
	}

	fprintf(fp," Default type of source:");
	switch (QUELLTYP){
	case 1 :
		fprintf(fp," explosive point source (concentrated at a single gridpoint)\n");
		break;
	case 2 :
		fprintf(fp," point source with directive force in x-direction\n");
		break;
	case 3 :
		fprintf(fp," point source with directive force in y-direction\n");
		break;
	case 4 :
		fprintf(fp," point source with directive force in  z-direction\n");
		break;
	case 5 :
		fprintf(fp," point source with directive force in  custom-direction\n");
		fprintf(fp," Angle between x and y(depth) direticon (ALPHA): %f\n", ALPHA);
		fprintf(fp," Angle between x and z direticon (BETA): %f\n", BETA);
		break;
	default :
		fprintf(fp," WARNING: Default type of source ('%d') not available -> changed to explosive! ", QUELLTYP);
		QUELLTYP=1;
	}
	fprintf(fp,"\n");
	fprintf(fp,"\n Source file: %s \n", SOURCE_FILE);
	fprintf(fp,"\n Multiple shots: %i \n", RUN_MULTIPLE_SHOTS);

	if (SEISMO){
		fprintf(fp," ------------------------- RECEIVER  ------- -------------------\n");
		if (READREC){
			fprintf(fp," Reading receiver positions from file \n");
			fprintf(fp,"\t%s\n\n",REC_FILE);
			fprintf(fp," reference_point_for_receiver_coordinate_system:\n");
			fprintf(fp," x=%f \ty=%f\t z=%f\n",REFREC[1], REFREC[3], REFREC[2]);

		} else if (REC_ARRAY>0){
				fprintf(fp," Horitontal plane of receivers.\n");
				fprintf(fp," Number of planes: %d \n",REC_ARRAY);
				fprintf(fp," Depth of upper plane: %e m \n",REC_ARRAY_DEPTH);
				fprintf(fp," Vertical increment between planes: %e m \n",REC_ARRAY_DIST);
				fprintf(fp," Distance between receivers in x-direction within plane: %i \n", DRX);		
				fprintf(fp," Distance between receivers in y-direction within plane: %i \n", DRY);		
			}			
			else{
			fprintf(fp," Receiver line: \n");			
			fprintf(fp," First receiver position (XREC1,YREC1,ZREC1) = (%5.3f, %5.3f, %5.3f m\n",
			    XREC1,ZREC1,YREC1);
			fprintf(fp," Last receiver position (XREC2,YREC2,ZREC2)  = (%5.3f, %5.3f, %5.3f) m\n",
			    XREC2,ZREC2,YREC2);
			fprintf(fp,"\n Receiver Array: %i \n",REC_ARRAY);
			fprintf(fp,"\n");
		}
	}
	fprintf(fp," ------------------------- FREE SURFACE ------------------------\n");
	if (FREE_SURF) fprintf(fp," There is a free surface at the top of the model ! \n");
	else fprintf(fp," There is no free surface at the top of the model ! \n");
	fprintf(fp,"\n");

	fprintf(fp," ------------------------- ABSORBING FRAME ---------------------\n");
	if (FW>0){
		fprintf(fp," Width of absorbing frame is %i grid points.\n",FW);
		fprintf(fp," The percentage of amplitude decay at the edge is set to %f \n",DAMPING);
	}
	else {
		fprintf(fp," Absorbing frame not installed ! \n");
		fprintf(fp," Be aware of artificial reflections from the edges of the numerical mesh ! \n");
	}

	switch (BOUNDARY){
		case 0 :
			fprintf(fp," No periodic boundary condition.\n");
			break;
		case 1 :
			fprintf(fp," Periodic boundary condition at left/right and front/back sides of global grid.\n");
			break;
		default :
			warning(" Wrong integer value for BOUNDARY specified in parameter file! ");
			warning(" No periodic boundary condition will be applied ");
			BOUNDARY=0;
			break;
	}


	
	if (READMOD){
		fprintf(fp," ------------------------- MODEL-FILES -------------------------\n");
		fprintf(fp," Names of model-files: \n");
		fprintf(fp,"\t shear wave velocities:\n\t %s.vs\n",MFILE);
		fprintf(fp,"\t tau for shear waves:\n\t %s.ts\n",MFILE);
		fprintf(fp,"\t density:\n\t %s.rho\n",MFILE);
		fprintf(fp,"\t compressional wave velocities:\n\t %s.vp\n",MFILE);
		fprintf(fp,"\t tau for P-waves:\n\t %s.tp\n",MFILE);
		for (l=1;l<=L;l++) fprintf(fp,"\t %1i. relaxation frequencies: %s.f%1i\n",l,MFILE,l);
	}

	fprintf(fp,"\n");
	fprintf(fp," ------------------------- Q-APROXIMATION --------------------\n");
	fprintf(fp," Number of relaxation mechanisms (L): %i\n",L);
	fprintf(fp," The L relaxation frequencies are at:  \n");
	for (l=1;l<=L;l++) fprintf(fp,"\t%f",FL[l]);
	fprintf(fp," Hz\n");
	fprintf(fp," Value for tau is : %f\n",TAU);


	if (SNAP){
		fprintf(fp,"\n");
		fprintf(fp," -----------------------  SNAPSHOTS  -----------------------\n");
		fprintf(fp," Snapshots of");
		switch(SNAP){
		case 1:
			fprintf(fp," particle velocity.\n");
			break;
		case 2:
			fprintf(fp," pressure field.\n");
			break;
		case 3:
			fprintf(fp," curl and divergence energy of the wavefield.\n");
			break;
		case 4:
			fprintf(fp," curl and divergence energy of the wavefield.\n");
			fprintf(fp," and particle velocity.\n");
			break;
		default:
			err(" sorry, incorrect value for SNAP ! \n");
		}

		fprintf(fp," \t first (TSNAP1)= %8.5f s\n", TSNAP1);
		fprintf(fp," \t last (TSNAP2)=%8.5f s\n",TSNAP2);
		fprintf(fp," \t increment (TSNAPINC) =%8.5f s\n\n",TSNAPINC);
		fprintf(fp," \t spacing in x-direction (IDX*DX) =%8.5f m\n",IDX*DX);
		fprintf(fp," \t spacing in y-direction (IDY*DY) =%8.5f m\n",IDZ*DZ);
		fprintf(fp," \t spacing in z-direction (IDZ*DZ) =%8.5f m\n",IDY*DY);
		fprintf(fp," \n name of output-file (SNAP_FILE):\n\t %s\n",SNAP_FILE);
		switch (SNAP_FORMAT){
		case 1 :
			err(" SU-Format not yet available !!");
			break;
		case 2 :
			fprintf(fp," The data is written in ASCII. \n");
			break;
		case 3 :
			fprintf(fp," The data is written binary (IEEE) (4 byte per float)");
			break;
		default:
			err(" Don't know the format for the Snapshot-data ! \n");
		}
		switch (SNAP_PLANE){
		case 1 :
			fprintf(fp," \nDiv and curl output will be as Energy without sign. \n");
			break;
		case 2 :
			fprintf(fp," \nDiv and curl output will be as Energy with sign true for xz-plane. \n");
			break;
		case 3 :
			fprintf(fp," \nDiv and curl output will be as Energy with sign true for xy-plane. \n");
			break;
		case 4 :
			fprintf(fp," \nDiv and curl output will be as Energy with sign true for yz-plane. \n");
			break;
		}

		fprintf(fp,"\n\n");
	}
	if (SEISMO){
		fprintf(fp,"\n");
		fprintf(fp," -----------------------  SEISMOGRAMS  ----------------------\n");
		switch (SEIS_FORMAT[0]){
			case 0: sprintf(file_ext,"sgy"); break;
			case 1: sprintf(file_ext,"su");  break;
			case 2: sprintf(file_ext,"txt"); break;
			case 3: sprintf(file_ext,"bin"); break;
			case 4: sprintf(file_ext,"sgy"); break;
			case 5: sprintf(file_ext,"sgy"); break;
		}
		
		if ((SEISMO==1) || (SEISMO==4)){
			fprintf(fp," Seismograms of ");
			fprintf(fp," x-, y-, and z-component");
			fprintf(fp," of particle velocity.\n");
			fprintf(fp," output-files: \n ");
			fprintf(fp,"\t%s_x.%s\n\t%s_y.%s\n\t%s_z.%s\n",SEIS_FILE,file_ext,SEIS_FILE,file_ext,SEIS_FILE,file_ext);
		}
		if ((SEISMO==2) || (SEISMO==4)){
			fprintf(fp," Seismograms of pressure field (hydrophones).\n");
			fprintf(fp," output-file: \n ");
			fprintf(fp,"\t%s_p.%s\n",SEIS_FILE,file_ext);
		}
		if ((SEISMO==3) || (SEISMO==4)){
			fprintf(fp," Seismograms of curl (S-wave component) and div (P-wave component of wavefield).\n");
			fprintf(fp," output-files: \n ");
			fprintf(fp,"\t%s_rot.%s \n\t%s_div.%s\n",SEIS_FILE,file_ext,SEIS_FILE,file_ext);
			
		}		
		
		if (NDT==0) {NDT=1; fprintf(fp," NDT set to %d.\n",NDT);}
		else if (NDT<0) {
			NDT=-NDT;
			fprintf(fp," Negative NDT set to its absolute value %d.\n",NDT);
		}
		if (NDTSHIFT<0){
			NDTSHIFT=-NDTSHIFT;
			fprintf(fp," Negative NDTSHIFT set to its absolute value %d.\n",NDTSHIFT);
		}
		if (ns) {
			switch (NDT) {
				case 1 : strcpy(th1,"st"); break;
				case 2 : strcpy(th1,"nd"); break;
				case 3 : strcpy(th1,"rd"); break;
				default: strcpy(th1,"th"); break;
			}
			switch (NDTSHIFT) {
				case 1 : strcpy(th2,"st"); break;
				case 2 : strcpy(th2,"nd"); break;
				case 3 : strcpy(th2,"rd"); break;
				default: strcpy(th2,"th"); break;
			}			
			fprintf(fp," Amplitudes will be written every %d%s time-step, starting at the %d%s.\n",NDT,th1,NDTSHIFT,th2);
		}
		else{
			if ((SEIS_FORMAT[0]==2)||(SEIS_FORMAT[0]==3)) 
				fprintf(fp," Warning: seismogram files will be empty! \n");
		 	else if ((SEIS_FORMAT[0]==0)||(SEIS_FORMAT[0]==1)||(SEIS_FORMAT[0]==4)) 
				fprintf(fp," Warning: seismogram files will contain only headers! \n");
		}

		switch (SEIS_FORMAT[0]){
		case 0 :
		case 5 :
			fprintf(fp," Seismograms are written in SEG-Y format. \n");
			if (!SEIS_FORMAT[1]) fprintf(fp," \t textual header: ASCII \n");
			else if (SEIS_FORMAT[1]==1) fprintf(fp," \t textual header: EBCDIC \n");
			if (!SEIS_FORMAT[2]) fprintf(fp," \t byte order: little endian \n");
			else if (SEIS_FORMAT[2]==1) fprintf(fp," \t byte order: big endian \n");
			if (!SEIS_FORMAT[3]) fprintf(fp," \t data type: IEEE 4-byte floats \n");
			else if (SEIS_FORMAT[3]==1) fprintf(fp," \t data type: IBM 4-byte floats \n");
			if (!SEIS_FORMAT[4]) fprintf(fp," \t coordinate unit: meter \n");
			else if (SEIS_FORMAT[4]==1) fprintf(fp," \t coordinate unit: feet \n");
			break;
		
		case 1 :
			fprintf(fp," Seismograms are written in SU-format. \n");
			if (!SEIS_FORMAT[2]) fprintf(fp," \t byte order: little endian \n");
			else if (SEIS_FORMAT[2]==1) fprintf(fp," \t byte order: big endian \n");
			if (!SEIS_FORMAT[3]) fprintf(fp," \t data type: IEEE 4-byte floats \n");
			else if (SEIS_FORMAT[3]==1) fprintf(fp," \t CAUTION: data type: IBM 4-byte floats \n");
			if (!SEIS_FORMAT[4]) fprintf(fp," \t coordinate unit: meter \n");
			else if (SEIS_FORMAT[4]==1) fprintf(fp," \t coordinate unit: feet \n");
			break;
		case 2 :
			if (!SEIS_FORMAT[1]) fprintf(fp," Seismograms are written in ASCII. \n");
			else if (!SEIS_FORMAT[1]==1) fprintf(fp," Seismograms are written in EBCDIC. \n");
			if (!SEIS_FORMAT[4]) fprintf(fp," \t coordinate unit: meter \n");
			else if (SEIS_FORMAT[4]==1) fprintf(fp," \t coordinate unit: feet \n");			
			break;
		case 3 :
			fprintf(fp," Seismograms are written in binary format.");
			if (!SEIS_FORMAT[2]) fprintf(fp," \t byte order: little endian \n");
			else if (SEIS_FORMAT[2]==1) fprintf(fp," \t byte order: big endian \n");
			if (!SEIS_FORMAT[3]) fprintf(fp," \t data type: IEEE 4-byte floats \n");
			else if (SEIS_FORMAT[3]==1) fprintf(fp," \t data type: IBM 4-byte floats \n");
			if (!SEIS_FORMAT[4]) fprintf(fp," \t coordinate unit: meter \n");
			else if (SEIS_FORMAT[4]==1) fprintf(fp," \t coordinate unit: feet \n");			
			break;
		case 6 :fprintf(fp," Seismograms are written in pseudo SU-format (SEG-Y with trace headers only). \n");
			if (!SEIS_FORMAT[2]) fprintf(fp," \t byte order: little endian \n");
			else if (SEIS_FORMAT[2]==1) fprintf(fp," \t byte order: big endian \n");
			if (!SEIS_FORMAT[3]) fprintf(fp," \t data type: IEEE 4-byte floats \n");
			else if (SEIS_FORMAT[3]==1) fprintf(fp," \t CAUTION: data type: IBM 4-byte floats \n");
			if (!SEIS_FORMAT[4]) fprintf(fp," \t coordinate unit: meter \n");
			else if (SEIS_FORMAT[4]==1) fprintf(fp," \t coordinate unit: feet \n");
			break;
		case 7 :fprintf(fp," Seismograms are written in SU-format (output in meter, native endian and floats). \n");
			break;	
		default:
			err(" Sorry. Unknown format for seismic data! \n");
		}
		fprintf(fp," samplingrate of seismic data:                %e s\n",NDT*DT);
		if (!READREC) fprintf(fp," Trace-spacing: %e m\n", NGEOPH*DX);
		fprintf(fp," Number of samples per receiver:              %i \n", ns);
		if (!SEIS_FORMAT[5]) SEIS_FORMAT[5]=32767; /* default */
		if (ns<=abs(SEIS_FORMAT[5])) fprintf(fp," Number of samples per trace:                 %i \n", ns);
		else if (SEIS_FORMAT[5]<0){
			fprintf(fp," Number of samples per trace:                 %i \n", -SEIS_FORMAT[5]);
			fprintf(fp," Number of traces per receiver:               %i \n", ns / -SEIS_FORMAT[5]);
			fprintf(fp," Number of significant samples in last trace: %i \n", ns % -SEIS_FORMAT[5]);
		}
		else {
			fprintf(fp," Maximum allowed number of samples per trace: %i \n", SEIS_FORMAT[5]);
			err(" Sorry. Too many samples per receiver! \n");
		} 
		fprintf(fp," ----------------------------------------------------------\n");
		fprintf(fp,"\n");
		fprintf(fp,"\n");
	}
	fprintf(fp,"\n");
	fprintf(fp,"\nInversion method: %d",METHOD);
	fprintf(fp,"\n");
	fprintf(fp," ----------------------- INVERSION PARAMETER  ----------------------\n");
	fprintf(fp,"-------------------------In- and Output Files--------------------------------------\n");
	fprintf(fp," \n Gradients are written to FILE:%s\n",GRAD_FILE);
	fprintf(fp," \n Models are written to FILE:%s\n",MOD_OUT_FILE);
	/*fprintf(fp," \n Inversion Frequency:%4.2f\n",F_INV);*/
	fprintf(fp," \n Observed Seismograms:%s\n",SEIS_OBS_FILE);
	fprintf(fp,"\n External observed Seismograms: %i \n", EXTOBS);
	fprintf(fp," \n Inversion FILE:%s\n",INV_FILE);
	fprintf(fp," \n Hessian FILE:%s\n",HESS_FILE);
	
	fprintf(fp," \n-------------------------General---------------------------------------------------\n");
fprintf(fp," \n minimum/maximum_iteration_number: %d,%d\n",ITMIN,ITMAX);
fprintf(fp," \n filtering: %d\n",FILT);
fprintf(fp," \n maximum_number_frequencies_per_iteration: %d\n",NFMAX);
fprintf(fp," \n number_of_timestep_per_wavelength_used_for_inversion: %d\n",TAST);
436
437
fprintf(fp," \n average_model_parameter VP0=%5.2f m/s, VS0=%5.2f m/s, RHO0=%5.2f kg/m^3\n",VP0, VS0, RHO0);
fprintf(fp," \n parameter_class_weighting_factors_for_vp: %5.2f, vs: %5.2f, rho: %5.2f\n",WEIGHT[0], WEIGHT[1], WEIGHT[2]);
Simone Butzer's avatar
Simone Butzer committed
438
439
440
441
442
443
444
445
446
447
448
449
450

fprintf(fp," \n------------------------Steplength estimation----------------------------------------\n");
fprintf(fp,"\n number_of_shots_used_for_steplength_estimation: %d\n",NSHOTS_STEP);
fprintf(fp,"\n initial test steplength: %f\n",TESTSTEP);

fprintf(fp," \n------------------------Gradient preconditioning-------------------------------------\n");
fprintf(fp," \n Type_of_preconditioning:%d\n",DAMPTYPE);
fprintf(fp," \n------------------------Hessian preconditioning-----------------------------------------\n");
fprintf(fp," \n Apply_Hessian %d\n",HESS);
fprintf(fp,"Read_Hessian_from_file %d\n",READ_HESS);
fprintf(fp,"Part_of_receivers_used_for_Hessian %d",REC_HESS); 
fprintf(fp," \nWater_level_Hessian_for_vp/vs/rho %e \n",WATER_HESS[0]);
fprintf(fp," \n------------------------LBFGS-----------------------------------------\n");
451
452
453
fprintf(fp," \nLBFGS: %i \n",LBFGS);
fprintf(fp," Number_of_inverted_parameters_(NUMPAR): %i \n",NUMPAR);
fprintf(fp," Number_iterations_used_for_LBFGS: %i \n",BFGSNUM);
Simone Butzer's avatar
Simone Butzer committed
454
455
456
457
	
	
		
	fprintf(fp,"\n **********************************************************");
Simone Butzer's avatar
Simone Butzer committed
458
	fprintf(fp,"\n ******* PARAMETERS READ or PROCESSED within IFOS3D ********");
Simone Butzer's avatar
Simone Butzer committed
459
460
461
462
	fprintf(fp,"\n **********************************************************\n\n");


}