Changeset 2730 for LMDZ5/trunk
- Timestamp:
- Dec 14, 2016, 1:10:32 PM (8 years ago)
- Location:
- LMDZ5/trunk/libf/phylmd
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ5/trunk/libf/phylmd/alpale_th.F90
r2558 r2730 38 38 REAL, DIMENSION(klon), INTENT(INOUT) :: alp_bl 39 39 REAL, DIMENSION(klon), INTENT(INOUT) :: alp_bl_stat 40 41 REAL, DIMENSION(klon), INTENT(OUT) :: proba_notrig, random_notrig 40 REAL, DIMENSION(klon), INTENT(INOUT) :: proba_notrig 41 42 REAL, DIMENSION(klon), INTENT(OUT) :: random_notrig 42 43 43 44 include "thermcell.h" … … 73 74 !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 74 75 ! 76 !! 77 !! The following 3 lines should be commented if one wants to activate the 78 !! multiplication of no-trigger probabilities between calls to the convection 79 !! scheme. 80 !! 81 do i=1,klon 82 proba_notrig(i)=1. 83 enddo 84 !! 85 !! 75 86 !--------------------------------------- 76 87 IF (iflag_clos_bl .LT. 3) THEN … … 97 108 !----Initialisations 98 109 do i=1,klon 99 proba_notrig(i)=1.110 !!jyg proba_notrig(i)=1. 100 111 random_notrig(i)=1e6*ale_bl_stat(i)-int(1e6*ale_bl_stat(i)) 101 112 if ( random_notrig(i) > random_notrig_max ) random_notrig(i)=0. … … 120 131 do i=1,klon 121 132 if ( (ale_bl_stat(i) .gt. abs(cin(i))+1.e-10) ) then 122 proba_notrig(i)= (1.-exp(-s_trig/s2(i)))** &123 133 proba_notrig(i)=proba_notrig(i)* & 134 (1.-exp(-s_trig/s2(i)))**(n2(i)*dtime/tau_trig(i)) 124 135 ! print *, 'proba_notrig(i) ',proba_notrig(i) 125 136 if (random_notrig(i) .ge. proba_notrig(i)) then … … 129 140 endif 130 141 else 131 proba_notrig(i)=1.142 !!jyg proba_notrig(i)=1. 132 143 random_notrig(i)=0. 133 144 ale_bl_trig(i)=0. … … 139 150 do i=1,klon 140 151 if ( (Ale_bl(i) .gt. abs(cin(i))+1.e-10) ) then 141 proba_notrig(i)= (1.-exp(-s_trig/s2(i)))** &142 152 proba_notrig(i)=proba_notrig(i)* & 153 (1.-exp(-s_trig/s2(i)))**(n2(i)*dtime/tau_trig(i)) 143 154 ! print *, 'proba_notrig(i) ',proba_notrig(i) 144 155 if (random_notrig(i) .ge. proba_notrig(i)) then … … 148 159 endif 149 160 else 150 proba_notrig(i)=1.161 !!jyg proba_notrig(i)=1. 151 162 random_notrig(i)=0. 152 163 ale_bl_trig(i)=0. … … 223 234 !----Initializations and random number generation 224 235 do i=1,klon 225 proba_notrig(i)=1.236 !!jyg proba_notrig(i)=1. 226 237 random_notrig(i)=1e6*ale_bl_stat(i)-int(1e6*ale_bl_stat(i)) 227 238 if ( ale_bl_trig(i) .lt. abs(cin(i))+1.e-10 ) then … … 244 255 birth_number = n2(i)*exp(-s_trig/s2(i)) 245 256 birth_rate(i) = birth_number/(tau_trig(i)*cell_area(i)) 246 proba_notrig(i)= exp(-birth_number*dtime/tau_trig(i))257 proba_notrig(i)=proba_notrig(i)*exp(-birth_number*dtime/tau_trig(i)) 247 258 Alp_bl(i) = Alp_bl(i)* & 248 259 umexp(-birth_number*cv_feed_area/cell_area(i))/ & … … 250 261 tau_trig(i)*cv_feed_area/(dtime*cell_area(i)) 251 262 else 252 proba_notrig(i)=1.263 !!jyg proba_notrig(i)=1. 253 264 random_notrig(i)=0. 254 265 alp_bl(i)=0. -
LMDZ5/trunk/libf/phylmd/clesphys.h
r2707 r2730 13 13 LOGICAL ok_limitvrai 14 14 LOGICAL ok_all_xml 15 INTEGER nbapp_rad, iflag_con, nbapp_cv, iflag_ener_conserv15 INTEGER nbapp_rad, iflag_con, nbapp_cv, nbapp_wk, iflag_ener_conserv 16 16 REAL co2_ppm, co2_ppm0, solaire 17 17 LOGICAL ok_suntime_rrtm … … 114 114 & , cycle_diurne, soil_model, new_oliq & 115 115 & , ok_orodr, ok_orolf, ok_limitvrai, nbapp_rad & 116 & , iflag_con, nbapp_cv 116 & , iflag_con, nbapp_cv, nbapp_wk & 117 117 & , iflag_ener_conserv & 118 118 & , ok_4xCO2atm & -
LMDZ5/trunk/libf/phylmd/conf_phys_m.F90
r2714 r2730 207 207 LOGICAL,SAVE :: ok_orodr_omp, ok_orolf_omp, ok_limitvrai_omp 208 208 INTEGER, SAVE :: nbapp_rad_omp, iflag_con_omp 209 INTEGER, SAVE :: nbapp_cv_omp 209 INTEGER, SAVE :: nbapp_cv_omp, nbapp_wk_omp 210 210 INTEGER, SAVE :: iflag_ener_conserv_omp 211 211 LOGICAL, SAVE :: ok_conserv_q_omp … … 789 789 nbapp_cv_omp = 0 790 790 CALL getin('nbapp_cv',nbapp_cv_omp) 791 792 !Config Key = nbapp_wk 793 !Config Desc = Frequence d'appel aux wakes 794 !Config Def = 0 795 !Config Help = Nombre d'appels des routines de wakes 796 !Config par jour. Si =0, appel a chaque pas de temps physique. 797 nbapp_wk_omp = 0 798 CALL getin('nbapp_wk',nbapp_wk_omp) 791 799 792 800 !Config Key = iflag_ener_conserv … … 2066 2074 iflag_con = iflag_con_omp 2067 2075 nbapp_cv = nbapp_cv_omp 2076 nbapp_wk = nbapp_wk_omp 2068 2077 iflag_ener_conserv = iflag_ener_conserv_omp 2069 2078 ok_conserv_q = ok_conserv_q_omp … … 2400 2409 write(lunout,*)'iflag_con=',iflag_con 2401 2410 write(lunout,*)'nbapp_cv=',nbapp_cv 2411 write(lunout,*)'nbapp_wk=',nbapp_wk 2402 2412 write(lunout,*)'iflag_ener_conserv=',iflag_ener_conserv 2403 2413 write(lunout,*)'ok_conserv_q=',ok_conserv_q -
LMDZ5/trunk/libf/phylmd/phys_state_var_mod.F90
r2707 r2730 18 18 INTEGER, SAVE :: radpas 19 19 INTEGER, SAVE :: cvpas 20 INTEGER, SAVE :: wkpas 20 21 REAL, PARAMETER :: missing_val_nf90=nf90_fill_real 21 22 !$OMP THREADPRIVATE(radpas) 22 23 !$OMP THREADPRIVATE(cvpas) 24 !$OMP THREADPRIVATE(wkpas) 23 25 REAL, SAVE :: dtime, solaire_etat0 24 26 !$OMP THREADPRIVATE(dtime, solaire_etat0) -
LMDZ5/trunk/libf/phylmd/physiq_mod.F90
r2714 r2730 139 139 kh, kh_x, kh_w, & 140 140 ! 141 wake_k, & 141 142 ale_wake, alp_wake, & 142 143 wake_h, wake_omg, & … … 564 565 !pourquoi y'a pas de save?? 565 566 ! 566 INTEGER wake_k(klon) ! Wake sommet 567 !!! INTEGER, SAVE, DIMENSION(klon) :: wake_k 568 !!! !$OMP THREADPRIVATE(wake_k) 567 569 ! 568 570 !jyg< … … 782 784 !ym SAVE 783 785 ! 784 INTEGER itapcv 785 SAVE itapcv 786 !$OMP THREADPRIVATE(itapcv )786 INTEGER itapcv, itapwk 787 SAVE itapcv, itapwk 788 !$OMP THREADPRIVATE(itapcv, itapwk) 787 789 788 790 !KE43 … … 1285 1287 itaprad = 0 1286 1288 itapcv = 0 1289 itapwk = 0 1287 1290 1288 1291 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! … … 1313 1316 ENDIF 1314 1317 IF (nbapp_cv .EQ. 0) nbapp_cv=86400./dtime 1315 print *,'physiq, nbapp_cv ',nbapp_cv 1318 IF (nbapp_wk .EQ. 0) nbapp_wk=86400./dtime 1319 print *,'physiq, nbapp_cv, nbapp_wk ',nbapp_cv,nbapp_wk 1316 1320 IF (MOD(INT(86400./dtime),nbapp_cv).EQ.0) THEN 1317 1321 cvpas = NINT( 86400./dtime/nbapp_cv) … … 1324 1328 abort_message='nbre de pas de temps physique n est pas multiple ' & 1325 1329 // 'de nbapp_cv' 1330 call abort_physic(modname,abort_message,1) 1331 ENDIF 1332 IF (MOD(INT(86400./dtime),nbapp_wk).EQ.0) THEN 1333 wkpas = NINT( 86400./dtime/nbapp_wk) 1334 print *,'physiq, wkpas ',wkpas 1335 ELSE 1336 WRITE(lunout,*) 'le nombre de pas de temps physique doit etre un ', & 1337 'multiple de nbapp_wk' 1338 WRITE(lunout,*) 'changer nbapp_wk ou alors commenter ce test ', & 1339 'mais 1+1<>2' 1340 abort_message='nbre de pas de temps physique n est pas multiple ' & 1341 // 'de nbapp_wk' 1326 1342 call abort_physic(modname,abort_message,1) 1327 1343 ENDIF … … 2317 2333 IF (prt_level.ge.1) write(lunout,*) 'omega(igout, :) = ', & 2318 2334 omega(igout, :) 2319 2320 2335 ! 2321 2336 ! Appel de la convection tous les "cvpas" … … 2574 2589 ! . d_u_con, d_v_con) 2575 2590 2591 !jyg Reinitialize proba_notrig and itapcv when convection has been called 2592 proba_notrig(:) = 1. 2576 2593 itapcv = 0 2577 2594 ENDIF ! (MOD(itapcv,cvpas).EQ.0) 2595 ! 2578 2596 itapcv = itapcv+1 2579 2597 … … 2640 2658 IF (iflag_wake>=1) THEN 2641 2659 ! 2642 ! Call wakes only when convection has been called 2643 IF (itapcv .EQ. 1) THEN 2644 ! 2645 DO k=1,klev 2646 DO i=1,klon 2647 dt_dwn(i,k) = ftd(i,k) 2648 dq_dwn(i,k) = fqd(i,k) 2649 M_dwn(i,k) = dnwd0(i,k) 2650 M_up(i,k) = upwd(i,k) 2651 dt_a(i,k) = d_t_con(i,k)/dtime - ftd(i,k) 2652 dq_a(i,k) = d_q_con(i,k)/dtime - fqd(i,k) 2653 ENDDO 2654 ENDDO 2655 2656 IF (iflag_wake==2) THEN 2657 ok_wk_lsp(:)=max(sign(1.,wake_s(:)-wake_s_min_lsp),0.) 2658 DO k = 1,klev 2659 dt_dwn(:,k)= dt_dwn(:,k)+ & 2660 ok_wk_lsp(:)*(d_t_eva(:,k)+d_t_lsc(:,k))/dtime 2661 dq_dwn(:,k)= dq_dwn(:,k)+ & 2662 ok_wk_lsp(:)*(d_q_eva(:,k)+d_q_lsc(:,k))/dtime 2663 ENDDO 2664 ELSEIF (iflag_wake==3) THEN 2665 ok_wk_lsp(:)=max(sign(1.,wake_s(:)-wake_s_min_lsp),0.) 2666 DO k = 1,klev 2660 ! 2661 ! Call wakes every "wkpas" step 2662 ! 2663 IF (MOD(itapwk,wkpas).EQ.0) THEN 2664 ! 2665 DO k=1,klev 2667 2666 DO i=1,klon 2668 IF (rneb(i,k)==0.) THEN 2669 ! On ne tient compte des tendances qu'en dehors des 2670 ! nuages (c'est-\`a-dire a priri dans une region ou 2671 ! l'eau se reevapore). 2672 dt_dwn(i,k)= dt_dwn(i,k)+ & 2673 ok_wk_lsp(i)*d_t_lsc(i,k)/dtime 2674 dq_dwn(i,k)= dq_dwn(i,k)+ & 2675 ok_wk_lsp(i)*d_q_lsc(i,k)/dtime 2676 ENDIF 2667 dt_dwn(i,k) = ftd(i,k) 2668 dq_dwn(i,k) = fqd(i,k) 2669 M_dwn(i,k) = dnwd0(i,k) 2670 M_up(i,k) = upwd(i,k) 2671 dt_a(i,k) = d_t_con(i,k)/dtime - ftd(i,k) 2672 dq_a(i,k) = d_q_con(i,k)/dtime - fqd(i,k) 2677 2673 ENDDO 2678 2674 ENDDO 2679 ENDIF 2680 2681 ! 2682 !calcul caracteristiques de la poche froide 2683 CALL calWAKE (iflag_wake_tend, paprs, pplay, dtime, & 2684 t_seri, q_seri, omega, & 2685 dt_dwn, dq_dwn, M_dwn, M_up, & 2686 dt_a, dq_a, & 2687 sigd, & 2688 wake_deltat, wake_deltaq, wake_s, wake_dens, & 2689 wake_dth, wake_h, & 2690 wake_pe, wake_fip, wake_gfl, & 2691 d_t_wake, d_q_wake, & 2692 wake_k, t_x, q_x, & 2693 wake_omgbdth, wake_dp_omgb, & 2694 wake_dtKE, wake_dqKE, & 2695 wake_omg, wake_dp_deltomg, & 2696 wake_spread, wake_Cstar, d_deltat_wk_gw, & 2697 d_deltat_wk, d_deltaq_wk, d_s_wk, d_dens_wk) 2698 ! 2699 ENDIF ! (mod(itapcv,cvpas) .EQ. 1) 2675 2676 IF (iflag_wake==2) THEN 2677 ok_wk_lsp(:)=max(sign(1.,wake_s(:)-wake_s_min_lsp),0.) 2678 DO k = 1,klev 2679 dt_dwn(:,k)= dt_dwn(:,k)+ & 2680 ok_wk_lsp(:)*(d_t_eva(:,k)+d_t_lsc(:,k))/dtime 2681 dq_dwn(:,k)= dq_dwn(:,k)+ & 2682 ok_wk_lsp(:)*(d_q_eva(:,k)+d_q_lsc(:,k))/dtime 2683 ENDDO 2684 ELSEIF (iflag_wake==3) THEN 2685 ok_wk_lsp(:)=max(sign(1.,wake_s(:)-wake_s_min_lsp),0.) 2686 DO k = 1,klev 2687 DO i=1,klon 2688 IF (rneb(i,k)==0.) THEN 2689 ! On ne tient compte des tendances qu'en dehors des 2690 ! nuages (c'est-\`a-dire a priri dans une region ou 2691 ! l'eau se reevapore). 2692 dt_dwn(i,k)= dt_dwn(i,k)+ & 2693 ok_wk_lsp(i)*d_t_lsc(i,k)/dtime 2694 dq_dwn(i,k)= dq_dwn(i,k)+ & 2695 ok_wk_lsp(i)*d_q_lsc(i,k)/dtime 2696 ENDIF 2697 ENDDO 2698 ENDDO 2699 ENDIF 2700 2701 ! 2702 !calcul caracteristiques de la poche froide 2703 CALL calWAKE (iflag_wake_tend, paprs, pplay, dtime, & 2704 t_seri, q_seri, omega, & 2705 dt_dwn, dq_dwn, M_dwn, M_up, & 2706 dt_a, dq_a, & 2707 sigd, & 2708 wake_deltat, wake_deltaq, wake_s, wake_dens, & 2709 wake_dth, wake_h, & 2710 wake_pe, wake_fip, wake_gfl, & 2711 d_t_wake, d_q_wake, & 2712 wake_k, t_x, q_x, & 2713 wake_omgbdth, wake_dp_omgb, & 2714 wake_dtKE, wake_dqKE, & 2715 wake_omg, wake_dp_deltomg, & 2716 wake_spread, wake_Cstar, d_deltat_wk_gw, & 2717 d_deltat_wk, d_deltaq_wk, d_s_wk, d_dens_wk) 2718 ! 2719 !jyg Reinitialize itapwk when wakes have been called 2720 itapwk = 0 2721 ENDIF ! (MOD(itapwk,wkpas).EQ.0) 2722 ! 2723 itapwk = itapwk+1 2700 2724 ! 2701 2725 !----------------------------------------------------------------------- … … 2705 2729 !------------------------------------------------------------------------ 2706 2730 2707 !Increment Wake state variables2731 ! Increment Wake state variables 2708 2732 IF (iflag_wake_tend .GT. 0.) THEN 2709 2733
Note: See TracChangeset
for help on using the changeset viewer.