read_qtuv_txt {photobiologyInOut}R Documentation

Read Quick TUV output file.

Description

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.

Usage

read_qtuv_txt(
  file,
  ozone.du = NULL,
  label = NULL,
  tz = NULL,
  locale = readr::default_locale()
)

Arguments

file

character string with the name of a text file.

ozone.du

numeric Ozone column in Dobson units.

label

character string, but if NULL the value of file is used, and if NA the "what.measured" attribute is not set.

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 locale to create your own locale that controls things like the default time zone, encoding, decimal mark, big mark, and day/month names.

Value

a source_spct object obtained by finding the center of wavelength intervals in the Quick TUV output file, and adding variables zenith.angle and date.

Note

The ozone column value used in the simulation cannot be retrieved from the file. Tested only with Quick TUV versison 5.2 on 2018-07-30. This function can be expected to be robust to variations in the position of lines in the imported file and resistent to the presence of extraneous text or even summaries.

References

https://www.acom.ucar.edu/Models/TUV/Interactive_TUV/


[Package photobiologyInOut version 0.4.27 Index]