else: ofp.write(line+'\n') ofp.close() # run STOP_compare again, to get results post fix_w_DEM Diffs=STOP_compare.stopcomp(L1top,outfile,STOP_comp_fixwDEM) STOP_compare.plot_diffstats(Diffs['DIF'],'Land-surface - SFR comparison after fix_w_DEM.py') # profile plots showing where SFR elev goes below model bottom #sinkers=Plot_segment_profiles.get_sinkers('below_bot.csv','segment') #Plot_segment_profiles.plot_profiles(sinkers,seg_distdict,[TOPNEWdict,STOP2dict],['model top','streambed top post-fix_w_DEM'],'Below_bottom.pdf',Bottoms=Bottomsdict) # profiles of 50 worst floaters df=pd.DataFrame(Diffs['DIF'],index=Diffs['MSEG']) Floats=df.sort(columns=0,ascending=True) floats=list(np.unique(list(Floats[0][0:50].index))) Plot_segment_profiles.plot_profiles(floats,seg_distdict,[TOPNEWdict,STOP2dict],['model top','streambed top post-fix_w_DEM'],'50_worst_floating.pdf') # profiles of 50 worst incised Incised=df.sort(columns=0,ascending=False) incised=list(np.unique(list(Incised[0][0:50].index))) Plot_segment_profiles.plot_profiles(incised,seg_distdict,[TOPNEWdict,STOP2dict],['model top','streambed top post-fix_w_DEM'],'50_worst_incised.pdf') # list of selected segments to plot segs2plot=segments[::int(np.floor(len(segments)/num_segs2plot))] segs2plot=sorted(segs2plot) Plot_segment_profiles.plot_profiles(segs2plot,seg_distdict,[TOPNEWdict,STOP2dict,STOP1dict],['model top','streambed top post-fix_w_DEM','streambed top post-SFR_utilities'],'selected_segments.pdf',plot_slopes=plot_slope,slopes=slopesdict,reach_lengths=reach_lengthsdict) print "finished OK"