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).

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

if (FALSE) {
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)
}