shutil.rmtree(outdirpath) return sim.streamflow.as_matrix() # return streamflow def evaluation(self, evaldates=False): # function to return the evaluation data if evaldates == True: return self.evaldates if evaldates == False: return self.obs def objectivefunction(self, simulation, evaluation): # compute the objective function objectivefunction = spotpy.objectivefunctions.nashsutcliff( evaluation, simulation) # we want to maximize this function return objectivefunction spotpy_setup = spotpy_setup() sampler = spotpy.algorithms.sceua(spotpy_setup, dbname='Como_SCEUA_%s' % (spotpy_setup.num), dbformat='csv', parallel='mpi') sampler.sample(3000, ngs=9, kstop=30, pcento=0.0000025, peps=0.0000025) alert.send_alert('*****@*****.**', 'RHESSys Como Optimization Finished', 'Your script has finished')
return sim.adj_streamflow.as_matrix() # return streamflow def evaluation(self, evaldates=False): # function to return the evaluation data if evaldates == True: return self.evaldates if evaldates == False: return self.obs def objectivefunction(self, simulation, evaluation): # compute the objective function objectivefunction = spotpy.objectivefunctions.nashsutcliff( evaluation, simulation) # we want to maximize this function return objectivefunction spotpy_setup = spotpy_setup() sampler = spotpy.algorithms.lhs(spotpy_setup, dbname='Como_LHS_%s' % (spotpy_setup.num), dbformat='csv', parallel='mpi') sampler.sample(3500) alert.send_alert('*****@*****.**', 'RHESSys Como Sensitivity Analysis Finished', 'Your script has finished')