Skip to content

Commit 387033f

Browse files
authored
Nitrogen fixation update (#84)
* rename functions and arguments for better understanding * fix respiration * fix Fe uptake default parameter * fix typos in boundary conditions * update iron uptake, C fixation processes * update compat and bump version
1 parent 5e53c53 commit 387033f

File tree

14 files changed

+191
-195
lines changed

14 files changed

+191
-195
lines changed

Manifest.toml

Lines changed: 57 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,23 @@
11
# This file is machine-generated - editing it directly is not advised
22

3-
julia_version = "1.11.0"
3+
julia_version = "1.11.4"
44
manifest_format = "2.0"
5-
project_hash = "a73a8d7764dc5026b1a2046f8ed34a77d5030cd7"
5+
project_hash = "e6539aca5cbaeb4dfe24d3f271a1eaf6e3cb52c3"
66

77
[[deps.Adapt]]
88
deps = ["LinearAlgebra", "Requires"]
9-
git-tree-sha1 = "6a55b747d1812e699320963ffde36f1ebdda4099"
9+
git-tree-sha1 = "cd8b948862abee8f3d3e9b73a102a9ca924debb0"
1010
uuid = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"
11-
version = "4.0.4"
12-
weakdeps = ["StaticArrays"]
11+
version = "4.2.0"
1312

1413
[deps.Adapt.extensions]
14+
AdaptSparseArraysExt = "SparseArrays"
1515
AdaptStaticArraysExt = "StaticArrays"
1616

17+
[deps.Adapt.weakdeps]
18+
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
19+
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
20+
1721
[[deps.ArgTools]]
1822
uuid = "0dad84c5-d112-42e6-8d28-ef12dabb789f"
1923
version = "1.1.2"
@@ -24,19 +28,26 @@ version = "1.11.0"
2428

2529
[[deps.Atomix]]
2630
deps = ["UnsafeAtomics"]
27-
git-tree-sha1 = "c06a868224ecba914baa6942988e2f2aade419be"
31+
git-tree-sha1 = "b5bb4dc6248fde467be2a863eb8452993e74d402"
2832
uuid = "a9b6321e-bd34-4604-b9c9-b65b8de01458"
29-
version = "0.1.0"
33+
version = "1.1.1"
34+
35+
[deps.Atomix.extensions]
36+
AtomixCUDAExt = "CUDA"
37+
AtomixMetalExt = "Metal"
38+
AtomixOpenCLExt = "OpenCL"
39+
AtomixoneAPIExt = "oneAPI"
40+
41+
[deps.Atomix.weakdeps]
42+
CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba"
43+
Metal = "dde4c033-4e86-420c-a63e-0dd931031962"
44+
OpenCL = "08131aa3-fb12-5dee-8b74-c09406e224a2"
45+
oneAPI = "8f75cd03-7ff8-4ecb-9b8f-daf728133b1b"
3046

3147
[[deps.Base64]]
3248
uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"
3349
version = "1.11.0"
3450

35-
[[deps.CEnum]]
36-
git-tree-sha1 = "389ad5c84de1ae7cf0e28e381131c98ea87d54fc"
37-
uuid = "fa961155-64e5-5f13-b03f-caf6b980ea82"
38-
version = "0.5.0"
39-
4051
[[deps.CompilerSupportLibraries_jll]]
4152
deps = ["Artifacts", "Libdl"]
4253
uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae"
@@ -79,9 +90,15 @@ version = "1.6.0"
7990

8091
[[deps.FileIO]]
8192
deps = ["Pkg", "Requires", "UUIDs"]
82-
git-tree-sha1 = "82d8afa92ecf4b52d78d869f038ebfb881267322"
93+
git-tree-sha1 = "b66970a70db13f45b7e57fbda1736e1cf72174ea"
8394
uuid = "5789e2e9-d7fb-5bc7-8068-2c6fae9b9549"
84-
version = "1.16.3"
95+
version = "1.17.0"
96+
97+
[deps.FileIO.extensions]
98+
HTTPExt = "HTTP"
99+
100+
[deps.FileIO.weakdeps]
101+
HTTP = "cd3eb016-35fb-5094-929b-558a96fad6f3"
85102

86103
[[deps.FileWatching]]
87104
uuid = "7b1f6079-737a-58dc-b8bc-7a2ca5c1b5ee"
@@ -99,21 +116,15 @@ version = "1.0.0"
99116

100117
[[deps.JLD2]]
101118
deps = ["FileIO", "MacroTools", "Mmap", "OrderedCollections", "PrecompileTools", "Requires", "TranscodingStreams"]
102-
git-tree-sha1 = "aeab5c68eb2cf326619bf71235d8f4561c62fe22"
119+
git-tree-sha1 = "91d501cb908df6f134352ad73cde5efc50138279"
103120
uuid = "033835bb-8acc-5ee8-8aae-3f567f8a3819"
104-
version = "0.5.5"
105-
106-
[[deps.JLLWrappers]]
107-
deps = ["Artifacts", "Preferences"]
108-
git-tree-sha1 = "f389674c99bfcde17dc57454011aa44d5a260a40"
109-
uuid = "692b3bcd-3c85-4b1f-b108-f13ce0eb3210"
110-
version = "1.6.0"
121+
version = "0.5.11"
111122

112123
[[deps.KernelAbstractions]]
113-
deps = ["Adapt", "Atomix", "InteractiveUtils", "MacroTools", "PrecompileTools", "Requires", "StaticArrays", "UUIDs", "UnsafeAtomics", "UnsafeAtomicsLLVM"]
114-
git-tree-sha1 = "04e52f596d0871fa3890170fa79cb15e481e4cd8"
124+
deps = ["Adapt", "Atomix", "InteractiveUtils", "MacroTools", "PrecompileTools", "Requires", "StaticArrays", "UUIDs"]
125+
git-tree-sha1 = "80d268b2f4e396edc5ea004d1e0f569231c71e9e"
115126
uuid = "63c18a36-062a-441e-b654-da1e3ab1ce7c"
116-
version = "0.9.28"
127+
version = "0.9.34"
117128

118129
[deps.KernelAbstractions.extensions]
119130
EnzymeExt = "EnzymeCore"
@@ -125,29 +136,6 @@ version = "0.9.28"
125136
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
126137
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
127138

128-
[[deps.LLVM]]
129-
deps = ["CEnum", "LLVMExtra_jll", "Libdl", "Preferences", "Printf", "Requires", "Unicode"]
130-
git-tree-sha1 = "4ad43cb0a4bb5e5b1506e1d1f48646d7e0c80363"
131-
uuid = "929cbde3-209d-540e-8aea-75f648917ca0"
132-
version = "9.1.2"
133-
134-
[deps.LLVM.extensions]
135-
BFloat16sExt = "BFloat16s"
136-
137-
[deps.LLVM.weakdeps]
138-
BFloat16s = "ab4f0b2a-ad5b-11e8-123f-65d77653426b"
139-
140-
[[deps.LLVMExtra_jll]]
141-
deps = ["Artifacts", "JLLWrappers", "LazyArtifacts", "Libdl", "TOML"]
142-
git-tree-sha1 = "05a8bd5a42309a9ec82f700876903abce1017dd3"
143-
uuid = "dad2f222-ce93-54a1-a47d-0025e8a3acab"
144-
version = "0.0.34+0"
145-
146-
[[deps.LazyArtifacts]]
147-
deps = ["Artifacts", "Pkg"]
148-
uuid = "4af54fe1-eca0-43a8-85a7-787d91b784e3"
149-
version = "1.11.0"
150-
151139
[[deps.LibCURL]]
152140
deps = ["LibCURL_jll", "MozillaCACerts_jll"]
153141
uuid = "b27032c2-a3e7-50c8-80cd-2d36dbcbfd21"
@@ -187,10 +175,9 @@ uuid = "56ddb016-857b-54e1-b83d-db4d58db5568"
187175
version = "1.11.0"
188176

189177
[[deps.MacroTools]]
190-
deps = ["Markdown", "Random"]
191-
git-tree-sha1 = "2fa9ee3e63fd3a4f7a9a4f4744a52f4856de82df"
178+
git-tree-sha1 = "72aebe0b5051e5143a079a4685a46da330a40472"
192179
uuid = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09"
193-
version = "0.5.13"
180+
version = "0.5.15"
194181

195182
[[deps.Markdown]]
196183
deps = ["Base64"]
@@ -220,9 +207,9 @@ uuid = "4536629a-c528-5b80-bd46-f80d51c5b363"
220207
version = "0.3.27+1"
221208

222209
[[deps.OrderedCollections]]
223-
git-tree-sha1 = "dfdf5519f235516220579f949664f1bf44e741c5"
210+
git-tree-sha1 = "cc4054e898b852042d7b503313f7ad03de99c3dd"
224211
uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d"
225-
version = "1.6.3"
212+
version = "1.8.0"
226213

227214
[[deps.Pkg]]
228215
deps = ["Artifacts", "Dates", "Downloads", "FileWatching", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "Random", "SHA", "TOML", "Tar", "UUIDs", "p7zip_jll"]
@@ -259,9 +246,9 @@ version = "1.11.0"
259246

260247
[[deps.Requires]]
261248
deps = ["UUIDs"]
262-
git-tree-sha1 = "838a3a4188e2ded87a4f9f184b4b0d78a1e91cb7"
249+
git-tree-sha1 = "62389eeff14780bfe55195b7204c0d8738436d64"
263250
uuid = "ae029012-a4dd-5104-9daa-d747884805df"
264-
version = "1.3.0"
251+
version = "1.3.1"
265252

266253
[[deps.SHA]]
267254
uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce"
@@ -273,9 +260,9 @@ version = "1.11.0"
273260

274261
[[deps.StaticArrays]]
275262
deps = ["LinearAlgebra", "PrecompileTools", "Random", "StaticArraysCore"]
276-
git-tree-sha1 = "eeafab08ae20c62c44c8399ccb9354a04b80db50"
263+
git-tree-sha1 = "0feb6b9031bd5c51f9072393eb5ab3efd31bf9e4"
277264
uuid = "90137ffa-7385-5640-81b9-e52037218182"
278-
version = "1.9.7"
265+
version = "1.9.13"
279266

280267
[deps.StaticArrays.extensions]
281268
StaticArraysChainRulesCoreExt = "ChainRulesCore"
@@ -304,19 +291,22 @@ version = "1.11.1"
304291

305292
[[deps.StructArrays]]
306293
deps = ["ConstructionBase", "DataAPI", "Tables"]
307-
git-tree-sha1 = "f4dc295e983502292c4c3f951dbb4e985e35b3be"
294+
git-tree-sha1 = "5a3a31c41e15a1e042d60f2f4942adccba05d3c9"
308295
uuid = "09ab397b-f2b6-538f-b94a-2f83cf4a842a"
309-
version = "0.6.18"
296+
version = "0.7.0"
310297

311298
[deps.StructArrays.extensions]
312299
StructArraysAdaptExt = "Adapt"
313-
StructArraysGPUArraysCoreExt = "GPUArraysCore"
300+
StructArraysGPUArraysCoreExt = ["GPUArraysCore", "KernelAbstractions"]
301+
StructArraysLinearAlgebraExt = "LinearAlgebra"
314302
StructArraysSparseArraysExt = "SparseArrays"
315303
StructArraysStaticArraysExt = "StaticArrays"
316304

317305
[deps.StructArrays.weakdeps]
318306
Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"
319307
GPUArraysCore = "46192b85-c4d5-4398-a991-12ede77f4527"
308+
KernelAbstractions = "63c18a36-062a-441e-b654-da1e3ab1ce7c"
309+
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
320310
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
321311
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
322312

@@ -357,15 +347,15 @@ uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5"
357347
version = "1.11.0"
358348

359349
[[deps.UnsafeAtomics]]
360-
git-tree-sha1 = "6331ac3440856ea1988316b46045303bef658278"
350+
git-tree-sha1 = "b13c4edda90890e5b04ba24e20a310fbe6f249ff"
361351
uuid = "013be700-e6cd-48c3-b4a1-df204f14c38f"
362-
version = "0.2.1"
352+
version = "0.3.0"
353+
354+
[deps.UnsafeAtomics.extensions]
355+
UnsafeAtomicsLLVM = ["LLVM"]
363356

364-
[[deps.UnsafeAtomicsLLVM]]
365-
deps = ["LLVM", "UnsafeAtomics"]
366-
git-tree-sha1 = "2d17fabcd17e67d7625ce9c531fb9f40b7c42ce4"
367-
uuid = "d80eeb9a-aca5-4d75-85e5-170c8b632249"
368-
version = "0.2.1"
357+
[deps.UnsafeAtomics.weakdeps]
358+
LLVM = "929cbde3-209d-540e-8aea-75f648917ca0"
369359

370360
[[deps.Zlib_jll]]
371361
deps = ["Libdl"]

Project.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "PlanktonIndividuals"
22
uuid = "dfeb4ede-c75e-11e9-050d-41ab7a730e9e"
33
authors = ["zhenwu0728 <zhenwu@mit.edu>", "gaelforget <gforget@mit.edu>"]
4-
version = "0.7.3"
4+
version = "0.7.4"
55

66
[deps]
77
Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"
@@ -31,9 +31,9 @@ Metal = "^1"
3131
GPUArrays = "^10,11"
3232
JLD2 = "^0.5"
3333
KernelAbstractions = "^0.9"
34-
StructArrays = "^0.6"
34+
StructArrays = "^0.7"
3535
Statistics = "^1"
36-
julia = "^1.7"
36+
julia = "^1.10"
3737

3838
[extras]
3939
BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf"

src/Diagnostics/diagnostics_kernels.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ function diags_spcs!(diags_sp, plank, ac, x, y, z, mode::AbstractMode, arch::Arc
2020
elseif isa(mode, MacroMolecularMode)
2121
diags = (:PS, :VDOC, :VHN4, :VNO3, :VPO4, :S_PRO, :S_DNA, :S_RNA, :resp, :ρChl, :CH, :NST, :PST, :PRO, :DNA, :RNA, :Chl)
2222
elseif isa(mode, IronEnergyMode)
23-
diags = (:PS, :CF, :ECF, :RS, :ERS, :NR, :ENR, :NF, :ENF, :BS, :VNH4, :VNO3, :VPO4, :VFe, :PS2ST, :ST2PS, :NR2ST, :ST2NR, :NF2ST, :ST2NF, :Bm, :En, :CH, :qNO3, :qNH4, :qP, :qFe, :qFePS, :qFeNR, :qFeNF, :Chl)
23+
diags = (:PS, :CF, :ECF, :RS, :ERS, :NR, :ENR, :NF, :ENF, :BS, :VNH4, :VNO3, :VPO4, :VFe, :PS2ST, :ST2PS, :NR2ST, :ST2NR, :NF2ST, :ST2NF, :Bm, :En, :CH, :qNO3, :qNH4, :qP, :qFe, :qFePS, :qFeNR, :qFeNF, :Chl, :tdark)
2424
end
2525

2626
for diag in keys(diags_sp)

src/Diagnostics/diagnostics_struct.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ function plank_avail_diags(mode::AbstractMode)
110110
elseif isa(mode, MacroMolecularMode)
111111
plank_avail = (:num, :graz, :mort, :dvid, :PS, :VDOC, :VNH4, :VNO3, :VPO4, :resp, :ρChl, :S_PRO, :S_DNA, :S_RNA, :exu, :CH, :NST, :PST, :PRO, :DNA, :RNA, :Chl)
112112
elseif isa(mode, IronEnergyMode)
113-
plank_avail = (:num, :graz, :mort, :dvid, :PS, :CF, :ECF, :RS, :ERS, :NR, :ENR, :NF, :ENF, :BS, :VNH4, :VNO3, :VPO4, :VFe, :PS2ST, :ST2PS, :NR2ST, :ST2NR, :NF2ST, :ST2NF, :Bm, :En, :CH, :qNO3, :qNH4, :qP, :qFe, :qFePS, :qFeNR, :qFeNF, :Chl)
113+
plank_avail = (:num, :graz, :mort, :dvid, :PS, :CF, :ECF, :RS, :ERS, :NR, :ENR, :NF, :ENF, :BS, :VNH4, :VNO3, :VPO4, :VFe, :PS2ST, :ST2PS, :NR2ST, :ST2NR, :NF2ST, :ST2NF, :Bm, :En, :CH, :qNO3, :qNH4, :qP, :qFe, :qFePS, :qFeNR, :qFeNF, :Chl, :tdark)
114114
end
115115
return plank_avail
116116
end

src/Fields/apply_bcs.jl

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
##### apply flux boundary conditions to tracer tendency `Gc`
33
#####
44

5-
# a positive west flux is associated with an *increase* in `Gc` near the west boundary.
6-
# same for south and bottom.
5+
# positive west/south/bottom bc values are associated with an *increase* in `Gc` near the boundary.
76
@kernel function apply_west_bcs_kernel!(Gc, grid, west_bc, iter, ΔT)
87
j, k = @index(Global, NTuple)
98
jj = j + grid.Hy
@@ -25,8 +24,7 @@ end
2524
@inbounds Gc[ii, jj, grid.Nz+grid.Hz] += getbc(bottom_bc, i, j, iter) * ΔT * Az(ii, jj, grid.Nz+grid.Hz, grid) / volume(ii, jj, grid.Nz+grid.Hz, grid)
2625
end
2726

28-
# a positive east flux is associated with an *decrease* in `Gc` near the east boundary.
29-
# same for north and top.
27+
# positive east/north/top bc values are associated with a *decrease* in `Gc` near the boundary.
3028
@kernel function apply_east_bcs_kernel!(Gc, grid, east_bc, iter, ΔT)
3129
j, k = @index(Global, NTuple)
3230
jj = j + grid.Hy

src/Fields/boundary_conditions.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,14 +57,14 @@ function validate_bc(bc, bc_size, nΔT)
5757
if size(bc) == bc_size
5858
return nothing
5959
else
60-
throw(ArgumentError("BC west: grid mismatch, size(bc) must equal to $(bc_size) for a constant flux boundary condition."))
60+
throw(ArgumentError("BC: grid mismatch, size(bc) must equal to $(bc_size) for a constant flux boundary condition."))
6161
end
6262
end
6363
if typeof(bc) <: AbstractArray{eltype(bc),3}
6464
if size(bc) == (bc_size..., nΔT)
6565
return nothing
6666
else
67-
throw(ArgumentError("BC west: grid mismatch, size(bc) must equal to $((bc_size..., nΔT)) for a time-dependent flux boundary condition."))
67+
throw(ArgumentError("BC: grid mismatch, size(bc) must equal to $((bc_size..., nΔT)) for a time-dependent flux boundary condition."))
6868
end
6969
end
7070
end

src/Parameters/param_default.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ Generate default phytoplankton parameter values based on `AbstractMode` and spec
148148
"""
149149
function phyt_params_default(N::Int64, mode::IronEnergyMode)
150150
params=Dict(
151-
"Nsuper" => [1], # Number of phyto cells each super individual represents
151+
"Nsuper" => [1], # Number of phyto cells each super individual represents (cells)
152152
"Cquota" => [1.8e-11], # C quota of phyto cells at size = 1.0 (mmolC/cell)
153153
"SA" => [0.18], # Surface area (μm²) Prochlorococcus
154154
"mean" => [1.2], # Mean of the normal distribution of initial phyto individuals
@@ -187,7 +187,7 @@ function phyt_params_default(N::Int64, mode::IronEnergyMode)
187187
"KsatNH4" => [0.005], # Half-saturation coeff (mmolN/m³)
188188
"KsatNO3" => [0.010], # Half-saturation coeff (mmolN/m³)
189189
"KsatPO4" => [0.003], # Half-saturation coeff (mmolP/m³)
190-
"KSAFe" => [1.16e-17],# Surface-area specific iron uptake rate (m³/μm²/second)
190+
"KSAFe" => [2.77e-19],# Surface-area specific iron uptake rate (m³/μm²/cell/second)
191191
"qNO3max" => [0.25], # Maximum NO3 quota in cell (mmolN/mmolC)
192192
"qNH4max" => [0.25], # Maximum NH4 quota in cell (mmolN/mmolC)
193193
"qPmax" => [0.02], # Maximum P quota in cell (mmolP/mmolC)

src/Plankton/CarbonMode/growth_kernels.jl

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
##### temperature function for photosynthesis
2-
@inline function tempFunc_PS(temp, p)
3-
x = temp - p.Topt; xmax = p.Tmax - p.Topt
2+
@inline function tempFunc_PS(T, p)
3+
x = T - p.Topt; xmax = p.Tmax - p.Topt
44
regT = shape_func_dec(x, xmax, 1.0f-1)
5-
k = exp(-p.Ea/(8.3145f0*(temp+273.15f0))) * regT
5+
k = exp(-p.Ea/(8.3145f0*(T+273.15f0))) * regT
66
k = max(0.0f0, k)
77
OGT_rate = exp(-p.Ea/(8.3145f0*(p.Topt+273.15f0)))
88
return min(1.0f0, k/OGT_rate)
99
end
1010

1111
##### temperature function for metabolic rates
12-
@inline function tempFunc(temp, p)
13-
k = exp(-p.Ea/(8.3145f0*(temp+273.15f0)))
12+
@inline function tempFunc(T, p)
13+
k = exp(-p.Ea/(8.3145f0*(T+273.15f0)))
1414
k = max(0.0f0, k)
1515
OGT_rate = exp(-p.Ea/(8.3145f0*(p.Topt+273.15f0)))
1616
return min(1.0f0, k/OGT_rate)
@@ -20,19 +20,18 @@ end
2020
##### only functional when damaged biomass is greater than 0.0
2121
##### use Bd/Bm as the allocation, more damaged biomass means more allocation to repair
2222
@inline function gamma_alloc(Bm, Bd, p)
23-
#γ = max(0.0, temp - p.Topt) / (p.Tmax - p.Topt) * isless(0.0, Bd)
2423
γ = Bd / max(1.0f-30, Bm) * isless(0.0f0, Bd)
2524
γ = min(1.0f0, γ) * isequal(1.0f0, p.thermal)
2625
return γ
2726
end
2827

2928
##### calculate photosynthesis rate (mmolC/individual/second)
30-
@inline function calc_photosynthesis(par, temp, Chl, Bm, Bd, p)
29+
@inline function calc_photosynthesis(par, T, Chl, Bm, Bd, p)
3130
αI = par * p.α * p.Φ
3231
if p.thermal == 1.0f0
33-
PCm = p.PCmax * tempFunc(temp, p)
32+
PCm = p.PCmax * tempFunc(T, p)
3433
else
35-
PCm = p.PCmax * tempFunc_PS(temp, p)
34+
PCm = p.PCmax * tempFunc_PS(T, p)
3635
end
3736
PS = PCm * (1.0f0 - exp(-αI / max(1.0f-30, PCm) * Chl / max(1.0f-30, Bm))) * max(0.0f0, Bm - Bd)
3837
return PS

src/Plankton/IronEnergyMode/division_death.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ end
6464
@inbounds plank.dvid[idx[i]] = plank.dvid[i]
6565
@inbounds plank.graz[idx[i]] = plank.graz[i]
6666
@inbounds plank.mort[idx[i]] = plank.mort[i]
67+
@inbounds plank.tdark[idx[i]]= plank.tdark[i]
6768
end
6869
end
6970
function copy_daughter_individuals!(plank, con, idx::AbstractArray{Int,1}, arch)

0 commit comments

Comments
 (0)