OpenDrift / opendrift

Open source framework for ocean trajectory modelling
https://opendrift.github.io
GNU General Public License v2.0
245 stars 120 forks source link

Set same default ocean floor depth in SedimentDrift as in OceanDrift #1105

Closed poplarShift closed 1 year ago

poplarShift commented 1 year ago

I just spent way too much time figuring out why my particles always ended up at -0.01 depth. Turns out the default depth of the SedimentDrift module is 0, which is not very helpful.

knutfrode commented 1 year ago

Yes, fallback of 0m ocean depth was not very meaningful. Though depth is supposed to be provided by an ocean model. Fallback of 10000m might be an ok workaround for modules where buoyancy is positive, and particles never settle. But for SedimentDrift I guessing having no real seafloor is normally not a good option? Anyway, I will merge this update as soon as all tests are passing.

poplarShift commented 1 year ago

Yes, the ocean model should of course provide it, so maybe throwing an error would be another way of handling missing depths from the model. Infinite (or very large) depth is useful only for debugging and quick test runs I suppose.

knutfrode commented 1 year ago

An error is thrown for missing ocean depth if fallback value is set to None. But having 10000m allows running concept tests without real ocean depth. So can keep it like this.