Changeset 90 in lmdz_wrf
- Timestamp:
- Jul 25, 2014, 12:33:59 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/LMDZ_WRFmeas/WRFV3/lmdz/thermcell_main.F90
r89 r90 105 105 106 106 INTEGER ig,k,l,ll,ierr 107 real zsortie1d( klon)108 INTEGER lmax( klon),lmin(klon),lalim(klon)109 INTEGER lmix( klon)110 INTEGER lmix_bis( klon)111 real linter( klon)112 real zmix( klon)113 real zmax( klon),zw2(klon,klev+1),ztva(klon,klev),zw_est(klon,klev+1),ztva_est(klon,klev)114 ! real fraca( klon,klev)115 116 real zmax_sec( klon)107 real zsortie1d(ngrid) 108 INTEGER lmax(ngrid),lmin(ngrid),lalim(ngrid) 109 INTEGER lmix(ngrid) 110 INTEGER lmix_bis(ngrid) 111 real linter(ngrid) 112 real zmix(ngrid) 113 real zmax(ngrid),zw2(ngrid,nlay+1),ztva(ngrid,nlay),zw_est(ngrid,nlay+1),ztva_est(ngrid,nlay) 114 ! real fraca(ngrid,nlay) 115 116 real zmax_sec(ngrid) 117 117 !on garde le zmax du pas de temps precedent 118 real zmax0( klon)118 real zmax0(ngrid) 119 119 !FH/IM save zmax0 120 120 121 121 real lambda 122 122 123 real zlev( klon,klev+1),zlay(klon,klev)124 real deltaz( klon,klev)125 REAL zh( klon,klev)126 real zthl( klon,klev),zdthladj(klon,klev)127 REAL ztv( klon,klev)128 real zu( klon,klev),zv(klon,klev),zo(klon,klev)129 real zl( klon,klev)130 real zsortie( klon,klev)131 real zva( klon,klev)132 real zua( klon,klev)133 real zoa( klon,klev)134 135 real zta( klon,klev)136 real zha( klon,klev)137 real fraca( klon,klev+1)123 real zlev(ngrid,nlay+1),zlay(ngrid,nlay) 124 real deltaz(ngrid,nlay) 125 REAL zh(ngrid,nlay) 126 real zthl(ngrid,nlay),zdthladj(ngrid,nlay) 127 REAL ztv(ngrid,nlay) 128 real zu(ngrid,nlay),zv(ngrid,nlay),zo(ngrid,nlay) 129 real zl(ngrid,nlay) 130 real zsortie(ngrid,nlay) 131 real zva(ngrid,nlay) 132 real zua(ngrid,nlay) 133 real zoa(ngrid,nlay) 134 135 real zta(ngrid,nlay) 136 real zha(ngrid,nlay) 137 real fraca(ngrid,nlay+1) 138 138 real zf,zf2 139 real thetath2( klon,klev),wth2(klon,klev),wth3(klon,klev)140 real q2( klon,klev)139 real thetath2(ngrid,nlay),wth2(ngrid,nlay),wth3(ngrid,nlay) 140 real q2(ngrid,nlay) 141 141 ! FH probleme de dimensionnement avec l'allocation dynamique 142 142 ! common/comtherm/thetath2,wth2 143 real wq( klon,klev)144 real wthl( klon,klev)145 real wthv( klon,klev)143 real wq(ngrid,nlay) 144 real wthl(ngrid,nlay) 145 real wthv(ngrid,nlay) 146 146 147 real ratqscth( klon,klev)147 real ratqscth(ngrid,nlay) 148 148 real var 149 149 real vardiff 150 real ratqsdiff( klon,klev)150 real ratqsdiff(ngrid,nlay) 151 151 152 152 logical sorties 153 real rho( klon,klev),rhobarz(klon,klev),masse(klon,klev)154 real zpspsk( klon,klev)155 156 real wmax( klon)157 real wmax_tmp( klon)158 real wmax_sec( klon)159 real fm0( klon,klev+1),entr0(klon,klev),detr0(klon,klev)160 real fm( klon,klev+1),entr(klon,klev),detr(klon,klev)161 162 real ztla( klon,klev),zqla(klon,klev),zqta(klon,klev)153 real rho(ngrid,nlay),rhobarz(ngrid,nlay),masse(ngrid,nlay) 154 real zpspsk(ngrid,nlay) 155 156 real wmax(ngrid) 157 real wmax_tmp(ngrid) 158 real wmax_sec(ngrid) 159 real fm0(ngrid,nlay+1),entr0(ngrid,nlay),detr0(ngrid,nlay) 160 real fm(ngrid,nlay+1),entr(ngrid,nlay),detr(ngrid,nlay) 161 162 real ztla(ngrid,nlay),zqla(ngrid,nlay),zqta(ngrid,nlay) 163 163 !niveau de condensation 164 integer nivcon( klon)165 real zcon( klon)164 integer nivcon(ngrid) 165 real zcon(ngrid) 166 166 REAL CHI 167 real zcon2( klon)168 real pcon( klon)169 real zqsat( klon,klev)170 real zqsatth( klon,klev)171 172 real f_star( klon,klev+1),entr_star(klon,klev)173 real detr_star( klon,klev)174 real alim_star_tot( klon)175 real alim_star( klon,klev)176 real alim_star_clos( klon,klev)177 real f( klon), f0(klon)167 real zcon2(ngrid) 168 real pcon(ngrid) 169 real zqsat(ngrid,nlay) 170 real zqsatth(ngrid,nlay) 171 172 real f_star(ngrid,nlay+1),entr_star(ngrid,nlay) 173 real detr_star(ngrid,nlay) 174 real alim_star_tot(ngrid) 175 real alim_star(ngrid,nlay) 176 real alim_star_clos(ngrid,nlay) 177 real f(ngrid), f0(ngrid) 178 178 !FH/IM save f0 179 real zlevinter( klon)179 real zlevinter(ngrid) 180 180 logical debut 181 181 real seuil 182 real csc( klon,klev)182 real csc(ngrid,nlay) 183 183 184 184 !!! nrlmd le 10/04/2012 185 185 186 186 !------Entrées 187 real pbl_tke( klon,klev+1,nbsrf)188 real pctsrf( klon,nbsrf)189 real omega( klon,klev)190 real airephy( klon)187 real pbl_tke(ngrid,nlay+1,nbsrf) 188 real pctsrf(ngrid,nbsrf) 189 real omega(ngrid,nlay) 190 real airephy(ngrid) 191 191 !------Sorties 192 real zlcl( klon),fraca0(klon),w0(klon),w_conv(klon)193 real therm_tke_max0( klon),env_tke_max0(klon)194 real n2( klon),s2(klon)195 real ale_bl_stat( klon)196 real therm_tke_max( klon,klev),env_tke_max(klon,klev)197 real alp_bl_det( klon),alp_bl_fluct_m(klon),alp_bl_fluct_tke(klon),alp_bl_conv(klon),alp_bl_stat(klon)192 real zlcl(ngrid),fraca0(ngrid),w0(ngrid),w_conv(ngrid) 193 real therm_tke_max0(ngrid),env_tke_max0(ngrid) 194 real n2(ngrid),s2(ngrid) 195 real ale_bl_stat(ngrid) 196 real therm_tke_max(ngrid,nlay),env_tke_max(ngrid,nlay) 197 real alp_bl_det(ngrid),alp_bl_fluct_m(ngrid),alp_bl_fluct_tke(ngrid),alp_bl_conv(ngrid),alp_bl_stat(ngrid) 198 198 !------Local 199 199 integer nsrf 200 real rhobarz0( klon) ! Densité au LCL201 logical ok_lcl( klon) ! Existence du LCL des thermiques202 integer klcl( klon) ! Niveau du LCL203 real interp( klon) ! Coef d'interpolation pour le LCL200 real rhobarz0(ngrid) ! Densité au LCL 201 logical ok_lcl(ngrid) ! Existence du LCL des thermiques 202 integer klcl(ngrid) ! Niveau du LCL 203 real interp(ngrid) ! Coef d'interpolation pour le LCL 204 204 !--Triggering 205 205 real Su ! Surface unité: celle d'un updraft élémentaire … … 215 215 real zmax_moy_coef 216 216 parameter(zmax_moy_coef=0.33) 217 real depth( klon) ! Epaisseur moyenne du cumulus218 real w_max( klon) ! Vitesse max statistique219 real s_max( klon)217 real depth(ngrid) ! Epaisseur moyenne du cumulus 218 real w_max(ngrid) ! Vitesse max statistique 219 real s_max(ngrid) 220 220 !--Closure 221 real pbl_tke_max( klon,klev) ! Profil de TKE moyenne222 real pbl_tke_max0( klon) ! TKE moyenne au LCL223 real w_ls( klon,klev) ! Vitesse verticale grande échelle (m/s)221 real pbl_tke_max(ngrid,nlay) ! Profil de TKE moyenne 222 real pbl_tke_max0(ngrid) ! TKE moyenne au LCL 223 real w_ls(ngrid,nlay) ! Vitesse verticale grande échelle (m/s) 224 224 real coef_m ! On considère un rendement pour alp_bl_fluct_m 225 225 parameter(coef_m=1.) … … 231 231 ! 232 232 !nouvelles variables pour la convection 233 real Ale_bl( klon)234 real Alp_bl( klon)235 real alp_int( klon),dp_int(klon),zdp236 real ale_int( klon)237 integer n_int( klon)238 real fm_tot( klon)239 real wght_th( klon,klev)240 integer lalim_conv( klon)233 real Ale_bl(ngrid) 234 real Alp_bl(ngrid) 235 real alp_int(ngrid),dp_int(ngrid),zdp 236 real ale_int(ngrid) 237 integer n_int(ngrid) 238 real fm_tot(ngrid) 239 real wght_th(ngrid,nlay) 240 integer lalim_conv(ngrid) 241 241 !v1d logical therm 242 242 !v1d save therm … … 319 319 320 320 sorties=.true. 321 IF(ngrid.NE. klon) THEN321 IF(ngrid.NE.ngrid) THEN 322 322 PRINT* 323 323 PRINT*,'STOP dans convadj' 324 324 PRINT*,'ngrid =',ngrid 325 PRINT*,' klon =',klon325 PRINT*,'ngrid =',ngrid 326 326 ENDIF 327 327 ! 328 328 ! write(lunout,*)'WARNING thermcell_main f0=max(f0,1.e-2)' 329 do ig=1, klon329 do ig=1,ngrid 330 330 f0(ig)=max(f0(ig),1.e-2) 331 331 zmax0(ig)=max(zmax0(ig),40.) … … 344 344 lfname='before thermcell_env' 345 345 lvarname = 'pt' 346 CALL check_var3D(lfname, lvarname, pt, klon, klev, largest, .FALSE.)346 CALL check_var3D(lfname, lvarname, pt, ngrid, nlay, largest, .FALSE.) 347 347 lvarname = 'pdtadj' 348 CALL check_var3D(lfname, lvarname, pdtadj, klon, klev, largest, .FALSE.)348 CALL check_var3D(lfname, lvarname, pdtadj, ngrid, nlay, largest, .FALSE.) 349 349 350 350 CALL thermcell_env(ngrid,nlay,po,pt,pu,pv,pplay, & … … 353 353 lfname='after thermcell_env' 354 354 lvarname = 'pt' 355 CALL check_var3D(lfname, lvarname, pt, klon, klev, largest, .FALSE.)355 CALL check_var3D(lfname, lvarname, pt, ngrid, nlay, largest, .FALSE.) 356 356 lvarname = 'pdtadj' 357 CALL check_var3D(lfname, lvarname, pdtadj, klon, klev, largest, .FALSE.)357 CALL check_var3D(lfname, lvarname, pdtadj, ngrid, nlay, largest, .FALSE.) 358 358 359 359 if (prt_level.ge.1) print*,'thermcell_main apres thermcell_env' … … 385 385 enddo 386 386 zlev(:,1)=0. 387 zlev(:,nlay+1)=(2.*pphi(:, klev)-pphi(:,klev-1))/RG387 zlev(:,nlay+1)=(2.*pphi(:,nlay)-pphi(:,nlay-1))/RG 388 388 do l=1,nlay 389 389 zlay(:,l)=pphi(:,l)/RG … … 513 513 lfname='after thermcell_plume' 514 514 lvarname = 'pt' 515 CALL check_var3D(lfname, lvarname, pt, klon, klev, largest, .FALSE.)515 CALL check_var3D(lfname, lvarname, pt, ngrid, nlay, largest, .FALSE.) 516 516 lvarname = 'pdtadj' 517 CALL check_var3D(lfname, lvarname, pdtadj, klon, klev, largest, .FALSE.)517 CALL check_var3D(lfname, lvarname, pdtadj, ngrid, nlay, largest, .FALSE.) 518 518 519 519 if (prt_level.ge.1) print*,'apres thermcell_plume ',lev_out … … 633 633 lfname='after flux' 634 634 lvarname = 'fm' 635 CALL check_var3D(lfname, lvarname, fm, klon, klev, largest, .FALSE.)635 CALL check_var3D(lfname, lvarname, fm, ngrid, nlay, largest, .FALSE.) 636 636 637 637 if (prt_level.ge.1) print*,'thermcell_main apres thermcell_flux' … … 662 662 lfname='before transport_vertical' 663 663 lvarname = 'zdthladj' 664 CALL check_var3D(lfname, lvarname, zdthladj, klon, klev, largest, .FALSE.)664 CALL check_var3D(lfname, lvarname, zdthladj, ngrid, nlay, largest, .FALSE.) 665 665 666 666 call thermcell_dq(ngrid,nlay,dqimpl,ptimestep,fm0,entr0,masse, & … … 670 670 lfname='after transport_vertical' 671 671 lvarname = 'zdthladj' 672 CALL check_var3D(lfname, lvarname, zdthladj, klon, klev, largest, .FALSE.)672 CALL check_var3D(lfname, lvarname, zdthladj, ngrid, nlay, largest, .FALSE.) 673 673 674 674 !------------------------------------------------------------------ 675 675 ! Calcul de la fraction de l'ascendance 676 676 !------------------------------------------------------------------ 677 do ig=1, klon677 do ig=1,ngrid 678 678 fraca(ig,1)=0. 679 679 fraca(ig,nlay+1)=0. 680 680 enddo 681 681 do l=2,nlay 682 do ig=1, klon682 do ig=1,ngrid 683 683 if (zw2(ig,l).gt.1.e-10) then 684 684 fraca(ig,l)=fm(ig,l)/(rhobarz(ig,l)*zw2(ig,l)) … … 694 694 lfname='before thermcell_dv2' 695 695 lvarname = 'pt' 696 CALL check_var3D(lfname, lvarname, pt, klon, klev, largest, .FALSE.)696 CALL check_var3D(lfname, lvarname, pt, ngrid, nlay, largest, .FALSE.) 697 697 lvarname = 'pdtadj' 698 CALL check_var3D(lfname, lvarname, pdtadj, klon, klev, largest, .FALSE.)698 CALL check_var3D(lfname, lvarname, pdtadj, ngrid, nlay, largest, .FALSE.) 699 699 700 700 !IM 090508 … … 727 727 lfname='after thermcell_dv2' 728 728 lvarname = 'pt' 729 CALL check_var3D(lfname, lvarname, pt, klon, klev, largest, .FALSE.)729 CALL check_var3D(lfname, lvarname, pt, ngrid, nlay, largest, .FALSE.) 730 730 lvarname = 'pdtadj' 731 CALL check_var3D(lfname, lvarname, pdtadj, klon, klev, largest, .FALSE.)731 CALL check_var3D(lfname, lvarname, pdtadj, ngrid, nlay, largest, .FALSE.) 732 732 lvarname = 'zdthladj' 733 733 CALL check_var3D(lfname, lvarname, zdthladj, ngrid, nlay, largest, .FALSE.) … … 833 833 do ig=1,ngrid 834 834 ok_lcl(ig)=.false. 835 if ( (pcon(ig) .gt. pplay(ig, klev-1)) .and. (pcon(ig) .lt. pplay(ig,1)) ) ok_lcl(ig)=.true.835 if ( (pcon(ig) .gt. pplay(ig,nlay-1)) .and. (pcon(ig) .lt. pplay(ig,1)) ) ok_lcl(ig)=.true. 836 836 enddo 837 837 … … 1000 1000 lfname='thermcell_main before closure' 1001 1001 lvarname = 'pt' 1002 CALL check_var3D(lfname, lvarname, pt, klon, klev, largest, .FALSE.)1002 CALL check_var3D(lfname, lvarname, pt, ngrid, nlay, largest, .FALSE.) 1003 1003 lvarname = 'pdtadj' 1004 CALL check_var3D(lfname, lvarname, pdtadj, klon, klev, largest, .FALSE.)1004 CALL check_var3D(lfname, lvarname, pdtadj, ngrid, nlay, largest, .FALSE.) 1005 1005 lvarname = 'alp_bl_det' 1006 CALL check_var(lfname, lvarname, alp_bl_det, klon, largest, .FALSE.)1006 CALL check_var(lfname, lvarname, alp_bl_det,ngrid, largest, .FALSE.) 1007 1007 lvarname = 'rhobarz0' 1008 CALL check_var(lfname, lvarname, rhobarz0, klon, largest, .FALSE.)1008 CALL check_var(lfname, lvarname, rhobarz0,ngrid, largest, .FALSE.) 1009 1009 lvarname = 'fraca0' 1010 CALL check_var(lfname, lvarname, fraca0, klon, largest, .FALSE.)1010 CALL check_var(lfname, lvarname, fraca0,ngrid, largest, .FALSE.) 1011 1011 lvarname = 'w_conv' 1012 CALL check_var(lfname, lvarname, w_conv, klon, largest, .FALSE.)1012 CALL check_var(lfname, lvarname, w_conv,ngrid, largest, .FALSE.) 1013 1013 lvarname = 'w0' 1014 CALL check_var(lfname, lvarname, w0, klon, largest, .FALSE.)1014 CALL check_var(lfname, lvarname, w0,ngrid, largest, .FALSE.) 1015 1015 lvarname = 'alp_bl_fluct_m' 1016 CALL check_var(lfname, lvarname, alp_bl_fluct_m, klon, largest, .FALSE.)1016 CALL check_var(lfname, lvarname, alp_bl_fluct_m,ngrid, largest, .FALSE.) 1017 1017 lvarname = 'alp_bl_fluct_tke' 1018 CALL check_var(lfname, lvarname, alp_bl_fluct_tke, klon, largest, .FALSE.)1018 CALL check_var(lfname, lvarname, alp_bl_fluct_tke,ngrid, largest, .FALSE.) 1019 1019 lvarname = 'therm_tke_max0' 1020 CALL check_var(lfname, lvarname, therm_tke_max0, klon, largest, .FALSE.)1020 CALL check_var(lfname, lvarname, therm_tke_max0,ngrid, largest, .FALSE.) 1021 1021 lvarname = 'env_tke_max0' 1022 CALL check_var(lfname, lvarname, env_tke_max0, klon, largest, .FALSE.)1022 CALL check_var(lfname, lvarname, env_tke_max0,ngrid, largest, .FALSE.) 1023 1023 lvarname = 'pbl_tke_max0' 1024 CALL check_var(lfname, lvarname, pbl_tke_max0, klon, largest, .FALSE.)1024 CALL check_var(lfname, lvarname, pbl_tke_max0,ngrid, largest, .FALSE.) 1025 1025 lvarname = 'alp_bl_conv' 1026 CALL check_var(lfname, lvarname, alp_bl_conv, klon, largest, .FALSE.)1026 CALL check_var(lfname, lvarname, alp_bl_conv,ngrid, largest, .FALSE.) 1027 1027 lvarname = 'alp_bl_stat' 1028 CALL check_var(lfname, lvarname, alp_bl_stat, klon, largest, .FALSE.)1028 CALL check_var(lfname, lvarname, alp_bl_stat,ngrid, largest, .FALSE.) 1029 1029 !------------Closure------------------ 1030 1030 … … 1055 1055 lfname='after closure' 1056 1056 lvarname = 'pt' 1057 CALL check_var3D(lfname, lvarname, pt, klon, klev, largest, .FALSE.)1057 CALL check_var3D(lfname, lvarname, pt, ngrid, nlay, largest, .FALSE.) 1058 1058 lvarname = 'pdtadj' 1059 CALL check_var3D(lfname, lvarname, pdtadj, klon, klev, largest, .FALSE.)1059 CALL check_var3D(lfname, lvarname, pdtadj, ngrid, nlay, largest, .FALSE.) 1060 1060 lvarname = 'alp_bl_det' 1061 CALL check_var(lfname, lvarname, alp_bl_det, klon, largest, .FALSE.)1061 CALL check_var(lfname, lvarname, alp_bl_det,ngrid, largest, .FALSE.) 1062 1062 lvarname = 'rhobarz0' 1063 CALL check_var(lfname, lvarname, rhobarz0, klon, largest, .FALSE.)1063 CALL check_var(lfname, lvarname, rhobarz0,ngrid, largest, .FALSE.) 1064 1064 lvarname = 'fraca0' 1065 CALL check_var(lfname, lvarname, fraca0, klon, largest, .FALSE.)1065 CALL check_var(lfname, lvarname, fraca0,ngrid, largest, .FALSE.) 1066 1066 lvarname = 'w_conv' 1067 CALL check_var(lfname, lvarname, w_conv, klon, largest, .FALSE.)1067 CALL check_var(lfname, lvarname, w_conv,ngrid, largest, .FALSE.) 1068 1068 lvarname = 'w0' 1069 CALL check_var(lfname, lvarname, w0, klon, largest, .FALSE.)1069 CALL check_var(lfname, lvarname, w0,ngrid, largest, .FALSE.) 1070 1070 lvarname = 'alp_bl_fluct_m' 1071 CALL check_var(lfname, lvarname, alp_bl_fluct_m, klon, largest, .FALSE.)1071 CALL check_var(lfname, lvarname, alp_bl_fluct_m,ngrid, largest, .FALSE.) 1072 1072 lvarname = 'alp_bl_fluct_tke' 1073 CALL check_var(lfname, lvarname, alp_bl_fluct_tke, klon, largest, .FALSE.)1073 CALL check_var(lfname, lvarname, alp_bl_fluct_tke,ngrid, largest, .FALSE.) 1074 1074 lvarname = 'therm_tke_max0' 1075 CALL check_var(lfname, lvarname, therm_tke_max0, klon, largest, .FALSE.)1075 CALL check_var(lfname, lvarname, therm_tke_max0,ngrid, largest, .FALSE.) 1076 1076 lvarname = 'env_tke_max0' 1077 CALL check_var(lfname, lvarname, env_tke_max0, klon, largest, .FALSE.)1077 CALL check_var(lfname, lvarname, env_tke_max0,ngrid, largest, .FALSE.) 1078 1078 lvarname = 'pbl_tke_max0' 1079 CALL check_var(lfname, lvarname, pbl_tke_max0, klon, largest, .FALSE.)1079 CALL check_var(lfname, lvarname, pbl_tke_max0,ngrid, largest, .FALSE.) 1080 1080 lvarname = 'alp_bl_conv' 1081 CALL check_var(lfname, lvarname, alp_bl_conv, klon, largest, .FALSE.)1081 CALL check_var(lfname, lvarname, alp_bl_conv,ngrid, largest, .FALSE.) 1082 1082 lvarname = 'alp_bl_stat' 1083 CALL check_var(lfname, lvarname, alp_bl_stat, klon, largest, .FALSE.)1083 CALL check_var(lfname, lvarname, alp_bl_stat,ngrid, largest, .FALSE.) 1084 1084 1085 1085 !!! fin nrlmd le 10/04/2012 … … 1113 1113 lalim_conv(:)=lalim(:) 1114 1114 1115 do k=1, klev1115 do k=1,nlay 1116 1116 do ig=1,ngrid 1117 1117 if (k<=lalim_conv(ig)) fm_tot(ig)=fm_tot(ig)+fm(ig,k) … … 1120 1120 lfname='after calculation of Al[p/e]_bl' 1121 1121 lvarname = 'fm' 1122 CALL check_var3D(lfname, lvarname, fm, klon, klev, largest, .FALSE.)1122 CALL check_var3D(lfname, lvarname, fm, ngrid, nlay, largest, .FALSE.) 1123 1123 lvarname = 'rhobarz' 1124 CALL check_var3D(lfname, lvarname, rhobarz, klon, klev, largest, .FALSE.)1124 CALL check_var3D(lfname, lvarname, rhobarz, ngrid, nlay, largest, .FALSE.) 1125 1125 lvarname = 'Alp_bl' 1126 CALL check_var(lfname, lvarname, Alp_bl, klon, largest, .FALSE.)1126 CALL check_var(lfname, lvarname, Alp_bl, ngrid, largest, .FALSE.) 1127 1127 lvarname = 'Ale_bl' 1128 CALL check_var(lfname, lvarname, Ale_bl, klon, largest, .FALSE.)1128 CALL check_var(lfname, lvarname, Ale_bl, ngrid, largest, .FALSE.) 1129 1129 1130 1130 ! assez bizarre car, si on est dans la couche d'alim et que alim_star et 1131 1131 ! plus petit que 1.e-10, on prend wght_th=1. 1132 do k=1, klev1132 do k=1,nlay 1133 1133 do ig=1,ngrid 1134 1134 if (k<=lalim_conv(ig).and.alim_star(ig,k)>1.e-10) then … … 1183 1183 lfname='thermcell_main last computations on Alp_bl' 1184 1184 lvarname = 'alp_int' 1185 CALL check_var(lfname, lvarname, alp_int, klon, largest*10.e4, .FALSE.)1185 CALL check_var(lfname, lvarname, alp_int, ngrid, largest*10.e4, .FALSE.) 1186 1186 lvarname = 'dp_int' 1187 CALL check_var3D(lfname, lvarname, dp_int, klon, largest, .FALSE.)1187 CALL check_var3D(lfname, lvarname, dp_int, ngrid, largest, .FALSE.) 1188 1188 lvarname = 'Alp_bl' 1189 CALL check_var(lfname, lvarname, Alp_bl, klon, klev, largest, .FALSE.)1189 CALL check_var(lfname, lvarname, Alp_bl, ngrid, largest, .FALSE.) 1190 1190 1191 1191 !------------------------------------------------------------------------ … … 1198 1198 ratqsdiff(:,:)=0. 1199 1199 1200 do l=1, klev1200 do l=1,nlay 1201 1201 do ig=1,ngrid 1202 1202 if (l<=lalim(ig)) then … … 1208 1208 if (prt_level.ge.1) print*,'14f OK convect8' 1209 1209 1210 do l=1, klev1210 do l=1,nlay 1211 1211 do ig=1,ngrid 1212 1212 if (l<=lalim(ig)) then … … 1241 1241 lfname='before leaving thermcell_main' 1242 1242 lvarname = 'pt' 1243 CALL check_var3D(lfname, lvarname, pt, klon, klev, largest, .FALSE.)1243 CALL check_var3D(lfname, lvarname, pt, ngrid, nlay, largest, .FALSE.) 1244 1244 lvarname = 'pdtadj' 1245 CALL check_var3D(lfname, lvarname, pdtadj, klon, klev, largest, .FALSE.)1245 CALL check_var3D(lfname, lvarname, pdtadj, ngrid, nlay, largest, .FALSE.) 1246 1246 lvarname = 'Alp_bl' 1247 CALL check_var(lfname, lvarname, Alp_bl, klon, klev, largest, .FALSE.)1247 CALL check_var(lfname, lvarname, Alp_bl, ngrid, largest, .FALSE.) 1248 1248 lvarname = 'Ale_bl' 1249 CALL check_var(lfname, lvarname, Ale_bl, klon, klev, largest, .FALSE.)1249 CALL check_var(lfname, lvarname, Ale_bl, ngrid, largest, .FALSE.) 1250 1250 1251 1251 … … 1255 1255 !----------------------------------------------------------------------------- 1256 1256 1257 subroutine test_ltherm( klon,klev,pplev,pplay,long,seuil,ztv,po,ztva,zqla,f_star,zw2,comment)1257 subroutine test_ltherm(ngrid,nlay,pplev,pplay,long,seuil,ztv,po,ztva,zqla,f_star,zw2,comment) 1258 1258 IMPLICIT NONE 1259 1259 #include "iniprint.h" 1260 1260 1261 integer i, k, klon,klev1262 real pplev( klon,klev+1),pplay(klon,klev)1263 real ztv( klon,klev)1264 real po( klon,klev)1265 real ztva( klon,klev)1266 real zqla( klon,klev)1267 real f_star( klon,klev)1268 real zw2( klon,klev)1269 integer long( klon)1261 integer i, k, ngrid,nlay 1262 real pplev(ngrid,nlay+1),pplay(ngrid,nlay) 1263 real ztv(ngrid,nlay) 1264 real po(ngrid,nlay) 1265 real ztva(ngrid,nlay) 1266 real zqla(ngrid,nlay) 1267 real f_star(ngrid,nlay) 1268 real zw2(ngrid,nlay) 1269 integer long(ngrid) 1270 1270 real seuil 1271 1271 character*21 comment … … 1277 1277 1278 1278 ! test sur la hauteur des thermiques ... 1279 do i=1, klon1279 do i=1,ngrid 1280 1280 !IMtemp if (pplay(i,long(i)).lt.seuil*pplev(i,1)) then 1281 1281 if (prt_level.ge.10) then 1282 1282 print*,'WARNING ',comment,' au point ',i,' K= ',long(i) 1283 1283 print*,' K P(MB) THV(K) Qenv(g/kg)THVA QLA(g/kg) F* W2' 1284 do k=1, klev1284 do k=1,nlay 1285 1285 write(6,'(i3,7f10.3)') k,pplay(i,k),ztv(i,k),1000*po(i,k),ztva(i,k),1000*zqla(i,k),f_star(i,k),zw2(i,k) 1286 1286 enddo
Note: See TracChangeset
for help on using the changeset viewer.