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 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 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