Skip to content
Snippets Groups Projects
Commit a9abdd82 authored by Juan Escobar's avatar Juan Escobar
Browse files

J.P. Chaboureau & Juan 21/08/2017:surf_solar_slopes.f90, correction for tiny...

J.P. Chaboureau & Juan 21/08/2017:surf_solar_slopes.f90, correction for tiny solar zenithal angle in R*4
parent 1975f42e
No related branches found
No related tags found
No related merge requests found
...@@ -75,13 +75,14 @@ END MODULE MODI_SURF_SOLAR_SLOPES ...@@ -75,13 +75,14 @@ END MODULE MODI_SURF_SOLAR_SLOPES
!! Original 15/01/02 !! Original 15/01/02
!! V. Masson 01/03/03 add multiple wavelengths !! V. Masson 01/03/03 add multiple wavelengths
!! V. Masson 04/01/11 standard definition of azimuthal angle !! V. Masson 04/01/11 standard definition of azimuthal angle
!! J.P. Chaboureau & Juan 21/08/2017 correction for tiny solar zenithal angle in R*4
!! !!
!------------------------------------------------------------------------------- !-------------------------------------------------------------------------------
! !
!* 0. DECLARATIONS !* 0. DECLARATIONS
! ------------ ! ------------
! !
USE MODD_CST, ONLY : XPI USE MODD_CST, ONLY : XPI, XMNH_TINY
! !
IMPLICIT NONE IMPLICIT NONE
! !
...@@ -173,14 +174,14 @@ DO JT=1,4 ...@@ -173,14 +174,14 @@ DO JT=1,4
!* slope angles !* slope angles
! !
ZSLOPANG = ATAN(SQRT(ZDZSDX**2+ZDZSDY**2)) ZSLOPANG = ATAN(SQRT(ZDZSDX**2+ZDZSDY**2))
ZSLOPAZI = - 0.5*XPI - ATAN2( ZDZSDY, ZDZSDX + SIGN(1.E-30,ZDZSDX) ) ZSLOPAZI = - 0.5*XPI - ATAN2( ZDZSDY, ZDZSDX + SIGN(XMNH_TINY,ZDZSDX) )
! !
!* modification of radiation received by 1 square meter of surface !* modification of radiation received by 1 square meter of surface
! (of the triangle) because of its orientation relative to the sun ! (of the triangle) because of its orientation relative to the sun
! !
PDIRSWDT(JI,JJ,JT,:) = MAX( 0.0 , PDIRSRFSWD(JI,JJ,:) * ( & PDIRSWDT(JI,JJ,JT,:) = MAX( 0.0 , PDIRSRFSWD(JI,JJ,:) * ( &
COS(ZSLOPANG) & COS(ZSLOPANG) &
+ SIN(ZSLOPANG) * PSINZEN(JI,JJ) / PCOSZEN(JI,JJ) & + SIN(ZSLOPANG) * PSINZEN(JI,JJ) / MAX(PCOSZEN(JI,JJ), XMNH_TINY) &
* COS(PAZIMSOL(JI,JJ)-ZSLOPAZI) ) & * COS(PAZIMSOL(JI,JJ)-ZSLOPAZI) ) &
) )
! !
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment