Table of Contents |
9.1 Introduction
9.2 A summary of wrf_autorun.pl features
9.3 wrf_autorun.pl configuration files
9.4 Running wrf_autorun.pl from the command line
9.5 Running wrf_autorun.pl from a cron
9.6 Running wrf_autorun.pl for case study use
9.7 Commentary and few wrf_autorun.pl examples
9.1 Introduction
The wrf_autorun.pl script is used to execute the various EMS run-time scripts automatically. It is intended for creating real-time WRF forecasts; however, it may be used to run case studies as well. For real-time forecasting, there are various options to improve the reliability of your forecasts, all of which are described in the conf/wrf_autorun.conf file ad nauseum. So get a bottle of Pepto and take a look at the wrf_autorun.conf file (Chapter 9.3).
The wrf_autorun.pl script will execute the wrf_prep.pl, wrf_run.pl, and wrf_post.pl scripts in succession. There is an option to post-process the WRF forecast files concurrent with model execution, which is great for getting forecasts out to forecasters but it requires the use of a second workstation to distribute the workload. See an example in Chapter 9.7.
The user, that's you, must make sure that the configuration files associated with each of these scripts are set the way you want to run the model.
This may be one of the few times in life you have power; feel free to take advantage of it.
9.2 A summary of wrf_autorun.pl features
To summarize, the wrf_autorun.pl routine:
Is designed for creating real-time WRF forecasts; however, it may be used to run case studies as well. The entire end-to-end forecasting process can be driven by wrf_autopost.pl.
Is designed to give the user flexibility when setting up a real-time forecasting system.
In the event of missing initialization files, the wrf_autopost.pl routing will fail-over to alternate servers, data sets, or initial forecast hour.
Will email users if there is a problem with a run.
9.3 wrf_autorun.pl configuration files
The master configuration file for wrf_autorun.pl is located in the wrf/data/conf/config/wrf_autorun directory. Each time a domain is created with the WRF SI GUI, local copies of these files are placed in the <domain>/conf/wrf_autorun directory, which is where users should make any desired changes. You will find two files in wrf_autorun, which are called wrf_autopost.conf and wrf_autorun.conf, but only edit the wrf_autorun.conf file. The wrf_autopost.conf file is used for synchronous post processing discussed in Chapter 7.
Keep in mind that although there is only one configuration file used for running the wrf_autorun.pl script, you will likely need to edit some of the other run-time script configuration files.
9.4 Running wrf_autorun.pl from the command line
The master wrf_autorun.pl file resides in the wrf/strc ($WRF_STRC) directory. Just like the other run-time scripts, users will not run the wrf_autorun.pl script directly from this directory, but rather, will execute "wrf_autorun" from one of the domain directories in wrf/runs. The wrf_autorun file in a domain directory is a link to the master wrf_autorunp.pl file in the wrf/strc directory, so any changes made to the local file will be made to the master file as well.
The "wrf_autorun" script does the following when executed from a domain directory:
1. Reads the users-specified processing options from the wrf_autorun.conf file,
2. Overrides those options with command-line options provided by the user, if any,
3. Runs the wrf_prep.pl routine,
4. Runs the wrf_run.pl script,
And either
5. Starts the synchronous post processing of the forecast files, or
5. Starts the wrf_post.pl script after the run has completed, or
5. Does nothing
As with all of the WRF EMS run-time scripts, wrf_autorun has a built in help menu and user's guide. The help menu provides a brief summary of the available options. To view the brief help menu:
% wrf_autorun -help
And for a much more verbose user's guide:
% wrf_autorun -guide
9.5 Running wrf_autorun.pl from cron
A tcsh wrapper file is provided in the strc directory to facilitate the running of wrf_autorun from a cron. In addition, a deactivated entry will be placed in your crontab file during installation. Using the wrf_autorun-wrapper.csh file will make sure that your environment variables are set correctly prior to running wrf_autorun. And that's all I have to say about that.
9.6 Running wrf_autorun.pl for case study use
If you use wrf_autorun for non real-time events then it is important that the initial and boundary condition data already resides in the grib directory beneath your run directory AND that the files are properly named. The naming convention used for the files can be found in the <data set>_gribinfo.conf file, which can be viewed by running wrf_autorun --query <data set>.
Alternatively, you could use the NFS option to copy the files over to the grib directory. This method will ensure that the GRIB files get renamed correctly.
9.7 Commentary and a few wrf_autorun.pl examples
There are no mandatory arguments to wrf_autorun. So, if you are a minimalist type of person, you might run:
% wrf_autorun
Next, wrf_autorun will attempt to read the conf/wrf_autorun/wrf_autorun.conf file and proceed with the processing of your WRF forecast files. Many command-line options are available to wrf_autorun that may be used to override the default settings. Many of these settings are similar to those available to the wrf_prep.pl script. If you are interested in the options available when running wrf_autorun then you are encouraged to review the on-line user's guide (wrf_autorun --guide) for all the gory details.
If you don't like reading directions then here are a few examples:
% wrf_autorun --dset namptile%gfsptile
The above command will instruct wrf_autorun to override the settings in the wrf_autorun.conf file using NAM personal tile for the initial and GFS personal times for the boundary conditions.
% wrf_autorun --autopost
The above command will tell wrf_autorun to override the settings in the wrf_autorun.conf file and will initiate synchronous post-processing of the wrf forecast files while the model is running.
% wrf_autorun --nests 2,4 --autopost (ARW core only)
The above command will tell the wrf_autorun.pl script to execute a 2-way nested run with the MOAD and nested domains 2 and 4. You must have everything configured for 2-way nesting. It also turns on the synchronous post-processing of the forecast files.
% wrf_autorun --cycle 12:06 -length 24 --date 20040231 --dset nam212
The above command translates to "run wrf_autorun but fetch me 24 hours worth of the 12 UTC 31 February 2004 NAM run on the 212 grid beginning with the 6 hour forecast".