climix issueshttps://git.smhi.se/climix/climix/-/issues2023-04-19T15:05:32Zhttps://git.smhi.se/climix/climix/-/issues/284Amend the yaml reader function to be aware of the CLIX-META version number2023-04-19T15:05:32ZLars BärringAmend the yaml reader function to be aware of the CLIX-META version number0.18 (Gull Olle)Klaus ZimmermannKlaus Zimmermannhttps://git.smhi.se/climix/climix/-/issues/275Add integration tests using NGCD dataset2023-04-21T15:56:13ZJoakim LöwAdd integration tests using NGCD datasetAdd integration tests running climix on the NGCD dataset, and compare results with NGCD reference indicators.Add integration tests running climix on the NGCD dataset, and compare results with NGCD reference indicators.0.18 (Gull Olle)Klaus ZimmermannKlaus Zimmermannhttps://git.smhi.se/climix/climix/-/issues/273Reference period definition in index_definitions.yml2023-04-19T15:05:32ZCarolina NilssonReference period definition in index_definitions.ymlTo conclude after offline conversation. Some index definitions utilises a reference period in the definition for the calculation and there is no obvious way in how this should be handled. A suggestion would be to included the reference p...To conclude after offline conversation. Some index definitions utilises a reference period in the definition for the calculation and there is no obvious way in how this should be handled. A suggestion would be to included the reference period in the clix-meta index definition, given the following example:
```
index_function:
name: count_thresholded_percentile_occurrences
parameters:
data_threshold:
kind: quantity
standard_name: lwe_precipitation_rate
long_name: "Wet day threshold"
data: 1
units: "mm day-1"
data_condition:
kind: operator
operator: ">="
percentile:
kind: quantity
standard_name:
proposed_standard_name: quantile
long_name: "Percentile value"
data: "{PRC}"
units: "%"
percentile_condition:
kind: operator
operator: ">"
reference_period:
kind: time_period
data: ['1961-01-01 00:00:00', '1991-01-01 00:00:00']
```
the reference period could then be used in the index calculation and the output should contain a global attribute giving information about which reference period that was used.
```
global attributes:
:reference_period = "1961-01-01 00:00:00 to 1991-01-01 00:00:00"
```
or something similar.
Notes there were also a discussion about having an additional Auxiliary coordinate variable with the following information:
```
reference_period:(var_name: "reference_period", standard_name: "reference_epoch", value: mean(n1,n2), bounds: [n1, n2], unit: "days since 1961-01-01 00:00:00")
```
where n1 and n2 are the point values for the start and end of the time period defined by the unit.0.18 (Gull Olle)Carolina NilssonCarolina Nilssonhttps://git.smhi.se/climix/climix/-/issues/84(Re)activate sphinx documentation2023-04-23T13:41:48ZLars Bärring(Re)activate sphinx documentationWe initiated some documentation efforts for the utility functions. We c/should expand this to the index_functions. Decision needed on documentation structure and splitting this general issue into specific issues for concrete implementati...We initiated some documentation efforts for the utility functions. We c/should expand this to the index_functions. Decision needed on documentation structure and splitting this general issue into specific issues for concrete implementation activities.0.18 (Gull Olle)Klaus ZimmermannKlaus Zimmermannhttps://git.smhi.se/climix/climix/-/issues/50(Re-)Add License2023-04-19T15:05:32ZKlaus Zimmermann(Re-)Add LicenseWe had a discussion about the license already in #3.
This was in the context of what we now call legacy, but I suggest to simply take the same license.
@a001257 ok?We had a discussion about the license already in #3.
This was in the context of what we now call legacy, but I suggest to simply take the same license.
@a001257 ok?0.18 (Gull Olle)Klaus ZimmermannKlaus Zimmermannhttps://git.smhi.se/climix/climix/-/issues/36Transfer/process input 'global' metadata to create output 'global' metadata2023-04-19T15:05:32ZLars BärringTransfer/process input 'global' metadata to create output 'global' metadata0.18 (Gull Olle)Carolina NilssonCarolina Nilssonhttps://git.smhi.se/climix/climix/-/issues/342Updating documentation for new clix-meta version2023-11-30T11:00:04ZCarolina NilssonUpdating documentation for new clix-meta versionWhen updating clix-meta in climix we should also update the documentation with the new version.When updating clix-meta in climix we should also update the documentation with the new version.0.20 (Urbane Goat)Carolina NilssonCarolina Nilssonhttps://git.smhi.se/climix/climix/-/issues/341add pandas to requirements2023-11-15T17:00:57ZLars Bärringadd pandas to requirementsI tried to update from a really old install and then got the error:
```bash
>pip install -e .
Obtaining file:///home/sm_lbarr/CODE/climix
Installing build dependencies ... done
Checking if build backend supports build_editable ... d...I tried to update from a really old install and then got the error:
```bash
>pip install -e .
Obtaining file:///home/sm_lbarr/CODE/climix
Installing build dependencies ... done
Checking if build backend supports build_editable ... done
Getting requirements to build editable ... done
Preparing editable metadata (pyproject.toml) ... done
...
Building wheels for collected packages: climix
Building editable for climix (pyproject.toml) ... done
...
Successfully installed bottleneck-1.3.7 climix-0.20.0.dev3+g6efeda6 heapdict-1.0.1 isodate-0.6.1 msgpack-1.0.7 psutil-5.9.6 sortedcontainers-2.4.0 tblib-3.0.0 tornado-6.3.3
>climix -h
Traceback (most recent call last):
File "/home/sm_lbarr/.conda/envs/climix-devel/bin/climix", line 5, in <module>
from climix.main import main
File "/home/sm_lbarr/CODE/climix/climix/main.py", line 16, in <module>
from .datahandling import prepare_input_data, save
File "/home/sm_lbarr/CODE/climix/climix/datahandling.py", line 16, in <module>
from .util import find_cube_differences
File "/home/sm_lbarr/CODE/climix/climix/util/__init__.py", line 4, in <module>
from .cube_diffs import find_cube_differences
File "/home/sm_lbarr/CODE/climix/climix/util/cube_diffs.py", line 7, in <module>
import pandas as pd
ModuleNotFoundError: No module named 'pandas'
```
A manual install of pandas did the trick.0.20 (Urbane Goat)Joakim LöwJoakim Löwhttps://git.smhi.se/climix/climix/-/issues/340Pull in the soon-to-come new Clix-meta version 0.6.12023-11-28T14:18:08ZLars BärringPull in the soon-to-come new Clix-meta version 0.6.1The new version will have the updated description of vegetation indices, `gsstart`, `gsend` and `gsl`The new version will have the updated description of vegetation indices, `gsstart`, `gsend` and `gsl`0.20 (Urbane Goat)Joakim LöwJoakim Löwhttps://git.smhi.se/climix/climix/-/issues/337Place for climix logo files2023-11-06T10:13:01ZJoakim LöwPlace for climix logo files- Find good place/folder for storing the official climix logo files
- Also add climix logo as favicon- Find good place/folder for storing the official climix logo files
- Also add climix logo as favicon0.20 (Urbane Goat)Carolina NilssonCarolina Nilssonhttps://git.smhi.se/climix/climix/-/issues/335Use numpys array_equal function in tests2023-09-21T10:11:04ZCarolina NilssonUse numpys array_equal function in testsWhen having tests that produces nan-values as a valid result we want to be able to test this. As it is right now comparing two nan-values will result in not equal. To be able of comparing nan-values we can switch to using numpy function ...When having tests that produces nan-values as a valid result we want to be able to test this. As it is right now comparing two nan-values will result in not equal. To be able of comparing nan-values we can switch to using numpy function array_equal and set input parameter equal_nan = True. This function also compares shapes of the result and the data values underneath masked values. Switching to the array_equal function generates some errors in the tests listed bellow:
- [x] FirstOccurrence and LastOccurrence, call/lazy function last test generates an error due to inaccurate shape of expected output. (Error in test parameters)
- [x] Percentile and ThresholdedPercentile, call function all tests returns an inaccurate shape of result. (Error in call function)
- [x] ThresholdedRunningStatistics, call/lazy function tests 2 and 4 returns an error due to wrong data value underneath the mask in the expected output. (Error in test parameters)0.20 (Urbane Goat)Carolina NilssonCarolina Nilssonhttps://git.smhi.se/climix/climix/-/issues/328Index: Number of days(Temperature between two values (-2, 2) and precipitatio...2023-11-05T13:23:52ZJoakim LöwIndex: Number of days(Temperature between two values (-2, 2) and precipitation above 0.1 mm/d)Similar to index functions:
`CountJointOccurrencesPrecipitationTemperature`
`CountJointOccurrencesTemperature`
which inherits from
`CountJointOccurrences`
Replaces #296
Note: check if it's ok to add index definition in `SMHI_extra.yml`.Similar to index functions:
`CountJointOccurrencesPrecipitationTemperature`
`CountJointOccurrencesTemperature`
which inherits from
`CountJointOccurrences`
Replaces #296
Note: check if it's ok to add index definition in `SMHI_extra.yml`.0.20 (Urbane Goat)Renate WilckeRenate Wilckehttps://git.smhi.se/climix/climix/-/issues/325Error when integrations tests are generated2023-11-05T15:29:56ZJoakim LöwError when integrations tests are generatedIntegrations tests currently cannot be run. Pytest returns the following error when running from command line:
```
====================================================================== test session starts ==============================...Integrations tests currently cannot be run. Pytest returns the following error when running from command line:
```
====================================================================== test session starts ======================================================================
platform linux -- Python 3.10.11, pytest-7.3.2, pluggy-1.0.0
rootdir: /home/sm_joalo/dev/repos/climix
configfile: pyproject.toml
testpaths: tests
collected 213 items / 1 error
============================================================================ ERRORS =============================================================================
______________________________________________________ ERROR collecting tests/integration/test_indices.py _______________________________________________________
tests/integration/test_indices.py:64: in <module>
generate_test_index_parametrization(),
tests/integration/test_indices.py:45: in generate_test_index_parametrization
config = read_test_configuration()
tests/integration/conftest.py:14: in read_test_configuration
config_string = files("tests.integration").joinpath("configuration.yml").read_text()
../../../.conda/envs/climix/lib/python3.10/importlib/_common.py:22: in files
return from_package(get_package(package))
../../../.conda/envs/climix/lib/python3.10/importlib/_common.py:67: in get_package
if wrap_spec(resolved).submodule_search_locations is None:
../../../.conda/envs/climix/lib/python3.10/importlib/_adapters.py:16: in __getattr__
return getattr(self.spec, name)
E AttributeError: 'NoneType' object has no attribute 'submodule_search_locations'
==================================================================== short test summary info ====================================================================
ERROR tests/integration/test_indices.py - AttributeError: 'NoneType' object has no attribute 'submodule_search_locations'
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
======================================================================= 1 error in 24.99s =======================================================================
```0.20 (Urbane Goat)Joakim LöwJoakim Löwhttps://git.smhi.se/climix/climix/-/issues/289Command line option to specify computational period2023-12-12T09:57:28ZJoakim LöwCommand line option to specify computational periodAdd a command line option to specify the period to perform index calculation on. Reasons:
1. User may only want to compute the index for a sub period of the data.
2. Beginning and end of input data may be incomplete with respect to time ...Add a command line option to specify the period to perform index calculation on. Reasons:
1. User may only want to compute the index for a sub period of the data.
2. Beginning and end of input data may be incomplete with respect to time period. E.g. if 'annual' and first and/or last year of data does not contain entries for all days of year, climix may raise error for some indices.
See also #273 and #2570.20 (Urbane Goat)Carolina NilssonCarolina Nilssonhttps://git.smhi.se/climix/climix/-/issues/268test for vegetation indices (gsl, gsstart, gsend)2023-11-07T10:38:37ZLars Bärringtest for vegetation indices (gsl, gsstart, gsend)The index for growing season length (`gsl`) is defined, but there is no "formal index" for its start (`gsstart`) and end (`gsend`). But these three indices can be calculated with CLIMIX.
Now some question marks about *gsend* have [arisen...The index for growing season length (`gsl`) is defined, but there is no "formal index" for its start (`gsstart`) and end (`gsend`). But these three indices can be calculated with CLIMIX.
Now some question marks about *gsend* have [arisen](#249). Among other things, it seems that *gsend* could occur before *gsstart*, as well as that we get `-1` as an answer in a number of more or less pathological situations.
For these three indices we would therefore need to run a number of simple test cases based on a single synthetic time series covering one or a few years.
Both *gsstart* and *gsend* use the index_function `first_spell` [=FirstSpell], while *gsl* uses `season_length` [=SeasonLength]. In this, the start date for *gsend* (July 1) has been simplified to day number 182.
Suggestions:
* The user creates an numpy array (length=365, or small multiple thereof) with synthetic data.
* A function converts this to a climix-compatible data cube, after which the three indices are calculated and the answers are returned to the user.
yaml file with index definitions can be found here:
/home/sm_klazi/.config/climix/test_indices.yml
```
GSL, Growing season length: Annual (1st Jan to 31st Dec in Northern Hemisphere (NH),
1st July to 30th June in Southern Hemisphere (SH)) count between first span of
at least 6 days with daily mean temperature TG>5°C and first span after July 1st
(Jan 1st in SH) of 6 days with TG<5°C.
Let TG_ij be daily mean temperature on day i in year j. Count the number of days between
the first occurrence of at least 6 consecutive days with:
TG_ij > 5°C
and the first occurrence after 1st July (1st Jan. in SH) of at least 6 consecutive days with:
TG_ij < 5°C.
```0.20 (Urbane Goat)Carolina NilssonCarolina Nilssonhttps://git.smhi.se/climix/climix/-/issues/252Allow coordinate "year" (e.g.) to exist already2023-11-28T14:09:22ZRenate WilckeAllow coordinate "year" (e.g.) to exist alreadyWhen the data used to calculate indices with has already a coordinate called 'year' (this might be true for other aux coordinates like "season"...) I get an error in climix
/climix/period.py", line 22, in add_coord_categorisation
I wond...When the data used to calculate indices with has already a coordinate called 'year' (this might be true for other aux coordinates like "season"...) I get an error in climix
/climix/period.py", line 22, in add_coord_categorisation
I wonder if we can not simply write a try/except here and pass if an error is thrown.0.20 (Urbane Goat)Renate WilckeRenate Wilckehttps://git.smhi.se/climix/climix/-/issues/216Growing season indices: start, end, length2023-12-12T10:04:23ZLars BärringGrowing season indices: start, end, length Index functions for calculating start/ end of growing seasom according to ETCCDI definition, with the exception that spatial dependency is not implemented ( i.e. the indices are only valid for the northern hemisphere).
**gsstart**: T... Index functions for calculating start/ end of growing seasom according to ETCCDI definition, with the exception that spatial dependency is not implemented ( i.e. the indices are only valid for the northern hemisphere).
**gsstart**: The first occurrence of at least 6 consecutive days with `tas > 5 °C`
**gsend**: The first occurrence after 1st July (Jan 1st in SH) of at least 6 consecutive days with `tas < 5 °C`.
**gsl**: Growing season length, calculated as the difference between `gsend` and `gsstart`0.20 (Urbane Goat)Carolina NilssonCarolina Nilssonhttps://git.smhi.se/climix/climix/-/issues/38Add output template description2023-11-29T14:23:19ZKlaus ZimmermannAdd output template description0.20 (Urbane Goat)Carolina NilssonCarolina Nilssonhttps://git.smhi.se/climix/climix/-/issues/343Climix documentation structure on readthedocs2024-02-20T07:29:34ZJoakim LöwClimix documentation structure on readthedocsThe table of content includes climate indices and documentation index, seen on the first page. The word 'index' has two different meanings in these two cases, which is somewhat confusing. Also 'Index' link is empty. Restructure, and poss...The table of content includes climate indices and documentation index, seen on the first page. The word 'index' has two different meanings in these two cases, which is somewhat confusing. Also 'Index' link is empty. Restructure, and possibly remove some links, to make it more clear.0.21Joakim LöwJoakim Löwhttps://git.smhi.se/climix/climix/-/issues/334Implement connection to Gordias2024-02-20T07:29:31ZCarolina NilssonImplement connection to GordiasWhen Gordias becomes available we need to implement it in climix and remove some unnecessary files.When Gordias becomes available we need to implement it in climix and remove some unnecessary files.0.21Carolina NilssonCarolina Nilsson