Skip to content

Reference period defined in Index_definition.yml and command line arg -r/-reference_period (fixes #273)

Carolina Nilsson requested to merge a002527/climix:feature_reference_period into main

Index functions with a reference period in the index definition:

          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/ /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) ;

 reference_period = 34698 ;
 reference_period_bnds = 25932, 43464 ;
Edited by Carolina Nilsson

Merge request reports