Baltic-RCC / EMF

Repository for Open Source EMF implementation
Mozilla Public License 2.0
9 stars 3 forks source link

Initial scope step 1 and 2 #51

Closed VeikoAunapuu closed 5 months ago

VeikoAunapuu commented 7 months ago

Scope: STEP 1. Use an IGM of the same time horizon of the same energy delivery day following the priority defined in Table 1. STEP 2. If not available, use an IGM from the same energy delivery day (other time horizon in consecutive order4), following the priority defined in Table 1.

Process:

  1. Request all models for target day based on list of areas to include based on configuration:
# Extract "1D" and all parameters to the right of "1D"
parameters_right_of_1d = my_list[index_of_1d:]

Query:

{
  "query": {
    "bool": {
      "must": [
        {
          "range": {
            "timestamp_field": {
              "gte": "now/d",
              "lt": "now+1d/d",
              "time_zone": "+01:00"
            }
          }
        }
      ],
      "must_not": [
        { "terms": { "pdm:timehorizon": parameters_right_of_1d } }
      ]
    }
  }
}

All models valid models available are added to list of "exclude_areas" and next query is made to all models in 2 weeks period under scope2.

VeikoAunapuu commented 6 months ago

https://github.com/Baltic-RCC/EMF/pull/54

VeikoAunapuu commented 5 months ago

added to replacement.py