GfsOutputGRD

From Gerris

Jump to: navigation, search

OutputGRD writes a raster (or gridded) dataset using the ESRI grid ASCII format. This is typically used to import 2D fields into a GIS application.

The syntax in parameter files is:

[ GfsOutputScalar ]

By default the grid "pixels" are the square cells at the highest level of refinement. The level of the cells taken into account can be controlled using the maxlevel option of GfsOutputScalar. Setting maxlevel can also be useful to control the size (in grid points) of the file produced: when maxlevel is set the size of the grid will always be a multiple (depending on the number of boxes in the computation domain) of 2^maxlevel. This holds even when the number of levels in the simulation changes due to adaptive refinement.

The NODATA keyword of GfsFunction can be used to set the "nodata_value" mask. For example exporting only the positive values of the pressure could be written:

OutputGRD { start = end } end.asc { v = (P > 0 ? P : NODATA) }

Note that this object is only available for 2D simulations.

Tips

GRD files can be converted to more compact raster formats using GDAL. GDAL can be installed using

sudo apt-get install gdal-bin

For example conversion to GeoTIFF can be done using

gdal_translate -of GTiff -a_srs EPSG:4326 -co COMPRESS=DEFLATE -co ZLEVEL=9 output.grd output.tif


Navigation
communication