[GRASS-dev] Changes to r.sun made Feb 2006 [resolved]

Dylan Beaudette dylan.beaudette at gmail.com
Fri Dec 1 13:39:39 EST 2006


Hi Markus,

I can think of a couple of things to be added to the manual page: much of 
which I would be happy to write.

1. clarification on units : i.e. in light of current discussion (no pun 
intended ! ) it would be good to give a brief overview of radiant energy: 
comparing what r.sun models to the output of a common sensor.

2. a quick example on using monthly , or as hamish suggested daily 
interpolated, linke turbidity values - i.e. bash style, or something like:

 # next revision: based on visual inspection 
linke_monthly[1]=5.9
linke_monthly[2]=5.8
linke_monthly[3]=5.6
linke_monthly[4]=5.6
linke_monthly[5]=5.3
linke_monthly[6]=5.0
linke_monthly[7]=4.8
linke_monthly[8]=5.0
linke_monthly[9]=5.0
linke_monthly[10]=5.2
linke_monthly[11]=5.4
linke_monthly[12]=5.6

-------- example script for modeling an entire year -----------------------
#load an array with monthly linke turbidity factors for a mountainous area:
for i in `seq 1 31`; do linke[$i]=${linke_monthly[1]}; done
for i in `seq 32 59`; do linke[$i]=${linke_monthly[2]}; done
for i in `seq 60 90`; do linke[$i]=${linke_monthly[3]}; done
for i in `seq 91 120`; do linke[$i]=${linke_monthly[4]}; done
for i in `seq 121 151`; do linke[$i]=${linke_monthly[5]}; done
for i in `seq 152 181`; do linke[$i]=${linke_monthly[6]}; done
for i in `seq 182 212`; do linke[$i]=${linke_monthly[7]}; done
for i in `seq 213 243`; do linke[$i]=${linke_monthly[8]}; done
for i in `seq 244 273`; do linke[$i]=${linke_monthly[9]}; done
for i in `seq 274 304`; do linke[$i]=${linke_monthly[10]}; done
for i in `seq 305 334`; do linke[$i]=${linke_monthly[11]}; done
for i in `seq 335 365`; do linke[$i]=${linke_monthly[12]}; done

export linke

#loop through each day in the year
time \
for x in `seq 1 365`
do 
echo "Running r.sun for day $x: Linke turbidity factor= ${linke[$x]}"
r.sun --o -s elevin=$elev aspin=$aspect slopein=$slope \
diff_rad=diffuse_0$x beam_rad=beam_0$x insol_time=time_0$x refl_rad=refl_0$x \
day=$x \
lin=${linke[$x]}  
done  
-------- example script for modeling an entire year -----------------------

3. a bit of background / or ideas (i have the references handy) on calculating 
estimated linke turbidity values from local weather station data. I have yet 
to do this with my project, as i am having a tough time with the equations. 
should have this worked out soon.

I need to write-up most of these things for my MS thesis anyways, so i would 
be happy to contribute to the manual. Obviously review by Jaro and the solar 
gang would be a good idea.

Cheers,

Dylan


On Friday 01 December 2006 00:26, Markus Neteler wrote:
> hi Dylan,
>
> since I soon have to work with r.sun, too, I would highly appreciate
> if you could add your findings to the manual page.
> You/others pointed out some things which should/could be clarified
> there, please do so while memory is still fresh.
> Probably also a small text chunk about the units doesn't harm.
>
> thanks in advance
> Markus
>
> Dylan Beaudette wrote on 12/01/2006 06:10 AM:
> > Sorry for the noise, it looks like this was an operator error on my part.
> >
> > Cheers,
> >
> > Dylan
> >
> > PS: with even better results from r.sun:
> >
> > http://169.237.35.250/~dylan/temp/11-yr_variation_vs_modeled.png
> >
> > when using longer term averages, the R^2 goes to 0.95 ! (right hand
> > sub-figure), but still working on optimal Linke turbidity values.
> >
> > On 11/28/06, Dylan Beaudette <dylan.beaudette at gmail.com> wrote:
> >> Hi everyone,
> >>
> >> I am repeating an experiment, originally conducted Feb 7th 2006,
> >> comparing the
> >> output from r.sun with real data from a weather station.
> >>
> >> On Feb 7th, 2006 the output from r.sun (computed with customized linke
> >> turbidity values) very closely matched the weather station data.
> >>
> >> As of today the exact same experiment gives slightly different results:
> >> 1. the correlation between r.sun and the weather station is nearly
> >> identical
> >> 2. the output from r.sun (specifically the beam component) is about 1500
> >> Wh/sq. meter/day higher than it should be.
> >>
> >> The only thing that has changed since I last conducted this
> >> experiment was
> >> r.sun. From the CVS server it looks like r.sun/main.c was altered
> >> shortly
> >> after I did my original experiment:
> >>
> >> ------------------------------------------------------------------------
> >>-----------------------
> >>
> >> Revision 2.14 / (as text) / (view) - annotate - [select for diffs] ,
> >> Tue Feb
> >> 21 10:00:52 2006 UTC (9 months ago) by markus
> >> Branch: MAIN
> >> Changes since 2.13: +28 -174 lines
> >> Diff to previous 2.13
> >>
> >> Jaro Hofierka: new shadow algorithm; dist param changed to fixed value;
> >> correction factor for shadowing to account for the earth curvature
> >> ------------------------------------------------------------------------
> >>-----------------------
> >>
> >> http://freegis.org/cgi-bin/viewcvs.cgi/grass6/raster/r.sun/main.c
> >>
> >>
> >> In summary, the diffuse component of the modeled solar radiation is
> >> nearly the
> >> same as it was when computed by r.sun Feb 7 2006. The beam component
> >> is now
> >> about 1500 Wh/sq m / day higher than it was as on Feb 7 2006.
> >>
> >> This brings up an interesting question: which results from r.sun
> >> where the
> >> most representative of reality ? I noticed that the changes made to
> >> r.sun
> >> involved a shadow algorithm- yet my weather station (and modeled
> >> area) are
> >> not greatly affected by the shadowing of adjacent terrain.
> >>
> >> Any thoughts on how to best proceed would be greatly appreciated.
> >>
> >> PS:
> >>  the original results were mentioned in a previous message to the
> >> GRASS list
> >> on Feb 8 2006.
> >> http://www.nabble.com/-GRASSLIST%3A10214--some-nice-results-from-r.sun-t
> >>1087635.html
> >>
> >>
> >> --
> >> Dylan Beaudette
> >> Soils and Biogeochemistry Graduate Group
> >> University of California at Davis
> >> 530.754.7341
> >>
> >> _______________________________________________
> >> grass-dev mailing list
> >> grass-dev at grass.itc.it
> >> http://grass.itc.it/mailman/listinfo/grass-dev
> >
> > _______________________________________________
> > grass-dev mailing list
> > grass-dev at grass.itc.it
> > http://grass.itc.it/mailman/listinfo/grass-dev

-- 
Dylan Beaudette
Soils and Biogeochemistry Graduate Group
University of California at Davis
530.754.7341




More information about the grass-dev mailing list