Code Monkey home page Code Monkey logo

Comments (9)

pat1 avatar pat1 commented on July 17, 2024

can you provide the command for the reported trace ?

from libsim.

edigiacomo avatar edigiacomo commented on July 17, 2024

A quick example:

$ export LIBSIM_CLIMAT_BEHAVIOR=1
$ export LOG4C_PRIORITY=INFO
$ export LOG4C_APPENDER=stderr
$ dbadb wipe --dsn=sqlite:empty.db
$ v7d_transform \
    --variable-list='B10004' \
    --comp-stat-proc='254:0' \
    --comp-step='01 00' \
    --comp-frac-valid='0.009' \
    --comp-start='2017-06-06 00:00:00' \
    --comp-stop='2017-06-08 00:00:00' \
    --output-variable-list='B10004' \
    --input-format=dba \
    --output-format=BUFR \
    sqlite:empty.db \
    out.bufr
[stderr] INFO     _default - dballe file /usr/share/wreport/dballe.txt found
[stderr] INFO     _default - dballe file /usr/share/wreport/dballe.txt opened
[stderr] INFO     _default - Found 554 variables in dballe master table
[stderr] INFO     _default - starting peeling
[stderr] INFO     _default - computing statistical processing by aggregation 254:0
[stderr] WARN     _default - vol7d_compute, no timeranges suitable for statistical processing by aggregation
[stderr] INFO     _default - alchemy_v7d: To make:  B10004
[stderr] WARN     _default - alchemy_v7d: I cannot make your request
[stderr] ERROR    v7d_transform - Cannot make variable you have requested
[stderr] ERROR    v7d_transform - use --display to get more information
[stderr] ERROR    v7d_transform - Exit for error

from libsim.

pat1 avatar pat1 commented on July 17, 2024

It seems a bug reading the documentation because -variable-list='B10004' should force to have il as input :
--output-variable-list=STRING
list of data variables you require in output; if they are not in input
they will be computed if possible. The output_variable_list is
expressed in the form of a comma-separated list of B-table
alphanumeric codes, e.g. 'B13011,B12101' [default=]

from libsim.

edigiacomo avatar edigiacomo commented on July 17, 2024

Exit status 1 for all the "errors" is ambiguous, e.g.:

$ export LIBSIM_CLIMAT_BEHAVIOR=1
$ export LOG4C_PRIORITY=INFO
$ export LOG4C_APPENDER=stderr
$ dbadb wipe --dsn=sqlite:empty.db
$ v7d_transform \
    --variable-list='B10004' \
    --comp-stat-proc='254:0' \
    --comp-step='01 00' \
    --comp-frac-valid='0.009' \
    --comp-start='2017-06-06 00:00:00' \
    --comp-stop='2017-06-08 00:00:00' \
    --output-variable-list='B10004' \
    --input-format=dba \
    --output-format=BUFR \
    sqlite:empty.db \
    out.bufr
[stderr] INFO     _default - dballe file /usr/share/wreport/dballe.txt found
[stderr] INFO     _default - dballe file /usr/share/wreport/dballe.txt opened
[stderr] INFO     _default - Found 554 variables in dballe master table
[stderr] INFO     _default - starting peeling
[stderr] INFO     _default - computing statistical processing by aggregation 254:0
[stderr] WARN     _default - vol7d_compute, no timeranges suitable for statistical processing by aggregation
[stderr] INFO     _default - alchemy_v7d: To make:  B10004
[stderr] WARN     _default - alchemy_v7d: I cannot make your request
[stderr] ERROR    v7d_transform - Cannot make variable you have requested
[stderr] ERROR    v7d_transform - use --display to get more information
[stderr] ERROR    v7d_transform - Exit for error
$ echo $?
1
$ rm empty.db
$ v7d_transform \
    --variable-list='B10004' \
    --comp-stat-proc='254:0' \
    --comp-step='01 00' \
    --comp-frac-valid='0.009' \
    --comp-start='2017-06-06 00:00:00' \
    --comp-stop='2017-06-08 00:00:00' \
    --output-variable-list='B10004' \
    --input-format=dba \
    --output-format=BUFR \
    sqlite:empty.db \
    out.bufr
[stderr] ERROR    v7d_transform.dballe_class - cannot compile query 'SELECT s.id, s.lat, s.lon, s.ident, d.id_report, d.id_lev_tr, d.id_var, d.id,
[stderr] ERROR    v7d_transform.dballe_class - 
[stderr] INFO     v7d_transform.dballe_class - 
Fatal error: dballe: cannot compile query 'SELECT s.id, s.lat, s.lon, s.ident, d.id_report, d.id_lev_tr, d.id_var, d.id, d.datetime, d.value FROM station s JOIN data d ON s.id=d.id_station WHERE d.id_lev_tr = -1 ORDER BY d.id_station, d.datetime, d.id_report, d.id_var':no such table: station
$ echo $?
1

from libsim.

dcesari avatar dcesari commented on July 17, 2024

Well --output-variable-list is mainly intended for computing new variables to be output from input data, rather than filtering in output, although it can be abused for that purpose. Anyway in your case it is pleonastic since you have -variable-list='B10004' which already filters the same variable in input so that you cannot have other variables than that. The error is probably due to B10004, pressure, being missing in input.
I agree that error codes are not meaningful, but that's beyond our plans for now :-).

from libsim.

edigiacomo avatar edigiacomo commented on July 17, 2024

I agree that --variable-list is not useful, but the program is inside a very large script and it loops over a lot of different input/output vars.

Moreover, without --variable-list the error is the same...

I'll write some test to avoid from executing the command when the input data are not found.

from libsim.

pat1 avatar pat1 commented on July 17, 2024

remove --output-variable-list='B10004' and it should work.

--output-variable-list is not a filter but it activate alchemy module that try to compute the output variables
Here the input is the same you want on output so activate alchemy will produce problems only.

from libsim.

edigiacomo avatar edigiacomo commented on July 17, 2024

Thanks Paolo, I'm not using it to filter the data (I have a loop with a lot of processing), but I'll try anyway.

from libsim.

edigiacomo avatar edigiacomo commented on July 17, 2024

Questa issue è stata chiusa per inattività. Nel caso in cui sia un argomento ancora rilevante, si prega di riaprirla con una motivazione che tenga conto delle modifiche applicate nel corso degli anni al progetto.

from libsim.

Related Issues (20)

Recommend Projects

  • React photo React

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

  • Vue.js photo Vue.js

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

  • Typescript photo Typescript

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

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

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

Recommend Topics

  • javascript

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

  • web

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

  • server

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

  • Machine learning

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

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

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

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.