Skip to main content

This package contains common functionality for different ISIMIP tools.

Project description

ISIMIP utils

Python Version License CI status Latest release DOI

ISIMIP offers a framework for consistently projecting the impacts of climate change across affected sectors and spatial scales. An international network of climate-impact modellers contribute to a comprehensive and consistent picture of the world under different climate-change scenarios.

This package contains various utility methods for use in custom scripts as well as in different ISIMIP tools:

The different methods are described are documented at https://utils.isimip.org.

Setup

Using the package requires a running Python 3 on your system. The installation for different systems is covered here.

Unless you already use an environment manager (e.g. conda or uv), it is highly recommended to use a virtual environment, which can be created using:

python3 -m venv env
source env/bin/activate  # needs to be invoked in every new terminal session

The package itself can be installed via pip:

pip install isimip-utils

For a development setup, the repo should be cloned and installed in editable mode:

git clone git@github.com:ISI-MIP/isimip-utils
pip install -e isimip-utils

Usage

Once installed, the modules can be used like any other Python library, e.g. in order to create a ISIMIP compliant NetCDF file, you can use:

from isimip_utils.xarray import init_dataset, write_dataset

time = np.arrange(0, 365, dtype=np.float64)
var = np.ones((365, 360, 720), dtype=np.float32)

attrs={
    'global': {
        'contact': 'mail@example.com'
    },
    'var': {
        'standard_name': 'var',
        'long_name': 'Variable',
        'units': '1',
    }
}

# create an xarray.Dataset
ds = init_dataset(time=time, var=var, attrs=attrs)

# write the dataset as NetCDF file
write_dataset(ds, 'output.nc')

Please also note our examples page and the API reference.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

isimip_utils-2.0.1.tar.gz (53.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

isimip_utils-2.0.1-py3-none-any.whl (31.8 kB view details)

Uploaded Python 3

File details

Details for the file isimip_utils-2.0.1.tar.gz.

File metadata

  • Download URL: isimip_utils-2.0.1.tar.gz
  • Upload date:
  • Size: 53.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for isimip_utils-2.0.1.tar.gz
Algorithm Hash digest
SHA256 0e5352ee16f8f0ae9c6b3c720f0e399ac7c70efe1bae4e89c9e8c680301c1954
MD5 7aba72b033daa0a0414340d941f01d81
BLAKE2b-256 f5bc997b7b2d5ce38aa8c14a06d13d9ee3176cdb80671d7db1b57e5c56bd1fea

See more details on using hashes here.

Provenance

The following attestation bundles were made for isimip_utils-2.0.1.tar.gz:

Publisher: ci.yaml on ISI-MIP/isimip-utils

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file isimip_utils-2.0.1-py3-none-any.whl.

File metadata

  • Download URL: isimip_utils-2.0.1-py3-none-any.whl
  • Upload date:
  • Size: 31.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for isimip_utils-2.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 70d269ef34d2398a26748ce1139caf30819a3fe3abd4029de4cf9e5611d8cb2e
MD5 6b2006ceccf572353a40cae303ced77e
BLAKE2b-256 b7c53296554d14c2ffd19ad94feb1ed8a0b091931f598a946432c90503dd9028

See more details on using hashes here.

Provenance

The following attestation bundles were made for isimip_utils-2.0.1-py3-none-any.whl:

Publisher: ci.yaml on ISI-MIP/isimip-utils

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page