Filter & correct bathymetry, create a map¶
Let’s give it a try. We can extract a sound velocity profile (SVP) near the region and apply it by using mblevitus and mbset. Although I suppose it will not improve this data since it is too shallow for globally modelled SVPs of the rather coarse mblevitus database and most probably affected by daily and monthly changing internal waves, but good for testing results and changes. | We then will apply a first gentle and automatized cleaning to the raw bathymetry by using mbclean.
As an imput of mblevitus one needs to know the region (-Rlon/lat) which can be approximated from the raw-bathymetry map and serves a name for the output (-O). NOTE: Longitudes are negative towards West, Latitudes towards South. MBlevitus has a resolution of 1 by 1 arc-degree.
!mblevitus -Rlon/lat -O MBLevitus_LonLat.svp
!mbset -I datalist.mb-1 -PSVPFILE:MBLevitus_LonLat.svp
The mbset command applies the SVP (in that case) to the *.inf files of every raw data file mentioned in the datalist.mb-1 Mbset can apply for correcting also tides, roll/pitch/draft/heave offsets and many other parameters.
!mbclean -Idatalist.mb-1 -A20 -M1 -C2/1 -D0.01/0.20 -G0.80/1.20 -R1.5 -S10/1/2
Apply the cleaning and create processed files with mbprocess
Create a processed datalist with mbdatalist
Create a grid (DTM) of the processed data & a postscript map from that grid:
!mbgrid -Idatalistp.mb-1 -A2 -E5/5/m! -F1 -C5/2 -N -V -O MSM36_EM122_procBathy
!mbm_grdplot -IMSM36_EM122_procBathy.grd -G2 -A0.4/45 -D -MGQ72 -X -V -L"Shaded Relief Bathymetry":"Depth (meters)" -O MSM36_EM122_procBathyPlot
Please realize you will have the same issue with this cmd-script than with the previous one, so redo the steps as befor to restart the kernel and apply the following commands afterwards:
!gmt ps2raster MSM36_EM122_procBathyPlot.ps -A+n -Tj
from IPython.display import Image