pygcam.scenarioSetup

The setup sub-command reads instructions from a scenarios.xml file or runs a Python script to create the XML input files necessary to run a project’s scenarios. See GCAM XML-Setup for more information.

API

pygcam.scenarioSetup.copyWorkspace(newWorkspace, refWorkspace=None, forceCreate=False, mcsMode=False)

Create a copy of a reference workspace by linking to or copying files from refWorkspace, which defaults to the value of config parameter GCAM.RunWorkspace. The copied workspace is the basis for creating sandboxes for a Monte Carlo simulation or a non-MCS project.

Parameters:
  • newWorkspace – (str) the directory to create
  • refWorkspace – (str) the workspace to link to or copy from (defaults to the value of config parameter GCAM.RefWorkspace)
  • forceCreate – (bool) if True, delete and recreate the sandbox
  • mcsMode – (bool) if True, perform setup appropriate for gcammcs trials.
Returns:

none

pygcam.scenarioSetup.createSandbox(sandbox, srcWorkspace=None, forceCreate=False, mcsMode=None)

Set up a run-time sandbox in which to run GCAM. This involves copying from or linking to files and directories in workspace, which defaults to the value of config parameter GCAM.SandboxRefWorkspace.

Parameters:
  • sandbox – (str) the directory to create
  • srcWorkspace – (str) the workspace to link to or copy from
  • forceCreate – (bool) if True, delete and recreate the sandbox
  • mcsMode – (‘gensim’, ‘trial’, or None) perform setup appropriate for pygcam-mcs trials.
Returns:

none