diff --git a/radiation/TwoStreamMLPEMod.F90 b/radiation/TwoStreamMLPEMod.F90 index c4bb99fec1..25b8efdc1b 100644 --- a/radiation/TwoStreamMLPEMod.F90 +++ b/radiation/TwoStreamMLPEMod.F90 @@ -979,10 +979,12 @@ subroutine ZenithPrep(this,cosz_in) iter_sing = 0 ! Compute the singularity for all bands - Kb_sing(:) = this%band(:)%scelb(ican,icol)%a - if (scelg%lai>nearzero) then - Kb_sing(:) = (Kb_sing(:) * (scelg%lai+scelg%sai) - scelg%sai*Kb_stem)/scelg%lai - end if + do ib = 1,this%n_bands + Kb_sing(ib) = this%band(ib)%scelb(ican,icol)%a + if (scelg%lai>nearzero) then + Kb_sing(ib) = (Kb_sing(ib) * (scelg%lai+scelg%sai) - scelg%sai*Kb_stem)/scelg%lai + end if + end do do_test_sing: do while(is_sing) ! Now that we have commited to testing it, assume the solution works