Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Addin a GFSv17 ctest #1130

Merged
merged 3 commits into from
May 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,11 @@ if (${BUILD_GDASBUNDLE})
add_subdirectory(fv3jedi) # fv3jedi tests
add_subdirectory(soca) # soca tests
add_subdirectory(snow) # snow da tests
add_subdirectory(gw-ci) # replicate the creation of some of the gw-ci tests
option(RUN_GW_CI "Enable the global-workflow CI tests" OFF)
if (RUN_GW_CI)
add_subdirectory(gw-ci) # subset of the global-workflow ci tests
endif()

endif()

# gdas atm tests
Expand Down
88 changes: 56 additions & 32 deletions test/gw-ci/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,41 +1,18 @@
# Setup the environement
set(HOMEgfs ${CMAKE_SOURCE_DIR}/../../..)
set(RUNTESTS ${CMAKE_CURRENT_BINARY_DIR}/../../test/gw-ci)

# List of g-w ci test to create
# -----------------------------
set(cycling_tests "C48mx500_3DVarAOWCDA" "C96_atmaerosnowDA" "C96C48_ufs_hybatmDA")

# List of tasks to run for each test
# ----------------------------------
set(C48mx500_3DVarAOWCDA_tasks
"gdasprepoceanobs"
"gdasocnanalprep"
"gdasocnanalbmat"
"gdasocnanalrun"
"gdasocnanalchkpt"
"gdasocnanalpost")
set(C96_atmaerosnowDA_tasks) # empty list for now
set(C96C48_ufs_hybatmDA_tasks) # empty list for now

# Iterate through the list of cycling test
# ----------------------------------------
foreach(pslot ${cycling_tests})
message(STATUS "preparing ${pslot} ctest")
# Function that generates the 1/2 cycle forecast and DA tasks
function(add_cycling_tests pslot YAML_PATH HOMEgfs RUNTESTS PROJECT_SOURCE_DIR TASK_LIST)
# Prepare the COMROOT and EXPDIR for the cycling ctests
set(YAML ${HOMEgfs}/ci/cases/pr/${pslot}.yaml)
add_test(NAME ${pslot}
COMMAND /bin/bash -c "${PROJECT_SOURCE_DIR}/test/gw-ci/create_exp.sh ${YAML} ${pslot} ${HOMEgfs} ${RUNTESTS}"
COMMAND /bin/bash -c "${PROJECT_SOURCE_DIR}/test/gw-ci/create_exp.sh ${YAML_PATH} ${pslot} ${HOMEgfs} ${RUNTESTS}"
WORKING_DIRECTORY ${RUNTESTS})
set_tests_properties(${pslot} PROPERTIES LABELS "manual")

# Get the 1/2 cycle and full cycle's dates
execute_process(
COMMAND ${CMAKE_COMMAND} -E env python ${PROJECT_SOURCE_DIR}/test/gw-ci/get_cycles.py ${YAML}
COMMAND ${CMAKE_COMMAND} -E env python ${PROJECT_SOURCE_DIR}/test/gw-ci/get_cycles.py ${YAML_PATH}
OUTPUT_VARIABLE SCRIPT_OUTPUT
RESULT_VARIABLE SCRIPT_RESULT
OUTPUT_STRIP_TRAILING_WHITESPACE
)
)
string(REPLACE "," ";" DATES_LIST ${SCRIPT_OUTPUT})
list(GET DATES_LIST 0 HALF_CYCLE)
list(GET DATES_LIST 1 FULL_CYCLE)
Expand All @@ -48,9 +25,7 @@ foreach(pslot ${cycling_tests})
set_tests_properties(${pslot}_gdasfcst_${HALF_CYCLE} PROPERTIES LABELS "manual")

# Select the list of tasks to run for the full cycle
set(TASK_LIST_NAME "${pslot}_tasks")
set(TASK_LIST "${${TASK_LIST_NAME}}")
message(STATUS "Tasks for ${EXPERIMENT}: ${TASK_LIST}")
message(STATUS "Tasks ${TASK_LIST}")

foreach(task ${TASK_LIST})
message(STATUS "preparing the full cycle ${task} for ${pslot} ctest")
Expand All @@ -59,4 +34,53 @@ foreach(pslot ${cycling_tests})
WORKING_DIRECTORY ${RUNTESTS})
set_tests_properties(${pslot}_${task}_${FULL_CYCLE} PROPERTIES LABELS "manual")
endforeach()
endforeach()
endfunction()

# Setup the environement
set(HOMEgfs ${CMAKE_SOURCE_DIR}/../../..)
set(RUNTESTS ${CMAKE_CURRENT_BINARY_DIR}/../../test/gw-ci)

# WCDA, low-res
# -------------
set(pslot "WCDA-3DVAR-C48mx500")
set(YAML_PATH ${HOMEgfs}/ci/cases/pr/C48mx500_3DVarAOWCDA.yaml)
set(TASK_LIST
"gdasprepoceanobs"
"gdasocnanalprep"
"gdasocnanalbmat"
"gdasocnanalrun"
"gdasocnanalchkpt"
"gdasocnanalpost"
)
add_cycling_tests(${pslot} ${YAML_PATH} ${HOMEgfs} ${RUNTESTS} ${PROJECT_SOURCE_DIR} "${TASK_LIST}")

# Aero-Land DA, C96
# -----------------
set(pslot "Aero-Snow-3DVAR-C96")
set(YAML_PATH ${HOMEgfs}/ci/cases/pr/C96_atmaerosnowDA.yaml)
set(TASK_LIST) # empty list for now
add_cycling_tests(${pslot} ${YAML_PATH} ${HOMEgfs} ${RUNTESTS} ${PROJECT_SOURCE_DIR} "${TASK_LIST}")

# Atm DA, C96/C48
# ---------------
set(pslot "Atm-hyb-C96C48")
set(YAML_PATH ${HOMEgfs}/ci/cases/pr/C96C48_ufs_hybatmDA.yaml)
set(TASK_LIST) # empty list for now
add_cycling_tests(${pslot} ${YAML_PATH} ${HOMEgfs} ${RUNTESTS} ${PROJECT_SOURCE_DIR} "${TASK_LIST}")

# GFSv17, 3DVAR prototype
# -----------------------
set(pslot "GFSv17-3DVAR-C384mx025")
set(YAML_PATH ${HOMEgfs}/ci/cases/gfsv17/C384mx025_3DVarAOWCDA.yaml)
set(TASK_LIST
"gdasprepoceanobs"
"gdasocnanalprep"
"gdasocnanalbmat"
"gdasocnanalrun"
"gdasocnanalchkpt"
"gdasocnanalpost"
"gdasocnanalvrfy"
"gdasprep"
"gdasanal"
)
add_cycling_tests(${pslot} ${YAML_PATH} ${HOMEgfs} ${RUNTESTS} ${PROJECT_SOURCE_DIR} "${TASK_LIST}")
Loading