Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • C climix
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 49
    • Issues 49
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 8
    • Merge requests 8
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • climix
  • climix
  • Merge requests
  • !179

Draft: Index function for diurnal temperature range with threshold (fixes #195)

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Joakim Löw requested to merge joakim.low/climix:diurnal-temp-range-above-threshold into main Sep 27, 2022
  • Overview 13
  • Commits 2
  • Pipelines 0
  • Changes 4

Replaces !173 (closed).

Added a ThresholdedDiurnalTemperatureRange index function and DifferenceThresholdMixin mixin class to deal with differences (in temperature).

When converting a temperature difference from e.g. Celsius to Kelvin, or Celsius to Fahrenheit, it's not enough to use convert_units on the difference value (as noted in #195 (closed)). The idea in DifferenceThresholdMixin is to convert both the difference value and the zero of the original unit, and then create the difference in the new unit using both converted values. E.g. difference in Celsius of 10 = (10 - 0) gives a difference in Kelvin of (283.15 - 273.15) = 10, or a difference in Fahrenheit of (50 - 32) = 18. I think this should work as long as there is a linear relationship between the two units.

Edited Nov 24, 2022 by Joakim Löw
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: diurnal-temp-range-above-threshold