You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 30 Next »

Summary

The Bayesian Network adaptor (BNA) sets up a Bayesian network based decision support system (DSS) for coastal hazards and impacts in hotspot areas, according to the framework developed in task 3.3 of the RISC-Kit project (www.risckit.eu). 

The BN adaptor uses

  1. .nc files of storm simulations
  2. .csv files indicating receptor locations 
  3. a .json file specifying the structure of the BN
  4. a .json file specifying the vulnerability relationships for the hotspot area

to create

  1. a .dsl file that can be opened with a Bayesian network software
  2. a folder with all files that are relevant for the webviewer

Required Folder Structure

The BNA works with relative paths. Users have to create a personal folder, i.e. BN_<hotspotname>, in the FEWS directory Config/ModuleDataSetFiles.zip/ as well as the following subfolders and files therein:

  1. input
  2. model
    • <receptor1>.csv
    • <receptor2>.csv
    • ...
    • <receptorN>.csv
    • BNstructure.json
    • vulnerabilities.json
    • areas.shp (& related GIS files)
  3. output
  4. trainingData

The folders input, output and trainingData remain empty. They are filled and purged through the BNA and the general adaptor (GA) only.

Overview on Data Process

The data process described in this section takes place after every single simulation with the model train. 

First, the GA writes the (near-shore) process model output (e.g. XBeach, Telemac) as

  1. hazardbc_<measure>_<bin>.nc
  2. hazard.nc

to Config/ModuleDataSetFiles.zip/BN_<hotspotname>/input. The first file should contain the max. value (scalar) of the relevant forcing variables, such as water level or significant wave height. <measure>_<bin> is an addition to the file name that only has to be used when the simulation includes a type I measure, i.e. measures affect the hazard pathway and require a different setup of the hydrodynamic model, such as beach nourishments, dikes etc. The second file contains the gridded maximum values of the relevant hazard variables, such as inundation depth, flow velocity or erosion. 

Subsequently, the GA calls the BNA.  

The BNA  

  1. copies the two files from input to trainingData/<yyyymmdd>_<measure>_<bin>
  2. reads all files in model and trainingData 
  3. creates output/<hotspotname>.dsl
  4. creates new directories output/webviewer/<scenario_X> for all combinations of hazard boundary conditions (forcing) that can be obtained from the BN including the folllowing files
    • <varname1>.json
    • <varname2>.json
    • ...
    • areas.shp & related GIS files

The user can open <hotspotname>.dne with a Bayesian network software. Note that input (and consequently trainingData) can be empty for the BNA to run. In this case <hotspotname>.dne represents the structure of the decision support system, but does not contain any quantitative information. 

Finally, the files in webviewer have to be copied/moved manually to a shared ftp (details will follow), where they can be picked up by the webviewer for display.

Input and Output Files

This section describes the formats of files that are written to input by the GA and saved in model by the user before the BNA is run. Note that the user develops his/her own GA and has to ensure that it writes files of the correct format to input.

It also describes the files that are written by the BNA to output.

NETCDF files

(to be added soon)

JSON files

JSON files can be created with any text editor. They are built on two structures: (1) a collection of name/value pairs and (2) an ordered list of values. Details can be found at http://json.org/

JSON files are read (BNstructure.json and vulnerabilities.json) and written (<varname>.json) by the BNA. Here are examples for the BNstructure.json and vulnerabilities.json files. This BN (structure, not filled with data yet) BNdemo.dne is built from these files. Here is an example of an inundation.json file which is passed on to the webviewer.

CSV files

Link to tutorial on making the CSV files Creating a <receptor>.csv file

Shape files

(to be added soon)

DNE files

(to be added soon)

Configuration

(to be added soon)

System Requirements

(to be added soon)

Examples

(to be added soon)

 

  • No labels