OpenCDSS / ArkDSS-Colors-of-Water

Colorado's Decision Support Systems (CDSS) ArkDSS Colors of Water Model Engine code
GNU General Public License v3.0
2 stars 5 forks source link

j349_4 - update j349 fortran code to use command line arguments for input/output filenames #11

Closed kelleythompson closed 2 years ago

kelleythompson commented 2 years ago

For CoW project calibration of river networks, multiple instances of the model may be run in parallel. It is thought optimum that only one set of executables in one folder is going to be used; while output will be written to different folders. Using the same filenames with multiple instance running runs a risk that one instance will mess up the input or output for a separate running instance. The dimensioning of the filenames was increased to use folder based addresses provided through the filename file. Although this could potentially work - there is still a risk that the filename file in the main folder would be open by one instance while another instance was also trying to open it and this could cause problems. Therefore, it seemed that the input, output(.dat), and output(.bin) filenames should be provided through command line arguments rather than through a file.

kelleythompson commented 2 years ago

Modified code so that input and output(2) filenames are provided through command line arguments rather than through a file. An example new command line to call the code (using fast=1) is '$ j349.exe j349input_us.dat j349output_ds.dat j349output_ds.bin'. Increased dimensioning of these filenames to upto 200 characters to allow folder references from within filename.

kelleythompson commented 2 years ago

Steve Malers @smalers recommended use of some standard command line conventions including -a to indicate an option. Good idea..

kelleythompson commented 2 years ago

Revised fortran code with a -f option to indicate providing filenames via command line; while without the option the original filename file can still be used to pass filenames.