Skip to content

Commit

Permalink
Merge remote-tracking branch 'emc/develop' into feature/pdlib/ufs1.1-…
Browse files Browse the repository at this point in the history
…unstr

* emc/develop:
  STAB3: fix cmake build for ST4 or ST3 (NOAA-EMC#1086)
  Fix missing mod_def.ww3 file in multigrid regression tests for track output (NOAA-EMC#1091)
  • Loading branch information
MatthewMasarik-NOAA committed Oct 11, 2023
2 parents 15874ee + d22b7bb commit 195df6b
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 11 deletions.
6 changes: 3 additions & 3 deletions model/src/cmake/check_switches.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ function(check_switches switches switch_files)
message(FATAL_ERROR "Switch '${valid_opt}' requires '${required_switch}' to be set")
endif()
elseif(json_type STREQUAL "ARRAY")
string(JSON n_requires_any LENGTH ${vategory} valid-options ${j_options} requries ${i_requires})
string(JSON n_requires_any LENGTH ${category} valid-options ${j_options} requires ${i_requires})
math(EXPR n_requires_any "${n_requires_any} - 1")

# Loop over array and check that one of the switches is present
Expand All @@ -70,7 +70,7 @@ function(check_switches switches switch_files)
if(NOT found)
message(FATAL_ERROR "Switch ${valid_opt} requires one of ${possible_values} to be set")
endif()

endif()
endforeach()
endif()
Expand Down Expand Up @@ -98,7 +98,7 @@ function(check_switches switches switch_files)
elseif(num_switches STREQUAL "upto2" AND n_switches_in_category GREATER 2)
message(FATAL_ERROR "Too many ${category_name} switches found (max 2)")
endif()

endforeach()

set(${switch_files} ${files} PARENT_SCOPE)
Expand Down
12 changes: 6 additions & 6 deletions model/src/cmake/switches.json
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@
},
{
"name": "STAB3",
"requires": ["ST3", "ST4"]
"requires_any": ["ST3", "ST4"]
}
]
},
Expand Down Expand Up @@ -756,16 +756,16 @@
}
]
},
{
"name": "ddlib",
{
"name": "ddlib",
"num_switches": "upto1",
"description": "domain decomposition library",
"valid-options": [
{
{
"name": "METIS",
"requires": ["PDLIB"]
},
{
},
{
"name": "SCOTCH",
"requires": ["PDLIB"]
}
Expand Down
6 changes: 5 additions & 1 deletion regtests/bin/run_cmake_test
Original file line number Diff line number Diff line change
Expand Up @@ -2027,7 +2027,7 @@ done # end of loop on progs
case $outopt in
native) out_progs="ww3_trck" ;;
netcdf) out_progs="ww3_trnc" ;;
both) out_progs="ww3_trck ww3_trnc" ;;
both|all) out_progs="ww3_trck ww3_trnc" ;;
*) out_progs="" ;;
esac

Expand Down Expand Up @@ -2070,6 +2070,9 @@ do
then
continue
fi

\ln -s mod_def.$g mod_def.ww3

gu="_$g"
fileconf="$prog${gu}"
else
Expand Down Expand Up @@ -2124,6 +2127,7 @@ do
\rm -f $prog.nml
if [ $multi -eq 2 ]
then
\rm -f mod_def.ww3
\rm -f track_o.ww3
if [ $nml_input ] && [ ! -z "`basename ${ifile} | grep -o nml`" ]
then
Expand Down
6 changes: 5 additions & 1 deletion regtests/bin/run_test
Original file line number Diff line number Diff line change
Expand Up @@ -2368,7 +2368,7 @@ done # end of loop on progs
case $outopt in
native) out_progs="ww3_trck" ;;
netcdf) out_progs="ww3_trnc" ;;
both) out_progs="ww3_trck ww3_trnc" ;;
both|all) out_progs="ww3_trck ww3_trnc" ;;
*) out_progs="" ;;
esac

Expand Down Expand Up @@ -2448,6 +2448,9 @@ do
then
continue
fi

\ln -s mod_def.$g mod_def.ww3

gu="_$g"
fileconf="$prog${gu}"
else
Expand Down Expand Up @@ -2502,6 +2505,7 @@ do
\rm -f $prog.nml
if [ $multi -eq 2 ]
then
\rm -f mod_def.ww3
\rm -f track_o.ww3
if [ $nml_input ] && [ ! -z "`echo ${ifile} | grep -o nml`" ]
then
Expand Down

0 comments on commit 195df6b

Please sign in to comment.