diff --git a/cime_config/allactive/config_pesall.xml b/cime_config/allactive/config_pesall.xml
index 0d5f24565966..5953504dd521 100644
--- a/cime_config/allactive/config_pesall.xml
+++ b/cime_config/allactive/config_pesall.xml
@@ -624,6 +624,36 @@
0
+
+ anvil --compset WCYCL+ww3 --res ne30pg2_EC30to60E2r2_wQU225EC30to60E2r2
+
+ 1350
+ 72
+ 72
+ 1296
+ 180
+ 1368
+ 252
+
+
+ 0
+ 1296
+ 1296
+ 0
+ 1368
+ 0
+ 1548
+
+
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+
+
anvil: --compset BGC* --res ne30pg2_r05_EC30to60E2r2 on 30 nodes pure-MPI, ~3 sypd
@@ -644,6 +674,38 @@
+
+
+ chrysalis --compset WCYCL+ww3 --res ne30pg2_EC30to60E2r2_wQU225EC30to60E2r2
+
+ 1024
+ 384
+ 384
+ 640
+ 1024
+ 256
+ 640
+
+
+ 0
+ 640
+ 640
+ 0
+ 1024
+ 0
+ 1280
+
+
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+
+
+
crusher: --compset BGC* --res ne30pg2_r05_EC30to60E2r2 on 2 nodes pure-MPI
@@ -2202,62 +2264,6 @@
-
-
-
- none
-
- 1350
- 72
- 72
- 1296
- 1296
- 216
- 612
-
-
- 1296
- 1296
- 1368
- 1584
-
-
-
-
-
-
-
- --compset WCYCL* --res ne30pg2_EC30to60E2r2_wQU225EC30to60E2r2 on 48 nodes pure-MPI, ~8.8 sypd
-
- 1350
- 288
- 288
- 1080
- 360
- 1080
- 612
-
-
- 1
- 1
- 1
- 1
- 1
- 1
- 1
-
-
- 0
- 1080
- 1080
- 0
- 1368
- 0
- 1728
-
-
-
-
diff --git a/cime_config/config_grids.xml b/cime_config/config_grids.xml
index ddb1df949ac3..a1c805bcb37d 100755
--- a/cime_config/config_grids.xml
+++ b/cime_config/config_grids.xml
@@ -2405,6 +2405,16 @@
EC30to60E2r2
+
+ ne30np4.pg2
+ r05
+ IcoswISC30E3r5
+ r05
+ null
+ wQU225Icos30E3r5
+ IcoswISC30E3r5
+
+
ne30np4.pg2
ne30np4.pg2
@@ -3476,6 +3486,13 @@
$DIN_LOC_ROOT/share/domains/domain.ocn.wQU225EC30to60E2r2.220224.nc
WW3 unstructured QU 225km global grid with EC30to60E2r2 coastlines
+
+
+ 97988
+ 1
+ $DIN_LOC_ROOT/share/domains/domain.ocn.wQU225Icos30E3r5.240910.nc
+ WW3 unstructured QU 225km global grid with ICOS30 coastlines
+
@@ -3636,7 +3653,10 @@
ATM2ROF_FMAPNAME
ATM2ROF_SMAPNAME
ATM2WAV_SMAPNAME
+ WAV2ATM_SMAPNAME
OCN2WAV_SMAPNAME
+ WAV2OCN_SMAPNAME
+ WAV2OCN_FMAPNAME
ICE2WAV_SMAPNAME
ROF2OCN_LIQ_RMAPNAME
@@ -5040,6 +5060,12 @@
+
+
+
+
+
+
@@ -5054,10 +5080,18 @@
+
+
+
+
+
+
+
+
diff --git a/cime_config/tests.py b/cime_config/tests.py
index 37812cf51ea0..a72c4376f0b7 100644
--- a/cime_config/tests.py
+++ b/cime_config/tests.py
@@ -822,10 +822,11 @@
"e3sm_wav_developer" : {
"time" : "0:45:00",
"tests" : (
- "ERS.TL319_EC30to60E2r2_wQU225EC30to60E2r2.GMPAS-JRA1p5-WW3.ww3-jra_1958",
- "PEM.TL319_EC30to60E2r2_wQU225EC30to60E2r2.GMPAS-JRA1p5-WW3.ww3-jra_1958",
- "PET.TL319_EC30to60E2r2_wQU225EC30to60E2r2.GMPAS-JRA1p5-WW3.ww3-jra_1958",
"SMS_D_Ln3.TL319_EC30to60E2r2_wQU225EC30to60E2r2.GMPAS-JRA1p5-WW3.ww3-jra_1958",
+ "ERS.ne30pg2_IcoswISC30E3r5_wQU225Icos30E3r5.WCYCL1850-WW3",
+ "PEM.ne30pg2_IcoswISC30E3r5_wQU225Icos30E3r5.WCYCL1850-WW3",
+ "PET.ne30pg2_IcoswISC30E3r5_wQU225Icos30E3r5.WCYCL1850-WW3",
+ "SMS_D_Ln3.ne30pg2_IcoswISC30E3r5_wQU225Icos30E3r5.WCYCL1850-WW3",
)
},
diff --git a/components/elm/src/biogeochem/AllocationMod.F90 b/components/elm/src/biogeochem/AllocationMod.F90
index 5c315fc1769b..ba14dbc352db 100644
--- a/components/elm/src/biogeochem/AllocationMod.F90
+++ b/components/elm/src/biogeochem/AllocationMod.F90
@@ -645,7 +645,7 @@ subroutine Allocation1_PlantNPDemand (bounds, num_soilc, filter_soilc, num_soilp
if (stem_leaf(ivt(p)) < 0._r8) then
if (stem_leaf(ivt(p)) == -1._r8) then
- f3 = (2.7/(1.0+exp(-0.004*(annsum_npp(p) - 300.0)))) - 0.4
+ f3 = max((2.7/(1.0+exp(-0.004*(annsum_npp(p) - 300.0)))) - 0.4_r8, 0.2_r8)
else
f3 = max((-1.0_r8*stem_leaf(ivt(p))*2.7_r8)/(1.0_r8+exp(-0.004_r8*(annsum_npp(p) - &
300.0_r8))) - 0.4_r8, 0.2_r8)
@@ -2118,7 +2118,7 @@ subroutine Allocation3_PlantCNPAlloc (bounds , &
if (stem_leaf(ivt(p)) < 0._r8) then
if (stem_leaf(ivt(p)) == -1._r8) then
- f3 = (2.7/(1.0+exp(-0.004*(annsum_npp(p) - 300.0)))) - 0.4
+ f3 = max((2.7/(1.0+exp(-0.004*(annsum_npp(p) - 300.0)))) - 0.4_r8, 0.2_r8)
else
f3 = max((-1.0_r8*stem_leaf(ivt(p))*2.7_r8)/(1.0_r8+exp(-0.004_r8*(annsum_npp(p) - &
300.0_r8))) - 0.4_r8, 0.2_r8)
diff --git a/components/mpas-ocean/bld/build-namelist b/components/mpas-ocean/bld/build-namelist
index 460b9ecda428..3c44d8960266 100755
--- a/components/mpas-ocean/bld/build-namelist
+++ b/components/mpas-ocean/bld/build-namelist
@@ -64,7 +64,6 @@ OPTIONS
(Needed to run build-namelist from SourceMods dir)
-inst_string inst_string variable
-ocn_bgc ocean BGC configuration
- -ocn_wave ocean wave coupling flag
-ocn_co2_type how atm co2 is set within MPASO
-atm_co2_const_val value of atm co2 if ocn_co2_type = constant
-ice_bgc check for coupling with sea ice BGC
@@ -118,7 +117,6 @@ my %opts = ( help => 0,
decomp_prefix => undef,
date_stamp => undef,
ocn_bgc => undef,
- ocn_wave => undef,
ocn_co2_type => undef,
atm_co2_const_val => undef,
ice_bgc => undef,
@@ -145,7 +143,6 @@ GetOptions(
"decomp_prefix=s" => \$opts{'decomp_prefix'},
"date_stamp=s" => \$opts{'date_stamp'},
"ocn_bgc=s" => \$opts{'ocn_bgc'},
- "ocn_wave=s" => \$opts{'ocn_wave'},
"ocn_co2_type=s" => \$opts{'ocn_co2_type'},
"atm_co2_const_val=s" => \$opts{'atm_co2_const_val'},
"ice_bgc=s" => \$opts{'ice_bgc'},
@@ -189,7 +186,6 @@ my $OCN_SGR = $opts{'ocn_sgr'};
my $decomp_prefix = $opts{'decomp_prefix'};
my $date_stamp = $opts{'date_stamp'};
my $ocn_bgc = $opts{'ocn_bgc'};
-my $ocn_wave = $opts{'ocn_wave'};
my $ocn_co2_type = $opts{'ocn_co2_type'};
my $atm_co2_const_val = $opts{'atm_co2_const_val'};
my $ice_bgc = $opts{'ice_bgc'};
@@ -444,6 +440,8 @@ my $RUN_STARTDATE = "$xmlvars{'RUN_STARTDATE'}";
my $START_TOD = "$xmlvars{'START_TOD'}";
my $RUN_REFDATE = "$xmlvars{'RUN_REFDATE'}";
my $CONTINUE_RUN = "$xmlvars{'CONTINUE_RUN'}";
+my $COMP_OCN = "$xmlvars{'COMP_OCN'}";
+my $COMP_WAV = "$xmlvars{'COMP_WAV'}";
my $output_r = "./${CASE}.mpaso.r";
my $output_h = "./${CASE}.mpaso.h";
@@ -667,7 +665,7 @@ add_default($nl, 'configure_cvmix_kpp_minimum_OBL_under_sea_ice');
add_default($nl, 'config_cvmix_kpp_stop_OBL_search');
add_default($nl, 'config_cvmix_kpp_use_enhanced_diff');
add_default($nl, 'config_cvmix_kpp_nonlocal_with_implicit_mix');
-if ($ocn_wave eq 'true' ) {
+if ($COMP_WAV eq 'ww3' and $COMP_OCN eq 'mpaso' ) {
add_default($nl, 'config_cvmix_kpp_use_theory_wave', 'val'=>'.false.');
add_default($nl, 'config_cvmix_kpp_use_active_wave', 'val'=>'.true.');
add_default($nl, 'config_cvmix_kpp_langmuir_mixing_opt', 'val'=>'LWF16');
@@ -682,10 +680,12 @@ if ($ocn_wave eq 'true' ) {
# Namelist group: wave_coupling #
#################################
-if ($ocn_wave eq 'true' ) {
+if ($COMP_WAV eq 'ww3' and $COMP_OCN eq 'mpaso' ) {
add_default($nl, 'config_use_active_wave', 'val'=>'.true.');
+ add_default($nl, 'config_momentum_use_active_wave', 'val'=>'.true.');
} else {
add_default($nl, 'config_use_active_wave', 'val'=>'.false.');
+ add_default($nl, 'config_momentum_use_active_wave', 'val'=>'.false.');
}
add_default($nl, 'config_n_stokes_drift_wavenumber_partitions');
diff --git a/components/mpas-ocean/bld/build-namelist-section b/components/mpas-ocean/bld/build-namelist-section
index c5dad5d935a9..5e24d7617858 100644
--- a/components/mpas-ocean/bld/build-namelist-section
+++ b/components/mpas-ocean/bld/build-namelist-section
@@ -203,6 +203,7 @@ add_default($nl, 'config_cvmix_kpp_use_active_wave');
#################################
add_default($nl, 'config_use_active_wave');
+add_default($nl, 'config_momentum_use_active_wave');
add_default($nl, 'config_n_stokes_drift_wavenumber_partitions');
########################
diff --git a/components/mpas-ocean/bld/namelist_files/namelist_defaults_mpaso.xml b/components/mpas-ocean/bld/namelist_files/namelist_defaults_mpaso.xml
index 3b93400f4e87..bae39a80250a 100644
--- a/components/mpas-ocean/bld/namelist_files/namelist_defaults_mpaso.xml
+++ b/components/mpas-ocean/bld/namelist_files/namelist_defaults_mpaso.xml
@@ -337,6 +337,7 @@
.false.
+.false.
6
diff --git a/components/mpas-ocean/bld/namelist_files/namelist_definition_mpaso.xml b/components/mpas-ocean/bld/namelist_files/namelist_definition_mpaso.xml
index bea1e98d9de8..ec2944657ee6 100644
--- a/components/mpas-ocean/bld/namelist_files/namelist_definition_mpaso.xml
+++ b/components/mpas-ocean/bld/namelist_files/namelist_definition_mpaso.xml
@@ -1094,6 +1094,14 @@ Valid values: .true. or .false.
Default: Defined in namelist_defaults.xml
+
+Flag for correcting momentum in ocean due waves. Requires config_use_active_wave = .true.
+
+Valid values: .true. or .false.
+Default: Defined in namelist_defaults.xml
+
+
Number of wavenumber partitions to be used in reconstructing wave-induced Stokes drift profile
diff --git a/components/mpas-ocean/cime_config/buildnml b/components/mpas-ocean/cime_config/buildnml
index d45d94344fe7..4e5eb54478e9 100755
--- a/components/mpas-ocean/cime_config/buildnml
+++ b/components/mpas-ocean/cime_config/buildnml
@@ -37,7 +37,6 @@ def buildnml(case, caseroot, compname):
ocn_ismf = case.get_value("MPASO_ISMF")
ocn_sgr = case.get_value("MPASO_SGR")
ocn_bgc = case.get_value("MPASO_BGC")
- ocn_wave = case.get_value("MPASO_WAVE")
ocn_tidal_mixing = case.get_value("MPASO_TIDAL_MIXING")
ocn_co2_type = case.get_value("OCN_CO2_TYPE")
atm_co2_const_val = case.get_value("CCSM_CO2_PPMV")
@@ -523,7 +522,6 @@ def buildnml(case, caseroot, compname):
sysmod += " -ocn_ismf '{}'".format(ocn_ismf)
sysmod += " -ocn_sgr '{}'".format(ocn_sgr)
sysmod += " -ocn_bgc '{}'".format(ocn_bgc)
- sysmod += " -ocn_wave '{}'".format(ocn_wave)
sysmod += " -ocn_tidal_mixing '{}'".format(ocn_tidal_mixing)
sysmod += " -ocn_co2_type '{}'".format(ocn_co2_type)
sysmod += " -atm_co2_const_val '{}'".format(atm_co2_const_val)
@@ -974,6 +972,8 @@ def buildnml(case, caseroot, compname):
lines.append(' ')
lines.append(' ')
lines.append(' ')
+ lines.append(' ')
+ lines.append(' ')
if ocn_bgc in ['eco_only', 'eco_and_dms', 'eco_and_macromolecules', 'eco_and_dms_and_macromolecules']:
lines.append(' ')
lines.append(' ')
@@ -993,27 +993,6 @@ def buildnml(case, caseroot, compname):
lines.append(' ')
lines.append('')
lines.append('')
- if ocn_wave == 'true':
- lines.append('')
- lines.append('')
- lines.append(' ')
- lines.append(' ')
- lines.append(' ')
- lines.append(' ')
- lines.append(' ')
- lines.append(' ')
- lines.append(' ')
- lines.append('')
- lines.append('')
lines.append('')
lines.append(' ')
lines.append(' ')
+ if case.get_value('COMP_WAV') == 'ww3' and case.get_value('COMP_OCN') == 'mpaso':
+ lines.append(' ')
+ lines.append(' ')
+ lines.append(' ')
+ lines.append(' ')
if ocn_bgc in ['eco_only', 'eco_and_dms', 'eco_and_macromolecules', 'eco_and_dms_and_macromolecules']:
lines.append(' ')
lines.append(' ')
@@ -1350,6 +1334,15 @@ def buildnml(case, caseroot, compname):
lines.append(' ')
lines.append(' ')
lines.append(' ')
+ if case.get_value('COMP_WAV') == 'ww3' and case.get_value('COMP_OCN') == 'mpaso':
+ lines.append(' ')
+ lines.append(' ')
+ lines.append(' ')
+ lines.append(' ')
+ lines.append(' ')
+ lines.append(' ')
+ lines.append(' ')
+ lines.append(' ')
if not (ocn_grid.startswith("oRRS1") or ocn_grid.startswith("RRSwISC6")):
lines.append(' ')
lines.append(' ')
@@ -1528,11 +1521,6 @@ def buildnml(case, caseroot, compname):
lines.append(' ')
lines.append(' ')
lines.append(' ')
- if ocn_wave == 'true':
- lines.append(' ')
- lines.append(' ')
- lines.append(' ')
- lines.append(' ')
lines.append('')
lines.append('')
@@ -1567,6 +1555,15 @@ def buildnml(case, caseroot, compname):
lines.append(' ')
lines.append(' ')
lines.append(' ')
+ if case.get_value('COMP_WAV') == 'ww3' and case.get_value('COMP_OCN') == 'mpaso':
+ lines.append(' ')
+ lines.append(' ')
+ lines.append(' ')
+ lines.append(' ')
+ lines.append(' ')
+ lines.append(' ')
+ lines.append(' ')
+ lines.append(' ')
if ocn_iceberg == 'true':
lines.append(' ')
@@ -1633,6 +1630,15 @@ def buildnml(case, caseroot, compname):
lines.append(' ')
lines.append(' ')
lines.append(' ')
+ if case.get_value('COMP_WAV') == 'ww3' and case.get_value('COMP_OCN') == 'mpaso':
+ lines.append(' ')
+ lines.append(' ')
+ lines.append(' ')
+ lines.append(' ')
+ lines.append(' ')
+ lines.append(' ')
+ lines.append(' ')
+ lines.append(' ')
if ocn_iceberg == 'true':
lines.append(' ')
diff --git a/components/mpas-ocean/driver/mpaso_cpl_indices.F b/components/mpas-ocean/driver/mpaso_cpl_indices.F
index f099cf8ea46a..64e37c510a02 100644
--- a/components/mpas-ocean/driver/mpaso_cpl_indices.F
+++ b/components/mpas-ocean/driver/mpaso_cpl_indices.F
@@ -132,6 +132,13 @@ module mpaso_cpl_indices
integer :: index_x2o_Sw_Hs ! Significant wave height
integer :: index_x2o_Sw_Fp ! Peak wave frequency
integer :: index_x2o_Sw_Dp ! Peak wave direction
+ integer :: index_x2o_Sw_Charn !Charnock coefficient accounting for the wave stress
+ integer :: index_x2o_Faww_Tawx !Wave supported stress
+ integer :: index_x2o_Faww_Tawy !Wave supported stress
+ integer :: index_x2o_Fwow_Twox !Wave to Ocean momentum flux
+ integer :: index_x2o_Fwow_Twoy !Wave to Ocean momentum flux
+ integer :: index_x2o_Faow_Tocx !Wave Net Ocean momentum flux
+ integer :: index_x2o_Faow_Tocy !Wave Net Ocean momentum flux
! drv -> glc and internal drv fields
@@ -171,7 +178,7 @@ module mpaso_cpl_indices
contains
subroutine mpaso_cpl_indices_set( )
-
+ use seq_flds_mod, only : wav_ocn_coup
type(mct_aVect) :: o2x ! temporary
type(mct_aVect) :: x2o ! temporary
@@ -316,21 +323,30 @@ subroutine mpaso_cpl_indices_set( )
index_x2o_Sg_icemask = mct_avect_indexra(x2o,'Sg_icemask_grounded')
index_x2o_Sg_icemask = mct_avect_indexra(x2o,'Sg_icemask_floating')
- index_x2o_Sw_ustokes_wavenumber_1 = mct_avect_indexra(x2o,'Sw_ustokes_wavenumber_1')
- index_x2o_Sw_vstokes_wavenumber_1 = mct_avect_indexra(x2o,'Sw_vstokes_wavenumber_1')
- index_x2o_Sw_ustokes_wavenumber_2 = mct_avect_indexra(x2o,'Sw_ustokes_wavenumber_2')
- index_x2o_Sw_vstokes_wavenumber_2 = mct_avect_indexra(x2o,'Sw_vstokes_wavenumber_2')
- index_x2o_Sw_ustokes_wavenumber_3 = mct_avect_indexra(x2o,'Sw_ustokes_wavenumber_3')
- index_x2o_Sw_vstokes_wavenumber_3 = mct_avect_indexra(x2o,'Sw_vstokes_wavenumber_3')
- index_x2o_Sw_ustokes_wavenumber_4 = mct_avect_indexra(x2o,'Sw_ustokes_wavenumber_4')
- index_x2o_Sw_vstokes_wavenumber_4 = mct_avect_indexra(x2o,'Sw_vstokes_wavenumber_4')
- index_x2o_Sw_ustokes_wavenumber_5 = mct_avect_indexra(x2o,'Sw_ustokes_wavenumber_5')
- index_x2o_Sw_vstokes_wavenumber_5 = mct_avect_indexra(x2o,'Sw_vstokes_wavenumber_5')
- index_x2o_Sw_ustokes_wavenumber_6 = mct_avect_indexra(x2o,'Sw_ustokes_wavenumber_6')
- index_x2o_Sw_vstokes_wavenumber_6 = mct_avect_indexra(x2o,'Sw_vstokes_wavenumber_6')
- index_x2o_Sw_Hs = mct_avect_indexra(x2o,'Sw_Hs')
- index_x2o_Sw_Fp = mct_avect_indexra(x2o,'Sw_Fp')
- index_x2o_Sw_Dp = mct_avect_indexra(x2o,'Sw_Dp')
+ if (wav_ocn_coup == 'two') then
+ index_x2o_Sw_ustokes_wavenumber_1 = mct_avect_indexra(x2o,'Sw_ustokes_wavenumber_1')
+ index_x2o_Sw_vstokes_wavenumber_1 = mct_avect_indexra(x2o,'Sw_vstokes_wavenumber_1')
+ index_x2o_Sw_ustokes_wavenumber_2 = mct_avect_indexra(x2o,'Sw_ustokes_wavenumber_2')
+ index_x2o_Sw_vstokes_wavenumber_2 = mct_avect_indexra(x2o,'Sw_vstokes_wavenumber_2')
+ index_x2o_Sw_ustokes_wavenumber_3 = mct_avect_indexra(x2o,'Sw_ustokes_wavenumber_3')
+ index_x2o_Sw_vstokes_wavenumber_3 = mct_avect_indexra(x2o,'Sw_vstokes_wavenumber_3')
+ index_x2o_Sw_ustokes_wavenumber_4 = mct_avect_indexra(x2o,'Sw_ustokes_wavenumber_4')
+ index_x2o_Sw_vstokes_wavenumber_4 = mct_avect_indexra(x2o,'Sw_vstokes_wavenumber_4')
+ index_x2o_Sw_ustokes_wavenumber_5 = mct_avect_indexra(x2o,'Sw_ustokes_wavenumber_5')
+ index_x2o_Sw_vstokes_wavenumber_5 = mct_avect_indexra(x2o,'Sw_vstokes_wavenumber_5')
+ index_x2o_Sw_ustokes_wavenumber_6 = mct_avect_indexra(x2o,'Sw_ustokes_wavenumber_6')
+ index_x2o_Sw_vstokes_wavenumber_6 = mct_avect_indexra(x2o,'Sw_vstokes_wavenumber_6')
+ index_x2o_Sw_Hs = mct_avect_indexra(x2o,'Sw_Hs')
+ index_x2o_Sw_Fp = mct_avect_indexra(x2o,'Sw_Fp')
+ index_x2o_Sw_Dp = mct_avect_indexra(x2o,'Sw_Dp')
+ index_x2o_Sw_Charn = mct_avect_indexra(x2o,'Sw_Charn')
+ index_x2o_Faww_Tawx = mct_avect_indexra(x2o,'Faww_Tawx')
+ index_x2o_Faww_Tawy = mct_avect_indexra(x2o,'Faww_Tawy')
+ index_x2o_Fwow_Twox = mct_avect_indexra(x2o,'Fwow_Twox')
+ index_x2o_Fwow_Twoy = mct_avect_indexra(x2o,'Fwow_Twoy')
+ index_x2o_Faow_Tocx = mct_avect_indexra(x2o,'Faow_Tocx')
+ index_x2o_Faow_Tocy = mct_avect_indexra(x2o,'Faow_Tocy')
+ endif
call mct_aVect_clean(x2o)
call mct_aVect_clean(o2x)
diff --git a/components/mpas-ocean/driver/ocn_comp_mct.F b/components/mpas-ocean/driver/ocn_comp_mct.F
index d1b140563bb7..ccf627f55f55 100644
--- a/components/mpas-ocean/driver/ocn_comp_mct.F
+++ b/components/mpas-ocean/driver/ocn_comp_mct.F
@@ -1789,9 +1789,16 @@ subroutine ocn_import_mct(x2o_o, errorCode)!{{{
landIceHeatFluxField, &
landIceFractionField, &
windSpeed10mField, &
- significantWaveHeightField, &
+ significantWaveHeightField, &
peakWaveFrequencyField, &
- peakWaveDirectionField
+ peakWaveDirectionField, &
+ charnockSeaStateField, &
+ waveSupportedZonalWindStressField, &
+ waveSupportedMeridionalWindStressField, &
+ waveToOceanZonalWindStressField, &
+ waveToOceanMeridionalWindStressField, &
+ waveNetOceanZonalWindStressField, &
+ waveNetOceanMeridionalWindStressField
!landIcePressureField
type (field2DReal), pointer :: iceFluxPhytoCField, &
@@ -1843,7 +1850,14 @@ subroutine ocn_import_mct(x2o_o, errorCode)!{{{
windSpeed10m, &
significantWaveHeight, &
peakWaveFrequency, &
- peakWaveDirection
+ peakWaveDirection, &
+ charnockSeaState, &
+ waveSupportedZonalWindStress, &
+ waveSupportedMeridionalWindStress, &
+ waveToOceanZonalWindStress, &
+ waveToOceanMeridionalWindStress, &
+ waveNetOceanZonalWindStress, &
+ waveNetOceanMeridionalWindStress
!landIcePressure
real (kind=RKIND), dimension(:), pointer :: latCell
@@ -1930,6 +1944,13 @@ subroutine ocn_import_mct(x2o_o, errorCode)!{{{
call mpas_pool_get_field(forcingPool, 'significantWaveHeight', significantWaveHeightField)
call mpas_pool_get_field(forcingPool, 'peakWaveFrequency', peakWaveFrequencyField)
call mpas_pool_get_field(forcingPool, 'peakWaveDirection', peakWaveDirectionField)
+ call mpas_pool_get_field(forcingPool, 'charnockSeaState', charnockSeaStateField)
+ call mpas_pool_get_field(forcingPool, 'waveSupportedZonalWindStress', waveSupportedZonalWindStressField)
+ call mpas_pool_get_field(forcingPool, 'waveSupportedMeridionalWindStress', waveSupportedMeridionalWindStressField)
+ call mpas_pool_get_field(forcingPool, 'waveToOceanZonalWindStress', waveToOceanZonalWindStressField)
+ call mpas_pool_get_field(forcingPool, 'waveToOceanMeridionalWindStress', waveToOceanMeridionalWindStressField)
+ call mpas_pool_get_field(forcingPool, 'waveNetOceanZonalWindStress', waveNetOceanZonalWindStressField)
+ call mpas_pool_get_field(forcingPool, 'waveNetOceanMeridionalWindStress', waveNetOceanMeridionalWindStressField)
call mpas_pool_get_field(forcingPool, 'landIceFreshwaterFlux', landIceFreshwaterFluxField)
call mpas_pool_get_field(forcingPool, 'landIceHeatFlux', landIceHeatFluxField)
@@ -1976,6 +1997,13 @@ subroutine ocn_import_mct(x2o_o, errorCode)!{{{
significantWaveHeight => significantWaveHeightField % array
peakWaveFrequency => peakWaveFrequencyField % array
peakWaveDirection => peakWaveDirectionField % array
+ charnockSeaState => charnockSeaStateField % array
+ waveSupportedZonalWindStress => waveSupportedZonalWindStressField % array
+ waveSupportedMeridionalWindStress => waveSupportedMeridionalWindStressField % array
+ waveToOceanZonalWindStress => waveToOceanZonalWindStressField % array
+ waveToOceanMeridionalWindStress => waveToOceanMeridionalWindStressField % array
+ waveNetOceanZonalWindStress => waveNetOceanZonalWindStressField % array
+ waveNetOceanMeridionalWindStress => waveNetOceanMeridionalWindStressField % array
!landIcePressure => landIcePressureField % array
call mpas_pool_get_array(meshPool, 'latCell', latCell)
@@ -2083,10 +2111,18 @@ subroutine ocn_import_mct(x2o_o, errorCode)!{{{
do i = 1, nCellsSolve
n = n + 1
if ( windStressZonalField % isActive ) then
- windStressZonal(i) = x2o_o % rAttr(index_x2o_Foxx_taux, n)
+ if (config_momentum_use_active_wave) then
+ windStressZonal(i) = x2o_o % rAttr(index_x2o_Foxx_taux, n) - (x2o_o % rAttr(index_x2o_Faww_Tawx, n) - x2o_o % rAttr(index_x2o_Fwow_Twox, n))
+ else
+ windStressZonal(i) = x2o_o % rAttr(index_x2o_Foxx_taux, n)
+ endif
end if
if ( windStressMeridionalField % isActive ) then
- windStressMeridional(i) = x2o_o % rAttr(index_x2o_Foxx_tauy, n)
+ if (config_momentum_use_active_wave) then
+ windStressMeridional(i) = x2o_o % rAttr(index_x2o_Foxx_tauy, n) - (x2o_o % rAttr(index_x2o_Faww_Tawy, n) - x2o_o % rAttr(index_x2o_Fwow_Twoy, n))
+ else
+ windStressMeridional(i) = x2o_o % rAttr(index_x2o_Foxx_tauy, n)
+ endif
end if
if ( latentHeatFluxField % isActive ) then
@@ -2163,31 +2199,54 @@ subroutine ocn_import_mct(x2o_o, errorCode)!{{{
iceFraction(i) = x2o_o % rAttr(index_x2o_Si_ifrac, n)
end if
- if ( stokesDriftZonalWavenumberField % isActive ) then
- stokesDriftZonalWavenumber(1,i) = x2o_o % rAttr(index_x2o_Sw_ustokes_wavenumber_1, n)
- stokesDriftZonalWavenumber(2,i) = x2o_o % rAttr(index_x2o_Sw_ustokes_wavenumber_2, n)
- stokesDriftZonalWavenumber(3,i) = x2o_o % rAttr(index_x2o_Sw_ustokes_wavenumber_3, n)
- stokesDriftZonalWavenumber(4,i) = x2o_o % rAttr(index_x2o_Sw_ustokes_wavenumber_4, n)
- stokesDriftZonalWavenumber(5,i) = x2o_o % rAttr(index_x2o_Sw_ustokes_wavenumber_5, n)
- stokesDriftZonalWavenumber(6,i) = x2o_o % rAttr(index_x2o_Sw_ustokes_wavenumber_6, n)
- end if
- if ( stokesDriftMeridionalWavenumberField % isActive ) then
- stokesDriftMeridionalWavenumber(1,i) = x2o_o % rAttr(index_x2o_Sw_vstokes_wavenumber_1, n)
- stokesDriftMeridionalWavenumber(2,i) = x2o_o % rAttr(index_x2o_Sw_vstokes_wavenumber_2, n)
- stokesDriftMeridionalWavenumber(3,i) = x2o_o % rAttr(index_x2o_Sw_vstokes_wavenumber_3, n)
- stokesDriftMeridionalWavenumber(4,i) = x2o_o % rAttr(index_x2o_Sw_vstokes_wavenumber_4, n)
- stokesDriftMeridionalWavenumber(5,i) = x2o_o % rAttr(index_x2o_Sw_vstokes_wavenumber_5, n)
- stokesDriftMeridionalWavenumber(6,i) = x2o_o % rAttr(index_x2o_Sw_vstokes_wavenumber_6, n)
- end if
- if ( significantWaveHeightField % isActive ) then
- significantWaveHeight(i) = x2o_o % rAttr(index_x2o_Sw_Hs, n)
- end if
- if ( peakWaveFrequencyField % isActive ) then
- peakWaveFrequency(i) = x2o_o % rAttr(index_x2o_Sw_Fp, n)
- end if
- if ( peakWaveDirectionField % isActive ) then
- peakWaveDirection(i) = x2o_o % rAttr(index_x2o_Sw_Dp, n)
- end if
+ if (wav_ocn_coup == 'two') then
+ if ( stokesDriftZonalWavenumberField % isActive ) then
+ stokesDriftZonalWavenumber(1,i) = x2o_o % rAttr(index_x2o_Sw_ustokes_wavenumber_1, n)
+ stokesDriftZonalWavenumber(2,i) = x2o_o % rAttr(index_x2o_Sw_ustokes_wavenumber_2, n)
+ stokesDriftZonalWavenumber(3,i) = x2o_o % rAttr(index_x2o_Sw_ustokes_wavenumber_3, n)
+ stokesDriftZonalWavenumber(4,i) = x2o_o % rAttr(index_x2o_Sw_ustokes_wavenumber_4, n)
+ stokesDriftZonalWavenumber(5,i) = x2o_o % rAttr(index_x2o_Sw_ustokes_wavenumber_5, n)
+ stokesDriftZonalWavenumber(6,i) = x2o_o % rAttr(index_x2o_Sw_ustokes_wavenumber_6, n)
+ end if
+ if ( stokesDriftMeridionalWavenumberField % isActive ) then
+ stokesDriftMeridionalWavenumber(1,i) = x2o_o % rAttr(index_x2o_Sw_vstokes_wavenumber_1, n)
+ stokesDriftMeridionalWavenumber(2,i) = x2o_o % rAttr(index_x2o_Sw_vstokes_wavenumber_2, n)
+ stokesDriftMeridionalWavenumber(3,i) = x2o_o % rAttr(index_x2o_Sw_vstokes_wavenumber_3, n)
+ stokesDriftMeridionalWavenumber(4,i) = x2o_o % rAttr(index_x2o_Sw_vstokes_wavenumber_4, n)
+ stokesDriftMeridionalWavenumber(5,i) = x2o_o % rAttr(index_x2o_Sw_vstokes_wavenumber_5, n)
+ stokesDriftMeridionalWavenumber(6,i) = x2o_o % rAttr(index_x2o_Sw_vstokes_wavenumber_6, n)
+ end if
+ if ( significantWaveHeightField % isActive ) then
+ significantWaveHeight(i) = x2o_o % rAttr(index_x2o_Sw_Hs, n)
+ end if
+ if ( peakWaveFrequencyField % isActive ) then
+ peakWaveFrequency(i) = x2o_o % rAttr(index_x2o_Sw_Fp, n)
+ end if
+ if ( peakWaveDirectionField % isActive ) then
+ peakWaveDirection(i) = x2o_o % rAttr(index_x2o_Sw_Dp, n)
+ end if
+ if ( charnockSeaStateField % isActive ) then
+ charnockSeaState(i) = x2o_o % rAttr(index_x2o_Sw_Charn, n)
+ end if
+ if ( waveSupportedZonalWindStressField % isActive ) then
+ waveSupportedZonalWindStress(i) = x2o_o % rAttr(index_x2o_Faww_Tawx, n)
+ end if
+ if ( waveSupportedMeridionalWindStressField % isActive ) then
+ waveSupportedMeridionalWindStress(i) = x2o_o % rAttr(index_x2o_Faww_Tawy, n)
+ end if
+ if ( waveToOceanZonalWindStressField % isActive ) then
+ waveToOceanZonalWindStress(i) = x2o_o % rAttr(index_x2o_Fwow_Twox, n)
+ end if
+ if ( waveToOceanMeridionalWindStressField % isActive ) then
+ waveToOceanMeridionalWindStress(i) = x2o_o % rAttr(index_x2o_Fwow_Twoy, n)
+ end if
+ if ( waveNetOceanZonalWindStressField % isActive ) then
+ waveNetOceanZonalWindStress(i) = x2o_o % rAttr(index_x2o_Faow_Tocx, n)
+ end if
+ if ( waveNetOceanMeridionalWindStressField % isActive ) then
+ waveNetOceanMeridionalWindStress(i) = x2o_o % rAttr(index_x2o_Faow_Tocy, n)
+ end if
+ endif
if (config_cvmix_kpp_use_theory_wave) then
if ( windSpeed10mField% isActive ) then
@@ -2365,6 +2424,13 @@ subroutine ocn_import_mct(x2o_o, errorCode)!{{{
call mpas_pool_get_field(forcingPool, 'significantWaveHeight', significantWaveHeightField)
call mpas_pool_get_field(forcingPool, 'peakWaveFrequency', peakWaveFrequencyField)
call mpas_pool_get_field(forcingPool, 'peakWaveDirection', peakWaveDirectionField)
+ call mpas_pool_get_field(forcingPool, 'charnockSeaState', charnockSeaStateField)
+ call mpas_pool_get_field(forcingPool, 'waveSupportedZonalWindStress', waveSupportedZonalWindStressField)
+ call mpas_pool_get_field(forcingPool, 'waveSupportedMeridionalWindStress', waveSupportedMeridionalWindStressField)
+ call mpas_pool_get_field(forcingPool, 'waveToOceanZonalWindStress', waveToOceanZonalWindStressField)
+ call mpas_pool_get_field(forcingPool, 'waveToOceanMeridionalWindStress', waveToOceanMeridionalWindStressField)
+ call mpas_pool_get_field(forcingPool, 'waveNetOceanZonalWindStress', waveNetOceanZonalWindStressField)
+ call mpas_pool_get_field(forcingPool, 'waveNetOceanMeridionalWindStress', waveNetOceanMeridionalWindStressField)
call mpas_pool_get_field(forcingPool, 'landIceFreshwaterFlux', landIceFreshwaterFluxField)
call mpas_pool_get_field(forcingPool, 'landIceHeatFlux', landIceHeatFluxField)
@@ -2501,6 +2567,27 @@ subroutine ocn_import_mct(x2o_o, errorCode)!{{{
if ( peakWaveDirectionField % isActive ) then
call mpas_dmpar_exch_halo_field(peakWaveDirectionField)
end if
+ if ( charnockSeaStateField % isActive ) then
+ call mpas_dmpar_exch_halo_field(charnockSeaStateField)
+ end if
+ if ( waveSupportedZonalWindStressField % isActive ) then
+ call mpas_dmpar_exch_halo_field(waveSupportedZonalWindStressField)
+ end if
+ if ( waveSupportedMeridionalWindStressField % isActive ) then
+ call mpas_dmpar_exch_halo_field(waveSupportedMeridionalWindStressField)
+ end if
+ if ( waveToOceanZonalWindStressField % isActive ) then
+ call mpas_dmpar_exch_halo_field(waveToOceanZonalWindStressField)
+ end if
+ if ( waveToOceanMeridionalWindStressField % isActive ) then
+ call mpas_dmpar_exch_halo_field(waveToOceanMeridionalWindStressField)
+ end if
+ if ( waveNetOceanZonalWindStressField % isActive ) then
+ call mpas_dmpar_exch_halo_field(waveNetOceanZonalWindStressField)
+ end if
+ if ( waveNetOceanMeridionalWindStressField % isActive ) then
+ call mpas_dmpar_exch_halo_field(waveNetOceanMeridionalWindStressField)
+ end if
if ( landIceFreshwaterFluxField % isActive ) then
call mpas_dmpar_exch_halo_field(landIceFreshwaterFluxField)
diff --git a/components/mpas-ocean/src/Registry.xml b/components/mpas-ocean/src/Registry.xml
index 2a21e22f40d2..1da773a25579 100644
--- a/components/mpas-ocean/src/Registry.xml
+++ b/components/mpas-ocean/src/Registry.xml
@@ -654,6 +654,10 @@
description="Flag for using prognostic waves. Controls the allocation of wave arrays and computation of Stokes drift profiles."
possible_values=".true. or .false."
/>
+
+
+
+
+
+
+
+
"'${WAV_GRID}'");
add_default($nl, 'grid%nml');
add_default($nl, 'grid%type');
add_default($nl, 'grid%coord');
@@ -387,11 +387,6 @@ if ($NML_TYPE eq "ww3_grid_nml") {
add_default($nl, 'unrot');
add_default($nl, 'ussp', 'val'=>"1");
- #add_default($nl, 'iussp', 'val'=>"3");
- #add_default($nl, 'stk_wn', 'val'=>"0.04,0.11,0.3305");
- #add_default($nl, 'stk_wn', 'val'=>"0.025,0.08,0.16,0.35");
- #add_default($nl, 'iussp', 'val'=>"4");
- #add_default($nl, 'stk_wn', 'val'=>"0.025,0.08,0.16,0.35");
add_default($nl, 'iussp', 'val'=>"6");
add_default($nl, 'stk_wn', 'val'=>"0.01,0.03,0.06,0.1,0.2,0.35");
diff --git a/components/ww3/bld/namelist_files/namelist_defaults_ww3_grid.xml b/components/ww3/bld/namelist_files/namelist_defaults_ww3_grid.xml
index e8bb1d42b243..0e4d46740870 100644
--- a/components/ww3/bld/namelist_files/namelist_defaults_ww3_grid.xml
+++ b/components/ww3/bld/namelist_files/namelist_defaults_ww3_grid.xml
@@ -11,9 +11,9 @@ variables. Values that depend on the model configuration use
attributes to express the dependency.
-->
-1.07
+1.1
0.035
-50
+36
36
0.5
@@ -30,7 +30,7 @@ attributes to express the dependency.
450.0
30.0
-wQU225EC30to60E2r2
+wQU225Icos30E3r5
ww3_grid_namelists.nml
UNST
SPHE
diff --git a/components/ww3/bld/namelist_files/namelist_defaults_ww3_grid_nml.xml b/components/ww3/bld/namelist_files/namelist_defaults_ww3_grid_nml.xml
index 9573b482a45e..9ebe2b4e5059 100644
--- a/components/ww3/bld/namelist_files/namelist_defaults_ww3_grid_nml.xml
+++ b/components/ww3/bld/namelist_files/namelist_defaults_ww3_grid_nml.xml
@@ -158,8 +158,8 @@ attributes to express the dependency.
-obstructions_local.glo_unst.in
-obstructions_shadow.glo_unst.in
+obstructions_local.rtd.in
+obstructions_shadow.rtd.in
1.00
1.00
diff --git a/components/ww3/cime_config/buildnml b/components/ww3/cime_config/buildnml
index 3fe5d79d3f8e..c43a521c29cc 100755
--- a/components/ww3/cime_config/buildnml
+++ b/components/ww3/cime_config/buildnml
@@ -55,7 +55,8 @@ def buildnml(case, caseroot, compname):
"wQU225EC60to30sp50x36",
"wQU225EC30to60E2r2sp50x36",
"wQU225EC30to60E2r2sp36x36",
- "wQU225EC30to60E2r2sp25x36")
+ "wQU225EC30to60E2r2sp25x36",
+ "wQU225Icos30E3r5sp36x36")
expect((wav_grid+wav_spec) in wav_grid_supported, "Combination of WAV_GRID {} and WAV_SPEC {} is not supported in ww3. Choose from: '{}'".format(wav_grid,wav_spec,wav_grid_supported) )
#--------------------------------------------------------------------
diff --git a/components/ww3/cime_config/config_component.xml b/components/ww3/cime_config/config_component.xml
index 27523b8f42d9..63032eda31f1 100644
--- a/components/ww3/cime_config/config_component.xml
+++ b/components/ww3/cime_config/config_component.xml
@@ -42,8 +42,6 @@
env_case.xml
Option to set WW3 Spectral Resolution.
-
-
=========================================
diff --git a/components/ww3/cime_config/config_compsets.xml b/components/ww3/cime_config/config_compsets.xml
index 1fb44c188a63..01de245a23b2 100644
--- a/components/ww3/cime_config/config_compsets.xml
+++ b/components/ww3/cime_config/config_compsets.xml
@@ -15,13 +15,13 @@
- VWW3-CFSv2
- 2000_DATM%CFSv2_SLND_SICE_SOCN_SROF_SGLC_WW3%sp36x36
+ VWW3-JRA1p5
+ 2000_DATM%JRA-1p5_SLND_SICE_SOCN_SROF_SGLC_WW3%sp36x36
- VWW3-CFSR
- 2000_DATM%CFSR_SLND_SICE_SOCN_SROF_SGLC_WW3%sp36x36
+ F2010-WW3
+ 2010_EAM%CMIP6_ELM%CNPRDCTCBCTOP_MPASSI%PRES_DOCN%DOM_MOSART_SGLC_WW3%sp36x36
diff --git a/components/ww3/src/cpl/wav_comp_mct.F90 b/components/ww3/src/cpl/wav_comp_mct.F90
index d3e6fea347e6..1397ed9cfaef 100644
--- a/components/ww3/src/cpl/wav_comp_mct.F90
+++ b/components/ww3/src/cpl/wav_comp_mct.F90
@@ -136,7 +136,8 @@ MODULE WAV_COMP_MCT
sig, nk, zb, dmin, &
usspf
use w3wdatmd, only: time, w3ndat, w3setw, wlv, va, ust, ice
- use w3adatmd, only: ussp, w3naux, w3seta, sxx, sxy, syy, fliwnd, flcold, dw, cg, wn, hs, fp0, thp0
+ use w3adatmd, only: ussp, w3naux, w3seta, sxx, sxy, syy, fliwnd, flcold, dw, cg, wn, hs, fp0, thp0, &
+ charn, tauwix, tauwiy, tauox, tauoy, tauocx, tauocy
use w3idatmd, only: inflags1, inflags2,w3seti, w3ninp
USE W3IDATMD, ONLY: TC0, CX0, CY0, TCN, CXN, CYN, ICEP1, ICEP5, TI1, TI5
USE W3IDATMD, ONLY: TW0, WX0, WY0, DT0, TWN, WXN, WYN, DTN
@@ -175,7 +176,9 @@ MODULE WAV_COMP_MCT
index_w2x_Sw_ustokes_wavenumber_4, index_w2x_Sw_vstokes_wavenumber_4, &
index_w2x_Sw_ustokes_wavenumber_5, index_w2x_Sw_vstokes_wavenumber_5, &
index_w2x_Sw_ustokes_wavenumber_6, index_w2x_Sw_vstokes_wavenumber_6, &
- index_w2x_Sw_Hs, index_w2x_Sw_Fp, index_w2x_Sw_Dp
+ index_w2x_Sw_Hs, index_w2x_Sw_Fp, index_w2x_Sw_Dp, index_w2x_Sw_Charn, &
+ index_w2x_Faww_Tawx, index_w2x_Faww_Tawy, index_w2x_Fwow_Twox, &
+ index_w2x_Fwow_Twoy, index_w2x_Faow_Tocx, index_w2x_Faow_Tocy
use shr_sys_mod , only : shr_sys_flush, shr_sys_abort
@@ -723,6 +726,7 @@ SUBROUTINE WAV_INIT_MCT( EClock, cdata, x2w_w, w2x_w, NLFilename )
! F F 6 10 TAUICE TWI Wave to sea ice stress
! F F 6 11 PHICE FIC Wave to sea ice energy flux
! F F 6 12 USSP USP Partitioned surface Stokes drift
+ ! F F 6 13 TAUOC[X,Y] TOC Total momentum to the ocean
! -------------------------------------------------
! 7 Wave-bottom layer
! -------------------------------------------------
@@ -850,27 +854,6 @@ SUBROUTINE WAV_INIT_MCT( EClock, cdata, x2w_w, w2x_w, NLFilename )
! add call to gptl timer
- ! send initial state to driver
- do jsea=1, nseal
- w2x_w%rattr(index_w2x_Sw_ustokes_wavenumber_1,jsea) = 0.0
- w2x_w%rattr(index_w2x_Sw_vstokes_wavenumber_1,jsea) = 0.0
-
- w2x_w%rattr(index_w2x_Sw_ustokes_wavenumber_2,jsea) = 0.0
- w2x_w%rattr(index_w2x_Sw_vstokes_wavenumber_2,jsea) = 0.0
-
- w2x_w%rattr(index_w2x_Sw_ustokes_wavenumber_3,jsea) = 0.0
- w2x_w%rattr(index_w2x_Sw_vstokes_wavenumber_3,jsea) = 0.0
-
- w2x_w%rattr(index_w2x_Sw_ustokes_wavenumber_4,jsea) = 0.0
- w2x_w%rattr(index_w2x_Sw_vstokes_wavenumber_4,jsea) = 0.0
-
- w2x_w%rattr(index_w2x_Sw_ustokes_wavenumber_5,jsea) = 0.0
- w2x_w%rattr(index_w2x_Sw_vstokes_wavenumber_5,jsea) = 0.0
-
- w2x_w%rattr(index_w2x_Sw_ustokes_wavenumber_6,jsea) = 0.0
- w2x_w%rattr(index_w2x_Sw_vstokes_wavenumber_6,jsea) = 0.0
- enddo
-
! end redirection of share output to wav log
if ( iaproc .eq. napout ) then
@@ -1192,6 +1175,10 @@ SUBROUTINE WAV_RUN_MCT(EClock, cdata_w, x2w_w, w2x_w)
do i = 1,usspf(2)
call w3xyrtn(nseal,USSP(1:nseal,i),USSP(1:nseal,nk+i),AnglDL)
enddo
+ ! rotate surface stress variables for momentum coupling
+ call w3xyrtn(nseal, TAUWIX(1:nseal), TAUWIY(1:nseal), AnglDL)
+ call w3xyrtn(nseal, TAUOX(1:nseal), TAUOY(1:nseal), AnglDL)
+ call w3xyrtn(nseal, TAUOCX(1:nseal), TAUOCY(1:nseal), AnglDL)
! copy ww3 data to coupling datatype
do jsea=1, nseal
@@ -1200,49 +1187,72 @@ SUBROUTINE WAV_RUN_MCT(EClock, cdata_w, x2w_w, w2x_w)
IY = MAPSF(ISEA,2)
if (MAPSTA(IY,IX) .eq. 1) then
- w2x_w%rattr(index_w2x_Sw_Hs,jsea) = HS(jsea)
- w2x_w%rattr(index_w2x_Sw_Fp,jsea) = FP0(jsea)
- w2x_w%rattr(index_w2x_Sw_Dp,jsea) = THP0(jsea)
-
-
- w2x_w%rattr(index_w2x_Sw_ustokes_wavenumber_1,jsea) = USSP(jsea,1)
- w2x_w%rattr(index_w2x_Sw_vstokes_wavenumber_1,jsea) = USSP(jsea,nk+1)
-
- w2x_w%rattr(index_w2x_Sw_ustokes_wavenumber_2,jsea) = USSP(jsea,2)
- w2x_w%rattr(index_w2x_Sw_vstokes_wavenumber_2,jsea) = USSP(jsea,nk+2)
-
- w2x_w%rattr(index_w2x_Sw_ustokes_wavenumber_3,jsea) = USSP(jsea,3)
- w2x_w%rattr(index_w2x_Sw_vstokes_wavenumber_3,jsea) = USSP(jsea,nk+3)
-
- w2x_w%rattr(index_w2x_Sw_ustokes_wavenumber_4,jsea) = USSP(jsea,4)
- w2x_w%rattr(index_w2x_Sw_vstokes_wavenumber_4,jsea) = USSP(jsea,nk+4)
-
- w2x_w%rattr(index_w2x_Sw_ustokes_wavenumber_5,jsea) = USSP(jsea,5)
- w2x_w%rattr(index_w2x_Sw_vstokes_wavenumber_5,jsea) = USSP(jsea,nk+5)
-
- w2x_w%rattr(index_w2x_Sw_ustokes_wavenumber_6,jsea) = USSP(jsea,6)
- w2x_w%rattr(index_w2x_Sw_vstokes_wavenumber_6,jsea) = USSP(jsea,nk+6)
+ if (wav_atm_coup .eq. 'two' .or. wav_ocn_coup .eq. 'two') then
+ w2x_w%rattr(index_w2x_Sw_Charn,jsea) = CHARN(jsea)
+ endif
+ if (wav_ocn_coup .eq. 'two') then
+ w2x_w%rattr(index_w2x_Sw_Hs,jsea) = HS(jsea)
+ w2x_w%rattr(index_w2x_Sw_Fp,jsea) = FP0(jsea)
+ w2x_w%rattr(index_w2x_Sw_Dp,jsea) = THP0(jsea)
+ w2x_w%rattr(index_w2x_Faww_Tawx,jsea) = 1000*TAUWIX(jsea) !Conversion to N m^{-2} by multiplying by density of water (See eqn 2.99 WW3 Manual)
+ w2x_w%rattr(index_w2x_Faww_Tawy,jsea) = 1000*TAUWIY(jsea)
+ w2x_w%rattr(index_w2x_Fwow_Twox,jsea) = 1000*TAUOX(jsea)
+ w2x_w%rattr(index_w2x_Fwow_Twoy,jsea) = 1000*TAUOY(jsea)
+ w2x_w%rattr(index_w2x_Faow_Tocx,jsea) = TAUOCX(jsea)
+ w2x_w%rattr(index_w2x_Faow_Tocy,jsea) = TAUOCY(jsea)
+
+ w2x_w%rattr(index_w2x_Sw_ustokes_wavenumber_1,jsea) = USSP(jsea,1)
+ w2x_w%rattr(index_w2x_Sw_vstokes_wavenumber_1,jsea) = USSP(jsea,nk+1)
+
+ w2x_w%rattr(index_w2x_Sw_ustokes_wavenumber_2,jsea) = USSP(jsea,2)
+ w2x_w%rattr(index_w2x_Sw_vstokes_wavenumber_2,jsea) = USSP(jsea,nk+2)
+
+ w2x_w%rattr(index_w2x_Sw_ustokes_wavenumber_3,jsea) = USSP(jsea,3)
+ w2x_w%rattr(index_w2x_Sw_vstokes_wavenumber_3,jsea) = USSP(jsea,nk+3)
+
+ w2x_w%rattr(index_w2x_Sw_ustokes_wavenumber_4,jsea) = USSP(jsea,4)
+ w2x_w%rattr(index_w2x_Sw_vstokes_wavenumber_4,jsea) = USSP(jsea,nk+4)
+
+ w2x_w%rattr(index_w2x_Sw_ustokes_wavenumber_5,jsea) = USSP(jsea,5)
+ w2x_w%rattr(index_w2x_Sw_vstokes_wavenumber_5,jsea) = USSP(jsea,nk+5)
+
+ w2x_w%rattr(index_w2x_Sw_ustokes_wavenumber_6,jsea) = USSP(jsea,6)
+ w2x_w%rattr(index_w2x_Sw_vstokes_wavenumber_6,jsea) = USSP(jsea,nk+6)
+ endif
else
-
- w2x_w%rattr(index_w2x_Sw_Hs,jsea) = 0.0
-
- w2x_w%rattr(index_w2x_Sw_ustokes_wavenumber_1,jsea) = 0.0
- w2x_w%rattr(index_w2x_Sw_vstokes_wavenumber_1,jsea) = 0.0
-
- w2x_w%rattr(index_w2x_Sw_ustokes_wavenumber_2,jsea) = 0.0
- w2x_w%rattr(index_w2x_Sw_vstokes_wavenumber_2,jsea) = 0.0
-
- w2x_w%rattr(index_w2x_Sw_ustokes_wavenumber_3,jsea) = 0.0
- w2x_w%rattr(index_w2x_Sw_vstokes_wavenumber_3,jsea) = 0.0
-
- w2x_w%rattr(index_w2x_Sw_ustokes_wavenumber_4,jsea) = 0.0
- w2x_w%rattr(index_w2x_Sw_vstokes_wavenumber_4,jsea) = 0.0
-
- w2x_w%rattr(index_w2x_Sw_ustokes_wavenumber_5,jsea) = 0.0
- w2x_w%rattr(index_w2x_Sw_vstokes_wavenumber_5,jsea) = 0.0
-
- w2x_w%rattr(index_w2x_Sw_ustokes_wavenumber_6,jsea) = 0.0
- w2x_w%rattr(index_w2x_Sw_vstokes_wavenumber_6,jsea) = 0.0
+
+ if (wav_atm_coup .eq. 'two' .or. wav_ocn_coup .eq. 'two') then
+ w2x_w%rattr(index_w2x_Sw_Charn,jsea) = 0.0
+ endif
+ if (wav_ocn_coup .eq. 'two') then
+ w2x_w%rattr(index_w2x_Sw_Hs,jsea) = 0.0
+ w2x_w%rattr(index_w2x_Sw_Fp,jsea) = 0.0
+ w2x_w%rattr(index_w2x_Sw_Dp,jsea) = 0.0
+ w2x_w%rattr(index_w2x_Faww_Tawx,jsea) = 0.0
+ w2x_w%rattr(index_w2x_Faww_Tawy,jsea) = 0.0
+ w2x_w%rattr(index_w2x_Fwow_Twox,jsea) = 0.0
+ w2x_w%rattr(index_w2x_Fwow_Twoy,jsea) = 0.0
+ w2x_w%rattr(index_w2x_Faow_Tocx,jsea) = 0.0
+ w2x_w%rattr(index_w2x_Faow_Tocy,jsea) = 0.0
+
+ w2x_w%rattr(index_w2x_Sw_ustokes_wavenumber_1,jsea) = 0.0
+ w2x_w%rattr(index_w2x_Sw_vstokes_wavenumber_1,jsea) = 0.0
+
+ w2x_w%rattr(index_w2x_Sw_ustokes_wavenumber_2,jsea) = 0.0
+ w2x_w%rattr(index_w2x_Sw_vstokes_wavenumber_2,jsea) = 0.0
+
+ w2x_w%rattr(index_w2x_Sw_ustokes_wavenumber_3,jsea) = 0.0
+ w2x_w%rattr(index_w2x_Sw_vstokes_wavenumber_3,jsea) = 0.0
+
+ w2x_w%rattr(index_w2x_Sw_ustokes_wavenumber_4,jsea) = 0.0
+ w2x_w%rattr(index_w2x_Sw_vstokes_wavenumber_4,jsea) = 0.0
+
+ w2x_w%rattr(index_w2x_Sw_ustokes_wavenumber_5,jsea) = 0.0
+ w2x_w%rattr(index_w2x_Sw_vstokes_wavenumber_5,jsea) = 0.0
+
+ w2x_w%rattr(index_w2x_Sw_ustokes_wavenumber_6,jsea) = 0.0
+ w2x_w%rattr(index_w2x_Sw_vstokes_wavenumber_6,jsea) = 0.0
+ endif
endif
enddo
diff --git a/components/ww3/src/cpl/ww3_cpl_indices.f90 b/components/ww3/src/cpl/ww3_cpl_indices.f90
index b40e923d3c83..5613a68799e2 100644
--- a/components/ww3/src/cpl/ww3_cpl_indices.f90
+++ b/components/ww3/src/cpl/ww3_cpl_indices.f90
@@ -36,11 +36,19 @@ module ww3_cpl_indices
integer :: index_w2x_Sw_Hs
integer :: index_w2x_Sw_Fp
integer :: index_w2x_Sw_Dp
+ integer :: index_w2x_Sw_Charn
+ integer :: index_w2x_Faww_Tawx
+ integer :: index_w2x_Faww_Tawy
+ integer :: index_w2x_Fwow_Twox
+ integer :: index_w2x_Fwow_Twoy
+ integer :: index_w2x_Faow_Tocx
+ integer :: index_w2x_Faow_Tocy
contains
subroutine ww3_cpl_indices_set( )
-
+
+ use seq_flds_mod, only : wav_atm_coup, wav_ocn_coup
type(mct_aVect) :: w2x ! temporary
type(mct_aVect) :: x2w ! temporary
@@ -62,23 +70,33 @@ subroutine ww3_cpl_indices_set( )
index_x2w_So_bldepth = mct_avect_indexra(x2w,'So_bldepth') ! Boundary layer depth
index_x2w_So_ssh = mct_avect_indexra(x2w,'So_ssh') ! Sea surface height
- index_w2x_Sw_Hs = mct_avect_indexra(w2x,'Sw_Hs') ! Significant wave height
- index_w2x_Sw_Fp = mct_avect_indexra(w2x,'Sw_Fp') ! Peak wave freqency
- index_w2x_Sw_Dp = mct_avect_indexra(w2x,'Sw_Dp') ! Peak wave direction
-
- index_w2x_Sw_ustokes_wavenumber_1 = mct_avect_indexra(w2x,'Sw_ustokes_wavenumber_1') ! partitioned Stokes drift u 1
- index_w2x_Sw_vstokes_wavenumber_1 = mct_avect_indexra(w2x,'Sw_vstokes_wavenumber_1') ! partitioned Stokes drift v 1
- index_w2x_Sw_ustokes_wavenumber_2 = mct_avect_indexra(w2x,'Sw_ustokes_wavenumber_2') ! partitioned Stokes drift u 2
- index_w2x_Sw_vstokes_wavenumber_2 = mct_avect_indexra(w2x,'Sw_vstokes_wavenumber_2') ! partitioned Stokes drift v 2
- index_w2x_Sw_ustokes_wavenumber_3 = mct_avect_indexra(w2x,'Sw_ustokes_wavenumber_3') ! partitioned Stokes drift u 3
- index_w2x_Sw_vstokes_wavenumber_3 = mct_avect_indexra(w2x,'Sw_vstokes_wavenumber_3') ! partitioned Stokes drift v 3
- index_w2x_Sw_ustokes_wavenumber_4 = mct_avect_indexra(w2x,'Sw_ustokes_wavenumber_4') ! partitioned Stokes drift u 4
- index_w2x_Sw_vstokes_wavenumber_4 = mct_avect_indexra(w2x,'Sw_vstokes_wavenumber_4') ! partitioned Stokes drift v 4
- index_w2x_Sw_ustokes_wavenumber_5 = mct_avect_indexra(w2x,'Sw_ustokes_wavenumber_5') ! partitioned Stokes drift u 5
- index_w2x_Sw_vstokes_wavenumber_5 = mct_avect_indexra(w2x,'Sw_vstokes_wavenumber_5') ! partitioned Stokes drift v 5
- index_w2x_Sw_ustokes_wavenumber_6 = mct_avect_indexra(w2x,'Sw_ustokes_wavenumber_6') ! partitioned Stokes drift u 6
- index_w2x_Sw_vstokes_wavenumber_6 = mct_avect_indexra(w2x,'Sw_vstokes_wavenumber_6') ! partitioned Stokes drift v 6
-
+ if (wav_ocn_coup .eq. 'two' .or. wav_atm_coup .eq. 'two') then
+ index_w2x_Sw_Charn = mct_avect_indexra(w2x,'Sw_Charn') ! Charnock coeff accounting for the wave stress (Janssen 1989, 1991)
+ endif
+ if (wav_ocn_coup .eq. 'two') then
+ index_w2x_Sw_Hs = mct_avect_indexra(w2x,'Sw_Hs') ! Significant wave height
+ index_w2x_Sw_Fp = mct_avect_indexra(w2x,'Sw_Fp') ! Peak wave freqency
+ index_w2x_Sw_Dp = mct_avect_indexra(w2x,'Sw_Dp') ! Peak wave direction
+ index_w2x_Faww_Tawx = mct_avect_indexra(w2x,'Faww_Tawx') ! Zonal Wave supported stress (Stress from atmosphere to waves)
+ index_w2x_Faww_Tawy = mct_avect_indexra(w2x,'Faww_Tawy') ! Meridional Wave supported stress (Stress from atmosphere to waves)
+ index_w2x_Fwow_Twox = mct_avect_indexra(w2x,'Fwow_Twox') ! Zonal Wave to ocean stress (Not total ocean momentum stress )
+ index_w2x_Fwow_Twoy = mct_avect_indexra(w2x,'Fwow_Twoy') ! MeridionalWave to ocean stress (Not total ocean momentum stress)
+ index_w2x_Faow_Tocx = mct_avect_indexra(w2x,'Faow_Tocx') ! Zonal Net ocean stress (total ocean momentum stress )
+ index_w2x_Faow_Tocy = mct_avect_indexra(w2x,'Faow_Tocy') !Meridional Net ocean stress (total ocean momentum stress)
+
+ index_w2x_Sw_ustokes_wavenumber_1 = mct_avect_indexra(w2x,'Sw_ustokes_wavenumber_1') ! partitioned Stokes drift u 1
+ index_w2x_Sw_vstokes_wavenumber_1 = mct_avect_indexra(w2x,'Sw_vstokes_wavenumber_1') ! partitioned Stokes drift v 1
+ index_w2x_Sw_ustokes_wavenumber_2 = mct_avect_indexra(w2x,'Sw_ustokes_wavenumber_2') ! partitioned Stokes drift u 2
+ index_w2x_Sw_vstokes_wavenumber_2 = mct_avect_indexra(w2x,'Sw_vstokes_wavenumber_2') ! partitioned Stokes drift v 2
+ index_w2x_Sw_ustokes_wavenumber_3 = mct_avect_indexra(w2x,'Sw_ustokes_wavenumber_3') ! partitioned Stokes drift u 3
+ index_w2x_Sw_vstokes_wavenumber_3 = mct_avect_indexra(w2x,'Sw_vstokes_wavenumber_3') ! partitioned Stokes drift v 3
+ index_w2x_Sw_ustokes_wavenumber_4 = mct_avect_indexra(w2x,'Sw_ustokes_wavenumber_4') ! partitioned Stokes drift u 4
+ index_w2x_Sw_vstokes_wavenumber_4 = mct_avect_indexra(w2x,'Sw_vstokes_wavenumber_4') ! partitioned Stokes drift v 4
+ index_w2x_Sw_ustokes_wavenumber_5 = mct_avect_indexra(w2x,'Sw_ustokes_wavenumber_5') ! partitioned Stokes drift u 5
+ index_w2x_Sw_vstokes_wavenumber_5 = mct_avect_indexra(w2x,'Sw_vstokes_wavenumber_5') ! partitioned Stokes drift v 5
+ index_w2x_Sw_ustokes_wavenumber_6 = mct_avect_indexra(w2x,'Sw_ustokes_wavenumber_6') ! partitioned Stokes drift u 6
+ index_w2x_Sw_vstokes_wavenumber_6 = mct_avect_indexra(w2x,'Sw_vstokes_wavenumber_6') ! partitioned Stokes drift v 6
+ endif
call mct_aVect_clean(x2w)
call mct_aVect_clean(w2x)
diff --git a/driver-mct/cime_config/buildnml b/driver-mct/cime_config/buildnml
index 4938e9da0b18..e20cc49803ac 100755
--- a/driver-mct/cime_config/buildnml
+++ b/driver-mct/cime_config/buildnml
@@ -68,6 +68,22 @@ def _create_drv_namelists(case, infile, confdir, nmlgen, files):
elif case.get_value('RUN_TYPE') == 'branch':
config['run_type'] = 'branch'
+ # change wave coupling setttings based on compset
+ if case.get_value('COMP_WAV') == 'ww3':
+ config['WAVSPEC'] = case.get_value('WAV_SPEC')
+ config['WAV_ATM_COUP'] = 'two' if case.get_value('COMP_ATM') == 'eam' else 'one'
+ if case.get_value('COMP_OCN') == 'mpaso':
+ config['WAV_OCN_COUP'] = 'two'
+ elif case.get_value('COMP_OCN') == 'docn':
+ config['WAV_OCN_COUP'] = 'one'
+ #if case.get_value("DOCN_MODE") == 'som'
+ if case.get_value('COMP_ICE') == 'mpassi':
+ config['WAV_ICE_COUP'] = 'one'
+ elif case.get_value('COMP_WAV') == 'dwav':
+ config['WAVSPEC'] = 'sp36x36'
+ else:
+ config['WAVSPEC'] = 'none'
+
#----------------------------------------------------
# Initialize namelist defaults
#----------------------------------------------------
diff --git a/driver-mct/cime_config/config_component.xml b/driver-mct/cime_config/config_component.xml
index 8cddad0abf89..22383ce6003b 100644
--- a/driver-mct/cime_config/config_component.xml
+++ b/driver-mct/cime_config/config_component.xml
@@ -1518,6 +1518,23 @@
atm2wav state mapping file decomp type
+
+ char
+ idmap
+ run_domain
+ env_run.xml
+ wav2atm state mapping file
+
+
+
+ char
+ X,Y
+ Y
+ run_domain
+ env_run.xml
+ wav2atm state mapping file decomp type
+
+
char
idmap
@@ -2002,6 +2019,23 @@
wav2ocn state mapping file decomp type
+
+ char
+ idmap
+ run_domain
+ env_run.xml
+ wav2ocn flux mapping file
+
+
+
+ char
+ X,Y
+ X
+ run_domain
+ env_run.xml
+ wav2ocn flux mapping file decomp type
+
+
char
idmap
diff --git a/driver-mct/cime_config/namelist_definition_drv.xml b/driver-mct/cime_config/namelist_definition_drv.xml
index 982acabe64d8..f9f920c98ec6 100644
--- a/driver-mct/cime_config/namelist_definition_drv.xml
+++ b/driver-mct/cime_config/namelist_definition_drv.xml
@@ -193,6 +193,41 @@
+
+ char
+ seq_flds
+ seq_cplflds_inparm
+ One- or Two-way coupling between Wave and Atm.
+
+ none
+ one
+ two
+
+
+
+
+ char
+ seq_flds
+ seq_cplflds_inparm
+ One- or Two-way coupling between Wave and Ocn.
+
+ none
+ one
+ two
+
+
+
+
+ char
+ seq_flds
+ seq_cplflds_inparm
+ One- or Two-way coupling between Wave and Sea Ice.
+
+ none
+ one
+
+
+
integer
seq_flds
@@ -4892,6 +4927,37 @@
+
+ char
+ mapping
+ abs
+ seq_maps
+
+ atm to wav state mapping file for states
+
+
+ $WAV2ATM_SMAPNAME
+
+
+
+
+ char
+ mapping
+ seq_maps
+
+ The type of mapping desired, either "source" or "destination" mapping.
+ X is associated with rearrangement of the source grid to the
+ destination grid and then local mapping. Y is associated with mapping
+ on the source grid and then rearrangement and sum to the destination
+ grid.
+
+
+ $WAV2ATM_SMAPTYPE
+ X
+
+
+
+
char
mapping
@@ -4982,6 +5048,36 @@
+
+ char
+ mapping
+ abs
+ seq_maps
+
+ wav to ocn flux mapping file for fluxes
+
+
+ $WAV2OCN_FMAPNAME
+
+
+
+
+ char
+ mapping
+ seq_maps
+
+ The type of mapping desired, either "source" or "destination" mapping.
+ X is associated with rearrangement of the source grid to the
+ destination grid and then local mapping. Y is associated with mapping
+ on the source grid and then rearrangement and sum to the destination
+ grid.
+
+
+ $WAV2OCN_FMAPTYPE
+ X
+
+
+
char(10)
drv_physics
diff --git a/driver-mct/main/cime_comp_mod.F90 b/driver-mct/main/cime_comp_mod.F90
index 7cf442b9413d..75683e0f3599 100644
--- a/driver-mct/main/cime_comp_mod.F90
+++ b/driver-mct/main/cime_comp_mod.F90
@@ -70,7 +70,7 @@ module cime_comp_mod
use seq_comm_mct, only: CPLATMID,CPLLNDID,CPLOCNID,CPLICEID,CPLGLCID,CPLROFID,CPLWAVID,CPLESPID
use seq_comm_mct, only: IACID, ALLIACID, CPLALLIACID, CPLIACID
use seq_comm_mct, only: num_inst_atm, num_inst_lnd, num_inst_rof
- use seq_comm_mct, only: num_inst_ocn, num_inst_ice, num_inst_glc
+ use seq_comm_mct, only: num_inst_ocn, num_inst_ice, num_inst_glc, num_inst_wav
use seq_comm_mct, only: num_inst_wav, num_inst_esp
use seq_comm_mct, only: num_inst_iac
use seq_comm_mct, only: num_inst_xao, num_inst_frc, num_inst_phys
@@ -254,11 +254,13 @@ module cime_comp_mod
!- from prep routines (arrays of instances)
type(mct_aVect) , pointer :: a2x_ox(:) => null()
type(mct_aVect) , pointer :: o2x_ax(:) => null()
+ type(mct_aVect) , pointer :: w2x_ax(:) => null()
type(mct_aVect) , pointer :: xao_ox(:) => null()
type(mct_aVect) , pointer :: xao_ax(:) => null()
!- from component type (single instance inside array of components)
type(mct_aVect) , pointer :: o2x_ox => null()
+ type(mct_aVect) , pointer :: w2x_ox(:) => null()
type(mct_aVect) , pointer :: a2x_ax => null()
character(len=CL) :: inst_suffix
@@ -433,6 +435,7 @@ module cime_comp_mod
logical :: lnd_c2_rof ! .true. => lnd to rof coupling on
logical :: lnd_c2_glc ! .true. => lnd to glc coupling on
logical :: ocn_c2_atm ! .true. => ocn to atm coupling on
+ logical :: wav_c2_atm ! .true. => wav to atm coupling on
logical :: ocn_c2_ice ! .true. => ocn to ice coupling on
logical :: ocn_c2_glcshelf ! .true. => ocn to glc ice shelf coupling on
logical :: ocn_c2_wav ! .true. => ocn to wav coupling on
@@ -2018,7 +2021,7 @@ subroutine cime_init()
call t_adj_detailf(+2)
if (drv_threading) call seq_comm_setnthreads(nthreads_CPLID)
- call prep_atm_init(infodata, ocn_c2_atm, ice_c2_atm, lnd_c2_atm, iac_c2_lnd)
+ call prep_atm_init(infodata, ocn_c2_atm, ice_c2_atm, lnd_c2_atm, iac_c2_lnd, wav_c2_atm)
call prep_lnd_init(infodata, atm_c2_lnd, rof_c2_lnd, glc_c2_lnd, iac_c2_lnd)
@@ -3820,11 +3823,13 @@ subroutine cime_run_atmocn_fluxes(hashint)
do exi = 1,num_inst_xao
eai = mod((exi-1),num_inst_atm) + 1
eoi = mod((exi-1),num_inst_ocn) + 1
+ ewi = mod((exi-1),num_inst_wav) + 1
efi = mod((exi-1),num_inst_frc) + 1
a2x_ax => component_get_c2x_cx(atm(eai))
o2x_ax => prep_atm_get_o2x_ax() ! array over all instances
+ w2x_ax => prep_atm_get_w2x_ax() ! array over all instances
xao_ax => prep_aoflux_get_xao_ax() ! array over all instances
- call seq_flux_atmocn_mct(infodata, tod, dtime, a2x_ax, o2x_ax(eoi), xao_ax(exi))
+ call seq_flux_atmocn_mct(infodata, tod, dtime, a2x_ax, o2x_ax(eoi), xao_ax(exi), w2x_ax(ewi))
enddo
call t_drvstopf ('CPL:atmocna_fluxa',hashint=hashint(6))
@@ -3840,10 +3845,12 @@ subroutine cime_run_atmocn_fluxes(hashint)
eai = mod((exi-1),num_inst_atm) + 1
eoi = mod((exi-1),num_inst_ocn) + 1
efi = mod((exi-1),num_inst_frc) + 1
+ ewi = mod((exi-1),num_inst_wav) + 1
a2x_ox => prep_ocn_get_a2x_ox()
+ w2x_ox => prep_ocn_get_w2x_ox()
o2x_ox => component_get_c2x_cx(ocn(eoi))
xao_ox => prep_aoflux_get_xao_ox()
- call seq_flux_atmocn_mct(infodata, tod, dtime, a2x_ox(eai), o2x_ox, xao_ox(exi))
+ call seq_flux_atmocn_mct(infodata, tod, dtime, a2x_ox(eai), o2x_ox, xao_ox(exi), w2x_ox(ewi))
enddo
call t_drvstopf ('CPL:atmocnp_fluxo',hashint=hashint(6))
endif ! aoflux_grid
diff --git a/driver-mct/main/prep_atm_mod.F90 b/driver-mct/main/prep_atm_mod.F90
index c509c9e22b30..f25c7a6a3757 100644
--- a/driver-mct/main/prep_atm_mod.F90
+++ b/driver-mct/main/prep_atm_mod.F90
@@ -4,8 +4,8 @@ module prep_atm_mod
use shr_kind_mod, only: cs => SHR_KIND_CS
use shr_kind_mod, only: cl => SHR_KIND_CL
use shr_sys_mod, only: shr_sys_abort, shr_sys_flush
- use seq_comm_mct, only: num_inst_atm, num_inst_ocn, num_inst_ice, num_inst_lnd, num_inst_xao, &
- num_inst_frc, num_inst_max, CPLID, ATMID, logunit
+ use seq_comm_mct, only: num_inst_atm, num_inst_ocn, num_inst_ice, num_inst_lnd, num_inst_wav, &
+ num_inst_xao, num_inst_frc, num_inst_max, CPLID, ATMID, logunit
use seq_comm_mct, only: seq_comm_getData=>seq_comm_setptrs
use seq_infodata_mod, only: seq_infodata_type, seq_infodata_getdata
use seq_map_type_mod
@@ -15,7 +15,7 @@ module prep_atm_mod
use mct_mod
use perf_mod
use component_type_mod, only: component_get_x2c_cx, component_get_c2x_cx
- use component_type_mod, only: atm, lnd, ocn, ice
+ use component_type_mod, only: atm, lnd, ocn, ice, wav
implicit none
save
@@ -31,15 +31,18 @@ module prep_atm_mod
public :: prep_atm_get_l2x_ax
public :: prep_atm_get_i2x_ax
public :: prep_atm_get_o2x_ax
+ public :: prep_atm_get_w2x_ax
public :: prep_atm_get_z2x_ax
public :: prep_atm_calc_l2x_ax
public :: prep_atm_calc_i2x_ax
public :: prep_atm_calc_o2x_ax
+ public :: prep_atm_calc_w2x_ax
public :: prep_atm_calc_z2x_ax
public :: prep_atm_get_mapper_So2a
public :: prep_atm_get_mapper_Fo2a
+ public :: prep_atm_get_mapper_Sw2a
public :: prep_atm_get_mapper_Sl2a
public :: prep_atm_get_mapper_Fl2a
public :: prep_atm_get_mapper_Si2a
@@ -57,6 +60,7 @@ module prep_atm_mod
! mappers
type(seq_map), pointer :: mapper_So2a
+ type(seq_map), pointer :: mapper_Sw2a
type(seq_map), pointer :: mapper_Sl2a
type(seq_map), pointer :: mapper_Si2a
type(seq_map), pointer :: mapper_Fo2a ! needed for seq_frac_init
@@ -67,6 +71,7 @@ module prep_atm_mod
type(mct_aVect), pointer :: l2x_ax(:) ! Lnd export, atm grid, cpl pes - allocated in driver
type(mct_aVect), pointer :: i2x_ax(:) ! Ice export, atm grid, cpl pes - allocated in driver
type(mct_aVect), pointer :: o2x_ax(:) ! Ocn export, atm grid, cpl pes - allocated in driver
+ type(mct_aVect), pointer :: w2x_ax(:) ! Wav export, atm grid, cpl pes -allocated in driver
type(mct_aVect), pointer :: z2x_ax(:) ! Iac export, atm grid, cpl pes - allocated in driver
! other module variables
@@ -79,7 +84,7 @@ module prep_atm_mod
!================================================================================================
- subroutine prep_atm_init(infodata, ocn_c2_atm, ice_c2_atm, lnd_c2_atm, iac_c2_atm)
+ subroutine prep_atm_init(infodata, ocn_c2_atm, ice_c2_atm, lnd_c2_atm, iac_c2_atm, wav_c2_atm)
!---------------------------------------------------------------
! Description
@@ -91,19 +96,25 @@ subroutine prep_atm_init(infodata, ocn_c2_atm, ice_c2_atm, lnd_c2_atm, iac_c2_at
logical , intent(in) :: ice_c2_atm ! .true. => ice to atm coupling on
logical , intent(in) :: lnd_c2_atm ! .true. => lnd to atm coupling on
logical , intent(in) :: iac_c2_atm ! .true. => iac to atm coupling on
+ logical , intent(in) :: wav_c2_atm ! .true. => wav to atm coupling on
+
!
! Local Variables
integer :: lsize_a
- integer :: eli, eii, emi
+ integer :: eli, eii, emi, ewi
logical :: samegrid_ao ! samegrid atm and ocean
+ logical :: samegrid_al ! samegrid atm and land
+ logical :: samegrid_aw ! samegrid atm and wave
logical :: esmf_map_flag ! .true. => use esmf for mapping
logical :: atm_present ! .true. => atm is present
logical :: ocn_present ! .true. => ocn is present
logical :: ice_present ! .true. => ice is present
logical :: lnd_present ! .true. => lnd is prsent
+ logical :: wav_present ! .true. => wav is prsent
character(CL) :: ocn_gnam ! ocn grid
character(CL) :: atm_gnam ! atm grid
character(CL) :: lnd_gnam ! lnd grid
+ character(CL) :: wav_gnam ! wav grid
type(mct_avect), pointer :: a2x_ax
character(*), parameter :: subname = '(prep_atm_init)'
character(*), parameter :: F00 = "('"//subname//" : ', 4A )"
@@ -114,12 +125,15 @@ subroutine prep_atm_init(infodata, ocn_c2_atm, ice_c2_atm, lnd_c2_atm, iac_c2_at
ocn_present=ocn_present, &
ice_present=ice_present, &
lnd_present=lnd_present, &
+ wav_present=wav_present, &
atm_gnam=atm_gnam, &
ocn_gnam=ocn_gnam, &
lnd_gnam=lnd_gnam, &
+ wav_gnam=wav_gnam, &
esmf_map_flag=esmf_map_flag)
allocate(mapper_So2a)
+ allocate(mapper_Sw2a)
allocate(mapper_Sl2a)
allocate(mapper_Si2a)
allocate(mapper_Fo2a)
@@ -144,6 +158,13 @@ subroutine prep_atm_init(infodata, ocn_c2_atm, ice_c2_atm, lnd_c2_atm, iac_c2_at
call mct_aVect_init(o2x_ax(emi), rList=seq_flds_o2x_fields, lsize=lsize_a)
call mct_aVect_zero(o2x_ax(emi))
enddo
+
+ allocate(w2x_ax(num_inst_wav))
+ do ewi = 1,num_inst_wav
+ call mct_aVect_init(w2x_ax(ewi), rList=seq_flds_w2x_fields,lsize=lsize_a)
+ call mct_aVect_zero(w2x_ax(ewi))
+ end do
+
allocate(i2x_ax(num_inst_ice))
do eii = 1,num_inst_ice
call mct_aVect_init(i2x_ax(eii), rList=seq_flds_i2x_fields, lsize=lsize_a)
@@ -152,8 +173,26 @@ subroutine prep_atm_init(infodata, ocn_c2_atm, ice_c2_atm, lnd_c2_atm, iac_c2_at
samegrid_al = .true.
samegrid_ao = .true.
+ samegrid_aw = .true.
+
if (trim(atm_gnam) /= trim(lnd_gnam)) samegrid_al = .false.
if (trim(atm_gnam) /= trim(ocn_gnam)) samegrid_ao = .false.
+ if (trim(atm_gnam) /= trim(wav_gnam)) samegrid_aw = .false.
+
+
+ if (wav_c2_atm) then
+ if (iamroot_CPLID) then
+ write(logunit,*) ' '
+ write(logunit,F00) 'Initializing mapper_Sw2a'
+ end if
+ call seq_map_init_rcfile(mapper_Sw2a, wav(1), atm(1), &
+ 'seq_maps.rc','wav2atm_smapname:','wav2atm_smaptype:',samegrid_aw, &
+ 'mapper_Sw2a initialization',esmf_map_flag)
+ end if
+
+ ! needed for domain checking
+ call shr_sys_flush(logunit)
+
if (ocn_c2_atm) then
if (iamroot_CPLID) then
@@ -241,7 +280,7 @@ subroutine prep_atm_mrg(infodata, fractions_ax, xao_ax, timer_mrg)
character(len=*) , intent(in) :: timer_mrg
!
! Local Variables
- integer :: eli, eoi, eii, exi, efi, eai, emi
+ integer :: eli, eoi, eii, exi, efi, eai, emi, ewi
type(mct_avect), pointer :: x2a_ax
character(*), parameter :: subname = '(prep_atm_mrg)'
character(*), parameter :: F00 = "('"//subname//" : ', 4A )"
@@ -256,6 +295,7 @@ subroutine prep_atm_mrg(infodata, fractions_ax, xao_ax, timer_mrg)
exi = mod((eai-1),num_inst_xao) + 1
efi = mod((eai-1),num_inst_frc) + 1
emi = mod((eai-1),num_inst_max) + 1
+ ewi = mod((eai-1),num_inst_wav) + 1
x2a_ax => component_get_x2c_cx(atm(eai)) ! This is actually modifying x2a_ax
call prep_atm_merge(l2x_ax(eli), o2x_ax(emi), xao_ax(exi), i2x_ax(eii), &
@@ -286,6 +326,7 @@ subroutine prep_atm_merge( l2x_a, o2x_a, xao_a, i2x_a, fractions_a, x2a_a )
integer :: index_x2a_Sf_lfrac
integer :: index_x2a_Sf_ifrac
integer :: index_x2a_Sf_ofrac
+
character(CL),allocatable :: field_atm(:) ! string converted to char
character(CL),allocatable :: field_lnd(:) ! string converted to char
character(CL),allocatable :: field_ice(:) ! string converted to char
@@ -442,6 +483,7 @@ subroutine prep_atm_merge( l2x_a, o2x_a, xao_a, i2x_a, fractions_a, x2a_a )
end if
end do
+
! --- add some checks ---
! --- make sure all terms agree on merge or non-merge aspect ---
@@ -463,6 +505,7 @@ subroutine prep_atm_merge( l2x_a, o2x_a, xao_a, i2x_a, fractions_a, x2a_a )
write(logunit,*) subname,' ERROR: lindx and oindx merge logic error ',trim(itemc_atm(ka))
call shr_sys_abort(subname//' ERROR lindx and oindx merge logic error')
endif
+
if (xindx(ka) > 0 .and. iindx(ka) > 0 .and. (xmerge(ka) .neqv. imerge(ka))) then
write(logunit,*) subname,' ERROR: xindx and iindx merge logic error ',trim(itemc_atm(ka))
call shr_sys_abort(subname//' ERROR xindx and iindx merge logic error')
@@ -476,6 +519,7 @@ subroutine prep_atm_merge( l2x_a, o2x_a, xao_a, i2x_a, fractions_a, x2a_a )
call shr_sys_abort(subname//' ERROR iindx and oindx merge logic error')
endif
+
end do
end if
@@ -706,6 +750,44 @@ subroutine prep_atm_calc_o2x_ax(fractions_ox, timer)
end subroutine prep_atm_calc_o2x_ax
+
+ !================================================================================================
+
+ subroutine prep_atm_calc_w2x_ax(fractions_wx, timer)
+ !---------------------------------------------------------------
+ ! Description
+ ! Create w2x_ax (note that w2x_ax is a local module variable)
+ !
+ ! Arguments
+ type(mct_aVect) , optional, intent(in) :: fractions_wx(:)
+ character(len=*), optional, intent(in) :: timer
+ !
+ ! Local Variables
+ integer :: eoi, efi, emi, ewi
+ type(mct_aVect) , pointer :: w2x_ox
+ character(*), parameter :: subname = '(prep_atm_calc_w2x_ax)'
+ character(*), parameter :: F00 = "('"//subname//" : ', 4A )"
+ !---------------------------------------------------------------
+
+ call t_drvstartf (trim(timer),barrier=mpicom_CPLID)
+ do emi = 1,num_inst_wav
+ ewi = mod((emi-1),num_inst_wav) + 1
+ efi = mod((emi-1),num_inst_frc) + 1
+
+ w2x_ox => component_get_c2x_cx(wav(ewi))
+ if (present(fractions_wx)) then
+ call seq_map_map(mapper_Sw2a, w2x_ox, w2x_ax(ewi),&
+ fldlist=seq_flds_w2x_states,norm=.true., &
+ avwts_s=fractions_wx(efi),avwtsfld_s='wfrac')
+ else
+ call seq_map_map(mapper_Sw2a, w2x_ox, w2x_ax(ewi),&
+ fldlist=seq_flds_w2x_states,norm=.true.)
+ endif
+ enddo
+ call t_drvstopf (trim(timer))
+
+ end subroutine prep_atm_calc_w2x_ax
+
!================================================================================================
subroutine prep_atm_calc_i2x_ax(fractions_ix, timer)
@@ -806,6 +888,11 @@ function prep_atm_get_o2x_ax()
prep_atm_get_o2x_ax => o2x_ax(:)
end function prep_atm_get_o2x_ax
+ function prep_atm_get_w2x_ax()
+ type(mct_aVect), pointer :: prep_atm_get_w2x_ax(:)
+ prep_atm_get_w2x_ax => w2x_ax(:)
+ end function prep_atm_get_w2x_ax
+
function prep_atm_get_z2x_ax()
type(mct_aVect), pointer :: prep_atm_get_z2x_ax(:)
prep_atm_get_z2x_ax => z2x_ax(:)
@@ -816,6 +903,11 @@ function prep_atm_get_mapper_So2a()
prep_atm_get_mapper_So2a => mapper_So2a
end function prep_atm_get_mapper_So2a
+ function prep_atm_get_mapper_Sw2a()
+ type(seq_map), pointer :: prep_atm_get_mapper_Sw2a
+ prep_atm_get_mapper_Sw2a => mapper_Sw2a
+ end function prep_atm_get_mapper_Sw2a
+
function prep_atm_get_mapper_Fo2a()
type(seq_map), pointer :: prep_atm_get_mapper_Fo2a
prep_atm_get_mapper_Fo2a => mapper_Fo2a
diff --git a/driver-mct/main/prep_ocn_mod.F90 b/driver-mct/main/prep_ocn_mod.F90
index b726b1516b2e..2edf5c2bdedb 100644
--- a/driver-mct/main/prep_ocn_mod.F90
+++ b/driver-mct/main/prep_ocn_mod.F90
@@ -66,6 +66,7 @@ module prep_ocn_mod
public :: prep_ocn_get_mapper_Sg2o
public :: prep_ocn_get_mapper_Fg2o
public :: prep_ocn_get_mapper_Sw2o
+ public :: prep_ocn_get_mapper_Fw2o
!--------------------------------------------------------------------------
! Private interfaces
@@ -90,6 +91,7 @@ module prep_ocn_mod
type(seq_map), pointer :: mapper_Fg2o
type(seq_map), pointer :: mapper_Sg2o
type(seq_map), pointer :: mapper_Sw2o
+ type(seq_map), pointer :: mapper_Fw2o
! attribute vectors
type(mct_aVect), pointer :: a2x_ox(:) ! Atm export, ocn grid, cpl pes
@@ -190,6 +192,7 @@ subroutine prep_ocn_init(infodata, atm_c2_ocn, atm_c2_ice, ice_c2_ocn, rof_c2_oc
allocate(mapper_Sg2o)
allocate(mapper_Fg2o)
allocate(mapper_Sw2o)
+ allocate(mapper_Fw2o)
if (ocn_present) then
@@ -382,6 +385,13 @@ subroutine prep_ocn_init(infodata, atm_c2_ocn, atm_c2_ice, ice_c2_ocn, rof_c2_oc
call seq_map_init_rcfile(mapper_Sw2o, wav(1), ocn(1), &
'seq_maps.rc', 'wav2ocn_smapname:', 'wav2ocn_smaptype:',samegrid_ow, &
'mapper_Sw2o initialization')
+ if (iamroot_CPLID) then
+ write(logunit,*) ' '
+ write(logunit,F00) 'Initializing mapper_Fw2o'
+ end if
+ call seq_map_init_rcfile(mapper_Fw2o, wav(1), ocn(1), &
+ 'seq_maps.rc', 'wav2ocn_fmapname:', 'wav2ocn_fmaptype:',samegrid_ow, &
+ 'mapper_Fw2o initialization')
endif
call shr_sys_flush(logunit)
@@ -534,7 +544,7 @@ subroutine prep_ocn_merge( flux_epbalfact, a2x_o, i2x_o, r2x_o, w2x_o, g2x_o, xa
fractions_o, x2o_o )
use prep_glc_mod, only: prep_glc_calculate_subshelf_boundary_fluxes
-
+ use seq_flds_mod, only: wav_ocn_coup
!-----------------------------------------------------------------------
!
! Arguments
@@ -977,7 +987,7 @@ subroutine prep_ocn_merge( flux_epbalfact, a2x_o, i2x_o, r2x_o, w2x_o, g2x_o, xa
call mct_aVect_copy(aVin=a2x_o, aVout=x2o_o, vector=mct_usevector, sharedIndices=a2x_SharedIndices)
call mct_aVect_copy(aVin=i2x_o, aVout=x2o_o, vector=mct_usevector, sharedIndices=i2x_SharedIndices)
call mct_aVect_copy(aVin=r2x_o, aVout=x2o_o, vector=mct_usevector, sharedIndices=r2x_SharedIndices)
- call mct_aVect_copy(aVin=w2x_o, aVout=x2o_o, vector=mct_usevector, sharedIndices=w2x_SharedIndices)
+ if(wav_ocn_coup == 'two') call mct_aVect_copy(aVin=w2x_o, aVout=x2o_o, vector=mct_usevector, sharedIndices=w2x_SharedIndices)
call mct_aVect_copy(aVin=xao_o, aVout=x2o_o, vector=mct_usevector, sharedIndices=xao_SharedIndices)
call mct_aVect_copy(aVin=g2x_o, aVout=x2o_o, vector=mct_usevector, sharedIndices=g2x_SharedIndices)
@@ -1446,7 +1456,8 @@ subroutine prep_ocn_calc_w2x_ox(timer)
call t_drvstartf (trim(timer),barrier=mpicom_CPLID)
do ewi = 1,num_inst_wav
w2x_wx => component_get_c2x_cx(wav(ewi))
- call seq_map_map(mapper_Sw2o, w2x_wx, w2x_ox(ewi), norm=.true.)
+ call seq_map_map(mapper_Sw2o, w2x_wx, w2x_ox(ewi),fldlist=seq_flds_w2x_states, norm=.true.)
+ call seq_map_map(mapper_Fw2o, w2x_wx, w2x_ox(ewi),fldlist=seq_flds_w2x_fluxes, norm=.true.)
enddo
call t_drvstopf (trim(timer))
end subroutine prep_ocn_calc_w2x_ox
@@ -1548,4 +1559,9 @@ function prep_ocn_get_mapper_Sw2o()
prep_ocn_get_mapper_Sw2o => mapper_Sw2o
end function prep_ocn_get_mapper_Sw2o
+ function prep_ocn_get_mapper_Fw2o()
+ type(seq_map), pointer :: prep_ocn_get_mapper_Fw2o
+ prep_ocn_get_mapper_Fw2o => mapper_Fw2o
+ end function prep_ocn_get_mapper_Fw2o
+
end module prep_ocn_mod
diff --git a/driver-mct/main/seq_flux_mct.F90 b/driver-mct/main/seq_flux_mct.F90
index 92782264faae..e4ceabbdd17e 100644
--- a/driver-mct/main/seq_flux_mct.F90
+++ b/driver-mct/main/seq_flux_mct.F90
@@ -46,6 +46,7 @@ module seq_flux_mct
real(r8), allocatable :: ubot (:) ! atm velocity, zonal
real(r8), allocatable :: vbot (:) ! atm velocity, meridional
real(r8), allocatable :: wsresp(:) ! atm response to surface stress
+ real(r8), allocatable :: charnsea(:) ! Charnock coeff accounting for the wave stress
real(r8), allocatable :: tau_est(:)! estimation of tau in equilibrium with wind
real(r8), allocatable :: ugust_atm(:) ! atm gustiness
real(r8), allocatable :: thbot(:) ! atm potential T
@@ -145,6 +146,7 @@ module seq_flux_mct
integer :: index_o2x_So_t
integer :: index_o2x_So_u
integer :: index_o2x_So_v
+ integer :: index_w2x_Sw_Charn
integer :: index_o2x_So_fswpen
integer :: index_o2x_So_s
integer :: index_o2x_So_roce_16O
@@ -295,6 +297,11 @@ subroutine seq_flux_init_mct(comp, fractions)
allocate( vocn(nloc),stat=ier)
if(ier/=0) call mct_die(subName,'allocate vocn',ier)
vocn = 0.0_r8
+
+ allocate( charnsea(nloc),stat=ier)
+ if(ier/=0) call mct_die(subName,'allocate charnsea',ier)
+ charnsea = 0.0_r8
+
allocate( tocn(nloc),stat=ier)
if(ier/=0) call mct_die(subName,'allocate tocn',ier)
tocn = 0.0_r8
@@ -1313,7 +1320,7 @@ end subroutine seq_flux_atmocnexch_mct
!===============================================================================
- subroutine seq_flux_atmocn_mct(infodata, tod, dt, a2x, o2x, xao)
+ subroutine seq_flux_atmocn_mct(infodata, tod, dt, a2x, o2x, xao, w2x)
!-----------------------------------------------------------------------
!
@@ -1323,6 +1330,7 @@ subroutine seq_flux_atmocn_mct(infodata, tod, dt, a2x, o2x, xao)
integer(in) , intent(in) :: tod,dt ! NEW
type(mct_aVect) , intent(in) :: a2x ! a2x_ax or a2x_ox
type(mct_aVect) , intent(in) :: o2x ! o2x_ax or o2x_ox
+ type(mct_aVect), optional, intent(in) :: w2x ! w2x_wx
type(mct_aVect) , intent(inout) :: xao
!
! Local variables
@@ -1330,7 +1338,7 @@ subroutine seq_flux_atmocn_mct(infodata, tod, dt, a2x, o2x, xao)
logical :: flux_albav ! flux avg option
logical :: dead_comps ! .true. => dead components are used
integer(in) :: n ! indices
- integer(in) :: nloc, nloca, nloco ! number of gridcells
+ integer(in) :: nloc, nloca, nloco, nlocw ! number of gridcells
logical,save:: first_call = .true.
logical :: cold_start ! .true. to initialize internal fields in shr_flux diurnal
logical :: read_restart ! .true. => continue run
@@ -1445,6 +1453,9 @@ subroutine seq_flux_atmocn_mct(infodata, tod, dt, a2x, o2x, xao)
index_o2x_So_roce_16O = mct_aVect_indexRA(o2x,'So_roce_16O', perrWith='quiet')
index_o2x_So_roce_HDO = mct_aVect_indexRA(o2x,'So_roce_HDO', perrWith='quiet')
index_o2x_So_roce_18O = mct_aVect_indexRA(o2x,'So_roce_18O', perrWith='quiet')
+ if (wav_ocn_coup == 'two' .or. wav_atm_coup == 'two') then
+ index_w2x_Sw_Charn = mct_aVect_indexRA(w2x,'Sw_Charn')
+ endif
call shr_flux_adjust_constants(flux_convergence_tolerance=flux_convergence, &
flux_convergence_max_iteration=flux_max_iteration, &
coldair_outbreak_mod=coldair_outbreak_mod)
@@ -1458,6 +1469,7 @@ subroutine seq_flux_atmocn_mct(infodata, tod, dt, a2x, o2x, xao)
nloc = mct_aVect_lsize(xao)
nloca = mct_aVect_lsize(a2x)
nloco = mct_aVect_lsize(o2x)
+ nlocw = mct_aVect_lsize(w2x)
if (nloc /= nloca .or. nloc /= nloco) then
call shr_sys_abort(trim(subname)//' ERROR nloc sizes do not match')
@@ -1548,6 +1560,7 @@ subroutine seq_flux_atmocn_mct(infodata, tod, dt, a2x, o2x, xao)
tocn(n) = o2x%rAttr(index_o2x_So_t ,n)
uocn(n) = o2x%rAttr(index_o2x_So_u ,n)
vocn(n) = o2x%rAttr(index_o2x_So_v ,n)
+ if (wav_atm_coup == 'two') charnsea(n) = w2x%rAttr(index_w2x_Sw_Charn ,n)
if ( index_o2x_So_roce_16O /= 0 ) roce_16O(n) = o2x%rAttr(index_o2x_So_roce_16O, n)
if ( index_o2x_So_roce_HDO /= 0 ) roce_HDO(n) = o2x%rAttr(index_o2x_So_roce_HDO, n)
if ( index_o2x_So_roce_18O /= 0 ) roce_18O(n) = o2x%rAttr(index_o2x_So_roce_18O, n)
@@ -1626,7 +1639,8 @@ subroutine seq_flux_atmocn_mct(infodata, tod, dt, a2x, o2x, xao)
duu10n,ustar, re , ssq, wsresp=wsresp, tau_est=tau_est)
u10res = sqrt(duu10n) ! atm-supplied gustiness not implemented for UA
else
- call shr_flux_atmocn (nloc , zbot , ubot, vbot, thbot, &
+ if (wav_atm_coup == 'two') then
+ call shr_flux_atmocn (nloc , zbot , ubot, vbot, thbot, &
shum , shum_16O , shum_HDO, shum_18O, dens , tbot, uocn, vocn , &
tocn , emask, seq_flux_atmocn_minwind, &
sen , lat , lwup , &
@@ -1634,7 +1648,19 @@ subroutine seq_flux_atmocn_mct(infodata, tod, dt, a2x, o2x, xao)
evap , evap_16O, evap_HDO, evap_18O, taux , tauy, tref, qref , &
ocn_surface_flux_scheme, &
duu10n, u10res, ustar, re , ssq, &
- wsresp=wsresp, tau_est=tau_est, ugust=ugust_atm)
+ wsresp=wsresp, tau_est=tau_est, ugust=ugust_atm, &
+ charnockSeaState=charnsea)
+ else
+ call shr_flux_atmocn (nloc , zbot , ubot, vbot, thbot, &
+ shum , shum_16O , shum_HDO, shum_18O, dens , tbot, uocn, vocn , &
+ tocn , emask, seq_flux_atmocn_minwind, &
+ sen , lat , lwup , &
+ roce_16O, roce_HDO, roce_18O, &
+ evap , evap_16O, evap_HDO, evap_18O, taux , tauy, tref, qref , &
+ ocn_surface_flux_scheme, &
+ duu10n, u10res, ustar, re , ssq, &
+ wsresp=wsresp, tau_est=tau_est, ugust=ugust_atm)
+ endif
!missval should not be needed if flux calc
!consistent with mrgx2a fraction
!duu10n,ustar, re , ssq, missval = 0.0_r8 )
diff --git a/driver-mct/shr/seq_flds_mod.F90 b/driver-mct/shr/seq_flds_mod.F90
index dbfba0889d0c..e14d40ea1f35 100644
--- a/driver-mct/shr/seq_flds_mod.F90
+++ b/driver-mct/shr/seq_flds_mod.F90
@@ -162,6 +162,9 @@ module seq_flds_mod
logical :: ocn_rof_two_way ! .true. if river-ocean two-way coupling turned on
logical :: rof_sed ! .true. if river model includes sediment
+ character(len=CS) :: wav_ocn_coup ! 'two' if wave-ocean two-way coupling turned on
+ character(len=CS) :: wav_atm_coup ! 'two' if wave-atm two-way coupling turned on
+ character(len=CS) :: wav_ice_coup ! 'two' if wave-ice two-way coupling turned on
!----------------------------------------------------------------------------
! metadata
!----------------------------------------------------------------------------
@@ -386,7 +389,8 @@ subroutine seq_flds_set(nmlfile, ID, infodata)
flds_co2a, flds_co2b, flds_co2c, flds_co2_dmsa, flds_wiso, flds_polar, glc_nec, &
ice_ncat, seq_flds_i2o_per_cat, flds_bgc_oi, &
nan_check_component_fields, rof_heat, atm_flux_method, atm_gustiness, &
- rof2ocn_nutrients, lnd_rof_two_way, ocn_rof_two_way, rof_sed
+ rof2ocn_nutrients, lnd_rof_two_way, ocn_rof_two_way, rof_sed, &
+ wav_ocn_coup, wav_atm_coup, wav_ice_coup
! user specified new fields
integer, parameter :: nfldmax = 200
@@ -429,6 +433,9 @@ subroutine seq_flds_set(nmlfile, ID, infodata)
lnd_rof_two_way = .false.
ocn_rof_two_way = .false.
rof_sed = .false.
+ wav_ocn_coup = 'none'
+ wav_atm_coup = 'none'
+ wav_ice_coup = 'none'
unitn = shr_file_getUnit()
write(logunit,"(A)") subname//': read seq_cplflds_inparm namelist from: '&
@@ -463,6 +470,9 @@ subroutine seq_flds_set(nmlfile, ID, infodata)
call shr_mpi_bcast(lnd_rof_two_way, mpicom)
call shr_mpi_bcast(ocn_rof_two_way, mpicom)
call shr_mpi_bcast(rof_sed, mpicom)
+ call shr_mpi_bcast(wav_ocn_coup, mpicom)
+ call shr_mpi_bcast(wav_atm_coup, mpicom)
+ call shr_mpi_bcast(wav_ice_coup, mpicom)
call glc_elevclass_init(glc_nec)
@@ -648,7 +658,7 @@ subroutine seq_flds_set(nmlfile, ID, infodata)
call seq_flds_add(x2r_states,"Sa_u")
call seq_flds_add(a2x_states_to_rof,"Sa_u")
endif
- call seq_flds_add(x2w_states,"Sa_u")
+ if (wav_atm_coup .ne. 'none') call seq_flds_add(x2w_states,"Sa_u")
longname = 'Zonal wind at the lowest model level'
stdname = 'eastward_wind'
units = 'm s-1'
@@ -663,7 +673,7 @@ subroutine seq_flds_set(nmlfile, ID, infodata)
call seq_flds_add(x2r_states,"Sa_v")
call seq_flds_add(a2x_states_to_rof,"Sa_v")
endif
- call seq_flds_add(x2w_states,"Sa_v")
+ if (wav_atm_coup .ne. 'none') call seq_flds_add(x2w_states,"Sa_v")
longname = 'Meridional wind at the lowest model level'
stdname = 'northward_wind'
units = 'm s-1'
@@ -712,7 +722,7 @@ subroutine seq_flds_set(nmlfile, ID, infodata)
call seq_flds_add(x2r_states,"Sa_tbot")
call seq_flds_add(a2x_states_to_rof,"Sa_tbot")
endif
- call seq_flds_add(x2w_states,"Sa_tbot")
+ if (wav_atm_coup .ne. 'none') call seq_flds_add(x2w_states,"Sa_tbot")
longname = 'Temperature at the lowest model level'
stdname = 'air_temperature'
units = 'K'
@@ -1512,7 +1522,7 @@ subroutine seq_flds_set(nmlfile, ID, infodata)
! Fractional ice coverage wrt ocean
call seq_flds_add(i2x_states,"Si_ifrac")
call seq_flds_add(x2o_states,"Si_ifrac")
- call seq_flds_add(x2w_states,"Si_ifrac")
+ if (wav_ice_coup .ne. 'none') call seq_flds_add(x2w_states,"Si_ifrac")
longname = 'Fractional ice coverage wrt ocean'
stdname = 'sea_ice_area_fraction'
units = '1'
@@ -1689,7 +1699,7 @@ subroutine seq_flds_set(nmlfile, ID, infodata)
! Sea surface temperature
call seq_flds_add(o2x_states,"So_t")
call seq_flds_add(x2i_states,"So_t")
- call seq_flds_add(x2w_states,"So_t")
+ if (wav_ocn_coup .ne. 'none') call seq_flds_add(x2w_states,"So_t")
! Sea surface salinity
call seq_flds_add(o2x_states,"So_s")
@@ -1703,7 +1713,7 @@ subroutine seq_flds_set(nmlfile, ID, infodata)
! Zonal sea water velocity
call seq_flds_add(o2x_states,"So_u")
call seq_flds_add(x2i_states,"So_u")
- call seq_flds_add(x2w_states,"So_u")
+ if (wav_ocn_coup .ne. 'none') call seq_flds_add(x2w_states,"So_u")
longname = 'Zonal sea water velocity'
stdname = 'eastward_sea_water_velocity'
units = 'm s-1'
@@ -1713,7 +1723,7 @@ subroutine seq_flds_set(nmlfile, ID, infodata)
! Meridional sea water velocity
call seq_flds_add(o2x_states,"So_v")
call seq_flds_add(x2i_states,"So_v")
- call seq_flds_add(x2w_states,"So_v")
+ if (wav_ocn_coup .ne. 'none') call seq_flds_add(x2w_states,"So_v")
longname = 'Meridional sea water velocity'
stdname = 'northward_sea_water_velocity'
units = 'm s-1'
@@ -1732,7 +1742,7 @@ subroutine seq_flds_set(nmlfile, ID, infodata)
call seq_flds_add(o2x_states,"So_ssh")
call seq_flds_add(x2r_states,"So_ssh")
call seq_flds_add(o2x_states_to_rof,"So_ssh")
- call seq_flds_add(x2w_states,'So_ssh')
+ if (wav_ocn_coup .ne. 'none') call seq_flds_add(x2w_states,'So_ssh')
longname = 'Sea surface height'
stdname = 'sea_surface_height'
units = 'm'
@@ -1750,7 +1760,7 @@ subroutine seq_flds_set(nmlfile, ID, infodata)
! Boundary Layer Depth
call seq_flds_add(o2x_states,"So_bldepth")
- call seq_flds_add(x2w_states,"So_bldepth")
+ if (wav_ocn_coup .ne. 'none') call seq_flds_add(x2w_states,"So_bldepth")
longname = 'Ocean Boundary Layer Depth'
stdname = 'ocean_boundary_layer_depth'
units = 'm'
@@ -2174,7 +2184,7 @@ subroutine seq_flds_set(nmlfile, ID, infodata)
! Sea ice thickness
call seq_flds_add(i2x_states,"Si_ithick")
- call seq_flds_add(x2w_states,"Si_ithick")
+ if (wav_ice_coup .ne. 'none') call seq_flds_add(x2w_states,"Si_ithick")
longname = 'Sea ice thickness'
stdname = 'sea_ice_thickness'
units = 'm'
@@ -2513,127 +2523,185 @@ subroutine seq_flds_set(nmlfile, ID, infodata)
!-----------------------------
! wav->ocn and ocn->wav
!-----------------------------
+ if (wav_ocn_coup == 'two') then
+ call seq_flds_add(w2x_states,'Sw_Hs')
+ call seq_flds_add(x2o_states,'Sw_Hs')
+ longname = 'Significant wave height'
+ stdname = 'significant_wave_height'
+ units = 'm'
+ attname = 'Sw_Hs'
+ call metadata_set(attname, longname, stdname, units)
+
+ call seq_flds_add(w2x_states,'Sw_ustokes_wavenumber_1')
+ call seq_flds_add(x2o_states,'Sw_ustokes_wavenumber_1')
+ longname = 'Partitioned Stokes drift u component, wavenumber 1'
+ stdname = 'wave_model_partitioned_stokes_drift_u_wavenumber_1'
+ units = 'm/s'
+ attname = 'Sw_ustokes_wavenumber_1'
+ call metadata_set(attname, longname, stdname, units)
- call seq_flds_add(w2x_states,'Sw_ustokes_wavenumber_1')
- call seq_flds_add(x2o_states,'Sw_ustokes_wavenumber_1')
- longname = 'Partitioned Stokes drift u component, wavenumber 1'
- stdname = 'wave_model_partitioned_stokes_drift_u_wavenumber_1'
- units = 'm/s'
- attname = 'Sw_ustokes_wavenumber_1'
- call metadata_set(attname, longname, stdname, units)
+ call seq_flds_add(w2x_states,'Sw_vstokes_wavenumber_1')
+ call seq_flds_add(x2o_states,'Sw_vstokes_wavenumber_1')
+ longname = 'Partitioned Stokes drift v component, wavenumber 1'
+ stdname = 'wave_model_partitioned_stokes_drift_v_wavenumber_1'
+ units = 'm/s'
+ attname = 'Sw_vstokes_wavenumber_1'
+ call metadata_set(attname, longname, stdname, units)
- call seq_flds_add(w2x_states,'Sw_vstokes_wavenumber_1')
- call seq_flds_add(x2o_states,'Sw_vstokes_wavenumber_1')
- longname = 'Partitioned Stokes drift v component, wavenumber 1'
- stdname = 'wave_model_partitioned_stokes_drift_v_wavenumber_1'
- units = 'm/s'
- attname = 'Sw_vstokes_wavenumber_1'
- call metadata_set(attname, longname, stdname, units)
+ call seq_flds_add(w2x_states,'Sw_ustokes_wavenumber_2')
+ call seq_flds_add(x2o_states,'Sw_ustokes_wavenumber_2')
+ longname = 'Partitioned Stokes drift u component, wavenumber 2'
+ stdname = 'wave_model_partitioned_stokes_drift_u_wavenumber_2'
+ units = 'm/s'
+ attname = 'Sw_ustokes_wavenumber_2'
+ call metadata_set(attname, longname, stdname, units)
- call seq_flds_add(w2x_states,'Sw_ustokes_wavenumber_2')
- call seq_flds_add(x2o_states,'Sw_ustokes_wavenumber_2')
- longname = 'Partitioned Stokes drift u component, wavenumber 2'
- stdname = 'wave_model_partitioned_stokes_drift_u_wavenumber_2'
- units = 'm/s'
- attname = 'Sw_ustokes_wavenumber_2'
- call metadata_set(attname, longname, stdname, units)
+ call seq_flds_add(w2x_states,'Sw_vstokes_wavenumber_2')
+ call seq_flds_add(x2o_states,'Sw_vstokes_wavenumber_2')
+ longname = 'Partitioned Stokes drift v component, wavenumber 2'
+ stdname = 'wave_model_partitioned_stokes_drift_v_wavenumber_2'
+ units = 'm/s'
+ attname = 'Sw_vstokes_wavenumber_2'
+ call metadata_set(attname, longname, stdname, units)
- call seq_flds_add(w2x_states,'Sw_vstokes_wavenumber_2')
- call seq_flds_add(x2o_states,'Sw_vstokes_wavenumber_2')
- longname = 'Partitioned Stokes drift v component, wavenumber 2'
- stdname = 'wave_model_partitioned_stokes_drift_v_wavenumber_2'
- units = 'm/s'
- attname = 'Sw_vstokes_wavenumber_2'
- call metadata_set(attname, longname, stdname, units)
+ call seq_flds_add(w2x_states,'Sw_ustokes_wavenumber_3')
+ call seq_flds_add(x2o_states,'Sw_ustokes_wavenumber_3')
+ longname = 'Partitioned Stokes drift u component, wavenumber 3'
+ stdname = 'wave_model_partitioned_stokes_drift_u_wavenumber_3'
+ units = 'm/s'
+ attname = 'Sw_ustokes_wavenumber_3'
+ call metadata_set(attname, longname, stdname, units)
- call seq_flds_add(w2x_states,'Sw_ustokes_wavenumber_3')
- call seq_flds_add(x2o_states,'Sw_ustokes_wavenumber_3')
- longname = 'Partitioned Stokes drift u component, wavenumber 3'
- stdname = 'wave_model_partitioned_stokes_drift_u_wavenumber_3'
- units = 'm/s'
- attname = 'Sw_ustokes_wavenumber_3'
- call metadata_set(attname, longname, stdname, units)
+ call seq_flds_add(w2x_states,'Sw_vstokes_wavenumber_3')
+ call seq_flds_add(x2o_states,'Sw_vstokes_wavenumber_3')
+ longname = 'Partitioned Stokes drift v component, wavenumber 3'
+ stdname = 'wave_model_partitioned_stokes_drift_v_wavenumber_3'
+ units = 'm/s'
+ attname = 'Sw_vstokes_wavenumber_3'
+ call metadata_set(attname, longname, stdname, units)
- call seq_flds_add(w2x_states,'Sw_vstokes_wavenumber_3')
- call seq_flds_add(x2o_states,'Sw_vstokes_wavenumber_3')
- longname = 'Partitioned Stokes drift v component, wavenumber 3'
- stdname = 'wave_model_partitioned_stokes_drift_v_wavenumber_3'
- units = 'm/s'
- attname = 'Sw_vstokes_wavenumber_3'
- call metadata_set(attname, longname, stdname, units)
+ call seq_flds_add(w2x_states,'Sw_ustokes_wavenumber_4')
+ call seq_flds_add(x2o_states,'Sw_ustokes_wavenumber_4')
+ longname = 'Partitioned Stokes drift u component, wavenumber 4'
+ stdname = 'wave_model_partitioned_stokes_drift_u_wavenumber_4'
+ units = 'm/s'
+ attname = 'Sw_ustokes_wavenumber_4'
+ call metadata_set(attname, longname, stdname, units)
- call seq_flds_add(w2x_states,'Sw_ustokes_wavenumber_4')
- call seq_flds_add(x2o_states,'Sw_ustokes_wavenumber_4')
- longname = 'Partitioned Stokes drift u component, wavenumber 4'
- stdname = 'wave_model_partitioned_stokes_drift_u_wavenumber_4'
- units = 'm/s'
- attname = 'Sw_ustokes_wavenumber_4'
- call metadata_set(attname, longname, stdname, units)
+ call seq_flds_add(w2x_states,'Sw_vstokes_wavenumber_4')
+ call seq_flds_add(x2o_states,'Sw_vstokes_wavenumber_4')
+ longname = 'Partitioned Stokes drift v component, wavenumber 4'
+ stdname = 'wave_model_partitioned_stokes_drift_v_wavenumber_4'
+ units = 'm/s'
+ attname = 'Sw_vstokes_wavenumber_4'
+ call metadata_set(attname, longname, stdname, units)
- call seq_flds_add(w2x_states,'Sw_vstokes_wavenumber_4')
- call seq_flds_add(x2o_states,'Sw_vstokes_wavenumber_4')
- longname = 'Partitioned Stokes drift v component, wavenumber 4'
- stdname = 'wave_model_partitioned_stokes_drift_v_wavenumber_4'
- units = 'm/s'
- attname = 'Sw_vstokes_wavenumber_4'
- call metadata_set(attname, longname, stdname, units)
+ call seq_flds_add(w2x_states,'Sw_ustokes_wavenumber_5')
+ call seq_flds_add(x2o_states,'Sw_ustokes_wavenumber_5')
+ longname = 'Partitioned Stokes drift u component, wavenumber 5'
+ stdname = 'wave_model_partitioned_stokes_drift_u_wavenumber_5'
+ units = 'm/s'
+ attname = 'Sw_ustokes_wavenumber_5'
+ call metadata_set(attname, longname, stdname, units)
- call seq_flds_add(w2x_states,'Sw_ustokes_wavenumber_5')
- call seq_flds_add(x2o_states,'Sw_ustokes_wavenumber_5')
- longname = 'Partitioned Stokes drift u component, wavenumber 5'
- stdname = 'wave_model_partitioned_stokes_drift_u_wavenumber_5'
- units = 'm/s'
- attname = 'Sw_ustokes_wavenumber_5'
- call metadata_set(attname, longname, stdname, units)
+ call seq_flds_add(w2x_states,'Sw_vstokes_wavenumber_5')
+ call seq_flds_add(x2o_states,'Sw_vstokes_wavenumber_5')
+ longname = 'Partitioned Stokes drift v component, wavenumber 5'
+ stdname = 'wave_model_partitioned_stokes_drift_v_wavenumber_5'
+ units = 'm/s'
+ attname = 'Sw_vstokes_wavenumber_5'
+ call metadata_set(attname, longname, stdname, units)
- call seq_flds_add(w2x_states,'Sw_vstokes_wavenumber_5')
- call seq_flds_add(x2o_states,'Sw_vstokes_wavenumber_5')
- longname = 'Partitioned Stokes drift v component, wavenumber 5'
- stdname = 'wave_model_partitioned_stokes_drift_v_wavenumber_5'
- units = 'm/s'
- attname = 'Sw_vstokes_wavenumber_5'
- call metadata_set(attname, longname, stdname, units)
+ call seq_flds_add(w2x_states,'Sw_ustokes_wavenumber_6')
+ call seq_flds_add(x2o_states,'Sw_ustokes_wavenumber_6')
+ longname = 'Partitioned Stokes drift u component, wavenumber 6'
+ stdname = 'wave_model_partitioned_stokes_drift_u_wavenumber_6'
+ units = 'm/s'
+ attname = 'Sw_ustokes_wavenumber_6'
+ call metadata_set(attname, longname, stdname, units)
- call seq_flds_add(w2x_states,'Sw_ustokes_wavenumber_6')
- call seq_flds_add(x2o_states,'Sw_ustokes_wavenumber_6')
- longname = 'Partitioned Stokes drift u component, wavenumber 6'
- stdname = 'wave_model_partitioned_stokes_drift_u_wavenumber_6'
- units = 'm/s'
- attname = 'Sw_ustokes_wavenumber_6'
- call metadata_set(attname, longname, stdname, units)
+ call seq_flds_add(w2x_states,'Sw_vstokes_wavenumber_6')
+ call seq_flds_add(x2o_states,'Sw_vstokes_wavenumber_6')
+ longname = 'Partitioned Stokes drift v component, wavenumber 6'
+ stdname = 'wave_model_partitioned_stokes_drift_v_wavenumber_6'
+ units = 'm/s'
+ attname = 'Sw_vstokes_wavenumber_6'
+ call metadata_set(attname, longname, stdname, units)
+
+ call seq_flds_add(w2x_states,'Sw_Fp')
+ call seq_flds_add(x2o_states,'Sw_Fp')
+ longname = 'Peak wave frequency'
+ stdname = 'peak_wave_frequency'
+ units = 's-1'
+ attname = 'Sw_Fp'
+ call metadata_set(attname, longname, stdname, units)
- call seq_flds_add(w2x_states,'Sw_vstokes_wavenumber_6')
- call seq_flds_add(x2o_states,'Sw_vstokes_wavenumber_6')
- longname = 'Partitioned Stokes drift v component, wavenumber 6'
- stdname = 'wave_model_partitioned_stokes_drift_v_wavenumber_6'
- units = 'm/s'
- attname = 'Sw_vstokes_wavenumber_6'
- call metadata_set(attname, longname, stdname, units)
+ call seq_flds_add(w2x_states,'Sw_Dp')
+ call seq_flds_add(x2o_states,'Sw_Dp')
+ longname = 'Peak wave direction'
+ stdname = 'peak_wave_direction'
+ units = 'deg'
+ attname = 'Sw_Dp'
+ call metadata_set(attname, longname, stdname, units)
- call seq_flds_add(w2x_states,'Sw_Hs')
- call seq_flds_add(x2o_states,'Sw_Hs')
- longname = 'Significant wave height'
- stdname = 'significant_wave_height'
- units = 'm'
- attname = 'Sw_Hs'
- call metadata_set(attname, longname, stdname, units)
+ call seq_flds_add(w2x_fluxes,'Faww_Tawx')
+ call seq_flds_add(x2o_fluxes,'Faww_Tawx')
+ longname = 'Zonal wave supported stress'
+ stdname = 'Zonal_wave_supported_stress'
+ units = 'N m-2'
+ attname = 'Faww_Tawx'
+ call metadata_set(attname, longname, stdname, units)
- call seq_flds_add(w2x_states,'Sw_Fp')
- call seq_flds_add(x2o_states,'Sw_Fp')
- longname = 'Peak wave frequency'
- stdname = 'peak_wave_frequency'
- units = 's-1'
- attname = 'Sw_Fp'
- call metadata_set(attname, longname, stdname, units)
+ call seq_flds_add(w2x_fluxes,'Faww_Tawy')
+ call seq_flds_add(x2o_fluxes,'Faww_Tawy')
+ longname = 'Meridional wave supported wind stress'
+ stdname = 'Meridional_wave_supported_wind_stress'
+ units = 'N m-2'
+ attname = 'Faww_Tawy'
+ call metadata_set(attname, longname, stdname, units)
- call seq_flds_add(w2x_states,'Sw_Dp')
- call seq_flds_add(x2o_states,'Sw_Dp')
- longname = 'Peak wave direction'
- stdname = 'peak_wave_direction'
- units = 'deg'
- attname = 'Sw_Dp'
- call metadata_set(attname, longname, stdname, units)
+ call seq_flds_add(w2x_fluxes,'Fwow_Twox')
+ call seq_flds_add(x2o_fluxes,'Fwow_Twox')
+ longname = 'Zonal wave to ocean wind stress'
+ stdname = 'Zonal_wave_to_ocean_wind_stress'
+ units = 'N m-2'
+ attname = 'Fwow_Twox'
+ call metadata_set(attname, longname, stdname, units)
+
+ call seq_flds_add(w2x_fluxes,'Fwow_Twoy')
+ call seq_flds_add(x2o_fluxes,'Fwow_Twoy')
+ longname = 'Meridional wave to ocean wind stress'
+ stdname = 'Meridional_wave_to_ocean_wind_stress'
+ units = 'N m-2'
+ attname = 'Fwow_Twoy'
+ call metadata_set(attname, longname, stdname, units)
+ call seq_flds_add(w2x_fluxes,'Faow_Tocx')
+ call seq_flds_add(x2o_fluxes,'Faow_Tocx')
+ longname = 'Zonal Net ocean wind stress by wave model'
+ stdname = 'Zonal_net_ocean_wind_stress_wavemodel'
+ units = 'N m-2'
+ attname = 'Faow_Tocx'
+ call metadata_set(attname, longname, stdname, units)
+
+ call seq_flds_add(w2x_fluxes,'Faow_Tocy')
+ call seq_flds_add(x2o_fluxes,'Faow_Tocy')
+ longname = 'Meridional Net ocean wind stress by wave model'
+ stdname = 'Meridional_net_ocean_wind_stress_wavemodel'
+ units = 'N m-2'
+ attname = 'Faow_Tocy'
+ call metadata_set(attname, longname, stdname, units)
+ endif
+
+ if (wav_atm_coup == 'two' .or. wav_ocn_coup == 'two') then
+ call seq_flds_add(w2x_states,'Sw_Charn')
+ if (wav_ocn_coup == 'two') call seq_flds_add(x2o_states,'Sw_Charn')
+ longname = 'Charnock coefficent based on sea state'
+ stdname = 'Charnock_coefficent_based_on_sea_state'
+ units = ''
+ attname = 'Sw_Charn'
+ call metadata_set(attname, longname, stdname, units)
+ endif
!-----------------------------
! New xao_states diagnostic
! fields for history output only
diff --git a/share/util/shr_flux_mod.F90 b/share/util/shr_flux_mod.F90
index cb62a489fde3..7f8a776a2c87 100644
--- a/share/util/shr_flux_mod.F90
+++ b/share/util/shr_flux_mod.F90
@@ -137,7 +137,7 @@ end subroutine shr_flux_adjust_constants
!
! 2011-Mar-13 - J. Nusbaumer - Water Isotope ocean flux added.
! 2019-May-16 - Jack Reeves Eyre (UA) and Kai Zhang (PNNL) - Added COARE/Fairall surface flux scheme option (ocn_surface_flux_scheme .eq. 1) based on code from Thomas Toniazzo (Bjerknes Centre, Bergen) ”
-!
+! 2024-Jul-10 - E. Thomas ethomas@lanl.gov - implementing Coare3.0 w/ Wave coupling (uses charnock paramter from WW3)
! !INTERFACE: ------------------------------------------------------------------
SUBROUTINE shr_flux_atmOcn(nMax ,zbot ,ubot ,vbot ,thbot , &
@@ -150,11 +150,12 @@ SUBROUTINE shr_flux_atmOcn(nMax ,zbot ,ubot ,vbot ,thbot , &
& taux ,tauy ,tref ,qref , &
& ocn_surface_flux_scheme, &
& duu10n, u10res, ustar_sv ,re_sv ,ssq_sv, &
- & missval, wsresp, tau_est, ugust)
+ & missval, wsresp, tau_est, ugust, charnockSeaState)
! !USES:
use water_isotopes, only: wiso_flxoce !subroutine used to calculate water isotope fluxes.
+ use seq_flds_mod, only : wav_atm_coup
implicit none
! !INPUT/OUTPUT PARAMETERS:
@@ -205,6 +206,7 @@ SUBROUTINE shr_flux_atmOcn(nMax ,zbot ,ubot ,vbot ,thbot , &
real(R8),intent(in) ,optional :: wsresp(nMax) ! boundary layer wind response to stress (m/s/Pa)
real(R8),intent(in) ,optional :: tau_est(nMax) ! stress in equilibrium with boundary layer (Pa)
real(R8),intent(in) ,optional :: ugust(nMax) ! extra wind speed from gustiness (m/s)
+ real(R8),intent(in) ,optional :: charnockSeaState(nMax) !Charnock coeff accounting for the wave stress (Janssen 1989, 1991)
! !EOP
@@ -539,17 +541,26 @@ SUBROUTINE shr_flux_atmOcn(nMax ,zbot ,ubot ,vbot ,thbot , &
endif
endif
ssq = 0.98_R8 * qsat(ts(n)) / rbot(n) ! sea surf hum (kg/kg)
-
- call cor30a(ubot(n),vbot(n),tbot(n),qbot(n),rbot(n) & ! in atm params
+ if (wav_atm_coup .eq. 'two') then
+ call cor30a(ubot(n),vbot(n),tbot(n),qbot(n),rbot(n) & ! in atm params
& ,us(n),vs(n),ts(n),ssq & ! in surf params
& ,zpbl,zbot(n),zbot(n),zref,ztref,ztref & ! in heights
& ,tau,hsb,hlb & ! out: fluxes
& ,zo,zot,zoq,hol,ustar,tstar,qstar & ! out: ss scales
& ,rd,rh,re & ! out: exch. coeffs
& ,trf,qrf,urf,vrf & ! out: reference-height params
- & ,wsresp(n),tau_est(n)) ! in: optional stress params
-
-! for the sake of maintaining same defs
+ & ,wsresp(n),tau_est(n) & ! in: optional stress params for the sake of maintaining same defs
+ & ,charnockSeaState(n)) ! in: optional charnock sea state
+ else
+ call cor30a(ubot(n),vbot(n),tbot(n),qbot(n),rbot(n) & ! in atm params
+ & ,us(n),vs(n),ts(n),ssq & ! in surf params
+ & ,zpbl,zbot(n),zbot(n),zref,ztref,ztref & ! in heights
+ & ,tau,hsb,hlb & ! out: fluxes
+ & ,zo,zot,zoq,hol,ustar,tstar,qstar & ! out: ss scales
+ & ,rd,rh,re & ! out: exch. coeffs
+ & ,trf,qrf,urf,vrf & ! out: reference-height params
+ & ,wsresp(n),tau_est(n) ) ! in: optional stress params for the sake of maintaining same defs
+ endif
hol=zbot(n)/hol
rd=sqrt(rd)
rh=sqrt(rh)
@@ -2513,10 +2524,11 @@ subroutine cor30a(ubt,vbt,tbt,qbt,rbt & ! in atm params
& ,zo,zot,zoq,L,usr,tsr,qsr & ! out: ss scales
& ,Cd,Ch,Ce & ! out: exch. coeffs
& ,trf,qrf,urf,vrf & ! out: reference-height params
- & ,wsresp,tau_est) ! in: optional stress params
-
-! !USES:
+ & ,wsresp,tau_est & ! in: optional stress params
+ & ,charnsea) ! in: optional charnock sea state
+!USES:
+use seq_flds_mod, only : wav_atm_coup
IMPLICIT NONE
! !INPUT/OUTPUT PARAMETERS:
@@ -2526,6 +2538,8 @@ subroutine cor30a(ubt,vbt,tbt,qbt,rbt & ! in atm params
real(R8),intent(out):: tau,hsb,hlb,zo,zot,zoq,L,usr,tsr,qsr,Cd,Ch,Ce &
& ,trf,qrf,urf,vrf
real(R8),intent(in),optional:: wsresp,tau_est
+real(R8),intent(in) ,optional :: charnsea !Charnock coeff accounting for the wave stress (Janssen 1989, 1991)
+
! !EOP
real(R8) ua,va,ta,q,rb,us,vs,ts,qs,zi,zu,zt,zq,zru,zrq,zrt ! internal vars
@@ -2632,13 +2646,17 @@ subroutine cor30a(ubt,vbt,tbt,qbt,rbt & ! in atm params
tsr = (dt-dter*jcool)*von/(log(zt/zot10)-psit_30(zt/L10))
qsr = (dq-dqer*jcool)*von/(log(zq/zot10)-psit_30(zq/L10))
-! parametrisation for Charney parameter (section 3c of Fairall et al. 2003)
- charn=0.011_R8
- if (ut .GT. 10.0_R8) then
- charn=0.011_R8+(ut-10.0_R8)/(18.0_R8-10.0_R8)*(0.018_R8-0.011_R8)
- endif
- if (ut .GT. 18.0_R8) then
- charn=0.018_R8
+ if (wav_atm_coup .eq. 'two') then
+ charn = charnsea !use Charnock coefficient from active wave model (Janssen 1989, 1991)
+ else
+ ! parametrisation for Charney parameter (section 3c of Fairall et al. 2003)
+ charn=0.011_R8
+ if (ut .GT. 10.0_R8) then
+ charn=0.011_R8+(ut-10.0_R8)/(18.0_R8-10.0_R8)*(0.018_R8-0.011_R8)
+ endif
+ if (ut .GT. 18.0_R8) then
+ charn=0.018_R8
+ endif
endif
if (present(wsresp) .and. present(tau_est)) prev_tau = tau_est