Skip to content

Commit

Permalink
ignore 10% forestcluster for aggregating
Browse files Browse the repository at this point in the history
  • Loading branch information
ArcticSnow committed Feb 7, 2024
1 parent 97caf52 commit 096518f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion TopoPyScale/sim_fsm2oshd.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 096518f

Please sign in to comment.