Cloud storage

Warning

This page documents the legacy The Good Cloud storage interface. It is not the main storage method for current workflows. Use MinIO through DVC instead; see the DVC workflow and developer setup.

Ribasim-NL has historically used this cloud storage: https://deltares.thegood.cloud/. The input data is not open, but the output models are, see the links below. This page explains how the cloud storage is setup and used. For the API docs, see the CloudStorage reference.

Access configuration

Before you can interact with the cloud storage, you need to configure the access. The section on environment variables documents how to do this. This is a legacy storage interface. Most current workflows use MinIO and require the AWS credentials documented in the developer setup. The variables specific to legacy CloudStorage code are:

  • RIBASIM_NL_CLOUD_PASS: password for The Good Cloud, only needed when running legacy CloudStorage code
  • RIBASIM_NL_DATA_DIR: directory with your local copy of data in the Ribasim-NL cloud

The password can currently only be shared among project collaborators since not all input data is public. The output models, both nationwide (folder Rijkswaterstaat) and per water board, are public. Share links for the models are below. Sort on “Modified” to find the latest versions.

Initialize the cloud

Import the Cloud and initialize it.

from ribasim_nl import CloudStorage

cloud_store = CloudStorage()

Download sources (basisgegevens)

Find all sources

# find all sources, `PBL_watertypenkaart`
sources = cloud_storage.source_data
# download, `PBL_watertypenkaart`
cloud.download_basisgegevens(bronnen=["PBL_watertypenkaart"])

Find water authorities

To find available water authorities:

cloud_storage.water_authorities

Download water authority datasets

authority = "Rijkswaterstaat"

# to download external data (aangeleverd) only
cloud_storage.download_aangeleverd(authority)

# to download manipulated data (verwerkt) only
cloud_storage.download_verwerkt(authority)

# to download all
cloud_storage.download_all(authority)

Upload manipulated data (aangeleverd)

authority = "Rijkswaterstaat"
# upload local `aangeleverd` directory to cloud-storage
cloud_storage.upload_aangeleverd(authority, overwrite=True)

Upload models

authority = "Rijkswaterstaat"
cloud_storage.uploaded_models(authority) # to see which models have been uploaded

cloud_storage.upload_model(authority, model="ijsselmeer") # to upload a new version of the `ijsselmeermodel`.