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
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,7 +33,7 @@ Some of the key features are:
33
33
- Create initial model setups for the 3D geodynamic code [LaMEM](https://github.com/UniMainzGeo/LaMEM).
34
34
- Import LaMEM timesteps.
35
35
36
-
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)
36
+
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)
37
37
38
38
## Usage
39
39
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/).
Copy file name to clipboardExpand all lines: docs/src/man/Tutorial_AlpineData.md
+13-13Lines changed: 13 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,20 +26,20 @@ and load both `GMG` and `GMT` with:
26
26
using GeophysicalModelGenerator, GMT
27
27
```
28
28
29
-
When loading both packages, several `GMT` routines within `GMG` will be loaded. One of these routines is the function `importTopo`, where one simply has to provide the region for which to download the topographic data and the data source.
29
+
When loading both packages, several `GMT` routines within `GMG` will be loaded. One of these routines is the function `import_topo`, where one simply has to provide the region for which to download the topographic data and the data source.
The data is available in different resolutions; see [here](http://gmt.soest.hawaii.edu/doc/latest/grdimage.html) for an overview. Generally, it is advisable to not use the largest resolution if you have a large area, as the files become very large.
36
36
37
37
If you have issues with loading the topography with `GMT`, there is also the alternative to download the data yourself and import it using `Rasters.jl`.
38
38
39
-
We can now export this data to a `VTK` format so that we can visualize it with `Paraview`. To do so, `GMG` provides the function `write_Paraview`:
39
+
We can now export this data to a `VTK` format so that we can visualize it with `Paraview`. To do so, `GMG` provides the function `write_paraview`:
40
40
41
41
```julia
42
-
write_Paraview(Topo, "Topography_Alps")
42
+
write_paraview(Topo, "Topography_Alps")
43
43
```
44
44
45
45
Also, if you want to save this data for later use in julia, you can save it as `*.jld2` file using the function `save_GMG`:
@@ -126,10 +126,10 @@ units = unique(tag) #get different units
126
126
We will use these units later to save the Moho data separately for each tectonic unit.
127
127
128
128
### 2.2 Converting the data to a `GMG` dataset
129
-
To convert this data to a `GMG` dataset, we now have to interpolate it to a regular grid. You can generate the respective grid with the `GMG` function `lonlatdepthGrid`
129
+
To convert this data to a `GMG` dataset, we now have to interpolate it to a regular grid. You can generate the respective grid with the `GMG` function `lonlatdepth_grid`
#Now we create a KDTree for an effective nearest neighbor determination;
162
162
kdtree =KDTree([lon_tmp';lat_tmp']; leafsize =10)
@@ -187,7 +187,7 @@ for iunit = 1:length(units)
187
187
#Finally, we can now export that data to VTK and save a `jld2` file using the `save_GMG` routine
188
188
Data_Moho = GeophysicalModelGenerator.GeoData(Lon, Lat, Depth, (MohoDepth=Depth,PointDist=Dist),Data_attribs)
189
189
filename ="Mrozek_Moho_Grid_"* units[iunit]
190
-
write_Paraview(Data_Moho, filename)
190
+
write_paraview(Data_Moho, filename)
191
191
save_GMG(filename,Topo)
192
192
193
193
end
@@ -218,7 +218,7 @@ nothing #hide
218
218
As before, we can export this dataset to `VTK` and also save it as a `jld2` file (as we are now exporting point data, we have to use the option `PointsData=true`):
At this stage we have the 3D velocity components on a grid. Yet, we don't have information yet about the elevation of the stations (as the provided data set did not give this).
364
364
We could ignore that and set the elevation to zero, which would allow saving the data directly.
365
365
Yet, a better way is to load the topographic map of the area and interpolate the elevation to the velocity grid.
366
-
As we have already the loaded the topographic map in section 1 of this tutorial, we can simply reuse it. To interpolate, we will use the function `interpolateDataFields2D`
366
+
As we have already the loaded the topographic map in section 1 of this tutorial, we can simply reuse it. To interpolate, we will use the function `interpolate_datafields_2D`
The variable we are interested in is the variable `topo_v`. `fields_v` contains the interpolation of all the fields in `Topo` to the new grid and we only keep it here for completeness.
Copy file name to clipboardExpand all lines: docs/src/man/Tutorial_Basic.md
+27-27Lines changed: 27 additions & 27 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,7 +34,7 @@ This is a so-called `GeoData` object, which is a 3D grid of seismic velocities a
34
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/):
35
35
36
36
```julia
37
-
write_Paraview(Tomo_Alps_full,"Tomo_Alps_full")
37
+
write_paraview(Tomo_Alps_full,"Tomo_Alps_full")
38
38
```
39
39
40
40
````
@@ -62,7 +62,7 @@ Different than the 3D tomographic model, the topography has size 1 for the last
62
62
We can write this to disk as well
63
63
64
64
```julia
65
-
write_Paraview(Topo_Alps,"Topo_Alps")
65
+
write_paraview(Topo_Alps,"Topo_Alps")
66
66
```
67
67
68
68
````
@@ -76,12 +76,12 @@ Note that I use the `Oleron` scientific colormap for the tomography which you ca
76
76
77
77
### 2. Extract subset of data
78
78
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.
79
-
It is thus advantageous to cut out a piece of the dataset that we are interested in which can be done with `extractSubvolume`:
79
+
It is thus advantageous to cut out a piece of the dataset that we are interested in which can be done with `extract_subvolume`:
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)`).
97
97
That makes this a bit cumbersome to make a cross-section at a particular location.
98
-
If you are interested in this you can use the `crossSection` function:
98
+
If you are interested in this you can use the `cross_section` function:
As you see, this is not exactly at 200 km depth, but at the closest `z`-level in the data sets. If you want to be exactly at 200 km, use the `Interpolate` option:
@@ -204,10 +204,10 @@ In creating this image, I used the `Clip` tool of Paraview to only show topograp
204
204
### 4. Cartesian data
205
205
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.
206
206
`GeophysicalModelGenerator` has a number of tools for this.
207
-
First we need do define a `projectionPoint` around which we project the data
207
+
First we need do define a `ProjectionPoint` around which we project the data
208
208
209
209
```julia
210
-
proj =projectionPoint(Lon=12.0,Lat =43)
210
+
proj =ProjectionPoint(Lon=12.0,Lat =43)
211
211
212
212
Topo_cart =convert2CartData(Topo_Alps, proj)
213
213
```
@@ -241,8 +241,8 @@ CartData
241
241
Save:
242
242
243
243
```julia
244
-
write_Paraview(Tomo_cart,"Tomo_cart");
245
-
write_Paraview(Topo_cart,"Topo_cart");
244
+
write_paraview(Tomo_cart,"Tomo_cart");
245
+
write_paraview(Topo_cart,"Topo_cart");
246
246
```
247
247
248
248
````
@@ -259,13 +259,13 @@ Yet, because of the curvature of the Earth, the resulting 3D model is not strict
259
259
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:
Create a density map of the fault data. This is done with the `countMap` function. This function takes a specified field of a 2D `GeoData` struct and counts the entries in all control areas which are defined by steplon (number of control areas in lon direction) and steplat (number of control areas in lat direction). The field should only consist of 0.0 and 1.0 and the steplength. The final result is normalized by the highest count.
85
+
Create a density map of the fault data. This is done with the `countmap` function. This function takes a specified field of a 2D `GeoData` struct and counts the entries in all control areas which are defined by steplon (number of control areas in lon direction) and steplat (number of control areas in lat direction). The field should only consist of 0.0 and 1.0 and the steplength. The final result is normalized by the highest count.
heatmap!(lon,lat,cntmap.fields.countMap[:,:,1]',colormap=cgrad(:batlowW,rev=true),alpha =0.8,legend=true,title="Fault Density Map Europe",ylabel="Lat",xlabel="Lon")
106
+
heatmap!(lon,lat,cntmap.fields.countmap[:,:,1]',colormap=cgrad(:batlowW,rev=true),alpha =0.8,legend=true,title="Fault Density Map Europe",ylabel="Lat",xlabel="Lon")
0 commit comments