cedar-graph
A plotting example package using cedarkit-plots.
Install
Install using pip.
pip install cedar-graph
Or download the latest source code from GitHub repo and install the latest version.
Quick plot
quick_plot can be used in CMA-HPC to draw and show picture using data from CEMC's NWP systems.
Draw contour fill plot for 2m temperature using CMA-GFS GRIB2 data.
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,
)
Draw wind speed contour fill plot for 10m wind using CMA-MESO GRIB2 data.
from cedar_graph.quickplot import quick_plot
from cedarkit.plots.types 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,
)
Manual plot
Use functions and classed in plotting modules to draw plots.
The following example runs at CMA-HPC.
First, create a LocalDataSource object to get data file path from CMA-MESO at CMA-HPC.
Next, use load_data and plot functions from cedar_graph.plots.t_2m.default module to draw a plot.
Finally, use panel.show() method to display the result.
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()
Graph list
| Category | Plot Type | Introduction | 说明 |
|---|---|---|---|
| Normal | |||
| height_500_mslp | 500hPa geopotential height + Sea level pressure | 500hPa高度场+海平面气压 | |
| height_500_wind_850 | 500hPa geopotential height + 850hPa wind | 500hPa高度场+850hPa风场 | |
| t_2m | 2m temperature | 2米温度 | |
| rh_2m | 2m relative humidity | 2米相对湿度 | |
| wind_10m | 10m wind | 10米风场 | |
| Diagnosis | |||
| radar_reflectivity | Composite radar reflectivity | 雷达组合反射率 | |
| div_wind | Divergence + Wind | 散度+风场 | |
| k_wind | K Index + Wind | K指数+风场 | |
| cin_wind | CIN + Wind | CIN+风场 | |
| cape_wind | CAPE + Wind | CAPE+风场 | |
| bli_wind | Best lifted index + Wind | 最优抬升指数 + 风场 | |
| pte_wind | Difference in pseudo-equivalent potential temperature between 500hPa and 850hPa + Wind | 500hPa与850hPa假相当位温之差+风场 | |
| qv_div | Moisture flux divergence | 水汽通量散度 | |
| shr | Vertical wind shear (0-1km/0-3km/0-6km) | 垂直风切变 (0-1km/0-3km/0-6km) | |
| t_dew_t | Temperature-dew point difference | 温度和露点差 | |
| Rain | |||
| prep_24h | 24h precipitation (precipitation phase) | 24小时降水 (多相态) | |
| rain_24h | 24h rain | 24小时降水 | |
| rain_wind_10m | 1/3/6/12/24h rain + 10m wind | 1/3/6/12/24小时降水+10米风场 |
LICENSE
Copyright © 2024-2026, developers at cemc-oper.
cedar-graph is licensed under Apache License V2.0
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cedar_graph-2026.7.0.tar.gz.
File metadata
- Download URL: cedar_graph-2026.7.0.tar.gz
- Upload date:
- Size: 81.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b5ca61f55607e1eb3e2b49242c029ef88d196c0da81cb252017b6d80fcc0a995
|
|
| MD5 |
17c38da45a1ab4f130abf767298c8525
|
|
| BLAKE2b-256 |
4a1dfefc7a9b0bd057a599844fde90f41d17865bfe0526743a33e6618e10b7d5
|
Provenance
The following attestation bundles were made for cedar_graph-2026.7.0.tar.gz:
Publisher:
release.yaml on cemc-oper/cedar-graph
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cedar_graph-2026.7.0.tar.gz -
Subject digest:
b5ca61f55607e1eb3e2b49242c029ef88d196c0da81cb252017b6d80fcc0a995 - Sigstore transparency entry: 2182153431
- Sigstore integration time:
-
Permalink:
cemc-oper/cedar-graph@dbd4c33c1030828e398579fd215461c476642352 -
Branch / Tag:
refs/tags/v2026.7.0 - Owner: https://github.com/cemc-oper
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@dbd4c33c1030828e398579fd215461c476642352 -
Trigger Event:
release
-
Statement type:
File details
Details for the file cedar_graph-2026.7.0-py3-none-any.whl.
File metadata
- Download URL: cedar_graph-2026.7.0-py3-none-any.whl
- Upload date:
- Size: 49.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
85eb6d1fc887ec57d3157749126ebf206f85d57d1b47fcdf8510c53a48ecafbb
|
|
| MD5 |
b08dd1156211130b5ef4040421ffcddf
|
|
| BLAKE2b-256 |
ede3103ac7d54ddb45b4711cc49eb0a6699d7f9a1f86f049d51ab89918aaefc9
|
Provenance
The following attestation bundles were made for cedar_graph-2026.7.0-py3-none-any.whl:
Publisher:
release.yaml on cemc-oper/cedar-graph
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cedar_graph-2026.7.0-py3-none-any.whl -
Subject digest:
85eb6d1fc887ec57d3157749126ebf206f85d57d1b47fcdf8510c53a48ecafbb - Sigstore transparency entry: 2182153791
- Sigstore integration time:
-
Permalink:
cemc-oper/cedar-graph@dbd4c33c1030828e398579fd215461c476642352 -
Branch / Tag:
refs/tags/v2026.7.0 - Owner: https://github.com/cemc-oper
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@dbd4c33c1030828e398579fd215461c476642352 -
Trigger Event:
release
-
Statement type: