0 Members and 1 Guest are viewing this topic.

#### hiljo

• Senior Contributor
• Posts: 220
« on: February 10, 2023, 09:59:11 AM »
Hi everyone,

I'm thinking about a comparison between the measured solarradiation from my WS90 unit with the potential maximum solarradiation during the day. So i get a nice bell shaped graph merged with the real measurements of the WS90. Does anybody know how to calculate the potential maximum solarradiation based on my LAT/LON and the (any) time of the day?

 Ecowitt HP2550C v1.9.12x GW2000 v3.0.6Beta WittBoy WS90 v1.3.3Smart Watervalve (WFC01) Beta tester3x WH31, WH32, WH40, WH41, WH57WN34L, 2x WH51, WN35Dutch translator for Ecowitt.https://www.weerstationhattem.nl/ |   |   |   |    |   |   |

• Forecaster
• Posts: 749
##### Re: Calculate maximum solar radiation
« Reply #1 on: February 10, 2023, 11:42:33 AM »
Both Weather Display and CumulusMX do this and is available on both in webtags.

Stuart
Ecowitt GW1003 with ultrasonic wind gauge, lightning sensor and PM2.5 sensor with Personal Weather Tablet as a console.

#### davidefa

• Forecaster
• Posts: 436
##### Re: Calculate maximum solar radiation
« Reply #2 on: February 10, 2023, 01:13:51 PM »
Meteotemplate uses this simplified php function ( don't know the origin ):

Code: [Select]
` function solarMax(\$time,\$lat,\$lon,\$elevation,\$elevationUnits){ if(\$elevationUnits=="ft"){ \$z = 0.3048 * \$elevation; } else{ \$z = \$elevation; } \$atc = 0.8; \$lw  = (M_PI / 180) * -\$lon; \$phi = (M_PI / 180) * \$lat; \$d   = (\$time / (60 * 60 * 24) - 0.5 + 2440588) - 2451545; \$M = (M_PI / 180) * (357.5291 + 0.98560028 * \$d); \$L = ((M_PI / 180) * (1.9148 * sin(\$M) + 0.02 * sin(2 * \$M) + 0.0003 * sin(3 * \$M))) + \$M + (M_PI / 180) * 102.9372 + M_PI; \$declin = asin(sin(0) * cos(((M_PI / 180) * 23.4397)) + cos(0) * sin(((M_PI / 180) * 23.4397)) * sin(\$L)); \$rightAsc = atan2(sin(\$L) * cos(((M_PI / 180) * 23.4397)) - tan(0) * sin(((M_PI / 180) * 23.4397)), cos(\$L)); \$H   = ((M_PI / 180) * (280.16 + 360.9856235 * \$d) - \$lw) - \$rightAsc; \$altitude = asin(sin(\$phi) * sin(\$declin) + cos(\$phi) * cos(\$declin) * cos(\$H)); \$altitude = \$altitude * 180 / M_PI; \$JD = \$time / (60 * 60 * 24) - 0.5 + 2440588; \$dayTime = (\$time - strtotime(date("Y",\$time)."-".date("m",\$time)."-".date('d',\$time)." 00:00"))/(24*60*60*1000); \$t = (\$JD + \$dayTime -2451545.0)/36525; \$eccentricity = 0.01678634 + 0.000042037*\$t + 0.0000001267*\$t*\$t; \$mean_anomaly =  357.52911+ 35999.05029*\$t + 0.0001537*\$t*\$t; if(\$mean_anomaly<0){ \$mean_anomaly=\$mean_anomaly%360+360; } if(\$mean_anomaly>360){ \$mean_anomaly=intval(\$mean_anomaly)%360; } \$c = (1.914602 - 0.004817*\$t + 0.000014*\$t*\$t)*sin(\$mean_anomaly*(M_PI / 180)); \$c =\$c+ (0.019993 - 0.000101*\$t)*sin(2*\$mean_anomaly*(M_PI / 180)); \$c =\$c+ 0.000289 *sin(3*\$mean_anomaly*(M_PI / 180)); \$true_anomary = \$mean_anomaly + \$c; \$radius = (1.000001018*(1-\$eccentricity*\$eccentricity))/(1 + \$eccentricity*cos(\$true_anomary*(M_PI / 180))); \$distance= \$radius * 149598000; \$el = \$altitude; \$R = \$radius; \$nrel = 1367.0; \$sinal = sin(deg2rad(\$el)); if(\$sinal >= 0){ \$rm = pow((288.0 - 0.0065 * \$z) / 288.0, 5.256) / (\$sinal + 0.15 * pow(\$el + 3.885, -1.253)); \$toa = \$nrel * \$sinal / (\$R * \$R); \$sr = \$toa * pow(\$atc, \$rm); } else{ \$sr = 0; } return \$sr; }`

#### Gyvate

• Forecaster
• Posts: 2777
##### Re: Calculate maximum solar radiation
« Reply #3 on: February 10, 2023, 02:54:17 PM »
CumulusUtils (based on CumulusMX) and  weewx also have that as a selectable variable to be plotted.
Have a look at http://www.meshka.eu/CUtils48 and http://www.meshka.eu/weewx
WS2350 1.6.5, GW1000(3) 1.7.6, WH2650 WiFi (2) 1.7.6 (test/backup), GW1100 2.2.7, GW2000(3) 3.0.7, HP2551 1.9.1, HP3500 1.7.2,WN910 1.2.3;
Ecowitt WS90(2), WS80, WH40, WH65, WH31(5), WH31-EP, WN30, WN34L, WN35, WH32, WH32-EP, WH32B, WH57 [Lightning], WH41 [PM2.5] (2), WH51 (6), WH45, WH55
MeteobridgePro(2)[test,prod] 5.6 Jul 2 2023, 15025 - Blake-Larsen Sun Recorder - RPi4/weewx 4.8.0/4.10.2/CumulusMX 3248/Meteobridge RPi4B-2GB(3007)
Barani Meteoshield Pro, MetSpec Rad02 - Ecowitt 5763,34418;WU ISAARB3(WH4000SE), ISAARB22(HP2553), http://meshka.eu