Skip to content

Commit 6b6d07d

Browse files
authored
Merge pull request #144 from JuliaGeodynamics/pa-joss
Address JOSS Paper review
2 parents a742627 + 92d77bf commit 6b6d07d

19 files changed

+267
-248
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "GeophysicalModelGenerator"
22
uuid = "3700c31b-fa53-48a6-808a-ef22d5a84742"
33
authors = ["Boris Kaus", "Marcel Thielmann"]
4-
version = "0.7.9"
4+
version = "0.7.10"
55

66
[deps]
77
Colors = "5ae59095-9a9b-59fe-a467-6f913c188581"

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
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.
1212

13-
A short summary of the package and its features are given below. For a detailed description of the package and to learn how to use it, have a look at the [documentation](https://juliageodynamics.github.io/GeophysicalModelGenerator.jl/dev/).
13+
A short summary of the package and its features are given below. For a detailed description of the package and to learn how to use it, have a look at the [documentation](https://juliageodynamics.github.io/GeophysicalModelGenerator.jl/dev/).
1414

1515
![README_img](./docs/src/assets/img/Readme_pic.png)
1616
### Contents
@@ -43,17 +43,17 @@ The best way to learn how to use this is to install the package (see below) and
4343
## Installation
4444
First, you need to install julia on your machine. We recommend to use the binaries from [https://julialang.org](https://julialang.org).
4545
Next, start julia and switch to the julia package manager using `]`, after which you can add the package.
46-
```julia
46+
```julia-repl
4747
julia> ]
48-
(@v1.10) pkg> add GeophysicalModelGenerator
48+
(@1.6) pkg> add GeophysicalModelGenerator
4949
```
5050
You can test whether it works on your system with
51-
```julia
51+
```julia-repl
5252
julia> ]
53-
(@v1.10) pkg> test GeophysicalModelGenerator
53+
(@1.6) pkg> test GeophysicalModelGenerator
5454
```
5555
and use it with
56-
```julia
56+
```julia-repl
5757
julia> using GeophysicalModelGenerator
5858
```
5959

Loading
Loading
Loading

docs/src/man/Tutorial_Basic.md

Lines changed: 26 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Tomo_Alps_full = load_GMG("https://zenodo.org/records/10738510/files/Paffrath_20
2121
```
2222

2323
````
24-
GeoData
24+
GeoData
2525
size : (162, 130, 42)
2626
lon ϵ [ -13.3019 : 35.3019]
2727
lat ϵ [ 30.7638 : 61.2362]
@@ -49,7 +49,7 @@ Topo_Alps = load_GMG("https://zenodo.org/records/10738510/files/AlpsTopo.jld2?do
4949
```
5050

5151
````
52-
GeoData
52+
GeoData
5353
size : (961, 841, 1)
5454
lon ϵ [ 4.0 : 20.0]
5555
lat ϵ [ 36.0 : 50.0]
@@ -70,9 +70,17 @@ Saved file: Topo_Alps.vts
7070
7171
````
7272

73-
If we open both datasets in Paraview, we see this (after giving some color to the topography):
73+
If we open both datasets in Paraview, and changing both files from outline/solid colors to the corresponding data field, we see:
74+
![Basic_Tutorial_1](../assets/img/Basic_Tutorial_Paraview_1.png)
75+
Now we can change the colormap on the right side, marked by a red square. For topography we use the `Oleron` colormap, which you can download [here](https://www.fabiocrameri.ch/colourmaps/).
76+
For the tomography we use the `Roma` scientific colormap. You will now see a blue'ish box of the tomography, this is not the best color to visualise the data. Let's invert the colormap by clicking on the item marked by the blue arrow.
77+
Now we see the tomography in a more intuitive way, but the topography is not visible anymore. We can change the opacity of the tomography by setting a value in the `Opacity` field marked by the red square.
78+
Note that you will need to adapt the range of the topography colormap as the change in color is not at 0.0. By clicking on the item marked by the black arrow, you can set your desired range.
79+
80+
![Basic_Tutorial_1](../assets/img/Basic_Tutorial_Paraview_2.png)
81+
82+
Now you should see something like this:
7483
![Basic_Tutorial_1](../assets/img/Basic_Tutorial_1.png)
75-
Note that I use the `Oleron` scientific colormap for the tomography which you can download [here](https://www.fabiocrameri.ch/colourmaps/)
7684

7785
### 2. Extract subset of data
7886
As you can see the tomographic data covers a much larger area than the Alps itself, and in most of that area there is no data.
@@ -89,7 +97,7 @@ Saved file: Tomo_Alps.vts
8997
9098
````
9199

92-
Which looks like:
100+
After loading the new data again in paraview, switching to the proper data field and adjusting the colormap, you should see something like this:
93101
![Basic_Tutorial_2](../assets/img/Basic_Tutorial_2.png)
94102

95103
### 3. Create cross sections
@@ -102,7 +110,7 @@ data_200km = cross_section(Tomo_Alps, Depth_level=-200)
102110
```
103111

104112
````
105-
GeoData
113+
GeoData
106114
size : (54, 60, 1)
107115
lon ϵ [ 3.9057 : 19.9057]
108116
lat ϵ [ 35.9606 : 49.8976]
@@ -118,7 +126,7 @@ data_200km_exact = cross_section(Tomo_Alps, Depth_level=-200, Interpolate=true)
118126
```
119127

120128
````
121-
GeoData
129+
GeoData
122130
size : (100, 100, 1)
123131
lon ϵ [ 3.9057 : 19.9057]
124132
lat ϵ [ 35.9606 : 49.8976]
@@ -128,7 +136,7 @@ GeoData
128136
````
129137

130138
In general, you can get help info for all functions with `?`:
131-
```julia
139+
```julia-repl
132140
help?> cross_section
133141
search: cross_section cross_section_volume cross_section_points cross_section_surface flatten_cross_section
134142
@@ -176,7 +184,7 @@ Cross_vert = cross_section(Tomo_Alps, Start=(5,47), End=(15,44))
176184
```
177185

178186
````
179-
GeoData
187+
GeoData
180188
size : (100, 100, 1)
181189
lon ϵ [ 5.0 : 15.0]
182190
lat ϵ [ 47.0 : 44.0]
@@ -198,8 +206,12 @@ Saved file: data_200km.vts
198206
199207
````
200208

209+
After loading the data in Paraview, you can use the `Clip` tool on the topography to only show the topography above sealevel and make it 60% transparent. Also adjust the colormap of the tomography to 5.0 and -5.0
210+
211+
![Basic_Tutorial_3](../assets/img/Basic_Tutorial_Paraview_3.png)
212+
213+
After doing all these steps, you should see something like this:
201214
![Basic_Tutorial_3](../assets/img/Basic_Tutorial_3.png)
202-
In creating this image, I used the `Clip` tool of Paraview to only show topography above sealevel and made it 50% transparent.
203215

204216
### 4. Cartesian data
205217
As you can see, the curvature or the Earth is taken into account here. Yet, for many applications it is more convenient to work in Cartesian coordinates (kilometers) rather then in geographic coordinates.
@@ -213,7 +225,7 @@ Topo_cart = convert2CartData(Topo_Alps, proj)
213225
```
214226

215227
````
216-
CartData
228+
CartData
217229
size : (961, 841, 1)
218230
x ϵ [ -748.7493528015041 : 695.3491277129204]
219231
y ϵ [ -781.2344794653393 : 831.6826244089501]
@@ -229,7 +241,7 @@ Tomo_cart = convert2CartData(Tomo_Alps, proj)
229241
```
230242

231243
````
232-
CartData
244+
CartData
233245
size : (54, 60, 39)
234246
x ϵ [ -757.8031278236692 : 687.0608438357591]
235247
y ϵ [ -785.601866956207 : 821.3433749818317]
@@ -269,7 +281,7 @@ Tomo_rect = project_CartData(Tomo_rect, Tomo_Alps, proj)
269281
```
270282

271283
````
272-
CartData
284+
CartData
273285
size : (116, 121, 117)
274286
x ϵ [ -550.0 : 600.0]
275287
y ϵ [ -500.0 : 700.0]
@@ -286,7 +298,7 @@ Topo_rect = project_CartData(Topo_rect, Topo_Alps, proj)
286298
```
287299

288300
````
289-
CartData
301+
CartData
290302
size : (1151, 1201, 1)
291303
x ϵ [ -550.0 : 600.0]
292304
y ϵ [ -500.0 : 700.0]
@@ -315,4 +327,3 @@ At this stage, the data can directly be used to generate cartesian numerical mod
315327
---
316328

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

docs/src/man/Tutorial_Chmy_MPI.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,9 +156,8 @@ You can than run it with:
156156
mpiexecjl -n 4 --project=. julia Tutorial_Chmy_MPI.jl
157157
```
158158

159-
The full file can be downloaded [here](../../../tutorials/Tutorial_Chmy_MPI.jl)
159+
The full file can be downloaded [here](https://github.com/JuliaGeodynamics/GeophysicalModelGenerator.jl/blob/main/tutorials/Tutorial_Chmy_MPI.jl)
160160

161161
---
162162

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

docs/src/man/installation.md

Lines changed: 22 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ You start julia on the command line with:
1515
kausb$ julia
1616
```
1717
This will start the command-line interface of julia:
18-
```julia
18+
```julia-repl
1919
_
2020
_ _ _(_)_ | Documentation: https://docs.julialang.org
2121
(_) | (_) (_) |
@@ -25,32 +25,32 @@ 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 `]`:
32-
```julia
33-
(@v1.6) pkg>
32+
```julia-repl
33+
(@1.6) pkg>
3434
```
3535
And you return to the command line with a backspace.
3636

3737
Also useful is that julia has a build-in terminal, which you can reach by typing `;` on the command line:
38-
```julia
38+
```julia-repl
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:
43-
```julia
43+
```julia-repl
4444
shell> ls
4545
LICENSE Manifest.toml Project.toml README.md docs src test tutorial
4646
shell> pwd
4747
/Users/kausb/.julia/dev/GeophysicalModelGenerator
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:
53-
```julia
53+
```julia-repl
5454
help?> tan
5555
search: tan tanh tand atan atanh atand instances transpose transcode contains UnitRange ReentrantLock StepRange StepRangeLen trailing_ones trailing_zeros
5656
@@ -73,59 +73,55 @@ 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:
79-
```julia
79+
```julia-repl
8080
shell> code runtests.jl
8181
```
8282
Execute the file with:
83-
```julia
83+
```julia-repl
8484
julia> include("runtests")
8585
```
8686
Note that you do not include the `*.jl` extension.
8787

8888

8989
### 4. Install GeophysicalModelGenerator.jl
9090
In order to install GeophysicalModelGenerator.jl, start julia and go to the package manager:
91-
```julia
91+
```julia-repl
9292
julia> ]
93-
(@v1.6) pkg> add GeophysicalModelGenerator
93+
(@v1.11) pkg> add GeophysicalModelGenerator
9494
```
9595
This will automatically install various other packages it relies on (using the correct version).
9696

9797
If you want, you can test if it works on your machine by running the test suite in the package manager:
98-
```julia
98+
```julia-repl
9999
julia> ]
100-
(@v1.6) pkg> test GeophysicalModelGenerator
100+
(@1.6) pkg> test GeophysicalModelGenerator
101101
```
102102
Note that we run these tests automatically on Windows, Linux and Mac every time we add a new feature to GeophysicalModelGenerator (using different julia versions). This Continuous Integration (CI) ensures that new features do not break others in the package. The results can be seen [here](https://github.com/JuliaGeodynamics/GeophysicalModelGenerator.jl/actions).
103103

104104
The installation of `GMG` only needs to be done once, and will precompile the package and all other dependencies.
105105

106106
If you, at a later stage, want to upgrade to the latest version of `GMG`, you can type:
107-
```julia
107+
```julia-repl
108108
julia> ]
109-
(@v1.6) pkg> update GeophysicalModelGenerator
109+
(@1.6) pkg> update GeophysicalModelGenerator
110110
```
111111

112112
You can load GeophysicalModelGenerator, for example to create cross-sections, with:
113-
```julia
113+
```julia-repl
114114
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-

0 commit comments

Comments
 (0)