Skip to content

Commit edc314f

Browse files
author
DemAnasta
authored
Merge pull request #26 from demanasta/develop
Develop, update to beta 6.0
2 parents 138378e + 6e5425c commit edc314f

File tree

8 files changed

+1021
-372
lines changed

8 files changed

+1021
-372
lines changed

.checknum.sh

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/bin/bash
2+
# N={0,1,2,3,...} by syntaxerror
3+
function isNaturalNumber()
4+
{
5+
[[ ${1} =~ ^[0-9]+$ ]]
6+
}
7+
# Z={...,-2,-1,0,1,2,...} by karttu
8+
function isInteger()
9+
{
10+
[[ ${1} == ?(-)+([0-9]) ]]
11+
}
12+
# Q={...,-½,-¼,0.0,¼,½,...} by karttu
13+
function isFloat()
14+
{
15+
[[ ${1} == ?(-)@(+([0-9]).*([0-9])|*([0-9]).+([0-9]))?(E?(-|+)+([0-9])) ]]
16+
}
17+
# R={...,-1,-½,-¼,0.E+n,¼,½,1,...}
18+
function isNumber()
19+
{
20+
isNaturalNumber $1 || isInteger $1 || isFloat $1
21+
}
22+

README.md

Lines changed: 106 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
coulomb2gmt -- pre-released v1.0-beta5.1
1+
coulomb2gmt -- pre-released v1.0-beta6.0
22
==================
33

44
> Bash scripts to plot coulomb results on gmt
@@ -22,13 +22,15 @@ coulomb2gmt -- pre-released v1.0-beta5.1
2222

2323
* Plot Stress changes (Coulomb, Normal, Shear)
2424

25+
* Plot cross section for stress changes and dilatation.
26+
2527
* Plot all strain components (E**, Dilatation)
2628

2729
* Plot Fault geometry (Projection, Surface, Depth)
2830

2931
* Plot GPS displacement observed and modeled
3032

31-
* Plot Fault and CMT databases
33+
* Plot Fault and CMT databases and earhtquake distribution
3234

3335
* Add GMT timestamp logo and custom logo of your organization.
3436

@@ -52,16 +54,53 @@ run: `$ ./coulomb2gmt.sh <inputfile> <inputdata> | options`
5254
* `<inputfile>`: name of input file used from Coulomb. Extention `.inp` not needed. Path to the directory of input files configured at `default-param`.
5355

5456
* `<inputdata>`: Name of input files include results of coulmb calculations. Input data files are:
55-
56-
* `<inputdata>-gmt_fault_surface.dat`:
57-
* `<inputdata>-gmt_fault_map_proj.dat`:
58-
* `<inputdata>-gmt_fault_calc_dep.dat`:
59-
* `<inputdata>-coulomb_out.dat`:
60-
* `<inputdata>-dcff.cou`:
57+
58+
_Fault geometry files:_
59+
60+
* `<inputdata>-gmt_fault_surface.dat`: Source and receiver faults’ trace at surface.
61+
62+
* `<inputdata>-gmt_fault_map_proj.dat`: Surface of source and receiver faults.
63+
64+
* `<inputdata>-gmt_fault_calc_dep.dat`: Intersection of target depth with fault plane.
65+
66+
_Stress change output files:_
67+
68+
* `<inputdata>-coulomb_out.dat`: Coulomb matrix data output.
69+
70+
* `<inputdata>-dcff.cou`: Output of all stress components.
71+
72+
* `<inputdata>-dcff_section.cou`: Output of all stress components in cross section.
73+
74+
* `<inputdata>-Cross_section.dat`: Cross section parameters.
75+
76+
* `<inputdata>-Focal_mech_stress_output.csv`:
77+
78+
_Strain output files:_
79+
80+
* `<inputdata>-Strain.cou`: Data matrix of starin components.
81+
82+
_Earthquakes, GPS, custom text files:_
83+
84+
* Earthquakes distribution: Earthquakes catalogue files. Structure is
85+
86+
> line1: Header
87+
> line2: Header
88+
> line*: YEAR MONTH DAY HH MM SS LAT. LONG. DEPTH MAGNITUDE (10 fields)
89+
90+
* Centroid Moment Tensors file: Structure of file is the old GMT format for CMT. Use \# to comment lines.
91+
92+
> lon lat d str dip slip str dip slip magnt exp plon plat name (14 fields)
93+
94+
* Custom text files: Use new gmt format for `pstext`. (GMT ver > 5.1 )
95+
96+
> lon lat font\_size,font\_type,font\_color angle potision text
97+
98+
* `<inputdata>-gps.dist`: GPS displacements.
6199

62100

63101

