Skip to content
Snippets Groups Projects
Commit de3aab69 authored by Max Lensing's avatar Max Lensing
Browse files

fixed osdma8 statistic, updated toarstats to 0.6.6

parent 69c8d277
No related branches found
No related tags found
1 merge request!18fixed osdma8 statistic, updated toarstats to 0.6.6
# Changelog
All notable changes to this project will be documented in this file.
## v0.6.6 - 2025-02-10 - fixed osdma8 statistic
### general:
* changed osdma8 statistic to use monthly dma8epa values
## v0.6.5 - 2025-01-17 - added osdma8 statistic
## v0.6.4 - 2024-09-16 - bugfix reference-series
......
File added
[metadata]
name = toarstats
version = 0.6.5
version = 0.6.6
author = Niklas Selke, Martin Schultz, Max Lensing
author_email = n.selke@fz-juelich.de, m.schultz@fz-juelich.de, m.lensing@fz-juelich.de
description = Collection of statistics for the TOAR community
......
......@@ -34,6 +34,7 @@ nvgt090 - calculate the NVGT090 metric
nvgt100 - calculate the NVGT100 metric
nvgt120 - calculate the NVGT120 metric
nvgtall - calculate all nvgt metrics together
osdma8 - calculate the annual maximum 6-month running mean of dma8epa
"""
import numpy as np
......@@ -779,7 +780,7 @@ def nvgtall(ser, ref, mtype, metadata, seasons, min_data_capture):
@register("osdma8")
def osdma8(ser, ref, mtype, metadata, seasons, min_data_capture):
""" Calculate osdma8 statistic
""" calculate the annual maximum 6-month running mean of dma8epa
:param ser: a series containing the values
:param ref: reference series
......@@ -790,9 +791,9 @@ def osdma8(ser, ref, mtype, metadata, seasons, min_data_capture):
:return: A list of dictionaries containing the processed data
"""
monthly_means = stat_processor_1("mean", ser, ref, "monthly", seasons, mincount=10)
monthly_dma8 = dma8epa(ser, ref, "monthly", metadata, seasons, min_data_capture)
tmp = monthly_means[0]["ser"]
tmp = monthly_dma8[0]["ser"]
reference_index = pd.date_range(
start=ref.index.min().strftime("%Y-%m-%d"),
end=ref.index.max().strftime("%Y-%m-%d"),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment