Skip to content

Commit

Permalink
Update installation instructions for conda (#72)
Browse files Browse the repository at this point in the history
  • Loading branch information
tcmetzger authored Dec 11, 2024
1 parent 8cda228 commit fa75f68
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 9 deletions.
38 changes: 32 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,20 +97,46 @@ Currently, the following functions are available in the `pyrte_rrtmgp` package:

<!-- end-rrtmgp-functions-section -->

## Setup Instructions
## Installing pyRTE-RRTMGP

> **Note**:
> The code in this repository is a work in progress. The Python API is not yet stable and is subject to change.
<!-- start-setup-section -->
### Installing with Conda (recommended)

<!-- start-installation-section -->

pyRTE-RRTMGP is available as a [conda package for Linux (x86_64)](https://anaconda.org/conda-forge/pyrte_rrtmgp). You can install it from the `conda-forge` channel:

```bash
conda install -c conda-forge pyrte_rrtmgp
```

This will install the package in your current conda environment. If you want to install the package in a different environment, activate your environment before running the `conda install` command above.

After installing the package, you can import it in your Python code:

```python
import pyrte_rrtmgp
```

For platforms other than Linux for x64 processors, you can build the package from source using the instructions below.

<!-- end-installation-section -->

<!-- start-local-build-section -->

## Building Locally

### Prerequisites

pyRTE-RRTMGP is built on install time. Building the package requires a compatible Fortran compiler, a C++ compiler and CMake to be installed on your system. The package is compatible with POSIX systems and is tested on Linux and macOS using the GNU Fortran compiler (gfortran) and the GNU C++ compiler (g++). The package should also work with the Intel Fortran compiler (ifort) but was not tested with it. If you use ``conda``, the system packages are installed automatically. If you use ``pip``, you need to install those packages yourself (see below).
If you are using a system other than Linux (x86_64) or want to build the package from source, you need to have a compatible Fortran compiler, a C++ compiler and CMake installed on your system.

pyRTE-RRTMGP is compatible with POSIX systems and is tested on Linux and macOS using the GNU Fortran compiler (gfortran) and the GNU C++ compiler (g++). The package should also work with the Intel Fortran compiler (ifort) but was not tested with it. If you use ``conda``, the system packages are installed automatically. If you use ``pip``, you need to install those packages yourself (see below).

The package source code is hosted [on GitHub](https://github.com/earth-system-radiation/pyRTE-RRTMGP). The easiest way to install pyRTE-RRTMGP is to use `git`. You can install git from [here](https://git-scm.com/downloads).

### Installation with conda (recommended)
### Building Locally with Conda (recommended)

Using conda is the recommended method because conda will take care of the system dependencies for you.

Expand Down Expand Up @@ -161,7 +187,7 @@ Using conda is the recommended method because conda will take care of the system
Note: This will install the package in your current conda environment. If you want to install the package in a different environment, activate your environment before running the `conda install` command above.
### Installation with pip
### Building Locally with Pip
You also have the option to build and install the package with pip. This should work with macOS and Linux systems but requires you to install the system dependencies manually.
Expand All @@ -183,7 +209,7 @@ For development purposes, you can install the package in editable mode: ``pip in
Once built, the module will be located in a folder called `pyrte_rrtmgp`
<!-- end-setup-section -->
<!-- end-local-build-section -->
## Pytest Setup Instructions
Expand Down
13 changes: 10 additions & 3 deletions docs/source/user_guide/installation.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
# Installing pyRTE-RRTMGP

This section contains instructions for installing pyRTE-RRTMGP, both for regular usage (with conda) and for development purposes (with pip).
This section contains instructions for installing pyRTE-RRTMGP. On Linux (x86_64) platforms, you can install the package with `conda`. For other platforms, you need to build the package from source.

```{warning}
This project is a work in progress. The Python API is not yet stable and is subject to change.
```

## Installation

```{include} ../../../README.md
:start-after: <!-- start-installation-section -->
:end-before: <!-- end-installation-section -->
```

```{include} ../../../README.md
:start-after: <!-- start-setup-section -->
:end-before: <!-- end-setup-section -->
:start-after: <!-- start-local-build-section -->
:end-before: <!-- end-local-build-section -->
```

0 comments on commit fa75f68

Please sign in to comment.