Conversation
Greptile SummaryThis PR cleans up the ECMWF open-data sources by consolidating a confusing dual-method design ( Key changes:
|
| Filename | Overview |
|---|---|
| earth2studio/data/ecmwf.py | Removes unused async fetch overrides from all child classes, renames _call→fetch, sample→ensemble dimension, and fetch_wrapper→_download_wrapper; adds drop_vars calls to cleanly strip reduced coordinates. One stale # type: ignore[override] comment remains. |
Last reviewed commit: 838660f
The non FX ones are useful when someone just wants the analysis states used by the forecast... in the case of when a model needs history the non FX version is useful. The FX is when the lead_time needs to reference the actual forecast steps.
Right now none of the other ensemble classes output multiple ensembles. I think I prefer to keep the consistency of always returning [time, variable, lat, lon] over adding in the potential for the method to return an additional ensemble dim. But if this would be particularly useful, perhaps we can change the behaviors but other ENS models like GEFS would need a similar update. |
NickGeneva
left a comment
There was a problem hiding this comment.
Thanks Stefan!
The updates to the xarray dim and also the rename of the _fetch_wrapper seem good. But the removal of the async fetch has some consistency issues with the interface for the data sources.
|
I have renamed |
|
/blossom-ci |
|
@swbg thanks. I did some further reversions because this results in the async fetch API for the models breaking and a test failing. |
|
I guess we went full circle here. The point I did not realize is that fetch needs to be overwritten to make sure forecast data sources take lead_time as an argument and regular data sources do not. |
Earth2Studio Pull Request
Description
The ECMWF data sources had some additional, unused code and xarray coords were not cleanly removed. Changes:
Two questions:
Checklist
Dependencies