Ignore:
Timestamp:
Nov 28, 2014, 4:36:29 PM (10 years ago)
Author:
Laurent Fairhead
Message:

Merged trunk changes -r2070:2158 into testing branch. Compilation problems introduced by revision r2155 have been corrected by hand

Location:
LMDZ5/branches/testing
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • LMDZ5/branches/testing

  • LMDZ5/branches/testing/libf/phylmd/aeropt_5wv.F90

    r1910 r2160  
    5757  REAL, DIMENSION(klon,klev), INTENT(in)   :: pdel
    5858  REAL, INTENT(in)                         :: delt
    59   REAL, DIMENSION(klon,klev,naero_spc), INTENT(in) :: m_allaer
     59  REAL, DIMENSION(klon,klev,naero_tot), INTENT(in) :: m_allaer
    6060  REAL, DIMENSION(klon,klev), INTENT(in)   :: RHcl     ! humidite relative ciel clair
    6161  INTEGER,INTENT(in)                       :: flag_aerosol
     
    6767  !
    6868  REAL, DIMENSION(klon), INTENT(out)          :: ai      ! POLDER aerosol index
    69   REAL, DIMENSION(klon,nwave,naero_spc), INTENT(out)      :: tausum
    70   REAL, DIMENSION(klon,klev,nwave,naero_spc), INTENT(out) :: tau
     69!  REAL, DIMENSION(klon,nwave,naero_spc), INTENT(out)      :: tausum
     70!  REAL, DIMENSION(klon,klev,nwave,naero_spc), INTENT(out) :: tau
     71  REAL, DIMENSION(klon,nwave,naero_tot), INTENT(out)      :: tausum
     72  REAL, DIMENSION(klon,klev,nwave,naero_tot), INTENT(out) :: tau
    7173
    7274
     
    7779  LOGICAL :: soluble
    7880 
    79   INTEGER :: i, k, ierr, m
     81  INTEGER :: i, k, ierr, m, aerindex
    8082  INTEGER :: spsol, spinsol, spss, la
    8183  INTEGER :: RH_num(klon,klev)
     
    156158  REAL :: piz_aeri_5wv(las,naero_insoluble)           ! Insoluble comp. 1- Dust: 2- BC; 3- POM
    157159
    158   REAL, DIMENSION(klon,klev,naero_spc) :: mass_temp
     160  REAL, DIMENSION(klon,klev,naero_tot) :: mass_temp
    159161 
    160162  !
     
    639641     nb_aer = 2
    640642     ALLOCATE (aerosol_name(nb_aer))
    641      aerosol_name(1) = id_ASSO4M
    642      aerosol_name(2) = id_CSSO4M
     643     aerosol_name(1) = id_ASSO4M_phy
     644     aerosol_name(2) = id_CSSO4M_phy
    643645  ELSEIF (flag_aerosol .EQ. 2) THEN
    644646     nb_aer = 2
    645647     ALLOCATE (aerosol_name(nb_aer))
    646      aerosol_name(1) = id_ASBCM
    647      aerosol_name(2) = id_AIBCM
     648     aerosol_name(1) = id_ASBCM_phy
     649     aerosol_name(2) = id_AIBCM_phy
    648650  ELSEIF (flag_aerosol .EQ. 3) THEN
    649651     nb_aer = 2
    650652     ALLOCATE (aerosol_name(nb_aer))
    651      aerosol_name(1) = id_ASPOMM
    652      aerosol_name(2) = id_AIPOMM
     653     aerosol_name(1) = id_ASPOMM_phy
     654     aerosol_name(2) = id_AIPOMM_phy
    653655  ELSEIF (flag_aerosol .EQ. 4) THEN
    654656     nb_aer = 3
    655657     ALLOCATE (aerosol_name(nb_aer))
    656      aerosol_name(1) = id_CSSSM
    657      aerosol_name(2) = id_SSSSM
    658      aerosol_name(3) = id_ASSSM
     658     aerosol_name(1) = id_CSSSM_phy
     659     aerosol_name(2) = id_SSSSM_phy
     660     aerosol_name(3) = id_ASSSM_phy
    659661  ELSEIF (flag_aerosol .EQ. 5) THEN
    660662     nb_aer = 1
    661663     ALLOCATE (aerosol_name(nb_aer))
    662      aerosol_name(1) = id_CIDUSTM
     664     aerosol_name(1) = id_CIDUSTM_phy
    663665  ELSEIF (flag_aerosol .EQ. 6) THEN
    664666     nb_aer = 10
    665667     ALLOCATE (aerosol_name(nb_aer))
    666      aerosol_name(1) = id_ASSO4M     
    667      aerosol_name(2) = id_ASBCM
    668      aerosol_name(3) = id_AIBCM
    669      aerosol_name(4) = id_ASPOMM
    670      aerosol_name(5) = id_AIPOMM
    671      aerosol_name(6) = id_CSSSM
    672      aerosol_name(7) = id_SSSSM
    673      aerosol_name(8) = id_ASSSM
    674      aerosol_name(9) = id_CIDUSTM
    675      aerosol_name(10) = id_CSSO4M
     668     aerosol_name(1) = id_ASSO4M_phy
     669     aerosol_name(2) = id_ASBCM_phy
     670     aerosol_name(3) = id_AIBCM_phy
     671     aerosol_name(4) = id_ASPOMM_phy
     672     aerosol_name(5) = id_AIPOMM_phy
     673     aerosol_name(6) = id_CSSSM_phy
     674     aerosol_name(7) = id_SSSSM_phy
     675     aerosol_name(8) = id_ASSSM_phy
     676     aerosol_name(9) = id_CIDUSTM_phy
     677     aerosol_name(10) = id_CSSO4M_phy
    676678  ENDIF
    677679
     
    712714  DO m=1,nb_aer   ! tau is only computed for each mass   
    713715    fac=1.0
    714     IF (aerosol_name(m).EQ.id_ASBCM) THEN
     716    IF (aerosol_name(m).EQ.id_ASBCM_phy) THEN
    715717        soluble=.TRUE.
    716718        spsol=1
    717719        spss=0
    718     ELSEIF (aerosol_name(m).EQ.id_ASPOMM) THEN
     720    ELSEIF (aerosol_name(m).EQ.id_ASPOMM_phy) THEN
    719721        soluble=.TRUE.
    720722        spsol=2
    721723        spss=0
    722     ELSEIF (aerosol_name(m).EQ.id_ASSO4M) THEN
     724    ELSEIF (aerosol_name(m).EQ.id_ASSO4M_phy) THEN
    723725        soluble=.TRUE.
    724726        spsol=3
    725727        spss=0
    726728        fac=1.375    ! (NH4)2-SO4/SO4 132/96 mass conversion factor for OD
    727     ELSEIF (aerosol_name(m).EQ.id_CSSO4M) THEN
     729    ELSEIF (aerosol_name(m).EQ.id_CSSO4M_phy) THEN
    728730        soluble=.TRUE.
    729731        spsol=4
    730732        spss=0
    731733        fac=1.375    ! (NH4)2-SO4/SO4 132/96 mass conversion factor for OD
    732     ELSEIF (aerosol_name(m).EQ.id_SSSSM) THEN
     734    ELSEIF (aerosol_name(m).EQ.id_SSSSM_phy) THEN
    733735        soluble=.TRUE.
    734736        spsol=5
    735737        spss=3
    736     ELSEIF (aerosol_name(m).EQ.id_CSSSM) THEN
     738    ELSEIF (aerosol_name(m).EQ.id_CSSSM_phy) THEN
    737739        soluble=.TRUE.
    738740        spsol=6
    739741        spss=2
    740     ELSEIF (aerosol_name(m).EQ.id_ASSSM) THEN
     742    ELSEIF (aerosol_name(m).EQ.id_ASSSM_phy) THEN
    741743        soluble=.TRUE.
    742744        spsol=7
    743745        spss=1
    744     ELSEIF (aerosol_name(m).EQ.id_CIDUSTM) THEN
     746    ELSEIF (aerosol_name(m).EQ.id_CIDUSTM_phy) THEN
    745747        soluble=.FALSE.
    746748        spinsol=1
    747749        spss=0
    748     ELSEIF  (aerosol_name(m).EQ.id_AIBCM) THEN
     750    ELSEIF  (aerosol_name(m).EQ.id_AIBCM_phy) THEN
    749751        soluble=.FALSE.
    750752        spinsol=2
    751753        spss=0
    752     ELSEIF (aerosol_name(m).EQ.id_AIPOMM) THEN
     754    ELSEIF (aerosol_name(m).EQ.id_AIPOMM_phy) THEN
    753755        soluble=.FALSE.
    754756        spinsol=3
     
    765767      used_tau(naero_soluble+spinsol)=.TRUE.
    766768    ENDIF
     769
     770    aerindex=aerosol_name(m)
    767771
    768772    DO la=1,las
     
    779783                H=rh(i,k)/100
    780784                tau_ae5wv_int=A1_ASSSM(k)+A2_ASSSM(k)*H+A3_ASSSM(k)/(H-1.05)
    781                 tau(i,k,la,spsol) = mass_temp(i,k,spsol)*1000.*zdp1(i,k)   &
     785                tau(i,k,la,aerindex) = mass_temp(i,k,aerindex)*1000.*zdp1(i,k)   &
    782786                                   *tau_ae5wv_int*delt*fac
    783                 tausum(i,la,spsol)=tausum(i,la,spsol)+tau(i,k,la,spsol)
     787                tausum(i,la,aerindex)=tausum(i,la,aerindex)+tau(i,k,la,aerindex)
    784788              ENDDO
    785789            ENDDO
     
    794798                H=rh(i,k)/100
    795799                tau_ae5wv_int=A1_CSSSM(k)+A2_CSSSM(k)*H+A3_CSSSM(k)/(H-1.05)
    796                 tau(i,k,la,spsol) = mass_temp(i,k,spsol)*1000.*zdp1(i,k)  &
     800                tau(i,k,la,aerindex) = mass_temp(i,k,aerindex)*1000.*zdp1(i,k)  &
    797801                                   *tau_ae5wv_int*delt*fac
    798                 tausum(i,la,spsol) = tausum(i,la,spsol)+tau(i,k,la,spsol)
     802                tausum(i,la,aerindex) = tausum(i,la,aerindex)+tau(i,k,la,aerindex)
    799803              ENDDO
    800804            ENDDO
     
    809813                H=rh(i,k)/100
    810814                tau_ae5wv_int=A1_SSSSM(k)+A2_SSSSM(k)*H+A3_SSSSM(k)/(H-1.05)
    811                 tau(i,k,la,spsol) = mass_temp(i,k,spsol)*1000.*zdp1(i,k)  &
     815                tau(i,k,la,aerindex) = mass_temp(i,k,aerindex)*1000.*zdp1(i,k)  &
    812816                                   *tau_ae5wv_int*delt*fac
    813                 tausum(i,la,spsol)=tausum(i,la,spsol)+tau(i,k,la,spsol)
     817                tausum(i,la,aerindex)=tausum(i,la,aerindex)+tau(i,k,la,aerindex)
    814818              ENDDO
    815819            ENDDO
     
    824828                              alpha_aers_5wv(RH_num(i,k),la,spsol))
    825829
    826               tau(i,k,la,spsol) = mass_temp(i,k,spsol)*1000.*zdp1(i,k)   &
     830              tau(i,k,la,aerindex) = mass_temp(i,k,aerindex)*1000.*zdp1(i,k)   &
    827831                                 *tau_ae5wv_int*delt*fac
    828               tausum(i,la,spsol)=tausum(i,la,spsol)+tau(i,k,la,spsol)
     832              tausum(i,la,aerindex)=tausum(i,la,aerindex)+tau(i,k,la,aerindex)
    829833            ENDDO
    830834          ENDDO
     
    836840          DO i=1, KLON
    837841            tau_ae5wv_int = alpha_aeri_5wv(la,spinsol)
    838             tau(i,k,la,naero_soluble+spinsol) = mass_temp(i,k,naero_soluble+spinsol)*1000.*zdp1(i,k)* &
     842            tau(i,k,la,aerindex) = mass_temp(i,k,aerindex)*1000.*zdp1(i,k)* &
    839843                                                tau_ae5wv_int*delt*fac
    840             tausum(i,la,naero_soluble+spinsol)= tausum(i,la,naero_soluble+spinsol)  &
    841                                                +tau(i,k,la,naero_soluble+spinsol)
     844            tausum(i,la,aerindex)= tausum(i,la,aerindex)+tau(i,k,la,aerindex)
    842845          ENDDO
    843846        ENDDO
     
    880883  END DO
    881884 
    882    od550lt1aer(:)=tausum(:,2,id_ASSO4M)+tausum(:,2,id_ASBCM)+tausum(:,2,id_AIBCM)+ &
    883         tausum(:,2,id_ASPOMM)+tausum(:,2,id_AIPOMM)+tausum(:,2,id_ASSSM)+ &
    884         0.03*tausum(:,2,id_CSSSM)+0.4*tausum(:,2,id_CIDUSTM)
     885   od550lt1aer(:)=tausum(:,2,id_ASSO4M_phy)+tausum(:,2,id_ASBCM_phy)+tausum(:,2,id_AIBCM_phy)+ &
     886        tausum(:,2,id_ASPOMM_phy)+tausum(:,2,id_AIPOMM_phy)+tausum(:,2,id_ASSSM_phy)+ &
     887        0.03*tausum(:,2,id_CSSSM_phy)+0.4*tausum(:,2,id_CIDUSTM_phy)
    885888
    886889
Note: See TracChangeset for help on using the changeset viewer.