Forum GraphWeather

Forum d'aide GraphWeather
Nous sommes actuellement le Sam Avr 27, 2024 2:59 pm

Le fuseau horaire est UTC+1 heure




Publier un nouveau sujet Répondre au sujet  [ 9 message(s) ] 
Auteur Message
 Sujet du message: Solar in stats
MessagePublié: Mer Août 06, 2008 12:09 pm 
Hors-ligne
Membre

Inscription : Lun Fév 05, 2007 10:22 pm
Message(s) : 34
Hi,
I believe that the hours of sunshine to be overcalculated.

Is there a probe that will make a tweak to adjust this?

I'm using this formula in my perl scripts to calculate solar criteria
Code :
$solarcriteria=sin($solarangle*$pi/180)/sin(55.3*$pi/180)*55;    
#Hey the sun is shining within the next ifstatement
if ($solarcriteria < $solarenergy/10.24){   
      $soltimer+=$updaterate;} #just counting up seconds of sunshine
#dividing $solarenergy by 10.24 since max output is 1024 w/m2 for my 1-wire sensor


Today GW reports close to 5hrs of sunshine on an overall overcast day. Some sunny spells occationally. My script says 1hr
I set the factor in the solarcriteria to 55% of expected energy. The factor of 55.3 is the max possible solarheight in degrees above the horizon at my latitude.

What is your criteria based on? I could multiply my solar readings to better match a Davis sensor. But a probe for this would maybe be better.

regards
Audun
http://vindkast.no


Haut
 Profil  
Répondre en citant  
 Sujet du message: Re: Solar in stats
MessagePublié: Mer Août 06, 2008 6:49 pm 
Hors-ligne
Membre

Inscription : Dim Juil 27, 2008 6:06 pm
Message(s) : 478
Hi,

