# Presentation: 015750

## New GFE Text Formatters

**Tracy Hansen / Brian Motta**

- Note: Text Products User Guide at
- http://www-md.fsl.noaa.gov/eft/ifps12doc/onlinehelp/TextFormatter.html

##   Configuration Issues in IFPS 12.X

-   **Configuration Issues in IFPS 12.X**
** ****General items**
** ****What should work after install ?**
** ****What might break due to install ?**
** ****Overview of Documentation**
** ****Current Expectations**
** ****Future Expectations**

**Inception 9/98**

**Exploration**

**Consolidation**

**Multiple**
**versions**

**Backward**
**Compatible**

**Changing**
**Infrastructure**

**Integrating**
**Versions**

-                  RPP
-      Development Cycle

##   General Items

**  ****General Items**
**“****First cut” of new formatters to all field sites**
**Tabular products more mature than narrative**
**Feedback still important/more improvements**

## What should work after install ?

**What should work after install ?**
-  _**10 IOC Text Products**_
**Tabular: CCF, SFT, AFM, PFM, MVF, FWF-table, FWM**
**Narrative: ZFP, SAF, CWF, GLF, NSH, FWF**

## What might/will break due to install ?

**What might/will break due to install ?**

-  **Products Developed with RPP17 and prior infrastructure – “Mostly” backward compatible.**

## Current

**Current**

## RPP21

**RPP21**

## RPP??

**RPP??**

## What might/will break due to install ?

**What might/will break due to install ?**

** ****Name collisions between Old and New Core Products e.g. “AreaFcst” ****	****	****	**
** ****Transition Strategy: **
** ****Local Enhancements can be added via request to RPP listserver**
** ****Use new core product**

## What might/will break due to install ?

**What might/will break due to install ?**

-  **Core Products for which the Local file has been overridden.   **
**Transition Strategy:**
** ****Start fresh with new Local file**
** ****Integrate any necessary customizations**
** ****Customize judiciously**

## Overview of Documentation

**Overview of Documentation**
**Product Set-Up and Customization**
** ****Quick-Start Product Set-up**
** ****Customization guide **
**– “****good ways” to customize products**
** ****Help and Feedback Guide**

## Overview of Documentation

**Overview of Documentation**
**Reference Guide**
** ****General background and overview**
** ****SampleAnalysis Section**
** ****TextRules Section for narrative products**

## Quick-Start Product Set-up

**Steps to getting a product up and running:**
**Display Name**
**Output file**
**Edit Areas**

## Customization Guide

**Product Headers**
**Definition Section, Edit Areas, and Combinations file**
**Overriding Thresholds and Variables**
**Customizing Narrative Products**
**Headlines**

## Recommended Ways to Customize

**Overriding flags and variables in the Definition Section**
**Overriding Thresholds and Variables from TextRules and SampleAnalysis**
**Overriding Component Product Definitions**
**Setting up Configurable Issuance information**

## Non-Recommended Ways to Customize

**Overriding methods and phrases from TextRules and SampleAnalysis**
**Writing your own phrase methods**
**Writing new products**

## TextRulesThresholds

**def ****pop_sky_lower_threshold****(self, statDict, argDict):**
**    ****# ****Sky condition will not be reported if PoP is above**
**    ****# this threshold**
**    ****return ****60**

## Smart Text ProductsComponent Phrase Analysis

**"analysisList": [**
**	****           ****(    "MinT",       self.avg),**
**                ****(    "MaxT",      self.avg),**
**                ****(    "T",             self.hourlyTemp),**
**                ****(    "Sky",         self.minmax****),**
**                ****(    "PoP",        self.avg),**
**                ****(    "Snow",      self.minmax),**
**                ****(    ****"Wind",       self.vectorTextMinMax****),**
**                ****(    "Wx",          self.dominantWx)**
**                ****],    **

## Smart Text ProductsComponent Phrase Analysis

