Skip to content

Commit

Permalink
EAMxx: change suffix convention for nc files
Browse files Browse the repository at this point in the history
Always add one of the following:
- model output files: .h
- model restart file: .r
- output restart files: .rh
  • Loading branch information
bartgol committed Oct 2, 2024
1 parent 06be2f8 commit b3fcd95
Show file tree
Hide file tree
Showing 52 changed files with 87 additions and 88 deletions.
7 changes: 3 additions & 4 deletions cime_config/config_archive.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,9 @@
</comp_archive_spec>

<comp_archive_spec compname="scream" compclass="atm">
<rest_file_extension>r\.(INSTANT|AVERAGE|MAX|MIN)\.n(step|sec|min|hour|day|month|year)s_x\d*</rest_file_extension>
<rest_file_extension>rhist\.(INSTANT|AVERAGE|MAX|MIN)\.n(step|sec|min|hour|day|month|year)s_x\d*</rest_file_extension>
<!-- The following matches "hi.AVGTYPE.FREQUNITS_xFREQ.TIMESTAMP.nc"-->
<hist_file_extension>.*\.h\.(?!rhist\.).*\.nc$</hist_file_extension>
<rest_file_extension>r</rest_file_extension>
<rest_file_extension>rh</rest_file_extension>
<hist_file_extension>h</hist_file_extension>
</comp_archive_spec>

