JGCRI / gcam-core

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

Plutus #362

Open Sandie1994 opened 10 months ago

Sandie1994 commented 10 months ago

Hi, please is Plutus only applicable to v5.3? I have followed exactly all the steps in the tutorial for my data in 5.4 and also 6.0. But I cannot get the results from plutus such as capacity and investments in the power sector. A "readGCAM" folder is created, and in this folder, there are two other folders that are empty (Tables_gcam and Tables_Templates). There are also two XML files in the readGCAM folder (ElecQueries and subSetQueries). That is it. Would be happy to receive some assistance on how to correctly obtain the results I am looking for. Thank you. @mengqi-z @pkyle @zarrarkhan

Edit I just tried using 5.3 and the problem is still the same. As you can see, the dataProj file that was to be in the 'sandy' folder is absent

3ee253618418d6fc691af92be39cf82

4d60e031a221edffb75ed2f49ae5024

pkyle commented 10 months ago

I'm not sure exactly what's going wrong here and I don't know that I've ever run plutus but I do have a local copy cloned, and I wouldn't recommend changing the default filepaths of dataProjFile or dirOutputs. In the vignette gcamInvest.Rmd, the example provided for querying from a database only has that single argument:

path_to_gcamdatabase <- 'E:/gcam-core-gcam-v5.3/output/databse_basexdb'
invest <- plutus::gcamInvest(gcamdatabase = path_to_gcamdatabase)

If the issue that you're having is that the rgcam project file isn't getting created properly, then that step could just be done manually, not using the embedded plutus functions. For example:

dataProj.proj <- rgcam::loadProject("./output/dataProj.proj")
dataProj.proj <- rgcam::addScenario(localDBConn(dbPath = workdir, dbFile = "database_basexdb"),
                                         dataProj.proj, c(),
                                         "./inst/extdata/ElecQueries.xml", clobber = TRUE)
Sandie1994 commented 10 months ago

Really appreciate the quick feedback and suggestions @pkyle . I will try them out ASAP, and report back to you on what happens. Super grateful for this.