Gempak/UNIX Scripts for the Ingredients Method
Updated 26 October 2001 to include the most recent ingredients maps.
New script, replaces the old qpve_4panel:
im_v2.scr. Note that the discussion
below has not yet been updated but you can just substitute this file
(and change the filename whenever it is called) for qpve_4panel.
New script, for the new PVQ, PVF maps:
- Basic Gempak script to generate ingredients maps: qpve_4panel .
- Basic Gempak script to generate ingredients cross-sections: qpve_xc4p.
- Script to run the ingredients maps and the interactive cross-section for a specified Gempak file (see *):
- Script to run the ingredients maps and the interactive cross-section for the current ETA model
Gempak file (see *): run.qpve.current.
*Note: these scripts require qpve_4panel and qpve_xc4p (1 and 2 above) in addition to these
two files: makecurrent and
- Advanced Users Only: For scripts to make your own daily runs of the ingredients maps and cross-sections on a crontab see below.
After running any of the scripts, the user must type 'gpend' to close down the images and exit gempak.
If the user clears the images individually using the toolbar, the gempak process will still be
active and if enough of these accumulate, there could be trouble on the system.
The run scripts (run.qpve and run.qpve.current) are set to generate ingredients maps for
the Upper Midwest (ie. Gempak garea = msn-). To change the geographical region, change
'msn-' to your preferred garea. You may also have to change the projection (I use 'utm')
for some gareas.
In run.qpve.current, you will need to set FILEPATH (the directory where run.qpve.current, qpve_4panel, etc. are
located) and DATAPATH (the directory where the eta model data is located). These changes should be made on the
first two lines of run.qpve.current. Also, if your eta files are not of
the form yymmddhh_eta.gem, you will need to make this change.
Please feel free to contact me with questions or problems.
Running your own Daily Ingredients Scripts
The codes to make your own daily runs of the ingredients maps and ingredients cross-section maps are included here. These will take a bit more setup time and require the knowledge of
someone comfortable with running crontabs on your system.
Additionally, you will have to set up a virtual x-server on the machine
you use to run the scripts (instructions below).
There are seven scripts you will need for these daily runs (be sure to save
the files with the same name as given here):
- qpve4panel.crontab is an example
of a crontab script to run the 0Z and 12Z ETA model ingredients and cross-section scripts
at 11am (for 12Z) and 12am (for 0Z). This file will have to be modified for your directory
structure. To activate the crontab, type "crontab qpve4panel.crontab". To stop the
crontab type "crontab -r". To check what crontabs are curently activated, type "crontab -l".
- run.12Zqpve4panel.cron and
run.0Zqpve4panel.cron. These two files are
called by qpve4panel.crontab for the 12Z and 0Z runs, respectively. They are the run-scripts
for the ingredients maps and call qpve_4panel.cron (see below) for each forecast hour
at the three levels (800:850mb, 700:750mb, 600:650mb). At the end of each of these run-scripts, the run-script for the ingredients cross-section is called.
- qpve_4panel.cron is the gempak script for the
- run.12Zqpve_xc4p.cron and
run.0Zqpve_xc4p.cron are the run-scripts
for the ingredients cross-section maps (called at the end of the run scripts for the
isobaric maps). These scripts call qpve_xc4p.cron for each forecast hour. The location
of the cross-section is specified in these scripts as the fourth input argument to
qpve_xc4p.cron (here, LaCrosse to Milwaukee, WI: "LSE>MKE").
- qpve_xc4p.cron is the gempak script for the
cross-section ingredients maps.
How to set up a virtual X-Server on your Linux machine
Note: The directories given below correspond to our version of Red-Hat Linux
and the location of files may differ on other types or versions.
- You need to have Xvfb (x-virtual frame buffer) installed and running.
It should come with all Linux, but may need to be
installed. On our machine it is located in /usr/bin/X11/Xvfb. If not
installed it would be a .rpm file (install as root with rpm -ivh Filename
where filename would be Xvfb plus version number, and other information).
- Once Xvfb is installed, you can start up a virtual x-server on the command
line by typing:
/usr/bin/X11/Xvfb :1 -screen 0 1280x1024x8 &
Then to use the xterm, you would set your display to localhost:1.0, i.e.,
i.e., setenv DISPLAY machineName.noaa.gov:1.0
It is generally better to have the x-server startup command run every time the
machine is booted up, so you don't have to run it from the command-line.
To do this, we put the Xvfb command shown above (i.e., /usr/bin/X11/Xvfb :1 -screen 0 1280x1024x8 &) in the file: /etc/rc.d/rc.local. Then, when running
the Gempak scripts you would replace my virtual X-server (morgan1.meteor.wisc.edu:2.0) with yours.