Changeset 619 for trunk/LMDZ.MARS/libf
- Timestamp:
- Apr 13, 2012, 3:15:09 PM (13 years ago)
- Location:
- trunk/LMDZ.MARS/libf/phymars
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.MARS/libf/phymars/calltherm_interface.F90
r592 r619 328 328 modname='momentum' 329 329 call thermcell_dqup(ngridmx,nlayermx,ptimestep & 330 & ,fm_therm,entr_therm, detr_therm, &330 & ,fm_therm,entr_therm,zfraca, & 331 331 & masse,zu,d_u_ajs,modname,zdz) 332 332 333 333 call thermcell_dqup(ngridmx,nlayermx,ptimestep & 334 & ,fm_therm,entr_therm, detr_therm, &334 & ,fm_therm,entr_therm,zfraca, & 335 335 & masse,zv,d_v_ajs,modname,zdz) 336 336 … … 340 340 if (iq .ne. ico2) then 341 341 call thermcell_dqup(ngridmx,nlayermx,ptimestep & 342 & ,fm_therm,entr_therm, detr_therm, &342 & ,fm_therm,entr_therm,zfraca, & 343 343 & masse,pq_therm(:,:,iq),d_q_ajs(:,:,iq),modname,zdz) 344 344 endif … … 349 349 modname='tke' 350 350 call thermcell_dqup(ngridmx,nlayermx,ptimestep & 351 & ,fm_therm,entr_therm, detr_therm, &351 & ,fm_therm,entr_therm,zfraca, & 352 352 & masse,q2_therm,dq2_therm,modname,zdz) 353 353 endif … … 459 459 call WRITEDIAGFI(ngridmx,'d_t_th', & 460 460 & 'tendance temp TH','K',1,d_t_ajs) 461 call WRITEDIAGFI(ngridmx,'d_q_th', & 462 & 'tendance traceur TH','kg/kg',1,d_q_ajs) 461 463 call WRITEDIAGFI(ngridmx,'zmax', & 462 464 & 'pbl height','m',0,zmaxth) -
trunk/LMDZ.MARS/libf/phymars/thermcell_dqup.F90
r342 r619 1 1 subroutine thermcell_dqup(ngrid,nlayer,ptimestep,fm0,entr0, & 2 & detr0,masse0,q_therm,dq_therm,charvar,zdz)2 & alpha,masse0,q_therm,dq_therm,charvar,zdz) 3 3 implicit none 4 4 … … 21 21 REAL, INTENT(IN) :: ptimestep 22 22 REAL, INTENT(IN) :: fm0(ngridmx,nlayermx+1) 23 REAL, INTENT(IN) ::entr0(ngridmx,nlayermx) ,detr0(ngridmx,nlayermx)23 REAL, INTENT(IN) ::entr0(ngridmx,nlayermx) 24 24 REAL, INTENT(IN) :: q_therm(ngridmx,nlayermx) 25 25 CHARACTER (LEN=20), INTENT(IN) :: charvar 26 26 REAL, INTENT(IN) :: masse0(ngridmx,nlayermx) 27 27 REAL, INTENT(IN) :: zdz(ngridmx,nlayermx) 28 REAL, INTENT(IN) :: alpha(ngridmx,nlayermx+1) 28 29 29 30 ! ============================ OUTPUTS =========================== … … 37 38 REAL qd(ngridmx,nlayermx) 38 39 INTEGER ig,k 39 REAL gammaf(ngridmx,nlayermx) 40 REAL gammaf(ngridmx,nlayermx),fmid(ngridmx,nlayermx) 41 REAL gammae(ngridmx,nlayermx) 42 REAL alphamid(ngridmx,nlayermx) 40 43 41 44 ! =========== Init ============================================== … … 48 51 if (fm0(ig,k)+entr0(ig,k) .gt. 0.) then 49 52 gammaf(ig,k)=fm0(ig,k)/(fm0(ig,k)+entr0(ig,k)) 53 gammae(ig,k)=fm0(ig,k+1)/(fm0(ig,k)+entr0(ig,k)) 50 54 else 51 55 gammaf(ig,k)=0. 56 gammae(ig,k)=1. 52 57 endif 53 58 enddo … … 57 62 ! =========== Updraft ============================================ 58 63 59 ! qa(:,1)=q(:,1) 64 ! qa(:,1)=q_therm(:,1) 65 60 66 61 67 do ig=1,ngridmx 62 68 do k=2, nlayermx 63 64 qa(ig,k)=gammaf(ig,k)*qa(ig,k-1) 69 70 qa(ig,k)=gammaf(ig,k)*qa(ig,k-1)+(1.-gammaf(ig,k))*q(ig,k) 65 71 66 72 enddo 67 73 enddo 68 74 75 ! =========== Environnement ======================================= 69 76 77 ! q(:,nlayermx)=q_therm(:,nlayermx) 78 79 do ig=1,ngridmx 80 do k=nlayermx-1, 1,-1 81 82 q(ig,k)=gammae(ig,k)*q(ig,k+1)+(1.-gammae(ig,k))*qa(ig,k) 83 84 enddo 85 enddo 70 86 71 87 ! ====== dq ====================================================== 72 88 73 ! do ig=1,ngridmx 74 ! dq_therm(ig,1)=(detr0(ig,1)*qa(ig,1)+fm0(ig,2)*q(ig,2) & 75 ! & -entr0(ig,1)*q(ig,1)) & 76 ! & *ptimestep/masse0(ig,1) 77 ! enddo 78 ! do k=2,nlayermx-1 79 ! do ig=1, ngridmx 80 ! dq_therm(ig,k)=(detr0(ig,k)*qa(ig,k)+fm0(ig,k+1)*q(ig,k+1) & 81 ! & -entr0(ig,k)*q(ig,k)-fm0(ig,k)*q(ig,k)) & 82 ! & *ptimestep/masse0(ig,k) 83 ! enddo 84 ! enddo 85 ! 86 ! do ig=1, ngridmx 87 ! dq_therm(ig,nlayermx)=(detr0(ig,nlayermx)*qa(ig,nlayermx) & 88 ! & -entr0(ig,nlayermx)*q(ig,nlayermx) & 89 ! & -fm0(ig,nlayermx)*q(ig,nlayermx)) & 90 ! & *ptimestep/masse0(ig,nlayermx) 91 ! 92 ! enddo 89 dq_therm(:,:)=0. 90 fmid(:,:)=0. 91 alphamid(:,:)=0. 92 93 do ig=1, ngridmx 94 do k=1,nlayermx 95 fmid(ig,k) = 0.5*(fm0(ig,k)+fm0(ig,k+1)) 96 alphamid(ig,k) = 0.5*(alpha(ig,k)+alpha(ig,k+1)) 97 enddo 98 enddo 93 99 94 100 do ig=1, ngridmx 95 101 do k=1,nlayermx-1 96 102 dq_therm(ig,k)=-(1./masse0(ig,k))*( & 97 & fm0(ig,k+1)*(qa(ig,k+1)-q(ig,k+1)) - &98 & fm0(ig,k)*(qa(ig,k)-q(ig,k)) ) &103 & (1.-alphamid(ig,k+1))*fmid(ig,k+1)*(qa(ig,k+1)-q(ig,k+1)) - & 104 & (1.-alphamid(ig,k))*fmid(ig,k)*(qa(ig,k)-q(ig,k)) ) & 99 105 & /zdz(ig,k) 100 106 101 107 enddo 102 108 enddo 103 104 109 return 105 110 end -
trunk/LMDZ.MARS/libf/phymars/thermcell_main_mars.F90
r616 r619 271 271 272 272 do l=2,nlayermx 273 rhobarz(:,l)=0.5*(rho(:,l)+rho(:,l-1)) 273 ! rhobarz(:,l)=0.5*(rho(:,l)+rho(:,l-1)) 274 rhobarz(:,l)=pplev(:,l)/(r*0.5*(pt(:,l)+pt(:,l-1))) 274 275 enddo 275 276 … … 1533 1534 modname='tracer' 1534 1535 call thermcell_dqup(ngridmx,nlayermx,ptimestep & 1535 & ,fm,entr, detr, &1536 & ,fm,entr,fraca, & 1536 1537 & masse,pq(:,:,ico2),pdqadj(:,:,ico2),modname,zdzfull) 1537 1538 ! endif
Note: See TracChangeset
for help on using the changeset viewer.