Skip to content

Commit

Permalink
Updating README to include Conda package install details
Browse files Browse the repository at this point in the history
  • Loading branch information
samharrison7 committed Jul 7, 2024
1 parent 280a5ec commit 500cb45
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 8 deletions.
35 changes: 29 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,35 @@ The NanoFASE Data module is a set of scripts to compile and edit input data for

## Getting started

The easiest way to use the library is to [install it from PyPI](https://pypi.org/project/nfdata/). For example, using pip:
The package is available on [PyPI](https://pypi.org/project/nfdata/) or [Conda](https://anaconda.org/samharrison7/nfdata), and the easiest way to use the package is to install one of these using Pixi, Conda/Mamba or Pip.

```bash
Conda:

```console
$ conda install -c samharrison7 nfdata
```

Mamba:
```console
$ mamba install -c samharrison7 nfdata
```

Pip:
```console
$ pip install nfdata
```

Pixi (global):
```console
$ pixi global install -c samharrison7 nfdata
```

Pixi (project):
```console
$ pixi project channel add samharrison7
$ pixi add nfdata
```

## Usage

```
Expand All @@ -37,7 +60,7 @@ optional arguments:

Specifying the "create" option compiles a new NetCDF dataset and Fortran namelist constant file:

```shell script
```console
$ nfdata create /path/to/config.create.yaml
```

Expand All @@ -49,7 +72,7 @@ The two files will be output to the paths specified in the config file.

To edit an existing NetCDF dataset, specify the "edit" option:

```shell script
```console
$ nfdata edit /path/to/config.edit.yaml
```

Expand All @@ -63,7 +86,7 @@ The Fortran namelist file cannot be edited using this method and you should inst

To simply convert a constants YAML file to a Fortran namelist file, you can use the `constants` option:

```shell script
```console
$ nfdata constants /path/to/constants.yaml -o /path/to/constants.nml
```

Expand All @@ -72,4 +95,4 @@ No config file is required. The location of the newly created constants file is
### Tips
- For the moment, all rasters must be the same CRS as the `flow_dir` raster, and this must be a projected raster. We recommend ESPG:27700 (British National Grid). In addition, all rasters except for `land_use` must be the same resolution as `flow_dir`. They can cover a large geographical region and the module will automatically clip them to the correct size.
- Support for different file types is a bit sporadic at the moment. I suggest sticking the raster files for spatial variables, raster or CSV files for spatiotemporal variables (with 1 file per timestep for raster files) and shapefiles for point sources. You will trigger errors if you use an unsupported file.
- Example input data files are given in `data.example/thames_tio2_2015/`. Running the model using the example config files uses these data.
- Example input data files are given in `data.example/thames_tio2_2015/`. Running the model using the example config files uses these data.
4 changes: 2 additions & 2 deletions rattler.recipe/recipe.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ source:

build:
noarch: python
script: pip install -e .
script: pip install .
python:
entry_points:
- nfdata = nfdata.console:run
Expand Down Expand Up @@ -42,5 +42,5 @@ tests:
about:
homepage: https://github.com/nerc-ceh/nanofase-data
license: BSD-3-Clause
license_file: LICENSE.md
license_file: LICENSE
summary: Compile and edit input data for the NanoFASE model

0 comments on commit 500cb45

Please sign in to comment.