Changeset 3208 for LMDZ6/trunk/libf
- Timestamp:
- Feb 16, 2018, 12:42:18 PM (7 years ago)
- Location:
- LMDZ6/trunk/libf/phylmd
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/trunk/libf/phylmd/add_wake_tend.F90
r2635 r3208 1 SUBROUTINE add_wake_tend(zddeltat, zddeltaq, zds, zddens , zoccur, text, abortphy)1 SUBROUTINE add_wake_tend(zddeltat, zddeltaq, zds, zddensaw, zddensw, zoccur, text, abortphy) 2 2 !=================================================================== 3 3 ! Ajoute les tendances liées aux diverses parametrisations physiques aux … … 9 9 10 10 USE dimphy, ONLY: klon, klev 11 USE phys_state_var_mod, ONLY: wake_deltat, wake_deltaq, wake_s, wake_dens 11 USE phys_state_var_mod, ONLY: wake_deltat, wake_deltaq, wake_s, & 12 awake_dens, wake_dens 12 13 13 14 USE print_control_mod, ONLY: prt_level … … 17 18 !------------ 18 19 REAL, DIMENSION(klon, klev), INTENT (IN) :: zddeltat, zddeltaq 19 REAL, DIMENSION(klon), INTENT (IN) :: zds, zddens 20 REAL, DIMENSION(klon), INTENT (IN) :: zds, zddensaw, zddensw 20 21 INTEGER, DIMENSION(klon), INTENT (IN) :: zoccur 21 22 CHARACTER*(*), INTENT (IN) :: text … … 53 54 DO i = 1, klon 54 55 IF (zoccur(i) .GE. 1) THEN 55 wake_s(i) = wake_s(i) + zds(i) 56 wake_dens(i) = wake_dens(i) + zddens(i) 56 wake_s(i) = wake_s(i) + zds(i) 57 awake_dens(i) = awake_dens(i) + zddensaw(i) 58 wake_dens(i) = wake_dens(i) + zddensw(i) 57 59 ELSE 58 wake_s(i) = 0. 59 wake_dens(i) = 0. 60 wake_s(i) = 0. 61 awake_dens(i) = 0. 62 wake_dens(i) = 0. 60 63 ENDIF ! (zoccur(i) .GE. 1) 61 64 END DO -
LMDZ6/trunk/libf/phylmd/alpale_th.F90
r3073 r3208 3 3 ale_bl_trig, ale_bl_stat, ale_bl, & 4 4 alp_bl, alp_bl_stat, & 5 proba_notrig, random_notrig) 5 proba_notrig, random_notrig, birth_rate, & 6 q_alp) 6 7 7 8 ! ************************************************************** … … 42 43 REAL, DIMENSION(klon), INTENT(OUT) :: random_notrig 43 44 45 REAL, DIMENSION(klon), INTENT(OUT) :: birth_rate 46 REAL, DIMENSION(klon), INTENT(OUT) :: q_alp 47 44 48 include "thermcell.h" 45 49 … … 53 57 REAL, DIMENSION(klon) :: ale_bl_ref 54 58 REAL, DIMENSION(klon) :: tau_trig 55 REAL, DIMENSION(klon) :: birth_rate56 59 ! 57 60 !$OMP THREADPRIVATE(random_notrig_max) … … 103 106 ! 104 107 IF (prt_level .GE. 10) THEN 105 print *,'cin, ale_bl_stat, alp_bl _stat ', &106 cin, ale_bl_stat, alp_bl _stat108 print *,'cin, ale_bl_stat, alp_bl, alp_bl_stat ', & 109 cin, ale_bl_stat, alp_bl, alp_bl_stat 107 110 ENDIF 108 111 … … 141 144 ale_bl_trig(i)=0. 142 145 endif 146 birth_rate(i) = n2(i)*exp(-s_trig/s2(i))/(tau_trig(i)*cell_area(i)) 147 !!! birth_rate(i) = max(birth_rate(i),1.e-18) 148 q_alp(i) = alp_bl(i)/max(birth_rate(i),1.e-18) 143 149 else 144 150 !!jyg proba_notrig(i)=1. 151 birth_rate(i) = 0. 145 152 random_notrig(i)=0. 146 153 ale_bl_trig(i)=0. 154 q_alp(i) = 0. 147 155 endif 148 156 enddo … … 160 168 ale_bl_trig(i)=0. 161 169 endif 170 birth_rate(i) = n2(i)*exp(-s_trig/s2(i))/(tau_trig(i)*cell_area(i)) 171 !!! birth_rate(i) = max(birth_rate(i),1.e-18) 172 q_alp(i) = alp_bl(i)/max(birth_rate(i),1.e-18) 162 173 else 163 174 !!jyg proba_notrig(i)=1. 175 birth_rate(i) = 0. 164 176 random_notrig(i)=0. 165 177 ale_bl_trig(i)=0. 178 q_alp(i) = 0. 166 179 endif 167 180 enddo … … 257 270 birth_number = n2(i)*exp(-s_trig/s2(i)) 258 271 birth_rate(i) = birth_number/(tau_trig(i)*cell_area(i)) 272 !!! birth_rate(i) = max(birth_rate(i),1.e-18) 259 273 proba_notrig(i)=proba_notrig(i)*exp(-birth_number*dtime/tau_trig(i)) 274 q_alp(i) = alp_bl(i)/max(birth_rate(i),1.e-18) 260 275 Alp_bl(i) = Alp_bl(i)* & 261 276 umexp(-birth_number*cv_feed_area/cell_area(i))/ & … … 264 279 else 265 280 !!jyg proba_notrig(i)=1. 281 birth_rate(i)=0. 266 282 random_notrig(i)=0. 267 283 alp_bl(i)=0. 284 q_alp(i) = 0. 268 285 endif 269 286 enddo … … 291 308 292 309 IF (prt_level .GE. 10) THEN 293 print *,'ale_bl_trig, alp_bl_stat ',ale_bl_trig, alp_bl_stat 310 print *,'alpale_th: ale_bl_trig, alp_bl_stat, birth_rate, q_alp ', & 311 ale_bl_trig(1), alp_bl_stat(1), birth_rate(1), q_alp(1) 294 312 ENDIF 295 313 -
LMDZ6/trunk/libf/phylmd/calwake.F90
r3000 r3208 4 4 SUBROUTINE calwake(iflag_wake_tend, paprs, pplay, dtime, & 5 5 t, q, omgb, & 6 dt_dwn, dq_dwn, m_dwn, m_up, dt_a, dq_a, &7 sigd, &8 wake_deltat, wake_deltaq, wake_s, wake_dens, &6 dt_dwn, dq_dwn, m_dwn, m_up, dt_a, dq_a, wgen, & 7 sigd, Cin, & 8 wake_deltat, wake_deltaq, wake_s, awake_dens, wake_dens, & 9 9 wake_dth, wake_h, & 10 10 wake_pe, wake_fip, wake_gfl, & … … 14 14 wake_omg, wake_dp_deltomg, & 15 15 wake_spread, wake_cstar, wake_d_deltat_gw, & 16 wake_ddeltat, wake_ddeltaq, wake_ds, wake_ddens)16 wake_ddeltat, wake_ddeltaq, wake_ds, awake_ddens, wake_ddens) 17 17 ! ************************************************************** 18 18 ! * … … 45 45 REAL, DIMENSION(klon, klev), INTENT (IN) :: m_up, m_dwn 46 46 REAL, DIMENSION(klon, klev), INTENT (IN) :: dt_a, dq_a 47 REAL, DIMENSION(klon), INTENT (IN) :: wgen 47 48 REAL, DIMENSION(klon), INTENT (IN) :: sigd 49 REAL, DIMENSION(klon), INTENT (IN) :: Cin 48 50 ! Input/Output 49 51 ! ------------ 50 52 REAL, DIMENSION(klon, klev), INTENT (INOUT) :: wake_deltat, wake_deltaq 51 53 REAL, DIMENSION(klon), INTENT (INOUT) :: wake_s 52 REAL, DIMENSION(klon), INTENT (INOUT) :: wake_dens54 REAL, DIMENSION(klon), INTENT (INOUT) :: awake_dens, wake_dens 53 55 ! Output 54 56 ! ------ … … 67 69 REAL, DIMENSION(klon), INTENT (OUT) :: wake_cstar 68 70 REAL, DIMENSION(klon, klev), INTENT (OUT) :: wake_ddeltat, wake_ddeltaq 69 REAL, DIMENSION(klon), INTENT (OUT) :: wake_ds, wake_ddens71 REAL, DIMENSION(klon), INTENT (OUT) :: wake_ds, awake_ddens, wake_ddens 70 72 71 73 … … 88 90 REAL, DIMENSION(klon, klev) :: tx, qx 89 91 REAL, DIMENSION(klon) :: hw, wape, fip, gfl 90 REAL, DIMENSION(klon) :: sigmaw, wdens92 REAL, DIMENSION(klon) :: sigmaw, awdens, wdens 91 93 REAL, DIMENSION(klon, klev) :: omgbdth 92 94 REAL, DIMENSION(klon, klev) :: dp_omgb … … 99 101 REAL, DIMENSION(klon, klev) :: d_deltat_gw 100 102 REAL, DIMENSION(klon, klev) :: d_deltatw, d_deltaqw 101 REAL, DIMENSION(klon) :: d_sigmaw, d_ wdens103 REAL, DIMENSION(klon) :: d_sigmaw, d_awdens, d_wdens 102 104 103 105 REAL :: rdcp … … 105 107 106 108 IF (prt_level >= 10) THEN 107 print *, '-> calwake, wake_s input ', wake_s(1)109 print *, '-> calwake, wake_s, wgen input ', wake_s(1), wgen(1) 108 110 ENDIF 109 111 … … 147 149 d_deltaqw(:,:) = 0. 148 150 d_sigmaw(:) = 0. 151 d_awdens(:) = 0. 149 152 d_wdens(:) = 0. 150 153 ! … … 179 182 180 183 DO i = 1, klon 184 awdens(i) = max(0., awake_dens(i)) 181 185 wdens(i) = max(0., wake_dens(i)) 182 186 END DO … … 206 210 CALL wake(znatsurf, p, ph, pi, dtime, & 207 211 te, qe, omgbe, & 208 dtdwn, dqdwn, amdwn, amup, dta, dqa, &209 sigd0, &210 dtw, dqw, sigmaw, wdens, & ! state variables212 dtdwn, dqdwn, amdwn, amup, dta, dqa, wgen, & 213 sigd0, Cin, & 214 dtw, dqw, sigmaw, awdens, wdens, & ! state variables 211 215 dth, hw, wape, fip, gfl, & 212 216 dtls, dqls, ktopw, omgbdth, dp_omgb, tx, qx, & 213 217 dtke, dqke, omg, dp_deltomg, spread, cstar, & 214 218 d_deltat_gw, & 215 d_deltatw, d_deltaqw, d_sigmaw, d_ wdens) ! tendencies219 d_deltatw, d_deltaqw, d_sigmaw, d_awdens, d_wdens) ! tendencies 216 220 217 221 ! … … 274 278 IF (ktopw(i)>0) THEN 275 279 wake_ds(i) = d_sigmaw(i)*dtime 280 awake_ddens(i) = d_awdens(i)*dtime 276 281 wake_ddens(i) = d_wdens(i)*dtime 277 282 ELSE … … 298 303 DO i = 1, klon 299 304 wake_s(i) = sigmaw(i) 305 awake_dens(i) = awdens(i) 300 306 wake_dens(i) = wdens(i) 301 307 END DO -
LMDZ6/trunk/libf/phylmd/phys_local_var_mod.F90
r3179 r3208 277 277 REAL, SAVE, ALLOCATABLE,DIMENSION(:,:) :: d_deltat_wk, d_deltaq_wk 278 278 !$OMP THREADPRIVATE(d_deltat_wk, d_deltaq_wk) 279 REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: d_s_wk, d_dens_ wk280 !$OMP THREADPRIVATE(d_s_wk, d_dens_ wk)279 REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: d_s_wk, d_dens_a_wk, d_dens_wk 280 !$OMP THREADPRIVATE(d_s_wk, d_dens_a_wk, d_dens_wk) 281 281 REAL, SAVE, ALLOCATABLE,DIMENSION(:,:) :: d_deltat_wk_gw, d_deltaq_wk_gw 282 282 !$OMP THREADPRIVATE(d_deltat_wk_gw, d_deltaq_wk_gw) … … 383 383 REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: proba_notrig, random_notrig 384 384 !$OMP THREADPRIVATE(proba_notrig, random_notrig) 385 REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: cv_gen 386 !$OMP THREADPRIVATE(cv_gen) 385 387 REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: fsolsw, wfbils, wfbilo 386 388 !$OMP THREADPRIVATE(fsolsw, wfbils, wfbilo) … … 677 679 ALLOCATE(wake_omg(klon, klev)) 678 680 ALLOCATE(d_deltat_wk(klon, klev), d_deltaq_wk(klon, klev)) 679 ALLOCATE(d_s_wk(klon), d_dens_ wk(klon))681 ALLOCATE(d_s_wk(klon), d_dens_a_wk(klon), d_dens_wk(klon)) 680 682 ALLOCATE(d_deltat_wk_gw(klon, klev), d_deltaq_wk_gw(klon, klev)) 681 683 ALLOCATE(d_deltat_vdf(klon, klev), d_deltaq_vdf(klon, klev)) … … 735 737 ALLOCATE(alp_bl_stat(klon), n2(klon), s2(klon)) 736 738 ALLOCATE(proba_notrig(klon), random_notrig(klon)) 739 ALLOCATE(cv_gen(klon)) 737 740 738 741 ALLOCATE(dnwd0(klon, klev)) … … 968 971 DEALLOCATE(wake_omg) 969 972 DEALLOCATE(d_deltat_wk, d_deltaq_wk) 970 DEALLOCATE(d_s_wk, d_dens_ wk)973 DEALLOCATE(d_s_wk, d_dens_a_wk, d_dens_wk) 971 974 DEALLOCATE(d_deltat_wk_gw, d_deltaq_wk_gw) 972 975 DEALLOCATE(d_deltat_vdf, d_deltaq_vdf) … … 1023 1026 DEALLOCATE(alp_bl_stat, n2, s2) 1024 1027 DEALLOCATE(proba_notrig, random_notrig) 1028 DEALLOCATE(cv_gen) 1025 1029 1026 1030 DEALLOCATE(dnwd0) -
LMDZ6/trunk/libf/phylmd/phys_output_ctrlout_mod.F90
r3171 r3208 1546 1546 TYPE(ctrl_out), SAVE :: o_dqwak2d = ctrl_out((/ 4, 5, 10, 10, 10, 10, 11, 11, 11, 11/), & 1547 1547 'dqwak2d', 'Wake dQ', '(kg/m2)/s', (/ ('', i=1, 10) /)) 1548 TYPE(ctrl_out), SAVE :: o_cv_gen = ctrl_out((/ 4, 5, 10, 10, 10, 10, 11, 11, 11, 11/), & 1549 'cv_gen', 'Cumulonimbus genesis', '1/(m2 s)', (/ ('', i=1, 10) /)) 1548 1550 TYPE(ctrl_out), SAVE :: o_wake_h = ctrl_out((/ 4, 5, 10, 10, 10, 10, 11, 11, 11, 11/), & 1549 1551 'wake_h', 'wake_h', '-', (/ ('', i=1, 10) /)) 1552 TYPE(ctrl_out), SAVE :: o_wake_dens = ctrl_out((/ 4, 5, 10, 10, 10, 10, 11, 11, 11, 11/), & 1553 'wake_dens', 'number of wakes per m2', '1/m2', (/ ('', i=1, 10) /)) 1550 1554 TYPE(ctrl_out), SAVE :: o_wake_s = ctrl_out((/ 4, 5, 10, 10, 10, 10, 11, 11, 11, 11/), & 1551 1555 'wake_s', 'wake_s', '-', (/ ('', i=1, 10) /)) … … 1555 1559 'wake_deltaq', 'wake_deltaq', ' ', (/ ('', i=1, 10) /)) 1556 1560 TYPE(ctrl_out), SAVE :: o_wake_omg = ctrl_out((/ 4, 5, 10, 10, 10, 10, 11, 11, 11, 11/), & 1557 'wake_omg', 'wake_omg', ' 1561 'wake_omg', 'wake_omg', 'Pa/s', (/ ('', i=1, 10) /)) 1558 1562 TYPE(ctrl_out), SAVE :: o_wdtrainA = ctrl_out((/ 4, 5, 10, 4, 10, 10, 11, 11, 11, 11 /), & 1559 1563 'wdtrainA', 'precipitation from AA', '-', (/ ('', i=1, 10) /)) -
LMDZ6/trunk/libf/phylmd/phys_output_write_mod.F90
r3179 r3208 83 83 o_cdragh_x , o_cdragh_w , o_cdragm_x , o_cdragm_w , & 84 84 o_kh , o_kh_x , o_kh_w , & 85 o_ale, o_alp, o_cin, o_WAPE, o_wake_h, &85 o_ale, o_alp, o_cin, o_WAPE, o_wake_h, o_cv_gen, o_wake_dens, & 86 86 o_wake_s, o_wake_deltat, o_wake_deltaq, & 87 87 o_wake_omg, o_dtwak, o_dqwak, o_dqwak2d, o_Vprecip, & … … 226 226 wstar, cape, ema_pcb, ema_pct, & 227 227 ema_cbmf, Ma, fm_therm, ale_bl, alp_bl, ale, & 228 alp, cin, wake_pe, wake_ s, wake_deltat, &228 alp, cin, wake_pe, wake_dens, wake_s, wake_deltat, & 229 229 wake_deltaq, ftd, fqd, ale_bl_trig, albsol1, & 230 230 ale_wake, ale_bl_stat, & … … 263 263 cdragh_x ,cdragh_w ,cdragm_x ,cdragm_w , & 264 264 kh ,kh_x ,kh_w , & 265 wake_h, &265 cv_gen, wake_h, & 266 266 wake_omg, d_t_wake, d_q_wake, Vprecip, & 267 267 wdtrainA, wdtrainM, n2, s2, proba_notrig, & … … 1137 1137 CALL histwrite_phy(o_cin, cin) 1138 1138 CALL histwrite_phy(o_WAPE, wake_pe) 1139 CALL histwrite_phy(o_cv_gen, cv_gen) 1139 1140 CALL histwrite_phy(o_wake_h, wake_h) 1141 CALL histwrite_phy(o_wake_dens, wake_dens) 1140 1142 CALL histwrite_phy(o_wake_s, wake_s) 1141 1143 CALL histwrite_phy(o_wake_deltat, wake_deltat) -
LMDZ6/trunk/libf/phylmd/phys_state_var_mod.F90
r3150 r3208 247 247 ! wake_deltaq : ecart d'humidite avec la zone non perturbee 248 248 ! wake_s : fraction surfacique occupee par la poche froide 249 ! awake_dens : number of active wakes per unit area 249 250 ! wake_dens : number of wakes per unit area 250 251 ! wake_occ : occurence of wakes (= 1 if wakes occur, =0 otherwise) … … 258 259 REAL,ALLOCATABLE,SAVE :: wake_s(:) 259 260 !$OMP THREADPRIVATE(wake_s) 260 REAL,ALLOCATABLE,SAVE :: wake_dens(:)261 !$OMP THREADPRIVATE( wake_dens)261 REAL,ALLOCATABLE,SAVE :: awake_dens(:), wake_dens(:) 262 !$OMP THREADPRIVATE(awake_dens, wake_dens) 262 263 REAL,ALLOCATABLE,SAVE :: wake_Cstar(:) 263 264 !$OMP THREADPRIVATE(wake_Cstar) … … 539 540 ALLOCATE(wght_th(klon,klev)) 540 541 ALLOCATE(wake_deltat(klon,klev), wake_deltaq(klon,klev)) 541 ALLOCATE(wake_s(klon), wake_dens(klon))542 ALLOCATE(wake_s(klon), awake_dens(klon), wake_dens(klon)) 542 543 ALLOCATE(wake_Cstar(klon)) 543 544 ALLOCATE(wake_pe(klon), wake_fip(klon)) … … 682 683 deallocate(lalim_conv, wght_th) 683 684 deallocate(wake_deltat, wake_deltaq) 684 deallocate(wake_s, wake_dens)685 deallocate(wake_s, awake_dens, wake_dens) 685 686 deallocate(wake_Cstar, wake_pe, wake_fip) 686 687 !jyg< -
LMDZ6/trunk/libf/phylmd/physiq_mod.F90
r3199 r3208 151 151 d_deltat_ajs_cv, d_deltaq_ajs_cv, & ! due to dry adjustment of (w) before convection 152 152 ! tendencies of wake fractional area and wake number per unit area: 153 d_s_wk, d_dens_ wk, &! due to wakes154 !!! d_s_vdf, d_dens_ vdf, &! due to vertical diffusion155 !!! d_s_the, d_dens_ the, &! due to thermals153 d_s_wk, d_dens_a_wk, d_dens_wk, & ! due to wakes 154 !!! d_s_vdf, d_dens_a_vdf, d_dens_vdf, & ! due to vertical diffusion 155 !!! d_s_the, d_dens_a_the, d_dens_the, & ! due to thermals 156 156 ! 157 157 ptconv, ratqsc, & … … 162 162 alp_bl_stat, n2, s2, & 163 163 proba_notrig, random_notrig, & 164 cv_gen, & 164 165 ! 165 166 dnwd0, & … … 2363 2364 d_deltaq_vdf(:,:) = d_q_vdf_w(:,:)-d_q_vdf_x(:,:) 2364 2365 CALL add_wake_tend & 2365 (d_deltat_vdf, d_deltaq_vdf, dsig0, ddens0, wkoccur1, 'vdf', abortphy)2366 (d_deltat_vdf, d_deltaq_vdf, dsig0, ddens0, ddens0, wkoccur1, 'vdf', abortphy) 2366 2367 ELSE 2367 2368 d_deltat_vdf(:,:) = 0. … … 2606 2607 IF (iflag_adjwk == 2) THEN 2607 2608 CALL add_wake_tend & 2608 (d_deltat_ajs_cv, d_deltaq_ajs_cv, dsig0, ddens0, wkoccur1, 'ajs_cv', abortphy)2609 (d_deltat_ajs_cv, d_deltaq_ajs_cv, dsig0, ddens0, ddens0, wkoccur1, 'ajs_cv', abortphy) 2609 2610 ENDIF ! (iflag_adjwk == 2) 2610 2611 ENDIF ! (iflag_adjwk >= 1) … … 2960 2961 t_seri, q_seri, omega, & 2961 2962 dt_dwn, dq_dwn, M_dwn, M_up, & 2962 dt_a, dq_a, &2963 sigd, &2964 wake_deltat, wake_deltaq, wake_s, wake_dens, &2963 dt_a, dq_a, cv_gen, & 2964 sigd, cin, & 2965 wake_deltat, wake_deltaq, wake_s, awake_dens, wake_dens, & 2965 2966 wake_dth, wake_h, & 2966 2967 !! wake_pe, wake_fip, wake_gfl, & … … 2972 2973 wake_omg, wake_dp_deltomg, & 2973 2974 wake_spread, wake_Cstar, d_deltat_wk_gw, & 2974 d_deltat_wk, d_deltaq_wk, d_s_wk, d_dens_ wk)2975 d_deltat_wk, d_deltaq_wk, d_s_wk, d_dens_a_wk, d_dens_wk) 2975 2976 ! 2976 2977 !jyg Reinitialize itapwk when wakes have been called … … 2991 2992 2992 2993 CALL add_wake_tend & 2993 (d_deltat_wk, d_deltaq_wk, d_s_wk, d_dens_ wk, wake_k, &2994 (d_deltat_wk, d_deltaq_wk, d_s_wk, d_dens_a_wk, d_dens_wk, wake_k, & 2994 2995 'wake', abortphy) 2995 2996 call prt_enerbil('wake',itap) … … 3130 3131 IF (ok_bug_split_th) THEN 3131 3132 CALL add_wake_tend & 3132 (d_deltat_the, d_deltaq_the, dsig0, ddens0, wkoccur1, 'the', abortphy)3133 (d_deltat_the, d_deltaq_the, dsig0, ddens0, ddens0, wkoccur1, 'the', abortphy) 3133 3134 ELSE 3134 3135 CALL add_wake_tend & 3135 (d_deltat_the, d_deltaq_the, dsig0, ddens0, wake_k, 'the', abortphy)3136 (d_deltat_the, d_deltaq_the, dsig0, ddens0, ddens0, wake_k, 'the', abortphy) 3136 3137 ENDIF 3137 3138 call prt_enerbil('the',itap) … … 3148 3149 ale_bl_trig, ale_bl_stat, ale_bl, & 3149 3150 alp_bl, alp_bl_stat, & 3150 proba_notrig, random_notrig )3151 proba_notrig, random_notrig, cv_gen) 3151 3152 !>jyg 3152 3153 -
LMDZ6/trunk/libf/phylmd/tend_to_tke.F90
r3198 r3208 120 120 121 121 122 DO isrf=1,n srf122 DO isrf=1,nbsrf 123 123 DO k=1,klev 124 124 DO i=1,klon -
LMDZ6/trunk/libf/phylmd/wake.F90
r2922 r3208 4 4 SUBROUTINE wake(znatsurf, p, ph, pi, dtime, & 5 5 te0, qe0, omgb, & 6 dtdwn, dqdwn, amdwn, amup, dta, dqa, &7 sigd_con, &8 deltatw, deltaqw, sigmaw, wdens, &! state variables6 dtdwn, dqdwn, amdwn, amup, dta, dqa, wgen, & 7 sigd_con, Cin, & 8 deltatw, deltaqw, sigmaw, awdens, wdens, & ! state variables 9 9 dth, hw, wape, fip, gfl, & 10 10 dtls, dqls, ktopw, omgbdth, dp_omgb, tu, qu, & 11 11 dtke, dqke, omg, dp_deltomg, spread, cstar, & 12 12 d_deltat_gw, & 13 d_deltatw2, d_deltaqw2, d_sigmaw2, d_ wdens2)! tendencies13 d_deltatw2, d_deltaqw2, d_sigmaw2, d_awdens2, d_wdens2) ! tendencies 14 14 15 15 … … 48 48 ! dtls : large scale temperature tendency due to wake 49 49 ! dqls : large scale humidity tendency due to wake 50 ! hw : hauteur de la poche50 ! hw : wake top hight (given by hw*deltatw(1)/2=wape) 51 51 ! dp_omgb : vertical gradient of large scale omega 52 ! awdens : densite de poches actives 52 53 ! wdens : densite de poches 53 54 ! omgbdth: flux of Delta_Theta transported by LS omega … … 72 73 ! dta : source de chaleur due courants satures et detrain (K/s) 73 74 ! dqa : source d'humidite due aux courants satures et detra (kg/kg/s) 75 ! wgen : number of wakes generated per unit area and per sec (/m^2/s) 74 76 ! amdwn: flux de masse total des descentes, par unite de 75 ! surface de la maille (kg/m2/s)77 ! surface de la maille (kg/m2/s) 76 78 ! amup : flux de masse total des ascendances, par unite de 77 ! surface de la maille (kg/m2/s) 79 ! surface de la maille (kg/m2/s) 80 ! sigd_con: 81 ! Cin : convective inhibition 78 82 ! p : pressions aux milieux des couches (Pa) 79 83 ! ph : pressions aux interfaces (Pa) … … 105 109 ! deltatw0 : deltatw initial 106 110 ! deltaqw0 : deltaqw initial 107 ! hw0 : hw initial 108 ! sigmaw0: sigmaw initial 111 ! hw0 : wake top hight (defined as the altitude at which deltatw=0) 109 112 ! amflux : horizontal mass flux through wake boundary 110 113 ! wdens_ref: initial number of wakes per unit area (3D) or per … … 133 136 REAL, DIMENSION (klon, klev), INTENT(IN) :: amdwn, amup 134 137 REAL, DIMENSION (klon, klev), INTENT(IN) :: dta, dqa 138 REAL, DIMENSION (klon), INTENT(IN) :: wgen 135 139 REAL, DIMENSION (klon), INTENT(IN) :: sigd_con 140 REAL, DIMENSION (klon), INTENT(IN) :: Cin 136 141 137 142 ! … … 140 145 REAL, DIMENSION (klon, klev), INTENT(INOUT) :: deltatw, deltaqw 141 146 REAL, DIMENSION (klon), INTENT(INOUT) :: sigmaw 147 REAL, DIMENSION (klon), INTENT(INOUT) :: awdens 142 148 REAL, DIMENSION (klon), INTENT(INOUT) :: wdens 143 149 … … 149 155 REAL, DIMENSION (klon, klev), INTENT(OUT) :: dtls, dqls 150 156 REAL, DIMENSION (klon, klev), INTENT(OUT) :: dtke, dqke 151 REAL, DIMENSION (klon, klev), INTENT(OUT) :: spread 157 REAL, DIMENSION (klon, klev), INTENT(OUT) :: spread ! unused (jyg) 152 158 REAL, DIMENSION (klon, klev), INTENT(OUT) :: omgbdth, omg 153 159 REAL, DIMENSION (klon, klev), INTENT(OUT) :: dp_omgb, dp_deltomg … … 157 163 ! Tendencies of state variables 158 164 REAL, DIMENSION (klon, klev), INTENT(OUT) :: d_deltatw2, d_deltaqw2 159 REAL, DIMENSION (klon), INTENT(OUT) :: d_sigmaw2, d_ wdens2165 REAL, DIMENSION (klon), INTENT(OUT) :: d_sigmaw2, d_awdens2, d_wdens2 160 166 161 167 ! Variables internes … … 165 171 INTEGER, SAVE :: igout 166 172 !$OMP THREADPRIVATE(igout) 167 REAL :: alon168 173 LOGICAL, SAVE :: first = .TRUE. 169 174 !$OMP THREADPRIVATE(first) … … 176 181 !$OMP THREADPRIVATE(stark, wdens_ref, coefgw, alpk, crep_upper, crep_sol) 177 182 183 REAL, SAVE :: tau_cv 184 !$OMP THREADPRIVATE(tau_cv) 185 REAL, SAVE :: rzero, aa0 ! minimal wake radius and area 186 !$OMP THREADPRIVATE(rzero, aa0) 187 178 188 LOGICAL, SAVE :: flag_wk_check_trgl 179 189 !$OMP THREADPRIVATE(flag_wk_check_trgl) 180 190 INTEGER, SAVE :: iflag_wk_check_trgl 181 191 !$OMP THREADPRIVATE(iflag_wk_check_trgl) 192 INTEGER, SAVE :: iflag_wk_pop_dyn 193 !$OMP THREADPRIVATE(iflag_wk_pop_dyn) 182 194 183 195 REAL :: delta_t_min 184 196 INTEGER :: nsub 185 197 REAL :: dtimesub 186 REAL :: sigmad, hwmin, wapecut 198 REAL :: wdensmin 199 REAL, SAVE :: sigmad, hwmin, wapecut, cstart 200 !$OMP THREADPRIVATE(sigmad, hwmin, wapecut, cstart) 187 201 REAL :: sigmaw_max 188 202 REAL :: dens_rate … … 195 209 REAL, DIMENSION (klon, klev) :: deltaqw0 196 210 REAL, DIMENSION (klon, klev) :: te, qe 197 REAL, DIMENSION (klon) :: sigmaw0198 211 !! REAL, DIMENSION (klon) :: sigmaw1 212 213 ! Variables liees a la dynamique de population 214 REAL, DIMENSION(klon) :: act 215 REAL, DIMENSION(klon) :: rad_wk, tau_wk_inv 216 REAL, DIMENSION(klon) :: f_shear 217 REAL, DIMENSION(klon) :: drdt 218 REAL, DIMENSION(klon) :: d_sig_gen, d_sig_death, d_sig_col 219 REAL, DIMENSION(klon) :: wape1_act, wape2_act 220 LOGICAL, DIMENSION (klon) :: kill_wake 221 INTEGER, SAVE :: iflag_wk_act 222 !$OMP THREADPRIVATE(iflag_wk_act) 223 REAL :: drdt_pos 224 REAL :: tau_wk_inv_min 199 225 200 226 ! Variables pour les GW … … 204 230 REAL, DIMENSION (klon, klev) :: tgw 205 231 206 ! Variables li ées au calcul de hw232 ! Variables liees au calcul de hw 207 233 REAL, DIMENSION (klon) :: ptop_provis, ptop, ptop_new 208 234 REAL, DIMENSION (klon) :: sum_dth … … 211 237 INTEGER, DIMENSION (klon) :: ktop, kupper 212 238 213 ! Variables li ées au test de la forme triangulaire du profil de Delta_theta239 ! Variables liees au test de la forme triangulaire du profil de Delta_theta 214 240 REAL, DIMENSION (klon) :: sum_half_dth 215 241 REAL, DIMENSION (klon) :: dz_half … … 218 244 REAL, DIMENSION (klon, klev) :: d_deltatw, d_deltaqw 219 245 REAL, DIMENSION (klon, klev) :: d_te, d_qe 246 REAL, DIMENSION (klon) :: d_awdens, d_wdens 220 247 REAL, DIMENSION (klon) :: d_sigmaw, alpha 221 248 REAL, DIMENSION (klon) :: q0_min, q1_min … … 228 255 INTEGER ::isubstep, k, i 229 256 257 REAL :: wdens_targ 230 258 REAL :: sigmaw_targ 231 259 … … 273 301 REAL, DIMENSION (klon, klev) :: detr 274 302 275 REAL, DIMENSION(klon) :: sigmaw_in ! pour les prints 303 REAL, DIMENSION(klon) :: sigmaw_in ! pour les prints 304 REAL, DIMENSION(klon) :: awdens_in, wdens_in ! pour les prints 276 305 277 306 ! ------------------------------------------------------------------------- … … 284 313 ! ------------------------------------------------------------------------- 285 314 286 DATA wapecut, sigmad, hwmin/5., .02, 10./ 315 !! DATA wapecut, sigmad, hwmin/5., .02, 10./ 316 DATA wapecut, sigmad, hwmin/1., .02, 10./ 317 DATA wdensmin/1.e-12/ 287 318 ! cc nrlmd 288 319 DATA sigmaw_max/0.4/ 289 320 DATA dens_rate/0.1/ 321 DATA rzero /5000./ 290 322 ! cc 291 323 ! Longueur de maille (en m) … … 293 325 294 326 ! ALON = 3.e5 295 alon = 1.E6 327 ! alon = 1.E6 328 329 ! Provisionnal; to be suppressed when f_shear is parameterized 330 f_shear(:) = 1. ! 0. for strong shear, 1. for weak shear 296 331 297 332 … … 300 335 ! coefgw : Coefficient pour les ondes de gravité 301 336 ! stark : Coefficient k dans Cstar=k*sqrt(2*WAPE) 302 ! wdens : Densité de poche froide par maille337 ! wdens : Densité surfacique de poche froide 303 338 ! ------------------------------------------------------------------------- 304 339 … … 321 356 crep_sol = 1.0 322 357 358 aa0 = 3.14*rzero*rzero 359 360 tau_cv = 4000. 361 323 362 ! cc nrlmd Lecture du fichier wake_param.data 324 363 stark=0.33 325 364 CALL getin_p('stark',stark) 365 cstart = stark*sqrt(2.*wapecut) 366 326 367 alpk=0.25 327 368 CALL getin_p('alpk',alpk) … … 334 375 CALL getin_p('wdens_ref_l',wdens_ref(2)) !wake number per unit area ; land 335 376 !>jyg 377 iflag_wk_pop_dyn = 0 378 CALL getin_p('iflag_wk_pop_dyn',iflag_wk_pop_dyn) ! switch between wdens prescribed 379 ! and wdens prognostic 380 iflag_wk_act = 0 381 CALL getin_p('iflag_wk_act',iflag_wk_act) ! 0: act(:)=0. 382 ! 1: act(:)=1. 383 ! 2: act(:)=f(Wape) 336 384 coefgw=4. 337 385 CALL getin_p('coefgw',coefgw) … … 344 392 WRITE(*,*) 'wdens_ref_l=', wdens_ref(2) 345 393 !>jyg 394 WRITE(*,*) 'iflag_wk_pop_dyn=',iflag_wk_pop_dyn 395 WRITE(*,*) 'iflag_wk_act',iflag_wk_act 346 396 WRITE(*,*) 'coefgw=', coefgw 347 397 … … 357 407 endif 358 408 409 IF (iflag_wk_pop_dyn == 0) THEN 359 410 ! Initialisation de toutes des densites a wdens_ref. 360 411 ! Les densites peuvent evoluer si les poches debordent 361 412 ! (voir au tout debut de la boucle sur les substeps) 362 !jyg< 363 !! wdens(:) = wdens_ref 364 DO i = 1,klon 365 wdens(i) = wdens_ref(znatsurf(i)+1) 366 ENDDO 367 !>jyg 413 !jyg< 414 !! wdens(:) = wdens_ref 415 DO i = 1,klon 416 wdens(i) = wdens_ref(znatsurf(i)+1) 417 ENDDO 418 !>jyg 419 ENDIF ! (iflag_wk_pop_dyn == 0) 368 420 369 421 ! print*,'stark',stark … … 415 467 d_deltatw2(:,:) = 0. 416 468 d_deltaqw2(:,:) = 0. 469 470 IF (iflag_wk_act == 0) THEN 471 act(:) = 0. 472 ELSEIF (iflag_wk_act == 1) THEN 473 act(:) = 1. 474 ENDIF 475 417 476 !! DO i = 1, klon 418 477 !! sigmaw_in(i) = sigmaw(i) … … 425 484 ! print*, 'sigmaw,sigd_con', sigmaw, sigd_con 426 485 ! ENDIF 486 IF (iflag_wk_pop_dyn >=1) THEN 487 DO i = 1, klon 488 wdens_targ = max(wdens(i),wdensmin) 489 d_wdens2(i) = wdens_targ - wdens(i) 490 wdens(i) = wdens_targ 491 END DO 492 ELSE 493 DO i = 1, klon 494 d_awdens2(i) = 0. 495 d_wdens2(i) = 0. 496 END DO 497 ENDIF ! (iflag_wk_pop_dyn >=1) 498 ! 427 499 DO i = 1, klon 428 500 ! c sigmaw(i) = amax1(sigmaw(i),sigd_con(i)) … … 434 506 sigmaw(i) = sigmaw_targ 435 507 !>jyg 436 sigmaw0(i) = sigmaw(i) 437 wape(i) = 0. 438 wape2(i) = 0. 439 d_sigmaw(i) = 0. 440 d_wdens2(i) = 0. 441 ktopw(i) = 0 442 END DO 508 END DO 509 510 ! 511 IF (iflag_wk_pop_dyn >= 1) THEN 512 awdens_in(:) = awdens(:) 513 wdens_in(:) = wdens(:) 514 !! wdens(:) = wdens(:) + wgen(:)*dtime 515 !! d_wdens2(:) = wgen(:)*dtime 516 !! ELSE 517 ENDIF ! (iflag_wk_pop_dyn >= 1) 518 519 wape(:) = 0. 520 wape2(:) = 0. 521 d_sigmaw(:) = 0. 522 ktopw(:) = 0 443 523 ! 444 524 !<jyg … … 833 913 gwake(i) = .FALSE. 834 914 ELSE 915 hw(i) = hw0(i) 835 916 cstar(i) = stark*sqrt(2.*wape(i)) 836 917 gwake(i) = .TRUE. … … 891 972 ! cc On calcule pour cela une densité wdens0 pour laquelle on 892 973 ! aurait un entrainement nul --- 974 !jyg< 975 ! Dans la configuration avec wdens prognostique, il s'agit d'un cas ou 976 ! les poches sont insuffisantes pour accueillir tout le flux de masse 977 ! des descentes unsaturees. Nous faisons alors l'hypothese que la 978 ! convection profonde cree directement de nouvelles poches, sans passer 979 ! par les thermiques. La nouvelle valeur de wdens est alors imposée. 980 893 981 DO i = 1, klon 894 982 ! c print *,' isubstep,wk_adv(i),cstar(i),wape(i) ', … … 900 988 ((1.-sigmaw(i))*omg(i,kupper(i)+1)/((ph(i,1)-pupper(i))*cstar(i)))**(2) 901 989 IF (wdens(i)<=wdens0*1.1) THEN 990 IF (iflag_wk_pop_dyn >= 1) THEN 991 d_wdens2(i) = d_wdens2(i) + wdens0 - wdens(i) 992 ENDIF 902 993 wdens(i) = wdens0 903 994 END IF … … 909 1000 END DO 910 1001 911 ! cc nrlmd912 913 1002 DO i = 1, klon 914 1003 IF (wk_adv(i)) THEN 915 1004 gfl(i) = 2.*sqrt(3.14*wdens(i)*sigmaw(i)) 1005 rad_wk(i) = sqrt(sigmaw(i)/(3.14*wdens(i))) 916 1006 !jyg< 917 1007 !! sigmaw(i) = amin1(sigmaw(i), sigmaw_max) … … 923 1013 END DO 924 1014 925 DO i = 1, klon 926 IF (wk_adv(i)) THEN 927 ! cc nrlmd Introduction du taux de mortalité des poches et 928 ! test sur sigmaw_max=0.4 929 ! cc d_sigmaw(i) = gfl(i)*Cstar(i)*dtimesub 930 IF (sigmaw(i)>=sigmaw_max) THEN 931 death_rate(i) = gfl(i)*cstar(i)/sigmaw(i) 932 ELSE 933 death_rate(i) = 0. 934 END IF 935 936 d_sigmaw(i) = gfl(i)*cstar(i)*dtimesub - death_rate(i)*sigmaw(i)* & 937 dtimesub 938 ! $ - nat_rate(i)*sigmaw(i)*dtimesub 939 ! c print*, 'd_sigmaw(i),sigmaw(i),gfl(i),Cstar(i),wape(i), 940 ! c $ death_rate(i),ktop(i),kupper(i)', 941 ! c $ d_sigmaw(i),sigmaw(i),gfl(i),Cstar(i),wape(i), 942 ! c $ death_rate(i),ktop(i),kupper(i) 943 944 ! sigmaw(i) =sigmaw(i) + gfl(i)*Cstar(i)*dtimesub 945 ! sigmaw(i) =min(sigmaw(i),0.99) !!!!!!!! 946 ! wdens = wdens0/(10.*sigmaw) 947 ! sigmaw =max(sigmaw,sigd_con) 948 ! sigmaw =max(sigmaw,sigmad) 949 END IF 950 END DO 1015 IF (iflag_wk_pop_dyn >= 1) THEN 1016 1017 IF (iflag_wk_act ==2) THEN 1018 DO i = 1, klon 1019 IF (wk_adv(i)) THEN 1020 wape1_act(i) = abs(cin(i)) 1021 wape2_act(i) = 2.*wape1_act(i) + 1. 1022 act(i) = min(1., max(0., (wape(i)-wape1_act(i)) / (wape2_act(i)-wape1_act(i)) )) 1023 ENDIF ! (wk_adv(i)) 1024 ENDDO 1025 ENDIF ! (iflag_wk_act ==2) 1026 1027 1028 DO i = 1, klon 1029 IF (wk_adv(i)) THEN 1030 !! tau_wk(i) = max(rad_wk(i)/(3.*cstar(i))*((cstar(i)/cstart)**1.5 - 1), 100.) 1031 tau_wk_inv(i) = max( (3.*cstar(i))/(rad_wk(i)*((cstar(i)/cstart)**1.5 - 1)), 0.) 1032 tau_wk_inv_min = min(tau_wk_inv(i), 1./dtimesub) 1033 drdt(i) = (cstar(i) - wgen(i)*(sigmaw(i)/wdens(i)-aa0)/gfl(i)) / & 1034 (1 - 2*sigmaw(i)*(1.-f_shear(i))) 1035 drdt_pos=max(drdt(i),0.) 1036 1037 !! d_wdens(i) = ( wgen(i)*(1.+2.*(sigmaw(i)-sigmad)) & 1038 !! - wdens(i)*tau_wk_inv_min & 1039 !! - 2.*gfl(i)*wdens(i)*Cstar(i) )*dtimesub 1040 d_awdens(i) = ( wgen(i) - (1./tau_cv)*(awdens(i) - act(i)*wdens(i)) )*dtimesub 1041 d_wdens(i) = ( wgen(i) - (wdens(i)-awdens(i))*tau_wk_inv_min - & 1042 2.*wdens(i)*gfl(i)*drdt_pos )*dtimesub 1043 d_wdens(i) = max(d_wdens(i), wdensmin-wdens(i)) 1044 1045 !! d_sigmaw(i) = ( (1.-2*f_shear(i)*sigmaw(i))*(gfl(i)*Cstar(i)+wgen(i)*sigmad/wdens(i)) & 1046 !! + 2.*f_shear(i)*wgen(i)*sigmaw(i)**2/wdens(i) & 1047 !! - sigmaw(i)*tau_wk_inv_min )*dtimesub 1048 d_sig_gen(i) = wgen(i)*aa0 1049 d_sig_death(i) = - sigmaw(i)*(1.-awdens(i)/wdens(i))*tau_wk_inv_min 1050 !! d_sig_col(i) = - 2*f_shear(i)*sigmaw(i)*gfl(i)*drdt_pos 1051 d_sig_col(i) = - 2*f_shear(i)*(2.*sigmaw(i)-wdens(i)*aa0)*gfl(i)*drdt_pos 1052 d_sigmaw(i) = ( d_sig_gen(i) + d_sig_death(i) + d_sig_col(i) + gfl(i)*cstar(i) )*dtimesub 1053 d_sigmaw(i) = max(d_sigmaw(i), sigmad-sigmaw(i)) 1054 ENDIF 1055 ENDDO 1056 1057 IF (prt_level >= 10) THEN 1058 print *,'wake, cstar(1), cstar(1)/cstart, rad_wk(1), tau_wk_inv(1), drdt(1) ', & 1059 cstar(1), cstar(1)/cstart, rad_wk(1), tau_wk_inv(1), drdt(1) 1060 print *,'wake, wdens(1), awdens(1), act(1), d_awdens(1) ', & 1061 wdens(1), awdens(1), act(1), d_awdens(1) 1062 print *,'wake, wgen, -(wdens-awdens)*tau_wk_inv, -2.*wdens*gfl*drdt_pos, d_wdens ', & 1063 wgen(1), -(wdens(1)-awdens(1))*tau_wk_inv(1), -2.*wdens(1)*gfl(1)*drdt_pos, d_wdens(1) 1064 print *,'wake, d_sig_gen(1), d_sig_death(1), d_sig_col(1), d_sigmaw(1) ', & 1065 d_sig_gen(1), d_sig_death(1), d_sig_col(1), d_sigmaw(1) 1066 ENDIF 1067 1068 ELSE ! (iflag_wk_pop_dyn >= 1) 1069 1070 ! cc nrlmd 1071 1072 DO i = 1, klon 1073 IF (wk_adv(i)) THEN 1074 ! cc nrlmd Introduction du taux de mortalité des poches et 1075 ! test sur sigmaw_max=0.4 1076 ! cc d_sigmaw(i) = gfl(i)*Cstar(i)*dtimesub 1077 IF (sigmaw(i)>=sigmaw_max) THEN 1078 death_rate(i) = gfl(i)*cstar(i)/sigmaw(i) 1079 ELSE 1080 death_rate(i) = 0. 1081 END IF 1082 1083 d_sigmaw(i) = gfl(i)*cstar(i)*dtimesub - death_rate(i)*sigmaw(i)* & 1084 dtimesub 1085 ! $ - nat_rate(i)*sigmaw(i)*dtimesub 1086 ! c print*, 'd_sigmaw(i),sigmaw(i),gfl(i),Cstar(i),wape(i), 1087 ! c $ death_rate(i),ktop(i),kupper(i)', 1088 ! c $ d_sigmaw(i),sigmaw(i),gfl(i),Cstar(i),wape(i), 1089 ! c $ death_rate(i),ktop(i),kupper(i) 1090 1091 ! sigmaw(i) =sigmaw(i) + gfl(i)*Cstar(i)*dtimesub 1092 ! sigmaw(i) =min(sigmaw(i),0.99) !!!!!!!! 1093 ! wdens = wdens0/(10.*sigmaw) 1094 ! sigmaw =max(sigmaw,sigd_con) 1095 ! sigmaw =max(sigmaw,sigmad) 1096 END IF 1097 END DO 1098 1099 ENDIF ! (iflag_wk_pop_dyn >= 1) 1100 951 1101 952 1102 ! calcul de la difference de vitesse verticale poche - zone non perturbee … … 1223 1373 1224 1374 ! Increment state variables 1375 !jyg< 1376 IF (iflag_wk_pop_dyn >= 1) THEN 1377 DO k = 1, klev 1378 DO i = 1, klon 1379 IF (wk_adv(i) .AND. k<=kupper(i)) THEN 1380 detr(i,k) = - d_sig_death(i) - d_sig_col(i) 1381 entr(i,k) = d_sig_gen(i) 1382 ENDIF 1383 ENDDO 1384 ENDDO 1385 ELSE ! (iflag_wk_pop_dyn >= 1) 1386 DO k = 1, klev 1387 DO i = 1, klon 1388 IF (wk_adv(i) .AND. k<=kupper(i)) THEN 1389 detr(i, k) = 0. 1390 1391 entr(i, k) = 0. 1392 ENDIF 1393 ENDDO 1394 ENDDO 1395 ENDIF ! (iflag_wk_pop_dyn >= 1) 1396 1397 1225 1398 1226 1399 DO k = 1, klev … … 1264 1437 ! cc nrlmd Prise en compte du taux de mortalité 1265 1438 ! cc Définitions de entr, detr 1266 detr(i, k) = 0. 1267 1268 entr(i, k) = detr(i, k) + gfl(i)*cstar(i) + & 1269 sigmaw(i)*(1.-sigmaw(i))*dp_deltomg(i, k) 1270 1271 spread(i, k) = (entr(i,k)-detr(i,k))/sigmaw(i) 1439 !jyg< 1440 !! detr(i, k) = 0. 1441 !! 1442 !! entr(i, k) = detr(i, k) + gfl(i)*cstar(i) + & 1443 !! sigmaw(i)*(1.-sigmaw(i))*dp_deltomg(i, k) 1444 !! 1445 entr(i, k) = entr(i,k) + gfl(i)*cstar(i) + & 1446 sigmaw(i)*(1.-sigmaw(i))*dp_deltomg(i, k) 1447 !>jyg 1448 spread(i, k) = (entr(i,k)-detr(i,k))/sigmaw(i) 1449 1272 1450 ! cc spread(i,k) = 1273 1451 ! (1.-sigmaw(i))*dp_deltomg(i,k)+gfl(i)*Cstar(i)/ … … 1384 1562 END DO 1385 1563 END DO 1564 ! 1386 1565 DO i = 1, klon 1387 1566 IF (wk_adv(i)) THEN 1388 1567 sigmaw(i) = sigmaw(i) + d_sigmaw(i) 1568 d_sigmaw2(i) = d_sigmaw2(i) + d_sigmaw(i) 1569 END IF 1570 END DO 1389 1571 !jyg< 1390 d_sigmaw2(i) = d_sigmaw2(i) + d_sigmaw(i) 1572 IF (iflag_wk_pop_dyn >= 1) THEN 1573 DO i = 1, klon 1574 IF (wk_adv(i)) THEN 1575 awdens(i) = awdens(i) + d_awdens(i) 1576 wdens(i) = wdens(i) + d_wdens(i) 1577 d_awdens2(i) = d_awdens2(i) + d_awdens(i) 1578 d_wdens2(i) = d_wdens2(i) + d_wdens(i) 1579 END IF 1580 END DO 1581 DO i = 1, klon 1582 IF (wk_adv(i)) THEN 1583 wdens_targ = max(wdens(i),wdensmin) 1584 d_wdens2(i) = d_wdens2(i) + wdens_targ - wdens(i) 1585 wdens(i) = wdens_targ 1586 ! 1587 wdens_targ = min( max(awdens(i),0.), wdens(i) ) 1588 d_awdens2(i) = d_awdens2(i) + wdens_targ - awdens(i) 1589 awdens(i) = wdens_targ 1590 END IF 1591 END DO 1592 DO i = 1, klon 1593 IF (wk_adv(i)) THEN 1594 sigmaw_targ = max(sigmaw(i),sigmad) 1595 d_sigmaw2(i) = d_sigmaw2(i) + sigmaw_targ - sigmaw(i) 1596 sigmaw(i) = sigmaw_targ 1597 END IF 1598 END DO 1599 ENDIF ! (iflag_wk_pop_dyn >= 1) 1391 1600 !>jyg 1392 END IF1393 END DO1394 1601 1395 1602 … … 1901 2108 ! ENDDO 1902 2109 ! cc 2110 2111 !jyg< 2112 IF (iflag_wk_pop_dyn >= 1) THEN 2113 DO i = 1, klon 2114 kill_wake(i) = ((wape(i)>=wape2(i)) .AND. (wape2(i)<=wapecut)) .OR. (ktopw(i)<=2) .OR. & 2115 .NOT. ok_qx_qw(i) .OR. (wdens(i) < 2.*wdensmin) 2116 ENDDO 2117 ELSE ! (iflag_wk_pop_dyn >= 1) 2118 DO i = 1, klon 2119 kill_wake(i) = ((wape(i)>=wape2(i)) .AND. (wape2(i)<=wapecut)) .OR. (ktopw(i)<=2) .OR. & 2120 .NOT. ok_qx_qw(i) 2121 ENDDO 2122 ENDIF ! (iflag_wk_pop_dyn >= 1) 2123 !>jyg 2124 1903 2125 DO k = 1, klev 1904 2126 DO i = 1, klon 1905 1906 ! cc nrlmd On maintient désormais constant sigmaw en régime 1907 ! permanent 1908 ! cc IF ((sigmaw(i).GT.sigmaw_max).or. 1909 IF (((wape(i)>=wape2(i)) .AND. (wape2(i)<=1.0)) .OR. (ktopw(i)<=2) .OR. & 1910 .NOT. ok_qx_qw(i)) THEN 2127 !!jyg IF (((wape(i)>=wape2(i)) .AND. (wape2(i)<=wapecut)) .OR. (ktopw(i)<=2) .OR. & 2128 !!jyg .NOT. ok_qx_qw(i)) THEN 2129 IF (kill_wake(i)) THEN 1911 2130 ! cc 1912 2131 dtls(i, k) = 0. … … 1916 2135 d_deltatw2(i,k) = -deltatw0(i,k) 1917 2136 d_deltaqw2(i,k) = -deltaqw0(i,k) 1918 END IF 1919 END DO 1920 END DO 1921 1922 ! cc nrlmd On maintient désormais constant sigmaw en régime permanent1923 DO i = 1, klon 1924 IF (((wape(i)>=wape2(i)) .AND. (wape2(i)<=1.0)) .OR. (ktopw(i)<=2) .OR. & 1925 .NOT. ok_qx_qw(i)) THEN2137 END IF ! (kill_wake(i)) 2138 END DO 2139 END DO 2140 2141 DO i = 1, klon 2142 !!jyg IF (((wape(i)>=wape2(i)) .AND. (wape2(i)<=wapecut)) .OR. (ktopw(i)<=2) .OR. & 2143 !!jyg .NOT. ok_qx_qw(i)) THEN 2144 IF (kill_wake(i)) THEN 1926 2145 ktopw(i) = 0 1927 2146 wape(i) = 0. 1928 2147 cstar(i) = 0. 1929 !!jyg Outside subroutine "Wake" hw and sigmaw are zero when there are no wakes2148 !!jyg Outside subroutine "Wake" hw, wdens and sigmaw are zero when there are no wakes 1930 2149 !! hw(i) = hwmin !jyg 1931 2150 !! sigmaw(i) = sigmad !jyg 1932 2151 hw(i) = 0. !jyg 1933 sigmaw(i) = 0. !jyg1934 2152 fip(i) = 0. 1935 ELSE 2153 !! sigmaw(i) = 0. !jyg 2154 sigmaw_targ = 0. 2155 d_sigmaw2(i) = d_sigmaw2(i) + sigmaw_targ - sigmaw(i) 2156 sigmaw(i) = sigmaw_targ 2157 IF (iflag_wk_pop_dyn >= 1) THEN 2158 !! awdens(i) = 0. 2159 !! wdens(i) = 0. 2160 wdens_targ = 0. 2161 d_wdens2(i) = wdens_targ - wdens(i) 2162 wdens(i) = wdens_targ 2163 wdens_targ = 0. 2164 d_awdens2(i) = wdens_targ - awdens(i) 2165 awdens(i) = wdens_targ 2166 ENDIF ! (iflag_wk_pop_dyn >= 1) 2167 ELSE ! (kill_wake(i)) 1936 2168 wape(i) = wape2(i) 1937 2169 cstar(i) = cstar2(i) 1938 END IF 2170 END IF ! (kill_wake(i)) 1939 2171 ! c print*,'wape wape2 ktopw OK_qx_qw =', 1940 2172 ! c $ wape(i),wape2(i),ktopw(i),OK_qx_qw(i) … … 1972 2204 DO i = 1, klon 1973 2205 d_sigmaw2(i) = d_sigmaw2(i)/dtime 2206 d_awdens2(i) = d_awdens2(i)/dtime 1974 2207 d_wdens2(i) = d_wdens2(i)/dtime 1975 2208 ENDDO
Note: See TracChangeset
for help on using the changeset viewer.