Closed Oklyagina closed 4 years ago
I wonder if the problem is because Caspian is not recognised as a lake and not a Sea, and thus not treated as ocean by the landmask.
As a first step, can you please add this, before your seed-command:
>>> o.set_config('seed:ocean_only', True)
And you might also need to add:
>>> o.set_config('general:use_auto_landmask', False)
Dear Knutfrode, thank you for the prompt answer. I did that, but the warning is still here:
I am sorry, the first config should be False, not True:
>>> o.set_config('seed:ocean_only', False)
I changed it to False. The warning about ocean pixels is gone, but the simulation still stops within the first time-step. How can one treat it?
Ok, that is progress.
But then you need an ocean model which also contains a landmask. Did you add an ocean model reader to your simulation? If so, you can print this one to see if it also contains land_binary_mask
.
If you do not have landmask available, then the last resort is to deactivate it, but then particles might move over land.
This is done by setting a fallback-value as 0 (ocean), which was done like this in version 1.3.3:
>>> o.fallback_values['land_binary_mask'] = 0
(After version 1.4.0 this is instead done like this: o.set_config('environment:fallback:land_binary_mask', 0)
)
Btw, you are adding a landmask-reader in your code above. This is normally not necessary, as it is added automatically when the simulation starts, unless you have specified use_auto_landmask
to False.
So I think in this case, you should not add the landmask reader, as it apparently does anyway not work for the Caspian, and might be the reason for stop in first timestep.
Dear Knutfrode, I removed the landmask reader, and now the simulation works! Thank you very much for your help.
Dear all, I use OpenDrift (v 1.3.3) to study movement of particles in the Caspian Sea. In the Opendrift.run I get the following output: Moving 100 out of 100 points from land to water; WARNING: No ocean pixels nearby, cannot move elements. , though the seeding start coordinates are right in the middle of the sea (red point on picture) The same code works perfectly well for the Baltic sea. What might be the reason for this and how can I solve it?