Token导航 LogoToken导航TokenDH.com
研究检索需要联网clawhub未标认证来源可访问clear审计通过

worldclim-extract世界气候提取物

Agent Skill

worldclim-extract 用于查找、检索和筛选相关信息,适合在 OpenClaw 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

1,152

周安装

49

GitHub Stars

公开资料未说明

下载量

404
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:worldclim-extract(世界气候提取物)
来源仓库:https://github.com/zd200572/worldclim-extract
安装命令:
openclaw skills install worldclim-extract
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install worldclim-extract

简介

从WorldClim GeoTIFF提取生物气候变量BIO1-BIO19。

  • 支持自动下载栅格并按经纬度采样。worldclim-extract 属于研究检索类 Skill,可作为该场景下的辅助能力补充。
  • 通过clawhub安装,需确认存储空间和网络带宽。
  • 使用前应评估是否会下载大文件或执行地理计算。
  • 建议结合原始文档了解坐标系统和变量映射规则。

SKILL.md

name
worldclim-extract
description
Extract bioclimatic variables (BIO1-BIO19) from WorldClim GeoTIFF rasters using sample coordinates (longitude/latitude). Supports automatic download of WorldClim 2.1 data, batch extraction from Excel/CSV, and output to Excel or CSV. Use when matching geographic sample points to climate data like annual temperature or precipitation.
metadata

Version Compatibility

Reference examples tested with: Python 3.10+, rasterio 1.4+, pandas 2.0+

Before using code patterns, verify installed versions match. If versions differ:

  • pip show rasterio pandas openpyxl

If code throws ImportError, install missing packages:

pip install rasterio pandas openpyxl

Overview

WorldClim provides global climate data as GeoTIFF raster files. Each .tif file is a grid covering the entire Earth, where each grid cell stores a climate value (e.g., temperature in °C or precipitation in mm). This skill automates the process of extracting climate values for specific geographic coordinates.

How It Works

  1. Input: Excel or CSV file containing sample coordinates (longitude, latitude)
  2. Data: WorldClim 2.1 bioclimatic GeoTIFF files (19 BIO variables, 1970-2000 average)
  3. Process: For each coordinate, find the corresponding grid cell and read its value
  4. Output: Original data plus extracted climate columns appended

Grid Resolution

ResolutionCell SizeApprox. AreaFile Size
10m0.167°~18.5 km²~48 MB zip
5m0.083°~9.3 km²~170 MB zip
2.5m0.042°~4.6 km²~650 MB zip

Default: 10m — sufficient for most ecological/population genetics studies.

Quick Start

Using the CLI Script

A reusable Python script is provided at {baseDir}/extract_worldclim.py:

# Extract BIO1 (annual mean temp) and BIO12 (annual precipitation) — default
python3 {baseDir}/extract_worldclim.py \
  -i samples.xlsx \
  -o samples_with_climate.xlsx

# Extract all 19 bioclimatic variables
python3 {baseDir}/extract_worldclim.py \
  -i samples.xlsx \
  -o samples_all_bio.xlsx \
  --bios 1-19

# Extract specific variables with custom column names
python3 {baseDir}/extract_worldclim.py \
  -i coords.csv \
  -o result.xlsx \
  --bios 1,5,6,12,13 \
  --res 2.5m \
  --lon longitude \
  --lat latitude

Using Python Directly

For custom integration or programmatic use:

import pandas as pd
import rasterio

def extract_bio(tif_path, lon, lat):
    """Extract a single value from a GeoTIFF at given coordinates."""
    with rasterio.open(tif_path) as src:
        value = next(src.sample([(lon, lat)]))[0]
    return value

# Read sample coordinates
df = pd.read_excel("samples.xlsx")
coords = list(zip(df["经度"], df["纬度"]))

# Extract BIO1 (Annual Mean Temperature)
with rasterio.open("wc2.1_10m_bio_1.tif") as src:
    df["年均温度_C"] = [v[0] for v in src.sample(coords)]

# Extract BIO12 (Annual Precipitation)
with rasterio.open("wc2.1_10m_bio_12.tif") as src:
    df["年降水量_mm"] = [v[0] for v in src.sample(coords)]

df.to_excel("samples_with_climate.xlsx", index=False)

WorldClim Data Download

Automatic (script handles it)

The CLI script auto-downloads data on first run to the --cache directory (default: ./worldclim_data).

Manual Download

If automatic download fails (e.g., network issues):

# 10m resolution (~48 MB)
curl -O https://geodata.ucdavis.edu/climate/worldclim/2_1/base/wc2.1_10m_bio.zip
unzip wc2.1_10m_bio.zip -d ./worldclim_data/

