Portal Tutorial - Define a Workflow
Define A Workflow, Step 1
Whether you create a new workflow from the Portal Wizard or from the File Menu, the first window that pops up prompts you to either load an existing workflow (e.g. "wrf-EastCoast") or click the New button to create a new workflow. If you have defined more than one computer in the Portal Wizard, you can choose a computer from the drop down box. In this example, I clicked on the "New" button.
Define A Workflow, Step 2
Since I clicked the "New" button, another window pops up prompting me for the name of this workflow. Since I am using a domain called "EastCoast", I've typed in the name, "wrf-EastCoast2".
Define A Workflow, Step 3
Next, I am prompted for which tasks to add to my workflow. I've highlighted all four WPS/WRF tasks and will click the ">" button to add them to my workflow . Once they are in the list on the right, I can click the "Move Up" or "Move Down" buttons to rearrange the order of my tasks. Normally, you'll want to run them in this order: (1) def_ungrib, (2) def_metgrid, (3) def_real, and (4) def_wrf.
Define A Workflow, Step 4
WPS/WRF tasks are associated with namelist files (configuration files). In particular, the ungrib and metgrid programs use the namelist called namelist.wps. The real and wrf programs use the namelist called namelist.input. WRF Portal gives you the option of maintaining a separate namelist.wps for ungrib and metgrid, and a separate namelist.input for real and wrf. For simplicity's sake, it is usually advisable to "consolidate" these namelists (only have a total of 2 namelists in your workflow instead of 4). To do so, just move the duplicate namelists to the list box on the right and then click on the "Yes, Do Consolidate" button.
Note: you can always "un-consolidate" the namelists later if you want to.
Define A Workflow, Step 5
Your workflow now appears. Note that since I've consolidated namelist.wps and namelist.input, only one copy of each appears in my workflow. Since I've just created this workflow, the hint about "click the Import button" appears. I click the import button to import my namelist.wps for my domain called "EastCoast".
Define A Workflow, Step 6
I click the Import button to import namelist.wps from my "EastCoast" domain. A File Chooser window pops up, enabling me to navigate to my domain directory containing namelist.wps. Click the "Open" button to load it.
Define A Workflow, Step 7
The namelist.wps file I just imported appears in the workflow editor. Note, I can edit the namelist.wps text and can right-click the mouse to "Find" (search) text, "Copy" and "Paste".
Define A Workflow, Step 8
I repeat this process by clicking on "namelist.input" from the upper left, and then clicking on the "Import" button to import the namelist.input file from my domain directory. Note that you don't need to change any of the run_*, start_*, or end_* properties in the &time_control section. The portal will automatically set these values when you run your workflow.
Define A Workflow, Step 9
Click on the "def_ungrib.rb" script name to highlight it. Note that a "Task Settings" tab appears..
Define A Workflow, Step 10
On this tab, you can override the settings entered into the Portal Wizard window. We could choose a different number of processors to use (assuming you have a multiprocessor computer running WRF using MPI). Note the hint message "Number of processors to allocate to this task (e.g. 1)". These helpful hints appear whenever you move the mouse over a field on the screen.
The bottom of the screen contains the list of environment variables required by this workflow task (def_ungrib.rb). Note that you may not need to change any of them (since you entered them earlier on the Portal Wizard screen).
Define A Workflow, Step 11
When you are done editing your workflow, go to the Actions Menu and choose "Save". Notice the "Make Editable" menu option that is disabled. If you had already run this workflow, the entire window would be visible but disabled--if you wanted to change some settings and then re-run the workflow, you would choose this "Make Editable" menu option.
At this point, your workflow is ready to be run.