[cig-commits] commit: update and improve examples
Mercurial
hg at geodynamics.org
Tue Sep 20 12:13:11 PDT 2011
changeset: 14:2e102d067069
user: Sylvain Barbot <sylbar.vainbot at gmail.com>
date: Thu May 12 15:53:17 2011 -0700
files: examples/mogi.sh examples/run1.sh examples/run2.sh examples/run3.sh examples/run4.sh examples/run5.sh
description:
update and improve examples
diff -r 6355ba48e6e7 -r 2e102d067069 examples/mogi.sh
--- a/examples/mogi.sh Thu May 12 14:28:43 2011 -0700
+++ b/examples/mogi.sh Thu May 12 15:53:17 2011 -0700
@@ -1,10 +1,26 @@
#!/bin/sh
-# viscoelastic relaxation following a dilatation source
+# viscoelastic relaxation following a dilatation (Mogi) source
# viscous flow governed by a power-law viscosity with
# stress exponent of n = 3.
+#
+# run this example with
+#
+# ./mogi.sh
+#
+# or with
+#
+# ./mogi.sh --no-grd-output
+#
-time ../relax <<EOF
+WDIR=./mogi
+
+if [ ! -e $WDIR ]; then
+ echo adding directory $WDIR
+ mkdir $WDIR
+fi
+
+time ../relax --no-stress-output --no-proj-output $* <<EOF
# grid size (sx1,sx2,sx3)
256 256 256
# sampling size & smoothing (dx1,dx2,dx3,beta) & nyquist
@@ -14,10 +30,10 @@ 0 0 0
# observation depth (displacement and stress)
0 0.5
# output directory
-./mogi
+$WDIR
# elastic parameters (lambda,mu) and gravity effect
1 1 0
-# integration time (t1)
+# integration time and time step
10 0.257
# number of observation planes
0
@@ -50,4 +66,6 @@ 1
1
# no dilatation xs ys zs
1 1 0 0 1
+# number of surface loads
+0
EOF
diff -r 6355ba48e6e7 -r 2e102d067069 examples/run1.sh
--- a/examples/run1.sh Thu May 12 14:28:43 2011 -0700
+++ b/examples/run1.sh Thu May 12 15:53:17 2011 -0700
@@ -7,21 +7,33 @@
# followed by a second strike-slip event and a relaxation of
# both stress perturbations.
#
+# run this example with:
+#
+# ./run1.sh
+#
+# you can also abort computation to produce only geometry information with:
+#
+# ./run1.sh --dry-run
+#
# viscous substrate starts at 3 times the seismogenic depth.
# output at each computation step (Dt = -1)
#
# to visualize coseismic deformation (requires GRD output, or manual conversion to GRD format):
-# map.sh -b -3/3/-3/3 output1/000
+#
+# map.sh -b -3/3/-3/3 output1/000
#
# to convert .xyz output in .grd output in post processing, type (requires GMT installed on your machine)
-# xyz2grd.sh output1/000
+#
+# xyz2grd.sh output1/000
#
# to visualize a time series of postseismic deformation (requires GRD output):
-# map.sh -b -5/5/-5/5 -p -0.002/0.002/0.0001 -v 0.005 output1/0{01,02,03,04,05,06,07,08,09,10}-relax
-# or simply
-# map.sh -b -5/5/-5/5 -p -0.002/0.002/0.0001 -v 0.005 output1/0??-relax
#
-# type map.sh for a description of command-line options.
+# map.sh -b -5/5/-5/5 -p -0.002/0.002/0.0001 -v 0.005 output1/0{01,02,03,04,05,06,07,08,09,10}-relax
+#
+# type map.sh for a description of command-line options.
+# the command used to generate a map can be retrieve from the .ps file with
+#
+# tail -n 1 output1/000-plot.ps
#
# to visualize in 3-D with Paraview (www.paraview.org),
# load the following files:
@@ -38,8 +50,24 @@
#
# type relax --help to display options.
#
+# modify the number of threads used with
+#
+# export OMP_NUM_THREADS=N with sh and ksh shells
+#
+# or
+#
+# setenv OMP_NUM_THREADS N with csh
+#
-time ../relax <<EOF | tee output1/in.param
+WDIR=./output1
+
+if [ ! -e $WDIR ]; then
+ echo adding directory $WDIR
+ mkdir $WDIR
+fi
+
+time ../relax $* <<EOF | tee output1/in.param
+# use '#' character to include comments in your input file
# grid size (sx1,sx2,sx3)
256 256 256
# sampling size (in unit of length), smoothing (0-0.5) & nyquist (dx1,dx2,dx3,beta,nq)
@@ -51,7 +79,7 @@ 120 22 51 1e3
# observation depth for displacement and for stress (stress in only exported in GRD)
0 0.5
# output directory (all output written here)
-./output1
+$WDIR
# elastic parameters and gamma = (1-nu) rho g / mu = 8.33e-7 /m = 8.33e-4 /km
1 1 8.33e-4
# integration time (in unit of time), step (negative for automatic) and scaling of computed value
diff -r 6355ba48e6e7 -r 2e102d067069 examples/run2.sh
--- a/examples/run2.sh Thu May 12 14:28:43 2011 -0700
+++ b/examples/run2.sh Thu May 12 15:53:17 2011 -0700
@@ -1,19 +1,29 @@
#!/bin/sh
# nonlinear viscoelastic relaxation (power exponent n=3)
-# following a strike-slip fault
-
-# output every computational step (Dt = -2)
-
+# following slip on a strike-slip fault
+#
+# output every computational step (Dt = -2).
+# The time step is computed automatically and the value unchanged (scale = 1)
+#
# to visualize coseismic deformation (requires GRD output, or manual conversion to GRD format):
# map.sh -b -3/3/-3/3 output2/000
-
+#
# to visualize postseismic deformation (requires GRD output):
# map.sh -b -5/5/-5/5 output2/0{02,04,06,08}-relax
+#
+# type map.sh for a description of command-line options.
+#
+# the output projected in geographical coordinates is cancelled (--no-proj-output)
-# type map.sh for a description of command-line options.
+WDIR=./output2
-time ../relax <<EOF
+if [ ! -e $WDIR ]; then
+ echo adding directory $WDIR
+ mkdir $WDIR
+fi
+
+time ../relax --no-proj-output $* <<EOF | tee output2/in.param
# grid size (sx1,sx2,sx3)
256 256 256
# sampling size, smoothing & nyquist (dx1,dx2,dx3,beta,nq)
@@ -23,11 +33,11 @@ 0 0 0
# observation depth (displacements and stress) (stress is only exported in GRD)
0 0.5
# output directory
-./output2
+$WDIR
# elastic parameters and gamma = (1-nu) rho g / mu = 8.33e-7 /m = 8.33e-4 /km
1 1 8.33e-4
# integration time (t1)
-50 -2
+50 -2 1
# number of observation planes
0
# number of observation points
@@ -58,4 +68,6 @@ 0
0
# number of dilatation sources
0
+# number of surface loads
+0
EOF
diff -r 6355ba48e6e7 -r 2e102d067069 examples/run3.sh
--- a/examples/run3.sh Thu May 12 14:28:43 2011 -0700
+++ b/examples/run3.sh Thu May 12 15:53:17 2011 -0700
@@ -1,28 +1,40 @@
#!/bin/sh
-# linear viscoelastic relaxation following a strike-slip fault
-# followed by a second strike-slip event and a relaxation of
-# both stress perturbations.
+# comments:
+#
+# afterslip following left-lateral strike-slip on a vertical fault.
+#
+# output at each computation step (Dt = -1).
+#
+# to visualize coseismic deformation (requires GRD output, or manual conversion to GRD format):
+#
+# map.sh -b -3/3/-3/3 -e rpatch.sh output3/000
+#
+# the option -e rpatch.sh adds the trace of the fault to the map.
+# to visualize the displacement due to afterslip only:
+#
+# map.sh -b -5/5/-5/5 -s 0.75 -e rpatch.sh output3/001-relax
+#
+# the -s 0.75 option optimizes the spacing between horizontal vectors.
+# to convert .xyz output in .grd output in post processing, type (requires GMT installed on your machine)
+# xyz2grd.sh output3/000
+#
+# to visualize a time series of postseismic deformation (requires GRD output):
+# map.sh -b -5/5/-5/5 -p -0.002/0.002/0.0001 -v 0.005 output3/0{01,02,03,04,05,06,07,08,09,10}-relax
+#
+# type map.sh for a description of command-line options.
+#
+# the conversion to geographic is aborted (--no-proj-output) and
+# the stress component are not exported (--no-stress-output)
-# output is exported in geographic coordintes in .xyz format
+WDIR=./output3
-# viscous substrate starts at 3 times the seismogenic depth.
-# output at each computation step (Dt = -1)
+if [ ! -e $WDIR ]; then
+ echo adding directory $WDIR
+ mkdir $WDIR
+fi
-# to visualize coseismic deformation (requires GRD output, or manual conversion to GRD format):
-# map.sh -b -3/3/-3/3 output1/000
-
-# to convert .xyz output in .grd output in post processing, type (requires GMT installed on your machine)
-# xyz2grd.sh output1/000
-
-# to visualize a time series of postseismic deformation (requires GRD output):
-# map.sh -b -5/5/-5/5 -p -0.002/0.002/0.0001 -v 0.005 output1/0{01,02,03,04,05,06,07,08,09,10}-relax
-# or simply
-# map.sh -b -5/5/-5/5 -p -0.002/0.002/0.0001 -v 0.005 output1/0??-relax
-
-# type map.sh for a description of command-line options.
-
-time ../relax <<EOF
+time ../relax --no-proj-output --no-stress-output $* <<EOF | tee output3/in.param
# grid size (sx1,sx2,sx3)
256 256 256
# sampling size, smoothing & nyquist (dx1,dx2,dx3,beta,nq)
@@ -38,11 +50,11 @@ 0 0 0
# observation depth (displacement and stress) (stress in only exported in GRD)
0 0
# output directory
-./output3
+$WDIR
# elastic parameters and gamma = (1-nu) rho g / mu = 8.33e-7 /m = 8.33e-4 /km
1 1 8.33e-4
# integration time (t1)
-2 -1
+2 -1 1
# number of observation planes
0
# number of observation points
@@ -59,8 +71,13 @@ 1
1 1 1e3 1e3 0.6 0
# number of creeping faults
1
-# no x1 x2 x3 length width strike dip
- 1 -1 0 1 2 1 0 90
+# define the fault planes where afterslip occurs. it is possible to
+# constrain the rake slip to be within 180 degrees of given direction by
+# providing a rake between -180 and 180. for values outside this range,
+# the constraint of rake is not applied. this afterslip plane starts
+# immediately below the coseismic rupture.
+# no x1 x2 x3 length width strike dip rake (slip rake is +-180 degrees from this value)
+ 1 -1 0 1 2 1 0 90 0
# number of interseismic loading strike-slip
0
# number of interseismic loading opening cracks
@@ -70,9 +87,11 @@ 1
# number of shear dislocations
1
# no slip x1 x2 x3 length width strike dip rake
- 1 -1 -1 0 0 2 1 0 90 0
+ 1 +1 -1 0 0 2 1 0 90 0
# number of tensile cracks
0
# number of dilatation sources
0
+# number of surface loads
+0
EOF
diff -r 6355ba48e6e7 -r 2e102d067069 examples/run4.sh
--- a/examples/run4.sh Thu May 12 14:28:43 2011 -0700
+++ b/examples/run4.sh Thu May 12 15:53:17 2011 -0700
@@ -1,28 +1,49 @@
#!/bin/sh
-# linear viscoelastic relaxation following a strike-slip fault
-# followed by a second strike-slip event and a relaxation of
-# both stress perturbations.
+#
+# comments:
+#
+# linear viscoelastic relaxation in the lower crust and
+# in a confined damage zone around the deep extension of a vertical fault
+# following right-lateral strike-slip on the upper segment of the fault.
+#
+# output is exported in geographic coordintes in .xyz format
+#
+# output at each computation step (Dt = -1)
+#
+# to visualize coseismic deformation (requires GRD output, or manual conversion to GRD format):
+#
+# map.sh -b -3/3/-3/3 output1/000
+#
+# to convert .xyz output in .grd output in post processing, type (requires GMT installed on your machine)
+#
+# xyz2grd.sh output1/000
+#
+# to visualize a time series of postseismic deformation (requires GRD output):
+#
+# map.sh -b -5/5/-5/5 -p -0.002/0.002/0.0001 -v 0.005 output1/00{1,2,3,4}-relax
+#
+# type map.sh for a description of command-line options.
+# type ../relax --help for more info about command-line options.
+#
+# to visualize in 3-D with Paraview (www.paraview.org),
+# load the following files:
+#
+# output4/cgrid.vtp for the computational grid spatial extent
+# output4/rfaults-001.vtp for the coseismic slip distribution
+# output4/disp-000.vtr for the coseismic displacement field
+# output4/linearlayer-001.vtp for the depth of brittle-ductile transition
+# output4/weakzone-001.vtp for the spatial extent of the anomalous viscous zone
+# output4/vel-001.vtr for the instantaneous velocity field
-# output is exported in geographic coordintes in .xyz format
+WDIR=./output4
-# viscous substrate starts at 3 times the seismogenic depth.
-# output at each computation step (Dt = -1)
+if [ ! -e $WDIR ]; then
+ echo adding directory $WDIR
+ mkdir $WDIR
+fi
-# to visualize coseismic deformation (requires GRD output, or manual conversion to GRD format):
-# map.sh -b -3/3/-3/3 output1/000
-
-# to convert .xyz output in .grd output in post processing, type (requires GMT installed on your machine)
-# xyz2grd.sh output1/000
-
-# to visualize a time series of postseismic deformation (requires GRD output):
-# map.sh -b -5/5/-5/5 -p -0.002/0.002/0.0001 -v 0.005 output1/0{01,02,03,04,05,06,07,08,09,10}-relax
-# or simply
-# map.sh -b -5/5/-5/5 -p -0.002/0.002/0.0001 -v 0.005 output1/0??-relax
-
-# type map.sh for a description of command-line options.
-
-time ../relax <<EOF
+time ../relax --no-stress-output $* <<EOF
# grid size (sx1,sx2,sx3)
256 256 256
# sampling size, smoothing & nyquist (dx1,dx2,dx3,beta,nq)
@@ -34,11 +55,11 @@ 0 0 0
# observation depth (displacement and stress) (stress in only exported in GRD)
0 0
# output directory
-./output4
+$WDIR
# elastic parameters and gamma = (1-nu) rho g / mu = 8.33e-7 /m = 8.33e-4 /km
1 1 8.33e-4
-# integration time (t1)
-2 -1
+# integration time (t1), time step and scaling
+2 -1 1
# number of observation planes
0
# number of observation points
@@ -47,12 +68,15 @@ 0
0
# number of linear viscous interfaces
3
+# gammadot0 is assumed to be 0 between depths of 0 and 2.
+# the last value is extended down to infinity.
# no depth gammadot0 cohesion
1 2 1 0
2 3 1 0
3 3 0 0
-# number of ductile zones
+# number of ductile zones (this defines volumes where viscosity changes)
1
+# a confined area below the ruptured fault is allowed to flow viscously.
# no gammadot0 x1 x2 x3 length width thickness strike dip
1 1 -1 0 1.1 2 0.9 1 0 90
# number of powerlaw viscous interfaces
@@ -73,4 +97,6 @@ 0
0
# number of dilatation sources
0
+# number of surface traction
+0
EOF
diff -r 6355ba48e6e7 -r 2e102d067069 examples/run5.sh
--- a/examples/run5.sh Thu May 12 14:28:43 2011 -0700
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,80 +0,0 @@
-#!/bin/sh
-
-# linear viscoelastic relaxation following a strike-slip fault
-# followed by a second strike-slip event and a relaxation of
-# both stress perturbations.
-
-# viscous substrate starts at 3 times the seismogenic depth.
-# output at each computation step (Dt = -1)
-
-# to visualize coseismic deformation (requires GRD output, or manual conversion to GRD format):
-# map.sh -b -3/3/-3/3 output1/000
-
-# to convert .xyz output in .grd output in post processing, type (requires GMT installed on your machine)
-# xyz2grd.sh output1/000
-
-# to visualize a time series of postseismic deformation (requires GRD output):
-# map.sh -b -5/5/-5/5 -p -0.002/0.002/0.0001 -v 0.005 output1/0{01,02,03,04,05,06,07,08,09,10}-relax
-# or simply
-# map.sh -b -5/5/-5/5 -p -0.002/0.002/0.0001 -v 0.005 output1/0??-relax
-
-# type map.sh for a description of command-line options.
-
-time ../relax <<EOF
-# grid size (sx1,sx2,sx3)
-256 256 256
-# sampling size, smoothing & nyquist (dx1,dx2,dx3,beta,nq)
-0.05 0.05 0.05 0.2 2
-# origin position & rotation
-0 0 0
-# geographic origin (longitude, latitude, UTM zone, unit)
-131.9 43.0 52 1e3
-# observation depth (displacement and stress) (stress in only exported in GRD)
-0 0.5
-# output directory
-./output5
-# elastic parameters and gamma = (1-nu) rho g / mu = 8.33e-7 /m = 8.33e-4 /km
-1 1 8.33e-4
-# integration time (t1)
-20 -1
-# number of observation planes
-0
-# number of observation points
-0
-# number of prestress interfaces
-0
-# number of linear viscous interfaces
-2
-# no depth gammadot0 cohesion
- 1 3.0 1.0 0.0
- 2 9.0 1.0 0.0
-# number of linear ductile zones
-0
-# number of powerlaw viscous interfaces
-0
-# number of friction faults
-0
-# number of interseismic loading strike-slip and opening
-0
-0
-# number of coseismic events
-2
-# number of shear dislocations
-1
-# no slip x1 x2 x3 length width strike dip rake
- 1 1 -1 0 0 1 1 0 90 0
-# number of tensile cracks
-0
-# number of dilatation sources
-0
-# time of second event
-1
-# number of shear dislocations
-1
-# no slip x1 x2 x3 length width strike dip rake
- 1 1 0 0 0 1 1 0 90 0
-# number of tensile cracks
-0
-# number of dilatation sources
-0
-EOF
More information about the CIG-COMMITS
mailing list