Ignore:
Timestamp:
May 30, 2016, 10:46:40 PM (8 years ago)
Author:
oboucher
Message:

Reviewing the way swaero_diag is computed to correct an old bug that
makes topswad and co diagnostics wrong for the first timestep...
And introducing swaero_diag in rrtm/recmwf_aero so that double and
triple radiation calls when diagnostics are not needed to save time

File:
1 edited

Legend:

Unmodified
Added
Removed
  • LMDZ5/trunk/libf/phylmd/rrtm/recmwf_aero.F90

    r2146 r2529  
    161161IMPLICIT NONE
    162162INCLUDE "clesphys.h"
    163 
    164163
    165164INTEGER(KIND=JPIM),INTENT(IN)    :: KPROMA
     
    306305! not ok_ade and not ok_aie = 1 to proceed
    307306! therefore the cases have the following corresponding switches
    308 ! 1 = not ok_ade or not ok_aie
    309 ! 2 = ok_aie
    310 ! 3 = ok_ade
     307! 1 = not ok_ade and not ok_aie OR not ok_ade and ok_aie and swaero_diag OR ok_ade and not ok_aie and swaero_diag
     308! 2 = not ok_ade and ok_aie OR ok_aie and ok_ade and swaero_diag
     309! 3 = ok_ade and not ok_aie OR ok_aie and ok_ade and swaero_diag
    311310! 4 = ok_ade and ok_aie
    312311! 5 = no aerosol feedback wanted or no aerosol at all
     
    445444IF (flag_aerosol .GT. 0 .OR. flag_aerosol_strat) THEN
    446445
    447 IF ( .not. ok_ade .or. .not. ok_aie ) THEN
     446!--Case 1
     447IF ( ( .not. ok_ade .AND. .not. ok_aie ) .OR.             &
     448   & ( .not. ok_ade .AND. ok_aie .AND. swaero_diag ) .OR. &
     449   & ( ok_ade .AND. .not. ok_aie .AND. swaero_diag ) ) THEN
    448450
    449451! natural aerosols for direct and indirect effect
     
    483485ENDIF
    484486
    485 IF (ok_aie) THEN
     487!--Case 2
     488IF ( ( .not. ok_ade .AND. ok_aie ) .OR. &
     489   & ( ok_ade .AND. ok_aie .AND. swaero_diag ) ) THEN
    486490
    487491! natural aerosols for direct indirect effect
     
    521525ENDIF ! ok_aie     
    522526
    523 IF (ok_ade) THEN
     527!--Case 3
     528IF ( ( ok_ade .AND. .not. ok_aie ) .OR. &
     529   & ( ok_ade .AND. ok_aie .AND. swaero_diag ) ) THEN
    524530
    525531! direct effect of total aerosol activated
     
    559565ENDIF !-end ok_ade
    560566
     567!--Case 4
    561568IF (ok_ade .and. ok_aie) THEN
    562569
Note: See TracChangeset for help on using the changeset viewer.