Skip to content
Snippets Groups Projects
Commit c46b4bd9 authored by Neha Hunka's avatar Neha Hunka
Browse files

moving to ecoregions and CCI 2018

parent ec5a8599
No related branches found
Tags AGB_maps
No related merge requests found
Showing
with 3348 additions and 432 deletions
......@@ -8,15 +8,16 @@
# Rscript /projects/biomass_harmonization/country_summaries/dps/Country_summaries_DPS.R GHA /projects/my-public-bucket/Data/Country_boundaries/GEDI_countries_Dubayah_individual/ne_10m_a_1_GHA.gpkg CCI,GEDI,NCEO /projects/shared-buckets/minord/data/GEDI_L4B/GEDI04_B_MW019MW138_02_002_05_R01000M_MU.tif /projects/shared-buckets/minord/data/nceo_africa_biomass/clipped/AGB_map_2017v0m.tif /projects/my-public-bucket/Data/Biomass_maps/CCI_2018/dap.ceda.ac.uk/neodc/esacci/biomass/data/agb/maps/v3.0/geotiff/ /projects/shared-buckets/minord/data/GEDI_L4B/GEDI04_B_MW019MW138_02_002_05_R01000M_SE.tif
# Rscript /projects/biomass_harmonization/country_summaries/dps/Country_summaries_DPS.R 9228 /projects/my-public-bucket/Data/WWF_NE_ecoregions/DPS_run_9228.gpkg CCI,GEDI,NCEO /projects/shared-buckets/minord/data/GEDI_L4B/GEDI04_B_MW019MW138_02_002_05_R01000M_MU.tif /projects/shared-buckets/minord/data/nceo_africa_biomass/clipped/AGB_map_2017v0m.tif /projects/my-public-bucket/Data/Biomass_maps/CCI_2018/dap.ceda.ac.uk/neodc/esacci/biomass/data/agb/maps/v3.0/geotiff/ /projects/shared-buckets/minord/data/GEDI_L4B/GEDI04_B_MW019MW138_02_002_05_R01000M_SE.tif
# Rscript /projects/biomass_harmonization/country_summaries/dps/Country_summaries_DPS.R 9228 /projects/my-public-bucket/Data/WWF_NE_ecoregions/DPS_run_9228.gpkg CCI,GEDI,NCEO /projects/shared-buckets/minord/data/GEDI_L4B/GEDI04_B_MW019MW138_02_002_05_R01000M_MU.tif /projects/shared-buckets/minord/data/nceo_africa_biomass/clipped/AGB_map_2017v0m.tif /projects/my-public-bucket/Data/Biomass_maps/CCI_clipped/9228_CCI_AOImasked.tif /projects/shared-buckets/minord/data/GEDI_L4B/GEDI04_B_MW019MW138_02_002_05_R01000M_SE.tif
################################# DESCRIPTION OF ARGUMENTS ############################################
# args[1] = Country eco3 code
# args[2] = Source of the shapefile for eco3
# args[3] = maps to be compared (e.g. CCI,JPL,GEDI,NCEO)
# args[4] = GEDI folder # "https://maap-ops-workspace.s3.amazonaws.com/shared/minord/data/GEDI_L4B"
# args[5] = NCEO folder
# args[6] = CCI folder
# args[4] = GEDI file # "https://maap-ops-workspace.s3.amazonaws.com/shared/minord/data/GEDI_L4B"
# args[5] = NCEO file
# args[6] = CCI file
# args[7] = GEDI SE file
####################################### INSTALL AND LOAD PACKAGES USING CONDA ###########################
# args <- commandArgs(trailingOnly = TRUE)
......@@ -28,10 +29,10 @@
# options(repos = r)
# }
# system2(command='bash',args='/projects/biomass_harmonization/country_summaries/dps/Package_list.sh')
# r = getOption("repos")
# r["CRAN"] = "http://cran.us.r-project.org"
# options(repos = r)
system2(command='bash',args='/projects/biomass_harmonization/country_summaries/dps/Package_list.sh')
r = getOption("repos")
r["CRAN"] = "http://cran.us.r-project.org"
options(repos = r)
library(raster)
library(rgdal)
library(rgeos)
......@@ -715,7 +716,7 @@ if (conti=="Seven seas (open ocean)" & (eco3=="MDV" | eco3=='MUS' | eco3=='SYC')
if (conti=="Asia" & (eco3=="TLS" | eco3=='MUS' | eco3=='SYC')){conti = "Oceania"}
aoi <- Cont[Cont$DPS_run == eco3,]
AOI_file = file.path(Out_folder,paste0(eco3,'_aoi.gpkg'))
writeOGR(obj=aoi, dsn=Out_folder, layer=paste0(eco3,'_aoi'), driver="ESRI Shapefile")
# writeOGR(obj=aoi, dsn=Out_folder, layer=paste0(eco3,'_aoi'), driver="ESRI Shapefile")
if (!identical(crs(aoi), crs(Grid_tiles))){aoi <- spTransform(aoi, crs(Grid_tiles))}
intersecting <- as.logical(gIntersects(Grid_tiles, gConvexHull(aoi), byid=TRUE) & !gTouches(Grid_tiles, gConvexHull(aoi), byid=TRUE))
if (sum(intersecting) == 0) {
......@@ -782,7 +783,7 @@ dev.off()
#######################################################################
coarsest_res <- coarsest_resolution(maps_AOImasked=maps_AOImasked)
if (coarsest_res[1] == 'GEDI'){
if (maps[coarsest_res[1]] == 'GEDI'){
print(paste0('Product ',maps[coarsest_res[1]],' was found to have the largest pixel size'))
print('All other products will be resampled to this resolution')
CI_map <- readAGBmap(AOI_file=AOI_file,aoi=aoi,continent=conti,map=paste0(maps[coarsest_res[1]],'_SE'),In_folder=gedi_SE_folder,In_year = eval(parse(text=paste0(maps[coarsest_res[1]],'_year'))),Out_folder=Out_folder)
......
......@@ -10,4 +10,4 @@ conda install -c conda-forge r-plyr --yes
conda install -c conda-forge r-geosphere --yes
conda activate r-with-gdal
Rscript /projects/biomass_harmonization/country_summaries/dps/Country_summaries_DPS.R COUNTRYISO3 /projects/my-public-bucket/Data/WWF_NE_Boundaries/DPS_run_COUNTRYISO3.gpkg CCI /projects/shared-buckets/minord/data/GEDI_L4B/GEDI04_B_MW019MW138_02_002_05_R01000M_MU.tif /projects/shared-buckets/minord/data/nceo_africa_biomass/clipped/AGB_map_2017v0m.tif /projects/my-public-bucket/Data/Biomass_maps/CCI_2018/dap.ceda.ac.uk/neodc/esacci/biomass/data/agb/maps/v3.0/geotiff/ /projects/shared-buckets/minord/data/GEDI_L4B/GEDI04_B_MW019MW138_02_002_05_R01000M_SE.tif
\ No newline at end of file
Rscript /projects/biomass_harmonization/country_summaries/dps/Country_summaries_DPS.R COUNTRYISO3 /projects/my-public-bucket/Data/WWF_NE_ecoregions/DPS_run_COUNTRYISO3.gpkg CCI /projects/shared-buckets/minord/data/GEDI_L4B/GEDI04_B_MW019MW138_02_002_05_R01000M_MU.tif /projects/shared-buckets/minord/data/nceo_africa_biomass/clipped/AGB_map_2017v0m.tif /projects/my-public-bucket/Data/Biomass_maps/CCI_2018/dap.ceda.ac.uk/neodc/esacci/biomass/data/agb/maps/v3.0/geotiff/ /projects/shared-buckets/minord/data/GEDI_L4B/GEDI04_B_MW019MW138_02_002_05_R01000M_SE.tif
source activate r-with-gdal
conda install -c conda-forge r-raster --yes
conda install -c conda-forge r-rgdal --yes
conda install -c conda-forge r-rColorBrewer --yes
conda install -c conda-forge r-gdalUtils --yes
conda install -c conda-forge r-jpeg --yes
conda install -c conda-forge r-rgeos --yes
conda install -c conda-forge r-sf --yes
conda install -c conda-forge r-plyr --yes
conda install -c conda-forge r-geosphere --yes
conda activate r-with-gdal
# Rscript /projects/biomass_harmonization/country_summaries/dps/Country_summaries_DPS.R COUNTRYISO3 /projects/my-public-bucket/Data/WWF_NE_ecoregions/DPS_run_COUNTRYISO3.gpkg CCI /projects/shared-buckets/minord/data/GEDI_L4B/GEDI04_B_MW019MW138_02_002_05_R01000M_MU.tif /projects/shared-buckets/minord/data/nceo_africa_biomass/clipped/AGB_map_2017v0m.tif /projects/my-public-bucket/Data/Biomass_maps/CCI_2018/dap.ceda.ac.uk/neodc/esacci/biomass/data/agb/maps/v3.0/geotiff/ /projects/shared-buckets/minord/data/GEDI_L4B/GEDI04_B_MW019MW138_02_002_05_R01000M_SE.tif
Rscript /projects/biomass_harmonization/country_summaries/dps/Country_summaries_DPS.R 9104 /projects/my-public-bucket/Data/WWF_NE_ecoregions/DPS_run_9104.gpkg CCI /projects/shared-buckets/minord/data/GEDI_L4B/GEDI04_B_MW019MW138_02_002_05_R01000M_MU.tif /projects/shared-buckets/minord/data/nceo_africa_biomass/clipped/AGB_map_2017v0m.tif /projects/my-public-bucket/Data/Biomass_maps/CCI_2018/dap.ceda.ac.uk/neodc/esacci/biomass/data/agb/maps/v3.0/geotiff/ /projects/shared-buckets/minord/data/GEDI_L4B/GEDI04_B_MW019MW138_02_002_05_R01000M_SE.tif
Rscript /projects/biomass_harmonization/country_summaries/dps/Country_summaries_DPS.R 9099 /projects/my-public-bucket/Data/WWF_NE_ecoregions/DPS_run_9099.gpkg CCI /projects/shared-buckets/minord/data/GEDI_L4B/GEDI04_B_MW019MW138_02_002_05_R01000M_MU.tif /projects/shared-buckets/minord/data/nceo_africa_biomass/clipped/AGB_map_2017v0m.tif /projects/my-public-bucket/Data/Biomass_maps/CCI_2018/dap.ceda.ac.uk/neodc/esacci/biomass/data/agb/maps/v3.0/geotiff/ /projects/shared-buckets/minord/data/GEDI_L4B/GEDI04_B_MW019MW138_02_002_05_R01000M_SE.tif
Rscript /projects/biomass_harmonization/country_summaries/dps/Country_summaries_DPS.R 9082 /projects/my-public-bucket/Data/WWF_NE_ecoregions/DPS_run_9082.gpkg CCI /projects/shared-buckets/minord/data/GEDI_L4B/GEDI04_B_MW019MW138_02_002_05_R01000M_MU.tif /projects/shared-buckets/minord/data/nceo_africa_biomass/clipped/AGB_map_2017v0m.tif /projects/my-public-bucket/Data/Biomass_maps/CCI_2018/dap.ceda.ac.uk/neodc/esacci/biomass/data/agb/maps/v3.0/geotiff/ /projects/shared-buckets/minord/data/GEDI_L4B/GEDI04_B_MW019MW138_02_002_05_R01000M_SE.tif
Rscript /projects/biomass_harmonization/country_summaries/dps/Country_summaries_DPS.R 7452 /projects/my-public-bucket/Data/WWF_NE_ecoregions/DPS_run_7452.gpkg CCI /projects/shared-buckets/minord/data/GEDI_L4B/GEDI04_B_MW019MW138_02_002_05_R01000M_MU.tif /projects/shared-buckets/minord/data/nceo_africa_biomass/clipped/AGB_map_2017v0m.tif /projects/my-public-bucket/Data/Biomass_maps/CCI_2018/dap.ceda.ac.uk/neodc/esacci/biomass/data/agb/maps/v3.0/geotiff/ /projects/shared-buckets/minord/data/GEDI_L4B/GEDI04_B_MW019MW138_02_002_05_R01000M_SE.tif
Rscript /projects/biomass_harmonization/country_summaries/dps/Country_summaries_DPS.R 9344 /projects/my-public-bucket/Data/WWF_NE_ecoregions/DPS_run_9344.gpkg CCI /projects/shared-buckets/minord/data/GEDI_L4B/GEDI04_B_MW019MW138_02_002_05_R01000M_MU.tif /projects/shared-buckets/minord/data/nceo_africa_biomass/clipped/AGB_map_2017v0m.tif /projects/my-public-bucket/Data/Biomass_maps/CCI_2018/dap.ceda.ac.uk/neodc/esacci/biomass/data/agb/maps/v3.0/geotiff/ /projects/shared-buckets/minord/data/GEDI_L4B/GEDI04_B_MW019MW138_02_002_05_R01000M_SE.tif
Rscript /projects/biomass_harmonization/country_summaries/dps/Country_summaries_DPS.R 9342 /projects/my-public-bucket/Data/WWF_NE_ecoregions/DPS_run_9342.gpkg CCI /projects/shared-buckets/minord/data/GEDI_L4B/GEDI04_B_MW019MW138_02_002_05_R01000M_MU.tif /projects/shared-buckets/minord/data/nceo_africa_biomass/clipped/AGB_map_2017v0m.tif /projects/my-public-bucket/Data/Biomass_maps/CCI_2018/dap.ceda.ac.uk/neodc/esacci/biomass/data/agb/maps/v3.0/geotiff/ /projects/shared-buckets/minord/data/GEDI_L4B/GEDI04_B_MW019MW138_02_002_05_R01000M_SE.tif
Rscript /projects/biomass_harmonization/country_summaries/dps/Country_summaries_DPS.R 9032 /projects/my-public-bucket/Data/WWF_NE_ecoregions/DPS_run_9032.gpkg CCI /projects/shared-buckets/minord/data/GEDI_L4B/GEDI04_B_MW019MW138_02_002_05_R01000M_MU.tif /projects/shared-buckets/minord/data/nceo_africa_biomass/clipped/AGB_map_2017v0m.tif /projects/my-public-bucket/Data/Biomass_maps/CCI_2018/dap.ceda.ac.uk/neodc/esacci/biomass/data/agb/maps/v3.0/geotiff/ /projects/shared-buckets/minord/data/GEDI_L4B/GEDI04_B_MW019MW138_02_002_05_R01000M_SE.tif
algo_name: run_country_summaries
version: AGB_maps
environment: ubuntu
repository_url: https://repo.ops.maap-project.org/lduncanson/biomass_harmonization.git #note username and token is not needed
repository_url: https://repo.ops.maap-project.org/lduncanson/biomass_harmonization.git
docker_url: mas.maap-project.org:5000/root/ade-base-images/r:latest
queue: maap-dps-worker-32gb
description: Test algo for biomass harmonization
......
name: r-with-gdal # updating r-with-gdal, building the packages on it.
name: r-with-gdal
channels:
- conda-forge
- defaults
dependencies:
# find out what packages you're using from the R terminal (for replicating in future, use the SAME versions, specify versions...)
- r-raster
- r-rgdal
- r-rColorBrewer
......
#!/bin/bash
# this is intended for running DPS jobs; the input directory is where four files have been pulled because download=TRUE in the algorithm_config.yaml file
# a tar file of biomass models, a data table csv, and two raster stack geotiff files
source activate r-with-gdal
basedir=$( cd "$(dirname "$0")" ; pwd -P )
mkdir output #(has to be called 'output', you can't change this name)
mkdir output
# Note: the numbered args are fed in with the in_param_dict in the Run DPS chunk of run_country_summaries.ipynb
ISO3_code=${1}
Shapefile=${2}
Map_list=${3}
......@@ -16,7 +13,6 @@ NCEO_file=${5}
CCI_file=${6}
GEDI_SE_file=${7}
# This PWD is wherever the job is run (where the .sh is called from)
OUTPUTDIR="${PWD}/output"
Rscript ${basedir}/Country_summaries_DPS.R ${ISO3_code} ${Shapefile} ${Map_list} ${GEDI_file} ${NCEO_file} ${CCI_file} ${GEDI_SE_file}
\ No newline at end of file
......@@ -8,16 +8,16 @@
# Rscript /projects/biomass_harmonization/country_summaries/dps/Country_summaries_DPS.R GHA /projects/my-public-bucket/Data/Country_boundaries/GEDI_countries_Dubayah_individual/ne_10m_a_1_GHA.gpkg CCI,GEDI,NCEO /projects/shared-buckets/minord/data/GEDI_L4B/GEDI04_B_MW019MW138_02_002_05_R01000M_MU.tif /projects/shared-buckets/minord/data/nceo_africa_biomass/clipped/AGB_map_2017v0m.tif /projects/my-public-bucket/Data/Biomass_maps/CCI_2018/dap.ceda.ac.uk/neodc/esacci/biomass/data/agb/maps/v3.0/geotiff/ /projects/shared-buckets/minord/data/GEDI_L4B/GEDI04_B_MW019MW138_02_002_05_R01000M_SE.tif
# Rscript /projects/biomass_harmonization/country_summaries/dps/Country_summaries_DPS.R 9228 /projects/my-public-bucket/Data/WWF_NE_ecoregions/DPS_run_9228.gpkg CCI,GEDI,NCEO /projects/shared-buckets/minord/data/GEDI_L4B/GEDI04_B_MW019MW138_02_002_05_R01000M_MU.tif /projects/shared-buckets/minord/data/nceo_africa_biomass/clipped/AGB_map_2017v0m.tif /projects/my-public-bucket/Data/Biomass_maps/CCI_2018/dap.ceda.ac.uk/neodc/esacci/biomass/data/agb/maps/v3.0/geotiff/ /projects/shared-buckets/minord/data/GEDI_L4B/GEDI04_B_MW019MW138_02_002_05_R01000M_SE.tif
# Rscript /projects/biomass_harmonization/country_summaries/dps/Country_summaries_DPS.R 9228 /projects/my-public-bucket/Data/WWF_NE_ecoregions/DPS_run_9228.gpkg CCI,GEDI,NCEO /projects/shared-buckets/minord/data/GEDI_L4B/GEDI04_B_MW019MW138_02_002_05_R01000M_MU.tif /projects/shared-buckets/minord/data/nceo_africa_biomass/clipped/AGB_map_2017v0m.tif /projects/my-public-bucket/Data/Biomass_maps/CCI_clipped/9228_CCI_AOImasked.tif /projects/shared-buckets/minord/data/GEDI_L4B/GEDI04_B_MW019MW138_02_002_05_R01000M_SE.tif
################################# DESCRIPTION OF ARGUMENTS ############################################
# args[1] = Country eco3 code
# args[2] = Source of the shapefile for eco3
# args[3] = maps to be compared (e.g. CCI,JPL,GEDI,NCEO)
# args[4] = GEDI folder # "https://maap-ops-workspace.s3.amazonaws.com/shared/minord/data/GEDI_L4B"
# args[5] = NCEO folder
# args[6] = CCI folder
# args[7] = CCI folder
# args[4] = GEDI file # "https://maap-ops-workspace.s3.amazonaws.com/shared/minord/data/GEDI_L4B"
# args[5] = NCEO file
# args[6] = CCI file
# args[7] = GEDI SE file
####################################### INSTALL AND LOAD PACKAGES USING CONDA ###########################
# args <- commandArgs(trailingOnly = TRUE)
......@@ -29,10 +29,10 @@
# options(repos = r)
# }
# system2(command='bash',args='/projects/biomass_harmonization/country_summaries/dps/Package_list.sh')
# r = getOption("repos")
# r["CRAN"] = "http://cran.us.r-project.org"
# options(repos = r)
system2(command='bash',args='/projects/biomass_harmonization/country_summaries/dps/Package_list.sh')
r = getOption("repos")
r["CRAN"] = "http://cran.us.r-project.org"
options(repos = r)
library(raster)
library(rgdal)
library(rgeos)
......@@ -716,7 +716,7 @@ if (conti=="Seven seas (open ocean)" & (eco3=="MDV" | eco3=='MUS' | eco3=='SYC')
if (conti=="Asia" & (eco3=="TLS" | eco3=='MUS' | eco3=='SYC')){conti = "Oceania"}
aoi <- Cont[Cont$DPS_run == eco3,]
AOI_file = file.path(Out_folder,paste0(eco3,'_aoi.gpkg'))
writeOGR(obj=aoi, dsn=Out_folder, layer=paste0(eco3,'_aoi'), driver="ESRI Shapefile")
# writeOGR(obj=aoi, dsn=Out_folder, layer=paste0(eco3,'_aoi'), driver="ESRI Shapefile")
if (!identical(crs(aoi), crs(Grid_tiles))){aoi <- spTransform(aoi, crs(Grid_tiles))}
intersecting <- as.logical(gIntersects(Grid_tiles, gConvexHull(aoi), byid=TRUE) & !gTouches(Grid_tiles, gConvexHull(aoi), byid=TRUE))
if (sum(intersecting) == 0) {
......@@ -783,7 +783,7 @@ dev.off()
#######################################################################
coarsest_res <- coarsest_resolution(maps_AOImasked=maps_AOImasked)
if (coarsest_res[1] == 'GEDI'){
if (maps[coarsest_res[1]] == 'GEDI'){
print(paste0('Product ',maps[coarsest_res[1]],' was found to have the largest pixel size'))
print('All other products will be resampled to this resolution')
CI_map <- readAGBmap(AOI_file=AOI_file,aoi=aoi,continent=conti,map=paste0(maps[coarsest_res[1]],'_SE'),In_folder=gedi_SE_folder,In_year = eval(parse(text=paste0(maps[coarsest_res[1]],'_year'))),Out_folder=Out_folder)
......
......@@ -10,4 +10,4 @@ conda install -c conda-forge r-plyr --yes
conda install -c conda-forge r-geosphere --yes
conda activate r-with-gdal
Rscript /projects/biomass_harmonization/country_summaries/dps/Country_summaries_DPS.R COUNTRYISO3 /projects/my-public-bucket/Data/WWF_NE_Boundaries/DPS_run_COUNTRYISO3.gpkg CCI /projects/shared-buckets/minord/data/GEDI_L4B/GEDI04_B_MW019MW138_02_002_05_R01000M_MU.tif /projects/shared-buckets/minord/data/nceo_africa_biomass/clipped/AGB_map_2017v0m.tif /projects/my-public-bucket/Data/Biomass_maps/CCI_2018/dap.ceda.ac.uk/neodc/esacci/biomass/data/agb/maps/v3.0/geotiff/ /projects/shared-buckets/minord/data/GEDI_L4B/GEDI04_B_MW019MW138_02_002_05_R01000M_SE.tif
\ No newline at end of file
Rscript /projects/biomass_harmonization/country_summaries/dps/Country_summaries_DPS.R 6847 /projects/my-public-bucket/Data/WWF_NE_ecoregions/DPS_run_6847.gpkg CCI /projects/shared-buckets/minord/data/GEDI_L4B/GEDI04_B_MW019MW138_02_002_05_R01000M_MU.tif /projects/shared-buckets/minord/data/nceo_africa_biomass/clipped/AGB_map_2017v0m.tif /projects/my-public-bucket/Data/Biomass_maps/CCI_2018/dap.ceda.ac.uk/neodc/esacci/biomass/data/agb/maps/v3.0/geotiff/ /projects/shared-buckets/minord/data/GEDI_L4B/GEDI04_B_MW019MW138_02_002_05_R01000M_SE.tif
source activate r-with-gdal
conda install -c conda-forge r-raster --yes
conda install -c conda-forge r-rgdal --yes
conda install -c conda-forge r-rColorBrewer --yes
conda install -c conda-forge r-gdalUtils --yes
conda install -c conda-forge r-jpeg --yes
conda install -c conda-forge r-rgeos --yes
conda install -c conda-forge r-sf --yes
conda install -c conda-forge r-plyr --yes
conda install -c conda-forge r-geosphere --yes
conda activate r-with-gdal
# Rscript /projects/biomass_harmonization/country_summaries/dps/Country_summaries_DPS.R COUNTRYISO3 /projects/my-public-bucket/Data/WWF_NE_ecoregions/DPS_run_COUNTRYISO3.gpkg CCI /projects/shared-buckets/minord/data/GEDI_L4B/GEDI04_B_MW019MW138_02_002_05_R01000M_MU.tif /projects/shared-buckets/minord/data/nceo_africa_biomass/clipped/AGB_map_2017v0m.tif /projects/my-public-bucket/Data/Biomass_maps/CCI_2018/dap.ceda.ac.uk/neodc/esacci/biomass/data/agb/maps/v3.0/geotiff/ /projects/shared-buckets/minord/data/GEDI_L4B/GEDI04_B_MW019MW138_02_002_05_R01000M_SE.tif
Rscript /projects/biomass_harmonization/country_summaries/dps/Country_summaries_DPS.R 9104 /projects/my-public-bucket/Data/WWF_NE_ecoregions/DPS_run_9104.gpkg CCI /projects/shared-buckets/minord/data/GEDI_L4B/GEDI04_B_MW019MW138_02_002_05_R01000M_MU.tif /projects/shared-buckets/minord/data/nceo_africa_biomass/clipped/AGB_map_2017v0m.tif /projects/my-public-bucket/Data/Biomass_maps/CCI_2018/dap.ceda.ac.uk/neodc/esacci/biomass/data/agb/maps/v3.0/geotiff/ /projects/shared-buckets/minord/data/GEDI_L4B/GEDI04_B_MW019MW138_02_002_05_R01000M_SE.tif
Rscript /projects/biomass_harmonization/country_summaries/dps/Country_summaries_DPS.R 9099 /projects/my-public-bucket/Data/WWF_NE_ecoregions/DPS_run_9099.gpkg CCI /projects/shared-buckets/minord/data/GEDI_L4B/GEDI04_B_MW019MW138_02_002_05_R01000M_MU.tif /projects/shared-buckets/minord/data/nceo_africa_biomass/clipped/AGB_map_2017v0m.tif /projects/my-public-bucket/Data/Biomass_maps/CCI_2018/dap.ceda.ac.uk/neodc/esacci/biomass/data/agb/maps/v3.0/geotiff/ /projects/shared-buckets/minord/data/GEDI_L4B/GEDI04_B_MW019MW138_02_002_05_R01000M_SE.tif
Rscript /projects/biomass_harmonization/country_summaries/dps/Country_summaries_DPS.R 9082 /projects/my-public-bucket/Data/WWF_NE_ecoregions/DPS_run_9082.gpkg CCI /projects/shared-buckets/minord/data/GEDI_L4B/GEDI04_B_MW019MW138_02_002_05_R01000M_MU.tif /projects/shared-buckets/minord/data/nceo_africa_biomass/clipped/AGB_map_2017v0m.tif /projects/my-public-bucket/Data/Biomass_maps/CCI_2018/dap.ceda.ac.uk/neodc/esacci/biomass/data/agb/maps/v3.0/geotiff/ /projects/shared-buckets/minord/data/GEDI_L4B/GEDI04_B_MW019MW138_02_002_05_R01000M_SE.tif
Rscript /projects/biomass_harmonization/country_summaries/dps/Country_summaries_DPS.R 7452 /projects/my-public-bucket/Data/WWF_NE_ecoregions/DPS_run_7452.gpkg CCI /projects/shared-buckets/minord/data/GEDI_L4B/GEDI04_B_MW019MW138_02_002_05_R01000M_MU.tif /projects/shared-buckets/minord/data/nceo_africa_biomass/clipped/AGB_map_2017v0m.tif /projects/my-public-bucket/Data/Biomass_maps/CCI_2018/dap.ceda.ac.uk/neodc/esacci/biomass/data/agb/maps/v3.0/geotiff/ /projects/shared-buckets/minord/data/GEDI_L4B/GEDI04_B_MW019MW138_02_002_05_R01000M_SE.tif
Rscript /projects/biomass_harmonization/country_summaries/dps/Country_summaries_DPS.R 9344 /projects/my-public-bucket/Data/WWF_NE_ecoregions/DPS_run_9344.gpkg CCI /projects/shared-buckets/minord/data/GEDI_L4B/GEDI04_B_MW019MW138_02_002_05_R01000M_MU.tif /projects/shared-buckets/minord/data/nceo_africa_biomass/clipped/AGB_map_2017v0m.tif /projects/my-public-bucket/Data/Biomass_maps/CCI_2018/dap.ceda.ac.uk/neodc/esacci/biomass/data/agb/maps/v3.0/geotiff/ /projects/shared-buckets/minord/data/GEDI_L4B/GEDI04_B_MW019MW138_02_002_05_R01000M_SE.tif
Rscript /projects/biomass_harmonization/country_summaries/dps/Country_summaries_DPS.R 9342 /projects/my-public-bucket/Data/WWF_NE_ecoregions/DPS_run_9342.gpkg CCI /projects/shared-buckets/minord/data/GEDI_L4B/GEDI04_B_MW019MW138_02_002_05_R01000M_MU.tif /projects/shared-buckets/minord/data/nceo_africa_biomass/clipped/AGB_map_2017v0m.tif /projects/my-public-bucket/Data/Biomass_maps/CCI_2018/dap.ceda.ac.uk/neodc/esacci/biomass/data/agb/maps/v3.0/geotiff/ /projects/shared-buckets/minord/data/GEDI_L4B/GEDI04_B_MW019MW138_02_002_05_R01000M_SE.tif
Rscript /projects/biomass_harmonization/country_summaries/dps/Country_summaries_DPS.R 9032 /projects/my-public-bucket/Data/WWF_NE_ecoregions/DPS_run_9032.gpkg CCI /projects/shared-buckets/minord/data/GEDI_L4B/GEDI04_B_MW019MW138_02_002_05_R01000M_MU.tif /projects/shared-buckets/minord/data/nceo_africa_biomass/clipped/AGB_map_2017v0m.tif /projects/my-public-bucket/Data/Biomass_maps/CCI_2018/dap.ceda.ac.uk/neodc/esacci/biomass/data/agb/maps/v3.0/geotiff/ /projects/shared-buckets/minord/data/GEDI_L4B/GEDI04_B_MW019MW138_02_002_05_R01000M_SE.tif
algo_name: run_country_summaries
version: AGB_maps
environment: ubuntu
repository_url: https://repo.ops.maap-project.org/lduncanson/biomass_harmonization.git #note username and token is not needed
repository_url: https://repo.ops.maap-project.org/lduncanson/biomass_harmonization.git
docker_url: mas.maap-project.org:5000/root/ade-base-images/r:latest
queue: maap-dps-worker-32gb
description: Test algo for biomass harmonization
......
name: r-with-gdal # updating r-with-gdal, building the packages on it.
name: r-with-gdal
channels:
- conda-forge
- defaults
dependencies:
# find out what packages you're using from the R terminal (for replicating in future, use the SAME versions, specify versions...)
- r-raster
- r-rgdal
- r-rColorBrewer
......
This diff is collapsed.
#!/bin/bash
# this is intended for running DPS jobs; the input directory is where four files have been pulled because download=TRUE in the algorithm_config.yaml file
# a tar file of biomass models, a data table csv, and two raster stack geotiff files
source activate r-with-gdal
basedir=$( cd "$(dirname "$0")" ; pwd -P )
mkdir output #(has to be called 'output', you can't change this name)
mkdir output
# Note: the numbered args are fed in with the in_param_dict in the Run DPS chunk of run_country_summaries.ipynb
ISO3_code=${1}
Shapefile=${2}
Map_list=${3}
......@@ -16,7 +13,6 @@ NCEO_file=${5}
CCI_file=${6}
GEDI_SE_file=${7}
# This PWD is wherever the job is run (where the .sh is called from)
OUTPUTDIR="${PWD}/output"
Rscript ${basedir}/Country_summaries_DPS.R ${ISO3_code} ${Shapefile} ${Map_list} ${GEDI_file} ${NCEO_file} ${CCI_file} ${GEDI_SE_file}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment