Skip to content

Commit 42a5c06

Browse files
committed
changes to chavas pc_fill to ensure validility of Vmax (min of 20 m/s) and using regression with Vmax (instead of Vmax**2) when R34 is unknown
1 parent 04bc119 commit 42a5c06

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

stormevents/nhc/const.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ class PcFillMethod(Enum):
2525
BETA_V20 = -0.0127
2626
BETA_fR = -5.506
2727
BETA_fRdV = 109.013
28-
BETA_01 = -13.37
28+
BETA_01 = 20.23
29+
BETA_V11 = -1.54
2930
BETA_V21 = -0.0157
3031

3132
# Bias correction values for the Rmax forecast

stormevents/nhc/track.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
BETA_fR,
4545
BETA_fRdV,
4646
BETA_01,
47-
BETA_V21,
47+
BETA_V11,
4848
)
4949
from stormevents.utilities import subset_time_interval
5050

@@ -640,6 +640,8 @@ def atcf(self, advisory: ATCF_Advisory = None) -> DataFrame:
640640
atcf.loc[:, ["longitude", "latitude"]] * 10
641641
)
642642

643+
# forward fill here first before integer replacement
644+
atcf["background_pressure"] = atcf["background_pressure"].ffill()
643645
float_columns = atcf.select_dtypes(include=["float"]).columns
644646
integer_na_value = -99999
645647
for column in float_columns:
@@ -692,7 +694,7 @@ def atcf(self, advisory: ATCF_Advisory = None) -> DataFrame:
692694
atcf["isotach_radius_for_NWQ"].astype("string").str.pad(5)
693695
)
694696

695-
atcf["background_pressure"] = atcf["background_pressure"].ffill().astype(int)
697+
atcf["background_pressure"] = atcf["background_pressure"].astype(int)
696698
atcf["central_pressure"] = atcf["central_pressure"].astype(int)
697699

698700
press_cond_nobg = ~atcf["central_pressure"].isna() & (
@@ -1273,6 +1275,7 @@ def chavas_2025_Pc(data: DataFrame):
12731275
Vmax = 0.5144 * (
12741276
data.max_sustained_wind_speed - 0.55 * data.speed
12751277
) # azimuthal mean Vmax [m/s]
1278+
Vmax[Vmax < 20] = 20 # ensure Vmax doesn't go below 20 m/s
12761279
isotach_radii = data[
12771280
[
12781281
"isotach_radius_for_NEQ",
@@ -1295,7 +1298,7 @@ def chavas_2025_Pc(data: DataFrame):
12951298
+ BETA_fRdV * fo2 * R34 / Vmax
12961299
) # [hPa]
12971300
# equation where R34 isn't available
1298-
deltaP[deltaP.isna()] = BETA_01 + BETA_V21 * Vmax * Vmax # [hPa]
1301+
deltaP[deltaP.isna()] = BETA_01 + BETA_V11 * Vmax # [hPa]
12991302
return data.background_pressure + 2 + deltaP # Pc
13001303

13011304

@@ -1342,6 +1345,7 @@ def courtney_knaff_2009_Pc(data: DataFrame):
13421345
# equation for lat < 18 deg
13431346
deltaP_lo = 5.962 - 0.267 * Vsrm - (Vsrm / 18.26) ** 2 - 6.8 * S # [hPa]
13441347
deltaP[lat < 18] = deltaP_lo[lat < 18]
1348+
deltaP[deltaP > -5] = -5 # limit to being at least 5 hPa
13451349
return data.background_pressure + 2 + deltaP # Pc
13461350

13471351

0 commit comments

Comments
 (0)