View source: R/read-tuv-file.r
read_qtuv_txt | R Documentation |
Reads and parses the header of a text file output by the Quick TUV on-line web front-end at UCAR to extract the header and spectral data. The time field is converted to a date.
read_qtuv_txt(
file,
ozone.du = NULL,
label = NULL,
tz = NULL,
locale = readr::default_locale(),
added.vars = NULL
)
file |
character string with the name of a text file. |
ozone.du |
numeric Ozone column in Dobson units. |
label |
character string, but if |
tz |
character Time zone is by default read from the file. |
locale |
The locale controls defaults that vary from place to place. The
default locale is US-centric (like R), but you can use
|
added.vars |
character vector Accepted member values are |
a source_spct object obtained by finding the center of wavelength
intervals in the Quick TUV output file, and adding the variables listed
in added.vars
. To obtain the same value as in version (<= 0.4.28)
pass added.vars = c("angle", "date")
in the call.
The ozone column value used in the simulation cannot be retrieved from the file. Tested files from Quick TUV version 5.2 on 2018-07-30 and also with more recent files in early 2024. This function can be expected to be robust to variations in the position of lines in the imported file and resistant to the presence of extraneous text or even summaries. By default web browsers save the output returned by the Quick TUV calculator as an HTML output, some of them with minimal headers and other with more extensive ones. In some cases, character escapes replace actual new lines. In most cases these HTML files are decoded correctly, but if not, use "save as" in the browser and select "text" when saving. As a last recourse, messed up files can be manually edited before import.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.