- Timestamp:
- Jul 23, 2012, 1:11:05 PM (12 years ago)
- Location:
- LMDZ5/trunk/libf/phylmd
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ5/trunk/libf/phylmd/calltherm.F90
r1517 r1638 8 8 & ,fm_therm,entr_therm,detr_therm,zqasc,clwcon0,lmax,ratqscth, & 9 9 & ratqsdiff,zqsatth,Ale_bl,Alp_bl,lalim_conv,wght_th, & 10 & zmax0,f0,zw2,fraca,ztv,zpspsk,ztla,zthl) 10 & zmax0,f0,zw2,fraca,ztv,zpspsk,ztla,zthl & 11 !!! nrlmd le 10/04/2012 12 & ,pbl_tke,pctsrf,omega,airephy & 13 & ,zlcl_th,fraca0,w0,w_conv,therm_tke_max0,env_tke_max0 & 14 & ,n2,s2,ale_bl_stat & 15 & ,therm_tke_max,env_tke_max & 16 & ,alp_bl_det,alp_bl_fluct_m,alp_bl_fluct_tke & 17 & ,alp_bl_conv,alp_bl_stat & 18 !!! fin nrlmd le 10/04/2012 19 & ) 11 20 12 21 USE dimphy … … 16 25 #include "thermcell.h" 17 26 #include "iniprint.h" 27 28 !!! nrlmd le 10/04/2012 29 #include "indicesol.h" 30 !!! fin nrlmd le 10/04/2012 18 31 19 32 !IM 140508 … … 75 88 !on garde le zmax du pas de temps precedent 76 89 real zmax0(klon), f0(klon) 90 91 !!! nrlmd le 10/04/2012 92 real pbl_tke(klon,klev+1,nbsrf) 93 real pctsrf(klon,nbsrf) 94 real omega(klon,klev) 95 real airephy(klon) 96 real zlcl_th(klon),fraca0(klon),w0(klon),w_conv(klon) 97 real therm_tke_max0(klon),env_tke_max0(klon) 98 real n2(klon),s2(klon) 99 real ale_bl_stat(klon) 100 real therm_tke_max(klon,klev),env_tke_max(klon,klev) 101 real alp_bl_det(klon),alp_bl_fluct_m(klon),alp_bl_fluct_tke(klon),alp_bl_conv(klon),alp_bl_stat(klon) 102 !!! fin nrlmd le 10/04/2012 103 77 104 !******************************************************** 78 105 … … 220 247 & ,Ale,Alp,lalim_conv,wght_th & 221 248 & ,zmax0,f0,zw2,fraca,ztv,zpspsk & 222 & ,ztla,zthl) 249 & ,ztla,zthl & 250 !!! nrlmd le 10/04/2012 251 & ,pbl_tke,pctsrf,omega,airephy & 252 & ,zlcl_th,fraca0,w0,w_conv,therm_tke_max0,env_tke_max0 & 253 & ,n2,s2,ale_bl_stat & 254 & ,therm_tke_max,env_tke_max & 255 & ,alp_bl_det,alp_bl_fluct_m,alp_bl_fluct_tke & 256 & ,alp_bl_conv,alp_bl_stat & 257 !!! fin nrlmd le 10/04/2012 258 & ) 223 259 if (prt_level.gt.10) write(lunout,*)'Apres thermcell_main OK' 224 260 else … … 227 263 endif 228 264 229 flag_bidouille_stratocu=iflag_thermals.eq.14.or.iflag_thermals.eq.16 265 ! Attention : les noms sont contre intuitif. 266 ! flag_bidouille_stratocu est .true. si on ne fait pas de bidouille. 267 ! Il aurait mieux valu avoir un nobidouille_stratocu 268 ! Et pour simplifier : 269 ! nobidouille_stratocu=.not.(iflag_thermals==13.or.iflag_thermals=15) 270 ! Ce serait bien de changer, mai en prenant le temps de vérifier que ca 271 ! fait bien ce qu'on croit. 272 273 flag_bidouille_stratocu=iflag_thermals<=12.or.iflag_thermals==14.or.iflag_thermals==16 274 275 if (iflag_thermals<=12) then 276 lmax=1 277 do k=1,klev-1 278 zdetr_therm(:,k)=zentr_therm(:,k)+zfm_therm(:,k)-zfm_therm(:,k+1) 279 enddo 280 endif 230 281 231 282 fact(:)=0. … … 267 318 268 319 DO i=1,klon 269 if(prt_level.GE.10) print*,'calltherm i Alp_bl Alp Ale_bl Ale',i,Alp_bl(i),Alp(i),Ale_bl(i),Ale(i)270 320 fm_therm(i,klev+1)=0. 271 321 Ale_bl(i)=Ale_bl(i)+Ale(i)/REAL(nsplit_thermals) … … 273 323 Alp_bl(i)=Alp_bl(i)+Alp(i)/REAL(nsplit_thermals) 274 324 ! write(23,*)'ALP CALLTHERM',Alp_bl(i),Alp(i) 325 if(prt_level.GE.10) print*,'calltherm i Alp_bl Alp Ale_bl Ale',i,Alp_bl(i),Alp(i),Ale_bl(i),Ale(i) 275 326 ENDDO 276 327 -
LMDZ5/trunk/libf/phylmd/conf_phys.F90
r1575 r1638 110 110 integer,SAVE :: iflag_thermals_omp,nsplit_thermals_omp 111 111 real,save :: tau_thermals_omp,alp_bl_k_omp 112 !!! nrlmd le 10/04/2012 113 integer,SAVE :: iflag_trig_bl_omp,iflag_clos_bl_omp 114 integer,SAVE :: tau_trig_shallow_omp,tau_trig_deep_omp 115 real,SAVE :: s_trig_omp 116 !!! fin nrlmd le 10/04/2012 112 117 real :: alp_offset 113 118 REAL, SAVE :: alp_offset_omp … … 1083 1088 alp_bl_k_omp = 1. 1084 1089 call getin('alp_bl_k',alp_bl_k_omp) 1090 1091 !!! nrlmd le 10/04/2012 1092 1093 !Config Key = iflag_trig_bl 1094 !Config Desc = 1095 !Config Def = 0 1096 !Config Help = 1097 ! 1098 iflag_trig_bl_omp = 0 1099 call getin('iflag_trig_bl',iflag_trig_bl_omp) 1100 1101 !Config Key = s_trig_bl 1102 !Config Desc = 1103 !Config Def = 0 1104 !Config Help = 1105 ! 1106 s_trig_omp = 2e7 1107 call getin('s_trig',s_trig_omp) 1108 1109 !Config Key = tau_trig_shallow 1110 !Config Desc = 1111 !Config Def = 0 1112 !Config Help = 1113 ! 1114 tau_trig_shallow_omp = 600 1115 call getin('tau_trig_shallow',tau_trig_shallow_omp) 1116 1117 !Config Key = tau_trig_deep 1118 !Config Desc = 1119 !Config Def = 0 1120 !Config Help = 1121 ! 1122 tau_trig_deep_omp = 1800 1123 call getin('tau_trig_deep',tau_trig_deep_omp) 1124 1125 !Config Key = iflag_clos_bl 1126 !Config Desc = 1127 !Config Def = 0 1128 !Config Help = 1129 ! 1130 iflag_clos_bl_omp = 0 1131 call getin('iflag_clos_bl',iflag_clos_bl_omp) 1132 1133 !!! fin nrlmd le 10/04/2012 1085 1134 1086 1135 ! … … 1650 1699 tau_thermals = tau_thermals_omp 1651 1700 alp_bl_k = alp_bl_k_omp 1701 !!! nrlmd le 10/04/2012 1702 iflag_trig_bl = iflag_trig_bl_omp 1703 s_trig = s_trig_omp 1704 tau_trig_shallow = tau_trig_shallow_omp 1705 tau_trig_deep = tau_trig_deep_omp 1706 iflag_clos_bl = iflag_clos_bl_omp 1707 !!! fin nrlmd le 10/04/2012 1652 1708 iflag_coupl = iflag_coupl_omp 1653 1709 iflag_clos = iflag_clos_omp … … 1839 1895 write(lunout,*)' iflag_wake = ', iflag_wake 1840 1896 write(lunout,*)' alp_offset = ', alp_offset 1897 !!! nrlmd le 10/04/2012 1898 write(lunout,*)' iflag_trig_bl = ', iflag_trig_bl 1899 write(lunout,*)' s_trig = ', s_trig 1900 write(lunout,*)' tau_trig_shallow = ', tau_trig_shallow 1901 write(lunout,*)' tau_trig_deep = ', tau_trig_deep 1902 write(lunout,*)' iflag_clos_bl = ', iflag_clos_bl 1903 !!! fin nrlmd le 10/04/2012 1841 1904 1842 1905 write(lunout,*)' lonmin lonmax latmin latmax bilKP_ins =',& -
LMDZ5/trunk/libf/phylmd/phys_output_mod.F90
r1633 r1638 260 260 type(ctrl_out),save :: o_wape = ctrl_out((/ 1, 1, 1, 10, 10, 10 /),'wape') 261 261 262 !!! nrlmd le 10/04/2012 263 264 !-------Propriétés du thermiques au LCL 265 type(ctrl_out),save :: o_zlcl_th = ctrl_out((/ 1, 1, 1, 6, 10, 10 /),'zlcl_th') 266 type(ctrl_out),save :: o_fraca0 = ctrl_out((/ 1, 1, 1, 6, 10, 10 /),'fraca0') 267 type(ctrl_out),save :: o_w0 = ctrl_out((/ 1, 1, 1, 6, 10, 10 /),'w0') 268 type(ctrl_out),save :: o_w_conv = ctrl_out((/ 1, 1, 1, 6, 10, 10 /),'w_conv') 269 type(ctrl_out),save :: o_therm_tke_max0 = ctrl_out((/ 1, 1, 1, 6, 10, 10 /),'therm_tke_max0') 270 type(ctrl_out),save :: o_env_tke_max0 = ctrl_out((/ 1, 1, 1, 6, 10, 10 /),'env_tke_max0') 271 272 !-------Spectre de thermiques de type 2 au LCL 273 type(ctrl_out),save :: o_n2 = ctrl_out((/ 1, 1, 1, 6, 10, 10 /),'n2') 274 type(ctrl_out),save :: o_s2 = ctrl_out((/ 1, 1, 1, 6, 10, 10 /),'s2') 275 276 !-------Déclenchement stochastique 277 type(ctrl_out),save :: o_proba_notrig = ctrl_out((/ 1, 1, 1, 6, 10, 10 /),'proba_notrig') 278 type(ctrl_out),save :: o_random_notrig = ctrl_out((/ 1, 1, 1, 6, 10, 10 /),'random_notrig') 279 type(ctrl_out),save :: o_ale_bl_stat = ctrl_out((/ 1, 1, 1, 6, 10, 10 /),'ale_bl_stat') 280 type(ctrl_out),save :: o_ale_bl_trig = ctrl_out((/ 1, 1, 1, 6, 10, 10 /),'ale_bl_trig') 281 282 !-------Profils de TKE dans et hors du thermique 283 type(ctrl_out),save :: o_therm_tke_max = ctrl_out((/ 1, 1, 1, 6, 10, 10 /),'therm_tke_max') 284 type(ctrl_out),save :: o_env_tke_max = ctrl_out((/ 1, 1, 1, 6, 10, 10 /),'env_tke_max') 285 286 !-------Fermeture statistique 287 type(ctrl_out),save :: o_alp_bl_det = ctrl_out((/ 1, 1, 1, 10, 10, 10 /),'alp_bl_det') 288 type(ctrl_out),save :: o_alp_bl_fluct_m = ctrl_out((/ 1, 1, 1, 10, 10, 10 /),'alp_bl_fluct_m') 289 type(ctrl_out),save :: o_alp_bl_fluct_tke = ctrl_out((/ 1, 1, 1, 10, 10, 10 /),'alp_bl_fluct_tke') 290 type(ctrl_out),save :: o_alp_bl_conv = ctrl_out((/ 1, 1, 1, 10, 10, 10 /),'alp_bl_conv') 291 type(ctrl_out),save :: o_alp_bl_stat = ctrl_out((/ 1, 1, 1, 10, 10, 10 /),'alp_bl_stat') 292 293 !!! fin nrlmd le 10/04/2012 262 294 263 295 ! Champs interpolles sur des niveaux de pression ??? a faire correctement … … 432 464 type(ctrl_out),save :: o_ovap = ctrl_out((/ 2, 3, 4, 10, 10, 10 /),'ovap') 433 465 type(ctrl_out),save :: o_ovapinit = ctrl_out((/ 2, 10, 10, 10, 10, 10 /),'ovapinit') 466 type(ctrl_out),save :: o_oliq = ctrl_out((/ 2, 3, 4, 10, 10, 10 /),'oliq') 434 467 type(ctrl_out),save :: o_wvapp = ctrl_out((/ 2, 10, 10, 10, 10, 10 /),'wvapp') 435 468 type(ctrl_out),save :: o_geop = ctrl_out((/ 2, 3, 10, 10, 10, 10 /),'geop') … … 494 527 type(ctrl_out),save :: o_dtcon = ctrl_out((/ 4, 10, 10, 10, 10, 10 /),'dtcon') 495 528 type(ctrl_out),save :: o_ducon = ctrl_out((/ 4, 10, 10, 10, 10, 10 /),'ducon') 529 type(ctrl_out),save :: o_dvcon = ctrl_out((/ 4, 10, 10, 10, 10, 10 /),'dvcon') 496 530 type(ctrl_out),save :: o_dqcon = ctrl_out((/ 4, 10, 10, 10, 10, 10 /),'dqcon') 497 531 type(ctrl_out),save :: o_dtwak = ctrl_out((/ 4, 5, 10, 10, 10, 10 /),'dtwak') … … 531 565 type(ctrl_out),save :: o_e_th = ctrl_out((/ 4, 10, 10, 10, 10, 10 /),'e_th') 532 566 type(ctrl_out),save :: o_w_th = ctrl_out((/ 4, 10, 10, 10, 10, 10 /),'w_th') 533 type(ctrl_out),save :: o_lambda_th = ctrl_out((/ 10, 10, 10, 10, 10, 10 /),'lambda_th')534 567 type(ctrl_out),save :: o_ftime_th = ctrl_out((/ 4, 10, 10, 10, 10, 10 /),'ftime_th') 535 568 type(ctrl_out),save :: o_q_th = ctrl_out((/ 4, 10, 10, 10, 10, 10 /),'q_th') … … 537 570 type(ctrl_out),save :: o_d_th = ctrl_out((/ 4, 10, 10, 10, 10, 10 /),'d_th') 538 571 type(ctrl_out),save :: o_f0_th = ctrl_out((/ 4, 10, 10, 10, 10, 10 /),'f0_th') 539 type(ctrl_out),save :: o_zmax_th = ctrl_out((/ 4, 10, 10, 10, 10, 10 /),'zmax_th')572 type(ctrl_out),save :: o_zmax_th = ctrl_out((/ 4, 4, 4, 5, 10, 10 /),'zmax_th') 540 573 type(ctrl_out),save :: o_dqthe = ctrl_out((/ 4, 10, 10, 10, 10, 10 /),'dqthe') 541 574 type(ctrl_out),save :: o_dtajs = ctrl_out((/ 4, 10, 10, 10, 10, 10 /),'dtajs') … … 621 654 USE infotrac 622 655 USE ioipsl 656 ! USE phys_cal_mod, only : hour 623 657 USE mod_phys_lmdz_para 624 658 USE aero_mod, only : naero_spc,name_aero … … 682 716 ! entre [phys_out_lonmin,phys_out_lonmax] et [phys_out_latmin,phys_out_latmax] 683 717 684 logical, dimension(nfiles), save :: phys_out_regfkey = (/ .false., .false., .false., .false., .false., .false. /)685 real, dimension(nfiles), save :: phys_out_lonmin = (/ -180., -180., -180., -180., -180.,-180. /)686 real, dimension(nfiles), save :: phys_out_lonmax = (/ 180., 180., 180., 180., 180.,180. /)687 real, dimension(nfiles), save :: phys_out_latmin = (/ -90., -90., -90., -90., -90.,-90. /)688 real, dimension(nfiles), save :: phys_out_latmax = (/ 90., 90., 90., 90., 90.,90. /)718 logical, dimension(nfiles), save :: phys_out_regfkey = (/ .false., .false., .false., .false., .false., .false. /) 719 real, dimension(nfiles), save :: phys_out_lonmin = (/ -180., -180., -180., -180., -180., -180. /) 720 real, dimension(nfiles), save :: phys_out_lonmax = (/ 180., 180., 180., 180., 180., 180. /) 721 real, dimension(nfiles), save :: phys_out_latmin = (/ -90., -90., -90., -90., -90., -90. /) 722 real, dimension(nfiles), save :: phys_out_latmax = (/ 90., 90., 90., 90., 90., 90. /) 689 723 690 724 write(lunout,*) 'Debut phys_output_mod.F90' … … 805 839 806 840 idayref = day_ref 807 CALL ymds2ju(annee_ref, 1, idayref, 0.0, zjulian) 841 CALL ymds2ju(annee_ref, 1, idayref, 0.0, zjulian) 842 ! correction pour l heure initiale !jyg 843 ! !jyg 844 ! CALL ymds2ju(annee_ref, 1, idayref, hour, zjulian) !jyg 808 845 809 846 !!!!!!!!!!!!!!!!! Traitement dans le cas ou l'on veut stocker sur un domaine limite !! … … 1318 1355 ! Couplage conv-CL 1319 1356 IF (iflag_con.GE.3) THEN 1357 IF (iflag_coupl>=1) THEN 1320 1358 CALL histdef2d(iff,clef_stations(iff), & 1321 1359 o_ale_bl%flag,o_ale_bl%name, "ALE BL", "m2/s2") 1322 1360 CALL histdef2d(iff,clef_stations(iff), & 1323 1361 o_alp_bl%flag,o_alp_bl%name, "ALP BL", "m2/s2") 1362 ENDIF 1324 1363 ENDIF !(iflag_con.GE.3) 1325 1364 … … 1375 1414 CALL histdef3d(iff,clef_stations(iff),o_theta%flag,o_theta%name, "Potential air temperature", "K" ) 1376 1415 CALL histdef3d(iff,clef_stations(iff),o_ovap%flag,o_ovap%name, "Specific humidity", "kg/kg" ) 1416 CALL histdef3d(iff,clef_stations(iff),o_oliq%flag,o_oliq%name, "Condensed water", "kg/kg" ) 1377 1417 CALL histdef3d(iff,clef_stations(iff), & 1378 1418 o_ovapinit%flag,o_ovapinit%name, "Specific humidity (begin of timestep)", "kg/kg" ) … … 1480 1520 o_ducon%flag,o_ducon%name, "Convection du", "m/s2") 1481 1521 CALL histdef3d(iff,clef_stations(iff), & 1522 o_dvcon%flag,o_dvcon%name, "Convection dv", "m/s2") 1523 CALL histdef3d(iff,clef_stations(iff), & 1482 1524 o_dqcon%flag,o_dqcon%name, "Convection dQ", "(kg/kg)/s") 1483 1525 … … 1489 1531 CALL histdef2d(iff,clef_stations(iff), & 1490 1532 o_alp_wk%flag,o_alp_wk%name, "ALP WK", "m2/s2") 1533 CALL histdef2d(iff,clef_stations(iff), & 1534 o_ale%flag,o_ale%name, "ALE", "m2/s2") 1535 CALL histdef2d(iff,clef_stations(iff), & 1536 o_alp%flag,o_alp%name, "ALP", "W/m2") 1537 CALL histdef2d(iff,clef_stations(iff),o_cin%flag,o_cin%name, "Convective INhibition", "m2/s2") 1538 CALL histdef2d(iff,clef_stations(iff),o_wape%flag,o_WAPE%name, "WAPE", "m2/s2") 1491 1539 CALL histdef2d(iff,clef_stations(iff),o_wake_h%flag,o_wake_h%name, "wake_h", "-") 1492 1540 CALL histdef2d(iff,clef_stations(iff),o_wake_s%flag,o_wake_s%name, "wake_s", "-") … … 1496 1544 CALL histdef3d(iff,clef_stations(iff),o_wake_deltaq%flag,o_wake_deltaq%name, "wake_deltaq", " ") 1497 1545 CALL histdef3d(iff,clef_stations(iff),o_wake_omg%flag,o_wake_omg%name, "wake_omg", " ") 1498 CALL histdef2d(iff,clef_stations(iff),o_wape%flag,o_WAPE%name, "WAPE", "m2/s2")1499 1546 ENDIF 1500 CALL histdef2d(iff,clef_stations(iff), &1501 o_ale%flag,o_ale%name, "ALE", "m2/s2")1502 CALL histdef2d(iff,clef_stations(iff), &1503 o_alp%flag,o_alp%name, "ALP", "W/m2")1504 CALL histdef2d(iff,clef_stations(iff),o_cin%flag,o_cin%name, "Convective INhibition", "m2/s2")1505 1547 CALL histdef3d(iff,clef_stations(iff),o_Vprecip%flag,o_Vprecip%name, "precipitation vertical profile", "-") 1506 1548 CALL histdef3d(iff,clef_stations(iff),o_ftd%flag,o_ftd%name, "tend temp due aux descentes precip", "-") 1507 1549 CALL histdef3d(iff,clef_stations(iff),o_fqd%flag,o_fqd%name,"tend vap eau due aux descentes precip", "-") 1508 1550 ENDIF !(iflag_con.EQ.3) 1551 1552 !!! nrlmd le 10/04/2012 1553 1554 CALL histdef2d(iff,clef_stations(iff),o_zlcl_th%flag,o_zlcl_th%name, "Altitude du LCL", "m") 1555 CALL histdef2d(iff,clef_stations(iff),o_fraca0%flag,o_fraca0%name, "Fraction de Thermique au LCL", "") 1556 CALL histdef2d(iff,clef_stations(iff),o_w0%flag,o_w0%name, "Vitesse thermique au LCL", "m/s") 1557 CALL histdef2d(iff,clef_stations(iff),o_w_conv%flag,o_w_conv%name, "Vitesse verticale grande échelle au LCL", "m/s") 1558 CALL histdef2d(iff,clef_stations(iff),o_therm_tke_max0%flag,o_therm_tke_max0%name, "TKE thermique au LCL", "m2/s2") 1559 CALL histdef2d(iff,clef_stations(iff),o_env_tke_max0%flag,o_env_tke_max0%name, "TKE environnement au LCL", "m2/s2") 1560 1561 CALL histdef2d(iff,clef_stations(iff),o_n2%flag,o_n2%name, "Nombre de panaches de type 2", " ") 1562 CALL histdef2d(iff,clef_stations(iff),o_s2%flag,o_s2%name, "Surface moyenne des panaches de type 2", "m2") 1563 1564 CALL histdef2d(iff,clef_stations(iff),o_proba_notrig%flag,o_proba_notrig%name, "Probabilité de non-déclenchement", " ") 1565 CALL histdef2d(iff,clef_stations(iff),o_random_notrig%flag,o_random_notrig%name, "Tirage aléatoire de non-déclenchement", " ") 1566 CALL histdef2d(iff,clef_stations(iff),o_ale_bl_trig%flag,o_ale_bl_trig%name, "ALE_BL_STAT + Condition P>Pseuil", "m2/s2") 1567 CALL histdef2d(iff,clef_stations(iff),o_ale_bl_stat%flag,o_ale_bl_stat%name, "ALE_BL_STAT", "m2/s2") 1568 1569 CALL histdef3d(iff,clef_stations(iff),o_therm_tke_max%flag,o_therm_tke_max%name, "TKE thermique", "m2/s2") 1570 CALL histdef3d(iff,clef_stations(iff),o_env_tke_max%flag,o_env_tke_max%name, "TKE environnement", "m2/s2") 1571 CALL histdef2d(iff,clef_stations(iff),o_alp_bl_det%flag,o_alp_bl_det%name, "ALP_BL_DET", "W/m2") 1572 CALL histdef2d(iff,clef_stations(iff),o_alp_bl_fluct_m%flag,o_alp_bl_fluct_m%name, "ALP_BL_FLUCT_M", "W/m2") 1573 CALL histdef2d(iff,clef_stations(iff),o_alp_bl_fluct_tke%flag,o_alp_bl_fluct_tke%name, "ALP_BL_FLUCT_TKE", "W/m2") 1574 CALL histdef2d(iff,clef_stations(iff),o_alp_bl_conv%flag,o_alp_bl_conv%name, "ALP_BL_CONV", "W/m2") 1575 CALL histdef2d(iff,clef_stations(iff),o_alp_bl_stat%flag,o_alp_bl_stat%name, "ALP_BL_STAT", "W/m2") 1576 1577 !!! fin nrlmd le 10/04/2012 1509 1578 1510 1579 CALL histdef3d(iff,clef_stations(iff),o_dtlsc%flag,o_dtlsc%name, "Condensation dT", "K/s") … … 1519 1588 CALL histdef3d(iff,clef_stations(iff),o_dtthe%flag,o_dtthe%name, "Thermal dT", "K/s") 1520 1589 1521 if(iflag_thermals.g t.1) THEN1590 if(iflag_thermals.ge.1) THEN 1522 1591 CALL histdef3d(iff,clef_stations(iff),o_dqlscth%flag,o_dqlscth%name, "dQ therm.", "(kg/kg)/s") 1523 1592 CALL histdef3d(iff,clef_stations(iff),o_dqlscst%flag,o_dqlscst%name, "dQ strat.", "(kg/kg)/s") … … 1531 1600 CALL histdef3d(iff,clef_stations(iff),o_e_th%flag,o_e_th%name,"Thermal plume entrainment","K/s") 1532 1601 CALL histdef3d(iff,clef_stations(iff),o_w_th%flag,o_w_th%name,"Thermal plume vertical velocity","m/s") 1533 CALL histdef3d(iff,clef_stations(iff), &1534 o_lambda_th%flag,o_lambda_th%name,"Thermal plume vertical velocity","m/s")1535 1602 CALL histdef2d(iff,clef_stations(iff), & 1536 1603 o_ftime_th%flag,o_ftime_th%name,"Fraction of time Shallow convection occurs"," ") … … 1548 1615 CALL histdef3d(iff,clef_stations(iff), & 1549 1616 o_dqthe%flag,o_dqthe%name, "Thermal dQ", "(kg/kg)/s") 1550 endif !iflag_thermals.g t.11617 endif !iflag_thermals.ge.1 1551 1618 CALL histdef3d(iff,clef_stations(iff), & 1552 1619 o_dtajs%flag,o_dtajs%name, "Dry adjust. dT", "K/s") -
LMDZ5/trunk/libf/phylmd/phys_output_write.h
r1633 r1638 508 508 ENDIF 509 509 510 if (iflag_pbl>1 .and. lev_ histday.gt.10 ) then510 if (iflag_pbl>1 .and. lev_files(iff).gt.10 ) then 511 511 IF (o_tke_srf(nsrf)%flag(iff)<=lev_files(iff)) THEN 512 512 CALL histwrite_phy(nid_files(iff),clef_stations(iff), … … 666 666 667 667 IF (o_mc%flag(iff)<=lev_files(iff)) THEN 668 if(iflag_thermals .gt.1)then668 if(iflag_thermals>=1)then 669 669 zx_tmp_fi3d=dnwd+dnwd0+upwd+fm_therm(:,1:klev) 670 670 else … … 677 677 ENDIF !iflag_con .GE. 3 678 678 679 IF (o_prw%flag(iff) <= lev_files(iff)) 680 $ CALL histwrite_phy(nid_files(iff), clef_stations(iff), 681 $ o_prw%name, itau_w, prw) 679 IF (o_prw%flag(iff)<=lev_files(iff)) THEN 680 CALL histwrite_phy(nid_files(iff),clef_stations(iff), 681 $o_prw%name,itau_w,prw) 682 ENDIF 682 683 683 684 IF (o_s_pblh%flag(iff)<=lev_files(iff)) THEN … … 800 801 ! Couplage convection-couche limite 801 802 IF (iflag_con.GE.3) THEN 803 IF (iflag_coupl>=1) THEN 802 804 IF (o_ale_bl%flag(iff)<=lev_files(iff)) THEN 803 805 CALL histwrite_phy(nid_files(iff),clef_stations(iff), … … 808 810 $o_alp_bl%name,itau_w,alp_bl) 809 811 ENDIF 812 ENDIF !iflag_coupl>=1 810 813 ENDIF !(iflag_con.GE.3) 811 814 … … 822 825 ENDIF 823 826 827 IF (o_ale%flag(iff)<=lev_files(iff)) THEN 828 CALL histwrite_phy(nid_files(iff),clef_stations(iff), 829 $o_ale%name,itau_w,ale) 830 ENDIF 831 IF (o_alp%flag(iff)<=lev_files(iff)) THEN 832 CALL histwrite_phy(nid_files(iff),clef_stations(iff), 833 $o_alp%name,itau_w,alp) 834 ENDIF 835 IF (o_cin%flag(iff)<=lev_files(iff)) THEN 836 CALL histwrite_phy(nid_files(iff),clef_stations(iff), 837 $o_cin%name,itau_w,cin) 838 ENDIF 824 839 IF (o_wape%flag(iff)<=lev_files(iff)) THEN 825 840 CALL histwrite_phy(nid_files(iff),clef_stations(iff), … … 868 883 ENDIF ! iflag_wake>=1 869 884 870 IF (o_ale%flag(iff)<=lev_files(iff)) THEN871 CALL histwrite_phy(nid_files(iff),clef_stations(iff),872 $o_ale%name,itau_w,ale)873 ENDIF874 IF (o_alp%flag(iff)<=lev_files(iff)) THEN875 CALL histwrite_phy(nid_files(iff),clef_stations(iff),876 $o_alp%name,itau_w,alp)877 ENDIF878 IF (o_cin%flag(iff)<=lev_files(iff)) THEN879 CALL histwrite_phy(nid_files(iff),clef_stations(iff),880 $o_cin%name,itau_w,cin)881 ENDIF882 885 IF (o_Vprecip%flag(iff)<=lev_files(iff)) THEN 883 886 CALL histwrite_phy(nid_files(iff),clef_stations(iff), … … 896 899 ENDIF !(iflag_con.EQ.3) 897 900 901 !!! nrlmd le 10/04/2012 902 903 IF (o_zlcl_th%flag(iff)<=lev_files(iff)) THEN 904 CALL histwrite_phy(nid_files(iff),clef_stations(iff), 905 s o_zlcl_th%name,itau_w,zlcl_th) 906 ENDIF 907 908 IF (o_fraca0%flag(iff)<=lev_files(iff)) THEN 909 CALL histwrite_phy(nid_files(iff),clef_stations(iff), 910 s o_fraca0%name,itau_w,fraca0) 911 ENDIF 912 913 IF (o_w0%flag(iff)<=lev_files(iff)) THEN 914 CALL histwrite_phy(nid_files(iff),clef_stations(iff), 915 s o_w0%name,itau_w,w0) 916 ENDIF 917 918 IF (o_w_conv%flag(iff)<=lev_files(iff)) THEN 919 CALL histwrite_phy(nid_files(iff),clef_stations(iff), 920 s o_w_conv%name,itau_w,w_conv) 921 ENDIF 922 923 IF (o_therm_tke_max0%flag(iff)<=lev_files(iff)) THEN 924 CALL histwrite_phy(nid_files(iff),clef_stations(iff), 925 s o_therm_tke_max0%name,itau_w,therm_tke_max0) 926 ENDIF 927 928 IF (o_env_tke_max0%flag(iff)<=lev_files(iff)) THEN 929 CALL histwrite_phy(nid_files(iff),clef_stations(iff), 930 s o_env_tke_max0%name,itau_w,env_tke_max0) 931 ENDIF 932 933 IF (o_n2%flag(iff)<=lev_files(iff)) THEN 934 CALL histwrite_phy(nid_files(iff),clef_stations(iff), 935 s o_n2%name,itau_w,n2) 936 ENDIF 937 938 IF (o_s2%flag(iff)<=lev_files(iff)) THEN 939 CALL histwrite_phy(nid_files(iff),clef_stations(iff), 940 s o_s2%name,itau_w,s2) 941 ENDIF 942 943 IF (o_proba_notrig%flag(iff)<=lev_files(iff)) THEN 944 CALL histwrite_phy(nid_files(iff),clef_stations(iff), 945 s o_proba_notrig%name,itau_w,proba_notrig) 946 ENDIF 947 948 IF (o_random_notrig%flag(iff)<=lev_files(iff)) THEN 949 CALL histwrite_phy(nid_files(iff),clef_stations(iff), 950 s o_random_notrig%name,itau_w,random_notrig) 951 ENDIF 952 953 IF (o_ale_bl_stat%flag(iff)<=lev_files(iff)) THEN 954 CALL histwrite_phy(nid_files(iff),clef_stations(iff), 955 s o_ale_bl_stat%name,itau_w,ale_bl_stat) 956 ENDIF 957 958 IF (o_ale_bl_trig%flag(iff)<=lev_files(iff)) THEN 959 CALL histwrite_phy(nid_files(iff),clef_stations(iff), 960 s o_ale_bl_trig%name,itau_w,ale_bl_trig) 961 ENDIF 962 963 IF (o_therm_tke_max%flag(iff)<=lev_files(iff)) THEN 964 CALL histwrite_phy(nid_files(iff),clef_stations(iff), 965 s o_therm_tke_max%name,itau_w,therm_tke_max) 966 ENDIF 967 968 IF (o_env_tke_max%flag(iff)<=lev_files(iff)) THEN 969 CALL histwrite_phy(nid_files(iff),clef_stations(iff), 970 s o_env_tke_max%name,itau_w,env_tke_max) 971 ENDIF 972 973 IF (o_alp_bl_det%flag(iff)<=lev_files(iff)) THEN 974 CALL histwrite_phy(nid_files(iff),clef_stations(iff), 975 s o_alp_bl_det%name,itau_w,alp_bl_det) 976 ENDIF 977 978 IF (o_alp_bl_fluct_m%flag(iff)<=lev_files(iff)) THEN 979 CALL histwrite_phy(nid_files(iff),clef_stations(iff), 980 s o_alp_bl_fluct_m%name,itau_w,alp_bl_fluct_m) 981 ENDIF 982 983 IF (o_alp_bl_fluct_tke%flag(iff)<=lev_files(iff)) THEN 984 CALL histwrite_phy(nid_files(iff),clef_stations(iff), 985 s o_alp_bl_fluct_tke%name,itau_w,alp_bl_fluct_tke) 986 ENDIF 987 988 IF (o_alp_bl_conv%flag(iff)<=lev_files(iff)) THEN 989 CALL histwrite_phy(nid_files(iff),clef_stations(iff), 990 s o_alp_bl_conv%name,itau_w,alp_bl_conv) 991 ENDIF 992 993 IF (o_alp_bl_stat%flag(iff)<=lev_files(iff)) THEN 994 CALL histwrite_phy(nid_files(iff),clef_stations(iff), 995 s o_alp_bl_stat%name,itau_w,alp_bl_stat) 996 ENDIF 997 998 !!! fin nrlmd le 10/04/2012 999 898 1000 IF (type_ocean=='slab ') THEN 899 1001 IF ( o_slab_bils%flag(iff)<=lev_files(iff)) … … 1409 1511 CALL histwrite_phy(nid_files(iff),clef_stations(iff), 1410 1512 $ o_ovap%name,itau_w,q_seri) 1513 ENDIF 1514 1515 IF (o_oliq%flag(iff)<=lev_files(iff)) THEN 1516 CALL histwrite_phy(nid_files(iff),clef_stations(iff), 1517 $ o_oliq%name,itau_w,ql_seri) 1411 1518 ENDIF 1412 1519 … … 1636 1743 ENDIF 1637 1744 1745 IF (o_dvcon%flag(iff)<=lev_files(iff)) THEN 1746 zx_tmp_fi3d(1:klon,1:klev)=d_v_con(1:klon,1:klev)/pdtphys 1747 CALL histwrite_phy(nid_files(iff),clef_stations(iff), 1748 $o_dvcon%name,itau_w,zx_tmp_fi3d) 1749 ENDIF 1750 1638 1751 IF (o_dqcon%flag(iff)<=lev_files(iff)) THEN 1639 1752 zx_tmp_fi3d(1:klon,1:klev)=d_q_con(1:klon,1:klev)/pdtphys … … 1679 1792 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 1680 1793 ! Sorties specifiques a la separation thermiques/non thermiques 1681 if (iflag_thermals> 1) then1794 if (iflag_thermals>=1) then 1682 1795 1683 1796 IF (o_dtlscth%flag(iff)<=lev_files(iff)) THEN … … 1743 1856 ENDIF 1744 1857 1745 endif ! iflag_thermals> 11858 endif ! iflag_thermals>=1 1746 1859 1747 1860 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! … … 1790 1903 ENDIF 1791 1904 1792 IF (iflag_thermals .gt.1) THEN1905 IF (iflag_thermals>=1) THEN 1793 1906 IF (o_ftime_th%flag(iff)<=lev_files(iff)) THEN 1794 1907 ! Pour l instant 0 a y reflichir pour les thermiques … … 1819 1932 ENDIF 1820 1933 1821 IF (o_lambda_th%flag(iff)<=lev_files(iff)) THEN1822 CALL histwrite_phy(nid_files(iff),clef_stations(iff),1823 s o_lambda_th%name,itau_w,lambda_th)1824 ENDIF1825 1934 1826 1935 IF (o_a_th%flag(iff)<=lev_files(iff)) THEN -
LMDZ5/trunk/libf/phylmd/phys_state_var_mod.F90
r1539 r1638 346 346 !$OMP THREADPRIVATE(ccm) 347 347 348 !!! nrlmd le 10/04/2012 349 REAL,SAVE,ALLOCATABLE :: ale_bl_trig(:) 350 !$OMP THREADPRIVATE(ale_bl_trig) 351 !!! fin nrlmd le 10/04/2012 352 348 353 CONTAINS 349 354 … … 496 501 ALLOCATE(tau_aero(klon,klev,naero_grp,nbands),piz_aero(klon,klev,naero_grp,nbands),cg_aero(klon,klev,naero_grp,nbands)) 497 502 ALLOCATE(ccm(klon,klev,nbands)) 503 504 !!! nrlmd le 10/04/2012 505 ALLOCATE(ale_bl_trig(klon)) 506 !!! fin nrlmd le 10/04/2012 498 507 499 508 END SUBROUTINE phys_state_var_init … … 603 612 deallocate(ccm) 604 613 614 !!! nrlmd le 10/04/2012 615 deallocate(ale_bl_trig) 616 !!! fin nrlmd le 10/04/2012 617 605 618 END SUBROUTINE phys_state_var_end 606 619 -
LMDZ5/trunk/libf/phylmd/physiq.F
r1628 r1638 180 180 real facteur,zfratqs1,zfratqs2 181 181 182 REAL lambda_th(klon,klev),zz,znum,zden182 REAL zz,znum,zden 183 183 REAL wmax_th(klon) 184 184 REAL zmax_th(klon) … … 614 614 REAL dd_t(klon,klev),dd_q(klon,klev) 615 615 616 real, save :: alp_bl_prescr=0. 1617 real, save :: ale_bl_prescr= 4.616 real, save :: alp_bl_prescr=0. 617 real, save :: ale_bl_prescr=0. 618 618 619 619 real, save :: ale_max=1000. … … 689 689 REAL ztla(klon,klev) 690 690 REAL zthl(klon,klev) 691 692 ccc nrlmd le 10/04/2012 693 694 c--------Stochastic Boundary Layer Triggering: ALE_BL-------- 695 c---Propriétés du thermiques au LCL 696 real zlcl_th(klon) ! Altitude du LCL calculé continument (pcon dans thermcell_main.F90) 697 real fraca0(klon) ! Fraction des thermiques au LCL 698 real w0(klon) ! Vitesse des thermiques au LCL 699 real w_conv(klon) ! Vitesse verticale de grande échelle au LCL 700 real therm_tke_max0(klon) ! TKE dans les thermiques au LCL 701 real env_tke_max0(klon) ! TKE dans l'environnement au LCL 702 703 c---Spectre de thermiques de type 2 au LCL 704 real n2(klon),s2(klon) 705 real ale_bl_stat(klon) 706 707 c---Déclenchement stochastique 708 integer :: tau_trig(klon) 709 real proba_notrig(klon) 710 real random_notrig(klon) 711 712 c--------Statistical Boundary Layer Closure: ALP_BL-------- 713 c---Profils de TKE dans et hors du thermique 714 real pbl_tke_input(klon,klev+1,nbsrf) 715 real therm_tke_max(klon,klev) ! Profil de TKE dans les thermiques 716 real env_tke_max(klon,klev) ! Profil de TKE dans l'environnement 717 718 c---Fermeture statistique 719 real alp_bl_det(klon) ! ALP déterministe du thermique unique 720 real alp_bl_fluct_m(klon) ! ALP liée aux fluctuations de flux de masse sous-nuageux 721 real alp_bl_fluct_tke(klon) ! ALP liée aux fluctuations d'énergie cinétique sous-nuageuse 722 real alp_bl_conv(klon) ! ALP liée à grande échelle 723 real alp_bl_stat(klon) ! ALP totale 724 725 ccc fin nrlmd le 10/04/2012 691 726 692 727 c Variables locales pour la couche limite (al1): … … 791 826 cIM 792 827 EXTERNAL haut2bas !variables de haut en bas 828 INTEGER lnblnk1 829 EXTERNAL lnblnk1 !enleve les blancs a la fin d'une variable de type 830 !caracter 793 831 EXTERNAL ini_undefSTD !initialise a 0 une variable a 1 niveau de pression 794 832 EXTERNAL undefSTD !somme les valeurs definies d'1 var a 1 niveau de pression … … 1354 1392 solswad(:)=0. 1355 1393 1356 lambda_th(:,:)=0.1357 1394 wmax_th(:)=0. 1358 1395 tau_overturning_th(:)=0. … … 1490 1527 cCR:04.12.07: initialisations poches froides 1491 1528 c Controle de ALE et ALP pour la fermeture convective (jyg) 1492 CALL ini_wake(0.,0.,it_wape_prescr,wape_prescr,fip_prescr 1529 if (iflag_wake>=1) then 1530 CALL ini_wake(0.,0.,it_wape_prescr,wape_prescr,fip_prescr 1493 1531 s ,alp_bl_prescr, ale_bl_prescr) 1494 1532 c 11/09/06 rajout initialisation ALE et ALP du wake et PBL(YU) 1495 1533 c print*,'apres ini_wake iflag_cldcon=', iflag_cldcon 1534 endif 1496 1535 1497 1536 do i = 1,klon … … 1516 1555 print*,'physiq npCFMIP=',npCFMIP,'nCFMIP=',nCFMIP 1517 1556 ENDIF 1557 1518 1558 c 1519 1559 ALLOCATE(tabCFMIP(nCFMIP)) … … 1735 1775 ! 1736 1776 itap = itap + 1 1777 c 1737 1778 ! 1738 1779 ! Update fraction of the sub-surfaces (pctsrf) and … … 2042 2083 c 2043 2084 2044 if (iflag_pbl/=0) then 2045 2046 2047 e 2048 e 2049 e 2050 e 2051 e 2052 e 2053 + 2054 s 2055 s 2056 s 2057 s 2058 s 2059 d 2060 d 2061 d 2062 d 2063 d 2064 d 2065 d 2066 d 2067 - 2068 - 2085 if (iflag_pbl/=0) then 2086 2087 CALL pbl_surface( 2088 e dtime, date0, itap, days_elapsed+1, 2089 e debut, lafin, 2090 e rlon, rlat, rugoro, rmu0, 2091 e rain_fall, snow_fall, solsw, sollw, 2092 e t_seri, q_seri, u_seri, v_seri, 2093 e pplay, paprs, pctsrf, 2094 + ftsol, falb1, falb2, u10m, v10m, 2095 s sollwdown, cdragh, cdragm, u1, v1, 2096 s albsol1, albsol2, sens, evap, 2097 s zxtsol, zxfluxlat, zt2m, qsat2m, 2098 s d_t_vdf, d_q_vdf, d_u_vdf, d_v_vdf, 2099 s coefh, coefm, slab_wfbils, 2100 d qsol, zq2m, s_pblh, s_lcl, 2101 d s_capCL, s_oliqCL, s_cteiCL,s_pblT, 2102 d s_therm, s_trmb1, s_trmb2, s_trmb3, 2103 d zxrugs, zu10m, zv10m, fder, 2104 d zxqsurf, rh2m, zxfluxu, zxfluxv, 2105 d frugs, agesno, fsollw, fsolsw, 2106 d d_ts, fevap, fluxlat, t2m, 2107 d wfbils, wfbilo, fluxt, fluxu, fluxv, 2108 - dsens, devap, zxsnow, 2109 - zxfluxt, zxfluxq, q2m, fluxq, pbl_tke ) 2069 2110 2070 2111 2071 2112 !----------------------------------------------------------------------------------------- 2072 2113 ! ajout des tendances de la diffusion turbulente 2073 2114 CALL add_phys_tend(d_u_vdf,d_v_vdf,d_t_vdf,d_q_vdf,dql0,'vdf') 2074 2115 !----------------------------------------------------------------------------------------- 2075 2116 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2117 if (mydebug) then 2118 call writefield_phy('u_seri',u_seri,llm) 2119 call writefield_phy('v_seri',v_seri,llm) 2120 call writefield_phy('t_seri',t_seri,llm) 2121 call writefield_phy('q_seri',q_seri,llm) 2122 endif 2123 2124 2125 IF (ip_ebil_phy.ge.2) THEN 2126 ztit='after surface_main' 2127 CALL diagetpq(airephy,ztit,ip_ebil_phy,2,2,dtime 2087 2128 e , t_seri,q_seri,ql_seri,qs_seri,u_seri,v_seri,paprs,pplay 2088 2129 s , d_h_vcol, d_qt, d_qw, d_ql, d_qs, d_ec) 2089 2130 call diagphy(airephy,ztit,ip_ebil_phy 2090 2131 e , zero_v, zero_v, zero_v, zero_v, sens 2091 2132 e , evap , zero_v, zero_v, ztsol 2092 2133 e , d_h_vcol, d_qt, d_ec 2093 2134 s , fs_bound, fq_bound ) 2094 2135 END IF 2095 2136 2096 2137 ENDIF 2097 2098 2138 c =================================================================== c 2099 2139 c Calcul de Qsat … … 2244 2284 cdans le thermique sinon 2245 2285 if (iflag_coupl.eq.0) then 2246 if (debut.and.prt_level.gt.9)WRITE(lunout,*) 'ALE&ALP imposes' 2247 Ale_bl(1:klon) = ale_bl_prescr 2248 Alp_bl(1:klon) = alp_bl_prescr 2286 if (debut.and.prt_level.gt.9) 2287 $ WRITE(lunout,*)'ALE et ALP imposes' 2288 do i = 1,klon 2289 con ne couple que ale 2290 c ALE(i) = max(ale_wake(i),Ale_bl(i)) 2291 ALE(i) = max(ale_wake(i),ale_bl_prescr) 2292 con ne couple que alp 2293 c ALP(i) = alp_wake(i) + Alp_bl(i) 2294 ALP(i) = alp_wake(i) + alp_bl_prescr 2295 enddo 2249 2296 else 2250 2297 IF(prt_level>9)WRITE(lunout,*)'ALE et ALP couples au thermique' 2251 endif 2298 ! do i = 1,klon 2299 ! ALE(i) = max(ale_wake(i),Ale_bl(i)) 2300 ! avant ALP(i) = alp_wake(i) + Alp_bl(i) 2301 ! ALP(i) = alp_wake(i) + Alp_bl(i) + alp_offset ! modif sb 2302 ! write(20,*)'ALE',ALE(i),Ale_bl(i),ale_wake(i) 2303 ! write(21,*)'ALP',ALP(i),Alp_bl(i),alp_wake(i) 2304 ! enddo 2252 2305 2253 2306 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! … … 2256 2309 ! w si <0 2257 2310 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 2258 2259 2311 do i = 1,klon 2260 2312 ALE(i) = max(ale_wake(i),Ale_bl(i)) 2313 ccc nrlmd le 10/04/2012----------Stochastic triggering-------------- 2314 if (iflag_trig_bl.ge.1) then 2315 ALE(i) = max(ale_wake(i),Ale_bl_trig(i)) 2316 endif 2317 ccc fin nrlmd le 10/04/2012 2261 2318 if (alp_offset>=0.) then 2262 2319 ALP(i) = alp_wake(i) + Alp_bl(i) + alp_offset ! modif sb … … 2269 2326 endif 2270 2327 enddo 2271 2272 2328 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 2273 2329 2330 endif 2274 2331 do i=1,klon 2275 2332 if (alp(i)>alp_max) then … … 2586 2643 2587 2644 2588 if (iflag_thermals.gt.1) then 2645 ccc nrlmd le 10/04/2012 2646 DO k=1,klev+1 2647 DO i=1,klon 2648 pbl_tke_input(i,k,is_oce)=pbl_tke(i,k,is_oce) 2649 pbl_tke_input(i,k,is_ter)=pbl_tke(i,k,is_ter) 2650 pbl_tke_input(i,k,is_lic)=pbl_tke(i,k,is_lic) 2651 pbl_tke_input(i,k,is_sic)=pbl_tke(i,k,is_sic) 2652 ENDDO 2653 ENDDO 2654 ccc fin nrlmd le 10/04/2012 2655 2656 if (iflag_thermals>=1) then 2589 2657 call calltherm(pdtphys 2590 2658 s ,pplay,paprs,pphi,weak_inversion … … 2596 2664 con rajoute ale et alp, et les caracteristiques de la couche alim 2597 2665 s ,Ale_bl,Alp_bl,lalim_conv,wght_th, zmax0, f0, zw2,fraca 2598 s ,ztv,zpspsk,ztla,zthl) 2666 s ,ztv,zpspsk,ztla,zthl 2667 ccc nrlmd le 10/04/2012 2668 e ,pbl_tke_input,pctsrf,omega,airephy 2669 s ,zlcl_th,fraca0,w0,w_conv,therm_tke_max0,env_tke_max0 2670 s ,n2,s2,ale_bl_stat 2671 s ,therm_tke_max,env_tke_max 2672 s ,alp_bl_det,alp_bl_fluct_m,alp_bl_fluct_tke 2673 s ,alp_bl_conv,alp_bl_stat 2674 ccc fin nrlmd le 10/04/2012 2675 s ) 2676 2677 ccc nrlmd le 10/04/2012 2678 c-----------Stochastic triggering----------- 2679 if (iflag_trig_bl.ge.1) then 2680 c 2681 IF (prt_level .GE. 10) THEN 2682 print *,'cin, ale_bl_stat, alp_bl_stat ', 2683 $ cin, ale_bl_stat, alp_bl_stat 2684 ENDIF 2685 2686 c----Initialisations 2687 do i=1,klon 2688 proba_notrig(i)=1. 2689 random_notrig(i)=1e6*ale_bl_stat(i)-int(1e6*ale_bl_stat(i)) 2690 if ( ale_bl_trig(i) .lt. abs(cin(i))+1.e-10 ) then 2691 tau_trig(i)=tau_trig_shallow 2692 else 2693 tau_trig(i)=tau_trig_deep 2694 endif 2695 enddo 2696 c 2697 IF (prt_level .GE. 10) THEN 2698 print *,'random_notrig, tau_trig ', 2699 $ random_notrig, tau_trig 2700 print *,'s_trig,s2,n2 ', 2701 $ s_trig,s2,n2 2702 ENDIF 2703 2704 c----Tirage aléatoire et calcul de ale_bl_trig 2705 do i=1,klon 2706 if ( (ale_bl_stat(i) .gt. abs(cin(i))+1.e-10) ) then 2707 proba_notrig(i)=(1.-exp(-s_trig/s2(i)))** 2708 $ (n2(i)*dtime/tau_trig(i)) 2709 c print *, 'proba_notrig(i) ',proba_notrig(i) 2710 if (random_notrig(i) .ge. proba_notrig(i)) then 2711 ale_bl_trig(i)=ale_bl_stat(i) 2712 else 2713 ale_bl_trig(i)=0. 2714 endif 2715 else 2716 proba_notrig(i)=1. 2717 random_notrig(i)=0. 2718 ale_bl_trig(i)=0. 2719 endif 2720 enddo 2721 c 2722 IF (prt_level .GE. 10) THEN 2723 print *,'proba_notrig, ale_bl_trig ', 2724 $ proba_notrig, ale_bl_trig 2725 ENDIF 2726 2727 endif !(iflag_trig_bl) 2728 2729 c-----------Statistical closure----------- 2730 if (iflag_clos_bl.ge.1) then 2731 2732 do i=1,klon 2733 alp_bl(i)=alp_bl_stat(i) 2734 enddo 2735 2736 else 2737 2738 alp_bl_stat(:)=0. 2739 2740 endif !(iflag_clos_bl) 2741 2742 IF (prt_level .GE. 10) THEN 2743 print *,'ale_bl_trig, alp_bl_stat ',ale_bl_trig, alp_bl_stat 2744 ENDIF 2745 2746 ccc fin nrlmd le 10/04/2012 2599 2747 2600 2748 ! ---------------------------------------------------------------------- … … 2627 2775 c ============== 2628 2776 2629 ! Dans le cas o \`uon active les thermiques, on fait partir l'ajustement2777 ! Dans le cas où on active les thermiques, on fait partir l'ajustement 2630 2778 ! a partir du sommet des thermiques. 2631 2779 ! Dans le cas contraire, on demarre au niveau 1. … … 2814 2962 ! FH 22/09/2009 2815 2963 ! La ligne ci-dessous faisait osciller le modele et donnait une solution 2816 ! as ymptotique bidon et d\'ependant fortement du pas de temps.2964 ! assymptotique bidon et dépendant fortement du pas de temps. 2817 2965 ! ratqs(:,:)=sqrt(ratqs(:,:)**2+ratqss(:,:)**2) 2818 2966 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! … … 2842 2990 c Appeler le processus de condensation a grande echelle 2843 2991 c et le processus de precipitation 2992 c------------------------------------------------------------------------- 2993 IF (prt_level .GE.10) THEN 2994 print *,' ->fisrtilp ' 2995 ENDIF 2844 2996 c------------------------------------------------------------------------- 2845 2997 CALL fisrtilp(dtime,paprs,pplay, … … 3351 3503 RCFC12 = RCFC12_act 3352 3504 c 3505 IF (prt_level .GE.10) THEN 3506 print *,' ->radlwsw, number 1 ' 3507 ENDIF 3508 c 3353 3509 CALL radlwsw 3354 3510 e (dist, rmu0, fract, … … 3388 3544 RCFC12 = RCFC12_per 3389 3545 c 3546 IF (prt_level .GE.10) THEN 3547 print *,' ->radlwsw, number 2 ' 3548 ENDIF 3549 c 3390 3550 CALL radlwsw 3391 3551 e (dist, rmu0, fract, … … 3480 3640 c a l'echelle sous-maille: 3481 3641 c 3642 IF (prt_level .GE.10) THEN 3643 print *,' call orography ? ', ok_orodr 3644 ENDIF 3645 c 3482 3646 IF (ok_orodr) THEN 3483 3647 c … … 3569 3733 3570 3734 IF (ok_hines) then 3735 3571 3736 CALL hines_gwd(klon,klev,dtime,paprs,pplay, 3572 3737 i rlat,t_seri,u_seri,v_seri, … … 3576 3741 c ajout des tendances 3577 3742 CALL add_phys_tend(d_u_hin,d_v_hin,d_t_hin,dq0,dql0,'hin') 3743 3578 3744 ENDIF 3579 3745 c 3746 3747 c 3748 cIM cf. FLott BEG 3580 3749 C STRESS NECESSAIRES: TOUTE LA PHYSIQUE 3581 3750 … … 3602 3771 cIM calcul composantes axiales du moment angulaire et couple des montagnes 3603 3772 c 3604 IF (is_sequential .and. ok_orodr) THEN 3605 3773 IF (is_sequential .and. ok_orodr) THEN 3606 3774 CALL aaam_bud (27,klon,klev,jD_cur-jD_ref,jH_cur, 3607 3775 C ra,rg,romega, … … 3898 4066 c Convertir les incrementations en tendances 3899 4067 c 4068 IF (prt_level .GE.10) THEN 4069 print *,'Convertir les incrementations en tendances ' 4070 ENDIF 4071 c 3900 4072 if (mydebug) then 3901 4073 call writefield_phy('u_seri',u_seri,llm) … … 4016 4188 c============================================================= 4017 4189 4018 if (iflag_thermals> 1) then4190 if (iflag_thermals>=1) then 4019 4191 d_t_lscth=0. 4020 4192 d_t_lscst=0. -
LMDZ5/trunk/libf/phylmd/thermcell.h
r1496 r1638 1 1 integer :: iflag_thermals,nsplit_thermals 2 3 !!! nrlmd le 10/04/2012 4 integer :: iflag_trig_bl,iflag_clos_bl 5 integer :: tau_trig_shallow,tau_trig_deep 6 real :: s_trig 7 !!! fin nrlmd le 10/04/2012 8 2 9 real,parameter :: r_aspect_thermals=2.,l_mix_thermals=30. 3 10 real :: alp_bl_k 4 11 real :: tau_thermals 5 integer,parameter :: w2di_thermals= 112 integer,parameter :: w2di_thermals=0 6 13 integer :: isplit 7 14 … … 14 21 common/ctherm5/iflag_thermals_ed,iflag_thermals_optflux 15 22 16 !$OMP THREADPRIVATE(/ctherm1/,/ctherm2/,/ctherm4/,/ctherm5/) 23 !!! nrlmd le 10/04/2012 24 common/ctherm6/iflag_trig_bl,iflag_clos_bl 25 common/ctherm7/tau_trig_shallow,tau_trig_deep 26 common/ctherm8/s_trig 27 !!! fin nrlmd le 10/04/2012 28 29 !$OMP THREADPRIVATE(/ctherm1/,/ctherm2/,/ctherm4/,/ctherm5/,/ctherm6/,/ctherm7/,,/ctherm6/,/ctherm8/) -
LMDZ5/trunk/libf/phylmd/thermcell_main.F90
r1525 r1638 10 10 & ,Ale_bl,Alp_bl,lalim_conv,wght_th & 11 11 & ,zmax0, f0,zw2,fraca,ztv & 12 & ,zpspsk,ztla,zthl) 12 & ,zpspsk,ztla,zthl & 13 !!! nrlmd le 10/04/2012 14 & ,pbl_tke,pctsrf,omega,airephy & 15 & ,zlcl,fraca0,w0,w_conv,therm_tke_max0,env_tke_max0 & 16 & ,n2,s2,ale_bl_stat & 17 & ,therm_tke_max,env_tke_max & 18 & ,alp_bl_det,alp_bl_fluct_m,alp_bl_fluct_tke & 19 & ,alp_bl_conv,alp_bl_stat & 20 !!! fin nrlmd le 10/04/2012 21 & ) 13 22 14 23 USE dimphy … … 47 56 #include "iniprint.h" 48 57 #include "thermcell.h" 58 !!! nrlmd le 10/04/2012 59 #include "indicesol.h" 60 !!! fin nrlmd le 10/04/2012 49 61 50 62 ! arguments: … … 77 89 integer,save :: lev_out=10 78 90 !$OMP THREADPRIVATE(lev_out) 91 92 REAL susqr2pi, Reuler 79 93 80 94 INTEGER ig,k,l,ll,ierr … … 155 169 real seuil 156 170 real csc(klon,klev) 171 172 !!! nrlmd le 10/04/2012 173 174 !------Entrées 175 real pbl_tke(klon,klev+1,nbsrf) 176 real pctsrf(klon,nbsrf) 177 real omega(klon,klev) 178 real airephy(klon) 179 !------Sorties 180 real zlcl(klon),fraca0(klon),w0(klon),w_conv(klon) 181 real therm_tke_max0(klon),env_tke_max0(klon) 182 real n2(klon),s2(klon) 183 real ale_bl_stat(klon) 184 real therm_tke_max(klon,klev),env_tke_max(klon,klev) 185 real alp_bl_det(klon),alp_bl_fluct_m(klon),alp_bl_fluct_tke(klon),alp_bl_conv(klon),alp_bl_stat(klon) 186 !------Local 187 integer nsrf 188 real rhobarz0(klon) ! Densité au LCL 189 logical ok_lcl(klon) ! Existence du LCL des thermiques 190 integer klcl(klon) ! Niveau du LCL 191 real interp(klon) ! Coef d'interpolation pour le LCL 192 !--Triggering 193 real Su ! Surface unité: celle d'un updraft élémentaire 194 parameter(Su=4e4) 195 real hcoef ! Coefficient directeur pour le calcul de s2 196 parameter(hcoef=1) 197 real hmincoef ! Coefficient directeur pour l'ordonnée à l'origine pour le calcul de s2 198 parameter(hmincoef=0.3) 199 real eps1 ! Fraction de surface occupée par la population 1 : eps1=n1*s1/(fraca0*Sd) 200 parameter(eps1=0.3) 201 real hmin(ngrid) ! Ordonnée à l'origine pour le calcul de s2 202 real zmax_moy(ngrid) ! Hauteur moyenne des thermiques : zmax_moy = zlcl + 0.33 (zmax-zlcl) 203 real zmax_moy_coef 204 parameter(zmax_moy_coef=0.33) 205 real depth(klon) ! Epaisseur moyenne du cumulus 206 real w_max(klon) ! Vitesse max statistique 207 real s_max(klon) 208 !--Closure 209 real pbl_tke_max(klon,klev) ! Profil de TKE moyenne 210 real pbl_tke_max0(klon) ! TKE moyenne au LCL 211 real w_ls(klon,klev) ! Vitesse verticale grande échelle (m/s) 212 real coef_m ! On considère un rendement pour alp_bl_fluct_m 213 parameter(coef_m=1.) 214 real coef_tke ! On considère un rendement pour alp_bl_fluct_tke 215 parameter(coef_tke=1.) 216 217 !!! fin nrlmd le 10/04/2012 157 218 158 219 ! … … 679 740 enddo 680 741 ! 742 743 !!! nrlmd le 10/04/2012 744 745 !------------Test sur le LCL des thermiques 746 do ig=1,ngrid 747 ok_lcl(ig)=.false. 748 if ( (pcon(ig) .gt. pplay(ig,klev-1)) .and. (pcon(ig) .lt. pplay(ig,1)) ) ok_lcl(ig)=.true. 749 enddo 750 751 !------------Localisation des niveaux entourant le LCL et du coef d'interpolation 752 do l=1,nlay-1 753 do ig=1,ngrid 754 if (ok_lcl(ig)) then 755 if ((pplay(ig,l) .ge. pcon(ig)) .and. (pplay(ig,l+1) .le. pcon(ig))) then 756 klcl(ig)=l 757 interp(ig)=(pcon(ig)-pplay(ig,klcl(ig)))/(pplay(ig,klcl(ig)+1)-pplay(ig,klcl(ig))) 758 endif 759 endif 760 enddo 761 enddo 762 763 !------------Hauteur des thermiques 764 !!jyg le 27/04/2012 765 !! do ig =1,ngrid 766 !! rhobarz0(ig)=rhobarz(ig,klcl(ig))+(rhobarz(ig,klcl(ig)+1) & 767 !! & -rhobarz(ig,klcl(ig)))*interp(ig) 768 !! zlcl(ig)=(pplev(ig,1)-pcon(ig))/(rhobarz0(ig)*RG) 769 !! zmax(ig)=pphi(ig,lmax(ig))/rg 770 !! if ( (.not.ok_lcl(ig)) .or. (zlcl(ig).gt.zmax(ig)) ) zlcl(ig)=zmax(ig) ! Si zclc > zmax alors on pose zlcl = zmax 771 !! enddo 772 do ig =1,ngrid 773 zmax(ig)=pphi(ig,lmax(ig))/rg 774 if (ok_lcl(ig)) then 775 rhobarz0(ig)=rhobarz(ig,klcl(ig))+(rhobarz(ig,klcl(ig)+1) & 776 & -rhobarz(ig,klcl(ig)))*interp(ig) 777 zlcl(ig)=(pplev(ig,1)-pcon(ig))/(rhobarz0(ig)*RG) 778 zlcl(ig)=min(zlcl(ig),zmax(ig)) ! Si zlcl > zmax alors on pose zlcl = zmax 779 else 780 rhobarz0(ig)=0. 781 zlcl(ig)=zmax(ig) 782 endif 783 enddo 784 !!jyg fin 785 786 !------------Calcul des propriétés du thermique au LCL 787 IF ( (iflag_trig_bl.ge.1) .or. (iflag_clos_bl.ge.1) ) THEN 788 789 !-----Initialisation de la TKE moyenne 790 do l=1,nlay 791 do ig=1,ngrid 792 pbl_tke_max(ig,l)=0. 793 enddo 794 enddo 795 796 !-----Calcul de la TKE moyenne 797 do nsrf=1,nbsrf 798 do l=1,nlay 799 do ig=1,ngrid 800 pbl_tke_max(ig,l)=pctsrf(ig,nsrf)*pbl_tke(ig,l,nsrf)+pbl_tke_max(ig,l) 801 enddo 802 enddo 803 enddo 804 805 !-----Initialisations des TKE dans et hors des thermiques 806 do l=1,nlay 807 do ig=1,ngrid 808 therm_tke_max(ig,l)=pbl_tke_max(ig,l) 809 env_tke_max(ig,l)=pbl_tke_max(ig,l) 810 enddo 811 enddo 812 813 !-----Calcul de la TKE transportée par les thermiques : therm_tke_max 814 call thermcell_tke_transport(ngrid,nlay,ptimestep,fm0,entr0, & 815 & rg,pplev,therm_tke_max) 816 ! print *,' thermcell_tke_transport -> ' !!jyg 817 818 !-----Calcul des profils verticaux de TKE hors thermiques : env_tke_max, et de la vitesse verticale grande échelle : W_ls 819 do l=1,nlay 820 do ig=1,ngrid 821 pbl_tke_max(ig,l)=fraca(ig,l)*therm_tke_max(ig,l)+(1.-fraca(ig,l))*env_tke_max(ig,l) ! Recalcul de TKE moyenne aprés transport de TKE_TH 822 env_tke_max(ig,l)=(pbl_tke_max(ig,l)-fraca(ig,l)*therm_tke_max(ig,l))/(1.-fraca(ig,l)) ! Recalcul de TKE dans l'environnement aprés transport de TKE_TH 823 w_ls(ig,l)=-1.*omega(ig,l)/(RG*rhobarz(ig,l)) ! Vitesse verticale de grande échelle 824 enddo 825 enddo 826 ! print *,' apres w_ls = ' !!jyg 827 828 do ig=1,ngrid 829 if (ok_lcl(ig)) then 830 fraca0(ig)=fraca(ig,klcl(ig))+(fraca(ig,klcl(ig)+1) & 831 & -fraca(ig,klcl(ig)))*interp(ig) 832 w0(ig)=zw2(ig,klcl(ig))+(zw2(ig,klcl(ig)+1) & 833 & -zw2(ig,klcl(ig)))*interp(ig) 834 w_conv(ig)=w_ls(ig,klcl(ig))+(w_ls(ig,klcl(ig)+1) & 835 & -w_ls(ig,klcl(ig)))*interp(ig) 836 therm_tke_max0(ig)=therm_tke_max(ig,klcl(ig)) & 837 & +(therm_tke_max(ig,klcl(ig)+1)-therm_tke_max(ig,klcl(ig)))*interp(ig) 838 env_tke_max0(ig)=env_tke_max(ig,klcl(ig))+(env_tke_max(ig,klcl(ig)+1) & 839 & -env_tke_max(ig,klcl(ig)))*interp(ig) 840 pbl_tke_max0(ig)=pbl_tke_max(ig,klcl(ig))+(pbl_tke_max(ig,klcl(ig)+1) & 841 & -pbl_tke_max(ig,klcl(ig)))*interp(ig) 842 if (therm_tke_max0(ig).ge.20.) therm_tke_max0(ig)=20. 843 if (env_tke_max0(ig).ge.20.) env_tke_max0(ig)=20. 844 if (pbl_tke_max0(ig).ge.20.) pbl_tke_max0(ig)=20. 845 else 846 fraca0(ig)=0. 847 w0(ig)=0. 848 !!jyg le 27/04/2012 849 !! zlcl(ig)=0. 850 !! 851 endif 852 enddo 853 854 ENDIF ! IF ( (iflag_trig_bl.ge.1) .or. (iflag_clos_bl.ge.1) ) 855 ! print *,'ENDIF ( (iflag_trig_bl.ge.1) .or. (iflag_clos_bl.ge.1) ) ' !!jyg 856 857 !------------Triggering------------------ 858 IF (iflag_trig_bl.ge.1) THEN 859 860 !-----Initialisations 861 depth(:)=0. 862 n2(:)=0. 863 s2(:)=0. 864 s_max(:)=0. 865 866 !-----Epaisseur du nuage (depth) et détermination de la queue du spectre de panaches (n2,s2) et du panache le plus gros (s_max) 867 do ig=1,ngrid 868 zmax_moy(ig)=zlcl(ig)+zmax_moy_coef*(zmax(ig)-zlcl(ig)) 869 depth(ig)=zmax_moy(ig)-zlcl(ig) 870 hmin(ig)=hmincoef*zlcl(ig) 871 if (depth(ig).ge.10.) then 872 s2(ig)=(hcoef*depth(ig)+hmin(ig))**2 873 n2(ig)=(1.-eps1)*fraca0(ig)*airephy(ig)/s2(ig) 874 !! 875 !!jyg le 27/04/2012 876 !! s_max(ig)=s2(ig)*log(n2(ig)) 877 !! if (n2(ig) .lt. 1) s_max(ig)=0. 878 s_max(ig)=s2(ig)*log(max(n2(ig),1.)) 879 !!fin jyg 880 else 881 s2(ig)=0. 882 n2(ig)=0. 883 s_max(ig)=0. 884 endif 885 enddo 886 ! print *,'avant Calcul de Wmax ' !!jyg 887 888 !-----Calcul de Wmax et ALE_BL_STAT associée 889 !!jyg le 30/04/2012 890 !! do ig=1,ngrid 891 !! if ( (depth(ig).ge.10.) .and. (s_max(ig).gt.1.) ) then 892 !! w_max(ig)=w0(ig)*(1.+sqrt(2.*log(s_max(ig)/su)-log(2.*3.14)-log(2.*log(s_max(ig)/su)-log(2.*3.14)))) 893 !! ale_bl_stat(ig)=0.5*w_max(ig)**2 894 !! else 895 !! w_max(ig)=0. 896 !! ale_bl_stat(ig)=0. 897 !! endif 898 !! enddo 899 susqr2pi=su*sqrt(2.*Rpi) 900 Reuler=exp(1.) 901 do ig=1,ngrid 902 if ( (depth(ig).ge.10.) .and. (s_max(ig).gt.susqr2pi*Reuler) ) then 903 w_max(ig)=w0(ig)*(1.+sqrt(2.*log(s_max(ig)/susqr2pi)-log(2.*log(s_max(ig)/susqr2pi)))) 904 ale_bl_stat(ig)=0.5*w_max(ig)**2 905 else 906 w_max(ig)=0. 907 ale_bl_stat(ig)=0. 908 endif 909 enddo 910 911 ENDIF ! iflag_trig_bl 912 ! print *,'ENDIF iflag_trig_bl' !!jyg 913 914 !------------Closure------------------ 915 916 IF (iflag_clos_bl.ge.1) THEN 917 918 !-----Calcul de ALP_BL_STAT 919 do ig=1,ngrid 920 alp_bl_det(ig)=0.5*coef_m*rhobarz0(ig)*(w0(ig)**3)*fraca0(ig)*(1.-2.*fraca0(ig))/((1.-fraca0(ig))**2) 921 alp_bl_fluct_m(ig)=1.5*rhobarz0(ig)*fraca0(ig)*(w_conv(ig)+coef_m*w0(ig))* & 922 & (w0(ig)**2) 923 alp_bl_fluct_tke(ig)=3.*coef_m*rhobarz0(ig)*w0(ig)*fraca0(ig)*(therm_tke_max0(ig)-env_tke_max0(ig)) & 924 & +3.*rhobarz0(ig)*w_conv(ig)*pbl_tke_max0(ig) 925 if (iflag_clos_bl.ge.2) then 926 alp_bl_conv(ig)=1.5*coef_m*rhobarz0(ig)*fraca0(ig)*(fraca0(ig)/(1.-fraca0(ig)))*w_conv(ig)* & 927 & (w0(ig)**2) 928 else 929 alp_bl_conv(ig)=0. 930 endif 931 alp_bl_stat(ig)=alp_bl_det(ig)+alp_bl_fluct_m(ig)+alp_bl_fluct_tke(ig)+alp_bl_conv(ig) 932 enddo 933 934 !-----Sécurité ALP infinie 935 do ig=1,ngrid 936 if (fraca0(ig).gt.0.98) alp_bl_stat(ig)=2. 937 enddo 938 939 ENDIF ! (iflag_clos_bl.ge.1) 940 941 !!! fin nrlmd le 10/04/2012 942 681 943 if (prt_level.ge.10) then 682 944 ig=igout … … 858 1120 end 859 1121 1122 !!! nrlmd le 10/04/2012 Transport de la TKE par le thermique moyen pour la fermeture en ALP 1123 ! On transporte pbl_tke pour donner therm_tke 1124 ! Copie conforme de la subroutine DTKE dans physiq.F écrite par Frederic Hourdin 1125 subroutine thermcell_tke_transport(ngrid,nlay,ptimestep,fm0,entr0, & 1126 & rg,pplev,therm_tke_max) 1127 implicit none 1128 1129 #include "iniprint.h" 1130 !======================================================================= 1131 ! 1132 ! Calcul du transport verticale dans la couche limite en presence 1133 ! de "thermiques" explicitement representes 1134 ! calcul du dq/dt une fois qu'on connait les ascendances 1135 ! 1136 !======================================================================= 1137 1138 integer ngrid,nlay,nsrf 1139 1140 real ptimestep 1141 real masse0(ngrid,nlay),fm0(ngrid,nlay+1),pplev(ngrid,nlay+1) 1142 real entr0(ngrid,nlay),rg 1143 real therm_tke_max(ngrid,nlay) 1144 real detr0(ngrid,nlay) 1145 1146 1147 real masse(ngrid,nlay),fm(ngrid,nlay+1) 1148 real entr(ngrid,nlay) 1149 real q(ngrid,nlay) 1150 integer lev_out ! niveau pour les print 1151 1152 real qa(ngrid,nlay),detr(ngrid,nlay),wqd(ngrid,nlay+1) 1153 1154 real zzm 1155 1156 integer ig,k 1157 integer isrf 1158 1159 1160 lev_out=0 1161 1162 1163 if (prt_level.ge.1) print*,'Q2 THERMCEL_DQ 0' 1164 1165 ! calcul du detrainement 1166 do k=1,nlay 1167 detr0(:,k)=fm0(:,k)-fm0(:,k+1)+entr0(:,k) 1168 masse0(:,k)=(pplev(:,k)-pplev(:,k+1))/RG 1169 enddo 1170 1171 1172 ! Decalage vertical des entrainements et detrainements. 1173 masse(:,1)=0.5*masse0(:,1) 1174 entr(:,1)=0.5*entr0(:,1) 1175 detr(:,1)=0.5*detr0(:,1) 1176 fm(:,1)=0. 1177 do k=1,nlay-1 1178 masse(:,k+1)=0.5*(masse0(:,k)+masse0(:,k+1)) 1179 entr(:,k+1)=0.5*(entr0(:,k)+entr0(:,k+1)) 1180 detr(:,k+1)=0.5*(detr0(:,k)+detr0(:,k+1)) 1181 fm(:,k+1)=fm(:,k)+entr(:,k)-detr(:,k) 1182 enddo 1183 fm(:,nlay+1)=0. 1184 1185 !!! nrlmd le 16/09/2010 1186 ! calcul de la valeur dans les ascendances 1187 ! do ig=1,ngrid 1188 ! qa(ig,1)=q(ig,1) 1189 ! enddo 1190 !!! 1191 1192 !do isrf=1,nsrf 1193 1194 ! q(:,:)=therm_tke(:,:,isrf) 1195 q(:,:)=therm_tke_max(:,:) 1196 !!! nrlmd le 16/09/2010 1197 do ig=1,ngrid 1198 qa(ig,1)=q(ig,1) 1199 enddo 1200 !!! 1201 1202 if (1==1) then 1203 do k=2,nlay 1204 do ig=1,ngrid 1205 if ((fm(ig,k+1)+detr(ig,k))*ptimestep.gt. & 1206 & 1.e-5*masse(ig,k)) then 1207 qa(ig,k)=(fm(ig,k)*qa(ig,k-1)+entr(ig,k)*q(ig,k)) & 1208 & /(fm(ig,k+1)+detr(ig,k)) 1209 else 1210 qa(ig,k)=q(ig,k) 1211 endif 1212 if (qa(ig,k).lt.0.) then 1213 ! print*,'qa<0!!!' 1214 endif 1215 if (q(ig,k).lt.0.) then 1216 ! print*,'q<0!!!' 1217 endif 1218 enddo 1219 enddo 1220 1221 ! Calcul du flux subsident 1222 1223 do k=2,nlay 1224 do ig=1,ngrid 1225 wqd(ig,k)=fm(ig,k)*q(ig,k) 1226 if (wqd(ig,k).lt.0.) then 1227 ! print*,'wqd<0!!!' 1228 endif 1229 enddo 1230 enddo 1231 do ig=1,ngrid 1232 wqd(ig,1)=0. 1233 wqd(ig,nlay+1)=0. 1234 enddo 1235 1236 ! Calcul des tendances 1237 do k=1,nlay 1238 do ig=1,ngrid 1239 q(ig,k)=q(ig,k)+(detr(ig,k)*qa(ig,k)-entr(ig,k)*q(ig,k) & 1240 & -wqd(ig,k)+wqd(ig,k+1)) & 1241 & *ptimestep/masse(ig,k) 1242 enddo 1243 enddo 1244 1245 endif 1246 1247 therm_tke_max(:,:)=q(:,:) 1248 1249 return 1250 !!! fin nrlmd le 10/04/2012 1251 end 1252
Note: See TracChangeset
for help on using the changeset viewer.