rainfallqc 0.2.3__tar.gz → 0.2.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {rainfallqc-0.2.3 → rainfallqc-0.2.4}/PKG-INFO +1 -1
- {rainfallqc-0.2.3 → rainfallqc-0.2.4}/pyproject.toml +1 -1
- {rainfallqc-0.2.3 → rainfallqc-0.2.4}/src/rainfallqc/__init__.py +1 -1
- {rainfallqc-0.2.3 → rainfallqc-0.2.4}/src/rainfallqc/utils/spatial_utils.py +11 -8
- {rainfallqc-0.2.3 → rainfallqc-0.2.4}/LICENSE +0 -0
- {rainfallqc-0.2.3 → rainfallqc-0.2.4}/README.rst +0 -0
- {rainfallqc-0.2.3 → rainfallqc-0.2.4}/src/rainfallqc/checks/__init__.py +0 -0
- {rainfallqc-0.2.3 → rainfallqc-0.2.4}/src/rainfallqc/checks/comparison_checks.py +0 -0
- {rainfallqc-0.2.3 → rainfallqc-0.2.4}/src/rainfallqc/checks/gauge_checks.py +0 -0
- {rainfallqc-0.2.3 → rainfallqc-0.2.4}/src/rainfallqc/checks/neighbourhood_checks.py +0 -0
- {rainfallqc-0.2.3 → rainfallqc-0.2.4}/src/rainfallqc/checks/pypwsqc_filters.py +0 -0
- {rainfallqc-0.2.3 → rainfallqc-0.2.4}/src/rainfallqc/checks/timeseries_checks.py +0 -0
- {rainfallqc-0.2.3 → rainfallqc-0.2.4}/src/rainfallqc/core/__init__.py +0 -0
- {rainfallqc-0.2.3 → rainfallqc-0.2.4}/src/rainfallqc/core/all_qc_checks.py +0 -0
- {rainfallqc-0.2.3 → rainfallqc-0.2.4}/src/rainfallqc/data/ETCCDI/RawData_HADEX2_CDD_1951-2010_ANN_from-90to90_from-180to180.nc +0 -0
- {rainfallqc-0.2.3 → rainfallqc-0.2.4}/src/rainfallqc/data/ETCCDI/RawData_HADEX2_CWD_1951-2010_ANN_from-90to90_from-180to180.nc +0 -0
- {rainfallqc-0.2.3 → rainfallqc-0.2.4}/src/rainfallqc/data/ETCCDI/RawData_HADEX2_PRCPTOT_1951-2010_ANN_from-90to90_from-180to180.nc +0 -0
- {rainfallqc-0.2.3 → rainfallqc-0.2.4}/src/rainfallqc/data/ETCCDI/RawData_HADEX2_R99p_1951-2010_ANN_from-90to90_from-180to180.nc +0 -0
- {rainfallqc-0.2.3 → rainfallqc-0.2.4}/src/rainfallqc/data/ETCCDI/RawData_HADEX2_Rx1day_1951-2010_ANN_from-90to90_from-180to180.nc +0 -0
- {rainfallqc-0.2.3 → rainfallqc-0.2.4}/src/rainfallqc/data/ETCCDI/RawData_HADEX2_SDII_1951-2010_ANN_from-90to90_from-180to180.nc +0 -0
- {rainfallqc-0.2.3 → rainfallqc-0.2.4}/src/rainfallqc/data/ETCCDI/__init__.py +0 -0
- {rainfallqc-0.2.3 → rainfallqc-0.2.4}/src/rainfallqc/data/__init__.py +0 -0
- {rainfallqc-0.2.3 → rainfallqc-0.2.4}/src/rainfallqc/qc_frameworks/__init__.py +0 -0
- {rainfallqc-0.2.3 → rainfallqc-0.2.4}/src/rainfallqc/qc_frameworks/apply_qc_framework.py +0 -0
- {rainfallqc-0.2.3 → rainfallqc-0.2.4}/src/rainfallqc/qc_frameworks/inbuilt_qc_frameworks.py +0 -0
- {rainfallqc-0.2.3 → rainfallqc-0.2.4}/src/rainfallqc/utils/__init__.py +0 -0
- {rainfallqc-0.2.3 → rainfallqc-0.2.4}/src/rainfallqc/utils/data_readers.py +0 -0
- {rainfallqc-0.2.3 → rainfallqc-0.2.4}/src/rainfallqc/utils/data_utils.py +0 -0
- {rainfallqc-0.2.3 → rainfallqc-0.2.4}/src/rainfallqc/utils/neighbourhood_utils.py +0 -0
- {rainfallqc-0.2.3 → rainfallqc-0.2.4}/src/rainfallqc/utils/stats.py +0 -0
|
@@ -68,7 +68,7 @@ homepage = "https://github.com/thomasjkeel/RainfallQC"
|
|
|
68
68
|
target-version = ["py310", "py311", "py312", "py313"]
|
|
69
69
|
|
|
70
70
|
[tool.bumpversion]
|
|
71
|
-
current_version = "0.2.
|
|
71
|
+
current_version = "0.2.4"
|
|
72
72
|
commit = true
|
|
73
73
|
message = "Bump version: {current_version} → {new_version}"
|
|
74
74
|
commit_args = ""
|
|
@@ -42,19 +42,19 @@ def compute_spatial_mean_xr(data: xr.Dataset, var_name: str) -> xr.Dataset:
|
|
|
42
42
|
return data
|
|
43
43
|
|
|
44
44
|
|
|
45
|
-
def haversine(lon1:
|
|
45
|
+
def haversine(lon1: xr.DataArray, lat1: xr.DataArray, lon2: np.ndarray | float, lat2: np.ndarray | float) -> float:
|
|
46
46
|
"""
|
|
47
47
|
Great circle distance (km) between two points on Earth.
|
|
48
48
|
|
|
49
49
|
Parameters
|
|
50
50
|
----------
|
|
51
|
-
lon1 :
|
|
51
|
+
lon1 : xr.DataArray
|
|
52
52
|
Longitude of point 1
|
|
53
|
-
lat1 :
|
|
53
|
+
lat1 : xr.DataArray
|
|
54
54
|
Latitude of point 1
|
|
55
|
-
lon2 : float
|
|
55
|
+
lon2 : np.ndarray | float
|
|
56
56
|
Longitude of point 2
|
|
57
|
-
lat2 : float
|
|
57
|
+
lat2 : np.ndarray | float
|
|
58
58
|
Latitude of point 2
|
|
59
59
|
|
|
60
60
|
Returns
|
|
@@ -63,10 +63,13 @@ def haversine(lon1: float, lat1: float, lon2: float, lat2: float) -> float:
|
|
|
63
63
|
Distance between the two points in km
|
|
64
64
|
|
|
65
65
|
"""
|
|
66
|
-
|
|
67
|
-
|
|
66
|
+
# convert lat2 and lon2 to numpy arrays for safety
|
|
67
|
+
lon2 = np.asarray(lon2, dtype=np.float64)
|
|
68
|
+
lat2 = np.asarray(lat2, dtype=np.float64)
|
|
69
|
+
|
|
70
|
+
lon1, lat1, lon2, lat2 = map(np.radians, [lon1, lat1, lon2, lat2])
|
|
68
71
|
dlon = lon2 - lon1
|
|
69
72
|
dlat = lat2 - lat1
|
|
70
73
|
a = np.sin(dlat / 2) ** 2 + np.cos(lat1) * np.cos(lat2) * np.sin(dlon / 2) ** 2
|
|
71
74
|
c = 2 * np.arcsin(np.sqrt(a))
|
|
72
|
-
return
|
|
75
|
+
return EARTH_RADIUS_KM * c
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|