Index: /LMDZ5/branches/testing/DefLists/LISMOI
===================================================================
--- /LMDZ5/branches/testing/DefLists/LISMOI	(revision 2870)
+++ /LMDZ5/branches/testing/DefLists/LISMOI	(revision 2870)
@@ -0,0 +1,9 @@
+#Verififaction de la concordance entre les physiq.def de DefList
+#et ceux du 1D
+
+for i in physiq* ; do phys=`echo $i | awk -F_ ' { print $NF } '` ; diff $i ~/LMDZ/LMDZ20170306.trunk2825/1D/INPUT/PHYS/$phys/physiq.def ; done | more
+
+# Ajouter dans les physiques se trouvant dans DefList mais pas
+# dans le 1D (sur ../../../../1D/INPUT/PHYS)
+for i in physiq* ; do phys=`echo $i | awk -F_ ' { print $NF } '` ; dd=../../../../1D/INPUT/PHYS ; if [ ! -d $dd/$phys ] ; then mkdir $dd/$phys ; cp $i $dd/$phys/physiq.def ; cp $dd/NPv5.70/traceur.def $dd/$phys/traceur.def ; fi ; done
+
Index: /LMDZ5/branches/testing/DefLists/field_def_lmdz.xml
===================================================================
--- /LMDZ5/branches/testing/DefLists/field_def_lmdz.xml	(revision 2869)
+++ /LMDZ5/branches/testing/DefLists/field_def_lmdz.xml	(revision 2870)
@@ -319,37 +319,50 @@
         <field id="sollwad0"    long_name="LW-ADE clear-sky at SRF"    unit="W/m2" />
         <field id="sollwai"    long_name="LW-AIE at SRF" unit="W/m2" />
-        <field id="OD550_ASBCM"    long_name="Aerosol Optical depth at 550 nm "    unit="1" />
-        <field id="OD550_ASPOMM"    long_name="Aerosol Optical depth at 550 nm "    unit="1" />
-        <field id="OD550_ASSO4M"    long_name="Aerosol Optical depth at 550 nm "    unit="1" />
-        <field id="OD550_CSSO4M"    long_name="Aerosol Optical depth at 550 nm "    unit="1" />
-        <field id="OD550_SSSSM"    long_name="Aerosol Optical depth at 550 nm "    unit="1" />
-        <field id="OD550_ASSSM"    long_name="Aerosol Optical depth at 550 nm "    unit="1" />
-        <field id="OD550_CSSSM"    long_name="Aerosol Optical depth at 550 nm "    unit="1" />
-        <field id="OD550_CIDUSTM"    long_name="Aerosol Optical depth at 550 nm "    unit="1" />
-        <field id="OD550_AIBCM"    long_name="Aerosol Optical depth at 550 nm "    unit="1" />
-        <field id="OD550_AIPOMM"    long_name="Aerosol Optical depth at 550 nm "    unit="1" />
-        <field id="OD550_STRAT"    long_name="Aerosol Optical depth at 550 nm "    unit="1" enabled="TRUE" />
-        <field id="OD550_SO4"     long_name="Aerosol Optical depth at 550 nm "    unit="1" />
-        <field id="OD550_ASNO3M"     long_name="Aerosol Optical depth at 550 nm "    unit="1" />
-        <field id="OD550_CSNO3M"     long_name="Aerosol Optical depth at 550 nm "    unit="1" />
-        <field id="OD550_CINO3M"     long_name="Aerosol Optical depth at 550 nm "    unit="1" />
-        <field id="OD_10um_STRAT" long_name="Stratospheric Aerosol Optical depth at 10 um" unit="-" />
-        <field id="od443aer" long_name="Total aerosol optical depth at 440nm" unit="-" />
-        <field id="od550aer"    long_name="Total aerosol optical depth at 550nm"    unit="-" />
+        <field id="od550_ASBCM"    long_name="Aerosol Optical depth at 550 nm "    unit="1" />
+        <field id="od550_ASPOMM"   long_name="Aerosol Optical depth at 550 nm "    unit="1" />
+        <field id="od550_ASSO4M"   long_name="Aerosol Optical depth at 550 nm "    unit="1" />
+        <field id="od550_CSSO4M"   long_name="Aerosol Optical depth at 550 nm "    unit="1" />
+        <field id="od550_SSSSM"    long_name="Aerosol Optical depth at 550 nm "    unit="1" />
+        <field id="od550_ASSSM"    long_name="Aerosol Optical depth at 550 nm "    unit="1" />
+        <field id="od550_CSSSM"    long_name="Aerosol Optical depth at 550 nm "    unit="1" />
+        <field id="od550_CIDUSTM"  long_name="Aerosol Optical depth at 550 nm "    unit="1" />
+        <field id="od550_AIBCM"    long_name="Aerosol Optical depth at 550 nm "    unit="1" />
+        <field id="od550_AIPOMM"   long_name="Aerosol Optical depth at 550 nm "    unit="1" />
+        <field id="od550_ASNO3M"   long_name="Aerosol Optical depth at 550 nm "    unit="1" />
+        <field id="od550_CSNO3M"   long_name="Aerosol Optical depth at 550 nm "    unit="1" />
+        <field id="od550_CINO3M"   long_name="Aerosol Optical depth at 550 nm "    unit="1" />
+        <field id="od550_STRAT"    long_name="Aerosol Optical depth at 550 nm "    unit="1" enabled="TRUE" />
+        <field id="dryod550_ASBCM"    long_name="Aerosol Optical depth at 550 nm "    unit="1" />
+        <field id="dryod550_ASPOMM"   long_name="Aerosol Optical depth at 550 nm "    unit="1" />
+        <field id="dryod550_ASSO4M"   long_name="Aerosol Optical depth at 550 nm "    unit="1" />
+        <field id="dryod550_CSSO4M"   long_name="Aerosol Optical depth at 550 nm "    unit="1" />
+        <field id="dryod550_SSSSM"    long_name="Aerosol Optical depth at 550 nm "    unit="1" />
+        <field id="dryod550_ASSSM"    long_name="Aerosol Optical depth at 550 nm "    unit="1" />
+        <field id="dryod550_CSSSM"    long_name="Aerosol Optical depth at 550 nm "    unit="1" />
+        <field id="dryod550_CIDUSTM"  long_name="Aerosol Optical depth at 550 nm "    unit="1" />
+        <field id="dryod550_AIBCM"    long_name="Aerosol Optical depth at 550 nm "    unit="1" />
+        <field id="dryod550_AIPOMM"   long_name="Aerosol Optical depth at 550 nm "    unit="1" />
+        <field id="dryod550_ASNO3M"   long_name="Aerosol Optical depth at 550 nm "    unit="1" />
+        <field id="dryod550_CSNO3M"   long_name="Aerosol Optical depth at 550 nm "    unit="1" />
+        <field id="dryod550_CINO3M"   long_name="Aerosol Optical depth at 550 nm "    unit="1" />
+        <field id="od_10um_STRAT"  long_name="Stratospheric Aerosol Optical depth at 10 um" unit="-" />
+        <field id="od443aer"    long_name="Total aerosol optical depth at 440nm" unit="-" />
+        <field id="od550aer"    long_name="Total aerosol optical depth at 550nm" unit="-" />
+        <field id="dryod550aer" long_name="Total dry aerosol optical depth at 550nm"    unit="-" />
         <field id="od865aer"    long_name="Total aerosol optical depth at 870nm"    unit="-" />
-        <field id="abs550aer"    long_name="Absorption aerosol optical depth at 550nm"    unit="-" />
-        <field id="od550lt1aer"    long_name="Fine mode optical depth"    unit="-" />
+        <field id="abs550aer"   long_name="Absorption aerosol optical depth at 550nm"    unit="-" />
+        <field id="od550lt1aer" long_name="Fine mode optical depth"    unit="-" />
         <field id="sconcso4"    long_name="Surface Concentration of Sulfate "    unit="kg/m3" />
         <field id="sconcno3"    long_name="Surface Concentration of Nitrate "    unit="kg/m3" />
-        <field id="sconcoa"    long_name="Surface Concentration of Organic Aerosol "    unit="kg/m3" />
-        <field id="sconcbc"    long_name="Surface Concentration of Black Carbon "    unit="kg/m3" />
-        <field id="sconcss"    long_name="Surface Concentration of Sea Salt "    unit="kg/m3" />
-        <field id="sconcdust"    long_name="Surface Concentration of Dust "    unit="kg/m3" />
-        <field id="loadso4"    long_name="Column Load of Sulfate "    unit="kg/m2" />
+        <field id="sconcoa"     long_name="Surface Concentration of Organic Aerosol "    unit="kg/m3" />
+        <field id="sconcbc"     long_name="Surface Concentration of Black Carbon "    unit="kg/m3" />
+        <field id="sconcss"     long_name="Surface Concentration of Sea Salt "    unit="kg/m3" />
+        <field id="sconcdust"   long_name="Surface Concentration of Dust "    unit="kg/m3" />
+        <field id="loadso4"   long_name="Column Load of Sulfate "    unit="kg/m2" />
         <field id="loadoa"    long_name="Column Load of Organic Aerosol "    unit="kg/m2" />
         <field id="loadbc"    long_name="Column Load of Black Carbon "    unit="kg/m2" />
         <field id="loadss"    long_name="Column Load of Sea Salt "    unit="kg/m2" />
-        <field id="loaddust"    long_name="Column Load of Dust "    unit="kg/m2" />
-        <field id="loadno3"     long_name="Column Load of Nitrate " unit="kg/m2" />
+        <field id="loaddust"  long_name="Column Load of Dust "    unit="kg/m2" />
+        <field id="loadno3"   long_name="Column Load of Nitrate " unit="kg/m2" />
         <field id="swtoaas_nat"    long_name="Natural aerosol radiative forcing all-sky at TOA"    unit="W/m2" />
         <field id="swsrfas_nat"    long_name="Natural aerosol radiative forcing all-sky at SRF"    unit="W/m2" />
@@ -638,6 +651,6 @@
 
     <field_group id="fields_strataer_2D" domain_ref="dom_glo">
-        <field id="OD550_strat_only"   long_name="Stratospheric Aerosol Optical depth at 550 nm "        unit="1" />
-        <field id="OD1020_strat_only"  long_name="Stratospheric Aerosol Optical depth at 1020 nm "       unit="1" />
+        <field id="od550_strat_only"   long_name="Stratospheric Aerosol Optical depth at 550 nm "        unit="1" />
+        <field id="od1020_strat_only"  long_name="Stratospheric Aerosol Optical depth at 1020 nm "       unit="1" />
         <field id="surf_PM25_sulf"     long_name="Sulfate PM2.5 concentration at the surface"            unit="ug/m3" />
         <field id="p_tropopause"       long_name="Tropopause pressure"                                   unit="Pa" />
@@ -774,5 +787,5 @@
 
     <field_group id="fields_COSP_ISCCP" domain_ref="dom_glo" freq_op="3h">
-      <field id="sunlit" long_name="1 for day points, 0 for nightime" unit="1"  detect_missing_value=".true."  detect_missing_value=".true." />
+      <field id="sunlit" long_name="1 for day points, 0 for nightime" unit="1" detect_missing_value=".true." />
       <field id="boxtauisccp" long_name="Optical Depth in Each Column as Calculated by the ISCCP Simulator" unit="1" axis_ref="column"  detect_missing_value=".true." />
       <field id="boxptopisccp" long_name="Cloud Top Pressure in Each Column as Calculated by the ISCCP Simulator" unit="Pa" axis_ref="column"  detect_missing_value=".true." />
Index: /LMDZ5/branches/testing/DefLists/file_def_histLES_lmdz.xml
===================================================================
--- /LMDZ5/branches/testing/DefLists/file_def_histLES_lmdz.xml	(revision 2869)
+++ /LMDZ5/branches/testing/DefLists/file_def_histLES_lmdz.xml	(revision 2870)
@@ -321,18 +321,18 @@
                 <field field_ref="solswad0" level="10" />
                 <field field_ref="solswai" level="10" />
-                <field field_ref="OD550_ASBCM" level="10" />
-                <field field_ref="OD550_ASPOMM" level="10" />
-                <field field_ref="OD550_ASSO4M" level="10" />
-                <field field_ref="OD550_CSSO4M" level="10" />
-                <field field_ref="OD550_SSSSM" level="10" />
-                <field field_ref="OD550_ASSSM" level="10" />
-                <field field_ref="OD550_CSSSM" level="10" />
-                <field field_ref="OD550_CIDUSTM" level="10" />
-                <field field_ref="OD550_AIBCM" level="10" />
-                <field field_ref="OD550_AIPOMM" level="10" />
-                <field field_ref="OD550_ASNO3M" level="10" />
-                <field field_ref="OD550_CSNO3M" level="10" />
-                <field field_ref="OD550_CINO3M" level="10" />
-                <field field_ref="OD550_STRAT" level="10" />
+                <field field_ref="od550_ASBCM" level="10" />
+                <field field_ref="od550_ASPOMM" level="10" />
+                <field field_ref="od550_ASSO4M" level="10" />
+                <field field_ref="od550_CSSO4M" level="10" />
+                <field field_ref="od550_SSSSM" level="10" />
+                <field field_ref="od550_ASSSM" level="10" />
+                <field field_ref="od550_CSSSM" level="10" />
+                <field field_ref="od550_CIDUSTM" level="10" />
+                <field field_ref="od550_AIBCM" level="10" />
+                <field field_ref="od550_AIPOMM" level="10" />
+                <field field_ref="od550_ASNO3M" level="10" />
+                <field field_ref="od550_CSNO3M" level="10" />
+                <field field_ref="od550_CINO3M" level="10" />
+                <field field_ref="od550_STRAT" level="10" />
                 <field field_ref="od550aer" level="10" />
                 <field field_ref="od865aer" level="10" />
Index: /LMDZ5/branches/testing/DefLists/file_def_histday_lmdz.xml
===================================================================
--- /LMDZ5/branches/testing/DefLists/file_def_histday_lmdz.xml	(revision 2869)
+++ /LMDZ5/branches/testing/DefLists/file_def_histday_lmdz.xml	(revision 2870)
@@ -327,19 +327,20 @@
                 <field field_ref="sollwad0" level="10" />
                 <field field_ref="sollwai" level="10" />
-                <field field_ref="OD550_ASBCM" level="6" />
-                <field field_ref="OD550_ASPOMM" level="6" />
-                <field field_ref="OD550_ASSO4M" level="6" />
-                <field field_ref="OD550_CSSO4M" level="6" />
-                <field field_ref="OD550_SSSSM" level="6" />
-                <field field_ref="OD550_ASSSM" level="6" />
-                <field field_ref="OD550_CSSSM" level="6" />
-                <field field_ref="OD550_CIDUSTM" level="6" />
-                <field field_ref="OD550_AIBCM" level="6" />
-                <field field_ref="OD550_AIPOMM" level="6" />
-                <field field_ref="OD550_ASNO3M" level="6" />
-                <field field_ref="OD550_CSNO3M" level="6" />
-                <field field_ref="OD550_CINO3M" level="6" />
-                <field field_ref="OD550_STRAT" level="2" />
+                <field field_ref="od550_ASBCM" level="6" />
+                <field field_ref="od550_ASPOMM" level="6" />
+                <field field_ref="od550_ASSO4M" level="6" />
+                <field field_ref="od550_CSSO4M" level="6" />
+                <field field_ref="od550_SSSSM" level="6" />
+                <field field_ref="od550_ASSSM" level="6" />
+                <field field_ref="od550_CSSSM" level="6" />
+                <field field_ref="od550_CIDUSTM" level="6" />
+                <field field_ref="od550_AIBCM" level="6" />
+                <field field_ref="od550_AIPOMM" level="6" />
+                <field field_ref="od550_ASNO3M" level="6" />
+                <field field_ref="od550_CSNO3M" level="6" />
+                <field field_ref="od550_CINO3M" level="6" />
+                <field field_ref="od550_STRAT" level="2" />
                 <field field_ref="od550aer" level="6" />
+                <field field_ref="dryod550aer" level="6" />
                 <field field_ref="od865aer" level="6" />
                 <field field_ref="abs550aer" level="6" />
Index: /LMDZ5/branches/testing/DefLists/file_def_histhf_lmdz.xml
===================================================================
--- /LMDZ5/branches/testing/DefLists/file_def_histhf_lmdz.xml	(revision 2869)
+++ /LMDZ5/branches/testing/DefLists/file_def_histhf_lmdz.xml	(revision 2870)
@@ -321,18 +321,18 @@
                 <field field_ref="solswad0" level="10" />
                 <field field_ref="solswai" level="10" />
-                <field field_ref="OD550_ASBCM" level="10" />
-                <field field_ref="OD550_ASPOMM" level="10" />
-                <field field_ref="OD550_ASSO4M" level="10" />
-                <field field_ref="OD550_CSSO4M" level="10" />
-                <field field_ref="OD550_SSSSM" level="10" />
-                <field field_ref="OD550_ASSSM" level="10" />
-                <field field_ref="OD550_CSSSM" level="10" />
-                <field field_ref="OD550_CIDUSTM" level="10" />
-                <field field_ref="OD550_AIBCM" level="10" />
-                <field field_ref="OD550_AIPOMM" level="10" />
-                <field field_ref="OD550_ASNO3M" level="10" />
-                <field field_ref="OD550_CSNO3M" level="10" />
-                <field field_ref="OD550_CINO3M" level="10" />
-                <field field_ref="OD550_STRAT" level="10" />
+                <field field_ref="od550_ASBCM" level="10" />
+                <field field_ref="od550_ASPOMM" level="10" />
+                <field field_ref="od550_ASSO4M" level="10" />
+                <field field_ref="od550_CSSO4M" level="10" />
+                <field field_ref="od550_SSSSM" level="10" />
+                <field field_ref="od550_ASSSM" level="10" />
+                <field field_ref="od550_CSSSM" level="10" />
+                <field field_ref="od550_CIDUSTM" level="10" />
+                <field field_ref="od550_AIBCM" level="10" />
+                <field field_ref="od550_AIPOMM" level="10" />
+                <field field_ref="od550_ASNO3M" level="10" />
+                <field field_ref="od550_CSNO3M" level="10" />
+                <field field_ref="od550_CINO3M" level="10" />
+                <field field_ref="od550_STRAT" level="10" />
                 <field field_ref="od550aer" level="10" />
                 <field field_ref="od865aer" level="10" />
Index: /LMDZ5/branches/testing/DefLists/file_def_histins_lmdz.xml
===================================================================
--- /LMDZ5/branches/testing/DefLists/file_def_histins_lmdz.xml	(revision 2869)
+++ /LMDZ5/branches/testing/DefLists/file_def_histins_lmdz.xml	(revision 2870)
@@ -321,18 +321,18 @@
                 <field field_ref="solswad0" level="10" />
                 <field field_ref="solswai" level="10" />
-                <field field_ref="OD550_ASBCM" level="10" />
-                <field field_ref="OD550_ASPOMM" level="10" />
-                <field field_ref="OD550_ASSO4M" level="10" />
-                <field field_ref="OD550_CSSO4M" level="10" />
-                <field field_ref="OD550_SSSSM" level="10" />
-                <field field_ref="OD550_ASSSM" level="10" />
-                <field field_ref="OD550_CSSSM" level="10" />
-                <field field_ref="OD550_CIDUSTM" level="10" />
-                <field field_ref="OD550_AIBCM" level="10" />
-                <field field_ref="OD550_AIPOMM" level="10" />
-                <field field_ref="OD550_ASNO3M" level="10" />
-                <field field_ref="OD550_CSNO3M" level="10" />
-                <field field_ref="OD550_CINO3M" level="10" />
-                <field field_ref="OD550_STRAT" level="10" />
+                <field field_ref="od550_ASBCM" level="10" />
+                <field field_ref="od550_ASPOMM" level="10" />
+                <field field_ref="od550_ASSO4M" level="10" />
+                <field field_ref="od550_CSSO4M" level="10" />
+                <field field_ref="od550_SSSSM" level="10" />
+                <field field_ref="od550_ASSSM" level="10" />
+                <field field_ref="od550_CSSSM" level="10" />
+                <field field_ref="od550_CIDUSTM" level="10" />
+                <field field_ref="od550_AIBCM" level="10" />
+                <field field_ref="od550_AIPOMM" level="10" />
+                <field field_ref="od550_ASNO3M" level="10" />
+                <field field_ref="od550_CSNO3M" level="10" />
+                <field field_ref="od550_CINO3M" level="10" />
+                <field field_ref="od550_STRAT" level="10" />
                 <field field_ref="od550aer" level="10" />
                 <field field_ref="od865aer" level="10" />
Index: /LMDZ5/branches/testing/DefLists/file_def_histmth_lmdz.xml
===================================================================
--- /LMDZ5/branches/testing/DefLists/file_def_histmth_lmdz.xml	(revision 2869)
+++ /LMDZ5/branches/testing/DefLists/file_def_histmth_lmdz.xml	(revision 2870)
@@ -347,19 +347,33 @@
                 <field field_ref="sollwad0" level="5" />
                 <field field_ref="sollwai" level="5" />
-                <field field_ref="OD550_ASBCM" level="2" />
-                <field field_ref="OD550_ASPOMM" level="2" />
-                <field field_ref="OD550_ASSO4M" level="2" />
-                <field field_ref="OD550_CSSO4M" level="2" />
-                <field field_ref="OD550_SSSSM" level="2" />
-                <field field_ref="OD550_ASSSM" level="2" />
-                <field field_ref="OD550_CSSSM" level="2" />
-                <field field_ref="OD550_CIDUSTM" level="2" />
-                <field field_ref="OD550_AIBCM" level="2" />
-                <field field_ref="OD550_AIPOMM" level="2" />
-                <field field_ref="OD550_ASNO3M" level="2" />
-                <field field_ref="OD550_CSNO3M" level="2" />
-                <field field_ref="OD550_CINO3M" level="2" />
-                <field field_ref="OD550_STRAT" level="2" />
+                <field field_ref="od550_ASBCM" level="2" />
+                <field field_ref="od550_ASPOMM" level="2" />
+                <field field_ref="od550_ASSO4M" level="2" />
+                <field field_ref="od550_CSSO4M" level="2" />
+                <field field_ref="od550_SSSSM" level="2" />
+                <field field_ref="od550_ASSSM" level="2" />
+                <field field_ref="od550_CSSSM" level="2" />
+                <field field_ref="od550_CIDUSTM" level="2" />
+                <field field_ref="od550_AIBCM" level="2" />
+                <field field_ref="od550_AIPOMM" level="2" />
+                <field field_ref="od550_ASNO3M" level="2" />
+                <field field_ref="od550_CSNO3M" level="2" />
+                <field field_ref="od550_CINO3M" level="2" />
+                <field field_ref="od550_STRAT" level="2" />
+                <field field_ref="dryod550_ASBCM" level="2" />
+                <field field_ref="dryod550_ASPOMM" level="2" />
+                <field field_ref="dryod550_ASSO4M" level="2" />
+                <field field_ref="dryod550_CSSO4M" level="2" />
+                <field field_ref="dryod550_SSSSM" level="2" />
+                <field field_ref="dryod550_ASSSM" level="2" />
+                <field field_ref="dryod550_CSSSM" level="2" />
+                <field field_ref="dryod550_CIDUSTM" level="2" />
+                <field field_ref="dryod550_AIBCM" level="2" />
+                <field field_ref="dryod550_AIPOMM" level="2" />
+                <field field_ref="dryod550_ASNO3M" level="2" />
+                <field field_ref="dryod550_CSNO3M" level="2" />
+                <field field_ref="dryod550_CINO3M" level="2" />
                 <field field_ref="od550aer" level="2" />
+                <field field_ref="dryod550aer" level="2" />
                 <field field_ref="od865aer" level="2" />
                 <field field_ref="abs550aer" level="2" />
Index: /LMDZ5/branches/testing/DefLists/file_def_histstn_lmdz.xml
===================================================================
--- /LMDZ5/branches/testing/DefLists/file_def_histstn_lmdz.xml	(revision 2869)
+++ /LMDZ5/branches/testing/DefLists/file_def_histstn_lmdz.xml	(revision 2870)
@@ -321,18 +321,18 @@
                 <field field_ref="solswad0" level="10" />
                 <field field_ref="solswai" level="10" />
-                <field field_ref="OD550_ASBCM" level="10" />
-                <field field_ref="OD550_ASPOMM" level="10" />
-                <field field_ref="OD550_ASSO4M" level="10" />
-                <field field_ref="OD550_CSSO4M" level="10" />
-                <field field_ref="OD550_SSSSM" level="10" />
-                <field field_ref="OD550_ASSSM" level="10" />
-                <field field_ref="OD550_CSSSM" level="10" />
-                <field field_ref="OD550_CIDUSTM" level="10" />
-                <field field_ref="OD550_AIBCM" level="10" />
-                <field field_ref="OD550_AIPOMM" level="10" />
-                <field field_ref="OD550_ASNO3M" level="10" />
-                <field field_ref="OD550_CSNO3M" level="10" />
-                <field field_ref="OD550_CINO3M" level="10" />
-                <field field_ref="OD550_STRAT" level="10" />
+                <field field_ref="od550_ASBCM" level="10" />
+                <field field_ref="od550_ASPOMM" level="10" />
+                <field field_ref="od550_ASSO4M" level="10" />
+                <field field_ref="od550_CSSO4M" level="10" />
+                <field field_ref="od550_SSSSM" level="10" />
+                <field field_ref="od550_ASSSM" level="10" />
+                <field field_ref="od550_CSSSM" level="10" />
+                <field field_ref="od550_CIDUSTM" level="10" />
+                <field field_ref="od550_AIBCM" level="10" />
+                <field field_ref="od550_AIPOMM" level="10" />
+                <field field_ref="od550_ASNO3M" level="10" />
+                <field field_ref="od550_CSNO3M" level="10" />
+                <field field_ref="od550_CINO3M" level="10" />
+                <field field_ref="od550_STRAT" level="10" />
                 <field field_ref="od550aer" level="10" />
                 <field field_ref="od865aer" level="10" />
