[cig-commits] r19351 - in seismo/2D/SPECFEM2D/trunk: EXAMPLES/noise_layered/model_0 EXAMPLES/noise_layered/model_1 EXAMPLES/noise_layered/model_2 UTILS

dkomati1 at geodynamics.org dkomati1 at geodynamics.org
Thu Jan 12 15:31:23 PST 2012


Author: dkomati1
Date: 2012-01-12 15:31:23 -0800 (Thu, 12 Jan 2012)
New Revision: 19351

Modified:
   seismo/2D/SPECFEM2D/trunk/EXAMPLES/noise_layered/model_0/Par_file_fair
   seismo/2D/SPECFEM2D/trunk/EXAMPLES/noise_layered/model_0/Par_file_good
   seismo/2D/SPECFEM2D/trunk/EXAMPLES/noise_layered/model_1/Par_file_best
   seismo/2D/SPECFEM2D/trunk/EXAMPLES/noise_layered/model_1/Par_file_fair
   seismo/2D/SPECFEM2D/trunk/EXAMPLES/noise_layered/model_1/Par_file_good
   seismo/2D/SPECFEM2D/trunk/EXAMPLES/noise_layered/model_2/Par_file_fair
   seismo/2D/SPECFEM2D/trunk/EXAMPLES/noise_layered/model_2/Par_file_good
   seismo/2D/SPECFEM2D/trunk/UTILS/process_DATA_Par_files_to_update_their_format_when_new_parameters_are_added.py
Log:
committed new version of Paul Cristini's Python script to convert old Par_files to the new format; and used it to convert old examples that had not been converted before


Modified: seismo/2D/SPECFEM2D/trunk/EXAMPLES/noise_layered/model_0/Par_file_fair
===================================================================
--- seismo/2D/SPECFEM2D/trunk/EXAMPLES/noise_layered/model_0/Par_file_fair	2012-01-12 23:27:50 UTC (rev 19350)
+++ seismo/2D/SPECFEM2D/trunk/EXAMPLES/noise_layered/model_0/Par_file_fair	2012-01-12 23:31:23 UTC (rev 19351)
@@ -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                              = 3000           # 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 @@
 nreceiversets                   = 1              # number of receiver sets
 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 set (repeat these 6 lines and adjust nreceiversets  accordingly)
 nrec                            = 29
@@ -59,8 +62,13 @@
 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 color 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)
@@ -82,6 +90,15 @@
 # absorbing boundary active or not
 absorbing_conditions            = .true.
 
+# for horizontal periodic conditions: detect common points between left and right edges
+ADD_PERIODIC_CONDITIONS         = .false.
+
+# horizontal periodicity distance for periodic conditions
+PERIODIC_horiz_dist             = 0.3597d0
+
+# grid point detection tolerance for periodic conditions
+PERIODIC_DETECT_TOL             = 3.3334d-6
+
 #-----------------------------------------------------------------------------
 # PARAMETERS FOR EXTERNAL MESHING
 

Modified: seismo/2D/SPECFEM2D/trunk/EXAMPLES/noise_layered/model_0/Par_file_good
===================================================================
--- seismo/2D/SPECFEM2D/trunk/EXAMPLES/noise_layered/model_0/Par_file_good	2012-01-12 23:27:50 UTC (rev 19350)
+++ seismo/2D/SPECFEM2D/trunk/EXAMPLES/noise_layered/model_0/Par_file_good	2012-01-12 23:31:23 UTC (rev 19351)
@@ -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                              = 3000           # 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 @@
 nreceiversets                   = 1              # number of receiver sets
 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 set (repeat these 6 lines and adjust nreceiversets  accordingly)
 nrec                            = 29
@@ -59,8 +62,13 @@
 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 color 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)
@@ -82,6 +90,15 @@
 # absorbing boundary active or not
 absorbing_conditions            = .true.
 
+# for horizontal periodic conditions: detect common points between left and right edges
+ADD_PERIODIC_CONDITIONS         = .false.
+
+# horizontal periodicity distance for periodic conditions
+PERIODIC_horiz_dist             = 0.3597d0
+
+# grid point detection tolerance for periodic conditions
+PERIODIC_DETECT_TOL             = 3.3334d-6
+
 #-----------------------------------------------------------------------------
 # PARAMETERS FOR EXTERNAL MESHING
 

Modified: seismo/2D/SPECFEM2D/trunk/EXAMPLES/noise_layered/model_1/Par_file_best
===================================================================
--- seismo/2D/SPECFEM2D/trunk/EXAMPLES/noise_layered/model_1/Par_file_best	2012-01-12 23:27:50 UTC (rev 19350)
+++ seismo/2D/SPECFEM2D/trunk/EXAMPLES/noise_layered/model_1/Par_file_best	2012-01-12 23:31:23 UTC (rev 19351)
@@ -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                              = 3000           # 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 @@
 nreceiversets                   = 1              # number of receiver sets
 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 set (repeat these 6 lines and adjust nreceiversets  accordingly)
 nrec                            = 29
@@ -59,8 +62,13 @@
 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 color 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)
@@ -83,6 +91,15 @@
 # absorbing boundary active or not
 absorbing_conditions            = .true.
 
+# for horizontal periodic conditions: detect common points between left and right edges
+ADD_PERIODIC_CONDITIONS         = .false.
+
+# horizontal periodicity distance for periodic conditions
+PERIODIC_horiz_dist             = 0.3597d0
+
+# grid point detection tolerance for periodic conditions
+PERIODIC_DETECT_TOL             = 3.3334d-6
+
 #-----------------------------------------------------------------------------
 # PARAMETERS FOR EXTERNAL MESHING
 

Modified: seismo/2D/SPECFEM2D/trunk/EXAMPLES/noise_layered/model_1/Par_file_fair
===================================================================
--- seismo/2D/SPECFEM2D/trunk/EXAMPLES/noise_layered/model_1/Par_file_fair	2012-01-12 23:27:50 UTC (rev 19350)
+++ seismo/2D/SPECFEM2D/trunk/EXAMPLES/noise_layered/model_1/Par_file_fair	2012-01-12 23:31:23 UTC (rev 19351)
@@ -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                              = 3000           # 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 @@
 nreceiversets                   = 1              # number of receiver sets
 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 set (repeat these 6 lines and adjust nreceiversets  accordingly)
 nrec                            = 29
@@ -59,8 +62,13 @@
 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 color 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)
@@ -83,6 +91,15 @@
 # absorbing boundary active or not
 absorbing_conditions            = .true.
 
+# for horizontal periodic conditions: detect common points between left and right edges
+ADD_PERIODIC_CONDITIONS         = .false.
+
+# horizontal periodicity distance for periodic conditions
+PERIODIC_horiz_dist             = 0.3597d0
+
+# grid point detection tolerance for periodic conditions
+PERIODIC_DETECT_TOL             = 3.3334d-6
+
 #-----------------------------------------------------------------------------
 # PARAMETERS FOR EXTERNAL MESHING
 

Modified: seismo/2D/SPECFEM2D/trunk/EXAMPLES/noise_layered/model_1/Par_file_good
===================================================================
--- seismo/2D/SPECFEM2D/trunk/EXAMPLES/noise_layered/model_1/Par_file_good	2012-01-12 23:27:50 UTC (rev 19350)
+++ seismo/2D/SPECFEM2D/trunk/EXAMPLES/noise_layered/model_1/Par_file_good	2012-01-12 23:31:23 UTC (rev 19351)
@@ -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                              = 3000           # 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 @@
 nreceiversets                   = 1              # number of receiver sets
 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 set (repeat these 6 lines and adjust nreceiversets  accordingly)
 nrec                            = 29
@@ -59,8 +62,13 @@
 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 color 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)
@@ -83,6 +91,15 @@
 # absorbing boundary active or not
 absorbing_conditions            = .true.
 
+# for horizontal periodic conditions: detect common points between left and right edges
+ADD_PERIODIC_CONDITIONS         = .false.
+
+# horizontal periodicity distance for periodic conditions
+PERIODIC_horiz_dist             = 0.3597d0
+
+# grid point detection tolerance for periodic conditions
+PERIODIC_DETECT_TOL             = 3.3334d-6
+
 #-----------------------------------------------------------------------------
 # PARAMETERS FOR EXTERNAL MESHING
 

Modified: seismo/2D/SPECFEM2D/trunk/EXAMPLES/noise_layered/model_2/Par_file_fair
===================================================================
--- seismo/2D/SPECFEM2D/trunk/EXAMPLES/noise_layered/model_2/Par_file_fair	2012-01-12 23:27:50 UTC (rev 19350)
+++ seismo/2D/SPECFEM2D/trunk/EXAMPLES/noise_layered/model_2/Par_file_fair	2012-01-12 23:31:23 UTC (rev 19351)
@@ -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                              = 3000           # 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 @@
 nreceiversets                   = 1              # number of receiver sets
 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 set (repeat these 6 lines and adjust nreceiversets  accordingly)
 nrec                            = 29             # number of receivers
@@ -59,8 +62,13 @@
 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 color 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)
@@ -84,6 +92,15 @@
 # absorbing boundary active or not
 absorbing_conditions            = .true.
 
+# for horizontal periodic conditions: detect common points between left and right edges
+ADD_PERIODIC_CONDITIONS         = .false.
+
+# horizontal periodicity distance for periodic conditions
+PERIODIC_horiz_dist             = 0.3597d0
+
+# grid point detection tolerance for periodic conditions
+PERIODIC_DETECT_TOL             = 3.3334d-6
+
 #-----------------------------------------------------------------------------
 # PARAMETERS FOR EXTERNAL MESHING
 

Modified: seismo/2D/SPECFEM2D/trunk/EXAMPLES/noise_layered/model_2/Par_file_good
===================================================================
--- seismo/2D/SPECFEM2D/trunk/EXAMPLES/noise_layered/model_2/Par_file_good	2012-01-12 23:27:50 UTC (rev 19350)
+++ seismo/2D/SPECFEM2D/trunk/EXAMPLES/noise_layered/model_2/Par_file_good	2012-01-12 23:31:23 UTC (rev 19351)
@@ -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                              = 3000           # 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 @@
 nreceiversets                   = 1              # number of receiver sets
 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 set (repeat these 6 lines and adjust nreceiversets  accordingly)
 nrec                            = 29             # number of receivers
@@ -59,8 +62,13 @@
 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 color 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)
@@ -84,6 +92,15 @@
 # absorbing boundary active or not
 absorbing_conditions            = .true.
 
+# for horizontal periodic conditions: detect common points between left and right edges
+ADD_PERIODIC_CONDITIONS         = .false.
+
+# horizontal periodicity distance for periodic conditions
+PERIODIC_horiz_dist             = 0.3597d0
+
+# grid point detection tolerance for periodic conditions
+PERIODIC_DETECT_TOL             = 3.3334d-6
+
 #-----------------------------------------------------------------------------
 # PARAMETERS FOR EXTERNAL MESHING
 

Modified: seismo/2D/SPECFEM2D/trunk/UTILS/process_DATA_Par_files_to_update_their_format_when_new_parameters_are_added.py
===================================================================
--- seismo/2D/SPECFEM2D/trunk/UTILS/process_DATA_Par_files_to_update_their_format_when_new_parameters_are_added.py	2012-01-12 23:27:50 UTC (rev 19350)
+++ seismo/2D/SPECFEM2D/trunk/UTILS/process_DATA_Par_files_to_update_their_format_when_new_parameters_are_added.py	2012-01-12 23:31:23 UTC (rev 19351)
@@ -1,19 +1,43 @@
 # -*- coding: utf-8 -*-
 """
 Created on Tue Nov 15 09:00:00 2011
+Updated on Wed Jan 11 2012
 
-Process Par_file to update them to the new format of release 19201
+Processing of Par_file to update them to new format
 
-Usage : "python PathTo/SPECFEM2D/UTILS/ProcessParFileTor19201.py PathTo/filename"
+Usage : "python PathTo/SPECFEM2D/UTILS/ProcessParFileParametersToNewRelease.py"
+This will process all Par_file starting from current directory
 
 @author: Cristini Paul, Laboratoire de Mecanique et d'Acoustique, CNRS, Marseille, France
 """
