Skip to main content

Collection of bias adjustment procedures for multidimensional climate data

Project description

Bias-Adjustment-Python

Generic badge Generic badge GitHub Collection of different scale- and distribution-based bias adjustment techniques for climatic research. (see examples.ipynb for help)

Bias adjustment procedures in Python are very slow, so they should not be used on large data sets. A C++ Implementation that works way faster can be found here: https://github.com/btschwertfeger/Bias-Adjustment-Cpp.


Run adjustment:

python3 do_bias_correction.py   \
    --obs input_data/obs.nc     \
    --contr input_data/contr.nc \
    --scen input_data/scen.nc   \
    --method linear_scaling     \
    --variable tas              \
    --unit '°C'                 \
    --group time.month          \
    --kind + 

Methods implemented by Benjamin T. Schwertfeger:

Method --method parameter
Linear Scaling linear_scaling
Variance Scaling variance_scaling
Delta Method delta_method
Quantile Mapping quantile_mapping
Quantile Delta Mapping quantile_delta_mapping

Notes:

  • Linear and variance, as well as delta change method require --group time.month as argument.
  • Adjustment methods that apply changes in distributional biasses (QM. QDM, DQM; EQM, ...) need the --nquantiles argument set to some integer.
  • Data sets should have the same spatial resolutions.
  • Computation in Python takes some time, so this is only for demonstration. When adjusting large datasets, its best to the C++ implementation mentioned above.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

python-cmethods-0.5.tar.gz (10.8 kB view hashes)

Uploaded Source

Built Distribution

python_cmethods-0.5-py2.py3-none-any.whl (9.6 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page