SC2.20 | Using agentic coding for research software development and data analysis in environmental sciences: pitfalls and success stories
Using agentic coding for research software development and data analysis in environmental sciences: pitfalls and success stories
Convener: Christian Pagé | Co-conveners: Athanasios TsilimigkrasECSECS, Milica TosicECSECS

This short course is aimed at environmental scientists who write research code and run data analyses and want to use large language models (LLMs) effectively and safely. Used well, LLMs do more than speed up coding: they make it cheap to explore alternative methods, test ideas quickly, understand unfamiliar codebases and improve documentation and testing. Used carelessly, they introduce errors that are hard to spot. This course covers both sides.

We start with a practical introduction to how LLMs work and what that implies for their strengths and failure modes. We then cover the shift from chat-style assistance to agentic coding, where models read a whole repository, run code, inspect outputs and iterate on their own results. This makes them far more capable, but also makes verification and human oversight harder and more important. We then compare commercial models with open-weight models that can run locally and offline, covering capability, cost, privacy and hardware requirements, including deployment on institutional HPC systems and work on data that cannot leave the institution.

The core of the course is built on real examples from climate and hydrology software development and data analysis: cases where LLMs accelerated work and improved its quality, and cases where they produced plausible but wrong code, silently changed scientific logic, or invented functions and references. From these we derive concrete practices: how to constrain and prompt models for scientific code, how to use them for exploration without losing control of the analysis. We then cover how to give agents the right context, by connecting them to project documentation, data catalogues and domain conventions rather than relying on general knowledge, how to verify outputs through testing and review, how to share project context with collaborators so that LLM assistance is consistent across a team, and how to keep results reproducible. We also discuss data privacy, licensing of generated code, and transparent reporting of LLM use in publications.

No prior LLM experience is required; basic programming experience (e.g. Python) is assumed.