OpenDrift / opendrift

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

Landmask of readers #1127

Closed egrosas closed 1 year ago

egrosas commented 1 year ago

Hello,

I am currently conducting simulations using two hydrodynamic readers. The first reader, named SOMA_L1, represents a coarse-resolution model that covers the entire coast of Por SOMA_withoutautolandmask tugal. The second reader, named SOMA_L2, specifically covers the south coast of Portugal.

During my tests, I have noticed that when a particle falls within the common area of the two models, the land_mask from SOMA_L2 is correctly applied. However, when a particle falls within the area exclusively covered by the hydrodynamic reader with the larger domain (SOMA_L1) in my simulations, is the land_mask from SOMA_L1 being utilized, or is a general land_mask applied instead?

test_landmask.txt

knutfrode commented 1 year ago

Hi,

If SOMA_L1 contains the variable land_binary_mask (as SOMA_L2 does), then its landmask should be applied.

Note, however, that when calling plot or animation with background='land_binary_mask' then only the landmask from a single reader is shown. This will be the first reader that was added, which in your case is the higher resolution model. Thus it will appear as if landmask of SOMA_L1 is not used, but it is in fact used during simulations. Perhaps better in this case is to show the built-in GSHHG landmask.

egrosas commented 1 year ago

That is great. Thanks for the GSHHG landmask suggestion.