source: LMDZ6/trunk/libf/phylmd/rrtm/aeropt_lw_rrtm.F90 @ 5435

Last change on this file since 5435 was 5294, checked in by Laurent Fairhead, 7 weeks ago

Keeping clesphys.h was not the right solution
LF

File size: 2.4 KB
Line 
1!
2! aeropt_lw_rrtm.F90 2014-05-13 C. Kleinschmitt
3!                    2016-05-03 O. Boucher
4!                    2016-12-17 O. Boucher
5!
6! This routine feeds aerosol LW properties to RRTM
7! we only consider absorption (not scattering)
8! we only consider dust for now
9
10SUBROUTINE AEROPT_LW_RRTM(ok_alw, pdel, zrho, flag_aerosol, m_allaer, m_allaer_pi)
11
12  USE dimphy
13  USE aero_mod
14  USE phys_state_var_mod, ONLY: tau_aero_lw_rrtm
15  USE YOERAD, ONLY: NLW
16  USE YOMCST, ONLY: RG
17! Temporary fix waiting for cleaner interface (or not)
18  USE clesphys_mod_h, ONLY: NSW
19 
20  IMPLICIT NONE
21
22!!  INCLUDE "clesphys.h"
23  !
24  ! Input arguments:
25  !
26  LOGICAL, INTENT(IN)                              :: ok_alw
27  INTEGER, INTENT(IN)                              :: flag_aerosol
28  REAL, DIMENSION(klon,klev), INTENT(IN)           :: pdel, zrho
29  REAL, DIMENSION(klon,klev,naero_tot), INTENT(IN) :: m_allaer, m_allaer_pi
30  !
31  INTEGER inu, i, k
32  REAL :: zdh(klon,klev)
33  REAL :: tmp_var, tmp_var_pi
34  CHARACTER*20 modname
35  !
36  !--absorption coefficient for CIDUST
37  REAL:: alpha_abs_CIDUST_16bands(nbands_lw_rrtm)   !--unit m2/g
38  DATA alpha_abs_CIDUST_16bands /                         &
39  0.001, 0.003, 0.005, 0.006, 0.012, 0.030, 0.148, 0.098, &
40  0.017, 0.053, 0.031, 0.008, 0.010, 0.011, 0.013, 0.015  /
41  !
42  modname='aeropt_lw_rrtm'
43  !
44  IF (NLW.NE.nbands_lw_rrtm) THEN
45    CALL abort_physic(modname,'Erreur NLW doit etre egal a 16 pour cette routine',1)
46  ENDIF
47  !
48  IF (ok_alw) THEN                                   !--aerosol LW effects
49   !
50   IF (flag_aerosol.EQ.5.OR.flag_aerosol.EQ.6.OR.flag_aerosol.EQ.7) THEN  !-Dust
51    !
52    zdh(:,:)=pdel(:,:)/(RG*zrho(:,:))      ! m
53    !
54    DO k=1, klev
55      DO i=1, klon
56         !
57         tmp_var   =m_allaer(i,k,id_CIDUSTM_phy)   /1.e6*zdh(i,k)  !--g/m2
58         tmp_var_pi=m_allaer_pi(i,k,id_CIDUSTM_phy)/1.e6*zdh(i,k)  !--g/m2
59         !
60         DO inu=1, NLW
61           !
62           !--total aerosol
63           tau_aero_lw_rrtm(i,k,2,inu) = MAX(1.e-15,tmp_var*alpha_abs_CIDUST_16bands(inu))
64           !--natural aerosol
65!           tau_aero_lw_rrtm(:,:,1,inu) = MAX(1.e-15,tmp_var_pi*alpha_abs_CIDUST_16bands(inu))
66           tau_aero_lw_rrtm(i,k,1,inu) = 1.e-15  !--test
67           !
68         ENDDO
69      ENDDO
70      !
71    ENDDO
72    !
73   ENDIF
74   !
75  ELSE !--no aerosol LW effects
76    !
77    tau_aero_lw_rrtm = 1.e-15
78  ENDIF
79  !
80END SUBROUTINE AEROPT_LW_RRTM
Note: See TracBrowser for help on using the repository browser.