marbl-ecosys / MARBL

Marine Biogeochemistry Library
https://marbl-ecosys.github.io
Other
13 stars 21 forks source link

auto to poc by grazing diagnostics not computed #443

Open geeseproblems opened 10 months ago

geeseproblems commented 10 months ago

graze_sp_poc_zint_100m and the equivalent variables for other PFTs are all zeros - it seems they are not being calculated in the diagnostics mod.

mnlevy1981 commented 10 months ago

What version of MARBL are you using? I can confirm that the latest commit on development has non-zero values for that field:

$ git checkout development
Switched to branch 'development'
Your branch is up to date with 'origin/development'.
$ cd tests/regression_tests/call_compute_subroutines/
$ ./call_compute_subroutines.py
[snip compilation details]
(run_exe): Running following command:
(run_exe): /Users/mlevy/NO_BACKUP/codes/MARBL/tests/driver_exe/marbl.exe -n test.nml -u cgs -s ../../input_files/settings/marbl_with_o2_consumption_scalef.settings
Beginning call_compute_subroutines test...
* MARBL output will be written to history_1inst.nc
Instance 1 has 5 columns, beginning with 1

-------------
Timer summary
-------------

There are 4 timers being returned
----
MARBL Init:       0.044 seconds
MARBL surface_flux_compute:       0.000 seconds
MARBL interior_tendency_compute:       0.001 seconds
MARBL carbonate chemistry:       0.000 seconds
$ ncdump -v graze_sp_poc_zint_100m history_1inst.nc | tail -n 3
 graze_sp_poc_zint_100m = 0.00987925742038663, 0.00301135262980637, 0,
    0.00232910295184793, 0.00583966155888692 ;
}
mnlevy1981 commented 10 months ago

On stable I made the following mods:

$ git diff .
diff --git a/src/marbl_interior_tendency_mod.F90 b/src/marbl_interior_tendency_mod.F90
index e6017ef..de36629 100644
--- a/src/marbl_interior_tendency_mod.F90
+++ b/src/marbl_interior_tendency_mod.F90
@@ -2978,6 +2978,25 @@ subroutine compute_particulate_terms(k, domain,                        &
         POC%remin(k) = c0
         POC%sflux_out(k) = c0
         POC%hflux_out(k) = c0
+        P_CaCO3%remin(k) = c0
+        P_CaCO3%sflux_out(k) = c0
+        P_CaCO3%hflux_out(k) = c0
+        P_CaCO3_ALT_CO2%remin(k) = c0
+        P_CaCO3_ALT_CO2%sflux_out(k) = c0
+        P_CaCO3_ALT_CO2%hflux_out(k) = c0
+        P_SiO2%remin(k) = c0
+        P_SiO2%sflux_out(k) = c0
+        P_SiO2%hflux_out(k) = c0
+        dust%remin(k) = c0
+        dust%sflux_out(k) = c0
+        dust%hflux_out(k) = c0
+        P_iron%remin(k) = c0
+        P_iron%sflux_out(k) = c0
+        P_iron%hflux_out(k) = c0
+        POP%remin(k) = c0
+        POP%sflux_out(k) = c0
+        POP%hflux_out(k) = c0
+        PON_remin = c0

      endif

because our compilers are uninitialized memory that used to slip by (this was fixed on development via #372) and I'm still seeing non-zero graze_sp_poc_zint_100m:

$ ncdump -v graze_sp_poc_zint_100m history_1inst.nc | tail -n 3
 graze_sp_poc_zint_100m = 0.00987925742038663, 0.00301135262980637, 0,
    0.00232910295184793, 0.00583966155888692 ;
}