Skip to content

pp/#1343 Add ground temperature (1m) as option to weather data. #1348

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

Conversation

pierrepetersmeier
Copy link
Contributor

Resolves #1343

@pierrepetersmeier pierrepetersmeier self-assigned this Jun 18, 2025
@pierrepetersmeier pierrepetersmeier linked an issue Jun 18, 2025 that may be closed by this pull request
@pierrepetersmeier pierrepetersmeier requested review from danielfeismann and removed request for danielfeismann June 18, 2025 14:27
Copy link
Member

@danielfeismann danielfeismann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remember also the changelog and please push this under a proper branch name that applies to our expected scheme (see Pipeline error).

@@ -33,6 +36,9 @@ public class CosmoTimeBasedWeatherValueFactory extends TimeBasedWeatherValueFact
private static final String WIND_DIRECTION = "windDirection";
private static final String WIND_VELOCITY = "windVelocity";

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove this empty line

@@ -55,31 +61,58 @@ protected List<Set<String>> getFields(Class<?> entityClass) {
TEMPERATURE,
WIND_DIRECTION,
WIND_VELOCITY);

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't it possible to simply add the additonal values here when creating the set? so the removal of the coordinate_id would be obsolete, right?

data.getQuantity(WIND_DIRECTION, StandardUnits.WIND_DIRECTION);
ComparableQuantity<Speed> windVelocity =
data.getQuantity(WIND_VELOCITY, StandardUnits.WIND_VELOCITY);
SolarIrradianceValue solarIrradiance = new SolarIrradianceValue(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please rollback this. Within Simona we expect these values to be ComparableQuantity and not SolarIrradianceValue (at least this is my understanding). Second, I would like to keep the changes in this PR limited to adding the new values and not refactoring existing code.

Map<ComparableQuantity<Length>, TemperatureValue> groundTemperatures = new HashMap<>();


data.getField(GROUND_TEMPERATURE_SURFACE).ifPresent(value -> {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens in the case NotPresent?

@@ -34,6 +34,11 @@ public class IconTimeBasedWeatherValueFactory extends TimeBasedWeatherValueFacto
private static final String WIND_VELOCITY_U = "u131m";
private static final String WIND_VELOCITY_V = "v131m";

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please also remove the line here. Please add also a getter for the new data and add them to the existing ones (where it is expected to apply). Also the buildModel seem to have it, right?

@pierrepetersmeier pierrepetersmeier changed the title Add ground temperature (1m) as option to weather data. pp/#1343 Add ground temperature (1m) as option to weather data. Jun 26, 2025
@pierrepetersmeier pierrepetersmeier deleted the 1343-add-ground-temperature-1m-as-option-to-weather-data branch June 26, 2025 09:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add ground temperature (1m) as option to weather data
2 participants