dbW_weather_to_SOILWATfiles: Conversion: object of class 'swWeatherData' or data.frame to...

View source: R/sw_dbW_WeatherDatabase.R

dbW_weather_to_SOILWATfilesR Documentation

Conversion: object of class swWeatherData or data.frame to SOILWAT input text files

Description

Conversion: object of class swWeatherData or data.frame to SOILWAT input text files

Usage

dbW_weather_to_SOILWATfiles(
  path,
  site.label,
  weatherData = NULL,
  weatherDF = NULL,
  years = NULL,
  weatherDF_dataColumns = c("DOY", weather_dataColumns()),
  digits = 4L
)

Arguments

path

A character string. Path on disk to where to write files.

site.label

A character string. Site identification name added to comment on first line of each file.

weatherData

A list of elements of class swWeatherData that each hold daily weather data for one calendar year.

weatherDF

A data.frame. Weather data, see details.

years

A numeric vector. The calendar years.

weatherDF_dataColumns

A vector of character strings. The column names of weatherDF in the correct order for SOILWAT2 including calendar year year (optional) and day of year DOY, see weather_dataColumns().

digits

An integer value. The number of decimal places for rounding weather values (or TRUE but no rounding if FALSE or not finite).

Notes

weatherDF_dataColumns must exactly contain entries for day of year and the three weather variables.

Details

The weather data must be provided either via weatherData or weatherDF. See dbW_weatherData_to_dataframe() and dbW_weatherData_to_dataframe() for conversions between formats of weatherData and weatherDF.

getWeatherData_folders() offers the inverse operation, i.e., reading weather data from disk files.


Burke-Lauenroth-Lab/Rsoilwat documentation built on Dec. 9, 2023, 12:41 a.m.