earth-system-radiation / rte-rrtmgp

RTE+RRTMGP is a set of codes for computing radiative fluxes in planetary atmospheres.
BSD 3-Clause "New" or "Revised" License
74 stars 65 forks source link

Add initial unit tests (solvers) #263

Closed RobertPincus closed 6 months ago

RobertPincus commented 6 months ago

This PR adds some unit tests for the solvers alone (in tests/rte[sl]w_unit_tests.F90). Longwave solvers are tested for correctness in radiative equilibrium and for invariance to choices (vertical orientation, problem size...). Shortwave solvers are tested only for invariance.

RobertPincus commented 6 months ago

Note that the standalone solver tests fail for nvfortran 24.1 and the default kernels. This is surprising because the same compiler/kernel combination passes similar tests in the end-to-end problem (tests/check_equivalence). @alexeedm has promised to take a look in the coming days.

RobertPincus commented 6 months ago

@skosukhin What would you think about merging this onto develop despite the failing CI for nvidia+default-kernels? I'll chase that down after the fact.

RobertPincus commented 6 months ago

Of course @alexeedm If you have any bandwidth to look at the failing nvfortran 24.1/default kernels failures I'm grateful. You had thought there might be a compiler bug.