You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+16-13Lines changed: 16 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,4 @@
1
-
gFlex
2
-
=====
1
+
# gFlex
3
2
4
3
***Multiple methods to solve elastic plate flexure, designed for applications to Earth's lithosphere.***
5
4
@@ -28,7 +27,7 @@ In order to run properly, gFlex requires the following Python dependencies:
28
27
29
28
Use your package manager to download and install the required Python packages. For Debian/Ubuntu, it will be something like:
30
29
31
-
```
30
+
```bash
32
31
# Basic packages
33
32
sudo apt-get install \
34
33
python python-numpy python-scipy \
@@ -51,7 +50,7 @@ Download [**python(x,y)**](https://code.google.com/p/pythonxy/wiki/Downloads) or
51
50
###### Mac
52
51
53
52
The current recommendation is to use a package manager like [**homebrew**](http://brew.sh/). With this you can install Python, and then move on to using **pip** (or **homebrew**) to install the Python modules. A good introduction to this can be found here: http://www.thisisthegreenroom.com/2011/installing-python-numpy-scipy-matplotlib-and-ipython-on-lion. See the **Linux** instructions for the list of packages that you will need; after installing pip, these commands can be substituted as follows, e.g.,
54
-
```
53
+
```bash
55
54
# Homebrew
56
55
sudo brew install python-numpy
57
56
# Pip
@@ -63,12 +62,12 @@ Recent efforts to download Python distributions (both **Anaconda** and **Enthoug
63
62
##### Setuptools and ez_setup (Windows and Mac with distributions)
64
63
65
64
The distributions for Mac and Windows do not come with setuptools, which is required to install gFlex. However, if you install ez_setup, the gFlex install script will automatically install setuptools for you. Simply type:
66
-
```
65
+
```bash
67
66
pip install ez_setup # Windows or Mac without special privileges required
68
67
sudo pip install ez_setup # Mac where sudo privileges are required
69
68
```
70
69
Of course, one can also bypass the need for the install script to install setuptools by using pip preemptively:
71
-
```
70
+
```bash
72
71
pip install setuptools # Windows or Mac without special privileges required
73
72
sudo pip install setuptools # Mac where sudo privileges are required
74
73
```
@@ -80,7 +79,7 @@ sudo pip install setuptools # Mac where sudo privileges are required
80
79
gFlex is downloadable from the Python Package Index ([PyPI](https://pypi.python.org/pypi)); see https://pypi.python.org/pypi/gFlex.
81
80
82
81
If you have **pip**, you may simply type:
83
-
```
82
+
```bash
84
83
pip install
85
84
pip install gflex
86
85
# Or if the destination install folder requires sudo access
@@ -94,7 +93,7 @@ and you will have a full, running copy of the latest release version of gFlex.
94
93
95
94
gFlex may be downloaded here at GitHub, by either:
96
95
* Copying the link at right and pasting it into the command prompt as follows:
97
-
```
96
+
```bash
98
97
git clone <LINK>
99
98
```
100
99
* Downloading and extracting the compressed ZIP file (link at right)
@@ -104,7 +103,7 @@ git clone <LINK>
104
103
105
104
Install gFlex at the command prompt using [setuptools](https://pypi.python.org/pypi/setuptools). If you have administrator privileges, which *is often also the case when doing this install under Windows*, you may drop the "sudo". For standard Linux or Mac users, the "sudo" will remain necessary, and you will have to enter your administrator password for the program to be added to your local set of applications (e.g., as "/usr/local/bin/gflex").
106
105
107
-
```
106
+
```bash
108
107
# For standard Linux/Mac users:
109
108
sudo python setup.py install
110
109
# OR
@@ -132,7 +131,7 @@ For options 1 and 2, there are pre-built methods that can be selected along the
132
131
133
132
A configuration file can be generated to run gFlex; see examples in the **input/** directory. To run gFlex using this file, one simply opens a terminal window and types:
134
133
135
-
```
134
+
```bash
136
135
# run like this:
137
136
gflex <path-to-configuration-file>
138
137
```
@@ -253,7 +252,7 @@ You may run gFlex from other Python programs. When you install it (above), this
253
252
##### With no configuration file (recommended)
254
253
**input/run_in_script_2D.py**, reproduced below, is a good example of how to set the variables and run the model. This method requires no input file, as all of the values are set inside the Python script that imports gflex. This is essentially how the GRASS GIS interface was written, and is a way to embed the abilities of gFlex into another model. A one-dimensional example, **input/run_in_script_1D.py**, is also available.
255
254
256
-
```
255
+
```python
257
256
#! /usr/bin/env python
258
257
259
258
import gflex
@@ -317,7 +316,7 @@ deflection = flex.w
317
316
318
317
If you would like to use a Python script with a configuration file, this is also possible.
319
318
320
-
```
319
+
```python
321
320
import gflex
322
321
323
322
# To use a configuration file:
@@ -346,7 +345,7 @@ obj.output()
346
345
347
346
To run gFlex inside of GRASS GIS 7, run the following commands from within a GRASS GIS session:
348
347
349
-
```
348
+
```bash
350
349
g.extension r.flexure
351
350
g.extension v.flexure
352
351
```
@@ -367,3 +366,7 @@ When running **r.flexure**, it is important to ensure that the elastic thickness
367
366
Landlab is an in-development (but nearing release) Earth-surface modeling framework built to facilitate easy integration of geomorphic, ecological, hydrological, geological, etc. Earth-surface related models to simulate and investigate the links between multiple processes. gFlex can be linked with Landlab, and the code to do this is available within the Landlab repository at https://github.com/landlab/landlab/tree/master/landlab/components/gFlex.
368
367
369
368
The Landlab interface to gFlex also provides gFlex with the Community Surface Dynamics Modeling System (CSDMS) [Component Model Interface (CMI)](http://csdms.colorado.edu/wiki/CMI_Description) interface. This allows it to be run as a coupled component across multiple programming languages and paradigms as part of the CSDMS community of models. For more information on model coupling with CSDMS, see the example presentation at http://csdms.colorado.edu/w/images/CSDMS_lecture7.pdf and the paper on the model coupling published by [Peckham et al., "A component-based approach to integrated modeling in the geosciences: The design of CSDMS"](http://www.sciencedirect.com/science/article/pii/S0098300412001252).
369
+
370
+
## Utilities
371
+
372
+
The "utilities" folder currently contains only one program, `flexural_wavelength_calculator.py`. Operating it is simple and fairly rudimentary: just edit the input variables directly in the calculator Python file, and then run it to see what the flexural parameter, first zero-crossing point (on the load-side of the forebulge), and the flexural wavelength.
0 commit comments