TFVInitCons {TUFLOWR}R Documentation

Generate a TFV initial conditions file from point observations

Description

Generate a TFV initial conditions file from point observations

Usage

TFVInitCons(
  file,
  fgdb,
  initialvaluesfile,
  outputfile,
  cellsize = 50,
  ncell = 50000
)

Arguments

file

.2dm mesh used to generate the cell IDs and centres

fgdb

Shape file (.shp and associated .prj) for zones to be preserved

initialvaluesfile

csv file with observed data to interpolate

outputfile

file to write the initial conditions to

cellsize

size of cells to interpolate the observations onto

ncell

number of cells to interpolate the observations onto

Details

The shapefile should be a polygon shape file, with different zones to interpolate within. This can be useful to ensure interpolations are physically sensible, for example where there is a barrier between fresh and saline water, or a storage above a lower river. Projections are not handled by this function, so the shapefile should be in the same projection as the mesh.

The initialvaluesfile should have at least 6 columns of information:

cellsize and ncell are used to specify the resolution of the interpolation. ncell is in units of the mesh coordinates, e.g. m or degrees

interpolation is undertaken using inverse distance weighting from the gstat package, with the default weighting power of 2.

Value

Nothing is returned to the environment, with the initial conditions generated written to outputfile. Summary metrics are printed to screen to allows for some quick QA

Examples

## Not run: 
file="001_RM_Wetlands_LL_Coorong_MZ.2dm"
fgdb<-"Zones/Zones.shp"
initialvaluesfile<-"CLLMMInitialValues2019.csv"
outputfile<-pate0(tempdir(),"/Initcons2021.csv")
TFVInitCons(file,fgdb,initialvaluesfile,outputfile)

## End(Not run)


[Package TUFLOWR version 0.1.1 Index]