WW3Tool
WAVEWATCH III 工作流工具包 —— 围绕 WAVEWATCH III(第三代海浪数值模式)的 预处理与运行辅助工具。纯 Python 编写,支持 Windows / Linux / macOS, 提供 CLI / 交互式 Shell / 桌面 GUI / MCP server 四种使用方式,界面中英双语。
这是什么
WW3Tool 不替代 WW3 可执行文件(ww3_grid、ww3_prnc、ww3_shel 等),
而是把这些流程串起来、自动化:
- 强迫场预处理:风场 NetCDF 文件的校验 / 修复 / 合并(纬度排序、变量重命名、时间轴修正)
- 网格生成:结构化矩形网格(任意深度双向嵌套)/ 非结构化三角网格 / SMC 网格
- 自动配置:生成 WW3 全套 namelist(
ww3_grid.nml、ww3_prnc.nml、ww3_shel.nml、ww3_ounf.nml、ww3_multi.nml等),支持 v6.07.1 与 v7.14 - 运行脚本:自动生成正确调用
ww3_grid/ww3_prnc/ww3_shel的脚本 - HPC 对接:SSH 上传工作目录到超算、配置 Slurm、提交作业、监控状态、下载结果
- 后处理绘图:波高填色图、方向谱、Jason-3 卫星验证、NDBC 浮标匹配
安装
一条指令,所有平台相同(macOS / Linux / Windows):
pip install ww3tool
需要桌面图形界面(GUI):
pip install "ww3tool[gui]"
要求:Python 3.9+。安装后
ww3tool命令直接可用,无需额外配置。
快速开始
ww3tool --help # 查看全部命令
ww3tool workdir my_run # 从内置模板创建工作目录并进入
ww3tool config # 查看 / 修改配置(风场路径、网格参数等)
ww3tool print-params # 打印当前工作目录的参数
workdir 会从内置模板生成 params.yml;编辑该文件配置风场 / 网格 / 计算参数后,
再执行对应子命令生成网格、namelist 与运行脚本。
桌面图形界面(GUI)
ww3tool # 无参数默认启动桌面(需先安装 GUI 扩展)
# 或显式:ww3tool desktop
交互式命令行(shell)
ww3tool shell
支持 Tab 补全与历史记录,与 GUI 共用同一套配置。
MCP server(供 AI 客户端调用)
仓库提供 MCP server(34 个 ww3tool_* 工具 + list_commands,stdio 传输),
可直接接入 Claude / Cursor 等 AI 客户端。配置方法见 GitHub 仓库
public/packaging/mcp/ 目录下的说明与示例配置。
相关链接
- GitHub 仓库(完整文档、网格生成器源码、示例):https://github.com/ZxyGch/WW3Tool
- 安装 / 发布 / MCP 详细说明:仓库内
public/packaging/PACKAGING.md
Metadata
Release files for ww3tool 0.1.3
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 | |
|---|---|---|---|---|
| ww3tool-0.1.3.tar.gz | 6.4 MB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ww3tool-0.1.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 13.5 MB
Release files / ww3tool-0.1.3.tar.gz
| Download URL | ww3tool-0.1.3.tar.gz |
|---|---|
| Size | 6.4 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6e7367d2df421f210e9873297aed6836ea0c53d4268a67007e7ecd926e6fbd0f
|
|
BLAKE2b-256 checksum How to use checksums |
a0559ba54c0af989ea2986085bfa1a21c98d3cc4a7e07196be1ca2f1b63918d8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.13
|
Release files / ww3tool-0.1.3-py3-none-any.whl
| Download URL | ww3tool-0.1.3-py3-none-any.whl |
|---|---|
| Size | 7.1 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7f4a6687980ddf9cd5032a784807024e9827af55f8fe2765db35d9a57efc710c
|
|
BLAKE2b-256 checksum How to use checksums |
dd068b21d2ecb82ef4ae00f839cf2a5a01309520916c50715819f6301ccf20a1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.13
|
Security for ww3tool 0.1.3
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.