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

Add additional KPP terms to diagnostics #103

Open
mnlevy1981 opened this issue Feb 28, 2022 · 2 comments · May be fixed by #104
Open

Add additional KPP terms to diagnostics #103

mnlevy1981 opened this issue Feb 28, 2022 · 2 comments · May be fixed by #104

Comments

@mnlevy1981
Copy link
Collaborator

I put the following into my sandbox (and ran yaml_to_json to generate changes in diag_table.yaml):

diff --git a/param_templates/diag_table.yaml b/param_templates/diag_table.yaml
index c30f177..650eb38 100644
--- a/param_templates/diag_table.yaml
+++ b/param_templates/diag_table.yaml
@@ -13,7 +13,8 @@ FieldLists:
     - &surface_flds     ["SSH", "tos", "sos", "SSU", "SSV", "mass_wt", "opottempmint",
                          "somint", "Rd_dx", "speed", "mlotst"]

-    - &kpp_diags        ["KPP_OBLdepth:oml"]
+    - &kpp_diags        ["KPP_OBLdepth:oml", "KPP_QminusSW", "KPP_netSalt"]
+    - &kpp_3d_diags     ["KPP_NLT_dTdt", "KPP_NLT_dSdT", "KPP_NLT_temp_budget", "KPP_NLT_saln_budget"]

     - &forcing_flds     ["tauuo", "tauvo", "friver", "prsn", "prlq", "evs", "hfsso", "rlntds",
                          "hfsnthermds", "sfdsi", "rsntds", "hfds", "ustar",
@@ -106,6 +107,7 @@ Files:
                       lists:    [ *prognostic,
                                   *hist_additional,
                                   *kpp_diags,
+                                  *kpp_3d_diags,
                                   *forcing_flds,
                                   *surface_flds,
                                   *visc_flds,
@@ -118,6 +120,7 @@ Files:
                       lists:    [ *prognostic,
                                   *hist_additional,
                                   *kpp_diags,
+                                  *kpp_3d_diags,
                                   *forcing_flds,
                                   *surface_flds,
                                   *visc_flds,
  • KPP_QminusSW and KPP_netSalt are the surface fluxes that are redistributed by the nonlocal term in KPP
  • KPP_NLT_dTdt and KPP_NLT_dSdT are the tendency terms due to the non-local transport
  • KPP_NLT_temp_budget and KPP_NLT_saln_budget are the unitless shape functions computed by KPP

I'm not sure if these should only be included in testing, or if they would be useful in all runs. My use-case has been entirely on the testing side, though some of the testing includes one-off cases that I compare by hand so I didn't try to limit it to just tests.

NCAR/MOM6#202 introduces round-off level changes to KPP_NLT_temp_budget and KPP_NLT_saln_budget, so it was useful for me to include them in the test suite. Also, I think all of these diagnostics include various dimensional-scaling terms so we want them included in the scaling test outputs.

After the NCAR/MOM6 PR is merged, there will also be some KPP variables in the optional tracer modules (specifically CFCs and pseudosalt). It's not clear to me how to add those variables, either. Maybe something like

- &cfc_kpp_diags ["diag1", "diag2"]
@mnlevy1981
Copy link
Collaborator Author

@klindsay28 suggests starting out by only including these variables when running aux_mom, and then we can add them in additional situations in the future as needed.

@alperaltuntas can you tell me how to do this? I'm happy to put together a PR with these changes.

@alperaltuntas
Copy link
Member

To turn on a field list for test runs only, you can do something like:

        fields:
             $TEST == True :
                - module:   "ocean_model"
                  packing:  2   
                  lists:    [ *foo, *bar ]
            else: 
                - module:   "ocean_model"
                  packing:  2   
                  lists:    [ *foo ]

In above case, the foo list will be included at all times and the bar list will be included in test runs only, including but not limited to aux_mom test suite instances.

Am I answering the right question?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants