Skip to content

Commit

Permalink
Correcting the deforestation rate for cat > 1 for the mw model
Browse files Browse the repository at this point in the history
The formula differ a little bit compared with far models as theta=0
when cat=1 and rescale is done from 2 to 65535.
  • Loading branch information
ghislainv committed Jun 22, 2024
1 parent 997f3b9 commit 9e008a3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion riskmapjnr/defrate_per_cat.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ def defrate_per_cat(fcc_file, riskmap_file, time_interval,
df["rate_obs"] = 1 - (1 - df["ndefor"] / df["nfor"]) ** (1 / time_interval)

# Relative spatial deforestation probability from model
df["rate_mod"] = ((df["cat"] - 1) * 999999 / 65534 + 1) * 1e-6
df["rate_mod"] = ((df["cat"] - 2) * 999999 / 65533 + 1) * 1e-6
# Set proba of deforestation to 0 for category 1
df.loc[df["cat"] == 1, "rate_mod"] = 0

Expand Down

0 comments on commit 9e008a3

Please sign in to comment.