Merging DEMs (Digital Elevation Model)¶
To build the best topography from heterogeineous inputs, two DEMs can be merged. In this example, the first one is an extraction from the GEBCO topography product (extraction from https://download.gebco.net/), and the second one is a DEM provided by SHOM (the French Naval Hydrographic and Oceanographic Service).
DEMs properties:
GEBCO resolution is 15 arcseconds (~300m at 45°N)
gebco_2026_n50.797_s42.527_w-9.356_e0.413.nc
SHOM resolution of 100m
MNT_ATL100m_HOMONIM_WGS84_NM_ZNEG.grd
TIPS: Creating topography is a long an iterative process so we recommand to create dedicated directory (for example 1-merging_DEMs/)
Step 1: change the resolution of the “base” bathymetry¶
We want to produce a final bathymetry product with a resolution close to that of the SHOM DEM, which is 100m. We will use topo-create to change the resolution of GEBCO, which is the ‘base’ bathymetry. We set the resolution to 5 arcseconds which corresponds to ~110m at 45°N.
rep=/ecola/share/tmp/training/tuto_bathy/data/
topo-create --mapping "[-9:5arcsec:0;43:5arcsec:50]" \
-b $rep/gebco_2026_n50.797_s42.527_w-9.356_e0.413.nc \
-o GEBCO_Gascogne_5arcsec.nc
Options used here (see topo-create for more):
Name |
Description |
|---|---|
–mapping |
frame and resolution wanted, “[lon_min:dlon:lon_max;lat_min:dlat:lat_max]” |
-b |
working bathymetry |
-o |
output file |
Step 2: merge the two DEMs¶
We will use topo-merge to integrate the SHOM DEM into the working bathymetry generated in the previous step.
rep=/ecola/share/tmp/training/tuto_bathy/data/
topo-merge $rep/MNT_ATL100m_HOMONIM_WGS84_NM_ZNEG.grd \
-b GEBCO_Gascogne_5arcsec.nc \
-f netcdf \
-o GEBCO5arcs_MNTAtlSHOM
Options used here (see topo-merge for more):
Name |
Description |
|---|---|
-b |
base bathymetry |
-f |
output format |
-o |
output file |