|
17 | 17 | neuman2004 |
18 | 18 | neuman2004_steady |
19 | 19 | """ |
20 | | -# pylint: disable=C0103 |
| 20 | +# pylint: disable=C0103,C0302 |
21 | 21 | import functools as ft |
22 | 22 |
|
23 | 23 | import numpy as np |
@@ -239,27 +239,27 @@ def ext_thiem_3d( |
239 | 239 | """ |
240 | 240 | rad = np.array(rad, dtype=float) |
241 | 241 | # check the input |
242 | | - if not r_ref > 0.0: |
| 242 | + if r_ref <= 0.0: |
243 | 243 | raise ValueError("The reference radius needs to be positive.") |
244 | | - if not np.min(rad) > 0.0: |
| 244 | + if np.min(rad) <= 0.0: |
245 | 245 | raise ValueError("The given radii need to be positive.") |
246 | 246 | if K_well != "KA" and K_well != "KH" and not isinstance(K_well, float): |
247 | 247 | raise ValueError( |
248 | 248 | "The well-conductivity should be given as float or 'KA' resp 'KH'" |
249 | 249 | ) |
250 | 250 | if isinstance(K_well, float) and K_well <= 0.0: |
251 | 251 | raise ValueError("The well-conductivity needs to be positive.") |
252 | | - if not cond_gmean > 0.0: |
| 252 | + if cond_gmean <= 0.0: |
253 | 253 | raise ValueError("The gmean conductivity needs to be positive.") |
254 | 254 | if var < 0.0: |
255 | 255 | raise ValueError("The variance needs to be positive.") |
256 | | - if not len_scale > 0.0: |
| 256 | + if len_scale <= 0.0: |
257 | 257 | raise ValueError("The correlationlength needs to be positive.") |
258 | | - if not lat_ext > 0.0: |
| 258 | + if lat_ext <= 0.0: |
259 | 259 | raise ValueError("The aquifer-thickness needs to be positive.") |
260 | 260 | if not 0.0 < anis <= 1.0: |
261 | 261 | raise ValueError("The anisotropy-ratio must be > 0 and <= 1") |
262 | | - if not prop > 0.0: |
| 262 | + if prop <= 0.0: |
263 | 263 | raise ValueError("The proportionalityfactor needs to be positive.") |
264 | 264 |
|
265 | 265 | # define some substitions to shorten the result |
@@ -390,19 +390,19 @@ def ext_theis_2d( |
390 | 390 | # check the input |
391 | 391 | if r_well < 0.0: |
392 | 392 | raise ValueError("The wellradius needs to be >= 0") |
393 | | - if not r_bound > r_well: |
| 393 | + if r_bound <= r_well: |
394 | 394 | raise ValueError("The upper boundary needs to be > well radius") |
395 | | - if not storage > 0.0: |
| 395 | + if storage <= 0.0: |
396 | 396 | raise ValueError("The Storage needs to be positive.") |
397 | | - if not trans_gmean > 0.0: |
| 397 | + if trans_gmean <= 0.0: |
398 | 398 | raise ValueError("The Transmissivity needs to be positive.") |
399 | 399 | if var < 0.0: |
400 | 400 | raise ValueError("The variance needs to be positive.") |
401 | | - if not len_scale > 0.0: |
| 401 | + if len_scale <= 0.0: |
402 | 402 | raise ValueError("The correlationlength needs to be positive.") |
403 | | - if T_well is not None and not T_well > 0.0: |
| 403 | + if T_well is not None and T_well <= 0.0: |
404 | 404 | raise ValueError("The well Transmissivity needs to be positive.") |
405 | | - if not prop > 0.0: |
| 405 | + if prop <= 0.0: |
406 | 406 | raise ValueError("The proportionality factor needs to be positive.") |
407 | 407 | if parts <= 1: |
408 | 408 | raise ValueError("The numbor of partitions needs to be at least 2") |
@@ -546,25 +546,25 @@ def ext_theis_3d( |
546 | 546 | # check the input |
547 | 547 | if r_well < 0.0: |
548 | 548 | raise ValueError("The wellradius needs to be >= 0") |
549 | | - if not r_bound > r_well: |
| 549 | + if r_bound <= r_well: |
550 | 550 | raise ValueError("The upper boundary needs to be > well radius") |
551 | | - if not storage > 0.0: |
| 551 | + if storage <= 0.0: |
552 | 552 | raise ValueError("The storage needs to be positive.") |
553 | | - if not cond_gmean > 0.0: |
| 553 | + if cond_gmean <= 0.0: |
554 | 554 | raise ValueError("The gmean conductivity needs to be positive.") |
555 | 555 | if var < 0.0: |
556 | 556 | raise ValueError("The variance needs to be positive.") |
557 | | - if not len_scale > 0.0: |
| 557 | + if len_scale <= 0.0: |
558 | 558 | raise ValueError("The correlationlength needs to be positive.") |
559 | 559 | if K_well != "KA" and K_well != "KH" and not isinstance(K_well, float): |
560 | 560 | raise ValueError( |
561 | 561 | "The well-conductivity should be given as float or 'KA' resp 'KH'" |
562 | 562 | ) |
563 | | - if isinstance(K_well, float) and not K_well > 0.0: |
| 563 | + if isinstance(K_well, float) and K_well <= 0.0: |
564 | 564 | raise ValueError("The well-conductivity needs to be positive.") |
565 | | - if not cond_gmean > 0.0: |
| 565 | + if cond_gmean <= 0.0: |
566 | 566 | raise ValueError("The conductivity needs to be positive.") |
567 | | - if not prop > 0.0: |
| 567 | + if prop <= 0.0: |
568 | 568 | raise ValueError("The proportionality factor needs to be positive.") |
569 | 569 | if parts <= 1: |
570 | 570 | raise ValueError("The numbor of partitions needs to be at least 2") |
@@ -728,27 +728,27 @@ def ext_theis_tpl( |
728 | 728 | # check the input |
729 | 729 | if r_well < 0.0: |
730 | 730 | raise ValueError("The wellradius needs to be >= 0") |
731 | | - if not r_bound > r_well: |
| 731 | + if r_bound <= r_well: |
732 | 732 | raise ValueError("The upper boundary needs to be > well radius") |
733 | | - if not storage > 0.0: |
| 733 | + if storage <= 0.0: |
734 | 734 | raise ValueError("The storage needs to be positive.") |
735 | | - if not cond_gmean > 0.0: |
| 735 | + if cond_gmean <= 0.0: |
736 | 736 | raise ValueError("The gmean conductivity needs to be positive.") |
737 | | - if not len_scale > 0.0: |
| 737 | + if len_scale <= 0.0: |
738 | 738 | raise ValueError("The correlationlength needs to be positive.") |
739 | 739 | if not 0 < hurst < 1: |
740 | 740 | raise ValueError("Hurst coefficient needs to be in (0,1)") |
741 | 741 | if var is not None and var < 0.0: |
742 | 742 | raise ValueError("The variance needs to be positive.") |
743 | | - if var is None and not c > 0.0: |
| 743 | + if var is None and c <= 0.0: |
744 | 744 | raise ValueError("The intensity of variation needs to be positive.") |
745 | 745 | if K_well != "KA" and K_well != "KH" and not isinstance(K_well, float): |
746 | 746 | raise ValueError( |
747 | 747 | "The well-conductivity should be given as float or 'KA' resp 'KH'" |
748 | 748 | ) |
749 | | - if isinstance(K_well, float) and not K_well > 0.0: |
| 749 | + if isinstance(K_well, float) and K_well <= 0.0: |
750 | 750 | raise ValueError("The well-conductivity needs to be positive.") |
751 | | - if not prop > 0.0: |
| 751 | + if prop <= 0.0: |
752 | 752 | raise ValueError("The proportionality factor needs to be positive.") |
753 | 753 | if parts <= 1: |
754 | 754 | raise ValueError("The numbor of partitions needs to be at least 2") |
@@ -907,27 +907,27 @@ def ext_theis_tpl_3d( |
907 | 907 | # check the input |
908 | 908 | if r_well < 0.0: |
909 | 909 | raise ValueError("The wellradius needs to be >= 0") |
910 | | - if not r_bound > r_well: |
| 910 | + if r_bound <= r_well: |
911 | 911 | raise ValueError("The upper boundary needs to be > well radius") |
912 | | - if not storage > 0.0: |
| 912 | + if storage <= 0.0: |
913 | 913 | raise ValueError("The storage needs to be positive.") |
914 | | - if not cond_gmean > 0.0: |
| 914 | + if cond_gmean <= 0.0: |
915 | 915 | raise ValueError("The gmean conductivity needs to be positive.") |
916 | | - if not len_scale > 0.0: |
| 916 | + if len_scale <= 0.0: |
917 | 917 | raise ValueError("The correlationlength needs to be positive.") |
918 | 918 | if not 0 < hurst < 1: |
919 | 919 | raise ValueError("Hurst coefficient needs to be in (0,1)") |
920 | 920 | if var is not None and var < 0.0: |
921 | 921 | raise ValueError("The variance needs to be positive.") |
922 | | - if var is None and not c > 0.0: |
| 922 | + if var is None and c <= 0.0: |
923 | 923 | raise ValueError("The intensity of variation needs to be positive.") |
924 | 924 | if K_well != "KA" and K_well != "KH" and not isinstance(K_well, float): |
925 | 925 | raise ValueError( |
926 | 926 | "The well-conductivity should be given as float or 'KA' resp 'KH'" |
927 | 927 | ) |
928 | | - if isinstance(K_well, float) and not K_well > 0.0: |
| 928 | + if isinstance(K_well, float) and K_well <= 0.0: |
929 | 929 | raise ValueError("The well-conductivity needs to be positive.") |
930 | | - if not prop > 0.0: |
| 930 | + if prop <= 0.0: |
931 | 931 | raise ValueError("The proportionality factor needs to be positive.") |
932 | 932 | if parts <= 1: |
933 | 933 | raise ValueError("The numbor of partitions needs to be at least 2") |
@@ -1059,23 +1059,23 @@ def ext_thiem_tpl( |
1059 | 1059 | ``r = sqrt(x**2 + y**2)`` |
1060 | 1060 | """ |
1061 | 1061 | # check the input |
1062 | | - if not cond_gmean > 0.0: |
| 1062 | + if cond_gmean <= 0.0: |
1063 | 1063 | raise ValueError("The gmean conductivity needs to be positive.") |
1064 | | - if not len_scale > 0.0: |
| 1064 | + if len_scale <= 0.0: |
1065 | 1065 | raise ValueError("The correlationlength needs to be positive.") |
1066 | 1066 | if not 0 < hurst < 1: |
1067 | 1067 | raise ValueError("Hurst coefficient needs to be in (0,1)") |
1068 | 1068 | if var is not None and var < 0.0: |
1069 | 1069 | raise ValueError("The variance needs to be positive.") |
1070 | | - if var is None and not c > 0.0: |
| 1070 | + if var is None and c <= 0.0: |
1071 | 1071 | raise ValueError("The intensity of variation needs to be positive.") |
1072 | 1072 | if K_well != "KA" and K_well != "KH" and not isinstance(K_well, float): |
1073 | 1073 | raise ValueError( |
1074 | 1074 | "The well-conductivity should be given as float or 'KA' resp 'KH'" |
1075 | 1075 | ) |
1076 | | - if isinstance(K_well, float) and not K_well > 0.0: |
| 1076 | + if isinstance(K_well, float) and K_well <= 0.0: |
1077 | 1077 | raise ValueError("The well-conductivity needs to be positive.") |
1078 | | - if not prop > 0.0: |
| 1078 | + if prop <= 0.0: |
1079 | 1079 | raise ValueError("The proportionality factor needs to be positive.") |
1080 | 1080 | cond = ft.partial( |
1081 | 1081 | TPL_CG, |
@@ -1199,23 +1199,23 @@ def ext_thiem_tpl_3d( |
1199 | 1199 | ``r = sqrt(x**2 + y**2)`` |
1200 | 1200 | """ |
1201 | 1201 | # check the input |
1202 | | - if not cond_gmean > 0.0: |
| 1202 | + if cond_gmean <= 0.0: |
1203 | 1203 | raise ValueError("The gmean conductivity needs to be positive.") |
1204 | | - if not len_scale > 0.0: |
| 1204 | + if len_scale <= 0.0: |
1205 | 1205 | raise ValueError("The correlationlength needs to be positive.") |
1206 | 1206 | if not 0 < hurst < 1: |
1207 | 1207 | raise ValueError("Hurst coefficient needs to be in (0,1)") |
1208 | 1208 | if var is not None and var < 0.0: |
1209 | 1209 | raise ValueError("The variance needs to be positive.") |
1210 | | - if var is None and not c > 0.0: |
| 1210 | + if var is None and c <= 0.0: |
1211 | 1211 | raise ValueError("The intensity of variation needs to be positive.") |
1212 | 1212 | if K_well != "KA" and K_well != "KH" and not isinstance(K_well, float): |
1213 | 1213 | raise ValueError( |
1214 | 1214 | "The well-conductivity should be given as float or 'KA' resp 'KH'" |
1215 | 1215 | ) |
1216 | | - if isinstance(K_well, float) and not K_well > 0.0: |
| 1216 | + if isinstance(K_well, float) and K_well <= 0.0: |
1217 | 1217 | raise ValueError("The well-conductivity needs to be positive.") |
1218 | | - if not prop > 0.0: |
| 1218 | + if prop <= 0.0: |
1219 | 1219 | raise ValueError("The proportionality factor needs to be positive.") |
1220 | 1220 | cond = ft.partial( |
1221 | 1221 | TPL_CG, |
@@ -1320,15 +1320,15 @@ def neuman2004( |
1320 | 1320 | # check the input |
1321 | 1321 | if r_well < 0.0: |
1322 | 1322 | raise ValueError("The wellradius needs to be >= 0") |
1323 | | - if not r_bound > r_well: |
| 1323 | + if r_bound <= r_well: |
1324 | 1324 | raise ValueError("The upper boundary needs to be > well radius") |
1325 | | - if not storage > 0.0: |
| 1325 | + if storage <= 0.0: |
1326 | 1326 | raise ValueError("The Storage needs to be positive.") |
1327 | | - if not trans_gmean > 0.0: |
| 1327 | + if trans_gmean <= 0.0: |
1328 | 1328 | raise ValueError("The Transmissivity needs to be positive.") |
1329 | 1329 | if var < 0.0: |
1330 | 1330 | raise ValueError("The variance needs to be positive.") |
1331 | | - if not len_scale > 0.0: |
| 1331 | + if len_scale <= 0.0: |
1332 | 1332 | raise ValueError("The correlationlength needs to be positive.") |
1333 | 1333 | if parts <= 1: |
1334 | 1334 | raise ValueError("The numbor of partitions needs to be at least 2") |
@@ -1404,11 +1404,11 @@ def neuman2004_steady( |
1404 | 1404 | Water resources research 40.4, 2004 |
1405 | 1405 | """ |
1406 | 1406 | # check the input |
1407 | | - if not trans_gmean > 0.0: |
| 1407 | + if trans_gmean <= 0.0: |
1408 | 1408 | raise ValueError("The Transmissivity needs to be positive.") |
1409 | 1409 | if var < 0.0: |
1410 | 1410 | raise ValueError("The variance needs to be positive.") |
1411 | | - if not len_scale > 0.0: |
| 1411 | + if len_scale <= 0.0: |
1412 | 1412 | raise ValueError("The correlationlength needs to be positive.") |
1413 | 1413 |
|
1414 | 1414 | return ext_grf_steady( |
|
0 commit comments