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

Classifying the world into IPCC Table 4.7

parent 54d2cd58
No related branches found
No related tags found
No related merge requests found
......@@ -29,33 +29,30 @@ if __name__ == "__main__":
parse.add_argument("--EcoCont", help="EcoCont", required=True)
args = parse.parse_args()
###################################################################################
###################################################################################
TILE = args.tile
###################################################################################
###################################################################################
##### PRIMARY AND INTACT FOREST CONDITIONS #####
###################################################################################
###################################################################################
########### FOREST HEIGHT VARIABLES ################
########### GLAD FOREST HEIGHT VARIABLES (Potapov et al. 2022) ################
FOREST_HEIGHT_2000 = rasterio.open(args.FOREST_HEIGHT_2000).read(1)
FOREST_HEIGHT_2020 = rasterio.open(args.FOREST_HEIGHT_2020).read(1)
# FOREST_GAIN = rasterio.open(args.FOREST_GAIN).read(1)
FOREST_LOSS = rasterio.open(args.FOREST_LOSS).read(1)
# FOREST_GAIN = rasterio.open(args.FOREST_GAIN).read(1)
# FOREST_EXTENT_2000 = rasterio.open(args.FOREST_EXTENT_2000).read(1)
# FOREST_EXTENT_2020 = rasterio.open(args.FOREST_EXTENT_2020).read(1)
########### GFW FOREST COVER AND LOSS VARIABLES ################
########### GFW FOREST COVER AND LOSS VARIABLES (Hansen et al.) ################
# FOREST_COVER_2000 = rasterio.open(args.FOREST_COVER_2000).read(1)
FOREST_LOSSYEAR = rasterio.open(args.FOREST_LOSSYEAR).read(1)
########### PLANTATION FORESTS #################################
########### PLANTATION FORESTS (WRI layers) #################################
PLANTATIONS = rasterio.open(args.PLANTATIONS).read(1)
########### INTACT AND PRIMARY FOREST VARIABLES ################
########### INTACT AND PRIMARY FOREST VARIABLES (Turubanova et al., and Potapov et al.)
INTACT_FORESTS = rasterio.open(args.IFL_rasters).read(1)
PRIMARY_FOREST_ASIA = rasterio.open(args.primary_forest_asia).read(1)
PRIMARY_FOREST_SA = rasterio.open(args.primary_forest_sa).read(1)
......@@ -72,7 +69,7 @@ PRIMARY[FOREST_HEIGHT_2020 == 0] = 0
PRIMARY[FOREST_LOSS > 0] = 0
# YOUNG[FOREST_COVER_2000 < 30] = 0
##### FOREST LOSS CONDITIONS #####
##### FOREST TREE COVER LOSS CONDITIONS #####
PRIMARY[FOREST_LOSSYEAR > 0] = 0
##### PLANTATIONS CONDITIONS #####
......@@ -94,14 +91,14 @@ FOREST_LOSSYEAR = rasterio.open(args.FOREST_LOSSYEAR).read(1)
PLANTATIONS = rasterio.open(args.PLANTATIONS).read(1)
####################################
##### FOREST HEIGHT CONDITIONS #####
##### FOREST HEIGHT CONDITIONS (Potapov et al. 2022) #####
YOUNG = FOREST_HEIGHT_2020
YOUNG[YOUNG > 0] = 2
YOUNG[FOREST_HEIGHT_2000 > 0] = 0
YOUNG[FOREST_GAIN == 0] = 0
YOUNG[FOREST_LOSS > 0] = 0
##### FOREST LOSS CONDITIONS #####
##### FOREST TREE COVER LOSS CONDITIONS (Hansen et al.) #####
YOUNG[FOREST_LOSSYEAR > 0] = 0
##### PRIMARY AND INTACT FOREST CONDITIONS #####
......@@ -128,10 +125,10 @@ PLANTATIONS = rasterio.open(args.PLANTATIONS).read(1)
##### FOREST HEIGHT CONDITIONS #####
OLD = FOREST_HEIGHT_2020
OLD[OLD > 0] = 3
OLD[(OLD == 1) & (FOREST_HEIGHT_2000 == 0)] = 0
OLD[(OLD == 3) & (FOREST_HEIGHT_2000 == 0)] = 0
OLD[FOREST_LOSS > 0] = 0
##### FOREST LOSS CONDITIONS #####
##### FOREST TREE COVER LOSS CONDITIONS #####
OLD[FOREST_LOSSYEAR > 0] = 0
##### PRIMARY AND INTACT FOREST CONDITIONS #####
......
This diff is collapsed.
......@@ -29,33 +29,30 @@ if __name__ == "__main__":
parse.add_argument("--EcoCont", help="EcoCont", required=True)
args = parse.parse_args()
###################################################################################
###################################################################################
TILE = args.tile
###################################################################################
###################################################################################
##### PRIMARY AND INTACT FOREST CONDITIONS #####
###################################################################################
###################################################################################
########### FOREST HEIGHT VARIABLES ################
########### GLAD FOREST HEIGHT VARIABLES (Potapov et al. 2022) ################
FOREST_HEIGHT_2000 = rasterio.open(args.FOREST_HEIGHT_2000).read(1)
FOREST_HEIGHT_2020 = rasterio.open(args.FOREST_HEIGHT_2020).read(1)
# FOREST_GAIN = rasterio.open(args.FOREST_GAIN).read(1)
FOREST_LOSS = rasterio.open(args.FOREST_LOSS).read(1)
# FOREST_GAIN = rasterio.open(args.FOREST_GAIN).read(1)
# FOREST_EXTENT_2000 = rasterio.open(args.FOREST_EXTENT_2000).read(1)
# FOREST_EXTENT_2020 = rasterio.open(args.FOREST_EXTENT_2020).read(1)
########### GFW FOREST COVER AND LOSS VARIABLES ################
########### GFW FOREST COVER AND LOSS VARIABLES (Hansen et al.) ################
# FOREST_COVER_2000 = rasterio.open(args.FOREST_COVER_2000).read(1)
FOREST_LOSSYEAR = rasterio.open(args.FOREST_LOSSYEAR).read(1)
########### PLANTATION FORESTS #################################
########### PLANTATION FORESTS (WRI layers) #################################
PLANTATIONS = rasterio.open(args.PLANTATIONS).read(1)
########### INTACT AND PRIMARY FOREST VARIABLES ################
########### INTACT AND PRIMARY FOREST VARIABLES (Turubanova et al., and Potapov et al.)
INTACT_FORESTS = rasterio.open(args.IFL_rasters).read(1)
PRIMARY_FOREST_ASIA = rasterio.open(args.primary_forest_asia).read(1)
PRIMARY_FOREST_SA = rasterio.open(args.primary_forest_sa).read(1)
......@@ -72,7 +69,7 @@ PRIMARY[FOREST_HEIGHT_2020 == 0] = 0
PRIMARY[FOREST_LOSS > 0] = 0
# YOUNG[FOREST_COVER_2000 < 30] = 0
##### FOREST LOSS CONDITIONS #####
##### FOREST TREE COVER LOSS CONDITIONS #####
PRIMARY[FOREST_LOSSYEAR > 0] = 0
##### PLANTATIONS CONDITIONS #####
......@@ -94,14 +91,14 @@ FOREST_LOSSYEAR = rasterio.open(args.FOREST_LOSSYEAR).read(1)
PLANTATIONS = rasterio.open(args.PLANTATIONS).read(1)
####################################
##### FOREST HEIGHT CONDITIONS #####
##### FOREST HEIGHT CONDITIONS (Potapov et al. 2022) #####
YOUNG = FOREST_HEIGHT_2020
YOUNG[YOUNG > 0] = 2
YOUNG[FOREST_HEIGHT_2000 > 0] = 0
YOUNG[FOREST_GAIN == 0] = 0
YOUNG[FOREST_LOSS > 0] = 0
##### FOREST LOSS CONDITIONS #####
##### FOREST TREE COVER LOSS CONDITIONS (Hansen et al.) #####
YOUNG[FOREST_LOSSYEAR > 0] = 0
##### PRIMARY AND INTACT FOREST CONDITIONS #####
......@@ -128,10 +125,10 @@ PLANTATIONS = rasterio.open(args.PLANTATIONS).read(1)
##### FOREST HEIGHT CONDITIONS #####
OLD = FOREST_HEIGHT_2020
OLD[OLD > 0] = 3
OLD[(OLD == 1) & (FOREST_HEIGHT_2000 == 0)] = 0
OLD[(OLD == 3) & (FOREST_HEIGHT_2000 == 0)] = 0
OLD[FOREST_LOSS > 0] = 0
##### FOREST LOSS CONDITIONS #####
##### FOREST TREE COVER LOSS CONDITIONS #####
OLD[FOREST_LOSSYEAR > 0] = 0
##### PRIMARY AND INTACT FOREST CONDITIONS #####
......
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