The ifpIMAGE User's Guide

January 4, 2012

Table Of Contents

Overview
Configuring ifpIMAGE
Running ifpIMAGE
Can I Test My Configuration?
Sample ifpIMAGE Configuration File
How Do I Control the Weather Elements to be Generated?
I Only Want a Single Image Per Weather Element, How Do I Do This?
Can I produce smoothed images?
Can I produce smooth, clipped images?
How Do I Control Whether a Weather Element is an Image or a Graphic?
Can I Overlay More Than One Weather Element?
Can I Add Contours or Wind Barbs to My Image?
How Do I Change the Color Table?
Can I Control the Color Bar Labeling on the Output PNG?
How Do I Change the Size of the Output PNG?
Can I Control the Size of the Border around the Grid?
Can I Put Samples on the Display?
Can I Mask Certain Areas of the Display?
How Do I Define the Set of Map Backgrounds?
Can I Change the Appearance of the Map Backgrounds?
Can I Change the Appearance of the Graphics?
Can I Specify the Time Range for Which to Generate PNGs?
Can I Change the Appearance of the "Wx" Weather Element When Displayed as an Image?
Can I change the Weather Sample Label Text to something more descriptive?
Can I Disable the Color Bar?
Can I Always Have a Standard Set of Wx Labels on the Color Bar?
Can I Disable the Legend?
Can I Change the Legend from Local Time to Zulu Time?
Can I Switch Between the simple Weather Element Name and a more descriptive Name, or turn the name off completely?
Can I Format The Legend?
Can I Use Snapshot Timestamps in the Legend?
Can I Change the Background Color?
Can I Control the output filename?
What does the "info" file contain?
Can I add the NWS and NOAA logos?

Overview

The ifpIMAGE program is used to generate imagery of grids from the GFESuite.  The program is really the GFE running in a special background mode in which the display is not written to the screen, but rather to a PNG image.  Due to this architecture, virtually anything displayable on the GFE spatial editor, can be made into a PNG image.  Some of the basic characteristics of the ifpIMAGE program are:

The configuration of the ifpIMAGE program is not done through command line switches.  Instead it uses a GFE configuration file which is identical in format to the standard gfe configuration file.  There are several command line switches that can be used to specify the configuration file to be used,  the user name (which defaults to SITE), and optionally the base time.

When the ifpIMAGE program is executed, the program reads the specified configuration file, sets up the GFE in background mode, loads the specified data and generates images.  By default, images are generated for all available grids for the given parameters. Each output PNG is named with a unique timestamp to help sort out the many PNG images. In addition, an "info" file is generated for each PNG which contains descriptive information about the PNG.

Configuring ifpIMAGE

ifpIMAGE is configured through a  gfe configuration file. These custom configuration files should be SITE-based, not USER-based since the ifpIMAGE is a product generation program for site use.  It is not recommended that you use the standard gfe configuration file name for ifpIMAGE configuration files due to conflicts with the GFE. More information about how the BASE, SITE, and USER configuration capability can be found in the Base, Site, and User Concept Guide.

NOTE: ifpIMAGE by default uses configuration files that are defined for SITE. If you create a configuration file at USER level, then run the ifpIMAGE program, the ifpIMAGE probably will not generate any images. This is caused by storing the configuration file under USER and not SITE, and the ifpIMAGE program is looking for your configuration file in SITE. You can override this behavior using the -u switch to ifpIMAGE.

Creation of the ifpIMAGE configuration file is done through the GFE main menu item: GFE->Define Config and ifpIMAGE Files menu entry. Be sure to create/modify these files at SITE level to ensure that the custom configuration files end up in the SITE directory.


Running ifpIMAGE

The command line options for ifpIMAGE are:
Option Optional Meaning
-h hostname NO (see note) Name of the host on which the server is running
-p portnumber NO (see note) Port number for the server
-c configName NO Configuration filename
-u username YES UserName, defaults to "SITE"
-o outputDirName NO (see note) Name of output directory
-b baseTime YES Base time, used in determining filenames.  Basetime is in the yyyymmdd_hhmm format.  See the filename naming section of this document. 
-s startTime YES Specifies the starting time range from which to generate PNG images.  Format is in the yyyymmdd_hhmm format.  Only images that have a time equal to or after this specified time will be generated.
-e endTime YES Specifies the ending time range from which to generate PNG images.  Format is in the yyyymmdd_hhmm format.  Only images that have a time before this specified time will be generated.
-t userDefinedTimeRange YES Specifies a user defined time range to be used to define the range of times from which images should be generated.  Example is: -t "Day 3". This will generate images for any grids that overlap the definition of "Day 3".  Note that these definitions change at midnight local time or 0000z.

