JGCRI / gcam-core

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

How can I completely remove unwanted scenarios from DB and free up memory #496

Open JiahongGUO121 opened 20 hours ago

JiahongGUO121 commented 20 hours ago

I want to delete a scenario I created in DB to free up memory, but I find that clicking "Remove" on ModelInterface simply removes the scenario's display in ModelInterface, but does not free up memory.

pkyle commented 15 hours ago

That's correct--once a scenario has been written to a database, there is no way to remove it in a way that reduces disk usage. Removing it simply masks it from view in the GUI. What can be done is to export the run(s) that you want to keep (File -> Manage DB -> Export), which will create new XML files, 1 per scenario, >1GB each, then make a new empty database (File -> Open -> DB Open -> select an empty folder where the new database will be), then once that is open, you can add the scenarios from their saved XML files (File -> Manage DB -> Add). Once they're all in the new database, you can delete the old database and the exported XML files. Note that creating a new database will wipe the contents of any existing folder, so you should make a new, empty folder prior to creating a database.