-
Notifications
You must be signed in to change notification settings - Fork 7
Align temperature processing in CosmoTimeBasedWeatherValueFactory #1522
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Align temperature processing in CosmoTimeBasedWeatherValueFactory #1522
Conversation
…use Kelvin units for ground temperature values, ensuring consistency with standard temperature units. Added null-checks before unit conversion in both Cosmo and Icon factories to prevent NullPointerException when processing time steps with missing temperature values.
danielfeismann
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some little hints how to handle the additional issues you discovered. Please also do not forget the changelog entry.
src/main/java/edu/ie3/datamodel/io/factory/timeseries/IconTimeBasedWeatherValueFactory.java
Outdated
Show resolved
Hide resolved
src/main/java/edu/ie3/datamodel/io/factory/timeseries/CosmoTimeBasedWeatherValueFactory.java
Outdated
Show resolved
Hide resolved
.../groovy/edu/ie3/datamodel/io/factory/timeseries/CosmoTimeBasedWeatherValueFactoryTest.groovy
Outdated
Show resolved
Hide resolved
…o-and-icon-timebasedweathervaluefactories
…n units, adding null-checks to prevent NullPointerException for missing temperature values. Update tests to reflect changes in exception handling for missing temperature fields.
danielfeismann
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And please add some changelog entry
.../groovy/edu/ie3/datamodel/io/factory/timeseries/CosmoTimeBasedWeatherValueFactoryTest.groovy
Outdated
Show resolved
Hide resolved
...t/groovy/edu/ie3/datamodel/io/factory/timeseries/IconTimeBasedWeatherValueFactoryTest.groovy
Outdated
Show resolved
Hide resolved
...t/groovy/edu/ie3/datamodel/io/factory/timeseries/IconTimeBasedWeatherValueFactoryTest.groovy
Outdated
Show resolved
Hide resolved
.../groovy/edu/ie3/datamodel/io/factory/timeseries/CosmoTimeBasedWeatherValueFactoryTest.groovy
Outdated
Show resolved
Hide resolved
…n units, adding null-checks to prevent FactoryException for missing temperature values. Update tests to reflect changes in exception handling.
Removed duplicate entry for temperature processing alignment in Cosmo and Icon factories.
This PR aligns the temperature parsing logic in CosmoTimeBasedWeatherValueFactory with the Icon factory. Temperature inputs are now interpreted as Kelvin and converted to Celsius. Fix NullPointerException for temperature in Icon and Cosmo Factory.
Resolves #1521