Skip omitted profiles properly

master
Dan Howe 3 years ago
parent 7cdd241869
commit ce345ea89d

@ -452,14 +452,19 @@ def process(beach_name, beach_scenario, n_runs, start_year, end_year,
col_names = [c for c in df_in.columns if c.isdigit()] col_names = [c for c in df_in.columns if c.isdigit()]
# Loop through profiles # Make sure blocks are always strings
dff = df_in[df_in['beach'] == beach_name] df_omit = pd.DataFrame(omit)
df_omit['block'] = df_omit['block'].astype(str)
df_in['block'] = df_in['block'].astype(str)
# Remove omitted profiles # Remove omitted profiles
dff = pd.merge( df_in = pd.merge(
pd.DataFrame(omit), dff, how='outer', df_omit, df_in, how='outer',
indicator='source').query('source!="both"').drop(columns='source') indicator='source').query('source!="both"').drop(columns='source')
# Loop through profiles
dff = df_in[df_in['beach'] == beach_name]
pbar_profile = tqdm(dff.iterrows(), total=dff.shape[0], leave=False) pbar_profile = tqdm(dff.iterrows(), total=dff.shape[0], leave=False)
for i, prof in pbar_profile: for i, prof in pbar_profile:

Loading…
Cancel
Save