10.07.2015 Views

Converting a NEXRAD Rainfall Map into a Flood Inundation Map by ...

Converting a NEXRAD Rainfall Map into a Flood Inundation Map by ...

Converting a NEXRAD Rainfall Map into a Flood Inundation Map by ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

to be executed together and in sequence these statements also need to be executed<strong>by</strong> a single command line that references the three statements to the HEC-HMSprogram. Therefore, to accomplish the batch execution of the three statements, ascript file must be created that contains the three lines for the specific HEC-HMSproject that needs to be executed and can be called <strong>by</strong> a HEC-HMS DOS-basedcommand line statement.So, in short, HEC-HMS can be executed from a DOS-based command linestatement and one of the options for the statement is to execute the program basedon a sequence of command line statements stored in a script file. The syntax ofthe command line statement is shown below.hms –s MyScriptFileThe –s command line option refers to the script file option. It means thatthe three lines for opening, computing, and exiting will be stored in a Pythonscript file. In other words, to execute the three batch lines from a Python script thehms command-prompt function needs to be executed as a DOS-based commandline. The execution of the three lines is then solved <strong>by</strong> generating the Pythonscript file at run time with the appropriate syntax and argument values.The question now is how to execute the hms statement that runs the scriptfile. To accomplish this, a batch file can be generated to store the hms statementonly and execute it through the already discussed Shell function in Visual Basic.The Shell function in Visual Basic was enhanced with the “WaitForSingleObject”API as discussed above to avoid the asynchronous behavior and allowing HEC-HMS to fully finish before control is returned to the next process in line.108

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!