Skip to content

Commit 8668a5b

Browse files
author
arcticsnow
committed
debug export_to_fsmoshd
1 parent da321d1 commit 8668a5b

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

TopoPyScale/topo_export.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -908,8 +908,8 @@ def write_fsm2oshd_met(ds_pt,
908908

909909
# sampling forest parameters from ds_param
910910
df_forest[['isfor', 'forcov', 'svf_for', 'CC5', 'CC50', 'CH5', 'LAI5']] = mp.toposub.ds_param.sel(x=xs, y=ys, method='nearest').to_dataframe()[['isfor', 'forcov', 'svf_for', 'CC5', 'CC50', 'CH5', 'LAI5']]
911-
pixel_area = np.abs(mp.toposub.ds_param.x.diff(dim='x').mean().values * mp.toposub.ds_param.y.diff(dim='y').mean().values)
912-
df_forest['cluster_domain_size'] = pixel_area
911+
pixel_size = np.abs(mp.toposub.ds_param.x.diff(dim='x').mean().values)
912+
df_forest['cluster_domain_size'] = pixel_size
913913

914914
else:
915915
raise ValueError("Sampling method not yet supported. Avail: clusters, points")
@@ -918,7 +918,6 @@ def write_fsm2oshd_met(ds_pt,
918918
# rename variable columns to match namelist functino varnames
919919
new_name = {'LAI5':'lai5', 'svf_for':'vfhp', 'CC5':'fveg', 'CC50':'fves', 'CH5':'hcan'}
920920
df_forest = df_forest.rename(columns=new_name)
921-
print(df_forest)
922921

923922
# ----- Loop through all points-------
924923
# NOTE: eventually this for loop could be parallelized to several cores -----

0 commit comments

Comments
 (0)