The Earth Science Box Modeling Toolkit
Project description
- ESBMTK - An Earth-sciences box modeling toolkit
- News
- Contributing
- Installation
- Documentation
- Todo
- License
ESBMTK - An Earth-sciences box modeling toolkit
ESBMTK is a python library that aims to simplify typical box modeling projects in the Earth-Sciences. The basic API is now stable, but the code to deploy complex models is still being improved.
News
-
Oct. 30th, 2023 v 0.10.0.11 This is a breaking change. Remineralization and photosynthesis must be implemented via functions, rather than transport connections. CS1 and CS2 are retired, and replaced by photosynthesis, organic-matter remineralization and carbonate-dissolution functions. I've started writing a user guide, see the
/scr/Documentation
folder. So far, only the very basics are covered. More to come! -
July 28th, 2023, v 0.9.0.1 The ODEPACk backend is now fully functional, and the basic API is more or less stable.
-
Nov. 11th 2022, v 0.9.0.0 Moved to odepack based backend. Removed now defunct code. The odepack backend does not yet support isotope calculations.
-
0.8.0.0
- Cleanup of naming scheme which is now strictly hierarchical.
- Bulk connection dictionaries now have to be specified as
source_to_sink
instead ofsource2sink
. - The connection naming scheme has been revamped. Please see
esbmtk.connect.__set_name__()
documentation for details. - Model concentration units must now match 'mole/liter' or 'mol/kg'. Concentrations can still be specified as
mmol/l
ormmol/kg
, but model output will be in mole/liter or kg. At present, the model does not provide for the automatic conversion of mol/l to mol/kg. Thus you must specify units in a consistent way. - The SeawaterConstants class now always returns values as mol/kg solution. Caveat Emptor.
- The SeawaterConstants class no longer accepts the 'model' keyword
- All of his will break existing models.
- Models assume by default that they deal with ideal water, i.e., where the density equals one. To work with seawater, you must set
ideal_water=False
. In that case, you should also set theconcentration_unit
keyword to'mol/kg'
(solution). - Several classes now require the "register" keyword. You may need to fix your code accordingly
-
The flux and connection summary methods can be filtered by more than one keyword. Provide a filter string in the following format
"keyword_1 keyword_2
and it will only return results that match both keywords. -
Removed the dependency on the nptyping and number libraries
-
0.7.3.9 Moved to setuptools build system. Lost of code fixes wrt isotope calculations, minor fixes in the carbonate module.
-
March 2nd 0.7.3.4
Flux_summary
now supports anexclude
keyword. Hot fixed an error in the gas exchange code, which affected the total mass of atmosphere calculations. For the time being, the mass of the atmosphere is treated as constant. -
0.7.3.0 Flux data is no longer kept by default. This results in huge memory savings. esbmtk now requires python 3.9 or higher, and also depends on
os
andpsutil
. the scale with flux process now uses theref_flux
keyword instead ofref_reservoirs
. Models must adapt their scripts accordingly. esbmtk objects no longer provide delta values by default. Rather they need to be calculated in the post-processing step viaM.get_delta_values()
. Thef_0
keyword in the weathering connection is now calledrate
. Using the old keyword will result in a unit error. -
January 8th 0.7.2.2 Fixed several isotope calculation regressions. Added 31 Unit tests.
Older releases are mentioned in the Release History.
Contributing
Don't be shy. Contributing is as easy as finding bugs by using the code, or maybe you want to add a new process code?
Installation
ESBMTK relies on the following python versions and libraries
- python >= 3.9
- matplotlib
- numpy
- pandas
- typing
- pint
If you work with conda, it is recommended to install the above via conda. If you work with pip, the installer should install these libraries automatically. ESBMTK itself can be installed with pip
- pip install esbmtk
Documentation
I've started writing a tutorial on how to use the package: https://github.com/uliw/esbmtk/blob/master/src/esbmtk/Documentation/ESBMTK-Tutorial.org
The tutorial is also available as jupyter notebook, and code samples are provided as well. All ESBMTk classes have extensive help texts that you can access through the usual help command. Note however, that some of these help-texts are out of date. I am however in the process to update these.
Todo
- expand the documentation
- provide more examples
- do more testing
License
ESBMTK: A general purpose Earth Science box model toolkit Copyright (C), 2020 Ulrich G. Wortmann
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file esbmtk-0.10.0.11.tar.gz
.
File metadata
- Download URL: esbmtk-0.10.0.11.tar.gz
- Upload date:
- Size: 564.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9eebbb8a1f6e851301ee96b6015160f4fcbd046066d6642887b4295b876ca8a8 |
|
MD5 | eb5f1e49231575061293a6c981d2895b |
|
BLAKE2b-256 | aec6d2a5aad88e8a33b99c478aab4497d341ada82a33b986d3da58ed6a61be4f |
File details
Details for the file esbmtk-0.10.0.11-py3-none-any.whl
.
File metadata
- Download URL: esbmtk-0.10.0.11-py3-none-any.whl
- Upload date:
- Size: 557.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 18a4c45b22b5204869ce0da4c7933399638d42f9102a08a19863292c14293c53 |
|
MD5 | e57ac9b65a9c07c8b35da3ac179fc4f2 |
|
BLAKE2b-256 | 9f6d533548a74db09242278560f8ea323c18072057dde2dd58a56ab161d0c2c6 |