Skip to content

Commit

Permalink
Fix cloud mask for internal layers
Browse files Browse the repository at this point in the history
  • Loading branch information
sriharshakandala committed Dec 20, 2023
1 parent 8a71a44 commit 5792314
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/optics/CloudOptics.jl
Original file line number Diff line number Diff line change
Expand Up @@ -247,9 +247,11 @@ function build_cloud_mask!(
random_ilay = cld_mask_ilayplus1 ? random_ilayplus1 : Random.rand() * (FT(1) - cld_frac_ilayplus1)
# RRTMG uses random_arr[ilay] > (FT(1) - cld_frac[ilay]), we change > to >= to address edge cases
cld_mask_ilay = random_ilay >= (FT(1) - cld_frac_ilay)
@inbounds cld_mask[ilay] = cld_mask_ilay
random_ilayplus1 = random_ilay
else
cld_mask_ilay = false
end
@inbounds cld_mask[ilay] = cld_mask_ilay
cld_frac_ilayplus1 = cld_frac_ilay
cld_mask_ilayplus1 = cld_mask_ilay
end
Expand Down

0 comments on commit 5792314

Please sign in to comment.