Random generation of observations (random / param)

Description

Generates random observations at random location/time/frequency/duration/etc.

Random observations are generated using a uniform distribution between specified arguments obs_min and obs_max.

Observation “stations” are randomly located in the reference domain. By default, “stations” are simply given an ID from 0 to nstations. It is possible to specify a list of names using station_names. This is particularly useful when computing simulations with a Lagrangian model which identifies observations with their station name and date.

Yaml arguments

The following arguments are used to configure the plugin. pyCIF will return an exception at the initialization if mandatory arguments are not specified, or if any argument does not fit accepted values or type:

Mandatory arguments

nstations: (mandatory)

Number of stations to generate

accepted type: <class ‘int’>

Optional arguments

frequency: (optional): 1H

Frequency of generated observations

accepted type: <class ‘str’>

duration: (optional): 1H

Duration of generated observations

accepted type: <class ‘str’>

zmax: (optional): 100

Stations are randomly located between 0 m a.g.l. and zmax m a.g.l

accepted type: <class ‘float’>

obs_min: (optional): 0

Lower range of the observations for uniform distribution

accepted type: <class ‘float’>

obs_max: (optional): 1

Upper range of the observations for uniform distribution

accepted type: <class ‘float’>

random_subperiod_shift: (optional): False

Randomly shift observations within their frequency. For instance, if the frequency is hourly, and random_subperiod_shift is True, hourly observations will be generated, but with a random shift of 0-60 minutes for each observations.

accepted type: <class ‘bool’>

seed: (optional): False

Use a fixed seed to generate observations

accepted type: <class ‘bool’>

seed_id: (optional): 0

The seed to be used to generate observations. The associated command is np.random.seed

accepted type: <class ‘int’>

station_names: (optional)

List of station names to be used. Should be at least larger than nstations

accepted type: <class ‘list’>

Requirements

The current plugin requires the present plugins to run properly:

Requirement name

Requirement type

Explicit definition

Any valid

Default name

Default version

domain

Domain

False

True

None

None

Yaml template

Please find below a template for a Yaml configuration:

 1measurements:
 2  plugin:
 3    name: random
 4    version: param
 5    type: measurements
 6
 7  # Mandatory arguments
 8  nstations: XXXXX
 9
10  # Optional arguments
11  frequency: XXXXX
12  duration: XXXXX
13  zmax: XXXXX
14  obs_min: XXXXX
15  obs_max: XXXXX
16  random_subperiod_shift: XXXXX
17  seed: XXXXX
18  seed_id: XXXXX
19  station_names: XXXXX