Skip to content
This repository has been archived by the owner on Jun 2, 2023. It is now read-only.

7 container #15

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
FROM condaforge/mambaforge

COPY environment.yml /tmp/environment.yml

RUN mamba env create -f /tmp/environment.yml && \
mamba clean --all --yes
18 changes: 16 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,22 @@ sph:
* Units: kg/kg


## Running re-gridding for the Delaware River Basin

## running the code
`gridmet_split_script.py` processes the gridmet raster dataset values to the scale of the input multi-polygon shapefile.

`gridmet_aggregation_PRMS.py` processes the output of `gridmet_splot_script.py` and aggregates the PRMS_segid scale calculating an area weighted average.

The snakemake pipeline specified in `Snakefile` will call functions from the .py scripts to aggregate gridmet data to the polygons in the geo file specified. Currently, it's set up to pull the gridmet data from the start of the data archive (1979-01-01) to the present day.

### running with Docker
```
docker run jsadler2/gridmet-agg:v0.1 snakemake
```

### running with Singularity
We have to specify the full path to `snakemake` because it is not part of the system PATH in the Singularity container
```
singularity pull jsadler2/gridmet-agg:v0.1
singularity exec gridmet-agg_v0_1.sif /opt/conda/snakemake
```
>>>>>>> [#7] update readme with container instructions
5 changes: 4 additions & 1 deletion environment.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
name: gridmet_tools_IS
name: base
channels:
- conda-forge
- defaults
- bioconda
dependencies:
- python>=3.9.*
- git
- pip
- click
- pygeoapi
Expand All @@ -28,6 +30,7 @@ dependencies:
- geoviews
- rioxarray
- bottleneck
- snakemake
- numba
- pip:
- git+https://github.com/rmcd-mscb/xagg.git@nc_prep_fix
Expand Down