Skip to content

Commit

Permalink
Merge branch 'matthewhoffman/ocn-glc/ocn-glcshelf-test' (PR #6437)
Browse files Browse the repository at this point in the history
Update LISIO test to include ocn-glcshelf coupling

This PR replaces the MPAS_LISIO_TEST ("LandIce-SeaIce-Ocean") test with
a new compset that is more up to date and updates test coverage for
OCN-GLC coupling work in development. It makes the following changes:
* updates compset and grid definition to use JRA1p5 data atmosphere
  instead of CORE II-NYF
* updates ocean mesh to use oQU240wLI mesh, which is cheaper and
  includes ice-shelf cavities
* introduces a testmod that activates ocn-glcshelf coupling. That
  coupling was added in PR #2726, but a test was never added.
The PR also includes a small MPAS-Ocean bug fix that activating
ocn-glcshelf coupling revealed.

[BFB]
  • Loading branch information
jonbob committed May 23, 2024
2 parents c071a31 + 261fbf5 commit 8389d22
Show file tree
Hide file tree
Showing 7 changed files with 77 additions and 9 deletions.
4 changes: 2 additions & 2 deletions cime_config/allactive/config_compsets.xml
Original file line number Diff line number Diff line change
Expand Up @@ -417,8 +417,8 @@

<!-- OCN + CICE + GLC Only Compsets -->
<compset>
<alias>MPAS_LISIO_TEST</alias>
<lname>2000_DATM%NYF_SLND_MPASSI_MPASO_DROF%NYF_MALI%SIA_SWAV</lname>
<alias>MPAS_LISIO_JRA1p5</alias>
<lname>2000_DATM%JRA-1p5_SLND_MPASSI_MPASO%DATMFORCED_DROF%JRA-1p5_MALI%SIA_SWAV</lname>
</compset>

<!-- Slab ocean cases -->
Expand Down
53 changes: 53 additions & 0 deletions cime_config/config_grids.xml
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,16 @@
<mask>IcoswISC30E3r5</mask>
</model_grid>

<model_grid alias="TL319_oQU240wLI" compset="(DATM|XATM|SATM)">
<grid name="atm">TL319</grid>
<grid name="lnd">TL319</grid>
<grid name="ocnice">oQU240wLI</grid>
<grid name="rof">JRA025</grid>
<grid name="glc">null</grid>
<grid name="wav">null</grid>
<mask>oQU240wLI</mask>
</model_grid>

<model_grid alias="TL319_oEC60to30v3" compset="(DATM|XATM|SATM)">
<grid name="atm">TL319</grid>
<grid name="lnd">TL319</grid>
Expand Down Expand Up @@ -1925,6 +1935,16 @@
<mask>gx1v6</mask>
</model_grid>

<model_grid alias="TL319_oQU240wLI_ais20" compset="_MALI">
<grid name="atm">TL319</grid>
<grid name="lnd">TL319</grid>
<grid name="ocnice">oQU240wLI</grid>
<grid name="rof">JRA025</grid>
<grid name="glc">mpas.ais20km</grid>
<grid name="wav">null</grid>
<mask>oQU240wLI</mask>
</model_grid>

<!-- new runoff grids for data runoff model DROF -->

<model_grid alias="T31_g37_rx1" compset="_DROF">
Expand Down Expand Up @@ -2601,6 +2621,8 @@
<domain name="TL319">
<nx>640</nx>
<ny>320</ny>
<file grid="atm|lnd" mask="oQU240wLI">$DIN_LOC_ROOT/share/domains/domain.lnd.TL319_oQU240wLI.240509.nc</file>
<file grid="ice|ocn" mask="oQU240wLI">$DIN_LOC_ROOT/share/domains/domain.ocn.TL319_oQU240wLI.240509.nc</file>
<file grid="atm|lnd" mask="oEC60to30v3">$DIN_LOC_ROOT/share/domains/domain.lnd.TL319_oEC60to30v3.181203.nc</file>
<file grid="ice|ocn" mask="oEC60to30v3">$DIN_LOC_ROOT/share/domains/domain.ocn.TL319_oEC60to30v3.181203.nc</file>
<file grid="atm|lnd" mask="oEC60to30v3wLI">$DIN_LOC_ROOT/share/domains/domain.lnd.TL319_oEC60to30v3wLI.200108.nc</file>
Expand Down Expand Up @@ -4346,6 +4368,14 @@
<map name="OCN2ATM_SMAPNAME">cpl/gridmaps/IcoswISC30E3r5/map_IcoswISC30E3r5_to_T62_traave.20231121.nc</map>
</gridmap>

<gridmap atm_grid="TL319" ocn_grid="oQU240wLI">
<map name="ATM2OCN_FMAPNAME">cpl/gridmaps/TL319/map_TL319_to_oQU240wLI_traave.20240509.nc</map>
<map name="ATM2OCN_SMAPNAME">cpl/gridmaps/TL319/map_TL319_to_oQU240wLI-nomask_trbilin.20240509.nc</map>
<map name="ATM2OCN_VMAPNAME">cpl/gridmaps/TL319/map_TL319_to_oQU240wLI_esmfpatch.20240509.nc</map>
<map name="OCN2ATM_FMAPNAME">cpl/gridmaps/oQU240wLI/map_oQU240wLI_to_TL319_traave.20240509.nc</map>
<map name="OCN2ATM_SMAPNAME">cpl/gridmaps/oQU240wLI/map_oQU240wLI_to_TL319_traave.20240509.nc</map>
</gridmap>

<gridmap atm_grid="TL319" ocn_grid="oEC60to30v3">
<map name="ATM2OCN_FMAPNAME">cpl/gridmaps/TL319/map_TL319_to_oEC60to30v3_aave.181203.nc</map>
<map name="ATM2OCN_SMAPNAME">cpl/gridmaps/TL319/map_TL319_to_oEC60to30v3_bilin.181203.nc</map>
Expand Down Expand Up @@ -4972,6 +5002,11 @@
<map name="ROF2OCN_LIQ_RMAPNAME">cpl/cpl6/map_rx1_to_IcoswISC30E3r5_cstmnn.r150e300.20231121.nc</map>
</gridmap>

<gridmap ocn_grid="oQU240wLI" rof_grid="JRA025">
<map name="ROF2OCN_ICE_RMAPNAME">cpl/cpl6/map_JRA025_to_oQU240wLI_cstmnn.r150e300.20240516.nc</map>
<map name="ROF2OCN_LIQ_RMAPNAME">cpl/cpl6/map_JRA025_to_oQU240wLI_cstmnn.r150e300.20240516.nc</map>
</gridmap>

<gridmap ocn_grid="oEC60to30v3" rof_grid="JRA025">
<map name="ROF2OCN_ICE_RMAPNAME">cpl/cpl6/map_JRA025_to_oEC60to30v3_smoothed.r150e300.181204.nc</map>
<map name="ROF2OCN_LIQ_RMAPNAME">cpl/cpl6/map_JRA025_to_oEC60to30v3_smoothed.r150e300.181204.nc</map>
Expand Down Expand Up @@ -5418,6 +5453,24 @@
<map name="GLC2LND_SMAPNAME">cpl/gridmaps/mpas.ais20km/map_ais20km_TO_f09_aave.151005.nc</map>
</gridmap>

<gridmap glc_grid="mpas.ais20" lnd_grid="TL319">
<map name="LND2GLC_FMAPNAME">cpl/gridmaps/TL319/map_TL319_to_ais20km_traave.20240509.nc</map>
<map name="LND2GLC_SMAPNAME">cpl/gridmaps/TL319/map_TL319_to_ais20km_trbilin.20240509.nc</map>
<map name="GLC2LND_FMAPNAME">cpl/gridmaps/mpas.ais20km/map_ais20km_to_TL319_traave.20240509.nc</map>
<map name="GLC2LND_SMAPNAME">cpl/gridmaps/mpas.ais20km/map_ais20km_to_TL319_traave.20240509.nc</map>
</gridmap>

<gridmap glc_grid="mpas.ais20km" ocn_grid="oQU240wLI">
<map name="OCN2GLC_FMAPNAME">cpl/gridmaps/oQU240wLI/map_oQU240wLI-nomask_to_ais20km_esmfaave.20240509.nc</map>
<map name="OCN2GLC_SMAPNAME">cpl/gridmaps/oQU240wLI/map_oQU240wLI-nomask_to_ais20km_esmfbilin.20240509.nc</map>
<map name="GLC2ICE_FMAPNAME">cpl/gridmaps/mpas.ais20km/map_ais20km_to_oQU240wLI-nomask_esmfaave.20240509.nc</map>
<map name="GLC2ICE_SMAPNAME">cpl/gridmaps/mpas.ais20km/map_ais20km_to_oQU240wLI-nomask_esmfbilin.20240509.nc</map>
<map name="GLC2OCN_FMAPNAME">cpl/gridmaps/mpas.ais20km/map_ais20km_to_oQU240wLI-nomask_esmfaave.20240509.nc</map>
<map name="GLC2OCN_SMAPNAME">cpl/gridmaps/mpas.ais20km/map_ais20km_to_oQU240wLI-nomask_esmfbilin.20240509.nc</map>
<map name="GLC2OCN_LIQ_RMAPNAME">cpl/gridmaps/mpas.ais20km/map_ais20km_to_oQU240wLI-nomask_esmfnearestdtos.20240509.nc</map>
<map name="GLC2OCN_ICE_RMAPNAME">cpl/gridmaps/mpas.ais20km/map_ais20km_to_oQU240wLI_esmfnearestdtos.20240509.nc</map>
</gridmap>

<!-- ======================================================== -->
<!-- GRIDS: glc to ocn mapping -->
<!-- -->
Expand Down
2 changes: 1 addition & 1 deletion cime_config/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@
"SMS.ne30_f19_g16_rx1.A",
"ERS_Ld5.T62_oQU120.CMPASO-NYF",
"ERS.f09_g16_g.MALISIA",
"SMS.T62_oQU120_ais20.MPAS_LISIO_TEST",
"ERS_Ld5.TL319_oQU240wLI_ais20.MPAS_LISIO_JRA1p5.mpaso-ocn_glcshelf",
"SMS_P12x2.ne4pg2_oQU480.WCYCL1850NS.allactive-mach_mods",
"ERS_Ln9.ne4pg2_ne4pg2.F2010-MMF1.eam-mmf_crmout",
)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
This testdef is used to test a stealth feature in mpaso introduced by
PR #2726. It changes one mpaso namelist variable,
config_land_ice_flux_mode
from its default value to 'coupled'.
This tests the ocn/glcshelf coupling.

