Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ICOS30 wave mesh for E3SMv3. #6706

Merged
merged 17 commits into from
Nov 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions cime_config/config_grids.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2405,6 +2405,16 @@
<mask>EC30to60E2r2</mask>
</model_grid>

<model_grid alias="ne30pg2_IcoswISC30E3r5_wQU225Icos30E3r5">
<grid name="atm">ne30np4.pg2</grid>
<grid name="lnd">r05</grid>
<grid name="ocnice">IcoswISC30E3r5</grid>
<grid name="rof">r05</grid>
<grid name="glc">null</grid>
<grid name="wav">wQU225Icos30E3r5</grid>
<mask>IcoswISC30E3r5</mask>
</model_grid>

<model_grid alias="ne30pg2_WC14to60E2r3">
<grid name="atm">ne30np4.pg2</grid>
<grid name="lnd">ne30np4.pg2</grid>
Expand Down Expand Up @@ -3476,6 +3486,13 @@
<file grid="wav">$DIN_LOC_ROOT/share/domains/domain.ocn.wQU225EC30to60E2r2.220224.nc</file>
<desc>WW3 unstructured QU 225km global grid with EC30to60E2r2 coastlines</desc>
</domain>

<domain name="wQU225Icos30E3r5">
<nx>97988</nx>
<ny>1</ny>
<file grid="wav">$DIN_LOC_ROOT/share/domains/domain.ocn.wQU225Icos30E3r5.240910.nc</file>
<desc>WW3 unstructured QU 225km global grid with ICOS30 coastlines</desc>
</domain>

<!-- RRM grids -->

Expand Down Expand Up @@ -3637,6 +3654,7 @@
<required_gridmap grid1="atm_grid" grid2="rof_grid" compset="_MOSART">ATM2ROF_SMAPNAME</required_gridmap>
<required_gridmap grid1="atm_grid" grid2="wav_grid">ATM2WAV_SMAPNAME</required_gridmap>
<required_gridmap grid1="ocn_grid" grid2="wav_grid">OCN2WAV_SMAPNAME</required_gridmap>
<required_gridmap grid1="ocn_grid" grid2="wav_grid">WAV2OCN_SMAPNAME</required_gridmap>
<required_gridmap grid1="ocn_grid" grid2="wav_grid">ICE2WAV_SMAPNAME</required_gridmap> <!-- ??? -->
<!-- <required_gridmap grid1="ocn_grid" grid2="rof_grid" not_compset="_POP">ROF2OCN_FMAPNAME</required_gridmap> ?? -->
<required_gridmap grid1="ocn_grid" grid2="rof_grid">ROF2OCN_LIQ_RMAPNAME</required_gridmap>
Expand Down Expand Up @@ -5042,6 +5060,10 @@
<map name="ATM2WAV_SMAPNAME">cpl/gridmaps/wQU225EC30to60E2r2/map_ne30pg2_TO_wQU225EC30to60E2r2_blin.20220222.nc</map>
</gridmap>

<gridmap atm_grid="ne30np4.pg2" wav_grid="wQU225Icos30E3r5">
<map name="ATM2WAV_SMAPNAME">cpl/gridmaps/wQU225Icos30E3r5/map_ne30pg2_to_wQU225Icos30E3r5_esmfbilin.20240910.nc</map>
</gridmap>

<gridmap atm_grid="TL319" wav_grid="wQU225EC30to60E2r2">
<map name="ATM2WAV_SMAPNAME">cpl/gridmaps/wQU225EC30to60E2r2/map_TL319_TO_wQU225EC30to60E2r2_blin.20220602.nc</map>
</gridmap>
Expand All @@ -5058,6 +5080,12 @@
<map name="ICE2WAV_SMAPNAME">cpl/gridmaps/wQU225EC30to60E2r2/map_EC30to60E2r2_TO_wQU225EC30to60E2r2_blin.20220222.nc</map>
</gridmap>

<gridmap ocn_grid="IcoswISC30E3r5" wav_grid="wQU225Icos30E3r5">
<map name="WAV2OCN_SMAPNAME">cpl/gridmaps/wQU225Icos30E3r5/map_wQU225Icos30E3r5_to_IcoswISC30E3r5_esmfbilin.20240910.nc</map>
<map name="OCN2WAV_SMAPNAME">cpl/gridmaps/wQU225Icos30E3r5/map_IcoswISC30E3r5_to_wQU225Icos30E3r5_esmfbilin.20240910.nc</map>
<map name="ICE2WAV_SMAPNAME">cpl/gridmaps/wQU225Icos30E3r5/map_IcoswISC30E3r5_to_wQU225Icos30E3r5_esmfbilin.20240910.nc</map>
</gridmap>

