Open hmkhatri opened 2 years ago
Thanks for raising the issue @hmkhatri. The masking is ultimately based on combining smaller named subregions from regionmask. I suspect that a new one of these regions has been added during a recent update
@mathause, is this possible (also sorry for not responding on that old issue)?
@hmkhatri, could you follow the docs like this:
basins = regionmask.defined_regions.natural_earth.ocean_basins_50
basins.plot(add_ocean=False, add_label=True)
and zoom in on this region? I would be very curious to see what is going on, but do not currently have time to dig into this myself.
Indeed, there is a a bit of ocean not part of any region - but it's the same with both versions of the naturalearthdata. v4.1 is orange and v5.0 is blue.
@jbusecke you'll be able to specify the naturalearthdata version once the new version is released.
@mathause @jbusecke Thanks for looking into this. Seems like some manual tweaking is needed to incorporate the missing region in the North Atlantic mask.
It is not a major issue and I managed to get rid of white space by combining North Atlantic mask and ocean wet point mask. It would be nice to update the code for correcting it. I am busy for next few weeks, but I would be happy to work on this later.
Bummer to see that this is in fact baked into both NE versions. I have been thinking about refactoring the basin masking ability (#119) and maybe this should be part of it. Using the wetmask is not ideal IMO, since this method should really just rely on the lon/lat values of the model (which makes it quite universal). All that cmip6_pp does is just combine a bunch of shapefiles, so its concievable that we just add a manual correction there?
Then again, since I wrote this, I have actually used this in many more use cases outside of cmip6. I wonder if such a refactor should maybe include efforts upstream, to just publish a NE shapefile with ocean basins? This seems of much broader use than just for the cmip community. @mathause have you interacted with that community at all?
@mathause have you interacted with that community at all?
No I didn't so far, but you have ;-) nvkelso/natural-earth-vector#319
I pinged them over in https://github.com/nvkelso/natural-earth-vector/issues/697. Lets see what they think.
On a separate note: It might be worth raising this issue over at their issue tracker again. They were very responsive to my suggestions! @hmkhatri
Upstream support for this will be in Natural Earth v5.2.0 which is in public preview on Github.
I followed the approach from tutorial notebook and created a mask for North Atlantic. However, there is a small region (see while space between Greenland and Iceland in figure) that has nan values, even though there is an ocean in between. I have tried creating masks with 1 deg and 0.25 deg. Both had this issue.