Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove splatting #374

Merged
merged 2 commits into from
Jun 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions docs/src/rte/RTESolver.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ CurrentModule = RRTMGP.RTESolver

```@docs
solve_lw!
rte_lw_noscat_solve!
rte_lw_2stream_solve!
rte_lw_solve!
solve_sw!
rte_sw_noscat_solve!
rte_sw_2stream_solve!
Expand Down
2 changes: 2 additions & 0 deletions perf/flame.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#=
julia --project=examples
julia --project=examples perf/flame.jl gray_atm.jl
julia --project=examples perf/flame.jl clear_sky.jl
julia --project=examples perf/flame.jl all_sky.jl
```
include(joinpath("perf", "flame.jl"))
```
Expand Down
2 changes: 1 addition & 1 deletion src/optics/LookUpTables.jl
Original file line number Diff line number Diff line change
Expand Up @@ -798,7 +798,7 @@ These are used to determine the optical properties of ice and water cloud togeth
# Fields
$(DocStringExtensions.FIELDS)
"""
struct LookUpCld{B, FT, FTA1D, FTA2D, FTA3D, FTA4D}
struct LookUpCld{B, FT, FTA1D, FTA2D, FTA3D, FTA4D} <: AbstractLookUp{FT}
"number of bands"
nband::Int
"number of ice roughness types"
Expand Down
26 changes: 18 additions & 8 deletions src/optics/Optics.jl
Original file line number Diff line number Diff line change
Expand Up @@ -162,13 +162,16 @@ function compute_optical_props!(
sf::AbstractSourceLW{FT},
gcol::Int,
igpt::Int,
lkp::LookUpLW{FT},
lkp_cld::Union{LookUpCld, Nothing} = nothing,
lkp::Union{AbstractLookUp, Nothing} = nothing,
lkp_cld::Union{AbstractLookUp, Nothing} = nothing,
) where {FT <: AbstractFloat}
nlay = as.nlay
lkp_args = (lkp_cld === nothing) ? (lkp,) : (lkp, lkp_cld)
for ilay in 1:nlay
compute_optical_props_kernel!(op, as, ilay, gcol, sf, igpt, lkp_args...)
if lkp_cld isa Nothing
compute_optical_props_kernel!(op, as, ilay, gcol, sf, igpt, lkp)
else
compute_optical_props_kernel!(op, as, ilay, gcol, sf, igpt, lkp, lkp_cld)
end
end
return nothing
end
Expand All @@ -190,13 +193,16 @@ function compute_optical_props!(
as::AtmosphericState{FT},
gcol::Int,
igpt::Int,
lkp::LookUpSW{FT},
lkp_cld::Union{LookUpCld, Nothing} = nothing,
lkp::Union{AbstractLookUp, Nothing} = nothing,
lkp_cld::Union{AbstractLookUp, Nothing} = nothing,
) where {FT <: AbstractFloat}
nlay = as.nlay
lkp_args = (lkp_cld === nothing) ? (lkp,) : (lkp, lkp_cld)
for ilay in 1:nlay
compute_optical_props_kernel!(op, as, ilay, gcol, igpt, lkp_args...)
if lkp_cld isa Nothing
compute_optical_props_kernel!(op, as, ilay, gcol, igpt, lkp)
else
compute_optical_props_kernel!(op, as, ilay, gcol, igpt, lkp, lkp_cld)
end
end
return nothing
end
Expand All @@ -218,6 +224,8 @@ function compute_optical_props!(
sf::AbstractSourceLW{FT},
gcol::Int,
igpt::Int = 1,
lkp::Union{AbstractLookUp, Nothing} = nothing,
lkp_cld::Union{AbstractLookUp, Nothing} = nothing,
) where {FT <: AbstractFloat}
nlay = as.nlay
for ilay in 1:nlay
Expand All @@ -241,6 +249,8 @@ function compute_optical_props!(
as::GrayAtmosphericState{FT},
gcol::Int,
igpt::Int = 1,
lkp::Union{AbstractLookUp, Nothing} = nothing,
lkp_cld::Union{AbstractLookUp, Nothing} = nothing,
) where {FT <: AbstractFloat}
nlay = as.nlay
for ilay in 1:nlay
Expand Down
Loading