<gridmap atm_grid="CFSv2" wav_grid="wQU225EC60to30">
<map name="ATM2WAV_SMAPNAME">cpl/gridmaps/wQU225EC60to30/map_CFSv2_TO_wQU225EC60to30_blin.20210412.nc</map>
</gridmap>
Expand Down
9 changes: 5 additions & 4 deletions cime_config/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -820,12 +820,13 @@
},

"e3sm_wav_developer" : {
"time" : "0:45:00",
"time" : "1:00: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_P480.ne30pg2_IcoswISC30E3r5_wQU225Icos30E3r5.WCYCL1850-WW3",
"PET.ne30pg2_IcoswISC30E3r5_wQU225Icos30E3r5.WCYCL1850-WW3",
"SMS_D_Ln3.ne30pg2_IcoswISC30E3r5_wQU225Icos30E3r5.WCYCL1850-WW3",
)
},

Expand Down
49 changes: 34 additions & 15 deletions components/mpas-ocean/src/shared/mpas_ocn_vmix_cvmix.F
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,9 @@ subroutine ocn_vmix_coefs_cvmix_build(meshPool, statePool, forcingPool, err, tim
integer, dimension(:), pointer :: &
maxLevelCell, minLevelCell, nEdgesOnCell, maxLevelEdgeTop, minLevelEdgeBot

integer, dimension(:), pointer :: landIceMask
integer :: landIceMaskValue

real (kind=RKIND), dimension(:), pointer :: &
latCell, lonCell, bottomDepth, fCell, &
ssh, dcEdge, dvEdge, areaCell, iceFraction, &
Expand Down Expand Up @@ -241,6 +244,7 @@ subroutine ocn_vmix_coefs_cvmix_build(meshPool, statePool, forcingPool, err, tim
! set pointers for fields related to ocean forcing state
!
call mpas_pool_get_array(forcingPool, 'iceFraction', iceFraction)
call mpas_pool_get_array(forcingPool, 'landIceMask', landIceMask)
call mpas_pool_get_array(forcingPool, 'windSpeed10m', windSpeed10m)
call mpas_pool_get_array(forcingPool, 'windStressZonal', windStressZonal)
call mpas_pool_get_array(forcingPool, 'windStressMeridional', windStressMeridional)
Expand Down Expand Up @@ -479,18 +483,25 @@ subroutine ocn_vmix_coefs_cvmix_build(meshPool, statePool, forcingPool, err, tim
Nsqr_iface(k:maxLevelCell(iCell)+1) = Nsqr_iface(k-1)

! compute Langmuir number and Langmuir enhancement factor
if (config_cvmix_kpp_use_theory_wave .and. iceFraction(iCell) .lt. 0.05_RKIND) then
langmuirNumber(iCell) = sqrt(surfaceFrictionVelocity(iCell) / ( &
if (associated(landIceMask)) then
landIceMaskValue = landIceMask(iCell)
else
landIceMaskValue = 0
endif

if ( landIceMaskValue .eq. 0 .and. iceFraction(iCell) .lt. 0.05_RKIND) then
if (config_cvmix_kpp_use_theory_wave) then
langmuirNumber(iCell) = sqrt(surfaceFrictionVelocity(iCell) / ( &
cvmix_kpp_ustokes_SL_model(windSpeed10m(iCell), &
boundaryLayerDepth(iCell), &
cvmix_global_params)+1e-15_RKIND) )
langmuirEnhancementFactor = &
langmuirEnhancementFactor = &
cvmix_kpp_EFactor_model(windSpeed10m(iCell), &
surfaceFrictionVelocity(iCell), &
boundaryLayerDepth(iCell), &
cvmix_global_params)
else if (config_cvmix_kpp_use_active_wave .and. iceFraction(iCell) .lt. 0.05_RKIND) then
call ocn_stokes_drift_langmuir_number(windStressZonal(iCell), &
else if (config_cvmix_kpp_use_active_wave) then
call ocn_stokes_drift_langmuir_number(windStressZonal(iCell), &
windStressMeridional(iCell), &
surfaceFrictionVelocity(iCell), &
significantWaveHeight(iCell), &
Expand All @@ -499,9 +510,10 @@ subroutine ocn_vmix_coefs_cvmix_build(meshPool, statePool, forcingPool, err, tim
stokesDriftMeridionalWavenumber(:,iCell), &
alphaAngle, &
langmuirNumber(iCell))
call ocn_stokes_drift_kpp_enhancement_factor(alphaAngle, &
call ocn_stokes_drift_kpp_enhancement_factor(alphaAngle, &
langmuirNumber(iCell), &
langmuirEnhancementFactor)
endif
else
! arbitrarily large Langmuir number
langmuirNumber(iCell) = 1.e10_RKIND
Expand Down Expand Up @@ -678,14 +690,21 @@ subroutine ocn_vmix_coefs_cvmix_build(meshPool, statePool, forcingPool, err, tim
OBL_depth = boundaryLayerDepth(iCell) )

! update Langmuir enhancement factor
if (config_cvmix_kpp_use_theory_wave .and. iceFraction(iCell) .lt. 0.05_RKIND) then
langmuirEnhancementFactor = &
if (associated(landIceMask)) then
landIceMaskValue = landIceMask(iCell)
else
landIceMaskValue = 0
endif

if (landIceMaskValue .eq. 0 .and. iceFraction(iCell) .lt. 0.05_RKIND) then
if (config_cvmix_kpp_use_theory_wave) then
langmuirEnhancementFactor = &
cvmix_kpp_EFactor_model(windSpeed10m(iCell), &
surfaceFrictionVelocity(iCell), &
boundaryLayerDepth(iCell), &
cvmix_global_params)
else if (config_cvmix_kpp_use_active_wave .and. iceFraction(iCell) .lt. 0.05_RKIND) then
call ocn_stokes_drift_langmuir_number(windStressZonal(iCell), &
else if (config_cvmix_kpp_use_active_wave) then
call ocn_stokes_drift_langmuir_number(windStressZonal(iCell), &
windStressMeridional(iCell), &
surfaceFrictionVelocity(iCell), &
significantWaveHeight(iCell), &
Expand All @@ -694,13 +713,13 @@ subroutine ocn_vmix_coefs_cvmix_build(meshPool, statePool, forcingPool, err, tim
stokesDriftMeridionalWavenumber(:,iCell), &
alphaAngle, &
langmuirNumber(iCell))
call ocn_stokes_drift_kpp_enhancement_factor(alphaAngle, &
langmuirNumber(iCell), &
langmuirEnhancementFactor)
call ocn_stokes_drift_kpp_enhancement_factor(alphaAngle, &
langmuirNumber(iCell), &
langmuirEnhancementFactor)
endif
else
langmuirEnhancementFactor = 1.0_RKIND
end if

endif
! call mpas_timer_start('cvmix coeffs kpp', .false.)
call cvmix_coeffs_kpp( &
Mdiff_out = cvmix_variables % Mdiff_iface(minLevelCell(iCell):maxLevelCell(iCell)+1), &
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ variables. Values that depend on the model configuration use
attributes to express the dependency.
-->

<spectrum%xfr>1.07</spectrum%xfr>
<spectrum%xfr>1.1</spectrum%xfr>
<spectrum%freq1>0.035</spectrum%freq1>
<spectrum%nk>50</spectrum%nk>
<spectrum%nk>36</spectrum%nk>

<spectrum%nth>36</spectrum%nth>
<spectrum%thoff>0.5</spectrum%thoff>
Expand All @@ -30,7 +30,7 @@ attributes to express the dependency.
<timesteps%dtkth>450.0</timesteps%dtkth>
<timesteps%dtmin>30.0</timesteps%dtmin>

<grid%name>wQU225EC30to60E2r2</grid%name>
<grid%name>wQU225Icos30E3r5</grid%name>
<grid%nml>ww3_grid_namelists.nml</grid%nml>
<grid%type>UNST</grid%type>
<grid%coord>SPHE</grid%coord>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,8 @@ attributes to express the dependency.

<!-- UOST -->

<uostfilelocal>obstructions_local.glo_unst.in</uostfilelocal>
<uostfileshadow>obstructions_shadow.glo_unst.in</uostfileshadow>
<uostfilelocal>obstructions_local.rtd.in</uostfilelocal>
<uostfileshadow>obstructions_shadow.rtd.in</uostfileshadow>
<uostfactorlocal>1.00</uostfactorlocal>
<uostfactorshadow>1.00</uostfactorshadow>

Expand Down
3 changes: 2 additions & 1 deletion components/ww3/cime_config/buildnml
Original file line number Diff line number Diff line change
Expand Up @@ -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) )

#--------------------------------------------------------------------
Expand Down