mom-ocean / MOM6

Modular Ocean Model
Other
181 stars 223 forks source link

MOM6 interfaces to generic tracer code are not tested #835

Closed Hallberg-NOAA closed 3 years ago

Hallberg-NOAA commented 6 years ago

The MOM6 interface to the generic tracer code (which is shared with other older GFDL ocean models like MOM4 and GOLD) is hidden behind the CPP macro _USE_GENERIC_TRACER. This is done because the standard generic tracer code is huge, includes very large files (some greater than 12,000 lines in a file) that take a prohibitively long time to compile, and some of the generic tracer packages have not yet been made publicly available. However, in shielding this code behind a CPP macro, it is not being tested at all, and we have recently had bugs creep in.

(OK, so to rephrase this less passively, I broke the generic tracer code and did not realize it, and then had my broken changes accepted by everybody onto the common dev/master! To me this indicates a failure of testing!)

I propose providing a greatly simplified variant of the generic tracer packages to the code that is obtained with MOM6 from GitHub, perhaps with just one of the smaller packages like generic_CFC or generic_Argon, in its own directory under config_src for the purpose of testing the generic tracer interfaces. Note that the code in this directory would flagrantly contradict all of our MOM6 coding standards, which I do not like at all, but I think that we would just have to accept this. We could then eliminate the shielding CPP macro and improve our code coverage.

jkrasting commented 6 years ago

I greatly support this idea.

I would recommend testing the generic_abiotic routine since it is lightweight and would exercise our dependence on the external Mocsy package.

Hallberg-NOAA commented 3 years ago

This has been solved by PR #1133 creating a stub for the generic tracers.