From 55b39958149c404e3dd76e7aa84ddcee41198125 Mon Sep 17 00:00:00 2001 From: jsadler2 Date: Fri, 8 Apr 2022 11:18:37 -0500 Subject: [PATCH 1/3] [#7] add snakemake, git to environment.yml --- environment.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/environment.yml b/environment.yml index 01865d3..7ba5b94 100644 --- a/environment.yml +++ b/environment.yml @@ -1,9 +1,11 @@ -name: gridmet_tools_IS +name: base channels: - conda-forge - defaults + - bioconda dependencies: - python>=3.9.* + - git - pip - click - pygeoapi @@ -28,6 +30,7 @@ dependencies: - geoviews - rioxarray - bottleneck + - snakemake - numba - pip: - git+https://github.com/rmcd-mscb/xagg.git@nc_prep_fix From 4acbb61437fb6419f473c081ec531d6fccea76a4 Mon Sep 17 00:00:00 2001 From: jsadler2 Date: Fri, 8 Apr 2022 11:21:05 -0500 Subject: [PATCH 2/3] [#7] add dockerfile --- Dockerfile | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..a8cca8b --- /dev/null +++ b/Dockerfile @@ -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 From 32428dec58c29d52975dac165de2ed0213c7b927 Mon Sep 17 00:00:00 2001 From: jsadler2 Date: Fri, 8 Apr 2022 11:34:58 -0500 Subject: [PATCH 3/3] [#7] update readme with container instructions --- README.md | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 77c417d..f38c8ad 100644 --- a/README.md +++ b/README.md @@ -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