Skip to content

Commit 425b51b

Browse files
committed
surface_functionms and transformation
1 parent b785146 commit 425b51b

21 files changed

+106
-106
lines changed

docs/src/man/Tutorial_Basic.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -262,10 +262,10 @@ This can be achieved in a relatively straightforward manner, by creating a new 3
262262
Tomo_rect = CartData(xyzGrid(-550.0:10:600, -500.0:10:700, -600.0:5:-17));
263263
```
264264

265-
the routine `projectCartData` will then project the data from the geographic coordinates to the new rectilinear grid:
265+
the routine `project_CartData` will then project the data from the geographic coordinates to the new rectilinear grid:
266266

267267
```julia
268-
Tomo_rect = projectCartData(Tomo_rect, Tomo_Alps, proj)
268+
Tomo_rect = project_CartData(Tomo_rect, Tomo_Alps, proj)
269269
```
270270

271271
````
@@ -282,7 +282,7 @@ we can do the same with topography:
282282

283283
```julia
284284
Topo_rect = CartData(xyzGrid(-550.0:1:600, -500.0:1:700, 0))
285-
Topo_rect = projectCartData(Topo_rect, Topo_Alps, proj)
285+
Topo_rect = project_CartData(Topo_rect, Topo_Alps, proj)
286286
```
287287

288288
````

docs/src/man/Tutorial_Jura.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ Basement = importGeoTIFF("BMes_Spline_longlat.tif", fieldname=:Basement, removeN
7777
```
7878

7979
the `removeNaN_z` option removes `NaN` values from the dataset and instead uses the z-value of the nearest point.
80-
That is important if you want to use this surface to generate a 3D model setup (using `belowSurface`, for example).
80+
That is important if you want to use this surface to generate a 3D model setup (using `below_surface`, for example).
8181

8282
The thesis also provides a few interpreted vertical cross-sections. As before, we import them as a screenshot and estimate the lower-left and upper right corners.
8383
In this particular case, we are lucky that the `lon/lat` values are indicated on the cross-section.
@@ -123,7 +123,7 @@ CartData
123123

124124
The problem is that the result is not strictly orthogonal, but instead slightly curved.
125125
That causes issues later on when we want to intersect the surface with a 3D box.
126-
It is therefore better to use the `projectCartData` to project the `GeoData` structure to a `CartData` struct.
126+
It is therefore better to use the `project_CartData` to project the `GeoData` structure to a `CartData` struct.
127127
Let's first create this structure by using `x`,`y` coordinates that are slightly within the ranges given above:
128128

129129
```julia
@@ -142,7 +142,7 @@ CartData
142142
Next, we project the data with:
143143

144144
```julia
145-
TopoGeology_cart = projectCartData(TopoGeology_cart, TopoGeology, proj)
145+
TopoGeology_cart = project_CartData(TopoGeology_cart, TopoGeology, proj)
146146
```
147147

148148
```julia
@@ -157,7 +157,7 @@ CartData
157157
And we can do the same with the basement topography
158158

159159
```julia
160-
Basement_cart = projectCartData(TopoGeology_cart, Basement, proj)
160+
Basement_cart = project_CartData(TopoGeology_cart, Basement, proj)
161161
```
162162

163163
```julia
@@ -177,10 +177,10 @@ CrossSection_1_cart = convert2CartData(CrossSection_1,proj)
177177
```
178178

179179
for visualization, it is nice if we can remove the part of the cross-section that is above the topography.
180-
We can do that with the `belowSurface` routine which returns a Boolean to indicate whether points are below or above the surface
180+
We can do that with the `below_surface` routine which returns a Boolean to indicate whether points are below or above the surface
181181

182182
```julia
183-
below = belowSurface(CrossSection_1_cart, TopoGeology_cart)
183+
below = below_surface(CrossSection_1_cart, TopoGeology_cart)
184184
```
185185

186186
We can add that to the cross-section with:
@@ -240,14 +240,14 @@ Phases = zeros(Int8,size(ComputationalGrid.x)) #Define rock types
240240
Set everything below the topography to 1
241241

242242
```julia
243-
id = belowSurface(ComputationalGrid, GeologyTopo_comp_surf)
243+
id = below_surface(ComputationalGrid, GeologyTopo_comp_surf)
244244
Phases[id] .= 1
245245
```
246246

247247
The basement is set to 2
248248

249249
```julia
250-
id = belowSurface(ComputationalGrid, Basement_comp_surf)
250+
id = below_surface(ComputationalGrid, Basement_comp_surf)
251251
Phases[id] .= 2
252252
```
253253

