Skip to content

Correct gcameur queries to run successfully#67

Open
andym331 wants to merge 1 commit intobc3LC:dev_gcameurfrom
umd-cgs:dev_gcameur
Open

Correct gcameur queries to run successfully#67
andym331 wants to merge 1 commit intobc3LC:dev_gcameurfrom
umd-cgs:dev_gcameur

Conversation

@andym331
Copy link
Copy Markdown
Contributor

Through ModelInterface (on UMD computing cluster)

@klau506
Copy link
Copy Markdown
Collaborator

klau506 commented Apr 1, 2026

Hi @andym331,

Many thanks for the PR! However, although it work in the MI, it doesn't using rgcam. See below:

Line 240 main.R

bq
$regions
character(0)
$query
[1] "<emissionsQueryBuilder title="CO2 emissions by tech (nested subsector) (excluding resource production)">\n <axis1 name="technology">technology\n <axis2 name="Year">emissions\n <xPath buildList="true" dataName="emissions" group="false" sumAll="false">[@type = 'sector' ]/[@type='subsector']//*[@type='technology']//\n CO2/emissions/node()\n \n"
$title
[1] "CO2 emissions by tech (nested subsector) (excluding resource production)"

Line 253 main.R

table <- suppressMessages({
rgcam::runQuery(conn, bq$query, sc, bq$regions, warn.empty = FALSE)
})
About to perform query: collection()/scenario
About to perform query: collection()/scenario[ (@name='Ref' and @Date='2025-25-9T11:59:45+02:00') ]/world/region/[@type = 'sector' ]/[@type='subsector']//*[@type='technology']// CO2/emissions/node()
In Function: 1775028902121
java.lang.ArrayIndexOutOfBoundsException: 8
at ModelInterface.ModelGUI2.xmldb.RunMIQuery.buildTable(RunMIQuery.java:188)
at ModelInterface.ModelGUI2.xmldb.RunMIQuery.runMIQuery(RunMIQuery.java:124)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.basex.query.func.java.StaticJavaCall.eval(StaticJavaCall.java:75)
at org.basex.query.func.java.JavaCall.value(JavaCall.java:69)
at org.basex.query.expr.ParseExpr.iter(ParseExpr.java:46)
at org.basex.query.scope.MainModule.iter(MainModule.java:97)
at org.basex.query.QueryContext.iter(QueryContext.java:331)
at org.basex.query.QueryProcessor.iter(QueryProcessor.java:90)
at org.basex.core.cmd.AQuery.query(AQuery.java:107)
at org.basex.core.cmd.XQuery.run(XQuery.java:22)
at org.basex.core.Command.run(Command.java:257)
at org.basex.core.Command.execute(Command.java:93)
at org.basex.api.client.LocalSession.execute(LocalSession.java:132)
at org.basex.api.client.Session.execute(Session.java:36)
at org.basex.core.CLI.execute(CLI.java:92)
at org.basex.BaseX.(BaseX.java:107)
at org.basex.BaseX.main(BaseX.java:43)
Stopped at C:/Users/CLAUDI~1.ROD/AppData/Local/Temp/Rtmpm2kKrs/file24787fd34b7, 1/87:
[basex:error] java.lang.ArrayIndexOutOfBoundsException: 8

Still trying to understand why it works in the MI and not through rgcam

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants