NOAA-EMC / NCEPLIBS-g2tmpl

GRIB2 codes and templates
Other
4 stars 9 forks source link

Adding GRIB2 template 4.46 for RRFS use. #115

Closed EricJames-NOAA closed 5 months ago

EricJames-NOAA commented 5 months ago

Adding template 4.46 so that it can be used in UPP for some needed RRFS output.

Part of #118

WenMeng-NOAA commented 5 months ago

We need some test code for this.

@edwardhartnett Both @EricJames-NOAA and I can run UPP to test. But you have to install a new version of g2ptml module (1.10.3?) under the spack-stack.

edwardhartnett commented 5 months ago

Actually I mean test code within this repo. See https://github.com/NOAA-EMC/NCEPLIBS-g2tmpl/blob/develop/tests/test_g2tmpl_pdt4_11.F90 for example.

WenMeng-NOAA commented 5 months ago

Actually I mean test code within this repo. See https://github.com/NOAA-EMC/NCEPLIBS-g2tmpl/blob/develop/tests/test_g2tmpl_pdt4_11.F90 for example.

@edwardhartnett I have no knowledge to test that kind of code.

edwardhartnett commented 5 months ago

OK, I will add a test...

edwardhartnett commented 5 months ago

@WenMeng-NOAA and @EricJames-NOAA take a look at #125 to see how we can easily write an automated test for a subroutine such as this.

The test simply sets all the required values, then calls the subroutine, then checks that the results match an expected result.

This sort of testing, though simple, has been proven again and again to be far more time efficient and useful than manual testing. In a manual testing cycle, you are unlikely to try every different template supported by NCEPLIBS-g2tmpl, but automated testing does exactly that, every time a pull request is submitted.