Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions unchanged/marbl_interior_tendency_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ subroutine marbl_interior_tendency_compute( &
real (r8) :: Lig_deg(domain%km) ! loss of Fe-binding Ligand from bacterial degradation
real (r8) :: Lig_loss(domain%km) ! loss of Fe-binding Ligand
real (r8) :: totalChl_local(domain%km) ! local value of totalChl
real (r8) :: docfluidy(domain%km) ! local value of docfluidy

! NOTE(bja, 2015-07) vectorization: arrays that are (n, k, c, i)
! probably can not be vectorized reasonably over c without memory
Expand Down Expand Up @@ -404,7 +405,7 @@ subroutine marbl_interior_tendency_compute( &
tracer_local(:,:), &
o2_consumption_scalef(:), &
o2_production(:), o2_consumption(:), &
interior_tendencies(:,:))
interior_tendencies(:,:), docfluidy)

! Compute interior diagnostics
call marbl_diagnostics_interior_tendency_compute( &
Expand Down Expand Up @@ -2013,7 +2014,7 @@ end subroutine compute_routing
subroutine compute_dissolved_organic_matter (km, marbl_tracer_indices, &
PAR_nsubcols, PAR, &
zooplankton_derived_terms, autotroph_derived_terms, &
dz1, tracer_local, dissolved_organic_matter)
dz1, tracer_local, dissolved_organic_matter, docfluidy)

use marbl_settings_mod, only : Q
use marbl_settings_mod, only : DOC_reminR_light
Expand All @@ -2036,6 +2037,7 @@ subroutine compute_dissolved_organic_matter (km, marbl_tracer_indices, &
real(r8), intent(in) :: dz1
real(r8), intent(in) :: tracer_local(marbl_tracer_indices%total_cnt,km)
type(dissolved_organic_matter_type), intent(inout) :: dissolved_organic_matter
real(r8), intent(in) :: docfluidy(km)

!-----------------------------------------------------------------------
! local variables
Expand All @@ -2046,6 +2048,7 @@ subroutine compute_dissolved_organic_matter (km, marbl_tracer_indices, &
real(r8) :: DON_reminR ! remineralization rate (1/sec)
real(r8) :: DOP_reminR ! remineralization rate (1/sec)
real(r8) :: DOCr_reminR ! remineralization rate (1/sec)
real(r8) :: DOCr_sed_remin ! remineralization rate (1/sec)
real(r8) :: DONr_reminR ! remineralization rate (1/sec)
real(r8) :: DOPr_reminR ! remineralization rate (1/sec)
!-----------------------------------------------------------------------
Expand All @@ -2072,6 +2075,7 @@ subroutine compute_dissolved_organic_matter (km, marbl_tracer_indices, &
DOC_prod => dissolved_organic_matter%DOC_prod(:), & ! output production of DOC (mmol C/m^3/sec)
DOC_remin => dissolved_organic_matter%DOC_remin(:), & ! output remineralization of DOC (mmol C/m^3/sec)
DOCr_remin => dissolved_organic_matter%DOCr_remin(:), & ! output remineralization of DOCr
DOCr_sed_remin => dissolved_organic_matter%DOCr_sed_remin(:), & ! output remineralization of DOCr_vent
DON_prod => dissolved_organic_matter%DON_prod(:), & ! output production of DON
DON_remin => dissolved_organic_matter%DON_remin(:), & ! output remineralization of DON
DONr_remin => dissolved_organic_matter%DONr_remin(:), & ! output remineralization of DONr
Expand Down Expand Up @@ -2138,6 +2142,8 @@ subroutine compute_dissolved_organic_matter (km, marbl_tracer_indices, &
DOCr_remin(k) = DOCr_loc(k) * DOCr_reminR
DONr_remin(k) = DONr_loc(k) * DONr_reminR
DOPr_remin(k) = DOPr_loc(k) * DOPr_reminR
DOCr_sed_remin(k) = DOCr_loc(k) * docfluidy(k)


end do

Expand Down Expand Up @@ -3350,7 +3356,7 @@ subroutine compute_local_tendencies(km, marbl_tracer_indices, autotroph_derived_
zooplankton_derived_terms, dissolved_organic_matter, nitrif, denitrif, sed_denitrif, &
Fe_scavenge, Lig_prod, Lig_loss, P_iron_remin, POC_remin, POP_remin, P_SiO2_remin, &
P_CaCO3_remin, P_CaCO3_ALT_CO2_remin, other_remin, PON_remin, tracer_local, &
o2_consumption_scalef, o2_production, o2_consumption, interior_tendencies)
o2_consumption_scalef, o2_production, o2_consumption, interior_tendencies, docfluidy)

integer, intent(in) :: km
type(marbl_tracer_index_type), intent(in) :: marbl_tracer_indices
Expand All @@ -3376,6 +3382,7 @@ subroutine compute_local_tendencies(km, marbl_tracer_indices, autotroph_derived_
real(r8), intent(out) :: o2_production(km)
real(r8), intent(out) :: o2_consumption(km)
real(r8), intent(inout) :: interior_tendencies(marbl_tracer_indices%total_cnt, km)
real(r8), intent(in) :: docfluidy (km) !1/yr -> 1/s for fluid flux into hydrothermal crust

!-----------------------------------------------------------------------
! local variables
Expand Down Expand Up @@ -3423,6 +3430,7 @@ subroutine compute_local_tendencies(km, marbl_tracer_indices, autotroph_derived_
DOC_prod => dissolved_organic_matter%DOC_prod(:), & ! production of DOC (mmol C/m^3/sec)
DOC_remin => dissolved_organic_matter%DOC_remin(:), & ! remineralization of DOC (mmol C/m^3/sec)
DOCr_remin => dissolved_organic_matter%DOCr_remin(:), & ! remineralization of DOCr
DOCr_sed_remin => dissolved_organic_matter%DOCr_sed_remin(:), & ! remineralization of DOCr
DON_prod => dissolved_organic_matter%DON_prod(:), & ! production of DON
DON_remin => dissolved_organic_matter%DON_remin(:), & ! remineralization of DON
DONr_remin => dissolved_organic_matter%DONr_remin(:), & ! remineralization of DONr
Expand Down Expand Up @@ -3565,7 +3573,7 @@ subroutine compute_local_tendencies(km, marbl_tracer_indices, autotroph_derived_

interior_tendencies(doc_ind,k) = DOC_prod(k) * (c1 - DOCprod_refract) - DOC_remin(k)

interior_tendencies(docr_ind,k) = DOC_prod(k) * DOCprod_refract - DOCr_remin(k) + (POC_remin(k) * POCremin_refract)
interior_tendencies(docr_ind,k) = DOC_prod(k) * DOCprod_refract - DOCr_remin(k) + (POC_remin(k) * POCremin_refract) - DOCr_sed_remin(k)

interior_tendencies(don_ind,k) = (DON_prod(k) * (c1 - DONprod_refract)) - DON_remin(k)

Expand Down