get_var: Recieve parameter from a netcdf file created by GOTM

View source: R/gotm_tools.R

get_varR Documentation

Recieve parameter from a netcdf file created by GOTM

Description

This function fetches variables for given depths from a netcdf file created by running GOTM-FABM

Usage

get_var(
  file = "output.nc",
  var = "temp",
  z_out = NULL,
  t_out = NULL,
  res = 0.5,
  reference = "surface",
  long = FALSE
)

Arguments

file

Path to the netcdf file

var

Name of the variable to get

z_out

Vector of depths from which to get the variable. If no depths are selected (NULL, the default) all depths from the lowest to the highest depth in a equal distance of 'res'

t_out

Vector of times (as POSIX) for which the variable should be fetched. If no times are selected (NULL, the default) all available times from the netcdf file are returned

res

Spatial resolution for depths, if no depths are explicitly specified by 'z_out'

reference

Either "surface" or "bottom". The reference point for the depths sepified in 'z_out'

long

Boolean, output the variable in long format? Defaults to FALSE

Author(s)

Johannes Feldbauer

Examples

## Not run: 
temp <- get_var(file = "output.nc", var = "temp")

## End(Not run)


JFeldbauer/rodeoFABM documentation built on Jan. 27, 2024, 11:41 a.m.