Changeset 2257
- Timestamp:
- Apr 7, 2015, 11:47:46 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ5/trunk/libf/phylmd/cv3_routines.F90
r2253 r2257 1352 1352 ! first estimate of buoyancy: 1353 1353 1354 DO i = 1, ncum 1355 DO k = 1, nl 1354 !jyg : k-loop outside i-loop (07042015) 1355 DO k = 1, nl 1356 DO i = 1, ncum 1356 1357 buoy(i, k) = tvp(i, k) - tv(i, k) 1357 1358 END DO … … 1361 1362 ! for safety, set buoy(icb)=buoybase 1362 1363 1363 DO i = 1, ncum 1364 DO k = 1, nl 1364 !jyg : k-loop outside i-loop (07042015) 1365 DO k = 1, nl 1366 DO i = 1, ncum 1365 1367 IF ((k>=icb(i)) .AND. (k<=nl) .AND. (p(i,k)>=pbase(i))) THEN 1366 1368 buoy(i, k) = buoybase(i) 1367 1369 END IF 1368 1370 END DO 1371 END DO 1372 DO i = 1, ncum 1369 1373 ! buoy(icb(i),k)=buoybase(i) 1370 1374 buoy(i, icb(i)) = buoybase(i) … … 1511 1515 END DO 1512 1516 1513 DO k = minorig + 1, nl 1514 DO i = 1, ncum 1515 IF ((k>=icb(i)) .AND. (k<=inb(i))) THEN 1516 1517 IF (cvflag_ice) THEN 1517 !jyg : cvflag_ice test outside the loops (07042015) 1518 ! 1519 IF (cvflag_ice) THEN 1520 ! 1521 DO k = minorig + 1, nl 1522 DO i = 1, ncum 1523 IF ((k>=icb(i)) .AND. (k<=inb(i))) THEN 1518 1524 frac(i, k) = 1. - (t(i,k)-243.15)/(263.15-243.15) 1519 1525 frac(i, k) = min(max(frac(i,k),0.0), 1.0) 1520 1526 hp(i, k) = hnk(i) + (lv(i,k)+(cpd-cpv)*t(i,k)+frac(i,k)*lf(i,k))* & 1521 1527 ep(i, k)*clw(i, k) 1522 1523 ELSE 1528 END IF 1529 END DO 1530 END DO 1531 ! 1532 ELSE 1533 ! 1534 DO k = minorig + 1, nl 1535 DO i = 1, ncum 1536 IF ((k>=icb(i)) .AND. (k<=inb(i))) THEN 1524 1537 hp(i, k) = hnk(i) + (lv(i,k)+(cpd-cpv)*t(i,k))*ep(i, k)*clw(i, k) 1525 1538 END IF 1526 1527 END IF1528 END DO 1529 END DO1539 END DO 1540 END DO 1541 ! 1542 END IF ! (cvflag_ice) 1530 1543 1531 1544 RETURN
Note: See TracChangeset
for help on using the changeset viewer.