Skip to content

Commit 33c8135

Browse files
authored
Merge pull request #477 from eagles-project/mjs/ff_mxv
ff mam x validation for new compare script
2 parents 6ceda4b + 138028b commit 33c8135

File tree

30 files changed

+355
-191
lines changed

30 files changed

+355
-191
lines changed

.github/workflows/gh_gcc-cpu.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ jobs:
7575
# to get the array instead of a string, need the fromJSON()
7676
build-type: ${{ fromJSON(needs.define_matrix.outputs.build_type) }}
7777
fp-precision: ${{ fromJSON(needs.define_matrix.outputs.precision) }}
78-
78+
name: gcc-cpu / ${{ matrix.build-type }} - ${{ matrix.fp-precision }}
7979
runs-on: ${{ matrix.os }}
8080

8181
# Environment variables

src/validation/aero_emissions/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,13 @@ foreach(input tol IN ZIP_LISTS TEST_LIST ERROR_THRESHOLDS)
7171

7272
# add a test to run the skywalker driver
7373
add_test(run_${input} aero_emissions_driver ${AERO_EMISSIONS_VALIDATION_DIR}/${input}.yaml)
74-
set_tests_properties(run_${input} PROPERTIES LABELS "${TestLabel}")
74+
set_tests_properties(run_${input} PROPERTIES LABELS ${TestLabel})
7575

7676
# add a test to validate mam4xx's results against the baseline.
7777
# Select a threshold error slightly bigger than the largest relative error for the threshold error.
7878
# compare_mam4xx_mam4.py <module1.py> <module2.py> <check_norms> <threshold error>
7979
add_test(validate_${input} python3 compare_mam4xx_mam4.py mam4xx_${input}.py mam_${input}.py True ${tol})
80+
set_property(TEST validate_${input} PROPERTY SKIP_REGULAR_EXPRESSION "regex_fail_rel_tol")
8081
set_tests_properties(validate_${input} PROPERTIES DEPENDS run_${input})
8182
set_tests_properties(validate_${input} PROPERTIES LABELS ${TestLabel})
8283
endforeach()

src/validation/aero_model/CMakeLists.txt

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,24 +33,25 @@ set(TEST_LIST
3333
modal_aero_bcscavcoef_init_ts_0
3434
aero_model_wetdep_ts_379
3535
stand_aero_model_calcsize_water_uptake_dr_ts_379
36-
baseline_aero_model_wetdep_ts_379
36+
baseline_aero_model_wetdep_ts_379
3737
)
3838

39-
set(DEFAULT_TOL 1e-11)
4039
set(DEFAULT_TOL_BASELINE 1e-13)
4140

4241
set(ERROR_THRESHOLDS
43-
5e-8
44-
${DEFAULT_TOL}
45-
2e-4
46-
2e-5
47-
2e-5
48-
${DEFAULT_TOL_BASELINE}
42+
5e-8 # calc_1_impact_rate_ts_0
43+
1e-11 # modal_aero_bcscavcoef_get_ts_355
44+
2e-4 # modal_aero_bcscavcoef_init_ts_0
45+
2e-5 # aero_model_wetdep_ts_379
46+
1e-9 # stand_aero_model_calcsize_water_uptake_dr_ts_379
47+
${DEFAULT_TOL_BASELINE} # baseline_aero_model_wetdep_ts_379
4948
)
5049

50+
set(TestLabel "aero_model")
51+
5152
foreach(input tol IN ZIP_LISTS TEST_LIST ERROR_THRESHOLDS)
5253
# copy the baseline file into place.
53-
54+
5455
configure_file(
5556
${AERO_MODEL_VALIDATION_DIR}/mam_${input}.py
5657
${CMAKE_CURRENT_BINARY_DIR}/mam_${input}.py
@@ -59,11 +60,14 @@ foreach(input tol IN ZIP_LISTS TEST_LIST ERROR_THRESHOLDS)
5960

6061
# add a test to run the skywalker driver
6162
add_test(run_${input} aero_model_driver ${AERO_MODEL_VALIDATION_DIR}/${input}.yaml)
63+
set_tests_properties(run_${input} PROPERTIES LABELS ${TestLabel})
6264

6365
# add a test to validate mam4xx's results against the baseline.
6466
# Select a threshold error slightly bigger than the largest relative error for the threshold error.
6567
# compare_mam4xx_mam4.py <module1.py> <module2.py> <check_norms> <threshold error>
6668
add_test(validate_${input} python3 compare_mam4xx_mam4.py mam4xx_${input}.py mam_${input}.py True ${tol})
69+
set_property(TEST validate_${input} PROPERTY SKIP_REGULAR_EXPRESSION "regex_fail_rel_tol")
6770
set_tests_properties(validate_${input} PROPERTIES DEPENDS run_${input})
71+
set_tests_properties(validate_${input} PROPERTIES LABELS ${TestLabel})
6872

6973
endforeach()

src/validation/aerosol_optics/CMakeLists.txt

Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -57,24 +57,26 @@ set(TEST_LIST
5757
)
5858
# # matching the tests and errors, just for convenience
5959

60-
set(DEFAULT_TOL 1e-13)
6160
set(ERROR_THRESHOLDS
62-
2e-10
63-
${DEFAULT_TOL}
64-
3e-10
65-
3e-10
66-
3e-10
67-
2e-8
68-
2e-8
69-
6e-9
70-
7e-11
71-
2e-11
72-
1e-12
73-
7e-11
74-
8e-11
75-
8e-11
76-
1e-14
61+
2e-10 # binterp_ts_355
62+
1e-13 # calc_diag_spec_ts_355
63+
3e-10 # calc_refin_complex_ts_355_lw
64+
3e-10 # calc_refin_complex_ts_355_sw
65+
3e-10 # calc_volc_ext_ts_355
66+
2e-8 # modal_size_parameters_ts_355_ismethod2_false
67+
2e-8 # modal_size_parameters_ts_355_ismethod2_true
68+
6e-9 # modal_aero_sw_ts_355
69+
7e-11 # modal_aero_lw_ts_355
70+
2e-11 # calc_parameterized_ts_355
71+
1e-12 # update_aod_spec_ts_355
72+
7e-11 # aer_rad_props_lw_ts_355
73+
8e-11 # aer_rad_props_sw_ts_355
74+
8e-11 # volcanic_cmip_sw_ts_355
75+
1e-14 # data_transfer_state_q_qqwc_to_prog
7776
)
77+
78+
set(TestLabel "aerosol_optics")
79+
7880
foreach(input tol IN ZIP_LISTS TEST_LIST ERROR_THRESHOLDS)
7981
# copy the baseline file into place.
8082

@@ -86,10 +88,13 @@ foreach(input tol IN ZIP_LISTS TEST_LIST ERROR_THRESHOLDS)
8688

8789
# add a test to run the skywalker driver
8890
add_test(run_${input} aerosol_optics_driver ${AEROSOL_OPTICS_VALIDATION_DIR}/${input}.yaml)
91+
set_tests_properties(run_${input} PROPERTIES LABELS ${TestLabel})
8992

9093
# add a test to validate mam4xx's results against the baseline.
9194
# Select a threshold error slightly bigger than the largest relative error for the threshold error.
9295
# compare_mam4xx_mam4.py <module1.py> <module2.py> <check_norms> <threshold error>
9396
add_test(validate_${input} python3 compare_mam4xx_mam4.py mam4xx_${input}.py mam_${input}.py True ${tol})
97+
set_property(TEST validate_${input} PROPERTY SKIP_REGULAR_EXPRESSION "regex_fail_rel_tol")
9498
set_tests_properties(validate_${input} PROPERTIES DEPENDS run_${input})
99+
set_tests_properties(validate_${input} PROPERTIES LABELS ${TestLabel})
95100
endforeach()

src/validation/aging/CMakeLists.txt

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@ set(TEST_LIST
2929
pcarbon_aging_1subarea
3030
)
3131

32-
#set(DEFAULT_TOL 1e-9)
33-
3432
set(ERROR_THRESHOLDS 8e-5 4e-4)
3533

34+
set(TestLabel "aging")
35+
3636
foreach(input tol IN ZIP_LISTS TEST_LIST ERROR_THRESHOLDS)
3737
# copy the baseline file into place; is the skywalker file produced by fortran code?
38-
38+
3939
configure_file(
4040
${AGING_VALIDATION_DIR}/mam_${input}.py
4141
${CMAKE_CURRENT_BINARY_DIR}/mam_${input}.py
@@ -44,12 +44,14 @@ foreach(input tol IN ZIP_LISTS TEST_LIST ERROR_THRESHOLDS)
4444

4545
# add a test to run the skywalker driver
4646
add_test(run_${input} aging_driver ${AGING_VALIDATION_DIR}/${input}.yaml)
47+
set_tests_properties(run_${input} PROPERTIES LABELS ${TestLabel})
4748

4849
# add a test to validate mam4xx's results against the baseline.
4950
# Select a threshold error slightly bigger than the largest relative error for the threshold error.
5051
# compare_mam4xx_mam4.py <module1.py> <module2.py> <check_norms> <threshold error>
5152
add_test(validate_${input} python3 compare_mam4xx_mam4.py mam4xx_${input}.py mam_${input}.py True ${tol})
53+
set_property(TEST validate_${input} PROPERTY SKIP_REGULAR_EXPRESSION "regex_fail_rel_tol")
5254
set_tests_properties(validate_${input} PROPERTIES DEPENDS run_${input})
55+
set_tests_properties(validate_${input} PROPERTIES LABELS ${TestLabel})
5356

5457
endforeach()
55-

src/validation/calcsize/CMakeLists.txt

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -43,19 +43,20 @@ set(TEST_LIST
4343
)
4444
# # matching the tests and errors, just for convenience
4545

46-
set(DEFAULT_TOL 2e-6)
46+
set(DEFAULT_TOL 1e-12)
4747
set(ERROR_THRESHOLDS
48-
1e-12
49-
1e-12
50-
2e-6
51-
2e-6
52-
1e-12
53-
1e-12
54-
5e-11
55-
3e-5
56-
1.5e-3
48+
${DEFAULT_TOL} # adjust_num_sizes_case1
49+
${DEFAULT_TOL} # adjust_num_sizes_case2
50+
2e-6 # calcsize_e3sm
51+
2e-6 # calcsize_sub
52+
${DEFAULT_TOL} # aitken_accum_exchange_case1
53+
${DEFAULT_TOL} # calcsize_compute_dry_volume
54+
5e-11 # stand_modal_aero_calcsize_sub
55+
3e-5 # stand_modal_aero_calcsize_sub_update_ptend
56+
1.5e-3 # stand_calcsize_aero_model_wetdep_ts_379
5757
)
5858

59+
set(TestLabel "calcsize")
5960

6061
foreach(input tol IN ZIP_LISTS TEST_LIST ERROR_THRESHOLDS)
6162
# copy the baseline file into place.
@@ -68,10 +69,13 @@ foreach(input tol IN ZIP_LISTS TEST_LIST ERROR_THRESHOLDS)
6869

6970
# add a test to run the skywalker driver
7071
add_test(run_${input} calcsize_driver ${CALCSIZE_VALIDATION_DIR}/${input}.yaml)
72+
set_tests_properties(run_${input} PROPERTIES LABELS ${TestLabel})
7173

7274
# add a test to validate mam4xx's results against the baseline.
7375
# Select a threshold error slightly bigger than the largest relative error for the threshold error.
7476
# compare_mam4xx_mam4.py <module1.py> <module2.py> <check_norms> <threshold error>
7577
add_test(validate_${input} python3 compare_mam4xx_mam4.py mam4xx_${input}.py mam_${input}.py True ${tol})
78+
set_property(TEST validate_${input} PROPERTY SKIP_REGULAR_EXPRESSION "regex_fail_rel_tol")
7679
set_tests_properties(validate_${input} PROPERTIES DEPENDS run_${input})
80+
set_tests_properties(validate_${input} PROPERTIES LABELS ${TestLabel})
7781
endforeach()

src/validation/coagulation/CMakeLists.txt

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ add_executable(coagulation_driver
1212
coag_1subarea.cpp
1313
getcoags.cpp
1414
getcoags_wrapper_f.cpp
15-
coag_aer_update.cpp
15+
coag_aer_update.cpp
1616
coag_num_update.cpp )
1717
target_link_libraries(coagulation_driver skywalker;validation;haero)
1818

@@ -28,6 +28,8 @@ endforeach()
2828

2929
# Run the driver in several configurations to produce datasets.
3030

31+
set(TestLabel "coagulation")
32+
3133
# Aging
3234
foreach (input
3335
coag_1subarea
@@ -46,9 +48,9 @@ foreach (input
4648

4749
# add a test to run the skywalker driver
4850
add_test(run_${input} coagulation_driver ${COAGULATION_VALIDATION_DIR}/${input}.yaml)
49-
51+
set_tests_properties(run_${input} PROPERTIES LABELS ${TestLabel})
52+
5053
# add a test to validate mam4xx's results against the baseline.
5154
add_test(validate_${input} python3 compare_coag_validation.py mam4xx_${input}.py mam_${input}.py)
52-
endforeach()
53-
54-
55+
set_tests_properties(validate_${input} PROPERTIES LABELS ${TestLabel})
56+
endforeach()

src/validation/convproc/CMakeLists.txt

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ endforeach()
4747

4848
# Run the driver in several configurations to produce datasets.
4949

50+
set(TestLabel "convproc")
51+
5052
# convproc
5153
foreach (input
5254
update_tendency_final
@@ -87,22 +89,25 @@ foreach (input
8789

8890
# add a test to run the skywalker driver
8991
add_test(run_${input} convproc_driver ${CONVPROC_VALIDATION_DIR}/${input}.yaml)
92+
set_tests_properties(run_${input} PROPERTIES LABELS ${TestLabel})
9093

9194
# add a test to validate mam4xx's results against the baseline.
9295
# Select a threshold error slightly bigger than the largest relative error for the threshold error.
9396
# Conservative approach: At the time of this commit, threshold error=2e-6.
94-
# compare_mam4xx_mam4.py <module1.py> <module2.py> <check_norms> <threshold error>
95-
if (${input} STREQUAL compute_activation_tend_do_act_true)
97+
# compare_mam4xx_mam4.py <module1.py> <module2.py> <check_norms> <threshold error>
98+
if (${input} STREQUAL compute_activation_tend_do_act_true)
9699
set(TOL 6e-6)
97-
elseif (${input} STREQUAL ma_activate_convproc_54)
100+
elseif (${input} STREQUAL ma_activate_convproc_54)
98101
set(TOL 6e-5)
99-
elseif (${input} STREQUAL ma_convproc_tend)
102+
elseif (${input} STREQUAL ma_convproc_tend)
100103
set(TOL 1e-4)
101-
elseif (${input} STREQUAL compute_updraft_mixing_ratio)
104+
elseif (${input} STREQUAL compute_updraft_mixing_ratio)
102105
set(TOL 2e-4)
103106
else ()
104107
set(TOL 2e-6)
105108
endif ()
106109
add_test(validate_${input} python3 compare_mam4xx_mam4.py mam4xx_${input}.py mam_${input}.py True ${TOL})
110+
set_property(TEST validate_${input} PROPERTY SKIP_REGULAR_EXPRESSION "regex_fail_rel_tol")
107111
set_tests_properties(validate_${input} PROPERTIES DEPENDS run_${input})
112+
set_tests_properties(validate_${input} PROPERTIES LABELS ${TestLabel})
108113
endforeach()

src/validation/drydep/CMakeLists.txt

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ target_link_libraries(drydep_driver skywalker;validation;haero)
3131
COPYONLY
3232
)
3333

34+
set(TestLabel "drydep")
3435
# Run the driver in several configurations to produce datasets.
3536
function(add_drydep_test input_name)
3637
string(REPLACE "_input_" "_output_" output_name ${input_name})
@@ -39,21 +40,24 @@ function(add_drydep_test input_name)
3940
configure_file(${DRYDEP_VALIDATION_DIR}/${output_name}.py ${CMAKE_CURRENT_BINARY_DIR}/${output_name}.py COPYONLY)
4041
# add a test to run the skywalker driver
4142
add_test(run_${test_name} drydep_driver ${DRYDEP_VALIDATION_DIR}/${input_name}.yaml)
43+
set_tests_properties(run_${test_name} PROPERTIES LABELS "${TestLabel}")
4244
# add a test to validate mam4xx's results against the baseline.
4345
add_test(validate_${test_name} python3 compare_drydep.py mam4xx_${input_name}.py ${output_name}.py)
46+
set_property(TEST validate_${test_name} PROPERTY SKIP_REGULAR_EXPRESSION "regex_fail_rel_tol")
4447
set_tests_properties(validate_${test_name} PROPERTIES DEPENDS run_${test_name})
48+
set_tests_properties(validate_${test_name} PROPERTIES LABELS ${TestLabel})
4549
endfunction()
4650

4751
foreach (input
48-
gravit_settling_velocity
49-
air_dynamic_viscosity
50-
air_kinematic_viscosity
51-
radius_for_moment
52-
schmidt_number
53-
slip_correction_factor
54-
)
52+
gravit_settling_velocity
53+
air_dynamic_viscosity
54+
air_kinematic_viscosity
55+
radius_for_moment
56+
schmidt_number
57+
slip_correction_factor
58+
)
5559
add_drydep_test(${input})
56-
endforeach()
60+
endforeach()
5761

5862

5963
foreach (test_name
@@ -62,8 +66,8 @@ foreach (test_name
6266
depvel_part
6367
)
6468
foreach (ts
65-
#1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392
66-
1393 #1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404
69+
#1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392
70+
1393 #1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404
6771
#1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416
6872
)
6973
foreach (jvlc 3 4)
@@ -72,36 +76,34 @@ foreach (test_name
7276
set(imode No_mode)
7377
set(input modal_aero_${test_name}_input_ts_${ts}_jvlc_${jvlc}_imnt_${imnt}_imode_${imode})
7478
add_drydep_test(${input})
75-
endforeach()
79+
endforeach()
7680

7781
foreach (jvlc 1 2)
7882
math(EXPR imnt "3 * ( ${jvlc} - 1)")
7983
foreach (imode 1 2 3 4)
8084
set(input modal_aero_${test_name}_input_ts_${ts}_jvlc_${jvlc}_imnt_${imnt}_imode_${imode})
8185
add_drydep_test(${input})
82-
endforeach()
83-
endforeach()
84-
endforeach()
85-
endforeach()
86+
endforeach()
87+
endforeach()
88+
endforeach()
89+
endforeach()
8690

8791
foreach (ts 1400 1401 1402 1403)# 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416)
8892
set(input calcram_input_ts_${ts})
8993
add_drydep_test(${input})
90-
endforeach()
94+
endforeach()
9195

9296
foreach (ts
93-
1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392
94-
# 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404
97+
1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392
98+
# 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404
9599
# 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416
96100
)
97101
set(test_name drydep)
98102
set(input aero_model_${test_name}_input_ts_${ts})
99103
add_drydep_test(${input})
100-
endforeach()
104+
endforeach()
101105

102106
set(test_name drydep)
103107
set(ts compute_tendencies)
104108
set(input aero_model_${test_name}_input_${ts})
105109
add_drydep_test(${input})
106-
107-

0 commit comments

Comments
 (0)