10
10
[ ![ 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 )
11
11
[ ![ codecov] ( https://codecov.io/github/btschwertfeger/python-cmethods/branch/master/graph/badge.svg?token=OSO4PAABPD )] ( https://codecov.io/github/btschwertfeger/python-cmethods )
12
12
13
+ [ ![ 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 )
14
+ [ ![ OpenSSF Best Practices] ( https://www.bestpractices.dev/projects/8666/badge )] ( https://www.bestpractices.dev/projects/8666 )
15
+
13
16
![ release] ( https://shields.io/github/release-date/btschwertfeger/python-cmethods )
14
17
![ release] ( https://shields.io/github/v/release/btschwertfeger/python-cmethods?display_name=tag )
15
18
[ ![ DOI] ( https://zenodo.org/badge/496160109.svg )] ( https://zenodo.org/badge/latestdoi/496160109 )
16
19
[ ![ Documentation Status] ( https://readthedocs.org/projects/python-cmethods/badge/?version=stable )] ( https://python-cmethods.readthedocs.io/en/latest/?badge=stable )
17
20
18
21
</div >
19
22
20
- This Python module serves as a collection of different scale- and
21
- distribution-based bias correction techniques for climate sciences.
22
-
23
- The documentation is available at: [ https://python-cmethods.readthedocs.io/en/stable/ ] ( https://python-cmethods.readthedocs.io/en/stable/ )
23
+ Welcome to python-cmethods, a powerful Python package designed for bias
24
+ correction and adjustment of climate data. Built with a focus on ease of use and
25
+ efficiency, python-cmethods offers a comprehensive suite of functions tailored
26
+ for applying bias correction methods to climate model simulations and
27
+ observational datasets.
24
28
25
29
Please cite this project as described in
26
30
https://zenodo.org/doi/10.5281/zenodo.7652755 .
27
31
28
- > ⚠️ For the application of bias corrections on _ large data sets_ it is
29
- > recommended to also try the command-line tool
30
- > [ BiasAdjustCXX] ( https://github.com/btschwertfeger/BiasAdjustCXX ) .
31
-
32
- ---
33
-
34
32
## Table of Contents
35
33
36
34
1 . [ About ] ( #about )
@@ -41,16 +39,16 @@ https://zenodo.org/doi/10.5281/zenodo.7652755.
41
39
6 . [ Contribution ] ( #contribution )
42
40
7 . [ References ] ( #references )
43
41
44
- ---
45
-
46
42
<a name =" about " ></a >
47
43
48
44
## 1. About
49
45
50
- These programs and data structures are developed with the aim of reducing
51
- discrepancies between modeled and observed climate data. Historical data is
52
- utilized to calibrate variables from current and future time series to achieve
53
- distributional properties that closely resemble the possible actual values.
46
+ Bias correction in climate research involves the adjustment of systematic errors
47
+ or biases present in climate model simulations or observational datasets to
48
+ improve their accuracy and reliability, ensuring that the data better represents
49
+ actual climate conditions. This process typically involves statistical methods
50
+ or empirical relationships to correct for biases caused by factors such as
51
+ instrument calibration, spatial resolution, or model deficiencies.
54
52
55
53
<figure >
56
54
<img
@@ -60,12 +58,24 @@ distributional properties that closely resemble the possible actual values.
60
58
<figcaption >Figure 1: Schematic representation of a bias adjustment procedure</figcaption >
61
59
</figure >
62
60
63
- For instance, modeled data typically indicate values that are colder than the
64
- actual values. To address this issue, an adjustment procedure is employed. The
65
- figure below illustrates the observed, modeled, and adjusted values, revealing
66
- that the delta adjusted time series ($T^{* DM}_ {sim,p}$) are significantly more
67
- similar to the observed data ($T{obs,p}$) than the raw modeled data
68
- ($T_ {sim,p}$).
61
+ python-cmethods empowers scientists to effectively address those biases in
62
+ climate data, ensuring greater accuracy and reliability in research and
63
+ decision-making processes. By leveraging cutting-edge techniques and seamless
64
+ integration with popular libraries like [ xarray] ( https://xarray.dev/ ) and
65
+ [ Dask] ( https://docs.dask.org/en/stable/ ) , this package simplifies the process
66
+ of bias adjustment, even when dealing with large-scale climate simulations and
67
+ extensive spatial domains.
68
+
69
+ In this way, for example, modeled data, which on average represent values that
70
+ are too cold, can be easily bias-corrected by applying any adjustment procedure
71
+ included in this package.
72
+
73
+ For instance, modeled data can report values that are way colder than the those
74
+ data reported by reanalysis time-series. To address this issue, an adjustment
75
+ procedure can be employed. The figure below illustrates the observed, modeled,
76
+ and adjusted values, revealing that the delta-adjusted time series
77
+ ($T^{* DM}_ {sim,p}$) is significantly more similar to the observational data
78
+ ($T{obs,p}$) than the raw model output ($T_ {sim,p}$).
69
79
70
80
<figure >
71
81
<img
@@ -75,6 +85,12 @@ similar to the observed data ($T{obs,p}$) than the raw modeled data
75
85
<figcaption >Figure 2: Temperature per day of year in observed, modeled, and bias-adjusted climate data</figcaption >
76
86
</figure >
77
87
88
+ The mathematical foundations supporting each bias correction technique
89
+ implemented in python-cmethods are integral to the package, ensuring
90
+ transparency and reproducibility in the correction process. Each method is
91
+ accompanied by references to trusted publications, reinforcing the reliability
92
+ and rigor of the corrections applied.
93
+
78
94
<a name =" methods " ></a >
79
95
80
96
## 2. Available Methods
@@ -96,16 +112,16 @@ https://python-cmethods.readthedocs.io/en/stable/
96
112
non-stochastic climate variables. Variance scaling can only be applied on
97
113
non-stochastic climate variables.
98
114
99
- - Non-stochastic climate variables are those that can be predicted with relative
100
- certainty based on factors such as location, elevation, and season. Examples
101
- of non-stochastic climate variables include air temperature, air pressure, and
102
- solar radiation.
115
+ - Non-stochastic climate variables are those that can be predicted with
116
+ relative certainty based on factors such as location, elevation, and season.
117
+ Examples of non-stochastic climate variables include air temperature, air
118
+ pressure, and solar radiation.
103
119
104
- - Stochastic climate variables, on the other hand, are those that exhibit a high
105
- degree of variability and unpredictability, making them difficult to forecast
106
- accurately. Precipitation is an example of a stochastic climate variable
107
- because it can vary greatly in timing, intensity, and location due to complex
108
- atmospheric and meteorological processes.
120
+ - Stochastic climate variables, on the other hand, are those that exhibit a
121
+ high degree of variability and unpredictability, making them difficult to
122
+ forecast accurately. Precipitation is an example of a stochastic climate
123
+ variable because it can vary greatly in timing, intensity, and location due
124
+ to complex atmospheric and meteorological processes.
109
125
110
126
- Except for the detrended quantile mapping (DQM) technique, all methods can be
111
127
applied to 1- and 3-dimensional data sets. The implementation of DQM to
@@ -114,7 +130,8 @@ https://python-cmethods.readthedocs.io/en/stable/
114
130
- Except for DQM, all methods can be applied using ` cmethods.adjust ` . Chunked
115
131
data for computing e.g. in a dask cluster is possible as well.
116
132
117
- - For any questions -- please open an issue at https://github.com/btschwertfeger/python-cmethods/issues
133
+ - For any questions -- please open an issue at
134
+ https://github.com/btschwertfeger/python-cmethods/issues
118
135
119
136
<a name =" installation " ></a >
120
137
@@ -124,8 +141,6 @@ https://python-cmethods.readthedocs.io/en/stable/
124
141
python3 -m pip install python-cmethods
125
142
```
126
143
127
- ---
128
-
129
144
<a name =" examples " ></a >
130
145
131
146
## 4. Usage and Examples
@@ -178,8 +193,9 @@ Notes:
178
193
179
194
Notebook with different methods and plots: ` /examples/examples.ipynb `
180
195
181
- There is also an example script (` /examples/biasadjust.py ` ) that can be used to apply the available bias correction methods
182
- on 1- and 3-dimensional data sets (see ` /examples/input_data/*.nc ` ).
196
+ There is also an example script (` /examples/biasadjust.py ` ) that can be used to
197
+ apply the available bias correction methods on 1- and 3-dimensional data sets
198
+ (see ` /examples/input_data/*.nc ` ).
183
199
184
200
Help:
185
201
@@ -219,8 +235,6 @@ Notes:
219
235
- This script is far away from perfect - so please see it, as a starting point.
220
236
(:
221
237
222
- ---
223
-
224
238
<a name =" notes " ></a >
225
239
226
240
## 5. Notes
@@ -246,8 +260,6 @@ Notes:
246
260
is available in
247
261
[ BiasAdjustCXX] ( https://github.com/btschwertfeger/BiasAdjustCXX ) .
248
262
249
- ---
250
-
251
263
<a name =" contribution " ></a >
252
264
253
265
## 6. 🆕 Contributions
@@ -277,5 +289,3 @@ Notes:
277
289
https://github.com/btschwertfeger/python-cmethods/issues/47 . I appreciate all
278
290
the valuable suggestions provided throughout the implementation of the
279
291
subsequent changes.
280
-
281
- ---
0 commit comments