JGCRI / gcam-core

GCAM -- The Global Change Analysis Model
http://jgcri.github.io/gcam-doc/
Other
263 stars 159 forks source link

Question about how to set international agriculture trade barrier in GCAM #355

Closed jiangyongye closed 8 months ago

jiangyongye commented 8 months ago

I want to set a scenario that a region will not import any corn starting in a certain year/ so that's what I tried In ag_trade.xml, image image I changed the share-weight to a big negative number under imported corn subsector. And the output did show that traded corn became zero. So i just want to double check is this idea correct? also if i change the share-weight under domestic corn subsector to a huge positive number, is that have same effects with above?

jiangyongye commented 8 months ago

Follow up question With my little knowledge, I believe that SSP3 has a large international trade barrier compared to other SSPs. But I see in all ssp gcam config files that they all use ag_trade.xml. So how gcam represent the agriculture trade barrier in the SSP3 scenario?

realxinzhao commented 8 months ago

Hi @jiangyongye, You probably want to try using zero share-weight for imported. I doubt negative values would work if not throwing an error. Also, make sure there were no interpolation rules for share-weights, which could overwrite your changes.

Are you using GCAM v7? FYI, there are some trade queries included in the Model Interface there. You want to check imported corn results instead of traded_corn (export) in this case.

I believe crop trade was not differentiated across SSPs (regional markets for crops were not created back then). Only biomass trade was.

pkyle commented 8 months ago

So here the technology share-weights don't really do anything; in the structure (supplysector / subsector / technology), there are 2 levels of nested logit choice competition, but in this example we're only using one, and it's at the subsector level. So while the -100 may have been turned into a zero by the model code (negative share-weights aren't actually allowed), and that zero technology share-weight might have been passed up to the subsector level and caused its output to similarly be zero, I don't know that I'd expect for this to work as intended. I'd recommend doing the following, if you're just making changes directly to the XML file: `

                <share-weight fillout="1" year="1975">1</share-weight>
                <share-weight fillout="1" year="2070">0</share-weight>
                <interpolation-rule apply-to="share-weight" from-year="2015" to-year="2069">
                    <interpolation-function name="fixed"/>
                </interpolation-rule>

`

pkyle commented 8 months ago

And in reply to the question about SSP3, the SSP scenarios were constructed in 2014 in support of papers published in 2017, and while the capability to run them has been maintained since that time, their further development has not been a focal effort. The trade structure in ag_trade.xml was developed more recently, and only added to the core model within the last year or two. Its development was not complemented with any concurrent efforts to generate SSP-specific storylines of agricultural commodity trade and market integration.

jiangyongye commented 8 months ago

Both big thanks for the detailed answers to you guys! That's really helpful : ) ! Yeah, you are so right. the share-weight under technology should not be set to a negative number. I did this, and it broke the baseX database so I just can not open it in Model interface. image So if I want to set a scenario, for example, china will not import any corn starting in 2030. Is that should be like this image

and one more question (sorry for too many questions) like how can we delete some scenarios we ran just for test something? I did not find a button or something in the model interface that can do that

pkyle commented 8 months ago

File -> Manage DB -> [select scenarios] -> Remove Note that removing scenarios from a database masks them from view, but doesn't reduce the file size of a database. There isn't really any way to reduce the file size of a database, but scenarios can be exported to XML (File -> Manage DB -> [select scenarios] -> Export), and re-imported into a clean database.