Skip to content

Commit

Permalink
Adjust the angles and secants consistent with upstream changes. Tests
Browse files Browse the repository at this point in the history
are passing again for CPU code.
  • Loading branch information
Chiil committed Dec 11, 2024
1 parent eb01e87 commit ffb2186
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 11 deletions.
2 changes: 1 addition & 1 deletion include/Source_functions.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class Source_func_lw : public Optical_props
Array<Float,2>& get_sfc_source() { return sfc_source; }
Array<Float,2>& get_sfc_source_jac() { return sfc_source_jac; }
Array<Float,3>& get_lay_source() { return lay_source; }
Array<Float,3>& get_lev_source() { return lev_source; }
Array<Float,3>& get_lev_source() { return lev_source; }

const Array<Float,2>& get_sfc_source() const { return sfc_source; }
const Array<Float,2>& get_sfc_source_jac() const { return sfc_source_jac; }
Expand Down
19 changes: 11 additions & 8 deletions src/Rte_lw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<Float,2> 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<Float,2> 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();
Expand Down

0 comments on commit ffb2186

Please sign in to comment.