marbl-ecosys / MARBL

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

some grazing diagnostics should be per-zooplankton but are effectively zootot #407

Closed mnlevy1981 closed 1 year ago

mnlevy1981 commented 2 years ago
graze_((autotroph_sname))_zoo_zint :
   longname : ((autotroph_lname)) Grazing to ZOO Vertical Integral
   units : mmol/m^3 cm/s
   vertical_grid : none
   frequency : never
   operator : average
graze_((autotroph_sname))_zoo_zint_100m :
   longname : ((autotroph_lname)) Grazing to ZOO Vertical Integral, 0-100m
   units : mmol/m^3 cm/s
   vertical_grid : none
   frequency : medium
   operator : average

and

graze_((zooplankton_sname))_zoo_zint :
   longname : ((zooplankton_lname)) Grazing to ZOO Vertical Integral
   units : mmol/m^3 cm/s
   vertical_grid : none
   frequency : never
   operator : average
graze_((zooplankton_sname))_zoo_zint_100m :
   longname : ((zooplankton_lname)) Grazing to ZOO Vertical Integral, 0-100m
   units : mmol/m^3 cm/s
   vertical_grid : none
   frequency : never
   operator : average

effectively define vertical integrals of grazing of zootot, but @kristenkrumhardt has mentioned that for the 4p2z configuration (and other runs with multiple zooplankton), breaking down this grazing by zooplankton would be a more useful diagnostic. This will require a small change to the YAML and a bigger change in the fortran code, because

       call marbl_diagnostics_share_compute_vertical_integrals(diags(ind%auto_graze_zootot(n))%field_3d(:, 1), &
            delta_z, kmt, full_depth_integral=diags(ind%auto_graze_zoo_zint(n))%field_2d(1), &
            near_surface_integral=diags(ind%auto_graze_zoo_zint_100m(n))%field_2d(1))

is integrating diags(ind%auto_graze_zootot(n))%field_3d(:, 1) where we actually want it to integrate diags(ind%auto_graze_zoo(n,m))%field_3d(:, 1) or autotroph_derived_terms%auto_graze_zoo(n,m,:), perhaps inside the following loop:

       do m=1, zooplankton_cnt
            diags(ind%auto_graze_zoo(n,m))%field_3d(:, 1) = autotroph_derived_terms%auto_graze_zoo(n,m,:)
       end do
mnlevy1981 commented 1 year ago

fixed by #423