- Timestamp:
- Nov 2, 2023, 10:09:59 AM (14 months ago)
- Location:
- LMDZ6/trunk/libf/phylmd
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/trunk/libf/phylmd/add_wake_tend.F90
r3208 r4744 1 SUBROUTINE add_wake_tend(zddeltat, zddeltaq, zds, zd densaw, zddensw, zoccur, text, abortphy)1 SUBROUTINE add_wake_tend(zddeltat, zddeltaq, zds, zdas, zddensw, zddensaw, 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, &12 awake_dens,wake_dens11 USE phys_state_var_mod, ONLY: wake_deltat, wake_deltaq, wake_s, awake_s, & 12 wake_dens, awake_dens 13 13 14 14 USE print_control_mod, ONLY: prt_level … … 18 18 !------------ 19 19 REAL, DIMENSION(klon, klev), INTENT (IN) :: zddeltat, zddeltaq 20 REAL, DIMENSION(klon), INTENT (IN) :: zds, zd densaw, zddensw20 REAL, DIMENSION(klon), INTENT (IN) :: zds, zdas, zddensw, zddensaw 21 21 INTEGER, DIMENSION(klon), INTENT (IN) :: zoccur 22 22 CHARACTER*(*), INTENT (IN) :: text … … 55 55 IF (zoccur(i) .GE. 1) THEN 56 56 wake_s(i) = wake_s(i) + zds(i) 57 awake_s(i) = awake_s(i) + zdas(i) 58 wake_dens(i) = wake_dens(i) + zddensw(i) 57 59 awake_dens(i) = awake_dens(i) + zddensaw(i) 58 wake_dens(i) = wake_dens(i) + zddensw(i)59 60 ELSE 60 61 wake_s(i) = 0. 62 awake_s(i) = 0. 63 wake_dens(i) = 0. 61 64 awake_dens(i) = 0. 62 wake_dens(i) = 0.63 65 ENDIF ! (zoccur(i) .GE. 1) 64 66 END DO -
LMDZ6/trunk/libf/phylmd/calwake.F90
r4588 r4744 6 6 dt_dwn, dq_dwn, m_dwn, m_up, dt_a, dq_a, wgen, & 7 7 sigd, Cin, & 8 wake_deltat, wake_deltaq, wake_s, awake_ dens,wake_dens, &8 wake_deltat, wake_deltaq, wake_s, awake_s, wake_dens, awake_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, awake_d dens,wake_ddens)16 wake_ddeltat, wake_ddeltaq, wake_ds, awake_ds, wake_ddens, awake_ddens) 17 17 ! ************************************************************** 18 18 ! * … … 52 52 ! ------------ 53 53 REAL, DIMENSION(klon, klev), INTENT (INOUT) :: wake_deltat, wake_deltaq 54 REAL, DIMENSION(klon), INTENT (INOUT) :: wake_s 55 REAL, DIMENSION(klon), INTENT (INOUT) :: awake_dens,wake_dens54 REAL, DIMENSION(klon), INTENT (INOUT) :: wake_s, awake_s 55 REAL, DIMENSION(klon), INTENT (INOUT) :: wake_dens, awake_dens 56 56 ! Output 57 57 ! ------ … … 70 70 REAL, DIMENSION(klon), INTENT (OUT) :: wake_cstar 71 71 REAL, DIMENSION(klon, klev), INTENT (OUT) :: wake_ddeltat, wake_ddeltaq 72 REAL, DIMENSION(klon), INTENT (OUT) :: wake_ds, awake_d dens,wake_ddens72 REAL, DIMENSION(klon), INTENT (OUT) :: wake_ds, awake_ds, wake_ddens, awake_ddens 73 73 74 74 … … 91 91 REAL, DIMENSION(klon, klev) :: tx, qx 92 92 REAL, DIMENSION(klon) :: hw, wape, fip, gfl 93 REAL, DIMENSION(klon) :: sigmaw, a wdens,wdens93 REAL, DIMENSION(klon) :: sigmaw, asigmaw, wdens, awdens 94 94 REAL, DIMENSION(klon, klev) :: omgbdth 95 95 REAL, DIMENSION(klon, klev) :: dp_omgb … … 102 102 REAL, DIMENSION(klon, klev) :: d_deltat_gw 103 103 REAL, DIMENSION(klon, klev) :: d_deltatw, d_deltaqw 104 REAL, DIMENSION(klon) :: d_sigmaw, d_a wdens, d_wdens104 REAL, DIMENSION(klon) :: d_sigmaw, d_asigmaw, d_wdens, d_awdens 105 105 106 106 REAL :: rdcp … … 108 108 109 109 IF (prt_level >= 10) THEN 110 print *, '-> calwake, wake_s, wgen input ',wake_s(1), wgen(1)110 print *, '-> calwake, wake_s, awake_s, wgen input ', wake_s(1), awake_s(1), wgen(1) 111 111 ENDIF 112 112 … … 150 150 d_deltaqw(:,:) = 0. 151 151 d_sigmaw(:) = 0. 152 d_asigmaw(:) = 0. 153 d_wdens(:) = 0. 152 154 d_awdens(:) = 0. 153 d_wdens(:) = 0.154 155 ! 155 156 … … 179 180 180 181 DO i = 1, klon 181 sigmaw(i) = wake_s(i) 182 END DO 183 184 DO i = 1, klon 182 sigmaw(i) = wake_s(i) 183 asigmaw(i) = awake_s(i) 184 END DO 185 186 DO i = 1, klon 187 wdens(i) = max(0., wake_dens(i)) 185 188 awdens(i) = max(0., awake_dens(i)) 186 wdens(i) = max(0., wake_dens(i))187 189 END DO 188 190 … … 215 217 dtdwn, dqdwn, amdwn, amup, dta, dqa, wgen, & 216 218 sigd0, Cin, & 217 dtw, dqw, sigmaw, a wdens,wdens, & ! state variables219 dtw, dqw, sigmaw, asigmaw, wdens, awdens, & ! state variables 218 220 dth, hw, wape, fip, gfl, & 219 221 dtls, dqls, ktopw, omgbdth, dp_omgb, tx, qx, & 220 222 dtke, dqke, omg, dp_deltomg, spread, cstar, & 221 223 d_deltat_gw, & 222 d_deltatw, d_deltaqw, d_sigmaw, d_a wdens, d_wdens) ! tendencies224 d_deltatw, d_deltaqw, d_sigmaw, d_asigmaw, d_wdens, d_awdens) ! tendencies 223 225 224 226 ! … … 281 283 IF (ktopw(i)>0) THEN 282 284 wake_ds(i) = d_sigmaw(i)*dtime 285 awake_ds(i) = d_asigmaw(i)*dtime 283 286 awake_ddens(i) = d_awdens(i)*dtime 284 287 wake_ddens(i) = d_wdens(i)*dtime 285 288 ELSE 286 wake_ds(i) = -wake_s(i) 287 wake_ddens(i)= -wake_dens(i) 289 wake_ds(i) = -wake_s(i) 290 awake_ds(i) = -awake_s(i) 291 wake_ddens(i) = -wake_dens(i) 292 awake_ddens(i)= -awake_dens(i) 288 293 END IF 289 294 END DO … … 306 311 DO i = 1, klon 307 312 wake_s(i) = sigmaw(i) 313 awake_s(i) = asigmaw(i) 308 314 awake_dens(i) = awdens(i) 309 315 wake_dens(i) = wdens(i) … … 320 326 ENDIF ! (first) 321 327 !>jyg 328 IF (prt_level >= 10) THEN 329 print *, 'calwake ->, wake_s, awake_s ', wake_s(1), awake_s(1) 330 ENDIF 322 331 323 332 RETURN 324 333 END SUBROUTINE calwake 325 334 335 -
LMDZ6/trunk/libf/phylmd/dyn1d/old_lmdz1d.F90
r4593 r4744 15 15 solsw, solswfdiff, t_ancien, q_ancien, u_ancien, v_ancien, rneb_ancien, & 16 16 wake_delta_pbl_TKE, delta_tsurf, wake_fip, wake_pe, & 17 wake_deltaq, wake_deltat, wake_s, wake_dens, &17 wake_deltaq, wake_deltat, wake_s, awake_s, wake_dens, & 18 18 awake_dens, cv_gen, wake_cstar, & 19 19 zgam, zmax0, zmea, zpic, zsig, & … … 905 905 wake_pe = 0. 906 906 wake_s = 0. 907 awake_s = 0. 907 908 wake_dens = 0. 908 909 awake_dens = 0. … … 938 939 ! t_ancien,q_ancien,,frugs(:,is_oce),clwcon(:,1),rnebcon(:,1),ratqs(:,1) 939 940 ! run_off_lic_0,pbl_tke(:,1:klev,nsrf), zmax0,f0,sig1,w01 940 ! wake_deltat,wake_deltaq,wake_s, wake_dens,awake_dens,cv_gen,wake_cstar,941 ! wake_deltat,wake_deltaq,wake_s,awake_s,wake_dens,awake_dens,cv_gen,wake_cstar, 941 942 ! wake_fip,wake_delta_pbl_tke(:,1:klev,nsrf) 942 943 ! -
LMDZ6/trunk/libf/phylmd/dyn1d/scm.F90
r4593 r4744 11 11 solsw, solswfdiff, t_ancien, q_ancien, u_ancien, v_ancien, rneb_ancien, & 12 12 wake_delta_pbl_TKE, delta_tsurf, wake_fip, wake_pe, & 13 wake_deltaq, wake_deltat, wake_s, wake_dens, &13 wake_deltaq, wake_deltat, wake_s, awake_s, wake_dens, & 14 14 awake_dens, cv_gen, wake_cstar, & 15 15 zgam, zmax0, zmea, zpic, zsig, & … … 663 663 wake_pe = 0. 664 664 wake_s = 0. 665 awake_s = 0. 665 666 wake_dens = 0. 666 667 awake_dens = 0. … … 696 697 ! t_ancien,q_ancien,,frugs(:,is_oce),clwcon(:,1),rnebcon(:,1),ratqs(:,1) 697 698 ! run_off_lic_0,pbl_tke(:,1:klev,nsrf), zmax0,f0,sig1,w01 698 ! wake_deltat,wake_deltaq,wake_s, wake_dens,awake_dens,cv_gen,wake_cstar,699 ! wake_deltat,wake_deltaq,wake_s,awake_s,wake_dens,awake_dens,cv_gen,wake_cstar, 699 700 ! wake_fip,wake_delta_pbl_tke(:,1:klev,nsrf) 700 701 ! -
LMDZ6/trunk/libf/phylmd/lmdz_wake.F90
r4695 r4744 9 9 dtdwn, dqdwn, amdwn, amup, dta, dqa, wgen, & 10 10 sigd_con, Cin, & 11 deltatw, deltaqw, sigmaw, a wdens,wdens, & ! state variables11 deltatw, deltaqw, sigmaw, asigmaw, wdens, awdens, & ! state variables 12 12 dth, hw, wape, fip, gfl, & 13 13 dtls, dqls, ktopw, omgbdth, dp_omgb, tu, qu, & 14 14 dtke, dqke, omg, dp_deltomg, wkspread, cstar, & 15 15 d_deltat_gw, & ! tendencies 16 d_deltatw2, d_deltaqw2, d_sigmaw2, d_a wdens2, d_wdens2) ! tendencies16 d_deltatw2, d_deltaqw2, d_sigmaw2, d_asigmaw2, d_wdens2, d_awdens2) ! tendencies 17 17 18 18 … … 32 32 USE lmdz_wake_ini , ONLY : crep_upper, crep_sol, tau_cv, rzero, aa0, flag_wk_check_trgl 33 33 USE lmdz_wake_ini , ONLY : ok_bug_gfl 34 USE lmdz_wake_ini , ONLY : iflag_wk_act, iflag_wk_check_trgl, iflag_wk_pop_dyn, wdens min34 USE lmdz_wake_ini , ONLY : iflag_wk_act, iflag_wk_check_trgl, iflag_wk_pop_dyn, wdensinit, wdensthreshold 35 35 USE lmdz_wake_ini , ONLY : sigmad, hwmin, wapecut, cstart, sigmaw_max, dens_rate, epsilon_loc 36 36 USE lmdz_wake_ini , ONLY : iflag_wk_profile 37 USE lmdz_wake_ini , ONLY : smallestreal 37 38 38 39 … … 49 50 ! deltaqw : specific humidity difference between wake and off-wake regions 50 51 ! sigmaw : fractional area covered by wakes. 52 ! asigmaw : fractional area covered by active wakes. 51 53 ! wdens : number of wakes per unit area 54 ! awdens : number of active wakes per unit area 52 55 53 56 ! Variable de sortie : … … 71 74 ! deltaqw : updated humidity difference (q_w-q_u). 72 75 ! sigmaw : updated wake fractional area. 76 ! asigmaw : updated active wake fractional area. 73 77 ! d_deltat_gw : delta T tendency due to GW 74 78 … … 154 158 REAL, DIMENSION (klon, klev), INTENT(INOUT) :: deltatw, deltaqw 155 159 REAL, DIMENSION (klon), INTENT(INOUT) :: sigmaw 160 REAL, DIMENSION (klon), INTENT(INOUT) :: asigmaw 161 REAL, DIMENSION (klon), INTENT(INOUT) :: wdens 156 162 REAL, DIMENSION (klon), INTENT(INOUT) :: awdens 157 REAL, DIMENSION (klon), INTENT(INOUT) :: wdens158 163 159 164 ! Sorties … … 173 178 REAL, DIMENSION (klon, klev), INTENT(OUT) :: d_deltat_gw 174 179 REAL, DIMENSION (klon, klev), INTENT(OUT) :: d_deltatw2, d_deltaqw2 175 REAL, DIMENSION (klon), INTENT(OUT) :: d_sigmaw2, d_a wdens2, d_wdens2180 REAL, DIMENSION (klon), INTENT(OUT) :: d_sigmaw2, d_asigmaw2, d_wdens2, d_awdens2 176 181 177 182 ! Variables internes … … 191 196 REAL, DIMENSION (klon, klev) :: deltaqw0 192 197 REAL, DIMENSION (klon, klev) :: tenv, qe 193 !! REAL, DIMENSION (klon) :: sigmaw1194 198 195 199 ! Variables liees a la dynamique de population 1 … … 202 206 REAL, DIMENSION(klon) :: cont_fact 203 207 208 ! Variables liees a la dynamique de population 3 209 REAL, DIMENSION(klon) :: arad_wk, irad_wk 210 204 211 !! REAL, DIMENSION(klon) :: d_sig_gen, d_sig_death, d_sig_col 205 212 REAL, DIMENSION(klon) :: wape1_act, wape2_act … … 209 216 ! Some components of the tendencies of state variables 210 217 REAL, DIMENSION (klon) :: d_sig_gen2, d_sig_death2, d_sig_col2, d_sig_spread2, d_sig_bnd2 218 REAL, DIMENSION (klon) :: d_asig_death2, d_asig_aicol2, d_asig_iicol2, d_asig_spread2, d_asig_bnd2 211 219 REAL, DIMENSION (klon) :: d_dens_gen2, d_dens_death2, d_dens_col2, d_dens_bnd2 212 220 REAL, DIMENSION (klon) :: d_adens_death2, d_adens_icol2, d_adens_acol2, d_adens_bnd2 … … 232 240 REAL, DIMENSION (klon, klev) :: d_deltatw, d_deltaqw 233 241 REAL, DIMENSION (klon, klev) :: d_tenv, d_qe 234 REAL, DIMENSION (klon) :: d_ awdens, d_wdens, d_sigmaw242 REAL, DIMENSION (klon) :: d_wdens, d_awdens, d_sigmaw, d_asigmaw 235 243 REAL, DIMENSION (klon) :: d_sig_gen, d_sig_death, d_sig_col, d_sig_spread, d_sig_bnd 244 REAL, DIMENSION (klon) :: d_asig_death, d_asig_aicol, d_asig_iicol, d_asig_spread, d_asig_bnd 236 245 REAL, DIMENSION (klon) :: d_dens_gen, d_dens_death, d_dens_col, d_dens_bnd 237 246 REAL, DIMENSION (klon) :: d_adens_death, d_adens_icol, d_adens_acol, d_adens_bnd 247 REAL, DIMENSION (klon) :: agfl !! gust front length of active wakes 248 !! per unit area 238 249 REAL, DIMENSION (klon) :: alpha, alpha_tot 239 250 REAL, DIMENSION (klon) :: q0_min, q1_min … … 242 253 ! Autres variables internes 243 254 INTEGER ::isubstep, k, i, igout 255 256 REAL :: wdensmin 244 257 245 258 REAL :: sigmaw_targ … … 291 304 REAL, DIMENSION (klon, klev) :: detr 292 305 293 REAL, DIMENSION(klon) :: sigmaw_in ! pour les prints 294 REAL, DIMENSION(klon) :: awdens_in, wdens_in ! pour les prints 306 REAL, DIMENSION(klon) :: sigmaw_in, asigmaw_in ! pour les prints 307 REAL, DIMENSION(klon) :: wdens_in, awdens_in ! pour les prints 308 309 !!! LOGICAL :: phys_sub=.true. 310 LOGICAL :: phys_sub=.false. 311 312 LOGICAL :: first_call=.true. 295 313 296 314 ! ------------------------------------------------------------------------- … … 302 320 ! Provisionnal; to be suppressed when f_shear is parameterized 303 321 f_shear(:) = 1. ! 0. for strong shear, 1. for weak shear 304 305 322 306 323 ! Configuration de coefgw,stark,wdens (22/02/06 by YU Jingmei) … … 321 338 ! alpk = 0.5 322 339 ! alpk = 0.05 323 ! print *,'XXXX dtime input ', dtime340 ! 324 341 igout = klon/2+1/klon 342 ! 343 ! sub-time-stepping parameters 344 nsub = 10 345 dtimesub = dtime/nsub 346 ! 347 IF (first_call) THEN 348 !!#define IOPHYS_WK 349 #undef IOPHYS_WK 350 #ifdef IOPHYS_WK 351 IF (phys_sub) THEN 352 call iophys_ini(dtimesub) 353 ELSE 354 call iophys_ini(dtime) 355 ENDIF 356 #endif 357 first_call = .false. 358 ENDIF !(first_call) 325 359 326 360 IF (iflag_wk_pop_dyn == 0) THEN … … 335 369 !>jyg 336 370 ENDIF ! (iflag_wk_pop_dyn == 0) 371 ! 372 IF (iflag_wk_pop_dyn >=1) THEN 373 IF (iflag_wk_pop_dyn == 3) THEN 374 wdensmin = wdensthreshold 375 ELSE 376 wdensmin = wdensinit 377 ENDIF 378 ENDIF 337 379 338 380 ! print*,'stark',stark … … 385 427 d_deltaqw2(:,:) = 0. 386 428 429 d_sig_gen2(:) = 0. 430 d_sig_death2(:) = 0. 431 d_sig_col2(:) = 0. 432 d_sig_spread2(:)= 0. 433 d_asig_death2(:) = 0. 434 d_asig_iicol2(:) = 0. 435 d_asig_aicol2(:) = 0. 436 d_asig_spread2(:)= 0. 437 d_asig_bnd2(:) = 0. 438 d_asigmaw2(:) = 0. 439 ! 440 d_dens_gen2(:) = 0. 441 d_dens_death2(:) = 0. 442 d_dens_col2(:) = 0. 443 d_dens_bnd2(:) = 0. 444 d_wdens2(:) = 0. 445 d_adens_bnd2(:) = 0. 446 d_awdens2(:) = 0. 447 d_adens_death2(:) = 0. 448 d_adens_icol2(:) = 0. 449 d_adens_acol2(:) = 0. 450 387 451 IF (iflag_wk_act == 0) THEN 388 452 act(:) = 0. … … 394 458 !! sigmaw_in(i) = sigmaw(i) 395 459 !! END DO 396 sigmaw_in(:) = sigmaw(:) 460 sigmaw_in(:) = sigmaw(:) 461 asigmaw_in(:) = asigmaw(:) 397 462 !>jyg 398 463 ! … … 416 481 d_dens_col2(i) = 0. 417 482 d_awdens2(i) = 0. 418 ! 419 wdens_targ = max(wdens(i),wdensmin) 420 d_dens_bnd2(i) = wdens_targ - wdens(i) 421 d_wdens2(i) = wdens_targ - wdens(i) 422 wdens(i) = wdens_targ 423 END DO 424 IF (iflag_wk_pop_dyn == 2) THEN 425 DO i = 1, klon 426 d_adens_death2(i) = 0. 427 d_adens_icol2(i) = 0. 428 d_adens_acol2(i) = 0. 429 ! 430 wdens_targ = min(max(awdens(i),0.),wdens(i)) 431 d_adens_bnd2(i) = wdens_targ - awdens(i) 432 d_awdens2(i) = wdens_targ - awdens(i) 433 awdens(i) = wdens_targ 434 END DO 435 ENDIF ! (iflag_wk_pop_dyn == 2) 483 IF (wdens(i) < wdensthreshold) THEN 484 !! wdens_targ = max(wdens(i),wdensmin) 485 wdens_targ = max(wdens(i),wdensinit) 486 d_dens_bnd2(i) = wdens_targ - wdens(i) 487 d_wdens2(i) = wdens_targ - wdens(i) 488 wdens(i) = wdens_targ 489 ELSE 490 d_dens_bnd2(i) = 0. 491 d_wdens2(i) = 0. 492 ENDIF !! (wdens(i) < wdensthreshold) 493 END DO 494 IF (iflag_wk_pop_dyn >= 2) THEN 495 DO i = 1, klon 496 IF (awdens(i) < wdensthreshold) THEN 497 !! wdens_targ = min(max(awdens(i),wdensmin),wdens(i)) 498 wdens_targ = min(max(awdens(i),wdensinit),wdens(i)) 499 d_adens_bnd2(i) = wdens_targ - awdens(i) 500 d_awdens2(i) = wdens_targ - awdens(i) 501 awdens(i) = wdens_targ 502 ELSE 503 wdens_targ = min(awdens(i), wdens(i)) 504 d_adens_bnd2(i) = wdens_targ - awdens(i) 505 d_awdens2(i) = wdens_targ - awdens(i) 506 awdens(i) = wdens_targ 507 ENDIF 508 END DO 509 ENDIF ! (iflag_wk_pop_dyn >= 2) 436 510 ELSE 437 511 DO i = 1, klon … … 442 516 ! 443 517 DO i = 1, klon 444 ! c sigmaw(i) = amax1(sigmaw(i),sigd_con(i))445 !jyg<446 !! sigmaw(i) = amax1(sigmaw(i), sigmad)447 !! sigmaw(i) = amin1(sigmaw(i), 0.99)448 d_sig_gen2(i) = 0.449 d_sig_death2(i) = 0.450 d_sig_col2(i) = 0.451 d_sig_spread2(i)= 0.452 518 sigmaw_targ = min(max(sigmaw(i), sigmad),0.99) 453 519 d_sig_bnd2(i) = sigmaw_targ - sigmaw(i) 454 520 d_sigmaw2(i) = sigmaw_targ - sigmaw(i) 455 ! print *,'XXXX1 d_sigmaw2(i), sigmaw(i) ', d_sigmaw2(i), sigmaw(i)456 521 sigmaw(i) = sigmaw_targ 457 !>jyg 458 END DO 522 END DO 523 ! 524 IF (iflag_wk_pop_dyn == 3) THEN 525 DO i = 1, klon 526 IF ((wdens(i)-awdens(i)) <= smallestreal) THEN 527 sigmaw_targ = sigmaw(i) 528 ELSE 529 sigmaw_targ = min(max(asigmaw(i),sigmad),sigmaw(i)) 530 ENDIF 531 d_asig_bnd2(i) = sigmaw_targ - asigmaw(i) 532 d_asigmaw2(i) = sigmaw_targ - asigmaw(i) 533 asigmaw(i) = sigmaw_targ 534 END DO 535 ENDIF ! (iflag_wk_pop_dyn == 3) 459 536 460 537 wape(:) = 0. 461 538 wape2(:) = 0. 462 539 d_sigmaw(:) = 0. 540 d_asigmaw(:) = 0. 463 541 ktopw(:) = 0 464 542 ! … … 810 888 811 889 END DO 890 #ifdef IOPHYS_WK 891 IF (.not.phys_sub) CALL iophys_ecrit('wape_a',1,'wape_a','J/kg',wape) 892 #endif 812 893 813 894 ! 2.2 Prognostic variable update … … 830 911 DO i = 1, klon 831 912 IF (wape(i)<0.) THEN 832 wape(i) = 0.833 cstar(i) = 0.834 hw(i) = hwmin835 !jyg<836 913 !! sigmaw(i) = amax1(sigmad, sigd_con(i)) 837 914 sigmaw_targ = max(sigmad, sigd_con(i)) 838 915 d_sig_bnd2(i) = d_sig_bnd2(i) + sigmaw_targ - sigmaw(i) 839 916 d_sigmaw2(i) = d_sigmaw2(i) + sigmaw_targ - sigmaw(i) 840 ! print *,'XXXX2 d_sigmaw2(i), sigmaw(i) ', d_sigmaw2(i), sigmaw(i)841 917 sigmaw(i) = sigmaw_targ 842 !>jyg 918 ENDIF !! (wape(i)<0.) 919 ENDDO 920 ! 921 IF (iflag_wk_pop_dyn == 3) THEN 922 DO i = 1, klon 923 IF (wape(i)<0.) THEN 924 sigmaw_targ = max(sigmad, sigd_con(i)) 925 d_asig_bnd2(i) = d_asig_bnd2(i) + sigmaw_targ - asigmaw(i) 926 d_asigmaw2(i) = d_asigmaw2(i) + sigmaw_targ - asigmaw(i) 927 asigmaw(i) = sigmaw_targ 928 ENDIF !! (wape(i)<0.) 929 ENDDO 930 ENDIF !! (iflag_wk_pop_dyn == 3) 931 932 DO i = 1, klon 933 IF (wape(i)<0.) THEN 934 wape(i) = 0. 935 cstar(i) = 0. 936 hw(i) = hwmin 843 937 fip(i) = 0. 844 938 gwake(i) = .FALSE. … … 849 943 END IF 850 944 END DO 851 945 ! 852 946 853 947 ! Check qx and qw positivity … … 883 977 ! ----------------- 884 978 885 nsub = 10 886 dtimesub = dtime/nsub 887 979 ! nsub and dtimesub definitions moved to begining of routine. 980 !! nsub = 10 981 !! dtimesub = dtime/nsub 888 982 889 983 890 ! ------------------------------------------------------------ 984 ! ------------------------------------------------------------------------ 985 ! ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 986 ! ------------------------------------------------------------------------ 987 ! 891 988 DO isubstep = 1, nsub 892 ! ------------------------------------------------------------ 893 CALL pkupper (klon, klev, ptop, ph, pupper, kupper) 989 ! 990 ! ------------------------------------------------------------------------ 991 ! 992 CALL pkupper (klon, klev, ptop, ph, pupper, kupper) 894 993 895 994 !print*, 'ptop, pupper, ktop, kupper', ptop, pupper, ktop, kupper … … 943 1042 END DO 944 1043 945 IF ( ok_bug_gfl) THEN1044 IF (iflag_wk_pop_dyn == 0 .AND. ok_bug_gfl) THEN 946 1045 !!-------------------------------------------------------- 947 1046 !!Bug : computing gfl and rad_wk before changing sigmaw 1047 !! This bug exists only for iflag_wk_pop_dyn=0. Otherwise, gfl and rad_wk 1048 !! are computed within wake_popdyn 948 1049 !!-------------------------------------------------------- 949 1050 DO i = 1, klon … … 953 1054 END IF 954 1055 END DO 955 ENDIF ! (ok_bug_gfl) 1056 ENDIF ! (iflag_wk_pop_dyn == 0 .AND. ok_bug_gfl) 1057 !!-------------------------------------------------------- 956 1058 957 1059 DO i = 1, klon … … 959 1061 sigmaw_targ = min(sigmaw(i), sigmaw_max) 960 1062 d_sig_bnd2(i) = d_sig_bnd2(i) + sigmaw_targ - sigmaw(i) 961 d_sigmaw2(i) = d_sigmaw2(i)+ sigmaw_targ - sigmaw(i)1063 d_sigmaw2(i) = d_sigmaw2(i) + sigmaw_targ - sigmaw(i) 962 1064 sigmaw(i) = sigmaw_targ 963 1065 END IF 964 1066 END DO 965 1067 966 IF ( .NOT.ok_bug_gfl) THEN1068 IF (iflag_wk_pop_dyn == 0 .AND. .NOT.ok_bug_gfl) THEN 967 1069 !!-------------------------------------------------------- 968 1070 !!Fix : computing gfl and rad_wk after changing sigmaw … … 974 1076 END IF 975 1077 END DO 976 ENDIF ! (.NOT.ok_bug_gfl) 977 1078 ENDIF ! (iflag_wk_pop_dyn == 0 .AND. .NOT.ok_bug_gfl) 1079 !!-------------------------------------------------------- 1080 1081 IF (iflag_wk_pop_dyn >= 1) THEN 1082 ! The variable "death_rate" is significant only when iflag_wk_pop_dyn = 0. 1083 ! Here, it has to be set to zero. 1084 death_rate(:) = 0. 1085 ENDIF 1086 1087 IF (iflag_wk_pop_dyn >= 3) THEN 1088 DO i = 1, klon 1089 IF (wk_adv(i)) THEN 1090 sigmaw_targ = min(asigmaw(i), sigmaw_max) 1091 d_asig_bnd2(i) = d_asig_bnd2(i) + sigmaw_targ - asigmaw(i) 1092 d_asigmaw2(i) = d_asigmaw2(i) + sigmaw_targ - asigmaw(i) 1093 asigmaw(i) = sigmaw_targ 1094 ENDIF 1095 ENDDO 1096 ENDIF 1097 1098 !!-------------------------------------------------------- 1099 !!-------------------------------------------------------- 978 1100 IF (iflag_wk_pop_dyn == 1) THEN 979 1101 ! 980 1102 CALL wake_popdyn_1 (klon, klev, dtime, cstar, tau_wk_inv, wgen, wdens, awdens, sigmaw, & 1103 wdensmin, & 981 1104 dtimesub, gfl, rad_wk, f_shear, drdt_pos, & 982 1105 d_awdens, d_wdens, d_sigmaw, & … … 987 1110 d_wdens_targ, d_sigmaw_targ) 988 1111 989 ! The variable "death_rate" is significant only when iflag_wk_pop_dyn = 0.990 ! Here, it has to be set to zero.991 death_rate(:) = 0.992 1112 1113 !!-------------------------------------------------------- 993 1114 ELSEIF (iflag_wk_pop_dyn == 2) THEN 1115 ! 994 1116 CALL wake_popdyn_2 ( klon, klev, wk_adv, dtimesub, wgen, & 995 sigmaw, wdens, awdens, & !! states variables 1117 wdensmin, & 1118 sigmaw, wdens, awdens, & !! state variables 996 1119 gfl, cstar, cin, wape, rad_wk, & 997 d_sigmaw, d_wdens, d_awdens, & !! tendenc es1120 d_sigmaw, d_wdens, d_awdens, & !! tendencies 998 1121 cont_fact, & 999 1122 d_sig_gen, d_sig_death, d_sig_col, d_sig_spread, d_sig_bnd, & 1000 1123 d_dens_gen, d_dens_death, d_dens_col, d_dens_bnd, & 1001 1124 d_adens_death, d_adens_icol, d_adens_acol, d_adens_bnd ) 1002 death_rate(:) = 0.1003 1125 sigmaw=sigmaw-d_sigmaw 1004 1126 wdens=wdens-d_wdens 1005 1127 awdens=awdens-d_awdens 1128 1129 !!-------------------------------------------------------- 1130 ELSEIF (iflag_wk_pop_dyn == 3) THEN 1131 #ifdef IOPHYS_WK 1132 IF (phys_sub) THEN 1133 CALL iophys_ecrit('ptop',1,'ptop','Pa',ptop) 1134 CALL iophys_ecrit('sigmaw',1,'sigmaw','',sigmaw) 1135 CALL iophys_ecrit('asigmaw',1,'asigmaw','',asigmaw) 1136 CALL iophys_ecrit('wdens',1,'wdens','1/m2',wdens) 1137 CALL iophys_ecrit('awdens',1,'awdens','1/m2',awdens) 1138 CALL iophys_ecrit('rad_wk',1,'rad_wk','m',rad_wk) 1139 CALL iophys_ecrit('arad_wk',1,'arad_wk','m',arad_wk) 1140 CALL iophys_ecrit('irad_wk',1,'irad_wk','m',irad_wk) 1141 ENDIF 1142 #endif 1143 ! 1144 CALL wake_popdyn_3 ( klon, klev, phys_sub, wk_adv, dtimesub, wgen, & 1145 wdensmin, & 1146 sigmaw, asigmaw, wdens, awdens, & !! state variables 1147 gfl, agfl, cstar, cin, wape, & 1148 rad_wk, arad_wk, irad_wk, & 1149 d_sigmaw, d_asigmaw, d_wdens, d_awdens, & !! tendencies 1150 d_sig_gen, d_sig_death, d_sig_col, d_sig_spread, d_sig_bnd, & 1151 d_asig_death, d_asig_aicol, d_asig_iicol, d_asig_spread, d_asig_bnd, & 1152 d_dens_gen, d_dens_death, d_dens_col, d_dens_bnd, & 1153 d_adens_death, d_adens_icol, d_adens_acol, d_adens_bnd ) 1154 sigmaw=sigmaw-d_sigmaw 1155 asigmaw=asigmaw-d_asigmaw 1156 wdens=wdens-d_wdens 1157 awdens=awdens-d_awdens 1006 1158 1159 !!-------------------------------------------------------- 1007 1160 ELSEIF (iflag_wk_pop_dyn == 0) THEN 1008 1161 … … 1011 1164 DO i = 1, klon 1012 1165 IF (wk_adv(i)) THEN 1166 1013 1167 ! cc nrlmd Introduction du taux de mortalite des poches et 1014 1168 ! test sur sigmaw_max=0.4 … … 1036 1190 END DO 1037 1191 1038 ENDIF ! (iflag_wk_pop_dyn >= 1) 1039 1040 1192 ENDIF ! (iflag_wk_pop_dyn == 1) ... ELSEIF (iflag_wk_pop_dyn == 0) 1193 !!-------------------------------------------------------- 1194 !!-------------------------------------------------------- 1195 1196 #ifdef IOPHYS_WK 1197 IF (phys_sub) THEN 1198 CALL iophys_ecrit('wdensa',1,'wdensa','m',wdens) 1199 CALL iophys_ecrit('awdensa',1,'awdensa','m',awdens) 1200 CALL iophys_ecrit('sigmawa',1,'sigmawa','m',sigmaw) 1201 CALL iophys_ecrit('asigmawa',1,'asigmawa','m',asigmaw) 1202 ENDIF 1203 #endif 1041 1204 ! calcul de la difference de vitesse verticale poche - zone non perturbee 1042 1205 ! IM 060208 differences par rapport au code initial; init. a 0 dp_deltomg … … 1204 1367 IF (wk_adv(i) .AND. k<=kupper(i)+1) THEN 1205 1368 dth(i, k) = deltatw(i, k)/ppi(i, k) 1206 ! print *, 'VVVVwake k, the(i,k), dth(i,k), sigmaw(i) ', k, the(i,k), dth(i,k), sigmaw(i)1207 1369 th1(i, k) = the(i, k) - sigmaw(i)*dth(i, k) ! undisturbed area 1208 1370 th2(i, k) = the(i, k) + (1.-sigmaw(i))*dth(i, k) ! wake … … 1355 1517 (ph(i,kupper(i))-ph(i,1)) 1356 1518 crep(i, k) = crep(i, k) + crep_upper*(ph(i,1)-ph(i,k))/ & 1357 (p (i,1)-ph(i,kupper(i)))1519 (ph(i,1)-ph(i,kupper(i))) 1358 1520 1359 1521 … … 1519 1681 sigmaw(i) = sigmaw(i) + d_sigmaw(i) 1520 1682 d_sigmaw2(i) = d_sigmaw2(i) + d_sigmaw(i) 1521 ! print *,'XXXX4 d_sigmaw2(i), sigmaw(i) ', d_sigmaw2(i), sigmaw(i)1522 1683 END IF 1523 1684 END DO … … 1541 1702 d_sig_bnd2(i) = d_sig_bnd2(i) + sigmaw_targ - sigmaw(i) 1542 1703 d_sigmaw2(i) = d_sigmaw2(i) + sigmaw_targ - sigmaw(i) 1543 ! print *,'XXXX5 d_sigmaw2(i), sigmaw(i) ', d_sigmaw2(i), sigmaw(i)1544 1704 sigmaw(i) = sigmaw_targ 1545 1705 END IF … … 1578 1738 IF (wk_adv(i)) THEN 1579 1739 wdens_targ = min( max(awdens(i),0.), wdens(i) ) 1740 d_adens_bnd2(i) = d_adens_bnd2(i) + wdens_targ - awdens(i) 1580 1741 d_awdens2(i) = d_awdens2(i) + wdens_targ - awdens(i) 1581 1742 awdens(i) = wdens_targ … … 1583 1744 END DO 1584 1745 ! 1585 IF (iflag_wk_pop_dyn == 2) THEN 1586 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! awdens again for iflag_wk_pop_dyn = 2!!!!!! 1746 IF (iflag_wk_pop_dyn >= 2) THEN 1747 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! awdens again for iflag_wk_pop_dyn >= 2!!!!!! 1748 ! Cumulatives 1749 DO i = 1, klon 1750 IF (wk_adv(i)) THEN 1751 d_adens_death2(i) = d_adens_death2(i) + d_adens_death(i) 1752 d_adens_icol2(i) = d_adens_icol2(i) + d_adens_icol(i) 1753 d_adens_acol2(i) = d_adens_acol2(i) + d_adens_acol(i) 1754 d_adens_bnd2(i) = d_adens_bnd2(i) + d_adens_bnd(i) 1755 END IF 1756 END DO 1757 ! Bounds 1758 DO i = 1, klon 1759 IF (wk_adv(i)) THEN 1760 wdens_targ = min( max(awdens(i),0.), wdens(i) ) 1761 d_adens_bnd2(i) = d_adens_bnd2(i) + wdens_targ - awdens(i) 1762 awdens(i) = wdens_targ 1763 END IF 1764 END DO 1765 ! 1766 IF (iflag_wk_pop_dyn == 3) THEN 1767 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! asigmaw for iflag_wk_pop_dyn = 3!!!!!! 1587 1768 ! Cumulatives 1588 1769 DO i = 1, klon 1589 1770 IF (wk_adv(i)) THEN 1590 d_adens_death2(i) = d_adens_death2(i) + d_adens_death(i) 1591 d_adens_icol2(i) = d_adens_icol2(i) + d_adens_icol(i) 1592 d_adens_acol2(i) = d_adens_acol2(i) + d_adens_acol(i) 1593 d_adens_bnd2(i) = d_adens_bnd2(i) + d_adens_bnd(i) 1771 asigmaw(i) = asigmaw(i) + d_asigmaw(i) 1772 d_asigmaw2(i) = d_asigmaw2(i) + d_asigmaw(i) 1773 d_asig_death2(i) = d_asig_death2(i) + d_asig_death(i) 1774 d_asig_spread2(i) = d_asig_spread2(i) + d_asig_spread(i) 1775 d_asig_iicol2(i) = d_asig_iicol2(i) + d_asig_iicol(i) 1776 d_asig_aicol2(i) = d_asig_aicol2(i) + d_asig_aicol(i) 1777 d_asig_bnd2(i) = d_asig_bnd2(i) + d_asig_bnd(i) 1594 1778 END IF 1595 1779 END DO … … 1597 1781 DO i = 1, klon 1598 1782 IF (wk_adv(i)) THEN 1599 wdens_targ = min( max(awdens(i),0.), wdens(i) ) 1600 d_adens_bnd2(i) = d_adens_bnd2(i) + wdens_targ - awdens(i) 1783 ! asigmaw lower bound set to sigmad/2 in order to allow asigmaw values lower than sigmad. 1784 !! sigmaw_targ = min(max(asigmaw(i),sigmad),sigmaw(i)) 1785 sigmaw_targ = min(max(asigmaw(i),sigmad/2.),sigmaw(i)) 1786 d_asig_bnd2(i) = d_asig_bnd2(i) + sigmaw_targ - asigmaw(i) 1787 d_asigmaw2(i) = d_asigmaw2(i) + sigmaw_targ - asigmaw(i) 1788 asigmaw(i) = sigmaw_targ 1601 1789 END IF 1602 1790 END DO 1603 ENDIF ! (iflag_wk_pop_dyn == 2) 1791 1792 #ifdef IOPHYS_WK 1793 IF (phys_sub) THEN 1794 CALL iophys_ecrit('wdensb',1,'wdensb','m',wdens) 1795 CALL iophys_ecrit('awdensb',1,'awdensb','m',awdens) 1796 CALL iophys_ecrit('sigmawb',1,'sigmawb','m',sigmaw) 1797 CALL iophys_ecrit('asigmawb',1,'asigmawb','m',asigmaw) 1798 ! 1799 call iophys_ecrit('d_wdens2',1,'d_wdens2','',d_wdens2) 1800 call iophys_ecrit('d_dens_gen2',1,'d_dens_gen2','',d_dens_gen2) 1801 call iophys_ecrit('d_dens_death2',1,'d_dens_death2','',d_dens_death2) 1802 call iophys_ecrit('d_dens_col2',1,'d_dens_col2','',d_dens_col2) 1803 call iophys_ecrit('d_dens_bnd2',1,'d_dens_bnd2','',d_dens_bnd2) 1804 ! 1805 call iophys_ecrit('d_awdens2',1,'d_awdens2','',d_awdens2) 1806 call iophys_ecrit('d_adens_death2',1,'d_adens_death2','',d_adens_death2) 1807 call iophys_ecrit('d_adens_icol2',1,'d_adens_icol2','',d_adens_icol2) 1808 call iophys_ecrit('d_adens_acol2',1,'d_adens_acol2','',d_adens_acol2) 1809 call iophys_ecrit('d_adens_bnd2',1,'d_adens_bnd2','',d_adens_bnd2) 1810 ! 1811 CALL iophys_ecrit('d_sigmaw2',1,'d_sigmaw2','',d_sigmaw2) 1812 CALL iophys_ecrit('d_sig_gen2',1,'d_sig_gen2','m',d_sig_gen2) 1813 CALL iophys_ecrit('d_sig_spread2',1,'d_sig_spread2','',d_sig_spread2) 1814 CALL iophys_ecrit('d_sig_col2',1,'d_sig_col2','',d_sig_col2) 1815 CALL iophys_ecrit('d_sig_death2',1,'d_sig_death2','',d_sig_death2) 1816 CALL iophys_ecrit('d_sig_bnd2',1,'d_sig_bnd2','',d_sig_bnd2) 1817 ! 1818 CALL iophys_ecrit('d_asigmaw2',1,'d_asigmaw2','',d_asigmaw2) 1819 CALL iophys_ecrit('d_asig_spread2',1,'d_asig_spread2','m',d_asig_spread2) 1820 CALL iophys_ecrit('d_asig_aicol2',1,'d_asig_aicol2','m',d_asig_aicol2) 1821 CALL iophys_ecrit('d_asig_iicol2',1,'d_asig_iicol2','m',d_asig_iicol2) 1822 CALL iophys_ecrit('d_asig_death2',1,'d_asig_death2','m',d_asig_death2) 1823 CALL iophys_ecrit('d_asig_bnd2',1,'d_asig_bnd2','m',d_asig_bnd2) 1824 ENDIF 1825 #endif 1826 ENDIF ! (iflag_wk_pop_dyn == 3) 1827 ENDIF ! (iflag_wk_pop_dyn >= 2) 1604 1828 ENDIF ! (iflag_wk_pop_dyn >= 1) 1605 1829 … … 1818 2042 END DO 1819 2043 2044 1820 2045 ! Filter out bad wakes 1821 2046 … … 1845 2070 d_sig_bnd2(i) = d_sig_bnd2(i) + sigmaw_targ - sigmaw(i) 1846 2071 d_sigmaw2(i) = d_sigmaw2(i) + sigmaw_targ - sigmaw(i) 1847 ! print *,'XXXX6 d_sigmaw2(i), sigmaw(i) ', d_sigmaw2(i), sigmaw(i)1848 2072 sigmaw(i) = sigmaw_targ 2073 ! 2074 d_asig_bnd2(i) = d_asig_bnd2(i) + sigmaw_targ - asigmaw(i) 2075 d_asigmaw2(i) = d_asigmaw2(i) + sigmaw_targ - asigmaw(i) 2076 asigmaw(i) = sigmaw_targ 1849 2077 !>jyg 1850 2078 fip(i) = 0. … … 1856 2084 END IF 1857 2085 END DO 1858 1859 END DO ! end sub-timestep loop 1860 2086 ! 2087 ! ------------------------------------------------------------------------ 2088 ! 2089 END DO ! end sub-timestep loop 2090 ! 2091 ! ------------------------------------------------------------------------ 2092 ! ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2093 ! ------------------------------------------------------------------------ 2094 ! 2095 2096 #ifdef IOPHYS_WK 2097 IF (.not.phys_sub) CALL iophys_ecrit('wape_b',1,'wape_b','J/kg',wape) 2098 #endif 1861 2099 IF (prt_level>=10) THEN 1862 2100 PRINT *, 'wake-5, sigmaw(igout), cstar(igout), wape(igout), ptop(igout) ', & … … 2004 2242 END IF 2005 2243 END DO 2006 2244 #ifdef IOPHYS_WK 2245 IF (.not.phys_sub) CALL iophys_ecrit('wape2_a',1,'wape2_a','J/kg',wape2) 2246 #endif 2007 2247 2008 2248 … … 2034 2274 END DO 2035 2275 END IF 2276 #ifdef IOPHYS_WK 2277 IF (.not.phys_sub) CALL iophys_ecrit('wape2_b',1,'wape2_b','J/kg',wape2) 2278 #endif 2036 2279 2037 2280 … … 2064 2307 d_sig_bnd2(i) = d_sig_bnd2(i) + sigmaw_targ - sigmaw(i) 2065 2308 d_sigmaw2(i) = d_sigmaw2(i) + sigmaw_targ - sigmaw(i) 2066 ! print *,'XXXX7 d_sigmaw2(i), sigmaw(i) ', d_sigmaw2(i), sigmaw(i)2067 2309 sigmaw(i) = sigmaw_targ 2310 ! 2311 d_asig_bnd2(i) = d_asig_bnd2(i) + sigmaw_targ - asigmaw(i) 2312 d_asigmaw2(i) = d_asigmaw2(i) + sigmaw_targ - asigmaw(i) 2313 asigmaw(i) = sigmaw_targ 2068 2314 !>jyg 2069 2315 fip(i) = 0. … … 2074 2320 gwake(i) = .TRUE. 2075 2321 END IF 2076 END IF 2322 #ifdef IOPHYS_WK 2323 IF (.not.phys_sub) CALL iophys_ecrit('cstar2',1,'cstar2','J/kg',cstar2) 2324 #endif 2325 END IF ! (ok_qx_qw(i)) 2077 2326 END DO 2078 2327 … … 2106 2355 END IF 2107 2356 END DO 2108 2357 IF (iflag_wk_pop_dyn >= 3) THEN 2358 #ifdef IOPHYS_WK 2359 IF (.not.phys_sub) THEN 2360 CALL iophys_ecrit('fip',1,'fip','J/kg',fip) 2361 CALL iophys_ecrit('hw',1,'hw','J/kg',hw) 2362 CALL iophys_ecrit('ptop',1,'ptop','J/kg',ptop) 2363 CALL iophys_ecrit('wdens',1,'wdens','J/kg',wdens) 2364 CALL iophys_ecrit('awdens',1,'awdens','m',awdens) 2365 CALL iophys_ecrit('sigmaw',1,'sigmaw','m',sigmaw) 2366 CALL iophys_ecrit('asigmaw',1,'asigmaw','m',asigmaw) 2367 ! 2368 CALL iophys_ecrit('rad_wk',1,'rad_wk','J/kg',rad_wk) 2369 CALL iophys_ecrit('arad_wk',1,'arad_wk','J/kg',arad_wk) 2370 CALL iophys_ecrit('irad_wk',1,'irad_wk','J/kg',irad_wk) 2371 ! 2372 call iophys_ecrit('d_wdens2',1,'d_wdens2','',d_wdens2) 2373 call iophys_ecrit('d_dens_gen2',1,'d_dens_gen2','',d_dens_gen2) 2374 call iophys_ecrit('d_dens_death2',1,'d_dens_death2','',d_dens_death2) 2375 call iophys_ecrit('d_dens_col2',1,'d_dens_col2','',d_dens_col2) 2376 call iophys_ecrit('d_dens_bnd2',1,'d_dens_bnd2','',d_dens_bnd2) 2377 ! 2378 call iophys_ecrit('d_awdens2',1,'d_awdens2','',d_awdens2) 2379 call iophys_ecrit('d_adens_death2',1,'d_adens_death2','',d_adens_death2) 2380 call iophys_ecrit('d_adens_icol2',1,'d_adens_icol2','',d_adens_icol2) 2381 call iophys_ecrit('d_adens_acol2',1,'d_adens_acol2','',d_adens_acol2) 2382 call iophys_ecrit('d_adens_bnd2',1,'d_adens_bnd2','',d_adens_bnd2) 2383 ! 2384 CALL iophys_ecrit('d_sigmaw2',1,'d_sigmaw2','',d_sigmaw2) 2385 CALL iophys_ecrit('d_sig_gen2',1,'d_sig_gen2','m',d_sig_gen2) 2386 CALL iophys_ecrit('d_sig_spread2',1,'d_sig_spread2','',d_sig_spread2) 2387 CALL iophys_ecrit('d_sig_col2',1,'d_sig_col2','',d_sig_col2) 2388 CALL iophys_ecrit('d_sig_death2',1,'d_sig_death2','',d_sig_death2) 2389 CALL iophys_ecrit('d_sig_bnd2',1,'d_sig_bnd2','',d_sig_bnd2) 2390 ! 2391 CALL iophys_ecrit('d_asigmaw2',1,'d_asigmaw2','',d_asigmaw2) 2392 CALL iophys_ecrit('d_asig_spread2',1,'d_asig_spread2','m',d_asig_spread2) 2393 CALL iophys_ecrit('d_asig_aicol2',1,'d_asig_aicol2','m',d_asig_aicol2) 2394 CALL iophys_ecrit('d_asig_iicol2',1,'d_asig_iicol2','m',d_asig_iicol2) 2395 CALL iophys_ecrit('d_asig_death2',1,'d_asig_death2','m',d_asig_death2) 2396 CALL iophys_ecrit('d_asig_bnd2',1,'d_asig_bnd2','m',d_asig_bnd2) 2397 ENDIF ! (.not.phys_sub) 2398 #endif 2399 ENDIF ! (iflag_wk_pop_dyn >= 3) 2109 2400 ! Limitation de sigmaw 2110 2401 … … 2121 2412 DO i = 1, klon 2122 2413 kill_wake(i) = ((wape(i)>=wape2(i)) .AND. (wape2(i)<=wapecut)) .OR. (ktopw(i)<=2) .OR. & 2123 .NOT. ok_qx_qw(i) .OR. (wdens(i) < 2.*wdensmin) 2414 .NOT. ok_qx_qw(i) .OR. (wdens(i) < wdensthreshold) 2415 !! .NOT. ok_qx_qw(i) .OR. (wdens(i) < 2.*wdensmin) 2124 2416 ENDDO 2125 2417 ELSE ! (iflag_wk_pop_dyn >= 1) … … 2154 2446 wape(i) = 0. 2155 2447 cstar(i) = 0. 2156 !!jyg Outside subroutine "Wake" hw, wdens andsigmaw are zero when there are no wakes2448 !!jyg Outside subroutine "Wake" hw, wdens sigmaw and asigmaw are zero when there are no wakes 2157 2449 !! hw(i) = hwmin !jyg 2158 2450 !! sigmaw(i) = sigmad !jyg 2159 2451 hw(i) = 0. !jyg 2160 2452 fip(i) = 0. 2453 ! 2161 2454 !! sigmaw(i) = 0. !jyg 2162 2455 sigmaw_targ = 0. … … 2164 2457 !! d_sigmaw2(i) = d_sigmaw2(i) + sigmaw_targ - sigmaw(i) 2165 2458 d_sigmaw2(i) = sigmaw_targ - sigmaw_in(i) ! _in = correction jyg 20220124 2166 ! print *,'XXXX8 d_sigmaw2(i), sigmaw(i) ', d_sigmaw2(i), sigmaw(i)2167 2459 sigmaw(i) = sigmaw_targ 2460 ! 2461 IF (iflag_wk_pop_dyn >= 3) THEN 2462 sigmaw_targ = 0. 2463 d_asig_bnd2(i) = d_asig_bnd2(i) + sigmaw_targ - asigmaw(i) 2464 !! d_sigmaw2(i) = d_sigmaw2(i) + sigmaw_targ - sigmaw(i) 2465 d_asigmaw2(i) = sigmaw_targ - asigmaw_in(i) ! _in = correction jyg 20220124 2466 asigmaw(i) = sigmaw_targ 2467 ELSE 2468 asigmaw(i) = 0. 2469 ENDIF ! (iflag_wk_pop_dyn >= 3) 2470 ! 2168 2471 IF (iflag_wk_pop_dyn >= 1) THEN 2169 2472 !! awdens(i) = 0. … … 2176 2479 wdens_targ = 0. 2177 2480 !!jyg: bug fix : the d_adens_bnd2 computation must be before the update of awdens. 2178 IF (iflag_wk_pop_dyn == 2) THEN2481 IF (iflag_wk_pop_dyn >= 2) THEN 2179 2482 d_adens_bnd2(i) = d_adens_bnd2(i) + wdens_targ - awdens(i) 2180 ENDIF ! (iflag_wk_pop_dyn == 2)2483 ENDIF ! (iflag_wk_pop_dyn >= 2) 2181 2484 !! d_awdens2(i) = wdens_targ - awdens(i) 2182 2485 d_awdens2(i) = wdens_targ - awdens_in(i) ! jyg 20220916 … … 2198 2501 wape(igout),wape2(igout),ktopw(igout),OK_qx_qw(igout) 2199 2502 ENDIF 2503 #ifdef IOPHYS_WK 2504 IF (.not.phys_sub) CALL iophys_ecrit('wape_c',1,'wape_c','J/kg',wape) 2505 #endif 2200 2506 2201 2507 … … 2224 2530 !jyg< 2225 2531 IF (iflag_wk_pop_dyn >= 1) THEN 2226 DO i = 1, klon 2227 IF (ok_qx_qw(i)) THEN 2228 d_sig_gen2(i) = d_sig_gen2(i)/dtime 2229 d_sig_death2(i) = d_sig_death2(i)/dtime 2230 d_sig_col2(i) = d_sig_col2(i)/dtime 2231 d_sig_spread2(i) = d_sig_spread2(i)/dtime 2232 d_sig_bnd2(i) = d_sig_bnd2(i)/dtime 2233 d_sigmaw2(i) = d_sigmaw2(i)/dtime 2234 ! print *,'XXXX9 d_sigmaw2(i), sigmaw(i), dtime ', d_sigmaw2(i), sigmaw(i), dtime 2235 ! 2236 d_dens_gen2(i) = d_dens_gen2(i)/dtime 2237 d_dens_death2(i) = d_dens_death2(i)/dtime 2238 d_dens_col2(i) = d_dens_col2(i)/dtime 2239 d_dens_bnd2(i) = d_dens_bnd2(i)/dtime 2240 d_awdens2(i) = d_awdens2(i)/dtime 2241 d_wdens2(i) = d_wdens2(i)/dtime 2242 ENDIF 2243 ENDDO 2244 IF (iflag_wk_pop_dyn == 2) THEN 2245 DO i = 1, klon 2246 IF (ok_qx_qw(i)) THEN 2247 d_adens_death2(i) = d_adens_death2(i)/dtime 2248 d_adens_icol2(i) = d_adens_icol2(i)/dtime 2249 d_adens_acol2(i) = d_adens_acol2(i)/dtime 2250 d_adens_bnd2(i) = d_adens_bnd2(i)/dtime 2251 ENDIF 2532 DO i = 1, klon 2533 IF (ok_qx_qw(i)) THEN 2534 d_sig_gen2(i) = d_sig_gen2(i)/dtime 2535 d_sig_death2(i) = d_sig_death2(i)/dtime 2536 d_sig_col2(i) = d_sig_col2(i)/dtime 2537 d_sig_spread2(i) = d_sig_spread2(i)/dtime 2538 d_sig_bnd2(i) = d_sig_bnd2(i)/dtime 2539 d_sigmaw2(i) = d_sigmaw2(i)/dtime 2540 ! 2541 d_dens_gen2(i) = d_dens_gen2(i)/dtime 2542 d_dens_death2(i) = d_dens_death2(i)/dtime 2543 d_dens_col2(i) = d_dens_col2(i)/dtime 2544 d_dens_bnd2(i) = d_dens_bnd2(i)/dtime 2545 d_awdens2(i) = d_awdens2(i)/dtime 2546 d_wdens2(i) = d_wdens2(i)/dtime 2547 ENDIF 2252 2548 ENDDO 2253 ENDIF ! (iflag_wk_pop_dyn == 2) 2549 IF (iflag_wk_pop_dyn >= 2) THEN 2550 DO i = 1, klon 2551 IF (ok_qx_qw(i)) THEN 2552 d_adens_death2(i) = d_adens_death2(i)/dtime 2553 d_adens_icol2(i) = d_adens_icol2(i)/dtime 2554 d_adens_acol2(i) = d_adens_acol2(i)/dtime 2555 d_adens_bnd2(i) = d_adens_bnd2(i)/dtime 2556 ENDIF 2557 ENDDO 2558 IF (iflag_wk_pop_dyn == 3) THEN 2559 DO i = 1, klon 2560 IF (ok_qx_qw(i)) THEN 2561 d_asig_death2(i) = d_asig_death2(i)/dtime 2562 d_asig_iicol2(i) = d_asig_iicol2(i)/dtime 2563 d_asig_aicol2(i) = d_asig_aicol2(i)/dtime 2564 d_asig_spread2(i) = d_asig_spread2(i)/dtime 2565 d_asig_bnd2(i) = d_asig_bnd2(i)/dtime 2566 ENDIF 2567 ENDDO 2568 ENDIF ! (iflag_wk_pop_dyn == 3) 2569 ENDIF ! (iflag_wk_pop_dyn >= 2) 2254 2570 ENDIF ! (iflag_wk_pop_dyn >= 1) 2255 2571 … … 2387 2703 2388 2704 SUBROUTINE wake_popdyn_1(klon, klev, dtime, cstar, tau_wk_inv, wgen, wdens, awdens, sigmaw, & 2705 wdensmin, & 2389 2706 dtimesub, gfl, rad_wk, f_shear, drdt_pos, & 2390 2707 d_awdens, d_wdens, d_sigmaw, & … … 2400 2717 USE lmdz_wake_ini , ONLY : stark, wdens_ref 2401 2718 USE lmdz_wake_ini , ONLY : tau_cv, rzero, aa0 2402 USE lmdz_wake_ini , ONLY : iflag_wk_pop_dyn, wdensmin 2719 !! USE lmdz_wake_ini , ONLY : iflag_wk_pop_dyn, wdensmin 2720 USE lmdz_wake_ini , ONLY : iflag_wk_pop_dyn 2403 2721 USE lmdz_wake_ini , ONLY : sigmad, cstart, sigmaw_max 2404 2722 … … 2409 2727 REAL, INTENT(IN) :: dtime 2410 2728 REAL, INTENT(IN) :: dtimesub 2729 REAL, INTENT(IN) :: wdensmin 2411 2730 REAL, DIMENSION (klon), INTENT(IN) :: wgen 2412 2731 REAL, DIMENSION (klon), INTENT(IN) :: wdens 2413 2732 REAL, DIMENSION (klon), INTENT(IN) :: awdens 2414 2733 REAL, DIMENSION (klon), INTENT(IN) :: sigmaw 2415 REAL, DIMENSION (klon), INTENT(IN) :: gfl,cstar2734 REAL, DIMENSION (klon), INTENT(IN) :: cstar 2416 2735 REAL, DIMENSION (klon), INTENT(IN) :: cin, wape 2417 REAL, DIMENSION (klon), INTENT(IN) :: rad_wk2418 2736 REAL, DIMENSION (klon), INTENT(IN) :: f_shear 2419 2737 INTEGER, INTENT(IN) :: iflag_wk_act … … 2424 2742 ! Tendencies of state variables (2 is appended to the names of fields which are the cumul of fields 2425 2743 ! computed at each sub-timestep; e.g. d_wdens2 is the cumul of d_wdens) 2744 REAL, DIMENSION (klon), INTENT(OUT) :: rad_wk 2745 REAL, DIMENSION (klon), INTENT(OUT) :: gfl 2426 2746 REAL, DIMENSION (klon), INTENT(OUT) :: d_sigmaw, d_awdens, d_wdens 2427 2747 REAL, DIMENSION (klon), INTENT(OUT) :: drdt … … 2464 2784 ENDIF ! (iflag_wk_act ==2) 2465 2785 2466 2467 DO i = 1, klon 2468 ! print*, 'XXX wk_adv(i)', wk_adv(i) 2786 DO i = 1, klon 2787 IF (wk_adv(i)) THEN 2788 rad_wk(i) = max( sqrt(sigmaw(i)/(3.14*wdens(i))) , rzero) 2789 gfl(i) = 2.*sqrt(3.14*wdens(i)*sigmaw(i)) 2790 END IF 2791 END DO 2792 2793 DO i = 1, klon 2469 2794 IF (wk_adv(i)) THEN 2470 2795 !! tau_wk(i) = max(rad_wk(i)/(3.*cstar(i))*((cstar(i)/cstart)**1.5 - 1), 100.) … … 2506 2831 !! - sigmaw(i)*tau_wk_inv_min )*dtimesub 2507 2832 d_sig_gen(i) = wgen(i)*aa0 2508 !! print*, 'XXX sigmaw(i), awdens(i), wdens(i), tau_wk_inv_min', &2509 !! sigmaw(i), awdens(i), wdens(i), tau_wk_inv_min2510 2833 d_sig_death(i) = - sigmaw(i)*(1.-awdens(i)/wdens(i))*tau_wk_inv_min 2511 2834 !! … … 2547 2870 2548 2871 SUBROUTINE wake_popdyn_2 ( klon, klev, wk_adv, dtimesub, wgen, & 2872 wdensmin, & 2549 2873 sigmaw, wdens, awdens, & !! states variables 2550 2874 gfl, cstar, cin, wape, rad_wk, & … … 2561 2885 USE lmdz_wake_ini , ONLY : stark, wdens_ref 2562 2886 USE lmdz_wake_ini , ONLY : tau_cv, rzero, aa0 2563 USE lmdz_wake_ini , ONLY : iflag_wk_pop_dyn, wdensmin 2887 !! USE lmdz_wake_ini , ONLY : iflag_wk_pop_dyn, wdensmin 2888 USE lmdz_wake_ini , ONLY : iflag_wk_pop_dyn 2564 2889 USE lmdz_wake_ini , ONLY : sigmad, cstart, sigmaw_max 2565 2890 … … 2569 2894 LOGICAL, DIMENSION (klon), INTENT(IN) :: wk_adv 2570 2895 REAL, INTENT(IN) :: dtimesub 2896 REAL, INTENT(IN) :: wdensmin 2571 2897 REAL, DIMENSION (klon), INTENT(IN) :: wgen !! B = birth rate of wakes 2572 2898 REAL, DIMENSION (klon), INTENT(INOUT) :: sigmaw !! sigma = fractional area of wakes 2573 2899 REAL, DIMENSION (klon), INTENT(INOUT) :: wdens !! D = number of wakes per unit area 2574 2900 REAL, DIMENSION (klon), INTENT(INOUT) :: awdens !! A = number of active wakes per unit area 2575 REAL, DIMENSION (klon), INTENT(IN) :: gfl !! Lg = gust front lenght per unit area2576 2901 REAL, DIMENSION (klon), INTENT(IN) :: cstar !! C* = spreading velocity of wakes 2577 2902 REAL, DIMENSION (klon), INTENT(IN) :: cin, wape ! RM : A Faire disparaitre 2578 REAL, DIMENSION (klon), INTENT(IN) :: rad_wk !! r = wake radius2579 2903 2580 2904 ! 2905 REAL, DIMENSION (klon), INTENT(OUT) :: rad_wk !! r = wake radius 2906 REAL, DIMENSION (klon), INTENT(OUT) :: gfl !! Lg = gust front lenght per unit area 2581 2907 REAL, DIMENSION (klon), INTENT(OUT) :: d_sigmaw, d_wdens, d_awdens 2582 2908 REAL, DIMENSION (klon), INTENT(OUT) :: cont_fact !! RM facteur de contact = 2 pi * rad * C* … … 2605 2931 2606 2932 DO i = 1, klon 2607 ! print*, 'XXX wk_adv(i)', wk_adv(i) 2933 IF (wk_adv(i)) THEN 2934 rad_wk(i) = max( sqrt(sigmaw(i)/(3.14*wdens(i))) , rzero) 2935 gfl(i) = 2.*sqrt(3.14*wdens(i)*sigmaw(i)) 2936 END IF 2937 END DO 2938 2939 2940 DO i = 1, klon 2608 2941 IF (wk_adv(i)) THEN 2609 2942 !! tau_wk(i) = max(rad_wk(i)/(3.*cstar(i))*((cstar(i)/cstart)**1.5 - 1), 100.) … … 2687 3020 END SUBROUTINE wake_popdyn_2 2688 3021 3022 SUBROUTINE wake_popdyn_3 ( klon, klev, phys_sub, wk_adv, dtimesub, wgen, & 3023 wdensmin, & 3024 sigmaw, asigmaw, wdens, awdens, & !! state variables 3025 gfl, agfl, cstar, cin, wape, & 3026 rad_wk, arad_wk, irad_wk, & 3027 d_sigmaw, d_asigmaw, d_wdens, d_awdens, & !! tendencies 3028 d_sig_gen, d_sig_death, d_sig_col, d_sig_spread, d_sig_bnd, & 3029 d_asig_death, d_asig_aicol, d_asig_iicol, d_asig_spread, d_asig_bnd, & 3030 d_dens_gen, d_dens_death, d_dens_col, d_dens_bnd, & 3031 d_adens_death, d_adens_icol, d_adens_acol, d_adens_bnd ) 3032 3033 3034 3035 USE lmdz_wake_ini , ONLY : wake_ini 3036 USE lmdz_wake_ini , ONLY : prt_level,RG 3037 USE lmdz_wake_ini , ONLY : stark, wdens_ref 3038 USE lmdz_wake_ini , ONLY : tau_cv, rzero, aa0 3039 !! USE lmdz_wake_ini , ONLY : iflag_wk_pop_dyn, wdensmin 3040 USE lmdz_wake_ini , ONLY : iflag_wk_pop_dyn 3041 USE lmdz_wake_ini , ONLY : sigmad, cstart, sigmaw_max 3042 USE lmdz_wake_ini , ONLY : smallestreal 3043 3044 IMPLICIT NONE 3045 3046 INTEGER, INTENT(IN) :: klon,klev 3047 LOGICAL, INTENT(IN) :: phys_sub 3048 LOGICAL, DIMENSION (klon), INTENT(IN) :: wk_adv 3049 REAL, INTENT(IN) :: dtimesub 3050 REAL, INTENT(IN) :: wdensmin 3051 REAL, DIMENSION (klon), INTENT(IN) :: wgen !! B = birth rate of wakes 3052 REAL, DIMENSION (klon), INTENT(INOUT) :: sigmaw !! sigma = fractional area of wakes 3053 REAL, DIMENSION (klon), INTENT(INOUT) :: asigmaw !! sigma = fractional area of active wakes 3054 REAL, DIMENSION (klon), INTENT(INOUT) :: wdens !! D = number of wakes per unit area 3055 REAL, DIMENSION (klon), INTENT(INOUT) :: awdens !! A = number of active wakes per unit area 3056 REAL, DIMENSION (klon), INTENT(IN) :: cstar !! C* = spreading velocity of wakes 3057 REAL, DIMENSION (klon), INTENT(IN) :: cin, wape ! RM : A Faire disparaitre 3058 3059 ! 3060 REAL, DIMENSION (klon), INTENT(OUT) :: rad_wk !! r = mean wake radius 3061 REAL, DIMENSION (klon), INTENT(OUT) :: arad_wk !! r_A = wake radius of active wakes 3062 REAL, DIMENSION (klon), INTENT(OUT) :: irad_wk !! r_I = wake radius of inactive wakes 3063 REAL, DIMENSION (klon), INTENT(OUT) :: gfl !! Lg = gust front length per unit area 3064 REAL, DIMENSION (klon), INTENT(OUT) :: agfl !! LgA = gust front length of active wakes 3065 !! per unit area 3066 REAL, DIMENSION (klon), INTENT(OUT) :: d_sigmaw, d_asigmaw, d_wdens, d_awdens 3067 ! Some components of the tendencies of state variables 3068 REAL, DIMENSION (klon), INTENT(OUT) :: d_sig_gen, d_sig_death, d_sig_col, d_sig_spread, d_sig_bnd 3069 REAL, DIMENSION (klon), INTENT(OUT) :: d_asig_death, d_asig_aicol, d_asig_iicol, d_asig_spread, d_asig_bnd 3070 REAL, DIMENSION (klon), INTENT(OUT) :: d_dens_gen, d_dens_death, d_dens_col, d_dens_bnd 3071 REAL, DIMENSION (klon), INTENT(OUT) :: d_adens_death, d_adens_acol, d_adens_icol, d_adens_bnd 3072 3073 3074 !! internal variables 3075 3076 INTEGER :: i, k 3077 REAL, DIMENSION (klon) :: iwdens, isigmaw !! inactive wake density and fractional area 3078 !! REAL, DIMENSION (klon) :: d_arad, d_irad 3079 REAL, DIMENSION (klon) :: igfl !! LgI = gust front length of inactive wakes 3080 !! per unit area 3081 REAL, DIMENSION (klon) :: s_wk !! mean area of individual wakes 3082 REAL, DIMENSION (klon) :: as_wk !! mean area of individual active wakes 3083 REAL, DIMENSION (klon) :: is_wk !! mean area of individual inactive wakes 3084 REAL, DIMENSION (klon) :: tau_wk_inv !! tau = life time of wakes 3085 REAL :: tau_wk_inv_min 3086 REAL, DIMENSION (klon) :: tau_prime !! tau_prime = life time of actives wakes 3087 REAL :: d_wdens_targ, d_sigmaw_targ 3088 3089 3090 !! Equations 3091 !! --------- 3092 !! Gust fronts: 3093 !! Lg_A = 2 pi r_A A 3094 !! Lg_I = 2 pi r_I I 3095 !! Lg = 2 pi r D 3096 !! 3097 !! Areas: 3098 !! s = pi r^2 3099 !! s_A = pi r_A^2 3100 !! s_I = pi r_I^2 3101 !! 3102 !! Life expectancy: 3103 !! tau_I = 3 C* ((C*/C*t)^3/2 - 1) / r_I 3104 !! 3105 !! Time deratives: 3106 !! dD/dt = B - (D-A)/tau_I - 2 Lg C* D 3107 !! dA/dt = B - A/tau_A + 2 Lg_I C* (D-A) - 2 Lg_A C* A 3108 !! dsigma/dt = B a0 - sigma_I/tau_I + Lg C* - 2 Lg_I C* (D-A) (2 s_I - a0) 3109 !! dsigma_A/dt = B a0 - sigma_A/tau_A + Lg_A C* + (Lg_A I + Lg_I A) C* s_I + 2 Lg_I C* I a0 3110 !! 3111 3112 DO i = 1, klon 3113 IF (wk_adv(i)) THEN 3114 iwdens(i) = wdens(i) - awdens(i) 3115 isigmaw(i) = sigmaw(i) - asigmaw(i) 3116 ! 3117 arad_wk(i) = max( sqrt(asigmaw(i)/(3.14*awdens(i))) , rzero) 3118 irad_wk(i) = max( sqrt((sigmaw(i)-asigmaw(i))/ & 3119 (3.14*max(smallestreal,(wdens(i)-awdens(i))))), rzero) 3120 rad_wk(i) = (awdens(i)*arad_wk(i)+(wdens(i)-awdens(i))*irad_wk(i))/wdens(i) 3121 ! 3122 s_wk(i) = 3.14*rad_wk(i)**2 3123 as_wk(i) = 3.14*arad_wk(i)**2 3124 is_wk(i) = 3.14*irad_wk(i)**2 3125 ! 3126 gfl(i) = 2.*sqrt(3.14*wdens(i)*sigmaw(i)) 3127 agfl(i) = 2.*sqrt(3.14*awdens(i)*asigmaw(i)) 3128 igfl(i) = gfl(i) - agfl(i) 3129 ENDIF 3130 ENDDO 3131 3132 3133 DO i = 1, klon 3134 IF (wk_adv(i)) THEN 3135 tau_wk_inv(i) = max( (3.*cstar(i))/(irad_wk(i)*((cstar(i)/cstart)**1.5 - 1)), 0.) 3136 tau_wk_inv_min = min(tau_wk_inv(i), 1./dtimesub) 3137 tau_prime(i) = tau_cv 3138 3139 d_sig_gen(i) = wgen(i)*aa0 3140 d_sig_death(i) = - isigmaw(i)*tau_wk_inv_min 3141 d_sig_col(i) = - 2.*igfl(i)*cstar(i)*iwdens(i)*(2.*is_wk(i)-aa0) 3142 d_sig_spread(i) = gfl(i)*cstar(i) 3143 ! 3144 d_sig_gen(i) = d_sig_gen(i)*dtimesub 3145 d_sig_death(i) = d_sig_death(i)*dtimesub 3146 d_sig_col(i) = d_sig_col(i)*dtimesub 3147 d_sig_spread(i) = d_sig_spread(i)*dtimesub 3148 d_sigmaw(i) = d_sig_gen(i) + d_sig_death(i) + d_sig_col(i) + d_sig_spread(i) 3149 #ifdef IOPHYS_WK 3150 IF (phys_sub) call iophys_ecrit('d_sigmaw0',1,'d_sigmaw0','',d_sigmaw) 3151 #endif 3152 3153 3154 d_sigmaw_targ = max(d_sigmaw(i), sigmad-sigmaw(i)) 3155 !! d_sig_bnd(i) = d_sig_bnd(i) + d_sigmaw_targ - d_sigmaw(i) 3156 !! d_sig_bnd_provis(i) = d_sigmaw_targ - d_sigmaw(i) 3157 d_sig_bnd(i) = d_sigmaw_targ - d_sigmaw(i) 3158 d_sigmaw(i) = d_sigmaw_targ 3159 !! d_sigmaw(i) = max(d_sigmaw(i), sigmad-sigmaw(i)) 3160 #ifdef IOPHYS_WK 3161 IF (phys_sub) THEN 3162 call iophys_ecrit('tauwk_inv',1,'tau_wk_inv_min','',tau_wk_inv_min) 3163 call iophys_ecrit('d_sigmaw',1,'d_sigmaw','',d_sigmaw) 3164 call iophys_ecrit('d_sig_gen',1,'d_sig_gen','',d_sig_gen) 3165 call iophys_ecrit('d_sig_death',1,'d_sig_death','',d_sig_death) 3166 call iophys_ecrit('d_sig_col',1,'d_sig_col','',d_sig_col) 3167 call iophys_ecrit('d_sig_spread',1,'d_sig_spread','',d_sig_spread) 3168 call iophys_ecrit('d_sig_bnd',1,'d_sig_bnd','',d_sig_bnd) 3169 ENDIF 3170 #endif 3171 d_asig_death(i) = - asigmaw(i)/tau_prime(i) 3172 d_asig_aicol(i) = (agfl(i)*iwdens(i) + igfl(i)*awdens(i))*cstar(i)*is_wk(i) 3173 d_asig_iicol(i) = 2.*igfl(i)*cstar(i)*iwdens(i)*aa0 3174 d_asig_spread(i) = agfl(i)*cstar(i) 3175 ! 3176 d_asig_death(i) = d_asig_death(i)*dtimesub 3177 d_asig_aicol(i) = d_asig_aicol(i)*dtimesub 3178 d_asig_iicol(i) = d_asig_iicol(i)*dtimesub 3179 d_asig_spread(i) = d_asig_spread(i)*dtimesub 3180 d_asigmaw(i) = d_sig_gen(i) + d_asig_death(i) + d_asig_aicol(i) + d_asig_iicol(i) + d_asig_spread(i) 3181 #ifdef IOPHYS_WK 3182 IF (phys_sub) call iophys_ecrit('d_asigmaw0',1,'d_asigmaw0','',d_asigmaw) 3183 #endif 3184 3185 d_sigmaw_targ = min(max(d_asigmaw(i),-asigmaw(i)), sigmaw(i)-asigmaw(i)) 3186 !! d_dens_bnd(i) = d_dens_bnd(i) + d_sigmaw_targ - d_sigmaw(i) 3187 d_asig_bnd(i) = d_sigmaw_targ - d_asigmaw(i) 3188 d_asigmaw(i) = d_sigmaw_targ 3189 #ifdef IOPHYS_WK 3190 IF (phys_sub) THEN 3191 call iophys_ecrit('d_asigmaw',1,'d_asigmaw','',d_asigmaw) 3192 call iophys_ecrit('d_asig_death',1,'d_asig_death','',d_asig_death) 3193 call iophys_ecrit('d_asig_aicol',1,'d_asig_aicol','',d_asig_aicol) 3194 call iophys_ecrit('d_asig_iicol',1,'d_asig_iicol','',d_asig_iicol) 3195 call iophys_ecrit('d_asig_spread',1,'d_asig_spread','',d_asig_spread) 3196 call iophys_ecrit('d_asig_bnd',1,'d_asig_bnd','',d_asig_bnd) 3197 ENDIF 3198 #endif 3199 d_dens_gen(i) = wgen(i) 3200 d_dens_death(i) = - iwdens(i)*tau_wk_inv_min 3201 d_dens_col(i) = - 2.*gfl(i)*cstar(i)*wdens(i) 3202 ! 3203 d_dens_gen(i) = d_dens_gen(i)*dtimesub 3204 d_dens_death(i) = d_dens_death(i)*dtimesub 3205 d_dens_col(i) = d_dens_col(i)*dtimesub 3206 d_wdens(i) = d_dens_gen(i) + d_dens_death(i) + d_dens_col(i) 3207 !! 3208 d_wdens_targ = max(d_wdens(i), wdensmin-wdens(i)) 3209 !! d_dens_bnd(i) = d_dens_bnd(i) + d_wdens_targ - d_wdens(i) 3210 d_dens_bnd(i) = d_wdens_targ - d_wdens(i) 3211 d_wdens(i) = d_wdens_targ 3212 #ifdef IOPHYS_WK 3213 IF (phys_sub) THEN 3214 call iophys_ecrit('d_wdens',1,'d_wdens','',d_wdens) 3215 call iophys_ecrit('d_dens_gen',1,'d_dens_gen','',d_dens_gen) 3216 call iophys_ecrit('d_dens_death',1,'d_dens_death','',d_dens_death) 3217 call iophys_ecrit('d_dens_col',1,'d_dens_col','',d_dens_col) 3218 ENDIF 3219 #endif 3220 3221 d_adens_death(i) = -awdens(i)/tau_prime(i) 3222 d_adens_icol(i) = 2.*igfl(i)*cstar(i)*iwdens(i) 3223 d_adens_acol(i) = - 2.*agfl(i)*cstar(i)*awdens(i) 3224 ! 3225 d_adens_death(i) = d_adens_death(i)*dtimesub 3226 d_adens_icol(i) = d_adens_icol(i)*dtimesub 3227 d_adens_acol(i) = d_adens_acol(i)*dtimesub 3228 d_awdens(i) = d_dens_gen(i) + d_adens_death(i) + d_adens_icol(i) + d_adens_acol(i) 3229 #ifdef IOPHYS_WK 3230 IF (phys_sub) THEN 3231 call iophys_ecrit('d_awdens',1,'d_awdens','',d_awdens) 3232 call iophys_ecrit('d_adens_death',1,'d_adens_death','',d_adens_death) 3233 call iophys_ecrit('d_adens_icol',1,'d_adens_icol','',d_adens_icol) 3234 call iophys_ecrit('d_adens_acol',1,'d_adens_acol','',d_adens_acol) 3235 ENDIF 3236 #endif 3237 d_wdens_targ = min(max(d_awdens(i),-awdens(i)), wdens(i)-awdens(i)) 3238 !! d_dens_bnd(i) = d_dens_bnd(i) + d_wdens_targ - d_wdens(i) 3239 d_adens_bnd(i) = d_wdens_targ - d_awdens(i) 3240 d_awdens(i) = d_wdens_targ 3241 3242 !! d_irad(i) = (d_sigmaw(i)-d_asigmaw(i)-isigmaw(i)*(d_wdens(i)-awdens(i))/iwdens(i)) / & 3243 !! max(smallestreal,(2.*3.14*iwdens(i)*irad_wk(i))) 3244 !! d_arad(i) = (d_asigmaw(i)-asigmaw(i)*d_awdens(i)/awdens(i)) / & 3245 !! max(smallestreal,(2.*3.14*awdens(i)*arad_wk(i))) 3246 !! d_irad(i) = d_irad(i)*dtimesub 3247 !! d_arad(i) = d_arad(i)*dtimesub 3248 !! call iophys_ecrit('d_irad',1,'d_irad','m',d_irad) 3249 !! call iophys_ecrit('d_airad',1,'d_arad','m',d_arad) 3250 !! 3251 ENDIF 3252 ENDDO 3253 3254 IF (prt_level >= 10) THEN 3255 print *,'wake, cstar(1), cstar(1)/cstart, rad_wk(1), tau_wk_inv(1), gfl(1) ', & 3256 cstar(1), cstar(1)/cstart, rad_wk(1), tau_wk_inv(1), gfl(1) 3257 print *,'wake, wdens(1), awdens(1), d_awdens(1) ', & 3258 wdens(1), awdens(1), d_awdens(1) 3259 print *,'wake, d_sig_gen(1), d_sig_death(1), d_sig_col(1), d_sigmaw(1) ', & 3260 d_sig_gen(1), d_sig_death(1), d_sig_col(1), d_sigmaw(1) 3261 ENDIF 3262 sigmaw=sigmaw+d_sigmaw 3263 asigmaw=asigmaw+d_asigmaw 3264 wdens=wdens+d_wdens 3265 awdens=awdens+d_awdens 3266 3267 RETURN 3268 END SUBROUTINE wake_popdyn_3 3269 2689 3270 END MODULE lmdz_wake -
LMDZ6/trunk/libf/phylmd/lmdz_wake_ini.F90
r4695 r4744 1 1 MODULE lmdz_wake_ini 2 2 IMPLICIT NONE 3 4 3 5 4 ! ============================================================================ … … 23 22 !jyg< 24 23 !! REAL, SAVE :: stark, wdens_ref, coefgw, alpk 25 INTEGER, SAVE, PROTECTED 26 REAL, SAVE, PROTECTED, DIMENSION(2) 27 REAL, SAVE, PROTECTED 24 INTEGER, SAVE, PROTECTED :: prt_level 25 REAL, SAVE, PROTECTED, DIMENSION(2) :: wdens_ref 26 REAL, SAVE, PROTECTED :: stark, coefgw, alpk, wk_pupper 28 27 !>jyg 29 REAL, SAVE, PROTECTED 28 REAL, SAVE, PROTECTED :: crep_upper, crep_sol 30 29 !$OMP THREADPRIVATE(stark, wdens_ref, coefgw, alpk, wk_pupper, crep_upper, crep_sol) 31 30 32 REAL, SAVE, PROTECTED 31 REAL, SAVE, PROTECTED :: tau_cv 33 32 !$OMP THREADPRIVATE(tau_cv) 34 REAL, SAVE, PROTECTED 33 REAL, SAVE, PROTECTED :: rzero, aa0 ! minimal wake radius and area 35 34 !$OMP THREADPRIVATE(rzero, aa0) 36 35 37 LOGICAL, SAVE, PROTECTED 36 LOGICAL, SAVE, PROTECTED :: ok_bug_gfl 38 37 !$OMP THREADPRIVATE(ok_bug_gfl) 39 LOGICAL, SAVE, PROTECTED 38 LOGICAL, SAVE, PROTECTED :: flag_wk_check_trgl 40 39 !$OMP THREADPRIVATE(flag_wk_check_trgl) 41 INTEGER, SAVE, PROTECTED 40 INTEGER, SAVE, PROTECTED :: iflag_wk_act 42 41 !$OMP THREADPRIVATE(iflag_wk_act) 43 42 44 INTEGER, SAVE, PROTECTED 43 INTEGER, SAVE, PROTECTED :: iflag_wk_check_trgl 45 44 !$OMP THREADPRIVATE(iflag_wk_check_trgl) 46 INTEGER, SAVE, PROTECTED 45 INTEGER, SAVE, PROTECTED :: iflag_wk_pop_dyn 47 46 !$OMP THREADPRIVATE(iflag_wk_pop_dyn) 48 47 49 INTEGER, SAVE, PROTECTED 48 INTEGER, SAVE, PROTECTED :: iflag_wk_profile 50 49 !$OMP THREADPRIVATE(iflag_wk_profile) 51 50 52 REAL, SAVE, PROTECTED :: wdensmin 53 !$OMP THREADPRIVATE(wdensmin) 54 REAL, SAVE, PROTECTED :: sigmad, hwmin, wapecut, cstart 51 REAL, SAVE, PROTECTED :: wdensinit ! Minimum wake density used to restart wakes from a wake-free state 52 !$OMP THREADPRIVATE(wdensinit) 53 REAL, SAVE, PROTECTED :: wdensthreshold ! Threshold wake density below which wakes are killed 54 !$OMP THREADPRIVATE(wdensthreshold) 55 REAL, SAVE, PROTECTED :: sigmad, hwmin, wapecut, cstart 55 56 !$OMP THREADPRIVATE(sigmad, hwmin, wapecut, cstart) 56 REAL, SAVE, PROTECTED 57 REAL, SAVE, PROTECTED :: sigmaw_max 57 58 !$OMP THREADPRIVATE(sigmaw_max) 58 REAL, SAVE, PROTECTED 59 REAL, SAVE, PROTECTED :: dens_rate 59 60 !$OMP THREADPRIVATE(dens_rate) 60 REAL, SAVE, PROTECTED 61 REAL, SAVE, PROTECTED :: epsilon_loc 61 62 !$OMP THREADPRIVATE(epsilon_loc) 62 REAL, SAVE, PROTECTED 63 REAL, SAVE, PROTECTED :: epsim1,RG,RD 63 64 !$OMP THREADPRIVATE(epsim1,RG,RD) 65 REAL, SAVE, PROTECTED ::smallestreal 66 !$OMP THREADPRIVATE(smallestreal) 64 67 65 68 … … 89 92 real, intent(in) :: rg_in,rd_in,rv_in 90 93 94 smallestreal=tiny(smallestreal) 95 ! 91 96 prt_level=prt_lev 92 97 epsilon_loc=1.E-15 93 98 wapecut=1. ! previously 5. 99 ! 100 rzero = 5000. 101 CALL getin_p('rzero_wk', rzero) 102 aa0 = 3.14*rzero*rzero 103 ! 94 104 ! Essais d'initialisation avec sigmaw = 0.02 et hw = 10. 105 !! sigmad=0.005 95 106 sigmad=0.02 107 CALL getin_p('sigmad', sigmad) 96 108 hwmin=10. 97 !! DATA wdensmin/1.e-12/ 98 wdensmin=1.e-14 109 ! 110 !!wdensthreshold=1.e-12 111 wdensthreshold=1.e-14 112 wdensthreshold=2.e-14 113 CALL getin_p('wdensthreshold', wdensthreshold) 114 ! 115 IF (sigmad < 0.) THEN 116 sigmad = abs(sigmad) 117 !! wdensmin=sigmad/(3.14*rzero**2) 118 wdensinit=sigmad/(3.14*rzero**2) 119 ELSE 120 wdensinit = wdensthreshold/2. 121 ENDIF 122 ! 123 ! 99 124 ! cc nrlmd 100 125 sigmaw_max=0.4 … … 187 212 CALL getin_p('iflag_wk_profile',iflag_wk_profile) ! switch between wdens prescribed 188 213 ! and wdens prognostic 189 rzero = 5000.190 CALL getin_p('rzero_wk', rzero)191 aa0 = 3.14*rzero*rzero192 !193 214 tau_cv = 4000. 194 215 CALL getin_p('tau_cv', tau_cv) … … 223 244 END SUBROUTINE wake_ini 224 245 246 247 225 248 END MODULE lmdz_wake_ini -
LMDZ6/trunk/libf/phylmd/phyetat0_mod.F90
r4619 r4744 25 25 solsw, solswfdiff, t_ancien, u_ancien, v_ancien, w01, wake_cstar, wake_deltaq, & 26 26 wake_deltat, wake_delta_pbl_TKE, delta_tsurf, beta_aridity, wake_fip, wake_pe, & 27 wake_s, wake_dens, awake_dens, cv_gen, zgam, zmax0, zmea, zpic, zsig, &27 wake_s, awake_s, wake_dens, awake_dens, cv_gen, zgam, zmax0, zmea, zpic, zsig, & 28 28 zstd, zthe, zval, ale_bl, ale_bl_trig, alp_bl, u10m, v10m, treedrg, & 29 29 ale_wake, ale_bl_stat, ds_ns, dt_ns, delta_sst, delta_sal, dter, dser, & … … 468 468 found=phyetat0_get(wake_deltaq,"WAKE_DELTAQ","Delta hum. wake/env",0.) 469 469 found=phyetat0_get(wake_s,"WAKE_S","Wake frac. area",0.) 470 found=phyetat0_get(awake_s,"AWAKE_S","Active Wake frac. area",0.) 470 471 !jyg< 471 472 ! Set wake_dens to -1000. when there is no restart so that the actual -
LMDZ6/trunk/libf/phylmd/phyredem.F90
r4613 r4744 22 22 v_ancien, clwcon, rnebcon, ratqs, pbl_tke, & 23 23 wake_delta_pbl_tke, zmax0, f0, sig1, w01, & 24 wake_deltat, wake_deltaq, wake_s, wake_dens,&25 awake_dens, cv_gen,&24 wake_deltat, wake_deltaq, wake_s, awake_s, & 25 wake_dens, awake_dens, cv_gen, & 26 26 wake_cstar, & 27 27 wake_pe, wake_fip, fm_therm, entr_therm, & … … 301 301 302 302 CALL put_field(pass,"WAKE_S", "Wake frac. area", wake_s) 303 304 CALL put_field(pass,"AWAKE_S", "Active Wake frac. area", awake_s) 303 305 304 306 CALL put_field(pass,"WAKE_DENS", "Wake num. /unit area", wake_dens) -
LMDZ6/trunk/libf/phylmd/phys_local_var_mod.F90
r4742 r4744 292 292 REAL, SAVE, ALLOCATABLE,DIMENSION(:,:) :: d_deltat_wk, d_deltaq_wk 293 293 !$OMP THREADPRIVATE(d_deltat_wk, d_deltaq_wk) 294 REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: d_s_wk, d_ dens_a_wk, d_dens_wk295 !$OMP THREADPRIVATE(d_s_wk, d_ dens_a_wk, d_dens_wk)294 REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: d_s_wk, d_s_a_wk, d_dens_wk, d_dens_a_wk 295 !$OMP THREADPRIVATE(d_s_wk, d_s_a_wk, d_dens_wk, d_dens_a_wk) 296 296 REAL, SAVE, ALLOCATABLE,DIMENSION(:,:) :: d_deltat_wk_gw, d_deltaq_wk_gw 297 297 !$OMP THREADPRIVATE(d_deltat_wk_gw, d_deltaq_wk_gw) … … 777 777 ALLOCATE(wake_omg(klon, klev)) 778 778 ALLOCATE(d_deltat_wk(klon, klev), d_deltaq_wk(klon, klev)) 779 ALLOCATE(d_s_wk(klon), d_ dens_a_wk(klon), d_dens_wk(klon))779 ALLOCATE(d_s_wk(klon), d_s_a_wk(klon), d_dens_wk(klon), d_dens_a_wk(klon)) 780 780 ALLOCATE(d_deltat_wk_gw(klon, klev), d_deltaq_wk_gw(klon, klev)) 781 781 ALLOCATE(d_deltat_vdf(klon, klev), d_deltaq_vdf(klon, klev)) … … 1106 1106 DEALLOCATE(wake_omg) 1107 1107 DEALLOCATE(d_deltat_wk, d_deltaq_wk) 1108 DEALLOCATE(d_s_wk, d_ dens_a_wk, d_dens_wk)1108 DEALLOCATE(d_s_wk, d_s_a_wk, d_dens_wk, d_dens_a_wk) 1109 1109 DEALLOCATE(d_deltat_wk_gw, d_deltaq_wk_gw) 1110 1110 DEALLOCATE(d_deltat_vdf, d_deltaq_vdf) -
LMDZ6/trunk/libf/phylmd/phys_state_var_mod.F90
r4677 r4744 263 263 ! wake_deltaq : ecart d'humidite avec la zone non perturbee 264 264 ! wake_s : fraction surfacique occupee par la poche froide 265 ! awake_s : surface fraction covered by active wakes 266 ! wake_dens : number of wakes per unit area 265 267 ! awake_dens : number of active wakes per unit area 266 ! wake_dens : number of wakes per unit area267 268 ! cv_gen : birth rate of cumulonimbus per unit area. 268 269 ! wake_occ : occurence of wakes (= 1 if wakes occur, =0 otherwise) … … 278 279 !$OMP THREADPRIVATE(wake_deltaxt) 279 280 #endif 280 REAL,ALLOCATABLE,SAVE :: wake_s(:) 281 !$OMP THREADPRIVATE(wake_s )282 REAL,ALLOCATABLE,SAVE :: awake_dens(:),wake_dens(:)283 !$OMP THREADPRIVATE( awake_dens,wake_dens)281 REAL,ALLOCATABLE,SAVE :: wake_s(:), awake_s(:) 282 !$OMP THREADPRIVATE(wake_s, awake_s) 283 REAL,ALLOCATABLE,SAVE :: wake_dens(:), awake_dens(:) 284 !$OMP THREADPRIVATE(wake_dens, awake_dens) 284 285 REAL,ALLOCATABLE,SAVE :: cv_gen(:) 285 286 !$OMP THREADPRIVATE(cv_gen) … … 670 671 ALLOCATE(wght_th(klon,klev)) 671 672 ALLOCATE(wake_deltat(klon,klev), wake_deltaq(klon,klev)) 672 ALLOCATE(wake_s(klon), awake_ dens(klon),wake_dens(klon))673 ALLOCATE(wake_s(klon), awake_s(klon), wake_dens(klon), awake_dens(klon)) 673 674 !! awake_dens = 0. ! initialized in phyetat0 674 675 ALLOCATE(cv_gen(klon)) … … 864 865 DEALLOCATE(lalim_conv, wght_th) 865 866 DEALLOCATE(wake_deltat, wake_deltaq) 866 DEALLOCATE(wake_s, awake_ dens,wake_dens)867 DEALLOCATE(wake_s, awake_s, wake_dens, awake_dens) 867 868 DEALLOCATE(cv_gen) 868 869 DEALLOCATE(wake_Cstar, wake_pe, wake_fip) -
LMDZ6/trunk/libf/phylmd/physiq_mod.F90
r4742 r4744 292 292 d_deltat_ajs_cv, d_deltaq_ajs_cv, & ! due to dry adjustment of (w) before convection 293 293 ! tendencies of wake fractional area and wake number per unit area: 294 d_s_wk, d_dens_a_wk, d_dens_wk, & ! due to wakes294 d_s_wk, d_s_a_wk, d_dens_wk, d_dens_a_wk, & ! due to wakes 295 295 !!! d_s_vdf, d_dens_a_vdf, d_dens_vdf, & ! due to vertical diffusion 296 296 !!! d_s_the, d_dens_a_the, d_dens_the, & ! due to thermals … … 2020 2020 d_deltaq_ajs_cv(:,:) = 0. 2021 2021 d_s_wk(:) = 0. 2022 d_s_a_wk(:) = 0. 2022 2023 d_dens_wk(:) = 0. 2024 d_dens_a_wk(:) = 0. 2023 2025 ENDIF ! (iflag_wake>=1) 2024 2026 … … 2894 2896 d_deltaq_vdf(:,:) = d_q_vdf_w(:,:)-d_q_vdf_x(:,:) 2895 2897 CALL add_wake_tend & 2896 (d_deltat_vdf, d_deltaq_vdf, dsig0, d dens0, ddens0, wkoccur1, 'vdf', abortphy)2898 (d_deltat_vdf, d_deltaq_vdf, dsig0, dsig0, ddens0, ddens0, wkoccur1, 'vdf', abortphy) 2897 2899 ELSE 2898 2900 d_deltat_vdf(:,:) = 0. … … 3156 3158 IF (iflag_adjwk == 2 .AND. OK_bug_ajs_cv) THEN 3157 3159 CALL add_wake_tend & 3158 (d_deltat_ajs_cv, d_deltaq_ajs_cv, dsig0, d dens0, ddens0, wkoccur1, 'ajs_cv', abortphy)3160 (d_deltat_ajs_cv, d_deltaq_ajs_cv, dsig0, dsig0, ddens0, ddens0, wkoccur1, 'ajs_cv', abortphy) 3159 3161 ENDIF ! (iflag_adjwk == 2 .AND. OK_bug_ajs_cv) 3160 3162 ENDIF ! (iflag_adjwk >= 1) … … 3531 3533 dt_a, dq_a, cv_gen, & 3532 3534 sigd, cin, & 3533 wake_deltat, wake_deltaq, wake_s, awake_ dens,wake_dens, &3535 wake_deltat, wake_deltaq, wake_s, awake_s, wake_dens, awake_dens, & 3534 3536 wake_dth, wake_h, & 3535 3537 !! wake_pe, wake_fip, wake_gfl, & … … 3541 3543 wake_omg, wake_dp_deltomg, & 3542 3544 wake_spread, wake_Cstar, d_deltat_wk_gw, & 3543 d_deltat_wk, d_deltaq_wk, d_s_wk, d_ dens_a_wk, d_dens_wk)3545 d_deltat_wk, d_deltaq_wk, d_s_wk, d_s_a_wk, d_dens_wk, d_dens_a_wk) 3544 3546 ! 3545 3547 !jyg Reinitialize itapwk when wakes have been called … … 3560 3562 3561 3563 CALL add_wake_tend & 3562 (d_deltat_wk, d_deltaq_wk, d_s_wk, d_ dens_a_wk, d_dens_wk, wake_k, &3564 (d_deltat_wk, d_deltaq_wk, d_s_wk, d_s_a_wk, d_dens_wk, d_dens_a_wk, wake_k, & 3563 3565 'wake', abortphy) 3564 3566 CALL prt_enerbil('wake',itap) … … 3737 3739 IF (ok_bug_split_th) THEN 3738 3740 CALL add_wake_tend & 3739 (d_deltat_the, d_deltaq_the, dsig0, d dens0, ddens0, wkoccur1, 'the', abortphy)3741 (d_deltat_the, d_deltaq_the, dsig0, dsig0, ddens0, ddens0, wkoccur1, 'the', abortphy) 3740 3742 ELSE 3741 3743 CALL add_wake_tend & 3742 (d_deltat_the, d_deltaq_the, dsig0, d dens0, ddens0, wake_k, 'the', abortphy)3744 (d_deltat_the, d_deltaq_the, dsig0, dsig0, ddens0, ddens0, wake_k, 'the', abortphy) 3743 3745 ENDIF 3744 3746 CALL prt_enerbil('the',itap)
Note: See TracChangeset
for help on using the changeset viewer.