Skip to main content

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

Project description

climt

PyPI Continuous Integration Continuous Integration Coverage Documentation Status Zenodo DOI ./docs/climt_logo.jpg

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.

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.

History

v.0.16.8

  • Fix timeout for all MAC builds

v.0.16.6

  • Prevent MAC OS builds from timing out

v.0.16.5

  • Fix formatting errors which prevent pypi deployment

v.0.16.4

  • Fix MCICA for the shortwave component of RRTMG

  • Revise random number generation for MCICA

  • Improvement of the user interface to control MCICA

v.0.16.3

  • update numpy requirement to avoid binary incompatibility error

  • Fix error in documentation

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 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.9.tar.gz (20.4 MB view details)

Uploaded Source

Built Distributions

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

Uploaded CPython 3.7m Windows x86-64

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

Uploaded CPython 3.7m

climt-0.16.9-cp37-cp37m-macosx_10_9_x86_64.whl (23.8 MB view details)

Uploaded CPython 3.7m macOS 10.9+ x86-64

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

Uploaded CPython 3.6m Windows x86-64

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

Uploaded CPython 3.6m

climt-0.16.9-cp36-cp36m-macosx_10_9_x86_64.whl (23.8 MB view details)

Uploaded CPython 3.6m macOS 10.9+ x86-64

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

Uploaded CPython 3.5m

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

Uploaded CPython 2.7mu

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

Uploaded CPython 2.7m

File details

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

File metadata

  • Download URL: climt-0.16.9.tar.gz
  • Upload date:
  • Size: 20.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.3

File hashes

Hashes for climt-0.16.9.tar.gz
Algorithm Hash digest
SHA256 5e117a1548e8e683ab50ad1f6421bbffd7f9b7f157d61e5310d4ea87661604c4
MD5 45c142fa3bb4023705d319bb2818c5e0
BLAKE2b-256 ea856941454d54b751fdf4cebb3ef4becea7bb239787ff1828fe74a44d1d4abf

See more details on using hashes here.

File details

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

File metadata

  • Download URL: climt-0.16.9-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.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3

File hashes

Hashes for climt-0.16.9-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 8d965194d37c09f48a7c4fec5814349b296a6517c0d99926165f1cf2ceadb5a3
MD5 6765284896a085614c7304a3be165221
BLAKE2b-256 aca8f70fff7d88a422ba393b8c592fdf1c4e053a0da8e93e31762183a61c88b1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: climt-0.16.9-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.22.0 setuptools/38.2.4 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.3

File hashes

Hashes for climt-0.16.9-cp37-cp37m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 1ecd735b07420caa03848dc201597dcc28254255b0ae94933ab28000e93e1c8e
MD5 975ccaf8617dd50b616ee25a7373df30
BLAKE2b-256 1d4017b79edbd4ef0445e12888340ec9a738a88d7e334ac427738d5725f40c6b

See more details on using hashes here.

File details

Details for the file climt-0.16.9-cp37-cp37m-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: climt-0.16.9-cp37-cp37m-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 23.8 MB
  • Tags: CPython 3.7m, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.2.0.post20200210 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.6

File hashes

Hashes for climt-0.16.9-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 508efa292a2fe5c44d92d7447b4b87e9034f7c4620b412cd4eaf7427f64e354d
MD5 2e520d4471b62dba3630fae681f10070
BLAKE2b-256 c018f8c17ac1597e7c0e87715d8cfca0dec29339c1f2f9f59a57a52fc28dc004

See more details on using hashes here.

File details

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

File metadata

  • Download URL: climt-0.16.9-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.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.8

File hashes

Hashes for climt-0.16.9-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 04c7d8a4bcff3a805db83a22425520a870eeaed0b284f2430c8aef0d6da4a10f
MD5 9a8933e4cab0cabfa3bfbbe4e66a5e86
BLAKE2b-256 38901a7a43e919014017fb8739e84c07974fcc59ffef65670afcc0cbd4571f7f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: climt-0.16.9-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.22.0 setuptools/38.2.4 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.3

File hashes

Hashes for climt-0.16.9-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 d50f8551069c42dd6597eb9113c93182bd6664178afc2cbb15ec159f1ddf4412
MD5 fff9f0651318061d86238398b6fef1fe
BLAKE2b-256 f0686bdd83684449a6e23f43afaa0182660be5f709bc439642ed2812b2f07fc4

See more details on using hashes here.

File details

Details for the file climt-0.16.9-cp36-cp36m-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: climt-0.16.9-cp36-cp36m-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 23.8 MB
  • Tags: CPython 3.6m, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.2.0.post20200210 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.6.10

File hashes

Hashes for climt-0.16.9-cp36-cp36m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 b865cbd149afbf771dd1e0244856c12ca4aec3a6ab892ae627130e11a0f94e04
MD5 1d2478568c5eb1eb28b9d13c571c69f2
BLAKE2b-256 17a8d97d6238f6d7a6cf4fafe431a94d2adc796d2f68e561988a4827d1c32527

See more details on using hashes here.

File details

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

File metadata

  • Download URL: climt-0.16.9-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.22.0 setuptools/38.2.4 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.3

File hashes

Hashes for climt-0.16.9-cp35-cp35m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 455afd3c87eccd3b670bc1ea927160408a137bb7f5d09b39ce8b2e2f71a2f8f6
MD5 0da5eb6daa81881fbcea32fb574ef2ba
BLAKE2b-256 9bbbaa09ca05c6574aedb037d3ba477fdc795f5b8dd2b2828aabcd87bce1c57f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: climt-0.16.9-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.22.0 setuptools/38.2.4 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.3

File hashes

Hashes for climt-0.16.9-cp27-cp27mu-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 88b6eea9d8987e8598fa54e02b50e206783dff3427f0abee5e1aa38e22db3b28
MD5 42a35081135c99d8e19de0aa55d0321e
BLAKE2b-256 409843932f58a12f1eff4eef9b3084c848ea5b6e183d31cafd16a175ae02b623

See more details on using hashes here.

File details

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

File metadata

  • Download URL: climt-0.16.9-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.22.0 setuptools/38.2.4 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.3

File hashes

Hashes for climt-0.16.9-cp27-cp27m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 2712a63eea3d545aee06448efdb5a1fa9a8d654b52bd850d9644290105b27054
MD5 d0af157582f28373bfcb0bc4887b8de7
BLAKE2b-256 081c73e73d38f7e8a3742760f2d663043a0dc7089072a982107f103e5da9b65c

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