Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • CSIndicators CSIndicators
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Graph
    • Compare revisions
  • Issues 18
    • Issues 18
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 4
    • Merge requests 4
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Terraform modules
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Earth SciencesEarth Sciences
  • CSIndicatorsCSIndicators
  • Merge requests
  • !49

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

  • Review changes

  • Download
  • Patches
  • Plain diff
Merged Eva Rifà requested to merge develop-Dates_periodmean into master Jun 14, 2023
  • Overview 0
  • Commits 11
  • Pipelines 10
  • Changes 38

#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 Jul 20, 2023 by Eva Rifà
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: develop-Dates_periodmean