Tools for analysis of climate model data
APACHE-2.0 License
.. image:: https://zenodo.org/badge/DOI/10.5281/zenodo.4621058.svg :target: https://doi.org/10.5281/zenodo.4621058 .. image:: https://badge.fury.io/py/climateforcing.svg :target: https://badge.fury.io/py/climateforcing .. image:: https://img.shields.io/pypi/pyversions/climateforcing :target: https://img.shields.io/pypi/pyversions/climateforcing .. image:: https://img.shields.io/conda/v/chrisroadmap/climateforcing :target: https://anaconda.org/chrisroadmap/climateforcing
An incomplete toolbox of scripts and modules used for analysis of climate models and climate data.
Putting this on conda-forge
is a TODO, for now you can grab it from my personal channel:
.. code-block::
conda install -c chrisroadmap climateforcing
.. code-block::
pip install climateforcing
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
.. code-block::
pip install -e .[dev]
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:
humidity: Conversions for specific to relative humidity and vice versa.
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
).
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.
Implementation of the Held et al (2010) and Geoffroy et al (2013a, 2013b) two-layer climate model. Thanks to Glen Harris <https://www.metoffice.gov.uk/research/people/glen-harris/>
_ for the original code.
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:
downloads datasets from URLs and simple function to make nested directories from Python.