Ignore:
Timestamp:
Jul 22, 2024, 9:46:57 AM (2 months ago)
Author:
abarral
Message:

Revert cosp*/ from the trunk, as it's external code
Add missing bits from FCM2 source

File:
1 edited

Legend:

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

    r5082 r5095  
    203203          do j=1,Nlevels
    204204             sc_ratio = beta_tot(pr,i,j)/beta_mol(pr,j)
    205              if ((sc_ratio <= s_att) .and. (flag_sat == 0)) flag_sat = j
    206              if (Ze_tot(pr,i,j) < -30.) then  !radar can't detect cloud
    207                 if ( (sc_ratio > s_cld) .or. (flag_sat == j) ) then  !lidar sense cloud
     205             if ((sc_ratio .le. s_att) .and. (flag_sat .eq. 0)) flag_sat = j
     206             if (Ze_tot(pr,i,j) .lt. -30.) then  !radar can't detect cloud
     207                if ( (sc_ratio .gt. s_cld) .or. (flag_sat .eq. j) ) then  !lidar sense cloud
    208208                   lidar_only_freq_cloud(pr,j)=lidar_only_freq_cloud(pr,j)+1. !top->surf
    209209                   flag_cld=1
     
    213213             endif
    214214          enddo !levels
    215           if (flag_cld == 1) tcc(pr)=tcc(pr)+1._wp
     215          if (flag_cld .eq. 1) tcc(pr)=tcc(pr)+1._wp
    216216       enddo !columns
    217217    enddo !points
     
    245245   
    246246    do ij=2,Nbins+1 
    247        hist1D(ij-1) = count(var >= bins(ij-1) .and. var < bins(ij))
    248        if (count(var == R_GROUND) >= 1) hist1D(ij-1)=R_UNDEF
     247       hist1D(ij-1) = count(var .ge. bins(ij-1) .and. var .lt. bins(ij))
     248       if (count(var .eq. R_GROUND) .ge. 1) hist1D(ij-1)=R_UNDEF
    249249    enddo
    250250   
     
    278278    do ij=2,nbin1+1
    279279       do ik=2,nbin2+1
    280           jointHist(ij-1,ik-1)=count(var1 >= bin1(ij-1) .and. var1 < bin1(ij) .and. &
    281                var2 >= bin2(ik-1) .and. var2 < bin2(ik))
     280          jointHist(ij-1,ik-1)=count(var1 .ge. bin1(ij-1) .and. var1 .lt. bin1(ij) .and. &
     281               var2 .ge. bin2(ik-1) .and. var2 .lt. bin2(ik))       
    282282       enddo
    283283    enddo
Note: See TracChangeset for help on using the changeset viewer.