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.17.0

  • Removed dycore to move it to independent package

v.0.16.15

  • Move to Github Actions tentatively finished!

v.0.16.11

  • New component BucketHydrology that implements Manabe first generation land model

  • BucketHydrology calculates the sensible and latent heat flux within the component

  • Conservation test for the component also added

  • Moving CI to Github Actions

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 Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

climt-0.17.10-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (9.0 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

climt-0.17.10-cp310-cp310-macosx_10_9_x86_64.whl (7.8 MB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

climt-0.17.10-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (9.0 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

climt-0.17.10-cp39-cp39-macosx_10_9_x86_64.whl (7.8 MB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

climt-0.17.10-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (9.0 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

climt-0.17.10-cp38-cp38-macosx_10_9_x86_64.whl (7.8 MB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

File details

Details for the file climt-0.17.10-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for climt-0.17.10-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e9a5966df21fe1c7fcee7becf29dfc51b54aa153284625a83354875e193e476f
MD5 289c0bed2b129009da023a6df59bb198
BLAKE2b-256 90382ce3eea1a7becf9afd19abf77f873e833b7466e247f2cb5ef7082eb09251

See more details on using hashes here.

File details

Details for the file climt-0.17.10-cp310-cp310-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for climt-0.17.10-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 f9be53accbb2b07e2625bb4f32b0820478c23c7c22226a3c2d745ebde062aa76
MD5 31e1539de4f2861807a03b10e2d86962
BLAKE2b-256 c71bd81c0291bbbae59c4d6f2894a2fe815958bd65d13f5364ee5c49f8e199af

See more details on using hashes here.

File details

Details for the file climt-0.17.10-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for climt-0.17.10-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 45a27933c22b2e32534f0c666281084438d98dee8ed1541db76f35c344e07edb
MD5 4f441a600b10a8f9d89bb223e56d95f9
BLAKE2b-256 b759de9c69217cd07b1916021b358c99edd60364b0b165bde89ee1e6aa7ad86a

See more details on using hashes here.

File details

Details for the file climt-0.17.10-cp39-cp39-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for climt-0.17.10-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 69f6e719303a0150d392b638162175fec3ea1d5bab5205107e962c382e180c67
MD5 7618e135e4a04291a1320d15146d09cd
BLAKE2b-256 ef948b2309fe8079684013f56e19df002762a3be51f04074e957e5248136351e

See more details on using hashes here.

File details

Details for the file climt-0.17.10-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for climt-0.17.10-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b0b7221175346de5ca6f24c45fa7926f7c5b80feb995f55896a7c6649b829412
MD5 4390e75ae618292c2e0c625442a99ed5
BLAKE2b-256 c95156bbfbd1ec9186eb3add394a0706dc1878f632a8a8c0080413b42a9a4851

See more details on using hashes here.

File details

Details for the file climt-0.17.10-cp38-cp38-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for climt-0.17.10-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 ea41be4438cbf0c8e0cbf98ee515bde51c854490e10350e1209f12d088d4c2c0
MD5 974a2759d699e15b7bd8d7a83e376947
BLAKE2b-256 1686b94bcade8339a0d85441338d00d1db9c3af6a6318425a2174f15cc285f82

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