Skip to content
This repository was archived by the owner on Apr 8, 2025. It is now read-only.

Awdb Forecasts only predicts one value for an entire period #108

@C-Loftus

Description

@C-Loftus

For awdb forecasts, if you request a forecast period it will just return the forecast value probabilities for the entire forecast period. Thus if a user were to request 01-12 they would get an array of forecast predictions that represent the parameter prediction for the entirely of the year

With this in mind it is a bit unclear how we want to represent this in coveragejson.

curl -X 'GET' \
  'https://wcc.sc.egov.usda.gov/awdbRestApi/services/v1/forecasts?stationTriplets=10396000%3AOR%3AUSGS&forecastPeriods=%5B03-01%2C08-01%5D' \
  -H 'accept: application/json'

You can see below there are multiple predictions but each prediction just represents the entire period

[
  {
    "stationTriplet": "10396000:OR:USGS",
    "forecastPointName": "Donner Und Blitzen R nr Frenchglen",
    "data": [
      {
        "elementCode": "SRVO",
        "forecastPeriod": [
          "03-01",
          "07-31"
        ],
        "forecastStatus": "final",
        "issueDate": "2025-01-06 15:12",
        "periodNormal": 58,
        "publicationDate": "2025-01-01 00:00",
        "unitCode": "kac_ft",
        "forecastValues": {
          "10": 124,
          "30": 102,
          "50": 89,
          "70": 76,
          "90": 55
        }
      },
      {
        "elementCode": "SRVO",
        "forecastPeriod": [
          "03-01",
          "07-31"
        ],
        "forecastStatus": "final",
        "issueDate": "2025-02-05 10:09",
        "periodNormal": 58,
        "publicationDate": "2025-02-01 00:00",
        "unitCode": "kac_ft",
        "forecastValues": {
          "10": 122,
          "30": 102,
          "50": 89,
          "70": 76,
          "90": 56
        }
      },
      {
        "elementCode": "SRVO",
        "forecastPeriod": [
          "03-01",
          "07-31"
        ],
        "forecastStatus": "final",
        "issueDate": "2025-03-04 13:47",
        "periodNormal": 58,
        "publicationDate": "2025-03-01 00:00",
        "unitCode": "kac_ft",
        "forecastValues": {
          "10": 130,
          "30": 111,
          "50": 98,
          "70": 85,
          "90": 66
        }
      }
    ]
  }
]

If you try to fetch a period that is has ultiple time steps it doesn't work. You need to just fetch one month range like 01-11

curl -X 'GET' \
  'https://wcc.sc.egov.usda.gov/awdbRestApi/services/v1/forecasts?stationTriplets=10396000%3AOR%3AUSGS&forecastPeriods=03-01%2C04-01%2C05-01' \
  -H 'accept: application/json'
{
  "timestamp": 1743601468087,
  "status": 400,
  "error": "Bad Request",
  "message": "forecastPeriod parameter is invalid. Valid parameter is like 03-01,07-31 or [03-01,07-31] or [,07-31] or [03-01,].",
  "path": "/awdbRestApi/services/v1/forecasts"
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions