UCL / pyCascadia

Implementation of GEBCO cookbook remove-restore and other cleaning of topography/bathymetry. Uses `pyGMT`.
Mozilla Public License 2.0
9 stars 0 forks source link

Smooth difference grid #46

Closed JamieJQuinn closed 3 years ago

JamieJQuinn commented 3 years ago

Currently remove-restore applies a difference grid to the base grid directly. This presents an issue at the boundary of the difference grid (for example, where there is no high-resolution data in a region) and creates a discontinuity between high and low resolution regions (see #32). We have already tried:

The solution which appears to work well is windowing. A border of a certain width is created around the boundary of the difference grid and the data within that boundary smoothed. This softens the boundary between the difference grid and the base grid and removes the hard discontinuity.

The actual way in which this is implemented is as follows:

JamieJQuinn commented 3 years ago

Just for testing, there is a clear discontinuity when using:

remove-restore --base ../bath_data/GEBCO_2019_-157.0_62.0_-121.0_35.0.nc --spacing 0.001 --output test.nc ../bath_data/sample_data.tif --region_of_interest -123.3 -122.8 48.800 49.00 --plot

which is alleviated when adding the --window_width flag with a value 10 times the output grid spacing:

remove-restore --base ../bath_data/GEBCO_2019_-157.0_62.0_-121.0_35.0.nc --spacing 0.001 --output test.nc ../bath_data/sample_data.tif --region_of_interest -123.3 -122.8 48.800 49.00 --window_width 0.05 --plot
alessandrofelder commented 3 years ago

The one test failure looks like a connectivity issue, I'm not worried...