CWorthy-ocean / roms-tools

Tools for creating input files for UCLA-ROMS simulations
https://roms-tools.readthedocs.io
Apache License 2.0
11 stars 5 forks source link

Mismatch between MATLAB- and python-generated grids #73

Open dafyddstephenson opened 3 months ago

dafyddstephenson commented 3 months ago

There is (see screenshot) a difference between the Grid object when generated using python roms-tools vs MATLAB. Per our discussion my understanding is that topography smoothing is applied before the mask is generated, leading to the problem.

Screenshot 2024-08-13 at 2 33 50 PM

NoraLoose commented 3 months ago

Related to #66

NoraLoose commented 3 months ago

@nmolem looking at your MATLAB scripts, they define the mask by choosing a threshold of 0.11 meters for the dealiased interpolated bathymetry h_dealiased, i.e.,

Is there a deeper meaning behind that 0.11 meter threshold?

@dafyddstephenson the difference in your plot above stems from the fact that the python package simply uses a threshold of 0 meters.

nmolem commented 3 months ago

I don't remember why I picked 0.11 meter. Surely no deeper meaning and you can pick 0m as well.

dafyddstephenson commented 3 months ago

@NoraLoose got it. Well this isn't the most scientifically rigorous argument for a parameter choice but the map resulting from 0.11 definitely looks a lot more like Wales 😂🏴󠁧󠁢󠁷󠁬󠁳󠁿

nmolem commented 3 months ago

Sometimes, it's better to be lucky than good.