Ignore:
Timestamp:
Jul 24, 2024, 2:54:37 PM (8 weeks ago)
Author:
abarral
Message:

rename modules properly lmdz_*
move ismin, ismax, minmax into new lmdz_libmath.f90
(lint) uppercase fortran keywords

File:
1 edited

Legend:

Unmodified
Added
Removed
  • LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_thermcell_alp.F90

    r5103 r5116  
    103103      real, parameter :: coef_m=1.            ! On considère un rendement pour alp_bl_fluct_m
    104104      real, parameter :: coef_tke=1.          ! On considère un rendement pour alp_bl_fluct_tke
    105       real :: zdp
     105      REAL :: zdp
    106106      real, dimension(ngrid) :: alp_int,dp_int
    107107      real, dimension(ngrid) :: fm_tot
     
    143143    do l=1,nlay-1
    144144      do ig=1,ngrid
    145         if (ok_lcl(ig)) then
     145        if (ok_lcl(ig)) THEN
    146146!ATTENTION,zw2 calcule en pplev
    147 !          if ((pplay(ig,l) .ge. pcon(ig)) .and. (pplay(ig,l+1) .le. pcon(ig))) then
     147!          if ((pplay(ig,l) .ge. pcon(ig)) .and. (pplay(ig,l+1) .le. pcon(ig))) THEN
    148148!          klcl(ig)=l
    149149!          interp(ig)=(pcon(ig)-pplay(ig,klcl(ig)))/(pplay(ig,klcl(ig)+1)-pplay(ig,klcl(ig)))
    150150!          endif
    151           if ((pplev(ig,l) >= pcon(ig)) .and. (pplev(ig,l+1) <= pcon(ig))) then
     151          if ((pplev(ig,l) >= pcon(ig)) .and. (pplev(ig,l+1) <= pcon(ig))) THEN
    152152          klcl(ig)=l
    153153          interp(ig)=(pcon(ig)-pplev(ig,klcl(ig)))/(pplev(ig,klcl(ig)+1)-pplev(ig,klcl(ig)))
     
    159159    do ig =1,ngrid
    160160!CR:REHABILITATION ZMAX CONTINU
    161      if (ok_lcl(ig)) then
     161     if (ok_lcl(ig)) THEN
    162162      rhobarz0(ig)=rhobarz(ig,klcl(ig))+(rhobarz(ig,klcl(ig)+1) &
    163163                 -rhobarz(ig,klcl(ig)))*interp(ig)
     
    214214
    215215  do ig=1,ngrid
    216    if (ok_lcl(ig)) then
     216   if (ok_lcl(ig)) THEN
    217217     fraca0(ig)=fraca(ig,klcl(ig))+(fraca(ig,klcl(ig)+1) &
    218218               -fraca(ig,klcl(ig)))*interp(ig)
     
    258258     depth(ig)=zmax_moy(ig)-zlcl(ig)
    259259     hmin(ig)=hmincoef*zlcl(ig)
    260      if (depth(ig)>=10.) then
     260     if (depth(ig)>=10.) THEN
    261261       s2(ig)=(hcoef*depth(ig)+hmin(ig))**2
    262262       n2(ig)=(1.-eps1)*fraca0(ig)*airephy(ig)/s2(ig)
     
    275275
    276276!CR: calcul de strig
    277    if (iflag_strig==0) then
     277   if (iflag_strig==0) THEN
    278278      strig(:)=s_trig
    279    else if (iflag_strig==1) then
     279   else if (iflag_strig==1) THEN
    280280      do ig=1,ngrid
    281281!         zcong_moy(ig)=zlcl(ig)+zmax_moy_coef*(zcong(ig)-zlcl(ig))
     
    283283         strig(ig)=(zcong(ig)-zlcl(ig))**2 
    284284      enddo
    285    else if (iflag_strig==2) then
     285   else if (iflag_strig==2) THEN
    286286      do ig=1,ngrid
    287          if (h_trig>zlcl(ig)) then
     287         if (h_trig>zlcl(ig)) THEN
    288288         strig(ig)=(h_trig-zlcl(ig))**2
    289289         else
     
    296296   reuler=exp(1.)
    297297   do ig=1,ngrid
    298      if ( (depth(ig)>=10.) .and. (s_max(ig)>susqr2pi*reuler) ) then
     298     if ( (depth(ig)>=10.) .and. (s_max(ig)>susqr2pi*reuler) ) THEN
    299299      w_max(ig)=w0(ig)*(1.+sqrt(2.*log(s_max(ig)/susqr2pi)-log(2.*log(s_max(ig)/susqr2pi))))
    300300      ale_bl_stat(ig)=0.5*w_max(ig)**2
     
    319319  alp_bl_fluct_tke(ig)=3.*coef_m*rhobarz0(ig)*w0(ig)*fraca0(ig)*(therm_tke_max0(ig)-env_tke_max0(ig)) &
    320320                      +3.*rhobarz0(ig)*w_conv(ig)*pbl_tke_max0(ig)
    321     if (iflag_clos_bl>=2) then
     321    if (iflag_clos_bl>=2) THEN
    322322    alp_bl_conv(ig)=1.5*coef_m*rhobarz0(ig)*fraca0(ig)*(fraca0(ig)/(1.-fraca0(ig)))*w_conv(ig)* &
    323323                     (w0(ig)**2)
     
    371371      do k=1,nlay
    372372         do ig=1,ngrid
    373             if (k<=lalim_conv(ig).and.alim_star(ig,k)>1.e-10) then
     373            if (k<=lalim_conv(ig).and.alim_star(ig,k)>1.e-10) THEN
    374374               wght_th(ig,k)=alim_star(ig,k)
    375375            endif
     
    380380!test pour prolonger la convection
    381381      do ig=1,ngrid
    382 !v1d  if ((alim_star(ig,1).lt.1.e-10).and.(therm)) then
    383       if ((alim_star(ig,1)<1.e-10)) then
     382!v1d  if ((alim_star(ig,1).lt.1.e-10).and.(therm)) THEN
     383      if ((alim_star(ig,1)<1.e-10)) THEN
    384384      lalim_conv(ig)=1
    385385      wght_th(ig,1)=1.
     
    399399      do l=2,nlay
    400400        do ig=1,ngrid
    401            if(l<=lmax(ig)) THEN
     401           IF(l<=lmax(ig)) THEN
    402402           zdp=pplay(ig,l-1)-pplay(ig,l)
    403403           alp_int(ig)=alp_int(ig)+0.5*rhobarz(ig,l)*wth3(ig,l)*zdp
     
    407407      enddo
    408408
    409       if (iflag_coupl>=3 .and. iflag_coupl<=5) then
     409      if (iflag_coupl>=3 .and. iflag_coupl<=5) THEN
    410410      do ig=1,ngrid
    411411!valeur integree de alp_bl * 0.5:
    412         if (dp_int(ig)>0.) then
     412        if (dp_int(ig)>0.) THEN
    413413        alp_bl(ig)=alp_int(ig)/dp_int(ig)
    414414        endif
     
    424424
    425425
    426       return
     426      RETURN
    427427      end
    428428END MODULE lmdz_thermcell_alp
Note: See TracChangeset for help on using the changeset viewer.