Skip to content

Subset Dates consistently within 's2dv_cube' and add 'time_bounds' for period aggregations

#24 (closed)

Functions to change

  • CST_PeriodMean
  • CST_PeriodAccumulation

Development

  • Subset attrsDates with data subset
  • Add attribute time_bounds indicating the beggining and the end of the aggregated period interval. It is a list with 2 elements: the start date of the aggregation and the end date. It has the same dimensions as Dates.
  • Add check if dates doesn't have dimensions and if not the data is not subset if start and end are NULL.
  • Improve documentation with time dimensions in Dates

Development regarding time_bounds

In functions: CST_PeriodMean, CST_PeriodAccumulation, CST_AccumulationExceedingThreshold, CST_TotalSpellTimeExceedingThreshold, CST_TotalTimeExceedingThreshold

  • Subset Dates accordingly with reduced dimension specified with time_dim and add add time_bounds. See lines here.
  • Updated documentation with the description of the new attribute 'time_bounds' in the output section and update example with using 'start' and 'end' parameters (see here)
  • Include in documentation imports ClimProjDiags::Subset

Development regarding start and end subset

In functions: PeriodMean, PeriodAccumulation, AccumulationExceedingThreshold, TotalSpellTimeExceedingThreshold, TotalTimeExceedingThreshold, QThreshold, Threshold, WindCapacityFactor, WindPowerDensity

  • In dates parameter description specify that it must have time dimensions. See here.
  • Add check if dates has dimensions to use SelectPeriodOnData, if not and end and start not NULL, a warning appears. See changes here.

Other changes

  • In all CST functions update or add element res$dims (here).
  • Changed default value of time_dim to ftime of some functions. Update: this change will be done in a separated branch #35 (closed). The default value will be time.
  • Add unit tests for new features
Edited by Eva Rifà

Merge request reports

Loading