[cig-commits] r19198 - in seismo/2D/SPECFEM2D/trunk: DATA setup src/meshfem2D src/shared src/specfem2D
dkomati1 at geodynamics.org
dkomati1 at geodynamics.org
Mon Nov 14 15:26:13 PST 2011
Author: dkomati1
Date: 2011-11-14 15:26:12 -0800 (Mon, 14 Nov 2011)
New Revision: 19198
Modified:
seismo/2D/SPECFEM2D/trunk/DATA/Par_file.in
seismo/2D/SPECFEM2D/trunk/setup/constants.h.in
seismo/2D/SPECFEM2D/trunk/src/meshfem2D/read_materials.f90
seismo/2D/SPECFEM2D/trunk/src/meshfem2D/read_parameter_file.F90
seismo/2D/SPECFEM2D/trunk/src/meshfem2D/read_regions.f90
seismo/2D/SPECFEM2D/trunk/src/meshfem2D/save_databases.f90
seismo/2D/SPECFEM2D/trunk/src/shared/check_quality_external_mesh.f90
seismo/2D/SPECFEM2D/trunk/src/specfem2D/checkgrid.F90
seismo/2D/SPECFEM2D/trunk/src/specfem2D/create_color_image.f90
seismo/2D/SPECFEM2D/trunk/src/specfem2D/get_perm_cuthill_mckee.f90
seismo/2D/SPECFEM2D/trunk/src/specfem2D/initialize_simulation.F90
seismo/2D/SPECFEM2D/trunk/src/specfem2D/plotpost.F90
seismo/2D/SPECFEM2D/trunk/src/specfem2D/prepare_color_image.F90
seismo/2D/SPECFEM2D/trunk/src/specfem2D/read_databases.f90
seismo/2D/SPECFEM2D/trunk/src/specfem2D/set_sources.f90
seismo/2D/SPECFEM2D/trunk/src/specfem2D/specfem2D.F90
seismo/2D/SPECFEM2D/trunk/src/specfem2D/write_seismograms.F90
Log:
moved several parameters from setup/constants.h to DATA/Par_file
Modified: seismo/2D/SPECFEM2D/trunk/DATA/Par_file.in
===================================================================
--- seismo/2D/SPECFEM2D/trunk/DATA/Par_file.in 2011-11-14 17:54:46 UTC (rev 19197)
+++ seismo/2D/SPECFEM2D/trunk/DATA/Par_file.in 2011-11-14 23:26:12 UTC (rev 19198)
@@ -9,6 +9,7 @@
# parameters concerning partitioning
nproc = 1 # number of processes
partitioning_method = 3 # SCOTCH = 3, ascending order (very bad idea) = 1
+PERFORM_CUTHILL_MCKEE = .true. # perform inverse Cuthill-McKee (1969) optimization/permutation for mesh numbering
ngnod = 9 # number of control nodes per element (4 or 9)
initialfield = .false. # use a plane wave as source or not
@@ -24,6 +25,7 @@
# time step parameters
nt = 1600 # total number of time steps
deltat = 1.d-3 # duration of a time step
+USER_T0 = 0.0d0 # use this t0 as earliest starting time rather than the automatically calculated one
# source parameters
NSOURCES = 1 # number of sources [source info read in CMTSOLUTION file]
@@ -39,6 +41,7 @@
nreceiverlines = 1 # number of receiver lines
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)
+SU_FORMAT = .false. # output seismograms in Seismic Unix format (adjoint traces will be read in the same format)
# first receiver line (repeat these 6 lines and adjust nreceiverlines accordingly)
nrec = 11 # number of receivers
@@ -51,7 +54,7 @@
# display parameters
NTSTEP_BETWEEN_OUTPUT_INFO = 100 # display frequency in time steps
output_postscript_snapshot = .true. # output Postscript snapshot of the results
-output_color_image = .true. # output color image of the results
+output_color_image = .true. # output JPEG color image of the results
imagetype = 1 # display 1=displ 2=veloc 3=accel 4=pressure
cutsnaps = 1. # minimum amplitude in % for snapshots
meshvect = .true. # display mesh on vector plots or not
@@ -59,12 +62,17 @@
boundvect = .true. # display boundary conditions on plots
interpol = .true. # interpolation of the display or not
pointsdisp = 6 # points for interpolation of display (set to 1 for lower-left corner only)
-subsamp = 1 # subsampling of color snapshots
+subsamp_postscript = 1 # subsampling of background velocity model in PostScript snapshots
+factor_subsample_image = 1 # factor to subsample color images output by the code (useful for very large models)
+POWER_DISPLAY_COLOR = 0.30d0 # non linear display to enhance small amplitudes in color images
+DRAW_WATER_CONSTANT_BLUE_IN_JPG = .true. # display acoustic layers as constant blue in JPEG images, because they likely correspond to water
sizemax_arrows = 1.d0 # maximum size of arrows on vector plots in cm
+US_LETTER = .false. # US letter paper or European A4
+USE_SNAPSHOT_NUMBER_IN_FILENAME = .false. # use snapshot number in the file name of JPEG color snapshots instead of the time step
gnuplot = .false. # generate a GNUPLOT file for the grid
output_grid = .false. # save the grid in a text file or not
output_energy = .false. # compute and output acoustic and elastic energy (slows down the code significantly)
-output_wavefield_snapshot = .false. # output Ux,Uy,Uz text file for each output time (big files)
+output_wavefield_snapshot = .false. # output Ux,Uy,Uz text file for each output time (big files)
# velocity and density models
nbmodels = 4 # nb of different models
Modified: seismo/2D/SPECFEM2D/trunk/setup/constants.h.in
===================================================================
--- seismo/2D/SPECFEM2D/trunk/setup/constants.h.in 2011-11-14 17:54:46 UTC (rev 19197)
+++ seismo/2D/SPECFEM2D/trunk/setup/constants.h.in 2011-11-14 23:26:12 UTC (rev 19198)
@@ -34,11 +34,7 @@
! this flag is ignored in the case of a serial simulation
logical, parameter :: FURTHER_REDUCE_CACHE_MISSES = .true.
-! output seismograms in Seismic Unix format (adjoint traces will be read in the same format)
- logical,parameter :: SU_FORMAT=.false.
-
! for inverse Cuthill-McKee (1969) permutation
- logical, parameter :: PERFORM_CUTHILL_MCKEE = .true.
logical, parameter :: INVERSE = .true.
logical, parameter :: FACE = .false.
integer, parameter :: NGNOD_QUADRANGLE = 4
@@ -55,17 +51,6 @@
! add MPI barriers and suppress seismograms if we generate traces of the run for analysis with "ParaVer"
logical, parameter :: GENERATE_PARAVER_TRACES = .false.
-! factor to subsample color images output by the code (useful for very large models)
- integer, parameter :: factor_subsample_image = 1
-
-! use snapshot number in the file name of JPG color snapshots instead of the time step
- logical, parameter :: USE_SNAPSHOT_NUMBER_IN_FILENAME = .false.
-
-! display acoustic layers as constant blue, because they likely correspond to water in the case of ocean acoustics
-! or in the case of offshore oil industry experiments.
-! (if off, display them as greyscale, as for elastic or poroelastic elements)
- logical, parameter :: DRAW_WATER_CONSTANT_BLUE_IN_JPG = .true.
-
! option to display only part of the mesh and not the whole mesh,
! for instance to analyze Cuthill-McKee mesh partitioning etc.
! Possible values are:
@@ -77,11 +62,6 @@
! number of spectral elements to display in each subset when a fixed subset size is used (option 4 above)
integer, parameter :: NSPEC_DISPLAY_SUBSET = 2300
-! use this t0 as earliest starting time rather than the automatically calculated one
-! (must be positive and bigger than the automatically one to be effective;
-! simulation will start at t = - t0)
- double precision, parameter :: USER_T0 = 0.0d0
-
!--- beginning of Nicolas Le Goff's constants for an unstructured CUBIT/METIS/SCOTCH mesh
! maximum number of neighbors per element
@@ -160,12 +140,6 @@
! was found by trial and error
double precision, parameter :: SOURCE_DECAY_MIMIC_TRIANGLE = 1.628d0
-! non linear display to enhance small amplitudes in color images
- double precision, parameter :: POWER_DISPLAY_COLOR = 0.30d0
-
-! US letter paper or European A4
- logical, parameter :: US_LETTER = .false.
-
! X and Z axis origin of PostScript plot in centimeters
double precision, parameter :: ORIG_X = 2.4d0
double precision, parameter :: ORIG_Z = 2.9d0
@@ -181,17 +155,15 @@
double precision, parameter :: RPERCENTX = 70.0d0,RPERCENTZ = 77.0d0
! flag to indicate an isotropic elastic/acoustic material
- integer, parameter :: ISOTROPIC_MATERIAL = 1
-
! flag to indicate an anisotropic material
- integer, parameter :: ANISOTROPIC_MATERIAL = 2
-
! flag to indicate a poroelastic material
+ integer, parameter :: ISOTROPIC_MATERIAL = 1
+ integer, parameter :: ANISOTROPIC_MATERIAL = 2
integer, parameter :: POROELASTIC_MATERIAL = 3
! file number for interface file
integer, parameter :: IIN_INTERFACES = 15
! ignore variable name field (junk) at the beginning of each input line
- logical, parameter :: IGNORE_JUNK = .true.,DONT_IGNORE_JUNK = .false.
+ logical, parameter :: IGNORE_JUNK = .true., DONT_IGNORE_JUNK = .false.
Modified: seismo/2D/SPECFEM2D/trunk/src/meshfem2D/read_materials.f90
===================================================================
--- seismo/2D/SPECFEM2D/trunk/src/meshfem2D/read_materials.f90 2011-11-14 17:54:46 UTC (rev 19197)
+++ seismo/2D/SPECFEM2D/trunk/src/meshfem2D/read_materials.f90 2011-11-14 23:26:12 UTC (rev 19198)
@@ -94,10 +94,6 @@
! reads in material parameters
do imaterial=1,nb_materials
- !call read_material_parameters(IIN,DONT_IGNORE_JUNK,i,icodematread, &
- ! val0read,val1read,val2read,val3read, &
- ! val4read,val5read,val6read,val7read, &
- ! val8read,val9read,val10read,val11read,val12read)
call read_material_parameters_p(i,icodematread, &
val0read,val1read,val2read,val3read, &
Modified: seismo/2D/SPECFEM2D/trunk/src/meshfem2D/read_parameter_file.F90
===================================================================
--- seismo/2D/SPECFEM2D/trunk/src/meshfem2D/read_parameter_file.F90 2011-11-14 17:54:46 UTC (rev 19197)
+++ seismo/2D/SPECFEM2D/trunk/src/meshfem2D/read_parameter_file.F90 2011-11-14 23:26:12 UTC (rev 19198)
@@ -101,7 +101,7 @@
integer :: imagetype
double precision :: cutsnaps
logical :: meshvect,modelvect,boundvect,interpol
- integer :: pointsdisp,subsamp
+ integer :: pointsdisp,subsamp_postscript
double precision :: sizemax_arrows
logical :: gnuplot,output_grid,output_energy,output_wavefield_snapshot
logical :: plot_lowerleft_corner_only
@@ -114,6 +114,34 @@
double precision, dimension(:),pointer :: rho_f,phi,tortuosity,permxx,permxz,&
permzz,kappa_s,kappa_f,kappa_fr,eta_f,mu_fr
+! factor to subsample color images output by the code (useful for very large models)
+ integer :: factor_subsample_image
+
+! use snapshot number in the file name of JPG color snapshots instead of the time step
+ logical :: USE_SNAPSHOT_NUMBER_IN_FILENAME
+
+! display acoustic layers as constant blue, because they likely correspond to water in the case of ocean acoustics
+! or in the case of offshore oil industry experiments.
+! (if off, display them as greyscale, as for elastic or poroelastic elements)
+ logical :: DRAW_WATER_CONSTANT_BLUE_IN_JPG
+
+! US letter paper or European A4
+ logical :: US_LETTER
+
+! non linear display to enhance small amplitudes in color images
+ double precision :: POWER_DISPLAY_COLOR
+
+! perform inverse Cuthill-McKee (1969) permutation for mesh numbering
+ logical :: PERFORM_CUTHILL_MCKEE
+
+! output seismograms in Seismic Unix format (adjoint traces will be read in the same format)
+ logical :: SU_FORMAT
+
+! use this t0 as earliest starting time rather than the automatically calculated one
+! (must be positive and bigger than the automatically one to be effective;
+! simulation will start at t = - t0)
+ double precision :: USER_T0
+
contains
subroutine read_parameter_file()
@@ -128,7 +156,6 @@
integer,external :: err_occurred
! read file names and path for output
- !call read_value_string(IIN,IGNORE_JUNK,title)
call read_value_string_p(title, 'solver.title')
if(err_occurred() /= 0) stop 'error reading parameter 1 in Par_file'
@@ -137,117 +164,100 @@
print *
! read type of simulation
- !call read_value_integer(IIN,IGNORE_JUNK,SIMULATION_TYPE)
call read_value_integer_p(SIMULATION_TYPE, 'solver.SIMULATION_TYPE')
if(err_occurred() /= 0) stop 'error reading parameter 2 in Par_file'
- !call read_value_integer(IIN,IGNORE_JUNK,NOISE_TOMOGRAPHY)
call read_value_integer_p(NOISE_TOMOGRAPHY, 'solver.NOISE_TOMOGRAPHY')
if(err_occurred() /= 0) stop 'error reading parameter NOISE_TOMOGRAPHY in Par_file'
- !call read_value_logical(IIN,IGNORE_JUNK,SAVE_FORWARD)
call read_value_logical_p(SAVE_FORWARD, 'solver.SAVE_FORWARD')
if(err_occurred() /= 0) stop 'error reading parameter 3 in Par_file'
! read info about partitioning
- !call read_value_integer(IIN,IGNORE_JUNK,nproc)
call read_value_integer_p(nproc, 'solver.nproc')
if(err_occurred() /= 0) stop 'error reading parameter 4 in Par_file'
- !call read_value_integer(IIN,IGNORE_JUNK,partitioning_method)
call read_value_integer_p(partitioning_method, 'mesher.partitioning_method')
- if(err_occurred() /= 0) stop 'error reading parameter 5 in Par_file'
+ if(err_occurred() /= 0) stop 'error reading parameter 5a in Par_file'
- !call read_value_integer(IIN,IGNORE_JUNK,ngnod)
+ call read_value_logical_p(PERFORM_CUTHILL_MCKEE, 'mesher.PERFORM_CUTHILL_MCKEE')
+ if(err_occurred() /= 0) stop 'error reading parameter 5b in Par_file'
+
call read_value_integer_p(ngnod, 'mesher.ngnod')
if(err_occurred() /= 0) stop 'error reading parameter 6 in Par_file'
- !call read_value_logical(IIN,IGNORE_JUNK,initialfield)
call read_value_logical_p(initialfield, 'solver.initialfield')
if(err_occurred() /= 0) stop 'error reading parameter 7 in Par_file'
- !call read_value_logical(IIN,IGNORE_JUNK,add_Bielak_conditions)
call read_value_logical_p(add_Bielak_conditions, 'solver.add_Bielak_conditions')
if(err_occurred() /= 0) stop 'error reading parameter 8 in Par_file'
- !call read_value_logical(IIN,IGNORE_JUNK,assign_external_model)
call read_value_logical_p(assign_external_model, 'mesher.assign_external_model')
if(err_occurred() /= 0) stop 'error reading parameter 9 in Par_file'
- !call read_value_logical(IIN,IGNORE_JUNK,READ_EXTERNAL_SEP_FILE)
call read_value_logical_p(READ_EXTERNAL_SEP_FILE, 'mesher.READ_EXTERNAL_SEP_FILE')
if(err_occurred() /= 0) stop 'error reading parameter 10 in Par_file'
- !call read_value_logical(IIN,IGNORE_JUNK,TURN_ATTENUATION_ON)
call read_value_logical_p(TURN_ATTENUATION_ON, 'solver.TURN_ATTENUATION_ON')
if(err_occurred() /= 0) stop 'error reading parameter 11 in Par_file'
! read viscous attenuation parameters (poroelastic media)
- !call read_value_logical(IIN,IGNORE_JUNK,TURN_VISCATTENUATION_ON)
call read_value_logical_p(TURN_VISCATTENUATION_ON, 'solver.TURN_VISCATTENUATION_ON')
if(err_occurred() /= 0) stop 'error reading parameter 12 in Par_file'
- !call read_value_double_precision(IIN,IGNORE_JUNK,Q0)
call read_value_double_precision_p(Q0, 'solver.Q0')
if(err_occurred() /= 0) stop 'error reading parameter 13 in Par_file'
- !call read_value_double_precision(IIN,IGNORE_JUNK,freq0)
call read_value_double_precision_p(freq0, 'solver.freq0')
if(err_occurred() /= 0) stop 'error reading parameter 14 in Par_file'
! determine if body or surface (membrane) waves calculation
- !call read_value_logical(IIN,IGNORE_JUNK,p_sv)
call read_value_logical_p(p_sv, 'solver.p_sv')
if(err_occurred() /= 0) stop 'error reading parameter 15 in Par_file'
! read time step parameters
- !call read_value_integer(IIN,IGNORE_JUNK,nt)
call read_value_integer_p(nt, 'solver.nt')
if(err_occurred() /= 0) stop 'error reading parameter 16 in Par_file'
- !call read_value_double_precision(IIN,IGNORE_JUNK,deltat)
call read_value_double_precision_p(deltat, 'solver.deltat')
- if(err_occurred() /= 0) stop 'error reading parameter 17 in Par_file'
+ if(err_occurred() /= 0) stop 'error reading parameter 17a in Par_file'
+ call read_value_double_precision_p(USER_T0, 'solver.USER_T0')
+ if(err_occurred() /= 0) stop 'error reading parameter 17b in Par_file'
+
! read source infos
- !call read_value_integer(IIN,IGNORE_JUNK,NSOURCES)
call read_value_integer_p(NSOURCES, 'solver.NSOURCES')
if(err_occurred() /= 0) stop 'error reading parameter 18 in Par_file'
- !call read_value_logical(IIN,IGNORE_JUNK,force_normal_to_surface)
call read_value_logical_p(force_normal_to_surface, 'solver.force_normal_to_surface')
if(err_occurred() /= 0) stop 'error reading parameter 19 in Par_file'
! read constants for attenuation
- !call read_value_integer(IIN,IGNORE_JUNK,N_SLS)
call read_value_integer_p(N_SLS, 'solver.N_SLS')
if(err_occurred() /= 0) stop 'error reading parameter 20 in Par_file'
- !call read_value_double_precision(IIN,IGNORE_JUNK,f0_attenuation)
call read_value_double_precision_p(f0_attenuation, 'solver.f0_attenuation')
if(err_occurred() /= 0) stop 'error reading parameter 21 in Par_file'
! read receiver line parameters
- !call read_value_integer(IIN,IGNORE_JUNK,seismotype)
call read_value_integer_p(seismotype, 'solver.seismotype')
if(err_occurred() /= 0) stop 'error reading parameter 22 in Par_file'
- !call read_value_logical(IIN,IGNORE_JUNK,generate_STATIONS)
call read_value_logical_p(generate_STATIONS, 'solver.generate_STATIONS')
if(err_occurred() /= 0) stop 'error reading parameter 23 in Par_file'
- !call read_value_integer(IIN,IGNORE_JUNK,nreceiverlines)
call read_value_integer_p(nreceiverlines, 'solver.nreceiverlines')
if(err_occurred() /= 0) stop 'error reading parameter 24 in Par_file'
- !call read_value_double_precision(IIN,IGNORE_JUNK,anglerec)
call read_value_double_precision_p(anglerec, 'solver.anglerec')
if(err_occurred() /= 0) stop 'error reading parameter 25 in Par_file'
- !call read_value_logical(IIN,IGNORE_JUNK,rec_normal_to_surface)
call read_value_logical_p(rec_normal_to_surface, 'solver.rec_normal_to_surface')
- if(err_occurred() /= 0) stop 'error reading parameter 26 in Par_file'
+ if(err_occurred() /= 0) stop 'error reading parameter 26a in Par_file'
+ call read_value_logical_p(SU_FORMAT, 'solver.SU_FORMAT')
+ if(err_occurred() /= 0) stop 'error reading parameter 26b in Par_file'
+
if(nreceiverlines < 1) stop 'number of receiver lines must be greater than 1'
! allocate receiver line arrays
@@ -261,27 +271,21 @@
! loop on all the receiver lines
do ireceiverlines = 1,nreceiverlines
- !call read_value_integer(IIN,IGNORE_JUNK,nrec(ireceiverlines))
call read_value_integer_next_p(nrec(ireceiverlines),'solver.nrec')
if(err_occurred() /= 0) stop 'error reading parameter 27 in Par_file'
- !call read_value_double_precision(IIN,IGNORE_JUNK,xdeb(ireceiverlines))
call read_value_double_prec_next_p(xdeb(ireceiverlines),'solver.xdeb')
if(err_occurred() /= 0) stop 'error reading parameter 28 in Par_file'
- !call read_value_double_precision(IIN,IGNORE_JUNK,zdeb(ireceiverlines))
call read_value_double_prec_next_p(zdeb(ireceiverlines),'solver.zdeb')
if(err_occurred() /= 0) stop 'error reading parameter 29 in Par_file'
- !call read_value_double_precision(IIN,IGNORE_JUNK,xfin(ireceiverlines))
call read_value_double_prec_next_p(xfin(ireceiverlines),'solver.xfin')
if(err_occurred() /= 0) stop 'error reading parameter 30 in Par_file'
- !call read_value_double_precision(IIN,IGNORE_JUNK,zfin(ireceiverlines))
call read_value_double_prec_next_p(zfin(ireceiverlines),'solver.zfin')
if(err_occurred() /= 0) stop 'error reading parameter 31 in Par_file'
- !call read_value_logical(IIN,IGNORE_JUNK,enreg_surf_same_vertical(ireceiverlines))
call read_value_logical_next_p(enreg_surf_same_vertical(ireceiverlines),'solver.enreg_surf_same_vertical')
if(err_occurred() /= 0) stop 'error reading parameter 32 in Par_file'
@@ -291,72 +295,70 @@
enddo
! read display parameters
- !call read_value_integer(IIN,IGNORE_JUNK,NTSTEP_BETWEEN_OUTPUT_INFO)
call read_value_integer_p(NTSTEP_BETWEEN_OUTPUT_INFO, 'solver.NTSTEP_BETWEEN_OUTPUT_INFO')
if(err_occurred() /= 0) stop 'error reading parameter 33 in Par_file'
- !call read_value_logical(IIN,IGNORE_JUNK,output_postscript_snapshot)
call read_value_logical_p(output_postscript_snapshot, 'solver.output_postscript_snapshot')
if(err_occurred() /= 0) stop 'error reading parameter 34 in Par_file'
- !call read_value_logical(IIN,IGNORE_JUNK,output_color_image)
call read_value_logical_p(output_color_image, 'solver.output_color_image')
if(err_occurred() /= 0) stop 'error reading parameter 35 in Par_file'
- !call read_value_integer(IIN,IGNORE_JUNK,imagetype)
call read_value_integer_p(imagetype, 'solver.imagetype')
if(err_occurred() /= 0) stop 'error reading parameter 36 in Par_file'
- !call read_value_double_precision(IIN,IGNORE_JUNK,cutsnaps)
call read_value_double_precision_p(cutsnaps, 'solver.cutsnaps')
if(err_occurred() /= 0) stop 'error reading parameter 37 in Par_file'
- !call read_value_logical(IIN,IGNORE_JUNK,meshvect)
call read_value_logical_p(meshvect, 'solver.meshvect')
if(err_occurred() /= 0) stop 'error reading parameter 38 in Par_file'
- !call read_value_logical(IIN,IGNORE_JUNK,modelvect)
call read_value_logical_p(modelvect, 'solver.modelvect')
if(err_occurred() /= 0) stop 'error reading parameter 39 in Par_file'
- !call read_value_logical(IIN,IGNORE_JUNK,boundvect)
call read_value_logical_p(boundvect, 'solver.boundvect')
if(err_occurred() /= 0) stop 'error reading parameter 40 in Par_file'
- !call read_value_logical(IIN,IGNORE_JUNK,interpol)
call read_value_logical_p(interpol, 'solver.interpol')
if(err_occurred() /= 0) stop 'error reading parameter 41 in Par_file'
- !call read_value_integer(IIN,IGNORE_JUNK,pointsdisp)
call read_value_integer_p(pointsdisp, 'solver.pointsdisp')
if(err_occurred() /= 0) stop 'error reading parameter 42 in Par_file'
- !call read_value_integer(IIN,IGNORE_JUNK,subsamp)
- call read_value_integer_p(subsamp, 'solver.subsamp')
- if(err_occurred() /= 0) stop 'error reading parameter 43 in Par_file'
+ call read_value_integer_p(subsamp_postscript, 'solver.subsamp_postscript')
+ if(err_occurred() /= 0) stop 'error reading parameter 43a in Par_file'
- !call read_value_double_precision(IIN,IGNORE_JUNK,sizemax_arrows)
+ call read_value_integer_p(factor_subsample_image, 'solver.factor_subsample_image')
+ if(err_occurred() /= 0) stop 'error reading parameter 43b in Par_file'
+
+ call read_value_double_precision_p(POWER_DISPLAY_COLOR, 'solver.POWER_DISPLAY_COLOR')
+ if(err_occurred() /= 0) stop 'error reading parameter 43c in Par_file'
+
+ call read_value_logical_p(DRAW_WATER_CONSTANT_BLUE_IN_JPG, 'solver.DRAW_WATER_CONSTANT_BLUE_IN_JPG')
+ if(err_occurred() /= 0) stop 'error reading parameter 43d in Par_file'
+
call read_value_double_precision_p(sizemax_arrows, 'solver.sizemax_arrows')
- if(err_occurred() /= 0) stop 'error reading parameter 44 in Par_file'
+ if(err_occurred() /= 0) stop 'error reading parameter 44a in Par_file'
- !call read_value_logical(IIN,IGNORE_JUNK,gnuplot)
+ call read_value_logical_p(US_LETTER, 'solver.US_LETTER')
+ if(err_occurred() /= 0) stop 'error reading parameter 44b in Par_file'
+
+ call read_value_logical_p(USE_SNAPSHOT_NUMBER_IN_FILENAME, 'solver.USE_SNAPSHOT_NUMBER_IN_FILENAME')
+ if(err_occurred() /= 0) stop 'error reading parameter 44c in Par_file'
+
call read_value_logical_p(gnuplot, 'solver.gnuplot')
if(err_occurred() /= 0) stop 'error reading parameter 45 in Par_file'
- !call read_value_logical(IIN,IGNORE_JUNK,output_grid)
call read_value_logical_p(output_grid, 'solver.output_grid')
if(err_occurred() /= 0) stop 'error reading parameter 46 in Par_file'
- !call read_value_logical(IIN,IGNORE_JUNK,output_energy)
call read_value_logical_p(output_energy, 'solver.output_energy')
if(err_occurred() /= 0) stop 'error reading parameter 47 in Par_file'
- !call read_value_logical(IIN,IGNORE_JUNK,output_wavefield_snapshot)
call read_value_logical_p(output_wavefield_snapshot, 'solver.output_wavefield_snapshot')
if(err_occurred() /= 0) stop 'error reading parameter 48 in Par_file'
! read the different material materials
- !call read_value_integer(IIN,IGNORE_JUNK,nb_materials)
call read_value_integer_p(nb_materials, 'mesher.nbmodels')
if(err_occurred() /= 0) stop 'error reading parameter 49 in Par_file'
@@ -393,12 +395,10 @@
eta_f,mu_fr)
! boolean defining whether internal or external mesh
- !call read_value_logical(IIN,IGNORE_JUNK,read_external_mesh)
call read_value_logical_p(read_external_mesh, 'mesher.read_external_mesh')
if(err_occurred() /= 0) stop 'error reading parameter 50 in Par_file'
! boolean defining whether to use any absorbing boundaries
- !call read_value_logical(IIN,IGNORE_JUNK,any_abs)
call read_value_logical_p(any_abs, 'solver.absorbing_conditions')
if(err_occurred() /= 0) stop 'error reading parameter 51 in Par_file'
@@ -409,27 +409,21 @@
if( read_external_mesh ) then
! read info about external mesh
- !call read_value_string(IIN,IGNORE_JUNK,mesh_file)
call read_value_string_p(mesh_file, 'mesher.mesh_file')
if(err_occurred() /= 0) stop 'error reading parameter 52 in Par_file'
- !call read_value_string(IIN,IGNORE_JUNK,nodes_coords_file)
call read_value_string_p(nodes_coords_file, 'mesher.nodes_coords_file')
if(err_occurred() /= 0) stop 'error reading parameter 53 in Par_file'
- !call read_value_string(IIN,IGNORE_JUNK,materials_file)
call read_value_string_p(materials_file, 'mesher.materials_file')
if(err_occurred() /= 0) stop 'error reading parameter 54 in Par_file'
- !call read_value_string(IIN,IGNORE_JUNK,free_surface_file)
call read_value_string_p(free_surface_file, 'mesher.free_surface_file')
if(err_occurred() /= 0) stop 'error reading parameter 55 in Par_file'
- !call read_value_string(IIN,IGNORE_JUNK,absorbing_surface_file)
call read_value_string_p(absorbing_surface_file, 'mesher.absorbing_surface_file')
if(err_occurred() /= 0) stop 'error reading parameter 56 in Par_file'
- !call read_value_string(IIN,IGNORE_JUNK,tangential_detection_curve_file)
call read_value_string_p(tangential_detection_curve_file, 'mesher.tangential_detection_curve_file')
if(err_occurred() /= 0) stop 'error reading parameter 57 in Par_file'
@@ -439,37 +433,29 @@
! internal mesh parameters
! interfaces file
- !call read_value_string(IIN,IGNORE_JUNK,interfacesfile)
call read_value_string_p(interfacesfile, 'mesher.interfacesfile')
if(err_occurred() /= 0) stop 'error reading parameter 58 in Par_file'
! read grid parameters
- !call read_value_double_precision(IIN,IGNORE_JUNK,xmin)
call read_value_double_precision_p(xmin, 'mesher.xmin')
if(err_occurred() /= 0) stop 'error reading parameter 59 in Par_file'
- !call read_value_double_precision(IIN,IGNORE_JUNK,xmax)
call read_value_double_precision_p(xmax, 'mesher.xmax')
if(err_occurred() /= 0) stop 'error reading parameter 60 in Par_file'
- !call read_value_integer(IIN,IGNORE_JUNK,nx)
call read_value_integer_p(nx, 'mesher.nx')
if(err_occurred() /= 0) stop 'error reading parameter 61 in Par_file'
! read absorbing boundary parameters
- !call read_value_logical(IIN,IGNORE_JUNK,absbottom)
call read_value_logical_p(absbottom, 'solver.absorbbottom')
if(err_occurred() /= 0) stop 'error reading parameter 62 in Par_file'
- !call read_value_logical(IIN,IGNORE_JUNK,absright)
call read_value_logical_p(absright, 'solver.absorbright')
if(err_occurred() /= 0) stop 'error reading parameter 63 in Par_file'
- !call read_value_logical(IIN,IGNORE_JUNK,abstop)
call read_value_logical_p(abstop, 'solver.absorbtop')
if(err_occurred() /= 0) stop 'error reading parameter 64 in Par_file'
- !call read_value_logical(IIN,IGNORE_JUNK,absleft)
call read_value_logical_p(absleft, 'solver.absorbleft')
if(err_occurred() /= 0) stop 'error reading parameter 65 in Par_file'
Modified: seismo/2D/SPECFEM2D/trunk/src/meshfem2D/read_regions.f90
===================================================================
--- seismo/2D/SPECFEM2D/trunk/src/meshfem2D/read_regions.f90 2011-11-14 17:54:46 UTC (rev 19197)
+++ seismo/2D/SPECFEM2D/trunk/src/meshfem2D/read_regions.f90 2011-11-14 23:26:12 UTC (rev 19198)
@@ -67,7 +67,6 @@
integer,external :: err_occurred
! read the material numbers for each region
- !call read_value_integer(IIN,IGNORE_JUNK,nbregion)
call read_value_integer_p(nbregion, 'mesher.nbregions')
if(err_occurred() /= 0) stop 'error reading parameter nbregions in Par_file'
@@ -80,9 +79,6 @@
do iregion = 1,nbregion
- !call read_region_coordinates(IIN,DONT_IGNORE_JUNK,ixdebregion,ixfinregion, &
- ! izdebregion,izfinregion,imaterial_number)
-
call read_region_coordinates_p(ixdebregion,ixfinregion, &
izdebregion,izfinregion,imaterial_number)
Modified: seismo/2D/SPECFEM2D/trunk/src/meshfem2D/save_databases.f90
===================================================================
--- seismo/2D/SPECFEM2D/trunk/src/meshfem2D/save_databases.f90 2011-11-14 17:54:46 UTC (rev 19197)
+++ seismo/2D/SPECFEM2D/trunk/src/meshfem2D/save_databases.f90 2011-11-14 23:26:12 UTC (rev 19198)
@@ -112,8 +112,8 @@
write(15,*) 'output_postscript_snapshot output_color_image colors numbers'
write(15,*) output_postscript_snapshot,output_color_image,' 1 0'
- write(15,*) 'meshvect modelvect boundvect cutsnaps subsamp sizemax_arrows'
- write(15,*) meshvect,modelvect,boundvect,cutsnaps,subsamp,sizemax_arrows
+ write(15,*) 'meshvect modelvect boundvect cutsnaps subsamp_postscript sizemax_arrows'
+ write(15,*) meshvect,modelvect,boundvect,cutsnaps,subsamp_postscript,sizemax_arrows
write(15,*) 'anglerec'
write(15,*) anglerec
@@ -136,6 +136,30 @@
write(15,*) 'p_sv'
write(15,*) p_sv
+ write(15,*) 'factor_subsample_image'
+ write(15,*) factor_subsample_image
+
+ write(15,*) 'USE_SNAPSHOT_NUMBER_IN_FILENAME'
+ write(15,*) USE_SNAPSHOT_NUMBER_IN_FILENAME
+
+ write(15,*) 'DRAW_WATER_CONSTANT_BLUE_IN_JPG'
+ write(15,*) DRAW_WATER_CONSTANT_BLUE_IN_JPG
+
+ write(15,*) 'US_LETTER'
+ write(15,*) US_LETTER
+
+ write(15,*) 'POWER_DISPLAY_COLOR'
+ write(15,*) POWER_DISPLAY_COLOR
+
+ write(15,*) 'PERFORM_CUTHILL_MCKEE'
+ write(15,*) PERFORM_CUTHILL_MCKEE
+
+ write(15,*) 'SU_FORMAT'
+ write(15,*) SU_FORMAT
+
+ write(15,*) 'USER_T0'
+ write(15,*) USER_T0
+
write(15,*) 'nt deltat'
write(15,*) nt,deltat
write(15,*) 'NSOURCES'
Modified: seismo/2D/SPECFEM2D/trunk/src/shared/check_quality_external_mesh.f90
===================================================================
--- seismo/2D/SPECFEM2D/trunk/src/shared/check_quality_external_mesh.f90 2011-11-14 17:54:46 UTC (rev 19197)
+++ seismo/2D/SPECFEM2D/trunk/src/shared/check_quality_external_mesh.f90 2011-11-14 23:26:12 UTC (rev 19198)
@@ -98,9 +98,6 @@
logical :: read_external_mesh
character(len=256) :: mesh_file, nodes_coords_file
- ! ignore variable name field (junk) at the beginning of each input line
- !logical, parameter :: IGNORE_JUNK = .true.
-
integer :: NPOIN_unique_needed
integer, dimension(:), allocatable :: ibool_reduced
logical, dimension(:), allocatable :: mask_ibool
@@ -115,29 +112,17 @@
print *,'Reading the parameter file ... '
print *
- !open(unit=IIN,file='DATA/Par_file',status='old')
call open_parameter_file()
- ! read and ignore file names and path for output
- !call read_value_string(IIN,IGNORE_JUNK,title)
- !call read_value_string(IIN,IGNORE_JUNK,interfacesfile)
-
- ! read and ignore type of simulation
- !call read_value_integer(IIN,IGNORE_JUNK,SIMULATION_TYPE)
- !call read_value_logical(IIN,IGNORE_JUNK,SAVE_FORWARD)
-
! read info about external mesh
- !call read_value_logical(IIN,IGNORE_JUNK,read_external_mesh)
call read_value_logical_p(read_external_mesh, 'mesher.read_external_mesh')
if(err_occurred() /= 0) stop 'error reading parameter read_external_mesh in Par_file'
if(.not. read_external_mesh) stop 'this program is designed for read_external_mesh = .true.'
- !call read_value_string(IIN,IGNORE_JUNK,mesh_file)
call read_value_string_p(mesh_file, 'mesher.mesh_file')
if(err_occurred() /= 0) stop 'error reading parameter mesh_file in Par_file'
- !call read_value_string(IIN,IGNORE_JUNK,nodes_coords_file)
call read_value_string_p(nodes_coords_file, 'mesher.nodes_coords_file')
if(err_occurred() /= 0) stop 'error reading parameter nodes_coords_file in Par_file'
Modified: seismo/2D/SPECFEM2D/trunk/src/specfem2D/checkgrid.F90
===================================================================
--- seismo/2D/SPECFEM2D/trunk/src/specfem2D/checkgrid.F90 2011-11-14 17:54:46 UTC (rev 19197)
+++ seismo/2D/SPECFEM2D/trunk/src/specfem2D/checkgrid.F90 2011-11-14 23:26:12 UTC (rev 19198)
@@ -50,7 +50,7 @@
coorg,xinterp,zinterp,shapeint,knods,simulation_title, &
npgeo,pointsdisp,ngnod,any_elastic,any_poroelastic,all_anisotropic, &
myrank,nproc,NSOURCES,poroelastic, &
- freq0,Q0,TURN_VISCATTENUATION_ON)
+ freq0,Q0,TURN_VISCATTENUATION_ON,US_LETTER)
! check the mesh, stability and number of points per wavelength
@@ -91,6 +91,9 @@
double precision :: coorg(NDIM,npgeo)
+! US letter paper or European A4
+ logical :: US_LETTER
+
! title of the plot
character(len=60) :: simulation_title
Modified: seismo/2D/SPECFEM2D/trunk/src/specfem2D/create_color_image.f90
===================================================================
--- seismo/2D/SPECFEM2D/trunk/src/specfem2D/create_color_image.f90 2011-11-14 17:54:46 UTC (rev 19197)
+++ seismo/2D/SPECFEM2D/trunk/src/specfem2D/create_color_image.f90 2011-11-14 23:26:12 UTC (rev 19198)
@@ -43,7 +43,8 @@
!========================================================================
subroutine create_color_image(color_image_2D_data,iglob_image_color_2D, &
- NX,NY,it,isnapshot_number,cutsnaps,image_color_vp_display)
+ NX,NY,it,isnapshot_number,cutsnaps,image_color_vp_display, &
+ USE_SNAPSHOT_NUMBER_IN_FILENAME,POWER_DISPLAY_COLOR)
! display a given field as a red and blue color JPEG image
@@ -71,6 +72,12 @@
character(len=100) :: filename
+! non linear display to enhance small amplitudes in color images
+ double precision :: POWER_DISPLAY_COLOR
+
+! use snapshot number in the file name of JPG color snapshots instead of the time step
+ logical :: USE_SNAPSHOT_NUMBER_IN_FILENAME
+
! open the image file
! slightly change the beginning of the file name depending if we use the time step of the image number, to avoid confusion
if(USE_SNAPSHOT_NUMBER_IN_FILENAME) then
@@ -184,233 +191,3 @@
end subroutine create_color_image
-!========================================================================
-
-! older (now unused) version that first creates a PNM image and then uses "convert" from ImageMagick to create a JPEG file
- subroutine create_color_image_from_PNM(color_image_2D_data,iglob_image_color_2D, &
- NX,NY,it,cutsnaps,image_color_vp_display)
-
-! display a given field as a red and blue color JPEG image
-
-! to display the snapshots : display image*.jpg
-
-! when compiling with Intel ifort, use " -assume byterecl " option to create binary PNM images
-
- implicit none
-
- include "constants.h"
-
- integer :: NX,NY,it
-
- double precision :: cutsnaps
-
- integer, dimension(NX,NY) :: iglob_image_color_2D
-
- double precision, dimension(NX,NY) :: color_image_2D_data
- double precision, dimension(NX,NY) :: image_color_vp_display
-
- integer :: ix,iy,R,G,B,tenthousands,thousands,hundreds,tens,units,remainder,current_rec
-
- double precision :: amplitude_max,normalized_value,vpmin,vpmax,x1
-
- character(len=100) :: filename,system_command
-
-! create temporary image files in binary PNM P6 format (smaller) or ASCII PNM P3 format (easier to edit)
- logical, parameter :: BINARY_FILE = .true.
-
-! ASCII code of character '0' and of carriage return character
- integer, parameter :: ascii_code_of_zero = 48, ascii_code_of_carriage_return = 10
-
-! open the image file
- write(filename,"('OUTPUT_FILES/image',i7.7,'.pnm')") it
-
- if(BINARY_FILE) then
-
- open(unit=27,file=filename,status='unknown',access='direct',recl=1)
- write(27,rec=1) 'P'
- write(27,rec=2) '6' ! write P6 = binary PNM image format
- write(27,rec=3) char(ascii_code_of_carriage_return)
-
-! compute and write horizontal size
- remainder = NX
-
- tenthousands = remainder / 10000
- remainder = remainder - 10000 * tenthousands
-
- thousands = remainder / 1000
- remainder = remainder - 1000 * thousands
-
- hundreds = remainder / 100
- remainder = remainder - 100 * hundreds
-
- tens = remainder / 10
- remainder = remainder - 10 * tens
-
- units = remainder
-
- write(27,rec=4) char(tenthousands + ascii_code_of_zero)
- write(27,rec=5) char(thousands + ascii_code_of_zero)
- write(27,rec=6) char(hundreds + ascii_code_of_zero)
- write(27,rec=7) char(tens + ascii_code_of_zero)
- write(27,rec=8) char(units + ascii_code_of_zero)
- write(27,rec=9) ' '
-
-! compute and write vertical size
- remainder = NY
-
- tenthousands = remainder / 10000
- remainder = remainder - 10000 * tenthousands
-
- thousands = remainder / 1000
- remainder = remainder - 1000 * thousands
-
- hundreds = remainder / 100
- remainder = remainder - 100 * hundreds
-
- tens = remainder / 10
- remainder = remainder - 10 * tens
-
- units = remainder
-
- write(27,rec=10) char(tenthousands + ascii_code_of_zero)
- write(27,rec=11) char(thousands + ascii_code_of_zero)
- write(27,rec=12) char(hundreds + ascii_code_of_zero)
- write(27,rec=13) char(tens + ascii_code_of_zero)
- write(27,rec=14) char(units + ascii_code_of_zero)
- write(27,rec=15) char(ascii_code_of_carriage_return)
-
-! number of shades
- write(27,rec=16) '2'
- write(27,rec=17) '5'
- write(27,rec=18) '5'
- write(27,rec=19) char(ascii_code_of_carriage_return)
-
-! block of image data starts at sixteenth character
- current_rec = 20
-
- else
-
- open(unit=27,file=filename,status='unknown')
- write(27,"('P3')") ! write P3 = ASCII PNM image format
- write(27,*) NX,NY ! write image size
- write(27,*) '255' ! number of shades
-
- endif
-
-! compute maximum amplitude
- amplitude_max = maxval(abs(color_image_2D_data))
- vpmin = HUGEVAL
- vpmax = TINYVAL
- do iy=1,NY
- do ix=1,NX
- if ( iglob_image_color_2D(ix,iy) > -1 ) then
- vpmin = min(vpmin,image_color_vp_display(ix,iy))
- vpmax = max(vpmax,image_color_vp_display(ix,iy))
- endif
-
- enddo
- enddo
-
-! in the PNM format, the image starts in the upper-left corner
- do iy=NY,1,-1
- do ix=1,NX
-
-! check if pixel is defined or not (can be above topography for instance)
- if(iglob_image_color_2D(ix,iy) == -1) then
-
-! use light blue to display undefined region above topography
- R = 204
- G = 255
- B = 255
-
-! suppress small amplitudes considered as noise
- else if (abs(color_image_2D_data(ix,iy)) < amplitude_max * cutsnaps) then
-
-! use P velocity model as background where amplitude is negligible
- if((vpmax-vpmin)/vpmin > 0.02d0) then
- x1 = (image_color_vp_display(ix,iy)-vpmin)/(vpmax-vpmin)
- else
- x1 = 0.5d0
- endif
-
-! rescale to avoid very dark gray levels
- x1 = x1*0.7 + 0.2
- if(x1 > 1.d0) x1=1.d0
-
-! invert scale: white = vpmin, dark gray = vpmax
- x1 = 1.d0 - x1
-
-! map to [0,255]
- x1 = x1 * 255.d0
-
- R = nint(x1)
- if(R < 0) R = 0
- if(R > 255) R = 255
- G = R
- B = R
-
- else
-
-! define normalized image data in [-1:1] and convert to nearest integer
-! keeping in mind that data values can be negative
- if( amplitude_max >= TINYVAL ) then
- normalized_value = color_image_2D_data(ix,iy) / amplitude_max
- else
- normalized_value = color_image_2D_data(ix,iy) / TINYVAL
- endif
-
-! suppress values outside of [-1:+1]
- if(normalized_value < -1.d0) normalized_value = -1.d0
- if(normalized_value > 1.d0) normalized_value = 1.d0
-
-! use red if positive value, blue if negative, no green
- if(normalized_value >= 0.d0) then
- R = nint(255.d0*normalized_value**POWER_DISPLAY_COLOR)
- G = 0
- B = 0
- else
- R = 0
- G = 0
- B = nint(255.d0*abs(normalized_value)**POWER_DISPLAY_COLOR)
- endif
-
- endif
-
-! write color image
- if(BINARY_FILE) then
-
-! first write red
- write(27,rec=current_rec) char(R)
- current_rec = current_rec + 1
-
-! then write green
- write(27,rec=current_rec) char(G)
- current_rec = current_rec + 1
-
-! then write blue
- write(27,rec=current_rec) char(B)
- current_rec = current_rec + 1
-
- else
-
- write(27,"(i3,' ',i3,' ',i3)") R,G,B
-
- endif
-
- enddo
- enddo
-
-! close the file
- close(27)
-
-! open image file and create system command to convert image to more convenient format
-! use the "convert" command from ImageMagick http://www.imagemagick.org
- write(system_command,"('cd OUTPUT_FILES ; convert image',i7.7,'.pnm image',i7.7,'.jpg ; rm -f image',i7.7,'.pnm')") it,it,it
-
-! call the system to convert image to GIF
-! this line can be safely commented out if your compiler does not implement "system()" for system calls;
-! in such a case you will simply get images in PNM format in directory OUTPUT_FILES instead of GIF format
- call system(system_command)
-
- end subroutine create_color_image_from_PNM
-
Modified: seismo/2D/SPECFEM2D/trunk/src/specfem2D/get_perm_cuthill_mckee.f90
===================================================================
--- seismo/2D/SPECFEM2D/trunk/src/specfem2D/get_perm_cuthill_mckee.f90 2011-11-14 17:54:46 UTC (rev 19197)
+++ seismo/2D/SPECFEM2D/trunk/src/specfem2D/get_perm_cuthill_mckee.f90 2011-11-14 23:26:12 UTC (rev 19198)
@@ -48,7 +48,7 @@
! New-York, New-York, USA, 1969. ACM Press.
! see for instance http://en.wikipedia.org/wiki/Cuthill%E2%80%93McKee_algorithm
- subroutine get_perm(ibool,perm,limit,nspec,nglob)
+ subroutine get_perm_cuthill_mckee(ibool,perm,limit,nspec,nglob,PERFORM_CUTHILL_MCKEE)
implicit none
@@ -85,6 +85,9 @@
logical count_only
integer total_size_ne,total_size_adj,limit
+! perform inverse Cuthill-McKee (1969) permutation for mesh numbering
+ logical :: PERFORM_CUTHILL_MCKEE
+
!
!-----------------------------------------------------------------------
!
@@ -143,7 +146,7 @@
enddo
endif
- end subroutine get_perm
+ end subroutine get_perm_cuthill_mckee
!=======================================================================
!
Modified: seismo/2D/SPECFEM2D/trunk/src/specfem2D/initialize_simulation.F90
===================================================================
--- seismo/2D/SPECFEM2D/trunk/src/specfem2D/initialize_simulation.F90 2011-11-14 17:54:46 UTC (rev 19197)
+++ seismo/2D/SPECFEM2D/trunk/src/specfem2D/initialize_simulation.F90 2011-11-14 23:26:12 UTC (rev 19198)
@@ -45,7 +45,7 @@
subroutine initialize_simulation(nproc,myrank,NUMBER_OF_PASSES, &
- ninterface_acoustic,ninterface_elastic,ninterface_poroelastic)
+ ninterface_acoustic,ninterface_elastic,ninterface_poroelastic,PERFORM_CUTHILL_MCKEE)
implicit none
include "constants.h"
@@ -56,6 +56,9 @@
integer :: nproc,myrank,NUMBER_OF_PASSES
integer :: ninterface_acoustic, ninterface_elastic,ninterface_poroelastic
+! perform inverse Cuthill-McKee (1969) permutation for mesh numbering
+ logical :: PERFORM_CUTHILL_MCKEE
+
! local parameters
integer :: ier
character(len=256) :: prname
Modified: seismo/2D/SPECFEM2D/trunk/src/specfem2D/plotpost.F90
===================================================================
--- seismo/2D/SPECFEM2D/trunk/src/specfem2D/plotpost.F90 2011-11-14 17:54:46 UTC (rev 19197)
+++ seismo/2D/SPECFEM2D/trunk/src/specfem2D/plotpost.F90 2011-11-14 23:26:12 UTC (rev 19198)
@@ -47,7 +47,7 @@
poroelastcoef,knods,kmato,ibool, &
numabs,codeabs,anyabs,nelem_acoustic_surface, acoustic_edges, &
simulation_title,nglob,npgeo,vpmin,vpmax,nrec,NSOURCES, &
- colors,numbers,subsamp,imagetype,interpol,meshvect,modelvect, &
+ colors,numbers,subsamp_postscript,imagetype,interpol,meshvect,modelvect, &
boundvect,assign_external_model,cutsnaps,sizemax_arrows,nelemabs,numat,pointsdisp, &
nspec,ngnod,coupled_acoustic_elastic,coupled_acoustic_poro,coupled_elastic_poro, &
any_acoustic,any_poroelastic,plot_lowerleft_corner_only, &
@@ -74,7 +74,7 @@
coorg_send_ps_free_surface,coorg_recv_ps_free_surface, &
d1_coorg_send_ps_vector_field,d1_coorg_recv_ps_vector_field, &
d2_coorg_send_ps_vector_field,d2_coorg_recv_ps_vector_field, &
- coorg_send_ps_vector_field,coorg_recv_ps_vector_field)
+ coorg_send_ps_vector_field,coorg_recv_ps_vector_field,US_LETTER)
!
! PostScript display routine
@@ -134,6 +134,9 @@
equivalence (postscript_line,ch1)
logical :: first
+! US letter paper or European A4
+ logical :: US_LETTER
+
double precision convert,x1,cpIloc,xa,za,xb,zb
double precision z1,x2,z2,d,d1,d2,dummy,theta,thetaup,thetadown
@@ -146,7 +149,7 @@
integer k,j,ispec,material,is,ir,imat,icol,l,line_length
integer index_char,ii,ipoin,in,nnum,inum,ideb,ifin,iedge
- integer colors,numbers,subsamp,imagetype
+ integer colors,numbers,subsamp_postscript,imagetype
logical interpol,meshvect,modelvect,boundvect,assign_external_model
double precision cutsnaps,sizemax_arrows
@@ -1654,8 +1657,8 @@
RGB_offset = 0
do ispec=1,nspec
- do i=1,NGLLX-subsamp,subsamp
- do j=1,NGLLX-subsamp,subsamp
+ do i=1,NGLLX-subsamp_postscript,subsamp_postscript
+ do j=1,NGLLX-subsamp_postscript,subsamp_postscript
if((vpmax-vpmin)/vpmin > 0.02d0) then
if(assign_external_model) then
@@ -1714,8 +1717,8 @@
coorg_send_ps_velocity_model(2,buffer_offset) = zw
endif
- xw = coord(1,ibool(i+subsamp,j,ispec))
- zw = coord(2,ibool(i+subsamp,j,ispec))
+ xw = coord(1,ibool(i+subsamp_postscript,j,ispec))
+ zw = coord(2,ibool(i+subsamp_postscript,j,ispec))
xw = (xw-xmin)*ratio_page + orig_x
zw = (zw-zmin)*ratio_page + orig_z
xw = xw * centim
@@ -1728,8 +1731,8 @@
coorg_send_ps_velocity_model(2,buffer_offset) = zw
endif
- xw = coord(1,ibool(i+subsamp,j+subsamp,ispec))
- zw = coord(2,ibool(i+subsamp,j+subsamp,ispec))
+ xw = coord(1,ibool(i+subsamp_postscript,j+subsamp_postscript,ispec))
+ zw = coord(2,ibool(i+subsamp_postscript,j+subsamp_postscript,ispec))
xw = (xw-xmin)*ratio_page + orig_x
zw = (zw-zmin)*ratio_page + orig_z
xw = xw * centim
@@ -1742,8 +1745,8 @@
coorg_send_ps_velocity_model(2,buffer_offset) = zw
endif
- xw = coord(1,ibool(i,j+subsamp,ispec))
- zw = coord(2,ibool(i,j+subsamp,ispec))
+ xw = coord(1,ibool(i,j+subsamp_postscript,ispec))
+ zw = coord(2,ibool(i,j+subsamp_postscript,ispec))
xw = (xw-xmin)*ratio_page + orig_x
zw = (zw-zmin)*ratio_page + orig_z
xw = xw * centim
@@ -1774,16 +1777,16 @@
do iproc = 1, nproc-1
call MPI_RECV (nspec_recv, 1, MPI_INTEGER, iproc, 42, MPI_COMM_WORLD, request_mpi_status, ier)
call MPI_RECV (coorg_recv_ps_velocity_model(1,1), &
- 2*nspec_recv*((NGLLX-subsamp)/subsamp)*((NGLLX-subsamp)/subsamp)*4, &
+ 2*nspec_recv*((NGLLX-subsamp_postscript)/subsamp_postscript)*((NGLLX-subsamp_postscript)/subsamp_postscript)*4, &
MPI_DOUBLE_PRECISION, iproc, 42, MPI_COMM_WORLD, request_mpi_status, ier)
- call MPI_RECV (RGB_recv_ps_velocity_model(1,1), nspec_recv*((NGLLX-subsamp)/subsamp)*((NGLLX-subsamp)/subsamp), &
+ call MPI_RECV (RGB_recv_ps_velocity_model(1,1), nspec_recv*((NGLLX-subsamp_postscript)/subsamp_postscript)*((NGLLX-subsamp_postscript)/subsamp_postscript), &
MPI_DOUBLE_PRECISION, iproc, 42, MPI_COMM_WORLD, request_mpi_status, ier)
buffer_offset = 0
RGB_offset = 0
do ispec = 1, nspec_recv
- do i=1,NGLLX-subsamp,subsamp
- do j=1,NGLLX-subsamp,subsamp
+ do i=1,NGLLX-subsamp_postscript,subsamp_postscript
+ do j=1,NGLLX-subsamp_postscript,subsamp_postscript
buffer_offset = buffer_offset + 1
write(24,500) coorg_recv_ps_velocity_model(1,buffer_offset), &
coorg_recv_ps_velocity_model(2,buffer_offset)
@@ -1805,9 +1808,9 @@
enddo
else
call MPI_SEND (nspec, 1, MPI_INTEGER, 0, 42, MPI_COMM_WORLD, ier)
- call MPI_SEND (coorg_send_ps_velocity_model(1,1), 2*nspec*((NGLLX-subsamp)/subsamp)*((NGLLX-subsamp)/subsamp)*4, &
+ call MPI_SEND (coorg_send_ps_velocity_model(1,1), 2*nspec*((NGLLX-subsamp_postscript)/subsamp_postscript)*((NGLLX-subsamp_postscript)/subsamp_postscript)*4, &
MPI_DOUBLE_PRECISION, 0, 42, MPI_COMM_WORLD, ier)
- call MPI_SEND (RGB_send_ps_velocity_model(1,1), nspec*((NGLLX-subsamp)/subsamp)*((NGLLX-subsamp)/subsamp), &
+ call MPI_SEND (RGB_send_ps_velocity_model(1,1), nspec*((NGLLX-subsamp_postscript)/subsamp_postscript)*((NGLLX-subsamp_postscript)/subsamp_postscript), &
MPI_DOUBLE_PRECISION, 0, 42, MPI_COMM_WORLD, ier)
endif
Modified: seismo/2D/SPECFEM2D/trunk/src/specfem2D/prepare_color_image.F90
===================================================================
--- seismo/2D/SPECFEM2D/trunk/src/specfem2D/prepare_color_image.F90 2011-11-14 17:54:46 UTC (rev 19197)
+++ seismo/2D/SPECFEM2D/trunk/src/specfem2D/prepare_color_image.F90 2011-11-14 23:26:12 UTC (rev 19198)
@@ -47,7 +47,7 @@
subroutine prepare_color_image_init(NX_IMAGE_color,NZ_IMAGE_color, &
xmin_color_image,xmax_color_image, &
zmin_color_image,zmax_color_image, &
- coord,nglob,npgeo)
+ coord,nglob,npgeo,factor_subsample_image)
implicit none
include "constants.h"
@@ -57,6 +57,9 @@
integer :: NX_IMAGE_color,NZ_IMAGE_color
+! factor to subsample color images output by the code (useful for very large models)
+ integer :: factor_subsample_image
+
integer :: nglob,npgeo
double precision, dimension(NDIM,nglob) :: coord
@@ -234,7 +237,7 @@
NX_IMAGE_color,NZ_IMAGE_color,nb_pixel_loc, &
num_pixel_loc,nspec,elastic,poroelastic,ibool,kmato, &
numat,density,poroelastcoef,porosity,tortuosity, &
- nproc,myrank,assign_external_model,vpext)
+ nproc,myrank,assign_external_model,vpext,DRAW_WATER_CONSTANT_BLUE_IN_JPG)
! stores P-velocity model in image_color_vp_display
@@ -265,6 +268,11 @@
double precision, dimension(numat) :: porosity,tortuosity
double precision, dimension(NGLLX,NGLLX,nspec) :: vpext
+! display acoustic layers as constant blue, because they likely correspond to water in the case of ocean acoustics
+! or in the case of offshore oil industry experiments.
+! (if off, display them as greyscale, as for elastic or poroelastic elements)
+ logical :: DRAW_WATER_CONSTANT_BLUE_IN_JPG
+
! local parameters
double precision, dimension(:), allocatable :: vp_display
double precision :: rhol,mul_relaxed,lambdal_relaxed
Modified: seismo/2D/SPECFEM2D/trunk/src/specfem2D/read_databases.f90
===================================================================
--- seismo/2D/SPECFEM2D/trunk/src/specfem2D/read_databases.f90 2011-11-14 17:54:46 UTC (rev 19197)
+++ seismo/2D/SPECFEM2D/trunk/src/specfem2D/read_databases.f90 2011-11-14 23:26:12 UTC (rev 19198)
@@ -48,12 +48,14 @@
simulation_title,SIMULATION_TYPE,NOISE_TOMOGRAPHY,SAVE_FORWARD,npgeo, &
gnuplot,interpol,NTSTEP_BETWEEN_OUTPUT_INFO, &
output_postscript_snapshot,output_color_image,colors,numbers, &
- meshvect,modelvect,boundvect,cutsnaps,subsamp,sizemax_arrows, &
+ meshvect,modelvect,boundvect,cutsnaps,subsamp_postscript,sizemax_arrows, &
anglerec,initialfield,add_Bielak_conditions, &
seismotype,imagetype,assign_external_model,READ_EXTERNAL_SEP_FILE, &
output_grid,output_energy,output_wavefield_snapshot,TURN_ATTENUATION_ON, &
TURN_VISCATTENUATION_ON,Q0,freq0,p_sv, &
- NSTEP,deltat,NTSTEP_BETWEEN_OUTPUT_SEISMO,NSOURCES)
+ NSTEP,deltat,NTSTEP_BETWEEN_OUTPUT_SEISMO,NSOURCES, &
+ factor_subsample_image,USE_SNAPSHOT_NUMBER_IN_FILENAME,DRAW_WATER_CONSTANT_BLUE_IN_JPG,US_LETTER, &
+ POWER_DISPLAY_COLOR,PERFORM_CUTHILL_MCKEE,SU_FORMAT,USER_T0)
! starts reading in parameters from input Database file
@@ -63,7 +65,7 @@
integer :: myrank,ipass
character(len=60) simulation_title
integer :: SIMULATION_TYPE,NOISE_TOMOGRAPHY,npgeo
- integer :: colors,numbers,subsamp,seismotype,imagetype
+ integer :: colors,numbers,subsamp_postscript,seismotype,imagetype
logical :: SAVE_FORWARD,gnuplot,interpol,output_postscript_snapshot, &
output_color_image
logical :: meshvect,modelvect,boundvect,initialfield,add_Bielak_conditions, &
@@ -78,6 +80,34 @@
integer :: NSTEP,NSOURCES
integer :: NTSTEP_BETWEEN_OUTPUT_INFO,NTSTEP_BETWEEN_OUTPUT_SEISMO
+! factor to subsample color images output by the code (useful for very large models)
+ integer :: factor_subsample_image
+
+! use snapshot number in the file name of JPG color snapshots instead of the time step
+ logical :: USE_SNAPSHOT_NUMBER_IN_FILENAME
+
+! display acoustic layers as constant blue, because they likely correspond to water in the case of ocean acoustics
+! or in the case of offshore oil industry experiments.
+! (if off, display them as greyscale, as for elastic or poroelastic elements)
+ logical :: DRAW_WATER_CONSTANT_BLUE_IN_JPG
+
+! US letter paper or European A4
+ logical :: US_LETTER
+
+! non linear display to enhance small amplitudes in color images
+ double precision :: POWER_DISPLAY_COLOR
+
+! perform inverse Cuthill-McKee (1969) permutation for mesh numbering
+ logical :: PERFORM_CUTHILL_MCKEE
+
+! output seismograms in Seismic Unix format (adjoint traces will be read in the same format)
+ logical :: SU_FORMAT
+
+! use this t0 as earliest starting time rather than the automatically calculated one
+! (must be positive and bigger than the automatically one to be effective;
+! simulation will start at t = - t0)
+ double precision :: USER_T0
+
! local parameters
integer :: ier
character(len=80) :: datlin
@@ -126,7 +156,7 @@
read(IIN,*) output_postscript_snapshot,output_color_image,colors,numbers
read(IIN,"(a80)") datlin
- read(IIN,*) meshvect,modelvect,boundvect,cutsnaps,subsamp,sizemax_arrows
+ read(IIN,*) meshvect,modelvect,boundvect,cutsnaps,subsamp_postscript,sizemax_arrows
cutsnaps = cutsnaps / 100.d0
read(IIN,"(a80)") datlin
@@ -162,6 +192,30 @@
read(IIN,"(a80)") datlin
read(IIN,*) p_sv
+ read(IIN,"(a80)") datlin
+ read(IIN,*) factor_subsample_image
+
+ read(IIN,"(a80)") datlin
+ read(IIN,*) USE_SNAPSHOT_NUMBER_IN_FILENAME
+
+ read(IIN,"(a80)") datlin
+ read(IIN,*) DRAW_WATER_CONSTANT_BLUE_IN_JPG
+
+ read(IIN,"(a80)") datlin
+ read(IIN,*) US_LETTER
+
+ read(IIN,"(a80)") datlin
+ read(IIN,*) POWER_DISPLAY_COLOR
+
+ read(IIN,"(a80)") datlin
+ read(IIN,*) PERFORM_CUTHILL_MCKEE
+
+ read(IIN,"(a80)") datlin
+ read(IIN,*) SU_FORMAT
+
+ read(IIN,"(a80)") datlin
+ read(IIN,*) USER_T0
+
!---- check parameters read
if (myrank == 0 .and. ipass == 1) then
write(IOUT,200) npgeo,NDIM
@@ -170,7 +224,7 @@
write(IOUT,750) initialfield,add_Bielak_conditions,assign_external_model,&
READ_EXTERNAL_SEP_FILE,TURN_ATTENUATION_ON, &
output_grid,output_energy
- write(IOUT,800) imagetype,100.d0*cutsnaps,subsamp
+ write(IOUT,800) imagetype,100.d0*cutsnaps,subsamp_postscript
endif
!---- read time step
@@ -221,9 +275,9 @@
'Save a file with total energy or not.(output_energy) = ',l6)
800 format(//1x,'C o n t r o l',/1x,13('='),//5x, &
- 'Vector display type . . . . . . . . . . .(imagetype) = ',i6/5x, &
- 'Percentage of cut for vector plots . . . .(cutsnaps) = ',f6.2/5x, &
- 'Subsampling for velocity model display. . .(subsamp) = ',i6)
+ 'Vector display type . . . . . . . . . . . . . . (imagetype) = ',i6/5x, &
+ 'Percentage of cut for vector plots. . . . . . . .(cutsnaps) = ',f6.2/5x, &
+ 'Subsampling of velocity model display. (subsamp_postscript) = ',i6)
703 format(//' I t e r a t i o n s '/1x,19('='),//5x, &
'Number of time iterations . . . . .(NSTEP) =',i8,/5x, &
Modified: seismo/2D/SPECFEM2D/trunk/src/specfem2D/set_sources.f90
===================================================================
--- seismo/2D/SPECFEM2D/trunk/src/specfem2D/set_sources.f90 2011-11-14 17:54:46 UTC (rev 19197)
+++ seismo/2D/SPECFEM2D/trunk/src/specfem2D/set_sources.f90 2011-11-14 23:26:12 UTC (rev 19198)
@@ -46,7 +46,7 @@
subroutine set_sources(myrank,NSOURCES,source_type,time_function_type, &
x_source,z_source,Mxx,Mzz,Mxz,f0,tshift_src,factor,angleforce,aval, &
- t0,initialfield,ipass,deltat)
+ t0,initialfield,ipass,deltat,USER_T0)
! gets source parameters
@@ -64,6 +64,11 @@
integer :: ipass
logical :: initialfield
+! use this t0 as earliest starting time rather than the automatically calculated one
+! (must be positive and bigger than the automatically one to be effective;
+! simulation will start at t = - t0)
+ double precision :: USER_T0
+
! local parameters
integer :: i_source
double precision, dimension(NSOURCES) :: t0_source,hdur
Modified: seismo/2D/SPECFEM2D/trunk/src/specfem2D/specfem2D.F90
===================================================================
--- seismo/2D/SPECFEM2D/trunk/src/specfem2D/specfem2D.F90 2011-11-14 17:54:46 UTC (rev 19197)
+++ seismo/2D/SPECFEM2D/trunk/src/specfem2D/specfem2D.F90 2011-11-14 23:26:12 UTC (rev 19198)
@@ -345,6 +345,34 @@
! for P-SV or SH (membrane) waves calculation
logical :: p_sv
+! factor to subsample color images output by the code (useful for very large models)
+ integer :: factor_subsample_image
+
+! use snapshot number in the file name of JPG color snapshots instead of the time step
+ logical :: USE_SNAPSHOT_NUMBER_IN_FILENAME
+
+! display acoustic layers as constant blue, because they likely correspond to water in the case of ocean acoustics
+! or in the case of offshore oil industry experiments.
+! (if off, display them as greyscale, as for elastic or poroelastic elements)
+ logical :: DRAW_WATER_CONSTANT_BLUE_IN_JPG
+
+! US letter paper or European A4
+ logical :: US_LETTER
+
+! non linear display to enhance small amplitudes in color images
+ double precision :: POWER_DISPLAY_COLOR
+
+! perform inverse Cuthill-McKee (1969) permutation for mesh numbering
+ logical :: PERFORM_CUTHILL_MCKEE
+
+! output seismograms in Seismic Unix format (adjoint traces will be read in the same format)
+ logical :: SU_FORMAT
+
+! use this t0 as earliest starting time rather than the automatically calculated one
+! (must be positive and bigger than the automatically one to be effective;
+! simulation will start at t = - t0)
+ double precision :: USER_T0
+
! receiver information
integer :: nrec,ios
integer, dimension(:), allocatable :: ispec_selected_rec
@@ -457,7 +485,7 @@
double precision :: vpImin,vpImax,vpIImin,vpIImax
- integer :: colors,numbers,subsamp,imagetype, &
+ integer :: colors,numbers,subsamp_postscript,imagetype, &
NTSTEP_BETWEEN_OUTPUT_INFO,NTSTEP_BETWEEN_OUTPUT_SEISMO,seismotype
integer :: numat,ngnod,nspec,pointsdisp, &
nelemabs,nelem_acoustic_surface,ispecabs,UPPER_LIMIT_DISPLAY
@@ -869,7 +897,7 @@
call force_ftz()
call initialize_simulation(nproc,myrank,NUMBER_OF_PASSES, &
- ninterface_acoustic,ninterface_elastic,ninterface_poroelastic)
+ ninterface_acoustic,ninterface_elastic,ninterface_poroelastic,PERFORM_CUTHILL_MCKEE)
! reduction of cache misses inner/outer in two passes
do ipass = 1,NUMBER_OF_PASSES
@@ -879,12 +907,14 @@
simulation_title,SIMULATION_TYPE,NOISE_TOMOGRAPHY,SAVE_FORWARD,npgeo, &
gnuplot,interpol,NTSTEP_BETWEEN_OUTPUT_INFO, &
output_postscript_snapshot,output_color_image,colors,numbers, &
- meshvect,modelvect,boundvect,cutsnaps,subsamp,sizemax_arrows, &
+ meshvect,modelvect,boundvect,cutsnaps,subsamp_postscript,sizemax_arrows, &
anglerec,initialfield,add_Bielak_conditions, &
seismotype,imagetype,assign_external_model,READ_EXTERNAL_SEP_FILE, &
output_grid,output_energy,output_wavefield_snapshot,TURN_ATTENUATION_ON, &
TURN_VISCATTENUATION_ON,Q0,freq0,p_sv, &
- NSTEP,deltat,NTSTEP_BETWEEN_OUTPUT_SEISMO,NSOURCES)
+ NSTEP,deltat,NTSTEP_BETWEEN_OUTPUT_SEISMO,NSOURCES, &
+ factor_subsample_image,USE_SNAPSHOT_NUMBER_IN_FILENAME,DRAW_WATER_CONSTANT_BLUE_IN_JPG,US_LETTER, &
+ POWER_DISPLAY_COLOR,PERFORM_CUTHILL_MCKEE,SU_FORMAT,USER_T0)
!
!--- source information
@@ -919,7 +949,7 @@
! sets source parameters
call set_sources(myrank,NSOURCES,source_type,time_function_type, &
x_source,z_source,Mxx,Mzz,Mxz,f0,tshift_src,factor,angleforce,aval, &
- t0,initialfield,ipass,deltat)
+ t0,initialfield,ipass,deltat,USER_T0)
!
!---- read attenuation information
@@ -2551,7 +2581,7 @@
if(ACTUALLY_IMPLEMENT_PERM_WHOLE) then
allocate(check_perm(nspec))
- call get_perm(ibool,perm,LIMIT_MULTI_CUTHILL,nspec,nglob)
+ call get_perm_cuthill_mckee(ibool,perm,LIMIT_MULTI_CUTHILL,nspec,nglob,PERFORM_CUTHILL_MCKEE)
! check that the permutation obtained is bijective
check_perm(:) = -1
do ispec = 1,nspec
@@ -2564,7 +2594,7 @@
if(ACTUALLY_IMPLEMENT_PERM_OUT) then
allocate(check_perm(nspec_outer))
- call get_perm(ibool_outer,perm(1:nspec_outer),LIMIT_MULTI_CUTHILL,nspec_outer,nglob_outer)
+ call get_perm_cuthill_mckee(ibool_outer,perm(1:nspec_outer),LIMIT_MULTI_CUTHILL,nspec_outer,nglob_outer,PERFORM_CUTHILL_MCKEE)
! check that the permutation obtained is bijective
check_perm(:) = -1
do ispec = 1,nspec_outer
@@ -2578,7 +2608,8 @@
if(ACTUALLY_IMPLEMENT_PERM_INN) then
allocate(check_perm(nspec_inner))
- call get_perm(ibool_inner,perm(nspec_outer+1:nspec),LIMIT_MULTI_CUTHILL,nspec_inner,nglob_inner)
+ call get_perm_cuthill_mckee(ibool_inner,perm(nspec_outer+1:nspec),LIMIT_MULTI_CUTHILL,nspec_inner,nglob_inner, &
+ PERFORM_CUTHILL_MCKEE)
! check that the permutation obtained is bijective
check_perm(:) = -1
do ispec = 1,nspec_inner
@@ -2634,7 +2665,7 @@
coorg,xinterp,zinterp,shape2D_display,knods,simulation_title, &
npgeo,pointsdisp,ngnod,any_elastic,any_poroelastic,all_anisotropic, &
myrank,nproc,NSOURCES,poroelastic, &
- freq0,Q0,TURN_VISCATTENUATION_ON)
+ freq0,Q0,TURN_VISCATTENUATION_ON,US_LETTER)
! convert receiver angle to radians
anglerec = anglerec * pi / 180.d0
@@ -2648,7 +2679,7 @@
call prepare_color_image_init(NX_IMAGE_color,NZ_IMAGE_color, &
xmin_color_image,xmax_color_image, &
zmin_color_image,zmax_color_image, &
- coord,nglob,npgeo)
+ coord,nglob,npgeo,factor_subsample_image)
! allocate an array for image data
allocate(image_color_data(NX_IMAGE_color,NZ_IMAGE_color))
@@ -3734,8 +3765,7 @@
NX_IMAGE_color,NZ_IMAGE_color,nb_pixel_loc, &
num_pixel_loc,nspec,elastic,poroelastic,ibool,kmato, &
numat,density,poroelastcoef,porosity,tortuosity, &
- nproc,myrank,assign_external_model,vpext)
-
+ nproc,myrank,assign_external_model,vpext,factor_subsample_image,DRAW_WATER_CONSTANT_BLUE_IN_JPG)
endif
! dummy allocation of plane wave arrays if they are unused (but still need to exist because
@@ -3793,10 +3823,10 @@
if(modelvect) then
d1_coorg_recv_ps_velocity_model=2
call mpi_allreduce(nspec,d2_coorg_recv_ps_velocity_model,1,MPI_INTEGER,MPI_MAX,MPI_COMM_WORLD,ier)
- d2_coorg_recv_ps_velocity_model=d2_coorg_recv_ps_velocity_model*((NGLLX-subsamp)/subsamp)*((NGLLX-subsamp)/subsamp)*4
+ d2_coorg_recv_ps_velocity_model=d2_coorg_recv_ps_velocity_model*((NGLLX-subsamp_postscript)/subsamp_postscript)*((NGLLX-subsamp_postscript)/subsamp_postscript)*4
d1_RGB_recv_ps_velocity_model=1
call mpi_allreduce(nspec,d2_RGB_recv_ps_velocity_model,1,MPI_INTEGER,MPI_MAX,MPI_COMM_WORLD,ier)
- d2_RGB_recv_ps_velocity_model=d2_RGB_recv_ps_velocity_model*((NGLLX-subsamp)/subsamp)*((NGLLX-subsamp)/subsamp)*4
+ d2_RGB_recv_ps_velocity_model=d2_RGB_recv_ps_velocity_model*((NGLLX-subsamp_postscript)/subsamp_postscript)*((NGLLX-subsamp_postscript)/subsamp_postscript)*4
else
d1_coorg_recv_ps_velocity_model=1
d2_coorg_recv_ps_velocity_model=1
@@ -3892,9 +3922,11 @@
#endif
d1_coorg_send_ps_velocity_model=2
- d2_coorg_send_ps_velocity_model=nspec*((NGLLX-subsamp)/subsamp)*((NGLLX-subsamp)/subsamp)*4
+ d2_coorg_send_ps_velocity_model=nspec*((NGLLX-subsamp_postscript)/subsamp_postscript)* &
+ ((NGLLX-subsamp_postscript)/subsamp_postscript)*4
d1_RGB_send_ps_velocity_model=1
- d2_RGB_send_ps_velocity_model=nspec*((NGLLX-subsamp)/subsamp)*((NGLLX-subsamp)/subsamp)
+ d2_RGB_send_ps_velocity_model=nspec*((NGLLX-subsamp_postscript)/subsamp_postscript)* &
+ ((NGLLX-subsamp_postscript)/subsamp_postscript)
allocate(coorg_send_ps_velocity_model(d1_coorg_send_ps_velocity_model,d2_coorg_send_ps_velocity_model))
allocate(RGB_send_ps_velocity_model(d1_RGB_send_ps_velocity_model,d2_RGB_send_ps_velocity_model))
@@ -6618,7 +6650,7 @@
poroelastcoef,knods,kmato,ibool, &
numabs,codeabs,anyabs,nelem_acoustic_surface,acoustic_edges, &
simulation_title,nglob,npgeo,vpImin,vpImax,nrec,NSOURCES, &
- colors,numbers,subsamp,imagetype,interpol,meshvect,modelvect, &
+ colors,numbers,subsamp_postscript,imagetype,interpol,meshvect,modelvect, &
boundvect,assign_external_model,cutsnaps,sizemax_arrows,nelemabs,numat,pointsdisp, &
nspec,ngnod,coupled_acoustic_elastic,coupled_acoustic_poro,coupled_elastic_poro, &
any_acoustic,any_poroelastic,plot_lowerleft_corner_only, &
@@ -6644,7 +6676,7 @@
coorg_send_ps_free_surface,coorg_recv_ps_free_surface, &
d1_coorg_send_ps_vector_field,d1_coorg_recv_ps_vector_field, &
d2_coorg_send_ps_vector_field,d2_coorg_recv_ps_vector_field, &
- coorg_send_ps_vector_field,coorg_recv_ps_vector_field)
+ coorg_send_ps_vector_field,coorg_recv_ps_vector_field,US_LETTER)
else if(imagetype == 2 .and. p_sv) then
@@ -6662,7 +6694,7 @@
poroelastcoef,knods,kmato,ibool, &
numabs,codeabs,anyabs,nelem_acoustic_surface,acoustic_edges, &
simulation_title,nglob,npgeo,vpImin,vpImax,nrec,NSOURCES, &
- colors,numbers,subsamp,imagetype,interpol,meshvect,modelvect, &
+ colors,numbers,subsamp_postscript,imagetype,interpol,meshvect,modelvect, &
boundvect,assign_external_model,cutsnaps,sizemax_arrows,nelemabs,numat,pointsdisp, &
nspec,ngnod,coupled_acoustic_elastic,coupled_acoustic_poro,coupled_elastic_poro, &
any_acoustic,any_poroelastic,plot_lowerleft_corner_only, &
@@ -6688,7 +6720,7 @@
coorg_send_ps_free_surface,coorg_recv_ps_free_surface, &
d1_coorg_send_ps_vector_field,d1_coorg_recv_ps_vector_field, &
d2_coorg_send_ps_vector_field,d2_coorg_recv_ps_vector_field, &
- coorg_send_ps_vector_field,coorg_recv_ps_vector_field)
+ coorg_send_ps_vector_field,coorg_recv_ps_vector_field,US_LETTER)
else if(imagetype == 3 .and. p_sv) then
@@ -6706,7 +6738,7 @@
poroelastcoef,knods,kmato,ibool, &
numabs,codeabs,anyabs,nelem_acoustic_surface,acoustic_edges, &
simulation_title,nglob,npgeo,vpImin,vpImax,nrec,NSOURCES, &
- colors,numbers,subsamp,imagetype,interpol,meshvect,modelvect, &
+ colors,numbers,subsamp_postscript,imagetype,interpol,meshvect,modelvect, &
boundvect,assign_external_model,cutsnaps,sizemax_arrows,nelemabs,numat,pointsdisp, &
nspec,ngnod,coupled_acoustic_elastic,coupled_acoustic_poro,coupled_elastic_poro, &
any_acoustic,any_poroelastic,plot_lowerleft_corner_only, &
@@ -6732,7 +6764,7 @@
coorg_send_ps_free_surface,coorg_recv_ps_free_surface, &
d1_coorg_send_ps_vector_field,d1_coorg_recv_ps_vector_field, &
d2_coorg_send_ps_vector_field,d2_coorg_recv_ps_vector_field, &
- coorg_send_ps_vector_field,coorg_recv_ps_vector_field)
+ coorg_send_ps_vector_field,coorg_recv_ps_vector_field,US_LETTER)
else if(imagetype == 4 .or. .not. p_sv) then
@@ -6852,7 +6884,8 @@
if (myrank == 0) then
call create_color_image(image_color_data,iglob_image_color, &
- NX_IMAGE_color,NZ_IMAGE_color,it,isnapshot_number,cutsnaps,image_color_vp_display)
+ NX_IMAGE_color,NZ_IMAGE_color,it,isnapshot_number,cutsnaps,image_color_vp_display, &
+ USE_SNAPSHOT_NUMBER_IN_FILENAME,POWER_DISPLAY_COLOR)
write(IOUT,*) 'Color image created'
endif
@@ -6886,7 +6919,7 @@
call write_seismograms(sisux,sisuz,siscurl,station_name,network_name,NSTEP, &
nrecloc,which_proc_receiver,nrec,myrank,deltat,seismotype,st_xval,t0, &
NTSTEP_BETWEEN_OUTPUT_SEISMO,seismo_offset,seismo_current,p_sv,&
- st_zval,x_source(1),z_source(1))
+ st_zval,x_source(1),z_source(1),SU_FORMAT)
seismo_offset = seismo_offset + seismo_current
seismo_current = 0
Modified: seismo/2D/SPECFEM2D/trunk/src/specfem2D/write_seismograms.F90
===================================================================
--- seismo/2D/SPECFEM2D/trunk/src/specfem2D/write_seismograms.F90 2011-11-14 17:54:46 UTC (rev 19197)
+++ seismo/2D/SPECFEM2D/trunk/src/specfem2D/write_seismograms.F90 2011-11-14 23:26:12 UTC (rev 19198)
@@ -46,8 +46,8 @@
subroutine write_seismograms(sisux,sisuz,siscurl,station_name,network_name, &
NSTEP,nrecloc,which_proc_receiver,nrec,myrank,deltat,seismotype,st_xval,t0, &
- NTSTEP_BETWEEN_OUTPUT_SEISMO,seismo_offset,seismo_current,p_sv &
- ,st_zval,x_source,z_source)
+ NTSTEP_BETWEEN_OUTPUT_SEISMO,seismo_offset,seismo_current,p_sv, &
+ st_zval,x_source,z_source,SU_FORMAT)
implicit none
@@ -60,6 +60,9 @@
integer :: NTSTEP_BETWEEN_OUTPUT_SEISMO,seismo_offset,seismo_current
double precision :: t0,deltat
+! output seismograms in Seismic Unix format (adjoint traces will be read in the same format)
+ logical :: SU_FORMAT
+
logical :: p_sv
integer, intent(in) :: nrecloc,myrank
More information about the CIG-COMMITS
mailing list