Skip to content

Commit

Permalink
finally decided on the function of thermal history
Browse files Browse the repository at this point in the history
  • Loading branch information
zhenwu0728 committed Sep 6, 2023
1 parent f7d8c2d commit 82c8865
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/Plankton/CarbonMode/growth_kernels.jl
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,8 @@ end
##### track temperature history
@kernel function calc_thermal_history_kernel!(plank, nuts, p, ΔT)
i = @index(Global)
# @inbounds plank.Th[i] += ΔT/3600 * exp(0.22*(nuts.T[i] - p.Topt)) * isless(p.Topt, nuts.T[i])
@inbounds plank.Th[i] = plank.Th[i] * (1.0 - 1e-1 * ΔT/3600) +
ΔT/3600 * exp(0.22*(nuts.T[i] - p.Topt)) * isless(p.Topt, nuts.T[i])
ΔT/3600 * (nuts.T[i] - p.Topt) * isless(p.Topt, nuts.T[i])
end
function calc_thermal_history!(plank, nuts, p, ΔT, arch)
kernel! = calc_thermal_history_kernel!(device(arch), 256, (size(plank.ac,1)))
Expand Down

0 comments on commit 82c8865

Please sign in to comment.