Skip to content

Commit

Permalink
Update installation docs (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
tcmetzger authored Mar 22, 2024
1 parent ad9bbab commit c70da7a
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 30 deletions.
44 changes: 24 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,9 @@ Currently, the following functions are available in the `pyrte` package:
The current code in this repo are early experiments with the goal of exploring details fo the Fortran works and testing different options for creating an interface with C.
Later on, we will use this knowledge to bind it with Python

## Prerequisites
### Prerequisites

pyRTE-RRTMGP is currently only tested on x86_64 architecture with Linux and MacOS. The package might also work with other architectures (such as Apple Silicone or Linux ARM), but this is not tested.
pyRTE-RRTMGP is currently only tested on x86_64 architecture with Linux and macOS.

To build and install the package, you need the conda package manager. If you don't have conda installed, you can install it from [here](https://docs.conda.io/en/latest/miniconda.html).

Expand Down Expand Up @@ -151,31 +151,35 @@ The package source code is hosted [on GitHub](https://github.com/earth-system-ra
### Installation with pip
You also have the option to build and install the package with pip. However, this is not recommended as it requires you to have a working Fortran compiler and other prerequisites installed on your system.
You also have the option to build and install the package with pip. This might work on additional, untested architectures (such as macOS on M1). However, this is not recommended as it requires you to have a working Fortran compiler and other prerequisites installed on your system.
To install with pip, you first need to clone the repo (``git clone [email protected]:earth-system-radiation/pyRTE-RRTMGP.git``) and update the submodules (``git submodule update --init --recursive``) as described in the conda installation instructions above.
* To install with pip, you first need to clone the repo (``git clone [email protected]:earth-system-radiation/pyRTE-RRTMGP.git``) and update the submodules (``git submodule update --init --recursive``) as described in the conda installation instructions above.
``` bash
git submodule update --init --recursive
```
``` bash
git submodule update --init --recursive
```
* Install dependencies in your operating system.
* Install dependencies:
With Ubuntu, for example, use:
``` bash
sudo apt install -y \
libnetcdff-dev \
gfortran-10 \
python3-dev \
cmake
```
``` bash
sudo apt install -y \
libnetcdff-dev \
gfortran-10 \
python3-dev \
cmake
```
On other systems, you might be able to install the necessary dependencies with a package manager like `brew`.
* The building of the sources and installation of the packages are handle by `CMakeLists.txt` and automatically called by pip.
* It builds both `rte` and `rrtmgp` and install the python package.
* Compile the Fortran code and build and install the Python package in your current environment with:
``` bash
pip install .
```
``` bash
pip install -e .
```
For development purposes, you can install the package in editable mode: ``pip install -e .``.
Once built, the module will be located in a folder called `pyrte`
Expand Down
21 changes: 11 additions & 10 deletions docs/source/user_guide/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ To install the package, you can clone the repository and build and install the c

## Prerequisites

pyRTE-RRTMGP is currently only tested on x86_64 architecture with Linux and MacOS.
The package might also work with other architectures (such as Apple Silicone or Linux ARM), but this is not tested.
pyRTE-RRTMGP is currently only tested on x86_64 architecture with Linux and macOS.

To build and install the package, you need the conda package manager. If you don't have conda installed, you can install it from [here](https://docs.conda.io/en/latest/miniconda.html).

Expand Down Expand Up @@ -70,15 +69,13 @@ The package source code is hosted [on GitHub](https://github.com/earth-system-ra
## Installation with pip
You also have the option to build and install the package with pip. However, this is not recommended as it requires you to have a working Fortran compiler and other prerequisites installed on your system.
You also have the option to build and install the package with pip. This might work on additional, untested architectures (such as macOS on M1). However, this is not recommended as it requires you to have a working Fortran compiler and other prerequisites installed on your system.
To install with pip, you first need to clone the repo (``git clone [email protected]:earth-system-radiation/pyRTE-RRTMGP.git``) and update the submodules (``git submodule update --init --recursive``) as described in the conda installation instructions (above)[#installation-with-conda-recommended].
Then, make sure you have the necessary dependencies installed:
Then, make sure you have the necessary dependencies installed.
```bash
Then, make sure you have the necessary dependencies installed:
With Ubuntu, for example, use:
```bash
sudo apt install -y \
Expand All @@ -88,10 +85,14 @@ sudo apt install -y \
cmake
```
Next, run pip to compile the Fortran code, build, and install the package:
On other systems, you might be able to install the necessary dependencies with a package manager like `brew`.
Compile the Fortran code and build and install the Python package in your current environment with:
``` bash
pip install -e .
pip install .
```
Once built, the module will be located in a folder called `pyrte`.
For development purposes, you can install the package in editable mode: ``pip install -e .``.
Once built, the module will be located in a folder called `pyrte`

0 comments on commit c70da7a

Please sign in to comment.