ISE (Ice Sheet Emulator) — ISEFlow, a flow-based neural network emulator for sea level projections with uncertainty quantification.
Project description
Ice Sheet Emulator (ISE)
ISE is a Python package for training and analyzing ice sheet emulators, including ISEFlow — a hybrid flow-based neural network emulator for improved sea level projections and uncertainty quantification.
ISEFlow supports emulation for both the Antarctic Ice Sheet (AIS) and the Greenland Ice Sheet (GrIS), producing projections of ice volume above flotation (IVAF) changes driven by ISMIP6 climate forcings. Uncertainty is decomposed into epistemic (model) and aleatoric (data) components.
This codebase has been used in peer-reviewed research, including:
- "A Variational LSTM Emulator of Sea Level Contribution From the Antarctic Ice Sheet"
- "ISEFlow: A Flow-Based Neural Network Emulator for Improved Sea Level Projections and Uncertainty Quantification"
For replication details see the Releases section.
Documentation: https://ise.readthedocs.io/
Installation
Install from PyPI:
pip install ise-py
Pretrained weights are hosted on HuggingFace Hub and downloaded automatically on first use. No manual download required.
For development (editable install):
git clone https://github.com/Brown-SciML/ise.git
cd ise
pip install -e ".[dev]"
Or with uv:
uv venv
uv pip install -e ".[dev]"
Project Structure
ise/
├── examples/ Example scripts for using ISEFlow
├── ise/ Main package
│ ├── data/ Forcing/grid loading, feature engineering, dataset classes
│ │ ├── anomaly.py AnomalyConverter: raw forcing → ISMIP6 anomalies
│ │ ├── dataclasses.py EmulatorDataset, PyTorchDataset, TSDataset, ScenarioDataset
│ │ ├── feature_engineer.py FeatureEngineer: split, scale, lag, outliers
│ │ ├── forcings.py ForcingFile: load/process climate NetCDF data
│ │ ├── grids.py GridFile: sector boundary definitions
│ │ ├── inputs.py ISEFlowAISInputs, ISEFlowGrISInputs
│ │ ├── process.py ProjectionProcessor, DatasetMerger, sector helpers
│ │ ├── scaler.py PyTorch StandardScaler, RobustScaler, LogScaler
│ │ └── utils.py convert_and_subset_times()
│ ├── evaluation/ Metrics
│ │ └── metrics.py Point, probabilistic, and distribution metrics
│ ├── models/ Model architectures
│ │ ├── iseflow.py ISEFlow, ISEFlow_AIS, ISEFlow_GrIS
│ │ ├── deep_ensemble.py DeepEnsemble
│ │ ├── lstm.py LSTM
│ │ ├── normalizing_flow.py NormalizingFlow
│ │ ├── training.py CheckpointSaver, EarlyStoppingCheckpointer
│ │ ├── loss.py WeightedGridLoss, WeightedMSELoss, and variants
│ │ ├── _experimental/ Legacy models from prior manuscripts (deprecated)
│ │ └── pretrained/ Pretrained weights (v1.0.0, v1.1.0)
│ └── utils/ Data helpers and tensor utilities
│ ├── functions.py get_X_y, get_data, to_tensor, unscale_output, …
│ └── io.py check_type() runtime type validation
├── manuscripts/ Research paper scripts
├── tests/ Unit tests
├── pyproject.toml
└── uv.lock
Usage
Loading and Running a Pretrained ISEFlow-AIS Model
import numpy as np
from ise.models import ISEFlow_AIS
from ise.data.inputs import ISEFlowAISInputs
year = np.arange(2015, 2101) # 86 annual timesteps
# Option A: use a known ISMIP6 ISM configuration shortcut
inputs = ISEFlowAISInputs(
year=year,
sector=np.ones(86, dtype=int), # sector 1 of 18
pr_anomaly=np.zeros(86),
evspsbl_anomaly=np.zeros(86),
smb_anomaly=np.zeros(86),
ts_anomaly=np.zeros(86),
ocean_thermal_forcing=np.zeros(86),
ocean_salinity=np.zeros(86),
ocean_temperature=np.zeros(86),
model_configs="AWI_PISM1", # loads all ISM config fields automatically
ice_shelf_fracture=False,
ocean_sensitivity="medium",
ocean_forcing_type="standard",
standard_melt_type="local",
)
# Option B: provide all ISM parameters individually
inputs = ISEFlowAISInputs(
year=year,
sector=np.ones(86, dtype=int),
pr_anomaly=np.zeros(86),
evspsbl_anomaly=np.zeros(86),
smb_anomaly=np.zeros(86),
ts_anomaly=np.zeros(86),
ocean_thermal_forcing=np.zeros(86),
ocean_salinity=np.zeros(86),
ocean_temperature=np.zeros(86),
initial_year=1980,
numerics="fd",
stress_balance="ho",
resolution="16",
init_method="da",
melt_in_floating_cells="floating condition",
icefront_migration="str",
ocean_forcing_type="open",
ocean_sensitivity="low",
ice_shelf_fracture=False,
open_melt_type="picop",
standard_melt_type=None,
)
# Option C: if you have raw (non-anomaly) forcing values, use from_absolute_forcings()
inputs = ISEFlowAISInputs.from_absolute_forcings(
year=year,
sector=10,
pr=pr_array,
evspsbl=evspsbl_array,
smb=smb_array,
ts=ts_array,
ocean_thermal_forcing=otf_array,
ocean_salinity=sal_array,
ocean_temperature=temp_array,
aogcm="noresm1-m_rcp85", # or custom_climatology={...}
model_configs="AWI_PISM1",
ice_shelf_fracture=False,
ocean_sensitivity="medium",
ocean_forcing_type="standard",
standard_melt_type="local",
)
# Load the pretrained v1.1.0 model (weights auto-downloaded from HuggingFace Hub on first use)
model = ISEFlow_AIS(version="v1.1.0")
predictions, uncertainties = model.predict(inputs)
print(predictions.shape) # (86, 1) — SLE in mm, 2015-2100
print(uncertainties["epistemic"]) # epistemic uncertainty per timestep
print(uncertainties["aleatoric"]) # aleatoric uncertainty per timestep
print(uncertainties["total"]) # total uncertainty (epistemic + aleatoric)
Running the Pretrained GrIS Emulator
import numpy as np
from ise.models import ISEFlow_GrIS
from ise.data.inputs import ISEFlowGrISInputs
inputs = ISEFlowGrISInputs(
year=np.arange(2015, 2101),
sector=np.ones(86, dtype=int), # basin 1 of 6
aST=np.zeros(86), # surface temperature anomaly
aSMB=np.zeros(86), # SMB anomaly
ocean_thermal_forcing=np.zeros(86),
basin_runoff=np.zeros(86),
model_configs="AWI_ISSM1",
ice_shelf_fracture=False,
ocean_sensitivity="medium",
standard_ocean_forcing=True,
)
model = ISEFlow_GrIS(version="v1.1.0")
predictions, uncertainties = model.predict(inputs)
Training ISEFlow from Scratch
from ise.models import ISEFlow, DeepEnsemble, NormalizingFlow
nf = NormalizingFlow(input_size=93, output_size=1, num_flow_transforms=5)
de = DeepEnsemble(input_size=93, num_ensemble_members=5, output_sequence_length=86)
model = ISEFlow(deep_ensemble=de, normalizing_flow=nf)
# X: (N, n_features), y: (N,) — pre-scaled ISMIP6 data
model.fit(
X_train, y_train,
nf_epochs=100,
de_epochs=100,
X_val=X_val,
y_val=y_val,
early_stopping=True,
patience=15,
)
model.save("./ISEFlow/", input_features=list(X_train.columns))
Evaluating Model Performance
from ise.models import ISEFlow
from ise.evaluation import metrics as m
from ise.utils import functions as f
model = ISEFlow.load("./ISEFlow/")
predictions, uncertainties = model.predict(X_val)
y_val_unscaled = f.unscale_output(y_val.reshape(-1, 1), "./ISEFlow/scaler_y.pkl")
mse = m.mean_squared_error(y_val_unscaled, predictions)
print(f"MSE: {mse:.4f}")
Contributing
We welcome contributions! To get started:
- Fork the repository on GitHub.
- Create a new branch for your feature or bugfix.
- Submit a pull request (PR) for review.
Run tests before submitting:
pytest tests/
Contact & Support
Developed by Peter Van Katwyk (Ph.D., Brown University).
- Email: pvankatwyk@gmail.com
- GitHub Issues: Report a bug
If you use ISE in research, please consider citing our work. See CITATION.md for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ise_py-1.0.0.tar.gz.
File metadata
- Download URL: ise_py-1.0.0.tar.gz
- Upload date:
- Size: 86.7 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fe76fb4b35e4c264bd77f7ba85e51f592f64a62c4fc5d1d946c7c26761e85137
|
|
| MD5 |
8b551d8db7326a4957091f1916948414
|
|
| BLAKE2b-256 |
7dd02bbe5cd55bfd91621ca489572a2f171e25ed896af2dd74f2f8e4b0746f9c
|
Provenance
The following attestation bundles were made for ise_py-1.0.0.tar.gz:
Publisher:
release.yml on Brown-SciML/ise
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ise_py-1.0.0.tar.gz -
Subject digest:
fe76fb4b35e4c264bd77f7ba85e51f592f64a62c4fc5d1d946c7c26761e85137 - Sigstore transparency entry: 1462128067
- Sigstore integration time:
-
Permalink:
Brown-SciML/ise@b2fd0c9c4848cbcfc718bf85562317d56ec0d726 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/Brown-SciML
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@b2fd0c9c4848cbcfc718bf85562317d56ec0d726 -
Trigger Event:
push
-
Statement type:
File details
Details for the file ise_py-1.0.0-py3-none-any.whl.
File metadata
- Download URL: ise_py-1.0.0-py3-none-any.whl
- Upload date:
- Size: 142.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9c027aa11a7d849889d8ec9bb4aae6cd0d98f2b9f51c04a28d41de7224e9af3f
|
|
| MD5 |
282eab94bee9c5a418f9640eb7f36432
|
|
| BLAKE2b-256 |
2d3745074ead118e05c5029933def349aced428b8b5a453ccb55e355425c8a1e
|
Provenance
The following attestation bundles were made for ise_py-1.0.0-py3-none-any.whl:
Publisher:
release.yml on Brown-SciML/ise
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ise_py-1.0.0-py3-none-any.whl -
Subject digest:
9c027aa11a7d849889d8ec9bb4aae6cd0d98f2b9f51c04a28d41de7224e9af3f - Sigstore transparency entry: 1462128235
- Sigstore integration time:
-
Permalink:
Brown-SciML/ise@b2fd0c9c4848cbcfc718bf85562317d56ec0d726 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/Brown-SciML
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@b2fd0c9c4848cbcfc718bf85562317d56ec0d726 -
Trigger Event:
push
-
Statement type: