ucd-cws / calvin-network-tools

Command line tools for calvin-network-data and calvin-network-app. Includes prm tool for export PRI and DSS files
MIT License
3 stars 5 forks source link

Matrix export #53

Closed mlmaskey closed 4 years ago

mlmaskey commented 4 years ago

I am a new user of the CALVIN model. While I am trying to export network tool, I got following error. Could you please help me what is the problem? Thanks

Mahesh@Dell MINGW64 ~/documents/github $ cnf matrix --verbose --format=csv --start=2002-10 --stop=2003-01 --ts=. --fs=, --to=network --outnodes=nodes --max-ub=1000000000 SR_SHA D5 No config file found at: C:\Users\Mahesh.prmconf

matrix Input Parameters { "_": [ "matrix" ], "help": false, "no-header": false, "N": false, "noHeader": false, "verbose": true, "v": true, "format": "csv", "f": "csv", "start": "2002-10", "s": "2002-10", "stop": "2003-01", "t": "2003-01", "ts": ".", "S": ".", "fs": ",", "F": ",", "to": "network", "T": "network", "outnodes": "nodes", "max-ub": 1000000000, "M": 1000000000, "maxUb": 1000000000, "config": "C:\Users\Mahesh", "c": "C:\Users\Mahesh", "$0": "..\..\AppData\Roaming\npm\node_modules\calvin-network-tools\bin\cli.js", "nodes": [ "SR_SHA", "D5" ] }


undefined:2 calvin-network-tools@3.0.5 | ISC | deps: 20 | versions: 66 ^

SyntaxError: Invalid or unexpected token at C:\Users\Mahesh\AppData\Roaming\npm\node_modules\calvin-network-tools\nodejs\lib\checkVersion.js:30:33 at ChildProcess.exithandler (child_process.js:294:7) at ChildProcess.emit (events.js:311:20) at maybeClose (internal/child_process.js:1021:16) at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)

Mahesh@Dell MINGW64 ~/documents/github

msdogan commented 4 years ago

@mlmaskey Mahesh,

Unzip the attached file (.prmconf) and put that file under C:\Users\Mahesh. Then open it with a text editor and update the data path to point where you downloaded calvin-network-data repository. Then restart your PC and try above command to export the network.

Hopefuly this would solve it.

prmconf.zip

mlmaskey commented 4 years ago

Thank you Mustafa for your help.

mlmaskey commented 4 years ago

Thank you Mustafa for your help. With the file, you gave me worked for one time. Unfortunately, you need to restart the computer for second case. While I ran the model for second time I got a similar message as before,

Mahesh@Dell MINGW64 ~/documents/github/calvin (master) $ cnf matrix --verbose --format=csv --start=2001-10 --stop=2002-09 --ts=. --fs=, --to=linksWY2002 --outnodes=nodes --max-ub=1000000000 D17 SR_FOL D9 D85 D64 C7 C8 C104 D44 U204 D503 D511 D507 D509 D541 C173 A207 C37

matrix Input Parameters { "0": "Documents\GitHub\CALVIN\calvin-network-tools\bin\cli.js", "_": [ "matrix" ], "help": false, "no-header": false, "N": false, "noHeader": false, "verbose": true, "v": true, "format": "csv", "f": "csv", "start": "2001-10", "s": "2001-10", "stop": "2002-09", "t": "2002-09", "ts": ".", "S": ".", "fs": ",", "F": ",", "to": "linksWY2002", "T": "linksWY2002", "outnodes": "nodes", "max-ub": 1000000000, "M": 1000000000, "maxUb": 1000000000, "config": "C:\Users\Mahesh", "c": "C:\Users\Mahesh", "$0": "..\..\..\AppData\Roaming\npm\node_modules\calvin-network-tools\bin\cli.js", "data": "C:\Users\Mahesh\Documents\GitHub\CALVIN\calvin-network-data\data", "nodes": [ "D17", "SR_FOL", "D9", "D85", "D64", "C7", "C8", "C104", "D44", "U204", "D503", "D511", "D507", "D509", "D541", "C173", "A207", "C37" ], "runtime": "C:\Users\Mahesh\Documents\GitHub\CALVIN\calvin-network-tools\HEC_Runtime" }


undefined:2 calvin-network-tools@3.0.5 | ISC | deps: 20 | versions: 66 ^

SyntaxError: Invalid or unexpected token at C:\Users\Mahesh\AppData\Roaming\npm\node_modules\calvin-network-tools\nodejs\lib\checkVersion.js:30:33 at ChildProcess.exithandler (child_process.js:294:7) at ChildProcess.emit (events.js:311:20) at maybeClose (internal/child_process.js:1021:16) at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)

Mahesh@Dell MINGW64 ~/documents/github/calvin (master)

Most interesting thing is that on another computer at the Lab did not run despite I modified the prmconf. file at all. The message in that computer looks like: Water Management Lab@DESKTOP-D3ODFAQ MINGW64 ~/documents/github $ cnf matrix --verbose --format=csv --start=2002-10 --stop=2003-09 --ts=. --fs=, --to=linkWY2003 --outnodes=nodes --max-ub=1000000000 D17 SR_FOL D9 D85 D64

matrix Input Parameters { "_": [ "matrix" ], "help": false, "no-header": false, "N": false, "noHeader": false, "verbose": true, "v": true, "format": "csv", "f": "csv", "start": "2002-10", "s": "2002-10", "stop": "2003-09", "t": "2003-09", "ts": ".", "S": ".", "fs": ",", "F": ",", "to": "linkWY2003", "T": "linkWY2003", "outnodes": "nodes", "max-ub": 1000000000, "M": 1000000000, "maxUb": 1000000000, "config": "C:\Users\Water Management Lab", "c": "C:\Users\Water Management Lab", "$0": "..\..\AppData\Roaming\npm\node_modules\calvin-network-tools\bin\cli.js", "data": "C:\Users\Water Management Lab\Documents\GitHub\calvin-network-data\data", "nodes": [ "D17", "SR_FOL", "D9", "D85", "D64" ], "runtime": "C:\Users\Water Management Lab\Documents\GitHub\calvin-network-tools\HEC_Runtime" }


undefined:2 calvin-network-tools@3.0.5 | ISC | deps: 20 | versions: 66 ^

SyntaxError: Invalid or unexpected token at C:\Users\Water Management Lab\AppData\Roaming\npm\node_modules\calvin-network-tools\nodejs\lib\checkVersion.js:30:33 at ChildProcess.exithandler (child_process.js:294:7) at ChildProcess.emit (events.js:321:20) at maybeClose (internal/child_process.js:1026:16) at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)

Water Management Lab@DESKTOP-D3ODFAQ MINGW64 ~/documents/github

Could you please let me know what could be the reason for this. I confgure two files as below: 1 In my laptop: {"0": "Documents\GitHub\CALVIN\calvin-network-tools\bin\cli.js","data":"C:\Users\Mahesh\Documents\GitHub\CALVIN\calvin-network-data\data","runtime":"C:\Users\Mahesh\Documents\GitHub\CALVIN\calvin-network-tools\HEC_Runtime"} or {"data":"C:\Users\Mahesh\Documents\GitHub\CALVIN\calvin-network-data\data","runtime":"C:\Users\Mahesh\GitHub\CALVIN\calvin-network-tools\HEC_Runtime"} 2> In the lab: {"data":"C:\Users\Water Management Lab\Documents\GitHub\calvin-network-data\data","runtime":"C:\Users\Water Management Lab\Documents\GitHub\calvin-network-tools\HEC_Runtime"}

I appreciate your help.

Best regards Mahesh