CL_gm_sunZenithAngle — Sun zenith angle and sun azimuth in function of latitude, sun declination and local hour of a Earth's point.
[AngZen,AzSol] = CL_gm_sunZenithAngle(lat,decl,hloc)
Earth point's sun zenith angle [deg] (MxNxP)
Earth point's sun azimuth angle [deg] (MxNxP)
vector of latitudes [deg] (Mx1)
vector of sun declinations [deg] (Nx1)
vector of local hours [deg] (Px1)
//example 1 lat = [10;20;30]; decl= [0;15;23]; hloc= [45;60]; [AngZen,AzSol] = CL_gm_sunZenithAngle(lat,decl,hloc) //example 2 lat = [60]; hloc = (0:-7.5:-172.5); hloc = [hloc,(-180:7.5:-7.5)]; hloc = hloc'; dates=(23011:23375); [r_sun,rs] = CL_mod_moonSunG50(dates,'s'); pos_sph = CL_co_car2sph(r_sun); decl = pos_sph(2,:); decl = decl'*%CL_rad2deg; mtzPlot=[]; sizHloc1=size(hloc); nLigHloc1=sizHloc1(1); sizDecl1=size(decl); nLigDecl1=sizDecl1(1); sizLat1=size(lat); nLigLat1=sizLat1(1); [AngZen,AzSol] = CL_gm_sunZenithAngle(lat,decl,hloc) mtzPlot=matrix(AngZen,nLigDecl1,nLigHloc1); mtzPlot=mtzPlot'; xset("colormap",jetcolormap(180)) Matplot(mtzPlot); ax=gca(); ax.title.text= "Sun Zenith Angle"; ax.x_label.text= "Temps(jours)"; ax.y_label.text= "Heure locale"; ax.font_size=2; ax.title.font_size=2; ax.x_label.font_size=2; ax.y_label.font_size=2; ax.y_ticks.labels=["11.5" "14" "16.5" "19" "21.5" "0" "2.5" "5" "7.5" "10" "12.5"];