- Notifications
You must be signed in to change notification settings - Fork7
TEB-model/teb
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Overview |Prerequisites |Installation |Documentation |Example application |Testing |How to cite |Contributing |Copyright and license
This enhanced software and platform for TEB (Town Energy Balance;Masson, 2000 and subsequent papers), is intended to help scientists and practitioners wishing to use the TEB model in their research as a standalone software application or as a library (e.g.WRF-TEB) to calculate the urban surface energy balance at neighborhood scale assuming a simplified canyon geometry.
- Git >= 2
- CMake >= 3.1
- A Recent version of GNU/Intel/Cray Fortran compiler
- Python >= 3.7 [Optional for testing and tutorial]
To build the Town Energy Balance (TEB) executable and library on Windows, Linux and macOS, clone this repository and run the following commands from your command prompt:
mkdir buildcd buildcmake -DCMAKE_BUILD_TYPE=Release ..cmake --build .
By default, we set the real type to an 8 byte wide. This behavior is controlled by the optionalUSE_REAL8
flag (default ON).Ninja support is avalable and can be specified with the generator flag-G
at configure time (e.g.cmake -GNinja -DCMAKE_BUILD_TYPE=Release ..
).
Note for Windows Users
Make sure you have installed the Intel® Visual Studio Integration plugins or CMake will not be able to identify your compiler (No CMAKE_Fortran_COMPILER could be found
error).Make sure that you use Intel® Command-Line Window when launching CMake - The Intel® compiler provides a command-line window with the appropriate environment variables already set (see:Using the Intel® Command-Line Window).You may also need to specify the generator flag-G
in CMake; for example, if you are using Intel® Command-Line Window for Visual Studio 2017, then the CMake command should now becmake -G "Visual Studio 15 2017 Win64" ..
. For more information on how to specify generators in CMake seecmake-generators
E.g. on Windows using Intel® Command-Line Window for Visual Studio 2017:
mkdir build && cd buildcmake-G"Visual Studio 15 2017 Win64" ..cmake--build .
This section includes links to software and model documentation. If you are new to TEB and simply looking to easily get started, please refer to theexample application instead.
Seesoftware documentation for a general overview. For configuration options available at runtime please refer tonamelist options.
The complete scientific documentation is included in theSURFEX scientific documentation.
The code browser is available athttps://teb-model.github.io/teb.
To get started with TEB, seeexamples/CAPITOUL/README.md
. The folder contains a simple tutorial inJupyter Notebook to estimate the buildings' power demand for cooling using TEB and data and parameters from the CAPITOUL (Canopy and Aerosol Particles Interactions in TOulouse Urban Layer;Masson et al., 2008) campaign.
Tests are run using the CAPITOUL data provided inexamples/CAPITOUL
. Tests are found intests/tests.py
and an overview is given intests/README.md
. All tests are automatically run at every commit using Continuos Integration. If you are looking to run your tests locally on Linux or macOS, first make sure you have installed all theprerequisites, then from the command prompt:
python -m pip install -r requirements.txtpython tests/test.py --build_type=<BUILD_TYPE> --case=<TEST_CASE>
where<BUILD_TYPE>
is eitherDebug
orRelease
and<TEST_CASE>
is the test case currently supported intests/test.py
-- seetests/README.md
for more information. The output files are written totemp
. Plots are written toplots
.
E.g.
python -m pip install -r requirements.txtpython tests/test.py --build_type=Debug --case=integration
When using the TEB software, please cite both model, and software (with version) as follows:
Physical model | This software | Version* |
---|---|---|
Masson, 2000 | Meyer et al., 2020 | see Zenodo |
The corresponding reference list should be as follows:
Masson, V., 2000: A Physically-Based Scheme For The Urban Energy Budget In Atmospheric Models. Boundary-Layer Meteorology, 94, 357–397,https://doi.org/10.1023/A:1002463829265.
Meyer, D., Schoetter, R., Masson, V., Grimmond, S., 2020: Enhanced software and platform for the Town Energy Balance (TEB) model. Journal of Open Source Software, 5(50), 2008.https://doi.org/10.21105/joss.02008.
*please make sure to cite the same version you are using with the correct DOI. For a list of all available versions see the list of versions onZenodo.
Please see theCONTRIBUTING.md file.
Copyright stated at the top of source files. Software released underCeCILL version 2.1.
About
🏘️ The Town Energy Balance (TEB) model software and platform