gen_init: Generate an Atlantis initial conditions file

Description Usage Arguments Details See Also Examples

Description

This function generates the initial conditions file for Atlantis

Usage

1
2
3
gen_init(b, z, output_file = "init", timesteps = "UNLIMITED", set_groups,
  model_name = "model_name", bgm_file, start = NULL, timezone = "UTC",
  data = NULL, fill_value = NULL, gen_nc = FALSE, keep_cdf = TRUE)

Arguments

b

Number of boxes.

z

Number of vertical boxes (i.e. layers).

output_file

Name of the output_file. Defaults to init.

timesteps

Number of timesteps. Defaults to UNLIMITED.

fun_groups

Functional group in data.frame format.

model_name

Name of the model. Defaults to model_name.

bgm_file

Name of the bgm file. Include the file extension!

start

Specify the start date. Defaults to date().

timezone

Set the timezone. Defaults to UTC.

data

Initial conditions data as a csv. Defaults to generate blank data. See Details.

fill_value

txt or CSV file (see below). Defaults to 0 or Beth's defaults.

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 initial conditions file in the Atlantis ncdf4 file format. 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. By default, gen_init will generate empty data matrices that will be filled by the specified fill_value if it is provided. If it is not provided, the function specifies 0 for all the user defined functional groups and uses the fill values for the required variables from the SETas_model_New example (namely, init_vmpa_setas_25032013.nc). The function combines the essential variables in the required data set with those specified in the functional group csv. The data CSV should have one column of data per variable. The length of each column should be either b*1 for 2D variables or b*z for 3D variables. The init_data function can be used to help create this CSV. fill_value can at present it takes a txt file created by the ECCALbioparams Excel spreadsheet. Future implementations will allow a CSV that has two columns. First column, variable name and the second column the fillValue.

See Also

required_init,dummy_hydro,init_data

Examples

1
gen_init(b = 3, z = 2, fun_groups = fun_groups, bgm_file = "model.bgm", gen_nc = TRUE)

cddesja/R4Atlantis-legacy documentation built on May 13, 2019, 2:21 p.m.