View source: R/read.hs.outputs.R
read.hs.outputs | R Documentation |
Wrapper function to read output from Heat Source version 6-9.
Heat Source 6-7 excel workbook needs to be saved as .xlsm. Workbooks in .xls
do not work. This function calls format_outputs
so the returned
data frame has the following columns:
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.
read.hs.outputs(
output_dir,
file_name,
hs_ver = 9,
sheet_name = NA_character_,
constituent_name = NA_character_,
sim_name = NA_character_
)
output_dir |
The path to directory where the output Heat Source file is located. |
file_name |
The file name of the .xlsm for Heat Source version 6-7 or the name of the .txt or .csv output file for Heat Source version 8-9. For Heat Source 6-7, the ".xlsm" extension should be included in the file name. |
hs_ver |
The version of Heat Source. Input is a numeric value equal to 6, 7, 8, or 9. Default is 9. |
sheet_name |
The name of the Heat Source 6-7 output worksheet to read.
String format. NA for Heat Source 8-9. Default is NA. The
|
constituent_name |
The name of the output. String format. Required for
Heat Source 6 and 7 models when reading Hydraulic outputs
(see details). Default is NA. If NA, the function will attempt to
look up the constituent using |
sim_name |
The name of the model scenario. String format. Default is NA. |
If you just want the raw import use the specific 'read.hs...' function suited to the model version, e.g. read.hs9.outputs.
This function converts heat source 6 long distance to stream km with the most downstream end = km 0.0
For Heat Source 6-7 models it is necessary to identify the
constituent_name
when reading hydraulic outputs
(e.g. sheet_name = 'Output - Hydraulics'
or
sheet_name = 'Main Menu'
for hs7 and hs6 models respectively). This is
necessary because these sheets have multiple outputs and the
constituent name helps the function identify which output to read. In this
situation use one of the following for constituent_name
:
'Flow' aka Flow Rate
'Flow Velocity'
data frame
read.hs6.temp
, read.hs6.shade
,
read.hs6.flow
, read.hs6.velocity
,
read.hs7.outputs
, read.hs7.shade
,
read.hs7.flow
, read.hs7.velocity
,
read.hs8.outputs
,
read.hs9.outputs
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.