Borrar filtros
Borrar filtros

Calculate solar zenith angle

45 visualizaciones (últimos 30 días)
Arvind Gauns
Arvind Gauns el 16 de Mayo de 2022
Comentada: Lei el 24 de Dic. de 2023
I want to calculate solar zenith angle for inputting a function. i tried with the available codes but didnt work out for me. Any references/guides for estimating solar zenith angle
  2 comentarios
Image Analyst
Image Analyst el 16 de Mayo de 2022
Arvind Gauns
Arvind Gauns el 17 de Mayo de 2022
Yes. I had the methodology and also found some codes but it didnt work on my system

Iniciar sesión para comentar.

Respuestas (1)

Sam Chak
Sam Chak el 16 de Mayo de 2022
I did a web search and found the formula. It's a little strange that your browser didn't show references/guides to calculate the solar zenith angle.
Anyhow, I also tried the code and it works:
prompt1 = "What is the value of the local latitude? ";
Phi = input(prompt1)
prompt2 = "What is the value of the current declination of the Sun? ";
delta = input(prompt2)
prompt3 = "What is the value of the hour angle, in the local solar time? ";
h = input(prompt3)
theta_s = acos(sin(Phi)*sin(delta) + cos(Phi)*cos(delta)*cos(h))
  2 comentarios
Arvind Gauns
Arvind Gauns el 17 de Mayo de 2022
with a lot of trial and error the whole night, I found this way to get the solar zenith angle.
Lat = 52.65;
Long = 5.6;
height = 47.5;
f1 = A(i,:);
f = char(f1);
yea = f(1:4); year = str2double(yea);
mont = f(6:7); month = str2double(mont);
do = f(9:10); dom = str2double(do);
date = datenum(year,month,dom);
Doy = datenum(year,month,dom)-datenum(year-1,12,31);
hou = f(11:12); hour = str2double(hou);
mi = f(14:15); min= str2double(mi);
se = f(17:18); sec=str2double(se);
UTC = +1;
time = ((hour - UTC)/24) + (min/(60*24)) + (sec/(60*60*24));
cos_sza = cos(calczenithangle(Doy,time,0,0,Long,Lat));
Lei
Lei el 24 de Dic. de 2023
Hey Arvind,
Could you please shard the function of calczenithangle?
Thanks,
Leo

Iniciar sesión para comentar.

Categorías

Más información sobre Solar Power en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2021b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by