rsplot 0.3.1.dev3__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 +282 -469
- rsplot/commands/common.py +113 -1
- rsplot/commands/fnr.py +389 -104
- rsplot/commands/forecast.py +24 -7
- rsplot/commands/meteo.py +499 -186
- rsplot/commands/overlay.py +292 -205
- rsplot/commands/radius.py +526 -0
- rsplot/commands/raster.py +479 -230
- rsplot/commands/reconstruct.py +27 -6
- rsplot/commands/sidecar.py +106 -0
- rsplot/commands/station.py +154 -42
- rsplot/commands/station_trend.py +259 -174
- rsplot/config.py +46 -16
- rsplot/data_files.py +253 -0
- rsplot/errors.py +43 -0
- rsplot/fnr.py +38 -46
- rsplot/geo/boundaries.py +317 -11
- rsplot/geo/footprints.py +205 -0
- rsplot/geo/processing.py +84 -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 +203 -9
- rsplot/plotting/meteo.py +10 -3
- rsplot/plotting/overlay.py +36 -40
- rsplot/plotting/raster.py +15 -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 +89 -7
- rsplot/readers/_tropomi.py +121 -3
- rsplot/readers/base.py +16 -1
- rsplot/readers/era5.py +110 -10
- rsplot/readers/era5_wind.py +3 -2
- rsplot/readers/gems.py +429 -0
- 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 +84 -0
- rsplot/result_builders/envelope.py +236 -0
- rsplot/result_builders/fnr.py +47 -131
- rsplot/result_builders/forecast.py +7 -0
- rsplot/result_builders/provenance.py +59 -0
- rsplot/result_builders/reconstruct.py +7 -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 +146 -16
- rsplot-0.3.2.dev37.dist-info/METADATA +996 -0
- rsplot-0.3.2.dev37.dist-info/RECORD +76 -0
- {rsplot-0.3.1.dev3.dist-info → rsplot-0.3.2.dev37.dist-info}/WHEEL +1 -1
- rsplot/commands/recent.py +0 -164
- rsplot/recent.py +0 -404
- rsplot/result_builders/meteo.py +0 -171
- rsplot/result_builders/overlay.py +0 -75
- rsplot/result_builders/raster.py +0 -72
- rsplot/result_builders/station_trend.py +0 -229
- rsplot-0.3.1.dev3.dist-info/METADATA +0 -477
- rsplot-0.3.1.dev3.dist-info/RECORD +0 -64
- {rsplot-0.3.1.dev3.dist-info → rsplot-0.3.2.dev37.dist-info}/entry_points.txt +0 -0
- {rsplot-0.3.1.dev3.dist-info → rsplot-0.3.2.dev37.dist-info}/licenses/LICENSE +0 -0
rsplot/commands/forecast.py
CHANGED
|
@@ -53,6 +53,7 @@ def run_forecast(
|
|
|
53
53
|
from rsplot.geo.boundaries import resolve_region
|
|
54
54
|
from rsplot.geo.processing import (
|
|
55
55
|
buffered_extent,
|
|
56
|
+
prepare_display_grid,
|
|
56
57
|
prepare_existing_grid,
|
|
57
58
|
)
|
|
58
59
|
from rsplot.plotting.colormaps import STATION_CONCENTRATION_CMAP
|
|
@@ -151,10 +152,22 @@ def run_forecast(
|
|
|
151
152
|
info.geometry,
|
|
152
153
|
fill_gaps=False,
|
|
153
154
|
)
|
|
154
|
-
|
|
155
|
+
display_source = prepared.unmasked_values
|
|
156
|
+
display_grid = prepare_display_grid(
|
|
157
|
+
prepared.lon,
|
|
158
|
+
prepared.lat,
|
|
159
|
+
display_source,
|
|
160
|
+
info.geometry,
|
|
161
|
+
smooth_sigma=smooth,
|
|
162
|
+
)
|
|
163
|
+
if not np.isfinite(display_grid).any():
|
|
155
164
|
console.print("[red]目标区域内没有有效预报网格。[/red]")
|
|
156
165
|
raise typer.Exit(1)
|
|
157
|
-
if
|
|
166
|
+
if (
|
|
167
|
+
smooth is not None
|
|
168
|
+
and smooth > 0
|
|
169
|
+
and np.isfinite(prepared.values).any()
|
|
170
|
+
):
|
|
158
171
|
console.print(f" → 高斯平滑 sigma={smooth}")
|
|
159
172
|
prepared = prepare_existing_grid(
|
|
160
173
|
prepared.lon,
|
|
@@ -170,7 +183,12 @@ def run_forecast(
|
|
|
170
183
|
f"({prepared.n_valid_region}/{prepared.total_region_pixels})"
|
|
171
184
|
)
|
|
172
185
|
|
|
173
|
-
auto_min, auto_max = auto_forecast_vrange(
|
|
186
|
+
auto_min, auto_max = auto_forecast_vrange(
|
|
187
|
+
prepared.values
|
|
188
|
+
if np.isfinite(prepared.values).any()
|
|
189
|
+
else display_grid,
|
|
190
|
+
var_info,
|
|
191
|
+
)
|
|
174
192
|
use_vmin = vmin if vmin is not None else auto_min
|
|
175
193
|
use_vmax = vmax if vmax is not None else auto_max
|
|
176
194
|
try:
|
|
@@ -289,7 +307,7 @@ def run_forecast(
|
|
|
289
307
|
plot_raster(
|
|
290
308
|
prepared.lon,
|
|
291
309
|
prepared.lat,
|
|
292
|
-
|
|
310
|
+
display_grid,
|
|
293
311
|
info,
|
|
294
312
|
dpi=use_dpi,
|
|
295
313
|
cmap=use_cmap,
|
|
@@ -297,7 +315,6 @@ def run_forecast(
|
|
|
297
315
|
vmax=use_vmax,
|
|
298
316
|
basemap=use_basemap,
|
|
299
317
|
tianditu_key=cfg.tianditu_key,
|
|
300
|
-
hcho_cmap_file=cfg.hcho_cmap_file,
|
|
301
318
|
title=title,
|
|
302
319
|
output=output,
|
|
303
320
|
colorbar_label=var_info.colorbar_label,
|
|
@@ -306,7 +323,7 @@ def run_forecast(
|
|
|
306
323
|
plot_overlay(
|
|
307
324
|
prepared.lon,
|
|
308
325
|
prepared.lat,
|
|
309
|
-
|
|
326
|
+
display_grid,
|
|
310
327
|
station_data,
|
|
311
328
|
info,
|
|
312
329
|
raster_cmap=use_cmap,
|
|
@@ -318,7 +335,6 @@ def run_forecast(
|
|
|
318
335
|
dpi=use_dpi,
|
|
319
336
|
basemap=use_basemap,
|
|
320
337
|
tianditu_key=cfg.tianditu_key,
|
|
321
|
-
hcho_cmap_file=cfg.hcho_cmap_file,
|
|
322
338
|
title=title,
|
|
323
339
|
output=output,
|
|
324
340
|
)
|
|
@@ -330,6 +346,7 @@ def run_forecast(
|
|
|
330
346
|
LON=prepared.lon,
|
|
331
347
|
LAT=prepared.lat,
|
|
332
348
|
grid=prepared.values,
|
|
349
|
+
display_grid=display_grid,
|
|
333
350
|
vmin=use_vmin,
|
|
334
351
|
vmax=use_vmax,
|
|
335
352
|
output=output,
|