test 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. 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.