Skip to content

Commit

Permalink
Merge pull request #419 from GEOS-ESM/develop
Browse files Browse the repository at this point in the history
Sync dev into main
  • Loading branch information
sdrabenh authored Mar 17, 2021
2 parents deca210 + 8527275 commit 7d9761d
Show file tree
Hide file tree
Showing 17 changed files with 81 additions and 58 deletions.
4 changes: 4 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,9 @@
/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Shared/StieglitzSnow.F90 @GEOS-ESM/land-team @GEOS-ESM/landice-team
/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Shared/SurfParams.F90 @GEOS-ESM/land-team @GEOS-ESM/landice-team

# The Python Transition Team will own Python files
# until the Python 3 transition is completed
*.py @GEOS-ESM/python-transition-team

# The GEOS CMake Team is the CODEOWNER for the CMakeLists.txt files in this repository
CMakeLists.txt @GEOS-ESM/cmake-team
Original file line number Diff line number Diff line change
Expand Up @@ -4398,11 +4398,11 @@ subroutine RUN1 ( GC, IMPORT, EXPORT, CLOCK, RC )
if(associated( TH)) TH = TH + CH(:,N)*TC(:,N)*FR(:,N)
if(associated( QH)) QH = QH + CQ(:,N)*QC(:,N)*FR(:,N)
if(associated(Z0H)) Z0H = Z0H + ZT *FR(:,N)
if(associated(GST)) GST = GST + WW(:,N) *FR(:,N)
if(associated(VNT)) VNT = VNT + UUU *FR(:,N)

WW(:,N) = max(CH(:,N)*(TC(:,N)-TA-(MAPL_GRAV/MAPL_CP)*DZE)/TA + MAPL_VIREPS*CQ(:,N)*(QC(:,N)-QA),0.0)
WW(:,N) = (HPBL*MAPL_GRAV*WW(:,N))**(2./3.)
if(associated(GST)) GST = GST + WW(:,N) *FR(:,N)

end do SUBTILES

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3457,11 +3457,11 @@ subroutine RUN1 ( GC, IMPORT, EXPORT, CLOCK, RC )
if(associated( TH)) TH = TH + CH(:,N)*TC(:,N)*FR(:,N)
if(associated( QH)) QH = QH + CQ(:,N)*QC(:,N)*FR(:,N)
if(associated(Z0H)) Z0H = Z0H + ZT *FR(:,N)
if(associated(GST)) GST = GST + WW(:,N) *FR(:,N)
if(associated(VNT)) VNT = VNT + UUU *FR(:,N)

WW(:,N) = max(CH(:,N)*(TC(:,N)-TA-(MAPL_GRAV/MAPL_CP)*DZE)/TA + MAPL_VIREPS*CQ(:,N)*(QC(:,N)-QA),0.0)
WW(:,N) = (HPBL*MAPL_GRAV*WW(:,N))**(2./3.)
if(associated(GST)) GST = GST + WW(:,N) *FR(:,N)

end do SUBTILES

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -519,10 +519,6 @@ subroutine INITIALIZE (GC,IMPORT, EXPORT, CLOCK, RC )
call ESMF_FieldDestroy(field0, rc=status)
VERIFY_(STATUS)

#ifdef __GFORTRAN__
deallocate(tile_area_src)
#endif

! redist pfaf (NOTE: me might need a second routehandle for integers)

route%pfaf => arbSeq
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2865,7 +2865,6 @@ subroutine RUN1 ( GC, IMPORT, EXPORT, CLOCK, RC )
if(associated(RET)) RET = RET + RE(: )*FR(:,N)
if(associated(Z0O)) Z0O = Z0O + Z0(:,N)*FR(:,N)
if(associated(Z0H)) Z0H = Z0H + ZT(: )*FR(:,N)
if(associated(GST)) GST = GST + WW(:,N)*FR(:,N)
if(associated(VNT)) VNT = VNT + UUU *FR(:,N)

