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
+6-6Lines changed: 6 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@
10
10
11
11
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.
12
12
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/).
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.
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
In creating this image, I used the `Clip` tool of Paraview to only show topography above sealevel and made it 50% transparent.
203
215
204
216
### 4. Cartesian data
205
217
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.
@@ -25,32 +25,32 @@ This will start the command-line interface of julia:
25
25
_/ |\__'_|_|_|\__'_| | Official https://julialang.org/ release
26
26
|__/ |
27
27
28
-
julia>
28
+
julia>
29
29
```
30
30
31
31
From the julia prompt, you start the package manager by typing `]`:
32
-
```julia
33
-
(@v1.6) pkg>
32
+
```julia-repl
33
+
(@1.6) pkg>
34
34
```
35
35
And you return to the command line with a backspace.
36
36
37
37
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
39
39
julia>;
40
-
shell>
40
+
shell>
41
41
```
42
42
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
44
44
shell> ls
45
45
LICENSE Manifest.toml Project.toml README.md docs src test tutorial
46
46
shell> pwd
47
47
/Users/kausb/.julia/dev/GeophysicalModelGenerator
48
48
```
49
49
As before, return to the main command line (called `REPL`) with a backspace.
50
50
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.
52
52
An example for `tan` is:
53
-
```julia
53
+
```julia-repl
54
54
help?> tan
55
55
search: tan tanh tand atan atanh atand instances transpose transcode contains UnitRange ReentrantLock StepRange StepRangeLen trailing_ones trailing_zeros
56
56
@@ -73,59 +73,55 @@ search: tan tanh tand atan atanh atand instances transpose transcode contains Un
73
73
2×2 Matrix{Float64}:
74
74
-1.09252 -1.09252
75
75
-1.09252 -1.09252
76
-
```
76
+
```
77
77
78
78
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
80
80
shell> code runtests.jl
81
81
```
82
82
Execute the file with:
83
-
```julia
83
+
```julia-repl
84
84
julia> include("runtests")
85
85
```
86
86
Note that you do not include the `*.jl` extension.
87
87
88
88
89
89
### 4. Install GeophysicalModelGenerator.jl
90
90
In order to install GeophysicalModelGenerator.jl, start julia and go to the package manager:
91
-
```julia
91
+
```julia-repl
92
92
julia> ]
93
-
(@v1.6) pkg> add GeophysicalModelGenerator
93
+
(@v1.11) pkg> add GeophysicalModelGenerator
94
94
```
95
95
This will automatically install various other packages it relies on (using the correct version).
96
96
97
97
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
99
99
julia> ]
100
-
(@v1.6) pkg> test GeophysicalModelGenerator
100
+
(@1.6) pkg> test GeophysicalModelGenerator
101
101
```
102
102
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).
103
103
104
104
The installation of `GMG` only needs to be done once, and will precompile the package and all other dependencies.
105
105
106
106
If you, at a later stage, want to upgrade to the latest version of `GMG`, you can type:
107
-
```julia
107
+
```julia-repl
108
108
julia> ]
109
-
(@v1.6) pkg> update GeophysicalModelGenerator
109
+
(@1.6) pkg> update GeophysicalModelGenerator
110
110
```
111
111
112
112
You can load GeophysicalModelGenerator, for example to create cross-sections, with:
113
-
```julia
113
+
```julia-repl
114
114
julia> using GeophysicalModelGenerator
115
115
```
116
116
117
117
### 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.
119
119
120
120
If you already want to install some of those, here our favorites. Install them through the package manager:
121
121
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).
124
124
-[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.
125
125
-[Geodesy](https://github.com/JuliaGeo/Geodesy.jl): Convert UTM coordinates to latitude/longitude/altitude.
-[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.
0 commit comments