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

Feature/add preprocessing smoothing #45

Open alessandrofelder opened 3 years ago

alessandrofelder commented 3 years ago

This PR is an attempt at incorporating preprocessing ("workflow steps B+C of the GEBCO cookbook") into remove-restore.py. See #32 and #43 for details.

This PR mainly adds

We need to think more about

alessandrofelder commented 3 years ago

close-up-comparison This is a representative close-up comparison of using vs. not using the preprocessing steps B+C (in their current implementation). I ran:

remove-restore --base gebco_2020_n54.0_s43.0_w-130.0_e-117.0.nc --output=vancouver-island.nc --plot --spacing 0.00028 NOAA_South_VancouverIsland_30m.tif --region_of_interest -123.4 -123 47.8 48.0 --diff_threshold 0.1

It doesn't seem to make any real difference on the smoothness of the boundary? 🤔 For orientation, this is here: image

D3varaj-G commented 3 years ago

Just to confirm: Input base grid is GEBCO ~300m Input update grid is for Vacouver ~30m Output spacing ~ 30m

Now: (Step B +C p. 148 in GEBCO Cookbook)

Next: (remove-restore)

alessandrofelder commented 3 years ago

@Devaraj-G essentially, yes, that is what is happening.

The main difference between your description and what is happening in the code is that only the update grid gets put back into the output of Step B+C.

(small corrections, not important: 3*120=360, not 3600, and Step C is the grdfilter not the grdsample step)