! Aggregate effective, CD-weighted, surface values of T and Q
Expand All @@ -2879,6 +2878,7 @@ subroutine RUN1 ( GC, IMPORT, EXPORT, CLOCK, RC )

WW(:,N) = max(CH(:,N)*(TS(:,N)-TA-(MAPL_GRAV/MAPL_CP)*DZ)/TA + MAPL_VIREPS*CQ(:,N)*(QS(:,N)-QA),0.0)
WW(:,N) = (HPBL*MAPL_GRAV*WW(:,N))**(2./3.)
if(associated(GST)) GST = GST + WW(:,N)*FR(:,N)
if(associated(QSAT2)) QSAT2(:,N) = 1.0/RHO*11637800.0*exp(-5897.8/TS(:,N))

end do SUB_TILES
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2037,7 +2037,6 @@ subroutine RUN1 ( GC, IMPORT, EXPORT, CLOCK, RC )
if(associated(RET)) RET = RE(: )*FR(:,N)
if(associated(Z0O)) Z0O = Z0(:,N)*FR(:,N)
if(associated(Z0H)) Z0H = ZT(: )*FR(:,N)
if(associated(GST)) GST = WW(:,N)*FR(:,N)
if(associated(VNT)) VNT = UUU *FR(:,N)

! Aggregate effective, CD-weighted, surface values of T and Q
Expand All @@ -2050,6 +2049,7 @@ subroutine RUN1 ( GC, IMPORT, EXPORT, CLOCK, RC )

WW(:,N) = max(CH(:,N)*(TS(:,N)-TA-(MAPL_GRAV/MAPL_CP)*DZ)/TA + MAPL_VIREPS*CQ(:,N)*(QS(:,N)-QA),0.0)
WW(:,N) = (HPBL*MAPL_GRAV*WW(:,N))**(2./3.)
if(associated(GST)) GST = WW(:,N)*FR(:,N)

if(associated(CHT)) CHT = CHB
if(associated(CQT)) CQT = CQB
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1707,7 +1707,6 @@ subroutine RUN1 ( GC, IMPORT, EXPORT, CLOCK, RC )
if(associated(RET)) RET = RE(: )*FR(:,N)
if(associated(Z0O)) Z0O = Z0(:,N)*FR(:,N)
if(associated(Z0H)) Z0H = ZT(: )*FR(:,N)
if(associated(GST)) GST = WW(:,N)*FR(:,N)
if(associated(VNT)) VNT = UUU *FR(:,N)

! Aggregate effective, CD-weighted, surface values of T and Q
Expand All @@ -1721,6 +1720,7 @@ subroutine RUN1 ( GC, IMPORT, EXPORT, CLOCK, RC )

WW(:,N) = max(CH(:,N)*(TS(:,N)-TA-(MAPL_GRAV/MAPL_CP)*DZ)/TA + MAPL_VIREPS*CQ(:,N)*(QS(:,N)-QA),0.0)
WW(:,N) = (HPBL*MAPL_GRAV*WW(:,N))**(2./3.)
if(associated(GST)) GST = WW(:,N)*FR(:,N)

if(associated(CHT)) CHT = CHB
if(associated(CQT)) CQT = CQB
Expand Down
4 changes: 0 additions & 4 deletions GEOSogcm_GridComp/GEOS_OgcmGridComp.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1380,10 +1380,6 @@ subroutine Initialize ( GC, IMPORT, EXPORT, CLOCK, RC )
ORES = 4*(ORES/6)
end if

#ifdef __GFORTRAN__
deallocate(gnames, gridim, gridjm)
#endif

if (ARES > ORES) then
! Ocean grid is coarser; we should interpolate
iInterp = 1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
esma_set_this ()

set (rename_MOM_GEOS5PlugMod MOM_GEOS5Plug)
add_subdirectory(MOM6_GEOSPlug)
add_subdirectory(MOM_GEOS5PlugMod)

