More clarity on landmask issue #1580
Replies: 3 comments 2 replies
-
|
Ok, yes this was clarifying. Normally this is ok/desired, but I agree in your case that you might not want too much extrapolation, and thus better to use ocean model landmask. https://opendrift.github.io/_modules/opendrift/readers/basereader/variables.html#Variables However, this is not well documented, and thus you might instead want to use the workaround described in this new example: |
Beta Was this translation helpful? Give feedback.
-
|
Ok, since I couldn't get this approach to work with multiple input files, I've tried another strategy: adding a land binary mask and depths to my forcing file. Here's the output from |
Beta Was this translation helpful? Give feedback.
-
|
Ok, it's working now! I had to add standard names to the attributes of the variables I added to my model forcing. Now the generic netcdf reader seems to know about my added fields:
|
Beta Was this translation helpful? Give feedback.


Uh oh!
There was an error while loading. Please reload this page.
-
Apologies, I was unclear in my previous post. I will try to explain more clearly.
Glorys has a few ocean points that are masked by the GSHHG land mask, and the GSHHG land mask has some ocean points which are land points in Glorys. For example, San Francisco bay is finely resolved in the GSHHG land mask, but, in Glorys, the bay is modeled by 10-20 grid cells. So, using the GSHHG land mask, Opendrift can send drifters into parts of the SF Bay which are land points in Glorys. I want to avoid this.
As a related example, this is from an Opendrift run using ROMS data in which the SF Bay didn't exist (ie was completely masked as land). Since I forgot to turn off the GSHHG land mask, Opendrift let particles drift into a masked part of the forcing data (the bay), apparently taking velocity values from the nearest non-masked points ( otside of the bay)
Disabling the GSHHG land mask solved the problem in this case, but I don't have mask variables in my Glorys data, so disabling the GSHHG land mask with Glorys data leads to "ValueError: Readers must be added for the following required variables: ['land_binary_mask']"
I hope this explanation of the problem is more clear. I'm wondering if there's a way to make Opendrift respect the masking (ie difference between land and ocean points) in forcing data, when there isn't a mask variable stored in the forcing data.
Thanks,
Bruce
Beta Was this translation helpful? Give feedback.
All reactions