-
-import sys
-from shutil import move
+import os, string, sys
+from os import listdir, walk
+from shutil import copy, move
 from os.path import exists
-
-def ProcessParfileTor19201(fic):
+#------------------------------------------------------------------------------
+def LoadLig(Fichier):
+    f = open(Fichier,'r')
+    ligs= f.readlines()
+    f.close()
+    return ligs
+#------------------------------------------------------------------------------
+def mylister(currdir):
+    for file in os.listdir(currdir):
+        path=os.path.join(currdir, file)
+        if not os.path.isdir(path):
+            #print path
+            Fichiers.append(path)
+        else:
+            mylister(path)
+#------------------------------------------------------------------------------
+def ProcessParfile_r19201(fic):
+    # Open the file and get all lines from Par_file
+    ligs= LoadLig(fic)
+    # Test pour voir si le traitement a déjà été fait
+    for lig in ligs:
+        if 'ADD_PERIODIC_CONDITIONS' in lig:
+            print '----> '+fic+' already processed to r19201'            
+            return
     # New additions to the Par_file
     a1='PERFORM_CUTHILL_MCKEE           = .true.         # perform inverse Cuthill-McKee (1969) optimization/permutation for mesh numbering\n'
     a2='USER_T0                         = 0.0d0          # use this t0 as earliest starting time rather than the automatically calculated one\n'
@@ -28,40 +52,110 @@
     '# horizontal periodicity distance for periodic conditions\n'+ \
     'PERIODIC_horiz_dist             = 0.3597d0\n\n'+ \
     '# grid point detection tolerance for periodic conditions\n'+ \
-    "PERIODIC_DETECT_TOL             = 3.3334d-6\n"
+    'PERIODIC_DETECT_TOL             = 3.3334d-6\n'  
+    #--------------------------------------------------------------------------
+    # Ajout des parametres supplementaires
+    # 
+    for ilg, lig in enumerate(ligs):
+        if lig.startswith('partitioning'):
+            ligs.insert(ilg+1,a1)
+
+        if lig.startswith('deltat'):
+            ligs.insert(ilg+1,a2)
+
+        if lig.startswith('rec_normal'):
+            ligs.insert(ilg+1,a3)
+
+        if lig.startswith('subsamp'):
+            ligs[ilg]=string.replace(ligs[ilg],'subsamp           ','subsamp_postscript',1)
+            ligs.insert(ilg+1,a4)
+
+        if lig.startswith('sizemax'):
+            ligs.insert(ilg+1,a5)
+            
+        if lig.startswith('absorbing_conditions'):
+            ligs.insert(ilg+1,a6)
     #
-    f = open(fic,'r')
-    ligs= f.readlines()
-    f.close()
+    move(fic,fic+'.before_update_to_r19201')
+    fm = open(fic,'w')
+    fm.writelines(ligs)
+    fm.close()
     #
+    print 'xxxxx------> '+fic+' processed to r19201'
+    return
+#------------------------------------------------------------------------------
+def ProcessParfile_r19340(fic):
+    # Open the file and get all lines from Par_file
+    ligs= LoadLig(fic)
+    # Teste si le traitement a déjà été fait
+    for lig in ligs:
+        if 'nreceiversets' in lig:
+            print '----> '+fic+' already processed to r19340'            
+            return
+    #
     # Ajout des parametres supplementaires
