Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial growing season code #359

Draft
wants to merge 5 commits into
base: develop
Choose a base branch
from

Conversation

davidorme
Copy link
Collaborator

Description

This PR is to work on issue #352, providing code to identify the growing season within a time series. The user should provide a logical array showing a daily time series of when conditions are suitable for growth, along with an array showing dates (align with solar/calendar stuff) and then this module provides tools to calculate the start, end and length of the growing season. The functionality should include a filter to remove short windows of unsuitable conditions.

  • Implement filter_short_intervals to remove short intervals of unsuitable conditions. This should probably not filter unsuitable conditions at the start and end of the time series (or do so optionally).
  • Implement growing_season(ts, dates, filter_unsuitable).

Fixes #352 (issue)

Type of change

  • New feature (non-breaking change which adds functionality)
  • Optimization (back-end change that speeds up the code)
  • Bug fix (non-breaking change which fixes an issue)

Key checklist

  • Make sure you've run the pre-commit checks: $ pre-commit run -a
  • All tests pass: $ poetry run pytest

Further checks

  • Code is commented, particularly in hard-to-understand areas
  • Tests added that prove fix is effective or that feature works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement a routine for calculating growing season from datetime and temperature series.
1 participant