# 2.5m resolution (~650 MB)
curl -O https://geodata.ucdavis.edu/climate/worldclim/2_1/base/wc2.1_2.5m_bio.zip
unzip wc2.1_2.5m_bio.zip -d ./worldclim_data/

BIO Variable Reference

BIONameUnitDescription
BIO1Annual Mean Temperature°C年均温度
BIO2Mean Diurnal Range°C昼夜温差月均值
BIO3Isothermality%等温性 (BIO2/BIO7 × 100)
BIO4Temperature SeasonalitySD × 100温度季节性
BIO5Max Temp of Warmest Month°C最暖月最高温
BIO6Min Temp of Coldest Month°C最冷月最低温
BIO7Temperature Annual Range°C年温度范围 (BIO5−BIO6)
BIO8Mean Temp of Wettest Quarter°C最湿季均温
BIO9Mean Temp of Driest Quarter°C最干季均温
BIO10Mean Temp of Warmest Quarter°C最暖季均温
BIO11Mean Temp of Coldest Quarter°C最冷季均温
BIO12Annual Precipitationmm年降水量
BIO13Precipitation of Wettest Monthmm最湿月降水量
BIO14Precipitation of Driest Monthmm最干月降水量
BIO15Precipitation SeasonalityCV降水季节性
BIO16Precipitation of Wettest Quartermm最湿季降水量
BIO17Precipitation of Driest Quartermm最干季降水量
BIO18Precipitation of Warmest Quartermm最暖季降水量
BIO19Precipitation of Coldest Quartermm最冷季降水量

Data Source: WorldClim 2.1 (1970-2000, 30-year average)

Input Format Requirements

Required Columns

  • Longitude column: Decimal degrees, range [-180, 180]. Default column name: 经度 (override with --lon)
  • Latitude column: Decimal degrees, range [-90, 90]. Default column name: 纬度 (override with --lat)

Supported Input Formats

  • .xlsx — Excel workbook (recommended, handles Chinese headers well)
  • .csv — Comma-separated values

Common Issues

IssueCauseSolution
Coordinates read as textHidden special characters (e.g., non-breaking space)Script auto-cleans with pd.to_numeric(errors='coerce'); check for NA after conversion
Negative longitudes rejectedUsing East/West format instead of decimalConvert to decimal: 东经 117° → 117.0; 西经 117° → -117.0
Missing extracted valuesCoordinate falls in ocean or outside raster boundsCheck coordinate validity; WorldClim covers land globally

Output Format

The output file contains all original columns plus extracted BIO columns:

名称    经度        纬度        年均温度_C    年降水量_mm
NFAL10  117.214052  31.270421   16.15        1325.0
NFBJ1   116.591445  40.032115   11.88        542.0

Using R (terra) for Cross-Validation

If you need to validate results with R:

library(terra)

# Read raster stack
bio <- rast(list.files("./worldclim_data", pattern = "\\.tif$", full.names = TRUE))

# Read and clean coordinates
pts <- readxl::read_excel("samples.xlsx")
pts$经度 <- as.numeric(gsub("\\s+", "", pts$经度))  # Remove hidden spaces
pts$纬度 <- as.numeric(pts$纬度)
pts <- pts[!is.na(pts$经度) & !is.na(pts$纬度), ]

# Extract
v <- vect(pts, geom = c("经度", "纬度"), crs = "EPSG:4326")
result <- extract(bio, v)
write.csv(cbind(pts, result[, -1]), "output.csv", row.names = FALSE)

Note: R's as.numeric() is stricter than Python's pandas and may fail on hidden whitespace. Always clean coordinates before conversion.

Decision Tree

Need to extract climate data for sample coordinates?
├── Have coordinates in Excel/CSV?
│   └── Use the CLI script: python3 extract_worldclim.py -i input.xlsx -o output.xlsx
├── Need only temperature and precipitation?
│   └── Default: --bios 1,12 (no need to specify)
├── Need all 19 bioclimatic variables?
│   └── Use: --bios 1-19
├── Need higher spatial resolution?
│   ├── ~9 km cells → --res 5m
│   └── ~4.6 km cells → --res 2.5m
└── Need to integrate into a Python pipeline?
    └── Use the direct Python code pattern with rasterio.sample()

Related Skills

  • bio-geo-data — For general geospatial data operations
  • bio-read-sequences — For biological sequence file parsing
  • bio-batch-processing — For processing multiple files in batch

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

78.93%
按下载量换算319

安全审计

VirusTotal

未展示

ClawScan

通过

Static analysis

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills