ECMWFCode4Earth / vAirify

code repository for 2024 Code for Earth project #16
MIT License
1 stars 0 forks source link

Store forecast data per model base date #19

Closed amehta-scottlogic closed 1 month ago

amehta-scottlogic commented 1 month ago

There are two time dimensions when talking about forecast data:

At the moment we only store valid data (measurement_time) based on the most recent forecast base time.

E.g:

If today = 2024-05-17 the forecast production time will be 2024-05-17T00:00, and we set the pollution forecast for 2024-05-22T00:00 to be some values.

Tomorrow then the forecast production time will be 2024-05-18T00:00, we will overwrite any existing valid times we previously inserted into our database e.g. effective values for yesterdays produced forecast at 2024-05-22T00:00 will be overwritten.

We should instead create new entries in this case so we can see how the forecast changes for the same effective date for different forecast base dates

Acceptance Criteria

Test Checklist:

mwalker-scottlogic commented 1 month ago

FINDING - KeyError: 'name' when running in situ script.

Steps to reproduce:

Expected:

Actual:

Image

mwalker-scottlogic commented 1 month ago

FINDING - KeyError: 'name' when running in situ script.

Steps to reproduce:

  • pull main
  • run run_in_situ_etl.py

Expected:

  • Process completes and in situ database updated

Actual:

  • Terminal crashes out with KeyError: 'name'

Image

UPDATE - run_in_situ_etl.py is no longer showing this error, further regression testing required however

Image

Image

mwalker-scottlogic commented 1 month ago

Only regression tested forecast db as in_situ is too unstable

mnyamunda-scottlogic commented 1 month ago

Test Analysis -Basic verification that all of our added/changed keys exist in each document created. Some are basic checks of existence. Others will verify that the values can only be certain values.

-Verify uniq_forecast_idx exists as an index and has the keys, "forecast_valid_time", "forecast_base_time" , "location_type", "name" , "source".