Using procedures you can:
Click here for Answer to Exercise Procedure-1.
Click here for Answer to Exercise Procedure-2.Study the SmartScript Libary commands: copyCmd, createFromScratchCmd, getDatabase, and createTimeRange. Study the SmartScript Library section on "Calling Smart Tools and Procedures." From the Define Procedures Dialog Procedures Window, select MB3-->New. Name your Procedure and select OK. Include a VariableList with a "model" field for the user to select an IFP input model. Use the SmartScript Library commands: getDatabase, createTimeRange, copyCmd, createFromScratchCmd, and callSmartTool to:
- Create a databaseID for the chosen model,
- Create a time range based on the model (perhaps the first 12 hours),
- Copy the grids from the model for the new time range,
- Create 1-hour T grids every 3 hours over the new time range,
- Run the Smart Tool from Exercise SmartScript-4 over the new time range, interpolating for missing data by setting the Missing Data Mode. Pass the varDict from the Procedure to the Smart Tool in the "callSmartTool" command so that the VariableList dialog does not appear twice. For this to work, make sure that the VariableList model field has the same name as that in the Smart Tool.
Run and test your Procedure to make sure it works. Note that the Procedure could take some time to execute since the Smart Tool is being called over a time range of grids. You can notice the progress of execution in the Progress Bar. Also, if you are running the GFE from a terminal window, you will see status messages appear in the window.
Click here for Answer to Exercise Procedure-3.Study the documentation and example for the runProcedure command. Run your the procedure of Exercise Procedure-1 from the command line using the "runProcedure" command. Note you will need to specify an edit area and a time range. Also, since you will be running the Procedure outside the context of the GFE, you will have to reference specific weather elements instead of "variableElement" in your ToolList.