From ffb21869785656fa2f02b41aec72a6e8888c49f5 Mon Sep 17 00:00:00 2001 From: Chiel van Heerwaarden Date: Wed, 11 Dec 2024 15:45:28 +0100 Subject: [PATCH] Adjust the angles and secants consistent with upstream changes. Tests are passing again for CPU code. --- include/Source_functions.h | 2 +- rrtmgp-data | 2 +- rte-rrtmgp | 2 +- src/Rte_lw.cpp | 19 +++++++++++-------- 4 files changed, 14 insertions(+), 11 deletions(-) diff --git a/include/Source_functions.h b/include/Source_functions.h index 35c646c..47e77f1 100644 --- a/include/Source_functions.h +++ b/include/Source_functions.h @@ -51,7 +51,7 @@ class Source_func_lw : public Optical_props Array& get_sfc_source() { return sfc_source; } Array& get_sfc_source_jac() { return sfc_source_jac; } Array& get_lay_source() { return lay_source; } - Array& get_lev_source() { return lev_source; } + Array& get_lev_source() { return lev_source; } const Array& get_sfc_source() const { return sfc_source; } const Array& get_sfc_source_jac() const { return sfc_source_jac; } diff --git a/rrtmgp-data b/rrtmgp-data index df02975..34967d6 160000 --- a/rrtmgp-data +++ b/rrtmgp-data @@ -1 +1 @@ -Subproject commit df02975ab93165b34a59f0d04b4ae6148fe5127c +Subproject commit 34967d68703e682305ec4da72ee22bbe1f11b198 diff --git a/rte-rrtmgp b/rte-rrtmgp index 9caac5e..41c5fcd 160000 --- a/rte-rrtmgp +++ b/rte-rrtmgp @@ -1 +1 @@ -Subproject commit 9caac5ec3ceab9a295699a2abb58809a9dca87de +Subproject commit 41c5fcd950fed09b8afe186dede266824eca7fd3 diff --git a/src/Rte_lw.cpp b/src/Rte_lw.cpp index 4204ff7..77ce073 100644 --- a/src/Rte_lw.cpp +++ b/src/Rte_lw.cpp @@ -134,18 +134,21 @@ void Rte_lw::rte_lw( const int n_gauss_angles) { const int max_gauss_pts = 4; + + // Weights and angle secants for "Gauss-Jacobi-5" quadrature. + // Values from Table 1, R. J. Hogan 2023, doi:10.1002/qj.4598 const Array gauss_Ds( - { 1.66, 0., 0., 0., - 1.18350343, 2.81649655, 0., 0., - 1.09719858, 1.69338507, 4.70941630, 0., - 1.06056257, 1.38282560, 2.40148179, 7.15513024}, + { 1./0.6096748751, 0. , 0. , 0., + 1./0.2509907356, 1/0.7908473988, 0. , 0., + 1./0.1024922169, 1/0.4417960320, 1./0.8633751621, 0., + 1./0.0454586727, 1/0.2322334416, 1./0.5740198775, 1./0.903077597 }, { max_gauss_pts, max_gauss_pts }); const Array gauss_wts( - { 0.5, 0., 0., 0., - 0.3180413817, 0.1819586183, 0., 0., - 0.2009319137, 0.2292411064, 0.0698269799, 0., - 0.1355069134, 0.2034645680, 0.1298475476, 0.0311809710}, + { 1., 0., 0., 0., + 0.2300253764, 0.7699746236, 0., 0., + 0.0437820218, 0.3875796738, 0.5686383044, 0., + 0.0092068785, 0.1285704278, 0.4323381850, 0.4298845087 }, { max_gauss_pts, max_gauss_pts }); const int ncol = optical_props->get_ncol();