climix issueshttps://git.smhi.se/climix/climix/-/issues2024-03-18T13:38:01Zhttps://git.smhi.se/climix/climix/-/issues/368Add custom load callback and constraint2024-03-18T13:38:01ZJoakim LöwAdd custom load callback and constraintWhen loading an iris cube, a callback and constraint can be specified. Add possibility to add such callback and constraint from command line, e.g. pointing to a separate python file, or to specify the callback and constraint when using t...When loading an iris cube, a callback and constraint can be specified. Add possibility to add such callback and constraint from command line, e.g. pointing to a separate python file, or to specify the callback and constraint when using the climix api.https://git.smhi.se/climix/climix/-/issues/365Implement time stamp enhancement2024-03-05T14:53:03ZJoakim LöwImplement time stamp enhancementSee discussion in #351See discussion in #351https://git.smhi.se/climix/climix/-/issues/364Investigate how and where in code to add time stamp2024-03-05T14:52:39ZJoakim LöwInvestigate how and where in code to add time stampSee discussion in #351See discussion in #351https://git.smhi.se/climix/climix/-/issues/363Investigate ruff as linter and formatter2024-03-01T13:25:39ZJoakim LöwInvestigate ruff as linter and formatterhttps://git.smhi.se/climix/climix/-/issues/362Systems tasks [1/2]2024-03-25T08:34:41ZJoakim LöwSystems tasks [1/2]https://git.smhi.se/climix/climix/-/issues/361Sync dependencies lists2024-03-01T12:21:49ZJoakim LöwSync dependencies listsClimix has dependency lists in several places:
- climix repo: `environments.yml`
- climix repo: `pyproject.toml`
- conda-forge climix-feedstock: `recipe/meta.yaml`
They are not 100% in sync. Make sure to sync them just before next relea...Climix has dependency lists in several places:
- climix repo: `environments.yml`
- climix repo: `pyproject.toml`
- conda-forge climix-feedstock: `recipe/meta.yaml`
They are not 100% in sync. Make sure to sync them just before next release (0.22).https://git.smhi.se/climix/climix/-/issues/359Investigate RuntimeWarning2024-03-01T12:30:24ZCarolina NilssonInvestigate RuntimeWarningRunning `climix -l debug -o /nobackup/rossby27/users/sm_carni/data/tmp/output_files/out_climix_patch.nc -x fd /nobackup/rossby27/users/sm_carni/data/tmp/data_files/tasmin_EUR-11_MPI-M-MPI-ESM-LR_rcp85_r2i1p1_MPI-CSC-REMO2009_v1_day_20060...Running `climix -l debug -o /nobackup/rossby27/users/sm_carni/data/tmp/output_files/out_climix_patch.nc -x fd /nobackup/rossby27/users/sm_carni/data/tmp/data_files/tasmin_EUR-11_MPI-M-MPI-ESM-LR_rcp85_r2i1p1_MPI-CSC-REMO2009_v1_day_20060101-20101231.nc /nobackup/rossby27/users/sm_carni/data/tmp/data_files/tasmin_EUR-11_MPI-M-MPI-ESM-LR_rcp85_r2i1p1_MPI-CSC-REMO2009_v1_day_20110101-20151231.nc`
with climix installed causes RuntimeWarnings in numpy. We should find out why these warnings appear and if they have any effect on the run.https://git.smhi.se/climix/climix/-/issues/358Wrong version number on readthedocs2024-03-01T09:47:12ZJoakim LöwWrong version number on readthedocsThe latest release of climix on pypi is 0.21.1, but the documentation on readthedocs shows 0.22.The latest release of climix on pypi is 0.21.1, but the documentation on readthedocs shows 0.22.https://git.smhi.se/climix/climix/-/issues/357Remove pandas dependency2024-02-29T14:56:00ZJoakim LöwRemove pandas dependencyRemove pandas as dependency from
- environment.yml
- pyproject.toml
and remove from docs.Remove pandas as dependency from
- environment.yml
- pyproject.toml
and remove from docs.https://git.smhi.se/climix/climix/-/issues/356Update dependencies [1/3]2024-03-25T08:35:05ZJoakim LöwUpdate dependencies [1/3]https://git.smhi.se/climix/climix/-/issues/355Update index docs with added and removed indices2024-02-20T12:14:58ZJoakim LöwUpdate index docs with added and removed indiceshttps://git.smhi.se/climix/climix/-/issues/354Update index definition files after clix-meta update2024-02-20T12:15:21ZJoakim LöwUpdate index definition files after clix-meta updatehttps://git.smhi.se/climix/climix/-/issues/353New clix-meta definitions [0/2]2024-02-20T12:17:44ZJoakim LöwNew clix-meta definitions [0/2]All indices considered internal should be moved from clix-meta. Afterwards, files in this repo related should be updated.All indices considered internal should be moved from clix-meta. Afterwards, files in this repo related should be updated.https://git.smhi.se/climix/climix/-/issues/351Enhancing index cdd with accurate time stamps/vector [0/2]2024-03-22T08:20:19ZRenate WilckeEnhancing index cdd with accurate time stamps/vector [0/2]Cdd (consecutive dry days) and other consecutive indicators give the maximum spell length of a condition. Right now the time coordinate only contains the middle value of the calculated period (annual, monthly, ...). It would be a great a...Cdd (consecutive dry days) and other consecutive indicators give the maximum spell length of a condition. Right now the time coordinate only contains the middle value of the calculated period (annual, monthly, ...). It would be a great advantage for analysis to know WHEN the spell happens and to put that start date in the time coordinate instead.
E.g. if I calculate cdd annually, and the spell starts on the May the 4th, it would be good to have 2023_05_04 in the time coordinate instead of 2023_07_02 (the middle of the year).https://git.smhi.se/climix/climix/-/issues/338Wishlist for new indeces related to growing season2023-10-30T16:58:22ZJohan SödlingWishlist for new indeces related to growing seasonI am using Climix in some consultant projects, and for an upcoming project we would like to calculate indeces during the growing season, such as:
- The total precipitation volume (rr) during the growing season
- The number of days with m...I am using Climix in some consultant projects, and for an upcoming project we would like to calculate indeces during the growing season, such as:
- The total precipitation volume (rr) during the growing season
- The number of days with mean daily temperature > X degrees during the growing season
- The number of days with precipitation > 0 during the growing season
In a more general sense it would be nice if basically any Climix index could be calculated but only for timesteps within the vegetation periods.
I would also like it if the parameters used in calculation of the growing season were flexible (so that the user can choose the temperature and days threshold used in its calculation).https://git.smhi.se/climix/climix/-/issues/336Add testes for percentile functions2023-09-29T08:11:41ZCarolina NilssonAdd testes for percentile functionsThe percentile functions needs tests.The percentile functions needs tests.https://git.smhi.se/climix/climix/-/issues/329Index: Accumulated precip with Temperature below 02024-02-02T12:13:47ZJoakim LöwIndex: Accumulated precip with Temperature below 0Similar to index function: `TemperatureSum` (index: hd17)
This issue replaces #296
Note: check if it's ok to add index definition in `SMHI_extra.yml`.Similar to index function: `TemperatureSum` (index: hd17)
This issue replaces #296
Note: check if it's ok to add index definition in `SMHI_extra.yml`.Renate WilckeRenate Wilckehttps://git.smhi.se/climix/climix/-/issues/327Investigate the behaviour of FirstOccurrence and LastOccurence2023-09-11T09:45:30ZCarolina NilssonInvestigate the behaviour of FirstOccurrence and LastOccurenceThe expected output of the index functions FirstOccurrence and LastOccurrence needs to be further investigated. FirstOccurrence call_func returns 0 for the first day. This does not match up with the output from Last Occurrence call_func ...The expected output of the index functions FirstOccurrence and LastOccurrence needs to be further investigated. FirstOccurrence call_func returns 0 for the first day. This does not match up with the output from Last Occurrence call_func that returns 1 for the first day. The output is then post process which may change the end result. Therefor, further investigation of the final output is needed to estimate if both functions are working as expected.https://git.smhi.se/climix/climix/-/issues/326The call function does not work for spell function: Spell_Length2023-06-18T12:04:47ZCarolina NilssonThe call function does not work for spell function: Spell_LengthThe call function for spell function spell_length does not work and should probably be either removed or fixed.The call function for spell function spell_length does not work and should probably be either removed or fixed.https://git.smhi.se/climix/climix/-/issues/324Issue when running climix API - dask issue?2023-06-15T10:02:59ZRenate WilckeIssue when running climix API - dask issue?When I run my little example script I get the following error that repeats a lot until I cancel (ctr c).
Example script:
/home/sm_renwi/Scripts/heatwavefuture/summerseason/seasonlength_paket/seasonlength/example_error_memoryview.py
/hom...When I run my little example script I get the following error that repeats a lot until I cancel (ctr c).
Example script:
/home/sm_renwi/Scripts/heatwavefuture/summerseason/seasonlength_paket/seasonlength/example_error_memoryview.py
/home/sm_renwi/Scripts/heatwavefuture/summerseason/seasonlength_paket/control_SLENS_seasonlength.yml
Error message in ipython when running "indexcube.data" after calculating indexcube:
```
---------------------------------------------------------------------------
IndexError Traceback (most recent call last)
Cell In[21], line 1
----> 1 indexcube.data
File ~/.conda/envs/climix_testconda/lib/python3.10/site-packages/iris/cube.py:2462, in Cube.data(self)
2429 @property
2430 def data(self):
2431 """
2432 The :class:`numpy.ndarray` representing the multi-dimensional data of
2433 the cube.
(...)
2460
2461 """
-> 2462 return self._data_manager.data
File ~/.conda/envs/climix_testconda/lib/python3.10/site-packages/iris/_data_manager.py:206, in DataManager.data(self)
203 if self.has_lazy_data():
204 try:
205 # Realise the lazy data.
--> 206 result = as_concrete_data(self._lazy_array)
207 # Assign the realised result.
208 self._real_array = result
File ~/.conda/envs/climix_testconda/lib/python3.10/site-packages/iris/_lazy_data.py:279, in as_concrete_data(data)
262 """
263 Return the actual content of a lazy array, as a numpy array.
264 If the input data is a NumPy `ndarray` or masked array, return it
(...)
276
277 """
278 if is_lazy_data(data):
--> 279 (data,) = _co_realise_lazy_arrays([data])
281 return data
File ~/.conda/envs/climix_testconda/lib/python3.10/site-packages/iris/_lazy_data.py:242, in _co_realise_lazy_arrays(arrays)
227 def _co_realise_lazy_arrays(arrays):
228 """
229 Compute multiple lazy arrays and return a list of real values.
230
(...)
240
241 """
--> 242 computed_arrays = da.compute(*arrays)
243 results = []
244 for lazy_in, real_out in zip(arrays, computed_arrays):
245 # Ensure we always have arrays.
246 # Note : in some cases dask (and numpy) will return a scalar
247 # numpy.int/numpy.float object rather than an ndarray.
248 # Recorded in https://github.com/dask/dask/issues/2111.
File ~/.conda/envs/climix_testconda/lib/python3.10/site-packages/dask/base.py:600, in compute(traverse, optimize_graph, scheduler, get, *args, **kwargs)
597 postcomputes.append(x.__dask_postcompute__())
599 results = schedule(dsk, keys, **kwargs)
--> 600 return repack([f(r, *a) for r, (f, a) in zip(results, postcomputes)])
File ~/.conda/envs/climix_testconda/lib/python3.10/site-packages/dask/base.py:600, in <listcomp>(.0)
597 postcomputes.append(x.__dask_postcompute__())
599 results = schedule(dsk, keys, **kwargs)
--> 600 return repack([f(r, *a) for r, (f, a) in zip(results, postcomputes)])
File ~/.conda/envs/climix_testconda/lib/python3.10/site-packages/dask/array/core.py:1283, in finalize(results)
1281 while isinstance(results2, (tuple, list)):
1282 if len(results2) > 1:
-> 1283 return concatenate3(results)
1284 else:
1285 results2 = results2[0]
File ~/.conda/envs/climix_testconda/lib/python3.10/site-packages/dask/array/core.py:5300, in concatenate3(arrays)
5298 if not ndim:
5299 return arrays
-> 5300 chunks = chunks_from_arrays(arrays)
5301 shape = tuple(map(sum, chunks))
5303 def dtype(x):
File ~/.conda/envs/climix_testconda/lib/python3.10/site-packages/dask/array/core.py:5087, in chunks_from_arrays(arrays)
5084 return (1,)
5086 while isinstance(arrays, (list, tuple)):
-> 5087 result.append(tuple(shape(deepfirst(a))[dim] for a in arrays))
5088 arrays = arrays[0]
5089 dim += 1
File ~/.conda/envs/climix_testconda/lib/python3.10/site-packages/dask/array/core.py:5087, in <genexpr>(.0)
5084 return (1,)
5086 while isinstance(arrays, (list, tuple)):
-> 5087 result.append(tuple(shape(deepfirst(a))[dim] for a in arrays))
5088 arrays = arrays[0]
5089 dim += 1
IndexError: tuple index out of range
```
Error message in terminal:
```
/home/sm_renwi/.conda/envs/climix_testconda/lib/python3.10/site-packages/distributed/node.py:182: UserWarning: Port 8787 is already in use.
Perhaps you already have a cluster running?
Hosting the HTTP server on port 43663 instead
warnings.warn(
/home/sm_renwi/.conda/envs/climix_testconda/lib/python3.10/site-packages/distributed/node.py:182: UserWarning: Port 8787 is already in use.
Perhaps you already have a cluster running?
Hosting the HTTP server on port 43577 instead
warnings.warn(
2023-06-15 10:53:40,552 - distributed.nanny - ERROR - Failed to start process
Traceback (most recent call last):
File "/home/sm_renwi/.conda/envs/climix_testconda/lib/python3.10/site-packages/distributed/nanny.py", line 443, in instantiate
result = await self.process.start()
File "/home/sm_renwi/.conda/envs/climix_testconda/lib/python3.10/site-packages/distributed/nanny.py", line 713, in start
await self.process.start()
File "/home/sm_renwi/.conda/envs/climix_testconda/lib/python3.10/site-packages/distributed/process.py", line 55, in _call_and_set_future
res = func(*args, **kwargs)
File "/home/sm_renwi/.conda/envs/climix_testconda/lib/python3.10/site-packages/distributed/process.py", line 215, in _start
process.start()
File "/home/sm_renwi/.conda/envs/climix_testconda/lib/python3.10/multiprocessing/process.py", line 121, in start
self._popen = self._Popen(self)
File "/home/sm_renwi/.conda/envs/climix_testconda/lib/python3.10/multiprocessing/context.py", line 288, in _Popen
return Popen(process_obj)
File "/home/sm_renwi/.conda/envs/climix_testconda/lib/python3.10/multiprocessing/popen_spawn_posix.py", line 32, in __init__
super().__init__(process_obj)
File "/home/sm_renwi/.conda/envs/climix_testconda/lib/python3.10/multiprocessing/popen_fork.py", line 19, in __init__
self._launch(process_obj)
File "/home/sm_renwi/.conda/envs/climix_testconda/lib/python3.10/multiprocessing/popen_spawn_posix.py", line 42, in _launch
prep_data = spawn.get_preparation_data(process_obj._name)
File "/home/sm_renwi/.conda/envs/climix_testconda/lib/python3.10/multiprocessing/spawn.py", line 154, in get_preparation_data
_check_not_importing_main()
File "/home/sm_renwi/.conda/envs/climix_testconda/lib/python3.10/multiprocessing/spawn.py", line 134, in _check_not_importing_main
raise RuntimeError('''
RuntimeError:
An attempt has been made to start a new process before the
current process has finished its bootstrapping phase.
This probably means that you are not using fork to start your
child processes and you have forgotten to use the proper idiom
in the main module:
if __name__ == '__main__':
freeze_support()
...
The "freeze_support()" line can be omitted if the program
is not going to be frozen to produce an executable.
```