climix merge requestshttps://git.smhi.se/climix/climix/-/merge_requests2023-11-30T11:00:05Zhttps://git.smhi.se/climix/climix/-/merge_requests/250Update documentation to clix-meta-0.6.1 (fixes #342)2023-11-30T11:00:05ZCarolina NilssonUpdate documentation to clix-meta-0.6.1 (fixes #342)0.20 (Urbane Goat)https://git.smhi.se/climix/climix/-/merge_requests/247Feature add computational period (Fixes #289)2023-12-12T09:57:28ZCarolina NilssonFeature add computational period (Fixes #289)- Added CLI-option for computational period, `-cp` and `--computational-period`.
- Added computational period argument to guess_output_template.
- Implemented ComputationalPeriod class to parse the string.
- Implemented time constraints ...- Added CLI-option for computational period, `-cp` and `--computational-period`.
- Added computational period argument to guess_output_template.
- Implemented ComputationalPeriod class to parse the string.
- Implemented time constraints for all period types: annual, monthly, seasonal.0.20 (Urbane Goat)https://git.smhi.se/climix/climix/-/merge_requests/246Extended documentation CLI, output template description and logo (Fixes #337 ...2023-11-29T14:23:19ZCarolina NilssonExtended documentation CLI, output template description and logo (Fixes #337 #38)0.20 (Urbane Goat)https://git.smhi.se/climix/climix/-/merge_requests/245Fix to get integration tests configuration file discoverable. (fixes #325)2023-11-05T15:29:56ZJoakim LöwFix to get integration tests configuration file discoverable. (fixes #325)Using `__file__` to get path of importing package instead of `importlib.resources`.Using `__file__` to get path of importing package instead of `importlib.resources`.0.20 (Urbane Goat)https://git.smhi.se/climix/climix/-/merge_requests/244Implementation of new index (precip condition and double temperature condition)2023-11-05T13:23:53ZRenate WilckeImplementation of new index (precip condition and double temperature condition)Implemented new index function CountJointOccurrencesPrecipitationDoubleTemperature that takes in two climate variables, three conditions and three thresholds.
Implemented new index in yaml file tmgem2le2rrge1 using new index function.
C...Implemented new index function CountJointOccurrencesPrecipitationDoubleTemperature that takes in two climate variables, three conditions and three thresholds.
Implemented new index in yaml file tmgem2le2rrge1 using new index function.
Closes #3280.20 (Urbane Goat)Renate WilckeRenate Wilckehttps://git.smhi.se/climix/climix/-/merge_requests/243Added array_equal function and fixed issues in tests not passing (Fixes #335)2023-09-21T10:11:04ZCarolina NilssonAdded array_equal function and fixed issues in tests not passing (Fixes #335)0.20 (Urbane Goat)Carolina NilssonCarolina Nilssonhttps://git.smhi.se/climix/climix/-/merge_requests/239Fix gsstart, gsend, gsl and add tests (fixes #216, #268)2023-12-12T10:04:24ZCarolina NilssonFix gsstart, gsend, gsl and add tests (fixes #216, #268)Added three index functions, season_start (gsstart), season_end (gsend), season_length (gsl).Added three index functions, season_start (gsstart), season_end (gsend), season_length (gsl).0.20 (Urbane Goat)Carolina NilssonCarolina Nilssonhttps://git.smhi.se/climix/climix/-/merge_requests/236Added exception when creating coordinate "year" (fixes #252)2023-11-28T14:09:21ZRenate WilckeAdded exception when creating coordinate "year" (fixes #252)Added exception for if coordinate "year" already exists. Coordinate will then be
- removed
- newly created and
- a warning issued.
Closes #252.Added exception for if coordinate "year" already exists. Coordinate will then be
- removed
- newly created and
- a warning issued.
Closes #252.0.20 (Urbane Goat)https://git.smhi.se/climix/climix/-/merge_requests/224Update changelog for 0.18.02023-04-23T13:57:57ZKlaus ZimmermannUpdate changelog for 0.18.00.18 (Gull Olle)Klaus ZimmermannKlaus Zimmermannhttps://git.smhi.se/climix/climix/-/merge_requests/214Create basic documentation (closes #84, #287)2023-04-23T13:41:47ZKlaus ZimmermannCreate basic documentation (closes #84, #287)0.18 (Gull Olle)Klaus ZimmermannKlaus Zimmermannhttps://git.smhi.se/climix/climix/-/merge_requests/213Adds unit tests for index functions(fixes #299)2023-04-21T14:05:49ZCarolina NilssonAdds unit tests for index functions(fixes #299)* [x] CountLevelCrossings
* [x] CountOccurrences
* [x] CountJointOccurrencesPrecipitationTemperature
* [x] CountJointOccurrencesTemperature
* [x] DiurnalTemperatureRange
* [x] ExtremeTemperatureRange
* [x] InterdayDiurnalTemperatureRange...* [x] CountLevelCrossings
* [x] CountOccurrences
* [x] CountJointOccurrencesPrecipitationTemperature
* [x] CountJointOccurrencesTemperature
* [x] DiurnalTemperatureRange
* [x] ExtremeTemperatureRange
* [x] InterdayDiurnalTemperatureRange
* [x] Percentile
* [x] Statistics
* [x] ThresholdedPercentile
* [x] ThresholdedStatistics
* [x] RunningStatistics
* [x] ThresholdedRunningStatistics
* [x] TemperatureSum
Several test implemented for each index function. Not all index functions passes all tests. The behaviour of some index functions may need to be reviewed in more details.0.18 (Gull Olle)Carolina NilssonCarolina Nilssonhttps://git.smhi.se/climix/climix/-/merge_requests/212Update to clix-meta v0.5.12023-03-14T09:52:37ZJoakim LöwUpdate to clix-meta v0.5.1Closes #298
- Updated `index_definitions.yml` and `variables.yml` to the clix-meta v0.5.1 versions.
- Updated `metadata.yml` accordingly.
- Changed argument lists for affected index functions: `diurnal_temperature_range`, `running_st...Closes #298
- Updated `index_definitions.yml` and `variables.yml` to the clix-meta v0.5.1 versions.
- Updated `metadata.yml` accordingly.
- Changed argument lists for affected index functions: `diurnal_temperature_range`, `running_statistics`, `spell_length`, `statistics`, `thresholded_running_statistic` and `thresholded_statistic`. I've tested one index of each index function except for `running_statistics` which is currently not used by any index in `index_definitions.yml`.
- Added a `ParameterTimeRange` dataclass to read parameter type `time_range` used for `reference_period` by some indices. Also updated the corresponding index functions to parse the `reference_period` in iso format. Note: this affects !208, which will require a rebase and some modification.0.18 (Gull Olle)https://git.smhi.se/climix/climix/-/merge_requests/211Adds global metadata configuration (fixes #36)2023-04-12T09:46:26ZCarolina NilssonAdds global metadata configuration (fixes #36)```
# This file specifies how the global attributes from the input files
# are transferred to the global attributes in the output file. The configuration
# can be specified for both input and output, where the configuration for
# input i...```
# This file specifies how the global attributes from the input files
# are transferred to the global attributes in the output file. The configuration
# can be specified for both input and output, where the configuration for
# input is applied after loading the input data files, whereas, the output
# configuration is applied in the post-processing step of the cube. The structure of
# the I/O configurations is different:
#
# Input:
# ------
# The input configuration has three sections: default, drop, and transfer.
#
# default:
# --------
#
# default: <option>
#
# The following two options are available:
# - equalize: keep all attributes that are equal between the cubes
# - drop: remove all attributes except the ones specified under transfer
#
# By default, Climix will use equalize to remove the attributes that are not equal
# between all cubes. The default configuration can be used to remove redundant
# attributes without specifying all of their names.
#
#
# drop:
# -----
#
# drop:
# - existing_attribute
#
# The drop configuration can be used to remove specific existing attributes.
#
#
# transfer:
# ---------
#
# transfer:
# attr_name_1:
# - existing_attribute
# attr_name_2:
# - existing_attribute_1
# - existing_attribute_2
#
# The variables configuration allows the user to specify which attributes to keep
# and join. Here, `attr_name` determines the names for the output attribute, while
# `existing_attribute` determines which attributes should be stored under
# `attr_name`. If `existing_attribute` has different values between cubes, the
# *unique* values will be joined with a comma separator, e.g.,
#
# transfer:
# creation-dates:
# - creation_date
#
# creates the output attribute:
# creation-dates = "2018-06-21-T20:03:01Z, 2018-06-21-T19:59:31Z"
#
# However, if the user defines multiple existing attributes they will first be joined
# with an underscore and then the unique values will be joined with a comma separator,
# e.g.,
#
# transfer:
# tracking-and-creation:
# - tracking_id
# - creation_date
#
# creates the output attribute:
# tracking-and-creation = "1a76c102-ed05-4d84-bfeb-e4dc1c48a5dc_2018-06-21-T20:03:01Z, df8c2f0a-4126-4c05-aafa-db532304cdcc_2018-06-21-T19:59:31Z"
#
#
# Output:
# -------
# The output configuration has one section: create.
#
# create:
# ---------
#
# create:
# attr_name: "string with information to store"
#
# Here, the user can define attribute values that will be set for `attr_name`, e.g.,
#
# create:
# institution: "SMHI"
#
# creates the output attribute:
# institution = "SMHI"
#
# If the user chooses the same `attr_name` as an already existing attribute, either in
# the input configuration or in the cube's global attributes, it will be overwritten.
# It is also possible to fill in useful information that is created during the run,
# e.g., existing global attributes, the software version being used, and time.
# Valid values: {NOW}, {CLIMIX_VERSION}, {existing_attribute}
#
# transfer:
# creation_date: "{NOW}"
# software: "{CLIMIX_VERSION}"
# rcm-gcm: "rcm: {rcm} gcm: {gcm}"
#
# can create the output attributes:
# creation-date = "2023-03-31T14:52:32 UTC"
# software = "CLIMIX version 0.18.0"
# rcm-gcm: "rcm: SMHI-RCA4_v1 gcm: NCC-NorESM1-M"
```
default config:
```
climix:
global_attributes:
input:
default: equalize
drop:
# CORDEX and CMIP attributes that are transferred (see below)
- driving_experiment_name
- model_id
- rcm_version_id
- driving_model_id
- tracking_id
- creation_date
- driving_model_ensemble_member
- history
- history_of_appended_files
- institution
- institute_id
- references
- product
- contact
- project_id
- experiment
- experiment_id
- driving_experiment
- initialization_method
- physics_version
- realization
- source
- table_id
- title
transfer:
scenario:
- driving_experiment_name
rcm:
- model_id
- rcm_version_id
gcm:
- driving_model_id
gcm_ensemble_member:
- driving_model_ensemble_member
tracking-id_creation-date:
- tracking_id
- creation_date
history-attribute:
- history
- history_of_appended_files
input_frequency:
- frequency
input_institution:
- institution
input_institute_id:
- institute_id
input_references:
- references
input_product:
- product
input_contact:
- contact
input_project_id:
- project_id
CORDEX_domain:
- CORDEX_domain
output:
create:
product: "climate indicator"
institution: "Swedish Meteorological and Hydrological Institute, Rossby Centre"
institute_id: SMHI
references: "https://www.smhi.se/en/research/research-departments/climate-research-at-the-rossby-centre"
creation_date: "{NOW}"
software: "{CLIMIX_VERSION}"
```
output example with default config file (equalise):
`climix -e -l info -v -o /nobackup/rossby27/users/sm_carni/data/tmp/output_files/out_tmp_tn_glob_ex1.nc -x tn /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 --activate-config`
global attributes in input files:
```
// global attributes:
:institution = "Helmholtz-Zentrum Geesthacht, Climate Service Center, Max Planck Institute for Meteorology" ;
:institute_id = "MPI-CSC" ;
:experiment_id = "rcp85" ;
:source = "MPI-CSC-REMO2009" ;
:model_id = "MPI-CSC-REMO2009" ;
:contact = "gerics-cordex@hzg.de" ;
:comment = "CORDEX Europe RCM REMO 0.11 deg EUR-11" ;
:references = "http://www.remo-rcm.de/" ;
:initialization_method = 1 ;
:physics_version = 1 ;
:tracking_id = "436ab648-e2de-4696-9b11-fe1ac68bb87b" ;
:CORDEX_domain = "EUR-11" ;
:driving_experiment = "MPI-M-MPI-ESM-LR, rcp85, r2i1p1" ;
:driving_model_id = "MPI-M-MPI-ESM-LR" ;
:driving_model_ensemble_member = "r2i1p1" ;
:driving_experiment_name = "rcp85" ;
:rcm_version_id = "v1" ;
:product = "output" ;
:experiment = "RCP8.5" ;
:frequency = "day" ;
:creation_date = "2016-05-10T19:55:24Z" ;
:history = "2016-05-10T19:55:24Z CMOR rewrote data to comply with CF standards and CORDEX requirements." ;
:Conventions = "CF-1.4" ;
:project_id = "CORDEX" ;
:table_id = "Table day (March 2015) 6f55fe4ad23cded422652f83a747ce32" ;
:title = "MPI-CSC-REMO2009 model output prepared for CORDEX RCP8.5" ;
:modeling_realm = "atmos" ;
:realization = 2 ;
:cmor_version = "2.9.1" ;
}
// global attributes:
:institution = "Helmholtz-Zentrum Geesthacht, Climate Service Center, Max Planck Institute for Meteorology" ;
:institute_id = "MPI-CSC" ;
:experiment_id = "rcp85" ;
:source = "MPI-CSC-REMO2009" ;
:model_id = "MPI-CSC-REMO2009" ;
:contact = "gerics-cordex@hzg.de" ;
:comment = "CORDEX Europe RCM REMO 0.11 deg EUR-11" ;
:references = "http://www.remo-rcm.de/" ;
:initialization_method = 1 ;
:physics_version = 1 ;
:tracking_id = "13096055-aa41-4c04-bab3-a86e45600ab3" ;
:CORDEX_domain = "EUR-11" ;
:driving_experiment = "MPI-M-MPI-ESM-LR, rcp85, r2i1p1" ;
:driving_model_id = "MPI-M-MPI-ESM-LR" ;
:driving_model_ensemble_member = "r2i1p1" ;
:driving_experiment_name = "rcp85" ;
:rcm_version_id = "v1" ;
:product = "output" ;
:experiment = "RCP8.5" ;
:frequency = "day" ;
:creation_date = "2016-02-04T17:37:42Z" ;
:history = "2016-02-04T17:37:42Z CMOR rewrote data to comply with CF standards and CORDEX requirements." ;
:Conventions = "CF-1.4" ;
:project_id = "CORDEX" ;
:table_id = "Table day (March 2015) 6f55fe4ad23cded422652f83a747ce32" ;
:title = "MPI-CSC-REMO2009 model output prepared for CORDEX RCP8.5" ;
:modeling_realm = "atmos" ;
:realization = 2 ;
:cmor_version = "2.9.1" ;
```
global attributes in output file:
```
// global attributes:
:CORDEX_domain = "EUR-11" ;
:associated_files = "gridspecFile: gridspec_atmos_fx_MPI-CSC-REMO2009_rcp85_r0i0p0.nc" ;
:cmor_version = "2.9.1" ;
:comment = "daily-minimum near-surface (usually, 2 meter) air temperature." ;
:creation_date = "2023-04-12T09:04:03 UTC" ;
:frequency = "mon" ;
:gcm = "MPI-M-MPI-ESM-LR" ;
:gcm_ensemble_member = "r2i1p1" ;
:history-attribute = "2016-02-04T17:37:42Z altered by CMOR: Treated scalar dimension: \'height\'., 2016-05-10T19:55:23Z altered by CMOR: Treated scalar dimension: \'height\'." ;
:input_contact = "gerics-cordex@hzg.de" ;
:input_frequency = "day" ;
:input_institute_id = "MPI-CSC" ;
:input_institution = "Helmholtz-Zentrum Geesthacht, Climate Service Center, Max Planck Institute for Meteorology" ;
:input_product = "output" ;
:input_project_id = "CORDEX" ;
:input_references = "http://www.remo-rcm.de/" ;
:institute_id = "SMHI" ;
:institution = "Swedish Meteorological and Hydrological Institute, Rossby Centre" ;
:modeling_realm = "atmos" ;
:product = "climate indicator" ;
:rcm = "MPI-CSC-REMO2009_v1" ;
:references = "https://www.smhi.se/en/research/research-departments/climate-research-at-the-rossby-centre" ;
:scenario = "rcp85" ;
:software = "Climix version 0.17.0+28.g004e89e" ;
:tracking-id_creation-date = "436ab648-e2de-4696-9b11-fe1ac68bb87b_2016-05-10T19:55:24Z, 13096055-aa41-4c04-bab3-a86e45600ab3_2016-02-04T17:37:42Z" ;
:Conventions = "CF-1.7" ;
}
```
Example with importing a config file using "-f" that has the setting,
```
default: drop
```
and "-l debug"
`climix -e -l debug -v -o /nobackup/rossby27/users/sm_carni/data/tmp/output_files/out_tmp_tn_glob_ex2.nc -x tn -f /home/sm_carni/Project/YML/climix_config.yml /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 --activate-config`
```
// global attributes:
:CORDEX_domain = "EUR-11" ;
:creation_date = "2023-04-12T09:05:14 UTC" ;
:frequency = "mon" ;
:gcm = "MPI-M-MPI-ESM-LR" ;
:gcm_ensemble_member = "r2i1p1" ;
:history-attribute = "2016-02-04T17:37:42Z altered by CMOR: Treated scalar dimension: \'height\'., 2016-05-10T19:55:23Z altered by CMOR: Treated scalar dimension: \'height\'." ;
:input_contact = "gerics-cordex@hzg.de" ;
:input_frequency = "day" ;
:input_institute_id = "MPI-CSC" ;
:input_institution = "Helmholtz-Zentrum Geesthacht, Climate Service Center, Max Planck Institute for Meteorology" ;
:input_product = "output" ;
:input_project_id = "CORDEX" ;
:input_references = "http://www.remo-rcm.de/" ;
:institute_id = "SMHI" ;
:institution = "Swedish Meteorological and Hydrological Institute, Rossby Centre" ;
:product = "climate indicator" ;
:rcm = "MPI-CSC-REMO2009_v1" ;
:references = "https://www.smhi.se/en/research/research-departments/climate-research-at-the-rossby-centre" ;
:scenario = "rcp85" ;
:software = "Climix version 0.17.0+28.g004e89e" ;
:tracking-id_creation-date = "436ab648-e2de-4696-9b11-fe1ac68bb87b_2016-05-10T19:55:24Z, 13096055-aa41-4c04-bab3-a86e45600ab3_2016-02-04T17:37:42Z" ;
:Conventions = "CF-1.7" ;
}
```
Running a index with two different data inputs from two different models (default config file):
`climix -e -o /nobackup/rossby27/users/sm_carni/data/tmp/output_files/out_tmp_dtr_ex3.nc -x dtr /home/rossby/data_lib/esgf/cordex/output/EUR-11/SMHI/NCC-NorESM1-M/rcp85/r1i1p1/RCA4/v1/day/tasmax/latest/tasmax_EUR-11_NCC-NorESM1-M_rcp85_r1i1p1_SMHI-RCA4_v1_day_20060101-20101231.nc /home/rossby/data_lib/esgf/cordex/output/EUR-11/SMHI/NCC-NorESM1-M/rcp85/r1i1p1/RCA4/v1/day/tasmax/latest/tasmax_EUR-11_NCC-NorESM1-M_rcp85_r1i1p1_SMHI-RCA4_v1_day_20110101-20151231.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_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 -l debug --activate-config`
produces the output attributes:
```
// global attributes:
:CORDEX_domain = "EUR-11" ;
:creation_date = "2023-04-12T09:07:17 UTC" ;
:frequency = "mon" ;
:gcm = "NCC-NorESM1-M, MPI-M-MPI-ESM-LR" ;
:gcm_ensemble_member = "r2i1p1, r1i1p1" ;
:history-attribute = "2016-05-10T19:55:23Z altered by CMOR: Treated scalar dimension: \'height\'., 2016-02-04T17:37:42Z altered by CMOR: Treated scalar dimension: \'height\'." ;
:input_contact = "gerics-cordex@hzg.de, rossby.cordex@smhi.se" ;
:input_frequency = "day" ;
:input_institute_id = "SMHI, MPI-CSC" ;
:input_institution = "Swedish Meteorological and Hydrological Institute, Rossby Centre, Helmholtz-Zentrum Geesthacht, Climate Service Center, Max Planck Institute for Meteorology" ;
:input_product = "output" ;
:input_project_id = "CORDEX" ;
:input_references = "http://www.smhi.se/en/Research/Research-departments/climate-research-rossby-centre, http://www.remo-rcm.de/" ;
:institute_id = "SMHI" ;
:institution = "Swedish Meteorological and Hydrological Institute, Rossby Centre" ;
:product = "climate indicator" ;
:rcm = "MPI-CSC-REMO2009_v1, SMHI-RCA4_v1" ;
:references = "https://www.smhi.se/en/research/research-departments/climate-research-at-the-rossby-centre" ;
:scenario = "rcp85" ;
:software = "Climix version 0.17.0+28.g004e89e" ;
:tracking-id_creation-date = "df8c2f0a-4126-4c05-aafa-db532304cdcc_2018-06-21-T19:59:31Z, 436ab648-e2de-4696-9b11-fe1ac68bb87b_2016-05-10T19:55:24Z, acfc60b7-57a5-4b02-b03b-3e556c48efe8_2018-06-21-T19:56:04Z, 13096055-aa41-4c04-bab3-a86e45600ab3_2016-02-04T17:37:42Z" ;
:Conventions = "CF-1.7" ;
}
```
There are some debug logging for the removed and replaced attributes, e.g.,
```
INFO:root:Applying global attribute input configuration
DEBUG:root:Following attributes were not found in all cubes: ['history', 'history_of_appended_files']
DEBUG:root:Attributes were removed to equalize cubes: <['model_id : MPI-CSC-REMO2009', 'title : MPI-CSC-REMO2009 model output prepared for CORDEX RCP8.5', 'realization : 2', 'associated_files = gridspecFile: gridspec_atmos_fx_MPI-CSC-REMO2009_rcp85_r0i0p0.nc', 'rossby_grib_path = /home/rossby/prod/201801/raw/', 'contact : rossby.cordex@smhi.se', 'physics_version : 1', 'institution : Helmholtz-Zentrum Geesthacht, Climate Service Center, Max Planck Institute for Meteorology', 'driving_experiment : NCC-NorESM1-M, rcp85, r1i1p1', 'creation_date : 2016-05-10T19:55:24Z', 'rossby_run_id = 201801', 'cmor_version = 2.9.1', 'institute_id : SMHI', 'model_id : SMHI-RCA4', 'driving_model_ensemble_member : r2i1p1', 'references : http://www.remo-rcm.de/', 'rossby_comment = 201801: CORDEX Europe 0.11 deg | RCA4 v1 | NCC-NorESM1-M | r1i1p1 | rcp85 | L40 | PRINCIPLES', "history : 2016-05-10T19:55:23Z altered by CMOR: Treated scalar dimension: 'height'.", 'experiment_id : rcp85', 'institute_id : MPI-CSC', 'table_id : Table day (March 2015) 6f55fe4ad23cded422652f83a747ce32', 'tracking_id : 13096055-aa41-4c04-bab3-a86e45600ab3', 'comment = daily-minimum near-surface (usually, 2 meter) air temperature.', 'creation_date : 2018-06-21-T19:59:31Z', 'driving_model_ensemble_member : r1i1p1', 'experiment : RCP8.5', 'modeling_realm = atmos', 'source : MPI-CSC-REMO2009', 'institution : Swedish Meteorological and Hydrological Institute, Rossby Centre', 'tracking_id : df8c2f0a-4126-4c05-aafa-db532304cdcc', 'contact : gerics-cordex@hzg.de', 'driving_model_id : NCC-NorESM1-M', 'creation_date : 2018-06-21-T19:56:04Z', "history : 2016-02-04T17:37:42Z altered by CMOR: Treated scalar dimension: 'height'.", 'tracking_id : acfc60b7-57a5-4b02-b03b-3e556c48efe8', 'initialization_method : 1', 'product : output', 'driving_experiment : MPI-M-MPI-ESM-LR, rcp85, r2i1p1', 'c3s_disclaimer = This data has been produced in the context of the C3S_34b_Lot1 and Lot 2 projects (PRINCIPLES/CORDEX4CDS) as a data provider for the Climate Data Store within the Copernicus Climate Change Service (C3S - https://climate.copernicus.eu/). While abiding by the highest scientific and technical standards, ECMWF cannot warrant that any information provided by the C3S will be entirely free from errors or omissions or that such errors or omissions can or will be rectified entirely. This applies to data from projects that continue to be developed, but are made publicly available for the purpose of feedback and testing. Some data or metadata may have been created or structured in files or formats that are not error-free. ECMWF accepts no responsibility with regard to such problems incurred as a result of using this data (see http://climate.copernicus.eu/disclaimer-privacy for the full disclaimer)', 'driving_experiment_name : rcp85', 'tracking_id : 436ab648-e2de-4696-9b11-fe1ac68bb87b', 'driving_model_id : MPI-M-MPI-ESM-LR', 'references : http://www.smhi.se/en/Research/Research-departments/climate-research-rossby-centre', 'rcm_version_id : v1', 'creation_date : 2016-02-04T17:37:42Z', 'project_id : CORDEX']>.
INFO:root:Applying global attribute output configuration
DEBUG:root:Following attributes were replaced: ['product = output'] #Note: This only shows for attributes that was not removed under drop and were replaced. In the new default file product is removed so this line won't show in the output.
```0.18 (Gull Olle)Klaus ZimmermannKlaus Zimmermannhttps://git.smhi.se/climix/climix/-/merge_requests/208Reference period defined in Index_definition.yml and command line arg -r/-ref...2023-04-11T11:55:23ZCarolina NilssonReference period defined in Index_definition.yml and command line arg -r/-reference_period (fixes #273)Index functions with a reference period in the index definition:
```yaml
reference_period:
kind: time_range
data: 1961/1990 # string formatted according as a ISO 8601 time range
```
will have a TimeRan...Index functions with a reference period in the index definition:
```yaml
reference_period:
kind: time_range
data: 1961/1990 # string formatted according as a ISO 8601 time range
```
will have a TimeRange parameter created.
The data string can be replaced from command line with, e.g., `-r 2012/2014, --reference-period 2012-01-01/2014-12-31` etc.
In the index function the timerange parameter is used to create a ReferencePeriod object. This has been implemented for count_percentile_occurrences and count_thresholded_percentile_occurrences.
Example:
`climix -e -v -o /nobackup/rossby27/users/sm_carni/data/tmp/output_files/rXp/out_tmp_r95pPCT_testfile_ngcd_Aland_new_test1.nc /home/rossby/joint_exp/climix/1/testdata/NGCD/input_data/Aland/NGCD_RR*.nc -x r95pPCT --reference-period 1971/2018`
A auxiliary coordinate is created and added to the output file:
```
double reference_period ;
reference_period:bounds = "reference_period_bnds" ;
reference_period:units = "days since 1900-01-01 00:00:00" ;
reference_period:standard_name = "reference_epoch" ;
reference_period:calendar = "standard" ;
int64 reference_period_bnds(bnds) ;
data:
reference_period = 34698 ;
reference_period_bnds = 25932, 43464 ;
}
```0.18 (Gull Olle)Klaus ZimmermannKlaus Zimmermannhttps://git.smhi.se/climix/climix/-/merge_requests/199Adding integration tests using a subset of indices in NGCD dataset (fixes #275)2023-04-21T08:38:17ZJoakim LöwAdding integration tests using a subset of indices in NGCD dataset (fixes #275)Added integration/regression tests for climix with input from the NGCD dataset.
- Datasets with test configurations are specified in `tests/integration/configuration.yml`, and are used to parameterize test function in `tests/integration...Added integration/regression tests for climix with input from the NGCD dataset.
- Datasets with test configurations are specified in `tests/integration/configuration.yml`, and are used to parameterize test function in `tests/integration/test_indices.py`.
- Tests are run by using a custom command line option to pytest, `pytest --test-config [config]` or `pytest -T [config]`, where `config` is one available in `configurations.py`, e.g.:
```
pytest -T ngcd_reg
pytest -T ngcd_org
```
- An optional argument can be used to run a specific test(s) within a configuration:
```
pytest -T ngcd_reg[cdd_yr]
pytest -T ngcd_reg[cdd_yr,dtr_yr,txn_yr]
```
- Indices tested are: `cdd`, `cfd`, `csu`, `cwd`, `dtr`, `fd`, `id`, `prcptot`, `r1mm`, `r10mm`, `r20mm`, `rx1day`, `sdii`, `su`, `tnn`, `tnx`, `tr`, `txn`, `txx`0.18 (Gull Olle)Klaus ZimmermannKlaus Zimmermannhttps://git.smhi.se/climix/climix/-/merge_requests/210Update changelog for release 0.17.02023-03-10T13:38:20ZKlaus ZimmermannUpdate changelog for release 0.17.00.17 (Black Lion)Klaus ZimmermannKlaus Zimmermannhttps://git.smhi.se/climix/climix/-/merge_requests/209Index functions for requested indices (fixes #282 #283)2023-03-10T12:15:26ZCarolina NilssonIndex functions for requested indices (fixes #282 #283)A simpler version of the requested index functions. The yaml-fie with the definitions is added in the ect folder in climix as SMHI_extra.yml.
Some simple test cases:
For index txgt13lt18:
`climix -e -p annual -x txgt13lt18 /nobackup/r...A simpler version of the requested index functions. The yaml-fie with the definitions is added in the ect folder in climix as SMHI_extra.yml.
Some simple test cases:
For index txgt13lt18:
`climix -e -p annual -x txgt13lt18 /nobackup/rossby27/users/sm_carni/data/tmp/test_files/testfile_3_tasmax_kelvin.nc`
```
testfile_3_tasmax_kelvin.nc has data described below:
2006:
(0,0): 15 days in jan with 15 degC, 1 day in dec with 15 degC
(0,1): 31 days in jan, 28 days in feb, 2 days in mars all with 14 degC
2007:
(0,0): 25 days in jan with 15 degC, 10 days in feb with 18 degC
2010:
(0,0): 20 days in dec with 14 degC
annual output:
2006: (0,0) = 16, (0, 1) = 61
2007: (0,0) = 25
2010: (0,0) = 20
seasonal ndjf:
2006(jf): (0,0) = 15, (0,1) = 59
2007(ndjf): (0,0) = 26
2010(nd) = 20
```
For index tngt0rrge1:
`climix -e -p annual[ndjf] -x tngt0rrge1 /nobackup/rossby27/users/sm_carni/data/tmp/test_files/testfile_3_tasmin.nc /nobackup/rossby27/users/sm_carni/data/tmp/test_files/testfile_3_pr.nc`
Output files with the same temperatures as above and rain on all of those days.
```
annual output:
2006: (0,0) = 16, (0, 1) = 61
2007: (0,0) = 35
2010: (0,0) = 20
seasonal ndjf:
2006(jf): (0,0) = 15, (0,1) = 59
2007(ndjf): (0,0) = 36
2010(nd) = 20
```0.17 (Black Lion)https://git.smhi.se/climix/climix/-/merge_requests/207Functions to parse dates and durations in iso 8601 format (fixes #294)2023-03-07T14:22:04ZJoakim LöwFunctions to parse dates and durations in iso 8601 format (fixes #294)I've implemented functions to parse dates and time range (time intervals) in iso8601. So far the code only explicitly handles calendar dates (i.e. no specific consideration is given to hour/minute/second parts). The regular expressions t...I've implemented functions to parse dates and time range (time intervals) in iso8601. So far the code only explicitly handles calendar dates (i.e. no specific consideration is given to hour/minute/second parts). The regular expressions to check the date format do not check for strict compliance to iso8601, since I'm relying on the isodate package to report any errors regarding e.g. invalid months or day numbers.
I've added test functions for the currently handled formats.
Also added _isodate_ package as requirement/dependency.
~~Keeping as draft just to get some feedback from #273 before finalizing.~~0.17 (Black Lion)https://git.smhi.se/climix/climix/-/merge_requests/202Replace cube cell_methods with cell_methods from index definition file (fixes...2023-02-27T10:54:49ZJoakim LöwReplace cube cell_methods with cell_methods from index definition file (fixes #193)Replace `cell_methods` of output cube with the ones specified in the index definition file.Replace `cell_methods` of output cube with the ones specified in the index definition file.0.17 (Black Lion)https://git.smhi.se/climix/climix/-/merge_requests/140Update changelog for release 0.13.0 (closes #201)2020-10-19T15:55:53ZKlaus ZimmermannUpdate changelog for release 0.13.0 (closes #201)0.13Klaus ZimmermannKlaus Zimmermann