Repository navigation
chore: remove plugins now covered by OCS core, and fix the broken ERA5-Land import - #31
Conversation
Core now has clms_ndvi_v3_dekadal (open-climate-service #507, CLIM-1153), the same CLMS 300 m V3 product. The asset path and S3 key tests of the shared _clms reader move to the productivity tests.
Core defines copdem90_elevation_static in copdem.yaml (open-climate-service #503), the same id as this plugin's.
…OCS core Core has era5land_temperature_daily_min/_max and era5land_dewpoint_daily (open-climate-service #506, CLIM-1564). Soil moisture and wind speed stay. Core removed era5_land.py in #505 (CLIM-1418), which broke this plugin's import. The five helpers it used are copied into rasters/_era5_land.py rather than taken from core's remaining private helpers.
turban
left a comment
There was a problem hiding this comment.
Thanks, this is a good cleanup, and copying the helpers is better than reaching into core's private modules. Approving. A few notes, none blocking:
-
The ERA5-Land replacements count days differently. The removed min/max/dewpoint templates asked CDS for days in the instance's own time zone. Core's
era5land_temperature_daily_min/_max/era5land_dewpoint_dailywork from the hourly ARCO store and their days run in UTC (their descriptions say so). For an instance like Nepal (+5:45), a "day" is shifted by almost six hours. That's probably fine, but worth a line in the PR body so nobody expects the same numbers. The ids also changed (era5land_temperature_min_daily→era5land_temperature_daily_min,clms_ndvi_dekadal→clms_ndvi_v3_dekadal), so instances that used the old ids need to re-ingest under the new ones. One leftover: the usage example innepal-climate-service/scripts/animate.pystill saysclms_ndvi_dekadal. -
Possible follow-up: soil moisture could become a YAML-only template using core's
ERA5LandCDSDailyFromHourlyPlugin(variable: swvl1,temporal_aggregation: mean), since core's ARCO store mapping already includesswvl1. That would also give UTC days. Wind speed still needs its own plugin because of thehypot, so the helpers would stay for now. Not for this PR. -
Tests:
_era5_land.pyis now maintained here, and the remaining ERA5-Land plugins have no tests. A couple of small unit tests forcds_fallback_area(the clamping at the poles and at ±180) andcollapse_expverwould be cheap and would catch drift.
|
Thanks @turban . 1) True, added a brief note about it in the PR description. 2) Yes, and planning to include these in core as well, so waiting until then to make any improvements. 3) This was also raised while implementing this PR, but I don't think it's worth improving in this quick proof-of-concept repo, and will anyway disappear once soil moisture and wind speed is added to core. |
OCS core now ships several data sources that this repo also had, and core's ERA5-Land refactor (open-climate-service #505) broke an import here.
Removed, now in core
clms_ndvi_v3_dekadal(#507). The tests of the shared_clms.pymoved to the productivity tests.copdem90_elevation_static, the same id (#503).era5land_temperature_daily_min,era5land_temperature_daily_maxandera5land_dewpoint_daily(#506). Note that the min/max temperature in ocs-plugin was local timezone aware, while in core they run in UTC+0 (local timezone support will be added later).Fixed
era5_land.py, which no longer exists. The five helpers they use are now copied intorasters/_era5_land.pyrather than imported from core's private code.Checks
main.Not changed: credentials work as before, and should be standalone/separate from builtin credentials.
Note:
tests/test_era5_land_daily_stats_plugin.pywas already empty, so the two remaining ERA5-Land plugins have no tests.