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

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

Value

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

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

Examples

tfile <- file.path(tempdir(), "my_hydrofile.nc")
(ncfile <- create_transport(tfile, bgmfilepath = bgmfiles::bgmfiles("antarctica_99")))
#> 'bgmlevels' not supplied, building levels at -5277.47746194913, -2000, -999.999999999995, -749.999999999995, -399.999999999995, -299.999999999995, -199.999999999995, -99.9999999999955, -49.9999999999955, -19.9999999999955, 4.54747350886464e-12
#> [1] "/tmp/RtmpNWRMfi/my_hydrofile.nc"
## use ncdf4::nc_open to inspect the file