Skip to main content

CliMT is a Toolkit for building Earth system models in Python.

Project description

=====
climt
=====


.. image:: https://img.shields.io/pypi/v/climt.svg
:target: https://pypi.python.org/pypi/climt
:alt: PyPI

.. image:: https://img.shields.io/travis/climt/climt.svg
:target: https://travis-ci.org/climt/climt
:alt: Continuous Integration

.. image:: https://ci.appveyor.com/api/projects/status/h9ayx22cxyfwh5rh?svg=true
:target: https://ci.appveyor.com/project/JoyMonteiro/climt
:alt: Continuous Integration

.. image:: https://img.shields.io/codecov/c/github/climt/climt.svg
:target: https://travis-ci.org/climt/climt
:alt: Coverage

.. image:: https://readthedocs.org/projects/climt/badge/
:target: https://climt.readthedocs.io/en/latest/?badge=latest
:alt: Documentation Status

.. image:: https://zenodo.org/badge/74854230.svg
:target: https://zenodo.org/badge/latestdoi/74854230
:alt: Zenodo DOI


.. image:: ./docs/climt_logo.jpg
:height: 512px
:width: 512px
:align: center

**climt** is a Toolkit for building Earth system models in Python. climt stands for *Climate Modelling
and Diagnostics Toolkit* -- it is meant both for creating models and for generating diagnostics
(radiative fluxes for an atmospheric column, for example). However, since it might eventually
include model components for purposes other than climate modelling (local area models, large-eddy
simulation), we prefer to keep the abbreviation un-expanded!

climt hopes to enable researchers to easily perform online analysis and make
modifications to existing models by increasing the ease with which models
can be understood and modified. It also enables educators to write
accessible models that serve as an entry point for students into Earth
system modeling, while also containing state-of-the-art components.

Initially climt contains only components for the atmosphere, and does not yet
include a coupler. But there are plans to extend climt to a fully coupled Earth
system model in the future. The toolkit is also written in such a way that it
could enable the development of non-climate models (e.g. weather prediction,
large-eddy simulation). To do so requires only that the prognostic and
diagnostic schemes are wrapped into the correct Python-accessible interface.

climt builds on sympl_, which provides the base classes and array and constants handling
functionality. Thanks to sympl_ and Pint_, climt is also a fully units aware model. It is
useful to know how sympl_ works to use climt better. Read more about sympl_ at
https://sympl.readthedocs.io.

* Free software: BSD license
* Documentation: https://climt.readthedocs.io.

Installation
-------------

climt can be installed directly from the python package index using pip.

pip install climt

should work on most systems. From version 0.9.2 onwards, this command will
install binary wheels, eliminating the requirement of a compiler on your
system.

Detailed instructions for Mac and Linux systems are available in the `documentation`_.

Features
--------

* climt is fully units-aware!
* Uses the xarray_ `DataArray` abstraction to build self describing model arrays.
* Provides different levels of abstraction towards building a climate model.
* Like sympl_, climt consciously uses descriptive names in the user API to ensure
model scripts are self-documenting.
* Allows for quick prototyping of earth system model components.
* Provides a clean and convenient interface to add new components.

Citing climt
------------

If you use climt in your research, please cite the following paper documenting sympl_ and climt

https://www.geosci-model-dev.net/11/3781/2018/

Credits
-------

This package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template.

.. _Cookiecutter: https://github.com/audreyr/cookiecutter
.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage
.. _sympl: https://github.com/mcgibbon/sympl
.. _Pint: https://pint.readthedocs.io
.. _xarray: http://xarray.pydata.org
.. _documentation: http://climt.readthedocs.io/en/latest/installation.html


=======
History
=======

v.0.16.2
--------

* Fix wheel build on Mac

v.0.16.1
-------

* Fixed issue with Mac build
* Few changes in the dry convection component. Significantly improves the performance.
* Changed logo!
* Fixed failing docs build

v0.16.0
------

* Added some documentation for using RRTMG with McICA
* CI Testing for Mac and py37 added.
* Refactored initialisation code
* Enable the McICA version of RRTMG Longwave for consistency
with the Shortwave component.
* Fix bugs in IceSheet
* Add tests to verify conservation of quantities
* Fix bugs in initialisation
* Fix energy conservation in surface flux scheme
* Enable the McICA version of RRTMG Shortwave,
so that partial cloud fractions can be used.
* Add GMD example scripts to repository.
* Fix docs to reflect API changes after refactor.
* Fix wrong initialisation to use sigma values instead of pressure values
of optical depth for GrayLongwaveRadiation

