create_survey_env: Create environmental survey data subset from Atlantis output

View source: R/create_survey_env.R

create_survey_envR Documentation

Create environmental survey data subset from Atlantis output

Description

Create a subset of the physical environment observations for an Atlantis scenario.

Uses data provided by an Atlantis scenario and adds observation error and/or bias, along with subsetting, to provide an environmental index for use in subsequent model fitting.

Usage

create_survey_env(true_env, survdepth, survboxes, survtimes)

Arguments

true_env

A data.frame of true environmental data sampled from an Atlantis scenario.

time

The timing of the survey (a vector indicating specific time steps, which are typically associated with years) i.e., seq(365,10*3650,365) would be an annual survey for 10 years

layer

Which layer to sample, surface or bottom? or numeric model layer

boxes

A vector of box numbers

Details

The function takes physical data from an Atlantis scenario where the data was read in from Atlantis output using load_nc_physics. One does not need to use these functions to create dat, rather you must only ensure that the structure of dat is the same. Currently, the function subsets the data by polygon and time, with the user defining a single layer, either "bottom" or "surface", to sample. Possible environmental variables from load_nc_physics include "salt", "NO3", "NH3", "Temp", "Oxygen", "Si", "Det_Si", "DON", "Chl_a", "Denitrifiction", "Nitrification". Only one variable is loaded with a call to load_nc_physics, so this function also takes one environmental variable at a time and subsets to specific defined polygons, and specific defined time representing a survey.

Value

The function returns a subsetted matrix with the same columns as the input data, i.e.,:

  • variable

  • polygon

  • layer

  • time

  • atoutput

Author(s)

Kelli Faye Johnson, Sarah Gaichas


r4atlantis/atlantisom documentation built on Nov. 12, 2023, 2:59 a.m.