Index: LMDZ5/trunk/libf/phylmd/cosp/cosp_types.F90
===================================================================
--- LMDZ5/trunk/libf/phylmd/cosp/cosp_types.F90	(revision 2713)
+++ LMDZ5/trunk/libf/phylmd/cosp/cosp_types.F90	(revision 2955)
@@ -51,5 +51,7 @@
                 Lcltmodis,Lclwmodis,Lclimodis,Lclhmodis,Lclmmodis,Lcllmodis,Ltautmodis,Ltauwmodis,Ltauimodis,Ltautlogmodis, &
                 Ltauwlogmodis,Ltauilogmodis,Lreffclwmodis,Lreffclimodis,Lpctmodis,Llwpmodis, &
-                Liwpmodis,Lclmodis,Lcrimodis,Lcrlmodis
+                Liwpmodis,Lclmodis,Lcrimodis,Lcrlmodis,Lclopaquecalipso,Lclthincalipso, & !OPAQ (2)
+                Lclzopaquecalipso,Lclcalipsoopaque,Lclcalipsothin,Lclcalipsozopaque,    & !OPAQ (4)
+                Lclcalipsoopacity,LprofSR,Lproftemp                                       !OPAQ (1) !TIBO (2)
 
      character(len=32) :: out_list(N_OUT_LIST)
@@ -199,9 +201,14 @@
     ! Arrays with dimensions (Npoints,Nlevels)
     real, dimension(:,:),pointer :: lidarcld    ! 3D "lidar" cloud fraction 
+    real, dimension(:,:),pointer :: proftemp    ! Temperature profiles 40 levs !TIBO 
     ! Arrays with dimensions (Npoints,LIDAR_NCAT)
     real, dimension(:,:),pointer :: cldlayer      ! low, mid, high-level, total lidar cloud cover
-   ! Arrays with dimensions (Npoints,Nlevels,Nphase)
+    ! Arrays with dimensions (Npoints,LIDAR_NTYPE)                                               !OPAQ
+    real, dimension(:,:),pointer :: cldtype       ! opaque and thin cloud covers, z_opaque       !OPAQ
+    ! Arrays with dimensions (Npoints,Nlevels,Nphase)
     real, dimension(:,:,:),pointer :: lidarcldphase    ! 3D "lidar" phase cloud fraction 
-     ! Arrays with dimensions (Npoints,LIDAR_NCAT,Nphase)
+    ! Arrays with dimensions (Npoints,Nlevels,LIDAR_NTYPE+1)                                     !OPAQ
+    real, dimension(:,:,:),pointer :: lidarcldtype     ! 3D "lidar" OPAQ type fraction + opacity !OPAQ 
+    ! Arrays with dimensions (Npoints,LIDAR_NCAT,Nphase)
     real, dimension(:,:,:),pointer :: cldlayerphase      ! low, mid, high-level lidar phase cloud cover
     ! Arrays with dimensions (Npoints,Ntemps,Nphase)
@@ -209,4 +216,8 @@
     ! Arrays with dimensions (Npoints,PARASOL_NREFL)
     real, dimension(:,:),pointer :: parasolrefl   ! mean parasol reflectance
+!    ! Arrays with dimensions (Npoints,Ncolumns,Nlevels)                     !TIBO
+!    real, dimension(:,:,:),pointer :: profSR      ! subcolumns for each day !TIBO 
+    ! Arrays with dimensions (Npoints,Nlevels,Ncolumns)                     !TIBO2
+    real, dimension(:,:,:),pointer :: profSR      ! subcolumns for each day !TIBO2 
 
   END TYPE COSP_LIDARSTATS
@@ -803,4 +814,7 @@
     allocate(x%lidarcldphase(i,k,6),x%lidarcldtmp(i,LIDAR_NTEMP,5),&
              x%cldlayerphase(i,LIDAR_NCAT,6))
