leadtime option in recipe
This issue is for the leadtime option(s) in the recipe. As we discussed earlier, we're not going to change this soon but we should put this issue in mind.
For now, users assign the start and end of leadtime in the recipe.
Time:
leadtimemin: 2
leadtimemax: 4
From decadal data's view, it is okay for retrieving data for the whole year and for one single model. However, retrieving data for certain seasons/months and multiple models will have problems since the forecast time won't be continuous and models have different initial forecast times. For example, for sdate = 2000, EC-Earth3
forecast time starts from Nov. 2000, while BCC-CSM2-MR
starts from Jan. 2000. So, if DJF is required, EC-Earth3
has indices c(2:4, 12 + c(2:4), 12*2 + c(2:4), ...)
while BCC-CSM2-MR
has indices c(12:14, 12 + c(12:14), 12*2 + c(12:14), ...)
.
For daily data (both seasonal and decadal), it has problems when the calendars of datasets are different. Also, some indicators require specific days, e.g., 15th June to 15th July.
We may provide different options for each situation. For seasonal period, we can allow users to assign the months (e.g., "Dec, Jan, Feb") and create a function to calculate the indices for each dataset. For daily data, we need to accept "date" in the recipe. Carlos D. has a function to calculate fday indices of decadal daily data based on calendar, fyears, and initial month (https://earth.bsc.es/gitlab/cdelgado/cdelgado_copernicus/-/blob/development_branch/Extremes/get_fdays.R). It may be useful to create the functions we need. @lpalma also has a similar function (can you put the link here for future reference?)
Please supplement other possible cases I haven't considered, or correct me if I misunderstand anything, thanks.
Cheers,
An-Chi