Breaking Changes
----------------

* The flux outputs of GrayLongwaveRadiation have been renamed to eliminate
`on_interface_levels` to keep consistency with other components.
* All arrays are now 3/2d by default based on their expected dimensions.
* horizontal dimensions are now `lon`, `lat`, but inputs
used by components remain the same (`latitude`, `longitude`).



v.0.14.8
--------

Many of the changes in this version come from changes in Sympl 0.4.0. We recommend
reading those changes in the Sympl documentation.

* Updated component APIs to work with Sympl 0.4.0
* Many components which previously required horizontal dimensions now use
wildcard matches for column dimensions.
* Switched many print statements to logging calls.
* Fixed bugs in some components

Breaking Changes
----------------

* get_constant and set_constant have been removed, use the ones in Sympl.
* Emanuel convection scheme can no longer be set to perform dry adiabatic
adjustment to the boundary layer. This has been implemented in a separate
component.
* ClimtPrognostic, ClimtImplicitPrognostic, ClimtDiagnostic, ClimtImplicit have
been removed. Use the base types in Sympl.
* State initialization has been entirely re-worked. get_default_state now takes in
an optional grid state instead of options to do with the state grid. A function
get_grid is provided which can create a grid state, or one can be created manually.
A grid state is a state containing air pressure and sigma on mid and interface
levels, as well as surface pressure.
* Replaced references to "thermal_capacity" with references to "heat_capacity" in
component quantity names.

v.0.14.7
--------

* Fix issue with pip v10 and pandas 0.22 conflicts

v.0.14.3
--------

* Fix release issue because of pip API change

v.0.14.1
--------
* Fix appveyor fail due to pip changes

v.0.14.0
--------

* Fixed broken version numbers

v.0.12.0
--------

* new release to fix version numbers and create zenodo ID

v.0.9.4
-------

* Added attributes to inputs/outputs/ etc., to work with ScalingWrapper
Added tests as well.
* Added tests for constants functions
* Fixed requirements to ensure this version of climt installs
the correct versions of sympl and numpy.

v.0.9.3
-------

* Released because of a labelling issue. See 0.9.2 for details.

v.0.9.2
--------
* Updated documentation
* Cleaned up examples
* Added (*)_properties as a property to all components
* The gas constant for dry air in the Emanuel scheme is now renamed _Rdair
* RRTMG LW and SW are now OpenMP parallel
* Added Instellation component to calculate zenith angle
* Added tests to increase coverage
* New constants handling functionality added
* Travis builds now use stages
* Appveyor CI up and running
* Pre-installation of cython and numpy no longer necessary for source builds
* Added snow-ice component
* Ozone profiles do not need to be specified externally
* Now also tested on Python 3.6

Breaking Changes
----------------

* API for constants setting changed to `set_constant_from_dict` and `add_constants_from_dict`
* `GfsDynamicalCore` renamed to `GFSDynamicalCore` for consistency
* `get_prognostic_version` method of `ClimtImplicit` renamed to `prognostic_version`, and
no longer accepts timestep as an argument. The current timestep should be set in
`ClimtImplicit.current_time_step` during each iteration.
* `RRTMGShortwave` now uses sympl's solar constant by default instead of from fortran.

v.0.9.1
-------
* Held-Suarez and moist GCM with grey radiation work!
* Added DCMIP initial conditions, test 4 tried out.
* Dynamical core integrated now.
* BIG change in the build system. Tests pass on Mac as well
* Arrays can now have arbitrary dtype (to use qualitative, string, quantities)
* Added Emanuel Convection, surface energy balance model and ice sheet energy balance
* 2D coordinates are now supported for horizontal coordinates
* Replaced create_output_arrays() with a more general
get_state_dict_for() and get_numpy_arrays_from_state()
combination.
* State arrays now have coordinates
* Updated documentation
* RTD finally working, phew!
* Added RRTMG Longwave, Simple Physics
* Added helper functions to reduce boilerplate code in components

Breaking Changes
----------------

Latest
-------

* method to obtain piecewise constant prognostic has been renamed to
:code:`piecewise_constant_version`
* Ozone profile has been modified
* Heating rate for RRTMG top-of-atmosphere is no longer manually set to zero
* Components no longer accept constants during initialisation. All constant handling
is done internally.

