@@ -40,6 +40,29 @@ The handling of required packages is done with poetry. So run poetry in the proj
poetry install
```
# How does this tool work?
This tool has two main parts. The first handles requests to the TOAR database and the analysis of the data.
The second part is the gridding, which is performed offline
## Request to TOAR Database with Statistical Analysis
Requests are send to the analysis service of the TOAR database. This allows a selection of different stations base on their metadata and performing a statistical analysis.
Whenever a request is submitted, it will be processed. The returned status endpoint will point ot the results as soon as the process is finished.
A request can take several hours, depending on time range and the number of requested stations.
At the moment, there is no possibility implemented to check the status of a running job until it is finished (Date: 2024-05-14).
As soon as a request is finished, the status endpoint will not be valid forever. The data will be stored longer in a cache by the analysis service. As soon as the same request is submitted, first the cache is checked, if the results have already been calculated. The retrieval of the results from the cache can take some time, similar to the analysis.
There is no check, if a request is already running. Therefore, submitting a request multiple times, leads to additional load on the system and slows down all requests.
The TOAR database has only a limited number of workers for performing a statistical analysis. Therefore, it is advised to run one request after another, especially for large requests covering a large number of stations and or a longer time.
## Gridding
The gridding uses a user defined grid to combine all stations in a cell.
Per cell mean, standard deviation and the number of stations are reported.
# Example
There are at the moment three example provided as jupyter notebooks (https://jupyter.org/).
raiseRuntimeError("Connection to TAORDB timed out (ReadTimeout) while checking cached status point. Please try again later.")
exceptrequests.exceptions.HTTPErrorase:
#TODO add detailed processing: What was the reason for the error? Do we really need to create a new request or is there another problem, that might resolve by simply waiting