+    allocate(x%lidarcldtype(i,k,LIDAR_NTYPE+1),x%cldtype(i,LIDAR_NTYPE)) !OPAQ
+!    allocate(x%profSR(i,j,k),x%proftemp(i,k))                            !TIBO
+    allocate(x%profSR(i,k,j),x%proftemp(i,k))                            !TIBO2
     ! --- Initialise to zero ---
     x%srbval    = 0.0
@@ -812,4 +826,8 @@
     x%cldlayerphase  = 0.0
     x%lidarcldtmp  = 0.0
+    x%lidarcldtype  = 0.0 !OPAQ
+    x%cldtype  = 0.0      !OPAQ
+    x%profSR   = 0.0      !TIBO
+    x%proftemp = 0.0      !TIBO
 
    END SUBROUTINE CONSTRUCT_COSP_LIDARSTATS
@@ -823,4 +841,6 @@
     deallocate(x%srbval, x%cfad_sr, x%lidarcld, x%cldlayer, x%parasolrefl)
     deallocate(x%cldlayerphase, x%lidarcldtmp, x%lidarcldphase)
+    deallocate(x%lidarcldtype, x%cldtype) !OPAQ
+    deallocate(x%profSR, x%proftemp)      !TIBO
   END SUBROUTINE FREE_COSP_LIDARSTATS
 
@@ -1367,4 +1387,8 @@
     y%cldlayerphase(iy(1):iy(2),:,:)  = x%cldlayerphase(ix(1):ix(2),:,:)
     y%lidarcldtmp(iy(1):iy(2),:,:)    = x%lidarcldtmp(ix(1):ix(2),:,:)
+    y%lidarcldtype(iy(1):iy(2),:,:)    = x%lidarcldtype(ix(1):ix(2),:,:) !OPAQ
+    y%cldtype(iy(1):iy(2),:)           = x%cldtype(ix(1):ix(2),:)        !OPAQ
+    y%profSR(iy(1):iy(2),:,:)          = x%profSR(ix(1):ix(2),:,:)       !TIBO
+    y%proftemp(iy(1):iy(2),:)          = x%proftemp(ix(1):ix(2),:)       !TIBO
 END SUBROUTINE COSP_LIDARSTATS_CPSECTION
 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -1599,12 +1623,21 @@
     ! Arrays with dimensions (Npoints,SR_BINS,Nlevels)
     print *, 'shape(x%cfad_sr): ',shape(x%cfad_sr)
+!    ! Arrays with dimensions (Npoints,Ncolumns,Nlevels) !TIBO
+!    print *, 'shape(x%profSR): ',shape(x%profSR)        !TIBO
+    ! Arrays with dimensions (Npoints,Nlevels,Ncolumns) !TIBO2
+    print *, 'shape(x%profSR): ',shape(x%profSR)        !TIBO2
     ! Arrays with dimensions (Npoints,Nlevels)
     print *, 'shape(x%lidarcld): ',shape(x%lidarcld)
+    print *, 'shape(x%proftemp): ',shape(x%proftemp)    !TIBO
     ! Arrays with dimensions (Npoints,LIDAR_NCAT)
     print *, 'shape(x%cldlayer): ',shape(x%cldlayer)
+    ! Arrays with dimensions (Npoints,LIDAR_NTYPE)            !OPAQ
+    print *, 'shape(x%cldtype): ',shape(x%cldtype)            !OPAQ
     ! Arrays with dimensions (Npoints,PARASOL_NREFL)
     print *, 'shape(x%parasolrefl): ',shape(x%parasolrefl)
      ! Arrays with dimensions (Npoints,Nlevels,Nphase)
     print *, 'shape(x%lidarcldphase): ',shape(x%lidarcldphase)
+     ! Arrays with dimensions (Npoints,Nlevels,LIDAR_NTYPE+1) !OPAQ
+    print *, 'shape(x%lidarcldtype): ',shape(x%lidarcldtype)  !OPAQ
      ! Arrays with dimensions (Npoints,LIDAR_NCAT,Nphase)
     print *, 'shape(x%cldlayerphase): ',shape(x%cldlayerphase)
