Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
d9de210
v12: Remove support for mom5
mathomp4 May 21, 2025
e9b3277
Add stub for MOM6 dual-ocean
mathomp4 May 21, 2025
6ba0b8e
Put hooks for dual-ocean in MOM6
mfmehari May 27, 2025
3cb259f
Merge branch 'feature/v3-mom6-PR-1664-update' into feature/v12-remove…
mathomp4 Jul 2, 2025
fb1eaeb
Merge branch 'develop' into feature/v12-remove-mom5
mathomp4 Jul 3, 2025
279bd81
Merge branch 'develop' into feature/v12-remove-mom5
mathomp4 Aug 26, 2025
f90cecb
Updates for mixed-precision FMS
mathomp4 Oct 15, 2025
0992e3b
Merge branch 'develop' into feature/v12-remove-mom5
mathomp4 Dec 15, 2025
fc0fa83
Merge branch 'develop' into feature/v12-remove-mom5
mathomp4 Jan 29, 2026
d1f9a69
Merge branch 'develop' into feature/v12-remove-mom5
mathomp4 Feb 12, 2026
56ddc3c
Fixes for Flang debug
mathomp4 Mar 5, 2026
c900894
Remove flang cmake
mathomp4 Mar 5, 2026
f01f3d4
Merge branch 'develop' into feature/v12-remove-mom5
mathomp4 Mar 6, 2026
9a27ab3
Merge branch 'develop' into feature/v12-remove-mom5
mathomp4 Jun 2, 2026
ff067df
Fix up bad merge
mathomp4 Jun 2, 2026
92bea6b
Merge branch 'develop' into feature/v12-remove-mom5
mathomp4 Jul 2, 2026
b4804e4
Do not use _RC in ESMF_UserCompGetInternalState and Set
mathomp4 Jul 2, 2026
fd46343
Merge branch 'develop' into feature/v12-remove-mom5
mathomp4 Sep 1, 2026
4e191b9
Merge branch 'develop' into feature/v12-remove-mom5
mathomp4 Sep 9, 2026
75e8484
Merge branch 'develop' into feature/v12-remove-mom5
mathomp4 Sep 24, 2026
878199d
Fix up FMS reference
mathomp4 Sep 24, 2026
5b2e27a
Merge branch 'develop' into feature/v12-remove-mom5
mathomp4 Sep 29, 2026
3b31c1f
Merge branch 'develop' into feature/v12-remove-mom5
mathomp4 Oct 20, 2026
d4ec939
Merge branch 'develop' into feature/v12-remove-mom5
mathomp4 Nov 12, 2026
622275d
Work around Flang Ninja preprocessing in MOM_domains
mathomp4 Dec 1, 2026
022b494
Degrade opt for nvhpc with MOM_hor_visc.F90
mathomp4 Dec 3, 2026
35ca550
One more file
mathomp4 Dec 3, 2026
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
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ option (BUILD_MIT_OCEAN "BUILD_MIT_OCEAN is turned off by default" OFF) #OFF by
if ( NOT BUILD_MIT_OCEAN )
esma_add_library (${this}
SRCS GEOS_OceanGridComp.F90
SUBCOMPONENTS MOM6_GEOSPlug MOM_GEOS5PlugMod GEOSdatasea_GridComp
SUBCOMPONENTS MOM6_GEOSPlug GEOSdatasea_GridComp
DEPENDENCIES GEOSdatasea_GridComp MAPL esmf)

else()
Expand Down
19 changes: 6 additions & 13 deletions GEOS_OceanGridComp.F90
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,8 @@ subroutine SetServices ( GC, RC )
OCEAN_NAME="DATASEA"
OCN = MAPL_AddChild(GC, NAME=OCEAN_NAME, SS=DataSeaSetServices, _RC)
else
call MAPL_GetResource ( MAPL, OCEAN_NAME, Label="OCEAN_NAME:", DEFAULT="MOM", _RC)
call MAPL_GetResource ( MAPL, OCEAN_NAME, Label="OCEAN_NAME:", DEFAULT="MOM6", _RC)
select case (trim(OCEAN_NAME))
case ("MOM")
call MAPL_GetResource ( MAPL, sharedObj, Label="MOM_GEOS5PLUGMOD:", DEFAULT="libMOM_GEOS5PlugMod.so", _RC)
OCN = MAPL_AddChild(OCEAN_NAME,'setservices_', parentGC=GC, sharedObj=sharedObj, _RC)
case ("MOM6")
call MAPL_GetResource ( MAPL, sharedObj, Label="MOM6_GEOSPLUG:", DEFAULT="libMOM6_GEOSPlug.so", _RC)
OCN = MAPL_AddChild(OCEAN_NAME,'setservices_', parentGC=GC, sharedObj=sharedObj, _RC)
Expand Down Expand Up @@ -177,10 +174,6 @@ subroutine SetServices ( GC, RC )
call MAPL_AddExportSpec (GC, SHORT_NAME = 'T', CHILD_ID = OCN, _RC)
call MAPL_AddExportSpec (GC, SHORT_NAME = 'S', CHILD_ID = OCN, _RC)

if (trim(OCEAN_NAME) == "MOM") then
call MAPL_AddExportSpec (GC, SHORT_NAME = 'SSH', CHILD_ID = OCN, _RC)
call MAPL_AddExportSpec (GC, SHORT_NAME = 'PBO', CHILD_ID = OCN, _RC)
endif
if (trim(OCEAN_NAME) == "MOM6") then
call MAPL_AddExportSpec (GC, SHORT_NAME = 'UWC', CHILD_ID = OCN, _RC)
call MAPL_AddExportSpec (GC, SHORT_NAME = 'VWC', CHILD_ID = OCN, _RC)
Expand Down Expand Up @@ -360,8 +353,8 @@ subroutine Initialize ( GC, IMPORT, EXPORT, CLOCK, RC )
call MAPL_GetPointer(EXPORT, MASKO, 'MASKO' , alloc=.true., _RC)

select case (trim(OCEAN_NAME))
case ("MOM", "MIT")
call MAPL_GetPointer(GEX(OCN), MASK3D, trim(OCEAN_NAME)//'_3D_MASK', _RC)
case ("MIT")
call MAPL_GetPointer(GEX(OCN), MASK3D, 'MIT_3D_MASK', _RC)
MASK => MASK3D(:,:,1)
case ("MOM6")
call MAPL_GetPointer(GEX(OCN), MASK, 'MOM_2D_MASK', _RC)
Expand Down Expand Up @@ -585,8 +578,8 @@ subroutine Run ( GC, IMPORT, EXPORT, CLOCK, RC )
! ---------------------------------------------------------------
if(DO_DATASEA==0) then
select case(trim(OCEAN_NAME))
case ("MOM", "MIT")
call MAPL_GetPointer(GEX(OCN), MASK3D, trim(OCEAN_NAME)//'_3D_MASK', _RC)
case ("MIT")
call MAPL_GetPointer(GEX(OCN), MASK3D, 'MIT_3D_MASK', _RC)
MASK => MASK3D(:,:,1)
case ("MOM6")
call MAPL_GetPointer(GEX(OCN), MASK, 'MOM_2D_MASK', _RC)
Expand Down Expand Up @@ -764,7 +757,7 @@ subroutine Run ( GC, IMPORT, EXPORT, CLOCK, RC )

if(associated(RFLUX )) RFLUX = 0.0
select case (trim(OCEAN_NAME))
case ("MOM", "MIT", "DATASEA")
case ("MIT", "DATASEA")
do L=1,LM
HEAT(:,:,L) = HEATi(:,:,L)*WGHT
if(associated(RFLUX)) then
Expand Down
2 changes: 1 addition & 1 deletion MOM6_GEOSPlug/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ esma_add_subdirectories(mom6_cmake)

esma_add_library (${this}
SRCS ${SRCS}
DEPENDENCIES MAPL FMS::fms_r8 mom6
DEPENDENCIES MAPL FMS::fms mom6
TYPE SHARED
)

Expand Down
17 changes: 9 additions & 8 deletions MOM6_GEOSPlug/MOM6_GEOSPlug.F90
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,8 @@ subroutine Initialize ( GC, IMPORT, EXPORT, CLOCK, RC )
! Save pointer to the wrapped internal state in the GC
! ----------------------------------------------------

call ESMF_UserCompSetInternalState ( GC, 'MOM_MAPL_state', WRAP, _RC)
call ESMF_UserCompSetInternalState ( GC, 'MOM_MAPL_state', WRAP, status)
_VERIFY(status)

allocate ( Boundary, __STAT__)
allocate ( Ocean, __STAT__)
Expand Down Expand Up @@ -347,7 +348,7 @@ subroutine Initialize ( GC, IMPORT, EXPORT, CLOCK, RC )

Ocean%is_ocean_pe = .true.
call ocean_model_init (Ocean, Ocean_state, Time, Time, iwind_stagger)

MOM_MAPL_internal_state%Ocean_State => Ocean_State

call ocean_model_init_sfc(Ocean_state, Ocean)
Expand Down Expand Up @@ -381,7 +382,7 @@ subroutine Initialize ( GC, IMPORT, EXPORT, CLOCK, RC )
call get_ocean_grid(Ocean_state, Ocean_grid)
LM=Ocean_grid%ke

! Check run time surface current stagger option set in MOM_input
! Check run time surface current stagger option set in MOM_input
! to make sure it matches what is expected here
!---------------------------------------------------------------

Expand Down Expand Up @@ -796,11 +797,11 @@ subroutine Run ( GC, IMPORT, EXPORT, CLOCK, RC )
Boundary%V_flux (isc:iec,jsc:jec)= real( (U*sin_rot + V*cos_rot), kind=KIND(Boundary%p))

!Calculate the magnitude of the stress on the ocean [Pa]
!-------------------------------------------------------
!-------------------------------------------------------
U = 0.0; V = 0.0
U = real ( TAUX*(1.-AICE) - TAUXBOT*AICE )**2
V = real ( TAUY*(1.-AICE) - TAUYBOT*AICE )**2
Boundary%stress_mag (isc:iec,jsc:jec)= real( (U+V)**0.5, kind=KIND(Boundary%p) )
Boundary%stress_mag (isc:iec,jsc:jec)= real( (U+V)**0.5, kind=KIND(Boundary%p) )

! Set the time for MOM
!---------------------
Expand All @@ -820,7 +821,7 @@ subroutine Run ( GC, IMPORT, EXPORT, CLOCK, RC )
! Run MOM for one time step
!--------------------------

! set following to non-zero only if the coupled model becomes unstable
! set following to non-zero only if the coupled model becomes unstable
! (inconsistent atmosphere or bad restart! or some instabilities) - per Atanas T
call MAPL_GetResource(MAPL, steady_state_ocean, Label = "steady_state_ocean:", default = 0, _RC)

Expand Down Expand Up @@ -1103,7 +1104,7 @@ subroutine Run2 ( GC, IMPORT, EXPORT, CLOCK, RC )

IM=iec-isc+1
JM=jec-jsc+1

call get_ocean_grid (Ocean_state, Ocean_grid)
LM=Ocean_grid%ke

Expand Down Expand Up @@ -1132,7 +1133,7 @@ subroutine Run2 ( GC, IMPORT, EXPORT, CLOCK, RC )
! we do not need to worry about temperature units
! since we are applying difference
! some relaxation ??? here or in guest ???

where(MOM_2D_MASK(:,:) > 0.0)
T(:,:,1) = T(:,:,1) + DEL_TEMP
end where
Expand Down
18 changes: 17 additions & 1 deletion MOM6_GEOSPlug/mom6_cmake/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,23 @@ foreach (file ${MOM6_SRCS})
list (APPEND SRCS ${MOM6_path}/${file})
endforeach ()

set (MOM6_DEPENDENCIES FMS::fms_r8)
# Flang can emit a #line marker inside an OpenMP !$ continuation. Scope
# the workaround to this source: -fno-reformat can break fixed-form code.
if (CMAKE_GENERATOR MATCHES "^Ninja" AND CMAKE_VERSION VERSION_GREATER_EQUAL 4.5.0
AND CMAKE_Fortran_COMPILER_ID MATCHES "^(LLVMFlang|NVHPC)$")
set_property (SOURCE ${MOM6_path}/src/framework/MOM_domains.F90 APPEND
PROPERTY COMPILE_OPTIONS -Xflang -fno-reformat)
endif ()

# NVHPC 26.11ng beta takes excessively long to optimize these sources.
if (CMAKE_Fortran_COMPILER_ID STREQUAL "NVHPC")
set_property (SOURCE
${MOM6_path}/src/core/MOM_CoriolisAdv.F90
${MOM6_path}/src/parameterizations/lateral/MOM_hor_visc.F90
APPEND PROPERTY COMPILE_OPTIONS -O0)
endif ()

set (MOM6_DEPENDENCIES FMS::fms OpenMP::OpenMP_Fortran)
if (MOM6_USE_STOCHASTIC_PHYSICS)
list (APPEND MOM6_DEPENDENCIES stochastic_physics)
endif ()
Expand Down
2 changes: 1 addition & 1 deletion MOM6_GEOSPlug/stochastic_physics_cmake/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ find_package(LAPACK REQUIRED)

esma_add_library (${this}
SRCS ${SRCS}
DEPENDENCIES FMS::fms_r8 LAPACK::LAPACK
DEPENDENCIES FMS::fms LAPACK::LAPACK
TYPE SHARED
)

Expand Down
3 changes: 0 additions & 3 deletions MOM_GEOS5PlugMod/.gitignore

This file was deleted.

26 changes: 0 additions & 26 deletions MOM_GEOS5PlugMod/CMakeLists.txt

This file was deleted.

Loading
Loading