def __init__(self, configuration, modelTime, initialState=None, system_argument=None): DynamicModel.__init__(self) self.modelTime = modelTime self.model = PCRGlobWB(configuration, modelTime, initialState) self.reporting = Reporting(configuration, self.model, modelTime) # the model will set paramaters based on global pre-multipliers given in the argument: self.adusting_parameters(configuration, system_argument) # make the configuration available for the other method/function self.configuration = configuration
def __init__(self, configuration, modelTime, initialState = None, system_argument = None): DynamicModel.__init__(self) self.modelTime = modelTime self.model = PCRGlobWB(configuration, modelTime, initialState) self.reporting = Reporting(configuration, self.model, modelTime) # the model will set paramaters based on global pre-multipliers given in the argument: if system_argument != None: self.adusting_parameters(configuration, system_argument) # option to include merging processes for pcraster maps and netcdf files: self.with_merging = True if ('with_merging' in configuration.globalOptions.keys()) and (configuration.globalOptions['with_merging'] == "False"): self.with_merging = False # make the configuration available for the other method/function self.configuration = configuration
def initialize_model(self): if self.model is not None: #already initialized return try: logger.info("PCRGlobWB: initialize_model") initial_state = None self.model = PCRGlobWB(self.configuration, self.model_time, initial_state) self.reporting = Reporting(self.configuration, self.model, self.model_time) logger.info("Shape of maps is %s", str(self.shape)) logger.info("PCRGlobWB Initialized") except: import traceback traceback.print_exc() raise
def __init__(self, configuration, modelTime, initialState = None): DynamicModel.__init__(self) self.modelTime = modelTime self.model = PCRGlobWB(configuration, modelTime, initialState) self.reporting = Reporting(configuration, self.model, modelTime)