Skip to content

Commit 096518f

Browse files
committed
ignore 10% forestcluster for aggregating
1 parent 97caf52 commit 096518f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

TopoPyScale/sim_fsm2oshd.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,11 @@ def _combine_open_forest(fname_df_forest='fsm_sim/df_forest.pckle',
189189
dsf = xr.open_dataset(fname_forest)
190190
dso = xr.open_dataset(fname_open)
191191
point_ind = dsf.point_ind.values
192-
ds = dsf * df_forest.proportion_with_forest.iloc[point_ind] + dso * (1-df_forest.proportion_with_forest.iloc[point_ind])
192+
193+
coeff = df_forest.proportion_with_forest.iloc[point_ind]
194+
if coeff <= 0.1:
195+
coeff = 0
196+
ds = dsf * coeff + dso * (1-coeff)
193197

194198
fname_out = f'{fout}_{str(point_ind).zfill(n_digits)}.nc'
195199
te.to_netcdf(ds, fname_out)

0 commit comments

Comments
 (0)