Ignore:
Timestamp:
May 16, 2017, 5:48:35 PM (7 years ago)
Author:
jyg
Message:

New flag for the dry convective adjustment of the
wake region:
iflag_adjwk: 0 = Default: no convective
adjustment of w-region; 1 => convective adjustment
but state variables are unchanged; 2 => convective
adjustment and state variables are changed.

iflag_adjwk supersedes ok_adjwk with the equivalence:

ok_adjwk=n <==> iflag_adjwk=0;
ok_adjwk=y <==> iflag_adjwk=2;

which guarantees backward compatibility.

File:
1 edited

Legend:

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

    r2877 r2882  
    600600    LOGICAL,SAVE :: ok_adjwk=.FALSE.
    601601    !$OMP THREADPRIVATE(ok_adjwk)
     602    INTEGER,SAVE :: iflag_adjwk=0            !jyg
     603    !$OMP THREADPRIVATE(iflag_adjwk)         !jyg
    602604    REAL,SAVE :: oliqmax=999.,oicemax=999.
    603605    !$OMP THREADPRIVATE(oliqmax,oicemax)
     
    12021204       CALL suphel ! initialiser constantes et parametres phys.
    12031205       CALL getin_p('random_notrig_max',random_notrig_max)
    1204        CALL getin_p('ok_adjwk',ok_adjwk)
     1206       CALL getin_p('ok_adjwk',ok_adjwk)
     1207       IF (ok_adjwk) iflag_adjwk=2  ! for compatibility with older versions
     1208       ! iflag_adjwk: ! 0 = Default: no convective adjustment of w-region
     1209                      ! 1 => convective adjustment but state variables are unchanged
     1210                      ! 2 => convective adjustment and state variables are changed
     1211       CALL getin_p('iflag_adjwk',iflag_adjwk)
    12051212       CALL getin_p('oliqmax',oliqmax)
    12061213       CALL getin_p('oicemax',oicemax)
     
    24242431       ! after the call to the convective scheme.
    24252432       IF (iflag_wake>=1) then
    2426           IF (ok_adjwk) THEN
     2433          IF (iflag_adjwk >= 1) THEN
    24272434             limbas(:) = 1
    24282435             CALL ajsec(paprs, pplay, t_w, q_w, limbas, &
     
    24422449                ENDDO
    24432450             ENDDO
    2444              CALL add_wake_tend &
     2451             IF (iflag_adjwk == 2) THEN
     2452               CALL add_wake_tend &
    24452453                 (d_deltat_ajs_cv, d_deltaq_ajs_cv, dsig0, ddens0, wkoccur1, 'ajs_cv', abortphy)
    2446           ENDIF  ! (ok_adjwk)
     2454             ENDIF  ! (iflag_adjwk == 2)
     2455          ENDIF  ! (iflag_adjwk >= 1)
    24472456       ENDIF ! (iflag_wake>=1)
    24482457       !>jyg
     
    25262535          !    Add the tendency due to the dry adjustment of the wake profile
    25272536          IF (iflag_wake>=1) THEN
    2528              DO k=1,klev
    2529                 DO i=1,klon
    2530                    ftd(i,k) = ftd(i,k) + wake_s(i)*d_t_adjwk(i,k)/dtime
    2531                    fqd(i,k) = fqd(i,k) + wake_s(i)*d_q_adjwk(i,k)/dtime
    2532                    d_t_con(i,k) = d_t_con(i,k) + wake_s(i)*d_t_adjwk(i,k)
    2533                    d_q_con(i,k) = d_q_con(i,k) + wake_s(i)*d_q_adjwk(i,k)
    2534                 ENDDO
    2535              ENDDO
    2536           ENDIF
     2537            IF (iflag_adjwk == 2) THEN
     2538              DO k=1,klev
     2539                 DO i=1,klon
     2540                    ftd(i,k) = ftd(i,k) + wake_s(i)*d_t_adjwk(i,k)/dtime
     2541                    fqd(i,k) = fqd(i,k) + wake_s(i)*d_q_adjwk(i,k)/dtime
     2542                    d_t_con(i,k) = d_t_con(i,k) + wake_s(i)*d_t_adjwk(i,k)
     2543                    d_q_con(i,k) = d_q_con(i,k) + wake_s(i)*d_q_adjwk(i,k)
     2544                 ENDDO
     2545              ENDDO
     2546            ENDIF  ! (iflag_adjwk = 2)
     2547          ENDIF   ! (iflag_wake>=1)
    25372548          !>jyg
    25382549          !
Note: See TracChangeset for help on using the changeset viewer.