Closed kelleythompson closed 2 years ago
Enhancements were initially developed. With folders, one set of executable codes and input and intermediate data files can be maintained in a base folder, but for a particular calibration run a data folder will be created and an inputfile containing a changed input parameter will be placed in that folder. When the model engine is run, it will use that folder and place all output and logfiles in that data folder. The j349 input/outfiles as created for and by the fortran code will also be in the data folder. Some intermediate binary data folders may also be used by the model engine - so it will copy those over to the data folder to avoid any potential file open/sharing issues. Then command line arguments would also be favorable to allow direction of the model engine without needing to use/change the control file which can be generally be left static and unchanged. See readme file for notes on usage of command lines arguments.
Particularly for calibration process, may be nice to also add command line option to rebuild binary files to prep a year prior to calibration runs
Additional command line arguments were developed and refined. Command line option arguments include -f -c -b -r -s -d -nd -w -nw
to trigger folder, calibration, build base files, save, display, and write options. See readme file for examples.
For calibration, example expected command line arguments are:
StateTL -b 2018
- build new binary base files for full year 2018
StateTL -f \calibration\Par.1 -c 2018,WD17
- calibrate year 2018 for WD17 with input/output into Par.1 folder
Just a comment on standards before people get set on options that may not follow the standards.
-nd
could be interpreted as shorthand for -n
and -d
. The standard way of doing this is to use double dashes for multi-character options, as in --nd
. These standards help applications be consistent.-h
and --help
are often used to print program usage, so you don't need to track down documentation. I recommend enabling this.-v
and --version
are often used for version-d
and --debug
are often used to turn on debug, sometimes followed by a levelSee Standards for Command Line Interfaces
It is possible to call C routines from Fortran so the above could be used. I did not do this for StateMod and StateCU because of lack of time.
Steve, Somehow I knew you were going to catch the -nd and -nw. I couldn't get creative enough to think of a different letter but I'll sort out a different way for those options. But very great points on -h -v and not using -d. Thanks for those thoughts and the additional information, and I'll revise and add to these in a bit. Thanks a bunch, Kelley
Kelley L. Thompson, P.E. Senior Lead Modeler - Modeling and DSS / Water Information Team
P 303.866.3581 ext 8261 | C 719.480.3423 1313 Sherman St., Suite 818, Denver, CO 80203 @.*** | www.water.state.co.us
On Mon, Nov 8, 2021 at 3:28 PM Steve Malers @.***> wrote:
Just a comment on standards before people get set on options that may not follow the standards.
- Single dash multi-letter options are ambiguous. For example, -nd could be interpreted as shorthand for -n and -d. The standard way of doing this is to use double dashes for multi-character options, as in --nd. These standards help applications be consistent.
- -h and --help are often used to print program usage, so you don't need to track down documentation. I recommend enabling this.
- -v and --version are often used for version
- -d and --debug are often used to turn on debug, sometimes followed by a level
See Standards for Command Line Interfaces https://urldefense.proofpoint.com/v2/url?u=https-3A__www.gnu.org_prep_standards_html-5Fnode_Command-5F002dLine-2DInterfaces.html&d=DwMCaQ&c=sdnEM9SRGFuMt5z5w3AhsPNahmNicq64TgF1JwNR0cs&r=v8IOejxniM24GGbuf52hAajizwligqp4dTwlVwvfpSs&m=XHXzhebUszTw-f0qISNp4tSJcWy7TXSntrblMSoVWCo&s=AYaAYdQLXtds0eDOAkMf8uwPyWbsZRXL-s-fiNh67sk&e=
It is possible to call C routines from Fortran so the above could be used. I did not do this for StateMod and StateCU because of lack of time.
— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_OpenCDSS_ArkDSS-2DColors-2Dof-2DWater_issues_14-23issuecomment-2D963633126&d=DwMCaQ&c=sdnEM9SRGFuMt5z5w3AhsPNahmNicq64TgF1JwNR0cs&r=v8IOejxniM24GGbuf52hAajizwligqp4dTwlVwvfpSs&m=XHXzhebUszTw-f0qISNp4tSJcWy7TXSntrblMSoVWCo&s=ixwJldnrZSWkB0aRXjCd0okwS4cOp8UU2fIUFBiLxo8&e=, or unsubscribe https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_AC4LFGBSJDZQ5RT2ZNBB3I3ULBFI5ANCNFSM5HMPMG5Q&d=DwMCaQ&c=sdnEM9SRGFuMt5z5w3AhsPNahmNicq64TgF1JwNR0cs&r=v8IOejxniM24GGbuf52hAajizwligqp4dTwlVwvfpSs&m=XHXzhebUszTw-f0qISNp4tSJcWy7TXSntrblMSoVWCo&s=x1OqH9jRfI6QckiS_OZY0A8Z9h5vYLY0vEOD3XbhtIY&e= . Triage notifications on the go with GitHub Mobile for iOS https://urldefense.proofpoint.com/v2/url?u=https-3A__apps.apple.com_app_apple-2Dstore_id1477376905-3Fct-3Dnotification-2Demail-26mt-3D8-26pt-3D524675&d=DwMCaQ&c=sdnEM9SRGFuMt5z5w3AhsPNahmNicq64TgF1JwNR0cs&r=v8IOejxniM24GGbuf52hAajizwligqp4dTwlVwvfpSs&m=XHXzhebUszTw-f0qISNp4tSJcWy7TXSntrblMSoVWCo&s=AS7uvEWUF5gQ79Al_16ZB1X8gohMyLumxCFA_mrV8D4&e= or Android https://urldefense.proofpoint.com/v2/url?u=https-3A__play.google.com_store_apps_details-3Fid-3Dcom.github.android-26referrer-3Dutm-5Fcampaign-253Dnotification-2Demail-2526utm-5Fmedium-253Demail-2526utm-5Fsource-253Dgithub&d=DwMCaQ&c=sdnEM9SRGFuMt5z5w3AhsPNahmNicq64TgF1JwNR0cs&r=v8IOejxniM24GGbuf52hAajizwligqp4dTwlVwvfpSs&m=XHXzhebUszTw-f0qISNp4tSJcWy7TXSntrblMSoVWCo&s=TF-C70IkHPFkrrL4igcSUAwEkojFLGX3wY-K90cygMM&e=.
For the CoW project, it may be favorable to run the matlab model engine code using data folders and command line arguments - particularly for calibration. For calibration, this would enable use of one set of executable codes and input and intermediate data files in a base folder, but input and output for a particular calibration parameter change would be maintained in a seperate folder. Command line arguments would also facilitate calibration as well as potentially be used to run the model engine in different ways once deployed