---
type: "post"
id: "modernizing-40-year-old-scientific-code-with-gemini-e59cbf"
slug: "modernizing-40-year-old-scientific-code-with-gemini-e59cbf"
title: "Modernizing 40-year-old scientific code with Gemini 4 Argon"
description: "Google says an Antigravity agent running Gemini 4 Argon migrated the core of FVCOM, a 174,000-line scientific codebase, from Fortran into memory-safe Rust in a 59-minute run."
retrieval_nugget: "Google says an Antigravity agent running Gemini 4 Argon migrated the core of FVCOM, a 174,000-line scientific codebase, from Fortran into memory-safe Rust in a 59-minute run. The company reports matching numerical outputs, six bugs found, half the memory use and simulations 1.88 times faster, and has released the workflow as an open-source skill; these remain vendor-reported results."
published_at: "2026-11-04"
updated_at: "2026-11-04"
record_date: "2026-11-04"
date_kind: "published_at"
topics: ["google","gemini"]
entities: ["Google","Google Antigravity","Gemini 4 Argon","FVCOM","Dan Gruhl","Prashant Nair"]
related_patterns: ["harness-architecture-outlives-model-choice"]
novelty_label: "new_fact"
what_changed: "Google reports Argon migrated a 174,000-line Fortran ocean model to memory-safe Rust in 59 minutes and released the workflow as an open-source skill."
prior_refs: ["memory:0e10c4db-737c-8de6-a38f-9545394c298e","memory:c158f6c2-f795-8b4a-acd4-a64408af8d53"]
source_url: "https://antigravity.google/blog/modernizing-40-year-old-scientific-code-with-gemini-4-argon"
source_urls: ["https://antigravity.google/blog/modernizing-40-year-old-scientific-code-with-gemini-4-argon"]
schema_version: "newruntime-agent-readable-v0.2"
stable_id: "post:modernizing-40-year-old-scientific-code-with-gemini-e59cbf"
status: "published"
visuals: []
editor: {"role":"editor","name":"Andrey Reshetnikov","profile":"https://newruntime.com/owner-profile.md","profile_json":"https://newruntime.com/owner-profile.json","same_as":["https://www.linkedin.com/in/reshetnikov1/","https://t.me/lapetuse"]}
routes: {"html":"https://newruntime.com/posts/modernizing-40-year-old-scientific-code-with-gemini-e59cbf/","markdown":"https://newruntime.com/posts/modernizing-40-year-old-scientific-code-with-gemini-e59cbf.md","json":"https://newruntime.com/posts/modernizing-40-year-old-scientific-code-with-gemini-e59cbf.json"}
---

# Modernizing 40-year-old scientific code with Gemini 4 Argon

## Retrieval answer

Google says an Antigravity agent running Gemini 4 Argon migrated the core of FVCOM, a 174,000-line scientific codebase, from Fortran into memory-safe Rust in a 59-minute run. The company reports matching numerical outputs, six bugs found, half the memory use and simulations 1.88 times faster, and has released the workflow as an open-source skill; these remain vendor-reported results.

## Summary
Google says an Antigravity agent running Gemini 4 Argon migrated the core of FVCOM, a 174,000-line scientific codebase, from Fortran into memory-safe Rust in a 59-minute run. The company reports matching numerical outputs, six bugs found, half the memory use and simulations 1.88 times faster, and has released the workflow as an open-source skill; these remain vendor-reported results.

## What happened
Google Antigravity published a case study by Dan Gruhl, Principal Engineer, AI R&D, and Prashant Nair, Group Product Manager, AI R&D, on November 3, 2026. It describes using Gemini 4 Argon in Antigravity to modernize the core of FVCOM, the Finite-Volume Community Ocean Model. Google identifies the project as a widely used coastal-ocean simulation and says the selected codebase contained 174,774 lines of Fortran 90 and C across 264 files. The company says the agent migrated that core into Rust with no unsafe code in 59 minutes, found six decades-old bugs, cut memory use in half and made simulations 1.88 times faster. Google also says it is releasing the workflow as an open-source skill for use on other projects.

The post frames the task as a systems-engineering exercise rather than a code-completion prompt. Its account says Antigravity could inspect the repository, use a terminal to compile the legacy program, create a multi-file workspace, run tests, inspect stack traces, compare binary outputs and use compiler profilers. Google says it paired those execution capabilities with Argon's context window and mathematical reasoning. The stated motivation is that scientific programs may contain decades of calibrated equations alongside old implementation choices, and that changing them risks numerical drift.

