{"id":38495639,"url":"https://github.com/holukas/dyco","last_synced_at":"2026-01-17T05:51:26.421Z","repository":{"id":49480621,"uuid":"311300577","full_name":"holukas/dyco","owner":"holukas","description":"Normalize lag times across files","archived":false,"fork":false,"pushed_at":"2025-05-06T10:27:12.000Z","size":183875,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-30T15:14:13.069Z","etag":null,"topics":["ecosystems","eddy-covariance","flux","python","time-delay","time-lag","time-series-analysis"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/holukas.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-11-09T10:21:59.000Z","updated_at":"2025-07-22T08:15:03.000Z","dependencies_parsed_at":"2025-05-05T10:42:43.588Z","dependency_job_id":null,"html_url":"https://github.com/holukas/dyco","commit_stats":{"total_commits":70,"total_committers":2,"mean_commits":35.0,"dds":0.02857142857142858,"last_synced_commit":"e5781632ee72aa4aff6efc7494fe9da2b1ad9439"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/holukas/dyco","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/holukas%2Fdyco","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/holukas%2Fdyco/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/holukas%2Fdyco/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/holukas%2Fdyco/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/holukas","download_url":"https://codeload.github.com/holukas/dyco/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/holukas%2Fdyco/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28501328,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T04:31:57.058Z","status":"ssl_error","status_checked_at":"2026-01-17T04:31:45.816Z","response_time":85,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ecosystems","eddy-covariance","flux","python","time-delay","time-lag","time-series-analysis"],"created_at":"2026-01-17T05:51:25.741Z","updated_at":"2026-01-17T05:51:26.412Z","avatar_url":"https://github.com/holukas.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Logo](https://raw.githubusercontent.com/holukas/dyco/refs/heads/main/images/logo_dyco1_256px.png)\n\n# **dyco v2** - dynamic lag compensation\n\n`dyco` uses eddy covariance raw data files as input and produces lag-compensated raw data files as output.\n\nVersion `2` changes the previous workflow.\n\n`dyco` identifies and corrects time lags between variables. It iteratively searches for lags between two variables,\ne.g., `W` (turbulent vertical wind) and `S` (scalar used for time lag detection, e.g. CO\u003csub\u003e2\u003c/sub\u003e or CH\u003csub\u003e4\u003c/sub\u003e),\nstarting with a broad time window and progressively narrowing it based on the distribution of found lags. This iterative\nrefinement helps pinpoint consistent lags, suggesting strong covariance. Lag searches can be performed on short segments\nof a long file. After collecting all identified lags, `dyco` filters outliers and creates a look-up table of daily time\nlags. This table is then used to shift variables in the input files, correcting for the identified lags. While `S` is\ntypically used for lag detection, the correction can be applied to other variables as needed. Lags are expressed in \"\nnumber of records\"; the corresponding time depends on the data's recording frequency.\n\n## Workflow in `v2`\n\n### Overview\n\nGenerally, `dyco v2` follows the workflow:\n\n- Prepare parameters and setup folder structure\n- Detect lags between two variables across all files (optional: iteratively over multiple iterations)\n- Analyze lags, create daily look-up table based on time lags found in Step 2\n- Remove time lags from one or more variables in input files\n\n### Step 1: Detect time lags across all files\n\n`dyco` detects the time lag between two variables, e.g. `W` and `S`. It begins by searching for this lag within a broad\ntime window, for\nexample, e.g. between -1000 and +1000 data points ([-1000, 1000]). This initial search is considered\niteration 1.\n\n**Lag is always expressed as \"number of records\".** If the underlying data were recorded at 20Hz, then 1000 records\ncorrespond to 50 seconds of measurements. Negative time lags mean that `S` lags behind `W` by the respective number of\nrecords.\n\n**Lag search can be done in segments per file**. For example, for a file with 30 minutes of data, the lag can be\ndetected in three 10-minute segments, yielding three detected time lags for the respective file. Another example, for a\nfile with 24 hours of data, the lag can be detected for 30-minute segments, yielding 48 time lags.\n\n![Covariance](https://raw.githubusercontent.com/holukas/dyco/refs/heads/main/images/dyco_v2_fig_covariance_20230517102000_segment3_iter1_segment_3_iteration-1.png)\n**Figure 1**. _Results from the covariance calculation (iteration 1) between turbulent vertical wind and turbulent CH4\nmixing ratios from the subcanopy station [CH-DAS](https://www.swissfluxnet.ethz.ch/index.php/sites/site-info-ch-das/) on\n17 May 2023. Time lag was searched between `-500` and `0` records in a 10MIN segment between 10:20 and 10:30, extracted\nfrom a 30MIN data file. Peak absolute covariance was found at lag `-246`, which means that `S` (CH4) arrived 246 records\nafter `W` (vertical wind) at the sensor._\n\n### Step 2: Analyze found time lags\n\nNext, `dyco` analyzes the distribution of the identified time lags. It identifies the most frequent lag (the peak of the\nhistogram, e.g., `-220`) and creates a smaller search window around it. For example, a new window like [-758, +196]\nmight be defined. This narrowing process expands outward from the peak lag until a certain percentage of the data (e.g.,\n95%) is encompassed within the new window.\n\n![Histogram](https://raw.githubusercontent.com/holukas/dyco/refs/heads/main/images/dyco_v2_fig_HISTOGRAM_segment_lag_times_iteration-1.png)\n**Figure 2**. _Histogram of found time lags (iteration 1) between turbulent vertical wind and turbulent CH4 mixing\nratios using a search window of [-500, 0] records. This example used 6919 data files between 12 May 2023 and 31 Dec\n2023, recorded at 30MIN time resolution. The lag was detected in 10MIN segments for each file, i.e., covariance\ncalculations for each 30MIN file yielded 3 time lags (6919 * 3 = 20757 time lags, the figure shows only 20373 because\nfor some files no time lag could be calculated, e.g. due to few records). A clear peak distribution just below `-200`\nindicates a range where lags were found consistently. Based on these results, the window size for the next iteration is\nset. Here, the window size for the next iteration was set to -485 (blue dashed line) and -5 (not visible because close\nto the lag zero line)._\n\n### Step 3: Repeat\n\nThe second iteration repeats the lag search process in Step 1 and the lag analysis in Step 2, but now using the refined,\nnarrower time window from the previous step. This process can be repeated multiple times, there is no limit for the\nnumber of iterations. However, it's important to monitor the size of the time window in each iteration to ensure it\nremains sufficiently large for accurate results.\n\n### Step 4: Collect found time lags across all iterations\n\nAcross all iterations, all time lags found for `S` are collected. Time lags found for a specific file can appear\nmultiple times in the collected results, depending on the number of iterations. This helps in identifying time lags that\nremain constant despite the continuously narrower time windows for lag search, indicating potentially high covariance\nbetween `W` and `S`.\n\n![Histogram](https://raw.githubusercontent.com/holukas/dyco/refs/heads/main/images/dyco_v2_fig_HISTOGRAM_segment_lag_times_iteration-3.png)\n**Figure 3**. _Histogram displaying the distribution of identified time lags after the third iteration within a narrowed\ntime window of [-482, -26] records. Minimal window shortening was needed in previous iterations as the initial range\nof [-500, 0] was well-suited. Note the number of found lag times: this number also includes lags from all previous\niterations._\n\n![Time series plot](https://raw.githubusercontent.com/holukas/dyco/refs/heads/main/images/dyco_v2_TIMESERIES-PLOT_segment_lag_times_FINAL.png)\n**Figure 4**. _Time series plot of all found time lags across all files and iterations. An accumulation of found time\nlags around lag -200 is clearly visible. The time lags are not constant but show a clear drift._\n\n### Step 5: Remove outlier lags\n\nAfter collecting all time lags across all iterations, `dyco` analyzes these results. It uses a Hampel filter to remove\noutliers, ensuring that only consistent and similar lags are retained.\n\n![Outlier removal](https://raw.githubusercontent.com/holukas/dyco/refs/heads/main/images/dyco_v2_TIMESERIES-PLOT_segment_lag_times_FINAL_outlierRemoved.png)\n**Figure 5**. _Application of a Hampel filter for outlier removal to retain consistent and similar lags. The lower left\npanel shows found time lags after outlier removal. These lags are used to create a look-up table._\n\n### Step 6: Create look-up table and remove lags from files\n\nThe outlier-filtered time lags are used to create a look-up table, providing time lag information for each day.\n\nThe generated look-up table is then used to adjust the input data files. For each file, the corresponding time lag from\nthe table is applied to shift one or more variables. While `S` is used for lag detection, the lag correction can be\napplied to `S` itself or to other variables of interest. This flexibility allows `dyco` to leverage a strong `S` signal\nfor lag detection even if `S` itself is not the primary target for lag correction.\n\n![Time series](https://raw.githubusercontent.com/holukas/dyco/refs/heads/main/images/dyco_v2_TIMESERIES-PLOT_segment_lag_times2_FINAL.png)\n**Figure 6**. _Time series of found time lags across all iterations and files. The 5-day median was calculated from\nfound high-quality time lags (when cross-covariance analyses yielded a clear covariance peak) after outlier removal and\nis used to shift each scalar of interest (e.g., CH4) in each data file by the respective number of records. The 5-day\nmedian is calculated at the daily scale, i.e., data files from a specific day are shifted by the same amount of records.\nAfter this lag compensation, the time lags between wind and scalar(s) is at or close to zero._\n\nResults from all steps are stored to output folders in a specified output directory.\n\n### Step 7: Use lag-compensated files for flux calculations\n\nAfter the lag was removed from the scalars of interest, the data files can be directly used for flux calculations.\n\n## Motivation\n\nThe lag detection between the turbulent departures of measured wind and the scalar of interest is a central step in the\ncalculation of eddy covariance (EC) ecosystem fluxes. In case the covariance maximization fails to detect a clear peak\nin the covariance function between the wind and the scalar, current flux calculation software can apply a constant\ndefault (nominal) time lag to the respective scalar. However, both the detection of clear covariance peaks in a\npre-defined time window and the definition of a reliable default time lag is challenging for compounds which are often\ncharacterized by low SNR (signal-to-noise ratio), such as N\u003csub\u003e2\u003c/sub\u003eO. In addition, the application of one static\ndefault time lag may produce inaccurate results in case systematic time shifts are present in the raw data.\n\n`dyco` is meant to assist current flux processing software in the calculation of fluxes for compounds with low SNR. In\nthe context of current flux processing schemes, the unique features offered as part of the `dyco` package include:\n\n- (i) the dynamic application of progressively smaller time windows during lag search for a *reference* compound (e.g.\n  turbulent departures of CO\u003csub\u003e2\u003c/sub\u003e, which often show a clear covariance peak with turbulent vertical wind),\n- (ii) the calculation of default time lags on a daily scale for the *reference* compound,\n- (iii) the application of daily default *reference* time lags to one or more *target* compounds (e.g., the lag found\n  for CO\u003csub\u003e2\u003c/sub\u003e is removed from the N\u003csub\u003e2\u003c/sub\u003eO and CH\u003csub\u003e4\u003c/sub\u003e signals)\n- (iv) the dynamic compensation of time lags across raw data files, and\n- (v) the automatic correction of systematic time shifts/drifts in *target* raw data time series, e.g. due to failed\n  synchronization of instrument clocks.\n\nAs `dyco` aims to complement current flux processing schemes, final lag-removed files are produced that can be directly\nused in current flux calculation software.\n\n## Scientific background\n\nIn ecosystem research, the EC method is widely used to quantify the biosphere-atmosphere exchange of greenhouse gases (\nGHGs) and energy (Aubinet et al., 2012; Baldocchi et al., 1988). The raw ecosystem flux (i.e. net exchange) is\ncalculated by the covariance between the turbulent vertical wind component measured by a sonic anemometer and the entity\nof interest, e.g. CO\u003csub\u003e2\u003c/sub\u003e, measured by a gas analyzer. Due to the application of two different instruments, wind\nand gas are not recorded at exactly the same time, resulting in a time lag between the two time series. For the\ncalculation of ecosystem fluxes this time delay has to be quantified and corrected for, otherwise fluxes are\nsystematically biased. Time lags for each averaging interval can be estimated by finding the maximum absolute covariance\nbetween the two turbulent time series at different time steps in a pre-defined time window of physically possible\ntime-lags  (e.g., McMillen, 1988; Moncrieff et al., 1997). Lag detection works well when processing fluxes for compounds\nwith high signal-to-noise ratio (SNR), which is typically the case for e.g. CO\u003csub\u003e2\u003c/sub\u003e. In contrast, for compounds\nwith low SNR (e.g., N\u003csub\u003e2\u003c/sub\u003eO, CH\u003csub\u003e4\u003c/sub\u003e) the cross-covariance function with the turbulent wind component\nyields noisier results and calculated fluxes are biased towards larger absolute flux values (Langford et al., 2015),\nwhich in turn renders the accurate calculation of yearly ecosystem GHG budgets more difficult and results may be\ninaccurate.\n\nOne suggestion to adequately calculate fluxes for compounds with low SNR is to first calculate the time lag for a\n*reference* compound with high SNR (e.g. CO\u003csub\u003e2\u003c/sub\u003e) and then apply the same time lag to the *target* compound of\ninterest (e.g. N\u003csub\u003e2\u003c/sub\u003eO), with both compounds being recorded by the same analyzer (Nemitz et al., 2018). `dyco`\nfollows up on this suggestion by facilitating the dynamic lag-detection between the turbulent wind data and a\n*reference* compound and the subsequent application of found *reference* time lags to one or more *target* compounds.\n\n## Installation\n\n`dyco` can be installed via pip:\n\n`pip install dyco`\n\n## Usage\n\nCurrently `dyco` needs input files where the vertical wind component and the scalars of interest were already rotated (\n2D wind rotation to obtain turbulent departures for wind and scalars). In the example below this rotation was done using\nthe class `FileSplitterMulti` from the Python library [diive](https://github.com/holukas/diive). This class can split\nlonger files into shorter files and rotate variables in the same step.\n\n### Code\n\nThe class `Dyco` can be used in code. See class docstring for more details.\n\n```python\nfrom dyco.dyco import Dyco\n\nDyco(var_reference=\"W_[R350-B]_TURB\",  # Turbulent departures of the vertical wind component from the sonic anemometer\n     var_lagged=\"CH4_DRY_[QCL-C2]_TURB\",  # Turbulent departures of the CH4 mixing ratio\n     var_target=[\"CH4_DRY_[QCL-C2]_TURB\", \"N2O_DRY_[QCL-C2]_TURB\"],\n     indir=r\"F:\\example\\input_files\",\n     outdir=r\"F:\\example\\output\",\n     filename_date_format=\"CH-DAS_%Y%m%d%H%M%S_30MIN-SPLIT_ROT_TRIM.csv\",\n     filename_pattern=\"CH-DAS_*_30MIN-SPLIT_ROT_TRIM.csv\",\n     files_how_many=None,\n     file_generation_res=\"30min\",\n     file_duration=\"30min\",\n     data_timestamp_format=\"%Y-%m-%d %H:%M:%S.%f\",\n     data_nominal_timeres=0.05,\n     lag_segment_dur=\"10min\",\n     lag_winsize=1000,\n     lag_n_iter=3,\n     lag_hist_remove_fringe_bins=True,\n     lag_hist_perc_thres=0.7,\n     target_lag=0,\n     del_previous_results=False)\n```\n\n### CLI\n\n`dyco` can be run from the command line interface (CLI).\n\n#### General CLI usage:\n\n```\nusage: dyco.py [-h] \n\nvar_reference     \n    Column name of the unlagged reference variable in the data files (one-row header). \n    Lags are determined in relation to this signal. \n\nvar_lagged\n    Column name of the lagged variable in the data files (one-row header).\n    The time lag of this signal is determined in relation to the reference signal var_reference. \n\nvar_target [var_target2, var_target3 ...]\n    Column name(s) of the target variable(s). Column names of the variables the lag that was \n    found between var_reference and var_lagged should be applied to. Example: var1 var2 var3\n\n[-i INDIR]\n    Path to the source folder that contains the data files, e.g. C:/dyco/input\n\n[-o OUTDIR]\n    Path to output folder, e.g. C:/bico/output\n\n[-fnd FILENAMEDATEFORMAT]\n    Filename date format as datetime format strings. Is used to parse the date and time info from\n    the filename of found files. The filename(s) of the files found in INDIR must contain \n    datetime information. Example for data files named like 20161015123000.csv: %%Y%%m%%d%%H%%M%%S\n\n[-fnp FILENAMEPATTERN]\n    Filename pattern for raw data file search, e.g. *.csv\n\n[-flim LIMITNUMFILES]\n    Defines how many of the found files should be used. Must be 0 or a positive integer. \n    If set to 0, all found files will be used.\n    \n[-fgr FILEGENRES]\n    File generation resolution. Example for data files that were generated every 30 minutes: 30min\n    \n[-fdur FILEDURATION]\n    Duration of one data file. Example for data files containing 30 minutes of data: 30min\n  \n[-dtf DATATIMESTAMPFORMAT]\n    Timestamp format for each row record in the data files. \n    Example for high-resolution timestamps like 2016-10-24 10:00:00.024999: %%Y-%%m-%%d %%H:%%M:%%S.%%f\n    \n[-dres DATANOMINALTIMERES]\n    Nominal (expected) time resolution of data records in the files, given as one record\n    every x seconds. Example for files recorded at 20Hz: 0.05\n\n[-lss LSSEGMENTDURATION]\n    Segment duration for lag determination. Can be the same as or shorter than FILEDURATION.\n    \n[-lsw LSWINSIZE]\n    Initial size of the time window in which the lag is searched given as number of records.\n\n[-lsi LSNUMITER]\n    Number of lag search iterations in Phase 1 and Phase 2. Must be larger than 0.\n\n[-lsf {0,1}]\n    Remove fringe bins in histogram of found lag times. Set to 1 if fringe bins should be removed.\n\n[-lsp LSPERCTHRES]\n    Cumulative percentage threshold in histogram of found lag times.\n\n[-lt TARGETLAG]\n    The target lag given in records to which lag times of all variables in var_target are normalized.\n\n[-del {0,1}]\n    If set to 1, delete all previous results in INDIR.\n \n```\n\n#### Example:\n\n```bash\npython dyco.py W_[R350-B]_TURB CH4_DRY_[QCL-C2]_TURB CH4_DRY_[QCL-C2]_TURB N2O_DRY_[QCL-C2]_TURB \n-i F:\\example\\input_files \n-o F:\\example\\output\n-fnd CH-DAS_%Y%m%d%H%M%S_30MIN-SPLIT_ROT_TRIM.csv\n-fnp CH-DAS_*_30MIN-SPLIT_ROT_TRIM.csv\n-flim 0\n-fgr 30min\n-fdur 30min\n-dtf \"%Y-%m-%d %H:%M:%S.%f\"\n-dres 0.05\n-lss 10min\n-lsw 1000\n-lsi 3\n-lsf 1\n-lsp 0.7\n-lt 0\n-del 0\n```\n\n## Real-world examples\n\nThe [ICOS](https://www.icos-cp.eu/) Class 1\nsite [Davos](https://www.swissfluxnet.ethz.ch/index.php/sites/ch-dav-davos/site-info-ch-dav/) (CH-Dav), a subalpine\nforest ecosystem station in the east of Switzerland, provides one of the longest continuous time series (24 years and\nrunning) of ecosystem fluxes globally. Since 2016, measurements of the strong GHG N\u003csub\u003e2\u003c/sub\u003eO are recorded by a\nclosed-path gas analyzer that also records CO\u003csub\u003e2\u003c/sub\u003e. To calculate fluxes using the EC method, wind data from the\nsonic anemometer is combined with instantaneous gas measurements from the gas analyzer. However, the air sampled by the\ngas analyzer needs a certain amount of time to travel from the tube inlet to the measurement cell in the analyzer and is\nthus lagged behind the wind signal. The lag between the two signals needs to be compensated for by detecting and then\nremoving the time lag at which the cross-covariance between the turbulent wind and the turbulent gas signal reaches the\nmaximum absolute value. This works generally well when using CO\u003csub\u003e2\u003c/sub\u003e (high SNR) but is challenging for N\u003csub\u003e\n2\u003c/sub\u003eO (low SNR). Using covariance maximization to search for the lag between wind and N\u003csub\u003e2\u003c/sub\u003eO mostly fails to\naccurately detect time lags between the two variables (noisy cross-correlation function), resulting in relatively noisy\nfluxes. However, since N\u003csub\u003e2\u003c/sub\u003eO has similar adsorption / desorption characteristics as CO\u003csub\u003e2\u003c/sub\u003e it is valid\nto assume that both compounds need approx. the same time to travel through the tube to the analyzer, i.e. the time lag\nfor both compounds in relation to the wind is similar. Therefore, `dyco` can be applied (i) to calculate time lags\nacross files for CO\u003csub\u003e2\u003c/sub\u003e (*reference* compound), and then (ii) to remove found CO\u003csub\u003e2\u003c/sub\u003e time delays from\nthe N\u003csub\u003e2\u003c/sub\u003eO signal (*target* compound). The lag-compensated files produced by `dyco` can then be used to\ncalculate N\u003csub\u003e2\u003c/sub\u003eO fluxes. Since `dyco` normalizes time lags across files and compensates the N\u003csub\u003e2\u003c/sub\u003eO\nsignal for CO\u003csub\u003e2\u003c/sub\u003e lags, the *true* lag between wind and N\u003csub\u003e2\u003c/sub\u003eO can be found close to zero, which in turn\nfacilitates the application of a small time window or a constant time lag during flux calculations.\n\nAnother application example are managed grasslands where the biosphere-atmosphere exchange of N\u003csub\u003e2\u003c/sub\u003eO is often\ncharacterized by sporadic high-emission events (e.g., Hörtnagl et al., 2018; Merbold et al., 2014). While high N\u003csub\u003e\n2\u003c/sub\u003eO quantities can be emitted during and after management events such as fertilizer application and ploughing,\nfluxes in between those events typically remain low and often below the limit-of-detection of the applied analyzer. In\nthis case, calculating N\u003csub\u003e2\u003c/sub\u003eO fluxes works well during the high-emission periods (high SNR) but is challenging\nduring the rest of the year (low SNR). Here, `dyco` can be used to first calculate time lags for a *reference* gas\nmeasured in the same analyzer (e.g. CO\u003csub\u003e2\u003c/sub\u003e, CO, CH\u003csub\u003e4\u003c/sub\u003e)  and then remove *reference* time lags from the\nN\u003csub\u003e2\u003c/sub\u003eO data.\n\n## Contributing\n\nAll contributions in the form of code, bug reports, comments or general feedback are always welcome and greatly\nappreciated! Credit will always be given.\n\n- **Pull requests**: If you added new functionality or made the `dyco` code run faster (always welcome), please create a\n  fork in GitHub, make the contribution public in your repo and then issue\n  a [pull request](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request-from-a-fork).\n  Please include tests in your pull requests.\n- **Issues**:  If you experience any issue, please use the [issue tracker](https://github.com/holukas/dyco/issues) to\n  submit it as an issue ticket with the label 'bug'. Please also include a minimal code example that produces the issue.\n- **Feature request**:  If there is a feature that you would like to see in a later version, please use\n  the [issue tracker](https://github.com/holukas/dyco/issues) to submit it as an issue ticket with the label 'feature\n  request'.\n- **Contact details**: For direct questions or enquiries the maintainer of this repository can be contacted directly by\n  writing an email with the title \"dyco\" to: holukas@ethz.ch\n\n## Acknowledgements\n\nThis work was supported by the Swiss National Science Foundation SNF (ICOS CH, grant nos. 20FI21_148992, 20FI20_173691)\nand the EU project Readiness of ICOS for Necessities of integrated Global Observations RINGO (grant no. 730944).\n\n## Notes\n\nA previous version of `dyco` was used in a publication in JOSS.\n[![DOI](status.svg)](https://doi.org/10.21105/joss.02575) [![DOI](https://zenodo.org/badge/311300577.svg)](https://zenodo.org/badge/latestdoi/311300577)\n\n## References\n\nAubinet, M., Vesala, T., Papale, D. (Eds.), 2012. Eddy Covariance: A Practical Guide to Measurement and Data Analysis.\nSpringer Netherlands, Dordrecht. https://doi.org/10.1007/978-94-007-2351-1\n\nBaldocchi, D.D., Hincks, B.B., Meyers, T.P., 1988. Measuring Biosphere-Atmosphere Exchanges of Biologically Related\nGases with Micrometeorological Methods. Ecology 69, 1331–1340. https://doi.org/10.2307/1941631\n\nHörtnagl, L., Barthel, M., Buchmann, N., Eugster, W., Butterbach-Bahl, K., Díaz-Pinés, E., Zeeman, M., Klumpp, K.,\nKiese, R., Bahn, M., Hammerle, A., Lu, H., Ladreiter-Knauss, T., Burri, S., Merbold, L., 2018. Greenhouse gas fluxes\nover managed grasslands in Central Europe. Glob. Change Biol. 24, 1843–1872. https://doi.org/10.1111/gcb.14079\n\nLangford, B., Acton, W., Ammann, C., Valach, A., Nemitz, E., 2015. Eddy-covariance data with low signal-to-noise ratio:\ntime-lag determination, uncertainties and limit of detection. Atmospheric Meas. Tech. 8,\n4197–4213. https://doi.org/10.5194/amt-8-4197-2015\n\nMcMillen, R.T., 1988. An eddy correlation technique with extended applicability to non-simple terrain. Bound.-Layer\nMeteorol. 43, 231–245. https://doi.org/10.1007/BF00128405\n\nMerbold, L., Eugster, W., Stieger, J., Zahniser, M., Nelson, D., Buchmann, N., 2014. Greenhouse gas budget (CO\u003csub\u003e\n2\u003c/sub\u003e , CH\u003csub\u003e4\u003c/sub\u003e and N\u003csub\u003e2\u003c/sub\u003eO) of intensively managed grassland following restoration. Glob. Change Biol.\n20, 1913–1928. https://doi.org/10.1111/gcb.12518\n\nMoncrieff, J.B., Massheder, J.M., de Bruin, H., Elbers, J., Friborg, T., Heusinkveld, B., Kabat, P., Scott, S.,\nSoegaard, H., Verhoef, A., 1997. A system to measure surface fluxes of momentum, sensible heat, water vapour and carbon\ndioxide. J. Hydrol. 188–189, 589–611. https://doi.org/10.1016/S0022-1694(96)03194-0\n\nNemitz, E., Mammarella, I., Ibrom, A., Aurela, M., Burba, G.G., Dengel, S., Gielen, B., Grelle, A., Heinesch, B.,\nHerbst, M., Hörtnagl, L., Klemedtsson, L., Lindroth, A., Lohila, A., McDermitt, D.K., Meier, P., Merbold, L., Nelson,\nD., Nicolini, G., Nilsson, M.B., Peltola, O., Rinne, J., Zahniser, M., 2018. Standardisation of eddy-covariance flux\nmeasurements of methane and nitrous oxide. Int. Agrophysics 32, 517–549. https://doi.org/10.1515/intag-2017-0042\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fholukas%2Fdyco","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fholukas%2Fdyco","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fholukas%2Fdyco/lists"}