Index: /LMDZ5/branches/testing/DefLists/physiq.def_NPv5.80b
===================================================================
--- /LMDZ5/branches/testing/DefLists/physiq.def_NPv5.80b	(revision 2870)
+++ /LMDZ5/branches/testing/DefLists/physiq.def_NPv5.80b	(revision 2870)
@@ -0,0 +1,249 @@
+#
+# $Id: physiq.def_NPv5.80a 2925 2016-07-22 13:33:42Z lfairhead $
+#
+##############################################################################
+# PARAMETRES ET CLES DE LA PHYSIQUE LMDZ
+##############################################################################
+# D: Valeur par default
+#
+#Parametres Orographiques et cdrags
+#**********************************
+##   Si=.T. ,  lecture du fichier limit avec la bonne annee 
+ok_limitvrai=n
+iflag_albedo=1
+#Cdrags 
+f_cdrag_stable=1.
+f_cdrag_ter=1.
+f_cdrag_oce=0.6
+f_ri_cd_min=0.1
+#cdmmax
+cdmmax=2.5E-3
+#cdhmax
+cdhmax=2.0E-3
+##  Orodr  ou  non   pour l orographie
+ok_orodr=y
+##  Orolf  ou  non   pour l orographie              
+ok_orolf=y
+#Rugoro
+f_rugoro=0.
+#
+### Random gravity waves
+#Activitate the stochastic parameterization of convective GWs (should be equal to ok_strato)
+ok_gwd_rando=y
+# Scale the momentum fluxes due to convective GWs
+gwd_rando_ruwmax=2.5
+#Scale the saturated momentum flux of  convective GWs 
+gwd_rando_sat=0.2
+
+sso_gkdrag=0.2
+sso_gfrcri=0.70
+sso_gkwake=0.40
+#
+# Rayonnement
+#*********************
+# activation du nouveau code de rayonnement RRTM
+# 0 : Ancien code et 1 : RRTM (D=0)
+iflag_rrtm=1
+NSW=6
+#
+# Parametres nuages
+#******************
+#seuils de la precipitation des nuages strateformes (D: 2.6e-4 2.6e-4)
+cld_lc_lsc=0.0002
+cld_lc_con=0.0002
+#constante de temps pour eleminer eau lsc et convective (D: 3600. 3600.)
+cld_tau_lsc=900.
+cld_tau_con=900.
+#facteurs correctifs sur la vitesse de chute des cristaux de glace (D: 1 1)
+ffallv_lsc=0.5
+ffallv_con=0.5
+#coefficient sur la reevaporation de la pluie (D: 2.e-5 n)
+coef_eva=2e-4
+reevap_ice=y
+#calcul des proprietes des nuages convectifs (D:1 0.375 1.e-4) 
+iflag_cldcon=6
+fact_cldcon=1.
+facttemps=0.
+#calcul eau condensee et fraction nuageuse a partir des PDF (D:0, 0:version avec ratqs sinon nouvelles PDFs)  
+iflag_pdf=1
+#calcul epaisseur optique et emmissivite des nuages (D: y 1 0.01 0.3)
+ok_newmicro=y
+iflag_ratqs=4
+ratqsp0=43700.
+ratqsdp=20000.
+ratqsbas=0.002
+ratqshaut=0.4
+#rayon effectif pour les nuages de glace (D:35)
+rad_froid=35
+#rayons effectifs pour les nuages eau liq (tailles des gouttes d eau nuageuse, D: 13 9)
+rad_chau1=12
+rad_chau2=11
+##  Choix ou non  de  New oliq               
+new_oliq=y
+# Seuils oliqmax, oicemax
+oliqmax=1.5E-3
+oicemax=1.5E-3
+#Rayons min et max effectifs des particules des nuages
+rei_min=16.
+rei_max=61.29
+#
+# Flags Convection 
+#*****************
+#Convection scheme switch (D:2, 1:LMD, 2:Tiedtke, 3:KE New Physics, 30:KE AR4)
+iflag_con=3
+#output level of energy conservation diagnostics
+if_ebil=0
+#maximum efficiency of cld water->precipitation conversion (D: 0.993)
+epmax=0.999
+#dry convective adjustment at beginning of Emanuel convective scheme (D: n 0)
+ok_adj_ema=n
+iflag_clw=0
+#Convective closure (D:1, 0:AR4, 2:ALE and ALP)
+iflag_clos=2
+#Convective entrainment mixing law (D:1, 0:AR4=flat PDF, 1=PDF)
+iflag_mix=1
+#weights of the bell shaped and flat PDF (used only if iflag_mix=1) (D: 1 0)
+qqa1=1.
+qqa2=0.
+#Parameters of the bell shaped PDF; Fmax=center (D= 0.65), Gammas=width (D=0.05)
+cvl_corr=1.0
+#Multiplicative factor of Emanuel convective scheme precipitation (D: 1.)
+Fmax=0.65
+#
+# Flags Couche limite
+#********************
+#shema de CL des thermiques (D:0, 0:ajustement sec,=>1:versions thermiques) 
+iflag_thermals=18
+#pas de temps du spliting pour les thermiques
+nsplit_thermals=1
+tau_thermals=0.
+iflag_thermals_ed=8
+fact_thermals_ed_dz=0.1
+iflag_thermals_optflux=0
+#shema de la couche de surface (D:1, 1:LMD, 8:Mellor-Yamada) 
+iflag_pbl=11
+#diffusion turbulente
+ksta_ter=1.e-7
+ksta=1.e-10
+#ok_kzmin : calcul Kzmin dans la CL de surface
+ok_kzmin=y
+#couplage ou non avec la convection
+iflag_coupl=5 (0:AR4 et 1:nouvelle physique)
+seuil_inversion=-0.08
+#rendement sur la puissance fournie par les thermiques a la convection
+alp_bl_k=0.5
+#
+## temperature dependency of qsat for iterative procedure
+## temporary flag to switch between the old (CMIP5, D=0) and new versions (=1) versions 
+iflag_fisrtilp_qsat=4 
+## Reactivation du calcul d'un zmax continu pour les thermiques
+## reactivation d'une fermeture humide des thermiques  iflag_thermals_closure=2 (D=1)
+iflag_thermals_closure=1
+#
+# Flags wakes
+#************
+#Wake scheme switch (D:0, 0:AR4, 1:New Physics)
+iflag_wake=1
+#Constant value to be added to Alp (D: 0.)
+alp_offset=0.
+
+### nrlmd le 10/04/2012: Declenchement ###
+#Declenchement par couche-limite (0: deterministe, 1: stochastique)
+iflag_trig_bl=1
+#Surface critique au LCL
+s_trig=1.2e7
+#Temps de decorrelation entre scenes de cumulus
+tau_trig_shallow=1200
+#Temps de decorrelation entre scenes de cumulonimbus
+tau_trig_deep=1200
+# Pour la stabilisation
+random_notrig_max=0.99
+ok_adjwk=y
+tmax_fonte_cv=278.15
+
+
+### nrlmd le 10/04/2012: Fermeture ###
+#Fermeture par couche-limite (0: deterministe, 1: statistique, 2: statistique+convergence grande echelle)
+iflag_clos_bl=1
+### fin nrlmd le 10/04/2012
+
+## Modification de la plage de temperature pour la phase mixte liquide/glace des nuages
+## Controle par les t_glace_min/max, exposant_glace, iflag_t_glace (D=0)
+t_glace_min=233.13
+t_glace_max=273.13
+exposant_glace=1.
+iflag_t_glace=2
+iflag_ice_thermo=1
+
+#
+## The source terms of the TKE prognostic equation are diagnosed from tendencies (du, dv, dT) 
+## associated with subrgrid scaleamotions and treated as an additional heat source.
+## Controled by a key, iflag_ener_conserv (D=-1):
+## 0 : no conservation, -1 : old adhoc correction for kinetic E only (used for CMIP5) 
+## 1 : conservation, 101 : conversion from kinetic to heat only, 110 conversion from potential to heat only
+iflag_ener_conserv=1
+
+#Activation of corrections for water conservation (D: n). 
+##The default is n for compatibility with earlier versions.
+##generally it should be y.
+ok_conserv_q=y 
+
+iflag_cloudth_vert=3
+
+#
+lmixmin=10.
+#pbl_lmixmin_alpha=0.05
+
+#Bergeron
+iflag_bergeron=1
+
+
+### Convection
+#altitude, in hPa, above LCL at which buoybase is computed, def = original: -40
+dpbase=-40.
+#altitude, in hPa, above LCL below which Ep=0, def = original: 150, used only if flag_epKEorig=0
+pbcrit=150.0
+#altitude, in hPa, above LCL above which Ep=Epmax, def = original: 500, used only if flag_epKEorig=0
+ptcrit=500.0
+#reference fractional area of precipitating downdraughts, def = original: 0.01
+sigdz=0.01
+#unsaturated fraction of precipitating downdraughts, def = original: 0.15
+spfac=0.15
+#relaxation time of cloud base mass flux, def = original: 8000
+tau=8000.
+#flag for wb (= vert velocity at LFC); 0->wb=wbmax, 1->wb=f(plfc) bounded, 2->wb=f(plfc) linear, def = 1
+flag_wb=1
+#parameter used in the computation of wb, def = 6.
+wbmax=6.
+#
+ok_convstop=.False.
+#
+tau_stop=15000.
+#
+ok_intermittent=.False.
+#shedding coefficient (used when iflag_mix_adiab=1)
+coef_peel=0.25
+#
+### Clouds
+#Conversion cld water->precip: Ep=f(pressure) if 0; Ep=f(temperature) if 1, def=1
+flag_epKEorig=1
+#max condensed water concentration in kg/kg, def=0.0003, original: 0.0011, used only if flag_epKEorig=1
+elcrit=0.00025
+#temperature in degre Celsius, at which Ep=Epmax, def=-55., original: -55, used only if flag_epKEorig=1
+tlcrit=-40.
+
+### Wakes
+#coefficient in Wape->C_star formula: C_star=stark*sqrt(2*Wape), def: 0.33
+stark=0.33
+#lifting efficiency of wakes; Alp=Alpk*Fip, Fip=power provided by wakes, def: 0.25
+alpk=0.25
+#wake density = number of wake centers per m2, def: 8.E-12
+wdens_ref=8.E-12
+#multiplicative factor of the damping by gravity waves, def: 4.
+coefgw=4.
+#
+### Les parametres suivants viennent du config.def
+# constante solaire lue dans un fichier par defaut
+ok_suntime_rrtm=y
+# Aerosols stratospheriques utilises par defaut
+flag_aerosol_strat=2
Index: /LMDZ5/branches/testing/DefLists/physiq.def_NPv5.80bz0
===================================================================
--- /LMDZ5/branches/testing/DefLists/physiq.def_NPv5.80bz0	(revision 2870)
+++ /LMDZ5/branches/testing/DefLists/physiq.def_NPv5.80bz0	(revision 2870)
@@ -0,0 +1,252 @@
+#
+# $Id: physiq.def_NPv5.80a 2925 2016-07-22 13:33:42Z lfairhead $
+#
+##############################################################################
+# PARAMETRES ET CLES DE LA PHYSIQUE LMDZ
+##############################################################################
+# D: Valeur par default
+#
+#Parametres Orographiques et cdrags
+#**********************************
+##   Si=.T. ,  lecture du fichier limit avec la bonne annee 
+ok_limitvrai=n
+iflag_albedo=1
+#Cdrags 
+f_cdrag_stable=1.
+f_cdrag_ter=1.
+f_cdrag_oce=1
+iflag_z0_oce=1
+f_z0qh_oce=1.55
+min_wind_speed=0.1
+f_ri_cd_min=0.1
+#cdmmax
+cdmmax=2.5E-3
+#cdhmax
+cdhmax=2.0E-3
+##  Orodr  ou  non   pour l orographie
+ok_orodr=y
+##  Orolf  ou  non   pour l orographie              
+ok_orolf=y
+#Rugoro
+f_rugoro=0.
+#
+### Random gravity waves
+#Activitate the stochastic parameterization of convective GWs (should be equal to ok_strato)
+ok_gwd_rando=y
+# Scale the momentum fluxes due to convective GWs
+gwd_rando_ruwmax=2.5
+#Scale the saturated momentum flux of  convective GWs 
+gwd_rando_sat=0.2
+
+sso_gkdrag=0.2
+sso_gfrcri=0.70
+sso_gkwake=0.40
+#
+# Rayonnement
+#*********************
+# activation du nouveau code de rayonnement RRTM
+# 0 : Ancien code et 1 : RRTM (D=0)
+iflag_rrtm=1
+NSW=6
+#
+# Parametres nuages
+#******************
+#seuils de la precipitation des nuages strateformes (D: 2.6e-4 2.6e-4)
+cld_lc_lsc=0.0002
+cld_lc_con=0.0002
+#constante de temps pour eleminer eau lsc et convective (D: 3600. 3600.)
+cld_tau_lsc=900.
+cld_tau_con=900.
+#facteurs correctifs sur la vitesse de chute des cristaux de glace (D: 1 1)
+ffallv_lsc=0.5
+ffallv_con=0.5
+#coefficient sur la reevaporation de la pluie (D: 2.e-5 n)
+coef_eva=2e-4
+reevap_ice=y
+#calcul des proprietes des nuages convectifs (D:1 0.375 1.e-4) 
+iflag_cldcon=6
+fact_cldcon=1.
+facttemps=0.
+#calcul eau condensee et fraction nuageuse a partir des PDF (D:0, 0:version avec ratqs sinon nouvelles PDFs)  
+iflag_pdf=1
+#calcul epaisseur optique et emmissivite des nuages (D: y 1 0.01 0.3)
+ok_newmicro=y
+iflag_ratqs=4
+ratqsp0=43700.
+ratqsdp=20000.
+ratqsbas=0.002
+ratqshaut=0.4
+#rayon effectif pour les nuages de glace (D:35)
+rad_froid=35
+#rayons effectifs pour les nuages eau liq (tailles des gouttes d eau nuageuse, D: 13 9)
+rad_chau1=12
+rad_chau2=11
+##  Choix ou non  de  New oliq               
+new_oliq=y
+# Seuils oliqmax, oicemax
+oliqmax=1.5E-3
+oicemax=1.5E-3
+#Rayons min et max effectifs des particules des nuages
+rei_min=16.
+rei_max=61.29
+#
+# Flags Convection 
+#*****************
+#Convection scheme switch (D:2, 1:LMD, 2:Tiedtke, 3:KE New Physics, 30:KE AR4)
+iflag_con=3
+#output level of energy conservation diagnostics
+if_ebil=0
+#maximum efficiency of cld water->precipitation conversion (D: 0.993)
+epmax=0.999
+#dry convective adjustment at beginning of Emanuel convective scheme (D: n 0)
+ok_adj_ema=n
+iflag_clw=0
+#Convective closure (D:1, 0:AR4, 2:ALE and ALP)
+iflag_clos=2
+#Convective entrainment mixing law (D:1, 0:AR4=flat PDF, 1=PDF)
+iflag_mix=1
+#weights of the bell shaped and flat PDF (used only if iflag_mix=1) (D: 1 0)
+qqa1=1.
+qqa2=0.
+#Parameters of the bell shaped PDF; Fmax=center (D= 0.65), Gammas=width (D=0.05)
+cvl_corr=1.0
+#Multiplicative factor of Emanuel convective scheme precipitation (D: 1.)
+Fmax=0.65
+#
+# Flags Couche limite
+#********************
+#shema de CL des thermiques (D:0, 0:ajustement sec,=>1:versions thermiques) 
+iflag_thermals=18
+#pas de temps du spliting pour les thermiques
+nsplit_thermals=1
+tau_thermals=0.
+iflag_thermals_ed=8
+fact_thermals_ed_dz=0.1
+iflag_thermals_optflux=0
+#shema de la couche de surface (D:1, 1:LMD, 8:Mellor-Yamada) 
+iflag_pbl=11
+#diffusion turbulente
+ksta_ter=1.e-7
+ksta=1.e-10
+#ok_kzmin : calcul Kzmin dans la CL de surface
+ok_kzmin=y
+#couplage ou non avec la convection
+iflag_coupl=5 (0:AR4 et 1:nouvelle physique)
+seuil_inversion=-0.08
+#rendement sur la puissance fournie par les thermiques a la convection
+alp_bl_k=0.5
+#
+## temperature dependency of qsat for iterative procedure
+## temporary flag to switch between the old (CMIP5, D=0) and new versions (=1) versions 
+iflag_fisrtilp_qsat=4 
+## Reactivation du calcul d'un zmax continu pour les thermiques
+## reactivation d'une fermeture humide des thermiques  iflag_thermals_closure=2 (D=1)
+iflag_thermals_closure=1
+#
+# Flags wakes
+#************
+#Wake scheme switch (D:0, 0:AR4, 1:New Physics)
+iflag_wake=1
+#Constant value to be added to Alp (D: 0.)
+alp_offset=0.
+
+### nrlmd le 10/04/2012: Declenchement ###
+#Declenchement par couche-limite (0: deterministe, 1: stochastique)
+iflag_trig_bl=1
+#Surface critique au LCL
+s_trig=1.2e7
+#Temps de decorrelation entre scenes de cumulus
+tau_trig_shallow=1200
+#Temps de decorrelation entre scenes de cumulonimbus
+tau_trig_deep=1200
+# Pour la stabilisation
+random_notrig_max=0.99
+ok_adjwk=y
+tmax_fonte_cv=278.15
+
+
+### nrlmd le 10/04/2012: Fermeture ###
+#Fermeture par couche-limite (0: deterministe, 1: statistique, 2: statistique+convergence grande echelle)
+iflag_clos_bl=1
+### fin nrlmd le 10/04/2012
+
+## Modification de la plage de temperature pour la phase mixte liquide/glace des nuages
+## Controle par les t_glace_min/max, exposant_glace, iflag_t_glace (D=0)
+t_glace_min=233.13
+t_glace_max=273.13
+exposant_glace=1.
+iflag_t_glace=2
+iflag_ice_thermo=1
+
+#
+## The source terms of the TKE prognostic equation are diagnosed from tendencies (du, dv, dT) 
+## associated with subrgrid scaleamotions and treated as an additional heat source.
+## Controled by a key, iflag_ener_conserv (D=-1):
+## 0 : no conservation, -1 : old adhoc correction for kinetic E only (used for CMIP5) 
+## 1 : conservation, 101 : conversion from kinetic to heat only, 110 conversion from potential to heat only
+iflag_ener_conserv=1
+
+#Activation of corrections for water conservation (D: n). 
+##The default is n for compatibility with earlier versions.
+##generally it should be y.
+ok_conserv_q=y 
+
+iflag_cloudth_vert=3
+
+#
+lmixmin=10.
+#pbl_lmixmin_alpha=0.05
+
+#Bergeron
+iflag_bergeron=1
+
+
+### Convection
+#altitude, in hPa, above LCL at which buoybase is computed, def = original: -40
+dpbase=-40.
+#altitude, in hPa, above LCL below which Ep=0, def = original: 150, used only if flag_epKEorig=0
+pbcrit=150.0
+#altitude, in hPa, above LCL above which Ep=Epmax, def = original: 500, used only if flag_epKEorig=0
+ptcrit=500.0
+#reference fractional area of precipitating downdraughts, def = original: 0.01
+sigdz=0.01
+#unsaturated fraction of precipitating downdraughts, def = original: 0.15
+spfac=0.15
+#relaxation time of cloud base mass flux, def = original: 8000
+tau=8000.
+#flag for wb (= vert velocity at LFC); 0->wb=wbmax, 1->wb=f(plfc) bounded, 2->wb=f(plfc) linear, def = 1
+flag_wb=1
+#parameter used in the computation of wb, def = 6.
+wbmax=6.
+#
+ok_convstop=.False.
+#
+tau_stop=15000.
+#
+ok_intermittent=.False.
+#shedding coefficient (used when iflag_mix_adiab=1)
+coef_peel=0.25
+#
+### Clouds
+#Conversion cld water->precip: Ep=f(pressure) if 0; Ep=f(temperature) if 1, def=1
+flag_epKEorig=1
+#max condensed water concentration in kg/kg, def=0.0003, original: 0.0011, used only if flag_epKEorig=1
+elcrit=0.00025
+#temperature in degre Celsius, at which Ep=Epmax, def=-55., original: -55, used only if flag_epKEorig=1
+tlcrit=-40.
+
+### Wakes
+#coefficient in Wape->C_star formula: C_star=stark*sqrt(2*Wape), def: 0.33
+stark=0.33
+#lifting efficiency of wakes; Alp=Alpk*Fip, Fip=power provided by wakes, def: 0.25
+alpk=0.25
+#wake density = number of wake centers per m2, def: 8.E-12
+wdens_ref=8.E-12
+#multiplicative factor of the damping by gravity waves, def: 4.
+coefgw=4.
+#
+### Les parametres suivants viennent du config.def
+# constante solaire lue dans un fichier par defaut
+ok_suntime_rrtm=y
+# Aerosols stratospheriques utilises par defaut
+flag_aerosol_strat=2
Index: /LMDZ5/branches/testing/DefLists/physiq.def_NPv6.0.10
===================================================================
--- /LMDZ5/branches/testing/DefLists/physiq.def_NPv6.0.10	(revision 2870)
+++ /LMDZ5/branches/testing/DefLists/physiq.def_NPv6.0.10	(revision 2870)
@@ -0,0 +1,282 @@
+#
+# $Id: physiq.def_NPv6.0.10 2846 2017-04-11 14:05:05Z musat $
+#
+##############################################################################
+# PARAMETRES ET CLES DE LA PHYSIQUE LMDZ
+##############################################################################
+# D: Valeur par default
+#
+#Parametres Orographiques et cdrags
+#**********************************
+##   Si=.T. ,  lecture du fichier limit avec la bonne annee 
+ok_limitvrai=n
+iflag_albedo=1
+#Cdrags 
+f_cdrag_stable=1.
+f_cdrag_ter=1.
+
+#parameter for Z0
+f_cdrag_oce=0.9
+iflag_z0_oce=1
+f_z0qh_oce=1.55
+min_wind_speed=0.1
+
+f_ri_cd_min=0.1
+#cdmmax
+cdmmax=2.5E-3
+#cdhmax
+cdhmax=2.0E-3
+##  Orodr  ou  non   pour l orographie
+ok_orodr=y
+##  Orolf  ou  non   pour l orographie              
+ok_orolf=y
+#Rugoro
+f_rugoro=0.
+#
+### Random gravity waves
+#Activitate the stochastic parameterization of convective GWs (should be equal to ok_strato)
+ok_gwd_rando=y
+# Scale the momentum fluxes due to convective GWs
+gwd_rando_ruwmax=0.23
+#Scale the saturated momentum flux of  convective GWs 
+gwd_rando_sat=0.60
+#
+gwd_front_ruwmax = 4.00
+sso_gfrcri=0.70
+sso_gkdrag=0.6
+sso_gkwake=1.0
+sso_gklift=0.1
+#
+# Rayonnement
+#*********************
+# activation du nouveau code de rayonnement RRTM
+# 0 : Ancien code et 1 : RRTM (D=0)
+iflag_rrtm=1
+NSW=6
+#
+# Parametres nuages
+#******************
+#seuils de la precipitation des nuages strateformes (D: 2.6e-4 2.6e-4)
+cld_lc_lsc=0.00018
+cld_lc_con=0.00018
+#constante de temps pour eleminer eau lsc et convective (D: 3600. 3600.)
+cld_tau_lsc=900.
+cld_tau_con=900.
+#facteurs correctifs sur la vitesse de chute des cristaux de glace (D: 1 1)
+ffallv_lsc=1.
+ffallv_con=1.
+#coefficient sur la reevaporation de la pluie (D: 2.e-5 n)
+coef_eva=4.5e-5
+reevap_ice=y
+#calcul des proprietes des nuages convectifs (D:1 0.375 1.e-4) 
+iflag_cldcon=6
+fact_cldcon=1.
+facttemps=0.
+#calcul eau condensee et fraction nuageuse a partir des PDF (D:0, 0:version avec ratqs sinon nouvelles PDFs)  
+iflag_pdf=1
+#calcul epaisseur optique et emmissivite des nuages (D: y 1 0.01 0.3)
+ok_newmicro=y
+iflag_ratqs=4
+ratqsp0=45000.
+ratqsdp=20000.
+ratqsbas=0.002
+ratqshaut=0.4
+#rayon effectif pour les nuages de glace (D:35)
+rad_froid=35
+#rayons effectifs pour les nuages eau liq (tailles des gouttes d eau nuageuse, D: 13 9)
+rad_chau1=12
+rad_chau2=11
+##  Choix ou non  de  New oliq               
+new_oliq=y
+# Seuils oliqmax, oicemax
+oliqmax=1.5E-3
+oicemax=1.5E-3
+#Rayons min et max effectifs des particules des nuages
+rei_min=16.
+rei_max=61.29
+#
+# Flags Convection 
+#*****************
+#Convection scheme switch (D:2, 1:LMD, 2:Tiedtke, 3:KE New Physics, 30:KE AR4)
+iflag_con=3
+#output level of energy conservation diagnostics
+if_ebil=0
+#maximum efficiency of cld water->precipitation conversion (D: 0.993)
+epmax=0.997
+#dry convective adjustment at beginning of Emanuel convective scheme (D: n 0)
+ok_adj_ema=n
+iflag_clw=0
+#Convective closure (D:1, 0:AR4, 2:ALE and ALP)
+iflag_clos=2
+#Convective entrainment mixing law (D:1, 0:AR4=flat PDF, 1=PDF)
+iflag_mix=1
+#weights of the bell shaped and flat PDF (used only if iflag_mix=1) (D: 1 0)
+qqa1=1.
+qqa2=0.
+#Parameters of the bell shaped PDF; Fmax=center (D= 0.65), Gammas=width (D=0.05)
+cvl_corr=1.0
+#Multiplicative factor of Emanuel convective scheme precipitation (D: 1.)
+Fmax=0.65
+#
+t_top_max=275.
+#
+# Flags Couche limite
+#********************
+#shema de CL des thermiques (D:0, 0:ajustement sec,=>1:versions thermiques) 
+iflag_thermals=18
+#pas de temps du spliting pour les thermiques
+nsplit_thermals=1
+tau_thermals=0.
+iflag_thermals_ed=8
+fact_thermals_ed_dz=0.08
+iflag_thermals_optflux=0
+#shema de la couche de surface (D:1, 1:LMD, 8:Mellor-Yamada) 
+iflag_pbl=11
+#diffusion turbulente
+ksta_ter=1.e-7
+ksta=1.e-10
+#ok_kzmin : calcul Kzmin dans la CL de surface
+ok_kzmin=y
+#couplage ou non avec la convection
+iflag_coupl=5 (0:AR4 et 1:nouvelle physique)
+seuil_inversion=-0.08
+#rendement sur la puissance fournie par les thermiques a la convection
+alp_bl_k=0.5
+#
+## temperature dependency of qsat for iterative procedure
+## temporary flag to switch between the old (CMIP5, D=0) and new versions (=1) versions 
+iflag_fisrtilp_qsat=4 
+## Reactivation du calcul d un zmax continu pour les thermiques
+## reactivation d une fermeture humide des thermiques  iflag_thermals_closure=2 (D=1)
+iflag_thermals_closure=1
+#
+# Flags wakes
+#************
+#Wake scheme switch (D:0, 0:AR4, 1:New Physics)
+iflag_wake=1
+#Constant value to be added to Alp (D: 0.)
+alp_offset=0.
+
+### nrlmd le 10/04/2012: Declenchement ###
+#Declenchement par couche-limite (0: deterministe, 1: stochastique)
+iflag_trig_bl=1
+#Surface critique au LCL
+s_trig=1.2e7
+#Temps de decorrelation entre scenes de cumulus
+tau_trig_shallow=1200
+#Temps de decorrelation entre scenes de cumulonimbus
+tau_trig_deep=1200
+# Pour la stabilisation
+random_notrig_max=0.99
+ok_adjwk=y
+tmax_fonte_cv=278.15
+#
+flag_wk_check_trgl=y
+#
+cv_flag_feed=2
+
+### nrlmd le 10/04/2012: Fermeture ###
+#Fermeture par couche-limite (0: deterministe, 1: statistique, 2: statistique+convergence grande echelle)
+iflag_clos_bl=1
+### fin nrlmd le 10/04/2012
+
+## Modification de la plage de temperature pour la phase mixte liquide/glace des nuages
+## Controle par les t_glace_min/max, exposant_glace, iflag_t_glace (D=0)
+t_glace_min=243.15
+t_glace_max=273.15
+exposant_glace=2.
+iflag_t_glace=2
+iflag_ice_thermo=1
+
+#
+## The source terms of the TKE prognostic equation are diagnosed from tendencies (du, dv, dT) 
+## associated with subrgrid scaleamotions and treated as an additional heat source.
+## Controled by a key, iflag_ener_conserv (D=-1):
+## 0 : no conservation, -1 : old adhoc correction for kinetic E only (used for CMIP5) 
+## 1 : conservation, 101 : conversion from kinetic to heat only, 110 conversion from potential to heat only
+iflag_ener_conserv=1
+
+#Activation of corrections for water conservation (D: n). 
+##The default is n for compatibility with earlier versions.
+##generally it should be y.
+ok_conserv_q=y 
+
+iflag_cloudth_vert=3
+
+#
+lmixmin=10.
+#pbl_lmixmin_alpha=0.05
+
+#Bergeron
+iflag_bergeron=2
+
+
+### Convection
+#altitude, in hPa, above LCL at which buoybase is computed, def = original: -40
+dpbase=-40.
+#altitude, in hPa, above LCL below which Ep=0, def = original: 150, used only if flag_epKEorig=0
+pbcrit=150.0
+#altitude, in hPa, above LCL above which Ep=Epmax, def = original: 500, used only if flag_epKEorig=0
+ptcrit=500.0
+#reference fractional area of precipitating downdraughts, def = original: 0.01
+sigdz=0.01
+#unsaturated fraction of precipitating downdraughts, def = original: 0.15
+spfac=0.15
+#relaxation time of cloud base mass flux, def = original: 8000
+tau=8000.
+#flag for wb (= vert velocity at LFC); 0->wb=wbmax, 1->wb=f(plfc) bounded, 2->wb=f(plfc) linear, def = 1
+flag_wb=1
+#parameter used in the computation of wb, def = 6.
+wbmax=6.
+#
+ok_convstop=.False.
+#
+tau_stop=15000.
+#
+ok_intermittent=.False.
+# nouvel epluchage de C.Rio
+iflag_mix_adiab=0
+#shedding coefficient (used when iflag_mix_adiab=1)
+coef_peel=0.25
+#
+### Clouds
+#Conversion cld water->precip: Ep=f(pressure) if 0; Ep=f(temperature) if 1, def=1
+flag_epKEorig=1
+#max condensed water concentration in kg/kg, def=0.0003, original: 0.0011, used only if flag_epKEorig=1
+elcrit=0.00025
+#temperature in degre Celsius, at which Ep=Epmax, def=-55., original: -55, used only if flag_epKEorig=1
+tlcrit=-40.
+
+### Wakes
+#coefficient in Wape->C_star formula: C_star=stark*sqrt(2*Wape), def: 0.33
+stark=0.33
+#lifting efficiency of wakes; Alp=Alpk*Fip, Fip=power provided by wakes, def: 0.25
+alpk=0.25
+#wake density = number of wake centers per m2, def: 8.E-12
+#wdens_ref=8.E-12
+wdens_ref_o=1.e-9
+wdens_ref_l=8.e-12
+#
+#multiplicative factor of the damping by gravity waves, def: 4.
+coefgw=4.
+#
+alb_vis_sno_lic=0.96
+alb_nir_sno_lic=0.68
+inertie_sno=350.
+
+nbapp_cv=48
+
+# Prevent some crashes
+# Filter out bad wakes
+flag_wk_check_trgl=y
+# Check whether parcel level temperature and specific humidity
+# are reasonable and demand that LCL be high enough
+cv_flag_feed=2
+
+# Correction bug for thermodynamical constants passed to rrtm
+ok_bad_ecmwf_thermo=n
+# Check for energy conservation
+fl_cor_ebil=1
+
+# save 20% CPU 
+ok_optim_yield=y
Index: /LMDZ5/branches/testing/DefLists/physiq.def_NPv6.0.8
===================================================================
--- /LMDZ5/branches/testing/DefLists/physiq.def_NPv6.0.8	(revision 2870)
+++ /LMDZ5/branches/testing/DefLists/physiq.def_NPv6.0.8	(revision 2870)
@@ -0,0 +1,264 @@
+#
+# $Id$
+#
+##############################################################################
+# PARAMETRES ET CLES DE LA PHYSIQUE LMDZ
+##############################################################################
+# D: Valeur par default
+#
+#Parametres Orographiques et cdrags
+#**********************************
+##   Si=.T. ,  lecture du fichier limit avec la bonne annee 
+ok_limitvrai=n
+iflag_albedo=1
+#Cdrags 
+f_cdrag_stable=1.
+f_cdrag_ter=1.
+
+#parameter for Z0
+f_cdrag_oce=1.
+iflag_z0_oce=1
+f_z0qh_oce=1.55
+min_wind_speed=0.1
+
+f_ri_cd_min=0.1
+#cdmmax
+cdmmax=2.5E-3
+#cdhmax
+cdhmax=2.0E-3
+##  Orodr  ou  non   pour l orographie
+ok_orodr=y
+##  Orolf  ou  non   pour l orographie              
+ok_orolf=y
+#Rugoro
+f_rugoro=0.
+#
+### Random gravity waves
+#Activitate the stochastic parameterization of convective GWs (should be equal to ok_strato)
+ok_gwd_rando=y
+# Scale the momentum fluxes due to convective GWs
+gwd_rando_ruwmax=0.23
+#Scale the saturated momentum flux of  convective GWs 
+gwd_rando_sat=0.60
+#
+gwd_front_ruwmax = 4.00
+
+sso_gkdrag=0.2
+sso_gfrcri=0.70
+sso_gkwake=0.40
+#
+# Rayonnement
+#*********************
+# activation du nouveau code de rayonnement RRTM
+# 0 : Ancien code et 1 : RRTM (D=0)
+iflag_rrtm=1
+NSW=6
+#
+# Parametres nuages
+#******************
+#seuils de la precipitation des nuages strateformes (D: 2.6e-4 2.6e-4)
+cld_lc_lsc=0.00015
+cld_lc_con=0.00015
+#constante de temps pour eleminer eau lsc et convective (D: 3600. 3600.)
+cld_tau_lsc=900.
+cld_tau_con=900.
+#facteurs correctifs sur la vitesse de chute des cristaux de glace (D: 1 1)
+ffallv_lsc=1.
+ffallv_con=1.
+#coefficient sur la reevaporation de la pluie (D: 2.e-5 n)
+coef_eva=2e-4
+reevap_ice=y
+#calcul des proprietes des nuages convectifs (D:1 0.375 1.e-4) 
+iflag_cldcon=6
+fact_cldcon=1.
+facttemps=0.
+#calcul eau condensee et fraction nuageuse a partir des PDF (D:0, 0:version avec ratqs sinon nouvelles PDFs)  
+iflag_pdf=1
+#calcul epaisseur optique et emmissivite des nuages (D: y 1 0.01 0.3)
+ok_newmicro=y
+iflag_ratqs=4
+ratqsp0=37000.
+ratqsdp=20000.
+ratqsbas=0.002
+ratqshaut=0.4
+#rayon effectif pour les nuages de glace (D:35)
+rad_froid=35
+#rayons effectifs pour les nuages eau liq (tailles des gouttes d eau nuageuse, D: 13 9)
+rad_chau1=12
+rad_chau2=11
+##  Choix ou non  de  New oliq               
+new_oliq=y
+# Seuils oliqmax, oicemax
+oliqmax=1.5E-3
+oicemax=1.5E-3
+#Rayons min et max effectifs des particules des nuages
+rei_min=16.
+rei_max=61.29
+#
+# Flags Convection 
+#*****************
+#Convection scheme switch (D:2, 1:LMD, 2:Tiedtke, 3:KE New Physics, 30:KE AR4)
+iflag_con=3
+#output level of energy conservation diagnostics
+if_ebil=0
+#maximum efficiency of cld water->precipitation conversion (D: 0.993)
+epmax=0.997
+#dry convective adjustment at beginning of Emanuel convective scheme (D: n 0)
+ok_adj_ema=n
+iflag_clw=0
+#Convective closure (D:1, 0:AR4, 2:ALE and ALP)
+iflag_clos=2
+#Convective entrainment mixing law (D:1, 0:AR4=flat PDF, 1=PDF)
+iflag_mix=1
+#weights of the bell shaped and flat PDF (used only if iflag_mix=1) (D: 1 0)
+qqa1=1.
+qqa2=0.
+#Parameters of the bell shaped PDF; Fmax=center (D= 0.65), Gammas=width (D=0.05)
+cvl_corr=1.0
+#Multiplicative factor of Emanuel convective scheme precipitation (D: 1.)
+Fmax=0.65
+#
+###t_top_max=275.
+#
+# Flags Couche limite
+#********************
+#shema de CL des thermiques (D:0, 0:ajustement sec,=>1:versions thermiques) 
+iflag_thermals=18
+#pas de temps du spliting pour les thermiques
+nsplit_thermals=1
+tau_thermals=0.
+iflag_thermals_ed=8
+fact_thermals_ed_dz=0.1
+iflag_thermals_optflux=0
+#shema de la couche de surface (D:1, 1:LMD, 8:Mellor-Yamada) 
+iflag_pbl=11
+#diffusion turbulente
+ksta_ter=1.e-7
+ksta=1.e-10
+#ok_kzmin : calcul Kzmin dans la CL de surface
+ok_kzmin=y
+#couplage ou non avec la convection
+iflag_coupl=5 (0:AR4 et 1:nouvelle physique)
+seuil_inversion=-0.08
+#rendement sur la puissance fournie par les thermiques a la convection
+alp_bl_k=0.5
+#
+## temperature dependency of qsat for iterative procedure
+## temporary flag to switch between the old (CMIP5, D=0) and new versions (=1) versions 
+iflag_fisrtilp_qsat=4 
+## Reactivation du calcul d'un zmax continu pour les thermiques
+## reactivation d'une fermeture humide des thermiques  iflag_thermals_closure=2 (D=1)
+iflag_thermals_closure=1
+#
+# Flags wakes
+#************
+#Wake scheme switch (D:0, 0:AR4, 1:New Physics)
+iflag_wake=1
+#Constant value to be added to Alp (D: 0.)
+alp_offset=0.
+
+### nrlmd le 10/04/2012: Declenchement ###
+#Declenchement par couche-limite (0: deterministe, 1: stochastique)
+iflag_trig_bl=1
+#Surface critique au LCL
+s_trig=1.2e7
+#Temps de decorrelation entre scenes de cumulus
+tau_trig_shallow=1200
+#Temps de decorrelation entre scenes de cumulonimbus
+tau_trig_deep=1200
+# Pour la stabilisation
+random_notrig_max=0.99
+ok_adjwk=y
+tmax_fonte_cv=278.15
+#
+flag_wk_check_trgl=y
+#
+cv_flag_feed=2
+
+### nrlmd le 10/04/2012: Fermeture ###
+#Fermeture par couche-limite (0: deterministe, 1: statistique, 2: statistique+convergence grande echelle)
+iflag_clos_bl=1
+### fin nrlmd le 10/04/2012
+
+## Modification de la plage de temperature pour la phase mixte liquide/glace des nuages
+## Controle par les t_glace_min/max, exposant_glace, iflag_t_glace (D=0)
+t_glace_min=243.15
+t_glace_max=273.15
+exposant_glace=2.
+iflag_t_glace=2
+iflag_ice_thermo=1
+
+#
+## The source terms of the TKE prognostic equation are diagnosed from tendencies (du, dv, dT) 
+## associated with subrgrid scaleamotions and treated as an additional heat source.
+## Controled by a key, iflag_ener_conserv (D=-1):
+## 0 : no conservation, -1 : old adhoc correction for kinetic E only (used for CMIP5) 
+## 1 : conservation, 101 : conversion from kinetic to heat only, 110 conversion from potential to heat only
+iflag_ener_conserv=1
+
+#Activation of corrections for water conservation (D: n). 
+##The default is n for compatibility with earlier versions.
+##generally it should be y.
+ok_conserv_q=y 
+
+iflag_cloudth_vert=3
+
+#
+lmixmin=10.
+#pbl_lmixmin_alpha=0.05
+
+#Bergeron
+iflag_bergeron=1
+
+
+### Convection
+#altitude, in hPa, above LCL at which buoybase is computed, def = original: -40
+dpbase=-40.
+#altitude, in hPa, above LCL below which Ep=0, def = original: 150, used only if flag_epKEorig=0
+pbcrit=150.0
+#altitude, in hPa, above LCL above which Ep=Epmax, def = original: 500, used only if flag_epKEorig=0
+ptcrit=500.0
+#reference fractional area of precipitating downdraughts, def = original: 0.01
+sigdz=0.01
+#unsaturated fraction of precipitating downdraughts, def = original: 0.15
+spfac=0.15
+#relaxation time of cloud base mass flux, def = original: 8000
+tau=8000.
+#flag for wb (= vert velocity at LFC); 0->wb=wbmax, 1->wb=f(plfc) bounded, 2->wb=f(plfc) linear, def = 1
+flag_wb=1
+#parameter used in the computation of wb, def = 6.
+wbmax=6.
+#
+ok_convstop=.False.
+#
+tau_stop=15000.
+#
+ok_intermittent=.False.
+#shedding coefficient (used when iflag_mix_adiab=1)
+coef_peel=0.25
+#
+### Clouds
+#Conversion cld water->precip: Ep=f(pressure) if 0; Ep=f(temperature) if 1, def=1
+flag_epKEorig=1
+#max condensed water concentration in kg/kg, def=0.0003, original: 0.0011, used only if flag_epKEorig=1
+elcrit=0.00025
+#temperature in degre Celsius, at which Ep=Epmax, def=-55., original: -55, used only if flag_epKEorig=1
+tlcrit=-40.
+
+### Wakes
+#coefficient in Wape->C_star formula: C_star=stark*sqrt(2*Wape), def: 0.33
+stark=0.33
+#lifting efficiency of wakes; Alp=Alpk*Fip, Fip=power provided by wakes, def: 0.25
+alpk=0.25
+#wake density = number of wake centers per m2, def: 8.E-12
+#wdens_ref=8.E-12
+wdens_ref_o=8.e-12
+wdens_ref_l=8.e-12
+#
+#multiplicative factor of the damping by gravity waves, def: 4.
+coefgw=4.
+#
+alb_vis_sno_lic=0.96
+alb_nir_sno_lic=0.68
+inertie_sno=350.
+
Index: /LMDZ5/branches/testing/DefLists/physiq.def_NPv6.0.9
===================================================================
--- /LMDZ5/branches/testing/DefLists/physiq.def_NPv6.0.9	(revision 2870)
+++ /LMDZ5/branches/testing/DefLists/physiq.def_NPv6.0.9	(revision 2870)
@@ -0,0 +1,277 @@
+#
+# $Id$
+#
+##############################################################################
+# PARAMETRES ET CLES DE LA PHYSIQUE LMDZ
+##############################################################################
+# D: Valeur par default
+#
+#Parametres Orographiques et cdrags
+#**********************************
+##   Si=.T. ,  lecture du fichier limit avec la bonne annee 
+ok_limitvrai=n
+iflag_albedo=1
+#Cdrags 
+f_cdrag_stable=1.
+f_cdrag_ter=1.
+
+#parameter for Z0
+f_cdrag_oce=1.
+iflag_z0_oce=1
+f_z0qh_oce=1.55
+min_wind_speed=0.1
+
+f_ri_cd_min=0.1
+#cdmmax
+cdmmax=2.5E-3
+#cdhmax
+cdhmax=2.0E-3
+##  Orodr  ou  non   pour l orographie
+ok_orodr=y
+##  Orolf  ou  non   pour l orographie              
+ok_orolf=y
+#Rugoro
+f_rugoro=0.
+#
+### Random gravity waves
+#Activitate the stochastic parameterization of convective GWs (should be equal to ok_strato)
+ok_gwd_rando=y
+# Scale the momentum fluxes due to convective GWs
+gwd_rando_ruwmax=0.23
+#Scale the saturated momentum flux of  convective GWs 
+gwd_rando_sat=0.60
+#
+gwd_front_ruwmax = 4.00
+
+sso_gfrcri=0.70
+
+sso_gkdrag=0.6
+sso_gkwake=1.0
+sso_gklift=0.1
+
+
+#
+# Rayonnement
+#*********************
+# activation du nouveau code de rayonnement RRTM
+# 0 : Ancien code et 1 : RRTM (D=0)
+iflag_rrtm=1
+NSW=6
+#
+# Parametres nuages
+#******************
+#seuils de la precipitation des nuages strateformes (D: 2.6e-4 2.6e-4)
+cld_lc_lsc=0.00015
+cld_lc_con=0.00015
+#constante de temps pour eleminer eau lsc et convective (D: 3600. 3600.)
+cld_tau_lsc=900.
+cld_tau_con=900.
+#facteurs correctifs sur la vitesse de chute des cristaux de glace (D: 1 1)
+ffallv_lsc=1.
+ffallv_con=1.
+#coefficient sur la reevaporation de la pluie (D: 2.e-5 n)
+coef_eva=2e-4
+reevap_ice=y
+#calcul des proprietes des nuages convectifs (D:1 0.375 1.e-4) 
+iflag_cldcon=6
+fact_cldcon=1.
+facttemps=0.
+#calcul eau condensee et fraction nuageuse a partir des PDF (D:0, 0:version avec ratqs sinon nouvelles PDFs)  
+iflag_pdf=1
+#calcul epaisseur optique et emmissivite des nuages (D: y 1 0.01 0.3)
+ok_newmicro=y
+iflag_ratqs=4
+ratqsp0=37000.
+ratqsdp=20000.
+ratqsbas=0.002
+ratqshaut=0.4
+#rayon effectif pour les nuages de glace (D:35)
+rad_froid=35
+#rayons effectifs pour les nuages eau liq (tailles des gouttes d eau nuageuse, D: 13 9)
+rad_chau1=12
+rad_chau2=11
+##  Choix ou non  de  New oliq               
+new_oliq=y
+# Seuils oliqmax, oicemax
+oliqmax=1.5E-3
+oicemax=1.5E-3
+#Rayons min et max effectifs des particules des nuages
+rei_min=16.
+rei_max=61.29
+#
+# Flags Convection 
+#*****************
+#Convection scheme switch (D:2, 1:LMD, 2:Tiedtke, 3:KE New Physics, 30:KE AR4)
+iflag_con=3
+#output level of energy conservation diagnostics
+if_ebil=0
+#maximum efficiency of cld water->precipitation conversion (D: 0.993)
+epmax=0.997
+#dry convective adjustment at beginning of Emanuel convective scheme (D: n 0)
+ok_adj_ema=n
+iflag_clw=0
+#Convective closure (D:1, 0:AR4, 2:ALE and ALP)
+iflag_clos=2
+#Convective entrainment mixing law (D:1, 0:AR4=flat PDF, 1=PDF)
+iflag_mix=1
+#weights of the bell shaped and flat PDF (used only if iflag_mix=1) (D: 1 0)
+qqa1=1.
+qqa2=0.
+#Parameters of the bell shaped PDF; Fmax=center (D= 0.65), Gammas=width (D=0.05)
+cvl_corr=1.0
+#Multiplicative factor of Emanuel convective scheme precipitation (D: 1.)
+Fmax=0.65
+#
+###t_top_max=275.
+#
+# Flags Couche limite
+#********************
+#shema de CL des thermiques (D:0, 0:ajustement sec,=>1:versions thermiques) 
+iflag_thermals=18
+#pas de temps du spliting pour les thermiques
+nsplit_thermals=1
+tau_thermals=0.
+iflag_thermals_ed=8
+fact_thermals_ed_dz=0.1
+iflag_thermals_optflux=0
+#shema de la couche de surface (D:1, 1:LMD, 8:Mellor-Yamada) 
+iflag_pbl=11
+#diffusion turbulente
+ksta_ter=1.e-7
+ksta=1.e-10
+#ok_kzmin : calcul Kzmin dans la CL de surface
+ok_kzmin=y
+#couplage ou non avec la convection
+iflag_coupl=5 (0:AR4 et 1:nouvelle physique)
+seuil_inversion=-0.08
+#rendement sur la puissance fournie par les thermiques a la convection
+alp_bl_k=0.5
+#
+## temperature dependency of qsat for iterative procedure
+## temporary flag to switch between the old (CMIP5, D=0) and new versions (=1) versions 
+iflag_fisrtilp_qsat=4 
+## Reactivation du calcul d'un zmax continu pour les thermiques
+## reactivation d'une fermeture humide des thermiques  iflag_thermals_closure=2 (D=1)
+iflag_thermals_closure=1
+#
+# Flags wakes
+#************
+#Wake scheme switch (D:0, 0:AR4, 1:New Physics)
+iflag_wake=1
+#Constant value to be added to Alp (D: 0.)
+alp_offset=0.
+
+### nrlmd le 10/04/2012: Declenchement ###
+#Declenchement par couche-limite (0: deterministe, 1: stochastique)
+iflag_trig_bl=1
+#Surface critique au LCL
+s_trig=1.2e7
+#Temps de decorrelation entre scenes de cumulus
+tau_trig_shallow=1200
+#Temps de decorrelation entre scenes de cumulonimbus
+tau_trig_deep=1200
+# Pour la stabilisation
+random_notrig_max=0.99
+ok_adjwk=y
+tmax_fonte_cv=278.15
+#
+flag_wk_check_trgl=y
+#
+cv_flag_feed=2
+
+### nrlmd le 10/04/2012: Fermeture ###
+#Fermeture par couche-limite (0: deterministe, 1: statistique, 2: statistique+convergence grande echelle)
+iflag_clos_bl=1
+### fin nrlmd le 10/04/2012
+
+## Modification de la plage de temperature pour la phase mixte liquide/glace des nuages
+## Controle par les t_glace_min/max, exposant_glace, iflag_t_glace (D=0)
+t_glace_min=243.15
+t_glace_max=273.15
+exposant_glace=2.
+iflag_t_glace=2
+iflag_ice_thermo=1
+
+#
+## The source terms of the TKE prognostic equation are diagnosed from tendencies (du, dv, dT) 
+## associated with subrgrid scaleamotions and treated as an additional heat source.
+## Controled by a key, iflag_ener_conserv (D=-1):
+## 0 : no conservation, -1 : old adhoc correction for kinetic E only (used for CMIP5) 
+## 1 : conservation, 101 : conversion from kinetic to heat only, 110 conversion from potential to heat only
+iflag_ener_conserv=1
+
+#Activation of corrections for water conservation (D: n). 
+##The default is n for compatibility with earlier versions.
+##generally it should be y.
+ok_conserv_q=y 
+
+iflag_cloudth_vert=3
+
+#
+lmixmin=10.
+#pbl_lmixmin_alpha=0.05
+
+#Bergeron
+iflag_bergeron=1
+
+
+### Convection
+#altitude, in hPa, above LCL at which buoybase is computed, def = original: -40
+dpbase=-40.
+#altitude, in hPa, above LCL below which Ep=0, def = original: 150, used only if flag_epKEorig=0
+pbcrit=150.0
+#altitude, in hPa, above LCL above which Ep=Epmax, def = original: 500, used only if flag_epKEorig=0
+ptcrit=500.0
+#reference fractional area of precipitating downdraughts, def = original: 0.01
+sigdz=0.01
+#unsaturated fraction of precipitating downdraughts, def = original: 0.15
+spfac=0.15
+#relaxation time of cloud base mass flux, def = original: 8000
+tau=8000.
+#flag for wb (= vert velocity at LFC); 0->wb=wbmax, 1->wb=f(plfc) bounded, 2->wb=f(plfc) linear, def = 1
+flag_wb=1
+#parameter used in the computation of wb, def = 6.
+wbmax=6.
+#
+ok_convstop=.False.
+#
+tau_stop=15000.
+#
+ok_intermittent=.False.
+#shedding coefficient (used when iflag_mix_adiab=1)
+coef_peel=0.25
+#
+### Clouds
+#Conversion cld water->precip: Ep=f(pressure) if 0; Ep=f(temperature) if 1, def=1
+flag_epKEorig=1
+#max condensed water concentration in kg/kg, def=0.0003, original: 0.0011, used only if flag_epKEorig=1
+elcrit=0.00025
+#temperature in degre Celsius, at which Ep=Epmax, def=-55., original: -55, used only if flag_epKEorig=1
+tlcrit=-40.
+
+### Wakes
+#coefficient in Wape->C_star formula: C_star=stark*sqrt(2*Wape), def: 0.33
+stark=0.33
+#lifting efficiency of wakes; Alp=Alpk*Fip, Fip=power provided by wakes, def: 0.25
+alpk=0.25
+#wake density = number of wake centers per m2, def: 8.E-12
+#wdens_ref=8.E-12
+wdens_ref_o=8.e-12
+wdens_ref_l=8.e-12
+#
+#multiplicative factor of the damping by gravity waves, def: 4.
+coefgw=4.
+#
+alb_vis_sno_lic=0.96
+alb_nir_sno_lic=0.68
+inertie_sno=350.
+
+# Frequency of call to convection 
+nbapp_cv=48
+
+# Prevent some crashes
+# Filter out bad wakes
+flag_wk_check_trgl=y
+# Check whether parcel level temperature and specific humidity
+# are reasonable and demand that LCL be high enough
+cv_flag_feed=2
Index: /LMDZ5/branches/testing/libf/dyn3d/dynetat0.f90
===================================================================
--- /LMDZ5/branches/testing/libf/dyn3d/dynetat0.f90	(revision 2869)
+++ /LMDZ5/branches/testing/libf/dyn3d/dynetat0.f90	(revision 2870)
@@ -153,9 +153,9 @@
   INTEGER,          INTENT(IN) :: n1, n2
   CHARACTER(LEN=*), INTENT(IN) :: str1, str2
