openLPJOutputFile: Open an LPJ-GUESS .out file

View source: R/Format-GUESS.R

openLPJOutputFileR Documentation

Open an LPJ-GUESS .out file

Description

openLPJOutputFile returns a data.table object given a string defining a vegetation quantity from the run (eg. "lai", to read the file "lai.out") or a Quantity object, and a Source object which defines where the run is on disk.

Usage

openLPJOutputFile(
  run,
  quant,
  layers = NULL,
  target.sta,
  file.name = file.name,
  verbose = FALSE,
  data.table.only = FALSE,
  ...
)

Arguments

run

A Source containing the meta-data about the LPJ-GUESS run

quant

A Quant to define what output file from the LPJ-GUESS run to open,

layers

A character string (or a vector of character strings) specifying which layer columns are to be read. NULL (default) means read all. can also be a simple string defining the LPJ-GUESS output file if the return.data.table argument is TRUE

target.sta

An STAInfo object describing the target STA

file.name

Character string holding the name of the file. This can be left blank, in which case the file name is just taken to be "<quant@id>.out" (also "<quant@id>.out.gz")

verbose

A logical, set to true to give progress/debug information

data.table.only

A logical, if TRUE return a data.table and not a Field

Details

Note that the files can be gzipped on UNIX systems, but this might fail on windows systems.

Value

a data.table (with the correct tear offset and lon-lat offsets applied)

Author(s)

Matthew Forrest matthew.forrest@senckenberg.de


MagicForrest/DGVMTools documentation built on Aug. 23, 2024, 8:05 a.m.