Ignore:
Timestamp:
Jan 27, 2016, 10:42:32 AM (8 years ago)
Author:
idelkadi
Message:

Mise a jour du simulateur COSP (passage de la version v3.2 a la version v1.4) :

  • mise a jour des sources pour ISCCP, CALIPSO et PARASOL
  • prise en compte des changements de phases pour les nuages (Calipso)
  • rajout de plusieurs diagnostiques (fraction nuageuse en fonction de la temperature, ...)

http://lmdz.lmd.jussieu.fr/Members/aidelkadi/cosp

File:
1 edited

Legend:

Unmodified
Added
Removed
  • LMDZ5/trunk/libf/phylmd/cosp/MISR_simulator.F

    r1907 r2428  
    22! Copyright (c) 2009,  Roger Marchand, version 1.2
    33! All rights reserved.
     4! $Revision: 23 $, $Date: 2011-03-31 15:41:37 +0200 (jeu. 31 mars 2011) $
     5! $URL: http://cfmip-obs-sim.googlecode.com/svn/stable/v1.4.0/MISR_simulator/MISR_simulator.f $
    46!
    57! Redistribution and use in source and binary forms, with or without modification, are permitted
     
    2729     &     ncol,
    2830     &     sunlit,
    29      &     zfull,
    30      &     at,
     31     &     zfull,
     32     &     at,
    3133     &     dtau_s,
    32      &     dtau_c,
    33      &     frac_out,
    34      &     fq_MISR_TAU_v_CTH,
    35      &     dist_model_layertops,
    36      &     MISR_mean_ztop,
     34     &     dtau_c,
     35     &     frac_out,
     36     &     missing_value,
     37     &     fq_MISR_TAU_v_CTH,
     38     &     dist_model_layertops,
     39     &     MISR_mean_ztop,
    3740     &     MISR_cldarea
    3841     & )
    39        
     42   
    4043
    4144      implicit none
     
    4851
    4952      INTEGER npoints                   !  if ncol ==1, the number of model points in the horizontal grid 
    50                                         !   else        the number of GCM grid points
    51                                        
     53                            !   else    the number of GCM grid points
     54                           
    5255      INTEGER nlev                      !  number of model vertical levels
    5356     
    5457      INTEGER ncol                      !  number of model sub columns
    55                                         !  (must already be generated in via scops and passed to this
    56                                         !   routine via the variable frac_out )
     58                        !  (must already be generated in via scops and passed to this
     59                        !   routine via the variable frac_out )
    5760 
    5861      INTEGER sunlit(npoints)           !  1 for day points, 0 for night time
    5962
    60       REAL zfull(npoints,nlev)          !  height (in meters) of full model levels (i.e. midpoints)
     63      REAL zfull(npoints,nlev)          !  height (in meters) of full model levels (i.e. midpoints)
    6164                                        !  zfull(npoints,1)    is    top level of model
    6265                                        !  zfull(npoints,nlev) is bottom level of model (closest point to surface) 
     
    6669      REAL dtau_s(npoints,nlev)         !  visible wavelength cloud optical depth ... for "stratiform" condensate
    6770                                        !  NOTE:  this the cloud optical depth of only the
    68                                         !         the model cell (i,j)
    69                                        
     71                    !     the model cell (i,j)
     72                   
    7073      REAL dtau_c(npoints,nlev)         !  visible wavelength cloud optical depth ... for "convective" condensate
    7174                                        !  NOTE:  this the cloud optical depth of only the
    72                                         !         the model cell (i,j)
     75                    !     the model cell (i,j)
    7376                                     
    7477      REAL frac_out(npoints,ncol,nlev)  !  NOTE: only need if columns>1 ... subgrid scheme in use.
     78     
     79      REAL missing_value
    7580                                 
    7681!     ------
    7782!     Outputs
    7883!     ------
    79                 
     84            
    8085      REAL fq_MISR_TAU_v_CTH(npoints,7,n_MISR_CTH)     
    8186      REAL dist_model_layertops(npoints,n_MISR_CTH)
    82       REAL MISR_cldarea(npoints)                       ! fractional area coverged by clouds
    83       REAL MISR_mean_ztop(npoints)                     ! mean cloud top hieght(m) MISR would observe
    84                                                        ! NOTE: == 0 if area ==0
    85                                                
     87      REAL MISR_cldarea(npoints)               ! fractional area coverged by clouds
     88      REAL MISR_mean_ztop(npoints)             ! mean cloud top hieght(m) MISR would observe
     89                                   ! NOTE: == 0 if area ==0
     90                           
    8691
    8792!     ------
     
    8994!     ------
    9095
    91       REAL tau(npoints,ncol)            ! total column optical depth ...
    92 
    93       INTEGER j,ilev,ilev2,ibox
     96      REAL tau(npoints,ncol)        ! total column optical depth ...
     97
     98      INTEGER j,ilev,ilev2,ibox,k
    9499      INTEGER itau
    95100         
     
    99104      real boxarea
    100105      real tauchk
    101       REAL box_MISR_ztop(npoints,ncol)  ! cloud top hieght(m) MISR would observe
     106      REAL box_MISR_ztop(npoints,ncol)  ! cloud top hieght(m) MISR would observe
    102107     
    103108      integer thres_crossed_MISR
     
    109114     
    110115      DATA MISR_CTH_boundaries / -99, 0, 0.5, 1, 1.5, 2, 2.5, 3,
    111      c                                4, 5, 7, 9, 11, 13, 15, 17, 99 /
     116     c                    4, 5, 7, 9, 11, 13, 15, 17, 99 /
    112117     
    113118      DATA isccp_taumin / 0.3 /
    114119   
    115120      tauchk = -1.*log(0.9999999)
    116        
     121       
    117122      !
    118       ! For each GCM cell or horizontal model grid point ...
    119       ! 
    120       do j=1,npoints   
     123      ! For each GCM cell or horizontal model grid point ...
     124      ! 
     125      do j=1,npoints   
    121126
    122127         !
    123          !      estimate distribution of Model layer tops
    124          !     
     128         !  estimate distribution of Model layer tops
     129         ! 
    125130         dist_model_layertops(j,:)=0
    126131
    127          do ilev=1,nlev
    128                        
    129                 ! define location of "layer top"
    130                 if(ilev.eq.1 .or. ilev.eq.nlev) then
    131                         ztest=zfull(j,ilev)
    132                 else
    133                         ztest=0.5*(zfull(j,ilev)+zfull(j,ilev-1))
    134                 endif   
    135 
    136                 ! find MISR layer that contains this level
    137                 ! note, the first MISR level is "no height" level
    138                 iMISR_ztop=2
    139                 do loop=2,n_MISR_CTH
    140                
    141                         if ( ztest .gt.
    142      &                            1000*MISR_CTH_boundaries(loop+1) ) then
    143            
    144                                 iMISR_ztop=loop+1
    145                         endif
    146                 enddo
    147 
    148                 dist_model_layertops(j,iMISR_ztop)=
    149      &                  dist_model_layertops(j,iMISR_ztop)+1
    150         enddo
    151        
    152        
     132       do ilev=1,nlev
     133           
     134        ! define location of "layer top"
     135        if(ilev.eq.1 .or. ilev.eq.nlev) then
     136            ztest=zfull(j,ilev)
     137        else
     138            ztest=0.5*(zfull(j,ilev)+zfull(j,ilev-1))
     139        endif   
     140
     141        ! find MISR layer that contains this level
     142        ! note, the first MISR level is "no height" level
     143        iMISR_ztop=2
     144        do loop=2,n_MISR_CTH
     145       
     146            if ( ztest .gt.
     147     &                1000*MISR_CTH_boundaries(loop+1) ) then
     148       
     149                iMISR_ztop=loop+1
     150            endif
     151        enddo
     152
     153        dist_model_layertops(j,iMISR_ztop)=
     154     &          dist_model_layertops(j,iMISR_ztop)+1
     155      enddo
     156   
     157   
    153158         !
    154159         ! compute total cloud optical depth for each column
    155160         !       
    156          do ibox=1,ncol     
    157            
    158             ! Initialize tau to zero in each subcolum
    159             tau(j,ibox)=0.
    160             box_cloudy(j,ibox)=.false.
    161             box_MISR_ztop(j,ibox)=0 
    162            
    163             ! initialize threshold detection for each sub column
    164             thres_crossed_MISR=0;
    165            
    166             do ilev=1,nlev
     161       do ibox=1,ncol     
     162       
     163        ! Initialize tau to zero in each subcolum
     164            tau(j,ibox)=0.
     165        box_cloudy(j,ibox)=.false.
     166        box_MISR_ztop(j,ibox)=0 
     167       
     168        ! initialize threshold detection for each sub column
     169        thres_crossed_MISR=0;
     170       
     171        do ilev=1,nlev
    167172     
    168                  dtau=0
    169                 
    170                  if (frac_out(j,ibox,ilev).eq.1) then
     173             dtau=0
     174            
     175             if (frac_out(j,ibox,ilev).eq.1) then
    171176                        dtau = dtau_s(j,ilev)
    172177                 endif
     
    174179                 if (frac_out(j,ibox,ilev).eq.2) then
    175180                        dtau = dtau_c(j,ilev)
    176                  end if 
     181                 end if 
    177182                 
    178                 tau(j,ibox)=tau(j,ibox)+ dtau
    179                  
    180                        
    181                 ! NOW for MISR ..
    182                 ! if there a cloud ... start the counter ... store this height
    183                 if(thres_crossed_MISR .eq. 0 .and. dtau .gt. 0.) then
    184                
    185                         ! first encountered a "cloud"
    186                         thres_crossed_MISR=1 
    187                         cloud_dtau=0                   
    188                 endif   
    189                                
    190                 if( thres_crossed_MISR .lt. 99 .and.
    191      &                  thres_crossed_MISR .gt. 0 ) then
     183            tau(j,ibox)=tau(j,ibox)+ dtau
     184             
     185                   
     186        ! NOW for MISR ..
     187        ! if there a cloud ... start the counter ... store this height
     188        if(thres_crossed_MISR .eq. 0 .and. dtau .gt. 0.) then
     189       
     190            ! first encountered a "cloud"
     191            thres_crossed_MISR=1 
     192            cloud_dtau=0           
     193        endif   
     194               
     195        if( thres_crossed_MISR .lt. 99 .and.
     196     &              thres_crossed_MISR .gt. 0 ) then
    192197     
    193                         if( dtau .eq. 0.) then
    194                
    195                                 ! we have come to the end of the current cloud
    196                                 ! layer without yet selecting a CTH boundary.
    197                                 ! ... restart cloud tau counter
    198                                 cloud_dtau=0
    199                         else
    200                                 ! add current optical depth to count for
    201                                 ! the current cloud layer
    202                                 cloud_dtau=cloud_dtau+dtau
    203                         endif
    204                                
    205                         ! if the cloud is continuous but optically thin (< 1)
    206                         ! from above the current layer cloud top to the current level
    207                         ! then MISR will like see a top below the top of the current
    208                         ! layer
    209                         if( dtau.gt.0 .and. (cloud_dtau-dtau) .lt. 1) then
    210                        
    211                                 if(dtau .lt. 1 .or. ilev.eq.1 .or. ilev.eq.nlev) then
    212 
    213                                         ! MISR will likely penetrate to some point
    214                                         ! within this layer ... the middle
    215                                         MISR_penetration_height=zfull(j,ilev)
    216 
    217                                 else
    218                                         ! take the OD = 1.0 level into this layer
    219                                         MISR_penetration_height=
    220      &                                     0.5*(zfull(j,ilev)+zfull(j,ilev-1)) -
    221      &                                     0.5*(zfull(j,ilev-1)-zfull(j,ilev+1))
    222      &                                  /dtau
    223                                 endif   
    224 
    225                                 box_MISR_ztop(j,ibox)=MISR_penetration_height
    226                                
    227                         endif
    228                
    229                         ! check for a distinctive water layer
    230                         if(dtau .gt. 1 .and. at(j,ilev).gt.273 ) then
     198                if( dtau .eq. 0.) then
     199       
     200                    ! we have come to the end of the current cloud
     201                ! layer without yet selecting a CTH boundary.
     202                ! ... restart cloud tau counter
     203                cloud_dtau=0
     204            else
     205                ! add current optical depth to count for
     206                ! the current cloud layer
     207                cloud_dtau=cloud_dtau+dtau
     208            endif
     209               
     210            ! if the cloud is continuous but optically thin (< 1)
     211            ! from above the current layer cloud top to the current level
     212            ! then MISR will like see a top below the top of the current
     213            ! layer
     214            if( dtau.gt.0 .and. (cloud_dtau-dtau) .lt. 1) then
     215           
     216                if(dtau .lt. 1 .or. ilev.eq.1 .or. ilev.eq.nlev) then
     217
     218                    ! MISR will likely penetrate to some point
     219                    ! within this layer ... the middle
     220                    MISR_penetration_height=zfull(j,ilev)
     221
     222                else
     223                    ! take the OD = 1.0 level into this layer
     224                    MISR_penetration_height=
     225     &                     0.5*(zfull(j,ilev)+zfull(j,ilev-1)) -
     226     &                     0.5*(zfull(j,ilev-1)-zfull(j,ilev+1))
     227     &                  /dtau
     228                endif   
     229
     230                box_MISR_ztop(j,ibox)=MISR_penetration_height
     231               
     232            endif
     233       
     234            ! check for a distinctive water layer
     235            if(dtau .gt. 1 .and. at(j,ilev).gt.273 ) then
    231236     
    232                                 ! must be a water cloud ...
    233                                 ! take this as CTH level
    234                                 thres_crossed_MISR=99
    235                         endif
    236                
    237                         ! if the total column optical depth is "large" than
    238                         ! MISR can't seen anything else ... set current point as CTH level
    239                         if(tau(j,ibox) .gt. 5) then     
    240 
    241                                 thres_crossed_MISR=99                   
    242                         endif
    243 
    244                 endif ! MISR CTH booundary not set
    245                
    246             enddo  !ilev - loop over vertical levesl
    247        
    248             ! written by roj 5/2006
    249             ! check to see if there was a cloud for which we didn't
    250             ! set a MISR cloud top boundary
    251             if( thres_crossed_MISR .eq. 1) then
    252        
    253                 ! if the cloud has a total optical depth of greater
    254                 ! than ~ 0.5 MISR will still likely pick up this cloud
    255                 ! with a height near the true cloud top
    256                 ! otherwise there should be no CTH
    257                 if( tau(j,ibox) .gt. 0.5) then
    258 
    259                         ! keep MISR detected CTH
    260                        
    261                 elseif(tau(j,ibox) .gt. 0.2) then
    262 
    263                         ! MISR may detect but wont likley have a good height
    264                         box_MISR_ztop(j,ibox)=-1
    265                        
    266                 else
    267                         ! MISR not likely to even detect.
    268                         ! so set as not cloudy
    269                         box_MISR_ztop(j,ibox)=0
    270 
    271                 endif
    272                                                
    273             endif
    274        
    275         enddo  ! loop of subcolumns
     237                    ! must be a water cloud ...
     238                ! take this as CTH level
     239                thres_crossed_MISR=99
     240            endif
     241       
     242            ! if the total column optical depth is "large" than
     243            ! MISR can't seen anything else ... set current point as CTH level
     244            if(tau(j,ibox) .gt. 5) then
     245
     246                thres_crossed_MISR=99           
     247            endif
     248
     249        endif ! MISR CTH booundary not set
     250       
     251        enddo  !ilev - loop over vertical levesl
     252   
     253        ! written by roj 5/2006
     254        ! check to see if there was a cloud for which we didn't
     255        ! set a MISR cloud top boundary
     256        if( thres_crossed_MISR .eq. 1) then
     257   
     258        ! if the cloud has a total optical depth of greater
     259        ! than ~ 0.5 MISR will still likely pick up this cloud
     260        ! with a height near the true cloud top
     261        ! otherwise there should be no CTH
     262        if( tau(j,ibox) .gt. 0.5) then
     263
     264            ! keep MISR detected CTH
     265           
     266        elseif(tau(j,ibox) .gt. 0.2) then
     267
     268            ! MISR may detect but wont likley have a good height
     269            box_MISR_ztop(j,ibox)=-1
     270           
     271        else
     272            ! MISR not likely to even detect.
     273            ! so set as not cloudy
     274            box_MISR_ztop(j,ibox)=0
     275
     276        endif
     277                       
     278        endif
     279   
     280      enddo  ! loop of subcolumns
    276281       enddo    ! loop of gridpoints
    277282       
    278283
    279284        !     
    280         !       Modify MISR CTH for satellite spatial / pattern matcher effects
    281         !
    282         !       Code in this region added by roj 5/2006 to account
    283         !       for spatial effect of the MISR pattern matcher.
    284         !       Basically, if a column is found between two neighbors
    285         !       at the same CTH, and that column has no hieght or
    286         !       a lower CTH, THEN misr will tend to but place the
    287         !       odd column at the same height as it neighbors.
    288         !
    289         !       This setup assumes the columns represent a about a 1 to 4 km scale
    290         !       it will need to be modified significantly, otherwise
    291         if(ncol.eq.1) then
    292        
    293            ! adjust based on neightboring points ... i.e. only 2D grid was input
     285        !   Modify MISR CTH for satellite spatial / pattern matcher effects
     286    !
     287    !   Code in this region added by roj 5/2006 to account
     288    !   for spatial effect of the MISR pattern matcher.
     289    !   Basically, if a column is found between two neighbors
     290    !   at the same CTH, and that column has no hieght or
     291    !   a lower CTH, THEN misr will tend to but place the
     292    !   odd column at the same height as it neighbors.
     293    !
     294    !   This setup assumes the columns represent a about a 1 to 4 km scale
     295    !   it will need to be modified significantly, otherwise
     296        if(ncol.eq.1) then
     297   
     298       ! adjust based on neightboring points ... i.e. only 2D grid was input
    294299           do j=2,npoints-1
    295                        
    296                         if(box_MISR_ztop(j-1,1).gt.0 .and.
    297      &                     box_MISR_ztop(j+1,1).gt.0       ) then
    298 
    299                                 if( abs( box_MISR_ztop(j-1,1) - 
    300      &                                  box_MISR_ztop(j+1,1) ) .lt. 500
    301      &                          .and.
    302      &                                  box_MISR_ztop(j,1) .lt.
    303      &                                  box_MISR_ztop(j+1,1)     ) then
    304                        
    305                                         box_MISR_ztop(j,1) =
    306      &                                          box_MISR_ztop(j+1,1)   
    307                                 endif
    308 
    309                         endif
     300           
     301            if(box_MISR_ztop(j-1,1).gt.0 .and.
     302     &             box_MISR_ztop(j+1,1).gt.0       ) then
     303
     304                if( abs( box_MISR_ztop(j-1,1) - 
     305     &                  box_MISR_ztop(j+1,1) ) .lt. 500
     306     &              .and.
     307     &                  box_MISR_ztop(j,1) .lt.
     308     &                  box_MISR_ztop(j+1,1)     ) then
     309           
     310                    box_MISR_ztop(j,1) =
     311     &                      box_MISR_ztop(j+1,1)   
     312                endif
     313
     314            endif
    310315         enddo
    311       else
     316        else
    312317         
    313318         ! adjust based on neighboring subcolumns ....
    314319         do ibox=2,ncol-1
    315                        
    316                         if(box_MISR_ztop(1,ibox-1).gt.0 .and.
    317      &                     box_MISR_ztop(1,ibox+1).gt.0            ) then
    318 
    319                                 if( abs( box_MISR_ztop(1,ibox-1) - 
    320      &                                  box_MISR_ztop(1,ibox+1) ) .lt. 500
    321      &                          .and.
    322      &                                  box_MISR_ztop(1,ibox) .lt.
    323      &                                  box_MISR_ztop(1,ibox+1)     ) then
    324                        
    325                                         box_MISR_ztop(1,ibox) =
    326      &                                          box_MISR_ztop(1,ibox+1)   
    327                                 endif
    328 
    329                         endif
     320           
     321            if(box_MISR_ztop(1,ibox-1).gt.0 .and.
     322     &             box_MISR_ztop(1,ibox+1).gt.0        ) then
     323
     324                if( abs( box_MISR_ztop(1,ibox-1) - 
     325     &                  box_MISR_ztop(1,ibox+1) ) .lt. 500
     326     &              .and.
     327     &                  box_MISR_ztop(1,ibox) .lt.
     328     &                  box_MISR_ztop(1,ibox+1)     ) then
     329           
     330                    box_MISR_ztop(1,ibox) =
     331     &                      box_MISR_ztop(1,ibox+1)   
     332                endif
     333
     334            endif
    330335         enddo
    331336     
    332       endif
     337        endif
    333338
    334339        !     
    335         !     DETERMINE CLOUD TYPE FREQUENCIES
    336         !
    337         !     Now that ztop and tau have been determined,
    338         !     determine amount of each cloud type
    339       boxarea=1./real(ncol) 
    340       do j=1,npoints
     340    !     DETERMINE CLOUD TYPE FREQUENCIES
     341    !
     342    !     Now that ztop and tau have been determined,
     343    !     determine amount of each cloud type
     344        boxarea=1./real(ncol) 
     345        do j=1,npoints
    341346
    342347         ! reset frequencies -- modified loop structure, roj 5/2006
    343          do ilev=1,7  ! "tau loop"     
    344             do  ilev2=1,n_MISR_CTH                             
    345                 fq_MISR_TAU_v_CTH(j,ilev,ilev2)=0.     
     348         do ilev=1,7  ! "tau loop" 
     349            do  ilev2=1,n_MISR_CTH                     
     350            fq_MISR_TAU_v_CTH(j,ilev,ilev2)=0.     
    346351            enddo
    347         enddo
    348            
    349         MISR_cldarea(j)=0.
    350         MISR_mean_ztop(j)=0.
     352        enddo
     353           
     354        MISR_cldarea(j)=0.
     355        MISR_mean_ztop(j)=0.
    351356
    352357         do ibox=1,ncol
     
    356361            endif
    357362 
    358             itau = 0
    359            
     363            itau = 0
     364       
    360365            if (box_cloudy(j,ibox)) then
    361        
    362               !determine optical depth category
     366   
     367          !determine optical depth category
    363368              if (tau(j,ibox) .lt. isccp_taumin) then
    364369                  itau=1
     
    382387              endif
    383388             
    384            endif 
    385 
    386            ! update MISR histograms and summary metrics - roj 5/2005
    387            if (sunlit(j).eq.1) then
    388                      
     389             endif 
     390
     391       ! update MISR histograms and summary metrics - roj 5/2005
     392       if (sunlit(j).eq.1) then
     393                     
    389394              !if cloudy added by roj 5/2005
    390               if( box_MISR_ztop(j,ibox).eq.0) then
    391              
    392                         ! no cloud detected
    393                         iMISR_ztop=0
    394 
    395               elseif( box_MISR_ztop(j,ibox).eq.-1) then
    396 
    397                         ! cloud can be detected but too thin to get CTH
    398                         iMISR_ztop=1   
    399 
    400                         fq_MISR_TAU_v_CTH(j,itau,iMISR_ztop)=
    401      &                          fq_MISR_TAU_v_CTH(j,itau,iMISR_ztop) + boxarea
    402 
    403               else
    404                
    405                         !
    406                         ! determine index for MISR bin set
    407                         !
    408 
    409                         iMISR_ztop=2
    410                        
    411                         do loop=2,n_MISR_CTH
    412                
    413                                 if ( box_MISR_ztop(j,ibox) .gt.
    414      &                            1000*MISR_CTH_boundaries(loop+1) ) then
    415            
    416                                   iMISR_ztop=loop+1
    417 
    418                                 endif
    419                         enddo
    420              
    421                         if(box_cloudy(j,ibox)) then
    422                        
    423                                 ! there is an isccp clouds so itau(j) is defined
    424                                 fq_MISR_TAU_v_CTH(j,itau,iMISR_ztop)=
    425      &                                  fq_MISR_TAU_v_CTH(j,itau,iMISR_ztop) + boxarea
     395          if( box_MISR_ztop(j,ibox).eq.0) then
     396         
     397            ! no cloud detected
     398            iMISR_ztop=0
     399
     400          elseif( box_MISR_ztop(j,ibox).eq.-1) then
     401
     402            ! cloud can be detected but too thin to get CTH
     403            iMISR_ztop=1   
     404
     405            fq_MISR_TAU_v_CTH(j,itau,iMISR_ztop)=
     406     &            fq_MISR_TAU_v_CTH(j,itau,iMISR_ztop) + boxarea
     407
     408          else
     409           
     410            !
     411            ! determine index for MISR bin set
     412            !
     413
     414            iMISR_ztop=2
     415           
     416            do loop=2,n_MISR_CTH
     417       
     418                if ( box_MISR_ztop(j,ibox) .gt.
     419     &                1000*MISR_CTH_boundaries(loop+1) ) then
     420       
     421                  iMISR_ztop=loop+1
     422
     423                endif
     424            enddo
     425         
     426            if(box_cloudy(j,ibox)) then
     427           
     428               ! there is an isccp clouds so itau(j) is defined
     429               fq_MISR_TAU_v_CTH(j,itau,iMISR_ztop)=
     430     &            fq_MISR_TAU_v_CTH(j,itau,iMISR_ztop) + boxarea
    426431     
    427                         else
    428                                 ! MISR CTH resolution is trying to fill in a
    429                                 ! broken cloud scene where there is no condensate.
    430                                 ! The MISR CTH-1D-OD product will only put in a cloud
    431                                 ! if the MISR cloud mask indicates cloud.
    432                                 ! therefore we will not include this column in the histogram
    433                                 ! in reality aerosoal and 3D effects or bright surfaces
    434                                 ! could fool the MISR cloud mask
    435 
    436                                 ! the alternative is to count as very thin cloud ??
    437 !                               fq_MISR_TAU_v_CTH(1,iMISR_ztop)=
    438 !     &                                 fq_MISR_TAU_v_CTH(1,iMISR_ztop) + boxarea
    439                         endif
    440 
    441 
    442                         MISR_mean_ztop(j)=MISR_mean_ztop(j)+
    443      &                                       box_MISR_ztop(j,ibox)*boxarea             
    444 
    445                         MISR_cldarea(j)=MISR_cldarea(j) + boxarea
     432            else
     433                ! MISR CTH resolution is trying to fill in a
     434                ! broken cloud scene where there is no condensate.
     435                ! The MISR CTH-1D-OD product will only put in a cloud
     436                ! if the MISR cloud mask indicates cloud.
     437                ! therefore we will not include this column in the histogram
     438                ! in reality aerosoal and 3D effects or bright surfaces
     439                ! could fool the MISR cloud mask
     440
     441                ! the alternative is to count as very thin cloud ??
     442!               fq_MISR_TAU_v_CTH(1,iMISR_ztop)=
     443!     &                     fq_MISR_TAU_v_CTH(1,iMISR_ztop) + boxarea
     444            endif
     445
     446
     447            MISR_mean_ztop(j)=MISR_mean_ztop(j)+
     448     &                       box_MISR_ztop(j,ibox)*boxarea         
     449
     450            MISR_cldarea(j)=MISR_cldarea(j) + boxarea
    446451 
    447               endif
    448                
    449            endif ! is sunlight ?
    450            
    451         enddo ! ibox - loop over subcolumns         
    452      
    453         if( MISR_cldarea(j) .gt. 0.) then
    454                 MISR_mean_ztop(j)= MISR_mean_ztop(j) / MISR_cldarea(j)   ! roj 5/2006
    455         endif
    456 
    457       enddo  ! loop over grid points
     452          endif
     453       else
     454          ! Set to issing data. A. Bodas - 14/05/2010
     455          do loop=1,n_MISR_CTH
     456             do k=1,7
     457                fq_MISR_TAU_v_CTH(j,k,loop) = missing_value
     458             enddo
     459             dist_model_layertops(j,loop) = missing_value
     460          enddo
     461          MISR_cldarea(j) = missing_value
     462          MISR_mean_ztop(npoints) = missing_value
     463
     464       endif ! is sunlight ?
     465       
     466       enddo ! ibox - loop over subcolumns         
     467     
     468       if( MISR_cldarea(j) .gt. 0.) then
     469        MISR_mean_ztop(j)= MISR_mean_ztop(j) / MISR_cldarea(j)   ! roj 5/2006
     470       endif
     471
     472       enddo  ! loop over grid points
    458473
    459474      return
Note: See TracChangeset for help on using the changeset viewer.