Index: LMDZ4/branches/LMDZ4_AR5/libf/cosp/write_histmthCOSP.h
===================================================================
--- LMDZ4/branches/LMDZ4_AR5/libf/cosp/write_histmthCOSP.h	(revision 1401)
+++ LMDZ4/branches/LMDZ4_AR5/libf/cosp/write_histmthCOSP.h	(revision 1535)
@@ -10,33 +10,42 @@
        if (cfg%Llidar_sim) then
          if (cfg%Lcllcalipso) then
-          CALL histwrite_phy(nid_mth_cosp,"cllcalipso",itau_wcosp,stlidar%cldlayer(:,1))
+          CALL histwrite_phy(nid_mth_cosp,lCOSP,"cllcalipso",itau_wcosp, &
+     stlidar%cldlayer(:,1))
          endif
          if (cfg%Lclhcalipso) then
-          CALL histwrite_phy(nid_mth_cosp,"clhcalipso",itau_wcosp,stlidar%cldlayer(:,3))
+          CALL histwrite_phy(nid_mth_cosp,lCOSP,"clhcalipso",itau_wcosp, &
+     stlidar%cldlayer(:,3))
          endif
          if (cfg%Lclmcalipso) then
-          CALL histwrite_phy(nid_mth_cosp,"clmcalipso",itau_wcosp,stlidar%cldlayer(:,2))
+          CALL histwrite_phy(nid_mth_cosp,lCOSP,"clmcalipso",itau_wcosp, &
+     stlidar%cldlayer(:,2))
          endif
          if (cfg%Lcltcalipso) then
-          CALL histwrite_phy(nid_mth_cosp,"cltcalipso",itau_wcosp,stlidar%cldlayer(:,4)) 
+          CALL histwrite_phy(nid_mth_cosp,lCOSP,"cltcalipso",itau_wcosp, &
+     stlidar%cldlayer(:,4)) 
          endif
          if (cfg%Lclcalipso) then
-          CALL histwrite_phy(nid_mth_cosp,"clcalipso",itau_wcosp,stlidar%lidarcld)
+          CALL histwrite_phy(nid_mth_cosp,lCOSP,"clcalipso",itau_wcosp, &
+     stlidar%lidarcld)
          endif
          if (cfg%Lcfad_lidarsr532) then
            do ii=1,SR_BINS
-            CALL histwrite_phy(nid_mth_cosp,"cfad_lidarsr532_"//chcol(ii),itau_wcosp,stlidar%cfad_sr(:,ii,:))
+            CALL histwrite_phy(nid_mth_cosp,lCOSP, &
+     "cfad_lidarsr532_"//chcol(ii),itau_wcosp,stlidar%cfad_sr(:,ii,:))
            enddo
          endif
          if (cfg%Lparasol_refl) then
-           CALL histwrite_phy(nid_mth_cosp,"parasol_refl",itau_wcosp,stlidar%parasolrefl)
+           CALL histwrite_phy(nid_mth_cosp,lCOSP,"parasol_refl", &
+     itau_wcosp,stlidar%parasolrefl)
          endif
          if (cfg%Latb532) then
            do ii=1,Ncolumns
-            CALL histwrite_phy(nid_mth_cosp,"atb532_"//chcol(ii),itau_wcosp,sglidar%beta_tot(:,ii,:))
+            CALL histwrite_phy(nid_mth_cosp,lCOSP, &
+     "atb532_"//chcol(ii),itau_wcosp,sglidar%beta_tot(:,ii,:))
            enddo
          endif
          if (cfg%Lbeta_mol532) then
-           CALL histwrite_phy(nid_mth_cosp,"beta_mol532",itau_wcosp,sglidar%beta_mol)
+           CALL histwrite_phy(nid_mth_cosp,lCOSP,"beta_mol532", &
+     itau_wcosp,sglidar%beta_mol)
          endif
         endif ! Lidar
@@ -84,30 +93,39 @@
           if (cfg%Lclisccp2) then
             do ii=1,7
-              CALL histwrite_phy(nid_mth_cosp,"clisccp2_"//chcol(ii),itau_wcosp,isccp%fq_isccp(:,ii,:))
+              CALL histwrite_phy(nid_mth_cosp,lCOSP,"clisccp2_"//chcol(ii), &
+     itau_wcosp,isccp%fq_isccp(:,ii,:))
             enddo
           endif
           if (cfg%Lboxtauisccp) then
-             CALL histwrite_phy(nid_mth_cosp,"boxtauisccp",itau_wcosp,isccp%boxtau)
+             CALL histwrite_phy(nid_mth_cosp,lCOSP,"boxtauisccp", &
+     itau_wcosp,isccp%boxtau)
           endif
           if (cfg%Lboxptopisccp) then
-             CALL histwrite_phy(nid_mth_cosp,"boxptopisccp",itau_wcosp,isccp%boxptop)
+             CALL histwrite_phy(nid_mth_cosp,lCOSP,"boxptopisccp", &
+     itau_wcosp,isccp%boxptop)
           endif
           if (cfg%Ltclisccp) then
-             CALL histwrite_phy(nid_mth_cosp,"tclisccp",itau_wcosp,isccp%totalcldarea)
+             CALL histwrite_phy(nid_mth_cosp,lCOSP,"tclisccp", &
+     itau_wcosp,isccp%totalcldarea)
           endif
           if (cfg%Lctpisccp) then
-             CALL histwrite_phy(nid_mth_cosp,"ctpisccp",itau_wcosp,isccp%meanptop)
+             CALL histwrite_phy(nid_mth_cosp,lCOSP,"ctpisccp", &
+     itau_wcosp,isccp%meanptop)
           endif
           if (cfg%Ltauisccp) then
-             CALL histwrite_phy(nid_mth_cosp,"tauisccp",itau_wcosp,isccp%meantaucld)
+             CALL histwrite_phy(nid_mth_cosp,lCOSP,"tauisccp", &
+     itau_wcosp,isccp%meantaucld)
           endif
           if (cfg%Lalbisccp) then
-             CALL histwrite_phy(nid_mth_cosp,"albisccp",itau_wcosp,isccp%meanalbedocld)
+             CALL histwrite_phy(nid_mth_cosp,lCOSP,"albisccp", &
+     itau_wcosp,isccp%meanalbedocld)
           endif
           if (cfg%Lmeantbisccp) then
-             CALL histwrite_phy(nid_mth_cosp,"meantbisccp",itau_wcosp,isccp%meantb)
+             CALL histwrite_phy(nid_mth_cosp,lCOSP,"meantbisccp", &
+     itau_wcosp,isccp%meantb)
           endif
           if (cfg%Lmeantbclrisccp) then
-             CALL histwrite_phy(nid_mth_cosp,"meantbclrisccp",itau_wcosp,isccp%meantbclr)
+             CALL histwrite_phy(nid_mth_cosp,lCOSP,"meantbclrisccp", &
+     itau_wcosp,isccp%meantbclr)
           endif
         endif ! Isccp
