Regional means entrypoint - #112
Conversation
|
Thanks @chpolste, the PR looks good! I just had a few questions/comments:
|
|
Thanks @jinmannwong, good to know I've not gone off in a completely wrong direction :)
For NetCDF output it's not required, but a lot easier. I think it would be necessary to know the output coordinates already when creating the target file (maybe not for the metadata but at least the ordering) and they depend on the metadata of all input fields. So they must either be inferred from the FDB/MARS request(s) or the inputs have to be iterated over twice (once for the coords, then again for the data). For CovJSON, I don't see a good option to meaningfully write partial results without constantly replacing the file to keep the partial files valid. Concurrency will further cause issues with the ordering of data in a text-based format. This is where I struggled with the checkpointing too. The already computed results need to go somewhere persistent (like the FDB for grib). The best solution I've come up with so far is a temporary sqlite database that keeps pickled dataframe results, so they can be loaded again during recovery and merged into the final output file together with the other results. It's lightweight and supports concurrent inserts.
Sounds good, I'll do that! |
Avoids the explicit collection of results from futures.
|
Thanks, that makes sense. I didn't realise that the outputs for all steps and parameters are required in the same output file. |
Recovery only work unless the previously written data is loaded on recovery. This reverts commit 2d305ee.
Description
Compute regional area-weighted means.
To compute zonal-mean zonal wind for https://charts.ecmwf.int/products/extended-zonal-mean-zonal-wind.
New DataFrameTarget
Introduces
pproc.config.targets.DataFrameTargetto collect rows of an output table as they are produced, then write the table in different formats to disk.flush()does not implement incremental writes but replaces the entire target file every time.Open issues
Contributor Declaration
By opening this pull request, I affirm the following: