Currently in CAM-SIMA there are two different ways to calculate common physical or meteorological quantities within the physics suite; either use a scheme from schemes/utilities, which can be called directly in the SDF, or use a function from one of the libraries in phys_utils, which can be called within a physics scheme itself.
Although they serve two different purposes, this separation results in the same calculations being located in two separate places in the source code, which is not ideal. Thus an improvement would be to "merge" these two methods, for example by calling the phys_utils functions within the utilities schemes, which would then move the actual calculations to a single location, and would increase code coverage even with the same number of tests.
Finally, there is also currently an opportunity to simplify the number of total functions that are needed, especially for situations where a function exists to simply calculate the reciprocal of a quantity, and to increase the number of total unit/property tests, which could also be done along with this "merging" cleanup effort.
Currently in CAM-SIMA there are two different ways to calculate common physical or meteorological quantities within the physics suite; either use a scheme from
schemes/utilities, which can be called directly in the SDF, or use a function from one of the libraries inphys_utils, which can be called within a physics scheme itself.Although they serve two different purposes, this separation results in the same calculations being located in two separate places in the source code, which is not ideal. Thus an improvement would be to "merge" these two methods, for example by calling the
phys_utilsfunctions within the utilities schemes, which would then move the actual calculations to a single location, and would increase code coverage even with the same number of tests.Finally, there is also currently an opportunity to simplify the number of total functions that are needed, especially for situations where a function exists to simply calculate the reciprocal of a quantity, and to increase the number of total unit/property tests, which could also be done along with this "merging" cleanup effort.