write_nfd: Create Natural Flow Files for Each Site

View source: R/write_nfd.R

write_nfdR Documentation

Create Natural Flow Files for Each Site

Description

write_nfd() creates csv files or an Excel file for nfd objects. For csv files, a file is created for each site, flow type, and time step (see details below). For Excel files, there will be one Excel file for each flow type and time step.

Usage

write_nfd(
  x,
  path,
  overwrite = FALSE,
  format = "csv",
  trace_names = NULL,
  insert_name = ""
)

Arguments

x

nfd or crss_nf object.

path

Directory to save files to.

overwrite

Boolean. If TRUE and files already exists in path/traceN, the files will be overwritten.

format

"csv" or "excel".

trace_names

Overwrite the default trace names. If not NULL, then must be the same length as the number of traces.

insert_name

String that is inserted in file name.

Details

For csv files, in the directory provided, there will be one folder for each flow type-time step combination, and it each of those folders there will a csv files for each site. The csv files will be named based on the site names in the nfd object. Each csv is in time by trace format

Folders will be created inside path e.g.: | path/ | monthly_intervening/ | site1.csv | site2.csv | ... | annual_total/ | site1.csv | site2.csv | ...

For Excel files, there will be one file for each flow space, timestep combination. Each file will have the sites as sheets, and each sheet will be in time x trace format.


BoulderCodeHub/CRSSIO documentation built on July 2, 2023, 5:15 p.m.