FuXi-Ocean

Model Introduction

FuXi-Ocean performs autoregressive ocean-field prediction at six-hour intervals from historical ocean states and initialization-time atmospheric variables, providing an executable engineering workflow for research on high-resolution ocean forecasting methods.

Paper: A deep learning global ocean forecasting model with sub-daily and eddy-resolving resolution
https://doi.org/10.1038/s41612-026-01444-2

Model Description

The method was proposed by research teams from Tianjin University, the Shanghai Academy of Artificial Intelligence for Science, Fudan University, the Shanghai Innovation Institute, FuXi Intelligent Computing Technology Co. Ltd, Hainan Tropical Ocean University, and collaborating institutions. The paper trains on HYCOM reanalysis and analysis ocean fields together with ERA5 near-surface atmospheric variables. The model performs autoregressive prediction of temperature, salinity, zonal current, meridional current, and sea-surface height at six-hour intervals.

Use Cases

Use Case Description
Autoregressive ocean-field prediction Validate the primary task of predicting subsequent ocean states from four historical states and initialization-time atmospheric variables on synthetic sampled tiles.
Core-method validation Validate shared convolutional encoding, a spatiotemporal prior, historical-feature fusion, low-resolution attention, shared decoding, and latitude-weighted Charbonnier loss.
Local engineering validation Validate indexing, overlap crops, data contracts, inference, evaluation, and visualization interfaces for the complete 2160×4320 scientific-grid protocol; the current workflow does not produce a complete global prediction.
ModelScope/OneCode execution Validate structured data, training, inference, per-lead ocean-forecast metrics, and visualization in ModelScope or OneCode environments.
Multi-GPU training Validate distributed training and the checkpoint workflow through torchrun.

Usage Instructions

1.OneCode

Experience intelligent, one-click AI4S programming through the OneCode online environment:

Try intelligent, one-click AI4S programming

2. Download and Installation

hf download OneScience-Group/FuXi-Ocean --local-dir ./FuXi-Ocean
cd FuXi-Ocean

Environment Dependencies

Hardware Requirements

  • A GPU or DCU is recommended.
  • A CPU can be used for connectivity validation with the default small-sample configuration.
  • DCU users must install DTK in advance. DTK 25.04.2 or later, or the OneScience-recommended version matching the current cluster, is recommended.

DCU Environment

# Activate DTK and Conda first
conda create -n onescience311 python=3.11 -y
conda activate onescience311
pip install onescience[earth-dcu] -i http://mirrors.onescience.ai:3141/pypi/simple/ --trusted-host mirrors.onescience.ai

GPU Environment

# Activate Conda first
conda create -n onescience311 python=3.11 -y libstdcxx-ng=12 libgcc-ng=12 gcc_linux-64=12 gxx_linux-64=12
conda activate onescience311
pip install onescience[earth-gpu] -i http://mirrors.onescience.ai:3141/pypi/simple/ --trusted-host mirrors.onescience.ai

Training Data

The paper uses HYCOM ocean fields and ERA5 near-surface atmospheric variables to predict the next six-hour ocean state on a 2160×4320 global grid from four historical states. This repository uses six structured synthetic tiles while preserving 105 ocean channels, five atmospheric channels, 26 depth levels, and the complete global indexing protocol. The synthetic data validate the engineering workflow only and do not represent the real HYCOM or ERA5 distributions, training scale, or paper performance.

python scripts/fake_data.py

Training

For single-device training, use:

python scripts/train.py

For multi-GPU training, use:

torchrun --nproc_per_node=8 --nnodes=1 --rdzv_id=1000 --rdzv_backend=c10d --max_restarts=0 --master_addr="localhost" --master_port=29500 scripts/train.py

Training uses latitude-weighted Charbonnier loss and multi-step autoregressive rollout; the default configuration reduces tiles, samples, model scale, epochs, and rollout length without reducing the real variables or global-coordinate protocol. Formal experiments require real HYCOM and ERA5 data and full-scale computing resources, with training artifacts saved to:

result/checkpoints/fuxi_ocean.pt
result/training/metrics.json

Trained Weights

This repository does not bundle official weights under weight/, and no confirmed official model weights were identified. The complete resource link in the paper's code-availability statement is https://doi.org/10.5281/zenodo.17412508; it must not be treated as a confirmed weight-download link. The local checkpoint is an engineering artifact trained on synthetic sampled_tiles and makes no compatibility claim with paper or official weights.

Inference

python scripts/inference.py

Inference loads the locally trained checkpoint and runs three autoregressive steps on test tiles by default while retaining a record of the paper's 40-step protocol. Outputs are explicitly marked as sampled_tiles and is_complete_global=false and include their coverage fraction, so they must not be treated as a completed global prediction. Numerical outputs and metadata are saved to:

result/output/predictions.npz
result/output/metadata.json

Evaluation and Visualization

python scripts/result.py

Evaluation computes latitude-weighted RMSE and MBE per lead for the model and persistence baseline over sampled tiles, reports S, T, U, V, and SSH unit groups separately, and retains per-channel results without averaging all 105 channels across incompatible units. Synthetic-data evaluation validates the engineering workflow only and does not represent formal paper performance. Results are saved to:

result/evaluation/metrics.json
result/evaluation/lead_metrics.png

Official OneScience Information

Citation and License

This repository is an independent engineering reproduction of the public FuXi-Ocean specifications.

Use of this repository's code is subject to the Apache-2.0 license terms.

The original paper is published under CC BY 4.0, and its citation and use are subject to that license.

Use of HYCOM, ERA5, official Zenodo artifacts, and other third-party data or weights remains subject to the licenses and terms of their respective projects.

Downloads last month
-
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support