-  CHARACTER(LEN=256) :: s1, s2
+  CHARACTER(LEN=100) :: s1, s2
   IF(n1/=n2) THEN
     s1='value of '//TRIM(str1)//' ='
     s2=' read in starting file differs from parametrized '//TRIM(str2)//' ='
-    WRITE(msg,'(10x,a,i4,2x,a,i4)'),s1,n1,s2,n2
+    WRITE(msg,'(10x,a,i4,2x,a,i4)'),TRIM(ADJUSTL(s1)),n1,TRIM(ADJUSTL(s2)),n2
     CALL ABORT_gcm(TRIM(modname),TRIM(msg),1)
   END IF
Index: /LMDZ5/branches/testing/libf/phylmd/add_phys_tend_mod.F90
===================================================================
--- /LMDZ5/branches/testing/libf/phylmd/add_phys_tend_mod.F90	(revision 2869)
+++ /LMDZ5/branches/testing/libf/phylmd/add_phys_tend_mod.F90	(revision 2870)
@@ -223,41 +223,17 @@
 
   if (fl_ebil .GT. 0) then
-  ! Reset variables
-    zqw_col(:,:) = 0.
-    zql_col(:,:) = 0.
-    zqs_col(:,:) = 0.
-    zek_col(:,:) = 0.
-    zh_dair_col(:,:) = 0.
-    zh_qw_col(:,:) = 0.
-    zh_ql_col(:,:) = 0.
-    zh_qs_col(:,:) = 0.
+    ! ------------------------------------------------
+    ! Compute vertical sum for each atmospheric column
+    ! ------------------------------------------------
+    n=1   ! begining of time step
 
     zcpvap = rcpv
     zcwat = rcw
     zcice = rcs
-!JLD    write (*,*) "rcpd, zcpvap, zcwat, zcice ",rcpd, zcpvap, zcwat, zcice
-  
-    ! ------------------------------------------------
-    ! Compute vertical sum for each atmospheric column
-    ! ------------------------------------------------
-    n=1   ! begining of time step
-    DO k = 1, klev
-      DO i = 1, klon
-        ! Watter mass
-        zqw_col(i,n) = zqw_col(i,n) + q_seri(i, k)*zairm(i, k)
-        zql_col(i,n) = zql_col(i,n) + ql_seri(i, k)*zairm(i, k)
-        zqs_col(i,n) = zqs_col(i,n) + qs_seri(i, k)*zairm(i, k)
-        ! Kinetic Energy
-        zek_col(i,n) = zek_col(i,n) + 0.5*(u_seri(i,k)**2+v_seri(i,k)**2)*zairm(i, k)
-        ! Air enthalpy : dry air, water vapour, liquid, solid
-        zh_dair_col(i,n) = zh_dair_col(i,n) + rcpd*(1.-q_seri(i,k)-ql_seri(i,k)-qs_seri(i,k))* &
-          zairm(i, k)*t_seri(i, k)
-        zh_qw_col(i,n) = zh_qw_col(i,n) +  zcpvap*t_seri(i, k)         *q_seri(i, k)*zairm(i, k)    !jyg
-        zh_ql_col(i,n) = zh_ql_col(i,n) + (zcpvap*t_seri(i, k) - rlvtt)*ql_seri(i, k)*zairm(i, k)   !jyg
-        zh_qs_col(i,n) = zh_qs_col(i,n) + (zcpvap*t_seri(i, k) - rlstt)*qs_seri(i, k)*zairm(i, k)   !jyg
-      END DO
-    END DO
-    ! compute total air enthalpy
-    zh_col(:,n) = zh_dair_col(:,n) + zh_qw_col(:,n) + zh_ql_col(:,n) + zh_qs_col(:,n)
+
+    CALL integr_v(klon, klev, zcpvap, &
+                  t_seri, q_seri, ql_seri, qs_seri, u_seri, v_seri, zairm, &
+                    zqw_col(:,n), zql_col(:,n), zqs_col(:,n), zek_col(:,n), zh_dair_col(:,n), &
+                    zh_qw_col(:,n), zh_ql_col(:,n), zh_qs_col(:,n), zh_col(:,n))
 
   end if ! end if (fl_ebil .GT. 0)
@@ -465,22 +441,9 @@
     ! ------------------------------------------------
     n=2   ! end of time step
-    DO k = 1, klev
-      DO i = 1, klon
-        ! Watter mass
-        zqw_col(i,n) = zqw_col(i,n) + q_seri(i, k)*zairm(i, k)
-        zql_col(i,n) = zql_col(i,n) + ql_seri(i, k)*zairm(i, k)
-        zqs_col(i,n) = zqs_col(i,n) + qs_seri(i, k)*zairm(i, k)
-        ! Kinetic Energy
-        zek_col(i,n) = zek_col(i,n) + 0.5*(u_seri(i,k)**2+v_seri(i,k)**2)*zairm(i, k)
-        ! Air enthalpy : dry air, water vapour, liquid, solid
-        zh_dair_col(i,n) = zh_dair_col(i,n) + rcpd*(1.-q_seri(i,k)-ql_seri(i,k)-qs_seri(i,k))* &
-          zairm(i, k)*t_seri(i, k)
-        zh_qw_col(i,n) = zh_qw_col(i,n) +  zcpvap*t_seri(i, k)         *q_seri(i, k)*zairm(i, k)     !jyg
-        zh_ql_col(i,n) = zh_ql_col(i,n) + (zcpvap*t_seri(i, k) - rlvtt)*ql_seri(i, k)*zairm(i, k)    !jyg
-        zh_qs_col(i,n) = zh_qs_col(i,n) + (zcpvap*t_seri(i, k) - rlstt)*qs_seri(i, k)*zairm(i, k)    !jyg
-      END DO
-    END DO
-    ! compute total air enthalpy
-    zh_col(:,n) = zh_dair_col(:,n) + zh_qw_col(:,n) + zh_ql_col(:,n) + zh_qs_col(:,n)
+
+    CALL integr_v(klon, klev, zcpvap, &
+                  t_seri, q_seri, ql_seri, qs_seri, u_seri, v_seri, zairm, &
+                    zqw_col(:,n), zql_col(:,n), zqs_col(:,n), zek_col(:,n), zh_dair_col(:,n), &
+                    zh_qw_col(:,n), zh_ql_col(:,n), zh_qs_col(:,n), zh_col(:,n))
 
     ! ------------------------------------------------
@@ -517,4 +480,229 @@
   RETURN
 END SUBROUTINE add_phys_tend
+
+SUBROUTINE diag_phys_tend (nlon, nlev, uu, vv, temp, qv, ql, qs, &
+                          zdu,zdv,zdt,zdq,zdql,zdqs,paprs,text)
+!======================================================================
+! Ajoute les tendances des variables physiques aux variables 
+! d'etat de la dynamique t_seri, q_seri ...
+! On en profite pour faire des tests sur les tendances en question.
+!======================================================================
+
+
+!======================================================================
+! Declarations
+!======================================================================
+
+USE phys_state_var_mod, ONLY : dtime, ftsol
+USE geometry_mod, ONLY: longitude_deg, latitude_deg
+USE print_control_mod, ONLY: prt_level
+USE cmp_seri_mod
+USE phys_output_var_mod, ONLY : d_qw_col, d_ql_col, d_qs_col, d_qt_col, d_ek_col, d_h_dair_col &
+  &           , d_h_qw_col, d_h_ql_col, d_h_qs_col, d_h_col
+IMPLICIT none
+  include "YOMCST.h"
+  include "clesphys.h"
+
+! Arguments :
+!------------
+INTEGER, INTENT(IN)                           :: nlon, nlev
+REAL, DIMENSION(nlon,nlev),     INTENT(IN)    :: uu, vv
+REAL, DIMENSION(nlon,nlev),     INTENT(IN)    :: temp, qv, ql, qs
+REAL, DIMENSION(nlon,nlev),     INTENT(IN)    :: zdu, zdv
+REAL, DIMENSION(nlon,nlev),     INTENT(IN)    :: zdt, zdq, zdql, zdqs
+REAL, DIMENSION(nlon,nlev+1),   INTENT(IN)    :: paprs
+CHARACTER*(*),                  INTENT(IN)    :: text
+
+! Local :
+!--------
+REAL, DIMENSION(nlon,nlev)      :: uu_n, vv_n
+REAL, DIMENSION(nlon,nlev)      :: temp_n, qv_n, ql_n, qs_n
+
+
+!
+INTEGER k, n
+
+integer debug_level
+logical, save :: first=.true.
+!$OMP THREADPRIVATE(first)
+!
+!======================================================================
+! Variables for energy conservation tests
+!======================================================================
+!
+
+! zh_col-------  total enthalpy of vertical air column
+! (air with watter vapour, liquid and solid) (J/m2)
+! zh_dair_col--- total enthalpy of dry air (J/m2)
+! zh_qw_col----  total enthalpy of watter vapour (J/m2)
+! zh_ql_col----  total enthalpy of liquid watter (J/m2)
+! zh_qs_col----  total enthalpy of solid watter  (J/m2)
+! zqw_col------  total mass of watter vapour (kg/m2)
+! zql_col------  total mass of liquid watter (kg/m2)
+! zqs_col------  total mass of solid watter (kg/m2)
+! zek_col------  total kinetic energy (kg/m2)
+!
+REAL zairm(nlon, nlev) ! layer air mass (kg/m2)
+REAL zqw_col(nlon,2)
+REAL zql_col(nlon,2)
+REAL zqs_col(nlon,2)
+REAL zek_col(nlon,2)
+REAL zh_dair_col(nlon,2)
+REAL zh_qw_col(nlon,2), zh_ql_col(nlon,2), zh_qs_col(nlon,2)
+REAL zh_col(nlon,2)
+
+!======================================================================
+! Initialisations
+
+     IF (prt_level >= 5) then
+        write (*,*) "In diag_phys_tend, after ",text
+        call flush
+     end if
+
+     debug_level=10
+     if (first) then
+        print *,"TestJLD rcpv, rcw, rcs",rcpv, rcw, rcs
+        first=.false.
+     endif
+!
+!  print *,'add_phys_tend: paprs ',paprs
+!======================================================================
+! Diagnostics for energy conservation tests
+!======================================================================
+  DO k = 1, nlev
+    ! layer air mass
+    zairm(:, k) = (paprs(:,k)-paprs(:,k+1))/rg
+  END DO
+
+  if (fl_ebil .GT. 0) then
+    ! ------------------------------------------------
+    ! Compute vertical sum for each atmospheric column
+    ! ------------------------------------------------
+    n=1   ! begining of time step
+
+    CALL integr_v(nlon, nlev, rcpv, &
+                  temp, qv, ql, qs, uu, vv, zairm, &
+                    zqw_col(:,n), zql_col(:,n), zqs_col(:,n), zek_col(:,n), zh_dair_col(:,n), &
+                    zh_qw_col(:,n), zh_ql_col(:,n), zh_qs_col(:,n), zh_col(:,n))
+
+  end if ! end if (fl_ebil .GT. 0)
+
+!======================================================================
+! Ajout des tendances sur le vent, la temperature et les diverses phases de l'eau
+!======================================================================
+
+     uu_n(:,:)=uu(:,:)+zdu(:,:)
+     vv_n(:,:)=vv(:,:)+zdv(:,:)
+     qv_n(:,:)=qv(:,:)+zdq(:,:)
+     ql_n(:,:)=ql(:,:)+zdql(:,:)
+     qs_n(:,:)=qs(:,:)+zdqs(:,:)
+     temp_n(:,:)=temp(:,:)+zdt(:,:)
+
+
+
+!======================================================================
+! Diagnostics for energy conservation tests
+!======================================================================
+
+  if (fl_ebil .GT. 0) then
+  
+    ! ------------------------------------------------
+    ! Compute vertical sum for each atmospheric column
+    ! ------------------------------------------------
+    n=2   ! end of time step
+
+    CALL integr_v(nlon, nlev, rcpv, &
+                  temp_n, qv_n, ql_n, qs_n, uu_n, vv_n, zairm, &
+                    zqw_col(:,n), zql_col(:,n), zqs_col(:,n), zek_col(:,n), zh_dair_col(:,n), &
+                    zh_qw_col(:,n), zh_ql_col(:,n), zh_qs_col(:,n), zh_col(:,n))
+
+    ! ------------------------------------------------
+    ! Compute the changes by unit of time
+    ! ------------------------------------------------
+
+    d_qw_col(:) = (zqw_col(:,2)-zqw_col(:,1))/dtime
+    d_ql_col(:) = (zql_col(:,2)-zql_col(:,1))/dtime
+    d_qs_col(:) = (zqs_col(:,2)-zqs_col(:,1))/dtime
+    d_qt_col(:) = d_qw_col(:) + d_ql_col(:) + d_qs_col(:)
+
+    d_ek_col(:) = (zek_col(:,2)-zek_col(:,1))/dtime
+
+   print *,'zdu ', zdu
+   print *,'zdv ', zdv
+   print *,'d_ek_col, zek_col(2), zek_col(1) ',d_ek_col(1), zek_col(1,2), zek_col(1,1)
+
+    d_h_dair_col(:) = (zh_dair_col(:,2)-zh_dair_col(:,1))/dtime
+    d_h_qw_col(:) = (zh_qw_col(:,2)-zh_qw_col(:,1))/dtime
+    d_h_ql_col(:) = (zh_ql_col(:,2)-zh_ql_col(:,1))/dtime
+    d_h_qs_col(:) = (zh_qs_col(:,2)-zh_qs_col(:,1))/dtime
+
+    d_h_col = (zh_col(:,2)-zh_col(:,1))/dtime 
+
+  end if ! end if (fl_ebil .GT. 0)
+!
+
+  RETURN
+END SUBROUTINE diag_phys_tend
+
+SUBROUTINE integr_v(nlon, nlev, zcpvap, &
+                    temp, qv, ql, qs, uu, vv, zairm,  &
+                    zqw_col, zql_col, zqs_col, zek_col, zh_dair_col, &
+                    zh_qw_col, zh_ql_col, zh_qs_col, zh_col)
+
+IMPLICIT none
+  include "YOMCST.h"
+
+INTEGER,                    INTENT(IN)    :: nlon,nlev
+REAL,                       INTENT(IN)    :: zcpvap
+REAL, DIMENSION(nlon,nlev), INTENT(IN)    :: temp, qv, ql, qs, uu, vv
+REAL, DIMENSION(nlon,nlev), INTENT(IN)    :: zairm
+REAL, DIMENSION(nlon),      INTENT(OUT)   :: zqw_col
+REAL, DIMENSION(nlon),      INTENT(OUT)   :: zql_col
+REAL, DIMENSION(nlon),      INTENT(OUT)   :: zqs_col
+REAL, DIMENSION(nlon),      INTENT(OUT)   :: zek_col
+REAL, DIMENSION(nlon),      INTENT(OUT)   :: zh_dair_col
+REAL, DIMENSION(nlon),      INTENT(OUT)   :: zh_qw_col
+REAL, DIMENSION(nlon),      INTENT(OUT)   :: zh_ql_col
+REAL, DIMENSION(nlon),      INTENT(OUT)   :: zh_qs_col
+REAL, DIMENSION(nlon),      INTENT(OUT)   :: zh_col
+
+INTEGER          :: i, k
+
+
+  ! Reset variables
+    zqw_col(:) = 0.
+    zql_col(:) = 0.
+    zqs_col(:) = 0.
+    zek_col(:) = 0.
+    zh_dair_col(:) = 0.
+    zh_qw_col(:) = 0.
+    zh_ql_col(:) = 0.
+    zh_qs_col(:) = 0.
+
+!JLD    write (*,*) "rcpd, zcpvap, zcwat, zcice ",rcpd, zcpvap, zcwat, zcice
+  
+    ! ------------------------------------------------
+    ! Compute vertical sum for each atmospheric column
+    ! ------------------------------------------------
+    DO k = 1, nlev
+      DO i = 1, nlon
+        ! Watter mass
+        zqw_col(i) = zqw_col(i) + qv(i, k)*zairm(i, k)
+        zql_col(i) = zql_col(i) + ql(i, k)*zairm(i, k)
+        zqs_col(i) = zqs_col(i) + qs(i, k)*zairm(i, k)
+        ! Kinetic Energy
+        zek_col(i) = zek_col(i) + 0.5*(uu(i,k)**2+vv(i,k)**2)*zairm(i, k)
+        ! Air enthalpy : dry air, water vapour, liquid, solid
+        zh_dair_col(i) = zh_dair_col(i) + rcpd*(1.-qv(i,k)-ql(i,k)-qs(i,k))* &
+                                               zairm(i, k)*temp(i, k)
+        zh_qw_col(i) = zh_qw_col(i) +  zcpvap*temp(i, k)         *qv(i, k)*zairm(i, k)    !jyg
+        zh_ql_col(i) = zh_ql_col(i) + (zcpvap*temp(i, k) - rlvtt)*ql(i, k)*zairm(i, k)   !jyg
+        zh_qs_col(i) = zh_qs_col(i) + (zcpvap*temp(i, k) - rlstt)*qs(i, k)*zairm(i, k)   !jyg
+      END DO
+    END DO
+    ! compute total air enthalpy
+    zh_col(:) = zh_dair_col(:) + zh_qw_col(:) + zh_ql_col(:) + zh_qs_col(:)
+
+END SUBROUTINE integr_v
 
 SUBROUTINE prt_enerbil (text, itap)
