Generates synthetic Tmin, Tmax, and Tmean climate series for multiple stations using stochastic climate dynamics.

simulate_temperature(
  stations,
  time_index,
  ar_coeff = 0.7,
  seasonal_amplitude = 3,
  warming_trend = 0.02,
  noise_sd = 1,
  mean_dtr = 6,
  rainfall = NULL,
  cooling_factor = 0.15,
  min_tmin = 10,
  max_tmin = 35,
  min_tmax = 15,
  max_tmax = 45,
  seed = NULL
)

Arguments

stations

data.frame from create_stations()

time_index

data.frame from generate_time_index()

ar_coeff

Numeric. AR(1) persistence coefficient. Default = 0.7

seasonal_amplitude

Numeric. Baseline annual temperature cycle amplitude. Default = 3

warming_trend

Numeric. Annual warming trend (°C/year). Default = 0.02

noise_sd

Numeric. Standard deviation of stochastic variability. Default = 1

mean_dtr

Numeric. Mean diurnal temperature range (Tmax − Tmin). Default = 6

rainfall

Optional numeric vector. Rainfall values used for rainfall-temperature coupling.

cooling_factor

Numeric. Controls rainfall cooling strength on Tmax. Default = 0.15

min_tmin

Numeric. Minimum allowable Tmin. Default = 10

max_tmin

Numeric. Maximum allowable Tmin. Default = 35

min_tmax

Numeric. Minimum allowable Tmax. Default = 15

max_tmax

Numeric. Maximum allowable Tmax. Default = 45

seed

Optional numeric seed.

Value

data.frame containing:

Station

Station name

LON

Longitude

LAT

Latitude

ELEV

Elevation

DATE

Simulation timestamp

Year

Calendar year

Month

Calendar month

Season

Climatological season

Tmin

Simulated minimum temperature (°C)

Tmax

Simulated maximum temperature (°C)

Avg.Temp

Mean temperature (°C)

DTR

Diurnal temperature range (°C)

Details

The simulation incorporates:

  • seasonal variability,

  • autoregressive temporal persistence,

  • spatial station effects,

  • climate-zone variability,

  • coastal moderation,

  • elevation lapse-rate adjustment,

  • long-term warming trends,

  • stochastic climate variability,

  • physically consistent Tmax > Tmin relationships,

  • optional rainfall-temperature coupling.

Examples

stations <- create_stations(
  n = 3,
  seed = 123
)
#> Generating synthetic station network...
#> Generated 3 synthetic stations within bounding box.
#> Deriving climate-aware station attributes...

time_index <- generate_time_index(
  start_date = "2000-01-01",
  end_date = "2005-12-31",
  frequency = "monthly"
)
#> Generated 72 time steps at monthly resolution.

temp <- simulate_temperature(
  stations = stations,
  time_index = time_index,
  seed = 123
)
#> Temperature simulation complete for 3 stations.

head(temp)
#>      Station       LON      LAT  ELEV       DATE Year Month  Season  Tmin  Tmax
#> 1  Station_1 -2.062112 10.68112 422.5 2000-01-16 2000     1     Dry 22.25 30.40
#> 4  Station_1 -2.062112 10.68112 422.5 2000-02-15 2000     2     Dry 23.78 31.78
#> 7  Station_1 -2.062112 10.68112 422.5 2000-03-16 2000     3 Pre-Wet 26.13 33.88
#> 10 Station_1 -2.062112 10.68112 422.5 2000-04-15 2000     4 Pre-Wet 25.01 32.74
#> 13 Station_1 -2.062112 10.68112 422.5 2000-05-16 2000     5 Pre-Wet 23.31 31.38
#> 16 Station_1 -2.062112 10.68112 422.5 2000-06-15 2000     6     Wet 22.76 31.44
#>    Avg.Temp  DTR CLIMATE_ZONE COASTAL_INDEX
#> 1     26.33 8.15     Savannah         0.932
#> 4     27.78 8.00     Savannah         0.932
#> 7     30.01 7.75     Savannah         0.932
#> 10    28.87 7.72     Savannah         0.932
#> 13    27.35 8.08     Savannah         0.932
#> 16    27.10 8.68     Savannah         0.932