dummy_salt: Generate salinity forcing data for Atlantis

Description Usage Arguments Details See Also Examples

View source: R/dummy_salt.R

Description

This function generates the salinity forcing file for Atlantis.

Usage

1
2
dummy_salt(b, z, time, salt, start_time, fill_value = 35, model_name,
  bgm_file, gen_nc = FALSE, keep_cdf = TRUE)

Arguments

b

Number of boxes

z

Number of vertical boxes (i.e. layers)

time

A vector of time points (in seconds) between consecutive measurements

salt

A b by z by time data.frame or matrix with each entry corresponding to a salinity measurement at a specific time.

start_time

String variable of the format YYYY-MM-DD HH:MM:SS +0

fill_value

Fill value for missing data. Defaults to 35.

model_name

Name of the model.

bgm_file

Name of the bgm file. Include the file extension!

gen_nc

Generate the nc binary? Defaults to FALSE and required netcdf-bin to be installed.

keep_cdf

Keep the readable cdf file? Defaults to TRUE.

Details

This function generates the salinity forcing data for Atlantis in the ncdf4 file format and generates a binary. This function can compress the resultant cdf file if gen_nc = TRUE is set and can clean up after itself if keep_cdf = FALSE is set.

See Also

dummy_temp,gen_init,dummy_hydro

Examples

1
2
3
4
5
6
7
8
salt <- matrix(c(35.1345, 35.1319, 35.1598, 35.1781, 35.1754, 35.1649, 35.1345, 35.1241, 35.1951, 35.2213, 35.2308, 35.2257, 35.2146, 35.1241),nrow = 2)
b <- 1
z <- 7
bgm_file <- "atlantis_test.bgm"
model_name <- "atlantis"
start_time = "2014-01-01 00:00:00 +0"
time <- c(12,24)
gen_salt(b=b,z=z,time=time, salt = salt, start_time = start_time, model_name= model_name, bgm_file=bgm_file, gen_nc=TRUE)

mareframe/rlantis documentation built on May 21, 2019, 11:45 a.m.