@@ -624,7 +812,12 @@
       write(*,9000) text,"enerbil: snow, bil_lat, bil_sens", snow_lsc(1), rlstt * snow_lsc(1), -(rcs-rcpd)*t_seri(1,1) * snow_lsc(1)
     end if
+  CASE("convection") specific_diag
+    if ( prt_level .GE. 5) then
+      write(*,9000) text,"enerbil: rain, bil_lat, bil_sens", rain_con(1), rlvtt * rain_con(1), -(rcw-rcpd)*t_seri(1,1) * rain_con(1)
+      write(*,9000) text,"enerbil: snow, bil_lat, bil_sens", snow_con(1), rlstt * snow_con(1), -(rcs-rcpd)*t_seri(1,1) * snow_con(1)
+    end if
   END SELECT specific_diag
 
-9000 format (1x,A8,2x,A30,10E15.6)
+9000 format (1x,A8,2x,A35,10E15.6)
 
 end if ! end if (fl_ebil .GT. 0)
Index: /LMDZ5/branches/testing/libf/phylmd/calwake.F90
===================================================================
--- /LMDZ5/branches/testing/libf/phylmd/calwake.F90	(revision 2869)
+++ /LMDZ5/branches/testing/libf/phylmd/calwake.F90	(revision 2870)
@@ -54,5 +54,6 @@
   ! ------
   REAL, DIMENSION(klon, klev),   INTENT (OUT)        :: dt_wake, dq_wake
-  REAL, DIMENSION(klon),         INTENT (OUT)        :: wake_k
+!!jyg  REAL, DIMENSION(klon),         INTENT (OUT)        :: wake_k
+  INTEGER, DIMENSION(klon),      INTENT (OUT)        :: wake_k
   REAL, DIMENSION(klon, klev),   INTENT (OUT)        :: wake_d_deltat_gw
   REAL, DIMENSION(klon),         INTENT (OUT)        :: wake_h
Index: /LMDZ5/branches/testing/libf/phylmd/climb_hq_mod.F90
===================================================================
--- /LMDZ5/branches/testing/libf/phylmd/climb_hq_mod.F90	(revision 2869)
+++ /LMDZ5/branches/testing/libf/phylmd/climb_hq_mod.F90	(revision 2870)
@@ -221,5 +221,6 @@
 !****************************************************************************************
 !!! jyg le 07/02/2012
-       IF (mod(iflag_pbl_split,2) .eq.1) THEN
+!!jyg       IF (mod(iflag_pbl_split,2) .eq.1) THEN
+       IF (mod(iflag_pbl_split,10) .ge.1) THEN
 !!! nrlmd le 02/05/2011
     DO k= 1, klev
@@ -240,5 +241,5 @@
     ENDDO
 !!!      
-       ENDIF  ! (mod(iflag_pbl_split,2) .eq.1)
+       ENDIF  ! (mod(iflag_pbl_split,2) .ge.1)
 !!!
 
@@ -377,5 +378,6 @@
 
 !!! jyg le 07/02/2012
-       IF (mod(iflag_pbl_split,2) .eq.1) THEN
+!!jyg       IF (mod(iflag_pbl_split,2) .eq.1) THEN
+       IF (mod(iflag_pbl_split,10) .ge.1) THEN
 !!! nrlmd le 02/05/2011
     DO i = 1, knon
@@ -399,5 +401,5 @@
     ENDDO
 !!!      
-       ENDIF  ! (mod(iflag_pbl_split,2) .eq.1)
+       ENDIF  ! (mod(iflag_pbl_split,2) .ge.1)
 !!!
 
Index: /LMDZ5/branches/testing/libf/phylmd/climb_wind_mod.F90
===================================================================
--- /LMDZ5/branches/testing/libf/phylmd/climb_wind_mod.F90	(revision 2869)
+++ /LMDZ5/branches/testing/libf/phylmd/climb_wind_mod.F90	(revision 2870)
@@ -172,5 +172,6 @@
 !****************************************************************************************
 !!! jyg le 07/02/2012
-       IF (mod(iflag_pbl_split,2) .eq.1) THEN
+!!jyg       IF (mod(iflag_pbl_split,2) .eq.1) THEN
+       IF (mod(iflag_pbl_split,10) .ge.1) THEN
 !!! nrlmd le 02/05/2011
     DO k= 1, klev
@@ -188,5 +189,5 @@
     ENDDO
 !!!      
-       ENDIF  ! (mod(iflag_pbl_split,2) .eq.1)
+       ENDIF  ! (mod(iflag_pbl_split,2) .ge.1)
 !!!
 
@@ -308,5 +309,6 @@
 
 !!! jyg le 07/02/2012
-       IF (mod(iflag_pbl_split,2) .eq.1) THEN
+!!jyg       IF (mod(iflag_pbl_split,2) .eq.1) THEN
+       IF (mod(iflag_pbl_split,10) .ge.1) THEN
 !!! nrlmd le 02/05/2011
     DO i = 1, knon
@@ -326,5 +328,5 @@
     ENDDO
 !!!
-       ENDIF  ! (mod(iflag_pbl_split,2) .eq.1)
+       ENDIF  ! (mod(iflag_pbl_split,2) .ge.1)
 !!!
 
Index: /LMDZ5/branches/testing/libf/phylmd/concvl.F90
===================================================================
--- /LMDZ5/branches/testing/libf/phylmd/concvl.F90	(revision 2869)
+++ /LMDZ5/branches/testing/libf/phylmd/concvl.F90	(revision 2870)
@@ -13,5 +13,5 @@
 !RomP >>>
 !!     .             da,phi,mp,dd_t,dd_q,lalim_conv,wght_th)
-                  da, phi, mp, phi2, d1a, dam, sij, clw, elij, &     ! RomP
+                  da, phi, mp, phii, d1a, dam, sij, clw, elij, &     ! RomP
                   dd_t, dd_q, lalim_conv, wght_th, &                 ! RomP
                   evap, ep, epmlmMm, eplaMm, &                       ! RomP
@@ -87,84 +87,92 @@
   include "clesphys.h"
 
-  INTEGER iflag_clos
-
-  REAL dtime, paprs(klon, klev+1), pplay(klon, klev)
-  INTEGER k_upper_cv
-  REAL t(klon, klev), q(klon, klev), u(klon, klev), v(klon, klev)
-  REAL t_wake(klon, klev), q_wake(klon, klev)
-  REAL s_wake(klon)
-  REAL tra(klon, klev, nbtr)
-  INTEGER ntra
-  REAL sig1(klon, klev), w01(klon, klev), ptop2(klon)
-  REAL pmflxr(klon, klev+1), pmflxs(klon, klev+1)
-  REAL Ale(klon), Alp(klon)
-
-  REAL d_t(klon, klev), d_q(klon, klev), d_u(klon, klev), d_v(klon, klev)
-  REAL dd_t(klon, klev), dd_q(klon, klev)
-  REAL d_tra(klon, klev, nbtr)
-  REAL rain(klon), snow(klon)
-
-  INTEGER kbas(klon), ktop(klon)
-  REAL em_ph(klon, klev+1), em_p(klon, klev)
-  REAL upwd(klon, klev), dnwd(klon, klev), dnwdbis(klon, klev)
-
-!!       REAL Ma(klon,klev), mip(klon,klev),Vprecip(klon,klev)     !jyg
-  REAL Ma(klon, klev), mip(klon, klev), Vprecip(klon, klev+1)      !jyg
-  REAL Vprecipi(klon, klev+1)                                      !jyg
-  REAL wght(klon, klev)                                            !RL
-
-  REAL da(klon, klev), phi(klon, klev, klev), mp(klon, klev)
+  INTEGER, INTENT(IN)                           :: iflag_clos
+  REAL, INTENT(IN)                              :: dtime
+  REAL, DIMENSION(klon,klev),   INTENT(IN)      :: pplay
+  REAL, DIMENSION(klon,klev+1), INTENT(IN)      :: paprs
+  INTEGER,                      INTENT(IN)      :: k_upper_cv
+  REAL, DIMENSION(klon,klev),   INTENT(IN)      :: t, q, u, v
+  REAL, DIMENSION(klon,klev),   INTENT(IN)      :: t_wake, q_wake
+  REAL, DIMENSION(klon),        INTENT(IN)      :: s_wake
+  REAL, DIMENSION(klon,klev, nbtr),INTENT(IN)   :: tra
+  INTEGER,                      INTENT(IN)      :: ntra
+  REAL, DIMENSION(klon),        INTENT(IN)      :: Ale, Alp
+!CR:test: on passe lentr et alim_star des thermiques
+  INTEGER, DIMENSION(klon),     INTENT(IN)      :: lalim_conv
+  REAL, DIMENSION(klon,klev),   INTENT(IN)      :: wght_th
+
+  REAL, DIMENSION(klon,klev),   INTENT(INOUT)   :: sig1, w01
+
+  REAL, DIMENSION(klon,klev),   INTENT(OUT)     :: d_t, d_q, d_u, d_v
+  REAL, DIMENSION(klon,klev, nbtr),INTENT(OUT)  :: d_tra
+  REAL, DIMENSION(klon),        INTENT(OUT)     :: rain, snow
+
+  INTEGER, DIMENSION(klon),     INTENT(OUT)     :: kbas, ktop
+  REAL, DIMENSION(klon),        INTENT(OUT)     :: sigd
+  REAL, DIMENSION(klon),        INTENT(OUT)     :: cbmf, plcl, plfc, wbeff
+  REAL, DIMENSION(klon),        INTENT(OUT)     :: convoccur
+  REAL, DIMENSION(klon,klev),   INTENT(OUT)     :: upwd, dnwd, dnwdbis
+
+!!       REAL Ma(klon,klev), mip(klon,klev),Vprecip(klon,klev)                    !jyg
+  REAL, DIMENSION(klon,klev),   INTENT(OUT)     :: Ma, mip 
+  REAL, DIMENSION(klon,klev+1), INTENT(OUT)     :: Vprecip                        !jyg
+  REAL, DIMENSION(klon),        INTENT(OUT)     :: cape, cin
+  REAL, DIMENSION(klon,klev),   INTENT(OUT)     :: tvp
+  REAL, DIMENSION(klon,klev),   INTENT(OUT)     :: Tconv
+  INTEGER, DIMENSION(klon),     INTENT(OUT)     :: iflag
+  REAL, DIMENSION(klon),        INTENT(OUT)     :: pbase, bbase
+  REAL, DIMENSION(klon,klev),   INTENT(OUT)     :: dtvpdt1, dtvpdq1
+  REAL, DIMENSION(klon),        INTENT(OUT)     :: dplcldt, dplcldr
+  REAL, DIMENSION(klon,klev),   INTENT(OUT)     :: qcondc
+  REAL, DIMENSION(klon),        INTENT(OUT)     :: wd
+  REAL, DIMENSION(klon,klev+1), INTENT(OUT)     :: pmflxr, pmflxs
+
+  REAL, DIMENSION(klon,klev),   INTENT(OUT)     :: da, mp
+  REAL, DIMENSION(klon,klev,klev),INTENT(OUT)   :: phi
 ! RomP >>>
-  REAL phi2(klon, klev, klev)
-  REAL d1a(klon, klev), dam(klon, klev)
-  REAL sij(klon, klev, klev), clw(klon, klev), elij(klon, klev, klev)
-  REAL wdtrainA(klon, klev), wdtrainM(klon, klev)
-  REAL evap(klon, klev), ep(klon, klev)
-  REAL epmlmMm(klon, klev, klev), eplaMm(klon, klev)
+  REAL, DIMENSION(klon,klev,klev),INTENT(OUT)   :: phii
+  REAL, DIMENSION(klon,klev),   INTENT(OUT)     :: d1a, dam
+  REAL, DIMENSION(klon,klev,klev),INTENT(OUT)   :: sij, elij
+  REAL, DIMENSION(klon,klev),   INTENT(OUT)     :: clw
+  REAL, DIMENSION(klon,klev),   INTENT(OUT)     :: dd_t, dd_q
+  REAL, DIMENSION(klon,klev),   INTENT(OUT)     :: evap, ep
+  REAL, DIMENSION(klon,klev),   INTENT(OUT)     :: eplaMm
+  REAL, DIMENSION(klon,klev,klev), INTENT(OUT)  :: epmlmMm
+  REAL, DIMENSION(klon,klev),   INTENT(OUT)     :: wdtrainA, wdtrainM
 ! RomP <<<
-  REAL cape(klon), cin(klon), tvp(klon, klev)
-  REAL Tconv(klon, klev)
-
-!CR:test: on passe lentr et alim_star des thermiques
-  INTEGER lalim_conv(klon)
-  REAL wght_th(klon, klev)
-  REAL em_sig1feed ! sigma at lower bound of feeding layer
-  REAL em_sig2feed ! sigma at upper bound of feeding layer
-  REAL em_wght(klev) ! weight density determining the feeding mixture
+  REAL, DIMENSION(klon,klev),   INTENT(OUT)     :: wght                       !RL
+  REAL, DIMENSION(klon,klev),   INTENT(OUT)     :: qtc
+  REAL, DIMENSION(klon,klev),   INTENT(OUT)     :: sigt
+  REAL,                         INTENT(OUT)     :: tau_cld_cv, coefw_cld_cv
+  REAL, DIMENSION(klon),        INTENT(OUT)     :: epmax_diag                ! epmax_cape
+
+!
+!  Local
+!  ----
+  REAL, DIMENSION(klon,klev)                    :: em_p
+  REAL, DIMENSION(klon,klev+1)                  :: em_ph
+  REAL                                          :: em_sig1feed ! sigma at lower bound of feeding layer
+  REAL                                          :: em_sig2feed ! sigma at upper bound of feeding layer
+  REAL, DIMENSION(klev)                         :: em_wght ! weight density determining the feeding mixture
+  REAL, DIMENSION(klon,klev+1)                  :: Vprecipi                       !jyg
 !on enleve le save
 ! SAVE em_sig1feed,em_sig2feed,em_wght
 
-  INTEGER iflag(klon)
-  REAL rflag(klon)
-  REAL pbase(klon), bbase(klon)
-  REAL dtvpdt1(klon, klev), dtvpdq1(klon, klev)
-  REAL dplcldt(klon), dplcldr(klon)
-  REAL qcondc(klon, klev)
-  REAL qtc(klon, klev)
-  REAL sigt(klon, klev)
-  REAL wd(klon)
-  REAL plim1(klon), plim2(klon), asupmax(klon, klev)
-  REAL supmax0(klon), asupmaxmin(klon)
-
-  REAL sigd(klon)
-  REAL zx_t, zdelta, zx_qs, zcor
-  REAL tau_cld_cv, coefw_cld_cv
-  REAL epmax_diag(klon) ! epmax_cape
-
+  REAL, DIMENSION(klon)                         :: rflag
+  REAL, DIMENSION(klon)                         :: plim1, plim2
+  REAL, DIMENSION(klon)                         :: ptop2
+  REAL, DIMENSION(klon,klev)                    :: asupmax
+  REAL, DIMENSION(klon)                         :: supmax0, asupmaxmin
+  REAL                                          :: zx_t, zdelta, zx_qs, zcor
+!
 !   INTEGER iflag_mix
 !   SAVE iflag_mix
-  INTEGER noff, minorig
-  INTEGER i, k, itra
-  REAL qs(klon, klev), qs_wake(klon, klev)
-  REAL cbmf(klon), plcl(klon), plfc(klon), wbeff(klon)
-  REAL convoccur(klon)
+  INTEGER                                       :: noff, minorig
+  INTEGER                                       :: i,j, k, itra
+  REAL, DIMENSION(klon,klev)                    :: qs, qs_wake
 !LF          SAVE cbmf
 !IM/JYG      REAL, SAVE, ALLOCATABLE :: cbmf(:)
 !!!$OMP THREADPRIVATE(cbmf)!
-  REAL cbmflast(klon)
-  INTEGER ifrst
-  SAVE ifrst
-  DATA ifrst/0/
-!$OMP THREADPRIVATE(ifrst)
+  REAL, DIMENSION(klon)                         :: cbmflast
 
 
@@ -259,6 +267,4 @@
   snow(:) = 0
 
-! IF (ifrst .EQ. 0) THEN
-! ifrst = 1
   IF (first) THEN
     first = .FALSE.
@@ -293,5 +299,5 @@
       sigd(i) = 0.
     END DO
-  END IF !(ifrst .EQ. 0)
+  END IF !(first)
 
 ! Initialisation a chaque pas de temps
@@ -393,5 +399,5 @@
                    kbas, ktop, &
                    dtime, Ma, upwd, dnwd, dnwdbis, qcondc, wd, cape, &
-                   da, phi, mp, phi2, d1a, dam, sij, clw, elij, &       !RomP
+                   da, phi, mp, phii, d1a, dam, sij, clw, elij, &       !RomP
                    evap, ep, epmlmMm, eplaMm, &                         !RomP
                    wdtrainA, wdtrainM, &                                !RomP
@@ -428,7 +434,7 @@
                     asupmaxmin, lalim_conv, &
 !AC!+!RomP+jyg
-!!                   da,phi,mp,phi2,d1a,dam,sij,clw,elij, &               ! RomP
+!!                   da,phi,mp,phii,d1a,dam,sij,clw,elij, &               ! RomP
 !!                   evap,ep,epmlmMm,eplaMm,                              ! RomP
-                    da, phi, mp, phi2, d1a, dam, sij, wght, &           ! RomP+RL
+                    da, phi, mp, phii, d1a, dam, sij, wght, &           ! RomP+RL
                     clw, elij, evap, ep, epmlmMm, eplaMm, &             ! RomP+RL
                     wdtrainA, wdtrainM, qtc, sigt, &
Index: /LMDZ5/branches/testing/libf/phylmd/conf_phys_m.F90
===================================================================
--- /LMDZ5/branches/testing/libf/phylmd/conf_phys_m.F90	(revision 2869)
+++ /LMDZ5/branches/testing/libf/phylmd/conf_phys_m.F90	(revision 2870)
@@ -1369,10 +1369,10 @@
     !
     !Config Key  = iflag_pbl_split
-    !Config Desc = binary flag: least signif bit = split vdf; next bit = split thermals
+    !Config Desc = decimal flag: least signif digit = split vdf; next digit = split thermals
     !Config Def  = 0
-    !Config Help = 0-> no splitting; 1-> vdf splitting; 2-> thermals splitting; 3-> full splitting
+    !Config Help = 0-> no splitting; 1-> vdf splitting; 10-> thermals splitting; 11-> full splitting
     !
     iflag_pbl_split_omp = 0
-    CALL getin('iflag_pbl_split',iflag_pbl_split_omp)
+    call getin('iflag_pbl_split',iflag_pbl_split_omp)
     !
     !Config Key  = iflag_order2_sollw
Index: /LMDZ5/branches/testing/libf/phylmd/cva_driver.F90
===================================================================
--- /LMDZ5/branches/testing/libf/phylmd/cva_driver.F90	(revision 2869)
+++ /LMDZ5/branches/testing/libf/phylmd/cva_driver.F90	(revision 2870)
@@ -39,5 +39,4 @@
 ! **************************************************************
 
-  USE dimphy
   USE print_control_mod, ONLY: prt_level, lunout
   IMPLICIT NONE
@@ -168,5 +167,5 @@
   INTEGER, INTENT (IN)                               :: ndp1
   INTEGER, INTENT (IN)                               :: ntra
-  INTEGER, INTENT(IN)                                :: nloc ! (nloc=klon)  pour l'instant
+  INTEGER, INTENT(IN)                                :: nloc ! (nloc=len)  pour l'instant
   INTEGER, INTENT (IN)                               :: k_upper
   INTEGER, INTENT (IN)                               :: iflag_con
@@ -219,17 +218,17 @@
   REAL, DIMENSION (len), INTENT (OUT)                :: ptop21
   REAL, DIMENSION (len), INTENT (OUT)                :: sigd1
-  REAL, DIMENSION (len, nd), INTENT (OUT)            :: ma1
-  REAL, DIMENSION (len, nd), INTENT (OUT)            :: mip1
+  REAL, DIMENSION (len, nd), INTENT (OUT)            :: ma1        ! adiab. asc. mass flux (staggered grid)
+  REAL, DIMENSION (len, nd), INTENT (OUT)            :: mip1       ! mass flux shed from adiab. ascent (extensive)
 ! real Vprecip1(len,nd)
-  REAL, DIMENSION (len, ndp1), INTENT (OUT)          :: vprecip1
-  REAL, DIMENSION (len, ndp1), INTENT (OUT)          :: vprecipi1
-  REAL, DIMENSION (len, nd), INTENT (OUT)            :: upwd1
-  REAL, DIMENSION (len, nd), INTENT (OUT)            :: dnwd1
-  REAL, DIMENSION (len, nd), INTENT (OUT)            :: dnwd01
-  REAL, DIMENSION (len, nd), INTENT (OUT)            :: qcondc1         ! cld
+  REAL, DIMENSION (len, ndp1), INTENT (OUT)          :: vprecip1   ! tot precipitation flux (staggered grid)
+  REAL, DIMENSION (len, ndp1), INTENT (OUT)          :: vprecipi1  ! ice precipitation flux (staggered grid)
+  REAL, DIMENSION (len, nd), INTENT (OUT)            :: upwd1      ! upwd sat. mass flux (staggered grid)
+  REAL, DIMENSION (len, nd), INTENT (OUT)            :: dnwd1      ! dnwd sat. mass flux (staggered grid)
+  REAL, DIMENSION (len, nd), INTENT (OUT)            :: dnwd01     ! unsat. mass flux (staggered grid)
+  REAL, DIMENSION (len, nd), INTENT (OUT)            :: qcondc1    ! max cloud condensate (intensive)  ! cld
   REAL, DIMENSION (len), INTENT (OUT)                :: wd1             ! gust
   REAL, DIMENSION (len), INTENT (OUT)                :: cape1
   REAL, DIMENSION (len), INTENT (OUT)                :: cin1
-  REAL, DIMENSION (len, nd), INTENT (OUT)            :: tvp1
+  REAL, DIMENSION (len, nd), INTENT (OUT)            :: tvp1       ! Virt. temp. in the adiab. ascent
 
 !AC!
@@ -237,28 +236,32 @@
 !!      real da(len,nd),phi(len,nd,nd)
 !AC!
-  REAL, DIMENSION (len, nd), INTENT (OUT)            :: ftd1
-  REAL, DIMENSION (len, nd), INTENT (OUT)            :: fqd1
+  REAL, DIMENSION (len, nd), INTENT (OUT)            :: ftd1       ! Temp. tendency due to the sole unsat. drafts
+  REAL, DIMENSION (len, nd), INTENT (OUT)            :: fqd1       ! Moist. tendency due to the sole unsat. drafts
   REAL, DIMENSION (len), INTENT (OUT)                :: Plim11
   REAL, DIMENSION (len), INTENT (OUT)                :: Plim21
-  REAL, DIMENSION (len, nd), INTENT (OUT)            :: asupmax1
+  REAL, DIMENSION (len, nd), INTENT (OUT)            :: asupmax1   ! Highest mixing fraction of mixed updraughts
   REAL, DIMENSION (len), INTENT (OUT)                :: supmax01
   REAL, DIMENSION (len), INTENT (OUT)                :: asupmaxmin1
-  REAL, DIMENSION (len, nd), INTENT (OUT)            :: qtc1            ! cld
-  REAL, DIMENSION (len, nd), INTENT (OUT)            :: sigt1           ! cld
+  REAL, DIMENSION (len, nd), INTENT (OUT)            :: qtc1    ! in cloud water content (intensive)   ! cld
+  REAL, DIMENSION (len, nd), INTENT (OUT)            :: sigt1   ! fract. cloud area (intensive)        ! cld
 
 ! RomP >>>
-  REAL, DIMENSION (len, nd), INTENT (OUT)            :: wdtrainA1, wdtrainM1
-  REAL, DIMENSION (len, nd), INTENT (OUT)            :: da1, mp1
-  REAL, DIMENSION (len, nd, nd), INTENT (OUT)        :: phi1
-  REAL, DIMENSION (len, nd, nd), INTENT (OUT)        :: epmlmMm1
-  REAL, DIMENSION (len, nd), INTENT (OUT)            :: eplaMm1
-  REAL, DIMENSION (len, nd), INTENT (OUT)            :: evap1, ep1
-  REAL, DIMENSION (len, nd, nd), INTENT (OUT)        :: sigij1, elij1
-  REAL, DIMENSION (len, nd), INTENT (OUT)            :: clw1
+  REAL, DIMENSION (len, nd), INTENT (OUT)            :: wdtrainA1, wdtrainM1 ! precipitation sources (extensive)
+  REAL, DIMENSION (len, nd), INTENT (OUT)            :: mp1  ! unsat. mass flux (staggered grid)
+  REAL, DIMENSION (len, nd), INTENT (OUT)            :: da1  ! detrained mass flux of adiab. asc. air (extensive)
+  REAL, DIMENSION (len, nd, nd), INTENT (OUT)        :: phi1 ! mass flux of envt. air in mixed draughts (extensive)
+  REAL, DIMENSION (len, nd, nd), INTENT (OUT)        :: epmlmMm1  ! (extensive)
+  REAL, DIMENSION (len, nd), INTENT (OUT)            :: eplaMm1   ! (extensive)
+  REAL, DIMENSION (len, nd), INTENT (OUT)            :: evap1 ! evaporation rate in precip. downdraft. (intensive)
+  REAL, DIMENSION (len, nd), INTENT (OUT)            :: ep1
+  REAL, DIMENSION (len, nd, nd), INTENT (OUT)        :: sigij1 ! mass fraction of env. air in mixed draughts (intensive) 
+  REAL, DIMENSION (len, nd, nd), INTENT (OUT)        :: elij1! cond. water per unit mass of mixed draughts (intensive) 
+  REAL, DIMENSION (len, nd), INTENT (OUT)            :: clw1 ! cond. water per unit mass of the adiab. asc. (intensive) 
 !JYG,RL
-  REAL, DIMENSION (len, nd), INTENT (OUT)            :: wghti1      ! final weight of the feeding layers
+  REAL, DIMENSION (len, nd), INTENT (OUT)            :: wghti1   ! final weight of the feeding layers (extensive)
 !JYG,RL
-  REAL, DIMENSION (len, nd, nd), INTENT (OUT)        :: phi21
-  REAL, DIMENSION (len, nd), INTENT (OUT)            :: d1a1, dam1
+  REAL, DIMENSION (len, nd, nd), INTENT (OUT)        :: phi21    ! (extensive)
+  REAL, DIMENSION (len, nd), INTENT (OUT)            :: d1a1     ! (extensive)
+  REAL, DIMENSION (len, nd), INTENT (OUT)            :: dam1     ! (extensive)
 ! RomP <<<
   REAL, DIMENSION (len ), INTENT (OUT)               :: epmax_diag1      
@@ -395,10 +398,10 @@
 
 
-  INTEGER i, k, n, il, j
+  INTEGER i, k, il
   INTEGER nword1, nword2, nword3, nword4
   INTEGER icbmax
-  INTEGER nk1(klon)
-  INTEGER icb1(klon)
-  INTEGER icbs1(klon)
+  INTEGER nk1(len)
+  INTEGER icb1(len)
+  INTEGER icbs1(len)
 
   LOGICAL ok_inhib ! True => possible inhibition of convection by dryness
@@ -407,33 +410,30 @@
 
   REAL coef_convective(len)   ! = 1 for convective points, = 0 otherwise
-  REAL tnk1(klon)
-  REAL thnk1(klon)
-  REAL qnk1(klon)
-  REAL gznk1(klon)
-  REAL pnk1(klon)
-  REAL qsnk1(klon)
-  REAL unk1(klon)
-  REAL vnk1(klon)
-  REAL cpnk1(klon)
-  REAL hnk1(klon)
-  REAL pbase1(klon)
-  REAL buoybase1(klon)
-
-  REAL lf1(klon, klev), lf1_wake(klon, klev)
-  REAL lv1(klon, klev), lv1_wake(klon, klev)
-  REAL cpn1(klon, klev), cpn1_wake(klon, klev)
-  REAL tv1(klon, klev), tv1_wake(klon, klev)
-  REAL gz1(klon, klev), gz1_wake(klon, klev)
-  REAL hm1(klon, klev), hm1_wake(klon, klev)
-  REAL h1(klon, klev), h1_wake(klon, klev)
-  REAL tp1(klon, klev)
-  REAL th1(klon, klev), th1_wake(klon, klev)
-
-  REAL bid(klon, klev) ! dummy array
+  REAL tnk1(len)
+  REAL thnk1(len)
+  REAL qnk1(len)
+  REAL gznk1(len)
+  REAL qsnk1(len)
+  REAL unk1(len)
+  REAL vnk1(len)
+  REAL cpnk1(len)
+  REAL hnk1(len)
+  REAL pbase1(len)
+  REAL buoybase1(len)
+
+  REAL lf1(len, nd), lf1_wake(len, nd)
+  REAL lv1(len, nd), lv1_wake(len, nd)
+  REAL cpn1(len, nd), cpn1_wake(len, nd)
+  REAL tv1(len, nd), tv1_wake(len, nd)
+  REAL gz1(len, nd), gz1_wake(len, nd)
+  REAL hm1(len, nd)
+  REAL h1(len, nd), h1_wake(len, nd)
+  REAL tp1(len, nd)
+  REAL th1(len, nd), th1_wake(len, nd)
+
+  REAL bid(len, nd) ! dummy array
 
   INTEGER ncum
 
-  INTEGER j1feed(klon)
-  INTEGER j2feed(klon)
   REAL p1feed1(len) ! pressure at lower bound of feeding layer
   REAL p2feed1(len) ! pressure at upper bound of feeding layer
@@ -450,66 +450,65 @@
 !>jyg
   INTEGER iflag(nloc), nk(nloc), icb(nloc)
-  INTEGER nent(nloc, klev)
+  INTEGER nent(nloc, nd)
   INTEGER icbs(nloc)
   INTEGER inb(nloc), inbis(nloc)
 
   REAL cbmf(nloc), plcl(nloc), plfc(nloc), wbeff(nloc)
-  REAL t(nloc, klev), q(nloc, klev), qs(nloc, klev)
-  REAL t_wake(nloc, klev), q_wake(nloc, klev), qs_wake(nloc, klev)
+  REAL t(nloc, nd), q(nloc, nd), qs(nloc, nd)
+  REAL t_wake(nloc, nd), q_wake(nloc, nd), qs_wake(nloc, nd)
   REAL s_wake(nloc)
-  REAL u(nloc, klev), v(nloc, klev)
-  REAL gz(nloc, klev), h(nloc, klev), hm(nloc, klev)
-  REAL h_wake(nloc, klev), hm_wake(nloc, klev)
-  REAL lv(nloc, klev), lf(nloc, klev), cpn(nloc, klev)
-  REAL lv_wake(nloc, klev), lf_wake(nloc, klev), cpn_wake(nloc, klev)
-  REAL p(nloc, klev), ph(nloc, klev+1), tv(nloc, klev), tp(nloc, klev)
-  REAL tv_wake(nloc, klev)
-  REAL clw(nloc, klev)
-  REAL dph(nloc, klev)
-  REAL pbase(nloc), buoybase(nloc), th(nloc, klev)
-  REAL th_wake(nloc, klev)
-  REAL tvp(nloc, klev)
-  REAL sig(nloc, klev), w0(nloc, klev), ptop2(nloc)
-  REAL hp(nloc, klev), ep(nloc, klev), sigp(nloc, klev)
-  REAL buoy(nloc, klev)
+  REAL u(nloc, nd), v(nloc, nd)
+  REAL gz(nloc, nd), h(nloc, nd)
+  REAL h_wake(nloc, nd)
+  REAL lv(nloc, nd), lf(nloc, nd), cpn(nloc, nd)
+  REAL lv_wake(nloc, nd), lf_wake(nloc, nd), cpn_wake(nloc, nd)
+  REAL p(nloc, nd), ph(nloc, nd+1), tv(nloc, nd), tp(nloc, nd)
+  REAL tv_wake(nloc, nd)
+  REAL clw(nloc, nd)
+  REAL dph(nloc, nd)
+  REAL pbase(nloc), buoybase(nloc), th(nloc, nd)
+  REAL th_wake(nloc, nd)
+  REAL tvp(nloc, nd)
+  REAL sig(nloc, nd), w0(nloc, nd), ptop2(nloc)
+  REAL hp(nloc, nd), ep(nloc, nd), sigp(nloc, nd)
+  REAL buoy(nloc, nd)
   REAL cape(nloc)
   REAL cin(nloc)
-  REAL m(nloc, klev)
-  REAL ment(nloc, klev, klev), sigij(nloc, klev, klev)
-  REAL qent(nloc, klev, klev)
-  REAL hent(nloc, klev, klev)
-  REAL uent(nloc, klev, klev), vent(nloc, klev, klev)
-  REAL ments(nloc, klev, klev), qents(nloc, klev, klev)
-  REAL elij(nloc, klev, klev)
-  REAL supmax(nloc, klev)
+  REAL m(nloc, nd)
+  REAL ment(nloc, nd, nd), sigij(nloc, nd, nd)
+  REAL qent(nloc, nd, nd)
+  REAL hent(nloc, nd, nd)
+  REAL uent(nloc, nd, nd), vent(nloc, nd, nd)
+  REAL ments(nloc, nd, nd), qents(nloc, nd, nd)
+  REAL elij(nloc, nd, nd)
+  REAL supmax(nloc, nd)
   REAL Ale(nloc), Alp(nloc), coef_clos(nloc)
-  REAL omega(nloc,klev)
+  REAL omega(nloc,nd)
   REAL sigd(nloc)
-! real mp(nloc,klev), qp(nloc,klev), up(nloc,klev), vp(nloc,klev)
-! real wt(nloc,klev), water(nloc,klev), evap(nloc,klev), ice(nloc,klev)
-! real b(nloc,klev), sigd(nloc)
+! real mp(nloc,nd), qp(nloc,nd), up(nloc,nd), vp(nloc,nd)
+! real wt(nloc,nd), water(nloc,nd), evap(nloc,nd), ice(nloc,nd)
+! real b(nloc,nd), sigd(nloc)
 ! save mp,qp,up,vp,wt,water,evap,b
-  REAL, SAVE, ALLOCATABLE :: mp(:, :), qp(:, :), up(:, :), vp(:, :)
-  REAL, SAVE, ALLOCATABLE :: wt(:, :), water(:, :), evap(:, :)
-  REAL, SAVE, ALLOCATABLE :: ice(:, :), fondue(:, :), b(:, :)
-  REAL, SAVE, ALLOCATABLE :: frac(:, :), faci(:, :)
-!$OMP THREADPRIVATE(mp,qp,up,vp,wt,water,evap,ice,fondue,b,frac,faci)
-  REAL ft(nloc, klev), fq(nloc, klev)
-  REAL ftd(nloc, klev), fqd(nloc, klev)
-  REAL fu(nloc, klev), fv(nloc, klev)
-  REAL upwd(nloc, klev), dnwd(nloc, klev), dnwd0(nloc, klev)
-  REAL ma(nloc, klev), mip(nloc, klev)
-!!  REAL tls(nloc, klev), tps(nloc, klev)                 ! unused . jyg
+  REAL, DIMENSION(len,nd)     :: mp, qp, up, vp
+  REAL, DIMENSION(len,nd)     :: wt, water, evap
+  REAL, DIMENSION(len,nd)     :: ice, fondue, b
+  REAL, DIMENSION(len,nd)     :: frac, faci
+  REAL ft(nloc, nd), fq(nloc, nd)
+  REAL ftd(nloc, nd), fqd(nloc, nd)
+  REAL fu(nloc, nd), fv(nloc, nd)
+  REAL upwd(nloc, nd), dnwd(nloc, nd), dnwd0(nloc, nd)
+  REAL ma(nloc, nd), mip(nloc, nd)
+!!  REAL tls(nloc, nd), tps(nloc, nd)                 ! unused . jyg
   REAL qprime(nloc), tprime(nloc)
   REAL precip(nloc)
-! real Vprecip(nloc,klev)
-  REAL vprecip(nloc, klev+1)
-  REAL vprecipi(nloc, klev+1)
-  REAL tra(nloc, klev, ntra), trap(nloc, klev, ntra)
-  REAL ftra(nloc, klev, ntra), traent(nloc, klev, klev, ntra)
-  REAL qcondc(nloc, klev)      ! cld
+! real Vprecip(nloc,nd)
+  REAL vprecip(nloc, nd+1)
+  REAL vprecipi(nloc, nd+1)
+  REAL tra(nloc, nd, ntra), trap(nloc, nd, ntra)
+  REAL ftra(nloc, nd, ntra), traent(nloc, nd, nd, ntra)
+  REAL qcondc(nloc, nd)      ! cld
   REAL wd(nloc)                ! gust
   REAL Plim1(nloc), plim2(nloc)
-  REAL asupmax(nloc, klev)
+  REAL asupmax(nloc, nd)
   REAL supmax0(nloc)
   REAL asupmaxmin(nloc)
@@ -519,11 +518,11 @@
   REAL hnk(nloc), unk(nloc), vnk(nloc)
 
-  REAL qtc(nloc, klev)         ! cld
-  REAL sigt(nloc, klev)        ! cld
+  REAL qtc(nloc, nd)         ! cld
+  REAL sigt(nloc, nd)        ! cld
  
 ! RomP >>>
-  REAL wdtrainA(nloc, klev), wdtrainM(nloc, klev)
+  REAL wdtrainA(nloc, nd), wdtrainM(nloc, nd)
   REAL da(len, nd), phi(len, nd, nd)
-  REAL epmlmMm(nloc, klev, klev), eplaMm(nloc, klev)
+  REAL epmlmMm(nloc, nd, nd), eplaMm(nloc, nd)
   REAL phi2(len, nd, nd)
   REAL d1a(len, nd), dam(len, nd)
@@ -531,6 +530,4 @@
   REAL epmax_diag(nloc) ! epmax_cape
 
-  LOGICAL, SAVE :: first = .TRUE.
-!$OMP THREADPRIVATE(first)
   CHARACTER (LEN=20) :: modname = 'cva_driver'
   CHARACTER (LEN=80) :: abort_message
@@ -540,6 +537,6 @@
 
 
-! print *, 't1, t1_wake ',(k,t1(1,k),t1_wake(1,k),k=1,klev)
-! print *, 'q1, q1_wake ',(k,q1(1,k),q1_wake(1,k),k=1,klev)
+! print *, 't1, t1_wake ',(k,t1(1,k),t1_wake(1,k),k=1,nd)
+! print *, 'q1, q1_wake ',(k,q1(1,k),q1_wake(1,k),k=1,nd)
 
 ! -------------------------------------------------------------------
@@ -547,12 +544,4 @@
 ! -------------------------------------------------------------------
 
-  IF (first) THEN
-    ALLOCATE (mp(nloc,klev), qp(nloc,klev), up(nloc,klev))
-    ALLOCATE (vp(nloc,klev), wt(nloc,klev), water(nloc,klev))
-    ALLOCATE (ice(nloc,klev), fondue(nloc,klev))
-    ALLOCATE (evap(nloc,klev), b(nloc,klev))
-    ALLOCATE (frac(nloc,klev), faci(nloc,klev))
-    first = .FALSE.
-  END IF
 ! -- set simulation flags:
 ! (common cvflag)
@@ -736,5 +725,5 @@
 ! print*, 'IFLAG1 avant cv3_feed'
 ! print*,'len,nd',len,nd
-! write(*,'(64i1)') iflag1(2:klon-1)
+! write(*,'(64i1)') iflag1(2:len-1)
 
         if (prt_level >= 9) &
@@ -749,5 +738,5 @@
 ! print*, 'IFLAG1 apres cv3_feed'
 ! print*,'len,nd',len,nd
-! write(*,'(64i1)') iflag1(2:klon-1)
+! write(*,'(64i1)') iflag1(2:len-1)
 
   IF (iflag_con==4) THEN
@@ -799,5 +788,5 @@
 ! print*, 'IFLAG1 apres cv3_triger'
 ! print*,'len,nd',len,nd
-! write(*,'(64i1)') iflag1(2:klon-1)
+! write(*,'(64i1)') iflag1(2:len-1)
 
 ! call dump2d(iim,jjm-1,sig1(2)
@@ -828,5 +817,5 @@
   END DO
 
-! print*,'klon, ncum = ',len,ncum
+! print*,'len, ncum = ',len,ncum
 
   IF (ncum>0) THEN
@@ -944,5 +933,5 @@
 !      END IF
       IF (iflag_mix>=1) THEN
-        CALL zilch(supmax, nloc*klev)
+        CALL zilch(supmax, nloc*nd)
         if (prt_level >= 9) &
              PRINT *, 'cva_driver -> cv3p_mixing'
@@ -955,5 +944,5 @@
 
       ELSE
-        CALL zilch(supmax, nloc*klev)
+        CALL zilch(supmax, nloc*nd)
       END IF
     END IF
@@ -1031,5 +1020,5 @@
                         unk, vnk, hp, tv, tvp, ep, clw, m, sig, &
                         ment, qent, uent, vent, nent, sigij, elij, ments, qents, traent)
-        CALL zilch(hent, nloc*klev*klev)
+        CALL zilch(hent, nloc*nd*nd)
       ELSE
         CALL cv3_mixscale(nloc, ncum, nd, ment, m)
Index: /LMDZ5/branches/testing/libf/phylmd/dyn1d/1DUTILS.h
===================================================================
--- /LMDZ5/branches/testing/libf/phylmd/dyn1d/1DUTILS.h	(revision 2869)
+++ /LMDZ5/branches/testing/libf/phylmd/dyn1d/1DUTILS.h	(revision 2870)
@@ -653,9 +653,12 @@
 
       modname = 'dyn1deta0 : '
-      nmq(1)="vap"
-      nmq(2)="cond"
-      do iq=3,nqtot
-        write(nmq(iq),'("tra",i1)') iq-2
-      enddo
+!!      nmq(1)="vap"
+!!      nmq(2)="cond"
+!!      do iq=3,nqtot
+!!        write(nmq(iq),'("tra",i1)') iq-2
+!!      enddo
+      DO iq = 1,nqtot
+        nmq(iq) = trim(tname(iq))
+      ENDDO
       print*,'in dyn1deta0 ',fichnom,klon,klev,nqtot
       CALL open_startphy(fichnom)
@@ -804,8 +807,11 @@
       CALL open_restartphy(fichnom)
       print*,'redm1 ',fichnom,klon,klev,nqtot
-      nmq(1)="vap"
-      nmq(2)="cond"
-      nmq(3)="tra1"
-      nmq(4)="tra2"
+!!      nmq(1)="vap"
+!!      nmq(2)="cond"
+!!      nmq(3)="tra1"
+!!      nmq(4)="tra2"
+      DO iq = 1,nqtot
+        nmq(iq) = trim(tname(iq))
+      ENDDO
 
       modname = 'dyn1dredem'
Index: /LMDZ5/branches/testing/libf/phylmd/ener_conserv.F90
===================================================================
--- /LMDZ5/branches/testing/libf/phylmd/ener_conserv.F90	(revision 2869)
+++ /LMDZ5/branches/testing/libf/phylmd/ener_conserv.F90	(revision 2870)
@@ -1,4 +1,5 @@
 subroutine ener_conserv(klon,klev,pdtphys, &
- &    puo,pvo,pto,pqo,pun,pvn,ptn,pqn,dtke,masse,exner,d_t_ec)
+ &                      puo,pvo,pto,pqo,pql0,pqs0, &
+ &                      pun,pvn,ptn,pqn,pqln,pqsn,dtke,masse,exner,d_t_ec)
 
 !=============================================================
@@ -19,5 +20,6 @@
 
 ! From module
-USE phys_local_var_mod, ONLY : d_u_vdf,d_v_vdf,d_t_vdf,d_u_ajs,d_v_ajs,d_t_ajs,d_u_con,d_v_con,d_t_con,d_t_diss
+USE phys_local_var_mod, ONLY : d_u_vdf,d_v_vdf,d_t_vdf,d_u_ajs,d_v_ajs,d_t_ajs, &
+ &                             d_u_con,d_v_con,d_t_con,d_t_diss
 USE phys_local_var_mod, ONLY : d_t_eva,d_t_lsc,d_q_eva,d_q_lsc
 USE phys_output_var_mod, ONLY : bils_ec,bils_ech,bils_tke,bils_kinetic,bils_enthalp,bils_latent,bils_diss
@@ -32,12 +34,13 @@
 INTEGER, INTENT(IN) :: klon,klev
 REAL, INTENT(IN) :: pdtphys
-REAL, DIMENSION(klon,klev),INTENT(IN) :: puo,pvo,pto,pqo
-REAL, DIMENSION(klon,klev),INTENT(IN) :: pun,pvn,ptn,pqn
-REAL, DIMENSION(klon,klev),INTENT(IN) :: masse,exner
-REAL, DIMENSION(klon,klev+1),INTENT(IN) :: dtke
-REAL, DIMENSION(klon,klev),INTENT(OUT) :: d_t_ec
-      integer k,i
+REAL, DIMENSION(klon,klev), INTENT(IN)      :: puo,pvo,pto,pqo,pql0,pqs0
+REAL, DIMENSION(klon,klev), INTENT(IN)      :: pun,pvn,ptn,pqn,pqln,pqsn
+REAL, DIMENSION(klon,klev), INTENT(IN)      :: masse,exner
+REAL, DIMENSION(klon,klev+1), INTENT(IN)    :: dtke
+!
+REAL, DIMENSION(klon,klev), INTENT(OUT)     :: d_t_ec
 
 ! Local
+      integer k,i
 REAL, DIMENSION(klon,klev+1) :: fluxu,fluxv,fluxt
 REAL, DIMENSION(klon,klev+1) :: dddu,dddv,dddt
@@ -56,5 +59,5 @@
    DO k = 1, klev
    DO i = 1, klon
-      ZRCPD = RCPD*(1.0+RVTMP2*pqn(i,k))
+      ZRCPD = RCPD*(1.0+RVTMP2*(pqn(i,k)+pqln(i,k)+pqsn(i,k)))
       d_t_ec(i,k)=0.5/ZRCPD &
  &      *(puo(i,k)**2+pvo(i,k)**2-pun(i,k)**2-pvn(i,k)**2)
Index: /LMDZ5/branches/testing/libf/phylmd/iophy.F90
===================================================================
--- /LMDZ5/branches/testing/libf/phylmd/iophy.F90	(revision 2869)
+++ /LMDZ5/branches/testing/libf/phylmd/iophy.F90	(revision 2870)
@@ -45,16 +45,16 @@
 
   SUBROUTINE init_iophy_new(rlat,rlon)
-  USE dimphy, only: klon
-  USE mod_phys_lmdz_para, only: gather, bcast, &
+  USE dimphy, ONLY: klon
+  USE mod_phys_lmdz_para, ONLY: gather, bcast, &
                                 jj_nb, jj_begin, jj_end, ii_begin, ii_end, &
                                 mpi_size, mpi_rank, klon_mpi, &
                                 is_sequential, is_south_pole_dyn
-  USE mod_grid_phy_lmdz, only: nbp_lon, nbp_lat, klon_glo
+  USE mod_grid_phy_lmdz, ONLY: nbp_lon, nbp_lat, klon_glo
   USE print_control_mod, ONLY: prt_level,lunout 
 #ifdef CPP_IOIPSL
-  USE ioipsl, only: flio_dom_set
-#endif
-#ifdef CPP_XIOS
-  use wxios, only: wxios_domain_param
+  USE ioipsl, ONLY: flio_dom_set
+#endif
+#ifdef CPP_XIOS
+  USE wxios, ONLY: wxios_domain_param
 #endif
   IMPLICIT NONE
@@ -136,5 +136,5 @@
     ELSE 
         data_ibegin = ii_begin - 1
-    END IF
+    ENDIF
 
     IF (mpi_rank == mpi_size-1) THEN
@@ -142,7 +142,7 @@
     ELSE
         data_iend = ii_end + 1
-    END IF
-
-    if (prt_level>=10) then
+    ENDIF
+
+    IF (prt_level>=10) THEN
       write(lunout,*) "init_iophy_new: mpirank=",mpi_rank," iibegin=",ii_begin , " ii_end=",ii_end," jjbegin=",jj_begin," jj_nb=",jj_nb," jj_end=",jj_end
       write(lunout,*) "init_iophy_new: mpirank=",mpi_rank," nbp_lon=",nbp_lon," nbp_lat=",nbp_lat
@@ -150,5 +150,5 @@
       write(lunout,*) "init_iophy_new: mpirank=",mpi_rank," data_ibegin=",data_ibegin," data_iend=",data_iend
       write(lunout,*) "init_iophy_new: mpirank=",mpi_rank," is_south_pole=",is_south_pole_dyn
-    endif
+    ENDIF
 
     ! Initialize the XIOS domain coreesponding to this process:
@@ -163,7 +163,7 @@
 
   SUBROUTINE init_iophy(lat,lon)
-  USE mod_phys_lmdz_para, only: jj_begin, jj_end, ii_begin, ii_end, jj_nb, &
+  USE mod_phys_lmdz_para, ONLY: jj_begin, jj_end, ii_begin, ii_end, jj_nb, &
                                 mpi_size, mpi_rank 
-  USE ioipsl, only: flio_dom_set
+  USE ioipsl, ONLY: flio_dom_set
   USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat
   IMPLICIT NONE
@@ -180,7 +180,7 @@
 
 !$OMP MASTER  
-    allocate(io_lat(nbp_lat))
+    ALLOCATE(io_lat(nbp_lat))
     io_lat(:)=lat(:)
-    allocate(io_lon(nbp_lon))
+    ALLOCATE(io_lon(nbp_lon))
     io_lon(:)=lon(:)
    
@@ -191,9 +191,9 @@
     dpl=(/ nbp_lon, jj_end /)
     dhs=(/ ii_begin-1,0 /)
-    if (mpi_rank==mpi_size-1) then
+    IF (mpi_rank==mpi_size-1) THEN
       dhe=(/0,0/)
-    else
+    ELSE
       dhe=(/ nbp_lon-ii_end,0 /)  
-    endif
+    ENDIF
     
 #ifndef CPP_IOIPSL_NO_OUTPUT 
@@ -203,35 +203,35 @@
 !$OMP END MASTER
       
-  end SUBROUTINE init_iophy
+  END SUBROUTINE init_iophy
 
  SUBROUTINE histbeg_phyxios(name,itau0,zjulian,dtime,ffreq,lev,nhori,nid_day)
 !  USE dimphy
-  USE mod_phys_lmdz_para, only: is_sequential, is_using_mpi, is_mpi_root, &
+  USE mod_phys_lmdz_para, ONLY: is_sequential, is_using_mpi, is_mpi_root, &
                                 jj_begin, jj_end, jj_nb
   USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat
-  use ioipsl, only: histbeg
-#ifdef CPP_XIOS
-  use wxios, only: wxios_add_file
+  USE ioipsl, ONLY: histbeg
+#ifdef CPP_XIOS
+  USE wxios, ONLY: wxios_add_file
 #endif
   IMPLICIT NONE
   include 'clesphys.h'
     
-    character*(*), INTENT(IN) :: name
-    integer, INTENT(IN) :: itau0
+    CHARACTER*(*), INTENT(IN) :: name
+    INTEGER, INTENT(IN) :: itau0
     REAL,INTENT(IN) :: zjulian
     REAL,INTENT(IN) :: dtime
-    character(LEN=*), INTENT(IN) :: ffreq
+    CHARACTER(LEN=*), INTENT(IN) :: ffreq
     INTEGER,INTENT(IN) :: lev
-    integer,intent(out) :: nhori
-    integer,intent(out) :: nid_day
+    INTEGER,INTENT(OUT) :: nhori
+    INTEGER,INTENT(OUT) :: nid_day
 
 !$OMP MASTER    
-    if (is_sequential) then
+    IF (is_sequential) THEN
       call histbeg(name,nbp_lon,io_lon, jj_nb,io_lat(jj_begin:jj_end), &
                    1,nbp_lon,1,jj_nb,itau0, zjulian, dtime, nhori, nid_day)
-    else
+    ELSE
       call histbeg(name,nbp_lon,io_lon, jj_nb,io_lat(jj_begin:jj_end), &
                    1,nbp_lon,1,jj_nb,itau0, zjulian, dtime, nhori, nid_day,phys_domain_id)
-    endif
+    ENDIF
 
 #ifdef CPP_XIOS
@@ -242,5 +242,5 @@
         CALL wxios_add_file(name, ffreq, lev)
       ENDIF
-    END IF
+    ENDIF
 #endif
 !$OMP END MASTER
@@ -250,26 +250,26 @@
   SUBROUTINE histbeg_phy(name,itau0,zjulian,dtime,nhori,nid_day)
 
-  USE mod_phys_lmdz_para, only: jj_begin, jj_end, jj_nb, is_sequential
+  USE mod_phys_lmdz_para, ONLY: jj_begin, jj_end, jj_nb, is_sequential
   USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat
-  use ioipsl, only: histbeg
+  USE ioipsl, ONLY: histbeg
 
   IMPLICIT NONE
     
-    character*(*), INTENT(IN) :: name
-    integer, INTENT(IN) :: itau0
+    CHARACTER*(*), INTENT(IN) :: name
+    INTEGER, INTENT(IN) :: itau0
     REAL,INTENT(IN) :: zjulian
     REAL,INTENT(IN) :: dtime
-    integer,intent(out) :: nhori
-    integer,intent(out) :: nid_day
+    INTEGER,INTENT(OUT) :: nhori
+    INTEGER,INTENT(OUT) :: nid_day
 
 !$OMP MASTER    
 #ifndef CPP_IOIPSL_NO_OUTPUT 
-    if (is_sequential) then
+    IF (is_sequential) THEN
       call histbeg(name,nbp_lon,io_lon, jj_nb,io_lat(jj_begin:jj_end), &
                    1,nbp_lon,1,jj_nb,itau0, zjulian, dtime, nhori, nid_day)
-    else
+    ELSE
       call histbeg(name,nbp_lon,io_lon, jj_nb,io_lat(jj_begin:jj_end), &
                    1,nbp_lon,1,jj_nb,itau0, zjulian, dtime, nhori, nid_day,phys_domain_id)
-    endif
+    ENDIF
 #endif
 !$OMP END MASTER
@@ -281,10 +281,10 @@
              plon,plat,plon_bounds,plat_bounds, &
              nname,itau0,zjulian,dtime,nnhori,nnid_day)
-  USE dimphy, only: klon
-  USE mod_phys_lmdz_para, only: gather, bcast, &
+  USE dimphy, ONLY: klon
+  USE mod_phys_lmdz_para, ONLY: gather, bcast, &
                                 is_sequential, klon_mpi_begin, klon_mpi_end, &
                                 mpi_rank
-  USE mod_grid_phy_lmdz, only: klon_glo, nbp_lon, nbp_lat
-  use ioipsl, only: histbeg
+  USE mod_grid_phy_lmdz, ONLY: klon_glo, nbp_lon, nbp_lat
+  USE ioipsl, ONLY: histbeg
 
   IMPLICIT NONE
@@ -292,12 +292,12 @@
     REAL,DIMENSION(klon),INTENT(IN) :: rlon
     REAL,DIMENSION(klon),INTENT(IN) :: rlat
-    integer, INTENT(IN) :: itau0
+    INTEGER, INTENT(IN) :: itau0
     REAL,INTENT(IN) :: zjulian
     REAL,INTENT(IN) :: dtime
-    integer, INTENT(IN) :: pim
-    integer, intent(out) :: nnhori
-    character(len=20), INTENT(IN) :: nname
-    INTEGER, intent(out) :: nnid_day
-    integer :: i
+    INTEGER, INTENT(IN) :: pim
+    INTEGER, intent(out) :: nnhori
+    CHARACTER(len=20), INTENT(IN) :: nname
+    INTEGER, INTENT(OUT) :: nnid_day
+    INTEGER :: i
     REAL,DIMENSION(klon_glo)        :: rlat_glo
     REAL,DIMENSION(klon_glo)        :: rlon_glo
@@ -328,14 +328,14 @@
      plon_bounds(i,1)=rlon_glo(tabij(i)-1)
      plon_bounds(i,2)=rlon_glo(tabij(i)+1)
-     if(plon_bounds(i,2).LE.0..AND.plon_bounds(i,1).GE.0.) THEN
-      if(rlon_glo(tabij(i)).GE.0.) THEN
+     IF (plon_bounds(i,2).LE.0..AND.plon_bounds(i,1).GE.0.) THEN
+      IF (rlon_glo(tabij(i)).GE.0.) THEN
        plon_bounds(i,2)=-1*plon_bounds(i,2)
-      endif
-     endif
-     if(plon_bounds(i,2).GE.0..AND.plon_bounds(i,1).LE.0.) THEN
-      if(rlon_glo(tabij(i)).LE.0.) THEN
+      ENDIF
+     ENDIF
+     IF (plon_bounds(i,2).GE.0..AND.plon_bounds(i,1).LE.0.) THEN
+      IF (rlon_glo(tabij(i)).LE.0.) THEN
        plon_bounds(i,2)=-1*plon_bounds(i,2)
-      endif
-     endif
+      ENDIF
+     ENDIF
 !
      IF ( tabij(i).LE.nbp_lon) THEN
@@ -361,10 +361,10 @@
 
        CALL gr_fi_ecrit(1,klon,nbp_lon,nbp_lat,rlon_glo,zx_lon)
-       if ((nbp_lon*nbp_lat).gt.1) then
+       IF ((nbp_lon*nbp_lat).GT.1) THEN
        DO i = 1, nbp_lon
          zx_lon(i,1) = rlon_glo(i+1)
          zx_lon(i,nbp_lat) = rlon_glo(i+1)
        ENDDO
-       endif
+       ENDIF
        CALL gr_fi_ecrit(1,klon,nbp_lon,nbp_lat,rlat_glo,zx_lat)
 
@@ -375,25 +375,25 @@
      plon_bounds(i,2)=zx_lon(ipt(i)+1,jpt(i))
 
-     if (ipt(i).EQ.1) then
+     IF (ipt(i).EQ.1) THEN
       plon_bounds(i,1)=zx_lon(nbp_lon,jpt(i))
       plon_bounds(i,2)=360.+zx_lon(ipt(i)+1,jpt(i))
-     endif
+     ENDIF
  
-     if (ipt(i).EQ.nbp_lon) then
+     IF (ipt(i).EQ.nbp_lon) THEN
       plon_bounds(i,2)=360.+zx_lon(1,jpt(i))
-     endif
+     ENDIF
 
      plat_bounds(i,1)=zx_lat(ipt(i),jpt(i)-1)
      plat_bounds(i,2)=zx_lat(ipt(i),jpt(i)+1)
 
-     if (jpt(i).EQ.1) then
+     IF (jpt(i).EQ.1) THEN
       plat_bounds(i,1)=zx_lat(ipt(i),1)+0.001
       plat_bounds(i,2)=zx_lat(ipt(i),1)-0.001
-     endif
+     ENDIF
  
-     if (jpt(i).EQ.nbp_lat) then
+     IF (jpt(i).EQ.nbp_lat) THEN
       plat_bounds(i,1)=zx_lat(ipt(i),nbp_lat)+0.001
       plat_bounds(i,2)=zx_lat(ipt(i),nbp_lat)-0.001
-     endif
+     ENDIF
 !
 !    print*,'CFMIP_iophy point i lon lon_bds',i,plon_bounds(i,1),rlon(tabij(i)),plon_bounds(i,2) 
@@ -407,5 +407,5 @@
                            itau0, zjulian, dtime, nnhori, nnid_day)
 #endif
-    else
+    ELSE
      npproc=0
      DO ip=1, pim
@@ -448,17 +448,19 @@
                             itau0,zjulian,dtime,nnhori,nnid_day,phys_domain_id)
 #endif
-    endif
+    ENDIF
 !$OMP END MASTER
 
-  end SUBROUTINE histbeg_phy_points
+  END SUBROUTINE histbeg_phy_points
 
 
   SUBROUTINE histdef2d_old (iff,lpoint,flag_var,nomvar,titrevar,unitvar)
 
-    USE ioipsl, only: histdef
-    USE mod_phys_lmdz_para, only: jj_nb
-    use phys_output_var_mod, only: type_ecri, zoutm, zdtime_moy, lev_files, &
-                                   nid_files, nhorim, swaero_diag, nfiles
+    USE ioipsl, ONLY: histdef
+    USE mod_phys_lmdz_para, ONLY: jj_nb
+    USE phys_output_var_mod, ONLY: type_ecri, zoutm, zdtime_moy, lev_files, &
+                                   nid_files, nhorim, swaero_diag, dryaod_diag, nfiles
     USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat
+    USE aero_mod, ONLY : naero_tot, name_aero_tau
+
     IMPLICIT NONE
 
@@ -466,7 +468,8 @@
 
     INTEGER                          :: iff
+    INTEGER                          :: naero
     LOGICAL                          :: lpoint
     INTEGER, DIMENSION(nfiles)       :: flag_var
-    CHARACTER(LEN=20)                 :: nomvar
+    CHARACTER(LEN=20)                :: nomvar
     CHARACTER(LEN=*)                 :: titrevar
     CHARACTER(LEN=*)                 :: unitvar
@@ -498,19 +501,28 @@
 
     ! Set swaero_diag=true if at least one of the concerned variables are defined 
-    IF (nomvar=='topswad' .OR. nomvar=='topswai' .OR. nomvar=='solswad' .OR. nomvar=='solswai' ) THEN
-       IF  ( flag_var(iff)<=lev_files(iff) ) THEN
-          swaero_diag=.TRUE.
-       END IF
-    END IF
+    IF (nomvar=='topswad' .OR. nomvar=='topswad0' .OR. nomvar=='solswad' .OR. nomvar=='solswad0' .OR. & 
+        nomvar=='toplwad' .OR. nomvar=='toplwad0' .OR. nomvar=='sollwad' .OR. nomvar=='sollwad0' .OR. & 
+        nomvar=='topswai' .OR. nomvar=='solswai' ) THEN 
+       IF  ( flag_var(iff)<=lev_files(iff) ) swaero_diag=.TRUE.
+    ENDIF
+
+    ! Set dryaod_diag=true if at least one of the concerned variables are defined 
+    IF (nomvar=='dryod550aer') THEN
+      IF  ( flag_var(iff)<=lev_files(iff) ) dryaod_diag=.TRUE.
+    ENDIF
+    DO naero = 1, naero_tot-1
+      IF (nomvar=='dryod550_'//name_aero_tau(naero)) THEN
+        IF  ( flag_var(iff)<=lev_files(iff) ) dryaod_diag=.TRUE.
+      ENDIF
+    ENDDO
+
   END SUBROUTINE histdef2d_old
 
-
-
   SUBROUTINE histdef3d_old (iff,lpoint,flag_var,nomvar,titrevar,unitvar)
 
-    USE ioipsl, only: histdef
-    USE dimphy, only: klev
-    USE mod_phys_lmdz_para, only: jj_nb
-    use phys_output_var_mod, only: type_ecri, zoutm, lev_files, nid_files, &
+    USE ioipsl, ONLY: histdef
+    USE dimphy, ONLY: klev
+    USE mod_phys_lmdz_para, ONLY: jj_nb
+    USE phys_output_var_mod, ONLY: type_ecri, zoutm, lev_files, nid_files, &
                                    nhorim, zdtime_moy, levmin, levmax, &
                                    nvertm, nfiles
@@ -555,22 +567,16 @@
   END SUBROUTINE histdef3d_old
 
-
-
-
-
-
-
-
   SUBROUTINE histdef2d (iff,var)
 
-    USE ioipsl, only: histdef
-    USE mod_phys_lmdz_para, only: jj_nb
-    use phys_output_var_mod, only: ctrl_out, type_ecri_files, zoutm, zdtime_moy, &
+    USE ioipsl, ONLY: histdef
+    USE mod_phys_lmdz_para, ONLY: jj_nb
+    USE phys_output_var_mod, ONLY: ctrl_out, type_ecri_files, zoutm, zdtime_moy, &
                                    clef_stations, phys_out_filenames, lev_files, &
-                                   nid_files, nhorim, swaero_diag
+                                   nid_files, nhorim, swaero_diag, dryaod_diag
     USE print_control_mod, ONLY: prt_level,lunout 
     USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat
-#ifdef CPP_XIOS
-    use wxios, only: wxios_add_field_to_file
+    USE aero_mod, ONLY : naero_tot, name_aero_tau
+#ifdef CPP_XIOS
+    USE wxios, ONLY: wxios_add_field_to_file
 #endif
     IMPLICIT NONE
@@ -579,9 +585,9 @@
 
     INTEGER                          :: iff
+    INTEGER                          :: naero
     TYPE(ctrl_out)                   :: var
 
     REAL zstophym
     CHARACTER(LEN=20) :: typeecrit
-
 
     ! ug On récupère le type écrit de la structure:
@@ -638,6 +644,5 @@
     ENDIF
 
-    ! Set swaero_diag=true if at least one of the concerned variables are
-    ! defined
+    ! Set swaero_diag=true if at least one of the concerned variables are defined
     !--OB 30/05/2016 use wider set of variables
     IF ( var%name=='topswad' .OR. var%name=='topswad0' .OR. var%name=='solswad' .OR. var%name=='solswad0' .OR. &
@@ -645,23 +650,32 @@
          var%name=='toplwad' .OR. var%name=='toplwad0' .OR. var%name=='sollwad' .OR. var%name=='sollwad0' .OR. &
          var%name=='toplwai' .OR. var%name=='sollwai'  ) ) ) THEN
