Use SST and SSS consistent with MARBL tracers#374
Conversation
The existing MARBL driver uses T & S from the end of the diabatic routine as inputs into surface_flux_compute() and interior_tendency_compute(). For surface_flux_compute(), there is a discrepancy because we have not yet called tracer_vertdiff for the MARBL tracers but have for T & S. To enforce consistency among all the tracers, we want to use the pre-vertdiff T&S quantities. There is a little bit of infrastructure change -- I added 3D fields for T & S at the beginning of the diabatic subroutine to the diabatic control structure (we will eventually want to call interior_tendency_compute() before tracer_vertdiff as well), and then had to add a routine to MOM_tracer_flow_control.F90 to extract use_MARBL_tracers from the tracer flow control structure. prediabatic_T and prediabatic_S are now optional arguments to call_tracer_column_fns(), but that function will abort if USE_MARBL_TRACERS is true and the arguments are not present because they are required in MARBL_tracers_column_physics()
Fix failing doxygen / style check texts. Also add a long comment to diabatic_ALE explaining why we use prediabatic_T and prediabatic_S (maybe the comment belongs in diabatic_init?)
|
As a first pass, I only used |
Reordered MARBL_tracers_column_physics so that surface_flux_compute() and interior_tendency_compute() are both called before tracer_vertdiff. Now use prediabatic T & S for interior tendency computation, and also use h_old as dz. Note that this greatly increases the number of warnings from the co2calc routine, and we are not sure why.
|
@gustavo-marques is using these changes in his latest runs where we will look at the effect of the two different vertical grids on BGC variables; assuming those runs don't raise any red flags, this PR is ready to go (it will also require marbl-ecosys/MARBL#480) |
1. removed spaces from "end if" to match style guide recommendations 2. cleaned up comment in extract_tracer_flow_member (refer to tracer_flow_control_CS rather than diabatic_CS) 3. Consistent capitalization of MARBL in use_MARBL_tracers (and use_MARBL) throughout the codebase
|
@mnlevy1981 Has this PR been tested, or is it ready for being tested? |
|
@alperaltuntas it is ready for testing (I'm surprised I don't have a comment mentioning test results -- I'm pretty sure I ran at least note that this is answer-changing for cases with |
|
@mnlevy1981 For both MARBL test cases in aux_mom, I got ~35% performance hit. Is this expected? |
Can you try updating MARBL to the head of the |
Updating MARBL to the head of development brought throughput to 4.77. |
When computing surface fluxes and interior tendencies for MARBL tracers, we want to use T & S from before they are modified by
tracer_vertdiff(). We do this by addingprediabatic_Tandprediabatic_Sto the diabatic control structure, and then passing these values instead oftv%Tandtv%Sto MARBL.