Skip to contents

This functions will load into the R environment the data within one NetCDF file that has been downloaded via fl_DownloadFjord.

Usage

fl_LoadFjord(
  fjord,
  layer = "PAR_B",
  dirdata = NULL,
  TS = FALSE,
  verbose = FALSE
)

Arguments

fjord

Expects a character vector for one of the 8 available fjords. See fl_ListFjords for the list of possible choices.

layer

The layer of data the user wants to load. The default "PAR_B" will load monthly bottom PAR data. The other options, "K_PAR" will load monthly values for the light extinction coefficient (i.e. K_PAR) in the water column, "ClimSD" will load the standard deviation values for the monthly climatologies, and "YearlySD" will load the standard deviation values for the yearly climatologies. Note that only the PAR_B files and do not contain all global values and metadata. The other files are in supplement to the PAR_B files.

dirdata

The directory where the user would like to load the data from.

TS

The default, FALSE, will prevent this function from loading the monthly bottom PAR values. Instead it will load all global, annual, and monthly climatology data. Set TS = TRUE to load all data, but note that these may be extremely large.

verbose

TRUE or FALSE (default) to provide a more verbose output of the data loading process.

Value

Data are loaded in as a complex list format. Containing most of the data fields described in the documentation for fl_DownloadFjord.

Author

Bernard Gentili & Robert Schlegel

Examples

# Choose fjord
fjord_code <- "test"

# Load global, annual, and monthly climatologies
fjorddata <- fl_LoadFjord(fjord_code, dirdata = system.file("extdata", package = "FjordLight"))

# Load ALL data
fjorddata_full <- fl_LoadFjord(fjord_code,
                               dirdata = system.file("extdata", package = "FjordLight"), TS = TRUE)