Module: WrfLibrary::Statistic::Hourly

Defined in:
lib/wrf_library/statistic/hourly.rb

Overview

module to generate hourly statistic values for wrf based measurands

Class Method Summary collapse

Class Method Details

.calculate_hourly_data_means(timestamps, data) ⇒ Array

method to generate hourly mean values for the given data content

Parameters:

  • timestamps (Array)

    the array with the timestamps of the data

  • data (Array)

    the data values

Returns:

  • (Array)

    the hourly means of the input data



21
22
23
# File 'lib/wrf_library/statistic/hourly.rb', line 21

def self.calculate_hourly_data_means(timestamps, data)
  WrfLibrary::Statistic.calculate_means_for_timespan(timestamps, :hour, data)
end

.calculate_hourly_means(measurand, handler) ⇒ Array

method to generate hourly mean values for the given measurand

Parameters:

Returns:

  • (Array)

    the array with the hourly means



13
14
15
# File 'lib/wrf_library/statistic/hourly.rb', line 13

def self.calculate_hourly_means(measurand, handler)
  WrfLibrary::Statistic.calculate_timespan_means(measurand, handler, :hour)
end

.calculate_hourly_rainsum(handler) ⇒ Array

method to sum up the rain data into hourly rain sums for that calculate the difference from the rain value at the start and end of the currently checked hour

Parameters:

Returns:

  • (Array)

    the array with the hourly values



37
38
39
# File 'lib/wrf_library/statistic/hourly.rb', line 37

def self.calculate_hourly_rainsum(handler)
  WrfLibrary::Statistic.calculate_timespan_rainsum(handler, :hour)
end

.calculate_hourly_winddirection_means(handler) ⇒ Array

method to generate hourly values for the prevalent wind direction

Parameters:

Returns:

  • (Array)

    the array with the hourly values



44
45
46
# File 'lib/wrf_library/statistic/hourly.rb', line 44

def self.calculate_hourly_winddirection_means(handler)
  WrfLibrary::Statistic.calculate_timespan_winddirection_means(handler, :hour)
end

.calculate_hourly_windspeed_means(handler) ⇒ Array

method to generate hourly mean values for the wind speed

Parameters:

Returns:

  • (Array)

    the array with the hourly values



28
29
30
# File 'lib/wrf_library/statistic/hourly.rb', line 28

def self.calculate_hourly_windspeed_means(handler)
  WrfLibrary::Statistic.calculate_timespan_windspeed_means(handler, :hour)
end