Case Study Setup
Creating Case Studies
WXP is ideally setup for use with case study data. By default, WXP names all of its files with the date/time and file type. This means files can be copied to a different directory and still used by WXP just as long as the files are not renamed. This is accomplished by using the data_path, con_path and name_conv resources. Since the path resources are pointers to a specific directory, they can be changed at any time to point to a different location. The name convention file uses these pointers (%D, %C) to not lock files to specific directories. Therefore, all data files should be accessible no matter what directory they are located.
In order to setup a case study, first examine the directory structure used by WXP. This can be very simple such as "/home/wxp/data" and "/home/wxp/convert" or more complex. The best way to create a case study is to copy the directory configuration into a case study directory:
/home/wxp/data --> /home/wxp/case/980527/data /home/wxp/convert --> /home/wxp/case/980527/convert
Now, copy the raw data files into the data directory. It is recommended to copy surface, upper air and MDR radar files. Also, model data, NIDS and mosaic radar files as well as some satellite images should be copied. Remember these added files are large and can consume large quantities of disk space. It is not necessary to copy converted files since they can be recreated with the WXP decoders. Sometimes it is nice to copy files that might be specific to the case study into a etc directory such as name convention, city database file, etc.
NOTE: It is recommended to compress the data in these directories. Raw data files compress well and will provide the ability to save more case studies to disk. When the case study is to be used, uncompress the data. Case study data can also be saved to CD-ROM.
Using Case Studies in WXP
To use case study data, use the wxpdata and wxpcon environment variables:
setenv wxpdata /home/wxp/case/980527/data setenv wxpcon /home/wxp/case/980527/convert
This overrides the default settings in the resource file. The same name convention file can be used since it links files to the data_path and con_path resources. If a different name convention is needed, just set the name convention environment variable:
setenv wxpname_conv /home/wxp/case/980527/etc/name_conv
Finally, it is nice to turn back the clock to the case study. This can be done with the wxpcurtime environment variable:
setenv wxpcurtime 9805282300
This will reset the time used for the current and latest files to 23:00Z on May 28, 1998. Now, the current and latest resources can be used to access files for this case study. The reason for this is that searching for the latest file only goes back a couple of weeks. Searching for the latest file in a case study will produce an error since its search will not go back far enough to see the case study data. The wxpcurtime environment variable solves this problem. This also allows standard scripts that reference current or latest data to work with case study data.
As a final note, the wxpcurtime variable could be set to a time of significance such as a tornado touchdown or hurricane landfall. This will make it easy for users to access the important time of the case study. The current resource can offset ahead in time to gain access to files post wxpcurtime.
Case Study Setup and the WXP Shell
To setup the cases, the "case.lup" is used. This file lists each case study and the resources to set and is located in the WXP database directory (see file_path). There are two types of lines in this file. The first is a header line. The syntax is:
header Description
The second type is the case line. The syntax is:
case name alias alias
The first string after the case string can be "nolist" which specifies to not list the case study in the case listing. This allows you to setup large numbers of cases without making the case listing in the WXP shell to large to view.
Following the case line is the description line which is used to describe the case. This can be up to 80 characters.
The following lines then list WXP resources to be set through environment variables.
Here is a sample:
header *** Winter Cyclones *** case nolist 20nov94 Cyclone Occlusion over Plains and Midwest (20 Nov 1994) data_path /home/wxp/case/20nov94 con_path /home/wxp/case/20nov94 curtime 199411220000 case 07jan97 444 Cyclone and Snow event over Midwest (07-10 Jan 1997) data_path /home/wxp/case/07jan97 con_path /home/wxp/case/07jan97 curtime 199701091200
The header line is used to list the following case studies as winter cyclones. The first case "20nov94" will not be listed when the "case" command is invoked but still can be used. The second line "Cyclone..." is a long description of the case. The next three lines set the "data_path" and "con_path" resources with the environment variables "wxpdata_path" and "wxpcon_path". The last line sets the "wxpcurtime" environment variable to reset the current time to the most important time of the case study so that the current resource can be used with the case study.
Last updated July 21, 1998