m2lines / convection-parameterization-in-CAM

Deployment of the convection parameterization scheme (previously from within SAM) deployed into the CAM model
MIT License
3 stars 2 forks source link

Regridding tests #45

Closed jatkinson1000 closed 1 month ago

jatkinson1000 commented 1 year ago

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.

The inputs are interpolated linearly, whilst the outputs use conservative regridding to improve conservation.

These have been written as part of the nn_interface_CAM.f90 module. 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:

jatkinson1000 commented 7 months ago

This is WIP as part of #44

We interpolate between

jatkinson1000 commented 1 month ago

Closing as superseded by #64