-       IF  ( var%flag(iff)<=lev_files(iff) ) THEN
-          swaero_diag=.TRUE.
-       END IF
-    END IF
+       IF  ( var%flag(iff)<=lev_files(iff) ) swaero_diag=.TRUE.
+    ENDIF
+
+    ! set dryaod_dry=true if at least one of the concerned variables are defined
+    IF (var%name=='dryod550aer') THEN 
+      IF  ( var%flag(iff)<=lev_files(iff) ) dryaod_diag=.TRUE.
+    ENDIF
+    !
+    DO naero = 1, naero_tot-1 
+      IF (var%name=='dryod550_'//name_aero_tau(naero)) THEN
+        IF  ( var%flag(iff)<=lev_files(iff) ) dryaod_diag=.TRUE.
+      ENDIF
+    ENDDO
   END SUBROUTINE histdef2d
 
   SUBROUTINE histdef3d (iff,var)
 
-    USE ioipsl, only: histdef
-    USE dimphy, only: klev
-    USE mod_phys_lmdz_para, only: jj_nb
-    use phys_output_var_mod, only: ctrl_out, type_ecri_files, zoutm, zdtime_moy, &
+    USE ioipsl, ONLY: histdef
+    USE dimphy, ONLY: klev
+    USE mod_phys_lmdz_para, ONLY: jj_nb
+    USE phys_output_var_mod, ONLY: ctrl_out, type_ecri_files, zoutm, zdtime_moy, &
                                    clef_stations, phys_out_filenames, lev_files, &
-                                   nid_files, nhorim, swaero_diag, levmin, &
+                                   nid_files, nhorim, swaero_diag, dryaod_diag, levmin, &
                                    levmax, nvertm
     USE print_control_mod, ONLY: prt_level,lunout
     USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat
 #ifdef CPP_XIOS
-    use wxios, only: wxios_add_field_to_file
+    USE wxios, ONLY: wxios_add_field_to_file
 #endif
     IMPLICIT NONE
@@ -735,6 +749,6 @@
 !!! Lecture des noms et niveau de sortie des variables dans output.def
     !   en utilisant les routines getin de IOIPSL  
-    use ioipsl, only: getin
-    use phys_output_var_mod, only: nfiles
+    USE ioipsl, ONLY: getin
+    USE phys_output_var_mod, ONLY: nfiles
     USE print_control_mod, ONLY: prt_level,lunout
     IMPLICIT NONE
@@ -750,20 +764,19 @@
   END SUBROUTINE conf_physoutputs
 
-
  
   SUBROUTINE histwrite2d_phy_old(nid,lpoint,name,itau,field)
-  USE dimphy, only: klon
-  USE mod_phys_lmdz_para, only: Gather_omp, grid1Dto2D_mpi, &
+  USE dimphy, ONLY: klon
+  USE mod_phys_lmdz_para, ONLY: Gather_omp, grid1Dto2D_mpi, &
                                 is_sequential, klon_mpi_begin, klon_mpi_end, &
                                 jj_nb, klon_mpi
-  USE ioipsl, only: histwrite
+  USE ioipsl, ONLY: histwrite
   USE print_control_mod, ONLY: prt_level,lunout
   USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat
   IMPLICIT NONE
     
-    integer,INTENT(IN) :: nid
-    logical,INTENT(IN) :: lpoint 
-    character*(*), INTENT(IN) :: name
-    integer, INTENT(IN) :: itau
+    INTEGER,INTENT(IN) :: nid
+    LOGICAL,INTENT(IN) :: lpoint 
+    CHARACTER*(*), INTENT(IN) :: name
+    INTEGER, INTENT(IN) :: itau
     REAL,DIMENSION(:),INTENT(IN) :: field
     REAL,DIMENSION(klon_mpi) :: buffer_omp
@@ -771,7 +784,6 @@
     REAL :: Field2d(nbp_lon,jj_nb)
 
-    integer :: ip
-    REAL,allocatable,DIMENSION(:) :: fieldok
-
+    INTEGER :: ip
+    REAL,ALLOCATABLE,DIMENSION(:) :: fieldok
 
     IF (size(field)/=klon) CALL abort_physic('iophy::histwrite2d','Field first DIMENSION not equal to klon',1)
@@ -786,9 +798,9 @@
      CALL histwrite(nid,name,itau,Field2d,nbp_lon*jj_nb,index2d)
      IF (prt_level >= 10) write(lunout,*)'Finished sending ',name,' to IOIPSL'
-    else
+    ELSE
      ALLOCATE(fieldok(npstn))
      ALLOCATE(index2d(npstn))
 
-     if(is_sequential) then
+     IF (is_sequential) THEN
 !     klon_mpi_begin=1
 !     klon_mpi_end=klon
@@ -796,5 +808,5 @@
        fieldok(ip)=buffer_omp(nptabij(ip))
       ENDDO
-     else
+     ELSE
       DO ip=1, npstn
 !     print*,'histwrite2d is_sequential npstn ip name nptabij',npstn,ip,name,nptabij(ip)
@@ -804,31 +816,31 @@
        ENDIF
       ENDDO
-     endif
+     ENDIF
      IF (prt_level >= 10) write(lunout,*)'Sending ',name,' to IOIPSL'
      CALL histwrite(nid,name,itau,fieldok,npstn,index2d)
      IF (prt_level >= 10) write(lunout,*)'Finished sending ',name,' to IOIPSL'
 !
-    endif
-    deallocate(index2d)
-    deallocate(fieldok)
+    ENDIF
+    DEALLOCATE(index2d)
+    DEALLOCATE(fieldok)
 !$OMP END MASTER   
 
  
-  end SUBROUTINE histwrite2d_phy_old
+  END SUBROUTINE histwrite2d_phy_old
 
   SUBROUTINE histwrite3d_phy_old(nid,lpoint,name,itau,field)
-  USE dimphy, only: klon
-  USE mod_phys_lmdz_para, only: Gather_omp, grid1Dto2D_mpi, &
+  USE dimphy, ONLY: klon
+  USE mod_phys_lmdz_para, ONLY: Gather_omp, grid1Dto2D_mpi, &
                                 is_sequential, klon_mpi_begin, klon_mpi_end, &
                                 jj_nb, klon_mpi
   USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat
-  use ioipsl, only: histwrite
+  USE ioipsl, ONLY: histwrite
   USE print_control_mod, ONLY: prt_level,lunout
   IMPLICIT NONE
     
-    integer,INTENT(IN) :: nid
-    logical,INTENT(IN) :: lpoint
-    character*(*), INTENT(IN) :: name
-    integer, INTENT(IN) :: itau
+    INTEGER,INTENT(IN) :: nid
+    LOGICAL,INTENT(IN) :: lpoint
+    CHARACTER*(*), INTENT(IN) :: name
+    INTEGER, INTENT(IN) :: itau
     REAL,DIMENSION(:,:),INTENT(IN) :: field  ! --> field(klon,:)
     REAL,DIMENSION(klon_mpi,size(field,2)) :: buffer_omp
@@ -845,5 +857,5 @@
 !$OMP MASTER
     CALL grid1Dto2D_mpi(buffer_omp,field3d)
-    if(.NOT.lpoint) THEN
+    IF (.NOT.lpoint) THEN
      ALLOCATE(index3d(nbp_lon*jj_nb*nlev))
      ALLOCATE(fieldok(nbp_lon*jj_nb,nlev))
@@ -851,10 +863,10 @@
      CALL histwrite(nid,name,itau,Field3d,nbp_lon*jj_nb*nlev,index3d)
      IF (prt_level >= 10) write(lunout,*)'Finished sending ',name,' to IOIPSL'
-   else
+   ELSE
       nlev=size(field,2)
       ALLOCATE(index3d(npstn*nlev))
       ALLOCATE(fieldok(npstn,nlev))
 
-      if(is_sequential) then
+      IF (is_sequential) THEN
 !      klon_mpi_begin=1
 !      klon_mpi_end=klon
@@ -864,5 +876,5 @@
        ENDDO
        ENDDO
-      else
+      ELSE
        DO n=1, nlev
        DO ip=1, npstn
@@ -873,14 +885,14 @@
        ENDDO
        ENDDO
-      endif
+      ENDIF
       IF (prt_level >= 10) write(lunout,*)'Sending ',name,' to IOIPSL'
       CALL histwrite(nid,name,itau,fieldok,npstn*nlev,index3d)
       IF (prt_level >= 10) write(lunout,*)'Finished sending ',name,' to IOIPSL'
-    endif 
-  deallocate(index3d)
-  deallocate(fieldok)
+    ENDIF 
+  DEALLOCATE(index3d)
+  DEALLOCATE(fieldok)
 !$OMP END MASTER    
 
-  end SUBROUTINE histwrite3d_phy_old
+  END SUBROUTINE histwrite3d_phy_old
 
 
@@ -889,10 +901,10 @@
 ! ug NOUVELLE VERSION DES WRITE AVEC LA BOUCLE DO RENTREE
   SUBROUTINE histwrite2d_phy(var,field, STD_iff)
-  USE dimphy, only: klon
-  USE mod_phys_lmdz_para, only: gather_omp, grid1dto2d_mpi, &
+  USE dimphy, ONLY: klon
+  USE mod_phys_lmdz_para, ONLY: gather_omp, grid1dto2d_mpi, &
                                 jj_nb, klon_mpi, klon_mpi_begin, &
                                 klon_mpi_end, is_sequential
-  USE ioipsl, only: histwrite
-  use phys_output_var_mod, only: ctrl_out, clef_files, lev_files, &
+  USE ioipsl, ONLY: histwrite
+  USE phys_output_var_mod, ONLY: ctrl_out, clef_files, lev_files, &
                                  nfiles, vars_defined, clef_stations, &
                                  nid_files
@@ -900,5 +912,5 @@
   USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat
 #ifdef CPP_XIOS
-  USE xios, only: xios_send_field
+  USE xios, ONLY: xios_send_field
 #endif
 
@@ -932,15 +944,14 @@
             iff_beg = 1
             iff_end = nfiles
-      END IF
+      ENDIF
 
   ! On regarde si on est dans la phase de définition ou d'écriture:
-  IF(.NOT.vars_defined) THEN
+  IF (.NOT.vars_defined) THEN
 !$OMP MASTER
       !Si phase de définition.... on définit
       IF (.not. ok_all_xml) THEN
-      if (prt_level >= 10) then
-      write(lunout,*)"histwrite2d_phy: .not.vars_defined ; time to define ", &
-                     trim(var%name)
-      endif
+      IF (prt_level >= 10) THEN
+      WRITE (lunout,*)"histwrite2d_phy: .not.vars_defined ; time to define ", trim(var%name)
+      ENDIF
       DO iff=iff_beg, iff_end
          IF (clef_files(iff)) THEN
@@ -955,8 +966,7 @@
     IF (SIZE(field)/=klon) CALL abort_physic('iophy::histwrite2d_phy','Field first DIMENSION not equal to klon',1)
     
-    if (prt_level >= 10) then
-      write(lunout,*)"histwrite2d_phy: .not.vars_defined ; time to gather and write ", &
-                     trim(var%name)
-    endif
+    IF (prt_level >= 10) THEn
+      WRITE (lunout,*)"histwrite2d_phy: .not.vars_defined ; time to gather and write ", trim(var%name)
+    ENDIF
     
     CALL Gather_omp(field,buffer_omp)
@@ -969,13 +979,11 @@
       IF (ok_all_xml) THEN
 #ifdef CPP_XIOS
-          if (prt_level >= 10) then
-             write(lunout,*)'Dans iophy histwrite2D,var%name ',&
-                             trim(var%name)                       
-          endif
+          IF (prt_level >= 10) THEN
+             write(lunout,*)'Dans iophy histwrite2D,var%name ', trim(var%name)                       
+          ENDIF
           CALL xios_send_field(var%name, Field2d)
-          if (prt_level >= 10) then
-             write(lunout,*)'Dans iophy histwrite2D,var%name apres xios_send ',&
-                             trim(var%name)                       
-          endif
+          IF (prt_level >= 10) THEN
+             WRITE (lunout,*)'Dans iophy histwrite2D,var%name apres xios_send ', trim(var%name)                       
+          ENDIF
 #else
         CALL abort_physic ('iophy','cannot have ok_all_xml = .T. without CPP_XIOS defined' ,1)
@@ -987,9 +995,8 @@
 #ifdef CPP_XIOS
                IF (firstx) THEN
-                  if (prt_level >= 10) then
-                     write(lunout,*)'Dans iophy histwrite2D,iff,var%name ',&
-                                    iff,trim(var%name)                       
-                     write(lunout,*)"histwrite2d_phy:.NOT.clef_stations(iff)and iff==iff_beg, call xios_send_field"
-                  endif
+                  IF (prt_level >= 10) THEN
+                     WRITE (lunout,*)'Dans iophy histwrite2D,iff,var%name ', iff,trim(var%name)                       
+                     WRITE (lunout,*)"histwrite2d_phy:.NOT.clef_stations(iff)and iff==iff_beg, call xios_send_field"
+                  ENDIF
                   CALL xios_send_field(var%name, Field2d)
                   firstx=.false.
@@ -997,5 +1004,5 @@
 #endif
 
-                  IF(.NOT.clef_stations(iff)) THEN
+                  IF (.NOT.clef_stations(iff)) THEN
                         ALLOCATE(index2d(nbp_lon*jj_nb))
                         ALLOCATE(fieldok(nbp_lon*jj_nb))
@@ -1029,13 +1036,13 @@
                        ENDIF ! of IF (is_sequential)
 #ifndef CPP_IOIPSL_NO_OUTPUT 
-                       if (prt_level >= 10) then
+                       IF (prt_level >= 10) THEn
                          write(lunout,*)"histwrite2d_phy: clef_stations(iff) and iff==iff_beg, call wxios_write_2D"
-                       endif
+                       ENDIF
                        CALL histwrite(nid_files(iff),var%name,itau_iophy,fieldok,npstn,index2d)
 #endif
                   ENDIF ! of IF(.NOT.clef_stations(iff))
                   
-                deallocate(index2d)
-                deallocate(fieldok)
+                DEALLOCATE(index2d)
+                DEALLOCATE(fieldok)
             ENDIF !levfiles
         ENDDO ! of DO iff=iff_beg, iff_end
@@ -1049,15 +1056,15 @@
 ! ug NOUVELLE VERSION DES WRITE AVEC LA BOUCLE DO RENTREE
   SUBROUTINE histwrite3d_phy(var, field, STD_iff)
-  USE dimphy, only: klon, klev
-  USE mod_phys_lmdz_para, only: gather_omp, grid1dto2d_mpi, &
+  USE dimphy, ONLY: klon, klev
+  USE mod_phys_lmdz_para, ONLY: gather_omp, grid1dto2d_mpi, &
                                 jj_nb, klon_mpi, klon_mpi_begin, &
                                 klon_mpi_end, is_sequential
-  USE ioipsl, only: histwrite
-  use phys_output_var_mod, only: ctrl_out, clef_files, lev_files, &
+  USE ioipsl, ONLY: histwrite
+  USE phys_output_var_mod, ONLY: ctrl_out, clef_files, lev_files, &
                                  nfiles, vars_defined, clef_stations, &
                                  nid_files
   USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat
 #ifdef CPP_XIOS
-  USE xios, only: xios_send_field
+  USE xios, ONLY: xios_send_field
 #endif
   USE print_control_mod, ONLY: prt_level,lunout
@@ -1088,5 +1095,5 @@
             iff_beg = 1
             iff_end = nfiles
-      END IF
+      ENDIF
 
   ! On regarde si on est dans la phase de définition ou d'écriture:
@@ -1104,9 +1111,9 @@
     IF (SIZE(field,1)/=klon) CALL abort_physic('iophy::histwrite3d','Field first DIMENSION not equal to klon',1)
     nlev=SIZE(field,2)
-    if (nlev.eq.klev+1) then
+    IF (nlev.EQ.klev+1) THEN
         nlevx=klev
-    else
+    ELSE
         nlevx=nlev
-    endif
+    ENDIF
 
     CALL Gather_omp(field,buffer_omp)
@@ -1120,8 +1127,8 @@
       IF (ok_all_xml) THEN
 #ifdef CPP_XIOS
-          if (prt_level >= 10) then
+          IF (prt_level >= 10) THEN
              write(lunout,*)'Dans iophy histwrite3D,var%name ',&
                              trim(var%name)                       
-          endif
+          ENDIF
           CALL xios_send_field(var%name, Field3d(:,:,1:nlevx))
 #else
@@ -1135,11 +1142,11 @@
 #ifdef CPP_XIOS
               IF (firstx) THEN
-                if (prt_level >= 10) then
-                  write(lunout,*)'Dans iophy, histwrite3D iff nlev klev firstx', &
+                IF (prt_level >= 10) THEn
+                  WRITE (lunout,*)'Dans iophy, histwrite3D iff nlev klev firstx', &
                                   iff,nlev,klev, firstx                       
-                  write(lunout,*)'histwrite3d_phy: call xios_send_field for ', &
+                  WRITE (lunout,*)'histwrite3d_phy: call xios_send_field for ', &
                                   trim(var%name), ' with iim jjm nlevx = ', &
                                   nbp_lon,jj_nb,nlevx
-                endif
+                ENDIF
                 CALL xios_send_field(var%name, Field3d(:,:,1:nlevx))
                             firstx=.false.
@@ -1185,6 +1192,6 @@
 #endif
                   ENDIF 
-                  deallocate(index3d)
-                  deallocate(fieldok)
+                  DEALLOCATE(index3d)
+                  DEALLOCATE(fieldok)
             ENDIF
       ENDDO
@@ -1199,10 +1206,10 @@
 #ifdef CPP_XIOS
   SUBROUTINE histwrite2d_xios(field_name,field)
-  USE dimphy, only: klon
-  USE mod_phys_lmdz_para, only: gather_omp, grid1Dto2D_mpi, &
+  USE dimphy, ONLY: klon
+  USE mod_phys_lmdz_para, ONLY: gather_omp, grid1Dto2D_mpi, &
                                 is_sequential, klon_mpi_begin, klon_mpi_end, &
                                 jj_nb, klon_mpi
   USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat
-  USE xios, only: xios_send_field
+  USE xios, ONLY: xios_send_field
   USE print_control_mod, ONLY: prt_level,lunout
 
@@ -1259,6 +1266,6 @@
     ENDIF
                   
-    deallocate(index2d)
-    deallocate(fieldok)
+    DEALLOCATE(index2d)
+    DEALLOCATE(fieldok)
 !$OMP END MASTER   
 
@@ -1269,9 +1276,9 @@
 ! ug NOUVELLE VERSION DES WRITE AVEC LA BOUCLE DO RENTREE
   SUBROUTINE histwrite3d_xios(field_name, field)
-  USE dimphy, only: klon, klev
-  USE mod_phys_lmdz_para, only: gather_omp, grid1Dto2D_mpi, &
+  USE dimphy, ONLY: klon, klev
+  USE mod_phys_lmdz_para, ONLY: gather_omp, grid1Dto2D_mpi, &
                                 is_sequential, klon_mpi_begin, klon_mpi_end, &
                                 jj_nb, klon_mpi
-  USE xios, only: xios_send_field
+  USE xios, ONLY: xios_send_field
   USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat
   USE print_control_mod, ONLY: prt_level,lunout
@@ -1330,6 +1337,6 @@
         ENDIF
     ENDIF 
-    deallocate(index3d)
-    deallocate(fieldok)
+    DEALLOCATE(index3d)
+    DEALLOCATE(fieldok)
 !$OMP END MASTER   
 
@@ -1339,5 +1346,5 @@
 #ifdef CPP_XIOS
   SUBROUTINE histwrite0d_xios(field_name, field)
-  USE xios, only: xios_send_field
+  USE xios, ONLY: xios_send_field
   IMPLICIT NONE
 
Index: /LMDZ5/branches/testing/libf/phylmd/pbl_surface_mod.F90
===================================================================
--- /LMDZ5/branches/testing/libf/phylmd/pbl_surface_mod.F90	(revision 2869)
+++ /LMDZ5/branches/testing/libf/phylmd/pbl_surface_mod.F90	(revision 2870)
@@ -6,5 +6,5 @@
 ! Planetary Boundary Layer and Surface module
 !
-! This module manage the calculation of turbulent diffusion in the boundary layer 
+! This module manages the calculation of turbulent diffusion in the boundary layer 
 ! and all interactions towards the differents sub-surfaces.
 !
@@ -778,5 +778,6 @@
       IF (prt_level >=10) print *,' -> pbl_surface, itap ',itap
 !
-      iflag_split = mod(iflag_pbl_split,2)
+!!jyg      iflag_split = mod(iflag_pbl_split,2)
+      iflag_split = mod(iflag_pbl_split,10)
 
 !****************************************************************************************
@@ -1239,5 +1240,5 @@
         ENDDO
 !
-       IF (iflag_split .eq.1) THEN
+       IF (iflag_split .ge.1) THEN
 !!! nrlmd le 02/05/2011
         DO k = 1, klev
@@ -1287,5 +1288,5 @@
         ENDDO
 !!!
-       ENDIF  ! (iflag_split .eq.1)
+       ENDIF  ! (iflag_split .ge.1)
 !!!
        DO k = 1, nsoilmx
@@ -2047,5 +2048,5 @@
          print*,'effusivity,facteur,cstar', effusivity, facteur,wake_cstar(j)
         ENDDO
-       ENDIF
+       ENDIF  ! (prt_level >=10)
 
 !!! jyg le 07/02/2012
@@ -2282,5 +2283,5 @@
 
 !!! jyg le 07/02/2012
-       IF (iflag_split .eq.1) THEN
+       IF (iflag_split .ge.1) THEN
 !!!
 !!! nrlmd le 02/05/2011
@@ -2302,5 +2303,5 @@
         END DO
 !!!      
-       ENDIF  ! (iflag_split .eq.1)
+       ENDIF  ! (iflag_split .ge.1)
 !!!
 !!! nrlmd le 02/05/2011
@@ -2337,5 +2338,5 @@
         END DO
 
-       ELSE
+       ELSE  ! (iflag_split .eq.0)
         DO k = 1, klev
           DO j = 1, knon
@@ -2384,5 +2385,5 @@
        
 !!! jyg le 07/02/2012
-       IF (iflag_split .eq.1) THEN
+       IF (iflag_split .ge.1) THEN
 !!!
 !!! nrlmd+jyg le 02/05/2011 et le 20/02/2012
@@ -2407,5 +2408,5 @@
         END DO
 !!!
-       ENDIF  ! (iflag_split .eq.1)
+       ENDIF  ! (iflag_split .ge.1)
 !!!
        
@@ -2752,5 +2753,5 @@
 
 !!! jyg le 07/02/2012
-       IF (iflag_split .eq.1) THEN
+       IF (iflag_split .ge.1) THEN
 !!!
 !!! nrlmd & jyg les 02/05/2011, 05/02/2012
@@ -2777,5 +2778,5 @@
     END DO
 !!!
-       ENDIF  ! (iflag_split .eq.1)
+       ENDIF  ! (iflag_split .ge.1)
 !!!
 
Index: /LMDZ5/branches/testing/libf/phylmd/phys_local_var_mod.F90
===================================================================
--- /LMDZ5/branches/testing/libf/phylmd/phys_local_var_mod.F90	(revision 2869)
+++ /LMDZ5/branches/testing/libf/phylmd/phys_local_var_mod.F90	(revision 2870)
@@ -141,4 +141,6 @@
       REAL, SAVE, ALLOCATABLE :: tausum_aero(:,:,:) 
       !$OMP THREADPRIVATE(tausum_aero) 
+      REAL, SAVE, ALLOCATABLE :: drytausum_aero(:,:) 
+      !$OMP THREADPRIVATE(drytausum_aero) 
       REAL, SAVE, ALLOCATABLE :: tau3d_aero(:,:,:,:) 
       !$OMP THREADPRIVATE(tau3d_aero) 
@@ -167,4 +169,6 @@
       REAL, SAVE, ALLOCATABLE :: od550aer(:) 
       !$OMP THREADPRIVATE(od550aer) 
+      REAL, SAVE, ALLOCATABLE :: dryod550aer(:) 
+      !$OMP THREADPRIVATE(dryod550aer) 
       REAL, SAVE, ALLOCATABLE :: abs550aer(:) 
       !$OMP THREADPRIVATE(abs550aer) 
@@ -251,5 +255,7 @@
       REAL,ALLOCATABLE,SAVE,DIMENSION(:)            :: ale_wake, alp_wake
 !$OMP THREADPRIVATE(ale_wake, alp_wake)           
-      REAL,ALLOCATABLE,SAVE,DIMENSION(:)            :: wake_h,wake_k
+!!jyg!      REAL,ALLOCATABLE,SAVE,DIMENSION(:)            :: wake_h,wake_k
+      REAL,ALLOCATABLE,SAVE,DIMENSION(:)            :: wake_h
+      INTEGER,ALLOCATABLE,SAVE,DIMENSION(:)         :: wake_k
 !$OMP THREADPRIVATE(wake_h,wake_k)                       
     REAL,ALLOCATABLE,SAVE,DIMENSION(:,:)            :: wake_omg
@@ -498,109 +504,106 @@
 
 IMPLICIT NONE
-      allocate(t_seri(klon,klev),q_seri(klon,klev),ql_seri(klon,klev),qs_seri(klon,klev))
-      allocate(u_seri(klon,klev),v_seri(klon,klev))
-      allocate(l_mixmin(klon,klev,nbsrf), l_mix(klon,klev,nbsrf))
+      ALLOCATE(t_seri(klon,klev),q_seri(klon,klev),ql_seri(klon,klev),qs_seri(klon,klev))
+      ALLOCATE(u_seri(klon,klev),v_seri(klon,klev))
+      ALLOCATE(l_mixmin(klon,klev,nbsrf), l_mix(klon,klev,nbsrf))
       l_mix(:,:,:)=0. ; l_mixmin(:,:,:)=0. ! doit etre initialse car pas toujours remplis
 
-      allocate(tr_seri(klon,klev,nbtr))
-      allocate(d_t_dyn(klon,klev),d_q_dyn(klon,klev))
-      allocate(d_ql_dyn(klon,klev),d_qs_dyn(klon,klev))
-      allocate(d_q_dyn2d(klon),d_ql_dyn2d(klon),d_qs_dyn2d(klon))
-      allocate(d_u_dyn(klon,klev),d_v_dyn(klon,klev))
-      allocate(d_tr_dyn(klon,klev,nbtr))                   !RomP
-      allocate(d_t_con(klon,klev),d_q_con(klon,klev))
-      allocate(d_u_con(klon,klev),d_v_con(klon,klev))
-      allocate(d_t_wake(klon,klev),d_q_wake(klon,klev))
-      allocate(d_t_lsc(klon,klev),d_q_lsc(klon,klev))
-      allocate(d_t_lwr(klon,klev),d_t_lw0(klon,klev))
-      allocate(d_t_swr(klon,klev),d_t_sw0(klon,klev))
-      allocate(d_ql_lsc(klon,klev),d_qi_lsc(klon,klev))
-      allocate(d_t_ajsb(klon,klev),d_q_ajsb(klon,klev))
-      allocate(d_t_ajs(klon,klev),d_q_ajs(klon,klev))
+      ALLOCATE(tr_seri(klon,klev,nbtr))
+      ALLOCATE(d_t_dyn(klon,klev),d_q_dyn(klon,klev))
+      ALLOCATE(d_ql_dyn(klon,klev),d_qs_dyn(klon,klev))
+      ALLOCATE(d_q_dyn2d(klon),d_ql_dyn2d(klon),d_qs_dyn2d(klon))
+      ALLOCATE(d_u_dyn(klon,klev),d_v_dyn(klon,klev))
+      ALLOCATE(d_tr_dyn(klon,klev,nbtr))                   !RomP
+      ALLOCATE(d_t_con(klon,klev),d_q_con(klon,klev))
+      ALLOCATE(d_u_con(klon,klev),d_v_con(klon,klev))
+      ALLOCATE(d_t_wake(klon,klev),d_q_wake(klon,klev))
+      ALLOCATE(d_t_lsc(klon,klev),d_q_lsc(klon,klev))
+      ALLOCATE(d_t_lwr(klon,klev),d_t_lw0(klon,klev))
+      ALLOCATE(d_t_swr(klon,klev),d_t_sw0(klon,klev))
+      ALLOCATE(d_ql_lsc(klon,klev),d_qi_lsc(klon,klev))
+      ALLOCATE(d_t_ajsb(klon,klev),d_q_ajsb(klon,klev))
+      ALLOCATE(d_t_ajs(klon,klev),d_q_ajs(klon,klev))
 !nrlmd<
-      allocate(d_t_ajs_w(klon,klev),d_q_ajs_w(klon,klev))
-      allocate(d_t_ajs_x(klon,klev),d_q_ajs_x(klon,klev))
+      ALLOCATE(d_t_ajs_w(klon,klev),d_q_ajs_w(klon,klev))
+      ALLOCATE(d_t_ajs_x(klon,klev),d_q_ajs_x(klon,klev))
 !>nrlmd
-      allocate(d_u_ajs(klon,klev),d_v_ajs(klon,klev))
-      allocate(d_t_eva(klon,klev),d_q_eva(klon,klev))
-      allocate(d_ql_eva(klon,klev),d_qi_eva(klon,klev))
-      allocate(d_t_lscst(klon,klev),d_q_lscst(klon,klev))
-      allocate(d_t_lscth(klon,klev),d_q_lscth(klon,klev))
-      allocate(plul_st(klon),plul_th(klon))
-      allocate(d_t_vdf(klon,klev),d_q_vdf(klon,klev),d_t_diss(klon,klev))
+      ALLOCATE(d_u_ajs(klon,klev),d_v_ajs(klon,klev))
+      ALLOCATE(d_t_eva(klon,klev),d_q_eva(klon,klev))
+      ALLOCATE(d_ql_eva(klon,klev),d_qi_eva(klon,klev))
+      ALLOCATE(d_t_lscst(klon,klev),d_q_lscst(klon,klev))
+      ALLOCATE(d_t_lscth(klon,klev),d_q_lscth(klon,klev))
+      ALLOCATE(plul_st(klon),plul_th(klon))
+      ALLOCATE(d_t_vdf(klon,klev),d_q_vdf(klon,klev),d_t_diss(klon,klev))
 !nrlmd+jyg<
-      allocate(d_t_vdf_w(klon,klev),d_q_vdf_w(klon,klev))
-      allocate(d_t_vdf_x(klon,klev),d_q_vdf_x(klon,klev))
+      ALLOCATE(d_t_vdf_w(klon,klev),d_q_vdf_w(klon,klev))
+      ALLOCATE(d_t_vdf_x(klon,klev),d_q_vdf_x(klon,klev))
 !>nrlmd+jyg
-      allocate(d_u_vdf(klon,klev),d_v_vdf(klon,klev))
-      allocate(d_t_oli(klon,klev),d_t_oro(klon,klev))
-      allocate(d_u_oli(klon,klev),d_v_oli(klon,klev))
-      allocate(d_u_oro(klon,klev),d_v_oro(klon,klev))
-      allocate(d_t_lif(klon,klev),d_t_ec(klon,klev))
-      allocate(d_u_lif(klon,klev),d_v_lif(klon,klev))
-      allocate(d_ts(klon,nbsrf), d_tr(klon,klev,nbtr))
+      ALLOCATE(d_u_vdf(klon,klev),d_v_vdf(klon,klev))
+      ALLOCATE(d_t_oli(klon,klev),d_t_oro(klon,klev))
+      ALLOCATE(d_u_oli(klon,klev),d_v_oli(klon,klev))
+      ALLOCATE(d_u_oro(klon,klev),d_v_oro(klon,klev))
+      ALLOCATE(d_t_lif(klon,klev),d_t_ec(klon,klev))
+      ALLOCATE(d_u_lif(klon,klev),d_v_lif(klon,klev))
+      ALLOCATE(d_ts(klon,nbsrf), d_tr(klon,klev,nbtr))
 ! Special RRTM
-      allocate(ZLWFT0_i(klon,klev+1),ZSWFT0_i(klon,klev+1),ZFLDN0(klon,klev+1))
-      allocate(ZFLUP0(klon,klev+1),ZFSDN0(klon,klev+1),ZFSUP0(klon,klev+1))
-!
-      allocate(topswad_aero(klon), solswad_aero(klon))
-      allocate(topswai_aero(klon), solswai_aero(klon))
-      allocate(topswad0_aero(klon), solswad0_aero(klon))
-     ! LW diagnostics CK
-      allocate(toplwad_aero(klon), sollwad_aero(klon))
-      allocate(toplwai_aero(klon), sollwai_aero(klon))
-      allocate(toplwad0_aero(klon), sollwad0_aero(klon))
-      ! end
-      allocate(topsw_aero(klon,naero_grp), solsw_aero(klon,naero_grp))
-      allocate(topsw0_aero(klon,naero_grp), solsw0_aero(klon,naero_grp))
-      allocate(topswcf_aero(klon,3), solswcf_aero(klon,3))
-      allocate(du_gwd_hines(klon,klev),dv_gwd_hines(klon,klev))
-      allocate(dv_gwd_rando(klon,klev),dv_gwd_front(klon,klev))
-      allocate(east_gwstress(klon,klev),west_gwstress(klon,klev))
-      allocate(d_t_hin(klon,klev))
-      allocate(d_q_ch4(klon,klev))
-!      allocate(tausum_aero(klon,nwave,naero_spc))
-!      allocate(tau3d_aero(klon,klev,nwave,naero_spc)) 
-      allocate(stratomask(klon,klev))
-!--correction mini bug OB
-      allocate(tausum_aero(klon,nwave,naero_tot))
-      allocate(tau3d_aero(klon,klev,nwave,naero_tot)) 
-      allocate(scdnc(klon, klev))
-      allocate(cldncl(klon))
-      allocate(reffclwtop(klon))
-      allocate(lcc(klon))
-      allocate(reffclws(klon, klev))
-      allocate(reffclwc(klon, klev))
-      allocate(cldnvi(klon))
-      allocate(lcc3d(klon, klev))
-      allocate(lcc3dcon(klon, klev))
-      allocate(lcc3dstra(klon, klev))
-      allocate(od443aer(klon))
-      allocate(od550aer(klon))
-      allocate(od865aer(klon))
-      allocate(abs550aer(klon))
-      allocate(ec550aer(klon,klev))
-      allocate(od550lt1aer(klon))
-      allocate(sconcso4(klon))
-      allocate(sconcno3(klon))
-      allocate(sconcoa(klon))
-      allocate(sconcbc(klon))
-      allocate(sconcss(klon))
-      allocate(sconcdust(klon))
-      allocate(concso4(klon,klev))
-      allocate(concno3(klon,klev))
-      allocate(concoa(klon,klev))
-      allocate(concbc(klon,klev))
-      allocate(concss(klon,klev))
-      allocate(concdust(klon,klev))
-      allocate(loadso4(klon))
-      allocate(loadoa(klon))
-      allocate(loadbc(klon))
-      allocate(loadss(klon))
-      allocate(loaddust(klon))
-      allocate(loadno3(klon))
-      allocate(load_tmp1(klon))
-      allocate(load_tmp2(klon))
-      allocate(load_tmp3(klon))
+      ALLOCATE(ZLWFT0_i(klon,klev+1),ZSWFT0_i(klon,klev+1),ZFLDN0(klon,klev+1))
+      ALLOCATE(ZFLUP0(klon,klev+1),ZFSDN0(klon,klev+1),ZFSUP0(klon,klev+1))
+!
+      ALLOCATE(topswad_aero(klon), solswad_aero(klon))
+      ALLOCATE(topswai_aero(klon), solswai_aero(klon))
+      ALLOCATE(topswad0_aero(klon), solswad0_aero(klon))
+      ALLOCATE(toplwad_aero(klon), sollwad_aero(klon))
+      ALLOCATE(toplwai_aero(klon), sollwai_aero(klon))
+      ALLOCATE(toplwad0_aero(klon), sollwad0_aero(klon))
+      ALLOCATE(topsw_aero(klon,naero_grp), solsw_aero(klon,naero_grp))
+      ALLOCATE(topsw0_aero(klon,naero_grp), solsw0_aero(klon,naero_grp))
+      ALLOCATE(topswcf_aero(klon,3), solswcf_aero(klon,3))
+      ALLOCATE(du_gwd_hines(klon,klev),dv_gwd_hines(klon,klev))
+      ALLOCATE(dv_gwd_rando(klon,klev),dv_gwd_front(klon,klev))
+      ALLOCATE(east_gwstress(klon,klev),west_gwstress(klon,klev))
+      ALLOCATE(d_t_hin(klon,klev))
+      ALLOCATE(d_q_ch4(klon,klev))
+      ALLOCATE(stratomask(klon,klev))
+      ALLOCATE(tausum_aero(klon,nwave,naero_tot))
+      ALLOCATE(drytausum_aero(klon,naero_tot))
+      ALLOCATE(tau3d_aero(klon,klev,nwave,naero_tot)) 
+      ALLOCATE(scdnc(klon, klev))
+      ALLOCATE(cldncl(klon))
+      ALLOCATE(reffclwtop(klon))
+      ALLOCATE(lcc(klon))
+      ALLOCATE(reffclws(klon, klev))
+      ALLOCATE(reffclwc(klon, klev))
+      ALLOCATE(cldnvi(klon))
+      ALLOCATE(lcc3d(klon, klev))
+      ALLOCATE(lcc3dcon(klon, klev))
+      ALLOCATE(lcc3dstra(klon, klev))
+      ALLOCATE(od443aer(klon))
+      ALLOCATE(od550aer(klon))
+      ALLOCATE(od865aer(klon))
+      ALLOCATE(dryod550aer(klon))
+      ALLOCATE(abs550aer(klon))
+      ALLOCATE(ec550aer(klon,klev))
+      ALLOCATE(od550lt1aer(klon))
+      ALLOCATE(sconcso4(klon))
+      ALLOCATE(sconcno3(klon))
+      ALLOCATE(sconcoa(klon))
+      ALLOCATE(sconcbc(klon))
+      ALLOCATE(sconcss(klon))
+      ALLOCATE(sconcdust(klon))
+      ALLOCATE(concso4(klon,klev))
+      ALLOCATE(concno3(klon,klev))
+      ALLOCATE(concoa(klon,klev))
+      ALLOCATE(concbc(klon,klev))
+      ALLOCATE(concss(klon,klev))
+      ALLOCATE(concdust(klon,klev))
+      ALLOCATE(loadso4(klon))
+      ALLOCATE(loadoa(klon))
+      ALLOCATE(loadbc(klon))
+      ALLOCATE(loadss(klon))
+      ALLOCATE(loaddust(klon))
+      ALLOCATE(loadno3(klon))
+      ALLOCATE(load_tmp1(klon))
+      ALLOCATE(load_tmp2(klon))
+      ALLOCATE(load_tmp3(klon))
 
 !IM ajout variables CFMIP2/CMIP5
@@ -770,113 +773,113 @@
 USE indice_sol_mod
 IMPLICIT NONE
-      deallocate(t_seri,q_seri,ql_seri,qs_seri)
-      deallocate(u_seri,v_seri)
-      deallocate(l_mixmin,l_mix)
-
-      deallocate(tr_seri)
-      deallocate(d_t_dyn,d_q_dyn)
-      deallocate(d_ql_dyn,d_qs_dyn)
-      deallocate(d_q_dyn2d,d_ql_dyn2d,d_qs_dyn2d)
-      deallocate(d_u_dyn,d_v_dyn)
-      deallocate(d_tr_dyn)                      !RomP
-      deallocate(d_t_con,d_q_con)
-      deallocate(d_u_con,d_v_con)
-      deallocate(d_t_wake,d_q_wake)
-      deallocate(d_t_lsc,d_q_lsc)
-      deallocate(d_t_lwr,d_t_lw0)
-      deallocate(d_t_swr,d_t_sw0)
-      deallocate(d_ql_lsc,d_qi_lsc)
-      deallocate(d_t_ajsb,d_q_ajsb)
-      deallocate(d_t_ajs,d_q_ajs)
+      DEALLOCATE(t_seri,q_seri,ql_seri,qs_seri)
+      DEALLOCATE(u_seri,v_seri)
+      DEALLOCATE(l_mixmin,l_mix)
+
+      DEALLOCATE(tr_seri)
+      DEALLOCATE(d_t_dyn,d_q_dyn)
+      DEALLOCATE(d_ql_dyn,d_qs_dyn)
+      DEALLOCATE(d_q_dyn2d,d_ql_dyn2d,d_qs_dyn2d)
+      DEALLOCATE(d_u_dyn,d_v_dyn)
+      DEALLOCATE(d_tr_dyn)                      !RomP
+      DEALLOCATE(d_t_con,d_q_con)
+      DEALLOCATE(d_u_con,d_v_con)
+      DEALLOCATE(d_t_wake,d_q_wake)
+      DEALLOCATE(d_t_lsc,d_q_lsc)
+      DEALLOCATE(d_t_lwr,d_t_lw0)
+      DEALLOCATE(d_t_swr,d_t_sw0)
+      DEALLOCATE(d_ql_lsc,d_qi_lsc)
+      DEALLOCATE(d_t_ajsb,d_q_ajsb)
+      DEALLOCATE(d_t_ajs,d_q_ajs)
 !nrlmd<
-      deallocate(d_t_ajs_w,d_q_ajs_w)
-      deallocate(d_t_ajs_x,d_q_ajs_x)
+      DEALLOCATE(d_t_ajs_w,d_q_ajs_w)
+      DEALLOCATE(d_t_ajs_x,d_q_ajs_x)
 !>nrlmd
-      deallocate(d_u_ajs,d_v_ajs)
-      deallocate(d_t_eva,d_q_eva)
-      deallocate(d_ql_eva,d_qi_eva)
-      deallocate(d_t_lscst,d_q_lscst)
-      deallocate(d_t_lscth,d_q_lscth)
-      deallocate(plul_st,plul_th)
-      deallocate(d_t_vdf,d_q_vdf,d_t_diss)
+      DEALLOCATE(d_u_ajs,d_v_ajs)
+      DEALLOCATE(d_t_eva,d_q_eva)
+      DEALLOCATE(d_ql_eva,d_qi_eva)
+      DEALLOCATE(d_t_lscst,d_q_lscst)
+      DEALLOCATE(d_t_lscth,d_q_lscth)
+      DEALLOCATE(plul_st,plul_th)
+      DEALLOCATE(d_t_vdf,d_q_vdf,d_t_diss)
 !nrlmd+jyg<
-      deallocate(d_t_vdf_w,d_q_vdf_w)
-      deallocate(d_t_vdf_x,d_q_vdf_x)
+      DEALLOCATE(d_t_vdf_w,d_q_vdf_w)
+      DEALLOCATE(d_t_vdf_x,d_q_vdf_x)
 !>nrlmd+jyg
-      deallocate(d_u_vdf,d_v_vdf)
-      deallocate(d_t_oli,d_t_oro)
-      deallocate(d_u_oli,d_v_oli)
-      deallocate(d_u_oro,d_v_oro)
-      deallocate(d_t_lif,d_t_ec)
-      deallocate(d_u_lif,d_v_lif)
-      deallocate(d_ts, d_tr)
-      deallocate(topswad_aero,solswad_aero)
-      deallocate(topswai_aero,solswai_aero)
-      deallocate(topswad0_aero,solswad0_aero)
-      ! LW additional CK
-      deallocate(toplwad_aero,sollwad_aero)
-      deallocate(toplwai_aero,sollwai_aero)
-      deallocate(toplwad0_aero,sollwad0_aero)
-      ! end
-      deallocate(topsw_aero,solsw_aero)
-      deallocate(topsw0_aero,solsw0_aero)
-      deallocate(topswcf_aero,solswcf_aero)
-      deallocate(stratomask) 
-      deallocate(tausum_aero) 
-      deallocate(tau3d_aero) 
-      deallocate(scdnc)
-      deallocate(cldncl)
-      deallocate(reffclwtop)
-      deallocate(lcc)
-      deallocate(reffclws)
-      deallocate(reffclwc)
-      deallocate(cldnvi)
-      deallocate(lcc3d)
-      deallocate(lcc3dcon)
-      deallocate(lcc3dstra)
-      deallocate(od443aer)
-      deallocate(od550aer)
-      deallocate(od865aer)
-      deallocate(abs550aer)
-      deallocate(ec550aer)
-      deallocate(od550lt1aer)
-      deallocate(sconcso4) 
-      deallocate(sconcno3) 
-      deallocate(sconcoa) 
-      deallocate(sconcbc) 
-      deallocate(sconcss) 
-      deallocate(sconcdust) 
-      deallocate(concso4) 
-      deallocate(concno3) 
-      deallocate(concoa) 
-      deallocate(concbc) 
-      deallocate(concss) 
-      deallocate(concdust) 
-      deallocate(loadso4) 
-      deallocate(loadoa) 
-      deallocate(loadbc) 
-      deallocate(loadss) 
-      deallocate(loaddust) 
-      deallocate(loadno3) 
-      deallocate(load_tmp1)
-      deallocate(load_tmp2)
-      deallocate(load_tmp3)
-      deallocate(du_gwd_hines,dv_gwd_hines,d_t_hin)
-      deallocate(d_q_ch4)
-      deallocate(dv_gwd_rando,dv_gwd_front)
-      deallocate(east_gwstress,west_gwstress)
+      DEALLOCATE(d_u_vdf,d_v_vdf)
+      DEALLOCATE(d_t_oli,d_t_oro)
+      DEALLOCATE(d_u_oli,d_v_oli)
+      DEALLOCATE(d_u_oro,d_v_oro)
+      DEALLOCATE(d_t_lif,d_t_ec)
+      DEALLOCATE(d_u_lif,d_v_lif)
+      DEALLOCATE(d_ts, d_tr)
+      DEALLOCATE(topswad_aero,solswad_aero)
+      DEALLOCATE(topswai_aero,solswai_aero)
+      DEALLOCATE(topswad0_aero,solswad0_aero)
+      DEALLOCATE(toplwad_aero,sollwad_aero)
+      DEALLOCATE(toplwai_aero,sollwai_aero)
+      DEALLOCATE(toplwad0_aero,sollwad0_aero)
+      DEALLOCATE(topsw_aero,solsw_aero)
+      DEALLOCATE(topsw0_aero,solsw0_aero)
+      DEALLOCATE(topswcf_aero,solswcf_aero)
+      DEALLOCATE(stratomask) 
+      DEALLOCATE(tausum_aero) 
+      DEALLOCATE(drytausum_aero) 
+      DEALLOCATE(tau3d_aero) 
+      DEALLOCATE(scdnc)
+      DEALLOCATE(cldncl)
+      DEALLOCATE(reffclwtop)
+      DEALLOCATE(lcc)
+      DEALLOCATE(reffclws)
+      DEALLOCATE(reffclwc)
+      DEALLOCATE(cldnvi)
+      DEALLOCATE(lcc3d)
+      DEALLOCATE(lcc3dcon)
+      DEALLOCATE(lcc3dstra)
+      DEALLOCATE(od443aer)
+      DEALLOCATE(od550aer)
+      DEALLOCATE(od865aer)
+      DEALLOCATE(dryod550aer)
+      DEALLOCATE(abs550aer)
+      DEALLOCATE(ec550aer)
+      DEALLOCATE(od550lt1aer)
+      DEALLOCATE(sconcso4) 
+      DEALLOCATE(sconcno3) 
+      DEALLOCATE(sconcoa) 
+      DEALLOCATE(sconcbc) 
+      DEALLOCATE(sconcss) 
+      DEALLOCATE(sconcdust) 
+      DEALLOCATE(concso4) 
+      DEALLOCATE(concno3) 
+      DEALLOCATE(concoa) 
+      DEALLOCATE(concbc) 
+      DEALLOCATE(concss) 
+      DEALLOCATE(concdust) 
+      DEALLOCATE(loadso4) 
+      DEALLOCATE(loadoa) 
+      DEALLOCATE(loadbc) 
+      DEALLOCATE(loadss) 
+      DEALLOCATE(loaddust) 
+      DEALLOCATE(loadno3) 
+      DEALLOCATE(load_tmp1)
+      DEALLOCATE(load_tmp2)
+      DEALLOCATE(load_tmp3)
+      DEALLOCATE(du_gwd_hines,dv_gwd_hines,d_t_hin)
+      DEALLOCATE(d_q_ch4)
+      DEALLOCATE(dv_gwd_rando,dv_gwd_front)
+      DEALLOCATE(east_gwstress,west_gwstress)
 
 !IM ajout variables CFMIP2/CMIP5
-      deallocate(topswad_aerop, solswad_aerop)
-      deallocate(topswai_aerop, solswai_aerop)
-      deallocate(topswad0_aerop, solswad0_aerop)
-      deallocate(topsw_aerop, topsw0_aerop)
-      deallocate(solsw_aerop, solsw0_aerop)
-      deallocate(topswcf_aerop, solswcf_aerop)
+      DEALLOCATE(topswad_aerop, solswad_aerop)
+      DEALLOCATE(topswai_aerop, solswai_aerop)
+      DEALLOCATE(topswad0_aerop, solswad0_aerop)
+      DEALLOCATE(topsw_aerop, topsw0_aerop)
+      DEALLOCATE(solsw_aerop, solsw0_aerop)
+      DEALLOCATE(topswcf_aerop, solswcf_aerop)
 
 !CK LW diagnostics
-      deallocate(toplwad_aerop, sollwad_aerop)
-      deallocate(toplwai_aerop, sollwai_aerop)
-      deallocate(toplwad0_aerop, sollwad0_aerop)
+      DEALLOCATE(toplwad_aerop, sollwad_aerop)
+      DEALLOCATE(toplwai_aerop, sollwai_aerop)
+      DEALLOCATE(toplwad0_aerop, sollwad0_aerop)
 
 ! FH Ajout de celles nÃ©cessaires au phys_output_write_mod
Index: /LMDZ5/branches/testing/libf/phylmd/phys_output_ctrlout_mod.F90
===================================================================
--- /LMDZ5/branches/testing/libf/phylmd/phys_output_ctrlout_mod.F90	(revision 2869)
+++ /LMDZ5/branches/testing/libf/phylmd/phys_output_ctrlout_mod.F90	(revision 2870)
@@ -1060,37 +1060,64 @@
     'sollwai', 'LW-AIE at SFR', 'W/m2', (/ ('', i=1, 10) /))
 
-
   TYPE(ctrl_out),SAVE,DIMENSION(naero_tot) :: o_tausumaero =                              &
-       (/ ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/),'OD550_'//name_aero_tau(1),     &
+       (/ ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/),'od550_'//name_aero_tau(1),     &
        "Aerosol Optical depth at 550 nm "//name_aero_tau(1),"1", (/ ('', i=1, 10) /)),     &
-       ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/),'OD550_'//name_aero_tau(2),        &
+       ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/),'od550_'//name_aero_tau(2),        &
        "Aerosol Optical depth at 550 nm "//name_aero_tau(2),"2", (/ ('', i=1, 10) /)),     &
-       ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/),'OD550_'//name_aero_tau(3),        &
+       ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/),'od550_'//name_aero_tau(3),        &
        "Aerosol Optical depth at 550 nm "//name_aero_tau(3),"3", (/ ('', i=1, 10) /)),     &
-       ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/),'OD550_'//name_aero_tau(4),        &
+       ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/),'od550_'//name_aero_tau(4),        &
        "Aerosol Optical depth at 550 nm "//name_aero_tau(4),"4", (/ ('', i=1, 10) /)),     &
-       ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/),'OD550_'//name_aero_tau(5),        &
+       ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/),'od550_'//name_aero_tau(5),        &
        "Aerosol Optical depth at 550 nm "//name_aero_tau(5),"5", (/ ('', i=1, 10) /)),     &
-       ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/),'OD550_'//name_aero_tau(6),        &
+       ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/),'od550_'//name_aero_tau(6),        &
        "Aerosol Optical depth at 550 nm "//name_aero_tau(6),"6", (/ ('', i=1, 10) /)),     &
-       ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/),'OD550_'//name_aero_tau(7),        &
+       ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/),'od550_'//name_aero_tau(7),        &
        "Aerosol Optical depth at 550 nm "//name_aero_tau(7),"7", (/ ('', i=1, 10) /)),     &
-       ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/),'OD550_'//name_aero_tau(8),        &
+       ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/),'od550_'//name_aero_tau(8),        &
        "Aerosol Optical depth at 550 nm "//name_aero_tau(8),"8", (/ ('', i=1, 10) /)),     &
-       ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/),'OD550_'//name_aero_tau(9),        &
+       ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/),'od550_'//name_aero_tau(9),        &
        "Aerosol Optical depth at 550 nm "//name_aero_tau(9),"9", (/ ('', i=1, 10) /)),     &
-       ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/),'OD550_'//name_aero_tau(10),       &
+       ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/),'od550_'//name_aero_tau(10),       &
        "Aerosol Optical depth at 550 nm "//name_aero_tau(10),"10", (/ ('', i=1, 10) /)),   &
-       ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/),'OD550_'//name_aero_tau(11),       &
+       ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/),'od550_'//name_aero_tau(11),       &
        "Aerosol Optical depth at 550 nm "//name_aero_tau(11),"11", (/ ('', i=1, 10) /)),   &
-       ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/),'OD550_'//name_aero_tau(12),       &
+       ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/),'od550_'//name_aero_tau(12),       &
        "Aerosol Optical depth at 550 nm "//name_aero_tau(12),"12", (/ ('', i=1, 10) /)),   &
-       ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/),'OD550_'//name_aero_tau(13),       &
+       ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/),'od550_'//name_aero_tau(13),       &
        "Aerosol Optical depth at 550 nm "//name_aero_tau(13),"13", (/ ('', i=1, 10) /)),   &
-       ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/),'OD550_'//name_aero_tau(14),       &
+       ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/),'od550_'//name_aero_tau(14),       &
        "Aerosol Optical depth at 550 nm "//name_aero_tau(14),"14", (/ ('', i=1, 10) /)) /)