You can change the parameters of this, in "Preferencies"/"Probes"/"Statistics" (I don't know if they are the good menus names I use the French version).
Here you can change "Minimal solar radiation" and "Duration for a day". Default values are 100 W/m² and 75%.

_________________
Ma station => http://www.meteo-boisney.fr
Image
--- Station Vantage Pro 2 - Plugin VantagePro.dll ---
--- GraphWeather Version 2.0.312b ---


Haut
 Profil  
Répondre en citant  
 Sujet du message: Re: Solar in stats
MessagePublié: Mer Août 06, 2008 7:12 pm 
Hors-ligne
Membre

Inscription : Lun Fév 05, 2007 10:22 pm
Message(s) : 34
I appreciate pointing out that option in the probes.

For the future Antoine, you might consider a sinus() function that takes into account the height of the sun at any given time of day and time of year. Comparing actual solar reading with a theoretical maximum.
I can provide the rest of the code I'm using to calculate the 'solar criteria'

Since my solar time (in seconds) is already in my database I guess I could use a spare probe and see if $cumul will work with a factor of 1/3600 to get hours of sunshine from that sql record.

Let me know what you think.

Audun
http://vindakst.no


Haut
 Profil  
Répondre en citant  
 Sujet du message: Re: Solar in stats
MessagePublié: Mer Août 06, 2008 7:22 pm 
Hors-ligne
Membre

Inscription : Dim Juil 27, 2008 6:06 pm
Message(s) : 478
On my side the value given by GW are fully in agreement with those computed by WeatherLink (the Davis Vantage software), but they may be use the same calculation method.

_________________
Ma station => http://www.meteo-boisney.fr
Image
--- Station Vantage Pro 2 - Plugin VantagePro.dll ---
--- GraphWeather Version 2.0.312b ---


Haut
 Profil  
Répondre en citant  
 Sujet du message: Re: Solar in stats
MessagePublié: Mer Août 06, 2008 11:40 pm 
Hors-ligne
Site Admin
Avatar de l’utilisateur

Inscription : Lun Mars 20, 2006 11:16 am
Message(s) : 3356
Localisation : Montréal
Fikkuad,

It should work in reading the value from your mysql database and apply a cumul.

Can you post your algo for the solar criteria? Is your or a well-known model?


Haut
 Profil  
Répondre en citant  
 Sujet du message: Re: Solar in stats
MessagePublié: Jeu Août 07, 2008 12:57 pm 
Hors-ligne
Membre

Inscription : Lun Fév 05, 2007 10:22 pm
Message(s) : 34
My code is based on this http://answers.google.com/answers/threa ... 82886.html

PERL:
Code :
$lat=58.939 # Latitude in decimal form. Negative in southern hemisphere.
$gmtoffset=1; # Offset from GMT
@lokal = localtime(time);      
$N = $lokal[7]; #Day of year
$t= $lokal[2]-$gmtoffset-$lokal[8]+($lokal[1]/60);#Hour of day -GMTOFFSET Subtracting DSToffset (if any) Add minute fraction

$g = (2*$pi/365.25)*($N+($t/24)); #Fraction of Year in degrees

$declination=0.396372-22.91327*cos($g)+4.02543*sin($g)-0.387205*cos(2*$g)+0.0501967*sin(2*$g)-0.154527*cos(3*$g)+0.084798*sin(3*$g);

$TC=0.004297+0.107029*cos($g)-1.837877*sin($g)-0.837378*cos(2*$g)-2.340475*sin(2*$g);
$SHA =($t-12)*15+$long+$TC;
if ($SHA>180){$SHA-=360;}
if ($SHA<-180) {$SHA+=360;}
$cosSZA=sin(deg_to_rad($lat))*sin(deg_to_rad($declination))+cos(deg_to_rad($lat))*cos(deg_to_rad($declination))*cos(deg_to_rad($SHA));
if ($cosSZA>1){$cosSZA=1;}
if ($cosSZA<-1){$cosSZA=-1;}
$SZA=rad_to_deg(acos($cosSZA));

$solarangle=90-$SZA; #THE ONE WE NEED

$solarcriteria=sin($solarangle*$pi/180)/sin(55*$pi/180)*55;# Can't remember the logic anymore besides it's threshold is at 55% of max solar energy. This EQ provided by Steinar Midtskogen http://voksenlia.net


Hope this helps. I did some translation for the code to be readable, so the code might not run

regards
Audun
http://vindkast.no


Haut
 Profil  
Répondre en citant  
 Sujet du message: Re: Solar in stats
MessagePublié: Jeu Août 07, 2008 6:28 pm 
Hors-ligne
Membre

Inscription : Dim Juil 27, 2008 6:06 pm
Message(s) : 478
I don't know how is made your solar probe, but on my Vantage station is made of a small disk (around one square centimeter) with as to be perfectly horizotally align (there is a bubble level and 3 screws to adjust this).
Then I am wondering if it really necessary to consider the sun light angle depending on the latitude of the place as the power of the incident light on the disk probably already take in account this angle.

What do you think ?

_________________
Ma station => http://www.meteo-boisney.fr
Image
--- Station Vantage Pro 2 - Plugin VantagePro.dll ---
--- GraphWeather Version 2.0.312b ---


Haut
 Profil  
Répondre en citant  
 Sujet du message: Re: Solar in stats
MessagePublié: Jeu Août 07, 2008 11:06 pm 
Hors-ligne
Site Admin
Avatar de l’utilisateur

Inscription : Lun Mars 20, 2006 11:16 am
Message(s) : 3356
Localisation : Montréal
I agree with Pidou, the interesting measure is the energy received by the ground, different in winter/summer (the declination of the sun is different).


Haut
 Profil  
Répondre en citant  
 Sujet du message: Re: Solar in stats
MessagePublié: Ven Août 08, 2008 6:39 am 
Hors-ligne
Membre

Inscription : Lun Fév 05, 2007 10:22 pm
Message(s) : 34
Antoine, Pidou.

I'll try to explain the reason I go trough all this trouble calculating expexted energy.
This might not be as important closer to the equator, but here the length of the day changes soo much over the year. In summer we have midnight sun, and winter no sun at all. If I set my sunshine criteria to 100 w/m2 it's obviously not valid for each day of the year. In winter it barely reaches this amount on a sunny day, due to the sun beeing so close to the horizon. And ofcourse in summer the energy seen by the detector is far above this amount even with skies covering the sun.
Midsummer my sunny criteria will be >500W/m2 with sun at zenith and >20 w/m2 before it sets at 11pm.

Remember, I try to accurately count every second of detected sun to have a database with hours of sunshine.

Another thing not taken into account in my code, is that it assumes a flat horizon. Another part is needed in addition to compensate for obstructions (ie. forest, mountains, buildings). To get this absolutely perfect yo'd have to measure the horizon with a 'Teodolitt' and come up with a compensating algorithm. (Don't know the english word so I'm posting an image).
Pièce jointe:
teodolitt.jpg


My experince is that setting the criteria to 55% of expected radiation you get a cutoff when the sun doesn't cast distinct shadows anymore. If you want to elaboarte on this you could do all sorts of 'binning' of these data, monitoring different thresholds. Clear, Haze, Light overcast, Heavy overcast. Monitor for broken clouds and so further (I'm not there yet :wink: )

This way I always have an accurate percentage of sunshine compared to the length of the day. So far today It's been sunny 70% of the time :mrgreen:

Hope this explanation is worth something to somebody.
Regards
Audun
http://vindkast.no


Vous n’êtes pas autorisé(e) à consulter les fichiers insérés à ce message.


Haut
 Profil  
Répondre en citant  
Afficher les messages publiés depuis :  Trier par  
Publier un nouveau sujet Répondre au sujet  [ 9 message(s) ] 

Le fuseau horaire est UTC+1 heure


Qui est en ligne ?

Utilisateur(s) parcourant ce forum : Aucun utilisateur inscrit et 32 invité(s)


Vous ne pouvez pas publier de nouveaux sujets dans ce forum
Vous ne pouvez pas répondre aux sujets dans ce forum
Vous ne pouvez pas éditer vos messages dans ce forum
Vous ne pouvez pas supprimer vos messages dans ce forum
Vous ne pouvez pas insérer de pièces jointes dans ce forum

Recherche de:
Aller vers :  
POWERED_BY
Traduction et support en françaisHébergement de site