Skip to content

Commit

Permalink
feat: Add CO2, Methane to air quality (#151)
Browse files Browse the repository at this point in the history
* feat: register new air quality variables

* update files
  • Loading branch information
patrick-zippenfenig authored Oct 24, 2024
1 parent 70bce90 commit f43fb9a
Show file tree
Hide file tree
Showing 15 changed files with 31 additions and 8 deletions.
Binary file modified bin/main/com/openmeteo/sdk/Unit.class
Binary file not shown.
Binary file modified bin/main/com/openmeteo/sdk/Variable.class
Binary file not shown.
1 change: 1 addition & 0 deletions csharp/openmeteo_sdk/Unit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ public enum Unit : byte
us_air_quality_index = 38,
watt_per_square_metre = 39,
wmo_code = 40,
parts_per_million = 41,
};


Expand Down
2 changes: 2 additions & 0 deletions csharp/openmeteo_sdk/Variable.cs
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,8 @@ public enum Variable : byte
freezing_rain_probability = 127,
ice_pellets_probability = 128,
snowfall_probability = 129,
carbon_dioxide = 130,
methane = 131,
};


Expand Down
7 changes: 5 additions & 2 deletions flatbuffers/weather_api.fbs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ enum Unit : ubyte {
unix_time,
us_air_quality_index,
watt_per_square_metre,
wmo_code
wmo_code,
parts_per_million
}