**"analysisList": [**
**	****           ****(    "MinT",       self.avg),**
**                ****(    "MaxT",      self.avg),**
**                ****(    "T",             self.hourlyTemp),**
**                ****(    "Sky",         self.minmax****),**
**                ****(    "PoP",        self.avg),**
**                ****(    "Snow",      self.minmax),**
**                ****(    ****"Wind",       self.vectorTextAvg****),**
**                ****(    "Wx",          self.dominantWx)**
**                ****],**

## Smart Text ProductsSampleAnalysis Reference

**Method                 Return Value**
**-----------------------------------------------**
**vectorTextMinMax      ((minMag, maxMag) dir)**
**vectorTextAvg             (mag, dir)**

## Smart Text ProductsSampleAnalysis Reference

**Variable                   Explanation**
**-----------------------------------------------**
**temporalCoverage_dict  Percentage of time**
**	****	****	****	****	****	****	****	****	****	**** ****range covered by**
**	****	****	****	****	****	****	****	****	****	**** ****grid for inclusion **
** **
**stdDev_dict                     Number of standard ****	****	****	****	****	****	****	****	****	****	**** deviations for**
**stdDev****	****	****	****	****	****	****	****	**** methods**

## Smart Text ProductsComponent Phrase Text Rules

**"textRules": [ **
**                    ****self.reportTrends,**
**                    ****self.wind_summary,**
**                    ****self.sky_phrase,**
**                    ****self.windRange_phrase****, **
**                    ****self.weatherRange_phrase,**
**                    ****self.snow_phrase,**
**                    ****self.highs_phrase,**
**                    ****self.lows_phrase,**
**                    ****self.pop_phrase,                **
**                ****],**

## Smart Text ProductsComponent Phrase Text Rules

**"textRules": [ **
**                    ****self.reportTrends,**
**                    ****self.wind_summary,**
**                    ****self.sky_phrase,**
**                    ****self.windRange_withGusts_phrase****, **
**                    ****self.weatherRange_phrase,**
**                    ****self.snow_phrase,**
**                    ****self.highs_phrase,**
**                    ****self.lows_phrase,**
**                    ****self.pop_phrase,                **
**                ****],**

## Smart Text ProductsTextRules Reference

**Weather ****	****	****Phrase**
**Element     ****	****Method**
**-----------------------------------------------**
**Wind****	****	****	****	****windRange_phrase **
** **
**Wind****	****	****	****	****windRange_withGusts_phrase**

## Smart Text ProductsComponent Phrase Text Rules

**"textRules": [ **
**                    ****self.reportTrends,**
**                    ****self.wind_summary,**
**                    ****self.sky_phrase,**
**                    ****self.windRange_phrase, **
**                    ****self.weatherRange_phrase,**
**                    ****self.snow_phrase****,**
**                    ****self.highs_phrase,**
**                    ****self.lows_phrase,**
**                    ****self.pop_phrase,                **
**                ****],**

## Smart Text ProductsTextRules Reference

**Weather ****	****	****Phrase**
**Element     ****	****Method**
**-----------------------------------------------**
**SnowAmt****	****	****	****snow_phrase**

## Smart Text ProductsTextRules Reference

**Example phrase: “Snow accumulation 2 inches.”**
**Statistics:  “SnowAmt: minMax”**
**Thresholds and Variables:**
** ****phrase_descriptor_dict**
** ****pop_snow_lower_threshold**
** ****getSnowReportEndDay**
** ****increment_dict**

**Help and Feedback - Support**

** ****Multi-faceted approach**
** ****FSL Developers**
** ****Field Office Development Team**
** ****RPP Participants**
** ****IFPS FPs**
**List server: RPP**
**Regional Support**

##    Current Expectations

-    Current Expectations

** ****Old GFE Formatter Products will still work **
** ****Use NEW GFE text formatters for the 10 IOC products.  **
** ****Infrastructure will change and be re-organized.  After maturity,  local non-core products will need to be converted.**

## Tabular Infrastructure

**Simple Tabular Products - maturity 9 - 10**
**Smart Tabular Products - maturity 8 - 9**
**Smart Text Product Template**
**Examples**
**getStats**
**makeRow**

## Narrative Infrastructure

**Maturity 5 – 7**

## Upcoming Expectations

**New GFE Text Formatters**

