hrs_rand: Generate random hours of operation

Description Usage Arguments Value

View source: R/hrs_rand.R

Description

Generate random hours of operation over the meteorological database. Hours within each meteorological year are randomly sampled (without replacement). Random sampling can consider blocks of consecutive hours, or individual hours (block length of 1).

Usage

1
2
3
4
5
6
7
8
hrs_rand(
  yrspan = 2016L:2020L,
  nblock = 6L,
  blocklen = 1L,
  which_filter = 1L,
  units = c("hours", "days"),
  emis_scale = 1
)

Arguments

yrspan

Calendar years for which operating hours are to be generated. A numeric vector

nblock

Number of blocks of consecutive hours.

blocklen

Number of hours in each block. Default is 1.

which_filter

Integer specifying special filters on the random number generation. Default is 1 (no filter). 2 is case where nblock = 1 and blocks in successive years must be spaced at least 365 days apart.

units

for blocklen, either "hours" (default) or "days". Return value is always vector of hours.

emis_scale

, for binned randomized emission rates, a vector of emission scalars of length blocklen. Default is 1 (no binning).

Value

An integer vector of operating hours, which may be used to index rows in an impact matrix.


jlovegren0/aermod documentation built on Jan. 14, 2022, 8:06 a.m.