Skip to content

Commit 7195dc2

Browse files
authored
Add manage externals to access MMM-physics repo (#2126)
TYPE: enhancement, no impact KEYWORDS: manage_externals, some physics for tropical suite SOURCE: internal DESCRIPTION OF CHANGES: Add the use of manage_externals tool to access physics in [MMM-physics](https://github.com/NCAR/MMM-physics) repository. The physics we access are part of the 'tropical' suite: YSU PBL, revised MM5 surface layer, WSM6 microphysics, and new Tiedtke scheme. It also accesses GWDO option 1 routine. These modules have been residing in phys/physics_mmm/ in 4.6. Instead of copied files in this directory, we now use manage_externals to access these modules from MMM-physics repository. Will need to update the tags specified in Externals.cfg before final release. LIST OF MODIFIED FILES: A arch/Externals.cfg M phys/Makefile D phys/physics_mmm/bl_gwdo.F90 D phys/physics_mmm/bl_ysu.F90 D phys/physics_mmm/cu_ntiedtke.F90 D phys/physics_mmm/module_libmassv.F90 D phys/physics_mmm/mp_radar.F90 D phys/physics_mmm/mp_wsm6.F90 D phys/physics_mmm/mp_wsm6_effectRad.F90 D phys/physics_mmm/sf_sfclayrev.F90 A tools/manage_externals/ TESTS CONDUCTED: 1. Successfully compiled the code on Derecho. 2. Are the Jenkins tests all passing? RELEASE NOTE: Add manage_externals tool to access physics modules in MMM-physics git repository.
1 parent 695f455 commit 7195dc2

28 files changed

+3917
-10474
lines changed

CMakeLists.txt

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,29 @@ if ( ${USE_IPO} )
320320
endif()
321321

322322

323+
324+
################################################################################
325+
##
326+
## Checkout external repositories using manage_externals
327+
##
328+
################################################################################
329+
message( STATUS "Checking out external repos via manage_externals" )
330+
set( LOG_FILE ${CMAKE_CURRENT_BINARY_DIR}/checkout_externals.log )
331+
execute_process(
332+
COMMAND
333+
${PROJECT_SOURCE_DIR}/tools/manage_externals/checkout_externals --externals ${PROJECT_SOURCE_DIR}/arch/Externals.cfg
334+
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
335+
RESULT_VARIABLE MANAGE_EXTERNALS_STATUS
336+
OUTPUT_FILE ${LOG_FILE}
337+
ERROR_FILE ${LOG_FILE}
338+
)
339+
if ( ${MANAGE_EXTERNALS_STATUS} AND NOT ${MANAGE_EXTERNALS_STATUS} EQUAL 0 )
340+
message( FATAL_ERROR "Failed to checkout external repos via manage_externals" )
341+
else()
342+
message( STATUS "Finished checking out external repos via manage_externals" )
343+
endif()
344+
345+
323346
################################################################################
324347
##
325348
## Create our flags / defines properties and variables to carry our information

arch/Externals.cfg

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[MMM-physics]
2+
local_path = ./phys/physics_mmm
3+
protocol = git
4+
repo_url = https://github.com/NCAR/MMM-physics.git
5+
tag = 20240626-MPASv8.2
6+
7+
required = True
8+
9+
[externals_description]
10+
schema_version = 1.0.0

phys/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,7 @@ LIBTARGET = physics
249249
TARGETDIR = ./
250250

251251
$(LIBTARGET) :
252+
(cd .. && ./tools/manage_externals/checkout_externals --externals ./arch/Externals.cfg)
252253
$(MAKE) $(J) non_nmm ; \
253254
$(AR) $(ARFLAGS) ../main/$(LIBWRFLIB) $(MODULES) $(OBJS) \
254255
$(FIRE_MODULES) $(DIAGNOSTIC_MODULES_EM) $(PHYSMMM_MODULES)

0 commit comments

Comments
 (0)