name: weather-radar description: Fetch and generate an image of the current weather radar combined with a base map. Use when the user wants to see a rain/weather radar map, current precipitation clouds, or radar overlay for a specific city or coordinates. Default zoom level is 7, which is optimal for macroscopic weather phenomena.
This skill provides a way to generate a composite animated GIF showing current and historical weather radar data overlaid on a real geographic base map (OpenStreetMap). It fetches real-time radar layers from RainViewer.
When the user asks for a weather radar map or animated cloud GIF for a location, run the Python script scripts/generate_radar.py to create the animation. It outputs a composite 3x3 tile grid (768x768 pixels).
First, look up the latitude and longitude of the requested city or use the provided coordinates. If no city is specified, default to the user's known location or a sensible default.
# Example for Beijing
python scripts/generate_radar.py --lat 39.9042 --lon 116.4074 --zoom 7 --out /home/ubuntu/.openclaw/workspace/radar_map.gif
Parameters:
- --lat: Latitude of the center point (float)
- --lon: Longitude of the center point (float)
- --zoom: Zoom level (default: 7). Note: Zoom 7 is optimal for weather systems. Higher zooms (like 9 or 10) often result in empty/missing radar tiles from the API.
- --frames: Number of frames to animate (default: 8, representing roughly the last 80 minutes).
- --out: Output path for the generated GIF image (must end in .gif).
After generating the radar_map.gif, send it to the user using the message tool with action="send", asDocument=true, and the filePath parameter set to the output image path.
7w4.net提供免费和付费技能下载。
The script requires requests and Pillow. If they are not installed, run pip install requests Pillow before executing the script.
这个天气雷达 Skill 整体质量良好,能有效生成带有时间戳的雷达动画图。它从可靠的天气数据源获取实时信息,文档清晰易懂,参数设置灵活。但存在一些小问题:缺少自动安装依赖的说明,文档中默认帧数与实际代码不一致,且地图缩放级别受限可能导致某些区域显示效果受限。对于需要快速获取天气雷达可视化图的用户来说,这是一个可用但仍有完善空间的工具。