wdb-users Mailing List for wdb - weather/water database system
Brought to you by:
falkenroth,
michaeloa
You can subscribe to this list here.
2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
(5) |
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
(7) |
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2010 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(6) |
2011 |
Jan
|
Feb
|
Mar
|
Apr
(5) |
May
(1) |
Jun
(2) |
Jul
(1) |
Aug
|
Sep
|
Oct
(1) |
Nov
(1) |
Dec
|
2012 |
Jan
|
Feb
|
Mar
(5) |
Apr
(38) |
May
(9) |
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(2) |
2014 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(10) |
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
From: Michael A. <mic...@me...> - 2014-10-16 11:28:06
|
Hi, This is just to let you know that we are closing down this mailing list. A new mailing list has been established at wdb...@li... You can sign up to it here: http://lists.met.no/mailman/listinfo/wdb-users Regards, Michael Akinde |
From: Michael A. <mic...@me...> - 2014-06-24 15:04:58
|
Hi, I understand your frustration; the metadata aspect of the database is unfortunately one of those elements that really needs to be made much more simple. This is something we need to take a look at in future. However, I would strongly recommend setting up a namespace. The place and parameter names in the default namespace are auto-generated, so it is not really designed for "human" usage. Moreover, is is primarily through the namespace mechanic that you can adapt the database to your local requirements (e.g., language, etc). Anyway, try the following (preferably on a clean database): --- This sets up your namespace. SELECT wci.begin( 'wdb', 0, 0, 0 ); SELECT wci.addorganization('Metero romania', 'meteoromania.ro', 'government organization', '2000-01-01', '2050-01-01', 'ANM'); SELECT wci.addPerson('Razvan', 'Dobre', 'Mr', 'Hi Razvan,', 'RD', NULL, 'male', NULL, NULL, '2000-01-01', '2999-12-31', NULL ); SELECT wci.addNameSpace( 10, 'ANM', 'Date ANM', 'production', 'meteoromania.ro', 'RD', '2000-01-01' ); --- This sets up 10 as the default namespace for ALL users (the version you were running only set 10 as the default for the 'wdb' user). SELECT wci.setDefaultNameSpace( '', 10, 10, 10 ); This is important, because the gribLoader runs as its local user. --- Add the place regular grid. SELECT wci.begin( 'wdb', 10, 10, 10 ); SELECT wci.addplaceregulargrid('model grid',400, 241, 0.025, 0.025, 19.5, 43, '+proj=longlat +a=6367470.0 +towgs84=0,0,0 +no_defs'); select wci.adddataprovider( 'romania model', 'computer system', 'grid', '1 day', 'Test data source' ); SELECT wci.copyParameterNameSpace( 0 ); SELECT wci.addparameter( 'height', null, null, null, null, null, null, 'm' ); SELECT wci.addparameter( 'ground or water surface', null, null, null, null, null, null, 'none' ); It is very important that you are running addplaceregulargrid in namespace 10, because otherwise the grid cannot be retrieved in that namespace. This was the "bug" that was causing problems. If you need to add additional parameters and dataproviders, make sure to do so after having run SELECT wci.begin('wdb',10,10,10) as well. (height was missing in the default parameters, so added it here). For the gribloader, I added the following line to dataprovider.conf 78, 132 = romania model "gribload" here should of course be your preferred dataprovider name. In valueparameter1.conf, I run: 78, 2, 1, 0, 0, 0, 0, 0 = air temperature, K 78, 2, 2, 0, 0, 0, 0, 0 = dew point temperature, K 78, 2, 11, 0, 0, 0, 0, 0 = land area fraction, ratio 78, 2, 17, 0, 0, 0, 0, 0 = cloud area fraction, ratio 78, 2, 61, 0, 0, 0, 0, 0 = air pressure at sea level, Pa 78, 2, 61, 0, 0, 0, 0, 0 = wind speed, m/s 78, 2, 71, 0, 0, 0, 0, 0 = relative humidity, % 78, 2, 33, 0, 0, 0, 0, 0 = x wind, m/s 78, 2, 34, 0, 0, 0, 0, 0 = y wind, m/s Where the parameter names should of course be whatever the real parameters are. Finally, in levelparameter1.conf I edit the line ! 1 = null parameter, none To be: 1 = ground or water surface, none (This is to fix some met.no specific metadata encoding). With this set of metadata, gribLoad decodes all of the metadata in lfff00100000.grb1 correctly. Unfortunately, it still fails to load the data with: Error while decoding the variable marsType. GRIB API: Unknow error -10 Data field not loaded. This is because the GRIB file key localUsePresent returns 1. Try: grib_get lfff00100000.grb1 -p localUsePresent When localUsePresent returns 1, the gribLoader looks for a marsType key. This causes the grib_api to throw an exception. localUsePresent is only supposed to return 1 if an ECMWF local use definition is present. This may be a bug in the grib_api, because when I check Octet 24: grib_get lfff00100000.grb1 -p setLocalDefinition This returns 0s, as it should. Ideally, I would recommend fixing the problem in the GRIB file; but I'm not sure why the grib_api insists that these files have a localUse section, when Octet 24 is 0. It may be a bug in the grib_api. Might be worthwhile checking whether this is fixed in a newer version of the grib_api (my laptop has 1.9.9 installed). Alternatively, you can implement a quick hack in the gribloader. Find the GribField.cpp file in wdb-gribload. Change line 364: long int localUsage = gribHandleReader_->getLong( "localUsePresent" ); To: long int localUsage = gribHandleReader_->getLong( "setLocalDefinition" ); And recompile. This should work without breaking ECMWF EPS files, but I don't have time to check this right now. Finally, gribLoad lfff00100000.grb1 Should now load all 8 fields into the database. Hurray. :-) Regards, Michael A. ----- Original Message ----- > Hi > > No luck, the SELECT wci.copyParameterNameSpace( 0 ); fails every time. I > quit creating namespaces, wil just use the default one, 0. > > I attached a gribfile so that you can load it to a working wdb. I want to > mention that I use the lastet version available on github (1.5.4) > > Gribs are located here: http://doraz.ro/~razvan/2014062100.tar.gz > > > Thanks. > > > On Tue, Jun 24, 2014 at 3:12 PM, Dobre Razvan <dob...@gm...> > wrote: > > > Hi > > > > No luck, the SELECT wci.copyParameterNameSpace( 0 ); fails every time. I > > quit creating namespaces, wil just use the default one, 0. > > > > I attached a gribfile so that you can load it to a working wdb. I want to > > mention that I use the lastet version available on github (1.5.4) > > > > Thanks. > > > > > > On Mon, Jun 23, 2014 at 5:05 PM, Dobre Razvan <dob...@gm...> > > wrote: > > > >> Ok. > >> > >> Thank you very much for your time. Will try this and if I run into issues > >> again I will reply tomorow with a gribfile. > >> > >> Have a nice day! > >> > >> > >> On Mon, Jun 23, 2014 at 3:54 PM, Michael Akinde <mic...@me...> > >> wrote: > >> > >>> Hi, > >>> > >>> I would like to see the beginning of the gribLoad log also, but before > >>> that, there are perhaps a couple of things you should do. > >>> > >>> 1. Define the new namespace ANM as the very first thing that you do. > >>> SELECT wci.addNameSpace( 10, 'ANM', 'Date ANM', 'production', ' > >>> meteoromania.ro', 'RD', '2000-01-01' ); > >>> > >>> 2. Set the default namespace correctly: > >>> SELECT wci.setDefaultNameSpace( '', 10, 10, 10 ); > >>> > >>> This ensures that everyone has 10 as their default namespace. 'wdb' > >>> means that only the WDB user has this as its default namespace. > >>> > >>> 3. When adding organizations, etc., always use your own 10 namespace; > >>> i.e., run: > >>> SELECT wci.begin( 'wdb', 10, 10, 10 ); > >>> > >>> Before adding anything. > >>> > >>> 4. Make sure to copy over existing parameters, if you want to use them. > >>> SELECT wci.copyParameterNameSpace( 0 ); > >>> > >>> > >>> My current guess is that there is an issue with namespaces, so simply > >>> setting the default correctly may solve the problem. But taking a closer > >>> look at the start of the logs should help. > >>> > >>> Worst case; I don't have more time today, but if you send me an example > >>> GRIB file, I can quickly take a look at loading it into a WDB instance > >>> and > >>> try to figure out what is going wrong tomorrow. > >>> > >>> Regards, > >>> > >>> Michael A. > >>> > >>> ----- Original Message ----- > >>> > 1.erased everything with wdb -> dropdb wdb, createdb wdb > >>> > 2. wrote this queries: > >>> > SELECT wci.begin( 'wdb', 0, 0, 0 ); > >>> > SELECT wci.addorganization('Metero romania', 'meteoromania.ro', > >>> 'government > >>> > organization', '2000-01-01', '2050-01-01', 'ANM'); > >>> > SELECT wci.addPerson('Razvan', 'Dobre', 'Mr', 'Hi Razvan,', 'RD', NULL, > >>> > 'male', NULL, NULL, '2000-01-01', '2999-12-31', NULL ); > >>> > SELECT wci.setDefaultNameSpace( 'wdb', 10, 10, 10 ); > >>> > SELECT wci.addplaceregulargrid('model grid',400, 241, 0.025, 0.025, > >>> 19.5, > >>> > 43, '+proj=longlat +a=6367470.0 +towgs84=0,0,0 +no_defs'); > >>> > SELECT wci.end() > >>> > > >>> > I can run them without an issue, the placeregulargrid gets created (i > >>> > looked in the table), but when I run gribLoad I get the following: > >>> > > >>> > 014-06-23 04:08:35,959 DEBUG wdb.gribLoad.gribGridDefinition > >>> > lfff00000000.grb1 6: GridType is regular_ll > >>> > 2014-06-23 04:08:35,959 DEBUG wdb.gribLoad.gribGridDefinition > >>> > lfff00000000.grb1 6: GridType is regular_ll > >>> > 2014-06-23 04:08:35,959 DEBUG wdb.gribLoad.gribGridDefinition > >>> > lfff00000000.grb1 6: Creating geometry with (400, 241, 0.025, 0.025, > >>> 19.5, > >>> > 43) > >>> > 2014-06-23 04:08:35,960 DEBUG wdb.gribLoad.gribfield lfff00000000.grb1 > >>> 6: > >>> > Retrieved 96400 values from the field > >>> > 2014-06-23 04:08:35,960 DEBUG wdb.gribLoad.gribField lfff00000000.grb1 > >>> 6: > >>> > Grid was already in requested format > >>> > 2014-06-23 04:08:35,960 DEBUG wdb.gribLoad.gribField lfff00000000.grb1 > >>> 7: > >>> > Got GRIB Version: 1 > >>> > 2014-06-23 04:08:35,960 DEBUG wdb.gribLoad.gribGridDefinition > >>> > lfff00000000.grb1 7: GridType is regular_ll > >>> > 2014-06-23 04:08:35,960 DEBUG wdb.load.getplacename lfff00000000.grb1 > >>> 7: > >>> > Result returned: > >>> > 2014-06-23 04:08:35,960 DEBUG wdb.load.getplacename lfff00000000.grb1 > >>> 7: > >>> > Did not find any placename matching the definition (400, 241, 0.025, > >>> 0.025, > >>> > 19.5, 43, '+proj=longlat +a=6367470.0 +towgs84=0,0,0 +no_defs') > >>> > 2014-06-23 04:08:35,960 DEBUG wdb.grib.gribloader lfff00000000.grb1 7: > >>> > Could not identify placeName > >>> > 2014-06-23 04:08:35,960 ERROR wdb.grib.gribloader lfff00000000.grb1 7: > >>> > Failed to identify a placename. No match for: 400, 241, 0.025, 0.025, > >>> 19.5, > >>> > 43, '+proj=longlat +a=6367470.0 +towgs84=0,0,0 +no_defs' Data field not > >>> > loaded. > >>> > > >>> > I only added the dataprovider info > >>> > into /usr/local/etc/gribLoad/dataprovider.conf. > >>> > > >>> > Do I miss something? > >>> > > >>> > Thanks > >>> > > >>> > > >>> > On Mon, Jun 23, 2014 at 12:04 PM, Michael Akinde < > >>> mic...@me...> > >>> > wrote: > >>> > > >>> > > Hi, > >>> > > > >>> > > Unfortunately not. The documentation of WDB still needs a lot of > >>> > > improvement in that aspect. > >>> > > > >>> > > The metadata included with the core WDB projects is intended to be > >>> pretty > >>> > > generic (so contains very little that is specific to met.no). For > >>> more > >>> > > specific met.no metadata, take a look at > >>> > > https://github.com/metno/wdb-metadata > >>> > > > >>> > > More specifically related to regulargrids, see: > >>> > > > >>> > > > >>> https://github.com/metno/wdb-metadata/blob/master/etc/wdb_placeregulargrid.in.sql > >>> > > > >>> > > The wdb-gribload package is configured to be able to load some basic > >>> ECMWF > >>> > > files. > >>> > > > >>> > > > >>> > > In terms of getting WDB working, there are two things that need to > >>> be in > >>> > > order: > >>> > > > >>> > > 1. You need to have the appropriate metadata present in the > >>> database. The > >>> > > three critical ones are the dataprovider, the place definition, and > >>> the > >>> > > parameter. If either of the three are missing for the data you want > >>> to > >>> > > load, then it won't be able to load the data into the database. > >>> > > > >>> > > 2. wdb-gribLoad must have configuration information for GRIB to WDB > >>> for > >>> > > both dataprovider and parameters. The grid definition is mapped > >>> > > automatically, using the x/y dimensions and increments. > >>> > > > >>> > > Getting these configuration files and metadata to be correct is > >>> currently > >>> > > the main "problem" of setting up a WDB system. > >>> > > > >>> > > If the grid is already defined in the database as you say, then > >>> gribload > >>> > > should not throw an error; so I suspect that the error you are > >>> seeing is > >>> > > masking some other problem. > >>> > > > >>> > > Taking a look at the logs tends to help. Try to load your > >>> files/data, and > >>> > > run the gribLoad with maximum logging. > >>> > > > >>> > > ./gribLoad --loglevel 1 YOUR_GRIB_FILE > >>> > > > >>> > > (You can use --logfile to save directly to a file as well). > >>> > > > >>> > > This makes it possible to follow the detailed working of the GRIB > >>> loading, > >>> > > and hopefully will give a more precise pointer as to what is causing > >>> the > >>> > > failure. > >>> > > > >>> > > Regards, > >>> > > > >>> > > Michael A. > >>> > > > >>> > > ----- Original Message ----- > >>> > > > Hi Michael, > >>> > > > > >>> > > > Thanks for your reply. I saw that 'numberx, numbery, incrementx, > >>> > > > incrementy, startx, starty, and originalsrid' tuple is already in > >>> the > >>> > > > DB. Is there a tutorial of how to get started with wdb, what to do > >>> prior > >>> > > > first import? > >>> > > > > >>> > > > I saw that wdb is preconfigured for met.no organization. Should I > >>> change > >>> > > > something for Romanian data set? > >>> > > > > >>> > > > > >>> > > > Razvan Dobre > >>> > > > > >>> > > > > >>> > > > On 6/22/14, 5:12 PM, Michael Akinde wrote: > >>> > > > > Hi, > >>> > > > > > >>> > > > > Always good to hear from people working with WDB. > >>> > > > > > >>> > > > > placeregulargrid_skey is a unique index over numberx, numbery, > >>> > > incrementx, > >>> > > > > incrementy, startx, starty, and originalsrid. Essentially, this > >>> means > >>> > > that > >>> > > > > you are trying to add a place definition to the DB that already > >>> exists. > >>> > > > > > >>> > > > > It might be better to take a look at the logs of the loading > >>> program > >>> > > for > >>> > > > > the problem. > >>> > > > > > >>> > > > > Regards, > >>> > > > > > >>> > > > > Michael A. > >>> > > > > > >>> > > > > ----- Original Message ----- > >>> > > > >> Hello > >>> > > > >> > >>> > > > >> I'm new to wdb and I have a question: gridload complains that > >>> there is > >>> > > > >> no place definition point but when I want to add one it > >>> complains > >>> > > about > >>> > > > >> a foreign key. > >>> > > > >> > >>> > > > >> This is the query: > >>> > > > >> SELECT wci.begin ( 'wdb', 0, 0, 0 ); > >>> > > > >> SELECT wci.addplaceregulargrid( 'GribLoad AutoInsert > >>> > > > >> 2014-06-22T14:38:40.990488', 400, 241, 0.025, 0.025, 19.5, 43, > >>> > > > >> '+proj=longlat +a=6367470.0 +towgs84=0,0,0 +no_defs'); > >>> > > > >> SELECT wci.end() > >>> > > > >> > >>> > > > >> > >>> > > > >> This is the output: > >>> > > > >> ERROR: duplicate key value violates unique constraint > >>> > > > >> "placeregulargrid_skey" > >>> > > > >> CONTEXT: SQL statement "INSERT INTO wdb_int.placeregulargrid > >>> VALUES ( > >>> > > > >> $1 , $2 , $3 , $4 , $5 , $6 , $7 , $8 )" > >>> > > > >> PL/pgSQL function "addplaceregulargrid" line 34 at SQL statement > >>> > > > >> > >>> > > > >> ********** Error ********** > >>> > > > >> > >>> > > > >> ERROR: duplicate key value violates unique constraint > >>> > > > >> "placeregulargrid_skey" > >>> > > > >> SQL state: 23505 > >>> > > > >> Context: SQL statement "INSERT INTO wdb_int.placeregulargrid > >>> VALUES ( > >>> > > > >> $1 , $2 , $3 , $4 , $5 , $6 , $7 , $8 )" > >>> > > > >> PL/pgSQL function "addplaceregulargrid" line 34 at SQL statement > >>> > > > >> > >>> > > > >> Can you help me please to debug this? > >>> > > > >> > >>> > > > >> Thank you! > >>> > > > >> > >>> > > > >> > >>> > > > >>> ------------------------------------------------------------------------------ > >>> > > > >> HPCC Systems Open Source Big Data Platform from LexisNexis Risk > >>> > > Solutions > >>> > > > >> Find What Matters Most in Your Big Data with HPCC Systems > >>> > > > >> Open Source. Fast. Scalable. Simple. Ideal for Dirty Data. > >>> > > > >> Leverages Graph Analysis for Fast Processing & Easy Data > >>> Exploration > >>> > > > >> http://p.sf.net/sfu/hpccsystems > >>> > > > >> _______________________________________________ > >>> > > > >> WDB-Users mailing list > >>> > > > >> WDB...@li... > >>> > > > >> https://lists.sourceforge.net/lists/listinfo/wdb-users > >>> > > > >> > >>> > > > > >>> > > > > >>> > > > >>> > > >>> > > >>> > > >>> > -- > >>> > Razvan Dobre > >>> > http://www.doraz.ro > >>> > > >>> > >> > >> > >> > >> -- > >> Razvan Dobre > >> http://www.doraz.ro > >> > >> > > > > > > -- > > Razvan Dobre > > http://www.doraz.ro > > > > > > > -- > Razvan Dobre > http://www.doraz.ro > |
From: Dobre R. <dob...@gm...> - 2014-06-24 12:15:59
|
Hi No luck, the SELECT wci.copyParameterNameSpace( 0 ); fails every time. I quit creating namespaces, wil just use the default one, 0. I attached a gribfile so that you can load it to a working wdb. I want to mention that I use the lastet version available on github (1.5.4) Gribs are located here: http://doraz.ro/~razvan/2014062100.tar.gz Thanks. On Tue, Jun 24, 2014 at 3:12 PM, Dobre Razvan <dob...@gm...> wrote: > Hi > > No luck, the SELECT wci.copyParameterNameSpace( 0 ); fails every time. I > quit creating namespaces, wil just use the default one, 0. > > I attached a gribfile so that you can load it to a working wdb. I want to > mention that I use the lastet version available on github (1.5.4) > > Thanks. > > > On Mon, Jun 23, 2014 at 5:05 PM, Dobre Razvan <dob...@gm...> > wrote: > >> Ok. >> >> Thank you very much for your time. Will try this and if I run into issues >> again I will reply tomorow with a gribfile. >> >> Have a nice day! >> >> >> On Mon, Jun 23, 2014 at 3:54 PM, Michael Akinde <mic...@me...> >> wrote: >> >>> Hi, >>> >>> I would like to see the beginning of the gribLoad log also, but before >>> that, there are perhaps a couple of things you should do. >>> >>> 1. Define the new namespace ANM as the very first thing that you do. >>> SELECT wci.addNameSpace( 10, 'ANM', 'Date ANM', 'production', ' >>> meteoromania.ro', 'RD', '2000-01-01' ); >>> >>> 2. Set the default namespace correctly: >>> SELECT wci.setDefaultNameSpace( '', 10, 10, 10 ); >>> >>> This ensures that everyone has 10 as their default namespace. 'wdb' >>> means that only the WDB user has this as its default namespace. >>> >>> 3. When adding organizations, etc., always use your own 10 namespace; >>> i.e., run: >>> SELECT wci.begin( 'wdb', 10, 10, 10 ); >>> >>> Before adding anything. >>> >>> 4. Make sure to copy over existing parameters, if you want to use them. >>> SELECT wci.copyParameterNameSpace( 0 ); >>> >>> >>> My current guess is that there is an issue with namespaces, so simply >>> setting the default correctly may solve the problem. But taking a closer >>> look at the start of the logs should help. >>> >>> Worst case; I don't have more time today, but if you send me an example >>> GRIB file, I can quickly take a look at loading it into a WDB instance and >>> try to figure out what is going wrong tomorrow. >>> >>> Regards, >>> >>> Michael A. >>> >>> ----- Original Message ----- >>> > 1.erased everything with wdb -> dropdb wdb, createdb wdb >>> > 2. wrote this queries: >>> > SELECT wci.begin( 'wdb', 0, 0, 0 ); >>> > SELECT wci.addorganization('Metero romania', 'meteoromania.ro', >>> 'government >>> > organization', '2000-01-01', '2050-01-01', 'ANM'); >>> > SELECT wci.addPerson('Razvan', 'Dobre', 'Mr', 'Hi Razvan,', 'RD', NULL, >>> > 'male', NULL, NULL, '2000-01-01', '2999-12-31', NULL ); >>> > SELECT wci.setDefaultNameSpace( 'wdb', 10, 10, 10 ); >>> > SELECT wci.addplaceregulargrid('model grid',400, 241, 0.025, 0.025, >>> 19.5, >>> > 43, '+proj=longlat +a=6367470.0 +towgs84=0,0,0 +no_defs'); >>> > SELECT wci.end() >>> > >>> > I can run them without an issue, the placeregulargrid gets created (i >>> > looked in the table), but when I run gribLoad I get the following: >>> > >>> > 014-06-23 04:08:35,959 DEBUG wdb.gribLoad.gribGridDefinition >>> > lfff00000000.grb1 6: GridType is regular_ll >>> > 2014-06-23 04:08:35,959 DEBUG wdb.gribLoad.gribGridDefinition >>> > lfff00000000.grb1 6: GridType is regular_ll >>> > 2014-06-23 04:08:35,959 DEBUG wdb.gribLoad.gribGridDefinition >>> > lfff00000000.grb1 6: Creating geometry with (400, 241, 0.025, 0.025, >>> 19.5, >>> > 43) >>> > 2014-06-23 04:08:35,960 DEBUG wdb.gribLoad.gribfield lfff00000000.grb1 >>> 6: >>> > Retrieved 96400 values from the field >>> > 2014-06-23 04:08:35,960 DEBUG wdb.gribLoad.gribField lfff00000000.grb1 >>> 6: >>> > Grid was already in requested format >>> > 2014-06-23 04:08:35,960 DEBUG wdb.gribLoad.gribField lfff00000000.grb1 >>> 7: >>> > Got GRIB Version: 1 >>> > 2014-06-23 04:08:35,960 DEBUG wdb.gribLoad.gribGridDefinition >>> > lfff00000000.grb1 7: GridType is regular_ll >>> > 2014-06-23 04:08:35,960 DEBUG wdb.load.getplacename lfff00000000.grb1 >>> 7: >>> > Result returned: >>> > 2014-06-23 04:08:35,960 DEBUG wdb.load.getplacename lfff00000000.grb1 >>> 7: >>> > Did not find any placename matching the definition (400, 241, 0.025, >>> 0.025, >>> > 19.5, 43, '+proj=longlat +a=6367470.0 +towgs84=0,0,0 +no_defs') >>> > 2014-06-23 04:08:35,960 DEBUG wdb.grib.gribloader lfff00000000.grb1 7: >>> > Could not identify placeName >>> > 2014-06-23 04:08:35,960 ERROR wdb.grib.gribloader lfff00000000.grb1 7: >>> > Failed to identify a placename. No match for: 400, 241, 0.025, 0.025, >>> 19.5, >>> > 43, '+proj=longlat +a=6367470.0 +towgs84=0,0,0 +no_defs' Data field not >>> > loaded. >>> > >>> > I only added the dataprovider info >>> > into /usr/local/etc/gribLoad/dataprovider.conf. >>> > >>> > Do I miss something? >>> > >>> > Thanks >>> > >>> > >>> > On Mon, Jun 23, 2014 at 12:04 PM, Michael Akinde < >>> mic...@me...> >>> > wrote: >>> > >>> > > Hi, >>> > > >>> > > Unfortunately not. The documentation of WDB still needs a lot of >>> > > improvement in that aspect. >>> > > >>> > > The metadata included with the core WDB projects is intended to be >>> pretty >>> > > generic (so contains very little that is specific to met.no). For >>> more >>> > > specific met.no metadata, take a look at >>> > > https://github.com/metno/wdb-metadata >>> > > >>> > > More specifically related to regulargrids, see: >>> > > >>> > > >>> https://github.com/metno/wdb-metadata/blob/master/etc/wdb_placeregulargrid.in.sql >>> > > >>> > > The wdb-gribload package is configured to be able to load some basic >>> ECMWF >>> > > files. >>> > > >>> > > >>> > > In terms of getting WDB working, there are two things that need to >>> be in >>> > > order: >>> > > >>> > > 1. You need to have the appropriate metadata present in the >>> database. The >>> > > three critical ones are the dataprovider, the place definition, and >>> the >>> > > parameter. If either of the three are missing for the data you want >>> to >>> > > load, then it won't be able to load the data into the database. >>> > > >>> > > 2. wdb-gribLoad must have configuration information for GRIB to WDB >>> for >>> > > both dataprovider and parameters. The grid definition is mapped >>> > > automatically, using the x/y dimensions and increments. >>> > > >>> > > Getting these configuration files and metadata to be correct is >>> currently >>> > > the main "problem" of setting up a WDB system. >>> > > >>> > > If the grid is already defined in the database as you say, then >>> gribload >>> > > should not throw an error; so I suspect that the error you are >>> seeing is >>> > > masking some other problem. >>> > > >>> > > Taking a look at the logs tends to help. Try to load your >>> files/data, and >>> > > run the gribLoad with maximum logging. >>> > > >>> > > ./gribLoad --loglevel 1 YOUR_GRIB_FILE >>> > > >>> > > (You can use --logfile to save directly to a file as well). >>> > > >>> > > This makes it possible to follow the detailed working of the GRIB >>> loading, >>> > > and hopefully will give a more precise pointer as to what is causing >>> the >>> > > failure. >>> > > >>> > > Regards, >>> > > >>> > > Michael A. >>> > > >>> > > ----- Original Message ----- >>> > > > Hi Michael, >>> > > > >>> > > > Thanks for your reply. I saw that 'numberx, numbery, incrementx, >>> > > > incrementy, startx, starty, and originalsrid' tuple is already in >>> the >>> > > > DB. Is there a tutorial of how to get started with wdb, what to do >>> prior >>> > > > first import? >>> > > > >>> > > > I saw that wdb is preconfigured for met.no organization. Should I >>> change >>> > > > something for Romanian data set? >>> > > > >>> > > > >>> > > > Razvan Dobre >>> > > > >>> > > > >>> > > > On 6/22/14, 5:12 PM, Michael Akinde wrote: >>> > > > > Hi, >>> > > > > >>> > > > > Always good to hear from people working with WDB. >>> > > > > >>> > > > > placeregulargrid_skey is a unique index over numberx, numbery, >>> > > incrementx, >>> > > > > incrementy, startx, starty, and originalsrid. Essentially, this >>> means >>> > > that >>> > > > > you are trying to add a place definition to the DB that already >>> exists. >>> > > > > >>> > > > > It might be better to take a look at the logs of the loading >>> program >>> > > for >>> > > > > the problem. >>> > > > > >>> > > > > Regards, >>> > > > > >>> > > > > Michael A. >>> > > > > >>> > > > > ----- Original Message ----- >>> > > > >> Hello >>> > > > >> >>> > > > >> I'm new to wdb and I have a question: gridload complains that >>> there is >>> > > > >> no place definition point but when I want to add one it >>> complains >>> > > about >>> > > > >> a foreign key. >>> > > > >> >>> > > > >> This is the query: >>> > > > >> SELECT wci.begin ( 'wdb', 0, 0, 0 ); >>> > > > >> SELECT wci.addplaceregulargrid( 'GribLoad AutoInsert >>> > > > >> 2014-06-22T14:38:40.990488', 400, 241, 0.025, 0.025, 19.5, 43, >>> > > > >> '+proj=longlat +a=6367470.0 +towgs84=0,0,0 +no_defs'); >>> > > > >> SELECT wci.end() >>> > > > >> >>> > > > >> >>> > > > >> This is the output: >>> > > > >> ERROR: duplicate key value violates unique constraint >>> > > > >> "placeregulargrid_skey" >>> > > > >> CONTEXT: SQL statement "INSERT INTO wdb_int.placeregulargrid >>> VALUES ( >>> > > > >> $1 , $2 , $3 , $4 , $5 , $6 , $7 , $8 )" >>> > > > >> PL/pgSQL function "addplaceregulargrid" line 34 at SQL statement >>> > > > >> >>> > > > >> ********** Error ********** >>> > > > >> >>> > > > >> ERROR: duplicate key value violates unique constraint >>> > > > >> "placeregulargrid_skey" >>> > > > >> SQL state: 23505 >>> > > > >> Context: SQL statement "INSERT INTO wdb_int.placeregulargrid >>> VALUES ( >>> > > > >> $1 , $2 , $3 , $4 , $5 , $6 , $7 , $8 )" >>> > > > >> PL/pgSQL function "addplaceregulargrid" line 34 at SQL statement >>> > > > >> >>> > > > >> Can you help me please to debug this? >>> > > > >> >>> > > > >> Thank you! >>> > > > >> >>> > > > >> >>> > > >>> ------------------------------------------------------------------------------ >>> > > > >> HPCC Systems Open Source Big Data Platform from LexisNexis Risk >>> > > Solutions >>> > > > >> Find What Matters Most in Your Big Data with HPCC Systems >>> > > > >> Open Source. Fast. Scalable. Simple. Ideal for Dirty Data. >>> > > > >> Leverages Graph Analysis for Fast Processing & Easy Data >>> Exploration >>> > > > >> http://p.sf.net/sfu/hpccsystems >>> > > > >> _______________________________________________ >>> > > > >> WDB-Users mailing list >>> > > > >> WDB...@li... >>> > > > >> https://lists.sourceforge.net/lists/listinfo/wdb-users >>> > > > >> >>> > > > >>> > > > >>> > > >>> > >>> > >>> > >>> > -- >>> > Razvan Dobre >>> > http://www.doraz.ro >>> > >>> >> >> >> >> -- >> Razvan Dobre >> http://www.doraz.ro >> >> > > > -- > Razvan Dobre > http://www.doraz.ro > > -- Razvan Dobre http://www.doraz.ro |
From: Dobre R. <dob...@gm...> - 2014-06-23 14:05:24
|
Ok. Thank you very much for your time. Will try this and if I run into issues again I will reply tomorow with a gribfile. Have a nice day! On Mon, Jun 23, 2014 at 3:54 PM, Michael Akinde <mic...@me...> wrote: > Hi, > > I would like to see the beginning of the gribLoad log also, but before > that, there are perhaps a couple of things you should do. > > 1. Define the new namespace ANM as the very first thing that you do. > SELECT wci.addNameSpace( 10, 'ANM', 'Date ANM', 'production', ' > meteoromania.ro', 'RD', '2000-01-01' ); > > 2. Set the default namespace correctly: > SELECT wci.setDefaultNameSpace( '', 10, 10, 10 ); > > This ensures that everyone has 10 as their default namespace. 'wdb' means > that only the WDB user has this as its default namespace. > > 3. When adding organizations, etc., always use your own 10 namespace; > i.e., run: > SELECT wci.begin( 'wdb', 10, 10, 10 ); > > Before adding anything. > > 4. Make sure to copy over existing parameters, if you want to use them. > SELECT wci.copyParameterNameSpace( 0 ); > > > My current guess is that there is an issue with namespaces, so simply > setting the default correctly may solve the problem. But taking a closer > look at the start of the logs should help. > > Worst case; I don't have more time today, but if you send me an example > GRIB file, I can quickly take a look at loading it into a WDB instance and > try to figure out what is going wrong tomorrow. > > Regards, > > Michael A. > > ----- Original Message ----- > > 1.erased everything with wdb -> dropdb wdb, createdb wdb > > 2. wrote this queries: > > SELECT wci.begin( 'wdb', 0, 0, 0 ); > > SELECT wci.addorganization('Metero romania', 'meteoromania.ro', > 'government > > organization', '2000-01-01', '2050-01-01', 'ANM'); > > SELECT wci.addPerson('Razvan', 'Dobre', 'Mr', 'Hi Razvan,', 'RD', NULL, > > 'male', NULL, NULL, '2000-01-01', '2999-12-31', NULL ); > > SELECT wci.setDefaultNameSpace( 'wdb', 10, 10, 10 ); > > SELECT wci.addplaceregulargrid('model grid',400, 241, 0.025, 0.025, 19.5, > > 43, '+proj=longlat +a=6367470.0 +towgs84=0,0,0 +no_defs'); > > SELECT wci.end() > > > > I can run them without an issue, the placeregulargrid gets created (i > > looked in the table), but when I run gribLoad I get the following: > > > > 014-06-23 04:08:35,959 DEBUG wdb.gribLoad.gribGridDefinition > > lfff00000000.grb1 6: GridType is regular_ll > > 2014-06-23 04:08:35,959 DEBUG wdb.gribLoad.gribGridDefinition > > lfff00000000.grb1 6: GridType is regular_ll > > 2014-06-23 04:08:35,959 DEBUG wdb.gribLoad.gribGridDefinition > > lfff00000000.grb1 6: Creating geometry with (400, 241, 0.025, 0.025, > 19.5, > > 43) > > 2014-06-23 04:08:35,960 DEBUG wdb.gribLoad.gribfield lfff00000000.grb1 6: > > Retrieved 96400 values from the field > > 2014-06-23 04:08:35,960 DEBUG wdb.gribLoad.gribField lfff00000000.grb1 6: > > Grid was already in requested format > > 2014-06-23 04:08:35,960 DEBUG wdb.gribLoad.gribField lfff00000000.grb1 7: > > Got GRIB Version: 1 > > 2014-06-23 04:08:35,960 DEBUG wdb.gribLoad.gribGridDefinition > > lfff00000000.grb1 7: GridType is regular_ll > > 2014-06-23 04:08:35,960 DEBUG wdb.load.getplacename lfff00000000.grb1 7: > > Result returned: > > 2014-06-23 04:08:35,960 DEBUG wdb.load.getplacename lfff00000000.grb1 7: > > Did not find any placename matching the definition (400, 241, 0.025, > 0.025, > > 19.5, 43, '+proj=longlat +a=6367470.0 +towgs84=0,0,0 +no_defs') > > 2014-06-23 04:08:35,960 DEBUG wdb.grib.gribloader lfff00000000.grb1 7: > > Could not identify placeName > > 2014-06-23 04:08:35,960 ERROR wdb.grib.gribloader lfff00000000.grb1 7: > > Failed to identify a placename. No match for: 400, 241, 0.025, 0.025, > 19.5, > > 43, '+proj=longlat +a=6367470.0 +towgs84=0,0,0 +no_defs' Data field not > > loaded. > > > > I only added the dataprovider info > > into /usr/local/etc/gribLoad/dataprovider.conf. > > > > Do I miss something? > > > > Thanks > > > > > > On Mon, Jun 23, 2014 at 12:04 PM, Michael Akinde <mic...@me...> > > wrote: > > > > > Hi, > > > > > > Unfortunately not. The documentation of WDB still needs a lot of > > > improvement in that aspect. > > > > > > The metadata included with the core WDB projects is intended to be > pretty > > > generic (so contains very little that is specific to met.no). For more > > > specific met.no metadata, take a look at > > > https://github.com/metno/wdb-metadata > > > > > > More specifically related to regulargrids, see: > > > > > > > https://github.com/metno/wdb-metadata/blob/master/etc/wdb_placeregulargrid.in.sql > > > > > > The wdb-gribload package is configured to be able to load some basic > ECMWF > > > files. > > > > > > > > > In terms of getting WDB working, there are two things that need to be > in > > > order: > > > > > > 1. You need to have the appropriate metadata present in the database. > The > > > three critical ones are the dataprovider, the place definition, and the > > > parameter. If either of the three are missing for the data you want to > > > load, then it won't be able to load the data into the database. > > > > > > 2. wdb-gribLoad must have configuration information for GRIB to WDB for > > > both dataprovider and parameters. The grid definition is mapped > > > automatically, using the x/y dimensions and increments. > > > > > > Getting these configuration files and metadata to be correct is > currently > > > the main "problem" of setting up a WDB system. > > > > > > If the grid is already defined in the database as you say, then > gribload > > > should not throw an error; so I suspect that the error you are seeing > is > > > masking some other problem. > > > > > > Taking a look at the logs tends to help. Try to load your files/data, > and > > > run the gribLoad with maximum logging. > > > > > > ./gribLoad --loglevel 1 YOUR_GRIB_FILE > > > > > > (You can use --logfile to save directly to a file as well). > > > > > > This makes it possible to follow the detailed working of the GRIB > loading, > > > and hopefully will give a more precise pointer as to what is causing > the > > > failure. > > > > > > Regards, > > > > > > Michael A. > > > > > > ----- Original Message ----- > > > > Hi Michael, > > > > > > > > Thanks for your reply. I saw that 'numberx, numbery, incrementx, > > > > incrementy, startx, starty, and originalsrid' tuple is already in the > > > > DB. Is there a tutorial of how to get started with wdb, what to do > prior > > > > first import? > > > > > > > > I saw that wdb is preconfigured for met.no organization. Should I > change > > > > something for Romanian data set? > > > > > > > > > > > > Razvan Dobre > > > > > > > > > > > > On 6/22/14, 5:12 PM, Michael Akinde wrote: > > > > > Hi, > > > > > > > > > > Always good to hear from people working with WDB. > > > > > > > > > > placeregulargrid_skey is a unique index over numberx, numbery, > > > incrementx, > > > > > incrementy, startx, starty, and originalsrid. Essentially, this > means > > > that > > > > > you are trying to add a place definition to the DB that already > exists. > > > > > > > > > > It might be better to take a look at the logs of the loading > program > > > for > > > > > the problem. > > > > > > > > > > Regards, > > > > > > > > > > Michael A. > > > > > > > > > > ----- Original Message ----- > > > > >> Hello > > > > >> > > > > >> I'm new to wdb and I have a question: gridload complains that > there is > > > > >> no place definition point but when I want to add one it complains > > > about > > > > >> a foreign key. > > > > >> > > > > >> This is the query: > > > > >> SELECT wci.begin ( 'wdb', 0, 0, 0 ); > > > > >> SELECT wci.addplaceregulargrid( 'GribLoad AutoInsert > > > > >> 2014-06-22T14:38:40.990488', 400, 241, 0.025, 0.025, 19.5, 43, > > > > >> '+proj=longlat +a=6367470.0 +towgs84=0,0,0 +no_defs'); > > > > >> SELECT wci.end() > > > > >> > > > > >> > > > > >> This is the output: > > > > >> ERROR: duplicate key value violates unique constraint > > > > >> "placeregulargrid_skey" > > > > >> CONTEXT: SQL statement "INSERT INTO wdb_int.placeregulargrid > VALUES ( > > > > >> $1 , $2 , $3 , $4 , $5 , $6 , $7 , $8 )" > > > > >> PL/pgSQL function "addplaceregulargrid" line 34 at SQL statement > > > > >> > > > > >> ********** Error ********** > > > > >> > > > > >> ERROR: duplicate key value violates unique constraint > > > > >> "placeregulargrid_skey" > > > > >> SQL state: 23505 > > > > >> Context: SQL statement "INSERT INTO wdb_int.placeregulargrid > VALUES ( > > > > >> $1 , $2 , $3 , $4 , $5 , $6 , $7 , $8 )" > > > > >> PL/pgSQL function "addplaceregulargrid" line 34 at SQL statement > > > > >> > > > > >> Can you help me please to debug this? > > > > >> > > > > >> Thank you! > > > > >> > > > > >> > > > > ------------------------------------------------------------------------------ > > > > >> HPCC Systems Open Source Big Data Platform from LexisNexis Risk > > > Solutions > > > > >> Find What Matters Most in Your Big Data with HPCC Systems > > > > >> Open Source. Fast. Scalable. Simple. Ideal for Dirty Data. > > > > >> Leverages Graph Analysis for Fast Processing & Easy Data > Exploration > > > > >> http://p.sf.net/sfu/hpccsystems > > > > >> _______________________________________________ > > > > >> WDB-Users mailing list > > > > >> WDB...@li... > > > > >> https://lists.sourceforge.net/lists/listinfo/wdb-users > > > > >> > > > > > > > > > > > > > > > > > > > -- > > Razvan Dobre > > http://www.doraz.ro > > > -- Razvan Dobre http://www.doraz.ro |
From: Michael A. <mic...@me...> - 2014-06-23 12:55:00
|
Hi, I would like to see the beginning of the gribLoad log also, but before that, there are perhaps a couple of things you should do. 1. Define the new namespace ANM as the very first thing that you do. SELECT wci.addNameSpace( 10, 'ANM', 'Date ANM', 'production', 'meteoromania.ro', 'RD', '2000-01-01' ); 2. Set the default namespace correctly: SELECT wci.setDefaultNameSpace( '', 10, 10, 10 ); This ensures that everyone has 10 as their default namespace. 'wdb' means that only the WDB user has this as its default namespace. 3. When adding organizations, etc., always use your own 10 namespace; i.e., run: SELECT wci.begin( 'wdb', 10, 10, 10 ); Before adding anything. 4. Make sure to copy over existing parameters, if you want to use them. SELECT wci.copyParameterNameSpace( 0 ); My current guess is that there is an issue with namespaces, so simply setting the default correctly may solve the problem. But taking a closer look at the start of the logs should help. Worst case; I don't have more time today, but if you send me an example GRIB file, I can quickly take a look at loading it into a WDB instance and try to figure out what is going wrong tomorrow. Regards, Michael A. ----- Original Message ----- > 1.erased everything with wdb -> dropdb wdb, createdb wdb > 2. wrote this queries: > SELECT wci.begin( 'wdb', 0, 0, 0 ); > SELECT wci.addorganization('Metero romania', 'meteoromania.ro', 'government > organization', '2000-01-01', '2050-01-01', 'ANM'); > SELECT wci.addPerson('Razvan', 'Dobre', 'Mr', 'Hi Razvan,', 'RD', NULL, > 'male', NULL, NULL, '2000-01-01', '2999-12-31', NULL ); > SELECT wci.setDefaultNameSpace( 'wdb', 10, 10, 10 ); > SELECT wci.addplaceregulargrid('model grid',400, 241, 0.025, 0.025, 19.5, > 43, '+proj=longlat +a=6367470.0 +towgs84=0,0,0 +no_defs'); > SELECT wci.end() > > I can run them without an issue, the placeregulargrid gets created (i > looked in the table), but when I run gribLoad I get the following: > > 014-06-23 04:08:35,959 DEBUG wdb.gribLoad.gribGridDefinition > lfff00000000.grb1 6: GridType is regular_ll > 2014-06-23 04:08:35,959 DEBUG wdb.gribLoad.gribGridDefinition > lfff00000000.grb1 6: GridType is regular_ll > 2014-06-23 04:08:35,959 DEBUG wdb.gribLoad.gribGridDefinition > lfff00000000.grb1 6: Creating geometry with (400, 241, 0.025, 0.025, 19.5, > 43) > 2014-06-23 04:08:35,960 DEBUG wdb.gribLoad.gribfield lfff00000000.grb1 6: > Retrieved 96400 values from the field > 2014-06-23 04:08:35,960 DEBUG wdb.gribLoad.gribField lfff00000000.grb1 6: > Grid was already in requested format > 2014-06-23 04:08:35,960 DEBUG wdb.gribLoad.gribField lfff00000000.grb1 7: > Got GRIB Version: 1 > 2014-06-23 04:08:35,960 DEBUG wdb.gribLoad.gribGridDefinition > lfff00000000.grb1 7: GridType is regular_ll > 2014-06-23 04:08:35,960 DEBUG wdb.load.getplacename lfff00000000.grb1 7: > Result returned: > 2014-06-23 04:08:35,960 DEBUG wdb.load.getplacename lfff00000000.grb1 7: > Did not find any placename matching the definition (400, 241, 0.025, 0.025, > 19.5, 43, '+proj=longlat +a=6367470.0 +towgs84=0,0,0 +no_defs') > 2014-06-23 04:08:35,960 DEBUG wdb.grib.gribloader lfff00000000.grb1 7: > Could not identify placeName > 2014-06-23 04:08:35,960 ERROR wdb.grib.gribloader lfff00000000.grb1 7: > Failed to identify a placename. No match for: 400, 241, 0.025, 0.025, 19.5, > 43, '+proj=longlat +a=6367470.0 +towgs84=0,0,0 +no_defs' Data field not > loaded. > > I only added the dataprovider info > into /usr/local/etc/gribLoad/dataprovider.conf. > > Do I miss something? > > Thanks > > > On Mon, Jun 23, 2014 at 12:04 PM, Michael Akinde <mic...@me...> > wrote: > > > Hi, > > > > Unfortunately not. The documentation of WDB still needs a lot of > > improvement in that aspect. > > > > The metadata included with the core WDB projects is intended to be pretty > > generic (so contains very little that is specific to met.no). For more > > specific met.no metadata, take a look at > > https://github.com/metno/wdb-metadata > > > > More specifically related to regulargrids, see: > > > > https://github.com/metno/wdb-metadata/blob/master/etc/wdb_placeregulargrid.in.sql > > > > The wdb-gribload package is configured to be able to load some basic ECMWF > > files. > > > > > > In terms of getting WDB working, there are two things that need to be in > > order: > > > > 1. You need to have the appropriate metadata present in the database. The > > three critical ones are the dataprovider, the place definition, and the > > parameter. If either of the three are missing for the data you want to > > load, then it won't be able to load the data into the database. > > > > 2. wdb-gribLoad must have configuration information for GRIB to WDB for > > both dataprovider and parameters. The grid definition is mapped > > automatically, using the x/y dimensions and increments. > > > > Getting these configuration files and metadata to be correct is currently > > the main "problem" of setting up a WDB system. > > > > If the grid is already defined in the database as you say, then gribload > > should not throw an error; so I suspect that the error you are seeing is > > masking some other problem. > > > > Taking a look at the logs tends to help. Try to load your files/data, and > > run the gribLoad with maximum logging. > > > > ./gribLoad --loglevel 1 YOUR_GRIB_FILE > > > > (You can use --logfile to save directly to a file as well). > > > > This makes it possible to follow the detailed working of the GRIB loading, > > and hopefully will give a more precise pointer as to what is causing the > > failure. > > > > Regards, > > > > Michael A. > > > > ----- Original Message ----- > > > Hi Michael, > > > > > > Thanks for your reply. I saw that 'numberx, numbery, incrementx, > > > incrementy, startx, starty, and originalsrid' tuple is already in the > > > DB. Is there a tutorial of how to get started with wdb, what to do prior > > > first import? > > > > > > I saw that wdb is preconfigured for met.no organization. Should I change > > > something for Romanian data set? > > > > > > > > > Razvan Dobre > > > > > > > > > On 6/22/14, 5:12 PM, Michael Akinde wrote: > > > > Hi, > > > > > > > > Always good to hear from people working with WDB. > > > > > > > > placeregulargrid_skey is a unique index over numberx, numbery, > > incrementx, > > > > incrementy, startx, starty, and originalsrid. Essentially, this means > > that > > > > you are trying to add a place definition to the DB that already exists. > > > > > > > > It might be better to take a look at the logs of the loading program > > for > > > > the problem. > > > > > > > > Regards, > > > > > > > > Michael A. > > > > > > > > ----- Original Message ----- > > > >> Hello > > > >> > > > >> I'm new to wdb and I have a question: gridload complains that there is > > > >> no place definition point but when I want to add one it complains > > about > > > >> a foreign key. > > > >> > > > >> This is the query: > > > >> SELECT wci.begin ( 'wdb', 0, 0, 0 ); > > > >> SELECT wci.addplaceregulargrid( 'GribLoad AutoInsert > > > >> 2014-06-22T14:38:40.990488', 400, 241, 0.025, 0.025, 19.5, 43, > > > >> '+proj=longlat +a=6367470.0 +towgs84=0,0,0 +no_defs'); > > > >> SELECT wci.end() > > > >> > > > >> > > > >> This is the output: > > > >> ERROR: duplicate key value violates unique constraint > > > >> "placeregulargrid_skey" > > > >> CONTEXT: SQL statement "INSERT INTO wdb_int.placeregulargrid VALUES ( > > > >> $1 , $2 , $3 , $4 , $5 , $6 , $7 , $8 )" > > > >> PL/pgSQL function "addplaceregulargrid" line 34 at SQL statement > > > >> > > > >> ********** Error ********** > > > >> > > > >> ERROR: duplicate key value violates unique constraint > > > >> "placeregulargrid_skey" > > > >> SQL state: 23505 > > > >> Context: SQL statement "INSERT INTO wdb_int.placeregulargrid VALUES ( > > > >> $1 , $2 , $3 , $4 , $5 , $6 , $7 , $8 )" > > > >> PL/pgSQL function "addplaceregulargrid" line 34 at SQL statement > > > >> > > > >> Can you help me please to debug this? > > > >> > > > >> Thank you! > > > >> > > > >> > > ------------------------------------------------------------------------------ > > > >> HPCC Systems Open Source Big Data Platform from LexisNexis Risk > > Solutions > > > >> Find What Matters Most in Your Big Data with HPCC Systems > > > >> Open Source. Fast. Scalable. Simple. Ideal for Dirty Data. > > > >> Leverages Graph Analysis for Fast Processing & Easy Data Exploration > > > >> http://p.sf.net/sfu/hpccsystems > > > >> _______________________________________________ > > > >> WDB-Users mailing list > > > >> WDB...@li... > > > >> https://lists.sourceforge.net/lists/listinfo/wdb-users > > > >> > > > > > > > > > > > > -- > Razvan Dobre > http://www.doraz.ro > |
From: Dobre R. <dob...@gm...> - 2014-06-23 11:15:24
|
Hi Thanks, for the linked, It helped. I will describe exactly what I did so far: 1.erased everything with wdb -> dropdb wdb, createdb wdb 2. wrote this queries: SELECT wci.begin( 'wdb', 0, 0, 0 ); SELECT wci.addorganization('Metero romania', 'meteoromania.ro', 'government organization', '2000-01-01', '2050-01-01', 'ANM'); SELECT wci.addPerson('Razvan', 'Dobre', 'Mr', 'Hi Razvan,', 'RD', NULL, 'male', NULL, NULL, '2000-01-01', '2999-12-31', NULL ); SELECT wci.addNameSpace( 10, 'ANM', 'Date ANM', 'production', ' meteoromania.ro', 'RD', '2000-01-01' ); SELECT wci.setDefaultNameSpace( 'wdb', 10, 10, 10 ); SELECT wci.addplaceregulargrid('model grid',400, 241, 0.025, 0.025, 19.5, 43, '+proj=longlat +a=6367470.0 +towgs84=0,0,0 +no_defs'); SELECT wci.end() I can run them without an issue, the placeregulargrid gets created (i looked in the table), but when I run gribLoad I get the following: 014-06-23 04:08:35,959 DEBUG wdb.gribLoad.gribGridDefinition lfff00000000.grb1 6: GridType is regular_ll 2014-06-23 04:08:35,959 DEBUG wdb.gribLoad.gribGridDefinition lfff00000000.grb1 6: GridType is regular_ll 2014-06-23 04:08:35,959 DEBUG wdb.gribLoad.gribGridDefinition lfff00000000.grb1 6: Creating geometry with (400, 241, 0.025, 0.025, 19.5, 43) 2014-06-23 04:08:35,960 DEBUG wdb.gribLoad.gribfield lfff00000000.grb1 6: Retrieved 96400 values from the field 2014-06-23 04:08:35,960 DEBUG wdb.gribLoad.gribField lfff00000000.grb1 6: Grid was already in requested format 2014-06-23 04:08:35,960 DEBUG wdb.gribLoad.gribField lfff00000000.grb1 7: Got GRIB Version: 1 2014-06-23 04:08:35,960 DEBUG wdb.gribLoad.gribGridDefinition lfff00000000.grb1 7: GridType is regular_ll 2014-06-23 04:08:35,960 DEBUG wdb.load.getplacename lfff00000000.grb1 7: Result returned: 2014-06-23 04:08:35,960 DEBUG wdb.load.getplacename lfff00000000.grb1 7: Did not find any placename matching the definition (400, 241, 0.025, 0.025, 19.5, 43, '+proj=longlat +a=6367470.0 +towgs84=0,0,0 +no_defs') 2014-06-23 04:08:35,960 DEBUG wdb.grib.gribloader lfff00000000.grb1 7: Could not identify placeName 2014-06-23 04:08:35,960 ERROR wdb.grib.gribloader lfff00000000.grb1 7: Failed to identify a placename. No match for: 400, 241, 0.025, 0.025, 19.5, 43, '+proj=longlat +a=6367470.0 +towgs84=0,0,0 +no_defs' Data field not loaded. I only added the dataprovider info into /usr/local/etc/gribLoad/dataprovider.conf. Do I miss something? Thanks On Mon, Jun 23, 2014 at 12:04 PM, Michael Akinde <mic...@me...> wrote: > Hi, > > Unfortunately not. The documentation of WDB still needs a lot of > improvement in that aspect. > > The metadata included with the core WDB projects is intended to be pretty > generic (so contains very little that is specific to met.no). For more > specific met.no metadata, take a look at > https://github.com/metno/wdb-metadata > > More specifically related to regulargrids, see: > > https://github.com/metno/wdb-metadata/blob/master/etc/wdb_placeregulargrid.in.sql > > The wdb-gribload package is configured to be able to load some basic ECMWF > files. > > > In terms of getting WDB working, there are two things that need to be in > order: > > 1. You need to have the appropriate metadata present in the database. The > three critical ones are the dataprovider, the place definition, and the > parameter. If either of the three are missing for the data you want to > load, then it won't be able to load the data into the database. > > 2. wdb-gribLoad must have configuration information for GRIB to WDB for > both dataprovider and parameters. The grid definition is mapped > automatically, using the x/y dimensions and increments. > > Getting these configuration files and metadata to be correct is currently > the main "problem" of setting up a WDB system. > > If the grid is already defined in the database as you say, then gribload > should not throw an error; so I suspect that the error you are seeing is > masking some other problem. > > Taking a look at the logs tends to help. Try to load your files/data, and > run the gribLoad with maximum logging. > > ./gribLoad --loglevel 1 YOUR_GRIB_FILE > > (You can use --logfile to save directly to a file as well). > > This makes it possible to follow the detailed working of the GRIB loading, > and hopefully will give a more precise pointer as to what is causing the > failure. > > Regards, > > Michael A. > > ----- Original Message ----- > > Hi Michael, > > > > Thanks for your reply. I saw that 'numberx, numbery, incrementx, > > incrementy, startx, starty, and originalsrid' tuple is already in the > > DB. Is there a tutorial of how to get started with wdb, what to do prior > > first import? > > > > I saw that wdb is preconfigured for met.no organization. Should I change > > something for Romanian data set? > > > > > > Razvan Dobre > > > > > > On 6/22/14, 5:12 PM, Michael Akinde wrote: > > > Hi, > > > > > > Always good to hear from people working with WDB. > > > > > > placeregulargrid_skey is a unique index over numberx, numbery, > incrementx, > > > incrementy, startx, starty, and originalsrid. Essentially, this means > that > > > you are trying to add a place definition to the DB that already exists. > > > > > > It might be better to take a look at the logs of the loading program > for > > > the problem. > > > > > > Regards, > > > > > > Michael A. > > > > > > ----- Original Message ----- > > >> Hello > > >> > > >> I'm new to wdb and I have a question: gridload complains that there is > > >> no place definition point but when I want to add one it complains > about > > >> a foreign key. > > >> > > >> This is the query: > > >> SELECT wci.begin ( 'wdb', 0, 0, 0 ); > > >> SELECT wci.addplaceregulargrid( 'GribLoad AutoInsert > > >> 2014-06-22T14:38:40.990488', 400, 241, 0.025, 0.025, 19.5, 43, > > >> '+proj=longlat +a=6367470.0 +towgs84=0,0,0 +no_defs'); > > >> SELECT wci.end() > > >> > > >> > > >> This is the output: > > >> ERROR: duplicate key value violates unique constraint > > >> "placeregulargrid_skey" > > >> CONTEXT: SQL statement "INSERT INTO wdb_int.placeregulargrid VALUES ( > > >> $1 , $2 , $3 , $4 , $5 , $6 , $7 , $8 )" > > >> PL/pgSQL function "addplaceregulargrid" line 34 at SQL statement > > >> > > >> ********** Error ********** > > >> > > >> ERROR: duplicate key value violates unique constraint > > >> "placeregulargrid_skey" > > >> SQL state: 23505 > > >> Context: SQL statement "INSERT INTO wdb_int.placeregulargrid VALUES ( > > >> $1 , $2 , $3 , $4 , $5 , $6 , $7 , $8 )" > > >> PL/pgSQL function "addplaceregulargrid" line 34 at SQL statement > > >> > > >> Can you help me please to debug this? > > >> > > >> Thank you! > > >> > > >> > ------------------------------------------------------------------------------ > > >> HPCC Systems Open Source Big Data Platform from LexisNexis Risk > Solutions > > >> Find What Matters Most in Your Big Data with HPCC Systems > > >> Open Source. Fast. Scalable. Simple. Ideal for Dirty Data. > > >> Leverages Graph Analysis for Fast Processing & Easy Data Exploration > > >> http://p.sf.net/sfu/hpccsystems > > >> _______________________________________________ > > >> WDB-Users mailing list > > >> WDB...@li... > > >> https://lists.sourceforge.net/lists/listinfo/wdb-users > > >> > > > > > -- Razvan Dobre http://www.doraz.ro |
From: Michael A. <mic...@me...> - 2014-06-23 09:04:29
|
Hi, Unfortunately not. The documentation of WDB still needs a lot of improvement in that aspect. The metadata included with the core WDB projects is intended to be pretty generic (so contains very little that is specific to met.no). For more specific met.no metadata, take a look at https://github.com/metno/wdb-metadata More specifically related to regulargrids, see: https://github.com/metno/wdb-metadata/blob/master/etc/wdb_placeregulargrid.in.sql The wdb-gribload package is configured to be able to load some basic ECMWF files. In terms of getting WDB working, there are two things that need to be in order: 1. You need to have the appropriate metadata present in the database. The three critical ones are the dataprovider, the place definition, and the parameter. If either of the three are missing for the data you want to load, then it won't be able to load the data into the database. 2. wdb-gribLoad must have configuration information for GRIB to WDB for both dataprovider and parameters. The grid definition is mapped automatically, using the x/y dimensions and increments. Getting these configuration files and metadata to be correct is currently the main "problem" of setting up a WDB system. If the grid is already defined in the database as you say, then gribload should not throw an error; so I suspect that the error you are seeing is masking some other problem. Taking a look at the logs tends to help. Try to load your files/data, and run the gribLoad with maximum logging. ./gribLoad --loglevel 1 YOUR_GRIB_FILE (You can use --logfile to save directly to a file as well). This makes it possible to follow the detailed working of the GRIB loading, and hopefully will give a more precise pointer as to what is causing the failure. Regards, Michael A. ----- Original Message ----- > Hi Michael, > > Thanks for your reply. I saw that 'numberx, numbery, incrementx, > incrementy, startx, starty, and originalsrid' tuple is already in the > DB. Is there a tutorial of how to get started with wdb, what to do prior > first import? > > I saw that wdb is preconfigured for met.no organization. Should I change > something for Romanian data set? > > > Razvan Dobre > > > On 6/22/14, 5:12 PM, Michael Akinde wrote: > > Hi, > > > > Always good to hear from people working with WDB. > > > > placeregulargrid_skey is a unique index over numberx, numbery, incrementx, > > incrementy, startx, starty, and originalsrid. Essentially, this means that > > you are trying to add a place definition to the DB that already exists. > > > > It might be better to take a look at the logs of the loading program for > > the problem. > > > > Regards, > > > > Michael A. > > > > ----- Original Message ----- > >> Hello > >> > >> I'm new to wdb and I have a question: gridload complains that there is > >> no place definition point but when I want to add one it complains about > >> a foreign key. > >> > >> This is the query: > >> SELECT wci.begin ( 'wdb', 0, 0, 0 ); > >> SELECT wci.addplaceregulargrid( 'GribLoad AutoInsert > >> 2014-06-22T14:38:40.990488', 400, 241, 0.025, 0.025, 19.5, 43, > >> '+proj=longlat +a=6367470.0 +towgs84=0,0,0 +no_defs'); > >> SELECT wci.end() > >> > >> > >> This is the output: > >> ERROR: duplicate key value violates unique constraint > >> "placeregulargrid_skey" > >> CONTEXT: SQL statement "INSERT INTO wdb_int.placeregulargrid VALUES ( > >> $1 , $2 , $3 , $4 , $5 , $6 , $7 , $8 )" > >> PL/pgSQL function "addplaceregulargrid" line 34 at SQL statement > >> > >> ********** Error ********** > >> > >> ERROR: duplicate key value violates unique constraint > >> "placeregulargrid_skey" > >> SQL state: 23505 > >> Context: SQL statement "INSERT INTO wdb_int.placeregulargrid VALUES ( > >> $1 , $2 , $3 , $4 , $5 , $6 , $7 , $8 )" > >> PL/pgSQL function "addplaceregulargrid" line 34 at SQL statement > >> > >> Can you help me please to debug this? > >> > >> Thank you! > >> > >> ------------------------------------------------------------------------------ > >> HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions > >> Find What Matters Most in Your Big Data with HPCC Systems > >> Open Source. Fast. Scalable. Simple. Ideal for Dirty Data. > >> Leverages Graph Analysis for Fast Processing & Easy Data Exploration > >> http://p.sf.net/sfu/hpccsystems > >> _______________________________________________ > >> WDB-Users mailing list > >> WDB...@li... > >> https://lists.sourceforge.net/lists/listinfo/wdb-users > >> > > |
From: Razvan D. <dob...@gm...> - 2014-06-22 14:34:15
|
Hi Michael, Thanks for your reply. I saw that 'numberx, numbery, incrementx, incrementy, startx, starty, and originalsrid' tuple is already in the DB. Is there a tutorial of how to get started with wdb, what to do prior first import? I saw that wdb is preconfigured for met.no organization. Should I change something for Romanian data set? Razvan Dobre On 6/22/14, 5:12 PM, Michael Akinde wrote: > Hi, > > Always good to hear from people working with WDB. > > placeregulargrid_skey is a unique index over numberx, numbery, incrementx, incrementy, startx, starty, and originalsrid. Essentially, this means that you are trying to add a place definition to the DB that already exists. > > It might be better to take a look at the logs of the loading program for the problem. > > Regards, > > Michael A. > > ----- Original Message ----- >> Hello >> >> I'm new to wdb and I have a question: gridload complains that there is >> no place definition point but when I want to add one it complains about >> a foreign key. >> >> This is the query: >> SELECT wci.begin ( 'wdb', 0, 0, 0 ); >> SELECT wci.addplaceregulargrid( 'GribLoad AutoInsert >> 2014-06-22T14:38:40.990488', 400, 241, 0.025, 0.025, 19.5, 43, >> '+proj=longlat +a=6367470.0 +towgs84=0,0,0 +no_defs'); >> SELECT wci.end() >> >> >> This is the output: >> ERROR: duplicate key value violates unique constraint >> "placeregulargrid_skey" >> CONTEXT: SQL statement "INSERT INTO wdb_int.placeregulargrid VALUES ( >> $1 , $2 , $3 , $4 , $5 , $6 , $7 , $8 )" >> PL/pgSQL function "addplaceregulargrid" line 34 at SQL statement >> >> ********** Error ********** >> >> ERROR: duplicate key value violates unique constraint >> "placeregulargrid_skey" >> SQL state: 23505 >> Context: SQL statement "INSERT INTO wdb_int.placeregulargrid VALUES ( >> $1 , $2 , $3 , $4 , $5 , $6 , $7 , $8 )" >> PL/pgSQL function "addplaceregulargrid" line 34 at SQL statement >> >> Can you help me please to debug this? >> >> Thank you! >> >> ------------------------------------------------------------------------------ >> HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions >> Find What Matters Most in Your Big Data with HPCC Systems >> Open Source. Fast. Scalable. Simple. Ideal for Dirty Data. >> Leverages Graph Analysis for Fast Processing & Easy Data Exploration >> http://p.sf.net/sfu/hpccsystems >> _______________________________________________ >> WDB-Users mailing list >> WDB...@li... >> https://lists.sourceforge.net/lists/listinfo/wdb-users >> |
From: Michael A. <mic...@me...> - 2014-06-22 14:28:36
|
Hi, Always good to hear from people working with WDB. placeregulargrid_skey is a unique index over numberx, numbery, incrementx, incrementy, startx, starty, and originalsrid. Essentially, this means that you are trying to add a place definition to the DB that already exists. It might be better to take a look at the logs of the loading program for the problem. Regards, Michael A. ----- Original Message ----- > Hello > > I'm new to wdb and I have a question: gridload complains that there is > no place definition point but when I want to add one it complains about > a foreign key. > > This is the query: > SELECT wci.begin ( 'wdb', 0, 0, 0 ); > SELECT wci.addplaceregulargrid( 'GribLoad AutoInsert > 2014-06-22T14:38:40.990488', 400, 241, 0.025, 0.025, 19.5, 43, > '+proj=longlat +a=6367470.0 +towgs84=0,0,0 +no_defs'); > SELECT wci.end() > > > This is the output: > ERROR: duplicate key value violates unique constraint > "placeregulargrid_skey" > CONTEXT: SQL statement "INSERT INTO wdb_int.placeregulargrid VALUES ( > $1 , $2 , $3 , $4 , $5 , $6 , $7 , $8 )" > PL/pgSQL function "addplaceregulargrid" line 34 at SQL statement > > ********** Error ********** > > ERROR: duplicate key value violates unique constraint > "placeregulargrid_skey" > SQL state: 23505 > Context: SQL statement "INSERT INTO wdb_int.placeregulargrid VALUES ( > $1 , $2 , $3 , $4 , $5 , $6 , $7 , $8 )" > PL/pgSQL function "addplaceregulargrid" line 34 at SQL statement > > Can you help me please to debug this? > > Thank you! > > ------------------------------------------------------------------------------ > HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions > Find What Matters Most in Your Big Data with HPCC Systems > Open Source. Fast. Scalable. Simple. Ideal for Dirty Data. > Leverages Graph Analysis for Fast Processing & Easy Data Exploration > http://p.sf.net/sfu/hpccsystems > _______________________________________________ > WDB-Users mailing list > WDB...@li... > https://lists.sourceforge.net/lists/listinfo/wdb-users > |
From: Razvan D. <dob...@gm...> - 2014-06-22 11:52:01
|
Hello I'm new to wdb and I have a question: gridload complains that there is no place definition point but when I want to add one it complains about a foreign key. This is the query: SELECT wci.begin ( 'wdb', 0, 0, 0 ); SELECT wci.addplaceregulargrid( 'GribLoad AutoInsert 2014-06-22T14:38:40.990488', 400, 241, 0.025, 0.025, 19.5, 43, '+proj=longlat +a=6367470.0 +towgs84=0,0,0 +no_defs'); SELECT wci.end() This is the output: ERROR: duplicate key value violates unique constraint "placeregulargrid_skey" CONTEXT: SQL statement "INSERT INTO wdb_int.placeregulargrid VALUES ( $1 , $2 , $3 , $4 , $5 , $6 , $7 , $8 )" PL/pgSQL function "addplaceregulargrid" line 34 at SQL statement ********** Error ********** ERROR: duplicate key value violates unique constraint "placeregulargrid_skey" SQL state: 23505 Context: SQL statement "INSERT INTO wdb_int.placeregulargrid VALUES ( $1 , $2 , $3 , $4 , $5 , $6 , $7 , $8 )" PL/pgSQL function "addplaceregulargrid" line 34 at SQL statement Can you help me please to debug this? Thank you! |
From: Michael A. <mic...@me...> - 2012-12-14 15:05:52
|
Hi, INSTALL is added by autotools. The README file has been corrected. You need to have the "full" autotools installations: automake, libtool AND autoconf-archive to compile WDB. See https://wdb.met.no/doku.php?id=developers:build_debian Regards, Michael A. ----- Original Message ----- > Hi, > > I am trying to install wdb, I fetched the sources from > https://github.com/wdb/wdb > The README file says: "Please refer to the file INSTALL for generic > installation instructions.", but I can't find that file in the > repository. Should I also download one of the other repositories? > > I installed the requirements from the README and tried to run > autoconf, > which failed with: > > ubuntu@wdb:~/wdb$ autoconf > configure.ac:104: error: possibly undefined macro: AC_PROG_LIBTOOL > If this token and others are legitimate, please use m4_pattern_allow. > See the Autoconf documentation. > configure.ac:106: error: possibly undefined macro: AM_PATH_GLIB_2_0 > configure.ac:131: error: possibly undefined macro: AC_CXX_REQUIRE_STL > configure.ac:182: error: possibly undefined macro: AM_PATH_PYTHON > configure.ac:183: error: possibly undefined macro: AM_CONDITIONAL > configure.ac:211: error: possibly undefined macro: > AC_CREATE_GENERIC_CONFIG > configure.ac:218: error: possibly undefined macro: AM_INIT_AUTOMAKE > configure.ac:219: error: possibly undefined macro: AM_PROG_CC_C_O > ubuntu@wdb:~/wdb$ ./configure --help > configure: error: cannot find sources (config.h.in) in . or .. > > What did I miss during the installation process? > > Thanks, > > Martin > > ------------------------------------------------------------------------------ > LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial > Remotely access PCs and mobile devices and provide instant support > Improve your efficiency, and focus on delivering more value-add > services > Discover what IT Professionals Know. Rescue delivers > http://p.sf.net/sfu/logmein_12329d2d > _______________________________________________ > WDB-Users mailing list > WDB...@li... > https://lists.sourceforge.net/lists/listinfo/wdb-users |
From: Martin G. P. <ma...@me...> - 2012-12-14 14:35:47
|
Hi, I am trying to install wdb, I fetched the sources from https://github.com/wdb/wdb The README file says: "Please refer to the file INSTALL for generic installation instructions.", but I can't find that file in the repository. Should I also download one of the other repositories? I installed the requirements from the README and tried to run autoconf, which failed with: ubuntu@wdb:~/wdb$ autoconf configure.ac:104: error: possibly undefined macro: AC_PROG_LIBTOOL If this token and others are legitimate, please use m4_pattern_allow. See the Autoconf documentation. configure.ac:106: error: possibly undefined macro: AM_PATH_GLIB_2_0 configure.ac:131: error: possibly undefined macro: AC_CXX_REQUIRE_STL configure.ac:182: error: possibly undefined macro: AM_PATH_PYTHON configure.ac:183: error: possibly undefined macro: AM_CONDITIONAL configure.ac:211: error: possibly undefined macro: AC_CREATE_GENERIC_CONFIG configure.ac:218: error: possibly undefined macro: AM_INIT_AUTOMAKE configure.ac:219: error: possibly undefined macro: AM_PROG_CC_C_O ubuntu@wdb:~/wdb$ ./configure --help configure: error: cannot find sources (config.h.in) in . or .. What did I miss during the installation process? Thanks, Martin |
From: Michael A. <mic...@me...> - 2012-06-14 21:27:12
|
Hi, I have just added a new section to the WCI metadata manual that hopefully illuminates this aspect of WDB administration: https://wdb.met.no/doku.php?id=manuals:wdb_metadata#parameters In particular, take a look at the metadata install files to see examples of what you want to do. https://github.com/wdb/wdb/blob/master/etc/metadata/wdb_parameter.in.sql >From the look of what you are doing, you are using the Canonical (0) namespace. The canonical namespace _always_ contains canonical parameter names constructed from CF standard parameter name components. To get alternative names, you need to use another namespace and copy the parameters you need/want over to that. You can see an example of that in the first two lines of the metno WDB metadata set. https://github.com/metno/wdb-metadata/blob/master/etc/wdb_parameter.in.sql The metno metadata set has 'max air temperature' as a parameter, as described in the documentation. Note that data values in WDB are by default always specified using SI units (so K - Kelvin, rather than Cel - Celsius). And parameters are bound to a unit, so it is not possible to have an 'air temperature' parameter in K, and an 'air temperature' parameter in Cel at the same time in the database. It is recommended to follow this principle, though obviously you can always insert an 'air temperature cel' or other differently names parameter with Cel as a unit of measure. There is no function to delete metadata, though obviously updates and data deletion can be done manually on the tables involved by a user with admin privileges who knows what he/she is doing. For parameters, the relevant table is the wdb_int.parameter table. Hope this helps answer your question, otherwise let us know. Regards, Michael A. ----- Original Message ----- > Hi, > I'm adding new parameter throught the function wci.addparameter(); I > don't well understand how to fill in a good manner the function > parameter: > > For example: > > > I tried: > > > SELECT wci.addparameter('average',null,null,'air > temperature',null,null,null,'Cel'); --> "(66,average,,,"air > temperature",,,,Cel,1000,"average in air temperature")" > > > > SELECT wci.addparameter('air temperature',null,null,null,'max within > hours',null,null,'Cel');-->"(69,"air temperature",,,,"max within > hours",,,Cel,1000,"air temperature due to max within hours")" > SELECT wci.addparameter('air temperature',null,null,null,null,'max > within hours',null,'Cel');-->"(70,"air temperature",,,,,"max within > hours",,Cel,1000,"air temperature assuming max within hours")" > > > I'd like to obtain: > > > "(6,"air temperature",,,,,,"maximum within days",K,1000,"max air > temperature")" > > > but "maximun within hours", in this case "within" is a key-word? > Also, is it possible to delete parameters, if yes, how? > > > Thank you so much! > Regards > Filippo > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. > Discussions > will include endpoint security, mobile security and the latest in > malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > WDB-Users mailing list > WDB...@li... > https://lists.sourceforge.net/lists/listinfo/wdb-users |
From: Filippo L. <fil...@gm...> - 2012-06-11 12:09:50
|
Hi, I'm adding new parameter throught the function wci.addparameter(); I don't well understand how to fill in a good manner the function parameter: For example: I tried: SELECT wci.addparameter('average',null,null,'air temperature',null,null,null,'Cel'); --> "(66,average,,,"air temperature",,,,Cel,1000,"average in air temperature")" SELECT wci.addparameter('air temperature',null,null,null,'max within hours',null,null,'Cel');-->"(69,"air temperature",,,,"max within hours",,,Cel,1000,"air temperature due to max within hours")" SELECT wci.addparameter('air temperature',null,null,null,null,'max within hours',null,'Cel');-->"(70,"air temperature",,,,,"max within hours",,Cel,1000,"air temperature assuming max within hours")" I'd like to obtain: "(6,"air temperature",,,,,,"maximum within days",K,1000,"max air temperature")" but "maximun within hours", in this case "within" is a key-word? Also, is it possible to delete parameters, if yes, how? Thank you so much! Regards Filippo |
From: Filippo L. <fil...@gm...> - 2012-05-23 09:45:56
|
Hi, sorry for my daily request, but there are some question, I don't understand deeply the filosophy of wdb; following your instructions I added placepoint and dataprovider, and I was bad thinking to use wdb-fastload: but an error occur 2012-05-23 11:22:30,851 WARN wdb.fastload.job.translate 0: Error when generating data: ERROR: Failed to identify levelparameter in namespace: sea level (from 273.741 new_prova_point 2011-01-01T00:00:00 2011-01-01T01:00:00 2011-01-01T01:00:00 air temperature sea level 0 0); I think that levelparameter linked to my namespace is empty, isn't it? wdb=# SELECT * FROM wci.browse( NULL::wci.browselevelparameter); levelparametername | levelunitname | levelfrom | levelto | numberoftuples --------------------+---------------+-----------+---------+---------------- (0 righe) SELECT wci.addPlacePoint('new_prova_point', ST_GeomFromText('Point(15 10)', 4030)); addplacepoint --------------- 31 (1 riga) wdb=# SELECT * FROM wci_int.placename WHERE placename in ('prova_point', 'bar'); placeid | placenamespaceid | placename ---------+------------------+----------- (0 righe) wdb=# SELECT * FROM wci_int.placename WHERE placename in ('new_prova_point', 'bar'); placeid | placenamespaceid | placename ---------+------------------+----------------- 31 | 1000 | new_prova_point (1 riga) wdb=# SELECT * FROM wci_int.placename WHERE placename in ('new_prova_point'); placeid | placenamespaceid | placename ---------+------------------+----------------- 31 | 1000 | new_prova_point wdb=# select wci.adddataprovider('prova','wci user','Point','1000 years','prova punto'); adddataprovider ----------------- 44 (1 riga) wdb=# select wci.getdataprovider('pro%'); getdataprovider -------------------------------------------------------------------------------------- (44,"wci user",point,1000,prova,43,44,"2012-05-23 08:42:48.358806+02","prova punto") (1 riga) What do you suggest? Thank you so much! Best regards Filippo Locci |
From: Michael A. <mic...@me...> - 2012-05-18 07:55:28
|
Hi, Apologies for the late reply; public holiday yesterday. ----- Original Message ----- > following ISSUE wci.addPlacePoint quietly overwrites old place names > in https://github.com/wdb/wdb/issues/21 This issue will be/has been fixed in the version we are currently working on (station_metadata branch). There are a bunch of small issues (and a few big bugs) in how these metadata functions work. It should not affect your work here though. > I don't understand in the the function wci.addPlacePoint('prova_point', ST_GeomFromText('Point(10 10)', > 4030)); the number 4030; also I need to understand the role of namespace in the WDB structure. ST_GeomFromText('Point(10 10)', 4030) is a PostGIS function (http://postgis.refractions.net/documentation/manual-1.5/ST_GeomFromText.html). 4030 is the default SRID (which maps to a PROJ string) used in the database. The problem you have is with the namespaces, though. I started documenting this on the website (https://wdb.met.no/doku.php?id=manuals:wdb_metadata) some time ago, but the documentation is unfinished. Namespaces are the method used to maintain multiple types of metadata information in the WDB database for the same object. E.g., it allows for the accomodation of multiple station identification series, e.g., you can have one namespace identifying stations with SYNOP numbers and another namespace identifying stations with a name. At met.no, for instance, we have one namespace for WMO station numbers, and a separate series for met.no's national station number series so that both can be used to identify data providers and points. There are namespaces in the database for three things: dataproviders, places, and parameters. These namespaces are identified using numerical ids. When you run wci.begin( 'username' ), you are always automatically assigned to a default namespace for the database. To change which namespace you use, one can use wci.begin( 'username', dataproviderNS, placeNS, parameterNS ); The canonical namespace of the database is 0. The names assigned in the canonical namespace are always auto-generated. - For dataproviders: the first name assigned to that dataprovider - For places: a text description of the place geometry (*) - For parameters: a string based on the CF parameter components (*) This is the important part. When you are adding: SELECT wci.addPlacePoint('prova_point', ST_GeomFromText('Point(10 10)', 4030)); The name of the place point in the canonical '0' namespace becomes 'Point(10 10)', NOT 'prova_point'. Unless you have changed namespaces, the canonical namespace is the default namespace. You cannot change the names of things in the canonical namespace. In general, I recommend setting up your own namespaces and NOT using the canonical namespace. To see how this is done, check the metno/wdb-metadata project: https://github.com/metno/wdb-metadata Briefly described, you want to do the following steps: SELECT wci.begin( 'wdb' ); -- Define my identifying entities SELECT wci.addOrganization( 'My Organization', 'myorg', 'government organization', '2000-01-01', '2999-12-31', 'The Org description' ); SELECT wci.addPerson( 'FirstName', 'LastName', 'Mr', 'Hi Firstname,', 'ABC', NULL, 'male', NULL, NULL, '2012-01-01', '2999-12-31', NULL ); -- Define my Namespace; 1000 is the example ID. SELECT wci.addNameSpace( 1000, 'My namespace', 'My own namespace', 'production', 'met.no', 'ABC', '2000-01-01' ); -- Set my Namespace as the default for regular users SELECT wci.setDefaultNameSpace( '', 1000, 1000, 1000 ); -- Run Begin again to switch namespace SELECT wci.begin( 'wdb', 1000, 1000, 1000 ); -- Add your dataproviders SELECT wci.adddataprovider( 'prova', '#type#', 'point', '1000 years', '#description#' ); ... ... -- Add your place points SELECT wci.addPlacePoint('prova_point', ST_GeomFromText('Point(10 10)', 4030)); ... ... -- Copy canonical parameter namespace -- If you want to use CF-style parameters in natural language, simply copy the canonical namespace by uncommenting the line below -- SELECT wci.copyParameterNameSpace( 0 ); -- If you want to add additional parameters or want to use your own parameter codes, add them as follows SELECT wci.addparameter( 'my special temperature', null, null, null, null, null, null, 'K' ); ... ... >From now on, SELECT wci.begin( 'username' ); will start up with the 1000 namespace as its default. In that namespace, you will have a parameter called 'my special temperature', a dataprovider 'prova', and a place 'prova_point' Hope that was understandable? Otherwise, please do not hesitate to ask. Regards, Michael Akinde |
From: Vegard B. <veg...@me...> - 2012-05-16 08:40:56
|
Strangely, this works for me: wdb=# SELECT wci.begin('wdb'); begin ------- (1 row) wdb=# SELECT wci.addPlacePoint('prova_point', ST_GeomFromText('Point(10 10)', 4030)); addplacepoint --------------- 126 (1 row) wdb=# SELECT * FROM wci_int.placename WHERE placename in ('prova_point', 'bar'); placeid | placenamespaceid | placename ---------+------------------+------------- 126 | 88 | prova_point (1 row) Regarding namespaces, it allows places and such to have the different names in different contexts. In theory, you can ignore it. In that case, just call wci.begin without any other arguments than the provider name. One thing you can do: execute SELECT * FROM wdb_int.placename WHERE placeid=28; 28 is the value returned by addPlacePoint. If that returns no rows, the name has not been registered properly (and you may have found a bug - congratulations ;) Also, what happens if you simply try to execute the same all over again? VG ----- Original Message ----- Fra: "Filippo Locci" <fil...@gm...> Til: wdb...@li... Sendt: 15. mai 2012 11:06:07 Emne: [WDB-Users] wci.addplacepoint Hi, following ISSUE wci.addPlacePoint quietly overwrites old place names in https://github.com/wdb/wdb/issues/21 I try to create a new place point 'prova_point', and also added a data provider 'prova': wdb=# SELECT wci.begin('wdb'); begin ------- (1 riga) SELECT wci.addPlacePoint('prova_point', ST_GeomFromText('Point(10 10)', 4030)); addplacepoint --------------- 28 (1 riga) wdb=# SELECT * FROM wci_int.placename WHERE placename in ('prova_point', 'bar'); placeid | placenamespaceid | placename ---------+------------------+----------- (0 righe) Then I'm loading data with a data provider 'prova' and place point 'prova_point', and an error occurred: 2012-05-15 10:52:28,194 WARN wdb.fastload.job.translate 0: Error when generating data: Not a recognized placename: prova_point (from 273.741 prova_point 2011-01-01T00:00:00Z 2011-01-01T01:00:00Z 2011-01-01T01:00:00Z air temperature height above ground 0 0) I don't understand in the the function wci.addPlacePoint('prova_point', ST_GeomFromText('Point(10 10)', 4030)); the number 4030; also I need to understand the role of namespace in the WDB structure. Thank you so much for your support! Regards Filippo ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ WDB-Users mailing list WDB...@li... https://lists.sourceforge.net/lists/listinfo/wdb-users |
From: Filippo L. <fil...@gm...> - 2012-05-15 09:06:17
|
Hi, following ISSUE wci.addPlacePoint quietly overwrites old place names in https://github.com/wdb/wdb/issues/21 I try to create a new place point 'prova_point', and also added a data provider 'prova': wdb=# SELECT wci.begin('wdb'); begin ------- (1 riga) SELECT wci.addPlacePoint('prova_point', ST_GeomFromText('Point(10 10)', 4030)); addplacepoint --------------- 28 (1 riga) wdb=# SELECT * FROM wci_int.placename WHERE placename in ('prova_point', 'bar'); placeid | placenamespaceid | placename ---------+------------------+----------- (0 righe) Then I'm loading data with a data provider 'prova' and place point 'prova_point', and an error occurred: 2012-05-15 10:52:28,194 WARN wdb.fastload.job.translate 0: Error when generating data: Not a recognized placename: prova_point (from 273.741 prova_point 2011-01-01T00:00:00Z 2011-01-01T01:00:00Z 2011-01-01T01:00:00Z air temperature height above ground 0 0) I don't understand in the the function wci.addPlacePoint('prova_point', ST_GeomFromText('Point(10 10)', 4030)); the number 4030; also I need to understand the role of namespace in the WDB structure. Thank you so much for your support! Regards Filippo |
From: Filippo L. <fil...@gm...> - 2012-05-14 12:41:02
|
Hi, I have some question: 1) Are there wci function that does not exist in my wdb version ( http://wdb.sourceforge.net/docs/0.9.7/wci_user-manual.html#sec:wci.getlevelparameter is the manual for my references) ? SELECT wci.getlevelparameter (NULL ); ^ HINT: No function matches the given name and argument types. You might need to add explicit type casts. 2) From the command SELECT wci.getparameter(NULL) a list of parameters is retrieved; I need for example (Id,"air temperature",,,,,,"AVERAGE TEMPERATURE WITHIN DAYS",etc) or (Id,"air temperature",,,,,,"STANDARD DEVIATION TEMPERATURE WITHIN DAYS",etc) My data from AWSs have 10 channel with a sensor for each channel: Instant value of a measured physical quantity but there is an elaboration (AVERAGE MAX MIN and STANDARD DEVIATION), thus for each measured physical quantity I need a corresponding parameter in a parameter table (I think). There is wci.addparameter() is it possible to use this function to add average temperature or other elaboration of physical quantities? 3) In my WDB configuration I need to store validate data and not validate data, is it possible to use level parameter with a particular value to distinguish validated data from not validated. Are there other solutions? Thank you so much! Regards Filippo |
From: Vegard B. <veg...@me...> - 2012-05-10 09:00:16
|
That is correct. You can also say something like this on the command line instead of running begin and adddataprovider: $ wdb createuser PROVIDER_NAME write after that, you should be able to run fastload. Don't worry if fastload fails. In that case no changes will be made to the database. VG ----- Original Message ----- Fra: "Filippo Locci" <fil...@gm...> Til: wdb...@li... Sendt: 9. mai 2012 16:50:59 Emne: [WDB-Users] WDB data loading Hi, I have all information about metadata (Data Provider / Data Source Id, Place Definition (Location), Value Parameter, etc.); I have a script to transform my data files in a fastload format; To start the data loading in wdb the steps are: 1) wci.begin() (as administrator) 2) wci.adddataprovvider() to insert medatata information 3) wdb-fastload *.txt (I guess wci.write function implementation) Are these the steps to load data in wdb, what I forget or I misunderstand? thank you so much regards filippo ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ WDB-Users mailing list WDB...@li... https://lists.sourceforge.net/lists/listinfo/wdb-users |
From: Filippo L. <fil...@gm...> - 2012-05-09 14:51:04
|
Hi, I have all information about metadata (Data Provider / Data Source Id, Place Definition (Location), Value Parameter, etc.); I have a script to transform my data files in a fastload format; To start the data loading in wdb the steps are: 1) wci.begin() (as administrator) 2) wci.adddataprovvider() to insert medatata information 3) wdb-fastload *.txt (I guess wci.write function implementation) Are these the steps to load data in wdb, what I forget or I misunderstand? thank you so much regards filippo |
From: Vegard B. <veg...@me...> - 2012-05-02 10:39:57
|
the python program creates output that fastload can use as input. :) VG ----- Original Message ----- Fra: "Filippo Locci" <fil...@gm...> Til: "Vegard Bønes" <veg...@me...> Kopi: wdb...@li... Sendt: 2. mai 2012 12:09:12 Emne: Re: [WDB-Users] wdb-fastload data format Hi Vegard, thank you for your code: I understand (I hope) the data format from the code, but I don't understand why you wrote: " Python code to create fastload output". I'm writing a python code to convert my data format to a fastload format for input. Does my task clear? Otherwise, I've got data from Automatic Weather Station in a particular ASCII format, my task is converting these data in a form acceptable from wdb-fastload. Thank you so much regards Filippo |
From: Filippo L. <fil...@gm...> - 2012-05-02 10:09:23
|
Hi Vegard, thank you for your code: I understand (I hope) the data format from the code, but I don't understand why you wrote: " Python code to create fastload output". I'm writing a python code to convert my data format to a fastload format for input. Does my task clear? Otherwise, I've got data from Automatic Weather Station in a particular ASCII format, my task is converting these data in a form acceptable from wdb-fastload. Thank you so much regards Filippo |
From: Vegard B. <veg...@me...> - 2012-04-30 13:52:23
|
Hi! Each line fed to fastload will (should) create a single row in the database. The exception, of course, is the data provider line. Python code to create fastload output could look something like this: def generate_data(): in some loop: # assign value, place, referencetime, etc.. yield value, place, referencetime, validfrom, validto, param, level, level_from, level_to def writeit(dataprovider): sys.stdout.write(dataprovider + '\n') # optionally add namespace identifier for data in generate_data(): sys.stdout.write(str(data[0])) for element in data[1:]: sys.stdout.write('\t') sys.stdout.write(str(element)) sys.stdout.write('\n') Does this answer your question? Level parameter is the z dimension. If you don't care about that, you can simply say something like height above ground\t0\t0 VG ----- Original Message ----- Fra: "Filippo Locci" <fil...@gm...> Til: wdb...@li... Sendt: 30. april 2012 15:25:15 Emne: Re: [WDB-Users] wdb-fastload data format Hi, I'm writing a program in python to translate my data in a format digestible from wdb-fastload; from the help I see: "When loading data, you need to follow the format described here: All files consists of sections, starting with a data provider name on one line, optionally followed by a tab character and a three-part namespace specification. Data listings should follow on the next lines, with no blank lines between data elements. The "current" data provider is reset after a blank line has been encountered. The next line is then expected to contain the name of the next data provider to use. The data listings follow the same pattern as the wci.write function call parameters, with a few exceptions: It should contain instructions for inserting a single tuple on each line. The elements on each line should not contain any quotation marks. Also, the separator between fields should be a single tab character. Here is the ordering of elements in the data list: * value * place name * reference time * valid from * valid to * value parameter name * level parameter name * level from * level to" Does each element in the data list write row by row? Otherwise: DATA_PROVIDER VALUE PLACE_NAME REF_TIME VALID_FROM VALID_TO VALUE_PAR_NAME LEV_PAR_NAME LEVEL_FROM LEVEL_TO What's the meaning of level parameter name; level from; level to? Thank you so much Filippo ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ WDB-Users mailing list WDB...@li... https://lists.sourceforge.net/lists/listinfo/wdb-users |
From: Filippo L. <fil...@gm...> - 2012-04-30 13:25:22
|
Hi, > I'm writing a program in python to translate my data in a format > digestible from wdb-fastload; > from the help I see: > > "When loading data, you need to follow the format described here: > > All files consists of sections, starting with a data provider name on > one line, optionally followed by a tab character and a three-part namespace > specification. Data listings should follow on the next lines, with no blank > lines between data elements. > > The "current" data provider is reset after a blank line has been > encountered. The next line is then expected to contain the name of the > next data provider to use. > > The data listings follow the same pattern as the wci.write function > call parameters, with a few exceptions: It should contain instructions > for inserting a single tuple on each line. The elements on each line > should not contain any quotation marks. Also, the separator between > fields should be a single tab character. > > Here is the ordering of elements in the data list: > > * value > * place name > * reference time > * valid from > * valid to > * value parameter name > * level parameter name > * level from > * level to" > > Does each element in the data list write row by row? > Otherwise: > > DATA_PROVIDER > VALUE PLACE_NAME REF_TIME VALID_FROM VALID_TO VALUE_PAR_NAME LEV_PAR_NAME > LEVEL_FROM LEVEL_TO > > What's the meaning of level parameter name; level from; level to? Thank you so much Filippo |