-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update src/drivers/schism/fabm_driver.h with MASK definitions #64
Conversation
Recent versions of SCHISM need the MASK_TYPE and MASK_VALUE to be defined in the driver. This Commit adds the relevant definitions. We also update copyright and license (placed in public domain).
Hi Carsten Will it break older versions of SCHISM? Karsten |
No, it will not break older versions of SCHISM. As there is no mask in those, the defines will simply be not used at all. |
Just to note that if you do provide A separate question that has no implication for this PR, but maybe for future development: does the mask really need to be depth-explicit? If SCHISM either uses all vertical layers (wet point), or none at all (dry point), you could tell FABM that the mask is horizontal-only by defining |
Thanks for the hint to this implicit code breaking potential. There is as far as I know only one fabm_schism coupler under the control of the schism-dev community, and I lead that development. There are uses of this coupler in very old versions with FABM0, not setting a mask. Set_mask was implemented in the coupler in May 2016, for both FABM0 and FABM1. We should be willing to risk breaking code that is > 8 years old and FABM0. |
Thanks for this hint, I checked the code, there are no uses of a non-horizontal mask, so we should indeed define |
right now there are errors :-) https://github.com/fabm-model/fabm/actions/runs/8737222365/job/23974279396?pr=64 |
I am looking into these, and can reproduce them locally. schism host is very similar to fvcom host. The only difference is that in schism the |
SCHISM does not need a 3D mask, so for performance reasons `_FABM_HORIZONTAL_MASK_` should be defined
Exactly right - it's a problem in the test harness (SCHISM uses a quite unique combination of settings in fabm_driver.h, so it shows up only there). Looking into it... |
The test harness has now been updated. Can you pull the latest changes from FABM master into your PR branch? Then the tests should pass, and we'll merge it in. |
Breaks existing code, we might reintroduce as soon as the 1) discussion about performance is resolved 2) the SCHISM code respects this #define
The test harness fails with two models:
The error is similar:
|
These runtime failures likely relate to the test harness requesting source terms in masked cells. I have updated the test harness code in master to avoid this, and also added more logic to skip calculations in masked cells/below bottom for models like SCHISM (i.e., with the vertical dimension vectorized, variable bottom index). That's in preparation for use with |
Recent versions of SCHISM need the MASK_TYPE and MASK_VALUE to be defined in the driver. This Commit adds the relevant definitions. We also update copyright and license (placed in public domain).