Skip to content

Commit

Permalink
Merge pull request #1017 from GEOS-ESM/develop
Browse files Browse the repository at this point in the history
Sync develop into main
  • Loading branch information
sdrabenh authored Oct 18, 2024
2 parents 142516d + 614ad3d commit 75e91bf
Show file tree
Hide file tree
Showing 52 changed files with 1,064 additions and 581 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/GEOS_GcmGridComp.F90)
esma_add_library(${this}
SRCS GEOS_GcmGridComp.F90
SUBCOMPONENTS ${alldirs}
DEPENDENCIES MAPL esmf)
DEPENDENCIES MAPL ESMF::ESMF)

ecbuild_install_project( NAME GEOSgcm_GridComp)

Expand Down
4 changes: 2 additions & 2 deletions GEOSagcm_GridComp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/GEOS_AgcmSimpleGridComp.F90)
esma_add_library (${this}
SRCS GEOS_AgcmSimpleGridComp.F90
SUBCOMPONENTS GEOSsuperdyn_GridComp GEOShs_GridComp
DEPENDENCIES MAPL esmf)
DEPENDENCIES MAPL ESMF::ESMF)

elseif (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/GEOS_AgcmGridComp.F90)

esma_add_library (${this}
SRCS GEOS_AgcmGridComp.F90
SUBCOMPONENTS ${alldirs}
DEPENDENCIES MAPL GEOS_Shared Chem_Shared esmf)
DEPENDENCIES MAPL GEOS_Shared Chem_Shared ESMF::ESMF)

else ()

Expand Down
2 changes: 1 addition & 1 deletion GEOSagcm_GridComp/GEOSphysics_GridComp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/GEOS_PhysicsGridComp.F90)
esma_add_library (${this}
SRCS GEOS_PhysicsGridComp.F90 MBundle_IncrementMod.F90
SUBCOMPONENTS ${alldirs}
DEPENDENCIES MAPL GMAO_mpeu GMAO_stoch esmf)
DEPENDENCIES MAPL GMAO_mpeu GMAO_stoch ESMF::ESMF)

else ()

Expand Down
24 changes: 18 additions & 6 deletions GEOSagcm_GridComp/GEOSphysics_GridComp/GEOS_PhysicsGridComp.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1170,7 +1170,7 @@ subroutine SetServices ( GC, RC )
VERIFY_(STATUS)
ENDIF

IF (DO_OBIO /= 0) THEN
IF (DO_OBIO /= 0) THEN
call MAPL_AddConnectivity ( GC, &
SHORT_NAME = (/'DROBIO', 'DFOBIO'/), &
SRC_ID = RAD, &
Expand Down Expand Up @@ -1245,7 +1245,7 @@ subroutine SetServices ( GC, RC )

call MAPL_AddConnectivity ( GC, &
SHORT_NAME = (/ 'LWI ', 'FRLAND ', 'FRLANDICE', &
'FROCEAN ', 'FRLAKE ', 'WET1 ', &
'FROCEAN ', 'FRLAKE ', &
'GRN ', 'USTAR ', 'U10M ', &
'V10M ', 'SH ', 'Z0H ', &
'LAI ', 'TSOIL1 ', 'FRACI ', &
Expand All @@ -1262,6 +1262,18 @@ subroutine SetServices ( GC, RC )
RC=STATUS )
VERIFY_(STATUS)

! NOTE: GOCART's dust code expects WET1 to have all the cells with MAPL_UNDEF
! (aka not land) to be replaced with 1.0. We want WET1 to have
! MAPL_UNDEF over non-land points, so we need a separate export to pass
! to GOCART which is WET1 with all non-land points set to 1.0.
call MAPL_AddConnectivity ( GC, &
SRC_NAME = [ 'WET1_FOR_CHEM' ], &
SRC_ID = SURF, &
DST_NAME = [ 'WET1' ], &
DST_ID = CHEM, &
RC=STATUS )
VERIFY_(STATUS)

if (DO_CO2CNNEE == 1) then
call MAPL_AddConnectivity ( GC, &
SHORT_NAME = (/'CNNEE'/), &
Expand Down Expand Up @@ -1432,7 +1444,7 @@ subroutine SetServices ( GC, RC )
CHILD = TURBL, &
RC=STATUS )
VERIFY_(STATUS)
endif
endif

call MAPL_TerminateImport ( GC, &
SHORT_NAME = (/'TR ','TRG','DTG' /), &
Expand Down Expand Up @@ -1981,10 +1993,10 @@ subroutine Initialize ( GC, IMPORT, EXPORT, CLOCK, RC )
! The original 3D increments:

call Initialize_IncBundle_init(GC, GIM(MOIST), EXPORT, MTRIinc, __RC__)

#ifdef PRINT_STATES
call ESMF_StateGet(EXPORT, 'MTRI', iBUNDLE, rc=STATUS)
VERIFY_(STATUS)
VERIFY_(STATUS)

call WRITE_PARALLEL ( trim(Iam)//": MTRI - Convective Transport and Scavenging 3D Tendency Bundle" )
if ( MAPL_am_I_root() ) call ESMF_FieldBundlePrint ( iBUNDLE, rc=STATUS )
Expand All @@ -1996,7 +2008,7 @@ subroutine Initialize ( GC, IMPORT, EXPORT, CLOCK, RC )

#ifdef PRINT_STATES
call ESMF_StateGet(EXPORT, 'MCHEMTRI', iBUNDLE, rc=STATUS)
VERIFY_(STATUS)
VERIFY_(STATUS)

call WRITE_PARALLEL ( trim(Iam)//": MCHEMTRI - Convective Transport and Scavenging 2D Tendency Bundle" )
if ( MAPL_am_I_root() ) call ESMF_FieldBundlePrint ( iBUNDLE, rc=STATUS )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ install( FILES ${resource_files}
DESTINATION etc
)

esma_add_library (${this} SRCS ${srcs} DEPENDENCIES GEOS_Shared MAPL esmf NetCDF::NetCDF_Fortran)
esma_add_library (${this} SRCS ${srcs} DEPENDENCIES GEOS_Shared MAPL ESMF::ESMF NetCDF::NetCDF_Fortran)

# CMake has an OpenMP issue with NAG Fortran: https://gitlab.kitware.com/cmake/cmake/-/issues/21280
if (NOT CMAKE_Fortran_COMPILER_ID MATCHES "NAG")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ endif ()

esma_add_library (${this}
SRCS ${srcs}
DEPENDENCIES GEOS_Shared GMAO_mpeu MAPL Chem_Shared Chem_Base esmf)
DEPENDENCIES GEOS_Shared GMAO_mpeu MAPL Chem_Shared Chem_Base ESMF::ESMF)

get_target_property (extra_incs fms_r4 INCLUDE_DIRECTORIES)
target_include_directories(${this} PRIVATE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3472,7 +3472,8 @@ SUBROUTINE CUP_gf(its,ite,kts,kte ,itf,ktf, mtp &
dp=100.*(po_cup(i,k)-po_cup(i,k+1))
!--- add congestus and deep plumes, and convert to kg/kg/s
revsu_gf(i,k) = revsu_gf(i,k) + evap_flx(i,k)*g/dp
prfil_gf(i,k) = prfil_gf(i,k) + prec_flx(i,k)*g/dp
!--- leave precip flux in kg/m2/s
prfil_gf(i,k) = prfil_gf(i,k) + prec_flx(i,k)
enddo
enddo

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -481,6 +481,16 @@ subroutine BACM_1M_Run (GC, IMPORT, EXPORT, CLOCK, RC)
end do
end do

call MAPL_GetPointer(EXPORT, PTR2D, 'ZLCL', RC=STATUS); VERIFY_(STATUS)
if (associated(PTR2D)) then
tmp2d = FIND_KLCL( T, Q, PLmb, IM, JM, LM )
do J=1,JM
do I=1,IM
PTR2D(I,J) = ZL0(I,J,tmp2d(I,J))
end do
end do
endif

! Export Tendencies
call MAPL_GetPointer(EXPORT, DQVDT_macro, 'DQVDT_macro' , ALLOC=.TRUE., RC=STATUS); VERIFY_(STATUS)
call MAPL_GetPointer(EXPORT, DQIDT_macro, 'DQIDT_macro' , ALLOC=.TRUE., RC=STATUS); VERIFY_(STATUS)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1396,6 +1396,15 @@ subroutine MGB2_2M_Run (GC, IMPORT, EXPORT, CLOCK, RC)
call MAPL_GetPointer(EXPORT, PTR2D, 'AN_SNR' , ALLOC=.TRUE., RC=STATUS); VERIFY_(STATUS); PTR2D=0.0
call MAPL_GetPointer(EXPORT, PTR2D, 'SC_SNR' , ALLOC=.TRUE., RC=STATUS); VERIFY_(STATUS); PTR2D=0.0

call MAPL_GetPointer(EXPORT, PTR2D, 'ZLCL', RC=STATUS); VERIFY_(STATUS)
if (associated(PTR2D)) then
tmp2d = FIND_KLCL( T, Q, PLmb, IM, JM, LM )
do J=1,JM
do I=1,IM
PTR2D(I,J) = ZL0(I,J,tmp2d(I,J))
end do
end do
endif

call MAPL_TimerOn(MAPL,"---CLDMACRO")
call MAPL_GetPointer(EXPORT, DQVDT_macro, 'DQVDT_macro' , ALLOC=.TRUE., RC=STATUS); VERIFY_(STATUS)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/GEOS_SurfaceGridComp.F90)
SRCS GEOS_SurfaceGridComp.F90
SUBCOMPONENTS ${alldirs}
SUBDIRS Shared
DEPENDENCIES GEOS_SurfaceShared MAPL GMAO_mpeu esmf)
DEPENDENCIES GEOS_SurfaceShared MAPL GMAO_mpeu ESMF::ESMF)

else ()

Expand Down
Loading

0 comments on commit 75e91bf

Please sign in to comment.