The gwb-grid app#
While the gwb-dat app is great at providing individual points, providing gridded output can be very useful especially when visualizing the result. This is exactly what the gwb-grid app does. It creates a grid with the values requested and outputs it as a vtu file. Using gwb-grid is very similar to using gwb-dat: gwb-grid world_builder_file.wb grid_info.grid. The only difference is that you now provide a .grid file instead of a .dat file.
A grid file consists of a number of parameters. Each parameter should start with a name (no spaces) followed by an equal sign, followed by the value. The available parameters are:
grid_type: Options arecartesian,sphere,chunkandannulus.dim: dimension, either 2 or 3.composition: how many compositionsvtu_output_format: EitherASCIIfor readable output orRawBinaryCompressedfor compressed output.x_min: either the minimum x value or minimum longitude.x_max: either the maximum x value or maximum longitude.y_min: either the minimum y value or minimum latitude.y_min: either the maximum y value or maximum latitude.z_min: either the minimum z value or minimum radius.z_min: either the maximum z value or maximum radius.n_cell_x: either the number of cells in the x or longitude direction.n_cell_y: either the number of cells in the y or latitude direction.n_cell_z: either the number of cells in the z or radius direction.
An example of a grid file is the following:
1# output variables
2grid_type = chunk
3dim = 3
4compositions = 2
5
6# domain of the grid
7x_min = -5
8x_max = 45
9y_min = -5
10y_max = 40
11z_min = 5611e3
12z_max = 6371e3
13
14# grid properties
15n_cell_x = 100
16n_cell_y = 80
17n_cell_z = 32
When you run it, it will produce a vtu file with the same name in the directory you run it from.
More examples can be found in the tests/gwb-grid/ directory.