Skip to main content

Climate-related tools that I use in my work, gathered in a single module

Project description

https://zenodo.org/badge/DOI/10.5281/zenodo.4621058.svg https://badge.fury.io/py/climateforcing.svg https://img.shields.io/pypi/pyversions/climateforcing https://img.shields.io/conda/v/chrisroadmap/climateforcing

climateforcing

An incomplete toolbox of scripts and modules used for analysis of climate models and climate data.

Installation

conda

Putting this on conda-forge is a TODO, for now you can grab it from my personal channel:

conda install -c chrisroadmap climateforcing

pypi

pip install climateforcing

development version

I strongly recommend doing this inside a virtual environment, e.g. conda, to keep your base python installation clean.

Clone the repository, cd to climateforcing and run

pip install -e .[dev]

Contents

aprp: Approximate Partial Radiative Perturbation

Generates the components of shortwave effective radiative forcing (ERF) from changes in absorption, scattering and cloud amount. For aerosols, this can be used to approximate the ERF from aerosol-radiation interactions (ERFari) and aerosol-cloud interactions (ERFaci). Citations:

  • Zelinka, M. D., Andrews, T., Forster, P. M., and Taylor, K. E. (2014), Quantifying components of aerosol‐cloud‐radiation interactions in climate models, J. Geophys. Res. Atmos., 119, 7599–7615, https://doi.org/10.1002/2014JD021710.

  • Taylor, K. E., Crucifix, M., Braconnot, P., Hewitt, C. D., Doutriaux, C., Broccoli, A. J., Mitchell, J. F. B., & Webb, M. J. (2007). Estimating Shortwave Radiative Forcing and Response in Climate Models, Journal of Climate, 20(11), 2530–2543, https://doi.org/10.1175/JCLI4143.1

atmos: general atmospheric physics tools

humidity: Conversions for specific to relative humidity and vice versa.

geometry: quick and dirty area-weighted mean

For when you relly want to know the global mean but don’t want to think too hard or download anything much. (Works nicely with aprp).

solar: time-mean solar zenith angle

Lots of tools exist for calculating the solar zenith angle. No tools exist, as far as I can see, for calculating the daylight-corrected mean solar zenith angle. Why do we want to do this? Sub-daily climate model data is often outputted only as hourly, 3-hourly or 6-hourly means, including for shortwave radiation diagnostics. Say you want to try and calculate the mean direct normal radiation over a 3-hour mean timestep, given the horizontal diffuse (rsdsdiff) and horizontal total (rsds). You will need an estimate of the mean solar zenith angle to do this.

twolayermodel: two-layer energy balance climate model

Implementation of the Held et al (2010) and Geoffroy et al (2013a, 2013b) two-layer climate model. Thanks to Glen Harris for the original code.

  • Held, I. M., Winton, M., Takahashi, K., Delworth, T., Zeng, F., & Vallis, G. K. (2010), Probing the Fast and Slow Components of Global Warming by Returning Abruptly to Preindustrial Forcing, J. Climate, 23(9), 2418–2427, https://doi.org/10.1175/2009JCLI3466.1

  • Geoffroy, O., Saint-Martin, D., Olivié, D. J. L., Voldoire, A., Bellon, G., & Tytéca, S. (2013a). Transient Climate Response in a Two-Layer Energy-Balance Model. Part I: Analytical Solution and Parameter Calibration Using CMIP5 AOGCM Experiments, J. Climate, 26(6), 1841-1857, https://doi.org/10.1175/JCLI-D-12-00195.1

  • Geoffroy, O., Saint-Martin, D., Bellon, G., Voldoire, A., Olivié, D. J. L., & Tytéca, S. (2013b), Transient Climate Response in a Two-Layer Energy-Balance Model. Part II: Representation of the Efficacy of Deep-Ocean Heat Uptake and Validation for CMIP5 AOGCMs, J. Climate, 26(6), 1859-1876, https://doi.org/10.1175/JCLI-D-12-00196.1

  • Palmer, M. D., Harris, G. R. and Gregory, J. M. (2018), Extending CMIP5 projections of global mean temperature change and sea level rise due to the thermal expansion using a physically-based emulator, Environ. Res. Lett., 13(8), 084003, https://doi.org/10.1088/1748-9326/aad2e4

utci: Universal Climate Thermal Index

Calculates a measure of heat stress based on meteorological data. The code provided is a Python translation of the original FORTRAN, used under kind permission of Peter Bröde. If you use this code please cite:

  • Bröde P, Fiala D, Blazejczyk K, Holmér I, Jendritzky G, Kampmann B, Tinz B, Havenith G, 2012. Deriving the operational procedure for the Universal Thermal Climate Index (UTCI). International Journal of Biometeorology 56, 481-494, https://doi.org/10.1007/s00484-011-0454-1

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

climateforcing-0.2.3.tar.gz (54.8 kB view details)

Uploaded Source

Built Distribution

climateforcing-0.2.3-py3-none-any.whl (39.7 kB view details)

Uploaded Python 3

File details

Details for the file climateforcing-0.2.3.tar.gz.

File metadata

  • Download URL: climateforcing-0.2.3.tar.gz
  • Upload date:
  • Size: 54.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.8.2 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for climateforcing-0.2.3.tar.gz
Algorithm Hash digest
SHA256 9f53ee026c0cacefa98ed8440eb41f6d4a788d416c42f54a84c279d8e2e2f1b2
MD5 e0dd2499ed5d1becbab63dbc670a703c
BLAKE2b-256 5e1288a2eb9c1f358ec13e9b40f4e362e65153f8f2c90b58b4749bcfcf9e8ba8

See more details on using hashes here.

Provenance

File details

Details for the file climateforcing-0.2.3-py3-none-any.whl.

File metadata

  • Download URL: climateforcing-0.2.3-py3-none-any.whl
  • Upload date:
  • Size: 39.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.8.2 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for climateforcing-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 2fe1350dbfbd83e9fe2c90e85e644b60fec1db34883104e0dd29a3677dc85434
MD5 a58ee28d9027184407a3a2af960a190f
BLAKE2b-256 18c4791c86e544084158873deb0f665872d2f744558e19eddd8d9ac7efe0b2ae

See more details on using hashes here.

Provenance

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