Science Score: 49.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 2 DOI reference(s) in README -
✓Academic publication links
Links to: wiley.com -
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (16.3%) to scientific vocabulary
Repository
Global Ocean Emulator
Basic Info
Statistics
- Stars: 33
- Watchers: 1
- Forks: 4
- Open Issues: 0
- Releases: 1
Metadata Files
README.md
Samudra: A Global Ocean Emulator
This repository contains the implementation of Samudra, a global ocean emulator described in "Samudra: An AI Global Ocean Emulator for Climate". Samudra efficiently emulates the ocean component of a state-of-the-art climate model, accurately reproducing key ocean variables including sea surface height, horizontal velocities, temperature, and salinity, across their full depth.
Overview
Samudra reproduces the 3D ocean temperature structure and variability of the OM4 climate model with high fidelity, while also demonstrating stable long-term performance under realistic, time-varying forcing conditions. It achieves a significant speedup as well—rolling out a 100-year simulation is approximately 150 times faster than the original model.
Installation
Clone the repository:
bash git clone https://github.com/suryadheeshjith/Samudra.git cd SamudraSet up the environment using either method:
Using conda:
bash
conda env create -f environment.yml
conda activate samudra
Using uv:
bash
uv sync
source .venv/bin/activate
Usage
To train or rollout Samudra, download the OM4 data and statistics referenced in the OM4 Data section. You can also substitute your own data, provided it aligns with the same format. Note that mean and standard deviation files are precomputed for training and model rollouts; if you opt to use your own data, you will need to compute these statistics yourself.
Should you wish to evaluate Samudra directly, you may use the pre-trained model weights discussed in the Trained Model Weights section.
Training
A default training configuration is provided in the file configs/trainsamudraom4.yaml. Update all fields marked with # FILL IN to reference your local data paths and files for OM4 data and statistics.
Note: Ensure your environment is activated before training. ```bash
Train a new model
torchrun src/train.py --config path/to/train_config.yaml ```
Rollout
A default rollout configuration is provided in configs/rolloutsamudraom4.yaml. Update all fields marked with # FILL IN to reference your local data paths and files for OM4 data and statistics.
Note: Ensure your environment is activated before training. ```bash
Produce a rollout from a trained model (and optionally save the result)
python src/rollout.py --config path/to/rolloutconfig.yaml --ckptpath path/to/checkpoint.pt --save_zarr ```
Note: For both training and rollout, you may change the experiment name in the config files or use
--sub_nameargument in the command line to specify a different name for the output directory.
OM4 Data
The OM4 data and corresponding statistics are publicly available as Zarr files via our hosted pod.
```python import xarray as xr
Download statistics
means = xr.opendataset("https://nyu1.osn.mghpcc.org/m2lines-pubs/Samudra/OM4means", engine='zarr', chunks={}) means.to_zarr("local/path/to/data-dir/means.zarr")
stds = xr.opendataset("https://nyu1.osn.mghpcc.org/m2lines-pubs/Samudra/OM4stds", engine='zarr', chunks={}) stds.to_zarr("local/path/to/data-dir/stds.zarr") ```
Downloading the entire dataset (~70 GB) can be time-consuming, depending on your network speed. If you only need to evaluate Samudra on the test set, a reduced dataset (~12 GB) is sufficient.
```python import xarray as xr
Download the entire data
data = xr.open_dataset("https://nyu1.osn.mghpcc.org/m2lines-pubs/Samudra/OM4", engine='zarr', chunks={})
For training ~ 70GB
data.to_zarr("local/path/to/data-dir/data.zarr")
(OR) For evaluation ~ 12GB
data.sel(time=slice("2014-10-10", "2022-12-24")).to_zarr("local/path/to/data-dir/data.zarr") ```
Trained Model Weights
Pre-trained weights for Samudra are available on Hugging Face. You can download them as follows: ```bash
Download the weights for thermo model
wget https://huggingface.co/M2LInES/Samudra/resolve/main/samudrathermoseed1.pt
(OR) Download the weights for thermo-dynamic model
wget https://huggingface.co/M2LInES/Samudra/resolve/main/samudrathermodynamic_seed1.pt ```
There are 5 seeds saved for each model.
Paper Plots
The notebooks in the notebooks folder reproduce most of the plots from the paper.
Further methodological details and model architecture specifications can be found in the paper.
Citation
If you find this code useful in your research, please cite:
@article{dheeshjith2025samudra,
title={Samudra: An ai global ocean emulator for climate},
author={Dheeshjith, Surya and Subel, Adam and Adcroft, Alistair and Busecke, Julius and Fernandez-Granda, Carlos and Gupta, Shubham and Zanna, Laure},
journal={Geophysical Research Letters},
volume={52},
number={10},
pages={e2024GL114318},
year={2025},
publisher={Wiley Online Library}
}
Owner
- Name: Surya Dheeshjith
- Login: suryadheeshjith
- Kind: user
- Location: Bangalore, India
- Website: http://suryadheeshjith.github.io/
- Repositories: 5
- Profile: https://github.com/suryadheeshjith
GitHub Events
Total
- Release event: 1
- Watch event: 4
- Delete event: 6
- Issue comment event: 1
- Push event: 33
- Pull request event: 10
- Fork event: 3
- Create event: 8
Last Year
- Release event: 1
- Watch event: 4
- Delete event: 6
- Issue comment event: 1
- Push event: 33
- Pull request event: 10
- Fork event: 3
- Create event: 8
Issues and Pull Requests
Last synced: 7 months ago
All Time
- Total issues: 1
- Total pull requests: 6
- Average time to close issues: 29 days
- Average time to close pull requests: 5 days
- Total issue authors: 1
- Total pull request authors: 2
- Average comments per issue: 2.0
- Average comments per pull request: 0.17
- Merged pull requests: 4
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 1
- Pull requests: 6
- Average time to close issues: 29 days
- Average time to close pull requests: 5 days
- Issue authors: 1
- Pull request authors: 2
- Average comments per issue: 2.0
- Average comments per pull request: 0.17
- Merged pull requests: 4
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
- suryadheeshjith (8)
- alxmrs (1)
Top Labels
Issue Labels
Pull Request Labels
Dependencies
- actions/checkout v2 composite
- actions/setup-python v2 composite
- aiohttp ==3.9.3
- cartopy ==0.23
- cftime >=1.5.2
- cmocean ==4.0.3
- dacite ==1.9.1
- dask ==2024.2.1
- einops ==0.8
- huggingface-hub ==0.23.4
- ipykernel ==6.29.3
- ipywidgets ==8.1.2
- matplotlib ==3.8.3
- nc-time-axis ==1.4.1
- numpy ==1.24.4
- pandas ==2.2.1
- requests ==2.32.3
- scikit-learn ==1.4.1.post1
- torch ==2.2.1
- xarray ==2023.7
- xarrayutils ==2.0.1
- zarr ==2.16.1
- aiohttp ==3.9.3
- cartopy ==0.23.0
- cftime >=1.5.2
- cmocean ==4.0.3
- dacite ==1.9.1
- dask ==2024.2.1
- einops ==0.8.0
- huggingface-hub ==0.23.4
- ipykernel ==6.29.3
- ipywidgets ==8.1.2
- matplotlib ==3.8.3
- nc-time-axis ==1.4.1
- numpy ==1.24.4
- pandas ==2.2.1
- requests ==2.32.3
- scikit-learn ==1.4.1.post1
- torch ==2.2.1
- xarray ==2023.7.0
- xarrayutils ==2.0.1
- zarr ==2.16.1