source: LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/splaeropt_lw_rrtm.f90 @ 5119

Last change on this file since 5119 was 5111, checked in by abarral, 4 months ago

Put abort_physic into a module
Remove -g option from makelmdz_fcm, since that option is linked to a header file that isn't included anywhere.
(lint) light lint on traversed files

File size: 2.8 KB
Line 
1! splaeropt_lw_rrtm.F90 2014-05-13 C. Kleinschmitt
2!                      2016-05-03 O. Boucher
3
4! This routine feeds aerosol LW properties to RRTM
5! we only consider absorption (not scattering)
6
7SUBROUTINE SPLAEROPT_LW_RRTM(ok_alw, zdm, tr_seri)
8
9  USE dimphy
10  USE aero_mod
11  USE infotrac_phy, ONLY: nqtot, nbtr, tracers
12  USE phys_state_var_mod, ONLY: tau_aero_lw_rrtm
13  USE lmdz_yoerad, ONLY: NLW
14  USE lmdz_abort_physic, ONLY: abort_physic
15
16  IMPLICIT NONE
17
18  INCLUDE "clesphys.h"
19
20  ! Input arguments:
21
22  LOGICAL, INTENT(IN) :: ok_alw
23  REAL, DIMENSION(klon, klev), INTENT(IN) :: zdm
24  REAL, DIMENSION(klon, klev, nbtr), INTENT(IN) :: tr_seri
25
26  ! Local arguments :
27
28  INTEGER, PARAMETER :: naero_soluble = 2    ! 1- accumulation soluble; 2- coarse soluble
29  INTEGER, PARAMETER :: naero_insoluble = 2  ! 1- coarse dust; 2- supercoarse dust
30  INTEGER, PARAMETER :: naero = naero_soluble + naero_insoluble
31
32  INTEGER inu, itr, iq, spinsol
33  CHARACTER*20 modname
34
35  !--absorption coefficient for coarse and super-coarse DUST
36  REAL :: alpha_abs_CIDUST_16bands(nbands_lw_rrtm, naero_insoluble)   !--unit m2/g
37  DATA alpha_abs_CIDUST_16bands /                         &
38          ! Dust CO insoluble
39          0.001, 0.003, 0.005, 0.006, 0.011, 0.031, 0.157, 0.102, &
40          0.017, 0.056, 0.032, 0.008, 0.010, 0.011, 0.013, 0.016, &
41          ! Dust SC insoluble
42          0.002, 0.004, 0.007, 0.010, 0.018, 0.043, 0.099, 0.071, &
43          0.021, 0.056, 0.033, 0.011, 0.013, 0.014, 0.016, 0.018 /
44
45  modname = 'splaeropt_lw_rrtm'
46
47  IF (NLW/=nbands_lw_rrtm) THEN
48    CALL abort_physic(modname, 'Erreur NLW doit etre egal a 16 pour cette routine', 1)
49  ENDIF
50
51  IF (ok_alw) THEN
52
53    !--initialisation
54    tau_aero_lw_rrtm = 0.0
55
56    itr = 0
57    DO iq = 1, nqtot
58      IF(.NOT.tracers(iq)%isInPhysics) CYCLE
59      itr = itr + 1
60      SELECT CASE(tracers(iq)%name)
61      CASE('PREC', 'FINE', 'COSS'); CYCLE                  !--precursor or fine/coarde accumulation mode
62      CASE('CODU'); spinsol = 1                            !--coarse mode dust
63      CASE('SCDU'); spinsol = 2                            !--super coarse mode dust
64      CASE DEFAULT; CALL abort_physic(modname, 'I cannot do aerosol optics for ' // tracers(iq)%name, 1)
65      END SELECT
66
67      DO inu = 1, NLW
68
69        !--total aerosol
70        tau_aero_lw_rrtm(:, :, 2, inu) = tau_aero_lw_rrtm(:, :, 2, inu) + tr_seri(:, :, itr) * zdm(:, :) * alpha_abs_CIDUST_16bands(inu, spinsol)
71        !--no aerosol at all
72        tau_aero_lw_rrtm(:, :, 1, inu) = tau_aero_lw_rrtm(:, :, 1, inu) + 0.0
73
74      ENDDO
75
76    ENDDO
77
78    !--avoid very small values
79    tau_aero_lw_rrtm = MAX(tau_aero_lw_rrtm, 1.e-15)
80
81  ELSE
82    !--default value
83    tau_aero_lw_rrtm = 1.e-15
84  ENDIF
85
86END SUBROUTINE SPLAEROPT_LW_RRTM
Note: See TracBrowser for help on using the repository browser.