**FogPlot v1.3**

![](media/image1.png){width="5.997222222222222in"
height="6.127083333333333in"}

FogPlot is a tcl/tk script that helps the forecaster assess the
potential for dense fog using the UPS Fog Forecasting Method. FogPlot
uses as input METARs, the NGM and NAM FOUS bulletins (and interpolated
grid values from the ANAM40@ netCDF file), the GFE minimum and hourly
temperature grids, and optionally, Soil Temperature information. It then
displays a graphical time history of the temperature and dewpoint (to
help infer a crossover temperature), a visibility trace, forecast low
temperature, first guess crossover temperature, tabular output
associated with the Modified Richardson number, and optionally, a
listing of the soil temperatures.

Installation instruction and file configuration examples below use
/data/local/fog as the directory in which this application will be
installed. Any change to that will require a number of changes to
configuration files.

**Installation and Configuration:**

1.  Create a directory on AWIPS for fogPlot (**mkdir /data/local/fog**)

2.  Copy the **fogPlot1.tar.gz** file to the directory (**cp
    fogPlot1.tar.gz /data/local/fog**)

3.  Change directories to the directory you created for fogPlot (**cd
    /data/local/fog**)

4.  Uncompress the **fogPlot1.tar.gz** file (**gunzip fogPlot1.tar.gz**)

5.  Untar the **fog.tar** file (**tar xvf fog.tar**)

This will yield twelve files: **AGRID.pm** - Perl module for working
with model netCDF

files

**fogPlot.cfg.sample** - a sample configuration file for fogPlot

