ReadTsunami

read ChEESE Tsunami files

Purpose

This module is designed to read TsunamiHySEA files in NetCDF format. TsunamiHySEA is a numerical model for quake generated tsunami simulations.


Ports

ReadTsunami Sea surface Grid Sea (Heightmap/LayerGrid) (Sea surface) Ground surface Sea floor (Heightmap/LayerGrid) (Ground surface) scalar_port_0 Port for scalar number 0 (scalar_port_0) scalar_port_1 Port for scalar number 1 (scalar_port_1) scalar_port_2 Port for scalar number 2 (scalar_port_2) scalar_port_3 Port for scalar number 3 (scalar_port_3)

The first two ports output the geometry for the sea surface and bathymetry as an LayerGrid/Heightmap object. The other ports are providing a vistle scalar object which representing the corresponding in the parameter browser selected attributes.

Parameters

name

description

type

file_dir

NC File directory

String

ghost

Show ghostcells.

Int

fill

Replace filterValue.

Int

VerticalScale

Vertical Scale parameter sea

Float

blocks_latitude

number of blocks in lat-direction

Int

blocks_longitude

number of blocks in lon-direction

Int

fillValue

ncFile fillValue offset for eta

Float

fillValueNew

set new fillValue offset for eta

Float

bathymetry

Select bathymetry stored in netCDF)

String

scalar_0

Select scalar.)

String

scalar_1

Select scalar.)

String

scalar_2

Select scalar.)

String

scalar_3

Select scalar.)

String

How the reader works

The reader is able to read NetCDF files which uses a PnetCDF supported file type. In general the module will fetch the longitude and latitude values for the sea (lon, lat) and the bathymetry (grid_lon, grid_lat) from the NetCDF file. Based on each longitude-latitude pair the reader creates a 2D grid, varies the wave height (eta - orthogonal to longitude and latitude coordinates) per timestep and creates a 3D surface representing the sea surface out of it. If an attribute bathymetry is provided with the NetCDF file the reader will build a ground surface as well. Additional attributes like scalar data will be mapped onto the sea surface.

File Format

The raw data output of the simulation is a NetCDF file which contains the following mandatory attributes:

  • lon: Longitude array which specifies one dimension of the sea domain

  • lat: Latitude array which specifies one dimension of the sea domain

  • grid_lat: Latitude array of the topography

  • grid_lon: Longitude array of the topography

  • time: Timesteps used for the simulation

  • eta: Wave amplitude per timestep

Important to note

This module distributes the data into domain blocks per spawned mpi process. With the parameters blocks latitude and blocks longitude an user needs to specify the distribution of the simulation domain. The parameter fill enables the option to replace in the NetCDF file used fillValues for the attribute eta with a new fillValue to reduce the height dimension of the sea surface. If fill is enabled an user need to specify the current fillValue with the parameter fillValue (default fillValue: -9999) along with the replacement with fillValueNew. A NetCDF file read by this reader which does not contain a bathymetry attribute named with a string containing atleast the substring “bathy” won’t get noticed as bathymetry data and therefore not providing output data for the second port. In this case the parameter browser will show None for the parameter bathymetry. Otherwise there will be a selection of bathymetry options available.

Example Usage

Simple cases

In the simplest and most cases a visualization of the simulation result can be done like shown in figure 1.


align: center width: 150px

Fig 1: Simple vizualization pipeline.

In this example the second port will be used to visualize the topography. For the third port the additional scalar data **max_height** is selected which will directly mapped onto the sea surface. The following picture shows the result of executing this visualization pipeline.

![](simpleResult.png)

### Cádiz Tsunami

Visualizing simulation data next to additional topographic data assumes that coordinates are set up for a specific coordinate system. In the next example google maps data of the city Cádiz is used to generate a more immersive experience in VR. In such an example the tsunami data needs to be converted into another coordinate system because google maps uses a certain type of map projection called Mercator. The figure 2 shows the visualization pipeline of this example. [](project:#mod-MapDrape) is used in this context to make a coordinate system conversion of the dataset from WGS84 to Mercator. [](project:#mod-IndexManifolds) needs to be used here to specify which layer of the LayerGrid needs to be used as input for MapDrape. [](project:#mod-LoadCover) loads the google data as VRML file while the [](project:#mod-Variant) modules allows the user to disable data later in COVER.

---
align: center
width: 500px
---
Fig 2: Cádiz pipeline.

The first picture shows the result of executing the visualization pipeline from above with the topographic data which comes with the NetCDF data.

In comparison to the previous topographic data the same simulation data with the additional google maps data is shown in the following pictures.

Build Requirements

  • PnetCDF: build with –enable-thread-safe flag as described on PnetCDF-GitHub or installed via packagemanager

Note

The PnetCDF install directory should be added to your $PATH environment variable in order to be found by CMake, otherwise it won’t be build.

Acknowledgements