Skip to content

Commit

Permalink
Correct connectivities
Browse files Browse the repository at this point in the history
Selectively terminate imports to make use of surface currents and
ocean depth provided by ExtData.
  • Loading branch information
adarmenov committed Dec 14, 2023
1 parent b3c91dc commit d9ef560
Showing 1 changed file with 20 additions and 37 deletions.
57 changes: 20 additions & 37 deletions GEOSogcm_GridComp/GEOS_OgcmGridComp.F90
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ module GEOS_OgcmGridCompMod
integer :: DO_DATAICE
integer :: DO_OBIO
integer :: DO_DATA_ATM4OCN
integer :: DO_WAVES

logical :: ocean_extData
logical :: ocean_sssData
Expand Down Expand Up @@ -215,8 +214,6 @@ subroutine SetServices ( GC, RC )
call MAPL_GetResource (MAPL, seaIceT_extData,Label="SEAICE_THICKNESS_EXT_DATA:", DEFAULT=.FALSE., _RC ) ! .TRUE. or .FALSE.
endif

call MAPL_GetResource (MAPL, DO_WAVES, Label="USE_WAVES:", DEFAULT=0, _RC)

! Set the Run and initialize entry points
!----------------------------------------

Expand Down Expand Up @@ -599,16 +596,14 @@ subroutine SetServices ( GC, RC )
RC=STATUS )
VERIFY_(STATUS)

if (DO_WAVES /= 0) then
call MAPL_AddExportSpec(GC, &
call MAPL_AddExportSpec(GC, &
SHORT_NAME = 'DW', &
LONG_NAME = 'bathymetry', &
LONG_NAME = 'sea_floor_depth', &
UNITS = 'm', &
DIMS = MAPL_DimsTileOnly, &
VLOCATION = MAPL_VLocationNone, &
RC=STATUS)
VERIFY_(STATUS)
end if
VERIFY_(STATUS)

call MAPL_AddExportSpec(GC, &
SHORT_NAME = 'UI', &
Expand Down Expand Up @@ -772,13 +767,11 @@ subroutine SetServices ( GC, RC )
! end if
end if

if (DO_WAVES == 0) then
call MAPL_AddConnectivity ( GC, &
SHORT_NAME = (/'FRACICE'/), &
DST_ID = OCEAN, &
SRC_ID = SEAICE, &
_RC)
end if
call MAPL_AddConnectivity ( GC, &
SHORT_NAME = (/'FRACICE'/), &
DST_ID = OCEAN, &
SRC_ID = SEAICE, &
_RC)

if (seaIceT_extData) then
call MAPL_AddConnectivity ( GC, &
Expand Down Expand Up @@ -872,31 +865,21 @@ subroutine SetServices ( GC, RC )
endif
else
#if (0)
call MAPL_TerminateImport ( GC, ALL=.true., __RC__)
call MAPL_TerminateImport(GC, ALL=.true., _RC)
#else
call MAPL_TerminateImport ( GC, CHILD=ORAD, RC=STATUS )
VERIFY_(STATUS)
call MAPL_TerminateImport ( GC, CHILD=OBIO, RC=STATUS )
VERIFY_(STATUS)
call MAPL_TerminateImport ( GC, CHILD=SEAICE, RC=STATUS )
VERIFY_(STATUS)

#if (1)
call MAPL_TerminateImport (GC, CHILD=OCEAN, RC=STATUS)
VERIFY_(STATUS)
call MAPL_TerminateImport(GC, ['DATA_UW', 'DATA_VW', 'DATA_DW'], [OCEAN, OCEAN, OCEAN], _RC)
#else
if (DO_DATASEAONLY==0) then
call MAPL_TerminateImport (GC, CHILD=OCEAN, RC=STATUS)
VERIFY_(STATUS)
else
call MAPL_TerminateImport(GC, SHORT_NAME=['FRACICE ', &
'FROCEAN ', &
'SWHEAT ', &
'TAUX ', &
'TAUY ', &
'DISCHARGE'], CHILD=OCEAN, RC=STATUS)
VERIFY_(STATUS)
end if
call MAPL_TerminateImport(GC, CHILD=ORAD, _RC)
call MAPL_TerminateImport(GC, CHILD=OBIO, _RC)
call MAPL_TerminateImport(GC, CHILD=SEAICE, _RC)
call MAPL_TerminateImport(GC, CHILD=OCEAN, &
SHORT_NAME=['FRACICE ', &
'FROCEAN ', &
'SWHEAT ', &
'TAUX ', &
'TAUY ', &
'DISCHARGE'], _RC)
#endif
#endif
endif
Expand Down

0 comments on commit d9ef560

Please sign in to comment.