Daily Forecast Critique Configuration Guide

July, 2002

Overview

Archive Data Configuration

Appearance Configuration

localDfcConfig.py


Overview

The Daily Forecast Critique program can be adapted to the local forecast office by changing the settings found in the DFC config file called dfcConfig.py.  This file contains all of the various settings needed by the main display program ifpDFC as well as the two archive programs: archiveObs and archivePointForecast.
 
Let's start by briefly describing each item in the dfcConfig.py file.

The contents of this file is in blue to distinguish it from the description that follows.  Each configuration item is separated by a horizontal line.

DO NOT MODIFY THE dfcConfig.py FILE!!!  Any changes should be made to the localDfcConfig.py file in your SITE
directory.  See the section localDfcConfig.py for more details.


Archive Data Configuration

This section descibes the configuration items that affect which models, times and elements are archived for later display.

import siteConfig
 

This import statement is very important in that many of the files DFC generates and later reads are defined in this configuration file.   If you do, it is very likely that DFC will not work properly, if at all.

## host and port definitions based on siteConfig.py
host = siteConfig.GFESUITE_SERVER
port = int(siteConfig.GFESUITE_PORT)
These statements inherit the host and port definitions of siteConfig so that the DFC programs know where server lives. Change these only if you will be using DFC with an ifpServer other than your operational system.
 

## the list of elements that will be archived
supportedWEs = ['temperature', 'dewpoint', 'windSpeed', 'windDir']
This item contains a list of weather elements that DFC currently supports.  You may REMOVE elements from this list, but adding any new ones will likely cause problems.  At this early stage in the DFC development, only these elements are supported by the software.  Other elements may be added later.

## the list of directories in which the observation are stored
obDirectories = ['/data/fxa/point/metar/netcdf/']
###                   '/data/fxa/LDAD/mesonet/qc/'] # uncomment this line to include any mesonet stations
This item defines where your local surface observations are stored.  For most sites the first item is the standard directory into which the surface observation data files are stored.  Other local data sources may also be defined in this list, depending on your particular office.  Many offices use LDAD to gather and store additional data sources.  You may add new directories to this list if they contain netCDF files that store surface observations in the typical D2D format.
 

dfcTop = siteConfig.GFESUITE_DFCDIR
## the directory where the observation archive will be stored
obArchiveDir = siteConfig.GFESUITE_DFCDIR + '/archivedObs/'
## directory where the point forecasts will be stored
fcstArchiveDir = siteConfig.GFESUITE_DFCDIR + '/archivedFcsts/'
These three items define where the archive files for the observations and forecasts are stored.  Unless you are already short on disk space, it is strongly recommended that you leave these unmodified.

## Define the site ID
dfcSiteID = siteConfig.GFESUITE_SITEID
This item defines the ID for your site based on whatever is defined in your siteConfig file.  It is used to figure out which stations that lie in or near your WFO.   In general, there will be no need to modify this item.

## How long observations will stay around before purging (in hours)
obPurgeTime = 72
pointFcstPurgeTime = 72
These items control how long observations and forecasts stay in the archive before they are purged. Increasing these values will cause DFC to use more disk space in the directories obArchiveDir and fcstArchiveDir.

NOTE!
If you set the obPurgeTime to a value less than 6 hours, the purger will automatically reset the value to 6 so that you will always archive least 6 hours worth of observations.

 

## A placeholder for a configurable list of stations
myStations = [ ]

This is the item that you will change if you want to change the list of stations from ALL of the stations in or near your office domain to a list of stations that you choose.


