print_mkv_files: Print Markov weather generator files as required by SOILWAT2

View source: R/swWeatherGenerator.R

print_mkv_filesR Documentation

Print Markov weather generator files as required by SOILWAT2

Description

Print Markov weather generator files as required by SOILWAT2

Usage

print_mkv_files(mkv_doy, mkv_woy, path, digits = 5)

Arguments

mkv_doy

A data.frame. The same named output element of dbW_estimate_WGen_coefs.

mkv_woy

A data.frame. The same named output element of dbW_estimate_WGen_coefs.

path

A character string. The path on disk to the location where output files should be created.

digits

An integer value. The number of digits with which to write the values to disk.

Value

This function is called for its side effect, i.e., writing values to files “mkv_prob.in” and “mkv_covar.in”.

See Also

dbW_estimate_WGen_coefs to calculate the necessary values based on daily weather data.

Examples

path <- tempdir()

res <- dbW_estimate_WGen_coefs(rSOILWAT2::weatherData)
print_mkv_files(
  mkv_doy = res[["mkv_doy"]],
  mkv_woy = res[["mkv_woy"]],
  path = path)

## Cleanup
unlink(list.files(path), force = TRUE)


DrylandEcology/rSOILWAT2 documentation built on Jan. 12, 2024, 9:06 p.m.