create_transport: Create "transport" file for Atlantis.

Description Usage Arguments Details Value Examples

View source: R/atlantis_hydro.R

Description

Transport is the hydrodynamic forcing for the Atlantis model from oceanographic models. These functions aim to minimize the amount of manual handling of details, creating an NetCDF file that can be modified directly. All the Box Geometry Model details are determined from the bgm file itself. The output file is the precursor file for input to HydroConstruct (as per section 4.1 of the Atlantis User Guide).

Usage

1
2
3
4
5
6
7
8
9
create_transport(
  filename,
  model_title = "Transport file [placeholder]",
  bgmfilepath = "",
  bgmlevels = NULL,
  time_steps = NULL,
  transp_params = "",
  overwrite = FALSE
)

Arguments

filename

the NetCDF file to create

model_title

name of the model

bgmfilepath

path to BGM file

bgmlevels

the Atlantis depth levels

time_steps

actual time steps, need to be regularly space

transp_params

optional details to put in the NetCDF notes

overwrite

set to TRUE to clobber an existing file

Details

Please use the original BGM file in its native map projection, there is no need to copy this to a longitude-latitude version of the same file.

TODO: check that bgmlevels should only be an index, check that time_steps must be regular ?( or just monotonic incresing?)

Value

the filename of the output (use ncdf4 to inspect, modify it)

Examples

1
2
3
tfile <- file.path(tempdir(), "my_hydrofile.nc")
(ncfile <- create_transport(tfile, bgmfilepath = bgmfiles::bgmfiles("antarctica_99")))
## use ncdf4::nc_open to inspect the file

mdsumner/angstroms documentation built on April 20, 2020, 8:50 p.m.