-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into prototype_fields_factory
- Loading branch information
Showing
588 changed files
with
2,133 additions
and
5,949 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,26 +8,18 @@ ICON4Py hosts Python implementations of various components from the ICON climate | |
|
||
The repository is organized into directories, each containing independent Python namespace packages for different ICON components or utility packages. These packages can be installed independently. Since these packages are not available from a package repository (yet), you need to specify the location of dependencies within this repository. This can be done by installing the required dependencies first. Refer to the [Installation instructions](#installation-instructions) below. | ||
|
||
## Installation instructions | ||
|
||
We recommend to use [tox](https://tox.wiki/en/latest/) for the automatic installation of all packages in development mode in a single step: | ||
The `tox.ini` files are located in the `model` and `tools` directories so `tox` needs to be run from there. | ||
|
||
```bash | ||
# Clone the repository | ||
git clone [email protected]:C2SM/icon4py.git | ||
cd icon4py | ||
## License | ||
|
||
# Use tox to create and set up a development environment (usually at `.venv`) in verbose mode | ||
python -m tox -vv -c model/tox.ini -e dev --devenv .venv | ||
ICON4Py is licensed under the terms of the BSD-3-Clause. | ||
|
||
# Activate the virtual environment and check that everything works | ||
source .venv/bin/activate | ||
pytest -v | ||
``` | ||
|
||
If you want to proceed manually, you should install all packages at once by using the provided `requirements.txt` or `requirements-dev.txt` files in the root of the repository. For example: | ||
## Installation instructions | ||
### Dependencies | ||
A minimal installation of ICON4Py needs | ||
- Python 3.10 | ||
- boost >= 1.85.0 | ||
|
||
You can install all packages at once by using the provided `requirements.txt` or `requirements-dev.txt` files in the root of the repository. For example: | ||
The `-dev.txt` file installs ICON4Py packages and GT4Py in editable mode, such that source changes are immediatly picked up and used in the virtual environment. | ||
```bash | ||
# Clone the repository | ||
git clone [email protected]:C2SM/icon4py.git | ||
|
@@ -50,6 +42,25 @@ pytest -v | |
|
||
The `--src _external_src` option tells `pip` to use a specific folder as the base path for checked out sources, which is very convenient for development tasks involving changes in external dependencies like `gt4py`. For convenience, `./_external_src` has been already added to the repository `.gitignore`. | ||
|
||
You can also use [tox](https://tox.wiki/en/latest/) for the automatic installation of all packages in development mode in a single step: | ||
|
||
|
||
```bash | ||
# Clone the repository | ||
git clone [email protected]:C2SM/icon4py.git | ||
cd icon4py | ||
|
||
# Use tox to create and set up a development environment (usually at `.venv`) in verbose mode | ||
pip install tox | ||
python -m tox -vv -e dev --devenv .venv | ||
|
||
# Activate the virtual environment and check that everything works | ||
source .venv/bin/activate | ||
pytest -v | ||
``` | ||
|
||
|
||
|
||
### Installation of specific subpackages | ||
|
||
In case you only want to install a specific subpackage, use the actual subpackage `requirements.txt` or `requirements-dev.txt` files. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,7 @@ | ||
ICON4Py - ICON inspired code in Python and GT4Py | ||
|
||
Copyright (c) 2022, ETH Zurich and MeteoSwiss | ||
Copyright (c) 2022-2024, ETH Zurich and MeteoSwiss | ||
All rights reserved. | ||
|
||
This file 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 any later | ||
version. See the LICENSE.txt file at the top-level directory of this | ||
distribution for a copy of the license or check <https://www.gnu.org/licenses/>. | ||
|
||
SPDX-License-Identifier: GPL-3.0-or-later | ||
Please, refer to the LICENSE file in the root directory. | ||
SPDX-License-Identifier: BSD-3-Clause |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
ICON4Py - ICON inspired code in Python and GT4Py | ||
|
||
Copyright (c) 2022-2024, ETH Zurich and MeteoSwiss | ||
All rights reserved. | ||
|
||
Redistribution and use in source and binary forms, with or without | ||
modification, are permitted provided that the following conditions are | ||
met: | ||
|
||
1. Redistributions of source code must retain the above copyright | ||
notice, this list of conditions and the following disclaimer. | ||
|
||
2. Redistributions in binary form must reproduce the above copyright | ||
notice, this list of conditions and the following disclaimer in the | ||
documentation and/or other materials provided with the distribution. | ||
|
||
3. Neither the name of the copyright holder nor the names of its | ||
contributors may be used to endorse or promote products derived from | ||
this software without specific prior written permission. | ||
|
||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | ||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | ||
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | ||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | ||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | ||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 4 additions & 8 deletions
12
model/atmosphere/advection/src/icon4py/model/atmosphere/advection/btraj_dreg_stencil_01.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 4 additions & 8 deletions
12
model/atmosphere/advection/src/icon4py/model/atmosphere/advection/btraj_dreg_stencil_02.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 4 additions & 8 deletions
12
model/atmosphere/advection/src/icon4py/model/atmosphere/advection/btraj_dreg_stencil_03.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 3 additions & 8 deletions
11
...here/advection/src/icon4py/model/atmosphere/advection/divide_flux_area_list_stencil_01.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 3 additions & 8 deletions
11
...here/advection/src/icon4py/model/atmosphere/advection/divide_flux_area_list_stencil_02.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 4 additions & 8 deletions
12
model/atmosphere/advection/src/icon4py/model/atmosphere/advection/face_val_ppm_stencil_01.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 4 additions & 8 deletions
12
model/atmosphere/advection/src/icon4py/model/atmosphere/advection/face_val_ppm_stencil_02.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 4 additions & 8 deletions
12
...l/atmosphere/advection/src/icon4py/model/atmosphere/advection/face_val_ppm_stencil_02a.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 4 additions & 8 deletions
12
...l/atmosphere/advection/src/icon4py/model/atmosphere/advection/face_val_ppm_stencil_02b.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 4 additions & 8 deletions
12
...l/atmosphere/advection/src/icon4py/model/atmosphere/advection/face_val_ppm_stencil_02c.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 4 additions & 8 deletions
12
model/atmosphere/advection/src/icon4py/model/atmosphere/advection/face_val_ppm_stencil_05.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.