(rename file to remove the "sample" after you've edited it)

**fogPlot.tcl** - the main program

**FogPlot.UserPython** - GFE python text formatter script

used to obtain 3 hourly temperatures

**GCT.pm** - Perl module for working with model netCDF

files

**getPointData.pl** - Perl script that reads the NAM40

netCDF files

**getTemps.sh** - shell script which calls fogPlot.UserPython

**goFog** - start up script for fogPlot

**goGetPointData** - shell script which calls getPointData.pl

**radiation-fog.pdf** - Randy Baker=s paper in pdf format

**radiation-fog.ps** - Randy Baker=s paper in postscript

format

**soil.cfg** - a configuration file for fogPlot

6.  Make sure **fogPlot.tcl**, **FogPlot.UserPython**,
    **getPointData.pl**, **getTemps.sh**, **goFog**, **goGetPointData,
    AGRID.pm**, **GCT.pm** have execute permission:

**chmod 775 fogPlot.tcl**

**chmod 775 FogPlot.UserPython**

**chmod 775** **getPointData.pl**

**chmod 775** **getTemps.sh**

**chmod 775** **goFog**

**chmod 775** **goGetPointData**

**chmod 775 GCT.pm**

**chmod 775** **AGRID.pm**

7.  Create an archive directory (**mkdir /data/local/fog/archive**)

8.  If you installed fogPlot in a directory other than
    **/data/local/fog**, you will need to edit the start up script
    **goFog**. Edit the lines in **red** to reflect the directory you
    installed fogPlot in. If you want to start the program with the
    archive option in effect, you must start it with the command line
    switch **--archive** (**/data/local/fogPlot.tcl --archive**). This
    will create uniquely named, timestamped postscript files in the
    archive directory each time a graphic for a given site is displayed.

> #!/bin/sh
>
> umask 002
>
> export PATH=\${PATH}:**/data/local/fog**
>
> cd **/data/local/fog**
>
> **/data/local/fog/**fogPlot.tcl
>
> **\# /data/local/fog/**fogPlot.tcl -archive

9.  Edit **soil.cfg**. The example soil.cfg file contains an AWIPS PIL
    (**TOPWRKSOI**). You can change this PIL to suit the PIL of your
    product containing a soil temperature listing. The contents of this
    product will have to be generated through an intermediate program or
    script. An example of the format needed for this product is below.
    Please use an uppercase letter **M** for missing data. If you have
    no soil temperature information, replace the AWIPS PIL in soil.cfg
    with the word **NULL**

ZCZC TOPWRKSOI

TTAA00 KTOP DDHHMM

Manhattan, 42

Rossville, M

Silver Lake, 44

NNNN

10. Edit **fogPlot.cfg**. An example line from the file and description
    of fields follows:

TOPMTRCNK,SAUS80,TOPFRHT68,TOPFRH68,TOP,TOP

> METAR PIL of TAF/MTR site
>
> WMO Collective Code of the METAR (usually SAUS70 or SAUS80)
>
> NGM FOUS PIL containing FOUS Site ID nearest to the METAR site
>
> NAM FOUS PIL containing FOUS Site ID nearest to the METAR site
>
> NGM FOUS Site ID nearest to the METAR site
>
> NAM FOUS Site ID nearest to the METAR site

A sample **fogPlot.cfg** file:

TOPMTRDDC,SAUS70,TOPFRHT68,TOPFRH68,DDC,DDC

TOPMTRGCK,SAUS70,TOPFRHT68,TOPFRH68,DDC,DDC

TOPMTRTOP,SAUS70,TOPFRHT68,TOPFRH68,TOP,TOP

FSDMTRFSD,SAUS80,TOPFRHT70,TOPFRH70,FSD,FSD

OMAMTROMA,SAUS70,TOPFRHT68,TOPFRH68,OMA,OMA

If the TAF/MTR site is not also an FRH/FRHT site, the tabular MRi output
on the

FogPlot GUI for that site will include:

a.  an MRi for the TAF/MTR site utilizing NAM and GFE grids at the
    TAF/MTR site

b.  MRi's for the TAF/MTR site utilizing FOUS data from the nearest
    FRH/FRHT site and GFE temperatures at the TAF/MTR site

> Thus, if a TAF/MTR site is well-removed from the nearest FRH/FRHT
> site, the NAM FOUS and NGM FOUS sections of the MRi tabular output
> will likely not be representative, but the NAM Grids section should
> be.

11. Edit **getTemps.sh**. In the local configuration section you will
    need to change the values of the variables **site** and **db**:

**site** - the GFE id of your site

**db** - the database you wish to pull your temperatures from, must be
**Fcst**,

**Official**, or **ISC**

As well as the paths in red if you installed fogPlot in a different
directory than

/data/local/fog.

#! /bin/sh

\################## Local Configuration Section
\######################################

\#

\# Set the line below to your site ID (use caps!)

\#

site=\"TOP\"

\#

\# Set the line below the Database you wish to use (options are Fcst,
Official and ISC)

\#

db=\"Fcst\"

\#

\################ End local configuration
\#############################################

rm -rf **/data/local/fog/**temp.dump

ifpsDB=\"\${site}\_GRID\_\_\${db}\_00000000_0000\"

/awips/GFESuite/bin/runIFPText -t FogPlot -d \$ifpsDB -o
**/data/local/fog/**temp.dump \> /dev/null 2\>&1

chmod 666 **/data/local/fog/**temp.dump

12. Install **FogPlot.UserPython** in GFE. To do this, you will most
    likely need the assistance of your IFPS/GFE focal point. As user
    "ifps" on dx2, it can be installed in IFPS by typing (all on one
    line):

/awips/GFESuite/primary/bin/ifpServerText -h dx2f -p 98000000 -u SITE -s
-n

FogPlot -f /data/local/fog/FogPlot.UserPython -c TextUtility

A site can edit the template file before it's installed or edit it from
GFE once it is

installed.

13. You will need to configure **FogPlot.UserPython**. To do this, edit
    two parts of the local configuration section. The first is the
    **outputFile**:

AoutputFile@: A/data/local/fog/temp.dump@

> If you installed FogPlot in a directory other than /data/local/fog,
> then you will need to edit the section in red above to reflect the
> directory where you installed FogPlot.

The next part you will need to edit is the **defaultEditAreas**:

AdefaultEditAreas\" : \[

(\"KTOP\", \"TOP\"),

(\"KFOE\", \"FOE\"),

(\"KMHK\", \"MHK\"),

(\"KS_008\",\"Some Town\"),

\],

> The entries in blue are GFE sample point edit area names (the TAF site
> edit areas will need to be created by your IFPS/GFE Focal Point).
> These can be either the zone (such as KS_008) that your TAF site is
> located in, or an edit area created around your TAF site (such as
> KTOP). The entries in red are the three letter ID of the METAR site
> that is associated with the edit area.

**Cautions and Limitations:**

FogPlot is to be used in helping predict dense fog using the UPS Fog
Forecasting Method. In order to utilize it to its best advantage, [the
user **must** have read and understood]{.underline}

***\"Radiation Fog: UPS Airlines Conceptual Models and Forecast
Methods\"***

by **Randy Baker, Jim Cramer, and Jeff Peters (UPS Airlines)**.

The manuscript can be found on-line at:

[http://ams.confex.com/ams/pdfview.cgi?username=39165]{.underline}

The success of this method depends on correctly choosing a \"crossover
temperature\", whether the GFE grid temperature forecasts for that night
are correct, whether the FRHT/FRH (or NAM grid) output is reasonably
accurate, and the inherent limitations of the method. The experience in
using this program will be greatly enhanced if one understands these
limitations, and only tries to apply the method in those situations for
which it was designed.

\*\* **Please note**, the **estimated crossover temp** output on the
graphic is the lowest dewpoint observed between 18Z and 00Z, or between
18Z and the current time if the current time is between 18Z and 00Z.
**This is not always the best choice for a crossover temperature. One
should always view the time history of the dew point trace and choose a
crossover temperature from this, using the ideas outlined in the UPS
paper**. The program also provides an option to input a crossover
temperature manually.

The forecast low temperature from the GFE grids and the forecast
variables used to calculate the MRi switch to valid times for the next
night at about 08Z.

**Version Changes:**

**Version 1.1**

-   Added print capability, can print to either the color or black and
    white AWIPS laser printers

-   Plots METAR visibility on the graph in addition to temperature and
    dew point

-   Bug fix for the getPointData.pl script not decoding 00Z or 06Z Meso
    Eta netCDF files

-   Bug fix for SGF, as they have different ID=s for the Eta and NGM
    FOUS bulletins

-   Bug fix to decode AWOS sites that to not have additive temperature
    data

**Version 1.2**

-   Added a fix for missing visibility values

-   Allowed the program continue by bypassing stations that were missing
    temperature information on their observation

-   Fixed labeling bug associated with 00Z and 06Z Meso-Eta

-   Fog Plot now displays a Aplease wait, I=m doing something screen@
    when doing its initial number crunching for a site.

-   Moved MesoEta Grids MRi table to top of MRi listings (above FRH and
    FRHT) to minimize potential misinterpretation when viewing FogPlot
    output for non FRH/FRHT sites.

-   FogPlot.UserPython was updated to handle of the new text
    Infrastructure of IFPS14.2.

    **Version 1.3**

```{=html}
<!-- -->
```
-   Archiving capability now an option

-   Label changes to account for Eta to NAM name change

-   Speed enhancements

-   Fixed infrequent decoding bugs

-   Removed files and references needed for HP-UX systems

-   Changes to install procedure for retrieving GFE temperature

-   Changes to a couple scripts

**Original Programmer:**

Brian P. Walawender

Central Region HQ

816-268-3114

[brian.walawender@noaa.gov]{.underline}

**Support Programmer:**

George Phillips

WFO TOP

785-232-1493 x 766

[george.phillips@noaa.gov]{.underline}

**Acknowledgments:**

I would like to thank George Phillips (SOO Topeka KS) for coming up with
the idea for FogPlot, and his help in improving the program. I would
also like to thank the forecasters at WFO Topeka, and those offices who
have used the program and provided input into it.