Git Product home page Git Product logo

Comments (6)

kandread avatar kandread commented on August 24, 2024

Decided on forcing overwrite, assuming that if user explicitly sets start date they want to replace existing raster.

from rheas.

AdamJDuncan avatar AdamJDuncan commented on August 24, 2024

I'm still getting this after updating to the new dbio.py and rheas.py files...

adam@adam-X750LA:/media/adam/UbuData/RHEAS/bin$ ./rheas nowcast.conf
Traceback (most recent call last):
File "./rheas", line 14, in
sys.exit(rheas.run())
File "/media/adam/UbuData/RHEAS/src/rheas.py", line 78, in run
nowcast.execute(dbname, options)
File "/media/adam/UbuData/RHEAS/src/nowcast.py", line 187, in execute
runVIC(dbname, options)
File "/media/adam/UbuData/RHEAS/src/nowcast.py", line 29, in runVIC
runDeterministicVIC(dbname, options)
File "/media/adam/UbuData/RHEAS/src/nowcast.py", line 75, in runDeterministicVIC
prec, tmax, tmin, wind = model.getForcings(options['vic'])
File "/media/adam/UbuData/RHEAS/src/vic/vic.py", line 348, in getForcings
'precip', 'tmax', 'tmin', 'wind']}
File "/media/adam/UbuData/RHEAS/src/vic/vic.py", line 347, in
rtables = {v: self.createIndexTable("{0}.{1}".format(v, options[v])) for v in [
File "/media/adam/UbuData/RHEAS/src/vic/vic.py", line 298, in createIndexTable
cur.execute(sql)
psycopg2.ProgrammingError: relation "precip_xy" already exists

from rheas.

kandread avatar kandread commented on August 24, 2024

My guess is that you had a corrupted database. I've added a check to delete this table, so d1ae6c1 should fix your problem.

from rheas.

AdamJDuncan avatar AdamJDuncan commented on August 24, 2024

Thanks! Now it's showing this (which is what I got before I initialized the database, as well):

adam@adam-X750LA:/media/adam/UbuData/RHEAS/bin$ ./rheas nowcast.conf
Traceback (most recent call last):
File "./rheas", line 14, in
sys.exit(rheas.run())
File "/media/adam/UbuData/RHEAS/src/rheas.py", line 78, in run
nowcast.execute(dbname, options)
File "/media/adam/UbuData/RHEAS/src/nowcast.py", line 187, in execute
runVIC(dbname, options)
File "/media/adam/UbuData/RHEAS/src/nowcast.py", line 29, in runVIC
runDeterministicVIC(dbname, options)
File "/media/adam/UbuData/RHEAS/src/nowcast.py", line 75, in runDeterministicVIC
prec, tmax, tmin, wind = model.getForcings(options['vic'])
File "/media/adam/UbuData/RHEAS/src/vic/vic.py", line 349, in getForcings
'precip', 'tmax', 'tmin', 'wind']}
File "/media/adam/UbuData/RHEAS/src/vic/vic.py", line 348, in
rtables = {v: self.createIndexTable("{0}.{1}".format(v, options[v])) for v in [
File "/media/adam/UbuData/RHEAS/src/vic/vic.py", line 292, in createIndexTable
rtable = ".".join(cur.fetchone()[:2])
TypeError: 'NoneType' object has no attribute 'getitem'

from rheas.

AdamJDuncan avatar AdamJDuncan commented on August 24, 2024

For the conference call, this is where I am now:

[nowcast]
model: vic
startdate: 1991-5-1
enddate: 1991-5-21
basin: /media/mrc/91413921-20fa-49f6-a9f3-5cef68ef67b8/RHEAS/data/Bbox/BBox_PP.shp
name:PhnomPenh
resolution: 0.25

[vic]
precip: trmm
temperature: ncep
wind: ncep
initialize: no
save to: db
save: net_short
mrc@mrc-VPCZ114GX:/media/mrc/91413921-20fa-49f6-a9f3-5cef68ef67b8/RHEAS/bin$ ./rheas nowcast.conf
Traceback (most recent call last):
  File "./rheas", line 17, in <module>
    sys.exit(rheas.run())
  File "/media/mrc/91413921-20fa-49f6-a9f3-5cef68ef67b8/RHEAS/src/rheas.py", line 81, in run
    nowcast.execute(dbname, options)
  File "/media/mrc/91413921-20fa-49f6-a9f3-5cef68ef67b8/RHEAS/src/nowcast.py", line 187, in execute
    runVIC(dbname, options)
  File "/media/mrc/91413921-20fa-49f6-a9f3-5cef68ef67b8/RHEAS/src/nowcast.py", line 29, in runVIC
    runDeterministicVIC(dbname, options)
  File "/media/mrc/91413921-20fa-49f6-a9f3-5cef68ef67b8/RHEAS/src/nowcast.py", line 76, in runDeterministicVIC
    model.writeForcings(prec, tmax, tmin, wind)
  File "/media/mrc/91413921-20fa-49f6-a9f3-5cef68ef67b8/RHEAS/src/vic/vic.py", line 380, in writeForcings
    tmin) == len(self.lat) * ndays and len(wind) == len(self.lat) * ndays
AssertionError

I've tried different date ranges.

from rheas.

AdamJDuncan avatar AdamJDuncan commented on August 24, 2024

Oops... clearly an issue with the data... I've tried it with CHIRPS and NCEP in Africa and the model is running.

from rheas.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.