Cloud storage
Connecting The Good Cloud
OS environment variables
We recommend to set the following OS environment variables: - RIBASIM_NL_CLOUD_PASS
: password for the cloud, to be requested at Deltares - RIBASIM_NL_DATA_DIR
: directory with your local copy of data in the Ribasim-NL cloud
Initialize the cloud
Import the `Cloud`` and initialize it
from ribasim_nl import CloudStorage
If you have set OS environment variables:
cloud_store = CloudStorage()
And else
cloud_storage = CloudStorage(password=password, data_dir=my_data_dir)
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"])
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`.