Ignore:
Timestamp:
Sep 11, 2024, 4:27:07 PM (10 days ago)
Author:
abarral
Message:

Replace REPROBUS CPP KEY by logical using handmade wonky wrapper

File:
1 edited

Legend:

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

    r5159 r5185  
    110110          DO ilev=1,nlev
    111111             ! If there a cloud, start the counter and store this height
    112              if(thres_crossed_MISR .eq. 0 .and. dtau(j,ibox,ilev) .gt. 0.) then
     112             if(thres_crossed_MISR .eq. 0 .AND. dtau(j,ibox,ilev) .gt. 0.) then
    113113                ! First encountered a "cloud"
    114114                thres_crossed_MISR = 1 
     
    116116             endif
    117117
    118              if( thres_crossed_MISR .lt. 99 .and. thres_crossed_MISR .gt. 0 ) then
     118             if( thres_crossed_MISR .lt. 99 .AND. thres_crossed_MISR .gt. 0 ) then
    119119                if( dtau(j,ibox,ilev) .eq. 0.) then
    120120                   ! We have come to the end of the current cloud layer without yet
     
    129129                ! current layer cloud top to the current level then MISR will like
    130130                ! see a top below the top of the current layer.
    131                 if( dtau(j,ibox,ilev).gt.0 .and. (cloud_dtau-dtau(j,ibox,ilev)) .lt. 1) then
     131                if( dtau(j,ibox,ilev).gt.0 .AND. (cloud_dtau-dtau(j,ibox,ilev)) .lt. 1) then
    132132                   if(dtau(j,ibox,ilev) .lt. 1 .or. ilev.eq.1 .or. ilev.eq.nlev) then
    133133                      ! MISR will likely penetrate to some point within this layer ... the middle
     
    142142               
    143143                ! Check for a distinctive water layer
    144                 if(dtau(j,ibox,ilev) .gt. 1 .and. at(j,ilev) .gt. 273 ) then
     144                if(dtau(j,ibox,ilev) .gt. 1 .AND. at(j,ilev) .gt. 273 ) then
    145145                   ! Must be a water cloud, take this as CTH level
    146146                   thres_crossed_MISR=99
     
    191191!       ! Adjust based on neightboring points.
    192192!       do j=2,npoints-1   
    193 !          if(box_MISR_ztop(j-1,1) .gt. 0                             .and. &
    194 !             box_MISR_ztop(j+1,1) .gt. 0                             .and. &
    195 !             abs(box_MISR_ztop(j-1,1)-box_MISR_ztop(j+1,1)) .lt. 500 .and. &
     193!          if(box_MISR_ztop(j-1,1) .gt. 0                             .AND. &
     194!             box_MISR_ztop(j+1,1) .gt. 0                             .AND. &
     195!             abs(box_MISR_ztop(j-1,1)-box_MISR_ztop(j+1,1)) .lt. 500 .AND. &
    196196!             box_MISR_ztop(j,1) .lt. box_MISR_ztop(j+1,1)) then
    197197!             box_MISR_ztop(j,1) = box_MISR_ztop(j+1,1)   
     
    202202!       do j=1,npoints
    203203!          do ibox=2,ncol-1 
    204 !                 if(box_MISR_ztop(j,ibox-1) .gt. 0                                .and. &
    205 !                 box_MISR_ztop(j,ibox+1) .gt. 0                                .and. &
    206 !                 abs(box_MISR_ztop(j,ibox-1)-box_MISR_ztop(j,ibox+1)) .lt. 500 .and. &
     204!                 if(box_MISR_ztop(j,ibox-1) .gt. 0                                .AND. &
     205!                 box_MISR_ztop(j,ibox+1) .gt. 0                                .AND. &
     206!                 abs(box_MISR_ztop(j,ibox-1)-box_MISR_ztop(j,ibox+1)) .lt. 500 .AND. &
    207207!                 box_MISR_ztop(j,ibox) .lt. box_MISR_ztop(j,ibox+1)) then
    208208!                 box_MISR_ztop(j,ibox) = box_MISR_ztop(j,ibox+1)   
Note: See TracChangeset for help on using the changeset viewer.