From a98cb70ddeadfe437ec06716f5affd3fb88ce062 Mon Sep 17 00:00:00 2001 From: Michele Simionato Date: Thu, 19 Oct 2023 08:58:22 +0200 Subject: [PATCH 1/2] Fixed get_mean_stddevs_cy14 --- debian/changelog | 2 ++ openquake/hazardlib/gsim/can20/can_shm6_active_crust.py | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 6332db05ff7f..faf1fdb2e48f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,6 @@ [Michele Simionato] + * Fixed the function `get_mean_stddevs_cy14` to recover the same results + for the Canada SHM6 model as in engine 3.11 * Required at least Python 3.10.6 on mac and windows [Claudio Schill] diff --git a/openquake/hazardlib/gsim/can20/can_shm6_active_crust.py b/openquake/hazardlib/gsim/can20/can_shm6_active_crust.py index 153410534641..7cbe0fda1bf3 100644 --- a/openquake/hazardlib/gsim/can20/can_shm6_active_crust.py +++ b/openquake/hazardlib/gsim/can20/can_shm6_active_crust.py @@ -178,7 +178,6 @@ def get_mean_stddevs_cy14(name, C, ctx): # Get nonlinear amplification term f_nl, f_nl_scaling = CY14.get_nonlinear_site_term(C, ctx, y_ref) - f_nl = 0.0 # Add on the site amplification mean = ln_y_ref + (f_lin + f_nl + f_z1pt0) From 0f745492548678157f9899323885e3893bc82bf6 Mon Sep 17 00:00:00 2001 From: Michele Simionato Date: Thu, 19 Oct 2023 09:12:20 +0200 Subject: [PATCH 2/2] Fixed test --- ...CanadaSHM6_ActiveCrust_ChiouYoungs2014.org | 46 +++++++++---------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/openquake/qa_tests_data/classical/case_76/expected/CanadaSHM6_ActiveCrust_ChiouYoungs2014.org b/openquake/qa_tests_data/classical/case_76/expected/CanadaSHM6_ActiveCrust_ChiouYoungs2014.org index 7b2c7cf43a8f..d6e8270432f1 100644 --- a/openquake/qa_tests_data/classical/case_76/expected/CanadaSHM6_ActiveCrust_ChiouYoungs2014.org +++ b/openquake/qa_tests_data/classical/case_76/expected/CanadaSHM6_ActiveCrust_ChiouYoungs2014.org @@ -1,27 +1,27 @@ | PGV | PGA | SA(0.05) | SA(0.1) | SA(0.2) | SA(0.5) | SA(1.0) | SA(2.0) | SA(10.0) | |-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------| -| 0.07251 | 0.33896 | 0.36259 | 0.37860 | 0.38254 | 0.35847 | 0.24878 | 0.08798 | 1.454E-04 | -| 0.00224 | 0.31127 | 0.34448 | 0.36878 | 0.37533 | 0.33995 | 0.21171 | 0.06663 | 5.207E-05 | -| 1.129E-04 | 0.27649 | 0.31961 | 0.35373 | 0.36376 | 0.31536 | 0.17437 | 0.04917 | 1.413E-05 | -| 7.097E-06 | 0.23616 | 0.28793 | 0.33237 | 0.34656 | 0.28481 | 0.13886 | 0.03533 | 2.132E-06 | -| 1.708E-08 | 0.19295 | 0.25046 | 0.30421 | 0.32284 | 0.24923 | 0.10680 | 0.02449 | 0.0 | -| 0.0 | 0.15018 | 0.20928 | 0.26970 | 0.29237 | 0.21040 | 0.07923 | 0.01633 | 0.0 | -| 0.0 | 0.11100 | 0.16727 | 0.23036 | 0.25593 | 0.17066 | 0.05655 | 0.01034 | 0.0 | -| 0.0 | 0.07769 | 0.12743 | 0.18867 | 0.21535 | 0.13252 | 0.03868 | 0.00619 | 0.0 | -| 0.0 | 0.05132 | 0.09227 | 0.14759 | 0.17333 | 0.09819 | 0.02523 | 0.00346 | 0.0 | -| 0.0 | 0.03179 | 0.06331 | 0.10995 | 0.13291 | 0.06919 | 0.01566 | 0.00178 | 0.0 | -| 0.0 | 0.01828 | 0.04097 | 0.07780 | 0.09675 | 0.04617 | 0.00914 | 8.416E-04 | 0.0 | -| 0.0 | 0.00965 | 0.02482 | 0.05213 | 0.06667 | 0.02902 | 0.00497 | 3.550E-04 | 0.0 | -| 0.0 | 0.00463 | 0.01396 | 0.03290 | 0.04332 | 0.01704 | 0.00250 | 1.300E-04 | 0.0 | -| 0.0 | 0.00198 | 0.00720 | 0.01941 | 0.02640 | 0.00932 | 0.00114 | 3.911E-05 | 0.0 | -| 0.0 | 7.391E-04 | 0.00337 | 0.01060 | 0.01494 | 0.00468 | 4.669E-04 | 8.121E-06 | 0.0 | -| 0.0 | 2.306E-04 | 0.00140 | 0.00532 | 0.00779 | 0.00215 | 1.658E-04 | 5.652E-07 | 0.0 | -| 0.0 | 5.802E-05 | 5.087E-04 | 0.00242 | 0.00372 | 8.797E-04 | 4.879E-05 | 0.0 | 0.0 | -| 0.0 | 9.745E-06 | 1.548E-04 | 9.822E-04 | 0.00160 | 3.183E-04 | 1.035E-05 | 0.0 | 0.0 | -| 0.0 | 4.431E-07 | 3.717E-05 | 3.472E-04 | 6.204E-04 | 9.836E-05 | 8.870E-07 | 0.0 | 0.0 | -| 0.0 | 0.0 | 5.459E-06 | 1.020E-04 | 2.063E-04 | 2.401E-05 | 0.0 | 0.0 | 0.0 | -| 0.0 | 0.0 | 7.067E-08 | 2.310E-05 | 5.679E-05 | 3.444E-06 | 0.0 | 0.0 | 0.0 | -| 0.0 | 0.0 | 0.0 | 2.801E-06 | 1.133E-05 | 1.164E-08 | 0.0 | 0.0 | 0.0 | -| 0.0 | 0.0 | 0.0 | 0.0 | 8.933E-07 | 0.0 | 0.0 | 0.0 | 0.0 | +| 0.07238 | 0.33881 | 0.36245 | 0.37848 | 0.38247 | 0.35839 | 0.24872 | 0.08791 | 1.455E-04 | +| 0.00221 | 0.31106 | 0.34427 | 0.36859 | 0.37521 | 0.33984 | 0.21164 | 0.06656 | 5.209E-05 | +| 1.100E-04 | 0.27622 | 0.31931 | 0.35343 | 0.36356 | 0.31520 | 0.17429 | 0.04909 | 1.419E-05 | +| 6.676E-06 | 0.23583 | 0.28754 | 0.33193 | 0.34627 | 0.28460 | 0.13877 | 0.03526 | 2.146E-06 | +| 0.0 | 0.19257 | 0.24997 | 0.30361 | 0.32243 | 0.24898 | 0.10671 | 0.02443 | 0.0 | +| 0.0 | 0.14977 | 0.20872 | 0.26895 | 0.29183 | 0.21011 | 0.07914 | 0.01627 | 0.0 | +| 0.0 | 0.11059 | 0.16665 | 0.22946 | 0.25526 | 0.17034 | 0.05647 | 0.01029 | 0.0 | +| 0.0 | 0.07731 | 0.12679 | 0.18766 | 0.21458 | 0.13219 | 0.03860 | 0.00615 | 0.0 | +| 0.0 | 0.05097 | 0.09164 | 0.14653 | 0.17249 | 0.09787 | 0.02516 | 0.00343 | 0.0 | +| 0.0 | 0.03149 | 0.06273 | 0.10888 | 0.13203 | 0.06888 | 0.01561 | 0.00177 | 0.0 | +| 0.0 | 0.01805 | 0.04047 | 0.07679 | 0.09591 | 0.04590 | 0.00910 | 8.324E-04 | 0.0 | +| 0.0 | 0.00949 | 0.02441 | 0.05121 | 0.06589 | 0.02880 | 0.00494 | 3.502E-04 | 0.0 | +| 0.0 | 0.00453 | 0.01364 | 0.03213 | 0.04265 | 0.01687 | 0.00248 | 1.278E-04 | 0.0 | +| 0.0 | 0.00192 | 0.00698 | 0.01879 | 0.02586 | 0.00920 | 0.00113 | 3.827E-05 | 0.0 | +| 0.0 | 7.104E-04 | 0.00324 | 0.01016 | 0.01454 | 0.00461 | 4.618E-04 | 7.868E-06 | 0.0 | +| 0.0 | 2.190E-04 | 0.00133 | 0.00503 | 0.00751 | 0.00210 | 1.634E-04 | 4.768E-07 | 0.0 | +| 0.0 | 5.424E-05 | 4.758E-04 | 0.00225 | 0.00354 | 8.554E-04 | 4.786E-05 | 0.0 | 0.0 | +| 0.0 | 8.762E-06 | 1.421E-04 | 8.928E-04 | 0.00151 | 3.073E-04 | 1.007E-05 | 0.0 | 0.0 | +| 0.0 | 3.576E-07 | 3.302E-05 | 3.073E-04 | 5.727E-04 | 9.388E-05 | 8.345E-07 | 0.0 | 0.0 | +| 0.0 | 0.0 | 4.470E-06 | 8.655E-05 | 1.857E-04 | 2.259E-05 | 0.0 | 0.0 | 0.0 | +| 0.0 | 0.0 | 0.0 | 1.854E-05 | 4.959E-05 | 3.099E-06 | 0.0 | 0.0 | 0.0 | +| 0.0 | 0.0 | 0.0 | 1.848E-06 | 9.179E-06 | 0.0 | 0.0 | 0.0 | 0.0 | +| 0.0 | 0.0 | 0.0 | 0.0 | 5.364E-07 | 0.0 | 0.0 | 0.0 | 0.0 | | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | \ No newline at end of file