SearcharxivSearch

arXiv subjects

Sebastian Beyer

Publications and source records attributed to Sebastian Beyer.

3 recordsLinked to original sources

FESOM2-JAX v1.0: a differentiable shadow of the ocean-sea-ice model FESOM2, cast onto GPUs

We present FESOM2-JAX, a Python re-implementation of the Finite-volumE Sea ice-Ocean Model (FESOM2) in JAX. The model retains the unstructured-mesh, cell-vertex finite-volume formulation of the original, runs unchanged from a laptop CPU to 256 GPUs, and is end-to-end differentiable. FESOM2-JAX is a code shadow of the Fortran model: a projection onto the Python ecosystem, translated with large language models and verified kernel by kernel against the original. It is built to lower the barrier to experimentation, from new numerics and parameterizations to gradient-based calibration and hybrid physics-machine-learning components, while remaining close enough to the original so that what is developed in the shadow can be transferred back. In a 1958-2019 hindcast at 1$^{\circ}$ equivalent resolution with identical physics and forcing, the mean states of the JAX and Fortran versions differ from each other by two orders of magnitude less than either differs from observations, and the two runs agree for six decades in global temperature, salinity, heat content, and sea ice. The complete 1$^{\circ}$ configuration fits on a single GPU, a node of four GH200 superchips integrates $\sim$113 simulated years per wall-clock day, and meshes of up to 7.4 million surface vertices ($\sim$5 km) scale to 128 GPUs. What limits the model is communication rather than arithmetic. What the shadow adds to the original is the gradient: a single reverse-mode pass through the full time loop returns the sensitivity of a model diagnostic to a parameter at every mesh vertex, verified against finite differences. To our knowledge, FESOM2-JAX is the first global ocean-sea-ice model of CMIP-class complexity written natively in a differentiable framework, and the first on an unstructured mesh.

physics.ao-ph

An Ocean Model Ported by a Large Language Model: Experience and Lessons from FESOM2 (Fortran to C to C++/Kokkos)

Large language models (LLMs) can translate and modify source code, and have been shown to do so for codes of different complexity. Whether they can port a complete, production geophysical model to a different language without degrading its physics has not been established. We demonstrate that LLM-assisted code translation can preserve the physics of a complete production ocean model while moving it into a modern performance-portable form. We report our experience using an agentic LLM coding assistant, directed by domain experts, to port the FESOM2 unstructured mesh ocean--sea-ice model (about 74000 lines of core Fortran) first to C and then to C++/Kokkos for performance portability across CPUs and GPUs. We describe the practices that proved necessary, what worked and what did not, and the failure modes that we encountered. Three practices mattered most: translating in two stages that separate reproducing the numerics (Fortran to a clean C reference) from introducing parallelism (C to Kokkos); requiring a strictly literal translation in which the assistant was not permitted to ``improve'' the source; and validating each stage against an acceptance criterion suited to it. The C port reproduces the original Fortran at the level of long-term simulation statistics over five years. The Kokkos port is bit-for-bit identical to the C reference on CPU and statistically close on GPU over multi-year runs. On eddy-rich meshes up to 7.4 million surface vertices a single A100 GPU node runs 1.6--3.7 times faster than a CPU node, reaching the 1-2 simulated-years-per-day required for production integrations. The result is more than a single GPU port: by following a clear validation procedure, an LLM moved a full Fortran ocean model into another language and onto accelerators while preserving its physics in a matter of weeks.

physics.ao-ph

The Effects of Ligand Substituents on the Character of Zn-Coordination in Zeolitic Imidazolate Frameworks

Due to their favorable properties and high porosity, zeolitic imidazolate frameworks (ZIFs) have recently received much limelight for key technologies such as energy storage, optoelectronics, sensorics, and catalysis. Despite the widespread interest in these materials, fundamental questions regarding the zinc coordination environment remain poorly understood. By focusing on zinc(II)2-methylimidazolate (ZIF-8) and its tetrahedrally coordinated analogs with Br-, Cl-, and H-substitution in the 2-ring position, we aim to clarify how variations in the local environment of Zn impact the charge distribution and the electronic properties of these materials. Our results from density-functional theory confirm the presence of a Zn coordinative bond with a large polarization that is quantitatively affected by different substituents on the organic ligand. Moreover, our findings suggest that the variations induced by the functionalization in the Zn coordination have a negligible effect on the electronic structure of the considered compounds. On the other hand, halogen terminations of the ligands lead to distinct electronic contributions in the vicinity of the frontier region which ultimately reduce the band-gap size by a few hundred meV. Experimental results obtained from X-ray absorption spectroscopy (Zn $K$-edge) confirm the trends predicted by theory and, together with them, contribute to a better understanding of the structure-property relationships that are needed to tailor ZIFs for target applications.

cond-mat.mtrl-sci