weatherbench2.derived_variables.AggregatePrecipitationAccumulation

class weatherbench2.derived_variables.AggregatePrecipitationAccumulation(accumulation_hours, raw_accumulation_name='total_precipitation_6hr', lead_time_name='prediction_timedelta')

Compute longer aggregation periods from existing shorter accumulations.

Note: This assumes a 6h raw time step and prediction_timedelta starting at 6h.

Parameters:
  • accumulation_hours (int) –

  • raw_accumulation_name (str) –

  • lead_time_name (str) –

accumulation_hours

Hours to accumulate precipitaiton over

Type:

int

raw_accumulation_name

Name of the 6hr accumulation

Type:

str

lead_time_name

Name of lead_time dimension

Type:

str

__init__(accumulation_hours, raw_accumulation_name='total_precipitation_6hr', lead_time_name='prediction_timedelta')
Parameters:
  • accumulation_hours (int) –

  • raw_accumulation_name (str) –

  • lead_time_name (str) –

Return type:

None

Methods

__init__(accumulation_hours[, ...])

compute(dataset)

Compute derived variable, returning it in a new DataArray.

Attributes

all_input_core_dims

The set of all input core dimensions.

base_variables

Return a list of base variables.

core_dims

Return core dimensions needed for computing this variable.

lead_time_name

raw_accumulation_name

accumulation_hours