Skip to content

Commit

Permalink
Iss49 (#50)
Browse files Browse the repository at this point in the history
* Updating examples to avoid using MERIT-Basins links

* Updating copyright dates
  • Loading branch information
kasra-keshavarz authored Jun 25, 2024
1 parent 32a19d2 commit 6d028fa
Show file tree
Hide file tree
Showing 7 changed files with 89 additions and 68 deletions.
25 changes: 14 additions & 11 deletions example/depth-to-bedrock.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# Geospatial Dataset Processing Workflow
# Copyright (C) 2022-2023, University of Saskatchewan
# Copyright (C) 2023, University of Calgary
# Copyright (C) 2023-2024, University of Calgary
#
# This file is part of the Geospatial Dataset Processing Workflow
#
Expand All @@ -19,27 +19,30 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.

# This is a simple example to extract common statistics for the
# pfaf 71 - Saskatchewan-Nelson System Shapefiles of MERIT-Basins -
# from the Depth-to-Bedrock rasters.
# This is a simple example to extract common statistics for the extents
# of pfaf 71 - Saskatchewan-Nelson System Shapefiles of MERIT-Basin
#
# If you have a Shapefile containing polygons, you may able to use
# the `--shapefile` argument to provide the Shapefile instead of spatial
# limits.
#
# If you would like to extract zonal statistics out of polygons, you can
# use the following options as an example:
# --stat="mean,min,max,median,quantile" \
# --quantile="0.1,0.5,0.9" \

# Always call the script in the root directory of this repository
cd ..
echo "The current directory is: $(pwd)"

# first download a sample shapefile - could be any shapefile
wget -m -nd -nv -q -A "cat_pfaf_71_MERIT_Hydro_v07_Basins_v01_bugfix1.*" \
"http://hydrology.princeton.edu/data/mpan/MERIT_Basins/MERIT_Hydro_v07_Basins_v01_bugfix1/pfaf_level_02/";

# implement subsetting and zonal statistics
./extract-gis.sh --dataset="depth-to-bedrock" \
--dataset-dir="/project/rpp-kshook/Model_Output/DTB/" \
--variable="BDRICM_M_10km_ll,BDRLOG_M_10km_ll" \
--shape-file="$(pwd)/cat_pfaf_71_MERIT_Hydro_v07_Basins_v01_bugfix1.shp" \
--lat-lims="44,60" \
--lon-lims="-118,-78" \
--print-geotiff=true \
--output-dir="$HOME/scratch/depth-to-bedrock-test/" \
--prefix="dtb_" \
--stat="mean,min,max" \
--email="[email protected]" \
-j;

24 changes: 14 additions & 10 deletions example/gsde.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# Geospatial Dataset Processing Workflow
# Copyright (C) 2022-2023, University of Saskatchewan
# Copyright (C) 2023, University of Calgary
# Copyright (C) 2023-2024, University of Calgary
#
# This file is part of the Geospatial Dataset Processing Workflow
#
Expand All @@ -19,27 +19,31 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.

# This is a simple example to extract common statistics for the
# pfaf 71 - Saskatchewan-Nelson System Shapefiles of MERIT-Basins -
# from the GSDE rasters.
# This is a simple example to extract common statistics for the extents
# of pfaf 71 - Saskatchewan-Nelson System Shapefiles of MERIT-Basin
#
# If you have a Shapefile containing polygons, you may able to use
# the `--shapefile` argument to provide the Shapefile instead of spatial
# limits.
#
# If you would like to extract zonal statistics out of polygons, you can
# use the following options as an example:
# --stat="mean,min,max,median,quantile" \
# --quantile="0.1,0.5,0.9" \

# Always call the script in the root directory of this repository
cd ..
echo "The current directory is: $(pwd)"

# first download a sample shapefile - could be any shapefile
wget -m -nd -nv -q -A "cat_pfaf_71_MERIT_Hydro_v07_Basins_v01_bugfix1.*" \
"http://hydrology.princeton.edu/data/mpan/MERIT_Basins/MERIT_Hydro_v07_Basins_v01_bugfix1/pfaf_level_02/";

# implement subsetting and zonal statistics
./extract-gis.sh --dataset="GSDE" \
--dataset-dir="/project/rpp-kshook/Model_Output/GSDE/download/gsde-30sec/" \
--variable="BD" \
--shape-file="$(pwd)/cat_pfaf_71_MERIT_Hydro_v07_Basins_v01_bugfix1.shp" \
--lat-lims="44,60" \
--lon-lims="-118,-78" \
--print-geotiff=true \
--output-dir="$HOME/scratch/depth-to-bedrock-test/" \
--prefix="dtb_" \
--stat="mean,min,max" \
--email="[email protected]" \
-j;

29 changes: 16 additions & 13 deletions example/landsat.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# Geospatial Dataset Processing Workflow
# Copyright (C) 2022-2023, University of Saskatchewan
# Copyright (C) 2023, University of Calgary
# Copyright (C) 2023-2024, University of Calgary
#
# This file is part of the Geospatial Dataset Processing Workflow
#
Expand All @@ -19,30 +19,33 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.

# This is a simple example to extract common statistics for the
# pfaf 71 - Saskatchewan-Nelson System Shapefiles of Landsat landcover
# from the MERIT-Hydro rasters.
# This is a simple example to extract common statistics for the extents
# of pfaf 71 - Saskatchewan-Nelson System Shapefiles of MERIT-Basin
#
# If you have a Shapefile containing polygons, you may able to use
# the `--shapefile` argument to provide the Shapefile instead of spatial
# limits.
#
# If you would like to extract zonal statistics out of polygons, you can
# use the following options as an example:
# --stat="mean,min,max,median,quantile" \
# --quantile="0.1,0.5,0.9" \

# Always call the script in the root directory of this repository
cd ..
echo "The current directory is: $(pwd)"

# first download a sample shapefile - could be any shapefile
wget -m -nd -nv -q -A "cat_pfaf_71_MERIT_Hydro_v07_Basins_v01_bugfix1.*" \
"http://hydrology.princeton.edu/data/mpan/MERIT_Basins/MERIT_Hydro_v07_Basins_v01_bugfix1/pfaf_level_02/";


# Example 1: implement subsetting and zonal statistics on 2010 and 2015 landcover datasets
./extract-gis.sh --dataset="landsat" \
--dataset-dir="/project/rpp-kshook/Model_Output/Landsat/" \
--variable="land-cover" \
--shape-file="$(pwd)/cat_pfaf_71_MERIT_Hydro_v07_Basins_v01_bugfix1.shp" \
--lat-lims="44,60" \
--lon-lims="-118,-78" \
--print-geotiff=true \
--output-dir="$HOME/scratch/landsat-test/" \
--prefix="landsat_test_" \
--start-date=2010 \
--end-date=2015 \
--stat="majority,minority,frac" \
[email protected] \
-j;

Expand All @@ -51,10 +54,10 @@ wget -m -nd -nv -q -A "cat_pfaf_71_MERIT_Hydro_v07_Basins_v01_bugfix1.*" \
./extract-gis.sh --dataset="landsat" \
--dataset-dir="/project/rpp-kshook/Model_Output/Landsat/" \
--variable="land-cover-change" \
--shape-file="$(pwd)/cat_pfaf_71_MERIT_Hydro_v07_Basins_v01_bugfix1.shp" \
--print-geotiff=false \
--lat-lims="44,60" \
--lon-lims="-118,-78" \
--output-dir="$HOME/scratch/landsat-test/" \
--prefix="landsat_test_" \
--stat="majority,minority,frac" \
[email protected] \
-j;
28 changes: 16 additions & 12 deletions example/merit-hydro.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# Geospatial Dataset Processing Workflow
# Copyright (C) 2022-2023, University of Saskatchewan
# Copyright (C) 2023, University of Calgary
# Copyright (C) 2023-2024, University of Calgary
#
# This file is part of the Geospatial Dataset Processing Workflow
#
Expand All @@ -19,26 +19,30 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.

# This is a simple example to extract common statistics for the
# pfaf 71 - Saskatchewan-Nelson System Shapefiles of MERIT-Basins -
# from the MERIT-Hydro rasters.
# This is a simple example to extract common statistics for the extents
# of pfaf 71 - Saskatchewan-Nelson System Shapefiles of MERIT-Basin
#
# If you have a Shapefile containing polygons, you may able to use
# the `--shapefile` argument to provide the Shapefile instead of spatial
# limits.
#
# If you would like to extract zonal statistics out of polygons, you can
# use the following options as an example:
# --stat="mean,min,max,median,quantile" \
# --quantile="0.1,0.5,0.9" \

# Always call the script in the root directory of this repository
cd ..
echo "The current directory is: $(pwd)"

# first download a sample shapefile - could be any shapefile
wget -m -nd -nv -q -A "cat_pfaf_71_MERIT_Hydro_v07_Basins_v01_bugfix1.*" \
"http://hydrology.princeton.edu/data/mpan/MERIT_Basins/MERIT_Hydro_v07_Basins_v01_bugfix1/pfaf_level_02/";

# implement subsetting and zonal statistics
./extract-gis.sh --dataset="merit-hydro" \
./extract-gis.sh \
--dataset="merit-hydro" \
--dataset-dir="/project/rpp-kshook/CompHydCore/merit_hydro/raw_data/" \
--output-dir="$HOME/scratch/merit-hydro-test" \
--shape-file="$(pwd)/cat_pfaf_71_MERIT_Hydro_v07_Basins_v01_bugfix1.shp" \
--lat-lims="44,60" \
--lon-lims="-118,-78" \
--print-geotiff=true \
--stat="min,max,mean,median,quantile" \
--quantile="0.1,0.5,0.9" \
--variable="elv,hnd" \
--prefix="merit_test_" \
-j;
Expand Down
24 changes: 14 additions & 10 deletions example/modis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# Geospatial Dataset Processing Workflow
# Copyright (C) 2022-2023, University of Saskatchewan
# Copyright (C) 2023, University of Calgary
# Copyright (C) 2023-2024, University of Calgary
#
# This file is part of the Geospatial Dataset Processing Workflow
#
Expand All @@ -19,28 +19,32 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.

# This is a simple example to extract common statistics for the
# pfaf 71 - Saskatchewan-Nelson System Shapefiles of MERIT-Basins -
# from the MERIT-Hydro rasters.
# This is a simple example to extract common statistics for the extents
# of pfaf 71 - Saskatchewan-Nelson System Shapefiles of MERIT-Basin
#
# If you have a Shapefile containing polygons, you may able to use
# the `--shapefile` argument to provide the Shapefile instead of spatial
# limits.
#
# If you would like to extract zonal statistics out of polygons, you can
# use the following options as an example:
# --stat="mean,min,max,median,quantile" \
# --quantile="0.1,0.5,0.9" \

# Always call the script in the root directory of this repository
cd ..
echo "The current directory is: $(pwd)"

# first download a sample shapefile - could be any shapefile
wget -m -nd -nv -q -A "cat_pfaf_71_MERIT_Hydro_v07_Basins_v01_bugfix1.*" \
"http://hydrology.princeton.edu/data/mpan/MERIT_Basins/MERIT_Hydro_v07_Basins_v01_bugfix1/pfaf_level_02/";

# implement subsetting and zonal statistics
./extract-gis.sh --dataset="modis" \
--dataset-dir="/project/rpp-kshook/Model_Output/MODIS/" \
--variable="MCD12Q1.006" \
--start-date="2001-01-01" \
--lat-lims="44,60" \
--lon-lims="-118,-78" \
--end-date="2002-01-01" \
--shape-file="$(pwd)/cat_pfaf_71_MERIT_Hydro_v07_Basins_v01_bugfix1.shp" \
--print-geotiff=true \
--output-dir="$HOME/scratch/modis-test/" \
--prefix="test_" \
--stat="majority,minority,frac" \
-j;

25 changes: 14 additions & 11 deletions example/soil-grids.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# Geospatial Dataset Processing Workflow
# Copyright (C) 2022-2023, University of Saskatchewan
# Copyright (C) 2023, University of Calgary
# Copyright (C) 2023-2024, University of Calgary
#
# This file is part of the Geospatial Dataset Processing Workflow
#
Expand All @@ -19,27 +19,30 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.

# This is a simple example to extract common statistics for the
# pfaf 71 - Saskatchewan-Nelson System Shapefiles of MERIT-Basins -
# from the MERIT-Hydro rasters.
# This is a simple example to extract common statistics for the extents
# of pfaf 71 - Saskatchewan-Nelson System Shapefiles of MERIT-Basin
#
# If you have a Shapefile containing polygons, you may able to use
# the `--shapefile` argument to provide the Shapefile instead of spatial
# limits.
#
# If you would like to extract zonal statistics out of polygons, you can
# use the following options as an example:
# --stat="mean,min,max,median,quantile" \
# --quantile="0.1,0.5,0.9" \

# Always call the script in the root directory of this repository
cd ..
echo "The current directory is: $(pwd)"

# first download a sample shapefile - could be any shapefile
wget -m -nd -nv -q -A "cat_pfaf_71_MERIT_Hydro_v07_Basins_v01_bugfix1.*" \
"http://hydrology.princeton.edu/data/mpan/MERIT_Basins/MERIT_Hydro_v07_Basins_v01_bugfix1/pfaf_level_02/";

# implement subsetting and zonal statistics
./extract-gis.sh --dataset="soil-grids-v1" \
--dataset-dir="/project/rpp-kshook/Model_Output/SoilGridsV1/soilgrids/former/2017-03-10/data" \
--variable="BDRICM_M_250m_ll,BLDFIE_M_sl4_250m_ll" \
--shape-file="$(pwd)/cat_pfaf_71_MERIT_Hydro_v07_Basins_v01_bugfix1.shp" \
--lat-lims="44,60" \
--lon-lims="-118,-78" \
--print-geotiff=true \
--output-dir="$HOME/scratch/soil-grids-test/" \
--prefix="test_" \
--stat="mean,min,max,median,quantile" \
--quantile="0.1,0.5,0.9" \
-j;

2 changes: 1 addition & 1 deletion soil_grids/soil_grids_v1.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Geospatial Data Processing Workflow
# Copyright (C) 2021, Wouter Knoben
# Copyright (C) 2022-2023, University of Saskatchewan
# Copyright (C) 2023, University of Calgary
# Copyright (C) 2023-2024, University of Calgary
#
# This file is part of Geospatial Data Processing Workflow
#
Expand Down

0 comments on commit 6d028fa

Please sign in to comment.