64102
### Default parameters
103+
65104
Many parameters configured at `default-param` file.
66105
1. Paths to general files (DEM, logo, faults)
67106
2. Paths to input file directories (.inp, .dat, .cou, .disp)
@@ -76,19 +115,27 @@ Many parameters configured at `default-param` file.
76115

77116
* `-o <filename>`: set custom name of output file. Default is `<inputadata>`.
78117

79-
* `-cmt <path to file>` : Plot Centroid Moment Tensors of earthquakes.
118+
* `-cmt <file>` : Plot Centroid Moment Tensors of earthquakes.
119+
120+
* `-eqdist <file>` : Plot earthquakes distribution. No classification.
80121

81122
* `-faults`: Plot custom fault database catalogue.
82123

83124
* `-mt "map title"`: Custom map title.
84125

126+
* `-ctext <path to file>` : Plot Custom text. Config custom text file.
127+
128+
* `-logogmt`: Plot GMT logo and time stamp.
129+
130+
* `-logocus`: Plot custom logo of your organization.
131+
85132
* `-h`: Help menu
86133

134+
* `-v`: Plot version
135+
87136
* `-debug`:Enable Debug option
88137

89-
* `-logogmt`: Plot GMT logo and time stamp.
90138

91-
* `-logocus`: Plot custom logo of your organization.
92139

93140
### Plot fault parameters
94141

@@ -105,6 +152,8 @@ Many parameters configured at `default-param` file.
105152

106153
* `-nstress`: Plot Normal Stress change.
107154

155+
* `-fcross`: Plot cross section of stress change.
156+
108157
### Plot Strain components
109158

110159
* `-stre**`: Where `**` you can fill all strain components `xx`,`yy`,`zz`, `yz`, `xz`, `xy`.
@@ -135,6 +184,48 @@ Default format is `*.ps` file. You can use the options bellow to convert to ot
135184

136185
* `-outpdf` : Adjust and convert to PDF
137186

187+
## `mvclsbfiles.sh` script
188+
189+
An assistant script `mvclbfiles.sh` developed to move` and rename all output files in specific directories on coulomb home directory.
190+
191+
You must first set `CLB34_HOME` variable the path to coulomb home directory,
192+
etc. `$ export CLB34_HOME=${HOME}/coulomb34`
193+
194+
__Usage__: `$ ./mvclsbfiles.sh <inputdata>`
195+
`<inputdata>` is the code as me ntioned in the main script above.
196+
197+
__Files, Rename and move:__
198+
199+
* `coulomb_out.dat` -> `/gmt_files/<inputdata>-coulomb_out.dat`
200+
201+
_Fault geometry files_
202+
203+
* `gmt_fault_calc_dep.dat` -> `/gmt_files/<inputdata>-gmt_fault_calc_dep.dat`
204+
205+
* `gmt_fault_map_proj.dat` -> `/gmt_files/<inputdata>-gmt_fault_map_proj.dat`
206+
207+
* `gmt_fault_surface.dat` -> `/gmt_files/<inputdata>-gmt_fault_surface.dat`
208+
209+
_GPS displacements_
210+
211+
* `/output_files/GPS_output.csv` -> ` /gps_data/<inputdata>-gps.disp`
212+
213+
_Stress change files_
214+
215+
* `/output_files/Cross_section.dat` -> `/output_files/<inputdata>-Cross_section.dat`
216+
217+
* `/output_files/dcff.cou` -> `/output_files/<inputdata>-dcff.cou`
218+
219+
* `/output_files/dcff_section.cou` -> `/output_files/<inputdata>-dcff_section.cou`
220+
221+
* `/output_files/dilatation_section.cou` -> `/output_files/<inputdata>-dilatation_section.cou`
222+
223+
* `/output_files/Focal_mech_stress_output.csv` -> `/output_files/<inputdata>-Focal_mech_stress_output.csv`
224+
225+
_Strain output files_
226+
227+
* `/output_files/Strain.cou` -> `/output_files/<inputdata>-Strain.cou`
228+
138229
## Contributing
139230

140231
1. Create an issue and describe your idea
@@ -156,4 +247,7 @@ The history of releases can be viewed at [ChangeLog](docs/ChangeLog.md)
156247

157248
* Toda, Shinji, Stein, R.S., Sevilgen, Volkan, and Lin, Jian, 2011, Coulomb 3.3 Graphic-rich deformation and stress-change software for earthquake, tectonic, and volcano research and teaching—user guide: U.S. Geological Survey Open-File Report 2011-1060, 63 p., available at http://pubs.usgs.gov/of/2011/1060/.
158249

159-
* [The Generic Mappting Tools - GMT](http://gmt.soest.hawaii.edu/)
250+
* [The Generic Mappting Tools - GMT](http://gmt.soest.hawaii.edu/)
251+
252+
* Python Software Foundation. Python Language Reference, version 2.7. Available at http://www.python.org
253+

0 commit comments

Comments
 (0)