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

Improve diagnostics #403

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions .github/workflows/run_test_suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ jobs:
sudo apt-get update
sudo apt install make gfortran netcdf-bin libnetcdf-dev libnetcdff-dev openmpi-bin libopenmpi-dev
- name: Build docs
continue-on-error: true
run: |
cd docs/src
make html
Expand Down
2 changes: 1 addition & 1 deletion defaults/diagnostics_latest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ pocToFloor :
longname : POC Flux Hitting Sea Floor
units : nmol/cm^2/s
vertical_grid : none
frequency : never
frequency : medium
operator : average
pocToSed :
longname : POC Flux to Sediments
Expand Down
2 changes: 1 addition & 1 deletion defaults/json/diagnostics_latest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2244,7 +2244,7 @@
"vertical_grid": "layer_avg"
},
"pocToFloor": {
"frequency": "never",
"frequency": "medium",
"longname": "POC Flux Hitting Sea Floor",
"operator": "average",
"units": "nmol/cm^2/s",
Expand Down
2 changes: 2 additions & 0 deletions docs/py_requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@ pylint==2.10.2
Sphinx==1.7.5
sphinxcontrib-bibtex==0.4.0
pybtex==0.22
jinja2<3
MarkupSafe<2.1
git+https://github.com/marbl-ecosys/sphinx_rtd_theme.git@version-dropdown
9 changes: 7 additions & 2 deletions src/marbl_diagnostics_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -3473,7 +3473,7 @@ subroutine store_diagnostics_autotrophs(marbl_domain, &
!-----------------------------------------------------------------------
integer(int_kind) :: n, m
real(r8) :: autotrophC_weight(marbl_domain%km)
real(r8) :: autotrophC_zint_100m
real(r8) :: autotrophC_zint_100m, photoC_NO3_zint_100m
real(r8) :: limterm(marbl_domain%km)
!-----------------------------------------------------------------------

Expand All @@ -3495,6 +3495,7 @@ subroutine store_diagnostics_autotrophs(marbl_domain, &
diags(ind%photoC_TOT_zint)%field_2d(1) = c0
diags(ind%photoC_TOT_zint_100m)%field_2d(1) = c0
diags(ind%photoC_NO3_TOT_zint)%field_2d(1) = c0
diags(ind%photoC_NO3_TOT_zint_100m)%field_2d(1) = c0

do n = 1, autotroph_cnt
! compute biomass weighted average of limitation terms over 0..100m
Expand Down Expand Up @@ -3628,11 +3629,15 @@ subroutine store_diagnostics_autotrophs(marbl_domain, &
diags(ind%photoC_zint_100m(n))%field_2d(1)

call marbl_diagnostics_share_compute_vertical_integrals(diags(ind%photoC_NO3(n))%field_3d(:, 1), &
delta_z, kmt, full_depth_integral=diags(ind%photoC_NO3_zint(n))%field_2d(1))
delta_z, kmt, full_depth_integral=diags(ind%photoC_NO3_zint(n))%field_2d(1), &
near_surface_integral=photoC_NO3_zint_100m)

diags(ind%photoC_NO3_TOT_zint)%field_2d(1) = diags(ind%photoC_NO3_TOT_zint)%field_2d(1) + &
diags(ind%photoC_NO3_zint(n))%field_2d(1)

diags(ind%photoC_NO3_TOT_zint_100m)%field_2d(1) = diags(ind%photoC_NO3_TOT_zint_100m)%field_2d(1) + &
photoC_NO3_zint_100m

call marbl_diagnostics_share_compute_vertical_integrals(diags(ind%auto_graze(n))%field_3d(:, 1), &
delta_z, kmt, full_depth_integral=diags(ind%auto_graze_zint(n))%field_2d(1), &
near_surface_integral=diags(ind%auto_graze_zint_100m(n))%field_2d(1))
Expand Down
Binary file modified tests/input_files/baselines/call_compute_subroutines.history.nc
Binary file not shown.