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

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

Keeping clesphys.h was not the right solution
LF

File size: 2.4 KB
RevLine 
[2214]1!
2! aeropt_lw_rrtm.F90 2014-05-13 C. Kleinschmitt
[2501]3!                    2016-05-03 O. Boucher
[2738]4!                    2016-12-17 O. Boucher
[2214]5!
[2501]6! This routine feeds aerosol LW properties to RRTM
7! we only consider absorption (not scattering)
[2738]8! we only consider dust for now
[2214]9
[2738]10SUBROUTINE AEROPT_LW_RRTM(ok_alw, pdel, zrho, flag_aerosol, m_allaer, m_allaer_pi)
[2214]11
[2501]12  USE dimphy
13  USE aero_mod
[2748]14  USE phys_state_var_mod, ONLY: tau_aero_lw_rrtm
15  USE YOERAD, ONLY: NLW
16  USE YOMCST, ONLY: RG
[5294]17! Temporary fix waiting for cleaner interface (or not)
18  USE clesphys_mod_h, ONLY: NSW
19 
[2214]20  IMPLICIT NONE
21
[5294]22!!  INCLUDE "clesphys.h"
[2501]23  !
24  ! Input arguments:
25  !
[2739]26  LOGICAL, INTENT(IN)                              :: ok_alw
27  INTEGER, INTENT(IN)                              :: flag_aerosol
[2748]28  REAL, DIMENSION(klon,klev), INTENT(IN)           :: pdel, zrho
29  REAL, DIMENSION(klon,klev,naero_tot), INTENT(IN) :: m_allaer, m_allaer_pi
[2501]30  !
[2503]31  INTEGER inu, i, k
[2738]32  REAL :: zdh(klon,klev)
33  REAL :: tmp_var, tmp_var_pi
[2748]34  CHARACTER*20 modname
[2501]35  !
36  !--absorption coefficient for CIDUST
37  REAL:: alpha_abs_CIDUST_16bands(nbands_lw_rrtm)   !--unit m2/g
[2739]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  /
[2501]41  !
[2748]42  modname='aeropt_lw_rrtm'
43  !
[2501]44  IF (NLW.NE.nbands_lw_rrtm) THEN
[2748]45    CALL abort_physic(modname,'Erreur NLW doit etre egal a 16 pour cette routine',1)
[2501]46  ENDIF
47  !
[2738]48  IF (ok_alw) THEN                                   !--aerosol LW effects
49   !
[3288]50   IF (flag_aerosol.EQ.5.OR.flag_aerosol.EQ.6.OR.flag_aerosol.EQ.7) THEN  !-Dust
[2501]51    !
[2739]52    zdh(:,:)=pdel(:,:)/(RG*zrho(:,:))      ! m
[2738]53    !
[2501]54    DO k=1, klev
[2738]55      DO i=1, klon
56         !
[2739]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
[2738]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
[2739]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
[2738]67           !
68         ENDDO
69      ENDDO
[2501]70      !
71    ENDDO
[2739]72    !
[2738]73   ENDIF
74   !
75  ELSE !--no aerosol LW effects
[2501]76    !
77    tau_aero_lw_rrtm = 1.e-15
78  ENDIF
79  !
[2214]80END SUBROUTINE AEROPT_LW_RRTM
Note: See TracBrowser for help on using the repository browser.