Published September 24, 2020 | Version 1.0.0
Software Restricted

300 sub models(1D CNN)

Creators

  • 1. MSc at Euro Hydroinformatics and Water Management-EUROAQUAE+, Universitat Politècnica de Catalunya

Description

This code is uploaded in Github and for the publication purpose it was copied and uploaded again.

1D CNN models for hydraulic simulations

1D CNN models are desgined to be seperately running in Colab and PC. Data set creation, seperation of running file, and reading raster files are used in PC.

The simulation result in the format of the video is available in https://doi.org/10.6084/m9.figshare.12982190.v1

Simulation process

  1. Dataset file needed to run.
  • In the folder where dataset.py exists, one folder, named 'depth', inside another folder, named 'data', are needed to be created and in that folder the raster files of IBER+ must be saved in time series.

  • Inside the 'data' folder, 'hydrograph' folder must be created and concatenated hydrographs in the format of csv is needed to be saved there. ex) /data/hydrograph/case1/interpolated_hydrograph.csv Hydrograph is available in the following link; https://doi.org/10.6084/m9.figshare.12980492.v2

  • Once all the files are put in the desired places, then run Dataset.py

  • In the folder where dataset.py is, depth_data_set.txt will be created, and it needs to upload in the google drive.

  1. Training process.
  • The codes in 300 model files are needed to be copied in Colab, and mounting google drive is essenstial. The code for mounting google drive is as same as below.

    "from google.colab import drive drive.mount('/content/gdrive/')"

  • The dataset is available for the following link; https://doi.org/10.6084/m9.figshare.12980489.v1

  • In that google drive, the following files are needed to be created and the required files must be placed in each folder.

    1. /content/gdrive/My Drive/data/hydrograph/case1/interpolated_hydrograph.csv (hydrograph)
    2. /content/gdrive/My Drive/data/depth_data_set.txt (The file gotten from Dataset.py)
    3. /content/gdrive/My Drive/data/standard_scaler_300/depth_list_97/training_set/ (For preprocessing data)
    4. /content/gdrive/My Drive/data/standard_scaler_300/depth_list_97/test_set/ (For preprocessing data)
    5. /content/gdrive/My Drive/data/standard_scaler_300/model_candidates_97/ (To save best trained model)
    6. /content/gdrive/My Drive/data/standard_scaler_300/model_list_97/ (To save the trained model)
    7. /content/gdrive/My Drive/data/standard_scaler_300/lossgraph/ (To save loss graph)
    8. /content/gdrive/My Drive/data/Prediction_data/Hydrograph/case1/interpolated_hydrograph.csv (For simulating the event)
    9. /content/gdrive/My Drive/data/standard_scaler_300/result/ (For saving simulation result)
  1. /content/gdrive/My Drive/data/standard_scaler_300/result/ (To check the loading file)
  • Once the training process is done, then download all the best trained models into the folder, named 'model_candidates_97' in your PC.
  1. Simulation
  1. The poseprocessing data
  • Open '4.seperating_simulaiton_file.py' and '5.readingRaster.py'

  • Create the following folders and put the data.

    1. /result
    2. /dnn_simulation_result
    3. /dnn_simulation_result_images
    4. /Prediction/Hydrograph/case1/interpolated_hydrograph.csv (For simulating the event)
    5. /Prediction/Prediction_observation/depth___0.asc (Put the simulation result from IBER+ on the event)
  • Run '4.seperating_simulation_file.py'

  • Run '5.readingRaster.py'

  • You can check a series of inundataion maps in the dnn_simulation_result_image folder.

  1. Evaluation
  • Open 'Evaluation.py'
  • Create folder, /Evaluation/
  • Run 'Evaluation.py'
  • Check the result

The simulation result in the format of the video is available in https://doi.org/10.6084/m9.figshare.12982190.v1

Notes

1D CNN models

Files

Restricted

The record is publicly accessible, but files are restricted to users with access.

Request access

If you would like to request access to these files, please fill out the form below.

You need to satisfy these conditions in order for this request to be accepted:

Those who have a link to is is eligible to get this code.

You are currently not logged in. Do you have an account? Log in here