Changeset 161 for trunk/LMDZ.MARS/libf/phymars/convadj.F
- Timestamp:
- Jun 16, 2011, 3:48:00 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.MARS/libf/phymars/convadj.F
r38 r161 1 1 subroutine convadj(ngrid,nlay,nq,ptimestep, 2 & pplay,pplev,ppopsk, 2 & pplay,pplev,ppopsk,lmax_th, 3 3 & pu,pv,ph,pq, 4 4 & pdufi,pdvfi,pdhfi,pdqfi, … … 21 21 ! Modif. 2005 by F. Forget. 22 22 ! Modif. 2010 by R. Wordsworth 23 ! 23 ! Modif. 2011 by A. Colaitis 24 ! 24 25 !================================================================== 25 26 … … 38 39 ! --------- 39 40 40 INTEGER,intent(in) :: ngrid,nlay 41 INTEGER,intent(in) :: ngrid,nlay,lmax_th(ngrid) 41 42 REAL,intent(in) :: ptimestep 42 43 REAL,intent(in) :: ph(ngrid,nlay) … … 163 164 DO l=2,nlay 164 165 DO ig=1,ngrid 165 IF(zhc(ig,l).LT.zhc(ig,l-1)) vtest(ig)=.true. 166 ENDDO 166 IF((zhc(ig,l).LT.zhc(ig,l-1)) $ 167 $ .AND. (l .GT. lmax_th(ig))) vtest(ig)=.true. 168 ENDDO 167 169 ENDDO 168 170 … … 198 200 ! Test loop upwards on l2 199 201 200 201 202 203 IF (zhc(i, l2) .LT. zhc(i, l2-1)) THEN204 202 DO 203 l2 = l2 + 1 204 IF (l2 .GT. nlay) EXIT 205 IF ((zhc(i, l2) .LT. zhc(i, l2-1)).AND.(l2 .GT. lmax_th(i))) THEN 206 205 207 ! l2 is the highest level of the unstable column 206 208 … … 228 230 ! do we have to extend the column downwards? 229 231 230 231 232 IF (zhmc .lt. zhc(i, l1-1)) then233 234 235 232 down = .false. 233 IF (l1 .ne. 1) then !-- and then 234 IF ((zhmc .lt. zhc(i, l1-1)).and.(l1.gt.lmax_th(i))) then 235 down = .true. 236 END IF 237 END IF 236 238 237 239 ! this could be a problem...
Note: See TracChangeset
for help on using the changeset viewer.