4444 BETA_fR ,
4545 BETA_fRdV ,
4646 BETA_01 ,
47- BETA_V21 ,
47+ BETA_V11 ,
4848)
4949from 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