| 52 | |
| 53 | Once we are finished, we can use the [wiki:WRF4GCommandLineInterface command line interface (CPI)] to prepare and submit our test experiment. Before submitting check in the output of wrf4g_prepare that the chunks and realizations being created are those that we wanted. |
| 54 | |
| 55 | {{{ |
| 56 | wrf4g_prepare |
| 57 | wrf4g_submit -e sw_test |
| 58 | }}} |
| 59 | |
| 60 | Now we can monitor the experiment using [wiki:WRF4GCommandLineInterface#wrf4g_status wrf4g_status], along with the "watch" command. |
| 61 | |
| 62 | {{{ |
| 63 | watch wrf4g_status -l -e sw_test |
| 64 | }}} |
| 65 | |
| 66 | Probably it will fail in the first attempts, so don't worry. If it fails, see [wiki:WRF4GTutorial2#HowtomanageWRF4Gerrors how to manage WRF4G errors] to look for the error. |
| 67 | |
| 68 | Once the test experiment has run successfully, we should check that the output looks fine and that it contains all the variables that we want. Tools like [http://meteora.ucsd.edu/~pierce/ncview_home_page.html ncview] and [https://www.unidata.ucar.edu/software/netcdf/docs/ncdump-man-1.html ncdump] are very useful for this task. |
| 69 | |
| 70 | === The experiment === |
| 71 | |
| 72 | At this point we are done with the most difficult issues, and we are ready to set up the reforecast experiment itself. Simply create another folder inside "submit" named "sw_ncep", and copy there the configuration files of the test experiment. |
| 73 | |
| 74 | {{{ |
| 75 | cd .. |
| 76 | mkdir sw_ncep |
| 77 | cp -r ../sw_test/* . |
| 78 | }}} |
| 79 | |
| 80 | Then change the experiment_name and extend the end_date to the end date of the full experiment. In this example we will only run one month (January 2010), but it could be many decades. So our dates would be: |
| 81 | |
| 82 | {{{ |
| 83 | start_date="2009-12-31_18:00:00" |
| 84 | end_date="2010-01-31_06:00:00" |
| 85 | }}} |
| 86 | |
| 87 | Finally, prepare and submit the experiment with WRF4G CLI, as before. |
| 88 | |
| 89 | {{{ |
| 90 | wrf4g_prepare |
| 91 | wrf4g_submit -e sw_test |
| 92 | }}} |
| 93 | |
| 94 | === Experiment monitoring === |
| 95 | |
| 96 | wrf4g_status permits us to monitor the state of all the realizations of the experiment. If the experiment is large, wrf4g_status can be used in combination with shell tools as grep or awk to filter the list with some criteria. For example: |
| 97 | |
| 98 | {{{ |
| 99 | wrf4g_status -l -e sw_test | grep Finished |
| 100 | }}} |
| 101 | |
| 102 | Returns all the Finished realizations. Or, more complicated |
| 103 | |
| 104 | {{{ |
| 105 | wrf4g_status -l -e sw_test | grep -v Finished | grep -v Submitted | grep -v Failed |
| 106 | }}} |
| 107 | |
| 108 | Returns all the realizations that are currently in some stage of the WRF4G workflow (Down. Bin., ungrib, metgrid..., etc.) |
| 109 | |
| 110 | If wrf4g_submit is called again, the realizations in Failed status are submitted again. This is very useful to resubmit simulations after some problems with the infrastructure. |
| 111 | |
| 112 | Other more complicated situation can occur. For example, if there is a blackout, the jobs can fail before they can send the "Failed" signal to the database. In that case, they can appear to be indefinitely in "WRF" status. These kind of problems need a less confortable monitoring, such as entering to the working nodes and use the commands "top" or "ps -ef" to see it WRF is really running. |
| 113 | |
| 114 | When a realization has failed but does not appear with the "Failed" status, it can be resubmitted using the --force flag of wrf4g_submit. Note also that wrf4g_submit can be used refering only to one realization or chunk, using the flags, -r or -c. |