Note: When running ifpIMAGE in a normally configured system, the -h and -p switches are not needed since they will be brought in from your configured installation.  The -o switch defaults to your /awips2/cave/etc/gfe/products/IMAGE directory. If you want to connect to a different server than the configured EDEX, then the -h and -p switches are needed. If the default destination isn't correct for your purpose, then you will need to specify an -o switch.   If environment variables ${CDSHOST} or ${CDSPORT} are defined, then the default server and port will be determined from the environment variables, unless overridden with the user specified -h and -p switches.


Can I Test My Configuration?

Yes.  You can test your configuration by running the GFE with the specified user and configuration filename.  Then you can step frames or animate and the spatial editor will show you the expected results (e.g., colors and other appearance features).

NOTE: ifpIMAGE by default uses configuration files that are defined at SITE level. If you create a configuration file at USER level, then run the ifpIMAGE program, the ifpIMAGE probably will not generate any images. This is caused by storing the configuration file at USER level and not SITE, and the ifpIMAGE program is looking for your configuration file in SITE. You can override this behavior using the -u switch to ifpIMAGE.


Sample ifpIMAGE Configuration File

The following complete configuration file uses the standard delivered gfe configuration file and overrides certain features.  This configuration file does the following: Example ifpIMAGE configuration file

How Do I Control the Weather Elements to be Generated?

The user can control which weather elements should be generated.  The weather elements that are generated on each PNG can be controlled directly through the gfe configuration file using the Png_parms entry.  The GFE configuration file has an entry to specify the set of png weather elements for display.  The entries are coded and the user is required to know the weather element name, its level, the database model name, its optional type, and the sequence number if model data is being presented.

Here are the steps to take:

1. Decide which weather elements you want overlaid on your PNG imagery.
2. Create a GFE configuration file that will be used to generate PNG imagery. Edit the gfe configuration file to define the Png_parms entry.
Note that Topography is available for the png image by using the Png_parms entry and specifying "Topo".

Example ifpIMAGE configuration file


I Only Want a Single Image Per Weather Element, How Do I Do This?

Your Png_parms entry,  should contain just one weather element.  You will also want to modify the entry in the GFE configuration file to indicate the name of that element so it will display as an image.

The modifications to the GFE configuration file to make this an image are:

Png_image = 'T'

Png_parms has been defined to contain: 'T_SFC:_Official -1'.

If you wanted to make a set of temperature images, dew point images, and wind images, you will need three different GFE configuration files.

Example ifpIMAGE configuration file



Can I Produce Smoothed Images?

A smooth image can be produced via a configuration file change for a scalar or vector weather element only:

