Plot tool for CEMC.
Project description
cedar-graph
使用 cedarkit-maps 开发的绘图示例包。
快速绘图
绘制 2 米温度填充图
from cedar_graph.quickplot import quick_plot
plot_type = "cn.t_2m.default"
plot_settings = dict(
system_name="CMA-GFS",
start_time="2024073000",
forecast_time="48h",
)
quick_plot(
plot_type=plot_type,
**plot_settings,
)
绘制区域 10 米风场填充图
from cedar_graph.quickplot import quick_plot
from cedarkit.maps.util import AreaRange
plot_type = "cn.wind_10m.default"
plot_settings = dict(
system_name="CMA-MESO",
start_time="2024073000",
forecast_time="48h",
area_name="NorthEast",
area_range=AreaRange.from_tuple((108, 137, 37, 55))
)
quick_plot(
plot_type=plot_type,
**plot_settings,
)
绘图模块
使用绘图模块的函数和类实现图形绘制
import pandas as pd
from cedar_graph.plots.cn.t_2m.default import PlotMetadata, plot, load_data
from cedar_graph.data import LocalDataSource, DataLoader
system_name = "CMA-MESO"
start_time = pd.to_datetime("2024-07-17 00:00:00")
forecast_time = pd.to_timedelta("24h")
metadata = PlotMetadata(
start_time=start_time,
forecast_time=forecast_time,
system_name=system_name
)
# system -> field
data_source = LocalDataSource(system_name=system_name)
data_loader = DataLoader(data_source=data_source)
plot_data = load_data(
data_loader=data_loader,
start_time=start_time,
forecast_time=forecast_time
)
# field -> plot
panel = plot(
plot_data=plot_data,
plot_metadata=metadata,
)
# plot -> output
panel.show()
绘图清单
类别 | 名称 | 说明 |
---|---|---|
常规 | ||
height_500_mslp | 500hPa高度场+海平面气压 | |
height_500_wind_850 | 500hPa高度场+850hPa风场 | |
t_2m | 2米温度 | |
wind_10m | 10米风场 | |
诊断 | ||
radar_reflectivity | 雷达组合反射率 | |
div_wind | 散度+风场 | |
k_wind | K指数+风场 | |
cin_wind | CIN+风场 | |
cape_wind | CAPE+风场 | |
bpli_wind | 最优抬升指数+风场 | |
pte_wind | 500hPa与850hPa假相当位温之差+风场 | |
qv_div | 水汽通量散度 | |
shr | 垂直风切变 (0-1km/0-3km/0-6km) | |
t_dew_t | 温度和露点差 | |
降水 | ||
prep_24h | 24小时降水 (多相态) | |
rain_24h | 24小时降水 | |
rain_wind_10m | 1/3/6/12/24小时降水+10米风场 |
LICENSE
Copyright © 2024, developers at cemc-oper.
cedar-graph
is licensed under Apache License V2.0
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
cedar_graph-2024.10.0.tar.gz
(29.1 kB
view details)
Built Distribution
File details
Details for the file cedar_graph-2024.10.0.tar.gz
.
File metadata
- Download URL: cedar_graph-2024.10.0.tar.gz
- Upload date:
- Size: 29.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c35314fa80e975f0ce9dfed9d8cffb16a99269de5073b7fe8e563f173e6d0d4e |
|
MD5 | 3a48ac9bc43d1091e039705ed1b0533e |
|
BLAKE2b-256 | 1a9ff935b6566fac57016baab4b4356a2e0db7f9ded68c9216f4cd077dde4f20 |
File details
Details for the file cedar_graph-2024.10.0-py3-none-any.whl
.
File metadata
- Download URL: cedar_graph-2024.10.0-py3-none-any.whl
- Upload date:
- Size: 44.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 109fa6df7bd4c013640862eac5c8d03f041a430377db3137c818742eeea959ba |
|
MD5 | a0e13bb27efa9bca43824f0c6ecf8c52 |
|
BLAKE2b-256 | 090bfbdb38cb9ce832b8693a7b7153661d58c42a1e58b52132856378d7557760 |