make.sh.forcings.object: Function that generates an object used by sh.forcings

Description Usage Arguments Value Examples

View source: R/shforce.R

Description

Takes data from a box geometry file and a vector of cumulative water layer depths, as well as netCDF files of: exchanges, salinity and temperature, and generates a list object that is the parameter to sh.forcings (see Examples).

Usage

1
2
make.sh.forcings.object(bgm.file, exchange.file, cum.depth,
  temperature.file = NULL, salinity.file = NULL)

Arguments

bgm.file

Box geometry model (.bgm) file used by Atlantis that defines box boundaries and depths.

exchange.file

NetCDF (.nc) file containing water exchanges between box layers.

cum.depth

Vector of depths (starting at 0) that delineate the depths of the water layers for the model.

temperature.file

NetCDF (.nc) file containing time-series of temperature values for each water layer in each box. This parameter is not required.

salinity.file

NetCDF (.nc) file containing time-series of salinity values for each water layer in each box. This parameter is not required.

Value

R list object used by sh.forcings.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
## Not run: 
exchange.file    <- "GBR108_hydro.nc"
salinity.file    <- "GBR108_salt.nc"
temperature.file <- "GBR108_temp.nc"
bgm.file         <- "gbr_box_03012012.bgm"
cum.depth <- c(0,5,10,20,50,100,200,3000) # cumulative water layer depths

input.object <- make.sh.forcings.object(
  bgm.file         = bgm.file,
  exchange.file    = exchange.file,
  cum.depth        = cum.depth,
  temperature.file = temperature.file,
  salinity.file    = salinity.file
)
sh.forcings(input.object)

## End(Not run)

shanearichards/shinyrAtlantis documentation built on May 29, 2019, 8:07 p.m.