Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Global budget inconsistencies when running with multiple silicifiers / calcifiers #224

Closed
mnlevy1981 opened this issue Jan 25, 2018 · 0 comments
Labels
Milestone

Comments

@mnlevy1981
Copy link
Collaborator

@jessluo made the following comment on slack

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant