Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fix test timeouts for all tests [#1222](https://github.com/ie3-institute/simona/issues/1222)
- Fix handling of states in `ParticipantModelShell` [#1228](https://github.com/ie3-institute/simona/issues/1228)
- Fix input data handling in `ParticipantModel` [#1237](https://github.com/ie3-institute/simona/issues/1237)
- Reduce log spamming during night time due to missing direct solar irradiance data [#984](https://github.com/ie3-institute/simona/issues/984)

### Removed
- Removed `SimonaListerner` and related code [#1205](https://github.com/ie3-institute/simona/issues/1205)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ import edu.ie3.simona.util.TickUtil
import edu.ie3.simona.util.TickUtil.TickLong
import edu.ie3.util.DoubleUtils.ImplicitDouble
import edu.ie3.util.interval.ClosedInterval
import edu.ie3.util.scala.quantities.WattsPerSquareMeter
import squants.motion.MetersPerSecond
import squants.thermal.Kelvin
import tech.units.indriya.ComparableQuantity

import java.nio.file.Paths
Expand Down Expand Up @@ -141,11 +144,20 @@ private[weather] final case class WeatherSourceWrapper private (
(averagedWeather.diffIrr + nonEmptyDiffIrr * weight, weight)
}

val (dirIrradience, dirIrrWeight) = currentWeather.dirIrr match {
case EMPTY_WEATHER_DATA.`dirIrr` =>
logger.warn(s"Direct solar irradiance not available at $point.")
val (dirIrradiance, dirIrrWeight) = currentWeather match {
case WeatherData(
WattsPerSquareMeter(0d),
WattsPerSquareMeter(0d),
Kelvin(0d),
MetersPerSecond(0d),
) =>
logger.warn(s"Direct solar irradiance data is missing at $point.")
(averagedWeather.dirIrr, 0d)
case nonEmptyDirIrr =>

case WeatherData(WattsPerSquareMeter(0d), _, _, _) =>
(averagedWeather.dirIrr, weight)

case WeatherData(nonEmptyDirIrr, _, _, _) =>
(averagedWeather.dirIrr + nonEmptyDirIrr * weight, weight)
}

Expand All @@ -166,7 +178,7 @@ private[weather] final case class WeatherSourceWrapper private (
}

(
WeatherData(diffIrradiance, dirIrradience, temperature, windVelocity),
WeatherData(diffIrradiance, dirIrradiance, temperature, windVelocity),
currentWeightSum.add(
diffIrrWeight,
dirIrrWeight,
Expand Down