Restart Simulation


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.


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.



_images/run_cases1_gray.png


Set-up WRF

If you successfully ran the Single Domain case, you should have restart files to use for this case.


  1. Move to the /glade/scratch/$USER/practice_exercises/wrf/test/em_real directory.


  2. Edit namelist.input. The only values that need to be changed are in the &time_control record, and are highlighted below:


         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,
    


  3. 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.


  4. Restarts don’t require a re-run of real.exe, as the wrfrst* file contains initial conditions (and serves as the wrfinput_d01 file). Restarts do require the wrfbdy_d01 file to be in the running directory. Submit the runwrf.sh script to the queue again.


    qsub runwrf.sh
    


    Use the qstat command (as in the Single Domain Run case) to check the status, and view rsl.out.0000 for the “success” message. If successful, the following new history files should be available:

    wrfout_d01_2023-03-31_15:00:00
    wrfout_d01_2023-03-31_18:00:00
    wrfout_d01_2023-03-31_21:00:00
    wrfout_d01_2023-04-01_00:00:00


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.


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 with one of the supplied packages.






Return to the Practice Exercise home to page to run another exercise.