Changeset 2259 for LMDZ5/trunk/libf
- Timestamp:
- Apr 15, 2015, 12:51:04 PM (10 years ago)
- Location:
- LMDZ5/trunk/libf/phylmd
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ5/trunk/libf/phylmd/concvl.F90
r2253 r2259 1 1 SUBROUTINE concvl(iflag_clos, & 2 dtime, paprs, pplay, &2 dtime, paprs, pplay, k_upper_cv, & 3 3 t, q, t_wake, q_wake, s_wake, u, v, tra, ntra, & 4 4 Ale, Alp, sig1, w01, & … … 88 88 89 89 REAL dtime, paprs(klon, klev+1), pplay(klon, klev) 90 INTEGER k_upper_cv 90 91 REAL t(klon, klev), q(klon, klev), u(klon, klev), v(klon, klev) 91 92 REAL t_wake(klon, klev), q_wake(klon, klev) … … 405 406 !LF necessary for gathered fields 406 407 nloc = klon 407 CALL cva_driver(klon, klev, klev+1, ntra, nloc, &408 CALL cva_driver(klon, klev, klev+1, ntra, nloc, k_upper_cv, & 408 409 iflag_con, iflag_mix, iflag_ice_thermo, & 409 410 iflag_clos, ok_conserv_q, dtime, cvl_comp_threshold, & -
LMDZ5/trunk/libf/phylmd/cv3_routines.F90
r2257 r2259 5 5 6 6 7 SUBROUTINE cv3_param(nd, delt)7 SUBROUTINE cv3_param(nd, k_upper, delt) 8 8 9 9 use mod_phys_lmdz_para … … 36 36 include "conema3.h" 37 37 38 INTEGER nd 39 REAL delt ! timestep (seconds) 38 INTEGER, INTENT(IN) :: nd 39 INTEGER, INTENT(IN) :: k_upper 40 REAL, INTENT(IN) :: delt ! timestep (seconds) 40 41 41 42 … … 51 52 ! -- limit levels for convection: 52 53 53 noff = 1 54 !jyg< 55 ! noff is chosen such that nl = k_upper so that upmost loops end at about 22 km 56 ! 57 noff = min(max(nd-k_upper, 1), (nd+1)/2) 58 !! noff = 1 59 !>jyg 54 60 minorig = 1 55 61 nl = nd - noff … … 2797 2803 iflag, precip, Vprecip, ft, fr, fu, fv, ftra, & 2798 2804 cbmf, upwd, dnwd, dnwd0, ma, mip, & 2799 tls, tps, qcondc, wd, & 2805 !! tls, tps, ! useless . jyg 2806 qcondc, wd, & 2800 2807 ftd, fqd, qnk, qtc, sigt, tau_cld_cv, coefw_cld_cv) 2801 2808 … … 2845 2852 REAL dnwd0(nloc, nd), mip(nloc, nd) 2846 2853 REAL Vprecip(nloc, nd+1) 2847 REAL tls(nloc, nd), tps(nloc, nd) 2854 !! REAL tls(nloc, nd), tps(nloc, nd) ! useless . jyg 2848 2855 REAL qcondc(nloc, nd) ! cld 2849 2856 REAL qtc(nloc,nd), sigt(nloc,nd) ! cld … … 2857 2864 REAL cpinv, rdcp, dpinv 2858 2865 REAL awat(nloc) 2859 REAL lvcp(nloc, na), lfcp(nloc, na) , mke(nloc, na)2866 REAL lvcp(nloc, na), lfcp(nloc, na) ! , mke(nloc, na) ! unused . jyg 2860 2867 REAL am(nloc), work(nloc), ad(nloc), amp1(nloc) 2861 2868 !! real up1(nloc), dn1(nloc) … … 3782 3789 ! ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc 3783 3790 3784 DO i = 1, nd 3785 DO il = 1, ncum 3786 mke(il, i) = upwd(il, i) + dnwd(il, i) 3787 END DO 3788 END DO 3789 3790 DO i = 1, nd 3791 DO il = 1, ncum 3792 rdcp = (rrd*(1.-rr(il,i))-rr(il,i)*rrv)/(cpd*(1.-rr(il,i))+rr(il,i)*cpv) 3793 tls(il, i) = t(il, i)*(1000.0/p(il,i))**rdcp 3794 tps(il, i) = tp(il, i) 3795 END DO 3796 END DO 3791 !! DO i = 1, nd ! unused . jyg 3792 !! DO il = 1, ncum ! unused . jyg 3793 !! mke(il, i) = upwd(il, i) + dnwd(il, i) ! unused . jyg 3794 !! END DO ! unused . jyg 3795 !! END DO ! unused . jyg 3796 3797 !! DO i = 1, nd ! unused . jyg 3798 !! DO il = 1, ncum ! unused . jyg 3799 !! rdcp = (rrd*(1.-rr(il,i))-rr(il,i)*rrv)/(cpd*(1.-rr(il,i))+rr(il,i)*cpv) ! unused . jyg 3800 !! tls(il, i) = t(il, i)*(1000.0/p(il,i))**rdcp ! unused . jyg 3801 !! tps(il, i) = tp(il, i) ! unused . jyg 3802 !! END DO ! unused . jyg 3803 !! END DO ! unused . jyg 3797 3804 3798 3805 -
LMDZ5/trunk/libf/phylmd/cv3a_compress.F90
r2253 r2259 175 175 pbase(nn) = pbase1(i) 176 176 buoybase(nn) = buoybase1(i) 177 sig(nn, nd) = sig1(i, nd) 177 178 ptop2(nn) = ptop2(i) 178 179 Ale(nn) = Ale1(i) … … 192 193 ncum = len 193 194 ! 194 wghti(:, :) = wghti1(:,:)195 t(:, :) = t1(:,:)196 q(:, :) = q1(:,:)197 qs(:, :) = qs1(:,:)198 t_wake(:, :) = t1_wake(:,:)199 q_wake(:, :) = q1_wake(:,:)200 qs_wake(:, :) = qs1_wake(:,:)201 u(:, :) = u1(:,:)202 v(:, :) = v1(:,:)203 gz(:, :) = gz1(:,:)204 th(:, :) = th1(:,:)205 th_wake(:, :) = th1_wake(:,:)206 h(:, :) = h1(:,:)207 lv(:, :) = lv1(:,:)208 lf(:, :) = lf1(:,:)209 cpn(:, :) = cpn1(:,:)210 p(:, :) = p1(:,:)211 ph(:, :) = ph1(:,:)212 tv(:, :) = tv1(:,:)213 tp(:, :) = tp1(:,:)214 tvp(:, :) = tvp1(:,:)215 clw(:, :) = clw1(:,:)216 h_wake(:, :) = h1_wake(:,:)217 lv_wake(:, :) = lv1_wake(:,:)218 lf_wake(:, :) = lf1_wake(:,:)219 cpn_wake(:, :) = cpn1_wake(:,:)220 tv_wake(:, :) = tv1_wake(:,:)221 sig(:, :) = sig1(:,:)222 w0(:, :) = w01(:,:)223 omega(:, :) = omega1(:,:)195 wghti(:,1:nl+1) = wghti1(:,1:nl+1) 196 t(:,1:nl+1) = t1(:,1:nl+1) 197 q(:,1:nl+1) = q1(:,1:nl+1) 198 qs(:,1:nl+1) = qs1(:,1:nl+1) 199 t_wake(:,1:nl+1) = t1_wake(:,1:nl+1) 200 q_wake(:,1:nl+1) = q1_wake(:,1:nl+1) 201 qs_wake(:,1:nl+1) = qs1_wake(:,1:nl+1) 202 u(:,1:nl+1) = u1(:,1:nl+1) 203 v(:,1:nl+1) = v1(:,1:nl+1) 204 gz(:,1:nl+1) = gz1(:,1:nl+1) 205 th(:,1:nl+1) = th1(:,1:nl+1) 206 th_wake(:,1:nl+1) = th1_wake(:,1:nl+1) 207 h(:,1:nl+1) = h1(:,1:nl+1) 208 lv(:,1:nl+1) = lv1(:,1:nl+1) 209 lf(:,1:nl+1) = lf1(:,1:nl+1) 210 cpn(:,1:nl+1) = cpn1(:,1:nl+1) 211 p(:,1:nl+1) = p1(:,1:nl+1) 212 ph(:,1:nl+1) = ph1(:,1:nl+1) 213 tv(:,1:nl+1) = tv1(:,1:nl+1) 214 tp(:,1:nl+1) = tp1(:,1:nl+1) 215 tvp(:,1:nl+1) = tvp1(:,1:nl+1) 216 clw(:,1:nl+1) = clw1(:,1:nl+1) 217 h_wake(:,1:nl+1) = h1_wake(:,1:nl+1) 218 lv_wake(:,1:nl+1) = lv1_wake(:,1:nl+1) 219 lf_wake(:,1:nl+1) = lf1_wake(:,1:nl+1) 220 cpn_wake(:,1:nl+1) = cpn1_wake(:,1:nl+1) 221 tv_wake(:,1:nl+1) = tv1_wake(:,1:nl+1) 222 sig(:,1:nl+1) = sig1(:,1:nl+1) 223 w0(:,1:nl+1) = w01(:,1:nl+1) 224 omega(:,1:nl+1) = omega1(:,1:nl+1) 224 225 ! 225 226 s_wake(:) = s1_wake(:) … … 237 238 pbase(:) = pbase1(:) 238 239 buoybase(:) = buoybase1(:) 240 sig(:, nd) = sig1(:, nd) 239 241 ptop2(:) = ptop2(:) 240 242 Ale(:) = Ale1(:) -
LMDZ5/trunk/libf/phylmd/cv3a_uncompress.F90
r2253 r2259 124 124 !>jyg 125 125 DO i = 1, ncum 126 sig1(idcum(i), nd) = sig(i, nd) 126 127 ptop21(idcum(i)) = ptop2(i) 127 128 sigd1(idcum(i)) = sigd(i) … … 143 144 END DO 144 145 145 DO k = 1, n d146 DO k = 1, nl+1 146 147 DO i = 1, ncum 147 148 sig1(idcum(i), k) = sig(i, k) … … 178 179 END DO 179 180 END DO 180 181 DO i = 1, ncum182 sig1(idcum(i), nd) = sig(i, nd)183 END DO184 185 181 186 182 ! AC! do 2100 j=1,ntra … … 209 205 DO i = 1, ncum 210 206 jdcum=idcum(i) 211 phi1 (jdcum,:,:) = phi(i,:,:) !AC!212 phi21 (jdcum,:,:) = phi2(i,:,:)!RomP213 sigij1 (jdcum,:,:) = sigij(i,:,:)!RomP214 elij1 (jdcum,:,:) = elij(i,:,:)!RomP215 epmlmMm1(jdcum, :,:) = epmlmMm(i,:,:)!RomP+jyg207 phi1 (jdcum, 1:nl+1, 1:nl+1) = phi (i, 1:nl+1, 1:nl+1) !AC! 208 phi21 (jdcum, 1:nl+1, 1:nl+1) = phi2 (i, 1:nl+1, 1:nl+1) !RomP 209 sigij1 (jdcum, 1:nl+1, 1:nl+1) = sigij (i, 1:nl+1, 1:nl+1) !RomP 210 elij1 (jdcum, 1:nl+1, 1:nl+1) = elij (i, 1:nl+1, 1:nl+1) !RomP 211 epmlmMm1(jdcum, 1:nl+1, 1:nl+1) = epmlmMm(i, 1:nl+1, 1:nl+1) !RomP+jyg 216 212 END DO 217 213 !>jyg … … 231 227 ELSE !(compress) 232 228 ! 229 sig1(:,nd) = sig(:,nd) 233 230 ptop21(:) = ptop2(:) 234 231 sigd1(:) = sigd(:) … … 249 246 asupmaxmin1(:) = asupmaxmin(:) 250 247 ! 251 sig1(:,:) = sig(:,:) 252 w01(:,:) = w0(:,:) 253 ft1(:,:) = ft(:,:) 254 fq1(:,:) = fq(:,:) 255 fu1(:,:) = fu(:,:) 256 fv1(:,:) = fv(:,:) 257 ma1(:,:) = ma(:,:) 258 mip1(:,:) = mip(:,:) 259 vprecip1(:,:) = vprecip(:,:) 260 upwd1(:,:) = upwd(:,:) 261 dnwd1(:,:) = dnwd(:,:) 262 dnwd01(:,:) = dnwd0(:,:) 263 qcondc1(:,:) = qcondc(:,:) 264 tvp1(:,:) = tvp(:,:) 265 ftd1(:,:) = ftd(:,:) 266 fqd1(:,:) = fqd(:,:) 267 asupmax1(:,:) = asupmax(:,:) 268 269 da1(:,:) = da(:,:) !AC! 270 mp1(:,:) = mp(:,:) !RomP 271 d1a1(:,:) = d1a(:,:) !RomP 272 dam1(:,:) = dam(:,:) !RomP 273 clw1(:,:) = clw(:,:) !RomP 274 evap1(:,:) = evap(:,:) !RomP 275 ep1(:,:) = ep(:,:) !RomP 276 eplamM1(:,:) = eplamM(:,:) !RomP+jyg 277 wdtrainA1(:,:) = wdtrainA(:,:) !RomP 278 wdtrainM1(:,:) = wdtrainM(:,:) !RomP 279 qtc1(:,:) = qtc(:,:) 280 sigt1(:,:) = sigt(:,:) 281 ! 282 sig1(:,:) = sig(:,:) 283 ! 284 phi1(:,:,:) = phi(:,:,:) !AC! 285 phi21(:,:,:) = phi2(:,:,:) !RomP 286 sigij1(:,:,:) = sigij(:,:,:) !RomP 287 elij1(:,:,:) = elij(:,:,:) !RomP 288 epmlmMm1(:,:,:) = epmlmMm(:,:,:) !RomP+jyg 248 sig1(:, 1:nl+1) = sig(:, 1:nl+1) 249 w01(:, 1:nl+1) = w0(:, 1:nl+1) 250 ft1(:, 1:nl+1) = ft(:, 1:nl+1) 251 fq1(:, 1:nl+1) = fq(:, 1:nl+1) 252 fu1(:, 1:nl+1) = fu(:, 1:nl+1) 253 fv1(:, 1:nl+1) = fv(:, 1:nl+1) 254 ma1(:, 1:nl+1) = ma(:, 1:nl+1) 255 mip1(:, 1:nl+1) = mip(:, 1:nl+1) 256 vprecip1(:, 1:nl+1) = vprecip(:, 1:nl+1) 257 upwd1(:, 1:nl+1) = upwd(:, 1:nl+1) 258 dnwd1(:, 1:nl+1) = dnwd(:, 1:nl+1) 259 dnwd01(:, 1:nl+1) = dnwd0(:, 1:nl+1) 260 qcondc1(:, 1:nl+1) = qcondc(:, 1:nl+1) 261 tvp1(:, 1:nl+1) = tvp(:, 1:nl+1) 262 ftd1(:, 1:nl+1) = ftd(:, 1:nl+1) 263 fqd1(:, 1:nl+1) = fqd(:, 1:nl+1) 264 asupmax1(:, 1:nl+1) = asupmax(:, 1:nl+1) 265 266 da1(:, 1:nl+1) = da(:, 1:nl+1) !AC! 267 mp1(:, 1:nl+1) = mp(:, 1:nl+1) !RomP 268 d1a1(:, 1:nl+1) = d1a(:, 1:nl+1) !RomP 269 dam1(:, 1:nl+1) = dam(:, 1:nl+1) !RomP 270 clw1(:, 1:nl+1) = clw(:, 1:nl+1) !RomP 271 evap1(:, 1:nl+1) = evap(:, 1:nl+1) !RomP 272 ep1(:, 1:nl+1) = ep(:, 1:nl+1) !RomP 273 eplamM1(:, 1:nl+1) = eplamM(:, 1:nl+1) !RomP+jyg 274 wdtrainA1(:, 1:nl+1) = wdtrainA(:, 1:nl+1) !RomP 275 wdtrainM1(:, 1:nl+1) = wdtrainM(:, 1:nl+1) !RomP 276 qtc1(:, 1:nl+1) = qtc(:, 1:nl+1) 277 sigt1(:, 1:nl+1) = sigt(:, 1:nl+1) 278 ! 279 phi1 (:, 1:nl+1, 1:nl+1) = phi (:, 1:nl+1, 1:nl+1) !AC! 280 phi21 (:, 1:nl+1, 1:nl+1) = phi2 (:, 1:nl+1, 1:nl+1) !RomP 281 sigij1 (:, 1:nl+1, 1:nl+1) = sigij (:, 1:nl+1, 1:nl+1) !RomP 282 elij1 (:, 1:nl+1, 1:nl+1) = elij (:, 1:nl+1, 1:nl+1) !RomP 283 epmlmMm1(:, 1:nl+1, 1:nl+1) = epmlmMm(:, 1:nl+1, 1:nl+1) !RomP+jyg 289 284 ENDIF !(compress) 290 285 !>jyg -
LMDZ5/trunk/libf/phylmd/cva_driver.F90
r2255 r2259 2 2 ! $Id$ 3 3 4 SUBROUTINE cva_driver(len, nd, ndp1, ntra, nloc, &4 SUBROUTINE cva_driver(len, nd, ndp1, ntra, nloc, k_upper, & 5 5 iflag_con, iflag_mix, iflag_ice_thermo, iflag_clos, ok_conserv_q, & 6 6 !! delt, t1, q1, qs1, t1_wake, q1_wake, qs1_wake, s1_wake, & ! jyg … … 54 54 ! ndp1 Integer Input nd + 1 55 55 ! ntra Integer Input number of tracors 56 ! nloc Integer Input dimension of arrays for compressed fields 57 ! k_upper Integer Input upmost level for vertical loops 56 58 ! iflag_con Integer Input version of convect (3/4) 57 59 ! iflag_mix Integer Input version of mixing (0/1/2) … … 165 167 INTEGER, INTENT (IN) :: ndp1 166 168 INTEGER, INTENT (IN) :: ntra 169 INTEGER, INTENT(IN) :: nloc ! (nloc=klon) pour l'instant 170 INTEGER, INTENT (IN) :: k_upper 167 171 INTEGER, INTENT (IN) :: iflag_con 168 172 INTEGER, INTENT (IN) :: iflag_mix … … 435 439 ! (local) compressed fields: 436 440 437 INTEGER nloc438 ! parameter (nloc=klon) ! pour l'instant439 441 440 442 INTEGER idcum(nloc) … … 492 494 REAL fu(nloc, klev), fv(nloc, klev) 493 495 REAL upwd(nloc, klev), dnwd(nloc, klev), dnwd0(nloc, klev) 494 REAL ma(nloc, klev), mip(nloc, klev), tls(nloc, klev) 495 REAL tps(nloc, klev), qprime(nloc), tprime(nloc) 496 REAL ma(nloc, klev), mip(nloc, klev) 497 !! REAL tls(nloc, klev), tps(nloc, klev) ! unused . jyg 498 REAL qprime(nloc), tprime(nloc) 496 499 REAL precip(nloc) 497 500 ! real Vprecip(nloc,klev) … … 559 562 560 563 IF (iflag_con==3) THEN 561 CALL cv3_param(nd, delt)564 CALL cv3_param(nd, k_upper, delt) 562 565 563 566 END IF … … 1021 1024 iflag, precip, vprecip, ft, fq, fu, fv, ftra, & 1022 1025 cbmf, upwd, dnwd, dnwd0, ma, mip, & 1023 tls, tps, qcondc, wd, & 1026 !! tls, tps, & ! useless . jyg 1027 qcondc, wd, & 1024 1028 ftd, fqd, qnk, qtc, sigt, tau_cld_cv, coefw_cld_cv) 1025 1029 END IF -
LMDZ5/trunk/libf/phylmd/physiq.F90
r2245 r2259 316 316 SAVE top 317 317 !$OMP THREADPRIVATE(bas, top) 318 318 !------------------------------------------------------------------ 319 ! Upmost level reached by deep convection and related variable (jyg) 320 ! 321 INTEGER izero 322 INTEGER k_upper_cv 323 !------------------------------------------------------------------ 319 324 ! 320 325 !================================================================================================= … … 528 533 ! !par la masse/airetot (moyglo_pondaima) et la vraie masse (moyglo_pondmass) 529 534 ! 530 ! Variables locales 535 ! 536 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 537 ! Local variables 538 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 531 539 ! 532 540 REAL rhcl(klon,klev) ! humiditi relative ciel clair … … 570 578 REAL zx_t, zx_qs, zdelta, zcor, zlvdcp, zlsdcp 571 579 real zqsat(klon,klev) 580 ! 572 581 INTEGER i, k, iq, ig, j, nsrf, ll, l, iiq 582 ! 573 583 REAL t_coup 574 584 PARAMETER (t_coup=234.0) … … 885 895 igout=klon/2+1/klon 886 896 write(lunout,*) 'DEBUT DE PHYSIQ !!!!!!!!!!!!!!!!!!!!' 897 write(lunout,*) 'igout, rlat, rlon ',igout, rlatd(igout)*180./3.141593, rlond(igout)*180./3.141593 887 898 write(lunout,*) & 888 899 'nlon,klev,nqtot,debut,lafin, jD_cur, jH_cur,pdtphys' … … 904 915 905 916 if (first) then 906 917 907 918 !CR:nvelles variables convection/poches froides 908 919 … … 1333 1344 #endif 1334 1345 END IF 1335 !1336 1346 ! 1337 1347 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! … … 2230 2240 ! 2231 2241 IF (ok_cvl) THEN ! new driver for convectL 2232 2242 ! 2243 !jyg< 2244 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 2245 ! Calculate the upmost level of deep convection loops: k_upper_cv 2246 ! (near 22 km) 2247 izero = igout 2248 DO i = 1,klon 2249 IF (abs(rlatd(i)) < 4.e-2 .AND. abs(rlond(i)) < 4.e-2) izero = i 2250 ENDDO 2251 ! 2252 k_upper_cv = klev 2253 DO k = klev,1,-1 2254 IF (pphi(izero,k) > 22.e4) k_upper_cv = k 2255 ENDDO 2256 IF (prt_level .ge. 5) THEN 2257 Print *, 'upmost level of deep convection loops: k_upper_cv = ',k_upper_cv 2258 ENDIF 2259 ! 2260 !>jyg 2233 2261 IF (type_trac == 'repr') THEN 2234 2262 nbtr_tmp=ntra … … 2239 2267 !c CALL concvl (iflag_con,iflag_clos, 2240 2268 CALL concvl (iflag_clos, & 2241 dtime, paprs,pplay,t_undi,q_undi, &2269 dtime, paprs, pplay, k_upper_cv, t_undi,q_undi, & 2242 2270 t_wake,q_wake,wake_s, & 2243 2271 u_seri,v_seri,tr_seri,nbtr_tmp, &
Note: See TracChangeset
for help on using the changeset viewer.