Creates a synthetic hourly weather series with diurnal temperature and humidity cycles, intermittent rain, and leaf wetness periods. This is useful for examples, tutorials, tests, and method development before field data are available.
Usage
simulate_weather_series(
start = as.POSIXct("2024-01-01 00:00:00", tz = "UTC"),
days = 60,
n_series = 1,
seed = NULL,
id_col = NULL,
id_prefix = "S",
temp_mean = 22,
temp_amp = 6,
rh_mean = 80,
rh_amp = 12,
rain_prob = 0.08,
tz = "UTC"
)Arguments
- start
Start timestamp for the simulation.
- days
Number of days to simulate.
- n_series
Number of independent weather series to generate.
- seed
Optional random seed for reproducibility.
- id_col
Optional name of the series identifier column. If
NULLandn_series > 1, the output uses"series_id".- id_prefix
Prefix used when constructing simulated series identifiers.
- temp_mean
Baseline temperature.
- temp_amp
Amplitude of the diurnal temperature cycle.
- rh_mean
Baseline relative humidity.
- rh_amp
Amplitude of the diurnal relative humidity cycle.
- rain_prob
Probability of rain in each hour.
- tz
Time zone assigned to the simulated timestamps.