v.0.9
------
* SlabSurface no longer uses depth_slab_surface as input
* changed order of outputs of GfsDynamicalCore and SimplePhysics to conform
to TimeStepper order of diagnostics, new_state
* get_default_state now accepts mid_levels and interface_levels instead of z
to specify vertical coordinates.
* mass_to_volume_mixing_ratio now uses numpy arrays instead of DataArrays.

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

climt-0.16.2.tar.gz (20.3 MB view details)

Uploaded Source

Built Distributions

climt-0.16.2-cp37-cp37m-win_amd64.whl (27.5 MB view details)

Uploaded CPython 3.7m Windows x86-64

climt-0.16.2-cp37-cp37m-manylinux1_x86_64.whl (24.8 MB view details)

Uploaded CPython 3.7m

climt-0.16.2-cp37-cp37m-macosx_10_6_intel.whl (23.8 MB view details)

Uploaded CPython 3.7m macOS 10.6+ intel

climt-0.16.2-cp36-cp36m-win_amd64.whl (27.5 MB view details)

Uploaded CPython 3.6m Windows x86-64

climt-0.16.2-cp36-cp36m-manylinux1_x86_64.whl (24.8 MB view details)

Uploaded CPython 3.6m

climt-0.16.2-cp36-cp36m-macosx_10_6_intel.whl (23.8 MB view details)

Uploaded CPython 3.6m macOS 10.6+ intel

climt-0.16.2-cp35-cp35m-manylinux1_x86_64.whl (24.7 MB view details)

Uploaded CPython 3.5m

climt-0.16.2-cp27-cp27mu-manylinux1_x86_64.whl (24.7 MB view details)

Uploaded CPython 2.7mu

climt-0.16.2-cp27-cp27m-manylinux1_x86_64.whl (24.7 MB view details)

Uploaded CPython 2.7m

File details

Details for the file climt-0.16.2.tar.gz.

File metadata

  • Download URL: climt-0.16.2.tar.gz
  • Upload date:
  • Size: 20.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.3

File hashes

Hashes for climt-0.16.2.tar.gz
Algorithm Hash digest
SHA256 191a7c7dcb1d61a73cefd6dde5d663eb774a97b8aca1292a1034e4c05e45fcac
MD5 a8488422e092e5142144231b5a954763
BLAKE2b-256 0763e406052d2ae5e795174b2e003ce29ced490395adea1de69e167d0d8ce42e

See more details on using hashes here.

File details

Details for the file climt-0.16.2-cp37-cp37m-win_amd64.whl.

File metadata

  • Download URL: climt-0.16.2-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 27.5 MB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2

File hashes

Hashes for climt-0.16.2-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 380af287cd277f42133a73a8be8f33a151086f9169e83171320b83f36e9d811f
MD5 6c03822d5cc575c8cfa37f0b16cfed59
BLAKE2b-256 7471dec1a128f922edf802672db5e52465d9c0fd3302d2858fb90a8fa1fd7a08

See more details on using hashes here.

File details

Details for the file climt-0.16.2-cp37-cp37m-manylinux1_x86_64.whl.

File metadata

  • Download URL: climt-0.16.2-cp37-cp37m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 24.8 MB
  • Tags: CPython 3.7m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.3

File hashes

Hashes for climt-0.16.2-cp37-cp37m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 605180dd11e4356bc7ddc6709bd772899c2e059c5935edf5400914c40fc3069f
MD5 61648491bcf1b6e73a4504c111e9cd20
BLAKE2b-256 3fb7b9e3d5719af03f88ee93dfecd9cf36a990a0dc73a309df05da1dd36ae86c

See more details on using hashes here.

File details

Details for the file climt-0.16.2-cp37-cp37m-macosx_10_6_intel.whl.

File metadata

  • Download URL: climt-0.16.2-cp37-cp37m-macosx_10_6_intel.whl
  • Upload date:
  • Size: 23.8 MB
  • Tags: CPython 3.7m, macOS 10.6+ intel
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.1

File hashes

Hashes for climt-0.16.2-cp37-cp37m-macosx_10_6_intel.whl
Algorithm Hash digest
SHA256 103c8876db4e7d5c4ca99059aaf169cae262ac81c496a7227af8fdc1aef3a171
MD5 15e6c2dc7840ebedc2397898e6a3d032
BLAKE2b-256 3fae279b8d6f6fc56e624be488e19527e9d709f1e18322b501e705c27a6e5c5b

