format_outputs: Format Heat Source output to a long format

View source: R/format_outputs.R

format_outputsR Documentation

Format Heat Source output to a long format

Description

Format output from any of the read.hs functions so the returned data frame is in long format with a consistent structure and column names.

Usage

format_outputs(df, hs_ver = 9, name = NA, constituent_name = NA, sim_name = NA)

Arguments

df

A data frame output from any of the read.hs functions

hs_ver

The version of Heat Source. Input is a numeric value equal to 6, 7, 8, or 9. Default is 9.

name

The name of the .txt, or .csv output file for Heat Source version 8-9; or excel sheet name for Heat Source 6-7. String format.

constituent_name

The name of the output. String format. Optional. Default is NA. If NA, the function will attempt to look up the constituent using output_lookup and the value in 'name'.

sim_name

The name of the model scenario. String format. Optional. Default is NA.

Details

Output column names include:

  • sim: Character value of the model scenario simulation name or other description.

  • constituent: Character value of the constituent (e.g. 'Temperature, water').

  • datetime: POSIXct datetime.

  • date: Character date in format "mm/dd/YYYY".

  • model_km: numeric stream kilometer extracted from the model.

  • sample: land cover sample. Only returned if reading 'SolarBlock' or 'Heat_SR3b'.

  • value: Constituent value.

Heat Source 6 long distances are converted to stream kilometer with the most downstream long distance = stream kilometer 0.

Value

data frame


DEQrmichie/heatsourcetools documentation built on Jan. 25, 2025, 2:31 p.m.