+
+  TYPE(ctrl_out),SAVE,DIMENSION(naero_tot-1) :: o_drytausumaero =                              &
+       (/ ctrl_out((/ 11, 10, 10, 10, 10, 10, 11, 11, 11, 11/),'dryod550_'//name_aero_tau(1),     &
+       "Dry aerosol Optical depth at 550 nm "//name_aero_tau(1),"1", (/ ('', i=1, 10) /)),     &
+       ctrl_out((/ 11, 10, 10, 10, 10, 10, 11, 11, 11, 11/),'dryod550_'//name_aero_tau(2),        &
+       "Dry aerosol Optical depth at 550 nm "//name_aero_tau(2),"2", (/ ('', i=1, 10) /)),     &
+       ctrl_out((/ 11, 10, 10, 10, 10, 10, 11, 11, 11, 11/),'dryod550_'//name_aero_tau(3),        &
+       "Dry aerosol Optical depth at 550 nm "//name_aero_tau(3),"3", (/ ('', i=1, 10) /)),     &
+       ctrl_out((/ 11, 10, 10, 10, 10, 10, 11, 11, 11, 11/),'dryod550_'//name_aero_tau(4),        &
+       "Dry aerosol Optical depth at 550 nm "//name_aero_tau(4),"4", (/ ('', i=1, 10) /)),     &
+       ctrl_out((/ 11, 10, 10, 10, 10, 10, 11, 11, 11, 11/),'dryod550_'//name_aero_tau(5),        &
+       "Dry aerosol Optical depth at 550 nm "//name_aero_tau(5),"5", (/ ('', i=1, 10) /)),     &
+       ctrl_out((/ 11, 10, 10, 10, 10, 10, 11, 11, 11, 11/),'dryod550_'//name_aero_tau(6),        &
+       "Dry aerosol Optical depth at 550 nm "//name_aero_tau(6),"6", (/ ('', i=1, 10) /)),     &
+       ctrl_out((/ 11, 10, 10, 10, 10, 10, 11, 11, 11, 11/),'dryod550_'//name_aero_tau(7),        &
+       "Dry aerosol Optical depth at 550 nm "//name_aero_tau(7),"7", (/ ('', i=1, 10) /)),     &
+       ctrl_out((/ 11, 10, 10, 10, 10, 10, 11, 11, 11, 11/),'dryod550_'//name_aero_tau(8),        &
+       "Dry aerosol Optical depth at 550 nm "//name_aero_tau(8),"8", (/ ('', i=1, 10) /)),     &
+       ctrl_out((/ 11, 10, 10, 10, 10, 10, 11, 11, 11, 11/),'dryod550_'//name_aero_tau(9),        &
+       "Dry aerosol Optical depth at 550 nm "//name_aero_tau(9),"9", (/ ('', i=1, 10) /)),     &
+       ctrl_out((/ 11, 10, 10, 10, 10, 10, 11, 11, 11, 11/),'dryod550_'//name_aero_tau(10),       &
+       "Dry aerosol Optical depth at 550 nm "//name_aero_tau(10),"10", (/ ('', i=1, 10) /)),   &
+       ctrl_out((/ 11, 10, 10, 10, 10, 10, 11, 11, 11, 11/),'dryod550_'//name_aero_tau(11),       &
+       "Dry aerosol Optical depth at 550 nm "//name_aero_tau(11),"11", (/ ('', i=1, 10) /)),   &
+       ctrl_out((/ 11, 10, 10, 10, 10, 10, 11, 11, 11, 11/),'dryod550_'//name_aero_tau(12),       &
+       "Dry aerosol Optical depth at 550 nm "//name_aero_tau(12),"12", (/ ('', i=1, 10) /)),   &
+       ctrl_out((/ 11, 10, 10, 10, 10, 10, 11, 11, 11, 11/),'dryod550_'//name_aero_tau(13),       &
+       "Dry aerosol Optical depth at 550 nm "//name_aero_tau(13),"13", (/ ('', i=1, 10) /)) /)
 !
   TYPE(ctrl_out), SAVE :: o_tausumaero_lw = ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/), &
-    'OD_10um_STRAT', 'Stratospheric Aerosol Optical depth at 10 um ', '1', (/ ('', i=1, 10) /))
+    'od_10um_STRAT', 'Stratospheric Aerosol Optical depth at 10 um ', '1', (/ ('', i=1, 10) /))
 !
   TYPE(ctrl_out), SAVE :: o_od443aer = ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/), &
@@ -1098,4 +1125,6 @@
   TYPE(ctrl_out), SAVE :: o_od550aer = ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/), &
     'od550aer', 'Total aerosol optical depth at 550nm', '-', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_dryod550aer = ctrl_out((/ 11, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'dryod550aer', 'Total dry aerosol optical depth at 550nm', '-', (/ ('', i=1, 10) /))
   TYPE(ctrl_out), SAVE :: o_od865aer = ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/), &
     'od865aer', 'Total aerosol optical depth at 870nm', '-', (/ ('', i=1, 10) /))
@@ -1140,31 +1169,31 @@
   TYPE(ctrl_out), SAVE :: o_loadno3 = ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/), &
     'loadno3', 'Column Load of Nitrate ', 'kg/m2', (/ ('', i=1, 10) /))
-  TYPE(ctrl_out), SAVE :: o_swtoaas_nat = ctrl_out((/ 4, 6, 10, 10, 10, 10, 11, 11, 11, 11/), &
+  TYPE(ctrl_out), SAVE :: o_swtoaas_nat = ctrl_out((/ 11, 11, 1, 11, 11, 11, 11, 11, 11, 11/), &
     'swtoaas_nat', 'Natural aerosol radiative forcing all-sky at TOA', 'W/m2', (/ ('', i=1, 10) /))
-  TYPE(ctrl_out), SAVE :: o_swsrfas_nat = ctrl_out((/ 4, 6, 10, 10, 10, 10, 11, 11, 11, 11/), &
+  TYPE(ctrl_out), SAVE :: o_swsrfas_nat = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/), &
     'swsrfas_nat', 'Natural aerosol radiative forcing all-sky at SRF', 'W/m2', (/ ('', i=1, 10) /))
-  TYPE(ctrl_out), SAVE :: o_swtoacs_nat = ctrl_out((/ 4, 6, 10, 10, 10, 10, 11, 11, 11, 11/), &
+  TYPE(ctrl_out), SAVE :: o_swtoacs_nat = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/), &
     'swtoacs_nat', 'Natural aerosol radiative forcing clear-sky at TOA', 'W/m2', (/ ('', i=1, 10) /))
-  TYPE(ctrl_out), SAVE :: o_swsrfcs_nat = ctrl_out((/ 4, 6, 10, 10, 10, 10, 11, 11, 11, 11/), &
+  TYPE(ctrl_out), SAVE :: o_swsrfcs_nat = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/), &
     'swsrfcs_nat', 'Natural aerosol radiative forcing clear-sky at SRF', 'W/m2', (/ ('', i=1, 10) /))
-  TYPE(ctrl_out), SAVE :: o_swtoaas_ant = ctrl_out((/ 4, 6, 10, 10, 10, 10, 11, 11, 11, 11/), &
+  TYPE(ctrl_out), SAVE :: o_swtoaas_ant = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/), &
     'swtoaas_ant', 'Anthropogenic aerosol radiative forcing all-sky at TOA', 'W/m2', (/ ('', i=1, 10) /))
-  TYPE(ctrl_out), SAVE :: o_swsrfas_ant = ctrl_out((/ 4, 6, 10, 10, 10, 10, 11, 11, 11, 11/), &
+  TYPE(ctrl_out), SAVE :: o_swsrfas_ant = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/), &
     'swsrfas_ant', 'Anthropogenic aerosol radiative forcing all-sky at SRF', 'W/m2', (/ ('', i=1, 10) /))
-  TYPE(ctrl_out), SAVE :: o_swtoacs_ant = ctrl_out((/ 4, 6, 10, 10, 10, 10, 11, 11, 11, 11/), &
+  TYPE(ctrl_out), SAVE :: o_swtoacs_ant = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/), &
     'swtoacs_ant', 'Anthropogenic aerosol radiative forcing clear-sky at TOA', 'W/m2', (/ ('', i=1, 10) /))
-  TYPE(ctrl_out), SAVE :: o_swsrfcs_ant = ctrl_out((/ 4, 6, 10, 10, 10, 10, 11, 11, 11, 11/), &
+  TYPE(ctrl_out), SAVE :: o_swsrfcs_ant = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/), &
     'swsrfcs_ant', 'Anthropogenic aerosol radiative forcing clear-sky at SRF', 'W/m2', (/ ('', i=1, 10) /))
-  TYPE(ctrl_out), SAVE :: o_swtoacf_nat = ctrl_out((/ 4, 6, 10, 10, 10, 10, 11, 11, 11, 11/), &
+  TYPE(ctrl_out), SAVE :: o_swtoacf_nat = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/), &
     'swtoacf_nat', 'Natural aerosol impact on cloud radiative forcing at TOA', 'W/m2', (/ ('', i=1, 10) /))
-  TYPE(ctrl_out), SAVE :: o_swsrfcf_nat = ctrl_out((/ 4, 6, 10, 10, 10, 10, 11, 11, 11, 11/), &
+  TYPE(ctrl_out), SAVE :: o_swsrfcf_nat = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/), &
     'swsrfcf_nat', 'Natural aerosol impact on cloud radiative forcing  at SRF', 'W/m2', (/ ('', i=1, 10) /))
-  TYPE(ctrl_out), SAVE :: o_swtoacf_ant = ctrl_out((/ 4, 6, 10, 10, 10, 10, 11, 11, 11, 11/), &
+  TYPE(ctrl_out), SAVE :: o_swtoacf_ant = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/), &
     'swtoacf_ant', 'Anthropogenic aerosol impact on cloud radiative forcing at TOA', 'W/m2', (/ ('', i=1, 10) /))
-  TYPE(ctrl_out), SAVE :: o_swsrfcf_ant = ctrl_out((/ 4, 6, 10, 10, 10, 10, 11, 11, 11, 11/), &
+  TYPE(ctrl_out), SAVE :: o_swsrfcf_ant = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/), &
     'swsrfcf_ant', 'Anthropogenic aerosol impact on cloud radiative forcing at SRF', 'W/m2', (/ ('', i=1, 10) /))
-  TYPE(ctrl_out), SAVE :: o_swtoacf_zero = ctrl_out((/ 4, 6, 10, 10, 10, 10, 11, 11, 11, 11/), &
+  TYPE(ctrl_out), SAVE :: o_swtoacf_zero = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/), &
     'swtoacf_zero', 'Cloud radiative forcing (allsky-clearsky fluxes) at TOA', 'W/m2', (/ ('', i=1, 10) /))
-  TYPE(ctrl_out), SAVE :: o_swsrfcf_zero = ctrl_out((/ 4, 6, 10, 10, 10, 10, 11, 11, 11, 11/), &
+  TYPE(ctrl_out), SAVE :: o_swsrfcf_zero = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/), &
     'swsrfcf_zero', 'Cloud radiative forcing (allsky-clearsky fluxes) at SRF', 'W/m2', (/ ('', i=1, 10) /))
   TYPE(ctrl_out), SAVE :: o_cldncl = ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/), &
@@ -1185,5 +1214,5 @@
 !--strat aerosol optical depth
   TYPE(ctrl_out), SAVE :: o_tau_strat_550 = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 1/), &
-    'OD550_strat_only', 'Stratospheric Aerosol Optical depth at 550 nm ', '1', (/ ('', i=1, 10) /))
+    'od550_strat_only', 'Stratospheric Aerosol Optical depth at 550 nm ', '1', (/ ('', i=1, 10) /))
   TYPE(ctrl_out), SAVE :: o_tau_strat_1020 = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 1/), &
     'OD1020_strat_only', 'Stratospheric Aerosol Optical depth at 1020 nm ', '1', (/ ('', i=1, 10) /))
Index: /LMDZ5/branches/testing/libf/phylmd/phys_output_mod.F90
===================================================================
--- /LMDZ5/branches/testing/libf/phylmd/phys_output_mod.F90	(revision 2869)
+++ /LMDZ5/branches/testing/libf/phylmd/phys_output_mod.F90	(revision 2870)
@@ -519,4 +519,5 @@
     IF (prt_level >= 10) THEN
       WRITE(lunout,*)'swaero_diag=',swaero_diag
+      WRITE(lunout,*)'dryaod_diag=',dryaod_diag
       WRITE(lunout,*)'phys_output_open: ends here'
     ENDIF
Index: /LMDZ5/branches/testing/libf/phylmd/phys_output_var_mod.F90
===================================================================
--- /LMDZ5/branches/testing/libf/phylmd/phys_output_var_mod.F90	(revision 2869)
+++ /LMDZ5/branches/testing/libf/phylmd/phys_output_var_mod.F90	(revision 2870)
@@ -4,5 +4,5 @@
 MODULE phys_output_var_mod
 
-  use dimphy
+  USE dimphy
   ! Variables outputs pour les ecritures des sorties
   !======================================================================
@@ -79,8 +79,10 @@
 
   ! swaero_diag : flag indicates if it is necessary to do calculation for some aerosol diagnostics
+  ! dryaod_diag : flag indicates if it is necessary to do calculation for some aerosol diagnostics
   !--OB: this needs to be set to TRUE by default and changed back to FALSE after first radiation call
   !--    and corrected back to TRUE based on output requests
   LOGICAL, SAVE                                :: swaero_diag=.TRUE.
-  !$OMP THREADPRIVATE(swaero_diag)
+  LOGICAL, SAVE                                :: dryaod_diag=.TRUE.
+  !$OMP THREADPRIVATE(swaero_diag, dryaod_diag)
 
   INTEGER, SAVE:: levmin(nfiles) = 1
@@ -165,5 +167,5 @@
   !======================================================================
   SUBROUTINE phys_output_var_end
-    use dimphy
+    USE dimphy
     IMPLICIT NONE
 
Index: /LMDZ5/branches/testing/libf/phylmd/phys_output_write_mod.F90
===================================================================
--- /LMDZ5/branches/testing/libf/phylmd/phys_output_write_mod.F90	(revision 2869)
+++ /LMDZ5/branches/testing/libf/phylmd/phys_output_write_mod.F90	(revision 2870)
@@ -100,10 +100,11 @@
          o_solldown, o_dtsvdfo, o_dtsvdft, &
          o_dtsvdfg, o_dtsvdfi, o_z0m, o_z0h, o_od443aer, o_od550aer, &
-         o_od865aer, o_abs550aer, o_od550lt1aer, &
+         o_dryod550aer, o_od865aer, o_abs550aer, o_od550lt1aer, &
          o_sconcso4, o_sconcno3, o_sconcoa, o_sconcbc, &
          o_sconcss, o_sconcdust, o_concso4, o_concno3, &
          o_concoa, o_concbc, o_concss, o_concdust, &
          o_loadso4, o_loadoa, o_loadbc, o_loadss, &
-         o_loaddust, o_loadno3, o_tausumaero, o_tausumaero_lw, &
+         o_loaddust, o_loadno3, o_tausumaero, & 
+         o_drytausumaero, o_tausumaero_lw, &
          o_topswad, o_topswad0, o_solswad, o_solswad0, &
          o_toplwad, o_toplwad0, o_sollwad, o_sollwad0, &
@@ -252,9 +253,9 @@
          weak_inversion, dthmin, cldtau, cldemi, &
          pmflxr, pmflxs, prfl, psfl, re, fl, rh2m, &
-         qsat2m, tpote, tpot, d_ts, od443aer, od550aer, &
+         qsat2m, tpote, tpot, d_ts, od443aer, od550aer, dryod550aer, &
          od865aer, abs550aer, od550lt1aer, sconcso4, sconcno3, &
          sconcoa, sconcbc, sconcss, sconcdust, concso4, concno3, &
          concoa, concbc, concss, concdust, loadso4, &
-         loadoa, loadbc, loadss, loaddust, loadno3, tausum_aero, &
+         loadoa, loadbc, loadss, loaddust, loadno3, tausum_aero, drytausum_aero, &
          topswad_aero, topswad0_aero, solswad_aero, &
          solswad0_aero, topsw_aero, solsw_aero, &
@@ -301,5 +302,5 @@
     USE phys_output_var_mod, ONLY: vars_defined, snow_o, zfra_o, bils_diss, &
          bils_ec,bils_ech, bils_tke, bils_kinetic, bils_latent, bils_enthalp, &
-         itau_con, nfiles, clef_files, nid_files, &
+         itau_con, nfiles, clef_files, nid_files, dryaod_diag, &
          zustr_gwd_hines, zvstr_gwd_hines,zustr_gwd_rando, zvstr_gwd_rando, &
          zustr_gwd_front, zvstr_gwd_front,     &
@@ -1164,5 +1165,5 @@
        CALL histwrite_phy(o_z0m, z0m(:,nbsrf+1))
        CALL histwrite_phy(o_z0h, z0h(:,nbsrf+1))
-       ! OD550 per species
+       ! od550 per species
 !--OLIVIER
 !This is warranted by treating INCA aerosols as offline aerosols
@@ -1193,6 +1194,10 @@
              CALL histwrite_phy(o_loaddust, loaddust)
              CALL histwrite_phy(o_loadno3, loadno3)
-             !--STRAT AER
-          ENDIF
+             CALL histwrite_phy(o_dryod550aer, dryod550aer)
+             DO naero = 1, naero_tot-1
+                CALL histwrite_phy(o_drytausumaero(naero),drytausum_aero(:,naero))
+             END DO
+          ENDIF
+          !--STRAT AER
           IF (flag_aerosol.GT.0.OR.flag_aerosol_strat.GT.0) THEN
              DO naero = 1, naero_tot
Index: /LMDZ5/branches/testing/libf/phylmd/physiq_mod.F90
===================================================================
--- /LMDZ5/branches/testing/libf/phylmd/physiq_mod.F90	(revision 2869)
+++ /LMDZ5/branches/testing/libf/phylmd/physiq_mod.F90	(revision 2870)
@@ -92,4 +92,5 @@
        topswcf_aero,solswcf_aero,   &
        tausum_aero,tau3d_aero,      &
+       drytausum_aero,              &
        !
        !variables CFMIP2/CMIP5
@@ -971,5 +972,5 @@
     ! pre-industrial (pi) aerosols
 
-
+    INTEGER :: naero
     ! Aerosol optical properties
     CHARACTER*4, DIMENSION(naero_grp) :: rfname 
@@ -1580,4 +1581,9 @@
            !!!  xios_field_is_active("toplwai").OR.xios_field_is_active("sollwai") !))) & 
            swaero_diag=.TRUE. 
+
+       !--setting up dryaod_diag to TRUE in XIOS case 
+       DO naero = 1, naero_tot-1
+         IF (xios_field_is_active("dryod550_"//name_aero_tau(naero))) dryaod_diag=.TRUE. 
+       ENDDO
 #endif 
 
@@ -2137,5 +2143,6 @@
 
        !jyg+nrlmd<
-       IF (prt_level .ge. 2 .and. mod(iflag_pbl_split,2) .eq. 1) THEN
+!!jyg       IF (prt_level .ge. 2 .and. mod(iflag_pbl_split,2) .eq. 1) THEN
+       IF (prt_level .ge. 2 .and. mod(iflag_pbl_split,10) .ge. 1) THEN
           print *,'debut du splitting de la PBL'
        ENDIF
@@ -2217,5 +2224,6 @@
        !
        !  Add turbulent diffusion tendency to the wake difference variables
-       IF (mod(iflag_pbl_split,2) .NE. 0) THEN
+!!jyg       IF (mod(iflag_pbl_split,2) .NE. 0) THEN
+       IF (mod(iflag_pbl_split,10) .NE. 0) THEN
 !jyg<
           d_deltat_vdf(:,:) = d_t_vdf_w(:,:)-d_t_vdf_x(:,:)
@@ -2829,5 +2837,6 @@
        IF (iflag_thermals>=1) THEN
           !jyg<
-          IF (mod(iflag_pbl_split/2,2) .EQ. 1) THEN
+!!       IF (mod(iflag_pbl_split/2,2) .EQ. 1) THEN
+       IF (mod(iflag_pbl_split/10,10) .GE. 1) THEN
              !  Appel des thermiques avec les profils exterieurs aux poches
              DO k=1,klev
@@ -2874,5 +2883,6 @@
           !
           !jyg<
-          IF (mod(iflag_pbl_split/2,2) .EQ. 1) THEN
+!!jyg          IF (mod(iflag_pbl_split/2,2) .EQ. 1) THEN
+          IF (mod(iflag_pbl_split/10,10) .GE. 1) THEN
              !  Si les thermiques ne sont presents que hors des
              !  poches, la tendance moyenne associ\'ee doit etre
@@ -2896,5 +2906,5 @@
              call prt_enerbil('the',itap)
           !
-          ENDIF  ! (mod(iflag_pbl_split/2,2) .EQ. 1)
+          ENDIF  ! (mod(iflag_pbl_split/10,10) .GE. 1)
           !
           CALL add_phys_tend(d_u_ajs,d_v_ajs,d_t_ajs,d_q_ajs,  &
@@ -3367,5 +3377,5 @@
                         tr_seri, mass_solu_aero, mass_solu_aero_pi,  &
                         tau_aero_sw_rrtm, piz_aero_sw_rrtm, cg_aero_sw_rrtm,  &
-                        tausum_aero, tau3d_aero)
+                        tausum_aero, drytausum_aero, tau3d_aero)
 #endif
                    !
@@ -3407,4 +3417,5 @@
        ELSE   !--flag_aerosol = 0 
           tausum_aero(:,:,:) = 0.
+          drytausum_aero(:,:) = 0.
           mass_solu_aero(:,:) = 0.
           mass_solu_aero_pi(:,:) = 0.
@@ -3674,9 +3685,10 @@
 #ifndef CPP_XIOS
           !--OB 30/05/2016 modified 21/10/2016
-          !--here we return swaero_diag to FALSE
+          !--here we return swaero_diag and dryaod_diag to FALSE
           !--and histdef will switch it back to TRUE if necessary
           !--this is necessary to get the right swaero at first step
           !--but only in the case of no XIOS as XIOS is covered elsewhere 
           IF (debut) swaero_diag = .FALSE.
+          IF (debut) dryaod_diag = .FALSE.
 #endif
           !
@@ -4185,6 +4197,6 @@
     d_t_ec(:,:)=0.
     forall (k=1: nbp_lev) exner(:, k) = (pplay(:, k)/paprs(:,1))**RKAPPA
-    CALL ener_conserv(klon,klev,pdtphys,u,v,t,qx(:,:,ivap), &
-         u_seri,v_seri,t_seri,q_seri,pbl_tke(:,:,is_ave)-tke0(:,:), &
+    CALL ener_conserv(klon,klev,pdtphys,u,v,t,qx(:,:,ivap),qx(:,:,iliq),qx(:,:,isol), &
+         u_seri,v_seri,t_seri,q_seri,ql_seri,qs_seri,pbl_tke(:,:,is_ave)-tke0(:,:), &
          zmasse,exner,d_t_ec)
     t_seri(:,:)=t_seri(:,:)+d_t_ec(:,:)
Index: /LMDZ5/branches/testing/libf/phylmd/rrtm/aeropt_5wv_rrtm.F90
===================================================================
--- /LMDZ5/branches/testing/libf/phylmd/rrtm/aeropt_5wv_rrtm.F90	(revision 2869)
+++ /LMDZ5/branches/testing/libf/phylmd/rrtm/aeropt_5wv_rrtm.F90	(revision 2870)
@@ -8,9 +8,10 @@
    flag_bc_internal_mixture, & 
    pplay, t_seri,            &
-   tausum, tau )
+   tausum, drytausum, tau )
 
   USE DIMPHY
   USE aero_mod
-  USE phys_local_var_mod, ONLY: od443aer,od550aer,od865aer,ec550aer,od550lt1aer,abs550aer
+  USE phys_local_var_mod, ONLY: od443aer,od550aer,dryod550aer,od865aer,ec550aer,od550lt1aer,abs550aer
+  USE phys_output_var_mod, ONLY: dryaod_diag
   USE YOMCST, ONLY: RD,RG
 
@@ -67,4 +68,5 @@
   REAL, DIMENSION(klon), INTENT(OUT)                      :: ai      ! POLDER aerosol index 
   REAL, DIMENSION(klon,nwave,naero_tot), INTENT(OUT)      :: tausum
+  REAL, DIMENSION(klon,naero_tot), INTENT(OUT)            :: drytausum
   REAL, DIMENSION(klon,klev,nwave,naero_tot), INTENT(OUT) :: tau
   !
@@ -342,8 +344,8 @@
   ! Initialisations
   ai(:) = 0.
+  abs550aer(:)=0.0
+  drytausum(:,:) = 0.
   tausum(:,:,:) = 0.
   tau(:,:,:,:)=0.
-
-  abs550aer(:)=0.0
 
   DO k=1, klev
@@ -476,5 +478,5 @@
     DO la=1,las
 
-    !--only 443, 550, 670 and 865 nm are used
+    !--only 443, 550, and 865 nm are used
     !--to save time 670 and AI are not computed for CMIP6
     !IF (la.NE.la443.AND.la.NE.la550.AND.la.NE.la670.AND.la.NE.la865) CYCLE
@@ -511,4 +513,9 @@
              tausum(i,la,aerindex)=tausum(i,la,aerindex)+tau(i,k,la,aerindex)
 
+             IF (la.EQ.la550.AND.dryaod_diag) THEN 
+                tau_ae5wv_int = alpha_MG_5wv(1,la,classbc)
+                drytausum(i,aerindex)=drytausum(i,aerindex)+m_allaer(i,k,aerindex)/1.e6*zdh(i,k)*tau_ae5wv_int*fac
+             ENDIF
+
              IF (la.EQ.la550) THEN 
                 abs_ae5wv_int = abs_MG_5wv(RH_num(i,k),la,classbc)+DELTA(i,k)* &
@@ -532,4 +539,9 @@
               tausum(i,la,aerindex)=tausum(i,la,aerindex)+tau(i,k,la,aerindex)
 
+              IF (la.EQ.la550.AND.dryaod_diag) THEN 
+                 tau_ae5wv_int = alpha_aers_5wv(1,la,spsol)
+                 drytausum(i,aerindex)=drytausum(i,aerindex)+m_allaer(i,k,aerindex)/1.e6*zdh(i,k)*tau_ae5wv_int*fac
+              ENDIF
+
               IF (la.EQ.la550) THEN 
                  abs_ae5wv_int = abs_aers_5wv(RH_num(i,k),la,spsol)+DELTA(i,k)* &
@@ -554,6 +566,10 @@
             tausum(i,la,aerindex)= tausum(i,la,aerindex)+tau(i,k,la,aerindex)
 
+            IF (la.EQ.la550.AND.dryaod_diag) THEN 
+              drytausum(i,aerindex)= drytausum(i,aerindex)+tau(i,k,la,aerindex)
+            ENDIF
+
             IF (la.EQ.la550) THEN 
-               abs_ae5wv_int = abs_aeri_5wv(la,spsol)
+               abs_ae5wv_int = abs_aeri_5wv(la,spinsol)
                abs550aer(i)=abs550aer(i)+m_allaer(i,k,aerindex)/1.e6*zdh(i,k)*abs_ae5wv_int*fac
             ENDIF 
@@ -573,4 +589,7 @@
   od865aer(:)=SUM(tausum(:,la865,:),dim=2)
 
+!--dry AOD calculation for diagnostics la=la550
+  dryod550aer(:)=SUM(drytausum(:,:),dim=2)
+
 !--extinction coefficient for diagnostic
   ec550aer(:,:)=SUM(tau(:,:,la550,:),dim=3)/zdh(:,:)
Index: /LMDZ5/branches/testing/libf/phylmd/rrtm/readaerosol_optic_rrtm.F90
===================================================================
--- /LMDZ5/branches/testing/libf/phylmd/rrtm/readaerosol_optic_rrtm.F90	(revision 2869)
+++ /LMDZ5/branches/testing/libf/phylmd/rrtm/readaerosol_optic_rrtm.F90	(revision 2870)
@@ -6,5 +6,5 @@
      tr_seri, mass_solu_aero, mass_solu_aero_pi, &
      tau_aero, piz_aero, cg_aero, &
-     tausum_aero, tau3d_aero )
+     tausum_aero, drytausum_aero, tau3d_aero )
 
   ! This routine will :
@@ -52,4 +52,5 @@
   REAL, DIMENSION(klon,klev,2,NSW), INTENT(OUT) :: cg_aero     ! asymmetry parameter aerosol
   REAL, DIMENSION(klon,nwave,naero_tot), INTENT(OUT)       :: tausum_aero
+  REAL, DIMENSION(klon,naero_tot), INTENT(OUT)             :: drytausum_aero
   REAL, DIMENSION(klon,klev,nwave,naero_tot), INTENT(OUT)  :: tau3d_aero
 
@@ -231,5 +232,5 @@
      ENDIF
      !
-     ! Read and interpolate cidustm
+     ! Read and interpolate asno3m, csno3m, cino3m
      IF (flag_aerosol .EQ. 6) THEN 
 
@@ -240,5 +241,5 @@
         CALL readaerosol_interp(id_CINO3M_phy, itap, pdtphys, rjourvrai, & 
         debut, pplay, paprs, t_seri, nitrinscoarse, nitrinscoarse_pi, load_tmp3) 
-        loadss(:)=load_tmp1(:)+load_tmp2(:)+load_tmp3(:)
+        loadno3(:)=load_tmp1(:)+load_tmp2(:)+load_tmp3(:)
 
      ELSE
@@ -320,5 +321,5 @@
        flag_bc_internal_mixture,     & 
        pplay, t_seri,                &
-       tausum_aero, tau3d_aero )
+       tausum_aero, drytausum_aero, tau3d_aero )
 
   !--call LW optical properties for tropospheric aerosols 
Index: /LMDZ5/branches/testing/libf/phylmd/rrtm/rrtm_init_140gp.F90
===================================================================
--- /LMDZ5/branches/testing/libf/phylmd/rrtm/rrtm_init_140gp.F90	(revision 2869)
+++ /LMDZ5/branches/testing/libf/phylmd/rrtm/rrtm_init_140gp.F90	(revision 2870)
@@ -82,9 +82,9 @@
 
 CORR1(0) = 1.0_JPRB
-CORR1(200) = 1.0_JPRB
+CORR1(400) = 1.0_JPRB
 CORR2(0) = 1.0_JPRB
-CORR2(200) = 1.0_JPRB
-DO I = 1,199
-  Z_FP = 0.005_JPRB*REAL(I)
+CORR2(400) = 1.0_JPRB
+DO I = 1,399
+  Z_FP = 0.0025_JPRB*REAL(I)
   Z_RTFP = SQRT(Z_FP)
   CORR1(I) = Z_RTFP/Z_FP
Index: /LMDZ5/branches/testing/libf/phylmd/rrtm/yoerrtbg2.F90
===================================================================
--- /LMDZ5/branches/testing/libf/phylmd/rrtm/yoerrtbg2.F90	(revision 2869)
+++ /LMDZ5/branches/testing/libf/phylmd/rrtm/yoerrtbg2.F90	(revision 2870)
@@ -13,6 +13,6 @@
 !    -------------------------------------------------------------------
 
-REAL(KIND=JPRB) :: CORR1(0:200)
-REAL(KIND=JPRB) :: CORR2(0:200)
+REAL(KIND=JPRB) :: CORR1(0:400)
+REAL(KIND=JPRB) :: CORR2(0:400)
 
 !     -----------------------------------------------------------------