enum Model: ubyte {
Expand Down Expand Up @@ -270,7 +271,9 @@ enum Variable: ubyte {
rain_probability,
freezing_rain_probability,
ice_pellets_probability,
snowfall_probability
snowfall_probability,
carbon_dioxide,
methane
}

enum Aggregation: ubyte {
Expand Down
3 changes: 2 additions & 1 deletion java/com/openmeteo/sdk/Unit.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,9 @@ private Unit() { }
public static final int us_air_quality_index = 38;
public static final int watt_per_square_metre = 39;
public static final int wmo_code = 40;
public static final int parts_per_million = 41;

public static final String[] names = { "undefined", "celsius", "centimetre", "cubic_metre_per_cubic_metre", "cubic_metre_per_second", "degree_direction", "dimensionless_integer", "dimensionless", "european_air_quality_index", "fahrenheit", "feet", "fraction", "gdd_celsius", "geopotential_metre", "grains_per_cubic_metre", "gram_per_kilogram", "hectopascal", "hours", "inch", "iso8601", "joule_per_kilogram", "kelvin", "kilopascal", "kilogram_per_square_metre", "kilometres_per_hour", "knots", "megajoule_per_square_metre", "metre_per_second_not_unit_converted", "metre_per_second", "metre", "micrograms_per_cubic_metre", "miles_per_hour", "millimetre", "pascal", "per_second", "percentage", "seconds", "unix_time", "us_air_quality_index", "watt_per_square_metre", "wmo_code", };
public static final String[] names = { "undefined", "celsius", "centimetre", "cubic_metre_per_cubic_metre", "cubic_metre_per_second", "degree_direction", "dimensionless_integer", "dimensionless", "european_air_quality_index", "fahrenheit", "feet", "fraction", "gdd_celsius", "geopotential_metre", "grains_per_cubic_metre", "gram_per_kilogram", "hectopascal", "hours", "inch", "iso8601", "joule_per_kilogram", "kelvin", "kilopascal", "kilogram_per_square_metre", "kilometres_per_hour", "knots", "megajoule_per_square_metre", "metre_per_second_not_unit_converted", "metre_per_second", "metre", "micrograms_per_cubic_metre", "miles_per_hour", "millimetre", "pascal", "per_second", "percentage", "seconds", "unix_time", "us_air_quality_index", "watt_per_square_metre", "wmo_code", "parts_per_million", };

public static String name(int e) { return names[e]; }
}
Expand Down
4 changes: 3 additions & 1 deletion java/com/openmeteo/sdk/Variable.java
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,10 @@ private Variable() { }
public static final int freezing_rain_probability = 127;
public static final int ice_pellets_probability = 128;
public static final int snowfall_probability = 129;
public static final int carbon_dioxide = 130;
public static final int methane = 131;

public static final String[] names = { "undefined", "apparent_temperature", "cape", "cloud_cover", "cloud_cover_high", "cloud_cover_low", "cloud_cover_mid", "daylight_duration", "dew_point", "diffuse_radiation", "diffuse_radiation_instant", "direct_normal_irradiance", "direct_normal_irradiance_instant", "direct_radiation", "direct_radiation_instant", "et0_fao_evapotranspiration", "evapotranspiration", "freezing_level_height", "growing_degree_days", "is_day", "latent_heat_flux", "leaf_wetness_probability", "lifted_index", "lightning_potential", "precipitation", "precipitation_hours", "precipitation_probability", "pressure_msl", "rain", "relative_humidity", "runoff", "sensible_heat_flux", "shortwave_radiation", "shortwave_radiation_instant", "showers", "snow_depth", "snow_height", "snowfall", "snowfall_height", "snowfall_water_equivalent", "sunrise", "sunset", "soil_moisture", "soil_moisture_index", "soil_temperature", "surface_pressure", "surface_temperature", "temperature", "terrestrial_radiation", "terrestrial_radiation_instant", "total_column_integrated_water_vapour", "updraft", "uv_index", "uv_index_clear_sky", "vapour_pressure_deficit", "visibility", "weather_code", "wind_direction", "wind_gusts", "wind_speed", "vertical_velocity", "geopotential_height", "wet_bulb_temperature", "river_discharge", "wave_height", "wave_period", "wave_direction", "wind_wave_height", "wind_wave_period", "wind_wave_peak_period", "wind_wave_direction", "swell_wave_height", "swell_wave_period", "swell_wave_peak_period", "swell_wave_direction", "pm10", "pm2p5", "dust", "aerosol_optical_depth", "carbon_monoxide", "nitrogen_dioxide", "ammonia", "ozone", "sulphur_dioxide", "alder_pollen", "birch_pollen", "grass_pollen", "mugwort_pollen", "olive_pollen", "ragweed_pollen", "european_aqi", "european_aqi_pm2p5", "european_aqi_pm10", "european_aqi_nitrogen_dioxide", "european_aqi_ozone", "european_aqi_sulphur_dioxide", "us_aqi", "us_aqi_pm2p5", "us_aqi_pm10", "us_aqi_nitrogen_dioxide", "us_aqi_ozone", "us_aqi_sulphur_dioxide", "us_aqi_carbon_monoxide", "sunshine_duration", "convective_inhibition", "shortwave_radiation_clear_sky", "global_tilted_irradiance", "global_tilted_irradiance_instant", "ocean_current_velocity", "ocean_current_direction", "cloud_base", "cloud_top", "mass_density", "boundary_layer_height", "formaldehyde", "glyoxal", "non_methane_volatile_organic_compounds", "pm10_wildfires", "peroxyacyl_nitrates", "secondary_inorganic_aerosol", "residential_elementary_carbon", "total_elementary_carbon", "pm2_5_total_organic_matter", "sea_salt_aerosol", "nitrogen_monoxide", "thunderstorm_probability", "rain_probability", "freezing_rain_probability", "ice_pellets_probability", "snowfall_probability", };
public static final String[] names = { "undefined", "apparent_temperature", "cape", "cloud_cover", "cloud_cover_high", "cloud_cover_low", "cloud_cover_mid", "daylight_duration", "dew_point", "diffuse_radiation", "diffuse_radiation_instant", "direct_normal_irradiance", "direct_normal_irradiance_instant", "direct_radiation", "direct_radiation_instant", "et0_fao_evapotranspiration", "evapotranspiration", "freezing_level_height", "growing_degree_days", "is_day", "latent_heat_flux", "leaf_wetness_probability", "lifted_index", "lightning_potential", "precipitation", "precipitation_hours", "precipitation_probability", "pressure_msl", "rain", "relative_humidity", "runoff", "sensible_heat_flux", "shortwave_radiation", "shortwave_radiation_instant", "showers", "snow_depth", "snow_height", "snowfall", "snowfall_height", "snowfall_water_equivalent", "sunrise", "sunset", "soil_moisture", "soil_moisture_index", "soil_temperature", "surface_pressure", "surface_temperature", "temperature", "terrestrial_radiation", "terrestrial_radiation_instant", "total_column_integrated_water_vapour", "updraft", "uv_index", "uv_index_clear_sky", "vapour_pressure_deficit", "visibility", "weather_code", "wind_direction", "wind_gusts", "wind_speed", "vertical_velocity", "geopotential_height", "wet_bulb_temperature", "river_discharge", "wave_height", "wave_period", "wave_direction", "wind_wave_height", "wind_wave_period", "wind_wave_peak_period", "wind_wave_direction", "swell_wave_height", "swell_wave_period", "swell_wave_peak_period", "swell_wave_direction", "pm10", "pm2p5", "dust", "aerosol_optical_depth", "carbon_monoxide", "nitrogen_dioxide", "ammonia", "ozone", "sulphur_dioxide", "alder_pollen", "birch_pollen", "grass_pollen", "mugwort_pollen", "olive_pollen", "ragweed_pollen", "european_aqi", "european_aqi_pm2p5", "european_aqi_pm10", "european_aqi_nitrogen_dioxide", "european_aqi_ozone", "european_aqi_sulphur_dioxide", "us_aqi", "us_aqi_pm2p5", "us_aqi_pm10", "us_aqi_nitrogen_dioxide", "us_aqi_ozone", "us_aqi_sulphur_dioxide", "us_aqi_carbon_monoxide", "sunshine_duration", "convective_inhibition", "shortwave_radiation_clear_sky", "global_tilted_irradiance", "global_tilted_irradiance_instant", "ocean_current_velocity", "ocean_current_direction", "cloud_base", "cloud_top", "mass_density", "boundary_layer_height", "formaldehyde", "glyoxal", "non_methane_volatile_organic_compounds", "pm10_wildfires", "peroxyacyl_nitrates", "secondary_inorganic_aerosol", "residential_elementary_carbon", "total_elementary_carbon", "pm2_5_total_organic_matter", "sea_salt_aerosol", "nitrogen_monoxide", "thunderstorm_probability", "rain_probability", "freezing_rain_probability", "ice_pellets_probability", "snowfall_probability", "carbon_dioxide", "methane", };

public static String name(int e) { return names[e]; }
}
Expand Down
1 change: 1 addition & 0 deletions kotlin/com/openmeteo/sdk/Unit.kt
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,6 @@ class Unit private constructor() {
const val us_air_quality_index: UByte = 38u
const val watt_per_square_metre: UByte = 39u
const val wmo_code: UByte = 40u
const val parts_per_million: UByte = 41u
}
}
2 changes: 2 additions & 0 deletions kotlin/com/openmeteo/sdk/Variable.kt
Original file line number Diff line number Diff line change
Expand Up @@ -135,5 +135,7 @@ class Variable private constructor() {
const val freezing_rain_probability: UByte = 127u
const val ice_pellets_probability: UByte = 128u
const val snowfall_probability: UByte = 129u
const val carbon_dioxide: UByte = 130u
const val methane: UByte = 131u
}
}
1 change: 1 addition & 0 deletions python/openmeteo_sdk/Unit.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,4 @@ class Unit(object):
us_air_quality_index = 38
watt_per_square_metre = 39
wmo_code = 40
parts_per_million = 41
2 changes: 2 additions & 0 deletions python/openmeteo_sdk/Variable.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,3 +133,5 @@ class Variable(object):
freezing_rain_probability = 127
ice_pellets_probability = 128
snowfall_probability = 129
carbon_dioxide = 130
methane = 131
2 changes: 2 additions & 0 deletions swift/Sources/OpenMeteoSdk/Unit.swift
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ extension openmeteo_sdk_Unit {
case .usAirQualityIndex: return "USAQI"
case .gddCelsius: return "GGDc"
case .fraction: return "fraction"
case .partsPerMillion: return "ppm"
}
}

Expand Down Expand Up @@ -90,6 +91,7 @@ extension openmeteo_sdk_Unit {
case .usAirQualityIndex: return 0
case .gddCelsius: return 2
case .fraction: return 3
case .partsPerMillion: return 0
}
}
}
7 changes: 5 additions & 2 deletions swift/Sources/OpenMeteoSdk/weather_api_generated.swift
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,9 @@ public enum openmeteo_sdk_Unit: UInt8, Enum, Verifiable {
case usAirQualityIndex = 38
case wattPerSquareMetre = 39
case wmoCode = 40
case partsPerMillion = 41

public static var max: openmeteo_sdk_Unit { return .wmoCode }
public static var max: openmeteo_sdk_Unit { return .partsPerMillion }
public static var min: openmeteo_sdk_Unit { return .undefined }
}

Expand Down Expand Up @@ -284,8 +285,10 @@ public enum openmeteo_sdk_Variable: UInt8, Enum, Verifiable {
case freezingRainProbability = 127
case icePelletsProbability = 128
case snowfallProbability = 129
case carbonDioxide = 130
case methane = 131

public static var max: openmeteo_sdk_Variable { return .snowfallProbability }
public static var max: openmeteo_sdk_Variable { return .methane }
public static var min: openmeteo_sdk_Variable { return .undefined }
}

Expand Down
3 changes: 2 additions & 1 deletion ts/unit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,6 @@ export enum Unit {
unix_time = 37,
us_air_quality_index = 38,
watt_per_square_metre = 39,
wmo_code = 40
wmo_code = 40,
parts_per_million = 41
}
4 changes: 3 additions & 1 deletion ts/variable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,5 +132,7 @@ export enum Variable {
rain_probability = 126,
freezing_rain_probability = 127,
ice_pellets_probability = 128,
snowfall_probability = 129
snowfall_probability = 129,
carbon_dioxide = 130,
methane = 131
}

0 comments on commit f43fb9a

Please sign in to comment.