17.2.5.2. cis.aggregation package

17.2.5.2.1. cis.aggregation.aggregate module

class cis.aggregation.aggregate.Aggregate(grid, output_file, data_reader=<cis.data_io.data_reader.DataReader object>, data_writer=<cis.data_io.data_writer.DataWriter object>)

Bases: object

aggregate(variables, filenames, product=None, kernel=None)

Aggregate the given variables based on the initialised grid

Parameters:
  • variables (string or list) – One or more variables to read from the files
  • filenames (string or list) – One or more filenames of the files to read
  • product (str) – Name of data product to use (optional)
  • kernel (str) – Name of kernel to use (the default is ‘moments’)

17.2.5.2.2. cis.aggregation.aggregation_grid module

class cis.aggregation.aggregation_grid.AggregationGrid

Bases: cis.aggregation.aggregation_grid.AggregationGrid

Holds the start and delta values for the aggregation grid. is_date indicates whether the limits are date/times - None if unknown :ivar start: aggregation start point :type start: str :ivar delta: aggregation step to take through grid :type delta: str :ivar is_time: indicates whether the limits apply to a time dimension: None if not known :type is_type: bool

17.2.5.2.3. cis.aggregation.aggregation_kernels module

class cis.aggregation.aggregation_kernels.MultiKernel(cell_method, sub_kernels)

Bases: object

Represents a set of kernels to be applied each in turn

17.2.5.2.4. cis.aggregation.aggregator module

class cis.aggregation.aggregator.Aggregator(data, grid)

Bases: object

aggregate_gridded(kernel)
aggregate_ungridded(kernel)

Performs aggregation for ungridded data by first generating a new grid, converting it into a cube, then collocating using the appropriate kernel and a cube cell constraint

get_grid(coord)
cis.aggregation.aggregator.add_month_midpoint(dt_object, months)
cis.aggregation.aggregator.add_year_midpoint(dt_object, years)
cis.aggregation.aggregator.aggregation_grid_array(start, end, delta, is_time, coordinate)
cis.aggregation.aggregator.categorise_coord_function(start, end, delta, is_time)
cis.aggregation.aggregator.find_nearest(array, value)

Find the nearest to the parameter value in the array :param array: A numpy array :param value: A single value :return: A single value from the array

cis.aggregation.aggregator.month_past_end_of_year(month, year)