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
Creates a cross-section through a surface (2D) `GeoData` object.
260
260
261
261
- Cross-sections can be horizontal (map view at a given depth), if `Depth_level` is specified
262
-
- They can also be vertical, either by specifying `Lon_level` or `Lat_level` (for a fixed lon/lat), or by defining both `Start=(lon,lat)` & `End=(lon,lat)` points.
262
+
- They can also be vertical, either by specifying `Lon_level` or `Lat_level` (for a fixed lon/lat), or by defining both `Start=(lon,lat)` & `End=(lon,lat)` points. Start and End points will be in km!
263
263
264
264
- IMPORTANT: The surface to be extracted has to be given as a gridded GeoData object. It may also contain NaNs where it is not defined. Any points lying outside of the defined surface will be considered NaN.
265
265
@@ -351,9 +351,14 @@ function cross_section_surface(S::AbstractGeneralGrid; dims=(100,), Interpolate=
351
351
352
352
end
353
353
354
-
# create GeoData structure with the interpolated points
355
-
Data_profile =GeoData(Lon, Lat, depth_intp, (fields_new));
356
-
354
+
# create GeoData/CartData structure with the interpolated points
355
+
ifisa(S,GeoData)
356
+
Data_profile =GeoData(Lon, Lat, depth_intp, fields_new);
357
+
elseifisa(S,CartData)
358
+
Data_profile =CartData(Lon, Lat, depth_intp, fields_new);
359
+
else
360
+
error("still to be implemented")
361
+
end
357
362
return Data_profile
358
363
end
359
364
@@ -545,9 +550,9 @@ Creates a cross-section through a `GeoData` object.
0 commit comments