Skip to content

Commit

Permalink
Fixed lon,lat units in zenith angle computation.
Browse files Browse the repository at this point in the history
  • Loading branch information
momm committed Mar 14, 2015
1 parent b883e1d commit 71dbe46
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions zenith_angle.F90
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,10 @@ subroutine do_surface(self,_ARGUMENTS_DO_SURFACE_)
_GET_HORIZONTAL_(self%id_lat,lat)

! Sun hour angle :
zenithA = (h-12._rk)*15._rk*deg2rad + lon
zenithA = ((h-12._rk)*15._rk + lon)*deg2rad

! Cosine of the solar zenith angle :
zenithA =sin(lat)*sin(sundec)+cos(lat)*cos(sundec)*cos(zenithA)
zenithA =sin(lat*deg2rad)*sin(sundec)+cos(lat*deg2rad)*cos(sundec)*cos(zenithA)
zenithA =acos(max(0._rk,zenithA))/deg2rad
_SET_HORIZONTAL_DIAGNOSTIC_(self%id_zenith_angle,zenithA)

Expand Down

0 comments on commit 71dbe46

Please sign in to comment.