Class: WrfLibrary::JsonConverter::HourlyMeanJsonConverter
- Inherits:
-
HourlyJsonConverter
- Object
- BaseStationJsonConverter
- WrfStationJsonConverter
- HourlyJsonConverter
- WrfLibrary::JsonConverter::HourlyMeanJsonConverter
- Defined in:
- lib/wrf_library/json_converter/hourly_mean_converter.rb
Overview
Child class to generate valid json output for the result data of a given wrf meteogram result already stored in a data repository
Instance Attribute Summary
Attributes inherited from HourlyJsonConverter
Attributes inherited from BaseStationJsonConverter
Instance Method Summary collapse
-
#generate_data_values ⇒ Hash
private
implementation of the abstract parent method to create valid json objects for the stored data values.
Methods inherited from HourlyJsonConverter
Methods inherited from WrfStationJsonConverter
#add_additions, #generate_grid_coordinates, #generate_grid_data
Methods inherited from BaseStationJsonConverter
#add_additions, #convert, #generate_meta_hash, #generate_station_hash, #initialize
Constructor Details
This class inherits a constructor from WrfLibrary::JsonConverter::HourlyJsonConverter
Instance Method Details
#generate_data_values ⇒ Hash (private)
implementation of the abstract parent method to create valid json objects for the stored data values
16 17 18 19 20 21 22 23 24 |
# File 'lib/wrf_library/json_converter/hourly_mean_converter.rb', line 16 def generate_data_values if (@measurand == :wind_speed) {"wind_speed" => WrfLibrary::Statistic::Hourly.calculate_hourly_windspeed_means(@handler) } else {@measurand.to_s.tr("@", "") => WrfLibrary::Statistic::Hourly.calculate_hourly_means(@measurand, @handler) } end end |