Regarding the PoTFrost calculation that Andy mentioned, here's the
flowchart for equation that's being used by the tool. (Attached)
Or, if you know how to read Python, here's what FB uses - note the
code below (from the latest trunk) may differ from what you have installed.
def
createPotFrost(self, timeRange, varDict):
self.deleteCmd(["PotFrost"], timeRange)
Tinfo = self.getGridInfo("Fcst", "T",
"SFC", timeRange)
for info in Tinfo:
tr = info.gridTime()
T =
self.getGrids("Fcst", "T", "SFC",
tr)
Td = self.getGrids("Fcst",
"Td", "SFC", tr)
Sky =
self.getGrids("Fcst", "Sky", "SFC",
tr)
Wind = self.getGrids("Fcst",
"Wind", "SFC", tr)
DewpDp = T - Td
mag = Wind[0] *
1.15
##### calculate Dewpoint
Score #####
dewscore = self.empty()
dewscore[DewpDp <= 5] = 6
dewscore[(DewpDp > 5) & (DewpDp <= 9)] =
3
#no dewscore change for dewpoint depression
over 9
#no dewscore change
for wind speed greater than 7
mask =
(mag > 3) & (mag <= 7)
dewscore[mask]
= (dewscore + 2)[mask]
mask = (mag <=
3)
dewscore[mask] = (dewscore + 4)[mask]
mask = Sky <= 31
dewscore[mask] = (dewscore + 2)[mask]
mask = (Sky <= 69) & (Sky > 31)
dewscore[mask] = (dewscore + 1)[mask]
#no dewscore change for Sky greater than 69
#cases where no dew would be
observed - thus not allowing frost
dewscore[DewpDp > 9] = 0
dewscore[mag > 7]
= 0
dewscore[Sky > 69] = 0
######################################
#### calculate Frost potential ####
frostscore = self.empty()
frostscore[T <= 34] = 3
frostscore[(T >
34) & (T <= 37)] = 2
# no change for
frost score when temperature > 37
mask = (Td <= 32) & (T < 38)
frostscore[mask] = (frostscore + 3)[mask]
mask =
(Td <= 34) & (Td > 32) & (T < 38)
frostscore[mask] = (frostscore + 2)[mask]
# no change for frost score when Td > 34 and T < 38
######################################
#calculate the frost coverage based off the two scores
above
PotFrost = self.empty()
mask = (frostscore == 6) & (dewscore >
6)
PotFrost[mask] = 100
mask = (frostscore > 3) & (frostscore < 6)
& (dewscore > 6)
PotFrost[mask] =
45
mask = (frostscore > 1)
& (frostscore <= 3) & (dewscore > 6)
PotFrost[mask] = 20
#Prevents frost over marine areas
if
self._Office in self._MarineOffices:
all_water_area = self.encodeEditArea("All_marine")
PotFrost[all_water_area] = 0
if any(PotFrost):
self.createGrid("Fcst", "PotFrost",
"SCALAR", PotFrost, tr)