Changeset 628 for trunk/LMDZ.MARS/libf/phymars/thermcell_main_mars.F90
- Timestamp:
- Apr 20, 2012, 12:11:47 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.MARS/libf/phymars/thermcell_main_mars.F90
r624 r628 99 99 REAL f(ngridmx) 100 100 101 REAL detrmod(ngridmx,nlayermx) 102 101 103 REAL teta_th_int(ngridmx,nlayermx) 102 104 REAL teta_env_int(ngridmx,nlayermx) 103 105 REAL teta_down_int(ngridmx,nlayermx) 104 106 105 CHARACTER (LEN=20) :: modname106 107 CHARACTER (LEN=80) :: abort_message 108 INTEGER ndt 107 109 108 110 ! ============= PLUME VARIABLES ============ … … 123 125 REAL denom(ngridmx) 124 126 REAL zlevinter(ngridmx) 127 INTEGER zlmax 125 128 126 129 ! ========================================= … … 186 189 detr(:,:)=0. 187 190 fm(:,:)=0. 188 zu(:,:)=pu(:,:)189 zv(:,:)=pv(:,:)191 ! zu(:,:)=pu(:,:) 192 ! zv(:,:)=pv(:,:) 190 193 zhc(:,:)=pt(:,:)/zpopsk(:,:) 194 ndt=1 191 195 192 196 ! ********************************************************************** … … 888 892 ! =========================================================================== 889 893 894 zlmax=MAXVAL(lmax(:))+2 895 if (zlmax .ge. nlayermx) then 896 print*,'thermals have reached last layer of the model' 897 print*,'this is not good !' 898 endif 899 890 900 ! Choix de la fonction d'alimentation utilisee pour la fermeture. 891 901 … … 968 978 !------------------------------------------------------------------------- 969 979 970 do l=1, nlayermx980 do l=1,zlmax 971 981 entr(:,l)=f(:)*(entr_star(:,l)+alim_star(:,l)) 972 982 detr(:,l)=f(:)*detr_star(:,l) 973 983 enddo 974 984 975 do l=1, nlayermx985 do l=1,zlmax 976 986 do ig=1,ngridmx 977 987 if (l.lt.lmax(ig)) then … … 1007 1017 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 1008 1018 1009 do l=1, nlayermx1019 do l=1,zlmax 1010 1020 1011 1021 do ig=1,ngridmx … … 1156 1166 !----------------------------------------------------------------------- 1157 1167 1158 do l=1, nlayermx-11168 do l=1,zlmax 1159 1169 do ig=1,ngridmx 1160 1170 eee0=entr(ig,l) … … 1347 1357 ! Calcul de la fraction de l'ascendance 1348 1358 !------------------------------------------------------------------ 1349 do ig=1,ngridmx 1350 fraca(ig,1)=0. 1351 fraca(ig,nlayermx+1)=0. 1352 enddo 1353 do l=2,nlayermx 1359 fraca(:,:)=0. 1360 do l=2,zlmax 1354 1361 do ig=1,ngridmx 1355 1362 if (zw2(ig,l).gt.1.e-10) then … … 1520 1527 1521 1528 else 1522 1523 call thermcell_dqup(ngridmx,nlayermx,ptimestep & 1524 & ,fm,entr, & 1525 & masse,zu,pduadj) 1526 1527 call thermcell_dqup(ngridmx,nlayermx,ptimestep & 1528 & ,fm,entr, & 1529 & masse,zv,pdvadj) 1529 ! detrmod(:,:)=0. 1530 ! do k=1,zlmax 1531 ! do ig=1,ngridmx 1532 ! detrmod(ig,k)=fm(ig,k)-fm(ig,k+1) & 1533 ! & +entr(ig,k) 1534 ! if (detrmod(ig,k).lt.0.) then 1535 ! entr(ig,k)=entr(ig,k)-detrmod(ig,k) 1536 ! detrmod(ig,k)=0. 1537 ! endif 1538 ! enddo 1539 ! enddo 1540 ! 1541 ! 1542 ! call thermcell_dqup(ngridmx,nlayermx,ptimestep & 1543 ! & ,fm,entr,detrmod, & 1544 ! & masse,zu,pduadj,ndt,zlmax) 1545 ! 1546 ! call thermcell_dqup(ngridmx,nlayermx,ptimestep & 1547 ! & ,fm,entr,detrmod, & 1548 ! & masse,zv,pdvadj,ndt,zlmax) 1530 1549 1531 1550 endif … … 1538 1557 ! The rest is transported outside the sub-timestep loop 1539 1558 1559 ratiom(:,:)=1. 1560 1540 1561 if (ico2.ne.0) then 1541 ! if (nqmx .ne. 0.) then 1562 detrmod(:,:)=0. 1563 do k=1,zlmax 1564 do ig=1,ngridmx 1565 detrmod(ig,k)=fm(ig,k)-fm(ig,k+1) & 1566 & +entr(ig,k) 1567 if (detrmod(ig,k).lt.0.) then 1568 entr(ig,k)=entr(ig,k)-detrmod(ig,k) 1569 detrmod(ig,k)=0. 1570 endif 1571 enddo 1572 enddo 1573 1542 1574 call thermcell_dqup(ngridmx,nlayermx,ptimestep & 1543 & ,fm,entr, & 1544 & masse,pq(:,:,ico2),pdqadj(:,:,ico2)) 1545 ! endif 1575 & ,fm,entr,detrmod, & 1576 & masse,pq(:,:,ico2),pdqadj(:,:,ico2),ndt,zlmax) 1546 1577 1547 1578 ! Compute the ratio between theta and theta_m 1548 1579 1549 do l=1, nlayermx1580 do l=1,zlmax 1550 1581 do ig=1,ngridmx 1551 1582 ratiom(ig,l)=1./(A*(pq(ig,l,ico2)+pdqadj(ig,l,ico2)*ptimestep)+B) 1552 1583 enddo 1553 1584 enddo 1554 else 1555 ratiom(:,:)=1. 1585 1556 1586 endif 1557 1558 1587 1559 1588 !------------------------------------------------------------------ … … 1561 1590 !------------------------------------------------------------------ 1562 1591 1563 do l=1,nlayermx 1592 pdtadj(:,:)=0. 1593 do l=1,zlmax 1564 1594 do ig=1,ngridmx 1565 1595 pdtadj(ig,l)=(zdthladj(ig,l)+zdthladj_down(ig,l))*zpopsk(ig,l)*ratiom(ig,l) … … 1601 1631 teta_down_int(ig,nlayermx)=teta_down_int(ig,nlayermx-1) 1602 1632 enddo 1603 do l=1,nlayermx 1633 heatFlux(:,:)=0. 1634 buoyancyOut(:,:)=0. 1635 buoyancyEst(:,:)=0. 1636 heatFlux_down(:,:)=0. 1637 do l=1,zlmax 1604 1638 do ig=1,ngridmx 1605 1639 heatFlux(ig,l)=fm(ig,l)*(teta_th_int(ig,l)-teta_env_int(ig,l))/(rhobarz(ig,l))
Note: See TracChangeset
for help on using the changeset viewer.