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

migrate k loop inside of subroutines called from marbl_set_interior_forcing #53

Open
klindsay28 opened this issue Apr 28, 2016 · 2 comments

Comments

@klindsay28
Copy link
Collaborator

No description provided.

@mnlevy1981
Copy link
Collaborator

If this can be done in a bit-for-bit manner, it should be done before CESM 2.1 (in conjunction with #106).

Also, we should refactor several datatypes to be column-oriented (autotroph_secondary_species comes to mind). See also #237

@mnlevy1981
Copy link
Collaborator

As of marbl0.33.0, this has been done except for the following loop that remains in interior_tendency_compute():

    do k = 1, km

       call compute_scavenging(k, km, marbl_tracer_indices, tracer_local(:,:), &
            POC, P_CaCO3, P_SiO2, dust, Fefree(:), Fe_scavenge_rate(:), &
            Fe_scavenge(:), Lig_scavenge(:), marbl_status_log)

       if (marbl_status_log%labort_marbl) then
          call marbl_status_log%log_error_trace('compute_scavenging()', subname)
          return
       end if

       call compute_large_detritus_prod(k, domain, marbl_tracer_indices, zooplankton_derived_terms, &
            autotroph_derived_terms, Fe_scavenge(k),                    &
            POC, POP, P_CaCO3, P_CaCO3_ALT_CO2, P_SiO2, dust, P_iron,   &
            dissolved_organic_matter%DOP_loss_P_bal(k), marbl_status_log)

       ! FIXME #28: need to pull particulate share out
       !            of compute_particulate_terms!
       call compute_particulate_terms(k, domain,                   &
            marbl_particulate_share, p_remin_scalef(k),            &
            POC, POP, P_CaCO3, P_CaCO3_ALT_CO2,                    &
            P_SiO2, dust, P_iron, PON_remin(k), PON_sed_loss(k),   &
            QA_dust_def(k),                                        &
            tracer_local(:, k), carbonate, sed_denitrif(k),        &
            other_remin(k), fesedflux(k), marbl_tracer_indices,    &
            glo_avg_fields_interior_tendency, marbl_status_log)

       if (marbl_status_log%labort_marbl) then
          call marbl_status_log%log_error_trace('compute_particulate_terms()', subname)
          return
       end if

       if  (k < km) then
          call update_particulate_terms_from_prior_level(k+1, POC, POP, P_CaCO3, &
               P_CaCO3_ALT_CO2, P_SiO2, dust, P_iron, QA_dust_def(:))
       endif

    end do ! k

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants