From 19dc9464d970e1ef69e1c62a5cda13da3d04369c Mon Sep 17 00:00:00 2001 From: alperaltuntas Date: Wed, 22 Jul 2026 10:52:33 -0600 Subject: [PATCH 1/2] Add WW3 daily-averaged wave fields needed for the NorESM merge The NorESM WW3 cap exports 11 new Sw_*_avg fields and expects the mediator to output them in a daily-averaged auxiliary history file. This defines those fields in fd_cesm.yaml, and drops the stale ww3 histaux overrides that were still requesting the old instantaneous fields. --- cime_config/namelist_definition_drv.xml | 7 ++-- mediator/esmFldsExchange_cesm_mod.F90 | 11 +++++++ mediator/fd_cesm.yaml | 44 +++++++++++++++++++++++++ 3 files changed, 59 insertions(+), 3 deletions(-) diff --git a/cime_config/namelist_definition_drv.xml b/cime_config/namelist_definition_drv.xml index 7493bbdf6..873b902bc 100644 --- a/cime_config/namelist_definition_drv.xml +++ b/cime_config/namelist_definition_drv.xml @@ -2128,7 +2128,6 @@ MED_attributes Sw_hs_avg:Sw_Tm1_avg:Sw_thm_avg:Sw_u_avg:Sw_v_avg:Sw_ustokes_avg:Sw_vstokes_avg:Sw_tusx_avg:Sw_tusy_avg:Sw_thp0_avg:Sw_fp0_avg:Sw_phs0_avg:Sw_phs1_avg:Sw_pdir0_avg:Sw_pdir1_avg:Sw_pTm10_avg:Sw_pTm11_avg - Sw_Hs:Sw_t01:Sw_t0m1:Sw_thm:Sw_lamult:Sw_ustokes:Sw_vstokes Auxiliary mediator wav2med file1 colon delimited output fields. NOTE: these are assumed to be time averaged over a day in @@ -2160,10 +2159,12 @@ MED_attributes .false. - .true. Auxiliary mediator wav2med file1 time averaged flag for file output. - If this flag is set to .false. only instantaneous output will be created in the auxiliary file. + If this flag is set to .false. only instantaneous output will be created in the auxiliary file. + For COMP_WAV=ww3 this must remain .false.: the WW3 cap already produces daily-averaged + Sw_*_avg fields (fillvalue between day boundaries), so a second mediator-side average would + be meaningless. char diff --git a/mediator/esmFldsExchange_cesm_mod.F90 b/mediator/esmFldsExchange_cesm_mod.F90 index 97ff04d55..9d61ae743 100644 --- a/mediator/esmFldsExchange_cesm_mod.F90 +++ b/mediator/esmFldsExchange_cesm_mod.F90 @@ -2340,6 +2340,17 @@ subroutine esmFldsExchange_cesm(gcomp, phase, rc) call addfld_from(compwav, 'Sw_v_avg') call addfld_from(compwav, 'Sw_tusx_avg') call addfld_from(compwav, 'Sw_tusy_avg') + call addfld_from(compwav, 'Sw_lamult_avg') + call addfld_from(compwav, 'Sw_charn_avg') + call addfld_from(compwav, 'Sw_tm02_avg') + call addfld_from(compwav, 'Sw_faw_avg') + call addfld_from(compwav, 'Sw_foc_avg') + call addfld_from(compwav, 'Sw_cu_avg') + call addfld_from(compwav, 'Sw_cv_avg') + call addfld_from(compwav, 'Sw_ifrac_avg') + call addfld_from(compwav, 'Sw_thick_avg') + call addfld_from(compwav, 'Sw_tauicex_avg') + call addfld_from(compwav, 'Sw_tauicey_avg') end if !----------------------------- diff --git a/mediator/fd_cesm.yaml b/mediator/fd_cesm.yaml index 2a22fc824..4384f955c 100644 --- a/mediator/fd_cesm.yaml +++ b/mediator/fd_cesm.yaml @@ -1405,3 +1405,47 @@ - standard_name: Sw_tusy_avg canonical_units: m2/s description: Daily averaged stokes meridional transport vector (only needed for med history output) + # + - standard_name: Sw_lamult_avg + canonical_units: 1 + description: Daily averaged Langmuir multiplier (only needed for med history output) + # + - standard_name: Sw_charn_avg + canonical_units: 1 + description: Daily averaged Charnock parameter for air-sea friction (only needed for med history output) + # + - standard_name: Sw_tm02_avg + canonical_units: s + description: Daily averaged mean wave period of the second moment (only needed for med history output) + # + - standard_name: Sw_faw_avg + canonical_units: W m-2 + description: Daily averaged wind to wave energy flux (only needed for med history output) + # + - standard_name: Sw_foc_avg + canonical_units: W m-2 + description: Daily averaged wave to ocean energy flux (only needed for med history output) + # + - standard_name: Sw_cu_avg + canonical_units: m/s + description: Daily averaged surface ocean current zonal (only needed for med history output) + # + - standard_name: Sw_cv_avg + canonical_units: m/s + description: Daily averaged surface ocean current meridional (only needed for med history output) + # + - standard_name: Sw_ifrac_avg + canonical_units: 1 + description: Daily averaged sea ice fraction from the ice model (only needed for med history output) + # + - standard_name: Sw_thick_avg + canonical_units: m + description: Daily averaged sea ice thickness from the ice model (only needed for med history output) + # + - standard_name: Sw_tauicex_avg + canonical_units: N m-2 + description: Daily averaged wave to ice stress zonal (only needed for med history output) + # + - standard_name: Sw_tauicey_avg + canonical_units: N m-2 + description: Daily averaged wave to ice stress meridional (only needed for med history output) From 289478b2e9afe02c9131f8026d666f95b6cd2bd8 Mon Sep 17 00:00:00 2001 From: alperaltuntas Date: Wed, 19 Aug 2026 10:54:53 -0600 Subject: [PATCH 2/2] Align wave-field additions with NorESM merge PR (#690) --- cime_config/namelist_definition_drv.xml | 1 + mediator/esmFldsExchange_cesm_mod.F90 | 6 +- mediator/fd_cesm.yaml | 83 +++++++++++++------------ 3 files changed, 46 insertions(+), 44 deletions(-) diff --git a/cime_config/namelist_definition_drv.xml b/cime_config/namelist_definition_drv.xml index 6fb302974..2dbaa6f38 100644 --- a/cime_config/namelist_definition_drv.xml +++ b/cime_config/namelist_definition_drv.xml @@ -2125,6 +2125,7 @@ aux_hist MED_attributes + "" Sw_hs_avg:Sw_Tm1_avg:Sw_thm_avg:Sw_u_avg:Sw_v_avg:Sw_ustokes_avg:Sw_vstokes_avg:Sw_tusx_avg:Sw_tusy_avg:Sw_thp0_avg:Sw_fp0_avg:Sw_phs0_avg:Sw_phs1_avg:Sw_pdir0_avg:Sw_pdir1_avg:Sw_pTm10_avg:Sw_pTm11_avg Sw_hs_avg:Sw_Tm1_avg:Sw_thm_avg:Sw_u_avg:Sw_v_avg:Sw_ustokes_avg:Sw_vstokes_avg:Sw_tusx_avg:Sw_tusy_avg:Sw_thp0_avg:Sw_fp0_avg:Sw_phs0_avg:Sw_phs1_avg:Sw_pdir0_avg:Sw_pdir1_avg:Sw_pTm10_avg:Sw_pTm11_avg diff --git a/mediator/esmFldsExchange_cesm_mod.F90 b/mediator/esmFldsExchange_cesm_mod.F90 index aaa9dba97..f4a0a562b 100644 --- a/mediator/esmFldsExchange_cesm_mod.F90 +++ b/mediator/esmFldsExchange_cesm_mod.F90 @@ -2335,18 +2335,18 @@ subroutine esmFldsExchange_cesm(gcomp, phase, rc) call addfld_from(compwav, 'Sw_Tm1_avg') call addfld_from(compwav, 'Sw_thm_avg') call addfld_from(compwav, 'Sw_thp0_avg') + call addfld_from(compwav, 'Sw_faw_avg') call addfld_from(compwav, 'Sw_fp0_avg') call addfld_from(compwav, 'Sw_u_avg') call addfld_from(compwav, 'Sw_v_avg') + call addfld_from(compwav, 'Sw_cu_avg') + call addfld_from(compwav, 'Sw_cv_avg') call addfld_from(compwav, 'Sw_tusx_avg') call addfld_from(compwav, 'Sw_tusy_avg') call addfld_from(compwav, 'Sw_lamult_avg') call addfld_from(compwav, 'Sw_charn_avg') call addfld_from(compwav, 'Sw_tm02_avg') - call addfld_from(compwav, 'Sw_faw_avg') call addfld_from(compwav, 'Sw_foc_avg') - call addfld_from(compwav, 'Sw_cu_avg') - call addfld_from(compwav, 'Sw_cv_avg') call addfld_from(compwav, 'Sw_ifrac_avg') call addfld_from(compwav, 'Sw_thick_avg') call addfld_from(compwav, 'Sw_tauicex_avg') diff --git a/mediator/fd_cesm.yaml b/mediator/fd_cesm.yaml index 4384f955c..09ba06fcd 100644 --- a/mediator/fd_cesm.yaml +++ b/mediator/fd_cesm.yaml @@ -1340,112 +1340,113 @@ # - standard_name: Sw_ustokes_avg canonical_units: m/s - description: Daily averaged stokes drift u component (only needed for med history output) + description: Daily averaged stokes drift u component (only needed for mediator history output) # - standard_name: Sw_vstokes_avg canonical_units: m/s - description: Daily averaged stokes drift v component (only needed for med history output) + description: Daily averaged stokes drift v component (only needed for mediator history output) # - standard_name: Sw_hs_avg canonical_units: m - description: Daily averaged significant wave hight (only needed for med history output) + description: Daily averaged significant wave hight (only needed for mediator history output) # - standard_name: Sw_phs0_avg canonical_units: m - description: Daily averaged averaged wind sea swh (only needed for med history output) + description: Daily averaged averaged wind sea swh (only needed for mediator history output) # - standard_name: Sw_phs1_avg canonical_units: m - description: Daily averaged swell swh (only needed for med history output) + description: Daily averaged swell swh (only needed for mediator history output) # - standard_name: Sw_pdir0_avg canonical_units: degrees - description: Daily averaged wind sea swh (only needed for med history output) + description: Daily averaged wind sea swh (only needed for mediator history output) # - standard_name: Sw_pdir1_avg canonical_units: degrees - description: Daily averaged swell swh (only needed for med history output) + description: Daily averaged swell swh (only needed for mediator history output) # - standard_name: Sw_pTm10_avg canonical_units: s - description: Daily averaged wind sea mean wave Tm1 period (only needed for med history output) + description: Daily averaged wind sea mean wave Tm1 period (only needed for mediator history output) # - standard_name: Sw_pTm11_avg canonical_units: s - description: Daily average swell mean wave Tm1 period (only needed for med history output) + description: Daily average swell mean wave Tm1 period (only needed for mediator history output) # - standard_name: Sw_Tm1_avg canonical_units: s - description: Daily averaged mean wave period of the first moment (only needed for med history output) + description: Daily averaged mean wave period of the first moment (only needed for mediator history output) # - standard_name: Sw_thm_avg canonical_units: degrees - description: Daily averaged mean wave direction (only needed for med history output) + description: Daily averaged mean wave direction (only needed for mediator history output) # - standard_name: Sw_thp0_avg canonical_units: degrees - description: Daily averaged peak wave direction (only needed for med history output) + description: Daily averaged peak wave direction (only needed for mediator history output) # - standard_name: Sw_fp0_avg canonical_units: 1/s - description: Daily averaged peak wave frequency (only needed for med history output) + description: Daily averaged peak wave frequency (only needed for mediator history output) # - standard_name: Sw_u_avg canonical_units: m/s - description: Daily averaged surface wind zonal (only needed for med history output) + description: Daily averaged surface wind zonal (only needed for mediator history output) # - standard_name: Sw_v_avg canonical_units: m/s - description: Daily averaged surface wind meridional (only needed for med history output) + description: Daily averaged surface wind meridional (only needed for mediator history output) + # + - standard_name: Sw_cu_avg + canonical_units: m/s + description: Daily averaged surface zonal current(only needed for mediator history output) + # + - standard_name: Sw_cv_avg + canonical_units: m/s + description: Daily averaged surface meridional current (only needed for mediator history output) # - standard_name: Sw_tusx_avg canonical_units: m2/s - description: Daily averaged stokes zonal transport vector (only needed for med history output) + description: Daily averaged stokes zonal transport vector (only needed for mediator history output) # - standard_name: Sw_tusy_avg canonical_units: m2/s - description: Daily averaged stokes meridional transport vector (only needed for med history output) - # + description: Daily averaged stokes meridional transport vector (only needed for mediator history output) + # - standard_name: Sw_lamult_avg canonical_units: 1 - description: Daily averaged Langmuir multiplier (only needed for med history output) - # + description: Daily averaged Langmuir number (only needed for mediator history output) + # - standard_name: Sw_charn_avg canonical_units: 1 - description: Daily averaged Charnock parameter for air-sea friction (only needed for med history output) + description: Daily averaged Charnock parameter (only needed for mediator history output) # - standard_name: Sw_tm02_avg canonical_units: s - description: Daily averaged mean wave period of the second moment (only needed for med history output) - # - - standard_name: Sw_faw_avg - canonical_units: W m-2 - description: Daily averaged wind to wave energy flux (only needed for med history output) + alias: Total_m2-period + description: Daily averaged mean wave period of the second moment (only needed for mediator history output) # - standard_name: Sw_foc_avg - canonical_units: W m-2 - description: Daily averaged wave to ocean energy flux (only needed for med history output) - # - - standard_name: Sw_cu_avg - canonical_units: m/s - description: Daily averaged surface ocean current zonal (only needed for med history output) + canonical_units: W/m3 + description: Daily averaged wave to ocean energy flux (only needed for mediator history output) # - - standard_name: Sw_cv_avg - canonical_units: m/s - description: Daily averaged surface ocean current meridional (only needed for med history output) + - standard_name: Sw_faw_avg + canonical_units: W/m3 + description: Daily averaged wind to wave energy flux (only needed for mediator history output) # - standard_name: Sw_ifrac_avg canonical_units: 1 - description: Daily averaged sea ice fraction from the ice model (only needed for med history output) + description: Daily averaged sea ice concentration (only needed for mediator history output) # - standard_name: Sw_thick_avg canonical_units: m - description: Daily averaged sea ice thickness from the ice model (only needed for med history output) + description: Daily averaged sea ice thickness (only needed for mediator history output) # - standard_name: Sw_tauicex_avg - canonical_units: N m-2 - description: Daily averaged wave to ice stress zonal (only needed for med history output) + canonical_units: m2/s2 + description: Daily averaged x component of momentum flux to sea ice (only needed for mediator history output) # - standard_name: Sw_tauicey_avg - canonical_units: N m-2 - description: Daily averaged wave to ice stress meridional (only needed for med history output) + canonical_units: m2/s2 + description: Daily averaged y component of momentum flux to sea ice (only needed for mediator history output)