Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- mdoys=( 31 59 90 120 151 181 212 243 273 304 334 365 )
- months=( 'January' 'February' 'March' 'April' 'May' 'June' 'July' 'August' 'September' 'October' 'November' 'December' )
- this_month=0
- files=""
- for ((doy=1;doy<365;doy++)) do
- r.sun -s elev=elevation.dem slop=slope asp=aspect
- beam_read=beam_${doy} diff_rad=diff_${doy} day=${doy}
- if [[ ${doy} -lt ${mdoys[${this_month}]} ]] ; then
- files=${files},beam_${doy}
- fi
- if [[ ${doy} -eq ${mdoys[${this_month}]} ]] ; then
- files=${files},beam_${doy}
- echo ${files} > rasters_${months[$this_month]}
- this_month=$((this_month+1))
- # Use r.series to process the files in rasters_January, for example
- fi
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement