Skip to content

Commit

Permalink
Merge pull request #9 from demanasta/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
DemAnasta authored Oct 12, 2017
2 parents 7227912 + cdc9c69 commit d1a63e2
Show file tree
Hide file tree
Showing 10 changed files with 2,154 additions and 32 deletions.
43 changes: 14 additions & 29 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,32 +1,17 @@
# Prerequisites
*.d
# gmt tmp files
gmt.conf
gmt.history
*.log

# Compiled Object files
*.slo
*.lo
*.o
*.obj
# gmt outputs
*.eps
*.ps
*.jpg
*.png
*.gif

# Precompiled Headers
*.gch
*.pch
#coulomb output files
*.dat
*.disp
*.inp

# Compiled Dynamic libraries
*.so
*.dylib
*.dll

# Fortran module files
*.mod
*.smod

# Compiled Static libraries
*.lai
*.la
*.a
*.lib

# Executables
*.exe
*.out
*.app
46 changes: 46 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at dganastasiou@gmail.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]

[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/
5 changes: 5 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
## Change log
> Not created yet!
### 2015/02/09 - Inception
> Author(s): Demitris G. Anastasiou
69 changes: 69 additions & 0 deletions Coulomb_anatolia.cpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# cpt file created by: makecpt -Crainbow -I -T-10/10/1 -Z -V
# COLOR_MODEL = RGB
# color legend "ANATOLIA"
#
-31 54 39 253 -30 55 48 253
-30 55 48 253 -29 55 57 253
-29 55 57 253 -28 56 66 253
-28 56 66 253 -27 56 74 253
-27 56 74 253 -26 57 83 253
-26 57 83 253 -25 57 92 253
-25 57 92 253 -24 58 101 253
-24 58 101 253 -23 59 110 253
-23 59 110 253 -22 59 119 253
-22 59 119 253 -21 60 128 253
-21 60 128 253 -20 60 137 253
-20 60 137 253 -19 61 145 254
-19 61 145 254 -18 61 154 254
-18 61 154 254 -17 62 163 254
-17 62 163 254 -16 62 172 254
-16 62 172 254 -15 63 181 254
-15 63 181 254 -14 64 190 254
-14 64 190 254 -13 64 199 254
-13 64 199 254 -12 65 208 254
-12 65 208 254 -11 65 216 254
-11 65 216 254 -10 66 225 254
-10 66 225 254 -9 66 234 254
-9 66 234 254 -8 67 243 254
-8 67 243 254 -7 91 245 254
-7 91 245 254 -6 114 246 254
-6 114 246 254 -5 137 247 254
-5 137 247 254 -4 161 249 255
-4 161 249 255 -3 184 251 255
-3 184 251 255 -2 208 252 255
-2 208 252 255 -1 231 253 255
-1 231 253 255 0 255 255 255
0 255 255 255 1 255 253 233
1 255 253 233 2 255 251 211
2 255 251 211 3 254 249 189
3 254 249 189 4 254 247 167
4 254 247 167 5 254 245 145
5 254 245 145 6 253 243 123
6 253 243 123 7 253 241 101
7 253 241 101 8 253 239 79
8 253 239 79 9 252 229 76
9 252 229 76 10 252 218 74
10 252 218 74 11 251 208 71
11 251 208 71 12 250 197 69
12 250 197 69 13 250 187 66
13 250 187 66 14 249 177 64
14 249 177 64 15 248 166 61
15 248 166 61 16 248 156 59
16 248 156 59 17 247 145 56
17 247 145 56 18 246 135 54
18 246 135 54 19 246 125 51
19 246 125 51 20 245 114 49
20 245 114 49 21 245 104 46
21 245 104 46 22 244 94 44
22 244 94 44 23 243 83 41
23 243 83 41 24 243 73 39
24 243 73 39 25 242 62 36
25 242 62 36 26 241 52 34
26 241 52 34 27 241 42 31
27 241 42 31 28 240 31 29
28 240 31 29 29 239 21 26
29 239 21 26 30 239 10 24
30 239 10 24 31 238 0 21
B 54 39 253
F 238 0 21
N 255 255 255
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2017 DemAnasta
Copyright (c) 2017 D. G. Anastasiou

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
156 changes: 154 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,154 @@
# coulomb2gmt
bash scripts to plot coulomb results on gmt
coulomb2gmt -- pre-released v1.0-beta*
==================

> Bash scripts to plot coulomb results on gmt

[![License MIT](http://img.shields.io/badge/license-MIT-brightgreen.svg)](https://github.com/demanasta/coulomb2gmt/blob/master/LICENSE)
[![](https://img.shields.io/github/release/demanasta/doulomb2gmt.svg)](https://github.com/coulomb2gmt/pres-templates/releases/latest)
[![](https://img.shields.io/github/tag/demanasta/coulomb2gmt.svg)](https://github.com/demanasta/coulomb2gmt/tags)
[![](https://img.shields.io/github/stars/demanasta/coulomb2gmt.svg)](https://github.com/demanasta/coulomb2gmt/stargazers)
[![](https://img.shields.io/github/forks/demanasta/coulomb2gmt.svg)](https://github.com/demanasta/coulomb2gmt/network)
[![](https://img.shields.io/github/issues/demanasta/coulomb2gmt.svg)](https://github.com/demanasta/coulomb2gmt/issues)

## Author(s)
* Demitris G. Anastasiou

--------------------------------------------------------------------------------

## Features

* auto-configure map lat-long from input files (.inp)

* Plot Stress changes (Coulomb, Normal, Shear)

* Plot all strain components

* Plot Fault geometry (Projection, Surface, Depth)

* Plot gps displacement observed and modeled

* Plot Fault and CMT databases

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

*Adjust paper size to map and convert in different output formats (.jpg, .png, .eps, .pdf)


## Requirements

* __GMT__: [The Generic Mappting Tools - GMT](http://gmt.soest.hawaii.edu/) version > 5.1.1 . Recommented installation from source code.
* for _Ubuntu/Debian_ if you use default package installation you have to install also `libgmt-dev` package

* __Coulomb 3__: [Coulomb 3, developed by USGS](https://earthquake.usgs.gov/research/software/coulomb/)

* __python__: required for some calculations included in the main script.

## Usage details
The main script is: `coulomb2gmt.sh`

run: `$ ./coulomb2gmt.sh <inputfile> <inputdata> | options`

* `<inputfile>`: name of input file used from Coulomb. Extention `.inp` not needed. Path to the directory of input files configured at `default-param`.

* `<inputdata>`: Name of input files include results of coulmb calculations. Input data files are:

* `<inputdata>-gmt_fault_surface.dat`:
* `<inputdata>-gmt_fault_map_proj.dat`:
* `<inputdata>-gmt_fault_calc_dep.dat`:
* `<inputdata>-coulomb_out.dat`:
* `<inputdata>-dcff.cou`:



### Default parameters
Many parameters configured at `default-param` file.


### General options

* `-r`: set custom region parameters. _Structure_ `-r minlon maxlon minlat maxlat prjscale`

* `-topo`: plot topography using dem file

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

* `-cmt` : Plot Centroid Moment Tensors of earthquakes.

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

* `-mt`:

* `-h`: Help menu

* `-debug`:Enable Debug option

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

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

### Plot fault parameters

* `-fproj`: Plot source and receiver faults' trace at surface.

* `-fsurf`: Plot surface of source and receiver faults.

* `-fdep`: Plot intersection of target depth with fault plane.

### Plot stress
* `-cstress`: Plot Coulomb Stress change.

* `-sstress`: Plot Shear Stress change.

* `-nstress`: Plot Normal Stress change.

### Plot Strain components

* `-stre**`: Where `**` you can fill all strain components `xx`,`yy`,`zz`, `yz`, `xz`, `xy`.

* `-strdil`: Plot dilatation (Exx + Eyy + Ezz )

### Plot gps velocities, observed and modeled

* `-dgpsho`: Observed GPS horizontal displacements.

* `-dgpshm`: Modeled horizontal displacements on GPS sites (Okada 1985).

* `-dgpsvo`: Observed GPS vertical desplacements.

* `-dgpsvm`: Modeled vertical displacements on GPS sites (Okada 1985).

> Configure displacement scale in `default-param` file

### Output formats
Default format is `*.ps` file. You can use the options bellow to convert to other format and adjust paper size to map size.

* `-outjpg` : Adjust and convert to JPEG.

* `-outpng` : Adjust and convert to PNG (transparent where nothing is plotted)

* `-outeps` : Adjust and convert to EPS"

* `-outpdf` : Adjust and convert to PDF

## Contributing

1. Create an issue and describe your idea
2. [Fork it](https://github.com/demanasta/coulomb2gmt/network#fork-destination-box)
3. Create your feature branch (`git checkout -b my-new-idea`)
4. Commit your changes (`git commit -am 'Add some feature'`)
5. Publish the branch (`git push origin my-new-idea`)
6. Create a new Pull Request
7. Profit! :white_check_mark:

## ChangeLog

The history of releases can be viewed at [ChangeLog](ChangeLog.md)

## Acknowlegments

## References
* [Coulomb 3, developed by USGS](https://earthquake.usgs.gov/research/software/coulomb/)

* [The Generic Mappting Tools - GMT](http://gmt.soest.hawaii.edu/)
Loading

0 comments on commit d1a63e2

Please sign in to comment.