-    # On verifie si le fichier n'a pas deja ete traite
-    if not (ligs[0].endswith('r19201\n')):
-        ligs[0]=ligs[0][:-1]+' r19201\n'  # On indique que le fichier est traite pour cette release
-        #
-        Ct=0
-        for ilg, lig in enumerate(ligs):
-            if lig.startswith('partitioning'):
-                ligs.insert(ilg+1,a1)
-            if lig.startswith('deltat'):
-                ligs.insert(ilg+1,a2)
-            if lig.startswith('rec_normal'):
-                ligs.insert(ilg+1,a3)
-            if lig.startswith('subsamp'):
-                ligs[ilg]=string.replace(ligs[ilg],'subsamp           ','subsamp_postscript',1)
-                ligs.insert(ilg+1,a4)
-            if lig.startswith('sizemax'):
-                ligs.insert(ilg+1,a5)
-            if lig.startswith('absorbing_conditions'):
-                ligs.insert(ilg+1,a6)
-#        #
-        move(fic,fic+'.old')
-        fm = open(fic,'w')
-        fm.writelines(ligs)
-        fm.close()
-        print 'File : '+fic+' processed'
-    else:
-        print 'File : '+fic+' already processed'
+    # 
+    for ilg, lig in enumerate(ligs):
+        if lig.startswith('nreceiverlines'):
+            ligs[ilg]=ligs[ilg].replace('lines','sets ')
+    #
+    move(fic,fic+'.before_update_to_r19340')
+    #
+    fm = open(fic,'w')
+    fm.writelines(ligs)
+    fm.close()
+    #
+    print 'xxxxx------> '+fic+' processed to r19340'
     return
+#------------------------------------------------------------------------------
+def ProcessParfile_r19346(fic):
+    # Open the file and get all lines from Par_file
+    ligs= LoadLig(fic)
+    # Teste si le traitement a déjà été fait
+    for lig in ligs:
+        if 'ATTENUATION_PORO_FLUID_PART' in lig:
+            print '----> '+fic+' already processed to r19346'            
+            return
+    #--------------------------------------------------------------------------
+    # Ajout des parametres supplementaires
+    # 
+    for ilg, lig in enumerate(ligs):
+        if lig.startswith('TURN_ATTENUATION_ON'):
+            ligs[ilg]=ligs[ilg].replace('TURN_ATTENUATION_ON           ', \
+                            'ATTENUATION_VISCOELASTIC_SOLID')
+        if lig.startswith('TURN_VISCATTENUATION_ON'):
+            ligs[ilg]=ligs[ilg].replace('TURN_VISCATTENUATION_ON    ', \
+                            'ATTENUATION_PORO_FLUID_PART')
+    #
+    move(fic,fic+'.before_update_to_r19346')
+    #
+    fm = open(fic,'w')
+    fm.writelines(ligs)
+    fm.close()
+    #
+    print 'xxxxx------> '+fic+' processed to r19346'
+    return 
+#------------------------------------------------------------------------------
 if __name__=='__main__':
-    ProcessParfileTor19201(sys.argv[1])
+    ## Liste de tous les fichiers à partir du répertoire courant
+    Fichiers=[]
+    mylister('.')
+    #
+    print '~'*80
+    Ct_Par_file=0
+    for fic in Fichiers:
+        repert, ficname = os.path.split(fic)
+        if not( ('.svn' in repert) or ('unused' in repert) or \
+                '.before_update_to_' in ficname):
+            if ficname.startswith('Par_file'):
+                print 'Analysis of file : '+fic
+                if not (ficname.endswith('~')):
+                    Ct_Par_file+=1
+                    ProcessParfile_r19201(fic)
+                    ProcessParfile_r19340(fic)
+                    ProcessParfile_r19346(fic)
+                print '~'*80
+    #                
+    print 'Number of Par_file analysed : ', Ct_Par_file   
+    print 'END OF Par_file PROCESSING'
+    



More information about the CIG-COMMITS mailing list