From f13cf106aa970c7b8c12b5d969037b7a85bf10e5 Mon Sep 17 00:00:00 2001 From: Benjamin Thomas Schwertfeger Date: Thu, 14 Mar 2024 19:44:59 +0100 Subject: [PATCH 1/8] update documentation --- README.md | 46 ++++++++++++++++++++------ cmethods/core.py | 4 +-- cmethods/distribution.py | 6 ++-- cmethods/scaling.py | 6 ++-- doc/{src => }/cmethods.rst | 0 doc/{src => }/getting_started.rst | 0 doc/index.rst | 14 ++++---- doc/{src => }/introduction.rst | 54 ++++++++++++++++++++----------- doc/{src => }/issues.rst | 0 doc/{src => }/license.rst | 0 doc/links.rst | 3 ++ doc/{src => }/methods.rst | 8 +++++ 12 files changed, 96 insertions(+), 45 deletions(-) rename doc/{src => }/cmethods.rst (100%) rename doc/{src => }/getting_started.rst (100%) rename doc/{src => }/introduction.rst (66%) rename doc/{src => }/issues.rst (100%) rename doc/{src => }/license.rst (100%) rename doc/{src => }/methods.rst (99%) diff --git a/README.md b/README.md index df83a7f..470c1ca 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,7 @@ [![CI/CD](https://github.com/btschwertfeger/python-cmethods/actions/workflows/cicd.yaml/badge.svg?branch=master)](https://github.com/btschwertfeger/python-cmethods/actions/workflows/cicd.yaml) [![codecov](https://codecov.io/github/btschwertfeger/python-cmethods/branch/master/graph/badge.svg?token=OSO4PAABPD)](https://codecov.io/github/btschwertfeger/python-cmethods) +[![OpenSSF Best Practices](https://www.bestpractices.dev/projects/8666/badge)](https://www.bestpractices.dev/projects/8666) ![release](https://shields.io/github/release-date/btschwertfeger/python-cmethods) ![release](https://shields.io/github/v/release/btschwertfeger/python-cmethods?display_name=tag) @@ -47,10 +48,18 @@ https://zenodo.org/doi/10.5281/zenodo.7652755. ## 1. About -These programs and data structures are developed with the aim of reducing -discrepancies between modeled and observed climate data. Historical data is -utilized to calibrate variables from current and future time series to achieve -distributional properties that closely resemble the possible actual values. +Welcome to `python-cmethods`\_, a powerful Python package designed for bias +correction and adjustment of climate data. Built with a focus on ease of use and +efficiency, python-cmethods offers a comprehensive suite of functions tailored +for applying bias correction methods to climate model simulations and +observational datasets. + +Bias correction in climate research involves the adjustment of systematic errors +or biases present in climate model simulations or observational datasets to +improve their accuracy and reliability, ensuring that the data better represents +actual climate conditions. This process typically involves statistical methods +or empirical relationships to correct for biases caused by factors such as +instrument calibration, spatial resolution, or model deficiencies.
Figure 1: Schematic representation of a bias adjustment procedure
-For instance, modeled data typically indicate values that are colder than the -actual values. To address this issue, an adjustment procedure is employed. The -figure below illustrates the observed, modeled, and adjusted values, revealing -that the delta adjusted time series ($T^{*DM}_{sim,p}$) are significantly more -similar to the observed data ($T{obs,p}$) than the raw modeled data -($T_{sim,p}$). +python-cmethods empowers scientists to effectively address those biases in +climate data, ensuring greater accuracy and reliability in research and +decision-making processes. By leveraging cutting-edge techniques and seamless +integration with popular libraries like `xarray`_ and `Dask`_, this package +simplifies the process of bias adjustment, even when dealing with large-scale +climate simulations and extensive spatial domains. + +In this way, for example, modeled data, which on average represent values that +are too cold, can be easily bias-corrected by applying any adjustment procedure +included in this package. + +For instance, modeled data can report values that are way colder than the those +data reported by reanalysis time-series. To address this issue, an adjustment +procedure can be employed. The figure below illustrates the observed, modeled, +and adjusted values, revealing that the delta-adjusted time series +($T^{*DM}_{sim,p}$) is significantly more similar to the observational data +($T{obs,p}$) than the raw model output ($T_{sim,p}$).
Figure 2: Temperature per day of year in observed, modeled, and bias-adjusted climate data
+The mathematical foundations supporting each bias correction technique +implemented in python-cmethods are integral to the package, ensuring +transparency and reproducibility in the correction process. Each method is +accompanied by references to trusted publications, reinforcing the reliability +and rigor of the corrections applied. + ## 2. Available Methods diff --git a/cmethods/core.py b/cmethods/core.py index f76c929..936c6b1 100644 --- a/cmethods/core.py +++ b/cmethods/core.py @@ -107,14 +107,14 @@ def adjust( data sets. For more information please refer to the method specific requirements and execution examples. - See https://python-cmethods.readthedocs.io/en/latest/src/methods.html + See https://python-cmethods.readthedocs.io/en/latest/methods.html The time dimension of ``obs``, ``simh`` and ``simp`` must be named ``time``. If the sizes of time dimensions of the input data sets differ, you have to pass the hidden ``input_core_dims`` parameter, see - https://python-cmethods.readthedocs.io/en/latest/src/getting_started.html#advanced-usage + https://python-cmethods.readthedocs.io/en/latest/getting_started.html#advanced-usage for more information. :param method: Technique to apply diff --git a/cmethods/distribution.py b/cmethods/distribution.py index cc54c1a..386cfd1 100644 --- a/cmethods/distribution.py +++ b/cmethods/distribution.py @@ -38,7 +38,7 @@ def quantile_mapping( ) -> np.ndarray: r""" **Do not call this function directly, please use :func:`cmethods.adjust`** - See https://python-cmethods.readthedocs.io/en/latest/src/methods.html#quantile-mapping + See https://python-cmethods.readthedocs.io/en/latest/methods.html#quantile-mapping """ check_adjust_called( function_name="quantile_mapping", @@ -99,7 +99,7 @@ def detrended_quantile_mapping( **kwargs: Any, ) -> NPData: r""" - See https://python-cmethods.readthedocs.io/en/latest/src/methods.html#detrended_quantile_mapping + See https://python-cmethods.readthedocs.io/en/latest/methods.html#detrended_quantile_mapping This function can only be applied to 1-dimensional data. """ @@ -217,7 +217,7 @@ def quantile_delta_mapping( r""" **Do not call this function directly, please use :func:`cmethods.adjust`** - See https://python-cmethods.readthedocs.io/en/latest/src/methods.html#quantile-delta-mapping + See https://python-cmethods.readthedocs.io/en/latest/methods.html#quantile-delta-mapping """ check_adjust_called( function_name="quantile_delta_mapping", diff --git a/cmethods/scaling.py b/cmethods/scaling.py index c876b93..d80e78e 100644 --- a/cmethods/scaling.py +++ b/cmethods/scaling.py @@ -39,7 +39,7 @@ def linear_scaling( r""" **Do not call this function directly, please use :func:`cmethods.adjust`** - See https://python-cmethods.readthedocs.io/en/latest/src/methods.html#linear-scaling + See https://python-cmethods.readthedocs.io/en/latest/methods.html#linear-scaling """ check_adjust_called( function_name="linear_scaling", @@ -81,7 +81,7 @@ def variance_scaling( r""" **Do not call this function directly, please use :func:`cmethods.CMethods.adjust`** - See https://python-cmethods.readthedocs.io/en/latest/src/methods.html#variance-scaling + See https://python-cmethods.readthedocs.io/en/latest/methods.html#variance-scaling """ check_adjust_called( function_name="variance_scaling", @@ -126,7 +126,7 @@ def delta_method( ) -> NPData: r""" **Do not call this function directly, please use :func:`cmethods.adjust`** - See https://python-cmethods.readthedocs.io/en/latest/src/methods.html#delta-method + See https://python-cmethods.readthedocs.io/en/latest/methods.html#delta-method """ check_adjust_called( function_name="delta_method", diff --git a/doc/src/cmethods.rst b/doc/cmethods.rst similarity index 100% rename from doc/src/cmethods.rst rename to doc/cmethods.rst diff --git a/doc/src/getting_started.rst b/doc/getting_started.rst similarity index 100% rename from doc/src/getting_started.rst rename to doc/getting_started.rst diff --git a/doc/index.rst b/doc/index.rst index 56a3687..7011b83 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -1,7 +1,5 @@ .. python-cmethods documentation master file, created by sphinx-quickstart on Mon Apr 10 10:04:20 2023. - You can adapt this file completely to your liking, but it should at least - contain the root ``toctree`` directive. Welcome to python-cmethods's documentation! =========================================== @@ -10,9 +8,9 @@ Welcome to python-cmethods's documentation! :maxdepth: 2 :caption: Contents: - src/introduction.rst - src/getting_started.rst - src/cmethods.rst - src/methods.rst - src/issues.rst - src/license.rst + introduction.rst + getting_started.rst + cmethods.rst + methods.rst + issues.rst + license.rst diff --git a/doc/src/introduction.rst b/doc/introduction.rst similarity index 66% rename from doc/src/introduction.rst rename to doc/introduction.rst index 42ee927..8abc8d7 100644 --- a/doc/src/introduction.rst +++ b/doc/introduction.rst @@ -1,7 +1,7 @@ .. This is the introduction -Introduction -============= +python-cmethods +=============== |GitHub badge| |License badge| |PyVersions badge| |Downloads badge| |CI/CD badge| |codecov badge| @@ -10,11 +10,18 @@ Introduction About ----- -This Python module and the provided data structures are designed to help -minimize discrepancies between modeled and observed climate data of different -time periods. Data from past periods are used to adjust variables from current -and future time series so that their distributional properties approximate -possible actual values. +Welcome to `python-cmethods`_, a powerful Python package designed for bias +correction and adjustment of climate data. Built with a focus on ease of use and +efficiency, python-cmethods offers a comprehensive suite of functions tailored +for applying bias correction methods to climate model simulations and +observational datasets. + +Bias correction in climate research involves the adjustment of systematic errors +or biases present in climate model simulations or observational datasets to +improve their accuracy and reliability, ensuring that the data better represents +actual climate conditions. This process typically involves statistical methods +or empirical relationships to correct for biases caused by factors such as +instrument calibration, spatial resolution, or model deficiencies. .. figure:: ../_static/images/biasCdiagram.png :width: 600 @@ -23,13 +30,16 @@ possible actual values. Fig 1: Schematic representation of a bias adjustment procedure - In this way, for example, modeled data, which on average represent values that -are too cold, can be bias-corrected by applying an adjustment procedure. The -following figure shows the observed, the modeled, and the bias-corrected values. -It is directly visible that the delta adjusted time series -(:math:`T^{*DM}_{sim,p}`) are much more similar to the observed data -(:math:`T_{obs,p}`) than the raw modeled data (:math:`T_{sim,p}`). +are too cold, can be easily bias-corrected by applying any adjustment procedure +included in this package. + +For instance, modeled data can report values that are way colder than the those +data reported by reanalysis time-series. To address this issue, an adjustment +procedure can be employed. The figure below illustrates the observed, modeled, +and adjusted values, revealing that the delta-adjusted time series +(:math:`T^{*DM}_{sim,p}`) is significantly more similar to the observational +data (:math:`T_{obs,p}`) than the raw model output (:math:`T_{sim,p}`). .. figure:: ../_static/images/dm-doy-plot.png :width: 600 @@ -38,18 +48,24 @@ It is directly visible that the delta adjusted time series Fig 2: Temperature per day of year in modeled, observed and bias-adjusted climate data +The mathematical foundations supporting each bias correction technique +implemented in python-cmethods are integral to the package, ensuring +transparency and reproducibility in the correction process. Each method is +accompanied by references to trusted publications, reinforcing the reliability +and rigor of the corrections applied. + Available Methods ----------------- python-cmethods provides the following bias correction techniques: -- Linear Scaling -- Variance Scaling -- Delta Method -- Quantile Mapping -- Detrended Quantile Mapping -- Quantile Delta Mapping +- :ref:`Linear Scaling` +- :ref:`Variance Scaling` +- :ref:`Delta Method` +- :ref:`Quantile Mapping` +- :ref:`Detrended Quantile Mapping` +- :ref:`Quantile Delta Mapping` Please refer to the official documentation for more information about these methods as well as sample scripts: diff --git a/doc/src/issues.rst b/doc/issues.rst similarity index 100% rename from doc/src/issues.rst rename to doc/issues.rst diff --git a/doc/src/license.rst b/doc/license.rst similarity index 100% rename from doc/src/license.rst rename to doc/license.rst diff --git a/doc/links.rst b/doc/links.rst index a06fa68..4372cc4 100644 --- a/doc/links.rst +++ b/doc/links.rst @@ -12,6 +12,9 @@ .. _xclim: https://zenodo.org/record/7535677 +.. _xarray: https://xarray.dev/ +.. _dask: https://docs.dask.org/en/stable/ + .. BADGES diff --git a/doc/src/methods.rst b/doc/methods.rst similarity index 99% rename from doc/src/methods.rst rename to doc/methods.rst index a36ecf5..b7738d6 100644 --- a/doc/src/methods.rst +++ b/doc/methods.rst @@ -6,6 +6,8 @@ Please note that the formulas are meant to be applied to a single time series. The python-cmethods package can apply these formulas to single and multidimensional data. +.. _linear-scaling: + Linear Scaling -------------- @@ -70,6 +72,7 @@ for both additive and multiplicative Linear Scaling are shown: ... group="time.month" # this is important! ... ) +.. _variance-scaling: Variance Scaling ---------------- @@ -144,6 +147,7 @@ enables the adjustment of the standard deviation in the following step. ... group="time.month" # this is important! ... ) +.. _delta-method: Delta Method ------------ @@ -213,6 +217,7 @@ for both additive and multiplicative Delta Method are shown: ... group="time.month" # this is important! ... ) +.. _quantile-mapping: Quantile Mapping ---------------- @@ -295,6 +300,7 @@ In the following the equations of Alex J. Cannon (2015) are shown and explained: ... kind="+", ... ) +.. _detrended-quantile-mapping: Detrended Quantile Mapping -------------------------- @@ -362,6 +368,8 @@ shift of :math:`X_{sim,p}(i)`: ... ) +.. _quantile-delta-mapping: + Quantile Delta Mapping ----------------------- From c62d91679be0170607e1ec9543a1e6a3352c795e Mon Sep 17 00:00:00 2001 From: Benjamin Thomas Schwertfeger Date: Thu, 14 Mar 2024 20:16:19 +0100 Subject: [PATCH 2/8] add token permissions --- .github/dependabot.yaml | 10 ++++++++++ .github/workflows/_build.yaml | 2 ++ .github/workflows/_build_doc.yaml | 2 ++ .github/workflows/_codecov.yaml | 2 ++ .github/workflows/_codeql.yaml | 2 ++ .github/workflows/_pre_commit.yaml | 2 ++ .github/workflows/_pypi_publish.yaml | 2 ++ .github/workflows/_test.yaml | 2 ++ .github/workflows/cicd.yaml | 2 ++ README.md | 4 +--- 10 files changed, 27 insertions(+), 3 deletions(-) create mode 100644 .github/dependabot.yaml diff --git a/.github/dependabot.yaml b/.github/dependabot.yaml new file mode 100644 index 0000000..cbd920f --- /dev/null +++ b/.github/dependabot.yaml @@ -0,0 +1,10 @@ +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" + - package-ecosystem: "pip" + directory: "/" + schedule: + interval: "weekly" diff --git a/.github/workflows/_build.yaml b/.github/workflows/_build.yaml index d7c3b46..829730e 100644 --- a/.github/workflows/_build.yaml +++ b/.github/workflows/_build.yaml @@ -8,6 +8,8 @@ name: Build +permissions: read-all + on: workflow_call: inputs: diff --git a/.github/workflows/_build_doc.yaml b/.github/workflows/_build_doc.yaml index 8313c3d..dd6d2b1 100644 --- a/.github/workflows/_build_doc.yaml +++ b/.github/workflows/_build_doc.yaml @@ -7,6 +7,8 @@ name: Build Doc +permissions: read-all + on: workflow_call: inputs: diff --git a/.github/workflows/_codecov.yaml b/.github/workflows/_codecov.yaml index a3548c8..f57f7cd 100644 --- a/.github/workflows/_codecov.yaml +++ b/.github/workflows/_codecov.yaml @@ -8,6 +8,8 @@ name: CodeCov +permissions: read-all + on: workflow_call: inputs: diff --git a/.github/workflows/_codeql.yaml b/.github/workflows/_codeql.yaml index 449f073..bfa8338 100644 --- a/.github/workflows/_codeql.yaml +++ b/.github/workflows/_codeql.yaml @@ -12,6 +12,8 @@ name: CodeQL +permissions: read-all + on: workflow_call: diff --git a/.github/workflows/_pre_commit.yaml b/.github/workflows/_pre_commit.yaml index 2c8a4f8..97aa089 100644 --- a/.github/workflows/_pre_commit.yaml +++ b/.github/workflows/_pre_commit.yaml @@ -7,6 +7,8 @@ name: Pre-Commit +permissions: read-all + on: workflow_call: diff --git a/.github/workflows/_pypi_publish.yaml b/.github/workflows/_pypi_publish.yaml index 96d0de6..5d03139 100644 --- a/.github/workflows/_pypi_publish.yaml +++ b/.github/workflows/_pypi_publish.yaml @@ -9,6 +9,8 @@ name: PyPI Publish +permissions: read-all + on: workflow_call: inputs: diff --git a/.github/workflows/_test.yaml b/.github/workflows/_test.yaml index cd7fe65..a05412d 100644 --- a/.github/workflows/_test.yaml +++ b/.github/workflows/_test.yaml @@ -7,6 +7,8 @@ name: Test Spot +permissions: read-all + on: workflow_call: inputs: diff --git a/.github/workflows/cicd.yaml b/.github/workflows/cicd.yaml index aa11d7b..6519804 100644 --- a/.github/workflows/cicd.yaml +++ b/.github/workflows/cicd.yaml @@ -7,6 +7,8 @@ name: CI/CD +permissions: read-all + on: push: branches: diff --git a/README.md b/README.md index 470c1ca..97bb144 100644 --- a/README.md +++ b/README.md @@ -18,11 +18,9 @@ -This Python module serves as a collection of different scale- and +This Python module serves as collection of different scale- and distribution-based bias correction techniques for climate sciences. -The documentation is available at: [https://python-cmethods.readthedocs.io/en/stable/](https://python-cmethods.readthedocs.io/en/stable/) - Please cite this project as described in https://zenodo.org/doi/10.5281/zenodo.7652755. From 695d4f5e19d850482673f1981d7511c280e9cb88 Mon Sep 17 00:00:00 2001 From: Benjamin Thomas Schwertfeger Date: Thu, 14 Mar 2024 20:25:41 +0100 Subject: [PATCH 3/8] adjust permissions --- .github/workflows/_build.yaml | 3 ++- .github/workflows/_build_doc.yaml | 3 ++- .github/workflows/_codecov.yaml | 3 ++- .github/workflows/_codeql.yaml | 2 -- .github/workflows/_pre_commit.yaml | 3 ++- .github/workflows/_pypi_publish.yaml | 3 ++- .github/workflows/_test.yaml | 3 ++- .github/workflows/cicd.yaml | 2 -- 8 files changed, 12 insertions(+), 10 deletions(-) diff --git a/.github/workflows/_build.yaml b/.github/workflows/_build.yaml index 829730e..7ba4a60 100644 --- a/.github/workflows/_build.yaml +++ b/.github/workflows/_build.yaml @@ -8,7 +8,8 @@ name: Build -permissions: read-all +permissions: + contents: read on: workflow_call: diff --git a/.github/workflows/_build_doc.yaml b/.github/workflows/_build_doc.yaml index dd6d2b1..6b95fcb 100644 --- a/.github/workflows/_build_doc.yaml +++ b/.github/workflows/_build_doc.yaml @@ -7,7 +7,8 @@ name: Build Doc -permissions: read-all +permissions: + contents: read on: workflow_call: diff --git a/.github/workflows/_codecov.yaml b/.github/workflows/_codecov.yaml index f57f7cd..bbaf684 100644 --- a/.github/workflows/_codecov.yaml +++ b/.github/workflows/_codecov.yaml @@ -8,7 +8,8 @@ name: CodeCov -permissions: read-all +permissions: + contents: read on: workflow_call: diff --git a/.github/workflows/_codeql.yaml b/.github/workflows/_codeql.yaml index bfa8338..449f073 100644 --- a/.github/workflows/_codeql.yaml +++ b/.github/workflows/_codeql.yaml @@ -12,8 +12,6 @@ name: CodeQL -permissions: read-all - on: workflow_call: diff --git a/.github/workflows/_pre_commit.yaml b/.github/workflows/_pre_commit.yaml index 97aa089..a054100 100644 --- a/.github/workflows/_pre_commit.yaml +++ b/.github/workflows/_pre_commit.yaml @@ -7,7 +7,8 @@ name: Pre-Commit -permissions: read-all +permissions: + contents: read on: workflow_call: diff --git a/.github/workflows/_pypi_publish.yaml b/.github/workflows/_pypi_publish.yaml index 5d03139..fb9a99e 100644 --- a/.github/workflows/_pypi_publish.yaml +++ b/.github/workflows/_pypi_publish.yaml @@ -9,7 +9,8 @@ name: PyPI Publish -permissions: read-all +permissions: + contents: read on: workflow_call: diff --git a/.github/workflows/_test.yaml b/.github/workflows/_test.yaml index a05412d..f29adfd 100644 --- a/.github/workflows/_test.yaml +++ b/.github/workflows/_test.yaml @@ -7,7 +7,8 @@ name: Test Spot -permissions: read-all +permissions: + contents: read on: workflow_call: diff --git a/.github/workflows/cicd.yaml b/.github/workflows/cicd.yaml index 6519804..aa11d7b 100644 --- a/.github/workflows/cicd.yaml +++ b/.github/workflows/cicd.yaml @@ -7,8 +7,6 @@ name: CI/CD -permissions: read-all - on: push: branches: From 99fdb53e503ba30b97c8317e7b28890bbc65cce1 Mon Sep 17 00:00:00 2001 From: Benjamin Thomas Schwertfeger Date: Thu, 14 Mar 2024 20:35:24 +0100 Subject: [PATCH 4/8] use commit hash as version --- .github/workflows/_build.yaml | 4 ++-- .github/workflows/_build_doc.yaml | 4 ++-- .github/workflows/_codecov.yaml | 4 ++-- .github/workflows/_codeql.yaml | 2 +- .github/workflows/_pre_commit.yaml | 2 +- .github/workflows/_pypi_publish.yaml | 4 ++-- .github/workflows/_test.yaml | 4 ++-- Makefile | 4 ++++ 8 files changed, 16 insertions(+), 12 deletions(-) diff --git a/.github/workflows/_build.yaml b/.github/workflows/_build.yaml index 7ba4a60..32e0598 100644 --- a/.github/workflows/_build.yaml +++ b/.github/workflows/_build.yaml @@ -26,10 +26,10 @@ jobs: runs-on: ${{ inputs.os }} steps: - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@1e31de5234b9f8995739874a8ce0492dc87873e2 # v4.0.0 - name: Set up Python ${{ inputs.python-version }} - uses: actions/setup-python@v5 + uses: actions/checkout@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0 with: python-version: ${{ inputs.python-version }} diff --git a/.github/workflows/_build_doc.yaml b/.github/workflows/_build_doc.yaml index 6b95fcb..c127344 100644 --- a/.github/workflows/_build_doc.yaml +++ b/.github/workflows/_build_doc.yaml @@ -25,10 +25,10 @@ jobs: runs-on: ${{ inputs.os }} steps: - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@1e31de5234b9f8995739874a8ce0492dc87873e2 # v4.0.0 - name: Set up Python ${{ inputs.python-version }} - uses: actions/setup-python@v5 + uses: actions/checkout@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0 with: python-version: ${{ inputs.python-version }} diff --git a/.github/workflows/_codecov.yaml b/.github/workflows/_codecov.yaml index bbaf684..e43d8c6 100644 --- a/.github/workflows/_codecov.yaml +++ b/.github/workflows/_codecov.yaml @@ -35,10 +35,10 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@1e31de5234b9f8995739874a8ce0492dc87873e2 # v4.0.0 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 + uses: actions/checkout@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0 with: python-version: ${{ inputs.python-version }} diff --git a/.github/workflows/_codeql.yaml b/.github/workflows/_codeql.yaml index 449f073..57b0585 100644 --- a/.github/workflows/_codeql.yaml +++ b/.github/workflows/_codeql.yaml @@ -33,7 +33,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@1e31de5234b9f8995739874a8ce0492dc87873e2 # v4.0.0 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL diff --git a/.github/workflows/_pre_commit.yaml b/.github/workflows/_pre_commit.yaml index a054100..ed4d5ff 100644 --- a/.github/workflows/_pre_commit.yaml +++ b/.github/workflows/_pre_commit.yaml @@ -18,5 +18,5 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@1e31de5234b9f8995739874a8ce0492dc87873e2 # v4.0.0 - uses: pre-commit/action@v3.0.0 diff --git a/.github/workflows/_pypi_publish.yaml b/.github/workflows/_pypi_publish.yaml index fb9a99e..8cd19a0 100644 --- a/.github/workflows/_pypi_publish.yaml +++ b/.github/workflows/_pypi_publish.yaml @@ -31,12 +31,12 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@1e31de5234b9f8995739874a8ce0492dc87873e2 # v4.0.0 with: fetch-depth: 0 # IMPORTANT: otherwise the current tag does not get fetched and the build version gets worse - name: Set up Python 3.11 - uses: actions/setup-python@v5 + uses: actions/checkout@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0 with: python-version: 3.11 diff --git a/.github/workflows/_test.yaml b/.github/workflows/_test.yaml index f29adfd..2f42518 100644 --- a/.github/workflows/_test.yaml +++ b/.github/workflows/_test.yaml @@ -26,10 +26,10 @@ jobs: runs-on: ${{ inputs.os }} steps: - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@1e31de5234b9f8995739874a8ce0492dc87873e2 # v4.0.0 - name: Set up Python ${{ inputs.python-version }} - uses: actions/setup-python@v5 + uses: actions/checkout@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0 with: python-version: ${{ inputs.python-version }} diff --git a/Makefile b/Makefile index be02861..390997b 100644 --- a/Makefile +++ b/Makefile @@ -104,3 +104,7 @@ clean: find tests -name "__pycache__" | xargs rm -rf find cmethods -name "__pycache__" | xargs rm -rf find examples -name "__pycache__" | xargs rm -rf + + +# for file in `ls .github/workflows`; do sed -i '' 's/actions\/checkout@v4/actions\/checkout@1e31de5234b9f8995739874a8ce0492dc87873e2 # v4.0.0/g' .github/workflows/$file; done +# for file in `ls .github/workflows`; do sed -i '' 's/actions\/setup-python@v5/actions\/checkout@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0/g' .github/workflows/$file; done From ecfca7edf40559cbd60e057f3f415256571d3eed Mon Sep 17 00:00:00 2001 From: Benjamin Thomas Schwertfeger Date: Thu, 14 Mar 2024 21:05:59 +0100 Subject: [PATCH 5/8] Revert "use commit hash as version" This reverts commit 99fdb53e503ba30b97c8317e7b28890bbc65cce1. --- .github/workflows/_build.yaml | 4 ++-- .github/workflows/_build_doc.yaml | 4 ++-- .github/workflows/_codecov.yaml | 4 ++-- .github/workflows/_codeql.yaml | 2 +- .github/workflows/_pre_commit.yaml | 2 +- .github/workflows/_pypi_publish.yaml | 4 ++-- .github/workflows/_test.yaml | 4 ++-- Makefile | 4 ---- 8 files changed, 12 insertions(+), 16 deletions(-) diff --git a/.github/workflows/_build.yaml b/.github/workflows/_build.yaml index 32e0598..7ba4a60 100644 --- a/.github/workflows/_build.yaml +++ b/.github/workflows/_build.yaml @@ -26,10 +26,10 @@ jobs: runs-on: ${{ inputs.os }} steps: - name: Checkout repository - uses: actions/checkout@1e31de5234b9f8995739874a8ce0492dc87873e2 # v4.0.0 + uses: actions/checkout@v4 - name: Set up Python ${{ inputs.python-version }} - uses: actions/checkout@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0 + uses: actions/setup-python@v5 with: python-version: ${{ inputs.python-version }} diff --git a/.github/workflows/_build_doc.yaml b/.github/workflows/_build_doc.yaml index c127344..6b95fcb 100644 --- a/.github/workflows/_build_doc.yaml +++ b/.github/workflows/_build_doc.yaml @@ -25,10 +25,10 @@ jobs: runs-on: ${{ inputs.os }} steps: - name: Checkout repository - uses: actions/checkout@1e31de5234b9f8995739874a8ce0492dc87873e2 # v4.0.0 + uses: actions/checkout@v4 - name: Set up Python ${{ inputs.python-version }} - uses: actions/checkout@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0 + uses: actions/setup-python@v5 with: python-version: ${{ inputs.python-version }} diff --git a/.github/workflows/_codecov.yaml b/.github/workflows/_codecov.yaml index e43d8c6..bbaf684 100644 --- a/.github/workflows/_codecov.yaml +++ b/.github/workflows/_codecov.yaml @@ -35,10 +35,10 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@1e31de5234b9f8995739874a8ce0492dc87873e2 # v4.0.0 + uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} - uses: actions/checkout@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0 + uses: actions/setup-python@v5 with: python-version: ${{ inputs.python-version }} diff --git a/.github/workflows/_codeql.yaml b/.github/workflows/_codeql.yaml index 57b0585..449f073 100644 --- a/.github/workflows/_codeql.yaml +++ b/.github/workflows/_codeql.yaml @@ -33,7 +33,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@1e31de5234b9f8995739874a8ce0492dc87873e2 # v4.0.0 + uses: actions/checkout@v4 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL diff --git a/.github/workflows/_pre_commit.yaml b/.github/workflows/_pre_commit.yaml index ed4d5ff..a054100 100644 --- a/.github/workflows/_pre_commit.yaml +++ b/.github/workflows/_pre_commit.yaml @@ -18,5 +18,5 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@1e31de5234b9f8995739874a8ce0492dc87873e2 # v4.0.0 + uses: actions/checkout@v4 - uses: pre-commit/action@v3.0.0 diff --git a/.github/workflows/_pypi_publish.yaml b/.github/workflows/_pypi_publish.yaml index 8cd19a0..fb9a99e 100644 --- a/.github/workflows/_pypi_publish.yaml +++ b/.github/workflows/_pypi_publish.yaml @@ -31,12 +31,12 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@1e31de5234b9f8995739874a8ce0492dc87873e2 # v4.0.0 + uses: actions/checkout@v4 with: fetch-depth: 0 # IMPORTANT: otherwise the current tag does not get fetched and the build version gets worse - name: Set up Python 3.11 - uses: actions/checkout@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0 + uses: actions/setup-python@v5 with: python-version: 3.11 diff --git a/.github/workflows/_test.yaml b/.github/workflows/_test.yaml index 2f42518..f29adfd 100644 --- a/.github/workflows/_test.yaml +++ b/.github/workflows/_test.yaml @@ -26,10 +26,10 @@ jobs: runs-on: ${{ inputs.os }} steps: - name: Checkout repository - uses: actions/checkout@1e31de5234b9f8995739874a8ce0492dc87873e2 # v4.0.0 + uses: actions/checkout@v4 - name: Set up Python ${{ inputs.python-version }} - uses: actions/checkout@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0 + uses: actions/setup-python@v5 with: python-version: ${{ inputs.python-version }} diff --git a/Makefile b/Makefile index 390997b..be02861 100644 --- a/Makefile +++ b/Makefile @@ -104,7 +104,3 @@ clean: find tests -name "__pycache__" | xargs rm -rf find cmethods -name "__pycache__" | xargs rm -rf find examples -name "__pycache__" | xargs rm -rf - - -# for file in `ls .github/workflows`; do sed -i '' 's/actions\/checkout@v4/actions\/checkout@1e31de5234b9f8995739874a8ce0492dc87873e2 # v4.0.0/g' .github/workflows/$file; done -# for file in `ls .github/workflows`; do sed -i '' 's/actions\/setup-python@v5/actions\/checkout@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0/g' .github/workflows/$file; done From fdd52e97caebd2a27c088e61efc84c299c67e95f Mon Sep 17 00:00:00 2001 From: Benjamin Thomas Schwertfeger Date: Thu, 14 Mar 2024 21:13:51 +0100 Subject: [PATCH 6/8] update action hashes --- .github/workflows/_build.yaml | 4 ++-- .github/workflows/_build_doc.yaml | 4 ++-- .github/workflows/_codecov.yaml | 6 +++--- .github/workflows/_codeql.yaml | 2 +- .github/workflows/_pre_commit.yaml | 4 ++-- .github/workflows/_pypi_publish.yaml | 4 ++-- .github/workflows/_test.yaml | 4 ++-- Makefile | 3 +++ 8 files changed, 17 insertions(+), 14 deletions(-) diff --git a/.github/workflows/_build.yaml b/.github/workflows/_build.yaml index 7ba4a60..ecc754a 100644 --- a/.github/workflows/_build.yaml +++ b/.github/workflows/_build.yaml @@ -26,10 +26,10 @@ jobs: runs-on: ${{ inputs.os }} steps: - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@1e31de5234b9f8995739874a8ce0492dc87873e2 # v4.0.0 - name: Set up Python ${{ inputs.python-version }} - uses: actions/setup-python@v5 + uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0 with: python-version: ${{ inputs.python-version }} diff --git a/.github/workflows/_build_doc.yaml b/.github/workflows/_build_doc.yaml index 6b95fcb..1562d57 100644 --- a/.github/workflows/_build_doc.yaml +++ b/.github/workflows/_build_doc.yaml @@ -25,10 +25,10 @@ jobs: runs-on: ${{ inputs.os }} steps: - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@1e31de5234b9f8995739874a8ce0492dc87873e2 # v4.0.0 - name: Set up Python ${{ inputs.python-version }} - uses: actions/setup-python@v5 + uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0 with: python-version: ${{ inputs.python-version }} diff --git a/.github/workflows/_codecov.yaml b/.github/workflows/_codecov.yaml index bbaf684..7eb5fd2 100644 --- a/.github/workflows/_codecov.yaml +++ b/.github/workflows/_codecov.yaml @@ -35,10 +35,10 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@1e31de5234b9f8995739874a8ce0492dc87873e2 # v4.0.0 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 + uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0 with: python-version: ${{ inputs.python-version }} @@ -52,7 +52,7 @@ jobs: run: pytest --cov --cov-report=xml - name: Upload coverage to Codecov - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@54bcd8715eee62d40e33596ef5e8f0f48dbbccab #v4.1.0 with: token: ${{ secrets.CODECOV_TOKEN }} files: coverage.xml diff --git a/.github/workflows/_codeql.yaml b/.github/workflows/_codeql.yaml index 449f073..57b0585 100644 --- a/.github/workflows/_codeql.yaml +++ b/.github/workflows/_codeql.yaml @@ -33,7 +33,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@1e31de5234b9f8995739874a8ce0492dc87873e2 # v4.0.0 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL diff --git a/.github/workflows/_pre_commit.yaml b/.github/workflows/_pre_commit.yaml index a054100..8dd9339 100644 --- a/.github/workflows/_pre_commit.yaml +++ b/.github/workflows/_pre_commit.yaml @@ -18,5 +18,5 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v4 - - uses: pre-commit/action@v3.0.0 + uses: actions/checkout@1e31de5234b9f8995739874a8ce0492dc87873e2 # v4.0.0 + - uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1 diff --git a/.github/workflows/_pypi_publish.yaml b/.github/workflows/_pypi_publish.yaml index fb9a99e..71d7e38 100644 --- a/.github/workflows/_pypi_publish.yaml +++ b/.github/workflows/_pypi_publish.yaml @@ -31,12 +31,12 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@1e31de5234b9f8995739874a8ce0492dc87873e2 # v4.0.0 with: fetch-depth: 0 # IMPORTANT: otherwise the current tag does not get fetched and the build version gets worse - name: Set up Python 3.11 - uses: actions/setup-python@v5 + uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0 with: python-version: 3.11 diff --git a/.github/workflows/_test.yaml b/.github/workflows/_test.yaml index f29adfd..a71f08e 100644 --- a/.github/workflows/_test.yaml +++ b/.github/workflows/_test.yaml @@ -26,10 +26,10 @@ jobs: runs-on: ${{ inputs.os }} steps: - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@1e31de5234b9f8995739874a8ce0492dc87873e2 # v4.0.0 - name: Set up Python ${{ inputs.python-version }} - uses: actions/setup-python@v5 + uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0 with: python-version: ${{ inputs.python-version }} diff --git a/Makefile b/Makefile index be02861..5e4a3f9 100644 --- a/Makefile +++ b/Makefile @@ -104,3 +104,6 @@ clean: find tests -name "__pycache__" | xargs rm -rf find cmethods -name "__pycache__" | xargs rm -rf find examples -name "__pycache__" | xargs rm -rf + +# for file in `ls .github/workflows`; do sed -i '' 's/actions\/checkout@v4/actions\/checkout@1e31de5234b9f8995739874a8ce0492dc87873e2 # v4.0.0/g' .github/workflows/$file; done +# for file in `ls .github/workflows`; do sed -i '' 's/actions\/setup-python@v5/actions\/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0/g' .github/workflows/$file; done From 585bd10e1ada4f65826dcef30f91ef7e094509b6 Mon Sep 17 00:00:00 2001 From: Benjamin Thomas Schwertfeger Date: Thu, 14 Mar 2024 21:27:09 +0100 Subject: [PATCH 7/8] add security policy --- README.md | 31 +++++++------------------------ SECURITY.md | 21 +++++++++++++++++++++ doc/introduction.rst | 2 +- doc/links.rst | 9 +++++++++ 4 files changed, 38 insertions(+), 25 deletions(-) create mode 100644 SECURITY.md diff --git a/README.md b/README.md index 97bb144..6b04d26 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,8 @@ [![CI/CD](https://github.com/btschwertfeger/python-cmethods/actions/workflows/cicd.yaml/badge.svg?branch=master)](https://github.com/btschwertfeger/python-cmethods/actions/workflows/cicd.yaml) [![codecov](https://codecov.io/github/btschwertfeger/python-cmethods/branch/master/graph/badge.svg?token=OSO4PAABPD)](https://codecov.io/github/btschwertfeger/python-cmethods) + +[![OpenSSF ScoreCard](https://img.shields.io/ossf-scorecard/github.com/btschwertfeger/python-cmethods?label=openssf%20scorecard&style=flat)](https://securityscorecards.dev/viewer/?uri=github.com/btschwertfeger/python-cmethods) [![OpenSSF Best Practices](https://www.bestpractices.dev/projects/8666/badge)](https://www.bestpractices.dev/projects/8666) ![release](https://shields.io/github/release-date/btschwertfeger/python-cmethods) @@ -18,18 +20,15 @@ -This Python module serves as collection of different scale- and -distribution-based bias correction techniques for climate sciences. +Welcome to python-cmethods, a powerful Python package designed for bias +correction and adjustment of climate data. Built with a focus on ease of use and +efficiency, python-cmethods offers a comprehensive suite of functions tailored +for applying bias correction methods to climate model simulations and +observational datasets. Please cite this project as described in https://zenodo.org/doi/10.5281/zenodo.7652755. -> ⚠️ For the application of bias corrections on _large data sets_ it is -> recommended to also try the command-line tool -> [BiasAdjustCXX](https://github.com/btschwertfeger/BiasAdjustCXX). - ---- - ## Table of Contents 1. [ About ](#about) @@ -40,18 +39,10 @@ https://zenodo.org/doi/10.5281/zenodo.7652755. 6. [ Contribution ](#contribution) 7. [ References ](#references) ---- - ## 1. About -Welcome to `python-cmethods`\_, a powerful Python package designed for bias -correction and adjustment of climate data. Built with a focus on ease of use and -efficiency, python-cmethods offers a comprehensive suite of functions tailored -for applying bias correction methods to climate model simulations and -observational datasets. - Bias correction in climate research involves the adjustment of systematic errors or biases present in climate model simulations or observational datasets to improve their accuracy and reliability, ensuring that the data better represents @@ -148,8 +139,6 @@ https://python-cmethods.readthedocs.io/en/stable/ python3 -m pip install python-cmethods ``` ---- - ## 4. Usage and Examples @@ -243,8 +232,6 @@ Notes: - This script is far away from perfect - so please see it, as a starting point. (: ---- - ## 5. Notes @@ -270,8 +257,6 @@ Notes: is available in [BiasAdjustCXX](https://github.com/btschwertfeger/BiasAdjustCXX). ---- - ## 6. 🆕 Contributions @@ -301,5 +286,3 @@ Notes: https://github.com/btschwertfeger/python-cmethods/issues/47. I appreciate all the valuable suggestions provided throughout the implementation of the subsequent changes. - ---- diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 0000000..c6c6262 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,21 @@ +# Security Policy + +## Reporting Security Vulnerabilities + +At python-cmethods, we take security seriously. We welcome and encourage +responsible disclosure of security vulnerabilities. If you believe you've found +a security vulnerability within our project, please report it immediately. + +## How to Report a Security Vulnerability + +To report a security vulnerability, please send an email to +[contact@b-schwertfeger.de](mailto:contact@b-schwertfeger.de) with a detailed +description of the vulnerability. We kindly request that you refrain from +disclosing the vulnerability publicly until we have had an opportunity to +address it. + +## Our Commitment + +We are committed to promptly addressing and resolving any security +vulnerabilities reported to us. We will investigate all reports and take +appropriate action to protect the security of our users and their data. diff --git a/doc/introduction.rst b/doc/introduction.rst index 8abc8d7..da383b3 100644 --- a/doc/introduction.rst +++ b/doc/introduction.rst @@ -4,7 +4,7 @@ python-cmethods =============== |GitHub badge| |License badge| |PyVersions badge| |Downloads badge| -|CI/CD badge| |codecov badge| +|CI/CD badge| |codecov badge| |OSSF Scorecard| |OSSF Best Practices| |Release date badge| |Release version badge| |DOI badge| |Docs stable| About diff --git a/doc/links.rst b/doc/links.rst index 4372cc4..1bf8ec8 100644 --- a/doc/links.rst +++ b/doc/links.rst @@ -13,6 +13,7 @@ .. _xclim: https://zenodo.org/record/7535677 .. _xarray: https://xarray.dev/ + .. _dask: https://docs.dask.org/en/stable/ @@ -52,3 +53,11 @@ .. |Docs stable| image:: https://readthedocs.org/projects/python-cmethods/badge/?version=stable :target: https://python-cmethods.readthedocs.io/en/stable :alt: Documentation Status stable + +.. |OSSF Scorecard| image:: https://img.shields.io/ossf-scorecard/github.com/btschwertfeger/python-cmethods?label=openssf%20scorecard&style=flat + :target: https://securityscorecards.dev/viewer/?uri=github.com/btschwertfeger/python-cmethods + :alt: OSSF Scorecard + +.. |OSSF Best Practices| image:: https://www.bestpractices.dev/projects/8666/badge + :target: https://www.bestpractices.dev/projects/8666 + :alt: OSSF Best Practices From 0523c18c9c9ddd13d0d24220a82e8510017cbb99 Mon Sep 17 00:00:00 2001 From: Benjamin Thomas Schwertfeger Date: Thu, 14 Mar 2024 21:33:30 +0100 Subject: [PATCH 8/8] adjust links [skip ci] --- README.md | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 6b04d26..1117a9a 100644 --- a/README.md +++ b/README.md @@ -61,9 +61,10 @@ instrument calibration, spatial resolution, or model deficiencies. python-cmethods empowers scientists to effectively address those biases in climate data, ensuring greater accuracy and reliability in research and decision-making processes. By leveraging cutting-edge techniques and seamless -integration with popular libraries like `xarray`_ and `Dask`_, this package -simplifies the process of bias adjustment, even when dealing with large-scale -climate simulations and extensive spatial domains. +integration with popular libraries like [xarray](https://xarray.dev/) and +[Dask](https://docs.dask.org/en/stable/), this package simplifies the process +of bias adjustment, even when dealing with large-scale climate simulations and +extensive spatial domains. In this way, for example, modeled data, which on average represent values that are too cold, can be easily bias-corrected by applying any adjustment procedure @@ -111,16 +112,16 @@ https://python-cmethods.readthedocs.io/en/stable/ non-stochastic climate variables. Variance scaling can only be applied on non-stochastic climate variables. - - Non-stochastic climate variables are those that can be predicted with relative - certainty based on factors such as location, elevation, and season. Examples - of non-stochastic climate variables include air temperature, air pressure, and - solar radiation. + - Non-stochastic climate variables are those that can be predicted with + relative certainty based on factors such as location, elevation, and season. + Examples of non-stochastic climate variables include air temperature, air + pressure, and solar radiation. - - Stochastic climate variables, on the other hand, are those that exhibit a high - degree of variability and unpredictability, making them difficult to forecast - accurately. Precipitation is an example of a stochastic climate variable - because it can vary greatly in timing, intensity, and location due to complex - atmospheric and meteorological processes. + - Stochastic climate variables, on the other hand, are those that exhibit a + high degree of variability and unpredictability, making them difficult to + forecast accurately. Precipitation is an example of a stochastic climate + variable because it can vary greatly in timing, intensity, and location due + to complex atmospheric and meteorological processes. - Except for the detrended quantile mapping (DQM) technique, all methods can be applied to 1- and 3-dimensional data sets. The implementation of DQM to @@ -129,7 +130,8 @@ https://python-cmethods.readthedocs.io/en/stable/ - Except for DQM, all methods can be applied using `cmethods.adjust`. Chunked data for computing e.g. in a dask cluster is possible as well. -- For any questions -- please open an issue at https://github.com/btschwertfeger/python-cmethods/issues +- For any questions -- please open an issue at + https://github.com/btschwertfeger/python-cmethods/issues @@ -191,8 +193,9 @@ Notes: Notebook with different methods and plots: `/examples/examples.ipynb` -There is also an example script (`/examples/biasadjust.py`) that can be used to apply the available bias correction methods -on 1- and 3-dimensional data sets (see `/examples/input_data/*.nc`). +There is also an example script (`/examples/biasadjust.py`) that can be used to +apply the available bias correction methods on 1- and 3-dimensional data sets +(see `/examples/input_data/*.nc`). Help: