plot_var: Plot parameter from a netcdf file created by GOTM

View source: R/gotm_tools.R

plot_varR Documentation

Plot parameter from a netcdf file created by GOTM

Description

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

Usage

plot_var(
  file = "output.nc",
  var = "temp",
  reference = "surface",
  z_out = NULL,
  t_out = NULL,
  res = 0.25,
  add = FALSE,
  col = 1,
  main = TRUE,
  colp = mycol(100),
  auto.xaxt = TRUE,
  ...
)

Arguments

file

Path to the netcdf file

var

Name of the variable to get

reference

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

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'

add

If only one depth is selected, add to an existing plot

col

If only one depth is selected, color of the line to plot

main

Title of the plot

colp

Color palette to use for the 2D image

auto.xaxt

Automatically create x axis labels. If set to FALSE no x axis labels are plotted.

...

additional arguments to pass to image2D or plot (if only one depth is selected)

Author(s)

Johannes Feldbauer

Examples

## Not run: 
plot_var(file = "output.nc", var = "temp")

## End(Not run)


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