243 lines
12 KiB
Python
243 lines
12 KiB
Python
# ----------------------------------------------------------------------------
|
|
# This software is in the public domain, furnished "as is", without technical
|
|
# support, and with no warranty, express or implied, as to its usefulness for
|
|
# any purpose.
|
|
#
|
|
# Aviation_EDASConfig - Version 20180608
|
|
#
|
|
# Last Modified: 08 June 2018
|
|
#
|
|
# Base version of the configuration file. This file will be copied to regional
|
|
# versions where each regional version may be modified.
|
|
#
|
|
# Author: lefebvre
|
|
# ----------------------------------------------------------------------------
|
|
|
|
import SmartScript
|
|
|
|
config = {}
|
|
|
|
## --- Populate tool configuration items
|
|
|
|
config["Populate"] = {}
|
|
|
|
# The list of generic sources to populate the forecast. These appear in the upper left
|
|
config["Populate"]["genSources"] = ["NBM", "CONSShort", "GLAMP25", "ADJLAV",
|
|
"HRRR", "RAP13", "ADJMET", "NAMNest", "NAM12", "ADJMAV", "GFS1hr",
|
|
"NationalBlend"]
|
|
# The generic source that will be defaulted to on
|
|
config["Populate"]["defaultGenSource"] = "CONSShort"
|
|
|
|
# Default state of the Current / Previous version state button
|
|
config["Populate"]["prevCurDefault"] = "Current"
|
|
|
|
# The list of generic elements that will appear for the generic sources. Note these will dim automatically
|
|
# if the element is not generated by the selected model.
|
|
config["Populate"]["genElementList"] = ["CloudBasePrimary", "Visibility", "LLWS", "LLWSHgt",
|
|
"Sky", "Wind", "WindGust", "PoP"]
|
|
|
|
# The set of generic elements that default to "on" when the GUI first appears
|
|
config["Populate"]["genElementDefaultList"] = ["Ceiling", "CloudBasePrimary", "Visibility", "LLWS", "LLWSHgt"]
|
|
|
|
# The set of convective sources to populate cloud base elements
|
|
config["Populate"]["conSources"] = ["CONSShort","RAP13", "NAM12", "GFS1hr", "GFS"]
|
|
# The convective source selected when the GUI first opens.
|
|
config["Populate"]["defaultConSource"] = "CONSShort"
|
|
|
|
# The list of convective elements that will appear. All of these should be cloud base elements
|
|
config["Populate"]["conElementList"] = ["CloudBasePrimary", "CloudBaseSecondary", "CloudBaseConditional"]
|
|
# The element selected when the GUI first appears.
|
|
config["Populate"]["conElementDefault"] = "CloudBasePrimary"
|
|
|
|
# The set of algoirithms that calculate cloud base
|
|
config["Populate"]["algChoices"] = ["CloudBaseCCL", "CloudBaseLCL", "CloudBaseRH"]
|
|
# The default convective algorithm
|
|
config["Populate"]["defaultAlg"] = "CloudBaseCCL"
|
|
|
|
|
|
## --- Timer tool configuration items
|
|
config["Timer"] = {}
|
|
|
|
# Allow the tool to edit this many hours
|
|
config["Timer"]["timeDuration"] = 36
|
|
|
|
# Minimum, Maximum, and tick intervals for each element on the display
|
|
config["Timer"]["valueDict"] = {"Visibility" : (0.0, 10.0, 2.0),
|
|
"Sky" : (0.0, 100.0, 20.0),
|
|
"SkyPrimary" : (0.0, 100.0, 20.0),
|
|
"SkySecondary" : (0.0, 100.0, 20.0),
|
|
"CloudBasePrimary" : (0.0, 250.0, 50.0),
|
|
"CloudBaseSecondary" : (0.0, 250.0, 50.0),
|
|
}
|
|
|
|
# Colors for each element
|
|
config["Timer"]["colors"] = {"Visibility" : "purple",
|
|
"Sky" : "blue",
|
|
"SkyPrimary" : "blue",
|
|
"SkySecondary" : "blue",
|
|
"CloudBasePrimary" : "red",
|
|
"CloudBaseSecondary" : "green",
|
|
}
|
|
|
|
# Configure which mouse button does the editing.
|
|
# Use "1" for standard right-handed mouse and "3" for a left-handed configuration
|
|
config["Timer"]["editButton"] = "1"
|
|
|
|
# Set editAreaList to the set of edit areas over which the tool may be run.
|
|
# This list must be modified at the local office for the tool to work.
|
|
#config["Timer"]["editAreaList"] = ["AddYour", "EditArea", "ListHere"]
|
|
config["Timer"]["editAreaList"] = []
|
|
|
|
# Set defaultEditAreas to the edit areas (above) that you wish to be selected when the tool starts.
|
|
# This list can contain only the edit areas defined in editAreaList.
|
|
config["Timer"]["defaultEditAreas"] = []
|
|
|
|
config["Timer"]["reportableValues"] = {} # start, end, increment
|
|
config["Timer"]["reportableValues"]["Visibility"] = [(0.0, 0.375, 0.0625),
|
|
(0.375, 1.875, 0.125),
|
|
(1.875, 3.0, 0.25),
|
|
(3.0, 10.0, 1.0)
|
|
]
|
|
config["Timer"]["reportableValues"]["Sky"] = [(0.0, 100.0, 5.0)]
|
|
config["Timer"]["reportableValues"]["SkyPrimary"] = [(0.0, 100.0, 5.0)]
|
|
config["Timer"]["reportableValues"]["SkySecondary"] = [(0.0, 100.0, 5.0)]
|
|
config["Timer"]["reportableValues"]["CloudBasePrimary"] = [(0.0, 50.0, 1.0),
|
|
(50.0, 100.0, 5.0),
|
|
(100.0, 300.0, 10.0),
|
|
]
|
|
config["Timer"]["reportableValues"]["CloudBaseSecondary"] = [(0.0, 50.0, 1.0),
|
|
(50.0, 100.0, 5.0),
|
|
(100.0, 300.0, 10.0),
|
|
]
|
|
|
|
# Zoom Factors for each of the weather elements
|
|
config["Timer"]["zoomFactor"] = {}
|
|
config["Timer"]["zoomFactor"]["Visibility"] = 2.0
|
|
config["Timer"]["zoomFactor"]["Sky"] = 5.0
|
|
config["Timer"]["zoomFactor"]["SkyPrimary"] = 5.0
|
|
config["Timer"]["zoomFactor"]["SkySecondary"] = 5.0
|
|
config["Timer"]["zoomFactor"]["CloudBasePrimary"] = 3.0
|
|
config["Timer"]["zoomFactor"]["CloudBaseSecondary"] = 3.0
|
|
|
|
## --- Finalize tool configuration items
|
|
|
|
config["Finalize"] = {}
|
|
|
|
# Start and stop time of the "TAF Period"
|
|
config["Finalize"]["TAFStartHour"] = 0
|
|
config["Finalize"]["TAFEndHour"] = 36
|
|
|
|
# Set to "Yes" if you always want the TimeRange to default to the entire TAF period
|
|
config["Finalize"]["AlwaysUseFullTAFPeriod"] = "Yes"
|
|
|
|
# GapAction choices: "Stop" or "Interpolate"
|
|
config["Finalize"]["GapAction"] = "Interpolate"
|
|
|
|
# The complete list of checks that will appear in the menu. Removing a rule from here
|
|
# will remove it from the GUI entirely.
|
|
config["Finalize"]["AllChecks"] = ["PoP Adjusts Cloud Base", "QC Vis with PoP & Wx",
|
|
"PoP Defines Sky", "Vis Adds New Wx", "Wx Adjusts Vis",
|
|
"Update Wx Intensity Using Vis",
|
|
"Adjust WindGust Using Wind",
|
|
"Add Vis to Wx String"]
|
|
|
|
# The subset of checks above that will be defaulted to on when the tool is started.
|
|
# This list should contain items found only in the list above "AllChecks"
|
|
config["Finalize"]["DefaultOnChecks"] = ["PoP Adjusts Cloud Base",
|
|
"QC Vis with PoP & Wx",
|
|
"Adjust WindGust Using Wind",]
|
|
|
|
# This is an easy way to leave all the checks on by default.
|
|
#config["Finalize"]["DefaultOnChecks"] = config["Finalize"]["AllChecks"]
|
|
|
|
# The set of rules where no user selection is offered. Adding rules to this list makes them
|
|
# unchangeable by any user in the GUI whether the they default to on or off. (See above)
|
|
# This list should contain items found only in the list above, "AllChecks"
|
|
#config["Finalize"]["ImmutableChecks"] = ["PoP Adjusts Cloud Base",
|
|
# "Adjust WindGust Using Wind",
|
|
# "Add Vis to Wx String"]
|
|
config["Finalize"]["ImmutableChecks"] = []
|
|
|
|
# Define the text to be displayed for tool tips. No changes to these should be needed
|
|
|
|
config["Finalize"]["toolTips"] = {}
|
|
|
|
config["Finalize"]["toolTips"]["PoP Adjusts Cloud Base"] = "Where 15% <= PoP < 25% and CBP > 11000 ft.: \n ...CloudBasePrimary = 11000 ft. \n" + \
|
|
"Where 25% <= PoP < 55% and CBP > 10000 ft.: \n ...CloudBasePrimary = 10000 ft. \n" + "Where PoP >= 55% and CBP > 9000 ft.:\n ...CBP = 9000 ft."
|
|
config["Finalize"]['toolTips']["QC Vis with PoP & Wx"] = "Where PoP < 55% and No Wx:\nVisibility = 7"
|
|
config["Finalize"]['toolTips']["PoP Defines Sky"] = "Where PoP > Sky:\nSky = PoP"
|
|
config["Finalize"]['toolTips']["Vis Adds New Wx"] = "Where Visibility < Coverage Value: Add-> \n-- Fog where T - Td < Threshold and No Wx\n" + \
|
|
"-- Haze where No Wx and No Fog\n-- Smoke where No Wx"
|
|
|
|
config["Finalize"]['toolTips']["Wx Adjusts Vis"] = "Where No Wx and Vis < 7 miles: Vis = 7 miles\n" + \
|
|
"Where Fog and Vis > 6 miles: Vis = 6 miles\n" + \
|
|
"Where Precip. and Vis > 6 miles: Vis = 6 miles\n" + \
|
|
"Where Heavy Fog (F+) and Vis > 0.25 miles: Vis = 0.25 miles\n" + \
|
|
"Where Moderate Snow (Sm) and Vis > 0.5 miles: Vis = 0.5 miles\n" + \
|
|
"Where Heavy Snow (S+) and Vis > 0.25 miles: Vis = 0.25 miles\n" + \
|
|
"Where Smoke and Vis > 6 miles: Vis = 6 miles"
|
|
|
|
config["Finalize"]['toolTips']["Update Wx Intensity Using Vis"] = "For S, SW, L, ZL, F, ZF Wx Intensity...\n" + \
|
|
"is Heavy (+) where Vis <= 0.25 miles\n" + \
|
|
"is Moderate (m) where Vis <= 0.5 miles\n" + \
|
|
"is Light (-) where Vis > 0.5 miles"
|
|
config["Finalize"]['toolTips']["Adjust WindGust Using Wind"] = "Where WindSpeed >= WindGust:\n" + \
|
|
"WindGust = WindSpeed"
|
|
config["Finalize"]['toolTips']["Add Vis to Wx String"] = "Add the Visibility Value to the Wx Key"
|
|
|
|
|
|
|
|
# If yes, the Save and Publish option will display.
|
|
config["Finalize"]["OfferSavePublish"] = "Yes" # Choices are "Yes" and "No"
|
|
# This is the default value if "OfferSavePublish is "Yes"
|
|
config["Finalize"]["SavePublishDefault"] = "Yes" # Choices are "Yes" and "No"
|
|
|
|
|
|
# For folks who use the mouse left handed, change this to "3"
|
|
config["Finalize"]["editButton"] = "1"
|
|
|
|
# Default value for the T-Td slider.
|
|
config["Finalize"]["T-TdDefault"] = 3.0
|
|
|
|
|
|
# The threshold below which all points with PoP < 55% and Visibility
|
|
# values below this threshold will be set to this threshold.
|
|
config["Finalize"]["visPopThreshold"] = 7.0
|
|
|
|
# Default value for the slider below which a Visibility string
|
|
# will be added to the Wx grid.
|
|
config["Finalize"]["AddVisToWxValue"] = 0.5
|
|
|
|
# Default for the buttons that modify weather intensity
|
|
config["Finalize"]["IntensityDefault"] = "Precip"
|
|
# Types of precip. where the intensity can be modified.
|
|
config["Finalize"]["IntensPrecipList"] = ["L", "S", "SW",]
|
|
# List of Non-precip types where the intensity can be modified.
|
|
config["Finalize"]["IntensNonPrecipList"] = ["F"]
|
|
|
|
# Default values for various coverages of weather
|
|
config["Finalize"]["Fog_Patchy"] = 5.0
|
|
config["Finalize"]["Fog_Areas"] = 1.0
|
|
config["Finalize"]["Fog_Wide"] = 0.25
|
|
|
|
config["Finalize"]["Haze_Def"] = 5.0
|
|
|
|
config["Finalize"]["Smoke_Patchy"] = 5.0
|
|
config["Finalize"]["Smoke_Areas"] = 1.0
|
|
config["Finalize"]["Smoke_Def"] = 0.25
|
|
|
|
# Choices are "Yes" or "No"
|
|
config["Finalize"]["MakePotFog"] = "Yes"
|
|
|
|
|
|
|
|
##
|
|
## ------------ Place nothing below this line -----------------------------------##
|
|
##
|
|
class Aviation_EDASConfig(SmartScript.SmartScript):
|
|
def __init__(self, dbss, eaMgr, mdMode=None, toolType="numeric"):
|
|
SmartScript.SmartScript.__init__(self, dbss)
|
|
self.setUp(eaMgr, mdMode, toolType)
|
|
|
|
|
|
|