<comp_archive_spec compname="elm" compclass="lnd">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ $YAML_EDIT_SCRIPT -g \
--avg-type INSTANT \
--freq HIST_N \
--freq-units HIST_OPTION \
--prefix ${CASE}.scream.diags.h \
--prefix ${CASE}.scream.diags \
--grid "Physics ${PGTYPE}" \
--fields ${FIELDS}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ $YAML_EDIT_SCRIPT -g \
--avg-type INSTANT \
--freq HIST_N \
--freq-units HIST_OPTION \
--prefix ${CASE}.scream.phys.h \
--prefix ${CASE}.scream.phys \
--grid "Physics ${PGTYPE}" \
--fields ${FIELDS}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ $YAML_EDIT_SCRIPT -g \
--avg-type INSTANT \
--freq HIST_N \
--freq-units HIST_OPTION \
--prefix ${CASE}.scream.phys_dyn.h \
--prefix ${CASE}.scream.phys_dyn \
--grid Dynamics \
--io-grid 'Physics GLL' \
--fields ${FIELDS}
Expand Down
4 changes: 2 additions & 2 deletions components/eamxx/src/share/io/scream_io_file_specs.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,11 @@ struct IOFileSpecs {

std::string suffix () const {
if (ftype==FileType::HistoryRestart)
return ".rhist";
return ".rh";
else if (ftype==FileType::ModelRestart)
return ".r";
else
return "";
return ".h";
}

void close () {
Expand Down
2 changes: 1 addition & 1 deletion components/eamxx/src/share/io/scream_io_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ std::string find_filename_in_rpointer (
std::string filename;
bool found = false;
std::string content;
std::string suffix = model_restart ? ".r." : ".rhist.";
std::string suffix = model_restart ? ".r." : ".rh.";
std::string pattern_str = filename_prefix + suffix;

// The AD will pass a default constructed control, since it doesn't know the values
Expand Down
2 changes: 1 addition & 1 deletion components/eamxx/src/share/io/scream_output_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ void OutputManager::run(const util::TimeStamp& timestamp)
}

// If we are going to write an output checkpoint file, or a model restart file,
// we need to append to the filename ".rhist" or ".r" respectively, and add
// we need to append to the filename ".rh" or ".r" respectively, and add
// the filename to the rpointer.atm file.
if (m_io_comm.am_i_root() and filespecs.is_restart_file()) {
std::ofstream rpointer;
Expand Down
4 changes: 2 additions & 2 deletions components/eamxx/src/share/io/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ foreach (AVG_TYPE IN ITEMS INSTANT AVERAGE)
foreach (MPI_RANKS RANGE 1 ${SCREAM_TEST_MAX_RANKS})
CompareNCFiles (
TEST_NAME output_restart_check_${AVG_TYPE}_np${MPI_RANKS}
SRC_FILE monolithic.${AVG_TYPE}.nsteps_x10.np${MPI_RANKS}.2000-01-01-00000.nc
TGT_FILE restarted.${AVG_TYPE}.nsteps_x10.np${MPI_RANKS}.2000-01-01-00000.nc
SRC_FILE monolithic.h.${AVG_TYPE}.nsteps_x10.np${MPI_RANKS}.2000-01-01-00000.nc
TGT_FILE restarted.h.${AVG_TYPE}.nsteps_x10.np${MPI_RANKS}.2000-01-01-00000.nc
LABELS io
FIXTURES_REQUIRED restart_check_setup_np${MPI_RANKS}_omp1
)
Expand Down
2 changes: 1 addition & 1 deletion components/eamxx/src/share/io/tests/io_basic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ void read (const std::string& avg_type, const std::string& freq_units,
// Create reader pl
ekat::ParameterList reader_pl;
std::string casename = "io_basic";
auto filename = casename
auto filename = casename + ".h"
+ "." + avg_type
+ "." + freq_units
+ "_x" + std::to_string(freq)
Expand Down
2 changes: 1 addition & 1 deletion components/eamxx/src/share/io/tests/io_diags.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ void read (const int seed, const ekat::Comm& comm)
// Create reader pl
ekat::ParameterList reader_pl;
std::string casename = "io_diags";
auto filename = casename
auto filename = casename + ".h"
+ ".INSTANT.nsteps_x1"
+ ".np" + std::to_string(comm.size())
+ "." + t0.to_string()
Expand Down
2 changes: 1 addition & 1 deletion components/eamxx/src/share/io/tests/io_filled.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ void read (const std::string& avg_type, const std::string& freq_units,
// Create reader pl
ekat::ParameterList reader_pl;
std::string casename = "io_filled";
auto filename = casename
auto filename = casename + ".h"
+ "." + avg_type
+ "." + freq_units
+ "_x" + std::to_string(freq)
Expand Down
2 changes: 1 addition & 1 deletion components/eamxx/src/share/io/tests/io_monthly.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ void read (const int seed, const ekat::Comm& comm)
// Get filename from timestamp
std::string casename = "io_monthly";
auto get_filename = [&](const util::TimeStamp& t) {
std::string fname = casename
std::string fname = casename + ".h"
+ ".INSTANT.nsteps_x1"
+ ".np" + std::to_string(comm.size())
+ "." + std::to_string(t.get_year())
Expand Down
2 changes: 1 addition & 1 deletion components/eamxx/src/share/io/tests/io_packed.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ void read (const int freq, const int seed, const int ps_write, const int ps_read
// Create reader pl
ekat::ParameterList reader_pl;
std::string casename = "io_packed_ps"+std::to_string(ps_write);
auto filename = casename
auto filename = casename + ".h"
+ ".INSTANT.nsteps"
+ "_x" + std::to_string(freq)
+ ".np" + std::to_string(comm.size())
Expand Down
2 changes: 1 addition & 1 deletion components/eamxx/src/share/io/tests/io_remap_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -707,7 +707,7 @@ ekat::ParameterList set_input_params(const std::string& name, ekat::Comm& comm,
{
using vos_type = std::vector<std::string>;
ekat::ParameterList in_params("Input Parameters");
std::string filename = name + ".INSTANT.nsteps_x1.np" + std::to_string(comm.size()) + "." + tstamp + ".nc";
std::string filename = name + ".h.INSTANT.nsteps_x1.np" + std::to_string(comm.size()) + "." + tstamp + ".nc";
in_params.set<std::string>("Filename",filename);
vos_type fields_in = {"Y_flat", "Y_mid", "Y_int", "V_mid", "V_int"};
if (p_ref>=0) {
Expand Down
2 changes: 1 addition & 1 deletion components/eamxx/src/share/io/tests/io_se_grid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ ekat::ParameterList get_in_params(const ekat::Comm& comm,
using vos_type = std::vector<std::string>;
ekat::ParameterList in_params("Input Parameters");

std::string filename = "io_se_grid.INSTANT.nsteps_x1.np"
std::string filename = "io_se_grid.h.INSTANT.nsteps_x1.np"
+ std::to_string(comm.size())
+ "." + t0.to_string() + ".nc";

Expand Down
4 changes: 2 additions & 2 deletions components/eamxx/src/share/io/tests/io_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ TEST_CASE ("find_filename_in_rpointer") {

std::string suffix = ".np" + std::to_string(comm.size()) + "." + t0.to_string() + ".nc";
std::string foo_fname = "foo.r.INSTANT.nsteps_x3" + suffix;
std::string bar_fname = "bar.h.r.AVERAGE.ndays_x1" + suffix;
std::string bar2_fname = "bar.h.r.AVERAGE.nhours_x6" + suffix;
std::string bar_fname = "bar.rh.AVERAGE.ndays_x1" + suffix;
std::string bar2_fname = "bar.rh.AVERAGE.nhours_x6" + suffix;

rpointer << foo_fname<< "\n";
rpointer << bar_fname<< "\n";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ include (CompareNCFiles)

CompareNCFilesFamilyMpi (
TEST_BASE_NAME ${TEST_BASE_NAME}
FILE_META_NAME ${TEST_BASE_NAME}_output.INSTANT.nsteps_x${NUM_STEPS}.npMPIRANKS.${RUN_T0}.nc
FILE_META_NAME ${TEST_BASE_NAME}_output.h.INSTANT.nsteps_x${NUM_STEPS}.npMPIRANKS.${RUN_T0}.nc
MPI_RANKS ${TEST_RANK_START} ${TEST_RANK_END}
LABELS dynamics physics mam4xx
META_FIXTURES_REQUIRED ${FIXTURES_BASE_NAME}_npMPIRANKS_omp1
Expand All @@ -89,6 +89,6 @@ CompareNCFilesFamilyMpi (
if (SCREAM_ENABLE_BASELINE_TESTS)
# Compare one of the output files with the baselines.
# Note: one is enough, since we already check that np1 is BFB with npX
set (OUT_FILE ${TEST_BASE_NAME}_output.INSTANT.nsteps_x${NUM_STEPS}.np${TEST_RANK_END}.${RUN_T0}.nc)
set (OUT_FILE ${TEST_BASE_NAME}_output.h.INSTANT.nsteps_x${NUM_STEPS}.np${TEST_RANK_END}.${RUN_T0}.nc)
CreateBaselineTest(${TEST_BASE_NAME} ${TEST_RANK_END} ${OUT_FILE} ${FIXTURES_BASE_NAME})
endif()
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ include (CompareNCFiles)

CompareNCFilesFamilyMpi (
TEST_BASE_NAME ${TEST_BASE_NAME}
FILE_META_NAME ${TEST_BASE_NAME}_output.INSTANT.nsteps_x${NUM_STEPS}.npMPIRANKS.${RUN_T0}.nc
FILE_META_NAME ${TEST_BASE_NAME}_output.h.INSTANT.nsteps_x${NUM_STEPS}.npMPIRANKS.${RUN_T0}.nc
MPI_RANKS ${TEST_RANK_START} ${TEST_RANK_END}
LABELS dynamics physics shoc cld p3 rrtmgp
META_FIXTURES_REQUIRED ${FIXTURES_BASE_NAME}_npMPIRANKS_omp1
Expand All @@ -83,6 +83,6 @@ CompareNCFilesFamilyMpi (
if (SCREAM_ENABLE_BASELINE_TESTS)
# Compare one of the output files with the baselines.
# Note: one is enough, since we already check that np1 is BFB with npX
set (OUT_FILE ${TEST_BASE_NAME}_output.INSTANT.nsteps_x${NUM_STEPS}.np${TEST_RANK_END}.${RUN_T0}.nc)
set (OUT_FILE ${TEST_BASE_NAME}_output.h.INSTANT.nsteps_x${NUM_STEPS}.np${TEST_RANK_END}.${RUN_T0}.nc)
CreateBaselineTest(${TEST_BASE_NAME} ${TEST_RANK_END} ${OUT_FILE} ${FIXTURES_BASE_NAME})
endif()
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ include (CompareNCFiles)

CompareNCFilesFamilyMpi (
TEST_BASE_NAME ${TEST_BASE_NAME}
FILE_META_NAME ${TEST_BASE_NAME}_output.INSTANT.nsteps_x${NUM_STEPS}.npMPIRANKS.${RUN_T0}.nc
FILE_META_NAME ${TEST_BASE_NAME}_output.h.INSTANT.nsteps_x${NUM_STEPS}.npMPIRANKS.${RUN_T0}.nc
MPI_RANKS ${TEST_RANK_START} ${TEST_RANK_END}
LABELS dynamics physics tms shoc cld p3 rrtmgp pg2
META_FIXTURES_REQUIRED ${FIXTURES_BASE_NAME}_npMPIRANKS_omp1
Expand All @@ -88,6 +88,6 @@ CompareNCFilesFamilyMpi (
if (SCREAM_ENABLE_BASELINE_TESTS)
# Compare one of the output files with the baselines.
# Note: one is enough, since we already check that np1 is BFB with npX
set (OUT_FILE ${TEST_BASE_NAME}_output.INSTANT.nsteps_x${NUM_STEPS}.np${TEST_RANK_END}.${RUN_T0}.nc)
set (OUT_FILE ${TEST_BASE_NAME}_output.h.INSTANT.nsteps_x${NUM_STEPS}.np${TEST_RANK_END}.${RUN_T0}.nc)
CreateBaselineTest(${TEST_BASE_NAME} ${TEST_RANK_END} ${OUT_FILE} ${FIXTURES_BASE_NAME})
endif()
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ include (CompareNCFiles)

CompareNCFilesFamilyMpi (
TEST_BASE_NAME ${TEST_BASE_NAME}
FILE_META_NAME ${TEST_BASE_NAME}_output.INSTANT.nsteps_x${NUM_STEPS}.npMPIRANKS.${RUN_T0}.nc
FILE_META_NAME ${TEST_BASE_NAME}_output.h.INSTANT.nsteps_x${NUM_STEPS}.npMPIRANKS.${RUN_T0}.nc
MPI_RANKS ${TEST_RANK_START} ${TEST_RANK_END}
LABELS dynamics physics shoc cld p3 rrtmgp spa
META_FIXTURES_REQUIRED ${FIXTURES_BASE_NAME}_npMPIRANKS_omp1
Expand All @@ -90,6 +90,6 @@ CompareNCFilesFamilyMpi (
if (SCREAM_ENABLE_BASELINE_TESTS)
# Compare one of the output files with the baselines.
# Note: one is enough, since we already check that np1 is BFB with npX
set (OUT_FILE ${TEST_BASE_NAME}_output.INSTANT.nsteps_x${NUM_STEPS}.np${TEST_RANK_END}.${RUN_T0}.nc)
set (OUT_FILE ${TEST_BASE_NAME}_output.h.INSTANT.nsteps_x${NUM_STEPS}.np${TEST_RANK_END}.${RUN_T0}.nc)
CreateBaselineTest(${TEST_BASE_NAME} ${TEST_RANK_END} ${OUT_FILE} ${FIXTURES_BASE_NAME})
endif()
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ include (CompareNCFiles)

CompareNCFilesFamilyMpi (
TEST_BASE_NAME ${TEST_BASE_NAME}
FILE_META_NAME ${TEST_BASE_NAME}_output.INSTANT.nsteps_x1.npMPIRANKS.${RUN_T0}.nc
FILE_META_NAME ${TEST_BASE_NAME}_output.h.INSTANT.nsteps_x1.npMPIRANKS.${RUN_T0}.nc
MPI_RANKS ${TEST_RANK_START} ${TEST_RANK_END}
LABELS dynamics physics shoc cld p3 rrtmgp spa
META_FIXTURES_REQUIRED ${FIXTURES_BASE_NAME}_npMPIRANKS_omp1
Expand All @@ -89,7 +89,7 @@ CompareNCFilesFamilyMpi (
# Check tendency calculation
foreach (NRANKS RANGE ${TEST_RANK_START} ${TEST_RANK_END})
set (script ${SCREAM_BASE_DIR}/scripts/check-tendencies)
set (fname ${TEST_BASE_NAME}_output.INSTANT.nsteps_x1.np${NRANKS}.${RUN_T0}.nc)
set (fname ${TEST_BASE_NAME}_output.h.INSTANT.nsteps_x1.np${NRANKS}.${RUN_T0}.nc)
set (tname ${TEST_BASE_NAME}_tend_check_np${NRANKS})
add_test (NAME ${tname}
COMMAND ${script} -f ${fname} -v qv T_mid -t EAMxx_qv_tend EAMxx_T_mid_tend
Expand All @@ -102,6 +102,6 @@ endforeach()
if (SCREAM_ENABLE_BASELINE_TESTS)
# Compare one of the output files with the baselines.
# Note: one is enough, since we already check that np1 is BFB with npX
set (OUT_FILE ${TEST_BASE_NAME}_output.INSTANT.nsteps_x1.np${TEST_RANK_END}.${RUN_T0}.nc)
set (OUT_FILE ${TEST_BASE_NAME}_output.h.INSTANT.nsteps_x1.np${TEST_RANK_END}.${RUN_T0}.nc)
CreateBaselineTest(${TEST_BASE_NAME} ${TEST_RANK_END} ${OUT_FILE} ${FIXTURES_BASE_NAME})
endif()
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ include (CompareNCFiles)

CompareNCFilesFamilyMpi (
TEST_BASE_NAME ${TEST_BASE_NAME}
FILE_META_NAME ${TEST_BASE_NAME}_output.INSTANT.nsteps_x${NUM_STEPS}.npMPIRANKS.${RUN_T0}.nc
FILE_META_NAME ${TEST_BASE_NAME}_output.h.INSTANT.nsteps_x${NUM_STEPS}.npMPIRANKS.${RUN_T0}.nc
MPI_RANKS ${TEST_RANK_START} ${TEST_RANK_END}
LABELS dynamics physics tms shoc cld spa p3 rrtmgp dp pg2
META_FIXTURES_REQUIRED ${FIXTURES_BASE_NAME}_npMPIRANKS_omp1
Expand All @@ -92,6 +92,6 @@ CompareNCFilesFamilyMpi (
if (SCREAM_ENABLE_BASELINE_TESTS)
# Compare one of the output files with the baselines.
# Note: one is enough, since we already check that np1 is BFB with npX
set (OUT_FILE ${TEST_BASE_NAME}_output.INSTANT.nsteps_x${NUM_STEPS}.np${TEST_RANK_END}.${RUN_T0}.nc)
set (OUT_FILE ${TEST_BASE_NAME}_output.h.INSTANT.nsteps_x${NUM_STEPS}.np${TEST_RANK_END}.${RUN_T0}.nc)
CreateBaselineTest(${TEST_BASE_NAME} ${TEST_RANK_END} ${OUT_FILE} ${FIXTURES_BASE_NAME})
endif()
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ include (CompareNCFiles)

CompareNCFilesFamilyMpi (
TEST_BASE_NAME ${TEST_BASE_NAME}
FILE_META_NAME ${TEST_BASE_NAME}.INSTANT.nsteps_x${NUM_STEPS}.npMPIRANKS.${RUN_T0}.nc
FILE_META_NAME ${TEST_BASE_NAME}.h.INSTANT.nsteps_x${NUM_STEPS}.npMPIRANKS.${RUN_T0}.nc
MPI_RANKS ${TEST_RANK_START} ${TEST_RANK_END}
LABELS dynamics physics shoc cld p3 rrtmgp mam4_optics
META_FIXTURES_REQUIRED ${FIXTURES_BASE_NAME}_npMPIRANKS_omp1
Expand All @@ -104,6 +104,6 @@ CompareNCFilesFamilyMpi (
if (SCREAM_ENABLE_BASELINE_TESTS)
# Compare one of the output files with the baselines.
# Note: one is enough, since we already check that np1 is BFB with npX
set (OUT_FILE ${TEST_BASE_NAME}.INSTANT.nsteps_x${NUM_STEPS}.np${TEST_RANK_END}.${RUN_T0}.nc)
set (OUT_FILE ${TEST_BASE_NAME}.h.INSTANT.nsteps_x${NUM_STEPS}.np${TEST_RANK_END}.${RUN_T0}.nc)
CreateBaselineTest(${TEST_BASE_NAME} ${TEST_RANK_END} ${OUT_FILE} ${FIXTURES_BASE_NAME})
endif()
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ include (CompareNCFiles)

CompareNCFilesFamilyMpi (
TEST_BASE_NAME ${TEST_BASE_NAME}
FILE_META_NAME ${TEST_BASE_NAME}.INSTANT.nsteps_x${NUM_STEPS}.npMPIRANKS.${RUN_T0}.nc
FILE_META_NAME ${TEST_BASE_NAME}.h.INSTANT.nsteps_x${NUM_STEPS}.npMPIRANKS.${RUN_T0}.nc
MPI_RANKS ${TEST_RANK_START} ${TEST_RANK_END}
LABELS dynamics physics shoc cld p3 rrtmgp mam4_optics
META_FIXTURES_REQUIRED ${FIXTURES_BASE_NAME}_npMPIRANKS_omp1
Expand All @@ -104,6 +104,6 @@ CompareNCFilesFamilyMpi (
if (SCREAM_ENABLE_BASELINE_TESTS)
# Compare one of the output files with the baselines.
# Note: one is enough, since we already check that np1 is BFB with npX
set (OUT_FILE ${TEST_BASE_NAME}.INSTANT.nsteps_x${NUM_STEPS}.np${TEST_RANK_END}.${RUN_T0}.nc)
set (OUT_FILE ${TEST_BASE_NAME}.h.INSTANT.nsteps_x${NUM_STEPS}.np${TEST_RANK_END}.${RUN_T0}.nc)
CreateBaselineTest(${TEST_BASE_NAME} ${TEST_RANK_END} ${OUT_FILE} ${FIXTURES_BASE_NAME})
endif()
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ include (CompareNCFiles)

CompareNCFilesFamilyMpi (
TEST_BASE_NAME ${TEST_BASE_NAME}
FILE_META_NAME ${TEST_BASE_NAME}_output.INSTANT.nsteps_x${NUM_STEPS}.npMPIRANKS.${RUN_T0}.nc
FILE_META_NAME ${TEST_BASE_NAME}_output.h.INSTANT.nsteps_x${NUM_STEPS}.npMPIRANKS.${RUN_T0}.nc
MPI_RANKS ${TEST_RANK_START} ${TEST_RANK_END}
LABELS dynamics physics shoc cld p3 rrtmgp spa mam4_wetscav
META_FIXTURES_REQUIRED ${FIXTURES_BASE_NAME}_npMPIRANKS_omp1
Expand All @@ -90,6 +90,6 @@ CompareNCFilesFamilyMpi (
if (SCREAM_ENABLE_BASELINE_TESTS)
# Compare one of the output files with the baselines.
# Note: one is enough, since we already check that np1 is BFB with npX
set (OUT_FILE ${TEST_BASE_NAME}_output.INSTANT.nsteps_x${NUM_STEPS}.np${TEST_RANK_END}.${RUN_T0}.nc)
set (OUT_FILE ${TEST_BASE_NAME}_output.h.INSTANT.nsteps_x${NUM_STEPS}.np${TEST_RANK_END}.${RUN_T0}.nc)
CreateBaselineTest(${TEST_BASE_NAME} ${TEST_RANK_END} ${OUT_FILE} ${FIXTURES_BASE_NAME})
endif()
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ CreateUnitTestFromExec(model_restart model_restart

# Finally, compare the nc outputs generated by the basline and restarted runs
# IMPORTANT: make sure these file names match what baseline/restarted runs produce
set (SRC_FILE model_output_baseline.AVERAGE.nmins_x1.np${SCREAM_TEST_MAX_RANKS}.${CASE_T0}.nc)
set (TGT_FILE model_output.AVERAGE.nmins_x1.np${SCREAM_TEST_MAX_RANKS}.${CASE_T0}.nc)
set (SRC_FILE model_output_baseline.h.AVERAGE.nmins_x1.np${SCREAM_TEST_MAX_RANKS}.${CASE_T0}.nc)
set (TGT_FILE model_output.h.AVERAGE.nmins_x1.np${SCREAM_TEST_MAX_RANKS}.${CASE_T0}.nc)

add_test (NAME restarted_vs_monolithic_check_np${SCREAM_TEST_MAX_RANKS}
COMMAND cmake -P ${CMAKE_BINARY_DIR}/bin/CprncTest.cmake ${SRC_FILE} ${TGT_FILE}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ CreateUnitTestFromExec (shoc_p3_monolithic shoc_p3
include (BuildCprnc)
BuildCprnc()

set (SRC_FILE "shoc_p3_monolithic.INSTANT.nsteps_x3.np1.${RUN_T0}.nc")
set (TGT_FILE "shoc_p3_subcycled.INSTANT.nsteps_x1.np1.${RUN_T0}.nc")
set (SRC_FILE "shoc_p3_monolithic.h.INSTANT.nsteps_x3.np1.${RUN_T0}.nc")
set (TGT_FILE "shoc_p3_subcycled.h.INSTANT.nsteps_x1.np1.${RUN_T0}.nc")
set (TEST_NAME check_subcycling)
add_test (NAME ${TEST_NAME}
COMMAND cmake -P ${CMAKE_BINARY_DIR}/bin/CprncTest.cmake ${SRC_FILE} ${TGT_FILE}
Expand All @@ -57,7 +57,7 @@ set_tests_properties(${TEST_NAME} PROPERTIES

# Check calculation of shoc tendencies when the parent group is subcycled
set (script ${SCREAM_BASE_DIR}/scripts/check-tendencies)
set (fname shoc_p3_tend_subcycled.INSTANT.nsteps_x1.np1.${RUN_T0}.nc)
set (fname shoc_p3_tend_subcycled.h.INSTANT.nsteps_x1.np1.${RUN_T0}.nc)
add_test (NAME ${TEST_NAME}_tend_check
COMMAND ${script} -f ${fname} -v tke -t shoc_tke_tend
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/output.yaml
include (CompareNCFiles)
CompareNCFilesFamilyMpi (
TEST_BASE_NAME ${TEST_BASE_NAME}
FILE_META_NAME ${TEST_BASE_NAME}_output.INSTANT.nsteps_x${NUM_STEPS}.npMPIRANKS.${RUN_T0}.nc
FILE_META_NAME ${TEST_BASE_NAME}_output.h.INSTANT.nsteps_x${NUM_STEPS}.npMPIRANKS.${RUN_T0}.nc
MPI_RANKS ${TEST_RANK_START} ${TEST_RANK_END}
LABELS physics mam4_srf_online_emiss mam4_constituent_fluxes
META_FIXTURES_REQUIRED ${FIXTURES_BASE_NAME}_npMPIRANKS_omp1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/output.yaml
include (CompareNCFiles)
CompareNCFilesFamilyMpi (
TEST_BASE_NAME ${TEST_BASE_NAME}
FILE_META_NAME ${TEST_BASE_NAME}_output.INSTANT.nsteps_x${NUM_STEPS}.npMPIRANKS.${RUN_T0}.nc
FILE_META_NAME ${TEST_BASE_NAME}_output.h.INSTANT.nsteps_x${NUM_STEPS}.npMPIRANKS.${RUN_T0}.nc
MPI_RANKS ${TEST_RANK_START} ${TEST_RANK_END}
LABELS rrtmgp mam4_optics
META_FIXTURES_REQUIRED ${FIXTURES_BASE_NAME}_npMPIRANKS_omp1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/output.yaml
include (CompareNCFiles)
CompareNCFilesFamilyMpi (
TEST_BASE_NAME ${TEST_BASE_NAME}
FILE_META_NAME ${TEST_BASE_NAME}_output.INSTANT.nsteps_x${NUM_STEPS}.npMPIRANKS.${RUN_T0}.nc
FILE_META_NAME ${TEST_BASE_NAME}_output.h.INSTANT.nsteps_x${NUM_STEPS}.npMPIRANKS.${RUN_T0}.nc
MPI_RANKS ${TEST_RANK_START} ${TEST_RANK_END}
LABELS p3 physics mam4_wetscav
META_FIXTURES_REQUIRED ${FIXTURES_BASE_NAME}_npMPIRANKS_omp1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/output.yaml
include (CompareNCFiles)
CompareNCFilesFamilyMpi (
TEST_BASE_NAME ${TEST_BASE_NAME}
FILE_META_NAME ${TEST_BASE_NAME}_output.INSTANT.nsteps_x${NUM_STEPS}.npMPIRANKS.${RUN_T0}.nc
FILE_META_NAME ${TEST_BASE_NAME}_output.h.INSTANT.nsteps_x${NUM_STEPS}.npMPIRANKS.${RUN_T0}.nc
MPI_RANKS ${TEST_RANK_START} ${TEST_RANK_END}
LABELS shoc cld p3 physics PEM mam4_aci
META_FIXTURES_REQUIRED ${FIXTURES_BASE_NAME}_npMPIRANKS_omp1
Expand Down
Loading

0 comments on commit b3fcd95

Please sign in to comment.