-
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
Merged
Merged
Changes from 15 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
a89a1ec
update calibration cropland land conversion cost FAO
flohump d29c1b5
bugfix
flohump 7acf6dc
bugfix
flohump bf6fe12
bugfix
flohump 56da044
update
flohump 9f3f32a
update
flohump 3f13911
test
flohump 63ec616
Merge branch 'f_fixfader2' of github.com:flohump/magpie into f_calib
flohump 2350ddb
update default values
flohump 58b3f50
cleanup code
flohump db50da0
changelog
flohump c1cd8b1
update start scripts and default.cfg
flohump da55637
changelog
flohump 96cead0
update calib factor FSEC
flohump 0a36a6d
callib factors H16
flohump ef8adea
lucode2 version update
flohump 44d7e25
update file versions main.gms
flohump 850aba8
bugfix link
flohump File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,7 +26,7 @@ cfg$input <- c(regional = "rev4.116_h12_magpie.tgz", | |
cellular = "rev4.116_h12_fd712c0b_cellularmagpie_c200_MRI-ESM2-0-ssp370_lpjml-8e6c5eb1.tgz", | ||
validation = "rev4.116_h12_validation.tgz", | ||
additional = "additional_data_rev4.60.tgz", | ||
calibration = "calibration_H12_27Sep24.tgz") | ||
calibration = "calibration_H12_FAO30_03Feb25.tgz") | ||
|
||
# NOTE: It is recommended to recalibrate the model when changing cellular input data | ||
# as well as for any other setting that would affect initial values in the model, | ||
|
@@ -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 | ||
# Restart from existing calibration factors (TRUE or FALSE) | ||
cfg$restart_landconversion_cost <- FALSE # def = FALSE | ||
# Number of lowpass filter iterations applied on calibration factors | ||
# for time steps 1995-2015 | ||
cfg$lowpass_filter_landconversion_cost <- 1 # def= 1 | ||
cfg$lowpass_filter_landconversion_cost <- 0 # def= 0 | ||
# Set upper limit for cropland calibration factor | ||
cfg$cost_calib_max_landconversion_cost <- 3 # def= 3 | ||
cfg$cost_calib_max_landconversion_cost <- 2.5 # def= 2.5 | ||
# Set lower limit for cropland calibration factor | ||
cfg$cost_calib_min_landconversion_cost <- 0.05 # def= 0.05 | ||
cfg$cost_calib_min_landconversion_cost <- 0.2 # def= 0.2 | ||
# Selection type of calibration factors. | ||
# If FALSE, calibration factors from the last iteration are used. | ||
# If TRUE, calibration factors from the iteration with the lowest divergence are used. | ||
cfg$best_calib_landconversion_cost <- FALSE # def = FALSE | ||
# 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 commentThe reason will be displayed to describe this comment to others. Learn more. Really nice that you added the switch here! |
||
|
||
# Settings for NPI/NDC recalculation | ||
# * (TRUE): NPI/NDC recalculation will be performed | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
andcalib_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.