if needed calc julian day and save erosion data (call saeinp) init wind direction and ratio of friction vel to threshold friction vel by timestep (hour) for all regions for all subregions if snow depth < 20 mm calc ridge spacing parallel to wind calc aerodynamic roughness with no standing biomass & with standing biomass, biomass drag coef (sbzo) calc soil clod frac < 0.84 mm (sbsfdi) for each wind speed (hour) calc (comparison) anemometer location surface friction velocity (sbwus) calc (comparison) site random roughness surface friction velocity (sbwus) calc (comparison) site ridge (pattern) roughness surface friction velocity (sbwus) calc (comparison) site biodrag surface friction velocity (sbwus) calc Compute soil surface friction velocity (wus) (sbwus) calc friction vel threshold for entrainment (wust) & transport friction vel threshold (wusp) (sbwust) if wind vel ratio is higher than previous ratio note this is highest for day and record max daily values else set to no erosion if max wind doesn't cause erosion exit initialize grid with values from other submodels, zero output arrays (sbinit) calc wind angle over field (sbdirini) for each wind speed if erodable wind set time step as either a command line option value or as a function of max erosive energy for each time step calc effective wind speed (sbwind) for each grid cell calc aerodynamic roughness with no standing & with standing biomass, biomass drag coef (sbzo) calc soil surface friction velocity (wus) (sbwus) calc fric vel threshold for entrainment (wust) & transport fric vel threshold (wusp) (sbwust) if wind is erosive calc erosion in cell (sberod) calc salt, suspension, PM-10 discharge, update surface (sbqout) accumulate loss in cell log data if requested (sb1out) update time log data if requested (sb2out) else calc effective wind speed (sbwind) (not sure why this is needed) log data if requested (sb1out) log data if requested (sbemit)