Skip to content

Commit c2b1e79

Browse files
authored
Merge pull request #172 from Iddingsite/main
Bump GeometryBasics and MeshIO
2 parents 0c5510c + 5589b3f commit c2b1e79

15 files changed

+38
-34
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/test/*.vts
22
/test/*.vtu
3+
/.vscode
34
.DS_Store
45
Manifest.toml
56
/docs/build

Project.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,18 +50,18 @@ Downloads = "1"
5050
FFMPEG = "0.4"
5151
FileIO = "1"
5252
GDAL_jll = "300.900.0 - 301.901.0"
53-
GLMakie = "0.8, 0.9, 0.10, 0.11"
53+
GLMakie = "0.8 - 0.11"
5454
GeoParams = "0.2 - 0.7"
5555
Geodesy = "1"
56-
GeometryBasics = "0.1 - 0.4"
56+
GeometryBasics = "0.1 - 0.5"
5757
Glob = "1.2 - 1.3"
5858
GMT = "1"
5959
GridapGmsh = "0.5 - 0.7"
6060
ImageIO = "0.1 - 0.6"
6161
Interpolations = "0.14, 0.15"
6262
JLD2 = "0.4, 0.5"
6363
LightXML = "0.8, 0.9"
64-
MeshIO = "0.1 - 0.4"
64+
MeshIO = "0.1 - 0.5"
6565
NCDatasets = "0.14"
6666
NearestNeighbors = "0.2 - 0.4"
6767
Parameters = "0.9 - 0.12"

docs/src/man/Tutorial_Basic.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ GeoData
3131
````
3232

3333
This is a so-called `GeoData` object, which is a 3D grid of seismic velocities as a function of longitude, latitude and depth, which can include various fields (here we only have a single field: `:dVp_Percentage`)
34-
We can save this in `VTK` format, which is a widely used format that can for exampke be read by the 3D open-source visualization tool [Paraview](https://www.paraview.org/):
34+
We can save this in `VTK` format, which is a widely used format that can for example be read by the 3D open-source visualization tool [Paraview](https://www.paraview.org/):
3535

3636
```julia
3737
write_paraview(Tomo_Alps_full,"Tomo_Alps_full")
@@ -101,7 +101,7 @@ After loading the new data again in paraview, switching to the proper data field
101101
![Basic_Tutorial_2](../assets/img/Basic_Tutorial_2.png)
102102

103103
### 3. Create cross sections
104-
Paraview has the option to `Slice` through the data but it is not very intuitive to do this in 3D. Another limitation of Paraview is that it does not have native support for spherical coordinates, and therefore the data is translated to cartesian (`x`,`y`,`z`) coordinates (with the center of the Earth at `(0,0,0)`).
104+
Paraview has the option to `Slice` through the data but it is not very intuitive to do this in 3D. Another limitation of Paraview is that it does not have native support for spherical coordinates, and therefore the data is translated to Cartesian (`x`,`y`,`z`) coordinates (with the center of the Earth at `(0,0,0)`).
105105
That makes this a bit cumbersome to make a cross-section at a particular location.
106106
If you are interested in this you can use the `cross_section` function:
107107

@@ -214,9 +214,9 @@ After doing all these steps, you should see something like this:
214214
![Basic_Tutorial_3](../assets/img/Basic_Tutorial_3.png)
215215

216216
### 4. Cartesian data
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.
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 than in geographic coordinates.
218218
`GeophysicalModelGenerator` has a number of tools for this.
219-
First we need do define a `ProjectionPoint` around which we project the data
219+
First we need to define a `ProjectionPoint` around which we project the data
220220

221221
```julia
222222
proj = ProjectionPoint(Lon=12.0,Lat =43)
@@ -267,7 +267,7 @@ Saved file: Topo_cart.vts
267267
As the coordinates are now aligned with the `x`,`y`,`z` coordinate axes in Paraview it is now straightforward to use the build-in tools to explore the data.
268268

269269
### 5. Rectilinear data
270-
Yet, because of the curvature of the Earth, the resulting 3D model is not strictly rectilinear, which is often a requiment for cartesian numerical models.
270+
Yet, because of the curvature of the Earth, the resulting 3D model is not strictly rectilinear, which is often a requirement for Cartesian numerical models.
271271
This can be achieved in a relatively straightforward manner, by creating a new 3D dataset that is slightly within the curved boundaries of the projected data set:
272272

273273
```julia
@@ -322,7 +322,7 @@ Saved file: Topo_rect.vts
322322

323323
![Basic_Tutorial_5](../assets/img/Basic_Tutorial_5.png)
324324

325-
At this stage, the data can directly be used to generate cartesian numerical model setups, as explained in the other tutorials.
325+
At this stage, the data can directly be used to generate Cartesian numerical model setups, as explained in the other tutorials.
326326

327327
---
328328

docs/src/man/Tutorial_Jura.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,8 @@ CrossSection_1 = screenshot_to_GeoData("Schori_2020_Ornans-Miserey-v2_whiteBG.pn
9494

9595
Note that we slightly modified the image to save it with a white instead of a transparent background
9696

97-
# 2. Project the data to a cartesian grid
98-
At this stage, we have all data in geographic coordinates. In most cases it is more useful to have them in cartesian coordinates.
97+
# 2. Project the data to a Cartesian grid
98+
At this stage, we have all data in geographic coordinates. In most cases it is more useful to have them in Cartesian coordinates.
9999
Moreover, the resolution of the grids is different. Whereas the `TopoGeology` has a size of `(3721, 2641, 1)`, `Basement` has size `(2020, 1751, 1)`.
100100
It is often useful to have them on exactly the same size grid
101101

@@ -169,7 +169,7 @@ CartData
169169
fields : (:Basement,)
170170
```
171171

172-
Finally, we can also transfer the cross-section to cartesian coordinates. As this is just for visualization, we will
172+
Finally, we can also transfer the cross-section to Cartesian coordinates. As this is just for visualization, we will
173173
use `convert2CartData` in this case
174174

175175
```julia

docs/src/man/Tutorial_LaPalma.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,22 +60,22 @@ write_paraview(Topo,"Topo")
6060
![LaPalma_EQTopo_GeoData](../assets/img/TopoEQs_LaPalma_GeoData.png)
6161
Note that this data is in geographic coordinates, which makes it non-trivial to create slices through the data (see coordinate axis in the plot, where `z` is *not* pointing upwards).
6262

63-
## 2. Convert data to cartesian coordinates
63+
## 2. Convert data to Cartesian coordinates
6464
In order to create model setups, it is helpful to first transfer the data to Cartesian.
6565
This requires us to first determine a *projection point*, that is fixed. Often, it is helpful to use the center of the topography for this. In the present example, we will center the model around La Palma itself:
6666

6767
```julia
6868
proj = ProjectionPoint(Lon=-17.84, Lat=28.56)
6969
```
7070

71-
Once this is done you can convert the topographic data to the cartesian reference frame
71+
Once this is done you can convert the topographic data to the Cartesian reference frame
7272

7373
```julia
7474
EQ_cart = convert2CartData(data_all_EQ, proj);
7575
Topo_cart = convert2CartData(Topo, proj)
7676
```
7777

78-
It is important to realize that the cartesian coordinates of the topographic grid is no longer strictly orthogonal after this conversion. You don't notice that in the current example, as the model domain is rather small.
78+
It is important to realize that the Cartesian coordinates of the topographic grid is no longer strictly orthogonal after this conversion. You don't notice that in the current example, as the model domain is rather small.
7979
In other cases, however, this is quite substantial (e.g., India-Asia collision zone).
8080
LaMEM needs an orthogonal grid of topography, which we can create with:
8181

docs/src/man/Tutorial_NumericalModel_2D.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ The aim of this tutorial is to show you how to create 2D numerical model setups
99

1010
### 2D Subduction setup
1111

12-
Lets start with creating a 2D model setup in cartesian coordinates, which uses the `CartData` data structure
12+
Lets start with creating a 2D model setup in Cartesian coordinates, which uses the `CartData` data structure
1313

1414
```julia
1515
using GeophysicalModelGenerator
@@ -351,7 +351,7 @@ We have a number of other functions to help create a geometry, specifically:
351351
- `AddCylinder!`
352352

353353
The help functions are quite self-explanatory, so we won't show it in detail here.
354-
If you have a topography surface or any other horizontal surface, you can surface with the cartesian grid with `above_surface` or `below_surface`.
354+
If you have a topography surface or any other horizontal surface, you can surface with the Cartesian grid with `above_surface` or `below_surface`.
355355

356356
Also, if you wish to take a seismic tomography as inspiration to set a slab geometry, you can interpolate it to a `CartGrid` with the same dimensions and use that with the julia `findall` function.
357357

docs/src/man/Tutorial_NumericalModel_3D.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ The aim of this tutorial is to show you how to create 3D numerical model setups
99

1010
### 3D Subduction setup
1111

12-
Lets start with creating a 3D model setup in cartesian coordinates, which uses the `CartData` data structure
12+
Lets start with creating a 3D model setup in Cartesian coordinates, which uses the `CartData` data structure
1313

1414
```julia
1515
using GeophysicalModelGenerator

docs/src/man/Tutorial_VolcanoModel_3D.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ The aim of this tutorial is to show you how to create 3D numerical model setups
55

66
### Generating the model
77

8-
Lets start with creating a 3D model setup in cartesian coordinates, which uses the `CartData` data structure, with a resolution of $ 128 \times 128 \times 128 $ grid points, inside the domain $\Omega \in [-100,100] \times [-100,100] \times [-110,50]$ km
8+
Lets start with creating a 3D model setup in Cartesian coordinates, which uses the `CartData` data structure, with a resolution of $ 128 \times 128 \times 128 $ grid points, inside the domain $\Omega \in [-100,100] \times [-100,100] \times [-110,50]$ km
99

1010
```julia
1111
using GeophysicalModelGenerator

docs/src/man/datastructures.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
The main data structure used in GeophysicalModelGenerator.jl is `GeoData`, which contains info about the `longitude`,`latitude`, and `depth` of a data set, as well as several data sets itself.
44
We also provide a `UTMData`, which is essentially the same but with UTM coordinates, and a `CartData` structure, which has Cartesian coordinates in kilometers (as used in many geodynamic codes). If one wishes to transfer `GeoData` to `CartData`, one needs to provide a `ProjectionPoint`.
5-
For plotting, we transfer this into the `ParaviewData` structure, which has cartesian coordinates centered around the center of the Earth. We employ the `wgs84` reference ellipsoid as provided by the [Geodesy.jl](https://github.com/JuliaGeo/Geodesy.jl) package to perform this transformation.
5+
For plotting, we transfer this into the `ParaviewData` structure, which has Cartesian coordinates centered around the center of the Earth. We employ the `wgs84` reference ellipsoid as provided by the [Geodesy.jl](https://github.com/JuliaGeo/Geodesy.jl) package to perform this transformation.
66

77
```@docs
88
GeoData

docs/src/man/lamem.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
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://github.com/UniMainzGeo/LaMEM), which is an open-source cartesian code to perform crustal and lithospheric-scale simulations.
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://github.com/UniMainzGeo/LaMEM), which is an open-source Cartesian code to perform crustal and lithospheric-scale simulations.
44
If you want to learn how to run LaMEM simulations, the easiest way to get started is by looking at [LaMEM.jl](https://github.com/JuliaGeodynamics/LaMEM.jl) which is integrated with `GMG`
55

66
The routines provided here have the following functionality:

0 commit comments

Comments
 (0)