MicroHH
A computational fluid dynamics code designed to simulate turbulent flows in the atmosphere using the Direct Numerical Simulation and Large-Eddy Simulation techniques.
https://github.com/microhh/microhh
Category: Atmosphere
Sub Category: Atmospheric Composition and Dynamics
Keywords from Contributors
radiative-transfer climate-model
Last synced: about 6 hours ago
JSON representation
Repository metadata
Computational fluid dynamics code for simulation of turbulent flows in the atmospheric boundary layer
- Host: GitHub
- URL: https://github.com/microhh/microhh
- Owner: microhh
- License: gpl-3.0
- Created: 2013-11-27T18:09:25.000Z (over 12 years ago)
- Default Branch: main
- Last Pushed: 2026-02-04T09:29:37.000Z (about 2 months ago)
- Last Synced: 2026-02-04T22:04:03.675Z (about 2 months ago)
- Language: C++
- Homepage: microhh.org
- Size: 198 MB
- Stars: 151
- Watchers: 9
- Forks: 65
- Open Issues: 41
- Releases: 0
-
Metadata Files:
- Readme: README.md
- License: COPYING
README.md
MicroHH
MicroHH is a computational fluid dynamics code designed to simulate turbulent flows in the atmosphere using the Direct Numerical Simulation (DNS) and Large-Eddy Simulation (LES) techniques. Its can do idealized flows, but also realistic atmospheric boundary layers with all relevant processes, including moist thermodynamics, radiation, land surface processes, and microphysics. MicroHH is written in C++/CUDA and runs on both CPUs and GPUs using single or double precision floating point numbers.
A tutorial and documentation is available at: https://microhh.readthedocs.io/en/latest/.
Visualizations are found in our Vimeo channel: https://vimeo.com/channels/microhh.
MicroHH is described in detail in Van Heerwaarden et al. (2017). In case you decide to use MicroHH for your own research, the developers would appreciate to be notified and kindly request to cite their reference paper. The version described in the reference paper has been assigned a DOI via Zenodo.
Requirements
In order to compile MicroHH you need:
- C++ compiler
- FFTW3 libraries
- Boost libraries
- NetCDF4
- CMake
- MPI2/3 implementation (optional for MPI support)
- CUDA (optional for GPU support)
- Python + numpy + python-netcdf4 (optional for running example cases)
- Ipython + python-netcdf4 + matplotlib (optional for plotting results example cases)
Downloading the code
MicroHH includes Git submodules, so it is essential to ensure these are downloaded properly when cloning the code. Check out the code with all submodules included using:
git clone --recurse-submodules https://github.com/microhh/microhh.git
If you get compilation errors related to missing RTE+RRTMGP source files, you probably forgot the --recurse-submodules flag. You can correct that with:
git submodule update --init --recursive
Compilation of the code
First, enter the config directory:
cd config
Here, you find a potential series of settings with the extension .cmake for different systems. Check whether your system is there. If not, you can try the generic configuration (generic.cmake), or create a file with the correct compiler settings and the proper location for all libraries on your system. Then, copy your system file to default.cmake, for example:
cp generic.cmake default.cmake
Then, go back to the main directory and create a subdirectory with an arbitrary name in which you will compile the code. Let us assume this directory is called "build":
cd ..
mkdir build
cd build
From this directory, run cmake with the suffix .. to point to the parent directory where the CMakeLists.txt is found. This builds the model without Message Passing Interface (MPI) and CUDA support, using double precision floating point numbers.
cmake ..
In case you prefer to enable either MPI, CUDA, or single precision (4 byte) floating point numbers, run cmake with the following flags:
cmake .. -DUSEMPI=TRUE
or
cmake .. -DUSECUDA=TRUE
or
cmake .. -DUSESP=TRUE
Some combinations are possible, such as:
cmake .. -DUSEMPI=TRUE -DUSESP=TRUE
However, the combination of -DUSEMPI with -DUSECUDA is not (yet) supported.
NOTE: once the build has been configured and you wish to change the USECUDA, USEMPI, or USESP setting, you must delete the content of the build directory, or create an additional empty directory from which cmake is run.)
With the previous command you have triggered the build system and created the make files, if the default.cmake file contains the correct settings. Now, you can start the compilation of the code and create the microhh executable with:
make -j 2
Your directory should contain a file named microhh now. This is the main executable.
Running an example case
To start one of the included test cases, go back to the main directory and open the directory cases. Here, a collection of test cases has been included. In this example, we start the drycblles case, a simple large-eddy simulation of a dry convective boundary layer.
cd cases/drycblles
First, we have to create the vertical profiles for our prognostic variables:
python drycblles_input.py
Then, we have to copy or link the microhh executable to the current directory. Here we assume the executable is in the build directory that we have created before.
cp ../../build/microhh .
Now, we can start microhh in initialization mode to create the initial fields:
./microhh init drycblles
If everything works out properly, a series of files has been created. The model can be started now following:
./microhh run drycblles
This will take some time. Now, a statistics file called drycblles.default.0000000.nc has been created. You can open this file with your favorite plotting tool, or run some example plots using the provided plotting script that uses Python and matplotlib. This is most easily done in interactive python:
ipython
run drycbllesstats
This should show you a set of basic plots. Congratulations, you have just completed your first run of MicroHH.
Happy MicroHHing!
Contributing
If you are planning to contribute code to MicroHH, first of all: thanks! But please consider a few things:
- For eventual merging of contributions into the main code, we use the pull request feature of Github. For this, you need to make of fork of the MicroHH repository in your own Github account, and commit the changes there, before creating a pull request.
- If you plan to make major changes to the code or code structure, it might be wise to discuss them with the main MicroHH devs, for example by opening an issue on Github.
- We like to keep our code structured and clean, so please stick to the MicroHH coding conventions.
- Be careful with what you add and commit to Git. Accidentally adding/committing some large binaries or MicroHH executables is an easy mistake, but even if you later remove the files in a new commit, the files will stay in the history of the repository, making the repository unnecessary bloaty.
Current and previous contributors to MicroHH can be found here
Owner metadata
- Name: MicroHH
- Login: microhh
- Email:
- Kind: organization
- Description:
- Website:
- Location:
- Twitter:
- Company:
- Icon url: https://avatars.githubusercontent.com/u/6048730?v=4
- Repositories: 7
- Last ynced at: 2023-08-06T10:39:13.892Z
- Profile URL: https://github.com/microhh
GitHub Events
Total
- Delete event: 2
- Pull request event: 54
- Fork event: 5
- Issues event: 37
- Watch event: 25
- Issue comment event: 90
- Push event: 42
- Pull request review event: 2
- Pull request review comment event: 2
- Create event: 6
Last Year
- Delete event: 2
- Pull request event: 7
- Fork event: 4
- Issues event: 12
- Watch event: 15
- Issue comment event: 29
- Push event: 16
- Create event: 6
Committers metadata
Last synced: 2 days ago
Total Commits: 5,530
Total Committers: 37
Avg Commits per committer: 149.459
Development Distribution Score (DDS): 0.415
Commits in past year: 19
Committers in past year: 4
Avg Commits per committer in past year: 4.75
Development Distribution Score (DDS) in past year: 0.211
| Name | Commits | |
|---|---|---|
| Chiel van Heerwaarden | c****n@g****m | 3237 |
| Bart van Stratum | b****t@v****m | 1626 |
| Thijs Heus | 6****s | 386 |
| Mirjam Tijhuis | m****s@w****l | 43 |
| Thijs Heus | c****0@o****u | 43 |
| stijn | s****s@e****l | 41 |
| Menno Veerman | m****n@i****l | 18 |
| Ubuntu | m****o@e****t | 16 |
| Steven van der Linden | s****n@t****l | 16 |
| Jeremy Gibbs | j****s@u****u | 15 |
| Menno | m****n@w****l | 13 |
| Menno Veerman | m****n@i****l | 11 |
| elynn | e****0@g****m | 10 |
| JacobHA | j****k@g****m | 9 |
| Steven van der Linden | S****n | 8 |
| wouter | w****l@w****l | 5 |
| Bart van Stratum | b****t@B****l | 4 |
| Mirjam Tijhuis | m****s@i****l | 4 |
| Wouter | w****l@g****m | 3 |
| Eckhard Dietze | e****e@m****g | 3 |
| Bart van Stratum | 1****m | 2 |
| Ivan Bastak Duran | b****u@i****e | 2 |
| Bart van Stratum | b****m@g****l | 1 |
| Bart van Stratum | b****m@i****l | 1 |
| Bart van Stratum | m****1@m****e | 1 |
| Bart van Stratum | m****1@m****e | 1 |
| Bart van Stratum | s****2@i****l | 1 |
| Girish Nigamanth Raghunathan | g****h@c****u | 1 |
| Menno Veerman | m****n@g****l | 1 |
| Menno Veerman | m****n@i****l | 1 |
| and 7 more... | ||
Committer domains:
- wur.nl: 3
- int1.local.snellius.surf.nl: 3
- int3.local.snellius.surf.nl: 2
- int4.local.snellius.surf.nl: 2
- vanstratum.com: 1
- owens-rw01.ten.osc.edu: 1
- esciencecenter.nl: 1
- euw-vm-mv-slocs-o.vshf4n5etsvunkaa3ghannegbh.ax.internal.cloudapp.net: 1
- tudelft.nl: 1
- utah.edu: 1
- mailbox.org: 1
- iau.uni-frankfurt.de: 1
- gcn29.local.snellius.surf.nl: 1
- mlogin102.hpc.dkrz.de: 1
- mlogin103.hpc.dkrz.de: 1
- cumulus.csuohio.edu: 1
- gcn23.local.snellius.surf.nl: 1
- int2.local.snellius.surf.nl: 1
- int5.local.snellius.surf.nl: 1
- int6.local.snellius.surf.nl: 1
- cirrus-login2.ccs.ornl.gov: 1
- euw-vm-testvm.vshf4n5etsvunkaa3ghannegbh.ax.internal.cloudapp.net: 1
Issue and Pull Request metadata
Last synced: about 6 hours ago
Total issues: 47
Total pull requests: 63
Average time to close issues: 11 months
Average time to close pull requests: 12 days
Total issue authors: 8
Total pull request authors: 8
Average comments per issue: 0.66
Average comments per pull request: 0.62
Merged pull request: 40
Bot issues: 0
Bot pull requests: 0
Past year issues: 7
Past year pull requests: 3
Past year average time to close issues: 24 days
Past year average time to close pull requests: N/A
Past year issue authors: 2
Past year pull request authors: 2
Past year average comments per issue: 0.57
Past year average comments per pull request: 0.0
Past year merged pull request: 0
Past year bot issues: 0
Past year bot pull requests: 0
Top Issue Authors
- julietbravo (26)
- bartvstratum (12)
- Chiil (3)
- llsalazar (2)
- Kairzhan (1)
- SarahWarnau (1)
- tzhang-ccs (1)
- thijsheus (1)
Top Pull Request Authors
- julietbravo (19)
- bartvstratum (15)
- Chiil (13)
- thijsheus (7)
- MennoVeerman (4)
- WBMol (2)
- MirjamTijhuis (2)
- Tris48 (1)
Top Issue Labels
- enhancement (18)
- bug (15)
- discussion (4)
Top Pull Request Labels
- enhancement (14)
- bug (8)
Score: 8.868413284672005