WXP version 5
Program Reference

FORECAST

Sections

NAME

forecast - Forecast data parsing program

SYNOPSIS

forecast [parameters...] filename

PARAMETERS

Command Line Resource Default Description
-h help No Lists basic help information.
-df=filename default .wxpdef Sets the name of the resource file.
-na=name name forecast Specifies the name used in resource file parsing.
-ba batch No Run program in batch mode
-me=level message out2 Specifies level of messages to be displayed
  • file information - mess
-fp=filepath file_path current directory Specifies location of database files.  
-dp=datapath data_path current directory Specifies the location (path) of the input raw data files. This may be modified in the name convention file.
-nc=name_conv name_conv name_conv The name convention file specifies how files are named in WXP. This sets which name convention file to use.
-if=in_file in_file for_dat Specifies the input file name tag. The default tag is for_dat but may need to be changed for specific forecast types.
-cu=[hour|la] current None This specifies to use current data files. The current filename is based on the name convention. An optional hour can be specified for older data. If la is specified, the program will search back to find the most recent available file.
-ho=hour hour None This resource specifies the exact hour that a data file is valid for. This locks in the start hour for a multi-file sequence.
-nh=num_hour num_hour 0 This specifies the number of hours that will be used. If this is not specified, a single hour will be parse.  Otherwise a set of hours will be parsed.
-fc=forecast forecast User Prompt This specifies the product header to search for.
  • state -- Prints the state forecast (FPUS1)
  • disc -- Prints the state forecast discussions (FPUS3)
  • cod_city -- Prints the coded city forecasts (FPUS4)
  • zones -- Prints the zone forecasts (FPUS(05|50|51|52|53|54|55|56|61|62|71|72))
  • zone -- Prints a specific zone forecast.  The user is prompted for the zone.
  • %zone -- Prints a specific zone forecast
-st=state state None Specifies the state weather forecast office to use.  This is a 4 letter ID.
-pa=param parameter None Specifies additional plotting parameters.
filename[#seq] filename None
User Prompt
Batch: current=la
The name of the surface data file to be used. An optional sequence number can be added to designate the time for non-WXP files.

DESCRIPTION

This program parses forecast data for a specific forecast product from a specific WFO.  The input to the program is a ingested forecast data file. The name of the input file is determined through the in_file resource. The default tag is for_dat.

The programs starts off by prompting the user for input data file name.  The user may specify the input file either via the command line of through the current resource.

Next, a menu of possible forecasts is listed and the user enters the forecast type. If the forecast type is a zone forecast, the user will also be prompted for a zone.  A sample zone would be "INZ029".

Header Files

The use of a header file can considerably improve access to data files. Rather than parsing the entire file which at times is larger than 1MB, the product headers can be parsed directly out of a header file. Header files are much smaller and parse very fast. The header file contains a byte offset into the large file.

EXAMPLES

To parse for the latest state forecast from KIND

   forecast -cu -nh=-12 -fc=state -st=KIND
   ** FPUS1 KIND 022030 ***
   SFPIN
   INZ002>089-031000-

   STATE FORECAST FOR INDIANA
   NATIONAL WEATHER SERVICE INDIANAPOLIS IN
   330 PM EST THU OCT 2 1997

   .TONIGHT...FAIR AND WARMER. LOWS 50 TO 55.
   .FRIDAY...MOSTLY SUNNY...BREEZY AND WARMER. HIGHS 80 TO 85.
   .FRIDAY NIGHT...BECOMING MOSTLY CLOUDY. A CHANCE OF THUNDERSTORMS.
   LOWS IN THE LOWER 60S.
   .SATURDAY...MOSTLY CLOUDY...BREEZY AND A CHANCE OF THUNDERSTORMS.
   WARM. HIGHS MIDDLE 70S TO AROUND 80.

   .EXTENDED FORECAST...
   .SUNDAY AND MONDAY...MOSTLY CLEAR AND WARM. LOWS MIDDLE 50S TO AROUND
   60. HIGHS UPPER 70S TO LOWER 80S.
   .TUESDAY...PARTLY CLOUDY AND MILD. LOWS AROUND 50 TO MIDDLE 50S.
   HIGHS IN THE 70S.
   DS

To parse for the latest zone forecast

   forecast -cu -nh=-12 -fc=%INZ029 -st=KIND
   ** FPUS53 KIND 022040 COR ***
   INZ020>023-028>030-035-036-043-044-051-052-060-067-030930-
   CARROLL-CASS-CLAY-CLINTON-FOUNTAIN-KNOX-MIAMI-MONTGOMERY-PARKE-
   SULLIVAN-TIPPECANOE-VERMILLION-VIGO-WARREN-WHITE-
   INCLUDING THE CITIES OF...CRAWFORDSVILLE...FRANKFORT...LAFAYETTE...
   LOGANSPORT...TERRE HAUTE...VINCENNES
   330 PM EST THU OCT 2 1997

   .TONIGHT...PARTLY CLOUDY AND WARMER. LOW IN THE MIDDLE 50S. SOUTHWEST
   WIND 5 TO 10 MPH.
   .FRIDAY...MOSTLY SUNNY AND WARMER. HIGH 80 TO 85. BREEZY SOUTHWEST
   WIND 15 TO 20 MPH.
   .FRIDAY NIGHT...BECOMING MOSTLY CLOUDY. A 40 PERCENT CHANCE OF
   THUNDERSTORMS. MILD. LOW IN THE LOWER 60S.
   .SATURDAY...MOSTLY CLOUDY...BREEZY AND A 40 PERCENT CHANCE OF
   THUNDERSTORMS. MILD. HIGH IN THE UPPER 70S.

FILES

SEE ALSO


Last updated June 10, 1998