## Motivation

## Known Requirements

**Analysis-driven -- ****All phrase methods need to report according to the statistics given.**
**Local effects**** need to be integrated into phrases.  Currently, must use a completely different method (local_effects_phrase) with no timing.**
**Handling multiple elements**** needs to be easier e.g. Wind with Gust, Swell and Period. **

## Known Requirements

**Better handling of “Null” values -- ****All e.g. light winds, no weather.**
**Non-linear rounding and thresholds.**
**Coordination between sub-phrases ****e.g. “Winds SE 10 mph then S 15 mph then E 20 mph.” -->  “Winds SE 10 mph shifting to E 20 mph.”**
**Coordination between phrases**** e.g. wind_summary, windRange_phrase.**

## Limitation - Solution

**Connector methods need to examine data and sometimes phrases from previous sub-ranges. Sometimes need to repeat the phrase method or pass it to the connector method, e.g. ****“building”, “subsiding”, “becoming”.**
**Solution: Access to all sub-phrase information as building connectors.**

## Limitation - Solution

**Temporal resolution is only 3-hours so cannot handle “until” phrasing e.g. ****Partly cloudy until 2 pm. **
**Solution: Integrate Time Descriptor methods and better design.**

## Limitation - Solution

**Rain and chance of drizzle early in the evening. Chance of rain and drizzle in the evening.  Chance of rain mixed with patchy fog and chance of drizzle after midnight.**
**Chance of rain and drizzle.  Patchy fog after midnight.**
**Solution: Better sub-phrase combining.**

## Limitation - Solution

** ****Wade’s problem:**** “Areas of fog then chance of rain and snow early in the afternoon” when grids have one hour of fog in the early morning, then NoWx until the evening.**
**Areas of fog in the early morning. Chance of rain and snow late in the afternoon.**
**Solution: Better temporal resolution facilitated by better time descriptors and improved sub-range combining.**

## Limitation -- Solution

-  **From Bill Estle: ****If there is a threat of precip, say “partly cloudy” instead of “partly sunny”.**
**From Todd: ****If the wind is below a certain threshold, don’t report the WindChill. **
**Report PoP as “Chance of rain and snow 20 percent.”  ****To do this, we currently re-create the weather phrase and do a string.find.**
**Solution: Inter-phrase coordination via access to other phrases as current phrase is being built.**

## Phrase Builder Concepts

**“****Holographic” rather than sequential processing **
**Each part potentially embodies the whole.**
**Each piece of the phrase is potentially dependent on the other pieces.**
**Each phrase is potentially dependent on the other phrases.**
**Each period is potentially dependent on the other periods.**

## Phrase Builder Concepts

**“****Holographic” rather than sequential solutions**
**More sophisticated combining of sub-phrases**
**More sophisticated connecting between sub-phrases**
**Inter-phrase coordination**
**Period combining -- basic “hook” capability**

## Phrase Builder Class

**Better access to multiple weather elements and sub-phrase information**
**More effective pre-processing and consolidating of information including Local Effects**
**Assemble sequential phrase**
**PostProcessPhrase**

## New Narrative Products

**To write a new phrase, specify:**
**phrase method with relevant thresholds and variables  (similar to current methods in TextRules)**
**Optional:**
**combining methods**
**connector methods**
**timing criteria**
**local effect criteria**

## RPP21

**Phrase Builder**
**Headlines**
**Headers**
**Performance improvements**
**Product-specific improvements**

**Inception 9/98**

-                  **RPP **
**     ****Development Cycle**

## Transition

**First install on RPP machine **
**Start with new Local file**
**Configure with local customizations**
**Use operationally**

## Next Steps 

**User Guides**
**Help with converting “old-style” formatters to new infrastructure**
**Support in writing new products**

## Next Steps 

**QUALITY GRIDS**
**Smart Tool/ Smart Init Focus groups**

**Specific Formatter Issues**

** ****Marine**
** ****Fire Weather**
** ****Zone**

**Specific Formatter Issues- Marine**

** **

**Specific Formatter Issues- Fire Wx**

** **

**Specific Formatter Issues- Zone**

** **