esma_add_library (${this}
SRCS GuestOcean_GridComp.F90
SUBCOMPONENTS MOM_GEOS5PlugMod MOM6_GEOSPlug
DEPENDENCIES GEOSdatasea_GridComp MAPL
INCLUDES ${INC_ESMF})




Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ module GuestOcean_GridCompMod

use ESMF
use MAPL
use MOM_GEOS5PlugMod, only: MOMSetServices => SetServices ! this sets IRF
use MOM6_GEOSPlugMod, only: MOM6SetServices => SetServices ! this sets IRF
use GEOS_DataSeaGridCompMod, only: DataSeaSetServices => SetServices

implicit none
Expand Down Expand Up @@ -84,6 +82,7 @@ subroutine SetServices ( GC, RC )
type (ESMF_Config) :: CF
integer :: iDUAL_OCEAN
character(len=ESMF_MAXSTR) :: charbuf_
character(len=ESMF_MAXSTR) :: sharedObj

! Begin...

Expand Down Expand Up @@ -118,9 +117,11 @@ subroutine SetServices ( GC, RC )
call MAPL_GetResource ( MAPL, OCEAN_NAME, Label="OCEAN_NAME:", DEFAULT="MOM", __RC__ )
select case (trim(OCEAN_NAME))
case ("MOM")
OCN = MAPL_AddChild(GC, NAME=OCEAN_NAME, SS=MOMSetServices, __RC__)
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")
OCN = MAPL_AddChild(GC, NAME=OCEAN_NAME, SS=MOM6SetServices, __RC__)
call MAPL_GetResource ( MAPL, sharedObj, Label="MOM6_GEOSPLUG:", DEFAULT="libMOM6_GEOSPlug.so", __RC__ )
OCN = MAPL_AddChild(OCEAN_NAME,'setservices_', parentGC=GC, sharedObj=sharedObj, __RC__)
case default
charbuf_ = "OCEAN_NAME: " // trim(OCEAN_NAME) // " is not implemented, ABORT!"
call WRITE_PARALLEL(charbuf_)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ esma_add_subdirectories(
esma_add_library (${this}
SRCS ${SRCS}
DEPENDENCIES MAPL fms_r8 mom6
# TYPE SHARED
TYPE SHARED
)

# Specs for r8 version
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1180,8 +1180,8 @@ subroutine Run ( GC, IMPORT, EXPORT, CLOCK, RC )
!---------------------------------------------------------------------------------------------
Boundary%U_flux = 0.0; Boundary%V_flux = 0.0 ! Initialize stress

Boundary%U_flux (isc:iec,jsc:jec)= real( (U*cos_rot + V*sin_rot), kind=KIND(Boundary%p))
Boundary%V_flux (isc:iec,jsc:jec)= real((-U*sin_rot + V*cos_rot), kind=KIND(Boundary%p))
Boundary%U_flux (isc:iec,jsc:jec)= real( (U*cos_rot - V*sin_rot), kind=KIND(Boundary%p))
Boundary%V_flux (isc:iec,jsc:jec)= real( (U*sin_rot + V*cos_rot), kind=KIND(Boundary%p))

! Set the time for MOM
!---------------------
Expand Down Expand Up @@ -1573,3 +1573,12 @@ end subroutine Record
!====================================================================

end module MOM6_GEOSPlugMod

subroutine SetServices(gc, rc)
use ESMF
use MOM6_GEOSPlugMod, only : mySetservices=>SetServices
type(ESMF_GridComp) :: gc
integer, intent(out) :: rc
call mySetServices(gc, rc=rc)
end subroutine

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"Global ALE Experiment"
1 1 1 0 0 0
1900 1 1 0 0 0
#"scalar", 1,"days",1,"days","Time",
#"layer", 1,"days",1,"days","Time",
#"prog", 1,"days",1,"days","Time",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"Global ALE Experiment"
1 1 1 0 0 0
1900 1 1 0 0 0
#"scalar", 1,"days",1,"days","Time",
#"layer", 1,"days",1,"days","Time",
#"prog", 1,"days",1,"days","Time",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ list( APPEND MOM6_SRCS
src/core/MOM_continuity.F90
src/core/MOM_continuity_PPM.F90
src/core/MOM_CoriolisAdv.F90
src/core/MOM_density_integrals.F90
src/core/MOM_dynamics_split_RK2.F90
src/core/MOM_dynamics_unsplit.F90
src/core/MOM_dynamics_unsplit_RK2.F90
Expand All @@ -36,21 +37,22 @@ list( APPEND MOM6_SRCS
src/core/MOM_interface_heights.F90
src/core/MOM_isopycnal_slopes.F90
src/core/MOM_open_boundary.F90
src/core/MOM_PressureForce_analytic_FV.F90
src/core/MOM_PressureForce.F90
src/core/MOM_PressureForce_FV.F90
src/core/MOM_PressureForce_Montgomery.F90
src/core/MOM_transcribe_grid.F90
src/core/MOM_unit_tests.F90
src/core/MOM_variables.F90
src/core/MOM_verticalGrid.F90
src/diagnostics//MOM_debugging.F90
src/diagnostics//MOM_diagnostics.F90
src/diagnostics//MOM_obsolete_diagnostics.F90
src/diagnostics//MOM_obsolete_params.F90
src/diagnostics//MOM_PointAccel.F90
src/diagnostics//MOM_sum_output.F90
src/diagnostics//MOM_wave_speed.F90
src/diagnostics//MOM_wave_structure.F90
src/diagnostics/MOM_debugging.F90
src/diagnostics/MOM_diagnostics.F90
src/diagnostics/MOM_obsolete_diagnostics.F90
src/diagnostics/MOM_obsolete_params.F90
src/diagnostics/MOM_PointAccel.F90
src/diagnostics/MOM_spatial_means.F90
src/diagnostics/MOM_sum_output.F90
src/diagnostics/MOM_wave_speed.F90
src/diagnostics/MOM_wave_structure.F90
src/equation_of_state/MOM_EOS.F90
src/equation_of_state/MOM_EOS_linear.F90
src/equation_of_state/MOM_EOS_NEMO.F90
Expand Down Expand Up @@ -92,31 +94,31 @@ list( APPEND MOM6_SRCS
src/framework/MOM_array_transform.F90
src/framework/MOM_checksums.F90
src/framework/MOM_coms.F90
src/framework/MOM_constants.F90
src/framework/MOM_coupler_types.F90
src/framework/MOM_cpu_clock.F90
src/framework/MOM_diag_manager_wrapper.F90
src/framework/MOM_data_override.F90
src/framework/MOM_diag_mediator.F90
src/framework/MOM_diag_remap.F90
src/framework/MOM_diag_vkernels.F90
src/framework/MOM_document.F90
src/framework/MOM_domains.F90
src/framework/MOM_dyn_horgrid.F90
src/framework/MOM_ensemble_manager.F90
src/framework/MOM_error_handler.F90
src/framework/MOM_file_parser.F90
src/framework/MOM_get_input.F90
src/framework/MOM_hor_index.F90
src/framework/MOM_horizontal_regridding.F90
src/framework/MOM_interpolate.F90
src/framework/MOM_intrinsic_functions.F90
src/framework/MOM_io.F90
src/framework/MOM_random.F90
src/framework/MOM_restart.F90
src/framework/MOM_safe_alloc.F90
src/framework/MOM_spatial_means.F90
src/framework/MOM_string_functions.F90
src/framework/MOM_time_manager.F90
src/framework/MOM_transform_FMS.F90
src/framework/MOM_unit_scaling.F90
src/framework/MOM_write_cputime.F90
src/ice_shelf/MOM_ice_shelf_diag_mediator.F90
src/ice_shelf/MOM_ice_shelf_dynamics.F90
src/ice_shelf/MOM_ice_shelf.F90
src/ice_shelf/MOM_ice_shelf_initialize.F90
Expand Down Expand Up @@ -236,7 +238,6 @@ list( APPEND MOM6_SRCS
pkg/CVMix-src/src/shared/cvmix_shear.F90
pkg/CVMix-src/src/shared/cvmix_tidal.F90
pkg/CVMix-src/src/shared/cvmix_utils.F90
pkg/geoKdTree/kdtree.f90
pkg/GSW-Fortran/modules/gsw_mod_baltic_data.f90
pkg/GSW-Fortran/modules/gsw_mod_error_functions.f90
pkg/GSW-Fortran/modules/gsw_mod_freezing_poly_coefficients.f90
Expand Down Expand Up @@ -429,14 +430,33 @@ list( APPEND MOM6_SRCS
pkg/GSW-Fortran/toolbox/gsw_util_sort_real.f90
pkg/GSW-Fortran/toolbox/gsw_util_xinterp1.f90
pkg/GSW-Fortran/toolbox/gsw_z_from_p.f90
pkg/MOM6_DA_hooks/src/core/ocean_da_core.F90
pkg/MOM6_DA_hooks/src/core/ocean_da_types.F90
pkg/MOM6_DA_hooks/src/core/write_ocean_obs.F90
# choose FMS1 interface
config_src/infra/FMS1/MOM_coms_infra.F90
config_src/infra/FMS1/MOM_constants.F90
config_src/infra/FMS1/MOM_couplertype_infra.F90
config_src/infra/FMS1/MOM_cpu_clock_infra.F90
config_src/infra/FMS1/MOM_data_override_infra.F90
config_src/infra/FMS1/MOM_diag_manager_infra.F90
config_src/infra/FMS1/MOM_domain_infra.F90
config_src/infra/FMS1/MOM_ensemble_manager_infra.F90
config_src/infra/FMS1/MOM_error_infra.F90
config_src/infra/FMS1/MOM_interp_infra.F90
config_src/infra/FMS1/MOM_io_infra.F90
config_src/infra/FMS1/MOM_time_manager.F90
)

list( APPEND MOM6_SRCS
config_src/coupled_driver/MOM_surface_forcing_gfdl.F90
config_src/coupled_driver/ocean_model_MOM.F90
config_src/drivers/FMS_cap/MOM_surface_forcing_gfdl.F90
config_src/drivers/FMS_cap/ocean_model_MOM.F90
# oda
config_src/external/ODA_hooks/kdtree.f90
config_src/external/ODA_hooks/ocean_da_core.F90
config_src/external/ODA_hooks/ocean_da_types.F90
config_src/external/ODA_hooks/write_ocean_obs.F90
# tracer
config_src/external/GFDL_ocean_BGC/FMS_coupler_util.F90
config_src/external/GFDL_ocean_BGC/generic_tracer.F90
config_src/external/GFDL_ocean_BGC/generic_tracer_utils.F90
)

set (MOM6_path ${CMAKE_CURRENT_SOURCE_DIR}/../@mom6)
Expand All @@ -449,7 +469,9 @@ esma_add_library (${this}
SRCS ${SRCS}
DEPENDENCIES fms_r8
INCLUDES
$<BUILD_INTERFACE:${MOM6_path}/config_src/dynamic>
$<BUILD_INTERFACE:${MOM6_path}/config_src/memory/dynamic_nonsymmetric>
# choose FMS1 interface
$<BUILD_INTERFACE:${MOM6_path}/config_src/infra/FMS1>
$<BUILD_INTERFACE:${MOM6_path}/src/framework>
TYPE SHARED
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ esma_add_library (${this}
SRCS ${SRCS}
SUBCOMPONENTS @mom
DEPENDENCIES MAPL
# TYPE SHARED
TYPE SHARED
)

# Specs for r8 version
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2146,12 +2146,11 @@ end subroutine Record
!====================================================================

end module MOM_GEOS5PlugMod









subroutine SetServices(gc, rc)
use ESMF
use MOM_GEOS5PlugMod, only : mySetservices=>SetServices
type(ESMF_GridComp) :: gc
integer, intent(out) :: rc
call mySetServices(gc,rc=rc)
end subroutine

0 comments on commit 7d9761d

Please sign in to comment.