Open jatkinson1000 opened 3 months ago
This duplicated #45 which I will repeat here and close:
As part of the interfacing procedure for CAM we have to interpolate from the CAM grid to the SAM grid before applying the neural network, and then interpolate variables back to the CAM grid afterwards. At the moment we are moving ahead with interfacing, but really these should have accompanying tests to check things are working as expected and catch any potential edge cases.
A test would take the form of defining a SAM and CAM grid, and an associated variable. It would then call interp_to_sam and interp_to_cam and check the returned results against known output.
Unit tests would include:
I have just checked, and the test.f90
code in NN_module/
is now broken in some places after the form of the nn_convection_flux
function changed.
As part of this issue we should perhaps also update these. This will require running the new parameterisation and writing out the results as a 'base truth' and then reading them into new variables. The good news is the new form of the function has fewer outputs.
Once @AdelekeBankole is back this should be broken down into sub-issues to help manage tasks and progress.
As part of the work in CAM-ML (specifically #14) there were a couple of bugfixes to the regridding scheme that have been propagated to this repository in #44
As part of #44 @jatkinson1000 added tests for regridding and variable conversion. However, these should be revisited and made more robust once #44 is merged to main.
Some ideas