diff --git a/TopoPyScale/sim_fsm2oshd.py b/TopoPyScale/sim_fsm2oshd.py index 906f4fb..78e3730 100644 --- a/TopoPyScale/sim_fsm2oshd.py +++ b/TopoPyScale/sim_fsm2oshd.py @@ -189,7 +189,11 @@ def _combine_open_forest(fname_df_forest='fsm_sim/df_forest.pckle', dsf = xr.open_dataset(fname_forest) dso = xr.open_dataset(fname_open) point_ind = dsf.point_ind.values - ds = dsf * df_forest.proportion_with_forest.iloc[point_ind] + dso * (1-df_forest.proportion_with_forest.iloc[point_ind]) + + coeff = df_forest.proportion_with_forest.iloc[point_ind] + if coeff <= 0.1: + coeff = 0 + ds = dsf * coeff + dso * (1-coeff) fname_out = f'{fout}_{str(point_ind).zfill(n_digits)}.nc' te.to_netcdf(ds, fname_out)