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

Hamish hamish_nospam at yahoo.com
Mon Dec 4 01:46:59 EST 2006


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

may I suggest we prepare the draft in a Wiki page. A 28 page long man
page isn't useful (too much info to quickly find what you need). A
concise man page with a link to "the r.sun users' guide" (pdf/html)
would be much better IMO.


H:
> > Did you extract the Linke turbidity values from the app. on the EU
> > web site, derive it from measured in situ values, or are you
> > tweaking that variable as a calibration to get r.sun to match your
> > measured radiation values?
D:
> I used the 'rural' values from the r.sun manual page as a starting
> point, and then modified according to my observations of the local
> climate + tweaking to make r.sun match the weather station: i.e. i
> need a more robust approach!

I thought the SoDa page used to be linked from the r.sun page, but no
longer I guess as the link has changed.

Get local Linke values from the SoDa Solar radiation Databases
  http://www.soda-is.com/

--
Java applet:   (old link, no longer works)
  http://prime.jrc.it/SoDa/SoDa.html
  SoDa Prototype -> Climatological Data & Derived -> Climatological Data
      -> Monthly values of the Linke turbidity factor [double-click]
--

Now you extract local values with a PHP script:
  http://www.soda-is.com/eng/services/climat_eng.html
info:  (+ links to worldwide monthly maps)
  http://stratus.meteotest.ch/soda_tl/soda_tl.html

the worldwide database was available for purchase, I'm not sure of the
current state of that.

other useful links:
Jaro's talk at the 2002 GRASS conference:
http://www.ing.unitn.it/~grass/conferences/GRASS2002/proceedings/proceedings/pdfs/Hofierka_Jaroslav.pdf
Video of the presentation:
 http://www.jus.unitn.it/services/arc/2002/0911/7.ram


> > I see you have a bit of sawtooth noise in your plots. FWIW to avoid
> > introducing this monthly jump I wrote a little app some time ago
> > which interpolated daily Linke value from the monthly Linke averages
> > (for use in r.sun bash script loop) [assume monthly averages are for
> > day 15 of each month and interpolate for the days in between]. I'd
> > have to dig it out, & it's probably a mix of Matlab+C. Maybe
> > something for the wiki add-ons.
> 
> Indeed! I am using a constant value for the entire month. this
> approach is a  step in the right direction, but introduces those
> sawtooth artifacts. Since I  am working in R most of the time (for
> numerical operations at least), I think  that i might implement it
> there, and then save the results for use in a bash  script - which
> invokes r.sun.
> 
> Did your code look something like this;
> # define monthly averages
> l <- c(5.9,5.8,5.6,5.6,5.3,5.0,4.8,5.0,5.0,5.2,5.4,5.6)
> # use periodic spline interpolation to fill in the 365 days of the
> # year
> l.s <- spline(l, method="periodic", n=365)
> # plot results:
> plot(l, xlab="month", ylab="Linke Turbidity")
> lines(l.s)
> 
> note that this is not quite correct as it interpolates from the
> *start* of the  month, as opposed to the middle. Doing that would
> require knowing the day of  the middle of the month- i'll cook up that
> example shortly.

something like that (I don't understand much R syntax). I didn't bother
to figure out if the middle of the month was day 14|14.5|15|15.5, I just
figured day 15 was close enough -- we shouldn't fool ourselves into
thinking the interpolated values will be high precision data.

I am not familiar with "linke_monthly[1]=5.9" in bash. Is that legal??



Hamish




More information about the grass-user mailing list