Data importing
We have a number of ways to import data, besides using any of the additional packages in julia to read files.
GeophysicalModelGenerator.screenshot_to_GeoData Function
screenshot_to_GeoData(filename::String, Corner_LowerLeft, Corner_UpperRight; Corner_LowerRight=nothing, Corner_UpperLeft=nothing, Cartesian=false, UTM=false, UTMzone, isnorth=true, fieldname::Symbol=:colors)Take a screenshot of Georeferenced image either a lat/lon, x,y (if Cartesian=true) or in UTM coordinates (if UTM=true) at a given depth or along profile and converts it to a GeoData, CartData or UTMData struct, which can be saved to Paraview
The lower left and upper right coordinates of the image need to be specified in tuples of (lon,lat,depth) or (UTM_ew, UTM_ns, depth), where depth is negative inside the Earth (and in km).
The lower right and upper left corners can be specified optionally (to take non-orthogonal images into account). If they are not specified, the image is considered orthogonal and the corners are computed from the other two.
Note: if your data is in UTM coordinates you also need to provide the UTMzone and whether we are on the northern hemisphere or not (isnorth).
GeophysicalModelGenerator.screenshot_to_CartData Function
Data = screenshot_to_CartData(filename::String, Corner_LowerLeft, Corner_UpperRight; Corner_LowerRight=nothing, Corner_UpperLeft=nothing)Does the same as screenshot_to_GeoData, but returns a CartData structure
GeophysicalModelGenerator.screenshot_to_UTMData Function
Data = screenshot_to_UTMData(filename::String, Corner_LowerLeft, Corner_UpperRight; Corner_LowerRight=nothing, Corner_UpperLeft=nothing, UTMzone::Int64=nothing, isnorth::Bool=true, fieldname=:colors)Does the same as screenshot_to_GeoData, but returns for UTM data Note that you have to specify the UTMzone and isnorth
GeophysicalModelGenerator.import_topo Function
import_topo(limits; dataset="earth_relief", res="01m", reg="p")Download topography (and bathymetry) for the region limits = [lonmin, lonmax, latmin, latmax] from the GMT data server, and return it as GeoData whose Topography field is in km.
This does not require GMT: the grids are fetched over HTTP and decoded here.
Datasets
"earth_relief"(the default) blends land topography with ocean bathymetry"earth_gebco"is GEBCO bathymetry"earth_synbath"is GEBCO with synthetic bathymetry where the sea floor is unsurveyed
Resolutions
"01d", "30m", "20m", "15m", "10m", "06m" come as one file for the globe; "05m" through "01m", "30s", "15s" and "03s" are tiled.
Note that "03s" is SRTM, which covers land only – the sea is flat zero there, and the finest resolution that carries real bathymetry is "15s".
Example
julia> Topo = import_topo([-18.7, -17.1, 28.0, 29.2], res="03s")
julia> Topo = import_topo(lon=[4,20], lat=[37,49])Tiles are cached, so importing the same region again does not download them a second time.
sourceGeophysicalModelGenerator.import_GeoTIFF Function
import_GeoTIFFOptional routine that imports GeoTIFF images. It requires you to load GMT
GeophysicalModelGenerator.tomo_2_GeoData Function
tomo_2_GeoData(filename::String; vel_type="vs")Reads a seismic tomography NetCDF file and returns a GeoData structure. Requires loading NCDatasets.