Changeset 1246 for LMDZ4


Ignore:
Timestamp:
Sep 23, 2009, 4:47:40 PM (15 years ago)
Author:
Laurent Fairhead
Message:
  • En deconnectant les aérosols (ok_ade=ok_aie=n) on a les mêmes

résultats avant et après les modifs.

  • preindustrial readin fields are used to compute natural aerosol fields

to allow for clean double calls to radiation

  • full forcing diagnostics (NAT, ANT, ZERO, Cloud forcing, CS,AS) are

activated with lev_histmth 4, If lev_histmth is not 4, the call to the
radiation is minimized, for efficiency, but ade and aie are computed and
applied (however for species wise forcing one would need to do
difference runs) (still quite a bit new forcing info, requires probably

some more explanation)

  • there is a hardcoded key in sw_aeroAR4.F90 which lets you choose to use the zero aerosol, or natural aerosol perturbation acting on the meteorology, but still would put out the full forcing diagnostics.
  • aod fields from offline aerosol fields are also output in histmth for

all aerosol tracers read in and available for evaluation

  • aeropt contains the ss humidity correction from nicolas&yves
Location:
LMDZ4/branches/LMDZ4-dev/libf/phylmd
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • LMDZ4/branches/LMDZ4-dev/libf/phylmd/aeropt_2bands.F90

    r1237 r1246  
    55     pdel, m_allaer, delt, RHcl, &
    66     tau_allaer, piz_allaer, &
    7      cg_allaer, fractnat_allaer, &
     7     cg_allaer, m_allaer_pi, &
    88     flag_aerosol, pplay, t_seri, presnivs)
    99
     
    2727  REAL,                           INTENT(in)  :: delt
    2828  REAL, DIMENSION(klon,klev,naero_spc),   INTENT(in)  :: m_allaer
     29!RAF
     30  REAL, DIMENSION(klon,klev,naero_spc),   INTENT(in)  :: m_allaer_pi
    2931  REAL, DIMENSION(klon,klev),     INTENT(in)  :: RHcl       ! humidite relative ciel clair
    30   REAL, DIMENSION(klon,naero_tot),INTENT(in)  :: fractnat_allaer
     32!RAF  REAL, DIMENSION(klon,naero_tot),INTENT(in)  :: fractnat_allaer
    3133  INTEGER,                        INTENT(in)  :: flag_aerosol
    3234  REAL, DIMENSION(klon,klev),     INTENT(in)  :: pplay
     
    4446  !
    4547  REAL, DIMENSION(klon,klev,naero_tot,nbands) ::  tau_ae
     48!RAF
     49  REAL, DIMENSION(klon,klev,naero_tot,nbands) ::  tau_ae_pi
    4650  REAL, DIMENSION(klon,klev,naero_tot,nbands) ::  piz_ae
    4751  REAL, DIMENSION(klon,klev,naero_tot,nbands) ::  cg_ae
     
    5357
    5458  INTEGER, PARAMETER :: nbre_RH=12
    55   INTEGER, PARAMETER :: naero_soluble=7    ! 1- BC soluble; 2- POM soluble; 3- SO4.
     59  INTEGER, PARAMETER :: naero_soluble=7    ! 1- BC soluble; 2- POM soluble; 3- SO4. acc. 4- SO4 coarse
     60                                           ! 5- seasalt super coarse  6- seasalt coarse   7- seasalt acc.
    5661  INTEGER, PARAMETER :: naero_insoluble=3  ! 1- Dust; 2- BC insoluble; 3- POM insoluble
    5762  LOGICAL, SAVE :: firstcall=.TRUE.
     
    101106  INTEGER :: nb_aer
    102107  REAL, DIMENSION(klon,klev,naero_spc) :: mass_temp
     108!RAF
     109  REAL, DIMENSION(klon,klev,naero_spc) :: mass_temp_pi
    103110
    104111  !
     
    563570        zrho=pplay(i,k)/t_seri(i,k)/RD                    ! kg/m3
    564571        mass_temp(i,k,:) = m_allaer(i,k,:) / zrho / 1.e+9
     572!RAF zrho
     573        mass_temp_pi(i,k,:) = m_allaer_pi(i,k,:) / zrho / 1.e+9
    565574     ENDDO
    566575  ENDDO
     
    615624
    616625  tau_ae(:,:,:,:)=0.
     626!RAF
     627  tau_ae_pi(:,:,:,:)=0.
    617628  piz_ae(:,:,:,:)=0.
    618629  cg_ae(:,:,:,:)=0.
     
    749760                      mass_temp(i,k,spsol)*1000.*zdp1(i,k)*delt* &
    750761                                         tau_ae2b_int(i,k,inu)*fac
     762!RAF fac
     763                  tau_ae_pi(i,k,aerosol_name(m),inu) = &
     764                     mass_temp_pi(i,k,spsol)*1000.*zdp1(i,k)*delt* &
     765                                           tau_ae2b_int(i,k,inu)*fac
    751766
    752767              ELSE                                                    ! For all aerosol insoluble components
     
    758773                      mass_temp(i,k,naero_soluble+ spinsol)*1000.*zdp1(i,k)* &
    759774                                               delt*tau_ae2b_int(i,k,inu)*fac
     775!RAF fac
     776                 tau_ae_pi(i,k,aerosol_name(m),inu) = &
     777                    mass_temp_pi(i,k,naero_soluble+ spinsol)*1000.*zdp1(i,k)* &
     778                                                 delt*tau_ae2b_int(i,k,inu)*fac
    760779              ENDIF
    761780
     
    807826
    808827              ELSEIF (mrfspecies .EQ. 3) THEN             ! = natural aerosol NAT
    809                  tau_allaer(i,k,mrfspecies,inu)=tau_ae(i,k,id_ASSO4M,inu)*fractnat_allaer(i,id_ASSO4M)+ &
    810                       tau_ae(i,k,id_CSSO4M,inu)*fractnat_allaer(i,id_CSSO4M)+ &
    811                       tau_ae(i,k,id_ASBCM,inu)*fractnat_allaer(i,id_ASBCM)+ &
    812                       tau_ae(i,k,id_AIBCM,inu)*fractnat_allaer(i,id_AIBCM)+ &
    813                       tau_ae(i,k,id_ASPOMM,inu)*fractnat_allaer(i,id_ASPOMM)+ &
    814                       tau_ae(i,k,id_AIPOMM,inu)*fractnat_allaer(i,id_AIPOMM)+ &
    815                       tau_ae(i,k,id_ASSSM,inu)*fractnat_allaer(i,id_ASSSM)+ &
    816                       tau_ae(i,k,id_CSSSM,inu)*fractnat_allaer(i,id_CSSSM)+ &
    817                       tau_ae(i,k,id_SSSSM,inu)*fractnat_allaer(i,id_SSSSM)+ &
    818                       tau_ae(i,k,id_CIDUSTM,inu)*fractnat_allaer(i,id_CIDUSTM)
     828!RAF
     829                 tau_allaer(i,k,mrfspecies,inu)=tau_ae_pi(i,k,id_ASSO4M,inu)+ &
     830                      tau_ae_pi(i,k,id_CSSO4M,inu)+ &
     831                      tau_ae_pi(i,k,id_ASBCM,inu)+ &
     832                      tau_ae_pi(i,k,id_AIBCM,inu)+ &
     833                      tau_ae_pi(i,k,id_ASPOMM,inu)+ &
     834                      tau_ae_pi(i,k,id_AIPOMM,inu)+ &   
     835                      tau_ae_pi(i,k,id_ASSSM,inu)+ &
     836                      tau_ae_pi(i,k,id_CSSSM,inu)+ &
     837                      tau_ae_pi(i,k,id_SSSSM,inu)+ &
     838                      tau_ae_pi(i,k,id_CIDUSTM,inu)
    819839                 tau_allaer(i,k,mrfspecies,inu)=MAX(tau_allaer(i,k,mrfspecies,inu),1e-20)
    820840
    821                  piz_allaer(i,k,mrfspecies,inu)=(tau_ae(i,k,id_ASSO4M,inu)*fractnat_allaer(i,id_ASSO4M)*piz_ae(i,k,id_ASSO4M,inu)+ &
    822                       tau_ae(i,k,id_CSSO4M,inu)*fractnat_allaer(i,id_CSSO4M)*piz_ae(i,k,id_CSSO4M,inu)+ &
    823                       tau_ae(i,k,id_ASBCM,inu)*fractnat_allaer(i,id_ASBCM)*piz_ae(i,k,id_ASBCM,inu)+ &
    824                       tau_ae(i,k,id_AIBCM,inu)*fractnat_allaer(i,id_AIBCM)*piz_ae(i,k,id_AIBCM,inu)+ &
    825                       tau_ae(i,k,id_ASPOMM,inu)*fractnat_allaer(i,id_ASPOMM)*piz_ae(i,k,id_ASPOMM,inu)+ &
    826                       tau_ae(i,k,id_AIPOMM,inu)*fractnat_allaer(i,id_AIPOMM)*piz_ae(i,k,id_AIPOMM,inu)+ &       
    827                       tau_ae(i,k,id_ASSSM,inu)*fractnat_allaer(i,id_ASSSM)*piz_ae(i,k,id_ASSSM,inu)+ &
    828                       tau_ae(i,k,id_CSSSM,inu)*fractnat_allaer(i,id_CSSSM)*piz_ae(i,k,id_CSSSM,inu)+ &
    829                       tau_ae(i,k,id_SSSSM,inu)*fractnat_allaer(i,id_SSSSM)*piz_ae(i,k,id_SSSSM,inu)+ &
    830                       tau_ae(i,k,id_CIDUSTM,inu)*fractnat_allaer(i,id_CIDUSTM)*piz_ae(i,k,id_CIDUSTM,inu)) &
     841                 piz_allaer(i,k,mrfspecies,inu)=(tau_ae_pi(i,k,id_ASSO4M,inu)*piz_ae(i,k,id_ASSO4M,inu)+ &
     842                      tau_ae_pi(i,k,id_CSSO4M,inu)*piz_ae(i,k,id_CSSO4M,inu)+ &
     843                      tau_ae_pi(i,k,id_ASBCM,inu)*piz_ae(i,k,id_ASBCM,inu)+ &
     844                      tau_ae_pi(i,k,id_AIBCM,inu)*piz_ae(i,k,id_AIBCM,inu)+ &
     845                      tau_ae_pi(i,k,id_ASPOMM,inu)*piz_ae(i,k,id_ASPOMM,inu)+ &
     846                      tau_ae_pi(i,k,id_AIPOMM,inu)*piz_ae(i,k,id_AIPOMM,inu)+ &
     847                      tau_ae_pi(i,k,id_ASSSM,inu)*piz_ae(i,k,id_ASSSM,inu)+ &
     848                      tau_ae_pi(i,k,id_CSSSM,inu)*piz_ae(i,k,id_CSSSM,inu)+ &
     849                      tau_ae_pi(i,k,id_SSSSM,inu)*piz_ae(i,k,id_SSSSM,inu)+ &
     850                      tau_ae_pi(i,k,id_CIDUSTM,inu)*piz_ae(i,k,id_CIDUSTM,inu)) &
    831851                      /tau_allaer(i,k,mrfspecies,inu)
    832852                 piz_allaer(i,k,mrfspecies,inu)=MAX(piz_allaer(i,k,mrfspecies,inu),1e-20)
    833853
    834854                 cg_allaer(i,k,mrfspecies,inu)=(&
    835                       tau_ae(i,k,id_ASSO4M,inu)*fractnat_allaer(i,id_ASSO4M)*piz_ae(i,k,id_ASSO4M,inu)*cg_ae(i,k,id_ASSO4M,inu)+ &
    836                       tau_ae(i,k,id_CSSO4M,inu)*fractnat_allaer(i,id_CSSO4M)*piz_ae(i,k,id_CSSO4M,inu)*cg_ae(i,k,id_CSSO4M,inu)+ &
    837                       tau_ae(i,k,id_ASBCM,inu)*fractnat_allaer(i,id_ASBCM)*piz_ae(i,k,id_ASBCM,inu)*cg_ae(i,k,id_ASBCM,inu)+ &
    838                       tau_ae(i,k,id_AIBCM,inu)*fractnat_allaer(i,id_AIBCM)*piz_ae(i,k,id_AIBCM,inu)*cg_ae(i,k,id_AIBCM,inu)+ &
    839                       tau_ae(i,k,id_ASPOMM,inu)*fractnat_allaer(i,id_ASPOMM)*piz_ae(i,k,id_ASPOMM,inu)*cg_ae(i,k,id_ASPOMM,inu)+ &
    840                       tau_ae(i,k,id_AIPOMM,inu)*fractnat_allaer(i,id_AIPOMM)*piz_ae(i,k,id_AIPOMM,inu)*cg_ae(i,k,id_AIPOMM,inu)+ &
    841                       tau_ae(i,k,id_ASSSM,inu)*fractnat_allaer(i,id_ASSSM)*piz_ae(i,k,id_ASSSM,inu)*cg_ae(i,k,id_ASSSM,inu)+ &
    842                       tau_ae(i,k,id_CSSSM,inu)*fractnat_allaer(i,id_CSSSM)*piz_ae(i,k,id_CSSSM,inu)*cg_ae(i,k,id_CSSSM,inu)+ &
    843                       tau_ae(i,k,id_SSSSM,inu)*fractnat_allaer(i,id_SSSSM)*piz_ae(i,k,id_SSSSM,inu)*cg_ae(i,k,id_SSSSM,inu)+ &
    844                       tau_ae(i,k,id_CIDUSTM,inu)*fractnat_allaer(i,id_CIDUSTM)*piz_ae(i,k,id_CIDUSTM,inu)*&
     855                      tau_ae_pi(i,k,id_ASSO4M,inu)*piz_ae(i,k,id_ASSO4M,inu)*cg_ae(i,k,id_ASSO4M,inu)+ &
     856                      tau_ae_pi(i,k,id_CSSO4M,inu)*piz_ae(i,k,id_CSSO4M,inu)*cg_ae(i,k,id_CSSO4M,inu)+ &
     857                      tau_ae_pi(i,k,id_ASBCM,inu)*piz_ae(i,k,id_ASBCM,inu)*cg_ae(i,k,id_ASBCM,inu)+ &
     858                      tau_ae_pi(i,k,id_AIBCM,inu)*piz_ae(i,k,id_AIBCM,inu)*cg_ae(i,k,id_AIBCM,inu)+ &
     859                      tau_ae_pi(i,k,id_ASPOMM,inu)*piz_ae(i,k,id_ASPOMM,inu)*cg_ae(i,k,id_ASPOMM,inu)+ &
     860                      tau_ae_pi(i,k,id_AIPOMM,inu)*piz_ae(i,k,id_AIPOMM,inu)*cg_ae(i,k,id_AIPOMM,inu)+ &
     861                      tau_ae_pi(i,k,id_ASSSM,inu)*piz_ae(i,k,id_ASSSM,inu)*cg_ae(i,k,id_ASSSM,inu)+ &
     862                      tau_ae_pi(i,k,id_CSSSM,inu)*piz_ae(i,k,id_CSSSM,inu)*cg_ae(i,k,id_CSSSM,inu)+ &
     863                      tau_ae_pi(i,k,id_SSSSM,inu)*piz_ae(i,k,id_SSSSM,inu)*cg_ae(i,k,id_SSSSM,inu)+ &
     864                      tau_ae_pi(i,k,id_CIDUSTM,inu)*piz_ae(i,k,id_CIDUSTM,inu)*&
    845865                      cg_ae(i,k,id_CIDUSTM,inu))/ &
    846866                      (tau_allaer(i,k,mrfspecies,inu)*piz_allaer(i,k,mrfspecies,inu))
    847867
     868!END RAF
    848869              ELSEIF (mrfspecies .EQ. 4) THEN             ! = BC
    849870                 tau_allaer(i,k,mrfspecies,inu)=tau_ae(i,k,id_ASBCM,inu)+tau_ae(i,k,id_AIBCM,inu)
  • LMDZ4/branches/LMDZ4-dev/libf/phylmd/aeropt_5wv.F90

    r1237 r1246  
    1111  USE DIMPHY
    1212  USE aero_mod
    13   USE mod_phys_lmdz_para, ONLY : mpi_rank
     13
    1414  !
    1515  !    Yves Balkanski le 12 avril 2006
     
    8484  INTEGER, PARAMETER :: nbre_RH=12
    8585  INTEGER, PARAMETER :: naero_soluble=7   !  1- BC soluble; 2- POM soluble; 3- SO4 acc.
    86                                           ! 4- SO4 coarse; 5 seasalt super-C; 6 seasalt coarse; 7 seasalt acc.
     86                                          !  4- SO4 coarse; 5 seasalt super-C; 6 seasalt coarse; 7 seasalt acc.
    8787  INTEGER, PARAMETER :: naero_insoluble=3 !  1- Dust; 2- BC insoluble; 3- POM insoluble
    88   INTEGER, PARAMETER :: nb_level = 19 ! number of vertical levels
     88  INTEGER, PARAMETER :: nb_level = 19     ! number of vertical levels
    8989  LOGICAL, SAVE :: firstcall=.TRUE.
    9090
     
    281281!*********************************************************************
    282282!
    283   !
    284   !
    285   !
    286   ! From here on we look at the optical parameters at 5 wavelengths:
    287   ! 443nm, 550, 670, 765 and 865 nm
    288   !                                   le 12 AVRIL 2006
    289   !
    290  DATA alpha_aers_5wv/ &
    291                                 ! bc soluble
    292        7.930,7.930,7.930,7.930,7.930,7.930,     &
    293        7.930,7.930,10.893,12.618,14.550,16.613, &
    294        7.658,7.658,7.658,7.658,7.658,7.658,     &
    295        7.658,7.658,10.351,11.879,13.642,15.510, &
    296        7.195,7.195,7.195,7.195,7.195,7.195,     &
    297        7.195,7.195,9.551,10.847,12.381,13.994,  &
    298        6.736,6.736,6.736,6.736,6.736,6.736,     &
    299        6.736,6.736,8.818,9.938,11.283,12.687,   &
    300        6.277,6.277,6.277,6.277,6.277,6.277,     &
    301        6.277,6.277,8.123,9.094,10.275,11.501,   &
    302                                 ! pom soluble
    303        6.676,6.676,6.676,6.676,6.710,6.934,   &
    304        7.141,7.569,8.034,8.529,9.456,10.511,  &
    305        5.109,5.109,5.109,5.109,5.189,5.535,   &
    306        5.960,6.852,8.008,9.712,12.897,19.676, &
    307        3.718,3.718,3.718,3.718,3.779,4.042,   &
    308        4.364,5.052,5.956,7.314,9.896,15.688,  &
    309        2.849,2.849,2.849,2.849,2.897,3.107,   &
    310        3.365,3.916,4.649,5.760,7.900,12.863,  &
    311        2.229,2.229,2.229,2.229,2.268,2.437,   &
    312        2.645,3.095,3.692,4.608,6.391,10.633,  &
    313                                 ! Sulfate (Accumulation)
    314        5.751,6.215,6.690,7.024,7.599,8.195,      &
    315        9.156,10.355,12.660,14.823,18.908,24.508, &
    316        4.320,4.675,5.052,5.375,5.787,6.274,      &
    317        7.066,8.083,10.088,12.003,15.697,21.133,  &
    318        3.079,3.351,3.639,3.886,4.205,4.584,      &
    319        5.206,6.019,7.648,9.234,12.391,17.220,    &
    320        2.336,2.552,2.781,2.979,3.236,3.540,      &
    321        4.046,4.711,6.056,7.388,10.093,14.313,    &
    322        1.777,1.949,2.134,2.292,2.503,2.751,      &
    323        3.166,3.712,4.828,5.949,8.264,11.922,     &
    324                                 ! Sulfate (Coarse)
    325        5.751,6.215,6.690,7.024,7.599,8.195,      &
    326        9.156,10.355,12.660,14.823,18.908,24.508, &
    327        4.320,4.675,5.052,5.375,5.787,6.274,      &
    328        7.066,8.083,10.088,12.003,15.697,21.133,  &
    329        3.079,3.351,3.639,3.886,4.205,4.584,      &
    330        5.206,6.019,7.648,9.234,12.391,17.220,    &
    331        2.336,2.552,2.781,2.979,3.236,3.540,      &
    332        4.046,4.711,6.056,7.388,10.093,14.313,    &
    333        1.777,1.949,2.134,2.292,2.503,2.751,      &
    334        3.166,3.712,4.828,5.949,8.264,11.922,     &
    335                                 ! Seasalt soluble super_coarse (computed below for 550nm)
    336        0.50,0.90,1.05,1.21,1.40,2.41, &
    337        2.66,3.11,3.88,4.52,5.69,8.84, &
    338        0.000,0.000,0.000,0.000,0.000,0.000, &
    339        0.000,0.000,0.000,0.000,0.000,0.000, &
    340      0.52,0.93,1.08,1.24,1.43,2.47, &
    341      2.73,3.20,3.99,4.64,5.84,9.04, &
    342      0.52,0.93,1.09,1.25,1.44,2.50, &
    343      2.76,3.23,4.03,4.68,5.89,9.14, &
    344      0.52,0.94,1.09,1.26,1.45,2.51, &
    345      2.78,3.25,4.06,4.72,5.94,9.22, &
    346                                 ! seasalt soluble coarse (computed below for 550nm)
    347        0.50,0.90,1.05,1.21,1.40,2.41, &
    348        2.66,3.11,3.88,4.52,5.69,8.84, &
    349        0.000,0.000,0.000,0.000,0.000,0.000, &
    350        0.000,0.000,0.000,0.000,0.000,0.000, &
    351      0.52,0.93,1.08,1.24,1.43,2.47, &
    352      2.73,3.20,3.99,4.64,5.84,9.04, &
    353      0.52,0.93,1.09,1.25,1.44,2.50, &
    354      2.76,3.23,4.03,4.68,5.89,9.14, &
    355      0.52,0.94,1.09,1.26,1.45,2.51, &
    356      2.78,3.25,4.06,4.72,5.94,9.22, &
    357                                 ! seasalt soluble accumulation (computed below for 550nm)
    358      4.28, 7.17, 8.44, 9.85,11.60,22.44,  &
    359      25.34,30.54,39.38,46.52,59.33,91.77, &
    360        0.000,0.000,0.000,0.000,0.000,0.000, &
    361        0.000,0.000,0.000,0.000,0.000,0.000, &
    362      2.48, 4.22, 5.02, 5.94, 7.11,15.29,  &
    363      17.70,22.31,30.73,38.06,52.15,90.59, &
    364      1.90, 3.29, 3.94, 4.69, 5.65, 12.58, &
    365      14.68,18.77,26.41,33.25,46.77,85.50, &
    366      1.47, 2.59, 3.12, 3.74, 4.54, 10.42, &
    367      12.24,15.82,22.66,28.91,41.54,79.33/
     283!
     284!
     285!
     286! From here on we look at the optical parameters at 5 wavelengths:
     287! 443nm, 550, 670, 765 and 865 nm
     288!                                   le 12 AVRIL 2006
     289!
     290  DATA alpha_aers_5wv/ &
     291     ! bc soluble
     292     7.930,7.930,7.930,7.930,7.930,7.930,     &
     293     7.930,7.930,10.893,12.618,14.550,16.613, &
     294     7.658,7.658,7.658,7.658,7.658,7.658,     &
     295     7.658,7.658,10.351,11.879,13.642,15.510, &
     296     7.195,7.195,7.195,7.195,7.195,7.195,     &
     297     7.195,7.195,9.551,10.847,12.381,13.994,  &
     298     6.736,6.736,6.736,6.736,6.736,6.736,     &
     299     6.736,6.736,8.818,9.938,11.283,12.687,   &
     300     6.277,6.277,6.277,6.277,6.277,6.277,     &
     301     6.277,6.277,8.123,9.094,10.275,11.501,   &
     302     ! pom soluble
     303     6.676,6.676,6.676,6.676,6.710,6.934,   &
     304     7.141,7.569,8.034,8.529,9.456,10.511,  &
     305     5.109,5.109,5.109,5.109,5.189,5.535,   &
     306     5.960,6.852,8.008,9.712,12.897,19.676, &
     307     3.718,3.718,3.718,3.718,3.779,4.042,   &
     308     4.364,5.052,5.956,7.314,9.896,15.688,  &
     309     2.849,2.849,2.849,2.849,2.897,3.107,   &
     310     3.365,3.916,4.649,5.760,7.900,12.863,  &
     311     2.229,2.229,2.229,2.229,2.268,2.437,   &
     312     2.645,3.095,3.692,4.608,6.391,10.633,  &
     313     ! Sulfate
     314     5.751,6.215,6.690,7.024,7.599,8.195,      &
     315     9.156,10.355,12.660,14.823,18.908,24.508, &
     316     4.320,4.675,5.052,5.375,5.787,6.274,      &
     317     7.066,8.083,10.088,12.003,15.697,21.133,  &
     318     3.079,3.351,3.639,3.886,4.205,4.584,      &
     319     5.206,6.019,7.648,9.234,12.391,17.220,    &
     320     2.336,2.552,2.781,2.979,3.236,3.540,      &
     321     4.046,4.711,6.056,7.388,10.093,14.313,    &
     322     1.777,1.949,2.134,2.292,2.503,2.751,      &
     323     3.166,3.712,4.828,5.949,8.264,11.922/
    368324
    369325  DATA alpha_aeri_5wv/ &
    370                                 ! dust insoluble
    371        0.759, 0.770, 0.775, 0.775, 0.772, &
    372                                 !!jb bc insoluble
    373        11.536,10.033, 8.422, 7.234, 6.270, &
    374                                 ! pom insoluble
    375        5.042, 3.101, 1.890, 1.294, 0.934/
    376   !
    377  DATA cg_aers_5wv/ &
    378                                 ! bc soluble
    379        .651, .651, .651, .651, .651, .651, &
    380        .651, .651, .738, .764, .785, .800, &
    381        .597, .597, .597, .597, .597, .597, &
    382        .597, .597, .695, .725, .751, .770, &
    383        .543, .543, .543, .543, .543, .543, &
    384        .543, .543, .650, .684, .714, .736, &
    385        .504, .504, .504, .504, .504, .504, &
    386        .504, .504, .614, .651, .683, .708, &
    387        .469, .469, .469, .469, .469, .469, &
    388        .469, .469, .582, .620, .655, .681, &
    389                                 ! pom soluble
    390        .679, .679, .679, .679, .683, .691, &
    391        .703, .720, .736, .751, .766, .784, &
    392        .656, .656, .656, .656, .659, .669, &
    393        .681, .699, .717, .735, .750, .779, &
    394        .623, .623, .623, .623, .627, .637, &
    395        .649, .668, .688, .709, .734, .762, &
    396        .592, .592, .592, .592, .595, .605, &
    397        .618, .639, .660, .682, .711, .743, &
    398        .561, .561, .561, .561, .565, .575, &
    399        .588, .609, .632, .656, .688, .724, &
    400                                 ! Accumulation sulfate
    401        .671, .684, .697, .704, .714, .723, &
    402        .734, .746, .762, .771, .781, .789, &
    403        .653, .666, .678, .687, .697, .707, &
    404        .719, .732, .751, .762, .775, .789, &
    405        .622, .635, .648, .657, .667, .678, &
    406        .691, .705, .728, .741, .758, .777, &
    407        .591, .604, .617, .627, .638, .650, &
    408        .664, .679, .704, .719, .739, .761, &
    409        .560, .574, .587, .597, .609, .621, &
    410        .637, .653, .680, .697, .719, .745, &
    411                                 ! Coarse sulfate
    412        .671, .684, .697, .704, .714, .723, &
    413        .734, .746, .762, .771, .781, .789, &
    414        .653, .666, .678, .687, .697, .707, &
    415        .719, .732, .751, .762, .775, .789, &
    416        .622, .635, .648, .657, .667, .678, &
    417        .691, .705, .728, .741, .758, .777, &
    418        .591, .604, .617, .627, .638, .650, &
    419        .664, .679, .704, .719, .739, .761, &
    420        .560, .574, .587, .597, .609, .621, &
    421        .637, .653, .680, .697, .719, .745, &
    422                                 ! For super coarse seasalt (computed below for 550nm!)
    423       0.730,0.753,0.760,0.766,0.772,0.793, &
    424       0.797,0.802,0.809,0.813,0.820,0.830, &
    425        0.000,0.000,0.000,0.000,0.000,0.000, &
    426        0.000,0.000,0.000,0.000,0.000,0.000, &
    427      0.721,0.744,0.750,0.756,0.762,0.784, &
    428      0.787,0.793,0.800,0.804,0.811,0.822, &
    429      0.717,0.741,0.747,0.753,0.759,0.780, &
    430      0.784,0.789,0.795,0.800,0.806,0.817, &
    431      0.715,0.739,0.745,0.751,0.757,0.777, & 
    432      0.781,0.786,0.793,0.797,0.803,0.814, &
    433                                 ! For coarse-soluble seasalt (computed below for 550nm!)
    434      0.730,0.753,0.760,0.766,0.772,0.793, &
    435      0.797,0.802,0.809,0.813,0.820,0.830, &
    436        0.000,0.000,0.000,0.000,0.000,0.000, &
    437        0.000,0.000,0.000,0.000,0.000,0.000, &
    438      0.721,0.744,0.750,0.756,0.762,0.784, &
    439      0.787,0.793,0.800,0.804,0.811,0.822, &
    440      0.717,0.741,0.747,0.753,0.759,0.780, &
    441      0.784,0.789,0.795,0.800,0.806,0.817, &
    442      0.715,0.739,0.745,0.751,0.757,0.777, & 
    443      0.781,0.786,0.793,0.797,0.803,0.814, &
    444                                 ! accumulation-seasalt soluble (computed below for 550nm!)
    445      0.698,0.722,0.729,0.736,0.743,0.765, &
    446      0.768,0.773,0.777,0.779,0.781,0.779, &
    447        0.000,0.000,0.000,0.000,0.000,0.000, &
    448        0.000,0.000,0.000,0.000,0.000,0.000, &
    449      0.658,0.691,0.701,0.710,0.720,0.756, &
    450      0.763,0.771,0.782,0.788,0.795,0.801, &
    451      0.632,0.668,0.679,0.690,0.701,0.743, &
    452      0.750,0.762,0.775,0.783,0.792,0.804, &
    453      0.605,0.644,0.656,0.669,0.681,0.729, &
    454      0.737,0.750,0.765,0.775,0.787,0.803/
     326     ! dust insoluble
     327     0.759, 0.770, 0.775, 0.775, 0.772, &
     328     !!jb bc insoluble
     329     11.536,10.033, 8.422, 7.234, 6.270, &
     330     ! pom insoluble
     331     5.042, 3.101, 1.890, 1.294, 0.934/
     332
     333  DATA cg_aers_5wv/ &
     334     ! bc soluble
     335     .651, .651, .651, .651, .651, .651, &
     336     .651, .651, .738, .764, .785, .800, &
     337     .597, .597, .597, .597, .597, .597, &
     338     .597, .597, .695, .725, .751, .770, &
     339     .543, .543, .543, .543, .543, .543, &
     340     .543, .543, .650, .684, .714, .736, &
     341     .504, .504, .504, .504, .504, .504, &
     342     .504, .504, .614, .651, .683, .708, &
     343     .469, .469, .469, .469, .469, .469, &
     344     .469, .469, .582, .620, .655, .681, &
     345     ! pom soluble
     346     .679, .679, .679, .679, .683, .691, &
     347     .703, .720, .736, .751, .766, .784, &
     348     .656, .656, .656, .656, .659, .669, &
     349     .681, .699, .717, .735, .750, .779, &
     350     .623, .623, .623, .623, .627, .637, &
     351     .649, .668, .688, .709, .734, .762, &
     352     .592, .592, .592, .592, .595, .605, &
     353     .618, .639, .660, .682, .711, .743, &
     354     .561, .561, .561, .561, .565, .575, &
     355     .588, .609, .632, .656, .688, .724, &
     356     ! sulfate
     357     .671, .684, .697, .704, .714, .723, &
     358     .734, .746, .762, .771, .781, .789, &
     359     .653, .666, .678, .687, .697, .707, &
     360     .719, .732, .751, .762, .775, .789, &
     361     .622, .635, .648, .657, .667, .678, &
     362     .691, .705, .728, .741, .758, .777, &
     363     .591, .604, .617, .627, .638, .650, &
     364     .664, .679, .704, .719, .739, .761, &
     365     .560, .574, .587, .597, .609, .621, &
     366     .637, .653, .680, .697, .719, .745/
     367  !
    455368
    456369  DATA cg_aeri_5wv/&
     
    463376  !
    464377  DATA piz_aers_5wv/&
    465                                 ! bc soluble
    466        .445, .445, .445, .445, .445, .445, &
    467        .445, .445, .470, .487, .508, .531, &
    468        .442, .442, .442, .442, .442, .442, &
    469        .442, .442, .462, .481, .506, .533, &
    470        .427, .427, .427, .427, .427, .427, &
    471        .427, .427, .449, .470, .497, .526, &
    472        .413, .413, .413, .413, .413, .413, &
    473        .413, .413, .437, .458, .486, .516, &
    474        .399, .399, .399, .399, .399, .399, &
    475        .399, .399, .423, .445, .473, .506, &
    476                                 ! pom soluble
    477        .975, .975, .975, .975, .975, .977, &
    478        .979, .982, .984, .987, .990, .994, &
    479        .972, .972, .972, .972, .973, .974, &
    480        .977, .980, .983, .986, .989, .993, &
    481        .963, .963, .963, .963, .964, .966, &
    482        .969, .974, .977, .982, .986, .991, &
    483        .955, .955, .955, .955, .955, .958, &
    484        .962, .967, .972, .977, .983, .989, &
    485        .944, .944, .944, .944, .944, .948, &
    486        .952, .959, .962, .972, .979, .987, &
    487                                 ! sulfate soluble accumulation
    488        1.000,1.000,1.000,1.000,1.000,1.000, &
    489        1.000,1.000,1.000,1.000,1.000,1.000, &
    490        1.000,1.000,1.000,1.000,1.000,1.000, &
    491        1.000,1.000,1.000,1.000,1.000,1.000, &
    492        1.000,1.000,1.000,1.000,1.000,1.000, &
    493        1.000,1.000,1.000,1.000,1.000,1.000, &
    494        1.000,1.000,1.000,1.000,1.000,1.000, &
    495        1.000,1.000,1.000,1.000,1.000,1.000, &
    496        1.000,1.000,1.000,1.000,1.000,1.000, &
    497        1.000,1.000,1.000,1.000,1.000,1.000, &
    498                                 ! sulfate soluble coarse
    499        1.000,1.000,1.000,1.000,1.000,1.000, &
    500        1.000,1.000,1.000,1.000,1.000,1.000, &
    501        1.000,1.000,1.000,1.000,1.000,1.000, &
    502        1.000,1.000,1.000,1.000,1.000,1.000, &
    503        1.000,1.000,1.000,1.000,1.000,1.000, &
    504        1.000,1.000,1.000,1.000,1.000,1.000, &
    505        1.000,1.000,1.000,1.000,1.000,1.000, &
    506        1.000,1.000,1.000,1.000,1.000,1.000, &
    507        1.000,1.000,1.000,1.000,1.000,1.000, &
    508        1.000,1.000,1.000,1.000,1.000,1.000, &
    509                                 ! seasalt super coarse (computed below for 550nm)
    510        1.000,1.000,1.000,1.000,1.000,1.000, &
    511        1.000,1.000,1.000,1.000,1.000,1.000, &
    512        1.000,1.000,1.000,1.000,1.000,1.000, &
    513        1.000,1.000,1.000,1.000,1.000,1.000, &
    514        1.000,1.000,1.000,1.000,1.000,1.000, &
    515        1.000,1.000,1.000,1.000,1.000,1.000, &
    516        1.000,1.000,1.000,1.000,1.000,1.000, &
    517        1.000,1.000,1.000,1.000,1.000,1.000, &
    518        1.000,1.000,1.000,1.000,1.000,1.000, &
    519        1.000,1.000,1.000,1.000,1.000,1.000, &
    520                                 ! seasalt coarse (computed below for 550nm)
    521        1.000,1.000,1.000,1.000,1.000,1.000, &
    522        1.000,1.000,1.000,1.000,1.000,1.000, &
    523        1.000,1.000,1.000,1.000,1.000,1.000, &
    524        1.000,1.000,1.000,1.000,1.000,1.000, &
    525        1.000,1.000,1.000,1.000,1.000,1.000, &
    526        1.000,1.000,1.000,1.000,1.000,1.000, &
    527        1.000,1.000,1.000,1.000,1.000,1.000, &
    528        1.000,1.000,1.000,1.000,1.000,1.000, &
    529        1.000,1.000,1.000,1.000,1.000,1.000, &
    530        1.000,1.000,1.000,1.000,1.000,1.000, &
    531                                 ! seasalt soluble accumulation (computed below for 550nm)
    532        1.000,1.000,1.000,1.000,1.000,1.000, &
    533        1.000,1.000,1.000,1.000,1.000,1.000, &
    534        1.000,1.000,1.000,1.000,1.000,1.000, &
    535        1.000,1.000,1.000,1.000,1.000,1.000, &
    536        1.000,1.000,1.000,1.000,1.000,1.000, &
    537        1.000,1.000,1.000,1.000,1.000,1.000, &
    538        1.000,1.000,1.000,1.000,1.000,1.000, &
    539        1.000,1.000,1.000,1.000,1.000,1.000, &
    540        1.000,1.000,1.000,1.000,1.000,1.000, &
    541        1.000,1.000,1.000,1.000,1.000,1.000/
     378     ! bc soluble
     379     .445, .445, .445, .445, .445, .445, &
     380     .445, .445, .470, .487, .508, .531, &
     381     .442, .442, .442, .442, .442, .442, &
     382     .442, .442, .462, .481, .506, .533, &
     383     .427, .427, .427, .427, .427, .427, &
     384     .427, .427, .449, .470, .497, .526, &
     385     .413, .413, .413, .413, .413, .413, &
     386     .413, .413, .437, .458, .486, .516, &
     387     .399, .399, .399, .399, .399, .399, &
     388     .399, .399, .423, .445, .473, .506, &
     389     ! pom soluble
     390     .975, .975, .975, .975, .975, .977, &
     391     .979, .982, .984, .987, .990, .994, &
     392     .972, .972, .972, .972, .973, .974, &
     393     .977, .980, .983, .986, .989, .993, &
     394     .963, .963, .963, .963, .964, .966, &
     395     .969, .974, .977, .982, .986, .991, &
     396     .955, .955, .955, .955, .955, .958, &
     397     .962, .967, .972, .977, .983, .989, &
     398     .944, .944, .944, .944, .944, .948, &
     399     .952, .959, .962, .972, .979, .987, &
     400     ! sulfate
     401     1.000,1.000,1.000,1.000,1.000,1.000, &
     402     1.000,1.000,1.000,1.000,1.000,1.000, &
     403     1.000,1.000,1.000,1.000,1.000,1.000, &
     404     1.000,1.000,1.000,1.000,1.000,1.000, &
     405     1.000,1.000,1.000,1.000,1.000,1.000, &
     406     1.000,1.000,1.000,1.000,1.000,1.000, &
     407     1.000,1.000,1.000,1.000,1.000,1.000, &
     408     1.000,1.000,1.000,1.000,1.000,1.000, &
     409     1.000,1.000,1.000,1.000,1.000,1.000, &
     410     1.000,1.000,1.000,1.000,1.000,1.000/
    542411  !
    543412  DATA piz_aeri_5wv/&
     
    611480
    612481  IF (flag_aerosol .EQ. 1) THEN
    613      nb_aer = 1
     482     nb_aer = 2
    614483     ALLOCATE (aerosol_name(nb_aer))
    615484     aerosol_name(1) = id_ASSO4M
     485     aerosol_name(2) = id_CSSO4M
    616486  ELSEIF (flag_aerosol .EQ. 2) THEN
    617487     nb_aer = 2
     
    767637                 mass_temp(i,k,spsol)*1000.*zdp1(i,k)*tau_ae5wv_int(i,k,la)*delt*fac
    768638
    769                tausum(i,la,spsol)=tausum(i,la,spsol)+tau3d(i,k)
    770            tau(i,k,la,spsol)=tau3d(i,k)
    771 
    772           ELSE                                           ! Case insoluble aerosol
     639          ELSE                                                  ! For insoluble aerosol
    773640              tau_ae5wv_int(i,k,la) = alpha_aeri_5wv(la,spinsol)
    774641              piz_ae5wv_int(i,k,la) = piz_aeri_5wv(la,spinsol)
     
    778645                 mass_temp(i,k,naero_soluble+spinsol)*1000.*zdp1(i,k)* &
    779646                      tau_ae5wv_int(i,k,la)*delt*fac
    780 
    781                tausum(i,la,naero_soluble+spinsol)=tausum(i,la,spsol)+tau3d(i,k)
    782            tau(i,k,la,naero_soluble+spinsol)=tau3d(i,k)
    783 
    784647          ENDIF
    785 
     648         
    786649        ENDDO     ! Boucle sur les points géographiques (grille horizontale)
    787650      ENDDO     ! Boucle sur les niveaux verticaux
     651
     652      IF (soluble) THEN
     653
     654          tau(:,:,la,spsol)=tau3d(:,:)
     655     
     656          DO k=1, KLEV
     657            DO i=1,KLON
     658              tausum(i,la,spsol)=tausum(i,la,spsol)+tau3d(i,k)
     659            ENDDO
     660          ENDDO
     661      ELSE                                            ! For insoluble aerosol
     662          tau(:,:,la,naero_soluble+spinsol)=tau3d(:,:)
     663     
     664          DO k=1, KLEV
     665            DO i=1,KLON
     666              tausum(i,la,naero_soluble+spinsol)= &
     667                    tausum(i,la,naero_soluble+spinsol)+tau3d(i,k)
     668            ENDDO     ! Boucle sur les points géographiques (grille horizontale)
     669          ENDDO     ! Boucle sur les niveaux verticaux
     670      ENDIF
     671
    788672    ENDDO   ! boucle sur les longueurs d'onde
    789673  ENDDO     ! Boucle  sur les masses de traceurs
  • LMDZ4/branches/LMDZ4-dev/libf/phylmd/phys_local_var_mod.F90

    r1183 r1246  
    7272
    7373! diagnostique pour le rayonnement
    74       REAL, SAVE, ALLOCATABLE :: topswad_aero(:),  solswad_aero(:)  ! diag
     74      REAL, SAVE, ALLOCATABLE :: topswad_aero(:),  solswad_aero(:)      ! diag
    7575      !$OMP THREADPRIVATE(topswad_aero,solswad_aero)
    76       REAL, SAVE, ALLOCATABLE :: topswai_aero(:),  solswai_aero(:)  ! diag
     76      REAL, SAVE, ALLOCATABLE :: topswai_aero(:),  solswai_aero(:)      ! diag
    7777      !$OMP THREADPRIVATE(topswai_aero,solswai_aero)
    78       REAL, SAVE, ALLOCATABLE :: topswad0_aero(:), solswad0_aero(:) ! pas utilise, eventuellment pour diag
     78      REAL, SAVE, ALLOCATABLE :: topswad0_aero(:), solswad0_aero(:)     ! diag
    7979      !$OMP THREADPRIVATE(topswad0_aero,solswad0_aero)
    80       REAL, SAVE, ALLOCATABLE :: topsw_aero(:,:),  solsw_aero(:,:)  ! pas utilise, eventuellment pour diag
     80      REAL, SAVE, ALLOCATABLE :: topsw_aero(:,:),  solsw_aero(:,:)      ! diag
    8181      !$OMP THREADPRIVATE(topsw_aero,solsw_aero)
    82       REAL, SAVE, ALLOCATABLE :: topsw0_aero(:,:), solsw0_aero(:,:) ! pas utilise, eventuellment pour diag
     82      REAL, SAVE, ALLOCATABLE :: topsw0_aero(:,:), solsw0_aero(:,:)     ! diag
    8383      !$OMP THREADPRIVATE(topsw0_aero,solsw0_aero)
     84      REAL, SAVE, ALLOCATABLE :: topswcf_aero(:,:),  solswcf_aero(:,:)  ! diag
     85      !$OMP THREADPRIVATE(topswcf_aero,solswcf_aero)
    8486      REAL, SAVE, ALLOCATABLE :: tausum_aero(:,:,:)
    8587      !$OMP THREADPRIVATE(tausum_aero)
     
    125127      allocate(topsw_aero(klon,naero_grp), solsw_aero(klon,naero_grp))
    126128      allocate(topsw0_aero(klon,naero_grp), solsw0_aero(klon,naero_grp))
     129      allocate(topswcf_aero(klon,3), solswcf_aero(klon,3))
    127130      allocate(d_u_hin(klon,klev),d_v_hin(klon,klev),d_t_hin(klon,klev))
    128131      allocate(tausum_aero(klon,nwave,naero_spc))
     
    164167      deallocate(topsw_aero,solsw_aero)
    165168      deallocate(topsw0_aero,solsw0_aero)
     169      deallocate(topswcf_aero,solswcf_aero)
    166170      deallocate(tausum_aero)
    167171      deallocate(tau3d_aero)
  • LMDZ4/branches/LMDZ4-dev/libf/phylmd/phys_output_mod.F90

    r1229 r1246  
    343343  type(ctrl_out),save :: o_solswad      = ctrl_out((/ 4, 10, 10, 10, 10 /),'solswad')
    344344  type(ctrl_out),save :: o_solswai      = ctrl_out((/ 4, 10, 10, 10, 10 /),'solswai')
     345
     346  type(ctrl_out),save,dimension(10) :: o_tausumaero  = (/ ctrl_out((/ 4, 10, 10, 10, 10 /),'OD550_ASBCM'), &
     347                                                     ctrl_out((/ 4, 10, 10, 10, 10 /),'OD550_ASPOMM'), &
     348                                                     ctrl_out((/ 4, 10, 10, 10, 10 /),'OD550_ASSO4M'), &
     349                                                     ctrl_out((/ 4, 10, 10, 10, 10 /),'OD550_CSSO4M'), &
     350                                                     ctrl_out((/ 4, 10, 10, 10, 10 /),'OD550_SSSSM'), &
     351                                                     ctrl_out((/ 4, 10, 10, 10, 10 /),'OD550_ASSSM'), &
     352                                                     ctrl_out((/ 4, 10, 10, 10, 10 /),'OD550_CSSSM'), &
     353                                                     ctrl_out((/ 4, 10, 10, 10, 10 /),'OD550_CIDUSTM'), &
     354                                                     ctrl_out((/ 4, 10, 10, 10, 10 /),'OD550_AIBCM'), &
     355                                                     ctrl_out((/ 4, 10, 10, 10, 10 /),'OD550_AIPOMM') /)
     356
     357  type(ctrl_out),save :: o_swtoaas_nat      = ctrl_out((/ 4, 10, 10, 10, 10 /),'swtoaas_nat')
     358  type(ctrl_out),save :: o_swsrfas_nat      = ctrl_out((/ 4, 10, 10, 10, 10 /),'swsrfas_nat')
     359  type(ctrl_out),save :: o_swtoacs_nat      = ctrl_out((/ 4, 10, 10, 10, 10 /),'swtoacs_nat')
     360  type(ctrl_out),save :: o_swsrfcs_nat      = ctrl_out((/ 4, 10, 10, 10, 10 /),'swsrfcs_nat')
     361
     362  type(ctrl_out),save :: o_swtoaas_ant      = ctrl_out((/ 4, 10, 10, 10, 10 /),'swtoaas_ant')
     363  type(ctrl_out),save :: o_swsrfas_ant      = ctrl_out((/ 4, 10, 10, 10, 10 /),'swsrfas_ant')
     364  type(ctrl_out),save :: o_swtoacs_ant      = ctrl_out((/ 4, 10, 10, 10, 10 /),'swtoacs_ant')
     365  type(ctrl_out),save :: o_swsrfcs_ant      = ctrl_out((/ 4, 10, 10, 10, 10 /),'swsrfcs_ant')
     366
     367  type(ctrl_out),save :: o_swtoacf_nat      = ctrl_out((/ 4, 10, 10, 10, 10 /),'swtoacf_nat')
     368  type(ctrl_out),save :: o_swsrfcf_nat      = ctrl_out((/ 4, 10, 10, 10, 10 /),'swsrfcf_nat')
     369  type(ctrl_out),save :: o_swtoacf_ant      = ctrl_out((/ 4, 10, 10, 10, 10 /),'swtoacf_ant')
     370  type(ctrl_out),save :: o_swsrfcf_ant      = ctrl_out((/ 4, 10, 10, 10, 10 /),'swsrfcf_ant')
     371  type(ctrl_out),save :: o_swtoacf_zero      = ctrl_out((/ 4, 10, 10, 10, 10 /),'swtoacf_zero')
     372  type(ctrl_out),save :: o_swsrfcf_zero      = ctrl_out((/ 4, 10, 10, 10, 10 /),'swsrfcf_zero')
     373
     374
    345375!!!!!!!!!!!!!!!!!!!!!! 3D !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    346376  type(ctrl_out),save :: o_lwcon        = ctrl_out((/ 2, 5, 10, 10, 1 /),'lwcon')
     
    462492  USE ioipsl
    463493  USE mod_phys_lmdz_para
     494  USE aero_mod, only : naero_spc,name_aero
    464495
    465496  IMPLICIT NONE
     
    481512  character(len=4), dimension(nlevSTD)  :: clevSTD
    482513  integer                               :: nsrf, k, iq, iiq, iff, i, j, ilev
     514  integer                               :: naero
    483515  logical                               :: ok_veget
    484516  integer                               :: iflag_pbl
     
    794826     END DO
    795827
     828     DO naero = 1, naero_spc
     829CALL histdef2d(iff,o_tausumaero(naero)%flag,o_tausumaero(naero)%name,"Aerosol Optical depth at 550 nm "//name_aero(naero),"1")
     830     END DO
     831
    796832 IF (ok_ade) THEN
    797833  CALL histdef2d(iff,o_topswad%flag,o_topswad%name, "ADE at TOA", "W/m2")
    798834  CALL histdef2d(iff,o_solswad%flag,o_solswad%name, "ADE at SRF", "W/m2")
     835
     836 CALL histdef2d(iff,o_swtoaas_nat%flag,o_swtoaas_nat%name, "Natural aerosol radiative forcing all-sky at TOA", "W/m2")
     837 CALL histdef2d(iff,o_swsrfas_nat%flag,o_swsrfas_nat%name, "Natural aerosol radiative forcing all-sky at SRF", "W/m2")
     838 CALL histdef2d(iff,o_swtoacs_nat%flag,o_swtoacs_nat%name, "Natural aerosol radiative forcing clear-sky at TOA", "W/m2")
     839 CALL histdef2d(iff,o_swsrfcs_nat%flag,o_swsrfcs_nat%name, "Natural aerosol radiative forcing clear-sky at SRF", "W/m2")
     840
     841 CALL histdef2d(iff,o_swtoaas_ant%flag,o_swtoaas_ant%name, "Anthropogenic aerosol radiative forcing all-sky at TOA", "W/m2")
     842 CALL histdef2d(iff,o_swsrfas_ant%flag,o_swsrfas_ant%name, "Anthropogenic aerosol radiative forcing all-sky at SRF", "W/m2")
     843 CALL histdef2d(iff,o_swtoacs_ant%flag,o_swtoacs_ant%name, "Anthropogenic aerosol radiative forcing clear-sky at TOA", "W/m2")
     844 CALL histdef2d(iff,o_swsrfcs_ant%flag,o_swsrfcs_ant%name, "Anthropogenic aerosol radiative forcing clear-sky at SRF", "W/m2")
     845
     846 CALL histdef2d(iff,o_swtoacf_nat%flag,o_swtoacf_nat%name, "Natural aerosol impact on cloud radiative forcing at TOA", "W/m2")
     847 CALL histdef2d(iff,o_swsrfcf_nat%flag,o_swsrfcf_nat%name, "Natural aerosol impact on cloud radiative forcing  at SRF", "W/m2")
     848 CALL histdef2d(iff,o_swtoacf_ant%flag,o_swtoacf_ant%name, "Anthropogenic aerosol impact on cloud radiative forcing at TOA", "W/m2")
     849 CALL histdef2d(iff,o_swsrfcf_ant%flag,o_swsrfcf_ant%name, "Anthropogenic aerosol impact on cloud radiative forcing at SRF", "W/m2")
     850 CALL histdef2d(iff,o_swtoacf_zero%flag,o_swtoacf_zero%name, "Cloud radiative forcing (allsky-clearsky fluxes) at TOA", "W/m2")
     851 CALL histdef2d(iff,o_swsrfcf_zero%flag,o_swsrfcf_zero%name, "Cloud radiative forcing (allsky-clearsky fluxes) at SRF", "W/m2")
     852
    799853 ENDIF
    800854
  • LMDZ4/branches/LMDZ4-dev/libf/phylmd/phys_output_write.h

    r1215 r1246  
    828828       ENDIF
    829829
     830! OD550 per species
     831      IF (new_aod) THEN
     832      DO naero = 1, naero_spc
     833          IF (o_tausumaero(naero)%flag(iff)<=lev_files(iff)) THEN
     834             CALL histwrite_phy(nid_files(iff),
     835     $            o_tausumaero(naero)%name,itau_w,
     836     $            tausum_aero(:,2,naero) )
     837          ENDIF
     838      END DO
     839      ENDIF
     840
    830841       IF (ok_ade) THEN
    831842          IF (o_topswad%flag(iff)<=lev_files(iff)) THEN
     
    837848     $            solswad_aero)
    838849          ENDIF
     850
     851!====MS forcing diagnostics
     852        if (new_aod) then             
     853        IF (o_swtoaas_nat%flag(iff)<=lev_files(iff)) THEN
     854        CALL histwrite_phy(nid_files(iff),o_swtoaas_nat%name,itau_w,
     855     $      topsw_aero(:,1))
     856        ENDIF
     857
     858        IF (o_swsrfas_nat%flag(iff)<=lev_files(iff)) THEN
     859        CALL histwrite_phy(nid_files(iff),o_swsrfas_nat%name,itau_w,
     860     $      solsw_aero(:,1))
     861        ENDIF
     862
     863        IF (o_swtoacs_nat%flag(iff)<=lev_files(iff)) THEN
     864        CALL histwrite_phy(nid_files(iff),o_swtoacs_nat%name,itau_w,
     865     $      topsw0_aero(:,1))
     866        ENDIF
     867
     868        IF (o_swsrfcs_nat%flag(iff)<=lev_files(iff)) THEN
     869        CALL histwrite_phy(nid_files(iff),o_swsrfcs_nat%name,itau_w,
     870     $      solsw0_aero(:,1))
     871        ENDIF
     872 
     873!ant
     874        IF (o_swtoaas_ant%flag(iff)<=lev_files(iff)) THEN
     875        CALL histwrite_phy(nid_files(iff),o_swtoaas_ant%name,itau_w,
     876     $      topsw_aero(:,2))
     877        ENDIF
     878
     879        IF (o_swsrfas_ant%flag(iff)<=lev_files(iff)) THEN
     880        CALL histwrite_phy(nid_files(iff),o_swsrfas_ant%name,itau_w,
     881     $      solsw_aero(:,2))
     882        ENDIF
     883
     884        IF (o_swtoacs_ant%flag(iff)<=lev_files(iff)) THEN
     885        CALL histwrite_phy(nid_files(iff),o_swtoacs_ant%name,itau_w,
     886     $      topsw0_aero(:,2))
     887        ENDIF
     888
     889        IF (o_swsrfcs_ant%flag(iff)<=lev_files(iff)) THEN
     890        CALL histwrite_phy(nid_files(iff),o_swsrfcs_ant%name,itau_w,
     891     $      solsw0_aero(:,2))
     892        ENDIF
     893
     894!cf
     895        IF (o_swtoacf_nat%flag(iff)<=lev_files(iff)) THEN
     896        CALL histwrite_phy(nid_files(iff),o_swtoacf_nat%name,itau_w,
     897     $      topswcf_aero(:,1))
     898        ENDIF
     899
     900        IF (o_swsrfcf_nat%flag(iff)<=lev_files(iff)) THEN
     901        CALL histwrite_phy(nid_files(iff),o_swsrfcf_nat%name,itau_w,
     902     $      solswcf_aero(:,1))
     903        ENDIF
     904
     905        IF (o_swtoacf_ant%flag(iff)<=lev_files(iff)) THEN
     906        CALL histwrite_phy(nid_files(iff),o_swtoacf_ant%name,itau_w,
     907     $      topswcf_aero(:,2))
     908        ENDIF
     909
     910        IF (o_swsrfcf_ant%flag(iff)<=lev_files(iff)) THEN
     911        CALL histwrite_phy(nid_files(iff),o_swsrfcf_ant%name,itau_w,
     912     $      solswcf_aero(:,2))
     913        ENDIF
     914
     915        IF (o_swtoacf_zero%flag(iff)<=lev_files(iff)) THEN
     916        CALL histwrite_phy(nid_files(iff),o_swtoacf_zero%name,itau_w,
     917     $      topswcf_aero(:,3))
     918        ENDIF
     919
     920        IF (o_swsrfcf_zero%flag(iff)<=lev_files(iff)) THEN
     921        CALL histwrite_phy(nid_files(iff),o_swsrfcf_zero%name,itau_w,
     922     $      solswcf_aero(:,3))
     923        ENDIF
     924
     925        endif ! new_aod
     926!====MS forcing diagnostics
     927
    839928       ENDIF
    840929
  • LMDZ4/branches/LMDZ4-dev/libf/phylmd/physiq.F

    r1244 r1246  
    10691069      REAL, DIMENSION(klon,klev)     :: mass_solu_aero    ! total mass concentration for all soluble aerosols[ug/m3]
    10701070      REAL, DIMENSION(klon,klev)     :: mass_solu_aero_pi ! - " - (pre-industrial value)
     1071      INTEGER :: naero ! aerosol species
    10711072
    10721073      ! Parameters
     
    29522953     o        topswad0_aero, solswad0_aero,
    29532954     o        topsw_aero, topsw0_aero,
    2954      o        solsw_aero, solsw0_aero)
     2955     o        solsw_aero, solsw0_aero,
     2956     o        topswcf_aero, solswcf_aero)
    29552957         
    29562958
  • LMDZ4/branches/LMDZ4-dev/libf/phylmd/radlwsw.F90

    r1231 r1246  
    1818   topswad0_aero, solswad0_aero,&
    1919   topsw_aero, topsw0_aero,&
    20    solsw_aero, solsw0_aero)
     20   solsw_aero, solsw0_aero, &
     21   topswcf_aero, solswcf_aero)
    2122
    2223
     
    135136  REAL, DIMENSION(kdlon,9), INTENT(out) :: solsw_aero
    136137  REAL, DIMENSION(kdlon,9), INTENT(out) :: solsw0_aero
     138  REAL, DIMENSION(kdlon,3), INTENT(out) :: topswcf_aero
     139  REAL, DIMENSION(kdlon,3), INTENT(out) :: solswcf_aero
    137140
    138141! Local variables
     
    181184  REAL(KIND=8) ztopsw_aero(kdlon,9), ztopsw0_aero(kdlon,9)
    182185  REAL(KIND=8) zsolsw_aero(kdlon,9), zsolsw0_aero(kdlon,9)
     186  REAL(KIND=8) ztopswcf_aero(kdlon,3), zsolswcf_aero(kdlon,3)     
    183187  real, parameter:: dobson_u = 2.1415e-05 ! Dobson unit, in kg m-2
    184188
     
    338342               ztopsw_aero,ztopsw0_aero,&
    339343               zsolsw_aero,zsolsw0_aero,&
     344               ztopswcf_aero,zsolswcf_aero, &
    340345               ok_ade, ok_aie)
    341346         
     
    384389          solswad_aero(iof+i) = zsolswadaero(i)
    385390          solswad0_aero(iof+i) = zsolswad0aero(i)
    386           topsw_aero(iof+i,:) = ztopsw_aero(iof+i,:)
    387           topsw0_aero(iof+i,:) = ztopsw0_aero(iof+i,:)
    388           solsw_aero(iof+i,:) = zsolsw_aero(iof+i,:)
    389           solsw0_aero(iof+i,:) = zsolsw0_aero(iof+i,:)
    390          
     391! MS the following lines seem to be wrong, why is iof on right hand side???
     392!          topsw_aero(iof+i,:) = ztopsw_aero(iof+i,:)
     393!          topsw0_aero(iof+i,:) = ztopsw0_aero(iof+i,:)
     394!          solsw_aero(iof+i,:) = zsolsw_aero(iof+i,:)
     395!          solsw0_aero(iof+i,:) = zsolsw0_aero(iof+i,:)
     396          topsw_aero(iof+i,:) = ztopsw_aero(i,:)
     397          topsw0_aero(iof+i,:) = ztopsw0_aero(i,:)
     398          solsw_aero(iof+i,:) = zsolsw_aero(i,:)
     399          solsw0_aero(iof+i,:) = zsolsw0_aero(i,:)
     400          topswcf_aero(iof+i,:) = ztopswcf_aero(i,:)
     401          solswcf_aero(iof+i,:) = zsolswcf_aero(i,:)         
    391402        ENDDO
    392403    ELSE
  • LMDZ4/branches/LMDZ4-dev/libf/phylmd/readaerosol_interp.F90

    r1237 r1246  
    123123     PRINT*,'iday =',iday
    124124     PRINT*,'r_day =',r_day
     125     PRINT*,'day_cur =',day_cur
     126     PRINT*,'mth_cur =',mth_cur
     127     PRINT*,'year_cur =',year_cur
    125128     PRINT*,'NINT(86400./pdtphys) =',NINT(86400./pdtphys)
    126129     PRINT*,'MOD(0,1) =',MOD(0,1)
     
    152155!
    153156!****************************************************************************************
    154   IF ( (first .OR. iday==1.) .AND. lnewday ) THEN
     157  IF ( (first .OR. iday==0) .AND. lnewday ) THEN
    155158     NULLIFY(pt_tmp)
    156159
     
    215218     END IF
    216219
    217   END IF  ! IF ( (first .OR. iday==1.) .AND. lnewday ) THEN
     220  END IF  ! IF ( (first .OR. iday==0) .AND. lnewday ) THEN
    218221 
    219222!****************************************************************************************
     
    229232!****************************************************************************************
    230233     ! Find which months and days to use for time interpolation
    231      IF (iday < im*30-15) THEN         
     234     IF (iday < im*30-15) THEN
    232235        ! in the first half of the month use month before and actual month
    233236        im2=im-1
  • LMDZ4/branches/LMDZ4-dev/libf/phylmd/readaerosol_optic.F90

    r1237 r1246  
    6363  REAL, DIMENSION(klon,klev)   :: pdel
    6464  REAL, DIMENSION(klon,klev,naero_spc) :: m_allaer
    65   REAL, DIMENSION(klon,naero_tot)      :: fractnat_allaer
     65  REAL, DIMENSION(klon,klev,naero_spc) :: m_allaer_pi !RAF 
     66!  REAL, DIMENSION(klon,naero_tot)      :: fractnat_allaer !RAF delete??
    6667
    6768  INTEGER :: k, i
     
    143144  m_allaer(:,:,id_AIPOMM) = pomins(:,:)       ! AIPOMM
    144145
     146!RAF
     147  m_allaer_pi(:,:,1)  = bcsol_pi(:,:)        ! ASBCM pre-ind
     148  m_allaer_pi(:,:,2)  = pomsol_pi(:,:)       ! ASPOMM pre-ind
     149  m_allaer_pi(:,:,3)  = sulfate_pi(:,:)      ! ASSO4M (= SO4) pre-ind
     150  m_allaer_pi(:,:,4)  = 0.                ! CSSO4M pre-ind
     151  m_allaer_pi(:,:,5)  = sssupco_pi(:,:)      ! SSSSM pre-ind
     152  m_allaer_pi(:,:,6)  = sscoarse_pi(:,:)     ! CSSSM pre-ind
     153  m_allaer_pi(:,:,7)  = ssacu_pi(:,:)        ! ASSSM pre-ind
     154  m_allaer_pi(:,:,8)  = cidust_pi(:,:)       ! CIDUSTM pre-ind
     155  m_allaer_pi(:,:,9)  = bcins_pi(:,:)        ! AIBCM pre-ind
     156  m_allaer_pi(:,:,10) = pomins_pi(:,:)       ! AIPOMM pre-ind
     157
    145158!
    146159! Calculate the total mass of all soluble aersosols
    147160!
    148   mass_solu_aero(:,:)    = sulfate(:,:)    + bcsol(:,:)    + pomsol(:,:)    + &
    149        sscoarse(:,:)    + ssacu(:,:)    + sssupco(:,:)
    150   mass_solu_aero_pi(:,:) = sulfate_pi(:,:) + bcsol_pi(:,:) + pomsol_pi(:,:) + &
    151        sscoarse_pi(:,:) + ssacu_pi(:,:) + sssupco_pi(:,:)
     161  mass_solu_aero(:,:)    = sulfate(:,:)    + bcsol(:,:)    + pomsol(:,:) !   + &
     162!       sscoarse(:,:)    + ssacu(:,:)    + sssupco(:,:)
     163  mass_solu_aero_pi(:,:) = sulfate_pi(:,:) + bcsol_pi(:,:) + pomsol_pi(:,:) ! + &
     164!       sscoarse_pi(:,:) + ssacu_pi(:,:) + sssupco_pi(:,:)
    152165
    153166!****************************************************************************************
     
    163176  IF (new_aod) THEN
    164177
    165      fractnat_allaer(:,:) = 0.
    166      CALL aeropt_2bands(                 &
     178! RAF delete??     fractnat_allaer(:,:) = 0.
     179! RAF fractnat_allaer -> m_allaer_pi
     180
     181     CALL aeropt_2bands( &
    167182          pdel, m_allaer, pdtphys, rhcl, &
    168183          tau_aero, piz_aero, cg_aero,   &
    169           fractnat_allaer, flag_aerosol, &
     184          m_allaer_pi, flag_aerosol, &
    170185          pplay, t_seri, presnivs)
    171186     
  • LMDZ4/branches/LMDZ4-dev/libf/phylmd/sw_aeroAR4.F90

    r1237 r1246  
    1717     PTOPSWAERO,PTOPSW0AERO,&
    1818     PSOLSWAERO,PSOLSW0AERO,&
     19     PTOPSWCFAERO,PSOLSWCFAERO,&
    1920     ok_ade, ok_aie )
    2021
    2122  USE dimphy
     23
    2224  IMPLICIT NONE
    2325
    2426#include "YOMCST.h"
     27#include "clesphys.h"
    2528  !
    2629  !     ------------------------------------------------------------------
     
    144147  REAL(KIND=8) PTOPSWAIAERO(KDLON)     ! SHORTWAVE FLUX AT T.O.A.(+AEROSOL IND)
    145148  REAL(KIND=8) PSOLSWAIAERO(KDLON)     ! SHORTWAVE FLUX AT SURFACE(+AEROSOL IND)
    146   REAL(KIND=8) PTOPSWAERO(KDLON,9)
    147   REAL(KIND=8) PTOPSW0AERO(KDLON,9)
    148   REAL(KIND=8) PSOLSWAERO(KDLON,9)
    149   REAL(KIND=8) PSOLSW0AERO(KDLON,9)
     149  REAL(KIND=8) PTOPSWAERO(KDLON,9)       ! SW TOA AS DRF nat & ant
     150  REAL(KIND=8) PTOPSW0AERO(KDLON,9)      ! SW SRF AS DRF nat & ant
     151  REAL(KIND=8) PSOLSWAERO(KDLON,9)       ! SW TOA CS DRF nat & ant
     152  REAL(KIND=8) PSOLSW0AERO(KDLON,9)      ! SW SRF CS DRF nat & ant
     153  REAL(KIND=8) PTOPSWCFAERO(KDLON,3)   !  SW TOA AS cloudRF nat & ant
     154  REAL(KIND=8) PSOLSWCFAERO(KDLON,3)   !  SW SRF AS cloudRF nat & ant
    150155
    151156  !jq - Fluxes including aerosol effects
     
    172177  !$OMP THREADPRIVATE(ZFSDN0_AERO)
    173178
    174 !
    175   LOGICAL :: AEROSOLFEEDBACK_ACTIVE=.true.
     179! Key to define the aerosol effect acting on climate
     180! 0: aerosol feedback active according to ok_ade, ok_aie  DEFAULT
     181! 1: no feedback , zero aerosol fluxes are used for climate, diagnostics according to ok_ade_ok_aie
     182! 2: feedback according to total aerosol direct effect used for climate, diagnostics according to ok_ade, ok_aie
     183! 3: feedback according to natural aerosol direct effect used for climate, diagnostics according to ok_ade_ok_aie
     184
     185  INTEGER :: AEROSOLFEEDBACK_ACTIVE = 0
     186
     187  IF ((.not. ok_ade) .and. (AEROSOLFEEDBACK_ACTIVE .ge. 2)) THEN
     188     print*,'Error: direct effect is not activated but assumed to be active - see sw_aeroAR4.F90'
     189     stop
     190  ENDIF
     191  AEROSOLFEEDBACK_ACTIVE=MIN(MAX(AEROSOLFEEDBACK_ACTIVE,0),3)
     192  IF  (AEROSOLFEEDBACK_ACTIVE .gt. 3) THEN
     193     print*,'Error: AEROSOLFEEDBACK_ACTIVE options go only until 3'
     194     stop
     195  ENDIF
    176196
    177197  IF(.NOT.initialized) THEN
     
    200220  ENDIF
    201221
    202 
    203222  IF (appel1er) THEN
    204223     PRINT*, 'SW calling frequency : ', swpas
     
    217236     ENDDO
    218237
    219 
    220      ! clear-sky:
     238! clear sky is either computed IF no direct effect is asked for, or for extended diag)
     239     IF (( lev_histmth .eq. 4 ) .or. ( .not. ok_ade )) THEN   
     240
     241     ! clear-sky: zero aerosol effect
    221242     flag_aer=0.0
    222243     CALL SWU_LMDAR4(PSCT,ZCLDSW0,PPMB,PPSOL,&
     
    242263        ENDDO
    243264     ENDDO
    244 
    245 
    246      ! cloudy-sky:
     265     ENDIF
     266
     267! cloudy sky is either computed IF no indirect effect is asked for, or for extended diag)
     268     IF (( lev_histmth .eq. 4 ) .or. ( .not. ok_aie )) THEN   
     269     ! cloudy-sky: zero aerosol effect
    247270     flag_aer=0.0
    248271     CALL SWU_LMDAR4(PSCT,PCLDSW,PPMB,PPSOL,&
     
    269292        ENDDO
    270293     ENDDO
    271 
     294     ENDIF
    272295
    273296
    274297     IF (ok_ade) THEN
    275298
    276         ! clear sky (Anne Cozic 03/07/2007)
     299        ! clear sky (Anne Cozic 03/07/2007) direct effect of total aerosol
    277300        ! CAS AER (2)
    278301        flag_aer=1.0
     
    301324        ENDDO
    302325
    303         ! cloudy-sky + aerosol dir OB
    304         ! ACo AER
     326! cloudy sky is either computed IF no indirect effect is asked for, or for extended diag)
     327        IF (( lev_histmth .eq. 4 ) .or. (.not. ok_aie)) THEN 
     328        ! cloudy-sky aerosol direct effect of total aerosol
    305329        flag_aer=1.0
    306330        CALL SWU_LMDAR4(PSCT,PCLDSW,PPMB,PPSOL,&
     
    327351           ENDDO
    328352        ENDDO
    329 
    330 
    331 
    332         !CAS NAT
    333         ! clear sky
     353        ENDIF
     354
     355! natural aeroosl clear sky is  computed  for extended diag)
     356        IF ( lev_histmth .eq. 4 ) THEN           
     357        ! clear sky direct effect natural aerosol
    334358        flag_aer=1.0
    335359        CALL SWU_LMDAR4(PSCT,ZCLDSW0,PPMB,PPSOL,&
     
    350374             ZFDOWN, ZFUP)
    351375
    352 ! Natural aerosol fluxes
    353376        DO JK = 1 , KFLEV+1
    354377           DO JL = 1, KDLON
     
    357380           ENDDO
    358381        ENDDO
    359 
    360         ! cloudy-sky
    361         ! ACo NAT
     382        ENDIF
     383
     384! cloud sky natural is for extended diagnostics
     385        IF ( lev_histmth .eq. 4 ) THEN
     386        ! cloudy-sky direct effect natural aerosol
    362387        flag_aer=1.0
    363388        CALL SWU_LMDAR4(PSCT,PCLDSW,PPMB,PPSOL,&
     
    384409           ENDDO
    385410        ENDDO
    386 
     411        ENDIF
    387412
    388413     ENDIF ! ok_ade
    389414
    390 
     415! cloudy sky needs to be computed in all cases IF ok_aie is activated
    391416     IF (ok_aie) THEN
    392         !jq   cloudy-sky + aerosol direct + aerosol indirect
     417        !jq   cloudy-sky + aerosol direct + aerosol indirect of total aerosol
    393418        flag_aer=1.0
    394419        CALL SWU_LMDAR4(PSCT,PCLDSW,PPMB,PPSOL,&
     
    420445  itapsw = itapsw + 1
    421446
    422 
     447  IF  ( AEROSOLFEEDBACK_ACTIVE .eq. 0) THEN
    423448  IF ( ok_ade .and. ok_aie  ) THEN
    424449    ZFSUP(:,:) =    ZFSUP_AERO(:,:,4)
     
    433458    ZFSDN0(:,:) =   ZFSDN0_AERO(:,:,2)
    434459  ENDIF
    435 !MS the following combination would include the direct aerosol effect in cloud regions
    436 !   because it takes the total aerosol effect
     460
    437461  IF ( (.not. ok_ade) .and. ok_aie  )  THEN
     462    print*,'Warning: indirect effect in cloudy regions includes direct aerosol effect'
    438463    ZFSUP(:,:) =    ZFSUP_AERO(:,:,4)
    439464    ZFSDN(:,:) =    ZFSDN_AERO(:,:,4)
     
    450475! MS the following allows to compute the forcing diagostics without
    451476! letting the aerosol forcing act on the meteorology
    452 ! assuming that the no-aerosol case creates the reference meteorological state
    453 ! for the natural aerosol state use: *_AERO(:,:3)
    454   IF  (.not. AEROSOLFEEDBACK_ACTIVE) THEN
    455     ZFSUP(:,:) =    ZFSUP_AERO(:,:,1)
    456     ZFSDN(:,:) =    ZFSDN_AERO(:,:,1)
    457     ZFSUP0(:,:) =   ZFSUP0_AERO(:,:,1)
    458     ZFSDN0(:,:) =   ZFSDN0_AERO(:,:,1)
     477! SEE logic above
     478  ELSEIF  ( AEROSOLFEEDBACK_ACTIVE .gt. 0) THEN
     479    ZFSUP(:,:) =    ZFSUP_AERO(:,:,AEROSOLFEEDBACK_ACTIVE)
     480    ZFSDN(:,:) =    ZFSDN_AERO(:,:,AEROSOLFEEDBACK_ACTIVE)
     481    ZFSUP0(:,:) =   ZFSUP0_AERO(:,:,AEROSOLFEEDBACK_ACTIVE)
     482    ZFSDN0(:,:) =   ZFSDN0_AERO(:,:,AEROSOLFEEDBACK_ACTIVE)
    459483  ENDIF
    460484 
     
    463487     kpl1 = k+1
    464488     DO i = 1, KDLON
    465 
    466489        PHEAT(i,k) = -(ZFSUP(i,kpl1)-ZFSUP(i,k))-(ZFSDN(i,k)-ZFSDN(i,kpl1))
    467490        PHEAT(i,k) = PHEAT(i,k) * RDAY*RG/RCPD / PDP(i,k)
    468491        PHEAT0(i,k) = -(ZFSUP0(i,kpl1)-ZFSUP0(i,k))-(ZFSDN0(i,k)-ZFSDN0(i,kpl1))
    469492        PHEAT0(i,k) = PHEAT0(i,k) * RDAY*RG/RCPD / PDP(i,k)
    470 
    471493     ENDDO
    472494  ENDDO
    473495
    474496  DO i = 1, KDLON
     497! effective SW surface albedo calculation
    475498     PALBPLA(i) = ZFSUP(i,KFLEV+1)/(ZFSDN(i,KFLEV+1)+1.0e-20)
    476      ! clear sky
     499     
     500! clear sky net fluxes at TOA and SRF
    477501     PSOLSW0(i) = ZFSDN0(i,1) - ZFSUP0(i,1)
    478502     PTOPSW0(i) = ZFSDN0(i,KFLEV+1) - ZFSUP0(i,KFLEV+1)
    479503
     504! cloudy sky net fluxes at TOA and SRF
    480505     PSOLSW(i) = ZFSDN(i,1) - ZFSUP(i,1)
    481506     PTOPSW(i) = ZFSDN(i,KFLEV+1) - ZFSUP(i,KFLEV+1)
    482507
    483 ! MS the following is not output, so commented
    484 !     PSOLSW0AERO(i,:) = ZFSDN0_AERO(i,1,:) - ZFSUP0_AERO(i,1,:)
    485 !     PTOPSW0AERO(i,:) = &
    486 !          ZFSDN0_AERO(i,KFLEV+1,:) - ZFSUP0_AERO(i,KFLEV+1,:)
    487 
    488 !     PSOLSWAERO(i,:) = ZFSDN_AERO(i,1,:) - ZFSUP_AERO(i,1,:)
    489 !     PTOPSWAERO(i,:) = &
    490 !          ZFSDN_AERO(i,KFLEV+1,:) - ZFSUP_AERO(i,KFLEV+1,:)
    491 
    492 
    493 if (ok_ade) then
    494      PSOLSWADAERO(i) = (ZFSDN_AERO(i,1,2) - ZFSUP_AERO(i,1,2))-(ZFSDN_AERO(i,1,3) - ZFSUP_AERO(i,1,3))
    495      PTOPSWADAERO(i) = (ZFSDN_AERO(i,KFLEV+1,2) - ZFSUP_AERO(i,KFLEV+1,2))- (ZFSDN_AERO(i,KFLEV+1,3) - ZFSUP_AERO(i,KFLEV+1,3))
    496 
    497      PSOLSWAD0AERO(i) = (ZFSDN0_AERO(i,1,2) - ZFSUP0_AERO(i,1,2))-(ZFSDN0_AERO(i,1,3) - ZFSUP0_AERO(i,1,3))
    498      PTOPSWAD0AERO(i) = (ZFSDN0_AERO(i,KFLEV+1,2) - ZFSUP0_AERO(i,KFLEV+1,2))-(ZFSDN0_AERO(i,KFLEV+1,3) - ZFSUP0_AERO(i,KFLEV+1,3))
    499 endif
    500 
    501 if (ok_aie) then
     508
     509! net anthropogenic forcing direct and 1st indirect effect diagnostics
     510! requires a natural aerosol field read and used
     511! Difference of net fluxes from double call to radiation
     512
     513
     514IF (ok_ade) THEN
     515
     516! indices 1: natural; 2 anthropogenic
     517! TOA/SRF all sky natural forcing
     518     PSOLSWAERO(i,1) = (ZFSDN_AERO(i,1,3) - ZFSUP_AERO(i,1,3))-(ZFSDN_AERO(i,1,1) - ZFSUP_AERO(i,1,1))
     519     PTOPSWAERO(i,1) = (ZFSDN_AERO(i,KFLEV+1,3) - ZFSUP_AERO(i,KFLEV+1,3))- (ZFSDN_AERO(i,KFLEV+1,1) - ZFSUP_AERO(i,KFLEV+1,1))
     520
     521! TOA/SRF all sky anthropogenic forcing
     522     PSOLSWAERO(i,2) = (ZFSDN_AERO(i,1,2) - ZFSUP_AERO(i,1,2))-(ZFSDN_AERO(i,1,3) - ZFSUP_AERO(i,1,3))
     523     PTOPSWAERO(i,2) = (ZFSDN_AERO(i,KFLEV+1,2) - ZFSUP_AERO(i,KFLEV+1,2))- (ZFSDN_AERO(i,KFLEV+1,3) - ZFSUP_AERO(i,KFLEV+1,3))
     524
     525! TOA/SRF clear sky natural forcing
     526     PSOLSW0AERO(i,1) = (ZFSDN0_AERO(i,1,3) - ZFSUP0_AERO(i,1,3))-(ZFSDN0_AERO(i,1,1) - ZFSUP0_AERO(i,1,1))
     527     PTOPSW0AERO(i,1) = (ZFSDN0_AERO(i,KFLEV+1,3) - ZFSUP0_AERO(i,KFLEV+1,3))-(ZFSDN0_AERO(i,KFLEV+1,1) - ZFSUP0_AERO(i,KFLEV+1,1))
     528
     529! TOA/SRF clear sky anthropogenic forcing
     530     PSOLSW0AERO(i,2) = (ZFSDN0_AERO(i,1,2) - ZFSUP0_AERO(i,1,2))-(ZFSDN0_AERO(i,1,3) - ZFSUP0_AERO(i,1,3))
     531     PTOPSW0AERO(i,2) = (ZFSDN0_AERO(i,KFLEV+1,2) - ZFSUP0_AERO(i,KFLEV+1,2))-(ZFSDN0_AERO(i,KFLEV+1,3) - ZFSUP0_AERO(i,KFLEV+1,3))
     532
     533! Cloud forcing indices 1: natural; 2 anthropogenic; 3: zero aerosol direct effect
     534! Instantaneously computed cloudy sky direct aerosol effect, cloud forcing due to aerosols above clouds
     535! natural
     536     PSOLSWCFAERO(i,1) = PSOLSWAERO(i,1) - PSOLSW0AERO(i,1)
     537     PTOPSWCFAERO(i,1) = PTOPSWAERO(i,1) - PTOPSW0AERO(i,1)
     538
     539! Instantaneously computed cloudy SKY DIRECT aerosol effect, cloud forcing due to aerosols above clouds
     540! anthropogenic
     541     PSOLSWCFAERO(i,2) = PSOLSWAERO(i,2) - PSOLSW0AERO(i,2)
     542     PTOPSWCFAERO(i,2) = PTOPSWAERO(i,2) - PTOPSW0AERO(i,2)
     543
     544! Cloudforcing without aerosol
     545! zero
     546     PSOLSWCFAERO(i,3) = (ZFSDN_AERO(i,1,1) - ZFSUP_AERO(i,1,1))-(ZFSDN0_AERO(i,1,1) - ZFSUP0_AERO(i,1,1))
     547     PTOPSWCFAERO(i,3) = (ZFSDN_AERO(i,KFLEV+1,1) - ZFSUP_AERO(i,KFLEV+1,1))- (ZFSDN0_AERO(i,KFLEV+1,1) - ZFSUP0_AERO(i,KFLEV+1,1))
     548
     549! direct anthropogenic forcing , as in old LMDzT, however differences of net fluxes
     550     PSOLSWADAERO(i) = PSOLSWAERO(i,2)
     551     PTOPSWADAERO(i) = PTOPSWAERO(i,2)
     552     PSOLSWAD0AERO(i) = PSOLSW0AERO(i,2)
     553     PTOPSWAD0AERO(i) = PTOPSW0AERO(i,2)
     554
     555ENDIF
     556
     557
     558IF (ok_aie) THEN
    502559     PSOLSWAIAERO(i) = (ZFSDN_AERO(i,1,4) - ZFSUP_AERO(i,1,4))-(ZFSDN_AERO(i,1,2) - ZFSUP_AERO(i,1,2))
    503560     PTOPSWAIAERO(i) = (ZFSDN_AERO(i,KFLEV+1,4) - ZFSUP_AERO(i,KFLEV+1,4))-(ZFSDN_AERO(i,KFLEV+1,2) - ZFSUP_AERO(i,KFLEV+1,2))
    504 endif
     561ENDIF
    505562
    506563  ENDDO
    507564END SUBROUTINE SW_AEROAR4
    508 
Note: See TracChangeset for help on using the changeset viewer.