Advertisement
Guest User

Untitled

a guest
Sep 24th, 2017
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. #!/bin/bash
  2. mdoys=( 31 59 90 120 151 181 212 243 273 304 334 365 )
  3. months=( 'January' 'February' 'March' 'April' 'May' 'June' 'July' 'August' 'September' 'October' 'November' 'December' )
  4. this_month=0
  5. files=""
  6. for ((doy=1;doy<365;doy++)) do
  7.  
  8. r.sun -s elev=elevation.dem slop=slope asp=aspect
  9. beam_read=beam_${doy} diff_rad=diff_${doy} day=${doy}
  10.  
  11. if [[ ${doy} -lt ${mdoys[${this_month}]} ]] ; then
  12. files=${files},beam_${doy}
  13. fi
  14. if [[ ${doy} -eq ${mdoys[${this_month}]} ]] ; then
  15. files=${files},beam_${doy}
  16. echo ${files} > rasters_${months[$this_month]}
  17. this_month=$((this_month+1))
  18. # Use r.series to process the files in rasters_January, for example
  19. fi
  20. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement