Skip to content
Draft
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
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 @@ -10,7 +10,7 @@ esma_add_subdirectories(

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
2 changes: 1 addition & 1 deletion MOM6_GEOSPlug/mom6_cmake/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,7 @@ endforeach ()

esma_add_library (${this}
SRCS ${SRCS}
DEPENDENCIES FMS::fms_r8
DEPENDENCIES FMS::fms OpenMP::OpenMP_Fortran
INCLUDES
$<BUILD_INTERFACE:${MOM6_path}/config_src/memory/dynamic_nonsymmetric>
# choose above set MOM6_infra interface
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