-
Notifications
You must be signed in to change notification settings - Fork 177
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update land conversion cost calibration for cropland - FAO as target data set #772
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for these great improvements. Adding the calibration settings to the calib file is also really nice!
I only have some questions of understanding.
@@ -95,20 +95,24 @@ cfg$recalibrate_landconversion_cost <- "ifneeded" #def "ifneeded" | |||
# Up to which accuracy shall be recalibrated? | |||
cfg$calib_accuracy_landconversion_cost <- 0.01 # def = 0.01 | |||
# What is the maximum number of iterations if the precision goal is not reached? | |||
cfg$calib_maxiter_landconversion_cost <- 40 # def = 40 | |||
cfg$calib_maxiter_landconversion_cost <- 20 # def = 20 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you briefly explain why the settings have changed here?
E.g. why is it safe to only have a maximum of 20 iterations instead of 40? Can we be sure that under most circumstances the calibration will have finished?
Same goes with other settings, for example the calib_max
and calib_min
settings.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I revised the calculation of cropland reduction for the reward.
Previously, this was one factor for the whole period 1995-2015.
Now this is calcuated annually, which allows to choose the reward much more targeted than before.
Also, there are less jumps in the reward between the iterations. Therefore, I set the lowpass filter to zero.
I made tests with 20 and 40 iterations. The calib factors don't change much after 20 iterations. Also, the model results are very similar.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The range of calib_min and calib_max was 0.05-3 before.
To avoid very low or very high land conversion costs that avoid any land-use change I reduced the range to 0.2-2.5.
I also tested with 0.2-2. But in this case, we see an implausible strong increase of cropland in IND.
# Target data set that will be used for cropland calibration at regional level | ||
# * "MAgPIEown": same data set as used for initialization of cropland | ||
# * "FAO": Data from FAOSTAT on cropland area | ||
cfg$cost_calib_hist_data <- "FAO" # def = "FAO" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really nice that you added the switch here!
🐦 Description of this PR 🐦
The file
![image](https://private-user-images.githubusercontent.com/16921122/409264790-4eedbb82-0c24-4bfc-8ca4-a27cfe5a51cb.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkyOTY4NTAsIm5iZiI6MTczOTI5NjU1MCwicGF0aCI6Ii8xNjkyMTEyMi80MDkyNjQ3OTAtNGVlZGJiODItMGMyNC00YmZjLThjYTQtYTI3Y2ZlNWE1MWNiLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjExVDE3NTU1MFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTdiYWZmN2Y2ZjU5OWYzZTQyM2M2N2U5NjM1NGZhMjExZGNhYmQ1NDMxZWI5MjkwNTdmNWNiYjY1MjY3MmQ0MjMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.XBKF4gFBXFMVzc7y-lbS3oMLawYfxNrj-wIh00s5EhU)
f39_calib.csv
now includes meta information on the settings used for generating the calibration factors:🔧 Checklist for PR creator 🔧
Label pull request from the label list.
Self-review own code
magpie4
R library has been updated accordingly and backwards compatible where necessary.scenario_config.csv
has been updated accordingly (important ifdefault.cfg
has been updated)Document changes
CHANGELOG.md
goxygen::goxygen()
and verify the modified code is properly documentedPerform test runs
Rscript start.R --> "compilation check"
Rscript start.R --> "test runs"
Rscript start.R --> "test runs"
📉 Performance changes 📈
🚨 Checklist for reviewer 🚨
CHANGELOG
is updated correctly