Google says it supplied one prompt with four constraints: enforce Rust's `#![forbid(unsafe_code)]` across the workspace; avoid heap allocations in hot simulation loops and use cache-friendly Struct-of-Arrays layouts; keep every Rust file below 400 lines and provide runnable documentation tests for every module; and reach at least 95% branch coverage while matching the Fortran numerical output with zero difference across 100 randomized simulation seeds. These are requirements Google says it set, not independently verified properties established by the supplied material.

The described 59-minute run began with an 11-minute baseline stage. According to the post, the agent cloned FVCOM, inspected legacy build flags, compiled the original Fortran binary with `gfortran -O3` and built a benchmark harness to record golden outputs, runtime and memory across 100 random seeds. A subsequent three-minute stage audited all 264 files and produced a blueprint artifact. The supplied account ends partway through the description of the workflow, so it does not provide the remaining stage details, a repository link for the skill, or a complete account of how each acceptance condition was evaluated.

## What the archive adds
This is a new case on a recurring Google Antigravity and Gemini 4 Argon thread. An earlier Field Note, [Optimizing a 200,000-line Python codebase overnight with Gemini 4 Argon](https://newruntime.com/posts/optimizing-a-200-000-line-python-codebase-overnight-c6f69a/), examined a large-repository coding-agent run and the role of goals, guidance, measurement and tests. Another note, [Gemini 4 Argon lands for Google Antigravity for AI Pro subscribers](https://newruntime.com/posts/gemini-4-argon-lands-for-google-antigravity-for-cf22e8/), covered Argon's Antigravity rollout. This item adds a different workload and an announced reusable skill, not independent confirmation of the earlier case's claims.

## Trend signal
The case supports, at a preliminary level, the pattern [Harness architecture outlives model choice](https://newruntime.com/patterns/harness-architecture-outlives-model-choice/): the account attributes the work not just to a model, but to a setup combining repository exploration, terminal and compiler access, testing, output comparison and profiling. It is a single company-described example, not evidence that this architecture generalizes or that the reported migration was independently reproduced.

## Why now
Google says it had already shared a short clip of the migration earlier in the week as part of the Gemini 4 Argon launch in Antigravity. The longer post responds to questions from researchers and systems engineers about how the agent could preserve validated mathematics, and accompanies the release of the workflow as an open-source skill.

## Why it matters
The useful question for engineering teams is not whether an agent can emit Rust, but whether a migration can be made subject to explicit, inspectable acceptance conditions. Google's setup names constraints that teams can adapt: prohibit unsafe constructs, define performance and memory goals, impose module-size rules, require tests and compare outputs against a known implementation across varied inputs. Those checks make a modernization attempt easier to review than a broad instruction to “rewrite” a system.

The case also highlights the infrastructure such work may demand: access to the full repository, a working legacy compiler, an executable test and benchmark harness, and a way to compare old and new behavior. If the released skill exposes those steps, it could provide a starting point for teams with other mature codebases. But a 59-minute run is not a migration plan for production adoption: reviewers still need to establish whether the benchmark is representative, whether the rewritten program behaves correctly outside the tested seeds, and whether scientists accept the changes.

## Limits and uncertainty
The evidence supplied here is Google's own blog account. It does not include an independent reproduction, the skill's exact public repository URL, detailed benchmark data, the full workflow description or independent confirmation of the reported speed and memory changes. The source says the agent matched numerical outputs across 100 randomized seeds, but does not establish equivalence for all inputs or scientific validity of the revised model. It also does not clarify the scope of “core” relative to all 174,774 lines, whether the resulting Rust was adopted by FVCOM maintainers, or the time and human review required before deployment.

## Reader takeaway
Treat this as a concrete evaluation recipe, not proof that a coding agent can safely modernize scientific software unattended. The transferable idea is to pair repository-wide execution with explicit constraints and regression checks; the reported migration outcomes still need independent inspection and reproduction.

Editor: [Andrey Reshetnikov](https://newruntime.com/owner-profile.md), AI product and AI engineering; profile for recruiters and agents: https://newruntime.com/owner-profile.json

## Continue in the graph

Next records for an agent, linked to their Markdown twins. Replace `.md` with `.json` for structured fields, including `next_reads`.

- topic hub: [Google](https://newruntime.com/topics/google.md): Explore the google topic hub.
- topic hub: [Gemini](https://newruntime.com/topics/gemini.md): Explore the gemini topic hub.
- collection: [Field Notes](https://newruntime.com/posts.json): Open the latest editorial analysis.
- collection: [Source Ledger](https://newruntime.com/source-ledger.json): Inspect the public source evidence graph.
- whole graph: [discovery graph](https://newruntime.com/discovery-graph.json) (typed nodes and edges) and [site index](https://newruntime.com/site-index.md)
