earthkit-plots-dccms-styles
DCCMS (Department of Climate Change and Meteorological Services of Malawi) colour schemes and styles for earthkit-plots visualisations.
This package provides colour schemes and styling configurations for earthkit-plots, following DCCMS visual standards.
Installation
Install directly from the GitHub repository:
pip install earthkit-plots-dccms-styles@git+https://github.com/metno/earthkit-plots-dccms-styles
Quick Start
import earthkit.plots as ekp
# Activate DCCMS styling
ekp.schema.use('dccms')
# Your plotting will now automatically use DCCMS styles
chart = ekp.quickplot(data)
Examples
Basic Usage with Automatic Styling
import earthkit.plots as ekp
import earthkit.data as ekd
# Enable DCCMS schema
ekp.schema.use('dccms')
ds = ekd.from_source("sample", "era5-2t-msl-1985122512.grib")
# Plot data - automatically detects variable and applies appropriate styling
temperature_chart = ekp.quickplot(ds, domain='Malawi')
Customising Plot Appearance
import earthkit.plots as ekp
import earthkit.data as ekd
temperature, pressure = ekd.from_source("sample", "era5-2t-msl-1985122512.grib")
ekp.schema.use('dccms')
# Create a map with custom domain and styling options
chart = ekp.Map(
domain='Malawi',
)
chart.quickplot(temperature)
chart.quickplot(pressure, units="hPa")
# Add geographic features
chart.coastlines()
chart.borders()
chart.gridlines()
# Display the plot
chart.show()
Available Weather Variable Styles
The package includes optimised styles for:
- Temperature:
near-surface-air-temperature,sea-surface-temperature,dew-point-temperature - Precipitation:
total-precipitation - Atmospheric:
cloud-cover,relative-humidity,mean-sea-level-pressure - Wind:
wind-speed-at-10m,vertical-velocity-at-100m
Example Output
The examples folder contains sample visualisations demonstrating the DCCMS styling:
| File Name | Description | Preview |
|---|---|---|
2t-Malawi.png |
Temperature visualisation for Malawi | |
tp-Africa.png |
Precipitation map across Africa | |
tcc-Malawi.png |
Cloud cover analysis | |
r-Africa.png |
Relative humidity patterns |
Magics
The same styles are also available in the
Magics style-library format. Installing this
package deploys a complete Magics style library — the stock ECMWF one with the
DCCMS styles merged in — to <sys.prefix>/share/magics/styles/dccms. Point
MAGICS_STYLE_PATH at it and Magics will pick the DCCMS style for a field from
its metadata:
export MAGICS_STYLE_PATH="$(python -c 'import sys; print(sys.prefix)')/share/magics/styles/dccms"
from Magics import macro as magics
magics.plot(
magics.output(output_formats=["png"], output_name="2t"),
magics.mmap(subpage_map_projection="cylindrical"),
magics.mgrib(grib_input_file_name="2t.grib"),
magics.mcont(contour_automatic_setting="ecmwf"),
magics.mlegend(),
magics.mcoast(),
)
See share/magics/styles/dccms/README.md for the full contents, how to
install the DCCMS map decoration as a Magics theme, and the handful of places
where the two formats do not line up. The DCCMS pieces are generated from the
YAML styles by python tools/earthkit_to_magics.py, which merges them into the
vendored copy of the stock ECMWF library in
share/magics/styles/dccms.
Metadata
Release files for temporary-earthkit-plots-metno-styles 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| temporary_earthkit_plots_metno_styles-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Release files / temporary_earthkit_plots_metno_styles-0.1.0-py3-none-any.whl
| Download URL | temporary_earthkit_plots_metno_styles-0.1.0-py3-none-any.whl |
|---|---|
| Size | 186.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5af939bdbc1d459b735e0a6f02f3eda0bb1d9f218cafed1f0cbaae8b4021e03a
|
|
BLAKE2b-256 checksum How to use checksums |
d3d2e335f2acd3cf5d0c7baa7600cee6d1a894469159980eb857abed53f19ee3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.1
|
Security for temporary-earthkit-plots-metno-styles 0.1.0
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.