## a dictionary containing the model, elements and forecast hour
## to be archived by the pointFcst archive program
pointFcstDict = {
    'NAM':
    {'T':[0, 6, 12, 18, 24, 30, 36, 42, 48, 54, 60, 66, 72],
     'Td':[0, 6, 12, 18, 24, 30, 36, 42, 48, 54, 60, 66, 72],
     'Wind':[0, 6, 12, 18, 24, 30, 36, 42, 48, 54, 60, 66, 72],
     },
    'MesoNAM':
    {'T':[0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,48],
     'Td':[0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,48],
     'Wind':[0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,48],
     },
    'MRF':
    {'T':[0,12,24,36,48,60,72,84,96,108,120],
     'Td':[0,12,24,36,48,60,72,84,96,108,120],
     'Wind':[0,12,24,36,48,60,72,84,96,108,120],
     },
    'AVN':
    {'T':[0,6,12,18,24,30,36,42,48,54,60,72,78,84,90,96,102,108,114,120],
     'Td':[0,6,12,18,24,30,36,42,48,54,60,72,78,84,90,96,102,108,114,120],
     'Wind':[0,6,12,18,24,30,36,42,48,54,60,72,78,84,90,96,102,108,114,120],
     },
   'Official':
    {'T':[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,
          24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,
          45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,
          66,67,68,69,70,71,72],
    'Td':[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,
          24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,
          45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,
          66,67,68,69,70,71,72],
    'Wind':[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,
          24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,
          45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,
          66,67,68,69,70,71,72],
     },
 
This item tells DFC which forecasts to archive.  The python dictionary defined above specifies the model, weather element, and forecast hour for each model.  This is another configuration item that will affect the amount of disk space used by the DFC archive programs.  If you are not interested in archiving every available forecast, please feel free to edit these lists to whatever you like.  If you wish to include a new model (e.g., a model run at your local office), just insert a new model entry like those defined already. Note that in order to run DFC with a locally generated model, you must first configure ifpInit to generate surface weather elements for that model. Once you can successfully populate your GFE Forecast database with your local model, you're ready to add it to this list of models.

This config file serves as a template for another structure that is used by the forecast archive processes.  Any time you change your localDfcConfig.py file, the structure, which is saved to disk between archive runs, is regenerated, so that the file on disk always reflects your latest changes.

 

Appearance Configuration

In addition to the various archive configuration items, there are also items that help you configure the DFC display.  These include the size of the display screen, the plotted symbol types, lines types and widths, colors, and font types and sizes. Each of these items is described below in more detail.

configList = [('screen', 'width', 800)]

This item determines the width of the display screen in pixels.  You can make the size larger or smaller by adjusting this value.

symbolTypes = ["plus", "asterisk", "circle", "cross", "square", "triangle", "diamond", "star", "fancy plus", "fancy square", "fancy cross",
                        "fancy diamond"]

The symbolTypes item is a list of symbol types.  Each new plot uses the next symbol type in the sequence.  If you plot so many data sets that you reach the end of the list, the new symbol is selected for the beginning again.  You may not need all of the symbol types listed here and may remove some if you like.  The complete set of possible symbol types is listed below.

         "none"                  "filled circle"
        "dot"                   "filled square"
 "plus"                  "filled triangle"
       "asterisk"              "filled diamond"
        "circle"                "filled inverted triangle"
      "cross"                 "filled fancy square"
   "square"                "filled fancy diamond"
  "triangle"              "half filled circle"
    "diamond"               "half filled square"
    "star"                  "half filled triangle"
  "inverted triangle"     "half filled diamond"
   "starburst"             "half filled inverted triangle"
 "fancy plus"            "half filled fancy square"
      "fancy cross"           "half filled fancy diamond"
     "fancy square"          "octagon"
       "fancy diamond"         "filled octagon"
fcstSymbolSize = 4.0  ## change this to 0.0 to remove symbols on fcst data
obSymbolSize = 3.0

You can also control the size of the symbols plotted in the DFC display.  The fcstSymbolSize controls how large the symbols are drawn for forecast data.  The obSYmbolSize controls how large symbols are plotted for observations.  You can remove the symbol for forecast data sets if you set the size to 0.0.

colors = ["blue", "red", "darkgreen", "magenta", "black", "coral", "darkviolet", "brown", "darkred", "darkblue"]

The colors items lists the colors and the order in which they are used.  The ones listed here are generally dark to maximize the  contrast against the white background.  Feel free to change the order or color, if you would like to see something different.  Like the symbol types, the colors are used in the order specified and then reset to the beginning again when the end of the list is reached. Usually, the entire list of possible colors can be found in the file:/usr/lib/X11/rgb.txt.

lineTypes = ["solid", "longdashed", "dotted", "shortdashed", "dotdashed", "dotdotdashed", "dotdotdotdashed"]

The lineTypes list is used when plotting model data.  Lines are drawn between points in time order.  The line type used for these type of plots is read from this list.  Like symbol type and color, the DFC display starts with the first lineType in the list, then uses the second and so on until the end when it starts from the beginning again. The complete set of lineTypes is listed above.

lineWidth = 2

The lineWidth determines how thick the line is in pixels.  If you find the lines hard to see, increase the value one or two pixels.

fontFace = "helvetica"
fontSize = 1.5

The fontFace and fontSize configuration items allow you to change the font style and size, respectively.  Since the loaded fonts on your system may vary, be sure that the font is available from your system before changing it.


localDfcConfig.py

To modify any of the above items, it is strongly recommended that you create a localDfcConfig.py file in your etc/SITE directory.  That way, any changes you make will be preserved when you upgrade to a newer version of GFESuite.

Before making any of these changes you must first create the localDfcConfig.py file in your etc/SITE directory.  Once you have done this, include these lines at the very top of the file

from dfcConfig import *
import dfcConfig

That will ensure that changes you make to this file can be "seen" by the main config file.

Once that is done you may then override any definition in the main configuration file by redefining it with a "dfcConfig." prefix.  For example,

  dfcConfig.myStations = ["KABC', "KDEF", "KGHI"]

This will redefine any of the items already defined in the main configuration file.

Changing myStations

Changing myStations (the list of stations for which data will be achived) is something that you will likely want to do.  The reason is that the default station list is the set of stations that live within a rectangle that circumscribes your office domain.  Typically,  this list comprises about 100 stations.  You may wish to cut down the number of stations to reduce the amount of disk space that DFC uses as well as reduce the number of stations that you will see in the DFC interface.  Reducing the number of stations will make it easier to find a station you want.

Changing the pointFcstDict

Changing a dictionary is slightly different.  To modify any of the model entries, use the following syntax:
 

dfcConfig.pointFcstDict ['NAM'] =
    {'T':[0, 12, 24, 36, 48, 60],
     'Td':[0, 6, 12, 18, 24, 30, 36, 42, 48, 54, 60, 66, 72],
     'Wind':[0, 6, 12, 18, 24, 30, 36, 42, 48, 54, 60, 66, 72]}

To add a new model, use the same syntax.

Changing any of the display items

Changing any of the config item that affect the display works exactly the same way.  Just redefine the item you wich to change, making sure it's preceded by "dfcConfig." before the item name.  For example to change the line width:

dfcConfig.lineWidth = 3
 


For information on using the Daily Forecast Critique, refer to the DFC User's Guide .