Skip to content
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

Comprehensive testing of conservative regridding scheme (and other interface functions) #64

Open
9 tasks
jatkinson1000 opened this issue Aug 16, 2024 · 3 comments · May be fixed by #68
Open
9 tasks

Comprehensive testing of conservative regridding scheme (and other interface functions) #64

jatkinson1000 opened this issue Aug 16, 2024 · 3 comments · May be fixed by #68
Assignees

Comments

@jatkinson1000
Copy link
Member

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

  • Revisit conservative regridding tests and
    • Test conservation of mass in a column
      • For density 1.0
      • For more arbitrary density profile
    • Test for conversion between actual CAM and SAM grids
  • Revise tests linear interpolation scheme as appropriate
  • Refine the tests for variable conversion
  • Write tests for any other routines as would be useful
  • Run tests as part of the CI process?
@jatkinson1000
Copy link
Member Author

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:

  • Mapping between interlocking grids
  • Mapping between overlapping grids
  • Handling end points when grids don't start/end at same point

@jatkinson1000
Copy link
Member Author

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.

@jatkinson1000
Copy link
Member Author

Once @AdelekeBankole is back this should be broken down into sub-issues to help manage tasks and progress.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants