================== Restart Simulation ================== |vspace| The **restart** option allows users to extend a run when the entire simulation cannot be done at once (e.g., not enough wall-clock time). This creates a continuous run from two or more shorter runs. To do this, run an initial WRF simulation. *restart_interval* in *namelist.input* must be set to the desired interval for restart output files (*wrfrst_d0\**). The restart simulation can start from the time stamp from one of the *wrfrst\** files. |vspace| .. note:: Restart runs aid troubleshooting. If a simulation crashes, use restart files to resume just before the crash for easier debugging with print statements, avoiding a full simulation. |vspace| .. figure:: ./images/run_cases1_gray.png :align: center :width: 60% | | Set-up WRF ========== **If you successfully ran the Single Domain case, you should have restart files to use for this case.** #. Move to the **/glade/scratch/$USER/practice_exercises/wrf/test/em_real/** directory. |vspace| #. Edit **namelist.input**. The only values that need to be changed are in the *&time_control* record, and are highlighted below: |vspace| .. code-block:: :emphasize-lines: 1,6,14-15 run_hours = 12, run_minutes = 0, start_year = 2023, start_month = 03, start_day = 31, start_hour = 12, end_year = 2023, end_month = 04, end_day = 01, end_hour = 00, interval_seconds = 21600 history_interval = 180, frames_per_outfile = 1, restart = .true., restart_interval = 72000, |vspace| #. Make sure the original *wrfout_d0\** files are saved elsewhere (e.g., inside the *single_domain/* directory you created to store the output), so they do not get overwritten. |vspace| #. Restarts require the *wrfbdy_d01* file and the *wrfrst\** file at the restart initial time to be in the running directory. If you stored those files in a *single_domain/* directory, copy them back into the running directory. .. code-block:: :class: copyable cp single_domain/wrfbdy_d01 . cp single_domain/wrfrst_d01_2023-03-31_12:00:00 . #. Restarts don't require a re-run of real.exe, as the *wrfrst\** file contains initial conditions (and serves as the *wrfinput_d01* file). Submit the *runwrf.sh* script to the queue. .. code-block:: :class: copyable qsub runwrf.sh |vspace| Use the *qstat* command (as in the `Single Domain Run <./single_domain.html>`_ case) to check the status, and view *rsl.out.0000* for the "success" message. If successful, the following new history files should be available: .. container:: row m-0 p-0 .. container:: col-md-6 pl-0 pr-3 py-3 m-0 .. container:: card-blockquote wrfout_d01_2023-03-31_15:00:00 |br| wrfout_d01_2023-03-31_18:00:00 |br| wrfout_d01_2023-03-31_21:00:00 |br| wrfout_d01_2023-04-01_00:00:00 |br| |vspace| .. note:: A *wrfout\** file is not output for the start time of 12 UTC. This is a safety feature to prevent overwriting the previously created file. To output a file for the initial time, add the following line anywhere in the *&time_control* namelist record. .. code-block:: write_hist_at_0h_rst = .true. | | Check your output ================= * View the log files (*rsl.out\**). * Tail the *rsl.out.0000* file and look for **SUCCESS COMPLETE WRF**. * Use the ``ncdump`` command to see output times available in the wrf history file. * Use the netCDF data browser 'ncview' to examine your wrf output file. * `Generate graphics <./graphics.html>`_ with one of the supplied packages. | | Return to the Practice Exercise home to page to run another exercise. .. rst-class:: horizbuttons-primary-m * `Return to Practice Exercises <./practices.html>`_ .. toctree:: :maxdepth: 4 :hidden: |vspace| |vspace| |vspace| |vspace|