!+ Subroutine to initialize diagnostics and coupling arrays.                       RAD_ALL.2305  
!                                                                                  RAD_ALL.2306  
! Purpose:                                                                         RAD_ALL.2307  
!   The coupling and diagnostic arrays are zeroed.                                 RAD_ALL.2308  
!                                                                                  RAD_ALL.2309  
! Method:                                                                          RAD_ALL.2310  
!   Straightforward.                                                               RAD_ALL.2311  
!                                                                                  RAD_ALL.2312  
! Current Owner of Code: J. M. Edwards                                             RAD_ALL.2313  
!                                                                                  RAD_ALL.2314  
! History:                                                                         RAD_ALL.2315  
!       Version         Date                    Comment                            RAD_ALL.2316  
!       4.0             27-07-95                Original Code                      RAD_ALL.2317  
!                                               (J. M. Edwards)                    RAD_ALL.2318  
!                                                                                  RAD_ALL.2319  
! Description of Code:                                                             RAD_ALL.2320  
!   FORTRAN 77  with extensions listed in documentation.                           RAD_ALL.2321  
!                                                                                  RAD_ALL.2322  
!- ---------------------------------------------------------------------           RAD_ALL.2323  
      SUBROUTINE R2_INIT_COUPLE_DIAG(N_PROFILE                                     RAD_ALL.2324  
     &   , SEA_FLUX                                                                RAD_ALL.2325  
     &   , L_SURFACE_DOWN_FLUX, SURFACE_DOWN_FLUX                                  RAD_ALL.2326  
     &   , L_SURF_DOWN_CLR, SURF_DOWN_CLR                                          RAD_ALL.2327  
     &   , L_SURF_UP_CLR, SURF_UP_CLR                                              RAD_ALL.2328  
     &   , L_FLUX_BELOW_690NM_SURF, FLUX_BELOW_690NM_SURF                          RAD_ALL.2329  
     &   , NPD_PROFILE                                                             RAD_ALL.2330  
     &   )                                                                         RAD_ALL.2331  
!                                                                                  RAD_ALL.2332  
!                                                                                  RAD_ALL.2333  
!                                                                                  RAD_ALL.2334  
      IMPLICIT NONE                                                                RAD_ALL.2335  
!                                                                                  RAD_ALL.2336  
!                                                                                  RAD_ALL.2337  
!     DUMMY ARGUMENTS                                                              RAD_ALL.2338  
!                                                                                  RAD_ALL.2339  
!     DIMENSIONS OF ARRAYS                                                         RAD_ALL.2340  
      INTEGER   !, INTENT(IN)                                                      RAD_ALL.2341  
     &     NPD_PROFILE                                                             RAD_ALL.2342  
!             MAXIMUM NUMBER OF ATMOSPHERIC PROFILES                               RAD_ALL.2343  
!                                                                                  RAD_ALL.2344  
      INTEGER   !, INTENT(IN)                                                      RAD_ALL.2345  
     &     N_PROFILE                                                               RAD_ALL.2346  
!             NUMBER OF ATMOSPHERIC PROFILES                                       RAD_ALL.2347  
!                                                                                  RAD_ALL.2348  
!     SWITCHES FOR DIAGNOSTICS:                                                    RAD_ALL.2349  
      LOGICAL   !, INTENT(IN)                                                      RAD_ALL.2350  
     &     L_FLUX_BELOW_690NM_SURF                                                 RAD_ALL.2351  
!             FLUX BELOW 690NM AT SURFACE TO BE CALCULATED                         RAD_ALL.2352  
     &   , L_SURFACE_DOWN_FLUX                                                     RAD_ALL.2353  
!             DOWNWARD SURFACE FLUX REQUIRED                                       RAD_ALL.2354  
     &   , L_SURF_DOWN_CLR                                                         RAD_ALL.2355  
!             CALCULATE DOWNWARD CLEAR FLUX                                        RAD_ALL.2356  
     &   , L_SURF_UP_CLR                                                           RAD_ALL.2357  
!             CALCULATE UPWARD CLEAR FLUX                                          RAD_ALL.2358  
!                                                                                  RAD_ALL.2359  
!     SURFACE FLUXES FOR COUPLING OR DIAGNOSTIC USE                                RAD_ALL.2360  
      REAL      !, INTENT(OUT)                                                     RAD_ALL.2361  
     &     SEA_FLUX(NPD_PROFILE)                                                   RAD_ALL.2362  
!             NET DOWNWARD FLUX INTO SEA                                           RAD_ALL.2363  
     &   , SURFACE_DOWN_FLUX(NPD_PROFILE)                                          RAD_ALL.2364  
!             DOWNWARD FLUX AT SURFACE                                             RAD_ALL.2365  
     &   , SURF_DOWN_CLR(NPD_PROFILE)                                              RAD_ALL.2366  
!             CLEAR-SKY DOWNWARD FLUX AT SURFACE                                   RAD_ALL.2367  
     &   , SURF_UP_CLR(NPD_PROFILE)                                                RAD_ALL.2368  
!             CLEAR-SKY UPWARD FLUX AT SURFACE                                     RAD_ALL.2369  
     &   , FLUX_BELOW_690NM_SURF(NPD_PROFILE)                                      RAD_ALL.2370  
!             SURFACE FLUX BELOW 690NM                                             RAD_ALL.2371  
!                                                                                  RAD_ALL.2372  
!                                                                                  RAD_ALL.2373  
!                                                                                  RAD_ALL.2374  
      CALL R2_ZERO_1D(N_PROFILE, SEA_FLUX)                                         RAD_ALL.2375  
!                                                                                  RAD_ALL.2376  
      IF (L_SURFACE_DOWN_FLUX) THEN                                                RAD_ALL.2377  
         CALL R2_ZERO_1D(N_PROFILE, SURFACE_DOWN_FLUX)                             RAD_ALL.2378  
      ENDIF                                                                        RAD_ALL.2379  
!                                                                                  RAD_ALL.2380  
      IF (L_SURF_DOWN_CLR) THEN                                                    RAD_ALL.2381  
         CALL R2_ZERO_1D(N_PROFILE, SURF_DOWN_CLR)                                 RAD_ALL.2382  
      ENDIF                                                                        RAD_ALL.2383  
!                                                                                  RAD_ALL.2384  
      IF (L_SURF_UP_CLR) THEN                                                      RAD_ALL.2385  
         CALL R2_ZERO_1D(N_PROFILE, SURF_UP_CLR)                                   RAD_ALL.2386  
      ENDIF                                                                        RAD_ALL.2387  
!                                                                                  RAD_ALL.2388  
      IF (L_FLUX_BELOW_690NM_SURF) THEN                                            RAD_ALL.2389  
         CALL R2_ZERO_1D(N_PROFILE, FLUX_BELOW_690NM_SURF)                         RAD_ALL.2390  
      ENDIF                                                                        RAD_ALL.2391  
!                                                                                  RAD_ALL.2392  
!                                                                                  RAD_ALL.2393  
!                                                                                  RAD_ALL.2394  
      RETURN                                                                       RAD_ALL.2395  
      END   
