HGSQueryBlocks: Display data associated with output blocks in an HGSFile.

View source: R/util.R

HGSQueryBlocksR Documentation

Display data associated with output blocks in an HGSFile.

Description

When HGS is run, the user requests output at specific solution times for key data from the model. For each requested time, there is a block of data in the output file. This command displays critical descriptors for each block of data.

Usage

HGSQueryBlocks(HGSFile, descriptors = NULL)

Arguments

HGSFile

An S3 object of class "HGSFile" created by calling HGSFile.

descriptors

Either NULL, or a character vector of descriptor names. See documentation of return value, below.

Value

When descriptors is NULL, return value is a list of descriptor names available for each block. When descriptors is a single descriptor name, return value will be a list of values, one value for each block. When descriptors is a vector of more than one descriptor name, the return value is a list of lists of descriptor values.

Examples

HGSF <- HGSFile("a_File_Name.pm.dat") # requires name of a legetimate pm file

# returns the names of the information in each query block
HGSQueryBlocks(HGSF)

# returns the simulation time for each block
HGSQueryBlocks(HGSF, "SOLUTIONTIME")

# returns the simulation times for each simulation block followed by the variable locations for each simulation block
HGSQueryBlocks(HGSF, c("SOLUTIONTIME", "VARLOCATION"))


FluvialLandscapeLab/HGSReader documentation built on April 10, 2024, 8:18 a.m.