index DTR crashes
It seems that climix now crashes for multiple input streams, example dtr
. Here are two test cases both using the master branch that is updated wrt repo:
With one file each for tasmax and tasmin:
(climix-devel-3) ~/PROJ/test_climix >climix -s -e -x dtr /home/sm_lbarr/PROJ/test_climix/indata/CLIMPACT2_TEST/tmin_AUS_climpact2-sampledata_gridded-obs_v1_ET-SCI_v1_1991-2010.nc /home/sm_lbarr/PROJ/test_climix/indata/CLIMPACT2_TEST/tmax_AUS_climpact2-sampledata_gridded-obs_v1_ET-SCI_v1_1991-2010.nc
INFO:root:Loading metadata
INFO:root:Scheduler ready; starting main program.
INFO:root:Preparing indices
INFO:root:Found implementation for index_function <diurnal_temperature_range> from distribution <climix 0.13.1>
INFO:root:Starting calculations for index <climix.index.Index object at 0x2b8f67a6af70>
INFO:root:Building output filename
INFO:root:Preparing input data
INFO:root:Calculating index
INFO:root:Starting preprocess
INFO:root:Finished preprocess
INFO:root:Data found for input low_data
INFO:root:Data found for input high_data
INFO:root:Adding coord categorisation.
INFO:root:Preparing cubes
INFO:root:Setting up aggregation
INFO:root:Calculation took 16.5291 seconds.
Traceback (most recent call last):
File "/home/sm_lbarr/.conda/envs/climix-devel-3/bin/climix", line 11, in <module>
load_entry_point('climix', 'console_scripts', 'climix')()
File "/home/sm_lbarr/CODE/climix/climix/main.py", line 150, in main
do_main(index_catalog, args.indices, args.datafiles,
File "/home/sm_lbarr/CODE/climix/climix/main.py", line 128, in do_main
result = index(input_data,
File "/home/sm_lbarr/CODE/climix/climix/index.py", line 46, in __call__
aggregated = multicube_aggregated_by(cube_mapping, coord_name,
File "/home/sm_lbarr/CODE/climix/climix/iris.py", line 124, in multicube_aggregated_by
result = list(map(agg, groupby_subcubes))
File "/home/sm_lbarr/CODE/climix/climix/iris.py", line 120, in agg
data = data_getter(cube)
File "/home/sm_lbarr/CODE/climix/climix/iris.py", line 90, in data_getter
return cube.lazy_data()
AttributeError: 'dict' object has no attribute 'lazy_data'
With multiple input files for each variable:
climix -e -s -x dtr /home/rossby/imports/cordex/EUR-11/CLMcom-CCLM4-8-17/v1/ICHEC-EC-EARTH/r12i1p1/rcp85/bc/links-hist-scn/day/tasmax_EUR-11_ICHEC-EC-EARTH_rcp85_r12i1p1_CLMcom-CCLM4-8-17_v1_day_*.nc /home/rossby/imports/cordex/EUR-11/CLMcom-CCLM4-8-17/v1/ICHEC-EC-EARTH/r12i1p1/rcp85/bc/links-hist-scn/day/tasmin_EUR-11_ICHEC-EC-EARTH_rcp85_r12i1p1_CLMcom-CCLM4-8-17_v1_day_*.nc
INFO:root:Loading metadata
INFO:root:Scheduler ready; starting main program.
INFO:root:Preparing indices
INFO:root:Calculation took 0.0005 seconds.
Traceback (most recent call last):
File "/home/sm_lbarr/.conda/envs/climix-devel-3/bin/climix", line 11, in <module>
load_entry_point('climix', 'console_scripts', 'climix')()
File "/home/sm_lbarr/CODE/climix/climix/main.py", line 150, in main
do_main(index_catalog, args.indices, args.datafiles,
File "/home/sm_lbarr/CODE/climix/climix/main.py", line 118, in do_main
indices = index_catalog.prepare_indices(requested_indices)
File "/home/sm_lbarr/CODE/climix/climix/metadata.py", line 335, in prepare_indices
definition = self.get_index_definition(index)
File "/home/sm_lbarr/CODE/climix/climix/metadata.py", line 300, in get_index_definition
return self.indices[index]
KeyError: '/home/rossby/imports/cordex/EUR-11/CLMcom-CCLM4-8-17/v1/ICHEC-EC-EARTH/r12i1p1/rcp85/bc/links-hist-scn/day/tasmax_EUR-11_ICHEC-EC-EARTH_rcp85_r12i1p1_CLMcom-CCLM4-8-17_v1_day_19510101-19551231.nc'