Diive

Latest version: v0.84.2

Safety actively analyzes 682404 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 13 of 15

0.44.0

New Features

- **Flux quality-control**: (`pkgs.qaqc.fluxes.FluxQualityControlFlag`)
- First implementation of quality control of ecosystem fluxes. Generates one
overall flag (`QCF`=quality control flag) from multiple quality test results
in EddyPro's `fluxnet` output file. The resulting `QCF` is Level-2 in the
Swiss FluxNet processing chain,
described [here](https://www.swissfluxnet.ethz.ch/index.php/data/ecosystem-fluxes/flux-processing-chain/).
`QCF` is mostly based on the ICOS methodology, described
by [Sabbatini et al. (2018)](https://doi.org/10.1515/intag-2017-0043).
- **Histogram**: (`pkgs.analyses.histogram.Histogram`)
- Calculates histogram from time series, identifies peak distribution
- **Percentiles**: (`pkgs.analyses.quantiles.percentiles`)
- Calculates percentiles (0-100) for a time series
- **Scatter**: Implemented first version of `core.plotting.scatter.Scatter`, which will
be used for scatter plots in the future

Changes

- **Critical days**: (`pkgs.flux.criticaldays.CriticalDays`)
- Renamed Variables, now using Dcrit (instead of CRD) and nDcrit (instead of nCRD)
- **NEP Penalty**: (`pkgs.flux.nep_penalty.NEPpenalty`)
- Code was refactored to work with NEP (net ecosystem productivity) instead of NEE
(net ecosystem exchange)
- CO2 penalty was renamed to the more descriptive NEP penalty
- **Sanitize column names**: implemented in `core.io.filereader.ColumnNamesSanitizer`
Column names are now checked for duplicates. Found duplicates are renamed by adding a
suffix to the column name. Example: `co2_mean` and `co2_mean` are renamed to
`co2_mean.1` and `co2_mean.2`. This check is now implemented during the reading of
the data file in `core.io.filereader.DataFileReader`.
- **Configuration files**: When reading filetype configuration files in `core.io.filereader.ConfigFileReader`,
the resulting dictionary that contains all configurations is now validated. The validation makes
sure the parameters for `.read_csv()` are in the proper format.
- Updated all dependencies to their newest (possible) version

Additions

- Added support for filetype `EDDYPRO_FLUXNET_30MIN` (`configs/filetypes/EDDYPRO_FLUXNET_30MIN.yml`)

0.43.0

New Features

- **Frequency groups detection**: Data in long-term datasets are often characterized by changing time
resolutions at which data were recorded. `core.times.times.detect_freq_groups` detects changing
time resolutions in datasets and adds a group identifier in a new column that gives info about the
detected time resolution in seconds, e.g., `600` for 10MIN data records. This info allows to
address and process the different time resolutions separately during later processing, which is
needed e.g. during data quality-screening and resampling.
- **Outlier removal using z-score**: First version of `pkgs.outlierdetection.zscore.zscoreiqr`
Removes outliers based on the z-score of interquartile range data. Data are divided
into 8 groups based on quantiles. The z-score is calculated for each data point
in the respective group and based on the mean and SD of the respective group.
The z-score threshold to identify outlier data is calculated as the max of
z-scores found in IQR data multiplied by *factor*. z-scores above the threshold
are marked as outliers.
- **Outlier removal using local standard deviation**: First version of `pkgs.outlierdetection.local3sd.localsd`
Calculates mean and SD in a rolling window and marks data points outside a specified range.

Additions

- **MeteoScreening**: Added the new parameter `resampling_aggregation` in the meteoscreening setting
`diive/pkgs/qaqc/pipes_meteo.yaml`. For example, `TA` needs `mean`, `PRECIP` needs `sum`.

Changes

- **MeteoScreening**: `pkgs.qaqc.meteoscreening.MeteoScreeningFromDatabaseSingleVar`
Refactored the merging of quality-controlled 30MIN data when more than one raw data time
resolution is involved.
- **Resampling**: `core.times.resampling.resample_series_to_30MIN`
The minimum required values for resampling is `1`. However, this is only relevant for
lower resolution data e.g. 10MIN and 30MIN, because for higher resolutions the calculated value
for minimum required values yields values > 1 anyway. In addition, if data are already in
30MIN resolution, they are still going through the resampling processing although it would not
be necessary, because the processing includes other steps relevant to all data resolutions, such
as the change of the timestamp from TIMESTAMP_MIDDLE to TIMESTAMP_END.

Bugs

- Removed display bug when showing data after high-res meteoscreening in heatmap. Plot showed
original instead of meteoscreened data

0.42.0

New Features

- **Decoupling**: Added first version of decoupling code (`pkgs.analyses.decoupling.SortingBinsMethod`).
This allows the investigation of binned aggregates of a variable `z` in binned classes of
`x` and `y`. For example: show mean GPP (`y`) in 5 classes of VPD (`x`), separate for
10 classes of air temperature (`z`).

![DIIVE](images/analysesDecoupling_sortingBinsMethod_diive_v0.42.0.png)

- **Time series plot**: `core.plotting.timeseries.TimeSeries` plots a simple time series. This will
be the default method to plot time series.

Changes

- **Critical days**: Several changes in `pkgs.flux.criticaldays.CriticalDays`:

- By default, daily aggregates are now calculated from 00:00 to 00:00 (before it was
7:00 to 07:00).
- Added parameters for specifying the labels for the x- and y-axis in output figure
- Added parameter for setting dpi of output figure
- Some smaller adjustments
- `pkgs.flux.co2penalty.CO2Penalty.plot_critical_hours`: 95% predicion bands are now
smoothed (rolling mean)

- **CO2 penalty**: (since v0.44.0 renamed to NEP penalty)

- Some code refactoring in `pkgs.flux.co2penalty.CO2Penalty`, e.g. relating to plot appearances

0.41.0

BinFitterBTS

- `pkgs.fits.binfitter.BinFitterBTS` fits a quadratic or linear equation to data.
- This is a refactored version of the previous `BinFitter` to allow more options.
- Implemented `pkgs.fits.binfitter.PlotBinFitterBTS` for plotting `BinFitterBTS` results
- `PlotBinFitterBTS` now allows plotting of confidence intervals for the upper and
lower prediction bands
- The updated `BinFitterBTS` is now implemented in `pkgs.flux.criticaldays.CriticalDays`

Example of updated `BinFitterBTS` as used in `CriticalDays`

It is now possible to show confidence intervals for the upper and lower prediction bands.
![DIIVE](images/fluxCriticalDaysWithUpdatedBinFitterBTS_diive_v0.41.0.png)

Other

- `core.plotting.heatmap_datetime.HeatmapDateTime` now accepts `figsize`
- When reading a file using `core.io.filereader.ReadFileType`, the index column is now
parsed to a temporarily named column. After reading the file data, the temporary column
name is renamed to the correct name. This was implemented to avoid duplicate issues
regarding the index column when parsing the file, because a data column with the same
name as the index column might be in the dataset.

Bugfixes

- Fixed bug in `pkgs.gapfilling.randomforest_ts.RandomForestTS`: fallback option for
gap-filling was never used and some gaps would remain in the time series.

0.40.0

CO2 Penalty

- New analysis: `pkgs.flux.co2penalty.CO2Penalty` calculates the CO2 penalty as
the difference between the observed co2 flux and the potential co2 flux modelled
from less extreme environmental conditions.

![DIIVE](images/fluxCO2penalty_cumulative_diive_v0.40.0.png)

![DIIVE](images/fluxCO2penalty_penaltyPerYear_diive_v0.40.0.png)

![DIIVE](images/fluxCO2penalty_dielCycles_diive_v0.40.0.png)

VPD Calculation

- New calculation: `pkgs.createvar.vpd.calc_vpd_from_ta_rh` calculates vapor pressure
deficit (VPD) from air temperature and relative humidity

Fixes

- Fixed: `core.plotting.cumulative.CumulativeYear` now shows zero line if needed
- Fixed: `core.plotting.cumulative.CumulativeYear` now shows proper axis labels

0.39.0

Critical Days

- New analysis: `pkgs.flux.criticaldays.CriticalDays` detects days in y that are
above a detected x threshold. At the moment, this is implemented to work with
half-hourly flux data as input and was tested with VPD (x) and NEE (y). In the
example below critical days are defined as the VPD daily max value where the daily
sum of NEE (in g CO2 m-2 d-1) becomes positive (i.e., emission of CO2 from the
ecosystem to the atmosphere).
![DIIVE](images/fluxCriticalDays_diive_v0.39.0.png)

Page 13 of 15

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.