Back to home page

darwin3

 
 

    


File indexing completed on 2024-12-17 18:38:02 UTC

view on githubraw file Latest commit b55e95f1 on 2018-09-19 15:37:37 UTC
b55e95f1ff Oliv*0001 #include "RADTRANS_OPTIONS.h"
                0002 
                0003 CBOP
                0004 C     !ROUTINE: RADTRANS_RMUD_BELOW
                0005 
                0006 C     !INTERFACE: ======================================================
                0007       SUBROUTINE RADTRANS_RMUD_BELOW(
                0008      O                           rmud,
                0009      I                           sunz,
                0010      I                           iMin, iMax, jMin, jMax, myThid )
                0011 
                0012 C     !DESCRIPTION:
                0013 C     Compute average cosine for direct irradiance in the water column
                0014 C     given solar zenith angle (in degrees) above surface.
                0015 C
                0016 C     !USES: ===========================================================
                0017       IMPLICIT NONE
                0018 #include "SIZE.h"
                0019 #include "EEPARAMS.h"
                0020 #include "PARAMS.h"
                0021 #include "RADTRANS_SIZE.h"
                0022 #include "RADTRANS_PARAMS.h"
                0023 
                0024 C     !INPUT PARAMETERS: ===============================================
                0025 C     sunz :: solar zenith angle above surface in degrees
                0026       _RL sunz(1-OLx:sNx+OLx, 1-OLy:sNy+OLy)
                0027       INTEGER iMin, iMax, jMin, jMax, myThid
                0028 
                0029 C     !OUTPUT PARAMETERS: ==============================================
                0030 C     rmud :: inverse cosine of zenith angle below surface
                0031       _RL rmud(1-OLx:sNx+OLx, 1-OLy:sNy+OLy)
                0032 CEOP
                0033 
                0034 #ifdef ALLOW_RADTRANS
                0035 
                0036 C     !LOCAL VARIABLES: ================================================
                0037       _RL sinbelow, solzbelow
                0038       INTEGER i, j
                0039 
                0040       DO j=jMin,jMax
                0041        DO i=iMin,iMax
                0042         sinbelow = SIN(sunz(i,j)*deg2rad)/rt_refract_water
                0043         solzbelow = ASIN(sinbelow)
                0044         rmud(i,j) = MAX(0 _d 0, MIN(rt_rmud_max, 1./COS(solzbelow)))
                0045        ENDDO
                0046       ENDDO
                0047 
                0048 #endif /* ALLOW_RADTRANS */
                0049 
                0050       RETURN
                0051       END