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
Display the source diff
Display the rich diff
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/).
@@ -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.11) 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.11) 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.11) 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.
Copy file name to clipboardExpand all lines: docs/src/man/projection.md
+19-19Lines changed: 19 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,18 +2,18 @@
2
2
3
3
Typically, you load a dataset by reading it into julia and either generating a `GeoData` structure (in case you have `longitude/latitude/depth` info), or as `UTMData` (in case the data is in `UTM coordinates`, which requires you to specify the zone & hemisphere).
4
4
5
-
If you write the data to `Paraview`, it is internally converted to a Paraview structure (which involves `x,y,z` Cartesian Earth-Centered-Earth-Fixed (ECEF) coordinates using the `wgs84` ellipsoid).
5
+
If you write the data to `Paraview`, it is internally converted to a Paraview structure (which involves `x,y,z` Cartesian Earth-Centered-Earth-Fixed (ECEF) coordinates using the `wgs84` ellipsoid).
6
6
7
7
Yet, if you do geodynamic calculations the chances are that the geodynamic code does not operate in spherical coordinates, but rather use cartesian ones. In that case you should transfer your data to the `CartData` structure, which requires you to specify a `ProjectionPoint` that is a point on the map that will later have the coordinates `(0,0)` in the `CartData` structure.
8
8
9
9
10
10
#### 1. Converting
11
11
Converting from one coordinate system to the other is straightforward. Let's use Europe as an example:
@@ -40,29 +40,29 @@ As the area is large, it covers a range of `UTM` zones (and every point has a UT
40
40
41
41
Yet, what we could do instead is show all data with respect to a single UTM zone. For this, we have to select a point around which we project (in this case more or less in the center):
Whereas this is ok to look at and compare with a LaMEM model setup, we cannot use it to perform internal calculations (or to generate a LaMEM model setup), because the `x` and `y` coordinates are distorted and not orthogonal.
75
+
Whereas this is ok to look at and compare with a LaMEM model setup, we cannot use it to perform internal calculations (or to generate a LaMEM model setup), because the `x` and `y` coordinates are distorted and not orthogonal.
76
76
77
77
#### 2. Projecting data
78
78
For use with LaMEM, you would need an orthogonal cartesian grid. From the last command above we get some idea on the area, so we can create this:
0 commit comments