Changeset 1653 for LMDZ5


Ignore:
Timestamp:
Sep 17, 2012, 1:45:13 PM (12 years ago)
Author:
musat
Message:
  • reorganise aerosol cases with ok_ade and ok_aie
  • ADE clear-sky at TOA and ADE clear-sky at SRF have been added in the outputs
Location:
LMDZ5/trunk/libf/phylmd
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • LMDZ5/trunk/libf/phylmd/phys_output_mod.F90

    r1648 r1653  
    388388
    389389  type(ctrl_out),save :: o_topswad      = ctrl_out((/ 2, 10, 10, 10, 10, 10 /),'topswad')
     390  type(ctrl_out),save :: o_topswad0     = ctrl_out((/ 2, 10, 10, 10, 10, 10 /),'topswad0')
    390391  type(ctrl_out),save :: o_topswai      = ctrl_out((/ 2, 10, 10, 10, 10, 10 /),'topswai')
    391392  type(ctrl_out),save :: o_solswad      = ctrl_out((/ 2, 10, 10, 10, 10, 10 /),'solswad')
     393  type(ctrl_out),save :: o_solswad0     = ctrl_out((/ 2, 10, 10, 10, 10, 10 /),'solswad0')
    392394  type(ctrl_out),save :: o_solswai      = ctrl_out((/ 2, 10, 10, 10, 10, 10 /),'solswai')
    393395
     
    11281130                  o_topswad%flag,o_topswad%name, "ADE at TOA", "W/m2")
    11291131             CALL histdef2d(iff,clef_stations(iff), &
     1132                  o_topswad0%flag,o_topswad0%name, "ADE clear-sky at TOA", "W/m2")
     1133             CALL histdef2d(iff,clef_stations(iff), &
    11301134                  o_solswad%flag,o_solswad%name, "ADE at SRF", "W/m2")
     1135             CALL histdef2d(iff,clef_stations(iff), &
     1136                  o_solswad0%flag,o_solswad0%name, "ADE clear-sky at SRF", "W/m2")
    11311137
    11321138             CALL histdef2d(iff,clef_stations(iff), &
  • LMDZ5/trunk/libf/phylmd/phys_output_write.h

    r1648 r1653  
    12581258     $            topswad_aero)
    12591259          ENDIF
     1260          IF (o_topswad0%flag(iff)<=lev_files(iff)) THEN
     1261             CALL histwrite_phy(nid_files(iff),
     1262     $clef_stations(iff),
     1263     $o_topswad0%name,itau_w,
     1264     $            topswad0_aero)
     1265          ENDIF
    12601266          IF (o_solswad%flag(iff)<=lev_files(iff)) THEN
    12611267             CALL histwrite_phy(nid_files(iff),
     
    12631269     $o_solswad%name,itau_w,
    12641270     $            solswad_aero)
     1271          ENDIF
     1272          IF (o_solswad0%flag(iff)<=lev_files(iff)) THEN
     1273             CALL histwrite_phy(nid_files(iff),
     1274     $clef_stations(iff),
     1275     $o_solswad0%name,itau_w,
     1276     $            solswad0_aero)
    12651277          ENDIF
    12661278
  • LMDZ5/trunk/libf/phylmd/sw_aeroAR4.F90

    r1641 r1653  
    5656  !     --------------
    5757  !        ORIGINAL : 89-07-14
    58   !        95-01-01   J.-J. MORCRETTE  Direct/Diffuse Albedo
    59   !        03-11-27   J. QUAAS Introduce aerosol forcings (based on BOUCHER)
    60   !        09-04      A. COZIC - C.DEANDREIS Indroduce NAT/BC/POM/DUST/SS aerosol forcing
     58  !        1995-01-01  J.-J. MORCRETTE  Direct/Diffuse Albedo
     59  !        2003-11-27  J. QUAAS Introduce aerosol forcings (based on BOUCHER)
     60  !        2009-04     A. COZIC - C.DEANDREIS Indroduce NAT/BC/POM/DUST/SS aerosol forcing
     61  !        2012-09     O. BOUCHER - reorganise aerosol cases with ok_ade and ok_aie
    6162  !     ------------------------------------------------------------------
    6263  !
     
    8283
    8384  REAL(KIND=8) PCLDSW(KDLON,KFLEV)    ! CLOUD FRACTION
    84   REAL(KIND=8) PTAU(KDLON,2,KFLEV)    ! CLOUD OPTICAL THICKNESS
     85  REAL(KIND=8) PTAU(KDLON,2,KFLEV)    ! CLOUD OPTICAL THICKNESS (pre-industrial value)
    8586  REAL(KIND=8) PCG(KDLON,2,KFLEV)     ! ASYMETRY FACTOR
    8687  REAL(KIND=8) POMEGA(KDLON,2,KFLEV)  ! SINGLE SCATTERING ALBEDO
     
    140141  REAL(KIND=8) pizaero(kdlon,kflev,9,2)  ! (see aeropt.F)
    141142  REAL(KIND=8) cgaero(kdlon,kflev,9,2)   ! -"-
    142   REAL(KIND=8) PTAUA(KDLON,2,KFLEV)    ! CLOUD OPTICAL THICKNESS (pre-industrial value)
     143  REAL(KIND=8) PTAUA(KDLON,2,KFLEV)    ! CLOUD OPTICAL THICKNESS (present-day value)
    143144  REAL(KIND=8) POMEGAA(KDLON,2,KFLEV)  ! SINGLE SCATTERING ALBEDO
    144145  REAL(KIND=8) PTOPSWADAERO(KDLON)     ! SHORTWAVE FLUX AT T.O.A.(+AEROSOL DIR)
    145146  REAL(KIND=8) PSOLSWADAERO(KDLON)     ! SHORTWAVE FLUX AT SURFACE(+AEROSOL DIR)
    146   REAL(KIND=8) PTOPSWAD0AERO(KDLON)     ! SHORTWAVE FLUX AT T.O.A.(+AEROSOL DIR)
    147   REAL(KIND=8) PSOLSWAD0AERO(KDLON)     ! SHORTWAVE FLUX AT SURFACE(+AEROSOL DIR)
     147  REAL(KIND=8) PTOPSWAD0AERO(KDLON)    ! SHORTWAVE FLUX AT T.O.A.(+AEROSOL DIR)
     148  REAL(KIND=8) PSOLSWAD0AERO(KDLON)    ! SHORTWAVE FLUX AT SURFACE(+AEROSOL DIR)
    148149  REAL(KIND=8) PTOPSWAIAERO(KDLON)     ! SHORTWAVE FLUX AT T.O.A.(+AEROSOL IND)
    149150  REAL(KIND=8) PSOLSWAIAERO(KDLON)     ! SHORTWAVE FLUX AT SURFACE(+AEROSOL IND)
    150   REAL(KIND=8) PTOPSWAERO(KDLON,9)      ! SW TOA AS DRF nat & ant
    151   REAL(KIND=8) PTOPSW0AERO(KDLON,9)      ! SW SRF AS DRF nat & ant
    152   REAL(KIND=8) PSOLSWAERO(KDLON,9)      ! SW TOA CS DRF nat & ant
    153   REAL(KIND=8) PSOLSW0AERO(KDLON,9)      ! SW SRF CS DRF nat & ant
     151  REAL(KIND=8) PTOPSWAERO(KDLON,9)    ! SW TOA AS DRF nat & ant
     152  REAL(KIND=8) PTOPSW0AERO(KDLON,9)    ! SW SRF AS DRF nat & ant
     153  REAL(KIND=8) PSOLSWAERO(KDLON,9)    ! SW TOA CS DRF nat & ant
     154  REAL(KIND=8) PSOLSW0AERO(KDLON,9)    ! SW SRF CS DRF nat & ant
    154155  REAL(KIND=8) PTOPSWCFAERO(KDLON,3)   !  SW TOA AS cloudRF nat & ant
    155156  REAL(KIND=8) PSOLSWCFAERO(KDLON,3)   !  SW SRF AS cloudRF nat & ant
     
    179180
    180181! Key to define the aerosol effect acting on climate
    181 ! 0: aerosol feedback active according to ok_ade, ok_aie  DEFAULT
    182 ! 1: no feedback , zero aerosol fluxes are used for climate, diagnostics according to ok_ade_ok_aie
    183 ! 2: feedback according to total aerosol direct effect used for climate, diagnostics according to ok_ade, ok_aie
    184 ! 3: feedback according to natural aerosol direct effect used for climate, diagnostics according to ok_ade_ok_aie
    185 
    186   INTEGER,SAVE :: AEROSOLFEEDBACK_ACTIVE = 0
     182! OB: AEROSOLFEEDBACK_ACTIVE is now a LOGICAL
     183! TRUE: fluxes use natural and/or anthropogenic aerosols according to ok_ade and ok_aie, DEFAULT
     184! FALSE: fluxes use no aerosols (case 1)
     185
     186  LOGICAL,SAVE :: AEROSOLFEEDBACK_ACTIVE = .TRUE.
    187187!$OMP THREADPRIVATE(AEROSOLFEEDBACK_ACTIVE) 
    188188
    189189      CHARACTER (LEN=20) :: modname='sw_aeroAR4'
    190190      CHARACTER (LEN=80) :: abort_message
    191 
    192   IF ((.not. ok_ade) .and. (AEROSOLFEEDBACK_ACTIVE .ge. 2)) THEN
    193      abort_message ='Error: direct effect is not activated but assumed to be active - see sw_aeroAR4.F90'
    194      CALL abort_gcm (modname,abort_message,1)
    195   ENDIF
    196   AEROSOLFEEDBACK_ACTIVE=MIN(MAX(AEROSOLFEEDBACK_ACTIVE,0),3)
    197   IF  (AEROSOLFEEDBACK_ACTIVE .gt. 3) THEN
    198      abort_message ='Error: AEROSOLFEEDBACK_ACTIVE options go only until 3'
    199      CALL abort_gcm (modname,abort_message,1)
    200   ENDIF
    201191
    202192  IF(.NOT.initialized) THEN
     
    209199     ALLOCATE(ZFSUPAI_AERO(KDLON,KFLEV+1))
    210200     ALLOCATE(ZFSDNAI_AERO(KDLON,KFLEV+1))
    211      ALLOCATE(ZFSUP_AERO (KDLON,KFLEV+1,9))
    212      ALLOCATE(ZFSDN_AERO (KDLON,KFLEV+1,9))
    213      ALLOCATE(ZFSUP0_AERO(KDLON,KFLEV+1,9))
    214      ALLOCATE(ZFSDN0_AERO(KDLON,KFLEV+1,9))
     201!-OB decrease size of these arrays to what is needed
     202!                | direct effect
     203!ind effect      | no aerosol   natural  total
     204!natural (PTAU)  |   1            3       2     --ZFSUP/ZFSDN
     205!total (PTAUA)   |                5       4     --ZFSUP/ZFSDN
     206!no cloud        |   1            3       2     --ZFSUP0/ZFSDN0
     207!
     208     ALLOCATE(ZFSUP_AERO (KDLON,KFLEV+1,5))
     209     ALLOCATE(ZFSDN_AERO (KDLON,KFLEV+1,5))
     210     ALLOCATE(ZFSUP0_AERO(KDLON,KFLEV+1,3))
     211     ALLOCATE(ZFSDN0_AERO(KDLON,KFLEV+1,3))
     212! end OB modif
    215213     ZFSUPAD_AERO(:,:)=0.
    216214     ZFSDNAD_AERO(:,:)=0.
     
    226224
    227225  IF (appel1er) THEN
    228      WRITE(lunout,*) 'SW calling frequency : ', swpas
     226     WRITE(lunout,*)'SW calling frequency : ', swpas
    229227     WRITE(lunout,*) "   In general, it should be 1"
    230228     appel1er = .FALSE.
     
    241239     ENDDO
    242240
    243 ! clear sky is either computed IF no direct effect is asked for, or for extended diag)
    244      IF (swaero_diag .or. .not. ok_ade ) THEN   
     241! clear sky with no aerosols at all is computed IF ACTIVEFEEDBACK_ACTIVE is false or for extended diag
     242     IF ( swaero_diag .or. .not. AEROSOLFEEDBACK_ACTIVE ) THEN   
    245243
    246244     ! clear-sky: zero aerosol effect
     
    268266        ENDDO
    269267     ENDDO
    270      ENDIF
    271 
    272 ! cloudy sky is either computed IF no indirect effect is asked for, or for extended diag)
    273      IF (swaero_diag .or. .not. ok_aie ) THEN   
     268     ENDIF ! swaero_diag .or. .not. AEROSOLFEEDBACK_ACTIVE
     269
     270! cloudy sky with no aerosols at all is either computed IF no indirect effect is asked for, or for extended diag
     271     IF ( swaero_diag .or. .not. AEROSOLFEEDBACK_ACTIVE ) THEN   
    274272     ! cloudy-sky: zero aerosol effect
    275273     flag_aer=0.0
     
    297295        ENDDO
    298296     ENDDO
    299      ENDIF
    300 
     297     ENDIF ! swaero_diag .or. .not. AEROSOLFEEDBACK_ACTIVE
    301298
    302299     IF (ok_ade) THEN
    303300
    304         ! clear sky (Anne Cozic 03/07/2007) direct effect of total aerosol
     301        ! clear sky direct effect of total aerosol
    305302        ! CAS AER (2)
    306303        flag_aer=1.0
     
    329326        ENDDO
    330327
    331 ! cloudy sky is either computed IF no indirect effect is asked for, or for extended diag)
    332         IF (swaero_diag .or. .not. ok_aie) THEN 
    333         ! cloudy-sky aerosol direct effect of total aerosol
     328        IF ( swaero_diag ) THEN           
     329        ! clear sky direct effect natural aerosol
     330        ! CAS AER (3)
     331        flag_aer=1.0
     332        CALL SWU_LMDAR4(PSCT,ZCLDSW0,PPMB,PPSOL,&
     333             PRMU0,PFRAC,PTAVE,PWV,&
     334             ZAKI,ZCLD,ZCLEAR,ZDSIG,ZFACT,ZRMU,ZSEC,ZUD)
     335        INU = 1
     336        CALL SW1S_LMDAR4(INU, PAER, flag_aer,&
     337             tauaero(:,:,3,:), pizaero(:,:,3,:), cgaero(:,:,3,:),&
     338             PALBD, PALBP, PCG, ZCLD, ZCLEAR, PCLDSW,&
     339             ZDSIG, POMEGA, ZOZ, ZRMU, ZSEC, PTAU, ZUD,&
     340             ZFD, ZFU)
     341        INU = 2
     342        CALL SW2S_LMDAR4(INU, PAER, flag_aer,&
     343             tauaero(:,:,3,:), pizaero(:,:,3,:), cgaero(:,:,3,:),&
     344             ZAKI, PALBD, PALBP, PCG, ZCLD, ZCLEAR, PCLDSW,&
     345             ZDSIG, POMEGA, ZOZ, ZRMU, ZSEC, PTAU, ZUD,&
     346             PWV, PQS,&
     347             ZFDOWN, ZFUP)
     348
     349        DO JK = 1 , KFLEV+1
     350           DO JL = 1, KDLON
     351              ZFSUP0_AERO(JL,JK,3) = (ZFUP(JL,JK)   + ZFU(JL,JK)) * ZFACT(JL)
     352              ZFSDN0_AERO(JL,JK,3) = (ZFDOWN(JL,JK) + ZFD(JL,JK)) * ZFACT(JL)
     353           ENDDO
     354        ENDDO
     355        ENDIF !swaero_diag
     356
     357        ! cloudy-sky with natural aerosols for indirect effect
     358        ! but total aerosols for direct effect
     359        ! PTAU
     360        ! CAS AER (2)
    334361        flag_aer=1.0
    335362        CALL SWU_LMDAR4(PSCT,PCLDSW,PPMB,PPSOL,&
     
    356383           ENDDO
    357384        ENDDO
    358         ENDIF
    359 
    360 ! natural aeroosl clear sky is  computed  for extended diag)
    361         IF ( swaero_diag ) THEN           
    362         ! clear sky direct effect natural aerosol
    363         flag_aer=1.0
    364         CALL SWU_LMDAR4(PSCT,ZCLDSW0,PPMB,PPSOL,&
    365              PRMU0,PFRAC,PTAVE,PWV,&
    366              ZAKI,ZCLD,ZCLEAR,ZDSIG,ZFACT,ZRMU,ZSEC,ZUD)
    367         INU = 1
    368         CALL SW1S_LMDAR4(INU, PAER, flag_aer,&
    369              tauaero(:,:,3,:), pizaero(:,:,3,:), cgaero(:,:,3,:),&
    370              PALBD, PALBP, PCG, ZCLD, ZCLEAR, PCLDSW,&
    371              ZDSIG, POMEGA, ZOZ, ZRMU, ZSEC, PTAU, ZUD,&
    372              ZFD, ZFU)
    373         INU = 2
    374         CALL SW2S_LMDAR4(INU, PAER, flag_aer,&
    375              tauaero(:,:,3,:), pizaero(:,:,3,:), cgaero(:,:,3,:),&
    376              ZAKI, PALBD, PALBP, PCG, ZCLD, ZCLEAR, PCLDSW,&
    377              ZDSIG, POMEGA, ZOZ, ZRMU, ZSEC, PTAU, ZUD,&
    378              PWV, PQS,&
    379              ZFDOWN, ZFUP)
    380 
    381         DO JK = 1 , KFLEV+1
    382            DO JL = 1, KDLON
    383               ZFSUP0_AERO(JL,JK,3) = (ZFUP(JL,JK)   + ZFU(JL,JK)) * ZFACT(JL)
    384               ZFSDN0_AERO(JL,JK,3) = (ZFDOWN(JL,JK) + ZFD(JL,JK)) * ZFACT(JL)
    385            ENDDO
    386         ENDDO
    387         ENDIF
    388 
    389 ! cloud sky natural is for extended diagnostics
     385!        ENDIF
     386
     387     ENDIF !-end ok_ade
     388
     389     IF ( ok_ade .or. (.not.ok_ade .and. ok_aie) ) THEN
     390
     391        ! cloudy-sky with natural aerosols for indirect effect
     392        ! and natural aerosols for direct effect
     393        ! PTAU
     394        ! CAS AER (3)
    390395        IF ( swaero_diag ) THEN
    391396        ! cloudy-sky direct effect natural aerosol
     
    414419           ENDDO
    415420        ENDDO
    416         ENDIF
    417 
    418      ENDIF ! ok_ade
    419 
    420 ! cloudy sky needs to be computed in all cases IF ok_aie is activated
    421      IF (ok_aie) THEN
    422         !jq   cloudy-sky + aerosol direct + aerosol indirect of total aerosol
     421        ENDIF !swaero_diag
     422
     423     ENDIF  !--true/false or false/true
     424
     425     IF (ok_ade .and. ok_aie) THEN
     426
     427        ! cloudy-sky with total aerosols for indirect effect
     428        ! and total aerosols for direct effect
     429        ! PTAUA
     430        ! CAS AER (2)
    423431        flag_aer=1.0
    424432        CALL SWU_LMDAR4(PSCT,PCLDSW,PPMB,PPSOL,&
     
    438446             PWV, PQS,&
    439447             ZFDOWN, ZFUP)
     448
    440449        DO JK = 1 , KFLEV+1
    441450           DO JL = 1, KDLON
     
    444453           ENDDO
    445454        ENDDO
     455 
     456      ENDIF ! ok_ade .and. ok_aie
     457
     458     IF (ok_aie) THEN
     459        ! cloudy-sky with total aerosols for indirect effect
     460        ! and natural aerosols for direct effect
     461        ! PTAUA
     462        ! CAS AER (3)
     463        flag_aer=1.0
     464        CALL SWU_LMDAR4(PSCT,PCLDSW,PPMB,PPSOL,&
     465             PRMU0,PFRAC,PTAVE,PWV,&
     466             ZAKI,ZCLD,ZCLEAR,ZDSIG,ZFACT,ZRMU,ZSEC,ZUD)
     467        INU = 1
     468        CALL SW1S_LMDAR4(INU, PAER, flag_aer,&
     469             tauaero(:,:,3,:), pizaero(:,:,3,:), cgaero(:,:,3,:),&
     470             PALBD, PALBP, PCG, ZCLD, ZCLEAR, PCLDSW,&
     471             ZDSIG, POMEGAA, ZOZ, ZRMU, ZSEC, PTAUA, ZUD,&
     472             ZFD, ZFU)
     473        INU = 2
     474        CALL SW2S_LMDAR4(INU, PAER, flag_aer,&
     475             tauaero(:,:,3,:), pizaero(:,:,3,:), cgaero(:,:,3,:),&
     476             ZAKI, PALBD, PALBP, PCG, ZCLD, ZCLEAR, PCLDSW,&
     477             ZDSIG, POMEGAA, ZOZ, ZRMU, ZSEC, PTAUA, ZUD,&
     478             PWV, PQS,&
     479             ZFDOWN, ZFUP)
     480 
     481        DO JK = 1 , KFLEV+1
     482           DO JL = 1, KDLON
     483              ZFSUP_AERO(JL,JK,5) = (ZFUP(JL,JK)   + ZFU(JL,JK)) * ZFACT(JL)
     484              ZFSDN_AERO(JL,JK,5) = (ZFDOWN(JL,JK) + ZFD(JL,JK)) * ZFACT(JL)
     485           ENDDO
     486        ENDDO
     487
    446488     ENDIF ! ok_aie     
    447489
     
    450492  itapsw = itapsw + 1
    451493
    452   IF  ( AEROSOLFEEDBACK_ACTIVE .eq. 0) THEN
     494  IF  ( AEROSOLFEEDBACK_ACTIVE ) THEN
    453495  IF ( ok_ade .and. ok_aie  ) THEN
    454496    ZFSUP(:,:) =    ZFSUP_AERO(:,:,4)
     
    457499    ZFSDN0(:,:) =   ZFSDN0_AERO(:,:,2)
    458500  ENDIF
     501
    459502  IF ( ok_ade .and. (.not. ok_aie) )  THEN
    460503    ZFSUP(:,:) =    ZFSUP_AERO(:,:,2)
     
    465508
    466509  IF ( (.not. ok_ade) .and. ok_aie  )  THEN
    467     print*,'Warning: indirect effect in cloudy regions includes direct aerosol effect'
    468     ZFSUP(:,:) =    ZFSUP_AERO(:,:,4)
    469     ZFSDN(:,:) =    ZFSDN_AERO(:,:,4)
    470     ZFSUP0(:,:) =   ZFSUP0_AERO(:,:,1)
    471     ZFSDN0(:,:) =   ZFSDN0_AERO(:,:,1)
    472   ENDIF
     510    ZFSUP(:,:) =    ZFSUP_AERO(:,:,5)
     511    ZFSDN(:,:) =    ZFSDN_AERO(:,:,5)
     512    ZFSUP0(:,:) =   ZFSUP0_AERO(:,:,3)
     513    ZFSDN0(:,:) =   ZFSDN0_AERO(:,:,3)
     514  ENDIF
     515
    473516  IF ((.not. ok_ade) .and. (.not. ok_aie)) THEN
     517    ZFSUP(:,:) =    ZFSUP_AERO(:,:,3)
     518    ZFSDN(:,:) =    ZFSDN_AERO(:,:,3)
     519    ZFSUP0(:,:) =   ZFSUP0_AERO(:,:,3)
     520    ZFSDN0(:,:) =   ZFSDN0_AERO(:,:,3)
     521  ENDIF
     522
     523! MS the following allows to compute the forcing diagostics without
     524! letting the aerosol forcing act on the meteorology
     525! SEE logic above
     526  ELSE
    474527    ZFSUP(:,:) =    ZFSUP_AERO(:,:,1)
    475528    ZFSDN(:,:) =    ZFSDN_AERO(:,:,1)
     
    478531  ENDIF
    479532
    480 ! MS the following allows to compute the forcing diagostics without
    481 ! letting the aerosol forcing act on the meteorology
    482 ! SEE logic above
    483   ELSEIF  ( AEROSOLFEEDBACK_ACTIVE .gt. 0) THEN
    484     ZFSUP(:,:) =    ZFSUP_AERO(:,:,AEROSOLFEEDBACK_ACTIVE)
    485     ZFSDN(:,:) =    ZFSDN_AERO(:,:,AEROSOLFEEDBACK_ACTIVE)
    486     ZFSUP0(:,:) =   ZFSUP0_AERO(:,:,AEROSOLFEEDBACK_ACTIVE)
    487     ZFSDN0(:,:) =   ZFSDN0_AERO(:,:,AEROSOLFEEDBACK_ACTIVE)
    488   ENDIF
    489  
    490 
     533! Now computes heating rates
    491534  DO k = 1, KFLEV
    492535     kpl1 = k+1
     
    511554     PTOPSW(i) = ZFSDN(i,KFLEV+1) - ZFSUP(i,KFLEV+1)
    512555
    513 
    514556! net anthropogenic forcing direct and 1st indirect effect diagnostics
    515557! requires a natural aerosol field read and used
    516558! Difference of net fluxes from double call to radiation
    517559
    518 
    519560IF (ok_ade) THEN
    520561
    521562! indices 1: natural; 2 anthropogenic
     563
    522564! TOA/SRF all sky natural forcing
    523565     PSOLSWAERO(i,1) = (ZFSDN_AERO(i,1,3) - ZFSUP_AERO(i,1,3))-(ZFSDN_AERO(i,1,1) - ZFSUP_AERO(i,1,1))
    524566     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))
    525567
     568! TOA/SRF clear sky natural forcing
     569     PSOLSW0AERO(i,1) = (ZFSDN0_AERO(i,1,3) - ZFSUP0_AERO(i,1,3))-(ZFSDN0_AERO(i,1,1) - ZFSUP0_AERO(i,1,1))
     570     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))
     571
     572   IF (ok_aie) THEN
     573
     574! TOA/SRF all sky anthropogenic forcing
     575     PSOLSWAERO(i,2) = (ZFSDN_AERO(i,1,4) - ZFSUP_AERO(i,1,4))-(ZFSDN_AERO(i,1,5) - ZFSUP_AERO(i,1,5))
     576     PTOPSWAERO(i,2) = (ZFSDN_AERO(i,KFLEV+1,4) - ZFSUP_AERO(i,KFLEV+1,4))- (ZFSDN_AERO(i,KFLEV+1,5) - ZFSUP_AERO(i,KFLEV+1,5))
     577
     578   ELSE
     579
    526580! TOA/SRF all sky anthropogenic forcing
    527581     PSOLSWAERO(i,2) = (ZFSDN_AERO(i,1,2) - ZFSUP_AERO(i,1,2))-(ZFSDN_AERO(i,1,3) - ZFSUP_AERO(i,1,3))
    528582     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))
    529583
    530 ! TOA/SRF clear sky natural forcing
    531      PSOLSW0AERO(i,1) = (ZFSDN0_AERO(i,1,3) - ZFSUP0_AERO(i,1,3))-(ZFSDN0_AERO(i,1,1) - ZFSUP0_AERO(i,1,1))
    532      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))
     584   ENDIF
    533585
    534586! TOA/SRF clear sky anthropogenic forcing
     
    536588     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))
    537589
     590! direct anthropogenic forcing , as in old LMDzT, however differences of net fluxes
     591     PSOLSWADAERO(i) = PSOLSWAERO(i,2)
     592     PTOPSWADAERO(i) = PTOPSWAERO(i,2)
     593     PSOLSWAD0AERO(i) = PSOLSW0AERO(i,2)
     594     PTOPSWAD0AERO(i) = PTOPSW0AERO(i,2)
     595
     596! OB: these diagnostics may not always work but who need them
    538597! Cloud forcing indices 1: natural; 2 anthropogenic; 3: zero aerosol direct effect
    539598! Instantaneously computed cloudy sky direct aerosol effect, cloud forcing due to aerosols above clouds
     
    552611     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))
    553612
    554 ! direct anthropogenic forcing , as in old LMDzT, however differences of net fluxes
    555      PSOLSWADAERO(i) = PSOLSWAERO(i,2)
    556      PTOPSWADAERO(i) = PTOPSWAERO(i,2)
    557      PSOLSWAD0AERO(i) = PSOLSW0AERO(i,2)
    558      PTOPSWAD0AERO(i) = PTOPSW0AERO(i,2)
    559 
    560613ENDIF
    561614
    562 
    563615IF (ok_aie) THEN
     616   IF (ok_ade) THEN
    564617     PSOLSWAIAERO(i) = (ZFSDN_AERO(i,1,4) - ZFSUP_AERO(i,1,4))-(ZFSDN_AERO(i,1,2) - ZFSUP_AERO(i,1,2))
    565618     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))
     619   ELSE
     620     PSOLSWAIAERO(i) = (ZFSDN_AERO(i,1,5) - ZFSUP_AERO(i,1,5))-(ZFSDN_AERO(i,1,3) - ZFSUP_AERO(i,1,3))
     621     PTOPSWAIAERO(i) = (ZFSDN_AERO(i,KFLEV+1,5) - ZFSUP_AERO(i,KFLEV+1,5))-(ZFSDN_AERO(i,KFLEV+1,3) - ZFSUP_AERO(i,KFLEV+1,3))
     622   ENDIF
    566623ENDIF
    567624
    568   ENDDO
     625ENDDO
     626
    569627END SUBROUTINE SW_AEROAR4
Note: See TracChangeset for help on using the changeset viewer.