From 4db71c690957dd3af1e42aef2d1ce34d2c5311b3 Mon Sep 17 00:00:00 2001 From: alperaltuntas Date: Thu, 2 Apr 2026 15:28:01 -0600 Subject: [PATCH 1/4] Add diag_table changes as described in Issue #308 --- param_templates/diag_table.yaml | 40 +++++++--- param_templates/json/diag_table.json | 107 +++++++++++++++++++++++---- 2 files changed, 125 insertions(+), 22 deletions(-) diff --git a/param_templates/diag_table.yaml b/param_templates/diag_table.yaml index 575229e..5ff09b8 100644 --- a/param_templates/diag_table.yaml +++ b/param_templates/diag_table.yaml @@ -28,20 +28,24 @@ FieldLists: - &forcing_flds ["tauuo", "tauvo", "friver", "prsn", "prlq", "evs", "hfsso", "rlntds", "hfsnthermds", "sfdsi", "rsntds", "hfds", "ustar", - "hfsifrazil", "wfo", "vprec", "ficeberg", "fsitherm", - "hflso", "pso", "seaice_melt_heat", "Heat_PmE", "salt_flux_added"] - - - &enthalpy_flds [ "heat_content_lrunoff", "heat_content_frunoff", "heat_content_lprec", - "heat_content_fprec", "heat_content_vprec", "heat_content_cond", + "hfsifrazil", "wfo", "ficeberg", "fsitherm", + "hflso", "pso", "seaice_melt_heat", "Heat_PmE"] + + - &enthalpy_flds ["heat_content_lrunoff", "heat_content_frunoff", "heat_content_lprec", + "heat_content_fprec", "heat_content_cond", "heat_content_evap"] - &forcing_flds_dev ["net_heat_coupler", "LwLatSens", "heat_content_lrunoff", "heat_content_frunoff", "heat_content_lprec", - "heat_content_fprec", "heat_content_vprec", "heat_content_cond", + "heat_content_fprec", "heat_content_cond", "hfevapds", "heat_content_surfwater", "vprec_global_adjustment", "net_fresh_water_global_adjustment", "salt_flux_global_restoring_adjustment", "net_massout", "net_massin"] + - &forcing_flds_b ["heat_content_frunoff_glc"] + + - &forcing_flds_cg ["heat_content_vprec", "vprec", "salt_flux_added"] + - &visc_flds ["diftrelo", "diftrblo", "difmxybo", "difmxylo"] - &static_flds ["geolon", "geolat", "geolon_c", "geolat_c", "geolon_u", "geolat_u", @@ -66,6 +70,12 @@ FieldLists: - &kpp_test ["KPP_QminusSW", "KPP_netSalt", "KPP_NLT_dTdt", "KPP_NLT_dSdt", "KPP_NLT_temp_budget", "KPP_NLT_saln_budget"] + - &cmip7_native ["FrictWorkIntz", "hfibthermds", "mlotstsq", "pbo", "S_adx_2d", "S_ady_2d", "sob", "sossq", "tob", "tossq", "zos", "zossq"] + + - &cmip7_z ["Khh", "Ahh", "KHTH_t", "KHTR_h", "diabatic_heat_tendency", "T_advection_xy", "Th_tendency", "diabatic_salt_tendency", "S_advection_xy", "Sh_tendency", "rsdoabsorb"] + + - &cmip7_sfc ["tossq", "rsdo", "T_adx_2d", "T_ady_2d"] + ############################################################################### # Section 2: File lists: # List of files to be added in diag_table @@ -129,7 +139,9 @@ Files: *forcing_flds, *enthalpy_flds, *surface_flds_common, - *surface_flds_monthly] + *surface_flds_monthly, + *cmip7_native, + ["skeb_amp"]] lists3: $USE_CFC_CAP == "True": [ *cfc_2d ] @@ -139,6 +151,12 @@ Files: lists5: $TEST == True: [ *kpp_test ] + lists6: + $COMP_ATM == "cam": + [ *forcing_flds_b ] + else: + [ *forcing_flds_cg ] + # essential variable mapped to z_space hist_z_space: @@ -162,7 +180,9 @@ Files: packing: = 1 if $TEST else 2 lists: [ *prognostic_z, - *transports ] + *transports, + *cmip7_z, + ] lists2: $USE_CFC_CAP == "True": [ *cfc_3d ] @@ -188,7 +208,9 @@ Files: packing: = 1 if $TEST else 2 lists: [ *surface_flds_common, *surface_flds_daily, - *kpp_diags ] + *kpp_diags, + *cmip7_sfc + ] forcing_avg: suffix: $TEST == True: "h.frc%4yr-%2mo-%2dy" diff --git a/param_templates/json/diag_table.json b/param_templates/json/diag_table.json index 7fccf8f..b039cfa 100644 --- a/param_templates/json/diag_table.json +++ b/param_templates/json/diag_table.json @@ -105,21 +105,18 @@ "ustar", "hfsifrazil", "wfo", - "vprec", "ficeberg", "fsitherm", "hflso", "pso", "seaice_melt_heat", - "Heat_PmE", - "salt_flux_added" + "Heat_PmE" ], [ "heat_content_lrunoff", "heat_content_frunoff", "heat_content_lprec", "heat_content_fprec", - "heat_content_vprec", "heat_content_cond", "heat_content_evap" ], @@ -130,7 +127,6 @@ "heat_content_frunoff", "heat_content_lprec", "heat_content_fprec", - "heat_content_vprec", "heat_content_cond", "hfevapds", "heat_content_surfwater", @@ -140,6 +136,14 @@ "net_massout", "net_massin" ], + [ + "heat_content_frunoff_glc" + ], + [ + "heat_content_vprec", + "vprec", + "salt_flux_added" + ], [ "diftrelo", "diftrblo", @@ -219,6 +223,39 @@ "KPP_NLT_dSdt", "KPP_NLT_temp_budget", "KPP_NLT_saln_budget" + ], + [ + "FrictWorkIntz", + "hfibthermds", + "mlotstsq", + "pbo", + "S_adx_2d", + "S_ady_2d", + "sob", + "sossq", + "tob", + "tossq", + "zos", + "zossq" + ], + [ + "Khh", + "Ahh", + "KHTH_t", + "KHTR_h", + "diabatic_heat_tendency", + "T_advection_xy", + "Th_tendency", + "diabatic_salt_tendency", + "S_advection_xy", + "Sh_tendency", + "rsdoabsorb" + ], + [ + "tossq", + "rsdo", + "T_adx_2d", + "T_ady_2d" ] ], "Files": { @@ -370,21 +407,18 @@ "ustar", "hfsifrazil", "wfo", - "vprec", "ficeberg", "fsitherm", "hflso", "pso", "seaice_melt_heat", - "Heat_PmE", - "salt_flux_added" + "Heat_PmE" ], [ "heat_content_lrunoff", "heat_content_frunoff", "heat_content_lprec", "heat_content_fprec", - "heat_content_vprec", "heat_content_cond", "heat_content_evap" ], @@ -410,6 +444,23 @@ "sss_global", "SSH", "mass_wt" + ], + [ + "FrictWorkIntz", + "hfibthermds", + "mlotstsq", + "pbo", + "S_adx_2d", + "S_ady_2d", + "sob", + "sossq", + "tob", + "tossq", + "zos", + "zossq" + ], + [ + "skeb_amp" ] ] }, @@ -442,6 +493,20 @@ "KPP_NLT_saln_budget" ] ] + }, + "lists6": { + "$COMP_ATM == \"cam\"": [ + [ + "heat_content_frunoff_glc" + ] + ], + "else": [ + [ + "heat_content_vprec", + "vprec", + "salt_flux_added" + ] + ] } } } @@ -492,6 +557,19 @@ "umo", "uhGM", "uhml" + ], + [ + "Khh", + "Ahh", + "KHTH_t", + "KHTR_h", + "diabatic_heat_tendency", + "T_advection_xy", + "Th_tendency", + "diabatic_salt_tendency", + "S_advection_xy", + "Sh_tendency", + "rsdoabsorb" ] ], "lists2": { @@ -553,6 +631,12 @@ "KPP_OBLdepth:oml", "KPP_OBLdepth:oml_min:min", "KPP_OBLdepth:oml_max:max" + ], + [ + "tossq", + "rsdo", + "T_adx_2d", + "T_ady_2d" ] ] } @@ -597,14 +681,12 @@ "ustar", "hfsifrazil", "wfo", - "vprec", "ficeberg", "fsitherm", "hflso", "pso", "seaice_melt_heat", - "Heat_PmE", - "salt_flux_added" + "Heat_PmE" ], [ "net_heat_coupler", @@ -613,7 +695,6 @@ "heat_content_frunoff", "heat_content_lprec", "heat_content_fprec", - "heat_content_vprec", "heat_content_cond", "hfevapds", "heat_content_surfwater", From 01afabe86989621354d799a89063020c65da42d9 Mon Sep 17 00:00:00 2001 From: alperaltuntas Date: Thu, 2 Apr 2026 15:32:53 -0600 Subject: [PATCH 2/4] formatting --- param_templates/diag_table.yaml | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/param_templates/diag_table.yaml b/param_templates/diag_table.yaml index 5ff09b8..c59335f 100644 --- a/param_templates/diag_table.yaml +++ b/param_templates/diag_table.yaml @@ -4,9 +4,11 @@ ############################################################################### --- FieldLists: - - &prognostic ["uo", "vo", "h", "e", "thetao", "so", "KE", "MEKE", "rhopot0", "rhopot2", "difvho", "difvso", "Kv_u", "Kv_v", "taux_bot", "tauy_bot"] + - &prognostic ["uo", "vo", "h", "e", "thetao", "so", "KE", "MEKE", "rhopot0", "rhopot2", + "difvho", "difvso", "Kv_u", "Kv_v", "taux_bot", "tauy_bot"] - - &prognostic_z ["uo", "vo", "h", "thetao", "so", "agessc", "rhopot0", "N2_int", "rhopot2", "difvho", "difvso", "Kv_u", "Kv_v"] + - &prognostic_z ["uo", "vo", "h", "thetao", "so", "agessc", "rhopot0", "N2_int", "rhopot2", + "difvho", "difvso", "Kv_u", "Kv_v"] - &prognostic_rho2 ["thetao", "so", "agessc", "e"] @@ -30,7 +32,7 @@ FieldLists: "hfsnthermds", "sfdsi", "rsntds", "hfds", "ustar", "hfsifrazil", "wfo", "ficeberg", "fsitherm", "hflso", "pso", "seaice_melt_heat", "Heat_PmE"] - + - &enthalpy_flds ["heat_content_lrunoff", "heat_content_frunoff", "heat_content_lprec", "heat_content_fprec", "heat_content_cond", "heat_content_evap"] @@ -68,11 +70,14 @@ FieldLists: - &glc_terms ["frunoff_glc", "lrunoff_glc"] - - &kpp_test ["KPP_QminusSW", "KPP_netSalt", "KPP_NLT_dTdt", "KPP_NLT_dSdt", "KPP_NLT_temp_budget", "KPP_NLT_saln_budget"] + - &kpp_test ["KPP_QminusSW", "KPP_netSalt", "KPP_NLT_dTdt", "KPP_NLT_dSdt", "KPP_NLT_temp_budget", + "KPP_NLT_saln_budget"] - - &cmip7_native ["FrictWorkIntz", "hfibthermds", "mlotstsq", "pbo", "S_adx_2d", "S_ady_2d", "sob", "sossq", "tob", "tossq", "zos", "zossq"] + - &cmip7_native ["FrictWorkIntz", "hfibthermds", "mlotstsq", "pbo", "S_adx_2d", "S_ady_2d", "sob", + "sossq", "tob", "tossq", "zos", "zossq"] - - &cmip7_z ["Khh", "Ahh", "KHTH_t", "KHTR_h", "diabatic_heat_tendency", "T_advection_xy", "Th_tendency", "diabatic_salt_tendency", "S_advection_xy", "Sh_tendency", "rsdoabsorb"] + - &cmip7_z ["Khh", "Ahh", "KHTH_t", "KHTR_h", "diabatic_heat_tendency", "T_advection_xy", + "Th_tendency", "diabatic_salt_tendency", "S_advection_xy", "Sh_tendency", "rsdoabsorb"] - &cmip7_sfc ["tossq", "rsdo", "T_adx_2d", "T_ady_2d"] From e70e703cad90a56bc908f91a08a1dd74edbf5869 Mon Sep 17 00:00:00 2001 From: alperaltuntas Date: Mon, 6 Apr 2026 19:42:44 -0600 Subject: [PATCH 3/4] use cmor names for newly added fields. add BS_coeff_h --- param_templates/diag_table.yaml | 7 ++++--- param_templates/json/diag_table.json | 20 ++++++++++---------- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/param_templates/diag_table.yaml b/param_templates/diag_table.yaml index c59335f..2d6f135 100644 --- a/param_templates/diag_table.yaml +++ b/param_templates/diag_table.yaml @@ -74,10 +74,10 @@ FieldLists: "KPP_NLT_saln_budget"] - &cmip7_native ["FrictWorkIntz", "hfibthermds", "mlotstsq", "pbo", "S_adx_2d", "S_ady_2d", "sob", - "sossq", "tob", "tossq", "zos", "zossq"] + "sossq", "tob", "tossq", "zos", "zossq", "BS_coeff_h"] - - &cmip7_z ["Khh", "Ahh", "KHTH_t", "KHTR_h", "diabatic_heat_tendency", "T_advection_xy", - "Th_tendency", "diabatic_salt_tendency", "S_advection_xy", "Sh_tendency", "rsdoabsorb"] + - &cmip7_z ["diabatic_heat_tendency", "T_advection_xy", "Th_tendency", "diabatic_salt_tendency", + "S_advection_xy", "Sh_tendency", "rsdoabsorb"] - &cmip7_sfc ["tossq", "rsdo", "T_adx_2d", "T_ady_2d"] @@ -186,6 +186,7 @@ Files: lists: [ *prognostic_z, *transports, + *visc_flds, *cmip7_z, ] lists2: diff --git a/param_templates/json/diag_table.json b/param_templates/json/diag_table.json index b039cfa..62a8782 100644 --- a/param_templates/json/diag_table.json +++ b/param_templates/json/diag_table.json @@ -236,13 +236,10 @@ "tob", "tossq", "zos", - "zossq" + "zossq", + "BS_coeff_h" ], [ - "Khh", - "Ahh", - "KHTH_t", - "KHTR_h", "diabatic_heat_tendency", "T_advection_xy", "Th_tendency", @@ -457,7 +454,8 @@ "tob", "tossq", "zos", - "zossq" + "zossq", + "BS_coeff_h" ], [ "skeb_amp" @@ -559,10 +557,12 @@ "uhml" ], [ - "Khh", - "Ahh", - "KHTH_t", - "KHTR_h", + "diftrelo", + "diftrblo", + "difmxybo", + "difmxylo" + ], + [ "diabatic_heat_tendency", "T_advection_xy", "Th_tendency", From 7ad5daa13e8bc55c21811844bd6c2cea56efc5ef Mon Sep 17 00:00:00 2001 From: alperaltuntas Date: Wed, 8 Apr 2026 08:57:53 -0600 Subject: [PATCH 4/4] use CMOR names for remaining fields --- param_templates/diag_table.yaml | 10 ++++---- param_templates/json/diag_table.json | 36 ++++++++++++++-------------- 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/param_templates/diag_table.yaml b/param_templates/diag_table.yaml index 2d6f135..7b3cc49 100644 --- a/param_templates/diag_table.yaml +++ b/param_templates/diag_table.yaml @@ -24,7 +24,7 @@ FieldLists: - &surface_flds_daily ["zos", "zossq"] - - &surface_flds_monthly ["sst_global", "sss_global", "SSH", "mass_wt"] + - &surface_flds_monthly ["tosga", "sosga", "SSH", "mass_wt"] - &kpp_diags ["KPP_OBLdepth:oml", "KPP_OBLdepth:oml_min:min", "KPP_OBLdepth:oml_max:max"] @@ -53,7 +53,7 @@ FieldLists: - &static_flds ["geolon", "geolat", "geolon_c", "geolat_c", "geolon_u", "geolat_u", "geolon_v", "geolat_v", "deptho", "wet", "wet_c", "wet_u", "wet_v", "Coriolis", "areacello", "areacello_cu", "areacello_cv", - "areacello_bu", "sin_rot", "cos_rot", "C_P", "Rho_0", "skeb_taper_v", + "areacello_bu", "sin_rot", "cos_rot", "cpocean", "rhozero", "skeb_taper_v", "skeb_taper_u"] - &transports ["volcello", "vmo", "vhGM", "vhml", "umo", "uhGM", "uhml"] @@ -73,11 +73,11 @@ FieldLists: - &kpp_test ["KPP_QminusSW", "KPP_netSalt", "KPP_NLT_dTdt", "KPP_NLT_dSdt", "KPP_NLT_temp_budget", "KPP_NLT_saln_budget"] - - &cmip7_native ["FrictWorkIntz", "hfibthermds", "mlotstsq", "pbo", "S_adx_2d", "S_ady_2d", "sob", + - &cmip7_native ["dispkexyfo", "hfibthermds", "mlotstsq", "pbo", "S_adx_2d", "S_ady_2d", "sob", "sossq", "tob", "tossq", "zos", "zossq", "BS_coeff_h"] - - &cmip7_z ["diabatic_heat_tendency", "T_advection_xy", "Th_tendency", "diabatic_salt_tendency", - "S_advection_xy", "Sh_tendency", "rsdoabsorb"] + - &cmip7_z ["opottempdiff", "T_advection_xy", "opottemptend", "osaltdiff", + "S_advection_xy", "osalttend", "rsdoabsorb"] - &cmip7_sfc ["tossq", "rsdo", "T_adx_2d", "T_ady_2d"] diff --git a/param_templates/json/diag_table.json b/param_templates/json/diag_table.json index 62a8782..058d88c 100644 --- a/param_templates/json/diag_table.json +++ b/param_templates/json/diag_table.json @@ -79,8 +79,8 @@ "zossq" ], [ - "sst_global", - "sss_global", + "tosga", + "sosga", "SSH", "mass_wt" ], @@ -171,8 +171,8 @@ "areacello_bu", "sin_rot", "cos_rot", - "C_P", - "Rho_0", + "cpocean", + "rhozero", "skeb_taper_v", "skeb_taper_u" ], @@ -225,7 +225,7 @@ "KPP_NLT_saln_budget" ], [ - "FrictWorkIntz", + "dispkexyfo", "hfibthermds", "mlotstsq", "pbo", @@ -240,12 +240,12 @@ "BS_coeff_h" ], [ - "diabatic_heat_tendency", + "opottempdiff", "T_advection_xy", - "Th_tendency", - "diabatic_salt_tendency", + "opottemptend", + "osaltdiff", "S_advection_xy", - "Sh_tendency", + "osalttend", "rsdoabsorb" ], [ @@ -437,13 +437,13 @@ "mlotst:mlotst_max:max" ], [ - "sst_global", - "sss_global", + "tosga", + "sosga", "SSH", "mass_wt" ], [ - "FrictWorkIntz", + "dispkexyfo", "hfibthermds", "mlotstsq", "pbo", @@ -563,12 +563,12 @@ "difmxylo" ], [ - "diabatic_heat_tendency", + "opottempdiff", "T_advection_xy", - "Th_tendency", - "diabatic_salt_tendency", + "opottemptend", + "osaltdiff", "S_advection_xy", - "Sh_tendency", + "osalttend", "rsdoabsorb" ] ], @@ -773,8 +773,8 @@ "areacello_bu", "sin_rot", "cos_rot", - "C_P", - "Rho_0", + "cpocean", + "rhozero", "skeb_taper_v", "skeb_taper_u" ]