Module: Atmospheris::Export::Iso5878

Defined in:
lib/atmospheris/export/iso_5878.rb,
lib/atmospheris/export/iso_5878/wind_table_export.rb,
lib/atmospheris/export/iso_5878/atmosphere_profile_export.rb

Defined Under Namespace

Classes: AtmosphereProfileExport, WindTableExport

Class Method Summary collapse

Class Method Details

.generate_atmosphere_profile(model_id, layers_data, table_id:, title_en:, geometric_altitudes:) ⇒ Hash

Generate atmosphere profile YAML data for a given model.

Parameters:

  • model_id (String)

    e.g. "15-annual", "60-warm"

  • layers_data (Hash)

    YAML data from table16.yaml or table19.yaml

  • table_id (String)

    YAML id field

  • title_en (String)

    YAML title-en field

  • geometric_altitudes (Array<Integer>)

    geometric altitudes in metres

Returns:

  • (Hash)

    YAML-serializable data



20
21
22
23
24
25
26
27
28
# File 'lib/atmospheris/export/iso_5878.rb', line 20

def generate_atmosphere_profile(model_id, layers_data, table_id:, title_en:, geometric_altitudes:)
  profile = ::Atmospheris::Iso5878::AtmosphereModelRegistry.create(model_id, layers_data)
  AtmosphereProfileExport.new(
    profile,
    table_id: table_id,
    title_en: title_en,
    geometric_altitudes: geometric_altitudes
  ).generate
end

.generate_wind_table(wind_yaml_data) ⇒ Hash

Augment wind observation YAML data with computed derived fields.

Parameters:

  • wind_yaml_data (Hash)

    loaded from table1.yaml

Returns:

  • (Hash)

    augmented data (computed fields filled where nil)



34
35
36
# File 'lib/atmospheris/export/iso_5878.rb', line 34

def generate_wind_table(wind_yaml_data)
  WindTableExport.new(wind_yaml_data).generate
end