nens / threedi-api-qgis-client

3Di Models & Simulations plugin
https://plugins.lizard.net/
Other
2 stars 0 forks source link

Simulation wizard: global 2D initial water level from template is not used by default #474

Closed leendertvanwolfswinkel closed 11 months ago

leendertvanwolfswinkel commented 1 year ago

The situation is:

In the simulation wizard, on the initial conditions page, section '2D initial water level', the default option should be 'global value', with the value '0.0' filled in in the spinbox. Instead, it looks like this:

image.png

The events endpoint of the simulation on which the simulation template is based returns this:

{
    "lizardrasterrain": [],
    "lizardtimeseriesrain": [],
    "timeseriesrain": [],
    "breach": [],
    "lizardrastersourcessinks": [],
    "lizardtimeseriessourcessinks": [],
    "filerastersourcessinks": [],
    "filetimeseriessourcessinks": [],
    "timeseriessourcessinks": [],
    "leakage": [],
    "filetimeseriesleakage": [],
    "filerasterleakage": [],
    "initial_twodwaterlevel": {
        "url": "https://api.3di.live/v3/simulations/133846/initial/2d_water_level/constant/30957/",
        "simulation": "https://api.3di.live/v3/simulations/133846/",
        "value": 0.0,
        "uid": "5b87198f-b519-4bca-97b0-cfe6d13a5bdd",
        "id": 30957
    },
    "initial_onedwaterlevelpredefined": null,
    "initial_groundwaterlevel": null,
    "initial_groundwaterraster": null,
    "initial_onedwaterlevel": null,
    "initial_onedwaterlevelfile": {
        "url": "https://api.3di.live/v3/simulations/133846/initial/1d_water_level/file/46297/",
        "simulation": "https://api.3di.live/v3/simulations/133846/",
        "initial_waterlevel": "https://api.3di.live/v3/threedimodels/57665/initial_waterlevels/11627/",
        "initial_waterlevel_id": 11627,
        "uid": "e2649b5f-2505-4133-afbe-3c75c576e90f",
        "id": 46297
    },
    "initial_twodwaterraster": null,
    "filerasterrain": [],
    "filetimeseriesrain": [],
    "initial_savedstate": null,
    "savedstates": [],
    "laterals": [],
    "filelaterals": [],
    "fileboundaryconditions": {
        "url": "https://api.3di.live/v3/simulations/133846/events/boundaryconditions/file/50834/",
        "id": 50834,
        "uid": "38897949-7846-4ea0-9a80-854599f972e4",
        "simulation": "https://api.3di.live/v3/simulations/133846/",
        "file": {
            "url": "https://api.3di.live/v3/files/692179/",
            "storage_name": "MINIO_DEV",
            "filename": "boundaries_b9c27555.json",
            "bucket": "3di",
            "prefix": null,
            "etag": "b7a1738fbc2ff375f482afba5a173f7a",
            "size": 851,
            "expiry_date": "2123-05-23",
            "related_object": "https://api.3di.live/v3/simulations/133846/events/boundaryconditions/file/50834/",
            "type": "bulk_boundaryconditions",
            "state": "processed",
            "state_description": "File has been uploaded successfully",
            "meta": {
                "timeframes": [
                    0,
                    59999940
                ],
                "event_count": 10
            },
            "id": 692179
        },
        "state": "valid",
        "state_detail": {
            "timeframes": [
                0.0,
                59999940.0
            ],
            "event_count": 10
        }
    },
    "tablestructurecontrols": [],
    "memorystructurecontrols": [],
    "timedstructurecontrols": [],
    "filestructurecontrols": [],
    "rasteredits": [],
    "obstacleedits": [],
    "localrain": [],
    "wind": [],
    "initial_winddragcoefficient": null
}
Overmeen commented 1 year ago

Tested successfully for schematisation "Nova Kakhovka dam break", revision 10, template "default": image