Skip to content

Commit 7ea68df

Browse files
author
Marius Isken
committed
adding pre-commit
1 parent 9cbbf4a commit 7ea68df

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+1054
-1093
lines changed

.github/workflows/blank.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,15 @@ on:
66
branches:
77
- main
88
tags: '*'
9+
910
jobs:
11+
pre-commit:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v3
15+
- uses: actions/setup-python@v3
16+
- uses: pre-commit/[email protected]
17+
1018
run_tests:
1119
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
1220
runs-on: ${{ matrix.os }}

README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
[![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://juliageodynamics.github.io/GeophysicalModelGenerator.jl/dev/)
55
[![Build Status](https://github.com/JuliaGeodynamics/GeophysicalModelGenerator.jl/workflows/CI/badge.svg)](https://github.com/JuliaGeodynamics/GeophysicalModelGenerator.jl/actions)
66

7-
Creating consistent 3D images of geophysical and geological datasets and turning that into an input model for geodynamic simulations is often challenging. The aim of this package is to help with this, by providing a number of routines to easily import data and create a consistent 3D visualisation from it in the VTK-toolkit format, which can for example be viewed with [Paraview](https://www.paraview.org). In addition, we provide a range of tools that helps to generate input models to perform geodynamic simulations and import the results of such simulations back into julia.
7+
Creating consistent 3D images of geophysical and geological datasets and turning that into an input model for geodynamic simulations is often challenging. The aim of this package is to help with this, by providing a number of routines to easily import data and create a consistent 3D visualisation from it in the VTK-toolkit format, which can for example be viewed with [Paraview](https://www.paraview.org). In addition, we provide a range of tools that helps to generate input models to perform geodynamic simulations and import the results of such simulations back into julia.
88

99
![README_img](./docs/src/assets/img/Readme_pic.png)
1010
### Contents
11-
* [Main features](#main-features)
11+
* [Main features](#main-features)
1212
* [Usage](#usage)
1313
* [Installation](#installation)
1414
* [Dependencies](#dependencies)
@@ -26,14 +26,14 @@ Some of the key features are:
2626
- Grab screenshots of cross-sections or maps in published papers and view them in 3D (together with other data).
2727
- Create a consistent overview that includes all available data of a certain region.
2828
- Create initial model setups for the 3D geodynamic code [LaMEM](https://bitbucket.org/bkaus/lamem/src/master/).
29-
- Import LaMEM timesteps.
29+
- Import LaMEM timesteps.
3030

3131
All data is transformed into either a `GeoData` or a `UTMData` structure which contains info about `longitude/latitude/depth`, `ew/ns/depth` coordinates along with an arbitrary number of scalar/vector datasets, respectively. All data can be exported to Paraview with the `Write_Paraview` routine, which transfers the data to a `ParaviewData` structure (that contains Cartesian Earth-Centered-Earth-Fixed (ECEF) `x/y/z` coordinates, used for plotting)
32-
33-
## Usage
32+
33+
## Usage
3434
The best way to learn how to use this is to install the package (see below) and look at the tutorials in the [manual](https://juliageodynamics.github.io/GeophysicalModelGenerator.jl/dev/).
3535

36-
## Installation
36+
## Installation
3737
First, you need to install julia on your machine. We recommend to use the binaries from [https://julialang.org](https://julialang.org).
3838
Next, start julia and switch to the julia package manager using `]`, after which you can add the package.
3939
```julia
@@ -59,7 +59,7 @@ We rely on a number of additional packages, which are all automatically installe
5959

6060

6161
## Visualising Alpine data
62-
We have used this package to interpret various data sets of the Alps (mostly openly available, sometimes derived from published papers). You can download the resulting paraview files here (using the `*.vts` format), where we also included the julia scripts to do the work (some of which are also described in more detail in the tutorials). Just unzip the files and open the corresponding `*.vts` in Paraview.
62+
We have used this package to interpret various data sets of the Alps (mostly openly available, sometimes derived from published papers). You can download the resulting paraview files here (using the `*.vts` format), where we also included the julia scripts to do the work (some of which are also described in more detail in the tutorials). Just unzip the files and open the corresponding `*.vts` in Paraview.
6363

6464
[https://seafile.rlp.net/d/22b0fb85550240758552/](https://seafile.rlp.net/d/22b0fb85550240758552/)
6565

@@ -68,12 +68,12 @@ If you want your data be included here as well, give us an email (or even better
6868
You are very welcome to request new features and point out bugs by opening an issue. You can also help by adding features and creating a pull request.
6969

7070
## Development roadmap
71-
In the pipeline:
71+
In the pipeline:
7272
- More tutorials
7373
- Add more import tools.
7474
- Compute gravity anomalies for lon/lat datasets, rather than just x/y/z.
75-
- Provide an interface to [geomIO](https://bitbucket.org/geomio/geomio/wiki/Home) (currently being translated from MATLAB to python) in order to allow creating 3D geometric model setups by drawing in Inkscape.
76-
- Provide tools to create and export 3D geodynamic model setups.
77-
75+
- Provide an interface to [geomIO](https://bitbucket.org/geomio/geomio/wiki/Home) (currently being translated from MATLAB to python) in order to allow creating 3D geometric model setups by drawing in Inkscape.
76+
- Provide tools to create and export 3D geodynamic model setups.
77+
7878
## Funding
7979
Development of this software package was funded by the German Research Foundation (DFG grants TH2076/7-1 and KA3367/10-1), which are part of the [SPP 2017 4DMB project](http://www.spp-mountainbuilding.de) project as well as by the European Research Council under grant ERC CoG #771143 - [MAGMA](https://magma.uni-mainz.de). The project was initiated at a [TeMaS](https://temas.uni-mainz.de) workshop with researchers from Frankfurt and Mainz where we realized that it is way too timeconsuming to collect available data of a certain region.

docs/make.jl

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ makedocs(;
2626
"ISC earthquake data" => "man/tutorial_ISC_data.md",
2727
"Plot GPS vectors" => "man/tutorial_GPS.md",
2828
"Read UTM data" => "man/tutorial_UTM.md",
29-
"VoteMaps" => "man/Tutorial_Votemaps.md",
29+
"VoteMaps" => "man/Tutorial_Votemaps.md",
3030
"Kilometer-scale volcano" => "man/tutorial_local_Flegrei.md",
3131
"Generating LaMEM model" => "man/LaPalma_example.md",
3232
"Create movies" => "man/tutorial_time_Seismicity.md"
@@ -43,7 +43,7 @@ makedocs(;
4343
"LaMEM" => "man/lamem.md"
4444
],
4545
"List of functions" => "man/listfunctions.md"
46-
],
46+
],
4747
)
4848

4949
deploydocs(;
@@ -55,4 +55,3 @@ deploydocs(;
5555
forcepush=true,
5656
push_preview = true
5757
)
58-

docs/src/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Documentation for [GeophysicalModelGenerator](https://github.com/JuliaGeodynamic
99
The main purpose of this package is to simplify the process of going from 1D/2D/3D geophysical data to a 3D consistent model of the region. By simplifying the process of plotting the data, it becomes easier to compare different data sets, and generate a 3D models that can be used for other computations such as geodynamic simulations, or forward modelling of gravity anomalies.
1010

1111
For this, GeophysicalModelGenerator provides the following functionality:
12-
- A consistent GeoData structure, that holds the data along with lon/lat/depth information.
12+
- A consistent GeoData structure, that holds the data along with lon/lat/depth information.
1313
- Routines to generate VTK files from the GeoData structure in order to visualize results in Paraview.
1414
- The ability to deal with points, 2D profiles and 3D volumes, for both scalar and vector values.
1515
- Rapidly import screenshots of published papers and compare them with other data sets in 3D using paraview.

docs/src/man/LaPalma_example.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Topo = ImportTopo(lon = [-18.7, -17.1], lat=[28.0, 29.2], file="@earth_relief_03
2828
````
2929

3030
````
31-
GeoData
31+
GeoData
3232
size : (1921, 1441, 1)
3333
lon ϵ [ 341.3 : 342.9]
3434
lat ϵ [ 28.0 : 29.2]
@@ -55,7 +55,7 @@ Topo=load("Topo_LaPalma.jld2","Topo")
5555
````
5656

5757
````
58-
GeoData
58+
GeoData
5959
size : (1921, 1441, 1)
6060
lon ϵ [ 341.3 : 342.9]
6161
lat ϵ [ 28.0 : 29.2]
@@ -72,7 +72,7 @@ data_all_EQ = load("EQ_Data.jld2","data_all_EQ")
7272
````
7373

7474
````
75-
GeoData
75+
GeoData
7676
size : (6045,)
7777
lon ϵ [ -18.0341 : -17.6671]
7878
lat ϵ [ 28.3102 : 28.8144]
@@ -118,7 +118,7 @@ Topo_cart = Convert2CartData(Topo, proj)
118118
````
119119

120120
````
121-
CartData
121+
CartData
122122
size : (1921, 1441, 1)
123123
x ϵ [ -86.09445705828863 km : 73.67229892155609 km]
124124
y ϵ [ -63.5531883197492 km : 73.28446155584604 km]
@@ -143,7 +143,7 @@ Topo_LaMEM = ProjectCartData(Topo_LaMEM, Topo, proj)
143143
````
144144

145145
````
146-
CartData
146+
CartData
147147
size : (701, 651, 1)
148148
x ϵ [ -70.0 km : 70.0 km]
149149
y ϵ [ -60.0 km : 70.0 km]
@@ -177,7 +177,7 @@ Grid = ReadLaMEM_InputFile("LaPalma.dat")
177177
````
178178

179179
````
180-
LaMEM Grid:
180+
LaMEM Grid:
181181
nel : (64, 64, 32)
182182
marker/cell : (3, 3, 3)
183183
markers : (192, 192, 192)
@@ -190,7 +190,7 @@ LaMEM Grid:
190190
The `LaMEM_grid` structure contains the number of elements in every direction and the number of markers in every cell.
191191
It also contains `Grid.X`, `Grid.Y`, `Grid.Z`, which are the coordinates of each of the markers in the 3 directions.
192192

193-
In a next step we need to give each of these points a `Phase` number (which is an integer, that indicates the type of the rock that point has), as well as the temperature (in Celcius).
193+
In a next step we need to give each of these points a `Phase` number (which is an integer, that indicates the type of the rock that point has), as well as the temperature (in Celsius).
194194

195195
````julia
196196
Phases = ones(Int32,size(Grid.X))*2;
@@ -298,4 +298,3 @@ If you are interested in doing this, have a look at the LaMEM [wiki](https://bit
298298
---
299299

300300
*This page was generated using [Literate.jl](https://github.com/fredrikekre/Literate.jl).*
301-

docs/src/man/Tutorial_Votemaps.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,4 +98,3 @@ Similarly, you could only look at a single model (even when that is perhaps easi
9898
---
9999

100100
*This page was generated using [Literate.jl](https://github.com/fredrikekre/Literate.jl).*
101-

docs/src/man/installation.md

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ In order to use then package you obviously need to install julia. We recommend d
77

88

99
### 2. Install Visual Studio Code
10-
The julia files itself are text files (just like matlab scripts). You may want to edit or modify them at some stage, for which you can use any text editor for that. We prefer to use the freely available [Visual Studio Code](https://code.visualstudio.com) as it has a build-in terminal and is the comes with the (official) julia debugger (install the Julia extension for that).
10+
The julia files itself are text files (just like matlab scripts). You may want to edit or modify them at some stage, for which you can use any text editor for that. We prefer to use the freely available [Visual Studio Code](https://code.visualstudio.com) as it has a built-in terminal and is the comes with the (official) julia debugger (install the Julia extension for that).
1111

1212
### 3. Getting started with julia
1313
You start julia on the command line with:
@@ -25,19 +25,19 @@ This will start the command-line interface of julia:
2525
_/ |\__'_|_|_|\__'_| | Official https://julialang.org/ release
2626
|__/ |
2727
28-
julia>
28+
julia>
2929
```
3030

3131
From the julia prompt, you start the package manager by typing `]`:
3232
```julia
33-
(@v1.6) pkg>
33+
(@v1.6) pkg>
3434
```
3535
And you return to the command line with a backspace.
3636

37-
Also useful is that julia has a build-in terminal, which you can reach by typing `;` on the command line:
37+
Also useful is that julia has a built-in terminal, which you can reach by typing `;` on the command line:
3838
```julia
3939
julia>;
40-
shell>
40+
shell>
4141
```
4242
In the shell, you can use the normal commands like listing the content of a directory, or the current path:
4343
```julia
@@ -48,7 +48,7 @@ shell> pwd
4848
```
4949
As before, return to the main command line (called `REPL`) with a backspace.
5050

51-
If you want to see help information for any julia function, type `?` followed by the command.
51+
If you want to see help information for any julia function, type `?` followed by the command.
5252
An example for `tan` is:
5353
```julia
5454
help?> tan
@@ -73,7 +73,7 @@ search: tan tanh tand atan atanh atand instances transpose transcode contains Un
7373
2×2 Matrix{Float64}:
7474
-1.09252 -1.09252
7575
-1.09252 -1.09252
76-
```
76+
```
7777

7878
If you are in a directory that has a julia file (which have the extension `*.jl`), you can open that file with Visual Studio Code:
7979
```julia
@@ -115,17 +115,13 @@ julia> using GeophysicalModelGenerator
115115
```
116116

117117
### 5. Other useful packages
118-
As you will work your way through the tutorials you will see that we often use external packages, for example to load ascii data files into julia. You will find detailed instructions in the respective tutorials.
118+
As you will work your way through the tutorials you will see that we often use external packages, for example to load ascii data files into julia. You will find detailed instructions in the respective tutorials.
119119

120120
If you already want to install some of those, here our favorites. Install them through the package manager:
121121

122-
- [CSV](https://github.com/JuliaData/CSV.jl): Read comma-separated data files into julia.
123-
- [Plots](https://github.com/JuliaPlots/Plots.jl): Create all kinds of plots in julia (quite an extensive package, but very useful to have).
122+
- [CSV](https://github.com/JuliaData/CSV.jl): Read comma-separated data files into julia.
123+
- [Plots](https://github.com/JuliaPlots/Plots.jl): Create all kinds of plots in julia (quite an extensive package, but very useful to have).
124124
- [JLD2](https://github.com/JuliaIO/JLD2.jl): This allows saving julia objects (such as a tomographic model) to a binary file and load it again at a later stage.
125125
- [Geodesy](https://github.com/JuliaGeo/Geodesy.jl): Convert UTM coordinates to latitude/longitude/altitude.
126126
- [NetCDF](https://github.com/JuliaGeo/NetCDF.jl): Read NetCDF files.
127127
- [GMT](https://github.com/GenericMappingTools/GMT.jl): A julia interface to the Generic Mapping Tools (GMT), which is a highly popular package to create (geophysical) maps. Note that installing `GMT.jl` is more complicated than installing the other packages listed above, as you first need to have a working version of `GMT` on your machine (it is not yet installed automatically). Installation instructions for Windows/Linux are on their webpage. On a mac, we made the best experiences by downloading the binaries from their webpage and not using a package manager to install GMT.
128-
129-
130-
131-

docs/src/man/lamem.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# LaMEM
22

3-
In order to generate geodynamic simulations from setups created with `GeophysicalModelGenerator.jl`, we provide a few routines that directly create marker input files for the 3D geodynamic modelling software [LaMEM](https://bitbucket.org/bkaus/lamem), which is an open-source cartesian code that is well-suited to perform crustal and lithospheric-scale simulations.
4-
If you want to learn how to run LaMEM simulations, please have a look at the [wiki page](https://bitbucket.org/bkaus/lamem/wiki/Home).
3+
In order to generate geodynamic simulations from setups created with `GeophysicalModelGenerator.jl`, we provide a few routines that directly create marker input files for the 3D geodynamic modelling software [LaMEM](https://bitbucket.org/bkaus/lamem), which is an open-source cartesian code that is well-suited to perform crustal and lithospheric-scale simulations.
4+
If you want to learn how to run LaMEM simulations, please have a look at the [wiki page](https://bitbucket.org/bkaus/lamem/wiki/Home).
55

66
The routines provided here have the following functionality:
77
- Read LaMEM *.dat files (to get the size of the domain)

docs/src/man/listfunctions.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,3 @@ This page details the some of the guidelines that should be followed when contri
44

55
```@index
66
```
7-

0 commit comments

Comments
 (0)