ocean-plot
中文 · Downloads · Report a problem
Ocean NetCDF plotting from the command line: SST maps, wind vectors and point time series, powered by xarray.
A small Python CLI for students and researchers who need repeatable figures from rectilinear ocean datasets. Tested with local NOAA OISST and RSS CCMP subsets; includes an offline synthetic demo. It preserves missing values, requires explicit selection of multiple time/depth records, and rejects unsupported grids.
Install and try
Requires Python 3.10+. Use a virtual environment.
python -m pip install "ocean-plot[netcdf4,maps] @ https://github.com/1460197441-web/ocean-plot/releases/download/v0.1.0/ocean_plot-0.1.0-py3-none-any.whl"
ocean-plot demo --output-dir demo
The demo requires no network or observational data. Its figures are explicitly marked SYNTHETIC — not observations. GitHub Releases are available; the package is not yet on PyPI.
Development install:
python -m pip install "git+https://github.com/1460197441-web/ocean-plot.git"
The basic installation uses SciPy for NetCDF3. Add netCDF4 for NetCDF4/HDF5 and cartopy for coastlines, or use the extras in the release installation above.
Your own data
ocean-plot inspect input.nc
ocean-plot sst oisst.nc --time-index 0 --bbox 118 126 30 40 --cartopy --output sst.png
ocean-plot wind ccmp.nc --time-index 0 --u uwnd --v vwnd --cartopy --output wind.pdf
ocean-plot timeseries oisst.nc --point 124 35 --output point.png --csv point.csv
- Recognizes common latitude/longitude, SST, and wind variable names; explicit overrides are available.
- Converts known Kelvin units to Celsius and validates geographic wind components in m/s. Arrows show where the wind blows toward, with a reference vector.
- Exports PNG/PDF at 300 dpi and CSV with actual selected coordinates and unrounded numeric values.
- Missing values stay missing. The tool does not interpolate or silently average extra dimensions.
Scope and limitations
Only 1D rectilinear geographic coordinates are supported. Reversed latitude and ordinary 0–360 longitude grids are reordered with their data. Dateline-crossing regional domains that become discontinuous are rejected before plotting; split the input first. A conservative gap check can also reject strongly irregular global grids. Curvilinear, staggered and rotated grids are unsupported.
Default output is a latitude/longitude coordinate plot without a coastline. --cartopy adds Natural Earth 50m coastlines and a visual land overlay; its first use downloads map data. The overlay does not change source values or replace the product's land mask.
Time series use the nearest in-range grid cell and support standard NumPy datetime calendars. NaN observations break the line; entirely absent timestamps do not. No sampling frequency is inferred and no dates are manufactured. See the Chinese reference for full selection and validation rules.
Development and feedback
python -m pip install -e ".[dev,netcdf4]"
pytest
python -m build
CI tests Python 3.10, 3.12 and 3.13. The current suite includes 42 tests covering scientific and CLI regressions.
If it helps your work, a Star or a reproducible issue is welcome. Include dataset/product metadata, coordinate names, units and the exact command; do not upload private data. Contributions are welcome.
MIT applies to the code. External datasets retain their own licenses and attribution requirements.
Metadata
Release files for ocean-plot 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| ocean_plot-0.1.0.tar.gz | 472.7 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ocean_plot-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 485.7 kB
Release files / ocean_plot-0.1.0.tar.gz
| Download URL | ocean_plot-0.1.0.tar.gz |
|---|---|
| Size | 472.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e62ac42142aed0de8b9622029db15769baed5d0ed994ae48d18c0b6f40f66ff0
|
|
BLAKE2b-256 checksum How to use checksums |
487aa1de0212fd86775849c4ea211da6eaac428a5f813d69d507bbbe96218fb8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Oct 21, 2026.
Transparency logRelease files / ocean_plot-0.1.0-py3-none-any.whl
| Download URL | ocean_plot-0.1.0-py3-none-any.whl |
|---|---|
| Size | 13.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fe2863c9df00b5dc1318fa5328144b3ee847759ee29bb7dd06c9a4e4ce858a82
|
|
BLAKE2b-256 checksum How to use checksums |
3a127335de0db962c55cb903662a13eb876befab7c90d4575f80024c309b784f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Oct 21, 2026.
Transparency logSecurity for ocean-plot 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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for ocean_plot-0.1.0.tar.gz
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 Oct 21, 2026.
Transparency logA 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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.