Comments (10)
have you populated the db with chirps & ncep information for that shapefile area and daterange? need to do that first. (the data.conf step)
from rheas.
Ah, got it, thanks. I populated the database by adding parameters to data.conf and running ./bin/rheas -u data.conf.
Then updated the nowcast.conf and nowcast.in files to reflect changes. This solved the above error.
However now when I run ./bin/rheas nowcast.conf
I get:
File "/Users/macbookpro/RHEAS/bin/rheas", line 15, in <module> sys.exit(rheas.run()) File "/Users/macbookpro/RHEAS/src/rheas.py", line 81, in run nowcast.execute(dbname, options) File "/Users/macbookpro/RHEAS/src/nowcast.py", line 187, in execute runVIC(dbname, options) File "/Users/macbookpro/RHEAS/src/nowcast.py", line 29, in runVIC runDeterministicVIC(dbname, options) File "/Users/macbookpro/RHEAS/src/nowcast.py", line 69, in runDeterministicVIC startday, endyear, endmonth, endday, name) File "/Users/macbookpro/RHEAS/src/vic/vic.py", line 52, in __init__ "select resolution from vic.input order by abs(resolution - {0})".format(resolution)) psycopg2.ProgrammingError: relation "vic.input" does not exist
When I run ./bin/rheas -d postgres nowcast.conf
I get:
ERROR: relation "vic.input" does not exist at character 24 STATEMENT: select resolution from vic.input order by abs(resolution - 0.25) Traceback (most recent call last): File "/Users/macbookpro/RHEAS/bin/rheas", line 15, in <module> sys.exit(rheas.run()) File "/Users/macbookpro/RHEAS/src/rheas.py", line 81, in run nowcast.execute(dbname, options) File "/Users/macbookpro/RHEAS/src/nowcast.py", line 187, in execute runVIC(dbname, options) File "/Users/macbookpro/RHEAS/src/nowcast.py", line 29, in runVIC runDeterministicVIC(dbname, options) File "/Users/macbookpro/RHEAS/src/nowcast.py", line 69, in runDeterministicVIC startday, endyear, endmonth, endday, name) File "/Users/macbookpro/RHEAS/src/vic/vic.py", line 52, in __init__ "select resolution from vic.input order by abs(resolution - {0})".format(resolution)) psycopg2.ProgrammingError: relation "vic.input" does not exist
Looks like I am missing some of the VIC inputs. Is there a conf file for vic?
I'm happy to close this issue and open another one if that's preferable. Thanks!
from rheas.
I think this may be caused by the initial state setting? Try vanilla, eg:
[nowcast]
model: vic
startdate: 2003-1-1
enddate: 2003-3-31
basin: data/tests/basin.shp
name: vanillatest
resolution: 0.25
[vic]
precip: chirps
temperature: ncep
wind: ncep
initialize: no
save to: db
save: net_short, soil_moist
from rheas.
When trying to populate the database with ncep (e.g. ./bin/rheas -u data.conf
I get:
WARNING! Overwriting raster in tmax.ncep_4 table for 2003-01-01
Traceback (most recent call last):
File "/Users/macbookpro/RHEAS/bin/rheas", line 15, in <module>
sys.exit(rheas.run())
File "/Users/macbookpro/RHEAS/src/rheas.py", line 76, in run
update(dbname, config_filename)
File "/Users/macbookpro/RHEAS/src/rheas.py", line 64, in update
mod.download(dbname, dt, bbox)
File "/Users/macbookpro/RHEAS/src/datasets/ncep.py", line 72, in download
_downloadVariable(varname, dbname, dt, bbox)
File "/Users/macbookpro/RHEAS/src/datasets/ncep.py", line 62, in _downloadVariable
print("Imported {0} in {1}".format(t.strftime("%Y-%m-%d"), table))
File "netCDF4/_netCDF4.pyx", line 3647, in netCDF4._netCDF4.Variable.__getattr__ (netCDF4/_netCDF4.c:35947)
File "netCDF4/_netCDF4.pyx", line 3458, in netCDF4._netCDF4.Variable.getncattr (netCDF4/_netCDF4.c:33184)
File "netCDF4/_netCDF4.pyx", line 1112, in netCDF4._netCDF4._get_att (netCDF4/_netCDF4.c:4200)
AttributeError: NetCDF: Attribute not found
Here is my data.conf file:
[domain]
minlat: 1.0
maxlat: 1.25
minlon: 35
maxlon: 35.25
[chirps]
startdate: 2003-1-1
enddate: 2003-3-31
[ncep]
startdate: 2003-1-1
enddate: 2003-3-31
from rheas.
Hi Kostas,
Even though it has been installed all necessary dependencies, it gives below error when downloading NCEP data. Kindly have a look.
Traceback (most recent call last):
File "./bin/rheas", line 16, in
sys.exit(rheas.run())
File "/home/susantha/RHEAS/src/rheas.py", line 76, in run
update(dbname, config_filename)
File "/home/susantha/RHEAS/src/rheas.py", line 64, in update
mod.download(dbname, dt, bbox)
File "/home/susantha/RHEAS/src/datasets/ncep.py", line 72, in download
_downloadVariable(varname, dbname, dt, bbox)
File "/home/susantha/RHEAS/src/datasets/ncep.py", line 62, in _downloadVariable
print("Imported {0} in {1}".format(t.strftime("%Y-%m-%d"), table))
File "_netCDF4.pyx", line 3633, in netCDF4._netCDF4.Variable.getattr (netCDF4/_netCDF4.c:31607)
File "_netCDF4.pyx", line 3448, in netCDF4._netCDF4.Variable.getncattr (netCDF4/_netCDF4.c:29324)
File "_netCDF4.pyx", line 1099, in netCDF4._netCDF4._get_att (netCDF4/_netCDF4.c:4112)
AttributeError: NetCDF: Attribute not found
from rheas.
This is probably related to an issue with the upstream netCDF python package. Can you try updating to the newest package and see if that solves it?
Also, the newest RHEAS version has a self-contained test suite so running ./bin/test after a correct installation should pass all 13 tests.
from rheas.
Hi K,
I am getting "psycopg2.ProgrammingError: relation "raster_resampled" does not exist" error since couple of days ago. I have installed psycopg2 and am with necessary input data sets. Pls advice to resolve this error.
Traceback (most recent call last):
File "./bin/rheas", line 16, in
sys.exit(rheas.run())
File "/home/rheas/RHEAS/src/rheas.py", line 81, in run
nowcast.execute(dbname, options)
File "/home/rheas/RHEAS/src/nowcast.py", line 191, in execute
runVIC(dbname, options)
File "/home/rheas/RHEAS/src/nowcast.py", line 29, in runVIC
runDeterministicVIC(dbname, options)
File "/home/rheas/RHEAS/src/nowcast.py", line 75, in runDeterministicVIC
prec, tmax, tmin, wind = model.getForcings(options['vic'])
File "/home/rheas/RHEAS/src/vic/vic.py", line 355, in getForcings
rtables[v] = self.createIndexTable("{0}.{1}".format(v, options[v]))
File "/home/rheas/RHEAS/src/vic/vic.py", line 296, in createIndexTable
"select * from raster_resampled where sname='{0}' and tname like '{1}_%' and resolution={2}".format(sname, tname, self.res))
psycopg2.ProgrammingError: relation "raster_resampled" does not exist
LINE 1: select * from raster_resampled where sname='precip' and tnam...
from rheas.
How are you ingesting the datasets, are you using rheas -d data.conf
? That should trigger the creation of the raster catalog (see here) so it should always exist (unless the downloading was stopped externally).
In any case, in order to fix this go inside a psql shell and paste
create or replace function resampled(_s text, _t text, out result double precision) as $func$ begin execute format('select st_scalex(rast) from %s.%s limit 1',quote_ident(_s),quote_ident(_t)) into result; end $func$ language plpgsql;
After that is finished paste this and you should have the catalog
create or replace view raster_resampled as (select r_table_schema as sname,r_table_name as tname,resampled(r_table_schema,r_table_name) as resolution from raster_columns);
from rheas.
Hi K,
I am using rheas -u data.conf to ingest datasets.
Now it is working well. Thanks for guidance.
From: Kostas Andreadis [mailto:[email protected]]
Sent: Monday, July 25, 2016 8:47 PM
To: nasa/RHEAS [email protected]
Cc: Susantha Jayasinghe [email protected]; Comment <
[email protected]>
Subject: Re: [nasa/RHEAS] Nowcast test error: relation "raster_resampled"
does not exist (#43)
How are you ingesting the datasets, are you using rheas -d data.conf? That
should trigger the creation of the raster catalog (see here
https://github.com/nasa/RHEAS/blob/master/src/dbio.py#L174) so it should
always exist (unless the downloading was stopped externally).
In any case, in order to fix this go inside a psql shell and paste
create or replace function resampled(_s text, _t text, out result double
precision) as
begin
execute format('select st_scalex(rast) from %s.%s limit
1',quote_ident(_s),quote_ident(_t)) into result;
end
After that is finished paste this and you should have the catalog
create or replace view raster_resampled as (select r_table_schema as
sname,r_table_name as tname,resampled(r_table_schema,r_table_name) as
resolution from raster_columns);
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#43 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AROogGu4C-ifdipgIEm74go1VVcxM3feks5qZL5dgaJpZM4IQGzB
.[image: Image removed by sender.]
from rheas.
Ok, closing the issue.
from rheas.
Related Issues (20)
- Handle missing data in forcings HOT 5
- Error: Referenced option does not exist: environment EARTHDATA_USER when running HOT 3
- How to add dssat.soil table HOT 2
- conda package for installing RHEAS HOT 2
- ESP forecast: Not enough years available to resample HOT 1
- NMME forecast: Ingest NDVI data HOT 4
- GPM: Input array issue when write to db HOT 1
- SPI Calculation Issue
- DSSAT maize EnKf error
- DSSAT Planting date issue HOT 1
- RHEAS installing on macOS Sierra 10.12.6 - Error: Referenced option does not exist: environment EARTHDATA_USER HOT 2
- Mac OSX buildout issue w HOT 2
- Erros after running ./bin/test .
- Issue with buildout process
- 5km input data files
- This is just example issue
- Error in running python bootstrap.py HOT 5
- Bus error
- What the wheat MODEL is? HOT 1
- Add VHI as drought product HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rheas.