Pastas logo

Pastas

Community
SteadfastAsArt
pastas

Groundwater time series analysis and modelling using transfer function noise models. Use when the agent needs to: (1) Analyze groundwater level time series, (2) Model well responses to precipitation/pumping, (3) Calibrate aquifer parameters from head data, (4) Forecast or hindcast groundwater levels, (5) Decompose hydrological signals into components, (6) Compare response functions, (7) Perform model diagnostics and uncertainty analysis.

Overview

PublisherSteadfastAsArt
Repositorygeoscience-skills
Skill namepastas
Stars
75
Forks
9
Bundled files
3
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 3 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by SteadfastAsArt on GitHub. Read the source before you install it.

Installation

Install the Pastas AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/SteadfastAsArt/geoscience-skills/tree/main/pastas
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/SteadfastAsArt/geoscience-skills.git /tmp/geoscience-skills
mkdir -p .claude/skills
cp -r /tmp/geoscience-skills/pastas .claude/skills/pastas
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Pastas in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Pastas on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Pastas is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Groundwater response models with Pastas

Use Pastas for a well's response to time-varying stresses. Fitted response parameters are effective model parameters; they do not by themselves establish transmissivity, aquifer geometry or hydraulic connectivity. Use FloPy/MODFLOW for a supported spatial-flow question.

This entrypoint targets Pastas 2.0. Its component constructors accept the owning model and register themselves; older add_stressmodel patterns are being retired. Use the tested dependency baseline for reproducible work. The 2.0 package also needs tqdm for its imported solver timer in the checked environment.

Prepare data and reserve evaluation dates

Record the head unit and vertical reference, well/screen, timestamp convention, stress units and whether evaporation is measured or estimated reference potential evaporation. A negative relative head or depth-to-water series is not automatically elevation above sea level. Preserve the original datum.

For daily recharge models use consistently converted head (m), precipitation and reference evaporation (mm/day). Preserve daily accumulation labels; do not invent a timezone or shift dates without knowing the observation support. Missing rainfall is not zero. Keep head gaps unfilled, check stress coverage through the model warmup, and record any stress infilling with its calibration source. Pastas defaults can fill and extend stresses, so make these choices explicit before constructing the model.

Fix calibration and holdout dates before fitting. Construct the model using calibration heads and stresses only, including data-derived initial values. Future observed stresses may support a hindcast; future observed heads must not adjust fitted parameters or simulated state. A forecast additionally needs specified future stress scenarios and uncertainty.

Calibrate a checked recharge model

This function expects unique, ordered daily-date Series, complete nonnegative stresses covering the requested observed warmup, and at least three finite calibration heads. Those input checks are enforced by the bundled helper.

python
import pastas as ps

def fit_recharge(calibration_head, calibration_precip, calibration_evap,
                 start, end, warmup_days):
    model = ps.Model(calibration_head, name='well')
    settings = {'freq': 'D', 'sample_up': 'bfill', 'sample_down': 'mean',
                'fill_nan': None, 'fill_before': None, 'fill_after': None}
    ps.RechargeModel(model, calibration_precip, calibration_evap,
                     rfunc=ps.Gamma(), recharge=ps.rch.Linear(), name='recharge',
                     settings=(settings.copy(), settings.copy()))
    ps.ArNoiseModel(model)
    model.solve(tmin=start, tmax=end, warmup=warmup_days, report=False)
    if not model.solver.result.success:
        raise RuntimeError('Calibration did not converge')
    return model

The calibration helper validates CSV shape, dates, explicit calibration windows and stress coverage, then saves .pas with model.to_file(...). Plotting is optional. It assumes already normalized units; it does not guess them from column names or perform missing-stress fills.

bash
python scripts/groundwater_model.py head_m.csv rain_mm_day.csv evap_mm_day.csv \
  --calibration-start 2005-01-01 --calibration-end 2013-12-31 \
  --warmup-days 730 --noise --output fitted.pas

Resolve the script relative to this installed skill directory. A calibrated file is not a completed holdout evaluation: report baselines, independent observed-date metrics and residuals using the fixed evaluation period.

Contributions, diagnostics and persistence

model.get_contributions() returns a list of Series, possibly split into precipitation and evaporation components. Iterate the list or request one combined contribution with model.get_contribution('recharge'); do not call .items() on it. Add the fitted constant when checking the total simulation. A block response represents a finite-duration stress block, not an instantaneous impulse. Use model.get_step_response and model.get_block_response accordingly.

Save with model.to_file('model.pas'), reload with ps.io.load('model.pas'), and compare simulations on the same date window. There is no Model.to_json method in the checked API. Adding ps.ArNoiseModel(model) is distinct from merely passing a noise=True solver flag.

Use ps.stats.acf(residuals, lags=[1, 7, 30], bin_method='gaussian') when observations have gaps; specify lag units in days and inspect pair counts. Residual and noise-series diagnostics answer different questions. AIC/BIC comparison requires the same observations/objective, and a universal EVP>70% threshold is not a validation criterion. Persistent innovation correlation limits confidence in conventional parameter standard errors.

Read stress configuration for pumping/river inputs and nonlinear recharge, or response interpretation for parameter signs, units and response tails. These conditional structures need their own data and diagnostics.

Executed scope

The project's hydrogeological workflow runs a fixed public USGS/GSOD recharge hindcast with Pastas 2.0: QC, calibration-only fitting, three baselines, residual ACF, continuous holdout simulation and save/load readback. The helper's daily recharge path and pumping-response sign also have real-library checks. This does not validate every nonlinear, multiwell or uncertainty configuration.

Official Pastas 2.0 release, versioned model API source, checked 2026-09-15.

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Pastas AI skill do?

Groundwater time series analysis and modelling using transfer function noise models. Use when the agent needs to: (1) Analyze groundwater level time series, (2) Model well responses to precipitation/pumping, (3) Calibrate aquifer parameters from head data, (4) Forecast or hindcast groundwater levels, (5) Decompose hydrological signals into components, (6) Compare response functions, (7) Perform model diagnostics and uncertainty analysis.

Why use Pastas on TypingMind?

Because you install it once and use it with any model. Pastas is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Pastas in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/SteadfastAsArt/geoscience-skills/tree/main/pastas. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Pastas?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Pastas?

As many as you like. As long as a model supports skills, you can use Pastas with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Pastas AI skill free?

Yes. It is published on GitHub by SteadfastAsArt under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