Skip to content

Commit

Permalink
rounded db value and printed (#346)
Browse files Browse the repository at this point in the history
  • Loading branch information
mwalker-scottlogic authored Oct 18, 2024
1 parent 316672f commit eda333b
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion air-quality-backend/system_tests/utils/cams_utilities.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import pprint
from datetime import datetime
from pandas import read_csv

Expand Down Expand Up @@ -127,6 +128,17 @@ def get_forecast_percentage_divergence(
pollutant, "database_forecast", database_record_for_city_and_valid_time
)

database_pollutant_value_3dp = round(database_pollutant_value, 3)

pprint.pprint(
"City: {}, Pollutant: {}, ECMWF value: {}, database value: {}".format(
test_city,
pollutant,
ecmwf_forecast_pollutant_value,
database_pollutant_value_3dp,
)
)

return calculate_database_divergence_from_ecmwf_forecast_values(
database_pollutant_value, ecmwf_forecast_pollutant_value
database_pollutant_value_3dp, ecmwf_forecast_pollutant_value
)

0 comments on commit eda333b

Please sign in to comment.