Skip to content

Commit

Permalink
Use generator expression instead of list comprehension
Browse files Browse the repository at this point in the history
  • Loading branch information
tomyun committed Jul 5, 2020
1 parent 586c011 commit 254778f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/soil/soil.jl
Original file line number Diff line number Diff line change
Expand Up @@ -409,19 +409,19 @@ end

# Actual transpiration (2.4.4)
θ_r(L, d_r): volumetric_water_content_root_zone => begin
sum([l.𝚯_r' for l in L]) / d_r
sum(l.𝚯_r' for l in L) / d_r
end ~ track # Theta_v,root (m3 m-3)

θ_r_wp(L, d_r): volumetric_water_content_root_zone_wilting_point => begin
sum([l.𝚯_r_wp' for l in L]) / d_r
sum(l.𝚯_r_wp' for l in L) / d_r
end ~ track # (m3 m-3)

θ_r_fc(L, d_r): volumetric_water_content_root_zone_field_capacity => begin
sum([l.𝚯_r_fc' for l in L]) / d_r
sum(l.𝚯_r_fc' for l in L) / d_r
end ~ track # (m3 m-3)

θ_r_sat(L, d_r): volumetric_water_content_root_zone_saturation => begin
sum([l.𝚯_r_sat' for l in L]) / d_r
sum(l.𝚯_r_sat' for l in L) / d_r
end ~ track # (m3 m-3)

RD_t(θ_r, θ_r_wp, θ_r_sat): transpiration_reduction_factor => begin
Expand Down

0 comments on commit 254778f

Please sign in to comment.