A coral reef viewed from above, with fish moving over a pale sandy seabed and a channel of deeper blue water winding through the coral.

The Challenge: Preserving the “Black Art” of Model Tuning

Ocean models—such as those NSF NCAR uses to simulate currents, temperatures, and coastal dynamics—rely on dozens to hundreds of tunable parameters to predict real-world behavior, often with incredible accuracy. Yet, modelers often refer to tuning as a “black art”: a craft that clearly works, but whose best practitioners struggle to fully explain.

Model tuning, the process of accurately capturing specific processes and real-world behavior with predictions, can be difficult to document and apply across models and domains. Getting critical ocean model parameters right depends on careful adjustments to data and model parameters that interact in unexpected ways, depending on region, resolution, software, and data.

Experts who do it well have built up years of judgment and tacit knowledge, and the process often requires creative, bespoke applications of oceanographic and computational expertise. Typically, the broader scientific community sees only successful model configurations; there’s no manual for how to get there or a record of past errors. When an expert retires or moves on, this knowledge disappears, leaving critical gaps in the model development pipeline.

To address this gap, NSF NCAR scientists Dan Amrhein and Aidan Janney (himself a former CISL SIParCS intern) set out to answer two key questions:

  • How can we better support a community of users who are tuning and developing purpose-built models to predict important ocean processes?
  • Can we preserve the model-development process when we have previously recorded only the final result?

The Project: Combining Human Expertise with AI

To tackle this challenge, the team explored novel natural language processing (NLP) and large language model (LLM) tools.

The team sat down with experienced modelers to conduct narrative-style interviews, capturing the dead ends, hard-won lessons, and tacit wisdom that never make it into formal papers. They then curated this qualitative data to fine-tune and context-prompt LLMs, demonstrating how a small, high-quality dataset can transform human experience into a responsive digital assistant.

Flow diagram with three stages. Data Collection (forums; modeling narratives) feeds Cleaning Data (manual editing; scripting and regex; LLMs to restructure and shorten), which feeds Fine-Tuning (make and model; techniques including LoRA, QLoRA and RAG) run on the Derecho supercomputer. An arrow from modeling narratives points to the question: How do we record lived experience? Interview the experts.

Figure 1: Demonstration of a standard data pipeline from collection to fine-tuning. In this figure, the training data come from online forums and are enhanced by modeling narrative (i.e., expert interviews), which addresses core insights from human tacit knowledge (as opposed to written knowledge). The data must be carefully prepared before fine-tuning, which tailors large language models to specific use cases. NSF NCAR provided state-of-the-art computational resources used to fine-tune these AI models.

Access the interview transcripts here: Expert Interviews on Regional Ocean Model Tuning and Development, with fine-tuning and database integration examples coming soon.

Four-part interview framework under the heading “How do we record lived experience? Interview the experts.” The parts are 1. Modeling Background, 2. Specific Experience, 3. Speculative Modeling, and 4. Summarize life’s work, each with sample questions. Alongside is a quote from a modeling expert: “Open boundary conditions are a black art.”

Figure 2: Example interview framework used to capture tacit expert modeling knowledge intended to target both specific and philosophical information through historical and speculative questions.

How It Works: Extending Static Documentation

This tool combines interview narratives with retrieved documentation, allowing users to describe their specific ocean model setup and problem. The LLM can then synthesize tailored advice from expert experiences to guide them.

While personal interactions with senior scientists remain invaluable, they often require travel, meetings, or email delays. Fine-tuned LLMs serve as an intermediate resource, enabling rapid troubleshooting and interactive development for students and researchers worldwide before they need to reach out to traditional modeling centers.

Workflow diagram titled “Ocean Model Advisor — Flow.” An Identify Relevant Research step branches to five user inputs: Upload Documents, Region Of Interest, Model Type, Model Resolution, and Question Or Issue. All five converge on a Synthesize Advice step, which also draws on an edited interview transcript PDF, and that produces Generate Model Advice: a single comprehensive HTML page.

Figure 3: When the system is provided with specific tuning details, it can synthesize advice from expert narratives and dynamically retrieve documentation later. The team is experimenting with LLM-driven apps and workflows, like the process above housed in Google Opal, to enable interactive model development for new scientists and students.

What’s Next for the Project

At its heart, this project ensures that invaluable institutional insight doesn’t retire alongside its owners. Moving forward, NSF NCAR plans to:

  • Expand the interview dataset and incorporate additional live technical documentation for dynamic retrieval (RAG).
  • Host live demonstrations of the LLM tools, showcasing fine-tuning techniques for small LLMs alongside dynamic workflows with frontier models.
  • Publish all code and curated datasets to allow the scientific community to reproduce these experiments and support future regional ocean model development.

Contact: Aidan Janney (ajanney@ucar.edu) for more information, questions, and LLM model access!