modify_ed2in.Rd
This is a convenience function for modifying an ed2in
list object.
Arguments passed in all caps are assumed to be ED2IN namelist parameters and
are inserted directly into the ed2in
list objects. Lowercase arguments are
defined explicitly (see "Parameters"), and those that do not match explicit
arguments will be ignored with a warning. Because the lowercase arguments
come with additional validity checks, they are recommended over modifying
the ED2IN file directly via uppercase arguments. For all lowercase
arguments, the default (NULL
) means to use whatever is currently
in the input ed2in
.
modify_ed2in(
ed2in,
...,
veg_prefix = NULL,
latitude = NULL,
longitude = NULL,
met_driver = NULL,
start_date = NULL,
end_date = NULL,
EDI_path = NULL,
output_types = NULL,
output_dir = NULL,
run_dir = NULL,
runtype = NULL,
run_name = NULL,
include_these_pft = NULL,
pecan_defaults = FALSE,
add_if_missing = FALSE,
check_paths = TRUE,
.dots = list()
)
list to modify
Namelist arguments (see Description and Details)
Vegetation file prefix (SFILIN
). If lat
and lon
are part of the prefix,
Run latitude coordinate. If veg_prefix
is also provided,
pass to read_ed_veg, otherwise set in ED2IN directly. Should be omitted if
lat
and lon
are already part of veg_prefix
.
Run longitude coordinate. If veg_prefix
is also provided,
pass to read_ed_veg, otherwise set in ED2IN directly. Should be omitted if
lat
and lon
are already part of veg_prefix
.
Path and filename of met driver header
(ED_MET_DRIVER_DB
)
Run start date (IMONTHA
, IDATEA
, IYEARA
, ITIMEA
)
Run end date (IMONTHZ
, IDATEZ
, IYEARZ
ITIMEZ
)
Path to EDI
directory, which often has the VEG_DATABASE
and THSUMS_DATABASE
files.
Character vector of output types (see Details)
Output directory, for FFILOUT
(analysis) and SFILOUT
(history) files
Directory in which to store run-related config files (e.g. config.xml
).
ED initialization mode; either "INITIAL" or "HISTORY"
Give the run an informative name/description. Sets
the ED2IN EXPNME
tag. (default is NULL
)
Numeric vector describing the PFTs to
include in ED. Note that this is in addition to any PFTs
specified by the config.xml
– regardless of what this is set
to, those PFTs will be included, so if you want to only use PFTs
defined in config.xml
, set this to numeric(0)
. The default
(NULL
) means to use whatever is already in the current ED2IN
file, which is usually all (1-17) of ED's PFTs.
Logical. If TRUE
, set common ED2IN
defaults.
Logical. If TRUE
, all-caps arguments not found in
existing ed2in
list will be added to the end. Default = FALSE
.
Logical. If TRUE
(default), for any parameters that
expect files, check that files exist and throw an error if they don't.
A list of ...
arguments.
Modified ed2in
list object. See read_ed2in.
Namelist arguments are applied last, and will silently overwrite any arguments set by special case arguments.
Namelist arguments can be stored in a list and passed in via the .dots
argument (e.g. .dots = list(SFILIN = "/path/prefix_", ...)
), or using the
rlang::!!!
splicing operator. If both are provided, they will be spliced
together, with the ...
taking precedence.
For output_types
, select one or more of the following:
"fast" – Fast analysis; mostly polygon-level averages (IFOUTPUT
)
"daily – Daily means (one file per day) (IDOUTPUT
)
"monthly" – Monthly means (one file per month) (IMOUTPUT
)
"monthly_diurnal" – Monthly means of the diurnal cycle (one file per
month) (IQOUTPUT
)
"annual" – Annual (one file per year) (IYOUTPUT
)
"instant" – Instantaneous fluxes, mostly polygon-level variables, one
file per year (ITOUTPUT
)
"restart" – Restart file for HISTORY runs. (ISOUTPUT
)
"all" – All output types