OpenDrift / opendrift

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

changes to ROMS reader for wetdry masks #1225

Closed kthyng closed 4 months ago

kthyng commented 4 months ago

Main changes are to allow for the land_binary_mask as well as mask_rho, mask_u, and mask_v to have 3D or 2D dimensions since masks in ROMS can vary in time if they represented cells that can wet and dry in time. With the changes, if a variable wetdry_mask_rho is available, it will be used for the rho mask in place of mask_rho, otherwise will use mask_rho, and the same for the u and v masks. The masks for different grids use the same indices, same as before these changes, but now they are managed a little more simply in one location in the function. Additionally, more effort is made to match variables to the appropriate mask since sometimes they may not be a typical ROMS- output variable.

More changes:

kthyng commented 4 months ago

@knutfrode here is that PR I mentioned for dealing with wet/dry masks in ROMS (along a few other items).

knutfrode commented 4 months ago

Looks all good, and all tests and examples are passing, thus merging now. Thank you for the useful improvement.