docs/src/man/Tutorial_LaPalma.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,10 @@ Topo_model = CartData(xyzGrid(-35:.1:30,-15:.2:45,0));
8484
nothing #hide
8585
```
8686

87-
In a next step, the routine `projectCartData` projects a `GeoData` structure to a `CartData` struct
87+
In a next step, the routine `project_CartData` projects a `GeoData` structure to a `CartData` struct
8888

8989
```julia
90-
Topo_model = projectCartData(Topo_model, Topo, proj)
90+
Topo_model = project_CartData(Topo_model, Topo, proj)
9191
```
9292

9393
Let's have a look at the data:
@@ -120,7 +120,7 @@ Phases = zeros(Int64,size(Grid_3D.x))
120120
Points that are below the surface are set to one:
121121

122122
```julia
123-
Below = belowSurface(Grid_3D, Topo_model);
123+
Below = below_surface(Grid_3D, Topo_model);
124124
Phases[Below] .= 1
125125
```
126126

docs/src/man/Tutorial_NumericalModel_2D.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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 `aboveSurface` or `belowSurface`.
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/projection.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ CartData
8787
```
8888
Next, we can project the topographic data (in `GeoData` format) on this orthogonal grid
8989
```julia
90-
julia> Topo_Cart_orth = projectCartData(Topo_Cart_orth, Topo, p)
90+
julia> Topo_Cart_orth = project_CartData(Topo_Cart_orth, Topo, p)
9191
CartData
9292
size : (201, 101, 1)
9393
x ϵ [ -2000.0 km : 2000.0 km]
@@ -105,6 +105,6 @@ You can do similar projections with full 3D data sets or pointwise data.
105105

106106
```@docs
107107
GeophysicalModelGenerator.convert2CartData
108-
GeophysicalModelGenerator.projectCartData
108+
GeophysicalModelGenerator.project_CartData
109109
GeophysicalModelGenerator.convert2UTMzone
110110
```

docs/src/man/surfaces.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ Surfaces can be added and subtracted.
77
```@docs
88
drape_on_topo
99
fit_surface_to_points
10-
aboveSurface
11-
belowSurface
12-
interpolateDataOnSurface
10+
above_surface
11+
below_surface
12+
interpolate_data_surface
1313
is_surface
14-
remove_NaN_Surface!
14+
remove_NaN_surface!
1515
```

docs/src/man/tools.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,16 @@ extract_subvolume
88
interpolate_datafields
99
votemap
1010
subtract_horizontalmean
11-
aboveSurface
12-
belowSurface
13-
interpolateDataOnSurface
11+
above_surface
12+
below_surface
13+
interpolate_data_surface
1414
interpolate_topography_plane
1515
parse_columns_CSV
1616
rotate_translate_scale!
1717
pointData2NearestGrid
1818
convert2UTMzone
1919
convert2CartData
20-
projectCartData
20+
project_CartData
2121
drape_on_topo
2222
lithostatic_pressure!
2323
countmap

docs/src/man/visualise.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,15 @@ julia> p=projectionPoint(Lon=10, Lat=45)
4040
projectionPoint(45.0, 10.0, 578815.302916711, 4.983436768349297e6, 32, true)
4141
julia> Data_Cart = CartData(xyzGrid(-600:10:600,-600:10:600,-1000:10:-1));
4242
julia> Topo_Cart = CartData(xyzGrid(-600:10:600,-600:10:600,0));
43-
julia> Topo_Cart = projectCartData(Topo_Cart, Topo, p)
43+
julia> Topo_Cart = project_CartData(Topo_Cart, Topo, p)
4444
CartData
4545
size : (121, 121, 1)
4646
x ϵ [ -600.0 : 600.0]
4747
y ϵ [ -600.0 : 600.0]
4848
z ϵ [ -3.6270262031545473 : 3.654942280296281]
4949
fields : (:Topography,)
5050
attributes: ["note"]
51-
julia> Data_Cart = projectCartData(Data_Cart, Data, p)
51+
julia> Data_Cart = project_CartData(Data_Cart, Data, p)
5252
CartData
5353
size : (121, 121, 100)
5454
x ϵ [ -600.0 : 600.0]

ext/GLMakie_Visualisation.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ This starts an interactive widget that allows you to explore a 3D data set `Data
2525
All fields in the dataset can be explored, and if the optional parameter `Topography` is provided, the topography will be drawn on top.
2626
2727
Note that this requires orthogonal grids, so it will work with a `GeoData` set, or with an orthogonal `CartData` set.
28-
Note that you may have to use `projectCartData` to project it to orthogonal cartesian coordinates.
28+
Note that you may have to use `project_CartData` to project it to orthogonal cartesian coordinates.
2929
"""
3030
function visualise(Data::AbstractGeneralGrid; Topography=nothing, Topo_range=nothing)
3131

ext/GMT_utils.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ else
1212
using ..GMT
1313
end
1414

15-
using GeophysicalModelGenerator: lonlatdepthGrid, GeoData, UTMData, km, remove_NaN_Surface!
15+
using GeophysicalModelGenerator: lonlatdepthGrid, GeoData, UTMData, km, remove_NaN_surface!
1616

1717
println("Loading GMT routines within GMG")
1818

@@ -167,10 +167,10 @@ function importGeoTIFF(fname::String; fieldname=:layer1, negative=false, iskm=tr
167167
end
168168

169169
if removeNaN_z
170-
remove_NaN_Surface!(Depth, Lon, Lat)
170+
remove_NaN_surface!(Depth, Lon, Lat)
171171
end
172172
if removeNaN_field
173-
remove_NaN_Surface!(data, Lon, Lat)
173+
remove_NaN_surface!(data, Lon, Lat)
174174
end
175175
data_field = NamedTuple{(fieldname,)}((data,));
176176

0 commit comments

Comments
 (0)