You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Matt and I have discovered that my model runs have not been conserving mass. We were trying to track down some inconsistencies in the global Si budget, because POC has been nearly halved, but the global integral of SiO3 (and also PO4) plummets
We think these two loops in marbl_mod.F90 are at least partly responsible because they do not sum total production if marbl_tracer_indices%auto_inds(auto_ind)%CaCO3_ind and marbl_tracer_indices%auto_inds(auto_ind)%Si_ind are positive for multiple values of auto_ind:
do auto_ind = 1, auto_cnt
if (marbl_tracer_indices%auto_inds(auto_ind)%CaCO3_ind > 0) then
P_CaCO3%prod(k) = ((c1 - f_graze_CaCO3_remin) * auto_graze(auto_ind) + &
auto_loss(auto_ind) + auto_agg(auto_ind)) * QCaCO3(auto_ind)
P_CaCO3_ALT_CO2%prod(k) = P_CaCO3%prod(k)
endif
end do
...
do auto_ind = 1, auto_cnt
if (marbl_tracer_indices%auto_inds(auto_ind)%Si_ind > 0) then
P_SiO2%prod(k) = Qsi(auto_ind) * ((c1 - f_graze_si_remin) * auto_graze(auto_ind) + auto_agg(auto_ind) &
+ autotrophs(auto_ind)%loss_poc * auto_loss(auto_ind))
endif
end do
@jessluo is currently testing to see if fixing these loops to sum over non-zero indices fixes the problem or if there are other places in the code where this might also arise. The proposed fix is
P_CaCO3%prod(k) = c0
do auto_ind = 1, auto_cnt
if (marbl_tracer_indices%auto_inds(auto_ind)%CaCO3_ind > 0) then
P_CaCO3%prod(k) = P_CaCO3%prod(k) + ((c1 - f_graze_CaCO3_remin) * auto_graze(auto_ind) + &
auto_loss(auto_ind) + auto_agg(auto_ind)) * QCaCO3(auto_ind)
endif
end do
P_CaCO3_ALT_CO2%prod(k) = P_CaCO3%prod(k)
...
P_SiO2%prod(k) = c0
do auto_ind = 1, auto_cnt
if (marbl_tracer_indices%auto_inds(auto_ind)%Si_ind > 0) then
P_SiO2%prod(k) = P_SiO2%prod(k) + Qsi(auto_ind) * ((c1 - f_graze_si_remin) * auto_graze(auto_ind) + auto_agg(auto_ind) &
+ autotrophs(auto_ind)%loss_poc * auto_loss(auto_ind))
endif
end do
The text was updated successfully, but these errors were encountered:
@jessluo made the following comment on slack
We think these two loops in
marbl_mod.F90
are at least partly responsible because they do not sum total production ifmarbl_tracer_indices%auto_inds(auto_ind)%CaCO3_ind
andmarbl_tracer_indices%auto_inds(auto_ind)%Si_ind
are positive for multiple values ofauto_ind
:@jessluo is currently testing to see if fixing these loops to sum over non-zero indices fixes the problem or if there are other places in the code where this might also arise. The proposed fix is
The text was updated successfully, but these errors were encountered: