Skip to content

Commit

Permalink
Merge pull request ESCOMP#2374 from billsacks/lilac_remove_mct
Browse files Browse the repository at this point in the history
Remove LILAC references to mct
  • Loading branch information
ekluzek authored Mar 19, 2024
2 parents ebdb103 + fa513f3 commit 9d70347
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 61 deletions.
14 changes: 1 addition & 13 deletions lilac/src/lilac_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ module lilac_mod

! External libraries
use ESMF
use mct_mod , only : mct_world_init

! shr code routines
use shr_sys_mod , only : shr_sys_abort
Expand Down Expand Up @@ -146,10 +145,7 @@ subroutine lilac_init2(mpicom, atm_global_index, atm_lons, atm_lats, &
integer, parameter :: debug = 1 !-- internal debug level
character(len=*), parameter :: subname=trim(modname)//': [lilac_init] '

! initialization of mct and pio
integer :: ncomps = 1 ! for mct
integer, pointer :: mycomms(:) ! for mct
integer, pointer :: myids(:) ! for mct
! initialization of pio
integer :: compids(1) = (/1/) ! for pio_init2 - array with component ids
character(len=32) :: compLabels(1) = (/'LND'/) ! for pio_init2
character(len=64) :: comp_name(1) = (/'LND'/) ! for pio_init2
Expand Down Expand Up @@ -220,14 +216,6 @@ subroutine lilac_init2(mpicom, atm_global_index, atm_lons, atm_lats, &
call ESMF_VMGet(vm, localPet=mytask, rc=rc)
if (chkerr(rc,__LINE__,u_FILE_u)) return

!-------------------------------------------------------------------------
! Initialize MCT (this is needed for data model functionality)
!-------------------------------------------
allocate(mycomms(1), myids(1))
mycomms = (/mpicom/) ; myids = (/1/)
call mct_world_init(ncomps, mpicom, mycomms, myids)
call ESMF_LogWrite(subname//"initialized mct ... ", ESMF_LOGMSG_INFO)

!-------------------------------------------------------------------------
! Initialize PIO with second initialization
!-------------------------------------------------------------------------
Expand Down
9 changes: 3 additions & 6 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,10 @@ add_definitions(-DHIDE_MPI)
add_subdirectory(${CLM_ROOT}/share/src csm_share)
add_subdirectory(${CLM_ROOT}/share/unit_test_stubs/util csm_share_stubs)
add_subdirectory(${CLM_ROOT}/share/src/esmf_wrf_timemgr esmf_wrf_timemgr)
add_subdirectory(${CLM_ROOT}/components/cpl7/driver/shr drv_share)

# Extract just the files we need from drv_share
set (drv_sources_needed_base
glc_elevclass_mod.F90
)
extract_sources("${drv_sources_needed_base}" "${drv_sources}" drv_sources_needed)
# Add the single file we need from CMEPS
set (drv_sources_needed
${CLM_ROOT}/components/cmeps/cesm/nuopc_cap_share/glc_elevclass_mod.F90)

# Add CLM source directories
add_subdirectory(${CLM_ROOT}/src/utils clm_utils)
Expand Down
2 changes: 0 additions & 2 deletions src/unit_test_stubs/csm_share/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
list(APPEND share_sources
mct_mod_stub.F90
seq_comm_mct.F90
shr_mpi_mod_stub.F90
)

Expand Down
30 changes: 0 additions & 30 deletions src/unit_test_stubs/csm_share/mct_mod_stub.F90

This file was deleted.

10 changes: 0 additions & 10 deletions src/unit_test_stubs/csm_share/seq_comm_mct.F90

This file was deleted.

0 comments on commit 9d70347

Please sign in to comment.