[cig-commits] commit: include basic scripting commands in .sh tutorial examples.

Mercurial hg at geodynamics.org
Tue Dec 18 18:33:14 PST 2012


changeset:   161:d73613e0505b
tag:         tip
user:        Sylvain Barbot <sbarbot at caltech.edu>
date:        Tue Dec 18 18:33:10 2012 -0800
files:       examples/tutorials/run1.sh examples/tutorials/run2.sh examples/tutorials/run3.sh examples/tutorials/run4.sh
description:
include basic scripting commands in .sh tutorial examples.


diff -r d06d70a2e91e -r d73613e0505b examples/tutorials/run1.sh
--- a/examples/tutorials/run1.sh	Sun Dec 16 13:22:54 2012 -0800
+++ b/examples/tutorials/run1.sh	Tue Dec 18 18:33:10 2012 -0800
@@ -71,4 +71,75 @@ if [ ! -e $WDIR ]; then
 	mkdir $WDIR
 fi
 
-OMP_NUM_THREADS=4 relax $* < run1.input | tee $WDIR/in.param
+OMP_NUM_THREADS=4 relax $* <<EOF | tee $WDIR/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)
+0.05 0.05 0.05 0.2 2
+# origin position & rotation
+0 0 0
+# geographic origin (longitude and latitude), UTM zone and real length unit (usually m or km)
+# displacements and stress are converted to lon/lat geographic coordinates
+# unit corresponds to a scaling from dx1,dx2,dx3 to real unit
+# use unit = 1   if dimensions are described in units of m
+# use unit = 1e3 if dimensions are described in units of km
+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)
+$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
+20 -1 1
+# number of observation planes
+1
+# no x1 x2 x3 length width strike dip
+   1  0 -3  0      6     6     90  90
+# number of observation points
+0
+# number of Coulomb patches
+0
+# number of prestress interfaces
+0
+# number of linear viscous interfaces (where viscosity changes)
+2
+# no depth gammadot0 cohesion (gammadot0 is shear modulus divided by viscosity)
+   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 (when slip distribution is prescribed)
+2
+# number of shear dislocations (strike-slip and dip-slip faulting)
+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
+# number of surface traction
+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
+# number of surface traction
+0
+EOF
+
diff -r d06d70a2e91e -r d73613e0505b examples/tutorials/run2.sh
--- a/examples/tutorials/run2.sh	Sun Dec 16 13:22:54 2012 -0800
+++ b/examples/tutorials/run2.sh	Tue Dec 18 18:33:10 2012 -0800
@@ -23,4 +23,79 @@ if [ ! -e $WDIR ]; then
 	mkdir $WDIR
 fi
 
-OMP_NUM_THREADS=2 time relax --no-proj-output $* < run2.input | tee $WDIR/in.param
+OMP_NUM_THREADS=2 time relax --no-proj-output $* <<EOF | tee $WDIR/in.param
+# nonlinear viscoelastic relaxation (power exponent n=3)
+# following slip on a strike-slip fault
+#
+# output every two computational steps (Dt = -2). 
+# The time step is computed automatically and the value unchanged (scale = 1)
+#
+# grid size (sx1,sx2,sx3)
+256 256 256
+# sampling size defines the grid spacing in units of distance
+# smoothing is a roll-off parameter 0 <= beta <= 0.5 that tapers 
+# the slip distribution on faults beta=0.2 and beta=0.3 are good values
+# nyquist is the minimum size of fault patches, relative to the sampling size
+# sampling size, smoothing & nyquist (dx1,dx2,dx3,beta,nq)
+0.05 0.05 0.05 0.2 0000
+# origin position & rotation
+0 0 0
+# observation depth (displacements and stress) (stress is only exported in GRD)
+0 0.5
+# output directory (all output files are stored in the following directory)
+$WDIR
+# the elastic parameters (Lambda and mu) are the Lame parameter and the shear modulus
+# gamma=(1-nu)*rho*g/mu is a wavelength relevant to buoyancy.
+# elastic parameters and gamma = (1-nu) rho g / mu = 8.33e-7 /m = 8.33e-4 /km
+1 1 8.33e-4
+# integration time refers to the length in units of time of the simulation.
+# integration time (t1)
+20 -1 0.5
+# observation planes are arbitrary planes where the inelastic strain rate
+# is sampled for output.
+# number of observation planes
+0
+# observation points are GPS points, for example, where time series of
+# displacement are output.
+# number of observation points
+0
+# stress observation segments are patches where Coulomb and other
+# stress components are evaluated.
+# number of stress observation segments
+0
+# prestress interfaces corresponds to depths where the prestress
+# tensor changes (default is no prestress).
+# number of prestress interfaces
+0
+# viscous interfaces are depths where the viscous properties change.
+# number of linear viscous interfaces
+0
+# number of powerlaw viscous interfaces
+2
+# no depth gammadot0 power cohesion
+   1   2.0       5e3   3.0      0.0
+   2   8.0       5e3   3.0      0.0
+# ductile zones corresponds to volumes where viscous properties change.
+# number of power-law ductile zones
+0
+# depths where friction properties change.
+# number of friction interfaces
+0
+# number of interseismic loading strike-slip and opening
+0
+0
+# number of coseismic events
+1
+# number of shear dislocations (strike-slip and dip-slip faults)
+1
+# index slip x1 x2 x3 length width strike dip rake
+      1    1 -1  0  0      2     1      0  90    0
+# number of tensile cracks
+0
+# volumetric deformation (Mogi source)
+# number of dilatation sources
+0
+# surface loads can be used to model loading of lakes or dams
+# number of surface loads
+0
+EOF
diff -r d06d70a2e91e -r d73613e0505b examples/tutorials/run3.sh
--- a/examples/tutorials/run3.sh	Sun Dec 16 13:22:54 2012 -0800
+++ b/examples/tutorials/run3.sh	Tue Dec 18 18:33:10 2012 -0800
@@ -86,4 +86,70 @@ if [ ! -e $WDIR ]; then
 	mkdir $WDIR
 fi
 
-time relax --no-proj-output --no-stress-output $* < run3.input | tee $WDIR/in.param
+time relax --no-proj-output --no-stress-output $* <<EOF | tee $WDIR/in.param
+# 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 1
+# origin position & rotation
+0 0 0
+# geographic origin (longitude, latitude, UTM zone, unit)
+# displacements and stress are converted to lon/lat geographic coordinates
+# unit corresponds to a scaling from dx1,dx2,dx3 to real unit
+# use unit = 1   if dimensions are described in units of m
+# use unit = 1e3 if dimensions are described in units of km
+#-115 37.5 11 1e3
+# observation depth (displacement and stress) (stress in only exported in GRD)
+0 0
+# output directory
+$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)
+0.5 -1 0.01
+# number of observation planes
+1
+# no  x1 x2  x3 length width strike dip
+   1  -3  0 0.5      6   2.5      0  90
+# number of observation points
+0
+# number of Coulomb patches
+0
+# number of prestress interfaces
+0
+# number of linear viscous interfaces
+0
+# number of powerlaw viscous interfaces
+0
+# number of friction interfaces
+1
+# no    depth   gamma0 (a-b)sig friction cohesion
+   1      0.0      1e3      1e3      0.0        0
+# number of creeping faults
+2
+# 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.
+# nb  x1  x2 x3 length width strike dip rake (slip rake is +-90 degrees from this value)
+   1  -2 0.1  0      4     2      0  90    0
+   2  -2 1.4  0      4     2      0  90    0
+# number of interseismic loading strike-slip
+0
+# number of interseismic loading opening cracks
+0
+# number of coseismic events
+1
+# number of shear dislocations
+1
+# no slip    x1  x2 x3 length width strike dip rake
+   1   +1  -0.5 0.1  0      1     1      0  90    0
+# number of tensile cracks
+0
+# number of dilatation sources
+0
+# number of surface loads
+0
+EOF
+
diff -r d06d70a2e91e -r d73613e0505b examples/tutorials/run4.sh
--- a/examples/tutorials/run4.sh	Sun Dec 16 13:22:54 2012 -0800
+++ b/examples/tutorials/run4.sh	Tue Dec 18 18:33:10 2012 -0800
@@ -43,4 +43,67 @@ if [ ! -e $WDIR ]; then
 	mkdir $WDIR
 fi
 
-time relax --no-stress-output --no-proj-output $* < run4.input | tee $WDIR/in.param
+time relax --no-stress-output --no-proj-output $* <<EOF | tee $WDIR/in.param
+# 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 1
+# origin position & rotation
+0 0 0
+# observation depth (displacement and stress) (stress in only exported in GRD)
+0 0
+# output directory
+$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), time step and scaling
+2 -1 1
+# number of observation planes
+0
+# number of observation points
+0
+# number of Coulomb patches
+5
+# no.   x1 x2  x3 length width strike dip friction
+    1 -1.0  1 0.5    0.1   0.1      0  90      0.6
+    2 -0.5  1 0.5    0.1   0.1     90  90      0.6
+    3  0.0  1 0.5    0.1   0.1      0  90      0.6
+    4 +0.5  1 0.5    0.1   0.1     45  90      0.6
+    5 +1.0  1 0.5    0.1   0.1      0  90      0.6
+# number of prestress interfaces
+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 (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
+0
+# number of friction faults
+0
+# number of interseismic loading strike-slip
+0
+# number of interseismic loading opening cracks
+0
+# number of coseismic events
+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
+# number of tensile cracks
+0
+# number of dilatation sources
+0
+# number of surface traction
+0
+EOF
+



More information about the CIG-COMMITS mailing list