Class: WrfLibrary::Wrf::WeatherType
- Inherits:
-
Object
- Object
- WrfLibrary::Wrf::WeatherType
- Defined in:
- lib/wrf_library/wrf/weather_type.rb
Overview
Simple mapping class to get the symbol for a given input parameter
Instance Attribute Summary collapse
-
#mapping ⇒ Hash
readonly
The mapping between input strings and the corresponding symbols.
Instance Method Summary collapse
- #fill_mapping ⇒ Object private
-
#initialize ⇒ WeatherType
constructor
initialization.
Constructor Details
#initialize ⇒ WeatherType
initialization
9 10 11 |
# File 'lib/wrf_library/wrf/weather_type.rb', line 9 def initialize fill_mapping end |
Instance Attribute Details
#mapping ⇒ Hash (readonly)
Returns the mapping between input strings and the corresponding symbols.
14 15 16 |
# File 'lib/wrf_library/wrf/weather_type.rb', line 14 def mapping @mapping end |
Instance Method Details
#fill_mapping ⇒ Object (private)
18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/wrf_library/wrf/weather_type.rb', line 18 def fill_mapping @mapping = Hash.new() @mapping["2mt"] = :temperature # 2 m temperature @mapping["slp"] = :sea_pressure # surface pressure @mapping["uvs"] = :wind_speed # wind speed @mapping["uvd"] = :wind_direction # wind direction @mapping["skt"] = :skin_temperature # skin temperature @mapping["sot"] = :soil_temoerature # top soil level temperature @mapping["swr"] = :shortwave_radiation # shortwave radiation @mapping["lwr"] = :longwave_radiation # longwave radiation @mapping["pcp"] = :precipitation # precipitation end |