Package ComboCode :: Package cc :: Package managers :: Module ModelingManager :: Class ModelingManager
[hide private]
[frames] | no frames]

Class ModelingManager

source code

A modeling manager which maintains information for all modeling sessions.

Instance Methods [hide private]
 
__init__(self, var_pars, processed_input, iterations=1, mcmax=0, gastronoom=0, sphinx=0, iterative=0, num_model_sessions=1, vic_manager=None, replace_db_entry=0, path_gastronoom='runTest', path_mcmax='runTest', skip_cooling=0, recover_sphinxfiles=0, single_session=0)
Initializing a ModelingManager instance.
source code
 
setDatabases(self)
Initialize all databases relevant for this grid.
source code
 
startModeling(self, star, star_index)
Start the modeling process on a model star.
source code
Method Details [hide private]

__init__(self, var_pars, processed_input, iterations=1, mcmax=0, gastronoom=0, sphinx=0, iterative=0, num_model_sessions=1, vic_manager=None, replace_db_entry=0, path_gastronoom='runTest', path_mcmax='runTest', skip_cooling=0, recover_sphinxfiles=0, single_session=0)
(Constructor)

source code 

Initializing a ModelingManager instance.

From this class, the MCMax and GASTRoNOoM codes are ran for each iteration, as well as the database retrieval of older models.

Parameters:
  • var_pars (list[string]) - gridded parameters in the CC session
  • processed_input (dict) - The processed paramaters from the CC inputfile
  • iterations (int) - Number of iterations

    (default: 1)

  • mcmax (bool) - Running MCMax?

    (default: 0)

  • gastronoom (bool) - Running GASTRoNOoM?

    (default: 0

  • sphinx (bool) - Running Sphinx?

    (default: 0)

  • iterative (bool) - Ray-trace MCMax models on every iteration

    (default: 0)

  • num_model_sessions (int) - number of sessions, i.e. len(star_grid)

    (default: 1)

  • vic_manager (Vic()) - the vic manager to run models (sphinx) on VIC3

    (default: None)

  • replace_db_entry (bool) - replace an entry in the database with a newly calculated model with a new model id (eg if some general data not included in the inputfiles is changed)

    (default: 0)

  • skip_cooling (bool) - Skip running cooling in case a model is not found in the database, for instance if it is already known that the model will fail

    (default: 0)

  • recover_sphinxfiles (bool) - Try to recover sphinx files from the disk in case they were correctly calculated, but not saved to the database for one reason or another.

    (default: 0)

  • path_mcmax (string) - modeling folder in MCMax home

    (default: 'runTest')

  • path_gastronoom (string) - modeling folder in GASTRoNOoM home

    (default: 'runTest')

  • single_session (bool) - If this is the only CC session. Speeds up db check.

    (default: 0)

startModeling(self, star, star_index)

source code 

Start the modeling process on a model star.

Parameters:
  • star (Star()) - The parameter set for this session
  • star_index (int) - The index of the Star() object in the full list in CC. Only used to track earlier iterations if iterative==1