Skip to content

Commit

Permalink
Merge remote-tracking branch 'klindsay/enhancement/calcToFloor_diag'
Browse files Browse the repository at this point in the history
  • Loading branch information
mnlevy1981 committed May 8, 2018
2 parents 4f251b4 + f56efc1 commit e0d512d
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
7 changes: 7 additions & 0 deletions autogenerated_src/default_diagnostics.json
Original file line number Diff line number Diff line change
Expand Up @@ -1763,6 +1763,13 @@
"units": "nmol/cm^2/s",
"vertical_grid": "none"
},
"calcToFloor": {
"frequency": "never",
"longname": "CaCO3 Flux Hitting Sea Floor",
"operator": "average",
"units": "nmol/cm^2/s",
"vertical_grid": "none"
},
"calcToSed": {
"frequency": "medium",
"longname": "CaCO3 Flux to Sediments",
Expand Down
6 changes: 6 additions & 0 deletions src/default_diagnostics.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -442,6 +442,12 @@ Jint_Fetot :
operator : average

# Particulate 2D diags
calcToFloor :
longname : CaCO3 Flux Hitting Sea Floor
units : nmol/cm^2/s
vertical_grid : none
frequency : never
operator : average
calcToSed :
longname : CaCO3 Flux to Sediments
units : nmol/cm^2/s
Expand Down
14 changes: 14 additions & 0 deletions src/marbl_diagnostics_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ module marbl_diagnostics_mod
integer(int_kind) :: Jint_Fetot

! Particulate 2D diags
integer(int_kind) :: calcToFloor
integer(int_kind) :: calcToSed
integer(int_kind) :: calcToSed_ALT_CO2
integer(int_kind) :: pocToSed
Expand Down Expand Up @@ -1208,6 +1209,18 @@ subroutine marbl_diagnostics_init( &
end if

! Particulate 2D diags
lname = 'CaCO3 Flux Hitting Sea Floor'
sname = 'calcToFloor'
units = 'nmol/cm^2/s'
vgrid = 'none'
truncate = .false.
call diags%add_diagnostic(lname, sname, units, vgrid, truncate, &
ind%calcToFloor, marbl_status_log)
if (marbl_status_log%labort_marbl) then
call log_add_diagnostics_error(marbl_status_log, sname, subname)
return
end if

lname = 'CaCO3 Flux to Sediments'
sname = 'calcToSed'
units = 'nmol/cm^2/s'
Expand Down Expand Up @@ -4764,6 +4777,7 @@ subroutine store_diagnostics_particulates(marbl_domain, &
diags(ind%P_iron_PROD)%field_3d(:, 1) = P_iron%prod
diags(ind%P_iron_REMIN)%field_3d(:, 1) = P_iron%remin

diags(ind%calcToFloor)%field_2d(1) = P_CaCO3%to_floor
diags(ind%calcToSed)%field_2d(1) = sum(P_CaCO3%sed_loss)
diags(ind%calcToSed_ALT_CO2)%field_2d(1) = sum(P_CaCO3_ALT_CO2%sed_loss)
diags(ind%bsiToSed)%field_2d(1) = sum(P_SiO2%sed_loss)
Expand Down

0 comments on commit e0d512d

Please sign in to comment.