rsplot 0.3.2.dev4__py3-none-any.whl → 0.3.2.dev37__py3-none-any.whl
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.
- rsplot/atomic.py +36 -0
- rsplot/cli.py +272 -497
- rsplot/commands/common.py +52 -3
- rsplot/commands/fnr.py +389 -104
- rsplot/commands/forecast.py +0 -2
- rsplot/commands/meteo.py +499 -186
- rsplot/commands/overlay.py +284 -326
- rsplot/commands/radius.py +526 -0
- rsplot/commands/raster.py +418 -293
- rsplot/commands/reconstruct.py +0 -1
- rsplot/commands/sidecar.py +106 -0
- rsplot/commands/station.py +154 -42
- rsplot/commands/station_trend.py +259 -174
- rsplot/config.py +43 -16
- rsplot/data_files.py +253 -0
- rsplot/errors.py +43 -0
- rsplot/fnr.py +38 -46
- rsplot/geo/boundaries.py +212 -9
- rsplot/geo/footprints.py +3 -0
- rsplot/geo/processing.py +2 -5
- rsplot/geo/radius.py +205 -0
- rsplot/plotting/colormap_22.txt +256 -0
- rsplot/plotting/colormaps.py +24 -29
- rsplot/plotting/map_frame.py +84 -6
- rsplot/plotting/meteo.py +10 -3
- rsplot/plotting/overlay.py +31 -40
- rsplot/plotting/raster.py +10 -3
- rsplot/plotting/station.py +86 -33
- rsplot/plotting/station_focus.py +84 -0
- rsplot/plotting/station_trend.py +60 -47
- rsplot/plotting/styles.py +3 -5
- rsplot/readers/__init__.py +52 -4
- rsplot/readers/_tropomi.py +121 -3
- rsplot/readers/era5.py +110 -10
- rsplot/readers/era5_wind.py +3 -2
- rsplot/readers/gems.py +11 -8
- rsplot/readers/guokong.py +125 -39
- rsplot/readers/netcdf.py +32 -0
- rsplot/readers/tropomi_hcho.py +1 -1
- rsplot/readers/tropomi_no2.py +1 -1
- rsplot/readers/tropomi_nrti.py +116 -0
- rsplot/readers/tropomi_o3.py +1 -1
- rsplot/readers/tropomi_o3pr.py +1 -1
- rsplot/result_builders/__init__.py +0 -14
- rsplot/result_builders/common.py +4 -1
- rsplot/result_builders/envelope.py +236 -0
- rsplot/result_builders/fnr.py +47 -131
- rsplot/result_builders/provenance.py +59 -0
- rsplot/result_builders/satellite.py +240 -0
- rsplot/result_builders/series_layer.py +289 -0
- rsplot/result_builders/station.py +23 -0
- rsplot/result_builders/station_layer.py +326 -0
- rsplot/results.py +0 -12
- rsplot/schemas/result.schema.json +566 -0
- rsplot/temporal.py +7 -0
- {rsplot-0.3.2.dev4.dist-info → rsplot-0.3.2.dev37.dist-info}/METADATA +426 -121
- rsplot-0.3.2.dev37.dist-info/RECORD +76 -0
- {rsplot-0.3.2.dev4.dist-info → rsplot-0.3.2.dev37.dist-info}/WHEEL +1 -1
- rsplot/commands/recent.py +0 -186
- rsplot/recent.py +0 -447
- rsplot/result_builders/meteo.py +0 -171
- rsplot/result_builders/overlay.py +0 -105
- rsplot/result_builders/raster.py +0 -104
- rsplot/result_builders/station_trend.py +0 -229
- rsplot-0.3.2.dev4.dist-info/RECORD +0 -66
- {rsplot-0.3.2.dev4.dist-info → rsplot-0.3.2.dev37.dist-info}/entry_points.txt +0 -0
- {rsplot-0.3.2.dev4.dist-info → rsplot-0.3.2.dev37.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
"""Combined raster/station JSON-sidecar construction."""
|
|
2
|
-
|
|
3
|
-
from __future__ import annotations
|
|
4
|
-
|
|
5
|
-
from typing import TYPE_CHECKING, Any
|
|
6
|
-
|
|
7
|
-
import numpy as np
|
|
8
|
-
|
|
9
|
-
from rsplot.result_builders.common import (
|
|
10
|
-
member_basic_stats,
|
|
11
|
-
serialize_member,
|
|
12
|
-
serialize_region,
|
|
13
|
-
)
|
|
14
|
-
from rsplot.result_builders.raster import build_raster_result
|
|
15
|
-
from rsplot.result_builders.station import build_station_result
|
|
16
|
-
|
|
17
|
-
if TYPE_CHECKING:
|
|
18
|
-
import geopandas as gpd
|
|
19
|
-
|
|
20
|
-
from rsplot.geo.boundaries import RegionInfo
|
|
21
|
-
from rsplot.readers import ProductInfo
|
|
22
|
-
from rsplot.readers.guokong import StationData
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
def build_overlay_result(
|
|
26
|
-
*,
|
|
27
|
-
region: RegionInfo,
|
|
28
|
-
product: str,
|
|
29
|
-
date: str,
|
|
30
|
-
prod_info: ProductInfo,
|
|
31
|
-
LON: np.ndarray,
|
|
32
|
-
LAT: np.ndarray,
|
|
33
|
-
grid: np.ndarray,
|
|
34
|
-
swath_meta: dict[str, Any],
|
|
35
|
-
raster_vmin: float,
|
|
36
|
-
raster_vmax: float,
|
|
37
|
-
data: StationData,
|
|
38
|
-
datetime_str: str,
|
|
39
|
-
threshold: float | None,
|
|
40
|
-
unit: str,
|
|
41
|
-
cities_gdf: gpd.GeoDataFrame | None,
|
|
42
|
-
output: str,
|
|
43
|
-
display_grid: np.ndarray | None = None,
|
|
44
|
-
display_lon: np.ndarray | None = None,
|
|
45
|
-
display_lat: np.ndarray | None = None,
|
|
46
|
-
time_matching: dict[str, Any] | None = None,
|
|
47
|
-
) -> dict[str, Any]:
|
|
48
|
-
"""Combine raster and station result blocks without shared duplication."""
|
|
49
|
-
raster_block = build_raster_result(
|
|
50
|
-
region=region,
|
|
51
|
-
product=product,
|
|
52
|
-
date=date,
|
|
53
|
-
prod_info=prod_info,
|
|
54
|
-
LON=LON,
|
|
55
|
-
LAT=LAT,
|
|
56
|
-
grid=grid,
|
|
57
|
-
swath_meta=swath_meta,
|
|
58
|
-
display_grid=display_grid,
|
|
59
|
-
display_lon=display_lon,
|
|
60
|
-
display_lat=display_lat,
|
|
61
|
-
vmin=raster_vmin,
|
|
62
|
-
vmax=raster_vmax,
|
|
63
|
-
output=output,
|
|
64
|
-
)
|
|
65
|
-
station_block = build_station_result(
|
|
66
|
-
region=region,
|
|
67
|
-
data=data,
|
|
68
|
-
datetime_str=datetime_str,
|
|
69
|
-
threshold=threshold,
|
|
70
|
-
unit=unit,
|
|
71
|
-
cities_gdf=cities_gdf,
|
|
72
|
-
output=output,
|
|
73
|
-
)
|
|
74
|
-
if region.members:
|
|
75
|
-
from rsplot.readers.guokong import mask_stations_to_region
|
|
76
|
-
|
|
77
|
-
station_block["member_stats"] = []
|
|
78
|
-
for member in region.members:
|
|
79
|
-
selected = mask_stations_to_region(data, member.geometry)
|
|
80
|
-
station_block["member_stats"].append(
|
|
81
|
-
{
|
|
82
|
-
"region": serialize_member(member),
|
|
83
|
-
"n_stations": int(selected.n_stations),
|
|
84
|
-
"n_valid": int(selected.n_valid),
|
|
85
|
-
"stats": member_basic_stats(selected.values),
|
|
86
|
-
}
|
|
87
|
-
)
|
|
88
|
-
for key in ("command", "image", "region"):
|
|
89
|
-
raster_block.pop(key, None)
|
|
90
|
-
station_block.pop(key, None)
|
|
91
|
-
|
|
92
|
-
result = {
|
|
93
|
-
"command": "overlay",
|
|
94
|
-
"image": output,
|
|
95
|
-
"region": serialize_region(region),
|
|
96
|
-
"datetime": datetime_str,
|
|
97
|
-
"date": date,
|
|
98
|
-
"raster": raster_block,
|
|
99
|
-
"station": station_block,
|
|
100
|
-
}
|
|
101
|
-
if prod_info.sensor == "gems":
|
|
102
|
-
result["sensor"] = "gems"
|
|
103
|
-
if time_matching is not None:
|
|
104
|
-
result["time_matching"] = time_matching
|
|
105
|
-
return result
|
rsplot/result_builders/raster.py
DELETED
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
"""Raster JSON-sidecar construction."""
|
|
2
|
-
|
|
3
|
-
from __future__ import annotations
|
|
4
|
-
|
|
5
|
-
from typing import TYPE_CHECKING, Any
|
|
6
|
-
|
|
7
|
-
import numpy as np
|
|
8
|
-
|
|
9
|
-
from rsplot.result_builders.common import (
|
|
10
|
-
grid_boundary_policy,
|
|
11
|
-
grid_member_stats,
|
|
12
|
-
grid_per_admin_stats,
|
|
13
|
-
grid_stats,
|
|
14
|
-
serialize_region,
|
|
15
|
-
top_hotspots,
|
|
16
|
-
)
|
|
17
|
-
from rsplot.stats import round_finite
|
|
18
|
-
|
|
19
|
-
if TYPE_CHECKING:
|
|
20
|
-
from rsplot.geo.boundaries import RegionInfo
|
|
21
|
-
from rsplot.readers import ProductInfo
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
def build_raster_result(
|
|
25
|
-
*,
|
|
26
|
-
region: RegionInfo,
|
|
27
|
-
product: str,
|
|
28
|
-
date: str,
|
|
29
|
-
prod_info: ProductInfo,
|
|
30
|
-
LON: np.ndarray,
|
|
31
|
-
LAT: np.ndarray,
|
|
32
|
-
grid: np.ndarray,
|
|
33
|
-
swath_meta: dict[str, Any],
|
|
34
|
-
vmin: float,
|
|
35
|
-
vmax: float,
|
|
36
|
-
output: str,
|
|
37
|
-
display_grid: np.ndarray | None = None,
|
|
38
|
-
display_lon: np.ndarray | None = None,
|
|
39
|
-
display_lat: np.ndarray | None = None,
|
|
40
|
-
window: dict[str, Any] | None = None,
|
|
41
|
-
) -> dict[str, Any]:
|
|
42
|
-
"""Build the stable JSON sidecar payload for a raster run."""
|
|
43
|
-
result: dict[str, Any] = {
|
|
44
|
-
"command": "raster",
|
|
45
|
-
"image": output,
|
|
46
|
-
"region": serialize_region(region),
|
|
47
|
-
"product": product,
|
|
48
|
-
"date": date,
|
|
49
|
-
"unit": prod_info.colorbar_label,
|
|
50
|
-
"vrange": {
|
|
51
|
-
"vmin": round_finite(vmin),
|
|
52
|
-
"vmax": round_finite(vmax),
|
|
53
|
-
},
|
|
54
|
-
"swath": swath_meta,
|
|
55
|
-
"stats": grid_stats(
|
|
56
|
-
LON,
|
|
57
|
-
LAT,
|
|
58
|
-
grid,
|
|
59
|
-
region,
|
|
60
|
-
valid_key="valid_region_pixels",
|
|
61
|
-
total_key="total_region_pixels",
|
|
62
|
-
),
|
|
63
|
-
}
|
|
64
|
-
if prod_info.sensor == "gems":
|
|
65
|
-
result["sensor"] = "gems"
|
|
66
|
-
result["quantity"] = prod_info.quantity
|
|
67
|
-
result["statistics_basis"] = "unfilled_unsmoothed_grid"
|
|
68
|
-
result["input_timezone"] = "Asia/Shanghai"
|
|
69
|
-
if window is not None:
|
|
70
|
-
result["window"] = window
|
|
71
|
-
|
|
72
|
-
if display_grid is not None:
|
|
73
|
-
result["boundary_policy"] = grid_boundary_policy(
|
|
74
|
-
LON if display_lon is None else display_lon,
|
|
75
|
-
LAT if display_lat is None else display_lat,
|
|
76
|
-
display_grid,
|
|
77
|
-
region,
|
|
78
|
-
)
|
|
79
|
-
|
|
80
|
-
if (
|
|
81
|
-
display_grid is not None
|
|
82
|
-
and swath_meta.get("display_support") == "fixed_analysis_valid_cells"
|
|
83
|
-
):
|
|
84
|
-
result["boundary_policy"]["display"]["clip"] = (
|
|
85
|
-
"administrative_geometry_and_fixed_analysis_valid_cells"
|
|
86
|
-
)
|
|
87
|
-
result["boundary_policy"]["display"]["grid_shape"] = list(
|
|
88
|
-
display_grid.shape
|
|
89
|
-
)
|
|
90
|
-
|
|
91
|
-
if region.members:
|
|
92
|
-
result["member_stats"] = grid_member_stats(LON, LAT, grid, region)
|
|
93
|
-
|
|
94
|
-
sub_gdf = region.sub_boundary_gdf
|
|
95
|
-
if sub_gdf is not None and len(sub_gdf) > 0:
|
|
96
|
-
result["spatial_summary"] = grid_per_admin_stats(
|
|
97
|
-
LON,
|
|
98
|
-
LAT,
|
|
99
|
-
grid,
|
|
100
|
-
sub_gdf,
|
|
101
|
-
)
|
|
102
|
-
result["hotspots"] = top_hotspots(LON, LAT, grid, sub_gdf, n=5)
|
|
103
|
-
|
|
104
|
-
return result
|
|
@@ -1,229 +0,0 @@
|
|
|
1
|
-
"""JSON-sidecar construction for station and regional hourly trends."""
|
|
2
|
-
|
|
3
|
-
from __future__ import annotations
|
|
4
|
-
|
|
5
|
-
from typing import TYPE_CHECKING, Any
|
|
6
|
-
|
|
7
|
-
import numpy as np
|
|
8
|
-
|
|
9
|
-
from rsplot.readers.guokong import RegionStationSeries, StationSeries
|
|
10
|
-
from rsplot.result_builders.common import serialize_region
|
|
11
|
-
from rsplot.stats import basic_stats, round_finite
|
|
12
|
-
|
|
13
|
-
if TYPE_CHECKING:
|
|
14
|
-
from rsplot.geo.boundaries import RegionInfo
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
def build_station_trend_result(
|
|
18
|
-
*,
|
|
19
|
-
series: StationSeries,
|
|
20
|
-
dates: list[str],
|
|
21
|
-
threshold: float | None,
|
|
22
|
-
unit: str,
|
|
23
|
-
output: str,
|
|
24
|
-
) -> dict[str, Any]:
|
|
25
|
-
"""Build the machine-readable payload for a single-station trend."""
|
|
26
|
-
valid = np.isfinite(series.values)
|
|
27
|
-
n_valid = int(valid.sum())
|
|
28
|
-
result: dict[str, Any] = {
|
|
29
|
-
"command": "trend",
|
|
30
|
-
"image": output,
|
|
31
|
-
"station": {
|
|
32
|
-
"id": series.station_id,
|
|
33
|
-
"lon": round(series.lon, 3),
|
|
34
|
-
"lat": round(series.lat, 3),
|
|
35
|
-
},
|
|
36
|
-
"variable": series.var_name,
|
|
37
|
-
"unit": unit or None,
|
|
38
|
-
"threshold": threshold,
|
|
39
|
-
"period": {
|
|
40
|
-
"start": series.timestamps[0],
|
|
41
|
-
"end": series.timestamps[-1],
|
|
42
|
-
"days_requested": len(dates),
|
|
43
|
-
"hours_requested": series.n_hours,
|
|
44
|
-
},
|
|
45
|
-
"availability": {
|
|
46
|
-
"files_found": len(series.source_files),
|
|
47
|
-
"files_missing": len(series.missing_files),
|
|
48
|
-
"files_failed": len(series.failed_files),
|
|
49
|
-
"hours_station_missing": len(series.station_missing_hours),
|
|
50
|
-
"hours_valid": n_valid,
|
|
51
|
-
"missing_file_hours": list(series.missing_files),
|
|
52
|
-
"failed_files": dict(series.failed_files),
|
|
53
|
-
"station_missing_hours": list(series.station_missing_hours),
|
|
54
|
-
},
|
|
55
|
-
"stats": basic_stats(series.values),
|
|
56
|
-
"series": [
|
|
57
|
-
{
|
|
58
|
-
"datetime": timestamp,
|
|
59
|
-
"value": round_finite(value),
|
|
60
|
-
}
|
|
61
|
-
for timestamp, value in zip(
|
|
62
|
-
series.timestamps,
|
|
63
|
-
series.values,
|
|
64
|
-
strict=True,
|
|
65
|
-
)
|
|
66
|
-
],
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
if threshold is not None and n_valid:
|
|
70
|
-
exceed = int((series.values[valid] > threshold).sum())
|
|
71
|
-
result["exceedance"] = {
|
|
72
|
-
"count": exceed,
|
|
73
|
-
"rate_pct": round(100 * exceed / n_valid, 1),
|
|
74
|
-
}
|
|
75
|
-
return result
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
def build_region_trend_result(
|
|
79
|
-
*,
|
|
80
|
-
series: RegionStationSeries,
|
|
81
|
-
region: RegionInfo,
|
|
82
|
-
dates: list[str],
|
|
83
|
-
threshold: float | None,
|
|
84
|
-
unit: str,
|
|
85
|
-
view: str,
|
|
86
|
-
focus_station_ids: list[str],
|
|
87
|
-
output: str,
|
|
88
|
-
) -> dict[str, Any]:
|
|
89
|
-
"""Build the compact machine-readable payload for a regional trend."""
|
|
90
|
-
mean_values = series.hourly_mean
|
|
91
|
-
hourly_counts = series.hourly_valid_counts
|
|
92
|
-
station_summaries: list[dict[str, Any]] = []
|
|
93
|
-
exceeding_stations: list[dict[str, Any]] = []
|
|
94
|
-
|
|
95
|
-
for index, station_id in enumerate(series.station_ids.astype(str)):
|
|
96
|
-
values = series.values[index]
|
|
97
|
-
summary: dict[str, Any] = {
|
|
98
|
-
"id": station_id,
|
|
99
|
-
"lon": round(float(series.lon[index]), 3),
|
|
100
|
-
"lat": round(float(series.lat[index]), 3),
|
|
101
|
-
"hours_valid": int(np.isfinite(values).sum()),
|
|
102
|
-
"stats": basic_stats(values),
|
|
103
|
-
}
|
|
104
|
-
if threshold is not None and summary["hours_valid"]:
|
|
105
|
-
exceedance = _exceedance_stats(values, threshold)
|
|
106
|
-
summary["exceedance"] = exceedance
|
|
107
|
-
if exceedance["count"]:
|
|
108
|
-
exceeding_stations.append(
|
|
109
|
-
{
|
|
110
|
-
"id": station_id,
|
|
111
|
-
"lon": summary["lon"],
|
|
112
|
-
"lat": summary["lat"],
|
|
113
|
-
**exceedance,
|
|
114
|
-
}
|
|
115
|
-
)
|
|
116
|
-
station_summaries.append(summary)
|
|
117
|
-
|
|
118
|
-
exceeding_stations.sort(
|
|
119
|
-
key=lambda row: (
|
|
120
|
-
-(row["max_excess"] or 0),
|
|
121
|
-
-row["count"],
|
|
122
|
-
row["id"],
|
|
123
|
-
)
|
|
124
|
-
)
|
|
125
|
-
focus_stations = [
|
|
126
|
-
_focus_station_result(series, station_id, threshold)
|
|
127
|
-
for station_id in focus_station_ids
|
|
128
|
-
]
|
|
129
|
-
|
|
130
|
-
return {
|
|
131
|
-
"command": "trend",
|
|
132
|
-
"mode": "region",
|
|
133
|
-
"image": output,
|
|
134
|
-
"region": serialize_region(region),
|
|
135
|
-
"variable": series.var_name,
|
|
136
|
-
"unit": unit or None,
|
|
137
|
-
"threshold": threshold,
|
|
138
|
-
"params": {
|
|
139
|
-
"view": view,
|
|
140
|
-
"focus_station_ids": focus_station_ids,
|
|
141
|
-
},
|
|
142
|
-
"period": {
|
|
143
|
-
"start": series.timestamps[0],
|
|
144
|
-
"end": series.timestamps[-1],
|
|
145
|
-
"days_requested": len(dates),
|
|
146
|
-
"hours_requested": series.n_hours,
|
|
147
|
-
},
|
|
148
|
-
"availability": {
|
|
149
|
-
"files_found": len(series.source_files),
|
|
150
|
-
"files_missing": len(series.missing_files),
|
|
151
|
-
"files_failed": len(series.failed_files),
|
|
152
|
-
"stations_total": series.n_stations,
|
|
153
|
-
"stations_with_data": int(
|
|
154
|
-
np.isfinite(series.values).any(axis=1).sum()
|
|
155
|
-
),
|
|
156
|
-
"hours_with_data": int((hourly_counts > 0).sum()),
|
|
157
|
-
"observation_values": series.n_valid,
|
|
158
|
-
"missing_file_hours": list(series.missing_files),
|
|
159
|
-
"failed_files": dict(series.failed_files),
|
|
160
|
-
},
|
|
161
|
-
"regional_mean": {
|
|
162
|
-
"stats": basic_stats(mean_values),
|
|
163
|
-
"series": [
|
|
164
|
-
{
|
|
165
|
-
"datetime": timestamp,
|
|
166
|
-
"value": round_finite(value),
|
|
167
|
-
"n_stations": int(count),
|
|
168
|
-
}
|
|
169
|
-
for timestamp, value, count in zip(
|
|
170
|
-
series.timestamps,
|
|
171
|
-
mean_values,
|
|
172
|
-
hourly_counts,
|
|
173
|
-
strict=True,
|
|
174
|
-
)
|
|
175
|
-
],
|
|
176
|
-
},
|
|
177
|
-
"station_summaries": station_summaries,
|
|
178
|
-
"exceeding_stations": exceeding_stations,
|
|
179
|
-
"focus_stations": focus_stations,
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
def _focus_station_result(
|
|
184
|
-
series: RegionStationSeries,
|
|
185
|
-
station_id: str,
|
|
186
|
-
threshold: float | None,
|
|
187
|
-
) -> dict[str, Any]:
|
|
188
|
-
index = series.station_index(station_id)
|
|
189
|
-
if index is None:
|
|
190
|
-
raise ValueError(f"区域时序中未找到重点站 '{station_id}'")
|
|
191
|
-
values = series.values[index]
|
|
192
|
-
result: dict[str, Any] = {
|
|
193
|
-
"id": str(series.station_ids[index]),
|
|
194
|
-
"lon": round(float(series.lon[index]), 3),
|
|
195
|
-
"lat": round(float(series.lat[index]), 3),
|
|
196
|
-
"stats": basic_stats(values),
|
|
197
|
-
"series": [
|
|
198
|
-
{
|
|
199
|
-
"datetime": timestamp,
|
|
200
|
-
"value": round_finite(value),
|
|
201
|
-
}
|
|
202
|
-
for timestamp, value in zip(
|
|
203
|
-
series.timestamps,
|
|
204
|
-
values,
|
|
205
|
-
strict=True,
|
|
206
|
-
)
|
|
207
|
-
],
|
|
208
|
-
}
|
|
209
|
-
if threshold is not None and np.isfinite(values).any():
|
|
210
|
-
result["exceedance"] = _exceedance_stats(values, threshold)
|
|
211
|
-
return result
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
def _exceedance_stats(
|
|
215
|
-
values: np.ndarray,
|
|
216
|
-
threshold: float,
|
|
217
|
-
) -> dict[str, Any]:
|
|
218
|
-
valid = np.isfinite(values)
|
|
219
|
-
n_valid = int(valid.sum())
|
|
220
|
-
exceed = valid & (values > threshold)
|
|
221
|
-
count = int(exceed.sum())
|
|
222
|
-
max_excess = (
|
|
223
|
-
round_finite(np.max(values[exceed] - threshold)) if count else None
|
|
224
|
-
)
|
|
225
|
-
return {
|
|
226
|
-
"count": count,
|
|
227
|
-
"rate_pct": round(100 * count / n_valid, 1) if n_valid else 0.0,
|
|
228
|
-
"max_excess": max_excess,
|
|
229
|
-
}
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
rsplot/__init__.py,sha256=3Ruc0uv8gybHmJAfHMssKlx4uZm11vfRK3qljZXs5WU,318
|
|
2
|
-
rsplot/__main__.py,sha256=8_HlBH7_zVm8ZVDcTcqTylcu2BPnU9zZ2Hnnw3sHItE,96
|
|
3
|
-
rsplot/cli.py,sha256=Rru-6RVY9pL-qq9jBMm-nRa8TU1HMgphcnD0a2yj-IQ,28907
|
|
4
|
-
rsplot/config.py,sha256=qKUJICvI0gAPo0GAKzMwz_dlD5bLWplyRiixIy3W8iw,13843
|
|
5
|
-
rsplot/fnr.py,sha256=E6xmNtiCAJzWxqPPhdbQKMgMyE1GtydG68AUVJFQ2gU,11242
|
|
6
|
-
rsplot/recent.py,sha256=QbpYiUVn0OnY2sw_N7wmybbpkQlQHPAcsCfKy2kD8kQ,13641
|
|
7
|
-
rsplot/results.py,sha256=ykhWKhLyJyCQCM7HzXr7ucQpjj5XDqxUVw1AX7bsjig,1249
|
|
8
|
-
rsplot/stats.py,sha256=qDv8NCgS9_6Hu8Ni3dTh54JcBfzYBmW9K9JBLniNGaA,1158
|
|
9
|
-
rsplot/temporal.py,sha256=Og8Kl28pC4gkuUYFhODZteWlIy4KrL5ju3oImdwmWLs,11238
|
|
10
|
-
rsplot/commands/__init__.py,sha256=zd-RHo-2h_6Jl_ws13RX13PgqMT5q4EWczpBd5Nd5Jk,73
|
|
11
|
-
rsplot/commands/common.py,sha256=eq_3w778u9IuRDrQwnjlTPp5GQ-GtkssQXEInZ93VWg,5518
|
|
12
|
-
rsplot/commands/fnr.py,sha256=vyl48DUNU1Wz3fOs6z0NS0weLMoa278WqL_dtX8XbIM,8038
|
|
13
|
-
rsplot/commands/forecast.py,sha256=MoepozSt9Eh9wxLMf6LMX7nhuW_By9fOZ16p6Aky-Zo,11903
|
|
14
|
-
rsplot/commands/meteo.py,sha256=TfaDJu0awwaAXmrSL9pyjV9XFH1yfGawD0Gz9VjpW5A,12798
|
|
15
|
-
rsplot/commands/overlay.py,sha256=TGsJDhHgsueVGXi8jiLdrgLpptNZKEU9q8W2fJUo5xI,12901
|
|
16
|
-
rsplot/commands/raster.py,sha256=fD1HQwjkR6oC8_mcpN7eYMEWbT2tst4qH7zGd_9EfM4,17205
|
|
17
|
-
rsplot/commands/recent.py,sha256=RZayL3b4Gln1674-iWALhn5yXOREyaOC7-TosXWG_0s,5773
|
|
18
|
-
rsplot/commands/reconstruct.py,sha256=93bpVWtjswKRcfPFL8CGXBVOFLj8LLno4SWEGTnIv0I,7228
|
|
19
|
-
rsplot/commands/station.py,sha256=2fF032-0BD2IsElvfCS19p5t8iAR1HNCpMWHAhBlB38,4146
|
|
20
|
-
rsplot/commands/station_trend.py,sha256=WhCLKbjl20fTonxBYuhSKENtB6FZoWuVzZQKJiRKrMc,9981
|
|
21
|
-
rsplot/geo/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
22
|
-
rsplot/geo/boundaries.py,sha256=EywxVasQC_jehQIouQchFW_Qc7yU-XoFY8oI-PvlKTU,18680
|
|
23
|
-
rsplot/geo/footprints.py,sha256=4-XXGQOvT2tQB55XvmUYRCvdt3mxuG6csZDI6vRUS9M,6908
|
|
24
|
-
rsplot/geo/gridding.py,sha256=CA1imAZYz5lxYnVJx1SBBXxDf_WaEpiVe10J4EoVefY,4392
|
|
25
|
-
rsplot/geo/processing.py,sha256=YCMisbT9WrTcm-ZMtMVjzDSv6WOBg-D4xIdpKKCxgwQ,5607
|
|
26
|
-
rsplot/plotting/__init__.py,sha256=DYZUFHxzFHkgH8RvmoqjBTtEg9TYbKlv4-tyVXBR3nY,67
|
|
27
|
-
rsplot/plotting/colormaps.py,sha256=rHmFSFSaUgz1Pxownpe4NZBT3jfHXzupKNPK92DGBbc,1932
|
|
28
|
-
rsplot/plotting/fnr.py,sha256=RLtyUTzDgLlKQ8SJz_msv4N8TmpMJerq1g8wAN50rN4,4032
|
|
29
|
-
rsplot/plotting/map_frame.py,sha256=91hovjs2ay_7OcNaTd3xnv-yz13Yx8EHxBxCOWxKoJI,10764
|
|
30
|
-
rsplot/plotting/meteo.py,sha256=9nxVRbkT-gXC765q6SusYB1xK8rbFy4DUhUYaVBo3Uw,4822
|
|
31
|
-
rsplot/plotting/overlay.py,sha256=aI5O0nhXyYeadydF7ndsqyeOdOP4z_oQ3EyYGGc6Ksk,5604
|
|
32
|
-
rsplot/plotting/raster.py,sha256=emuXvlT9Vql2_ltLRFjRml3A8nODVVVV2haKfQ766H0,2930
|
|
33
|
-
rsplot/plotting/station.py,sha256=XGlewm2DjLKpRHpWf19vW81hMTBf7wbNbrZyS2T8x7g,4697
|
|
34
|
-
rsplot/plotting/station_trend.py,sha256=MPmVXtqe7gfSMHKJOoSRYbLYSA7bMyzaXouz9XTJh3g,9986
|
|
35
|
-
rsplot/plotting/styles.py,sha256=joJ0g5nio_vvquFN4o4187AZZSK3F9WGfKOOlm0IfCo,1246
|
|
36
|
-
rsplot/plotting/wind.py,sha256=1YNdEg0c19AyHt2hQjAng8-nMItPBfUVEmcy9sIBvqw,2102
|
|
37
|
-
rsplot/readers/__init__.py,sha256=TULhdeVpTN64-lLC6E3ktTeXUPvh6gL8Bj32fBqDvwk,5060
|
|
38
|
-
rsplot/readers/_tropomi.py,sha256=OuFY6s7cwdaj1U64KpT6xX_jlt_MHbwwwlfUBlKFuQY,3972
|
|
39
|
-
rsplot/readers/base.py,sha256=1hOS3XDExzwHwcwBLahvgjv-3cOFydiTtlGX7ZW3AQU,5715
|
|
40
|
-
rsplot/readers/era5.py,sha256=VJGPdYPQU-jDvzYiUqBFaU8PFC_PtYjLZ7GyfvJznJg,6151
|
|
41
|
-
rsplot/readers/era5_wind.py,sha256=kjEPCpGl5v71ypj9na1qXWF7fV7MM6sfJ5Q81JlDrkI,5400
|
|
42
|
-
rsplot/readers/forecast.py,sha256=a6JowdoxcpTMCnFVfMRlEffnZ2rM8DPhzHG9e-LliV8,9341
|
|
43
|
-
rsplot/readers/gems.py,sha256=gXH9xKtCk_zj4zbV9skF65s-7Hv3VgwF3fVKJ1JmSA0,15315
|
|
44
|
-
rsplot/readers/guokong.py,sha256=DMt3tzKwonh4lmQYdRleB1g4YjK4p7ULVNNoeeG8tvY,15032
|
|
45
|
-
rsplot/readers/reconstruct.py,sha256=NCPOP6aqJnWm4PnErj3haq0p6s18ozJb6B0j_fU58DY,13388
|
|
46
|
-
rsplot/readers/tropomi_hcho.py,sha256=uw7_devKzziaaARVPPuluhKdP6OYBsNi367N4byIo1A,1119
|
|
47
|
-
rsplot/readers/tropomi_no2.py,sha256=UBYVOa1YtjzAK83JUBNETWIqRmt-ILnExM42txelIbI,1089
|
|
48
|
-
rsplot/readers/tropomi_o3.py,sha256=8LPrQZG-rBgepQyA04tB74ykZPZsk0QTRUz_T1mFYy0,1147
|
|
49
|
-
rsplot/readers/tropomi_o3pr.py,sha256=7GjAwx3Uh0OR3mM1h7b4cDrzX5YZdxhetEe2cke3RoI,1094
|
|
50
|
-
rsplot/result_builders/__init__.py,sha256=WSa3lLzpICYFzSSZBvjINGBLUa9N691gJbROa1p7mwg,903
|
|
51
|
-
rsplot/result_builders/common.py,sha256=5ECS14iV8QBroJO6JmtCbYnmIuHsbmByt1W5ZcGPe-A,6644
|
|
52
|
-
rsplot/result_builders/fnr.py,sha256=evD9fFh6oaDkzd_MNzWqdO71atPxrtn6lZhKIiHyZqM,6203
|
|
53
|
-
rsplot/result_builders/forecast.py,sha256=6RLdFVPITXUTTy6If4yr-BA__GYNeUcNP4EMV5QSeXc,3587
|
|
54
|
-
rsplot/result_builders/meteo.py,sha256=HGc5MNDmkJEsAe6HgIJmPdhQFEnAFdPL0nYMaJWu4cY,5788
|
|
55
|
-
rsplot/result_builders/overlay.py,sha256=v4cxa8jk8Cux3wquKRvieWl1gipBBw1ByIJ9QgKLQMs,3014
|
|
56
|
-
rsplot/result_builders/raster.py,sha256=KWKJZzQVhmTKBcYPUOLbMZvc14k7ua0LcoKGeKvGrPY,2902
|
|
57
|
-
rsplot/result_builders/reconstruct.py,sha256=Uqwzi75NhEUIX1O2MijFaL9RMxAlCiRvReK4zUmX_80,2556
|
|
58
|
-
rsplot/result_builders/station.py,sha256=z8DUxLxD6mrO4FOAlqlcAX6KynCEj3zBzsTsgZxyztI,7164
|
|
59
|
-
rsplot/result_builders/station_trend.py,sha256=gcfUsCgc7jhvCNY7Z0wK4tYjknuKrMl-7at66pT1pm4,7340
|
|
60
|
-
rsplot/tiles/__init__.py,sha256=R7864cYKm4gfLX07fbBeQelGjebQXkzBLDJUFy67UcU,30
|
|
61
|
-
rsplot/tiles/tianditu.py,sha256=9B2SXmjF3adWcq38LtP8DCu_4C1INRNOejibpRx1bnA,859
|
|
62
|
-
rsplot-0.3.2.dev4.dist-info/METADATA,sha256=-v3NIVlXRS8fva-c3PS54w0hkbVb1sDUW7YqCLMl56Y,33470
|
|
63
|
-
rsplot-0.3.2.dev4.dist-info/WHEEL,sha256=zOwg4jB6zX2kU910N-cMawjivD6tO8NEWvE12je1bVk,87
|
|
64
|
-
rsplot-0.3.2.dev4.dist-info/entry_points.txt,sha256=ZhA4Divb4fJcggbG7usMVJ-VUTkEaQ-qfPlMimSBuCM,47
|
|
65
|
-
rsplot-0.3.2.dev4.dist-info/licenses/LICENSE,sha256=KD6mzCmXoacNoASeCa35MXu2DKG1Enm2UZa4OmnhmWs,11323
|
|
66
|
-
rsplot-0.3.2.dev4.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|