See more details on using hashes here.

File details

Details for the file climt-0.16.2-cp36-cp36m-win_amd64.whl.

File metadata

  • Download URL: climt-0.16.2-cp36-cp36m-win_amd64.whl
  • Upload date:
  • Size: 27.5 MB
  • Tags: CPython 3.6m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.8

File hashes

Hashes for climt-0.16.2-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 858b173a36a2be718a70fc41596ad47ddb49613b0519a0234b76c7d146548bad
MD5 4a8b698a00a9bfb011915b6a561efe79
BLAKE2b-256 8d946a727c6d3de184c7978206ad34921f3f10a219464859cc0504d413756c9e

See more details on using hashes here.

File details

Details for the file climt-0.16.2-cp36-cp36m-manylinux1_x86_64.whl.

File metadata

  • Download URL: climt-0.16.2-cp36-cp36m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 24.8 MB
  • Tags: CPython 3.6m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.3

File hashes

Hashes for climt-0.16.2-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 13c07e838fe6ebafb19bdfdeb6f2f57be529196e3c0af35074655cb1e7463cfc
MD5 e6d9eda7ff0caa09272d52aef715abba
BLAKE2b-256 3ccf0b1ba4de444600c587e76fe86a9d6c6d2b23f513f2f7b80e0884e29146f4

See more details on using hashes here.

File details

Details for the file climt-0.16.2-cp36-cp36m-macosx_10_6_intel.whl.

File metadata

  • Download URL: climt-0.16.2-cp36-cp36m-macosx_10_6_intel.whl
  • Upload date:
  • Size: 23.8 MB
  • Tags: CPython 3.6m, macOS 10.6+ intel
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.1

File hashes

Hashes for climt-0.16.2-cp36-cp36m-macosx_10_6_intel.whl
Algorithm Hash digest
SHA256 b4eaa0031c20e05dfd12eb77fc73caa21669537f5df496996b99ebb64f32c31f
MD5 c51b57677caf97496d90a92761ddbe1e
BLAKE2b-256 12a9408c7a217da79e5136674b000698d5911ee7a2a7147c7fcad3b750db1e4e

See more details on using hashes here.

File details

Details for the file climt-0.16.2-cp35-cp35m-manylinux1_x86_64.whl.

File metadata

  • Download URL: climt-0.16.2-cp35-cp35m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 24.7 MB
  • Tags: CPython 3.5m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.3

File hashes

Hashes for climt-0.16.2-cp35-cp35m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 767f19ede9d6be49a0079e8bbe714abe91bfdc7b8a234e0822d1a9e9a82fe51d
MD5 1ae38e0e7fca303ecc2bc6028e1e5f4b
BLAKE2b-256 2b18d98200029cae7efcf7bc167943ca40aeb928e9f39bd7292576bdfe483693

See more details on using hashes here.

File details

Details for the file climt-0.16.2-cp27-cp27mu-manylinux1_x86_64.whl.

File metadata

  • Download URL: climt-0.16.2-cp27-cp27mu-manylinux1_x86_64.whl
  • Upload date:
  • Size: 24.7 MB
  • Tags: CPython 2.7mu
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.3

File hashes

Hashes for climt-0.16.2-cp27-cp27mu-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 0391df3988cfc78ad4a4fa7500f69e1b51f744b2ed5bd4b7394f79dc3e8d7ce5
MD5 fbb28219ac803035da19499d354edc3b
BLAKE2b-256 0406e33d3745fc35727d7383c9093d5ee48f16d32c9188a15f9d5a3ed0a50bb4

See more details on using hashes here.

File details

Details for the file climt-0.16.2-cp27-cp27m-manylinux1_x86_64.whl.

File metadata

  • Download URL: climt-0.16.2-cp27-cp27m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 24.7 MB
  • Tags: CPython 2.7m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.3

File hashes

Hashes for climt-0.16.2-cp27-cp27m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 eb134c0be6042403e17470ca97202ebabf40dad5794c4ffc51024b52ed02c5fd
MD5 883377f09bed8d432aada28d84605cd1
BLAKE2b-256 a74b23c01074881f7c819e0354bbee7b6a5b9201111ef8e004cece9fb1b2a161

See more details on using hashes here.

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