FL550 / dwd_weather

Deutscher Wetterdienst integration for Home-Assistant
MIT License
173 stars 11 forks source link

Sun irradiance unit should be W/m^2 instead of kJ/m^2 #35

Closed lbrandh closed 2 years ago

lbrandh commented 2 years ago

Version of home_assistant

2021.7.1

Version of the custom_component

latest

Describe the bug

Sun irradiance sensor has its unit set to kJ/m^2, but data from DWD is W/m^2 as can be seen in the csv files

FL550 commented 2 years ago

Hey, thanks for your PR. I am taking the weather forecast from the kml files found here: https://opendata.dwd.de/weather/local_forecasts/mos/MOSMIX_L/single_stations/ And in the MetElementDefinition found here it says the Global Irradiance with the short name Rad1h is kJ/m2.

From what csv files did you get your information from?

lbrandh commented 2 years ago

The CSV are from here: https://opendata.dwd.de/weather/weather_reports/poi/

Column 7,8,9,12 and 13 are all in W/m^2, and I can find no reference to J/m^2.

Wikipedia also states:

The SI unit of irradiance is the watt per square metre (W⋅m−2).

J/m^2 seems to be Radiant exposure

The SI unit of radiant exposure is the joule per square metre (J/m2)...

On the other Hand Solar irradiance says:

The solar irradiance is measured in watt per square metre (W/m2) in SI units. Solar irradiance is often integrated over a given time period in order to report the radiant energy emitted into the surrounding environment (joule per square metre, J/m2) during that time period.

As well as:

global radiation on a horizontal surface at ground level is about 1120 W/m2.[29] The latter figure includes radiation scattered or reemitted by the atmosphere and surroundings. The actual figure varies with the Sun's angle and atmospheric circumstances. Ignoring clouds, the daily average insolation for the Earth is approximately 6 kWh/m2 = 21.6 MJ/m2.

The values I am getting in Home-Assistant are between 0 and 2000 kJ/m^2 for the cloudy weather right now. Which would be in the same ballpark as the Wikipedia value for W/m^2 but a factor 10 too small for the kJ/m2^2. And the values don't look integrated over time, but momentary to me.

FL550 commented 2 years ago

Hm, looks like you are right and the Unit in the document from DWD is wrong.

Thank you very much for the detailed analysis. The values in the forecast are often values per hour, so an integration is not that far of. But as you mentioned, the resulting values are way to small. So I guess W/m2 is the correct unit.

I will merge your PR and release an update. Thanks for addressing this issue here!

FL550 commented 2 years ago

Sorry for the delay. I just released the update