Png_smoothImage = 1 (smoothing enabled0
Png_smoothImage = 0 (smoothing disabled)

Note that if you are filtering the displayed data by site identifier or site plus weather element name (e.g., BOU_mask = "CWA, BOU_T_mask = "BOU", T_mask = "BOU", or mask = "BOU"),  your smoothed image will also be smooth, clipped.    Click here for just smooth, clipping options.
 

                   ipfIMAGE-noSmooth.png

                    ifpIMAGE-Smooth.png

Example ifpIMAGE configuration file



Can I Produce Smoothed, Clipped Images?

To produce a smooth, clipped area, as opposed to just providing a display filter or masking, use:

Png_smoothClip = 0

The following rules apply if both Png_smoothImage and Png_smoothClip are used.
 
DataType
Png_smoothImage
Png_smoothClip
Result
SCALAR/VECTOR
0
0
No data smoothing, no smooth clipping
SCALAR/VECTOR
0
1
No data smoothing, clipped to the pixel level of the display filter (mask) indicated, uses the nearest "grid box" for the data
SCALAR/VECTOR
1
0
Data smoothing, clipped to the pixel level of the display filter (mask) indicated, uses bi-linear interpolation for the data values
SCALAR/VECTOR
1
1
Data smoothing, clipped to the pixel level of the display filter (mask) indicated, uses bi-linear interpolation for the data values
WEATHER/DISCRETE
0
0
No data smoothing, no smooth clipping
WEATHER/DISCRETE
0
1
No data smoothing, clipped to the pixel level of the display filter (mask) indicated, uses the nearest "grid box" for the data
WEATHER/DISCRETE
1
0
No data smoothing, no smooth clipping
WEATHER/DISCRETE
1
1
No data smoothing, clipped to the pixel level of the display filter (mask) indicated, uses the nearest "grid box" for the data

 

No Smoothing, Clipped Smooth, Clipped No Smoothing, Clipped, Wx
 
 

Example ifpIMAGE configuration file


How Do I Control Whether a Weather Element is an Image or a Graphic?

By default, a weather element is displayed as a graphic.  Only one weather element may be displayed as an image per configuration file. You can specify the name of this weather element through the PNG image name field in the gfe configuration file.

The following pictures illustrate the effect of denoting Sky to be an image or a graphic.

The modifications to the GFE configuration file to make alternate between a graphic and image are a single line:

Png_image = 'Sky'

If you want it a graphic, be sure not to include the line Png_image.

Example ifpIMAGE configuration file


Can I Overlay More Than one Weather Element?

You may overlay as many weather elements as you desire.  This is accomplished by creating a weather element group with multiple entries through the use of the Weather Element Browser from the GFE.  Alternatively, you can use the Png_parms field to define the weather elements.  Only one of the weather elements may be displayed as an image, which is specified in the PNG image name field in gfe configuration file.  All of the other weather elements will be displayed as a graphic.

The type of graphic can be controlled through the visual type fields in the gfe configuration file.

Example ifpIMAGE configuration file


Can I Add Contours or Wind Barbs to My Image?

If you want graphics on top of your image field for the same weather element, such as a temperature image with temperature contours overlaid, then you can control this through the visual type fields in the gfe configuration file.  For scalar data, you only can display graphics as contours.  For wind data, you can display the graphic as wind barbs or wind arrows.  For weather data, your only choice is bounded areas.  You would make an entry in the categories of image and spatial editor for the visual type.

The changes made to the configuration file consisted of modifying (or adding) a line that specifies that T (temperature) for the spatial editor image should include contours:

from: T_spatialImageType = [ "Image" ]
to: T_spatialImageType = [ "Image", "Contour" ]

Example ifpIMAGE configuration file


How Do I Change the Color Table?

Color table mapping can be changed for scalar and vector weather elements. See the weather color table section to change the color mapping for the Wx element.

The user can specify:

1.  The color table name to be used for an individual weather element (e.g., Linear). If not specified, then the color table is the default smooth rainbow spectrum.  You can change the characteristics of this default rainbow spectrum.
2.  The color table range mapping (e.g., minimum and maximum values).  By default, the mapping is performed from the minimum possible value to the maximum possible value as defined in serverConfig.py.
3.  Whether the color table mapping should be linear or logarithmic.  The logarithmic scaling factor is specified in the gfe configuration file.
A new color spectrum may be created in the GFE using the Color Table Editor Dialog , saved with a new filename and configured in ifpIMAGE.

Example ifpIMAGE configuration file

Defining the Color Table Name

The following two images show the same data set, but with different color enhancement curves (e.g., color tables).

The changes made to the configuration file consisted of modifying (or adding) a line that specifies T's (temperature) color table:

from: T_defaultColorTable="colorTable1"
to: T_defaultColorTable="tColorTable"
 

Changing the Color Table Range Mapping

The user can also change the color table range mapping.  The following two images show the same data set, with the same color enhancement curve, but mapped to different starting and ending values.

The changes made to the configuration file consisted of modifying (or adding) two lines that specifies T's (temperature) color table value mapping:

to: T_maxColorTableValue = 50.0
to: T_minColorTableValue = 0.0
 

Applying a Logarithmic Scaling Factor

Most color table algorithms are linear.  The user may change this to a logrithmetically-scaled mapping if desired.  The following two images show the same data set with the same enhancement curve, but one has a linear and the other a logrithmetic scaling.  Note that the color bar scale is still linear, but the number of colors assigned are squeezed into the lower ranges.


 

The changes made to the configuration file consisted of modifying (or adding) a line that specifies T's (temperature) color table should be mapped logrithmetically:

to: T_LogFactor = 0.01
 
 

Using a Fit To Data Color Table Algorithm

The user may specify that a color table be calculated using the "fit to data" algorithm.  The program will examine all of the grids associated with the weather element to calculate the minimum and maximum observed value. The color table spectrum is then mapped to these values. There are four different algorithms that can be used: If "All Grids" or "All Grids over Area" is specified, then all data grids for the weather element are examined to determine the color table mapping range. If "Single Grid" or "Single Grid over Area" is specified, then the fit to data algorithm is applied to each image, thereby resulting in different color tables for each image.  The one of the algorithms, "... over Area", is specified, then the fit to data algorithms will only look at data contained within the edit area defined by Png_fitToDataArea.

The changes made to the configuration file consisted of modifying (or adding) a line that specifies MaxT's (maximum temperature) color table should be mapped with the "fit to data" algorithm:

to: MaxT_fitToDataColorTable = "All Grids"

To change the algorithm to look at all grids, but only use data values contained in your CWA (e.g., CYS), then the following two entries would be needed.  Note that the "... over Area" algorithm is generally only used when masking data.

to:
MaxT_fitToDataColorTable = "All Grids over Area"
Png_fitToDataArea = "CYS"


Can I Control the Color Bar Labeling on the Output PNG?

By default, the labels on the color bar are automatically calculated and plotted.  The user can override the automatic set with a defined set through the gfe configuration file's entry Color Bar Labels.  Tick marks and labels will be plotted only at those values specified.  This option applies only to scalar and vector data.

To change the Maximum Temperature's color bar labels to 32, 40, 50, 60, the following entry would be made in the gfe configuration file:

add:
MaxT_ColorBarLabels = [32.0, 40.0, 50.0, 60.0]
 


How Do I Change the Size of the Output PNG?

The size of the output PNG is specified in the gfe configuration file.  You only need to specify the horizontal or the vertical since the other dimension is automatically calculated.

The following illustrates making the same data as a thumbnail (100x100) and large (600x600).

The changes made to the configuration file consisted of modifying the lines that specifies T's (temperature) color table should be mapped logrithmetically:

for the small image: Png_height = 100
for the large image: Png_height = 600

Example ifpIMAGE configuration file


Can I control the size of the border around the grid?

The size of the border around the grid may be specified in each of the four directions as a percentage of the grid size.  The entries are specified in the Office Domain expand section of the configuration file.

The changes made to the configuration file consisted of modifying (or adding) several lines to adjust the size of the space around the grid:

from:
OfficeDomain_expandLeft = 10
OfficeDomain_expandRight = 10
OfficeDomain_expandTop = 10
OfficeDomain_expandBottom = 10
to:
OfficeDomain_expandLeft = 5
OfficeDomain_expandRight = 20
OfficeDomain_expandTop = 10
OfficeDomain_expandBottom = 30

Example ifpIMAGE configuration file


Can I Put Samples on the Display?

Samples may be put on the display.  Note that if you have multiple weather elements displayed, then you will see multiple samples at each sample point.  This can be changed through the Limiting Samples to Specific Weather Elements entry. The set of samples is defined in a sample set.  The name of that sample set is defined as the default sample set in the gfe configuration file.

If the samples are too small or too large, changes can be made through the sample font entry in the gfe configuration file. The illustration below shows samples for Temperature and Wind.  The white entry matches the image, Wind;  the green entries match the Temperature.

The procedure for adding samples to the PNG image is to create a sample set in the GFE and save it.  Then modify the PNG configuration file to identify that sample set:

DefaultSamples = ['pngSamples']

The format of the samples for vector data may also be changed to one of the following formats:

By default, samples are shadowed, i.e., double characters are written in the primary color and black to increase constrast on light-colored images.  The sample shadowing may be turned off, if desired, through the gfe configuration file.  Refer to the sample shadow configuration.

The offset from the sample anchor point to the sample values may also be set.  Refer to Sample Label Offsets in the gfe configuration documentation.

By default, the values displayed at each sample point comprise values from all of the visual weather elements. For example, if T, Td, and Wind are visible, then each sample will display the values from T, Td, and Wind.  You can change this behavior through the Limiting Samples to Specific Weather Elements entry in the gfe configuration file.

You may also change the color associated with a sample. The default is that the sample color will match the graphic color for that weather element.  Use the parmName_Sample_color in the gfe configuration file to explictly set a color for the sample.  For example, to change the sample color for Temperature (T) to green, do the following:

add:
T_Sample_color = "green"

Example ifpIMAGE configuration file


Can I Mask Certain Areas of the Display?

Masking or clipping is possible with ifpIMAGE.  This is actually a feature that can be used with the GFE as well.  The masking/clipping is defined using an edit area (or reference set).  The mask field in the gfe configuration file specifies the name of the edit area to be used as a mask.  Note that the output graphic will automatically be zoomed in to this area.

The user can choose to mask all weather elements the same on the image, or choose to mask just certain ones.  Refer the the mask field definition in gfe configuration file for details.

The changes made to the configuration file consisted of modifying (or adding) a line that specifies the clipping mask for the site (BOU in this case). (There are alternative forms available as well.)  The edit area is "BOU":

BOU_mask = "BOU"

Example ifpIMAGE configuration file

Note that when the user specifies a mask, that the ifpIMAGE display will automatically be zoomed in to show just that area.  This feature may be disabled through the use of the Png_wholeDomain configuration item.

Smooth clipping may be applied when using a mask.


How Do I Define the Set of Map Backgrounds?

Zero or more map backgrounds may be shown on the output PNG.  The default map background names are specified in the gfe configuration file.

The changes made to the configuration file consisted of modifying the lines that the default map backgrounds:

from: MapBackgrounds_default = ['States', 'CWA']
to: MapBackgrounds_default = ['States', 'Counties']

Example ifpIMAGE configuration file


Can I Change the Appearance of the Map Backgrounds?

The appearance of the map backgrounds may be changed in various ways with each map background being separately configurable:


The changes made to the configuration file consisted of modifying or adding the following lines:

States_graphicColor = 'red'
States_lineWidth = 3
CWA_graphicColor = 'green'
CWA_linePattern = "DOTTED"

Example ifpIMAGE configuration file


Can I Change the Appearance of the Graphics?

You can control the following through the gfe configuration file:


The following changes were made to the configuration file:

Contour_font = 4
T_graphicColor = 'blue'
Wind_graphicColor = 'red'
Wind_fontOffset = 2
Wind_density = 20
T_density = -2

Example ifpIMAGE configuration file


Can I Specify the Time Range for Which to Generate PNGs?

There are three ways to specify the time range for which to generate PNGs.  The first method specifies the creation of the images on a fixed interval, with or without an offset (i.e., a different starting time), rather than the default. The second method limits the creation of PNGs to within a specified time range.  The third method uses a user-defined time range to determine the limit of creation.
 

Generating PNGs on a Regular Interval

By default, ifpIMAGE automatically generates PNGs for every possible time step that results in a changed display of data.  All of the possible permutations are considered when generating PNGs with differing valid times. The configuration items are Png_interval and Png_intervalOffset.

You can change this behavior and force ifpIMAGE to generate images at specific time intervals.  These time intervals are specified in units of hours and will cover all grids from the beginning to the end of the database that match the hour interval.  Note that you may also want to specify Png_snapshotTime in order for the legends to indicate the interval time, rather than the grid valid time.

For example, specifying an interval of 6 hours will always generate images for 00z, 06z, 12z, and 18z.  The following changes would be made to the configuration file for an interval of 6 hours:

Png_interval = 6

To generate images that begin at a starting time other than 00z, you can specify an interval offset using a configuration option.   For example, specifying an interval offset of 1 and an interval of 6 (i.e., Png_interval = 6) will generate images at 01z,  07z, 13z and 19z.  The default for Png_intervalOffset is 0.

Png_intervalOffset = 1

Example ifpIMAGE configuration file

Refer to the gfe configuration file documentation for more details on the interval item.
 

Specifying via the command line the start/end limits of generation

The -s and -e switches on the command line can be used to limit the generation of PNG images.  The format of the entries are YYYYMMDD_HHMM.  If a grid of a PNG image falls within the starting and ending time range specified, then the image will be generated.
 

Specifying via the command line a user-defined time range

The -t switch on the command line specifies a user-defined named time range.  If a grid of a PNG image falls within the calculated starting and ending time, then the image will be generated.


Can I Change the Appearance of the "Wx" Weather Element When Displayed as an Image?

The Wx weather element uses combinations of fill patterns and colors to denote the weather. This can be controlled through the gfe configuration file.  The weather image algorithm is described in the gfe configuration file.
 

The configuration file was modified to change the mapping from patterns to coverages, and from colors to weather types.  The entries that were changed are highlighted for clarity.

from:
WeatherCoverage_names = ["Iso", "WSct", "Sct", "Num", "Wide", "Ocnl", "SChc",
                         "Chc", "Lkly", "Def", "Patchy", "<NoCov>"]
WeatherCoverage_fillPatterns = ["OCNL", "WIDE_SCATTERED",
                                "SCATTERED", "LKLY", "WIDE", "OCNL",
                                "WIDE_SCATTERED", "SCATTERED", "LKLY",
                                "WIDE", "SCATTERED", "WHOLE"]
WeatherType_names = ["<NoWx>", "T", "A", "R", "RW", "L", "ZR", "ZL",
                     "S", "SW", "IP", "F", "H", "BS", "K", "BD",
                     "SA", "LC", "FR", "AT", "TRW"]
WeatherType_colors = ["brown", "red3", "DeepPink", "ForestGreen",
                      "ForestGreen", "CadetBlue1", "darkorange1",
                      "goldenrod1", "gray70", "Grey65", "plum1",
                     "khaki4", "Gray75", "snow", "grey30", "Brown",
                      "blue1", "coral1", "pale turquoise", "DeepPink",
                      "red3"]

to:
WeatherCoverage_names = ["Iso", "WSct", "Sct", "Num", "Wide", "Ocnl", "SChc",
                         "Chc", "Lkly", "Def", "Patchy", "<NoCov>"]
WeatherCoverage_fillPatterns = ["OCNL", "WIDE_SCATTERED",
                                "SCATTERED", "LKLY", "WHOLE", "OCNL",
                                "WIDE_SCATTERED", "SCATTERED", "LKLY",
                                "WIDE", "SCATTERED", "WHOLE"]
WeatherType_names = ["<NoWx>", "T", "A", "R", "RW", "L", "ZR", "ZL",
                     "S", "SW", "IP", "F", "H", "BS", "K", "BD",
                     "SA", "LC", "FR", "AT", "TRW"]
WeatherType_colors = ["brown", "red3", "DeepPink", "Green",
                      "ForestGreen", "CadetBlue1", "darkorange1",
                      "goldenrod1", "blue", "Grey65", "plum1",
                     "khaki4", "Gray75", "snow", "grey30", "Brown",
                      "blue1", "coral1", "pale turquoise", "DeepPink",
                      "red3"]

Example ifpIMAGE configuration file


Can I change the Weather Sample Label Text to something more descriptive?

The Weather Sample label text may be changed to something more descriptive.  You use the AltWxSampleLabels_prettyWx and AltWxSampleLabels_label entries in the configuration file.  This is a simple string substitution.  For example if you wanted to change several labels as shown in the following table:
 
Pretty Wx String (plotted by default) Desired Sample Label
Sct RW- Rain Showers
Sct SW- Snow Showers
Lkly S- Snow
Wide S- Snow
<NoWx> (blank)

then your entries in the configuration file would contain:

AltWxSampleLabels_prettyWx = ['Sct RW-', 'Sct SW-', 'Lkly S-', 'Wide S-', '<NoWx>']
AltWxSampleLabels_label = ['Rain Showers', 'Rain Showers', 'Snow', 'Snow', '']


Can I Disable the Color Bar?

Yes.  Use the Png_omitColorBar entry in the configuration file:

Png_omitColorBar = 1

You can control the label sizes on the color bar.


Can I Always Have a Standard Set of Wx Labels on the Color Bar?

By default, the color bar for Wx consists of entries that are currently in the data.  For example, if Snow and Rain are the only values present in the grid, then the color bar will only have entries of snow and rain on them.  The user may specify a set of weather labels that will always appear in the color bar, regardless of the types of weather data in the grid. The configuration item is Wx_AdditionalColorBarLabels.
 


Can I Disable the Legend?

Yes. The legend visibility can be controlled through the gfe configuration file.


 

The changes made to the configuration file consisted of modifying (or adding) a line that specifies T's (temperature) color table:

from: Png_legend = 1
to:   Png_legend = 0

Example ifpIMAGE configuration file


Can I Change the Legend From Local Time to Zulu Time?

Yes. The legend time zone format can be controlled through the gfe configuration file.

The changes made to the configuration file consisted of modifying (or adding) a line that specifies T's (temperature) color table:

from: Png_localTime = 0
to: Png_localTime = 1

Example ifpIMAGE configuration file


Can I Switch Between the simple Weather Element Name and a more descriptive Name, or turn the name off completely?

Yes. There is an option in the gfe configuration file to specify whether the no name, simple, or more descriptive weather element name should be used in the legend.

The changes made to the configuration file consisted of modifying (or adding) a line that enables this option:

from: Png_descriptiveWeName = "SHORT"
to: Png_descriptiveWeName = "LONG"

Example ifpIMAGE configuration file

You can also set Png_descriptiveWeName to "ALT" which lets you define your own weather element string.  If you use "ALT", then you use the Png_wxelem_AltName to define the string you want to use, where wxelem is the name of the weather element.  For example, to change the "Maximum Temperature" string to "High Temps", you would enter the following two strings:

Png_descriptiveWeName = "ALT"
Png_MaxT_AltName = "High Temps"


Can I Format the Legend?

The legend may be formatted to include/exclude certain time and duration elements.  Refer to the gfe configuration documentation for details on how it can be changed. A separate format string may be set for the duration, start time, and ending time for both the local time display and the Zulu time display.

The order of the legend is always the weather element name, duration, start time, and ending time.  Any of the duration, start time and ending time may be omitted.

from:
Png_legendFormat_LT_dur = ""
Png_legendFormat_LT_start = "%b %d %I:%M %p %Z to "
Png_legendFormat_LT_end = "%b %d %I:%M %p %Z"

to:
Png_legendFormat_LT_dur = "%H hours "
Png_legendFormat_LT_start = " "
Png_legendFormat_LT_end = "ending %a %b %d, %Y %I:%M %p"

The units can be placed on the legend by including the special phrase "[UNITS]" in one of the legend format strings.  For example, if you wanted the units to appear right before the duration in the above example, you would define the Png_legendFormat_LT_dur string to be:

Png_legendFormat_LT_dur = "([UNITS]) %H hours "

Example ifpIMAGE configuration file


Can I Use Snapshot Timestamps in the Legend?
 


 
 

To indicate a snapshot time instead of the valid time of the grid, use the Png_snapshotTime option.

add:
Png_snapshotTime = 1

 The default format of the snapshot Zulu time is "%b%d%H%MZ".  To change this format

add:
Png_legendFormat_Zulu_snapshot = "%b%d%H%MZ"

The default format of the snapshot itme if the Png_snapshotTime = 1 and Png_localTime = 1 is "%d %b %I:%M %p% Z" .  To change this format

add:
Png_legendFormat_LT_snapshot = "%I:%M %p %Z" (for example)
 

Refer to the gfe configuration documentation for details on how formats can be changed.

Example ifpIMAGE configuration file


Changing the Legend Language

You can also change the default language associated with the legend.  Normally it is in English, but can be changed to French or Spanish.  Refer to the Png_legendLanguage item in the gfe configuration file.  For example, to have the date/time group formatted in Spanish, use the following in your configuration file:

add:
Png_legendLanguage = "spanish"
 

Changing the Legend Color

Be default, the color of the legend matches the color of the graphic.  You can override this behavior using the parmName_Legend_color entry in the configuration file.  For example, to always have a red label for "T":

add:
T_Legend_color = "red"
 


Can I Change the Background Color?

The background color of the PNG images may be changed.  This is accomplished through the background color for drawing panes in the gfe configuration file.  Note that additional entries will also need to be modified in the configuration file in some cases depending upon the color chosen.   The legends normally write the image label in "white" and the samples are painted in "white".  The entries for sample color and image legend color control these entries.  The color of the labels for the colors bar can be controlled through the Color Bar Tick/Text Colors entry.

from:
bgColor = 'black'
ImageLegend_color = "white"

to:
bgColor = 'white'
ImageLegend_color = "blue"

Example ifpIMAGE configuration file
 
 


Can I Control the Output Filename?

The directory location for the output pngs is specified on the command line using the -o switch. By default, the output filename of the imagery is in the form of yyyymmdd_hhmm.png.  This can be modified in several ways as described below.
 

Adding a Prefix to the Filename

The Png_filenamePrefix entry in the  configuration file can be used to specify a prefix to the filename.  Prefixes can be used to help catagorize the set of imagery that is created.  For example, if you run ifpIMAGE twice with different configuration files to generate a set of Temperature images and Wind images, all of the images will end up in the same output directory, and may have the same name.  By using the Png_filenamePrefix entry, you can assign prefixes for each ifpIMAGE configuration.

To prefix all of the filenames with "T_Official_", use the following entry in the  configuration file:

Png_filenamePrefix = 'T_Official_'

The result will be that all of the generated filenames will be in the form of T_Official_yyyymmdd_hhmm.png.

Example ifpIMAGE configuration file
 

Changing the Date String

The date/time string defaults to the absolute time as determined by the grids contained within the image.  The default format of the date string is yyyymmdd_hhmm.  An alternative approach involves running the ifpIMAGE program with the -b command line switch followed by a base time specification.  The base time specification is also in the standard yyyymmdd_hhmm format.

When the -b switch is given to ifpIMAGE, the date string is changed to this format:

basetime_Fproj

where basetime is that specified on the command line with the -b switch, and proj is calculated as the number of hours offset from the basetime for the valid time of the image.

For example, if the basetime is specified as 20010313_1200, and the valid time of the image is 20010313_2100, then the png filename (assuming no prefix) will be:

20010313_1200_F9.png

The Png_baseTimeFormat entry also allows you to change the formatting of the date string.  This works with or without the -b command line switch.  The base time format is in the identical format to the legend formatting strings.   Refer to the gfe configuration documentation for the available options. For example, if you wanted the output filenames to only contain the forecast projection time, then you would run the ifpIMAGE with the -b switch and specifying the base time, and you would use the following syntax in the gfe configuration file:

Png_baseTimeFormat = ''

If you wanted to include just the day of the week, then followed by the projection time, then use the -b switch, specify the base time, and use the following syntax in the gfe configuration file:

Png_baseTimeFormat = "%a_"

which would produce filenames such as Tue_18.png.

If you don't specify the -b switch, then the base time formatting is for the valid time of the grid.  A format such as:

Png_baseTimeFormat = "%a_%H"

would result in filenames such as: Mon_18.png, Mon_21.png, Tue_00.png, Tue_03.png.


What does the "info" file contain?

An "info" file is generated for each "png" image.  The "info" file contains descriptive information about the generated image.  It includes the following information: The color assigned to an IMAGE grid is not valid.

If an IMAGE is displayed as both an IMAGE and GRAPHIC (such as temperature image with contours), the info file will have two entries for that grid -- one IMAGE and one GRAPHIC.

The form of the weather element identifier has the following attributes:
 
Name Description Example
Weather Element Name name of the weather element T
Site identifier site identifier for the database BOU
Format format of the weather element, always GRID GRID
Optional database type Optional database type for the database ''
Model Model Name Fcst
ModelTime Valid time of the model, in form of yyyymmdd_hhmm 20010301_1200

Each of the sections are separated by an underscore character, except for the weather element name, which is always followed by a colon (:).

Example "info" file


Can I add the NWS and NOAA logos?

The standard NWS and NOAA logos can be added to the bottom of your PNG imagery by toggling the Png_logo entry in the configuration file.  You can also define the text string that will appear between the two logos through the Png_logoString entry.

The above was accomplished by the following two statements in the configuration file:

to:
Png_logo = 1
Png_logoString = "NWS Timbuktoo"

Example ifpIMAGE configuration file


Back to TOC