seims.run_seims Namespace Reference

Classes

class  MainSEIMS
 
class  ParseSEIMSConfig
 

Functions

def create_run_model (modelcfg_dict, scenario_id=-1, calibration_id=-1, subbasin_id=-1, do_execute=True)
 
def main ()
 

Detailed Description

@package run_seims
Configure and run SEIMS model.

    In order to avoid thread lock problems may be caused by pymongo (MongoClient),
      several functions should be called by following format:

      model.SetMongoClient()  # the singleton MongoDB client object will be used
      model.ReadOutletObservations()
      model.UnsetMongoClient()

      These functions are: `run()`, `clean()`, `ResetSimulationPeriod()`, `ResetOutputsPeriod()`,
                           `ReadMongoDBData()`, `ReadTimeseriesSimulations()`,
                           `ReadOutletObservations()`.

    @author   : Liangjun Zhu

    @changelog:
    - 2017-12-07 - lj - Initial implementation.
    - 2018-07-04 - lj - Support MPI version.
    - 2018-07-07 - lj - Add the outputs of single model run.
    - 2018-07-10 - lj - Add ParseSEIMSConfig for all SEIMS tools.
    - 2018-08-28 - lj - Add GetTimespan function and timespan counted by time.time().
    - 2018-11-15 - lj - Add model clean function.
    - 2019-01-08 - lj - Add output time period setting.
    - 2020-07-20 - lj - Read data from MongoDB once for all currently used properties.
    - 2020-08-11 - lj - Separate actually execution from run() and add CommandString property.
    - 2020-09-22 - lj - Add workload (slurm, mpi, etc.) mode. Functions improved.
    - 2023-05-22 - lj - Add cfg_name and fdir_mtd arguments.

Function Documentation

◆ create_run_model()

def seims.run_seims.create_run_model (   modelcfg_dict,
  scenario_id = -1,
  calibration_id = -1,
  subbasin_id = -1,
  do_execute = True 
)
Create, Run, and return SEIMS-based watershed model object.

Args:
    modelcfg_dict: Dict of arguments for SEIMS-based watershed model
    scenario_id: Scenario ID which can override the scenario_id in modelcfg_dict
    calibration_id: Calibration ID which can override the calibration_id in modelcfg_dict
    subbasin_id: Subbasin ID (0 for the whole watershed, 9999 for the field version) which
                 can override the subbasin_id in modelcfg_dict
    do_execute: Execute model or not.
Returns:
    The instance of SEIMS-based watershed model.

◆ main()

def seims.run_seims.main ( )
Run SEIMS-based watershed model with configuration file.