Skip to content

Commit

Permalink
fix failing output writing due to change in spotpy behaviour
Browse files Browse the repository at this point in the history
For the 'save' method of the spotpy setup object to be called when using a bespoke output database, this now needs to be explicitly stated when using an algorithm through `dbname='custom'`.
  • Loading branch information
Thibault Hallouin committed Aug 18, 2021
1 parent 5345b1d commit e2f695b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion smartpy/montecarlo/montecarlo.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ def run(self, compression=None):
# initialise the database (either CSV file or NETCDF file)
self._init_db()
# run the Monte Carlo simulation
sampler = spotpy.algorithms.mc(self, parallel=self.parallel)
sampler = spotpy.algorithms.mc(self, dbformat='custom', parallel=self.parallel)
sampler.sample(len(self.p_map))
self.database.close()
# if compression argument given, the file created will be compressed
Expand Down

0 comments on commit e2f695b

Please sign in to comment.