Token导航 LogoToken导航TokenDH.com
待分类需要联网github未标认证来源可访问许可证需确认审计异常

pastaspastas 命令行

Agent Skill

pastas 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

282

周安装

12

GitHub Stars

23

下载量

99
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

请帮我安装这个 Agent Skill:pastas(pastas 命令行)
来源仓库:https://github.com/steadfastasart/geoscience-skills
仓库路径:skills/pastas
安装命令:
npx skills add https://github.com/steadfastasart/geoscience-skills --skill pastas
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/steadfastasart/geoscience-skills --skill pastas

简介

用于处理 GitHub 仓库、Issue 和 Pull Request。

  • 适合围绕代码变更和协作事项进行信息整理。
  • 可结合来源仓库和原始 README 核验具体用法。
  • 安装前建议确认权限范围和维护状态。pastas 属于待分类类 Skill,可作为该场景下的辅助能力补充。
  • 注意是否会触发命令执行或文件读写操作。

SKILL.md

Pastas - Groundwater Time Series Analysis

Quick Reference

import pastas as ps
import pandas as pd

# Load data
head = pd.read_csv('well.csv', index_col=0, parse_dates=True).squeeze()
precip = pd.read_csv('precip.csv', index_col=0, parse_dates=True).squeeze()
evap = pd.read_csv('evap.csv', index_col=0, parse_dates=True).squeeze()

# Create model
ml = ps.Model(head, name='Well_001')

# Add recharge stress
sm = ps.RechargeModel(precip, evap, rfunc=ps.Gamma(), name='recharge')
ml.add_stressmodel(sm)

# Solve and plot
ml.solve()
ml.plot()

Key Classes

ClassPurpose
ps.ModelMain model container
ps.StressModelResponse to external stress (pumping, river)
ps.RechargeModelRecharge from precipitation minus evaporation
ps.GammaGamma distribution response function
ps.ExponentialSimple exponential response function

Essential Operations

Create and Solve Model

ml = ps.Model(head, name='well')
ml.add_stressmodel(ps.RechargeModel(precip, evap, rfunc=ps.Gamma(), name='recharge'))
ml.solve()

Add Pumping Well

pumping = pd.read_csv('pumping.csv', index_col=0, parse_dates=True).squeeze()
ml.add_stressmodel(ps.StressModel(pumping, rfunc=ps.Hantush(),
                                   name='pumping', up=False))  # up=False for drawdown

Model Diagnostics

print(f"EVP: {ml.stats.evp():.1f}%")      # Explained variance
print(f"RMSE: {ml.stats.rmse():.3f} m")   # Root mean square error
print(f"AIC: {ml.stats.aic():.1f}")       # Model selection criterion

ml.plots.diagnostics()                     # Diagnostic plots
ml.plots.acf()                            # Autocorrelation

Get Contributions

contributions = ml.get_contributions()
for name, contrib in contributions.items():
    print(f"{name}: mean={contrib.mean():.2f}")

Step and Impulse Response

step = ml.get_step_response('recharge')    # Step response
block = ml.get_block_response('recharge')  # Impulse response

Export and Load

ml.to_json('model.pas')                    # Save model
ml_loaded = ps.io.load('model.pas')        # Load model

sim = ml.simulate()
sim.to_csv('simulation.csv')               # Export results

Model Statistics

StatisticDescriptionGood Value
EVPExplained variance percentage>70%
RMSERoot mean square errorLow (context-dependent)
AICAkaike Information CriterionLower = better
BICBayesian Information CriterionLower = better

Common Patterns

Compare Response Functions

for rfunc in [ps.Gamma(), ps.Exponential(), ps.Hantush()]:
    ml = ps.Model(head)
    ml.add_stressmodel(ps.RechargeModel(precip, evap, rfunc=rfunc, name='r'))
    ml.solve(report=False)
    print(f"{rfunc.name}: EVP={ml.stats.evp():.1f}%, AIC={ml.stats.aic():.1f}")

Forecast Future Levels

ml.solve()
forecast = ml.simulate(tmin='2024-01-01', tmax='2025-12-31')
ml.plot(tmax='2025-12-31')

River or Custom Stress

river = pd.read_csv('river_stage.csv', index_col=0, parse_dates=True).squeeze()
sm = ps.StressModel(river, rfunc=ps.Exponential(), name='river',
                    settings='waterlevel')
ml.add_stressmodel(sm)

When to Use vs Alternatives

Use CaseToolWhy
Groundwater time series analysisPastasPurpose-built transfer function models
Well response to recharge/pumpingPastasBuilt-in stress models and response functions
Numerical groundwater flow (MODFLOW)FloPyFull 3D finite-difference groundwater model
Simple exponential decay fittingCustom scipyscipy.optimize.curve_fit is sufficient
Regional groundwater flow modellingFloPySpatially distributed parameters and boundaries
Aquifer test analysis (pumping tests)Aqtesolv / customDedicated well test interpretation
Multi-well network analysisPastasModel each well independently, compare responses
Signal decompositionPastasSeparate recharge, pumping, and trend contributions

Choose Pastas when: You have groundwater level time series and want to model responses to precipitation, evaporation, or pumping using transfer function noise models. Excellent for rapid model building with diagnostics.

Choose FloPy when: You need spatially distributed groundwater flow modelling with MODFLOW, including multiple layers, boundary conditions, and transport.

Choose custom scipy when: You only need to fit a simple analytical model (e.g., Theis equation) to pumping test data without time series decomposition.

Common Workflows

Groundwater Response Model with Diagnostics

  • Load head time series and stress data (precipitation, evaporation, pumping)
  • Inspect data: check for gaps, outliers, and time coverage
  • Create ps.Model(head) with observation data
  • Add recharge stress with ps.RechargeModel(precip, evap, rfunc=ps.Gamma())
  • Add pumping or river stresses if applicable
  • Solve model with ml.solve()
  • Check EVP (>70%), RMSE, and AIC
  • Run ml.plots.diagnostics() to inspect residuals
  • Check residual autocorrelation; enable noise model if needed: ml.solve(noise=True)
  • Compare response functions (Gamma vs Exponential vs Hantush) using AIC
  • Extract step/block responses to interpret aquifer behavior
  • Decompose signal into individual stress contributions
  • Export model to JSON and simulation results to CSV

Tips

  1. Start simple - Add stresses incrementally
  2. Check residuals - Should be white noise (use ml.plots.diagnostics())
  3. Compare response functions - Use AIC/BIC to select best model
  4. Use daily data - Pastas works best with daily time series
  5. Normalize units - Precipitation in mm/day, head in meters

Common Issues

IssueSolution
Poor fit (low EVP)Try different response functions
Residual autocorrelationAdd noise model: ml.solve(noise=True)
Unstable parametersSet parameter bounds or fix values
Missing stress dataInterpolate or use fillna() before modeling

References

Scripts

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Codex

36.44%
按下载量换算36

Claude

31.11%
按下载量换算31

Cursor

17.55%
按下载量换算17

Gemini CLI

9.57%
按下载量换算9

安全审计

Gen Agent Trust Hub

通过

Socket

未通过

Snyk

通过

权限和风险

需要联网

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

安装前确认

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

来源信息

继续浏览同类 Skills