Skip to content

Index 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/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

Merge request reports