Skip to main content

cedar-graph

Maturity-Sandbox GitHub Release PyPI - Version GitHub License GitHub Action Workflow Status

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

Metadata

Release files for cedar-graph 2026.9.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cedar-graph 2026.9.0
File Size Uploaded
cedar_graph-2026.9.0.tar.gz 163.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for cedar-graph 2026.9.0
File Interpreter ABI Platform
cedar_graph-2026.9.0-py3-none-any.whl Python 3 none any Details

Total release size: 221.0 kB

Release files / cedar_graph-2026.9.0.tar.gz

Download URL cedar_graph-2026.9.0.tar.gz
Size 163.2 kB
Tags Source
SHA-256 checksum
How to use checksums
c8d11071e343cc504be8067af868fe1d4ec389db3fd4a8660388fcb8b838c79b
BLAKE2b-256 checksum
How to use checksums
8f6590312d7ee79ea8dfbfbbbc6215e7b53a412263607053412ae43050f07e78
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 1, 2026.

Transparency log

Release files / cedar_graph-2026.9.0-py3-none-any.whl

Download URL cedar_graph-2026.9.0-py3-none-any.whl
Size 57.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
675ef423d9cbb964fa5a719071967bddedaffbc37df571b90f3efdc978f146d9
BLAKE2b-256 checksum
How to use checksums
8e80fb4dd8025d8b0d2607f59a5874dc82b7b37d9b9c7ab09bcb023563e274e2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 1, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

2026.9.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page