Open glwagner opened 4 days ago
I suspect there will be people cropping up (👀 @ali-ramadhan) want to use Float32. This will thwart them:
Float32
https://github.com/OceanBioME/OceanBioME.jl/blob/3c287d625aa7135c8297fa36b94347979344c235/src/Models/AdvectedPopulations/NPZD.jl#L320
All that's needed is
@inline redfield(::Union{Val{:P}, Val{:Z}, Val{:D}}, bgc::NPZD{FT}) where FT = convert(FT, 6.56)
The key is to never write decimals in source code without convert.
convert
Thanks for the tip @glwagner!
I suspect there will be people cropping up (👀 @ali-ramadhan) want to use
Float32
. This will thwart them:https://github.com/OceanBioME/OceanBioME.jl/blob/3c287d625aa7135c8297fa36b94347979344c235/src/Models/AdvectedPopulations/NPZD.jl#L320
All that's needed is
The key is to never write decimals in source code without
convert
.