It also specified that DATM forcing should be restricted to 1958.
This allows JRA1p5 forcing to be used without a large input data requirement.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
./xmlchange DATM_CLMNCEP_YR_START=1958
./xmlchange DATM_CLMNCEP_YR_END=1958
./xmlchange DROF_STRM_YR_START=1958
./xmlchange DROF_STRM_YR_END=1958
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
config_land_ice_flux_mode = 'coupled'
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ subroutine ocn_effective_density_in_land_ice_update(forcingPool, &
landIcePressure, &! land ice pressure
effectiveDensityCur, &! effective density at current time
effectiveDensityNew ! effective density at new time level

integer, dimension(:), pointer :: &
landIceFloatingMask ! mask for land ice presence on cell

Expand Down Expand Up @@ -179,15 +179,17 @@ subroutine ocn_effective_density_in_land_ice_update(forcingPool, &
#else
!$omp do schedule(runtime) private(weightSum, i, cell2)
#endif
do iCell = 1, nCellsAll
do iCell = 1, nCellsOwned
weightSum = 1.0_RKIND
effectiveDensityNew(iCell) = effectiveDensityScratch(iCell)
do i = 1, nEdgesOnCell(iCell)
cell2 = cellsOnCell(i,iCell)
effectiveDensityNew(iCell) = effectiveDensityNew(iCell) &
+ cellMask(1,cell2)* &
effectiveDensityScratch(cell2)
weightSum = weightSum + cellMask(1,cell2)
if (cell2 <= nCellsAll) then
effectiveDensityNew(iCell) = effectiveDensityNew(iCell) &
+ cellMask(1,cell2)* &
effectiveDensityScratch(cell2)
weightSum = weightSum + cellMask(1,cell2)
end if
end do
effectiveDensityNew(iCell) = effectiveDensityNew(iCell)/ &
weightSum
Expand Down

0 comments on commit 8389d22

Please sign in to comment.