Closed akssinghe closed 5 years ago
Did you have a simulation that crashed previously? Lines 54-56 in src/drought.py
should clean up those tables. I'll add a couple of lines that make sure those tables don't exist before creating them.
forecast run stops after one ensemble is completed. i.e., run is not continuing with rest of ensembles as set in .conf file. This issue is common for both nmme and esp.
Seems some other tables still exist.
Traceback (most recent call last):
File "../.././bin/rheas", line 16, in
Resolved.
NMME forecast run gives below error even though ndvi data is available in the db. (can be used previous issue attached .conf and bbox for reproducing this error)
Traceback (most recent call last): File "../.././bin/rheas", line 16, in
sys.exit(rheas.run())
File "/home/ubuntu/RHEAS/src/rheas.py", line 99, in run
forecast.execute(dbname, options)
File "/home/ubuntu/RHEAS/src/forecast.py", line 130, in execute
runVIC(dbname, options)
File "/home/ubuntu/RHEAS/src/forecast.py", line 58, in runVIC
models.save(saveto, savevars)
File "/home/ubuntu/RHEAS/src/ensemble.py", line 153, in save
model.save(saveto, args, initialize, ensemble=e)
File "/home/ubuntu/RHEAS/src/vic/vic.py", line 609, in save
self.saveToDB(args, initialize=initialize, skipsave=skipsave, ensemble=ensemble)
File "/home/ubuntu/RHEAS/src/vic/vic.py", line 508, in saveToDB
dout = drought.calc(var, self, ensemble)
File "/home/ubuntu/RHEAS/src/drought.py", line 353, in calc
output = calcVCI(model)
File "/home/ubuntu/RHEAS/src/drought.py", line 42, in calcVCI
cur.execute(sql)
psycopg2.ProgrammingError: relation "ndvi_max" already exists