Index: LMDZ5/branches/testing/libf/dyn3d/guide_mod.F90
===================================================================
--- LMDZ5/branches/testing/libf/dyn3d/guide_mod.F90	(revision 2729)
+++ LMDZ5/branches/testing/libf/dyn3d/guide_mod.F90	(revision 2787)
@@ -38,5 +38,5 @@
 
   REAL, ALLOCATABLE, DIMENSION(:), PRIVATE, SAVE     :: alpha_u,alpha_v 
-  REAL, ALLOCATABLE, DIMENSION(:), PRIVATE, SAVE     :: alpha_T,alpha_Q 
+  REAL, ALLOCATABLE, DIMENSION(:, :), PRIVATE, SAVE     :: alpha_T,alpha_Q 
   REAL, ALLOCATABLE, DIMENSION(:), PRIVATE, SAVE     :: alpha_P,alpha_pcor
   
@@ -222,7 +222,7 @@
     ALLOCATE(alpha_v(ip1jm), stat = error)
     IF (error /= 0) CALL abort_gcm(modname,abort_message,1)
-    ALLOCATE(alpha_T(ip1jmp1), stat = error)
+    ALLOCATE(alpha_T(iip1, jjp1), stat = error)
     IF (error /= 0) CALL abort_gcm(modname,abort_message,1)
-    ALLOCATE(alpha_Q(ip1jmp1), stat = error)
+    ALLOCATE(alpha_Q(iip1, jjp1), stat = error)
     IF (error /= 0) CALL abort_gcm(modname,abort_message,1)
     ALLOCATE(alpha_P(ip1jmp1), stat = error)
@@ -1518,4 +1518,6 @@
     USE comconst_mod, ONLY: pi
     USE comvert_mod, ONLY: presnivs
+    use netcdf95, only: nf95_def_var, nf95_put_var
+    use netcdf, only: nf90_float
     
     IMPLICIT NONE
@@ -1536,5 +1538,5 @@
     INTEGER       :: nid, id_lonu, id_lonv, id_latu, id_latv, id_tim, id_lev
     INTEGER       :: vid_lonu,vid_lonv,vid_latu,vid_latv,vid_cu,vid_cv,vid_lev
-    INTEGER       :: vid_au,vid_av
+    INTEGER       :: vid_au,vid_av, varid_alpha_t, varid_alpha_q
     INTEGER, DIMENSION (3) :: dim3
     INTEGER, DIMENSION (4) :: dim4,count,start
@@ -1567,4 +1569,8 @@
         ierr=NF_DEF_VAR(nid,"cv",NF_FLOAT,2,(/id_lonv,id_latv/),vid_cv)
         ierr=NF_DEF_VAR(nid,"av",NF_FLOAT,2,(/id_lonv,id_latv/),vid_av)
+        call nf95_def_var(nid, "alpha_T", nf90_float, (/id_lonv, id_latu/), &
+             varid_alpha_t)
+        call nf95_def_var(nid, "alpha_q", nf90_float, (/id_lonv, id_latu/), &
+             varid_alpha_q)
         
         ierr=NF_ENDDEF(nid)
@@ -1592,4 +1598,6 @@
         ierr = NF_PUT_VAR_REAL(nid,vid_av,alpha_v)
 #endif
+        call nf95_put_var(nid, varid_alpha_t, alpha_t)
+        call nf95_put_var(nid, varid_alpha_q, alpha_q)
 ! --------------------------------------------------------------------
 ! Cr�ation des variables sauvegard�es
Index: LMDZ5/branches/testing/libf/dyn3dmem/bands.F90
===================================================================
--- LMDZ5/branches/testing/libf/dyn3dmem/bands.F90	(revision 2729)
+++ LMDZ5/branches/testing/libf/dyn3dmem/bands.F90	(revision 2787)
@@ -219,5 +219,5 @@
         minvalue=value(i)
         min_proc=index(i)
-        if (jj_nb_caldyn(max_proc)>3) then
+        if (jj_nb_caldyn(max_proc)>2) then
           if (timer_iteration(jj_nb_caldyn(min_proc)+1,timer_caldyn,min_proc)<=1 ) then
              jj_nb_caldyn(min_proc)=jj_nb_caldyn(min_proc)+1
@@ -287,5 +287,5 @@
         min_proc=index(i)
 
-        if (jj_nb_vanleer(max_proc)>3) then
+        if (jj_nb_vanleer(max_proc)>2) then
           if (timer_average(jj_nb_vanleer(min_proc)+1,timer_vanleer,min_proc)==0. .or. &
              timer_average(jj_nb_vanleer(max_proc)-1,timer_vanleer,max_proc)==0.) then
Index: LMDZ5/branches/testing/libf/dyn3dmem/guide_loc_mod.F90
===================================================================
--- LMDZ5/branches/testing/libf/dyn3dmem/guide_loc_mod.F90	(revision 2729)
+++ LMDZ5/branches/testing/libf/dyn3dmem/guide_loc_mod.F90	(revision 2787)
@@ -2130,4 +2130,7 @@
     USE comconst_mod, ONLY: pi
     USE comvert_mod, ONLY: presnivs
+    use netcdf95, only: nf95_def_var, nf95_put_var
+    use netcdf, only: nf90_float
+
     IMPLICIT NONE
 
@@ -2149,9 +2152,9 @@
     INTEGER       :: nid, id_lonu, id_lonv, id_latu, id_latv, id_tim, id_lev
     INTEGER       :: vid_lonu,vid_lonv,vid_latu,vid_latv,vid_cu,vid_cv,vid_lev
-    INTEGER       :: vid_au,vid_av
+    INTEGER       :: vid_au,vid_av, varid_alpha_t, varid_alpha_q
     INTEGER, DIMENSION (3) :: dim3
     INTEGER, DIMENSION (4) :: dim4,count,start
     INTEGER                :: ierr, varid,l
-    REAL zu(ip1jmp1),zv(ip1jm)
+    REAL zu(ip1jmp1),zv(ip1jm), zt(iip1, jjp1), zq(iip1, jjp1)
     REAL, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: field_glo
     
@@ -2171,4 +2174,6 @@
     print*,'guide_out apres gather '
     CALL Gather_field_u(alpha_u,zu,1)
+    CALL Gather_field_u(alpha_t,zt,1)
+    CALL Gather_field_u(alpha_q,zq,1)
     CALL Gather_field_v(alpha_v,zv,1)
 
@@ -2207,5 +2212,9 @@
         ierr=NF_DEF_VAR(nid,"au",NF_FLOAT,2,(/id_lonu,id_latu/),vid_au)
         ierr=NF_DEF_VAR(nid,"av",NF_FLOAT,2,(/id_lonv,id_latv/),vid_av)
-
+        call nf95_def_var(nid, "alpha_T", nf90_float, (/id_lonv, id_latu/), &
+             varid_alpha_t)
+        call nf95_def_var(nid, "alpha_q", nf90_float, (/id_lonv, id_latu/), &
+             varid_alpha_q)
+        
         ierr=NF_ENDDEF(nid)
 
@@ -2232,4 +2241,6 @@
         ierr = NF_PUT_VAR_REAL(nid,vid_av,alpha_v)
 #endif
+        call nf95_put_var(nid, varid_alpha_t, zt)
+        call nf95_put_var(nid, varid_alpha_q, zq)
 ! --------------------------------------------------------------------
 ! Cr�ation des variables sauvegard�es
Index: LMDZ5/branches/testing/libf/dyn3dmem/parallel_lmdz.F90
===================================================================
--- LMDZ5/branches/testing/libf/dyn3dmem/parallel_lmdz.F90	(revision 2729)
+++ LMDZ5/branches/testing/libf/dyn3dmem/parallel_lmdz.F90	(revision 2787)
@@ -154,5 +154,5 @@
         if ( i < MOD((jjm+1),mpi_size) ) jj_nb_para(i)=jj_nb_para(i)+1
         
-        if (jj_nb_para(i) <= 2 ) then
+        if (jj_nb_para(i) <= 1 ) then
           
          write(lunout,*)"Arret : le nombre de bande de lattitude par process est trop faible (<2)."
Index: LMDZ5/branches/testing/libf/dyn3dmem/vlsplt_loc.F
===================================================================
--- LMDZ5/branches/testing/libf/dyn3dmem/vlsplt_loc.F	(revision 2729)
+++ LMDZ5/branches/testing/libf/dyn3dmem/vlsplt_loc.F	(revision 2787)
@@ -885,4 +885,9 @@
 c
       INTEGER i,ij,l,j,ii
+
+      REAL,DIMENSION(ijb_u:ije_u,llm+1) :: wresi,morig,qorig,dzqorig
+      INTEGER,DIMENSION(ijb_u:ije_u,llm+1) :: lorig
+      INTEGER,SAVE :: countcfl
+!$OMP THREADPRIVATE(countcfl)
 c
       REAL newmasse
@@ -911,4 +916,5 @@
       ! vlz_loc si on veut qu'elles soient vues par tous les threads.  
       INTEGER ifils,iq2 ! CRisi
+
 
       IF (first) THEN
@@ -968,6 +974,33 @@
       ENDIF
 #endif
+
+!--------------------------------------------------------
+! On repere les points qui violent le CFL (|w| > masse)
+!--------------------------------------------------------
+
+      countcfl=0
+!     print*,'vlz nouveau'
+c$OMP DO SCHEDULE(STATIC,OMP_CHUNK)
+      DO l = 2,llm
+         DO ij = ijb,ije
+          IF(  (w(ij,l,iq)>0.AND.w(ij,l,iq)>masse(ij,l,iq))
+     s    .OR. (w(ij,l,iq)<=0.AND.ABS(w(ij,l,iq))>masse(ij,l-1,iq)) )
+     s    countcfl=countcfl+1
+         ENDDO
+      ENDDO
+c$OMP END DO NOWAIT    
+
+c ---------------------------------------------------------------
+c  Identification des mailles ou on viole le CFL : w > masse
+c ---------------------------------------------------------------
+
+      IF (countcfl==0) THEN
+
 c ---------------------------------------------------------------
 c   .... calcul des termes d'advection verticale  .......
+c     Dans le cas où le  |w| < masse partout.
+c     Version d'origine
+c     Pourrait etre enleve si on voit que le code plus general
+c     est aussi rapide
 c ---------------------------------------------------------------
 
@@ -991,4 +1024,87 @@
 c$OMP END DO NOWAIT    
        !write(*,*) 'vlz 1001'    
+
+      ELSE ! countcfl>=1
+
+      PRINT*,'vlz passage dans le non local'
+c ---------------------------------------------------------------
+c  Debut du traitement du cas ou on viole le CFL : w > masse
+c ---------------------------------------------------------------
+
+c Initialisation
+
+c$OMP DO SCHEDULE(STATIC,OMP_CHUNK)
+       DO l = 2,llm
+         DO ij = ijb,ije
+            wresi(ij,l)=w(ij,l,iq)
+            wq(ij,l,iq)=0.
+            IF(w(ij,l,iq).gt.0.) THEN
+               lorig(ij,l)=l
+               morig(ij,l)=masse(ij,l,iq)
+               qorig(ij,l)=q(ij,l,iq)
+               dzqorig(ij,l)=dzq(ij,l)
+            ELSE
+               lorig(ij,l)=l-1
+               morig(ij,l)=masse(ij,l-1,iq)
+               qorig(ij,l)=q(ij,l-1,iq)
+               dzqorig(ij,l)=dzq(ij,l-1)
+            ENDIF
+         ENDDO
+       ENDDO
+c$OMP END DO NO WAIT
+
+c Reindicage vertical en accumulant les flux sur
+c  les mailles qui viollent le CFL
+c  on itère jusqu'à ce que tous les poins satisfassent
+c  le critère
+      DO WHILE (countcfl>=1) 
+      print*,'On viole le CFL Vertical sur ',countcfl,' pts'
+      countcfl=0
+
+c$OMP DO SCHEDULE(STATIC,OMP_CHUNK)
+      DO l = 2,llm
+         DO ij = ijb,ije
+          IF (ABS(wresi(ij,l))>morig(ij,l)) THEN
+             countcfl=countcfl+1
+! rm : les 8 lignes ci dessous pourraient sans doute s'ecrire
+! avec la fonction sign
+             IF(w(ij,l,iq)>0.) THEN
+                wresi(ij,l)=wresi(ij,l)-morig(ij,l)
+                wq(ij,l,iq)=wq(ij,l,iq)+morig(ij,l)*qorig(ij,l)
+                lorig(ij,l)=lorig(ij,l)+1
+             ELSE
+                wresi(ij,l)=wresi(ij,l)+morig(ij,l)
+                wq(ij,l,iq)=wq(ij,l,iq)-morig(ij,l)*qorig(ij,l)
+                lorig(ij,l)=lorig(ij,l)-1
+             ENDIF
+             morig(ij,l)=masse(ij,lorig(ij,l),iq)
+             qorig(ij,l)=q(ij,lorig(ij,l),iq)
+             dzqorig(ij,l)=dzq(ij,lorig(ij,l))
+          ENDIF
+         ENDDO
+      ENDDO
+c$OMP END DO NO WAIT
+
+      ENDDO ! WHILE (countcfl>=1)
+
+c$OMP DO SCHEDULE(STATIC,OMP_CHUNK)
+       DO l = 2,llm
+         do  ij = ijb,ije
+          sigw=wresi(ij,l)/morig(ij,l)
+          IF(w(ij,l,iq).gt.0.) THEN
+             wq(ij,l,iq)=wq(ij,l,iq)+wresi(ij,l)*(qorig(ij,l)
+     :           +0.5*(1.-sigw)*dzqorig(ij,l))
+          ELSE
+             wq(ij,l,iq)=wq(ij,l,iq)+wresi(ij,l)*(qorig(ij,l)
+     :           -0.5*(1.+sigw)*dzqorig(ij,l))
+          ENDIF
+         ENDDO
+       ENDDO
+c$OMP END DO NOWAIT    
+
+
+       ENDIF ! councfl=0
+
+
 
 c$OMP MASTER
Index: LMDZ5/branches/testing/libf/dynphy_lonlat/phylmd/etat0phys_netcdf.F90
===================================================================
--- LMDZ5/branches/testing/libf/dynphy_lonlat/phylmd/etat0phys_netcdf.F90	(revision 2729)
+++ LMDZ5/branches/testing/libf/dynphy_lonlat/phylmd/etat0phys_netcdf.F90	(revision 2787)
@@ -109,5 +109,5 @@
   INTEGER :: iflag_radia, iflag_cldcon, iflag_ratqs
   REAL    :: ratqsbas, ratqshaut, tau_ratqs
-  LOGICAL :: ok_ade, ok_aie, ok_cdnc, aerosol_couple
+  LOGICAL :: ok_ade, ok_aie, ok_alw, ok_cdnc, aerosol_couple
   INTEGER :: flag_aerosol
   INTEGER :: flag_aerosol_strat
@@ -131,5 +131,5 @@
                    iflag_cldcon,                                        &
                    iflag_ratqs,ratqsbas,ratqshaut,tau_ratqs,            &
-                   ok_ade, ok_aie, ok_cdnc, aerosol_couple,             &
+                   ok_ade, ok_aie, ok_alw, ok_cdnc, aerosol_couple,     &
                    flag_aerosol, flag_aerosol_strat, new_aod,           &
                    flag_bc_internal_mixture, bl95_b0, bl95_b1,          &
Index: LMDZ5/branches/testing/libf/dynphy_lonlat/phylmd/limit_netcdf.F90
===================================================================
--- LMDZ5/branches/testing/libf/dynphy_lonlat/phylmd/limit_netcdf.F90	(revision 2729)
+++ LMDZ5/branches/testing/libf/dynphy_lonlat/phylmd/limit_netcdf.F90	(revision 2787)
@@ -17,12 +17,12 @@
 !-------------------------------------------------------------------------------
 
-  USE ioipsl,             ONLY: flininfo, flinopen, flinget, flinclo,          &
-   ioconf_calendar, ioget_calendar, lock_calendar, ioget_mon_len, ioget_year_len
+  USE ioipsl,             ONLY: flininfo, flinopen, flinget, flinclo
   USE assert_eq_m,        ONLY: assert_eq
+  USE cal_tools_m,        ONLY: year_len, mid_month
   USE conf_dat_m,         ONLY: conf_dat2d, conf_dat3d
   USE dimphy,             ONLY: klon, zmasq
-  USE geometry_mod, ONLY: longitude_deg, latitude_deg
+  USE geometry_mod,       ONLY: longitude_deg, latitude_deg
   USE phys_state_var_mod, ONLY: pctsrf
-  USE control_mod, ONLY: anneeref
+  USE control_mod,        ONLY: anneeref
   USE init_ssrf_m,        ONLY: start_init_subsurf
 
@@ -123,5 +123,5 @@
 
 !--- Beware: anneeref (from gcm.def) is used to determine output time sampling
-  ndays=ioget_year_len(anneeref)
+  ndays=year_len(anneeref)
 
 !--- RUGOSITY TREATMENT --------------------------------------------------------
@@ -375,9 +375,13 @@
 !--- Read unit for sea-ice variable only
   IF (mode=='SIC') THEN
-    IF(NF90_GET_ATT(ncid, varid, 'units', unit_sic)/=NF90_NOERR) THEN
+    ierr=NF90_GET_ATT(ncid, varid, 'units', unit_sic); CALL strclean(unit_sic)
+    IF(ierr/=NF90_NOERR) THEN
       CALL msg(5,'No unit in sea-ice file. Take percentage as default value')
       unit_sic='X'
+    ELSE IF(ANY(["%  ","1.0","1  "]==unit_sic)) THEN
+      CALL msg(5,'Sea-ice cover has unit='//TRIM(unit_sic))
     ELSE
-      CALL msg(5,'Sea-ice cover has unit='//TRIM(unit_sic))
+      CALL abort_physic('SIC','Unrecognized unit for sea-ice file: '&
+        //TRIM(unit_sic),1)
     END IF
   END IF
@@ -418,5 +422,5 @@
 !--- Rebuilding input time vector (field from input file might be unreliable)
   IF(lmdep==12) THEN
-    timeyear=mid_month(anneeref, cal_in, ndays_in)
+    timeyear=mid_month(anneeref, cal_in)
     CALL msg(0,'Monthly input file(s) for '//TRIM(title)//'.')
   ELSE IF(lmdep==ndays_in) THEN
@@ -426,5 +430,5 @@
     WRITE(mess,'(a,i3,a,i3,a)')'Mismatching input file: found',lmdep,        &
       ' records, 12/',ndays_in,' (monthly/daily needed).'
-    CALL abort_physic('mid_months',TRIM(mess),1)
+    CALL abort_physic('mid_month',TRIM(mess),1)
   END IF
 
@@ -433,13 +437,25 @@
   IF(extrp) ALLOCATE(work(imdep, jmdep))
   CALL msg(5,'')
-  CALL msg(5,'LECTURE ET INTERPOLATION HORIZ. DE ', lmdep, ' CHAMPS.')
+  CALL msg(5,'READ AND INTERPOLATE HORIZONTALLY ', lmdep, ' FIELDS.')
   CALL ncerr(NF90_INQ_VARID(ncid, varname, varid), fnam)
   DO l=1, lmdep
     CALL ncerr(NF90_GET_VAR(ncid,varid,champ,[1,1,l],[imdep,jmdep,1]),fnam)
+    !--- Check whether values are acceptable for SIC, depending on unit.
+    IF(mode=='SIC') THEN
+      IF(TRIM(unit_sic)=="1".OR.TRIM(unit_sic)=="1.0") THEN
+        IF(ANY(champ>1.0+EPSFRA)) &
+          CALL abort_physic('SIC','Found sea-ice fractions greater than 1.')
+      ELSE IF(TRIM(unit_sic)=="X".OR.TRIM(unit_sic)=="%") THEN
+!        IF(ANY(champ>100.0+EPSFRA)) &
+!          CALL abort_physic('SIC','Found sea-ice percentages greater than 100.')
+        IF(MAXVAL(champ)< 1.01) &
+          CALL abort_physic('SIC','All sea-ice percentages lower than 1.')
+      END IF
+    END IF
     CALL conf_dat2d(title, dlon_ini, dlat_ini, dlon, dlat, champ, .TRUE.)
     IF(extrp) CALL extrapol(champ,imdep,jmdep,999999.,.TRUE.,.TRUE.,2,work)
     IF(l==1) THEN
       CALL msg(5,"----------------------------------------------------------")
-      CALL msg(5,"$$$ Interpolation barycentrique pour "//TRIM(title)//" $$$")
+      CALL msg(5,"$$$ Barycentrique interpolation for "//TRIM(title)//" $$$")
       CALL msg(5,"----------------------------------------------------------")
     END IF
@@ -504,16 +520,16 @@
      IF(ndays/=ndays_in) THEN
         WRITE(lunout, *)
-        WRITE(lunout,*)'DIFFERENTES LONGEURS D ANNEES:'
-        WRITE(lunout,*)' Dans le fichier d entree: ',ndays_in
-        WRITE(lunout,*)' Dans le fichier de sortie: ',ndays
+        WRITE(lunout,*)'DIFFERENT YEAR LENGTHS:'
+        WRITE(lunout,*)' In the input file: ',ndays_in
+        WRITE(lunout,*)' In the output file: ',ndays
      END IF
      IF(lmdep==ndays_in) THEN
         WRITE(lunout, *)
-        WRITE(lunout, *)'PAS D INTERPOLATION TEMPORELLE.'
-        WRITE(lunout, *)' Fichier journalier en entree.'
+        WRITE(lunout, *)'NO TIME INTERPOLATION.'
+        WRITE(lunout, *)' Daily input file.'
      ELSE
-        WRITE(lunout, *)'INTERPOLATION TEMPORELLE.'
-        WRITE(lunout, *)' Vecteur temps en entree: ', timeyear
-        WRITE(lunout, *)' Vecteur temps en sortie de 0 a ', ndays-1
+        WRITE(lunout, *)'TIME INTERPOLATION.'
+        WRITE(lunout, *)' Input time vector: ', timeyear
+        WRITE(lunout, *)' Output time vector from 0 to ', ndays-1
      END IF
   END IF
@@ -542,10 +558,10 @@
   DO j=1, jjp1
     CALL minmax(iip1, champan(1, j, 10), chmin, chmax)
-    IF (prt_level>5) WRITE(lunout, *)' ',TRIM(title),' au temps 10 ', chmin, chmax, j
+    IF (prt_level>5) WRITE(lunout, *)' ',TRIM(title),' at time 10 ', chmin, chmax, j
   END DO
 
 !--- SPECIAL FILTER FOR SST: SST>271.38 --------------------------------------
   IF(mode=='SST') THEN
-    CALL msg(5,'Filtrage de la SST: SST >= 271.38')
+    CALL msg(0,'Filtering SST: SST >= 271.38')
     WHERE(champan<271.38) champan=271.38
   END IF
@@ -553,16 +569,14 @@
 !--- SPECIAL FILTER FOR SIC: 0.0<SIC<1.0 -------------------------------------
   IF(mode=='SIC') THEN
-    CALL msg(5,'Filtrage de la SIC: 0.0 < Sea-ice < 1.0')
-
-    IF (unit_sic=='1') THEN
+    CALL msg(0,'Filtering SIC: 0.0 < Sea-ice < 1.0')
+    IF(TRIM(unit_sic)=="1".OR.TRIM(unit_sic)=="1.0") THEN
        ! Nothing to be done for sea-ice field is already in fraction of 1
        ! This is the case for sea-ice in file cpl_atm_sic.nc
-       CALL msg(5,'Sea-ice field already in fraction of 1')
+       CALL msg(0,'Sea-ice field already in fraction of 1')
     ELSE
        ! Convert sea ice from percentage to fraction of 1
-       CALL msg(5,'Transformt sea-ice field from percentage to fraction of 1.')
+       CALL msg(0,'Sea-ice field converted from percentage to fraction of 1.')
        champan(:, :, :)=champan(:, :, :)/100.
     END IF
-
     champan(iip1, :, :)=champan(1, :, :)
     WHERE(champan>1.0) champan=1.0
@@ -647,80 +661,4 @@
 !-------------------------------------------------------------------------------
 !
-FUNCTION year_len(y,cal_in)
-!
-!-------------------------------------------------------------------------------
-  IMPLICIT NONE
-!-------------------------------------------------------------------------------
-! Arguments:
-  INTEGER                       :: year_len
-  INTEGER,           INTENT(IN) :: y
-  CHARACTER(LEN=*),  INTENT(IN) :: cal_in
-!-------------------------------------------------------------------------------
-! Local variables:
-  CHARACTER(LEN=20)             :: cal_out              ! calendar (for outputs)
-!-------------------------------------------------------------------------------
-!--- Getting the input calendar to reset at the end of the function
-  CALL ioget_calendar(cal_out)
-
-!--- Unlocking calendar and setting it to wanted one
-  CALL lock_calendar(.FALSE.); CALL ioconf_calendar(TRIM(cal_in))
-
-!--- Getting the number of days in this year
-  year_len=ioget_year_len(y)
-
-!--- Back to original calendar
-  CALL lock_calendar(.FALSE.); CALL ioconf_calendar(TRIM(cal_out))
-
-END FUNCTION year_len
-!
-!-------------------------------------------------------------------------------
-
-
-!-------------------------------------------------------------------------------
-!
-FUNCTION mid_month(y,cal_in,ndays_out)
-!
-!-------------------------------------------------------------------------------
-  IMPLICIT NONE
-!-------------------------------------------------------------------------------
-! Arguments:
-  INTEGER,          INTENT(IN) :: y           ! year
-  CHARACTER(LEN=*), INTENT(IN) :: cal_in      ! calendar
-  INTEGER,          INTENT(IN) :: ndays_out   ! days   number
-  REAL,          DIMENSION(14) :: mid_month   ! mid-bins times
-!-------------------------------------------------------------------------------
-! Local variables:
-  CHARACTER(LEN=99)      :: mess              ! error message
-  CHARACTER(LEN=20)      :: cal_out           ! output calendar
-  INTEGER, DIMENSION(14) :: tlen              ! months lengths (days)
-  INTEGER                :: m                 ! months counter
-  INTEGER                :: nd                ! number of days
-!-------------------------------------------------------------------------------
-  !--- Save the input calendar to reset it at the end of the function
-  CALL ioget_calendar(cal_out)
-
-  !--- Unlock calendar and set it to "cal_in"
-  CALL lock_calendar(.FALSE.); CALL ioconf_calendar(TRIM(cal_in))
-
-  !--- Get the length of each month
-  tlen(1 )=ioget_mon_len(y-1,12)
-  DO m=1,12; tlen(m+1)=ioget_mon_len(y,m); END DO
-  tlen(14)=ioget_mon_len(y+1, 1)
-
-  !--- Mid-bins times
-  mid_month(1)=-0.5*REAL(tlen(1))
-  DO m=2,14; mid_month(m)=mid_month(m-1)+0.5*REAL(tlen(m-1)+tlen(m)); END DO
-
-  !--- Back to original calendar
-  CALL lock_calendar(.FALSE.); CALL ioconf_calendar(TRIM(cal_out))
-
-END FUNCTION mid_month
-!
-!-------------------------------------------------------------------------------
-
-
-
-!-------------------------------------------------------------------------------
-!
 SUBROUTINE msg(lev,str1,i,str2)
 !
Index: LMDZ5/branches/testing/libf/misc/wxios.F90
===================================================================
--- LMDZ5/branches/testing/libf/misc/wxios.F90	(revision 2729)
+++ LMDZ5/branches/testing/libf/misc/wxios.F90	(revision 2787)
@@ -25,4 +25,8 @@
 !$OMP THREADPRIVATE(missing_val)
 
+#ifdef XIOS1
+#error "XIOS v1 no longer supported, use XIOS v2."
+#endif
+
     CONTAINS
     
@@ -33,9 +37,5 @@
     SUBROUTINE reformadate(odate, ndate)
         CHARACTER(len=*), INTENT(IN) :: odate
-#ifdef XIOS1
-        CHARACTER(len=100), INTENT(OUT) :: ndate
-#else
         TYPE(xios_duration) :: ndate
-#endif
         
         INTEGER :: i = 0
@@ -52,27 +52,15 @@
         i = INDEX(odate, "day")
         IF (i > 0) THEN
-#ifdef XIOS1
-            ndate = odate(1:i-1)//"d"
-#else
             read(odate(1:i-1),*) ndate%day
-#endif
         END IF
 
         i = INDEX(odate, "hr")
         IF (i > 0) THEN
-#ifdef XIOS1
-            ndate = odate(1:i-1)//"h"
-#else
             read(odate(1:i-1),*) ndate%hour
-#endif
         END IF
 
         i = INDEX(odate, "mth")
         IF (i > 0) THEN
-#ifdef XIOS1
-            ndate = odate(1:i-1)//"mo"
-#else
             read(odate(1:i-1),*) ndate%month
-#endif
         END IF
         
@@ -197,34 +185,10 @@
      
      !Variables pour xios:
-#ifdef XIOS1
-     TYPE(xios_time) :: mdtime
-#else
      TYPE(xios_duration) :: mdtime
-#endif
      !REAL(kind = 8) :: year=0, month=0, day=0, hour=0, minute=0, second=0
      
-#ifdef XIOS1
-        mdtime = xios_time(0, 0, 0, 0, 0, pasdetemps)
-#else
         mdtime%second=pasdetemps
-#endif
 
         !Réglage du calendrier:
-#ifdef XIOS1
-        SELECT CASE (calendrier)
-            CASE('earth_360d')
-                CALL xios_set_context_attr_hdl(g_ctx, calendar_type= "D360")
-                IF (prt_level >= 10) WRITE(lunout,*) 'wxios_set_cal: Calendrier terrestre a 360 jours/an'
-            CASE('earth_365d')
-                CALL xios_set_context_attr_hdl(g_ctx, calendar_type= "NoLeap")
-                IF (prt_level >= 10) WRITE(lunout,*) 'wxios_set_cal: Calendrier terrestre a 365 jours/an'
-            CASE('gregorian')
-                CALL xios_set_context_attr_hdl(g_ctx, calendar_type= "Gregorian")
-                IF (prt_level >= 10) WRITE(lunout,*) 'wxios_set_cal: Calendrier gregorien'
-            CASE DEFAULT
-                abort_message = 'wxios_set_cal: Mauvais choix de calendrier'
-                CALL abort_gcm('Gcm:Xios',abort_message,1)
-        END SELECT
-#else
         SELECT CASE (calendrier)
             CASE('earth_360d')
@@ -241,5 +205,4 @@
                 CALL abort_gcm('Gcm:Xios',abort_message,1)
         END SELECT
-#endif
         
         !Formatage de la date d'origine:
@@ -247,9 +210,5 @@
         
         IF (prt_level >= 10) WRITE(lunout,*) "wxios_set_cal: Time origin: ", date
-#ifdef XIOS1
-        CALL xios_set_context_attr_hdl(g_ctx, time_origin = date)
-#else
         CALL xios_set_time_origin(xios_date(annee,mois,jour,int(heure),0,0))
-#endif
 
         !Formatage de la date de debut:
@@ -259,9 +218,5 @@
         IF (prt_level >= 10) WRITE(lunout,*) "wxios_set_cal: Start date: ", date
         
-#ifdef XIOS1
-        CALL xios_set_context_attr_hdl(g_ctx, start_date = date)
-#else
         CALL xios_set_start_date(xios_date(ini_an,ini_mois,ini_jour,int(ini_heure),0,0))
-#endif
         
         !Et enfin,le pas de temps:
@@ -272,13 +227,7 @@
     SUBROUTINE wxios_set_timestep(ts)
         REAL, INTENT(IN) :: ts
-#ifdef XIOS1
-        TYPE(xios_time) :: mdtime     
-
-        mdtime = xios_time(0, 0, 0, 0, 0, ts)
-#else
         TYPE(xios_duration) :: mdtime     
 
         mdtime%timestep = ts
-#endif
 
         CALL xios_set_timestep(mdtime)
@@ -334,13 +283,7 @@
         
         !On parametrise le domaine:
-#ifdef XIOS1
-        CALL xios_set_domain_attr_hdl(dom, ni_glo=ni_glo, ibegin=ibegin, ni=ni)
-        CALL xios_set_domain_attr_hdl(dom, nj_glo=nj_glo, jbegin=jbegin, nj=nj, data_dim=2)
-        CALL xios_set_domain_attr_hdl(dom, lonvalue=io_lon(ibegin:iend), latvalue=io_lat(jbegin:jend))
-#else
         CALL xios_set_domain_attr_hdl(dom, ni_glo=ni_glo, ibegin=ibegin-1, ni=ni, type="rectilinear")
         CALL xios_set_domain_attr_hdl(dom, nj_glo=nj_glo, jbegin=jbegin-1, nj=nj, data_dim=2)
         CALL xios_set_domain_attr_hdl(dom, lonvalue_1d=io_lon(ibegin:iend), latvalue_1d=io_lat(jbegin:jend))
-#endif
         IF (.NOT.is_sequential) THEN
             mask(:,:)=.TRUE.
@@ -353,9 +296,5 @@
               WRITE(lunout,*) "wxios_domain_param: mpirank=",mpi_rank," mask(:,nj)=",mask(:,nj)
             ENDIF
-#ifdef XIOS1
-            CALL xios_set_domain_attr_hdl(dom, mask=mask)
-#else
             CALL xios_set_domain_attr_hdl(dom, mask_2d=mask)
-#endif
         END IF
 
@@ -401,9 +340,6 @@
         
         ! Ehouarn: New way to declare axis, without axis_group:
-#ifdef XIOS1
-        CALL xios_set_axis_attr(trim(axis_id),size=axis_size,value=axis_value)
-#else
         CALL xios_set_axis_attr(trim(axis_id),n_glo=axis_size,value=axis_value)
-#endif        
+
         !Vérification:
         IF (xios_is_valid_axis(TRIM(ADJUSTL(axis_id)))) THEN
@@ -429,9 +365,5 @@
         TYPE(xios_file) :: x_file
         TYPE(xios_filegroup) :: x_fg
-#ifdef XIOS1
-        CHARACTER(len=100) :: nffreq
-#else
         TYPE(xios_duration) :: nffreq
-#endif
         
         !On regarde si le fichier n'est pas défini par XML:
@@ -445,28 +377,15 @@
         
             !On configure:
-#ifdef XIOS1
-            CALL xios_set_file_attr_hdl(x_file, name="X"//fname,&
-                output_freq=TRIM(ADJUSTL(nffreq)), output_level=flvl, enabled=.TRUE.)
-#else
             CALL xios_set_file_attr_hdl(x_file, name="X"//fname,&
                 output_freq=nffreq, output_level=flvl, enabled=.TRUE.)
-#endif
        
             IF (xios_is_valid_file("X"//fname)) THEN
                 IF (prt_level >= 10) THEN
                   WRITE(lunout,*) "wxios_add_file: New file: ", "X"//fname
-#ifdef XIOS1
-                  WRITE(lunout,*) "wxios_add_file: output_freq=",TRIM(ADJUSTL(nffreq)),"; output_lvl=",flvl
-#else
                   WRITE(lunout,*) "wxios_add_file: output_freq=",nffreq,"; output_lvl=",flvl
-#endif
                 ENDIF
             ELSE
                 WRITE(lunout,*) "wxios_add_file: Error, invalid file: ", "X"//trim(fname)
-#ifdef XIOS1
-                WRITE(lunout,*) "wxios_add_file: output_freq=",TRIM(ADJUSTL(nffreq)),"; output_lvl=",flvl
-#else
                 WRITE(lunout,*) "wxios_add_file: output_freq=",nffreq,"; output_lvl=",flvl
-#endif
             END IF
         ELSE
@@ -538,7 +457,6 @@
         TYPE(xios_field) :: field
         TYPE(xios_fieldgroup) :: fieldgroup
-#ifndef XIOS1
         TYPE(xios_duration) :: freq_op
-#endif
+
         LOGICAL :: bool=.FALSE.
         INTEGER :: lvl =0
@@ -599,10 +517,6 @@
             
             !L'operation, sa frequence:
-#ifdef XIOS1
-            CALL xios_set_field_attr_hdl(field, field_ref=fieldname, operation=TRIM(ADJUSTL(operation)), freq_op="1ts", prec=4)
-#else
             freq_op%timestep=1
             CALL xios_set_field_attr_hdl(field, field_ref=fieldname, operation=TRIM(ADJUSTL(operation)), freq_op=freq_op, prec=4)
-#endif
 
             
Index: LMDZ5/branches/testing/libf/phylmd/Dust/phys_output_write_spl_mod.F90
===================================================================
--- LMDZ5/branches/testing/libf/phylmd/Dust/phys_output_write_spl_mod.F90	(revision 2729)
+++ LMDZ5/branches/testing/libf/phylmd/Dust/phys_output_write_spl_mod.F90	(revision 2787)
@@ -6,8 +6,7 @@
 !JE20150620<<
 !JE20150620>>
-
 !JE20150620<<
 
-    USE time_phylmdz_mod, only: day_step_phy, start_time, itau_phy
+  USE time_phylmdz_mod, ONLY: day_step_phy, start_time, itau_phy
 
   USE phytracr_spl_mod, ONLY : ok_chimeredust, id_prec, id_fine, id_coss, &
@@ -93,7 +92,8 @@
     ! defined and initialised in phys_output_mod.F90
 
-    USE dimphy, only: klon, klev, klevp1, nslay
-    USE control_mod, only: day_step, iphysiq
-    USE phys_output_ctrlout_mod, only: o_phis, o_aire, is_ter, is_lic, is_oce, &
+    USE dimphy, ONLY: klon, klev, klevp1
+    USE ocean_slab_mod, ONLY: nslay
+    USE control_mod, ONLY: day_step, iphysiq
+    USE phys_output_ctrlout_mod, ONLY: o_phis, o_aire, is_ter, is_lic, is_oce, &
          is_ave, is_sic, o_contfracATM, o_contfracOR, &
          o_aireTER, o_flat, o_slp, o_tsol, &
@@ -287,5 +287,5 @@
 !JE20150620>>
 
-    USE phys_state_var_mod, only: pctsrf, paire_ter, rain_fall, snow_fall, &
+    USE phys_state_var_mod, ONLY: pctsrf, paire_ter, rain_fall, snow_fall, &
          qsol, z0m, z0h, fevap, agesno, &
          nday_rain, rain_con, snow_con, &
@@ -314,5 +314,5 @@
          vphiSTD, wTSTD, u2STD, v2STD, T2STD, missing_val_nf90
 
-    USE phys_local_var_mod, only: zxfluxlat, slp, zxtsol, zt2m, &
+    USE phys_local_var_mod, ONLY: zxfluxlat, slp, zxtsol, zt2m, &
          t2m_min_mon, t2m_max_mon, evap, &
          zu10m, zv10m, zq2m, zustar, zxqsurf, &
@@ -369,29 +369,27 @@
          d_q_ch4, pmfd, pmfu, ref_liq, ref_ice, rhwriteSTD
 
-    USE phys_output_var_mod, only: vars_defined, snow_o, zfra_o, bils_diss, &
+    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, zvstr_gwd_rando
-    USE ocean_slab_mod, only: tslab, slab_bils, slab_bilg, tice, seaice
-    USE pbl_surface_mod, only: snow
-    USE indice_sol_mod, only: nbsrf
-    USE infotrac, only: nqtot, nqo, nbtr, type_trac
-    USE geometry_mod, only: cell_area
-    USE surface_data, only: type_ocean, version_ocean, ok_veget, ok_snow
-!    USE aero_mod, only: naero_spc
-    USE aero_mod, only: naero_tot, id_STRAT_phy
-    USE ioipsl, only: histend, histsync
-    USE iophy, only: set_itau_iophy, histwrite_phy
-    USE netcdf, only: nf90_fill_real
+    USE ocean_slab_mod, ONLY: tslab, slab_bils, slab_bilg, tice, seaice
+    USE pbl_surface_mod, ONLY: snow
+    USE indice_sol_mod, ONLY: nbsrf
+    USE infotrac, ONLY: nqtot, nqo, nbtr, type_trac
+    USE geometry_mod, ONLY: cell_area
+    USE surface_data, ONLY: type_ocean, version_ocean, ok_veget, ok_snow
+!    USE aero_mod, ONLY: naero_spc
+    USE aero_mod, ONLY: naero_tot, id_STRAT_phy
+    USE ioipsl, ONLY: histend, histsync
+    USE iophy, ONLY: set_itau_iophy, histwrite_phy
+    USE netcdf, ONLY: nf90_fill_real
 
 #ifdef CPP_XIOS
     ! ug Pour les sorties XIOS
     USE xios, ONLY: xios_update_calendar
-    USE wxios, only: wxios_closedef, missing_val
+    USE wxios, ONLY: wxios_closedef, missing_val
 #endif
-    USE phys_cal_mod, only : mth_len
-
+    USE phys_cal_mod, ONLY : mth_len
 
     IMPLICIT NONE
-
 
 !   INCLUDE "temps.h"
@@ -445,5 +443,5 @@
     CALL set_itau_iophy(itau_w)
 
-    IF(.NOT.vars_defined) THEN
+    IF (.NOT.vars_defined) THEN
        iinitend = 2
     ELSE
@@ -456,10 +454,10 @@
        !$OMP MASTER
        IF (vars_defined) THEN
-          if (prt_level >= 10) then
+          IF (prt_level >= 10) THEN
              write(lunout,*)"phys_output_write: call xios_update_calendar, itau_w=",itau_w
-          endif
+          ENDIF
 !          CALL xios_update_calendar(itau_w)
           CALL xios_update_calendar(itap)
-       END IF
+       ENDIF
        !$OMP END MASTER
        !$OMP BARRIER
@@ -751,14 +749,14 @@
        CALL histwrite_phy(o_uq, uq)
        CALL histwrite_phy(o_vq, vq)
-       IF(iflag_con.GE.3) THEN ! sb
+       IF (iflag_con.GE.3) THEN ! sb
           CALL histwrite_phy(o_cape, cape)
           CALL histwrite_phy(o_pbase, ema_pcb)
           CALL histwrite_phy(o_ptop, ema_pct)
           CALL histwrite_phy(o_fbase, ema_cbmf)
-          if (iflag_con /= 30) then
+          IF (iflag_con /= 30) THEN
              CALL histwrite_phy(o_plcl, plcl)
              CALL histwrite_phy(o_plfc, plfc)
              CALL histwrite_phy(o_wbeff, wbeff)
-          end if
+          ENDIF
 
           CALL histwrite_phy(o_cape_max, cape)
@@ -771,5 +769,5 @@
           CALL histwrite_phy(o_ftime_con, zx_tmp_fi2d)
           IF (vars_defined) THEN
-             IF(iflag_thermals>=1)THEN
+             IF (iflag_thermals>=1)THEN
                 zx_tmp_fi3d=dnwd+dnwd0+upwd+fm_therm(:,1:klev)
              ELSE
@@ -820,5 +818,5 @@
           DO k=1, nlevSTD
              bb2=clevSTD(k) 
-             IF(bb2.EQ."850".OR.bb2.EQ."700".OR. &
+             IF (bb2.EQ."850".OR.bb2.EQ."700".OR. &
                   bb2.EQ."500".OR.bb2.EQ."200".OR. &
                   bb2.EQ."100".OR. &
@@ -840,6 +838,7 @@
 #endif
 #endif
+
 #ifdef CPP_XIOS
-  IF(ok_all_xml) THEN
+  IF (ok_all_xml) THEN
 !XIOS  CALL xios_get_field_attr("u850",default_value=missing_val)
 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@@ -847,5 +846,5 @@
           DO k=1, nlevSTD
              bb2=clevSTD(k) 
-             IF(bb2.EQ."850".OR.bb2.EQ."700".OR. &
+             IF (bb2.EQ."850".OR.bb2.EQ."700".OR. &
                 bb2.EQ."500".OR.bb2.EQ."200".OR. &
                 bb2.EQ."100".OR. &
@@ -940,10 +939,10 @@
           ELSE
               CALL histwrite_phy(o_tslab, tslab)
-          END IF
+          ENDIF
           IF (version_ocean=='sicINT') THEN
               CALL histwrite_phy(o_slab_bilg, slab_bilg)
               CALL histwrite_phy(o_slab_tice, tice)
               CALL histwrite_phy(o_slab_sic, seaice)
-          END IF
+          ENDIF
        ENDIF !type_ocean == force/slab
        CALL histwrite_phy(o_weakinv, weak_inversion)
@@ -1029,5 +1028,5 @@
                 CALL histwrite_phy(o_tausumaero(naero), &
                      tausum_aero(:,2,naero) )
-             END DO
+             ENDDO
           ENDIF
           IF (flag_aerosol_strat>=1) THEN
@@ -1046,5 +1045,5 @@
           CALL histwrite_phy(o_sollwad0, sollwad0_aero)
           !====MS forcing diagnostics
-          if (new_aod) then
+          IF (new_aod) THEN
              CALL histwrite_phy(o_swtoaas_nat, topsw_aero(:,1))
              CALL histwrite_phy(o_swsrfas_nat, solsw_aero(:,1))
@@ -1057,5 +1056,5 @@
              CALL histwrite_phy(o_swsrfcs_ant, solsw0_aero(:,2))
              !cf
-             if (.not. aerosol_couple) then
+             IF (.not. aerosol_couple) THEN
                 CALL histwrite_phy(o_swtoacf_nat, topswcf_aero(:,1))
                 CALL histwrite_phy(o_swsrfcf_nat, solswcf_aero(:,1))
@@ -1064,6 +1063,6 @@
                 CALL histwrite_phy(o_swtoacf_zero,topswcf_aero(:,3))
                 CALL histwrite_phy(o_swsrfcf_zero,solswcf_aero(:,3))
-             endif
-          endif ! new_aod
+             ENDIF
+          ENDIF ! new_aod
           !====MS forcing diagnostics
        ENDIF
@@ -1085,5 +1084,5 @@
        ENDIF
        ! Champs 3D:
-       IF (ok_ade .OR. ok_aie) then
+       IF (ok_ade .OR. ok_aie) THEN
           CALL histwrite_phy(o_ec550aer, ec550aer)
        ENDIF
@@ -1170,9 +1169,9 @@
        CALL histwrite_phy(o_alb2, albsol2)
        !FH Sorties pour la couche limite
-       if (iflag_pbl>1) then
+       IF (iflag_pbl>1) THEN
           zx_tmp_fi3d=0.
           IF (vars_defined) THEN
-             do nsrf=1,nbsrf
-                do k=1,klev
+             DO nsrf=1,nbsrf
+                DO k=1,klev
                    zx_tmp_fi3d(:,k)=zx_tmp_fi3d(:,k) &
                         +pctsrf(:,nsrf)*pbl_tke(:,k,nsrf)
@@ -1199,5 +1198,5 @@
        ENDIF
        CALL histwrite_phy(o_dtcon, zx_tmp_fi3d)
-       if(iflag_thermals.eq.0)then
+       IF (iflag_thermals.eq.0)THEN
           IF (vars_defined) THEN
              zx_tmp_fi3d(1:klon,1:klev)=d_t_con(1:klon,1:klev)/pdtphys + &
@@ -1205,5 +1204,5 @@
           ENDIF
           CALL histwrite_phy(o_tntc, zx_tmp_fi3d)
-       else if(iflag_thermals.ge.1.and.iflag_wake.EQ.1)then
+       ELSEIF (iflag_thermals.ge.1.and.iflag_wake.EQ.1)THEN
           IF (vars_defined) THEN
              zx_tmp_fi3d(1:klon,1:klev)=d_t_con(1:klon,1:klev)/pdtphys + &
@@ -1212,5 +1211,5 @@
           ENDIF
           CALL histwrite_phy(o_tntc, zx_tmp_fi3d)
-       endif
+       ENDIF
        IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_u_con(1:klon,1:klev)/pdtphys
        CALL histwrite_phy(o_ducon, zx_tmp_fi3d)
@@ -1220,8 +1219,8 @@
        CALL histwrite_phy(o_dqcon, zx_tmp_fi3d)
 
-       IF(iflag_thermals.EQ.0) THEN
+       IF (iflag_thermals.EQ.0) THEN
           IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_q_con(1:klon,1:klev)/pdtphys
           CALL histwrite_phy(o_tnhusc, zx_tmp_fi3d)
-       ELSE IF(iflag_thermals.GE.1.AND.iflag_wake.EQ.1) THEN
+       ELSEIF (iflag_thermals.GE.1.AND.iflag_wake.EQ.1) THEN
           IF (vars_defined) THEN
              zx_tmp_fi3d(1:klon,1:klev)=d_q_con(1:klon,1:klev)/pdtphys + &
@@ -1243,23 +1242,23 @@
 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
        ! Sorties specifiques a la separation thermiques/non thermiques
-       if (iflag_thermals>=1) then
-          IF(vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_lscth(1:klon,1:klev)/pdtphys
+       IF (iflag_thermals>=1) THEN
+          IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_lscth(1:klon,1:klev)/pdtphys
           CALL histwrite_phy(o_dtlscth, zx_tmp_fi3d)
-          IF(vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_lscst(1:klon,1:klev)/pdtphys
+          IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_lscst(1:klon,1:klev)/pdtphys
           CALL histwrite_phy(o_dtlscst, zx_tmp_fi3d)
-          IF(vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_q_lscth(1:klon,1:klev)/pdtphys
+          IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_q_lscth(1:klon,1:klev)/pdtphys
           CALL histwrite_phy(o_dqlscth, zx_tmp_fi3d)
-          IF(vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_q_lscst(1:klon,1:klev)/pdtphys
+          IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_q_lscst(1:klon,1:klev)/pdtphys
           CALL histwrite_phy(o_dqlscst, zx_tmp_fi3d)
           CALL histwrite_phy(o_plulth, plul_th)
           CALL histwrite_phy(o_plulst, plul_st)
           IF (vars_defined) THEN
-             do k=1,klev
-                do i=1,klon
-                   if (ptconvth(i,k)) then
+             DO k=1,klev
+                DO i=1,klon
+                   IF (ptconvth(i,k)) THEN
                       zx_tmp_fi3d(i,k)=1.
-                   else
+                   ELSE
                       zx_tmp_fi3d(i,k)=0.
-                   endif
+                   ENDIF
                 enddo
              enddo
@@ -1267,14 +1266,14 @@
           CALL histwrite_phy(o_ptconvth, zx_tmp_fi3d)
           IF (vars_defined) THEN
-             do i=1,klon
+             DO i=1,klon
                 zx_tmp_fi2d(1:klon)=lmax_th(:)
              enddo
           ENDIF
           CALL histwrite_phy(o_lmaxth, zx_tmp_fi2d)
-       endif ! iflag_thermals>=1
+       ENDIF ! iflag_thermals>=1
 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
        IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_vdf(1:klon,1:klev)/pdtphys
        CALL histwrite_phy(o_dtvdf, zx_tmp_fi3d)
-       IF(vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_diss(1:klon,1:klev)/pdtphys
+       IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_diss(1:klon,1:klev)/pdtphys
        CALL histwrite_phy(o_dtdis, zx_tmp_fi3d)
        IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_q_vdf(1:klon,1:klev)/pdtphys
@@ -1320,57 +1319,57 @@
           CALL histwrite_phy(o_dqthe, zx_tmp_fi3d)
        ENDIF !iflag_thermals
-       IF(vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_ajsb(1:klon,1:klev)/pdtphys
+       IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_ajsb(1:klon,1:klev)/pdtphys
        CALL histwrite_phy(o_dtajs, zx_tmp_fi3d)
-       IF(vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_q_ajsb(1:klon,1:klev)/pdtphys
+       IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_q_ajsb(1:klon,1:klev)/pdtphys
        CALL histwrite_phy(o_dqajs, zx_tmp_fi3d)
-       IF(vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_swr(1:klon,1:klev)/pdtphys
+       IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_swr(1:klon,1:klev)/pdtphys
        CALL histwrite_phy(o_dtswr, zx_tmp_fi3d)
-       IF(vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_sw0(1:klon,1:klev)/pdtphys
+       IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_sw0(1:klon,1:klev)/pdtphys
        CALL histwrite_phy(o_dtsw0, zx_tmp_fi3d)
-       IF(vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_lwr(1:klon,1:klev)/pdtphys
+       IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_lwr(1:klon,1:klev)/pdtphys
        CALL histwrite_phy(o_dtlwr, zx_tmp_fi3d)
-       IF(vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_lw0(1:klon,1:klev)/pdtphys
+       IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_lw0(1:klon,1:klev)/pdtphys
        CALL histwrite_phy(o_dtlw0, zx_tmp_fi3d)
-       IF(vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_ec(1:klon,1:klev)/pdtphys
+       IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_ec(1:klon,1:klev)/pdtphys
        CALL histwrite_phy(o_dtec, zx_tmp_fi3d)
-       IF(vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_u_vdf(1:klon,1:klev)/pdtphys
+       IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_u_vdf(1:klon,1:klev)/pdtphys
        CALL histwrite_phy(o_duvdf, zx_tmp_fi3d)
-       IF(vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_v_vdf(1:klon,1:klev)/pdtphys
+       IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_v_vdf(1:klon,1:klev)/pdtphys
        CALL histwrite_phy(o_dvvdf, zx_tmp_fi3d)
        IF (ok_orodr) THEN
-          IF(vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_u_oro(1:klon,1:klev)/pdtphys
+          IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_u_oro(1:klon,1:klev)/pdtphys
           CALL histwrite_phy(o_duoro, zx_tmp_fi3d)
-          IF(vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_v_oro(1:klon,1:klev)/pdtphys
+          IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_v_oro(1:klon,1:klev)/pdtphys
           CALL histwrite_phy(o_dvoro, zx_tmp_fi3d)
-          IF(vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_oro(1:klon,1:klev)/pdtphys
+          IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_oro(1:klon,1:klev)/pdtphys
           CALL histwrite_phy(o_dtoro, zx_tmp_fi3d)
        ENDIF
        IF (ok_orolf) THEN
-          IF(vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_u_lif(1:klon,1:klev)/pdtphys
+          IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_u_lIF (1:klon,1:klev)/pdtphys
           CALL histwrite_phy(o_dulif, zx_tmp_fi3d)
 
-          IF(vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_v_lif(1:klon,1:klev)/pdtphys
+          IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_v_lIF (1:klon,1:klev)/pdtphys
           CALL histwrite_phy(o_dvlif, zx_tmp_fi3d)
 
-          IF(vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_lif(1:klon,1:klev)/pdtphys
+          IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_lIF (1:klon,1:klev)/pdtphys
           CALL histwrite_phy(o_dtlif, zx_tmp_fi3d)
        ENDIF
 
 !      IF (ok_hines) THEN
-!         IF(vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_u_hin(1:klon,1:klev)/pdtphys
+!         IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_u_hin(1:klon,1:klev)/pdtphys
 !         CALL histwrite_phy(o_duhin, zx_tmp_fi3d)
-!         IF(vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_v_hin(1:klon,1:klev)/pdtphys
+!         IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_v_hin(1:klon,1:klev)/pdtphys
 !         CALL histwrite_phy(o_dvhin, zx_tmp_fi3d)
-!         IF(vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_hin(1:klon,1:klev)/pdtphys
+!         IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_hin(1:klon,1:klev)/pdtphys
 !         CALL histwrite_phy(o_dthin, zx_tmp_fi3d)
 !      ENDIF
 
-!      IF (ok_gwd_rando) then
-!         CALL histwrite_phy(o_du_gwd_rando, du_gwd_rando / pdtphys)
-!         CALL histwrite_phy(o_dv_gwd_rando, dv_gwd_rando / pdtphys)
+!      IF (ok_gwd_rando) THEN
+!         CALL histwrite_phy(o_du_gwd_rando, du_gwd_ranDO / pdtphys)
+!         CALL histwrite_phy(o_dv_gwd_rando, dv_gwd_ranDO / pdtphys)
 !         CALL histwrite_phy(o_vstr_gwd_rando, zvstr_gwd_rando)
-!      end IF
-
-       IF (ok_qch4) then
+!      ENDIF
+
+       IF (ok_qch4) THEN
           CALL histwrite_phy(o_dqch4, d_q_ch4 / pdtphys)
        ENDIF
@@ -1384,15 +1383,15 @@
        CALL histwrite_phy(o_rlucs, lwup0)
        CALL histwrite_phy(o_rldcs, lwdn0)
-       IF(vars_defined) THEN
+       IF (vars_defined) THEN
           zx_tmp_fi3d(1:klon,1:klev)=d_t(1:klon,1:klev)+ &
                d_t_dyn(1:klon,1:klev)
        ENDIF
        CALL histwrite_phy(o_tnt, zx_tmp_fi3d)
-       IF(vars_defined) THEN
+       IF (vars_defined) THEN
           zx_tmp_fi3d(1:klon,1:klev)=d_t_swr(1:klon,1:klev)/pdtphys + &
                d_t_lwr(1:klon,1:klev)/pdtphys
        ENDIF
        CALL histwrite_phy(o_tntr, zx_tmp_fi3d)
-       IF(vars_defined) THEN
+       IF (vars_defined) THEN
           zx_tmp_fi3d(1:klon,1:klev)= (d_t_lsc(1:klon,1:klev)+ &
                d_t_eva(1:klon,1:klev)+ &
@@ -1400,10 +1399,10 @@
        ENDIF
        CALL histwrite_phy(o_tntscpbl, zx_tmp_fi3d)
-       IF(vars_defined) THEN
+       IF (vars_defined) THEN
           zx_tmp_fi3d(1:klon,1:klev)=d_qx(1:klon,1:klev,ivap)+ &
                d_q_dyn(1:klon,1:klev)
        ENDIF
        CALL histwrite_phy(o_tnhus, zx_tmp_fi3d)
-       IF(vars_defined) THEN
+       IF (vars_defined) THEN
           zx_tmp_fi3d(1:klon,1:klev)=d_q_lsc(1:klon,1:klev)/pdtphys+ &
                d_q_eva(1:klon,1:klev)/pdtphys
@@ -1411,36 +1410,36 @@
        CALL histwrite_phy(o_tnhusscpbl, zx_tmp_fi3d)
        CALL histwrite_phy(o_evu, coefm(:,:,is_ave))
-       IF(vars_defined) THEN
+       IF (vars_defined) THEN
           zx_tmp_fi3d(1:klon,1:klev)=q_seri(1:klon,1:klev)+ &
                ql_seri(1:klon,1:klev) 
        ENDIF
        CALL histwrite_phy(o_h2o, zx_tmp_fi3d)
-       if (iflag_con >= 3) then
-          IF(vars_defined) THEN
+       IF (iflag_con >= 3) THEN
+          IF (vars_defined) THEN
              zx_tmp_fi3d(1:klon,1:klev)=-1 * (dnwd(1:klon,1:klev)+ &
                   dnwd0(1:klon,1:klev)) 
           ENDIF
           CALL histwrite_phy(o_mcd, zx_tmp_fi3d)
-          IF(vars_defined) THEN
+          IF (vars_defined) THEN
              zx_tmp_fi3d(1:klon,1:klev)=upwd(1:klon,1:klev) + &
                   dnwd(1:klon,1:klev)+ dnwd0(1:klon,1:klev) 
           ENDIF
           CALL histwrite_phy(o_dmc, zx_tmp_fi3d)
-       else if (iflag_con == 2) then
+       ELSEIF (iflag_con == 2) THEN
           CALL histwrite_phy(o_mcd,  pmfd)
           CALL histwrite_phy(o_dmc,  pmfu + pmfd)
-       end if
+       ENDIF
        CALL histwrite_phy(o_ref_liq, ref_liq)
        CALL histwrite_phy(o_ref_ice, ref_ice)
-       if (RCO2_per.NE.RCO2_act.OR.RCH4_per.NE.RCH4_act.OR. &
+       IF (RCO2_per.NE.RCO2_act.OR.RCH4_per.NE.RCH4_act.OR. &
             RN2O_per.NE.RN2O_act.OR.RCFC11_per.NE.RCFC11_act.OR. &
             RCFC12_per.NE.RCFC12_act) THEN
-          IF(vars_defined) zx_tmp_fi2d(1 : klon) = swupp ( 1 : klon, klevp1 )
+          IF (vars_defined) zx_tmp_fi2d(1 : klon) = swupp ( 1 : klon, klevp1 )
           CALL histwrite_phy(o_rsut4co2, zx_tmp_fi2d)
-          IF(vars_defined) zx_tmp_fi2d(1 : klon) = lwupp ( 1 : klon, klevp1 )
+          IF (vars_defined) zx_tmp_fi2d(1 : klon) = lwupp ( 1 : klon, klevp1 )
           CALL histwrite_phy(o_rlut4co2, zx_tmp_fi2d)
-          IF(vars_defined) zx_tmp_fi2d(1 : klon) = swup0p ( 1 : klon, klevp1 )
+          IF (vars_defined) zx_tmp_fi2d(1 : klon) = swup0p ( 1 : klon, klevp1 )
           CALL histwrite_phy(o_rsutcs4co2, zx_tmp_fi2d)
-          IF(vars_defined) zx_tmp_fi2d(1 : klon) = lwup0p ( 1 : klon, klevp1 )
+          IF (vars_defined) zx_tmp_fi2d(1 : klon) = lwup0p ( 1 : klon, klevp1 )
           CALL histwrite_phy(o_rlutcs4co2, zx_tmp_fi2d)
           CALL histwrite_phy(o_rsu4co2, swupp)
@@ -1460,5 +1459,5 @@
        ! Champs interpolles sur des niveaux de pression
        missing_val=missing_val_nf90
-       DO iff=7, nfiles
+       DO iff=7, nfiles-1 !--here we deal with files 7,8 and 9
 
           CALL histwrite_phy(o_tnondef,tnondef(:,:,iff-6),iff)
@@ -1470,9 +1469,9 @@
           CALL histwrite_phy(o_va,vwriteSTD(:,:,iff-6),iff)
           CALL histwrite_phy(o_wap,wwriteSTD(:,:,iff-6),iff)
-          IF(vars_defined) THEN
+          IF (vars_defined) THEN
              DO k=1, nlevSTD
                 DO i=1, klon
-                   IF(tnondef(i,k,iff-6).NE.missing_val) THEN
-                      IF(freq_outNMC(iff-6).LT.0) THEN
+                   IF (tnondef(i,k,iff-6).NE.missing_val) THEN
+                      IF (freq_outNMC(iff-6).LT.0) THEN
                          freq_moyNMC(iff-6)=(mth_len*un_jour)/freq_calNMC(iff-6)
                       ELSE
@@ -1487,8 +1486,8 @@
           ENDIF
           CALL histwrite_phy(o_psbg,zx_tmp_fi3d_STD,iff)
-          IF(vars_defined) THEN
+          IF (vars_defined) THEN
              DO k=1, nlevSTD
                 DO i=1, klon
-                   IF(O3sumSTD(i,k,iff-6).NE.missing_val) THEN
+                   IF (O3sumSTD(i,k,iff-6).NE.missing_val) THEN
                       zx_tmp_fi3d_STD(i,k) = O3sumSTD(i,k,iff-6) * 1.e+9
                    ELSE
@@ -1499,9 +1498,9 @@
           ENDIF
           CALL histwrite_phy(o_tro3,zx_tmp_fi3d_STD,iff)
-          if (read_climoz == 2) THEN
-             IF(vars_defined) THEN
+          IF (read_climoz == 2) THEN
+             IF (vars_defined) THEN
                 DO k=1, nlevSTD
                    DO i=1, klon
-                      IF(O3daysumSTD(i,k,iff-6).NE.missing_val) THEN
+                      IF (O3daysumSTD(i,k,iff-6).NE.missing_val) THEN
                          zx_tmp_fi3d_STD(i,k) = O3daysumSTD(i,k,iff-6) * 1.e+9
                       ELSE
@@ -1512,5 +1511,5 @@
              ENDIF
              CALL histwrite_phy(o_tro3_daylight,zx_tmp_fi3d_STD,iff)
-          endif
+          ENDIF
           CALL histwrite_phy(o_uxv,uvsumSTD(:,:,iff-6),iff)
           CALL histwrite_phy(o_vxq,vqsumSTD(:,:,iff-6),iff)
@@ -1527,5 +1526,5 @@
 #endif
 #ifdef CPP_XIOS
-  IF(ok_all_xml) THEN 
+  IF (ok_all_xml) THEN 
 !      DO iff=7, nfiles
 
@@ -1538,9 +1537,9 @@
           CALL histwrite_phy(o_va,vlevSTD(:,:))
           CALL histwrite_phy(o_wap,wlevSTD(:,:))
-!         IF(vars_defined) THEN
+!         IF (vars_defined) THEN
 !            DO k=1, nlevSTD
 !               DO i=1, klon
-!                  IF(tnondef(i,k,3).NE.missing_val) THEN
-!                     IF(freq_outNMC(iff-6).LT.0) THEN
+!                  IF (tnondef(i,k,3).NE.missing_val) THEN
+!                     IF (freq_outNMC(iff-6).LT.0) THEN
 !                        freq_moyNMC(iff-6)=(mth_len*un_jour)/freq_calNMC(iff-6)
 !                     ELSE
@@ -1555,8 +1554,8 @@
 !         ENDIF
 !         CALL histwrite_phy(o_psbg,zx_tmp_fi3d_STD)
-          IF(vars_defined) THEN
+          IF (vars_defined) THEN
              DO k=1, nlevSTD
                 DO i=1, klon
-                   IF(O3STD(i,k).NE.missing_val) THEN
+                   IF (O3STD(i,k).NE.missing_val) THEN
                       zx_tmp_fi3d_STD(i,k) = O3STD(i,k) * 1.e+9
                    ELSE
@@ -1567,9 +1566,9 @@
           ENDIF
           CALL histwrite_phy(o_tro3,zx_tmp_fi3d_STD)
-          if (read_climoz == 2) THEN
-             IF(vars_defined) THEN
+          IF (read_climoz == 2) THEN
+             IF (vars_defined) THEN
                 DO k=1, nlevSTD
                    DO i=1, klon
-                      IF(O3daySTD(i,k).NE.missing_val) THEN
+                      IF (O3daySTD(i,k).NE.missing_val) THEN
                          zx_tmp_fi3d_STD(i,k) = O3daySTD(i,k) * 1.e+9
                       ELSE
@@ -1580,5 +1579,5 @@
              ENDIF
              CALL histwrite_phy(o_tro3_daylight,zx_tmp_fi3d_STD)
-          endif
+          ENDIF
           CALL histwrite_phy(o_uxv,uvSTD(:,:))
           CALL histwrite_phy(o_vxq,vqSTD(:,:))
@@ -1598,8 +1597,5 @@
               IF (type_trac == 'lmdz' .OR. type_trac == 'repr') THEN
 
-!jyg<
-!!             CALL histwrite_phy(o_trac(iq-nqo), qx(:,:,iq))
              CALL histwrite_phy(o_trac(iq-nqo), tr_seri(:,:,iq-nqo))
-!>jyg
              CALL histwrite_phy(o_dtr_vdf(iq-nqo),d_tr_cl(:,:,iq-nqo))
              CALL histwrite_phy(o_dtr_the(iq-nqo),d_tr_th(:,:,iq-nqo))
@@ -1612,5 +1608,5 @@
              CALL histwrite_phy(o_dtr_ls(iq-nqo),d_tr_ls(:,:,iq-nqo))
 !            CALL histwrite_phy(o_dtr_dyn(iq-nqo),d_tr_dyn(:,:,iq-nqo))
-         !!  CALL histwrite_phy(o_dtr_cl(iq-nqo),d_tr_cl(:,:,iq-nqo))
+!            CALL histwrite_phy(o_dtr_cl(iq-nqo),d_tr_cl(:,:,iq-nqo))
              CALL histwrite_phy(o_dtr_trsp(iq-nqo),d_tr_trsp(:,:,iq-nqo))
              CALL histwrite_phy(o_dtr_sscav(iq-nqo),d_tr_sscav(:,:,iq-nqo))
@@ -1618,18 +1614,15 @@
              CALL histwrite_phy(o_dtr_uscav(iq-nqo),d_tr_uscav(:,:,iq-nqo))
              zx_tmp_fi2d=0.
-             IF(vars_defined) THEN
+             IF (vars_defined) THEN
                 DO k=1,klev
-!jyg<
-!!                   zx_tmp_fi2d(:)=zx_tmp_fi2d(:)+zmasse(:,k)*qx(:,k,iq)
                    zx_tmp_fi2d(:)=zx_tmp_fi2d(:)+zmasse(:,k)*tr_seri(:,k,iq-nqo)
-!>jyg
                 ENDDO
              ENDIF
              CALL histwrite_phy(o_trac_cum(iq-nqo), zx_tmp_fi2d)
-             endif
-          ENDDO
-       ENDIF
-
-       IF(.NOT.vars_defined) THEN
+             ENDIF
+          ENDDO
+       ENDIF
+
+       IF (.NOT.vars_defined) THEN
           !$OMP MASTER
 #ifndef CPP_IOIPSL_NO_OUTPUT 
@@ -1652,9 +1645,9 @@
           vars_defined = .TRUE.
 
-       END IF
-
-    END DO
-
-    IF(vars_defined) THEN
+       ENDIF
+
+    ENDDO
+
+    IF (vars_defined) THEN
        ! On synchronise les fichiers pour IOIPSL
 #ifndef CPP_IOIPSL_NO_OUTPUT 
@@ -1664,5 +1657,5 @@
              CALL histsync(nid_files(iff))
           ENDIF
-       END DO
+       ENDDO
        !$OMP END MASTER
 #endif
Index: LMDZ5/branches/testing/libf/phylmd/Dust/spla_output_dat.h
===================================================================
--- LMDZ5/branches/testing/libf/phylmd/Dust/spla_output_dat.h	(revision 2729)
+++ LMDZ5/branches/testing/libf/phylmd/Dust/spla_output_dat.h	(revision 2787)
@@ -3,630 +3,603 @@
 
 !Dust emission module
-  type(ctrl_out),save :: o_m1dflux      = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'm1dflux','m1dflux','', (/ ('', i=1, 9) /))
-  type(ctrl_out),save :: o_m2dflux      = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'm2dflux','m2dflux','', (/ ('', i=1, 9) /))
-  type(ctrl_out),save :: o_m3dflux      = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'm3dflux','m3dflux','', (/ ('', i=1, 9) /))
+  type(ctrl_out),save :: o_m1dflux      = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'm1dflux','m1dflux','', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_m2dflux      = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'm2dflux','m2dflux','', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_m3dflux      = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'm3dflux','m3dflux','', (/ ('', i=1, 10) /))
 
 ! traceur_spl
-  type(ctrl_out),save :: o_taue550    = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'taue550','Tau ext 550','', (/ ('', i=1, 9) /))
-  type(ctrl_out),save :: o_taue670     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'taue670','Tau ext 670','', (/ ('', i=1, 9) /))
-  type(ctrl_out),save :: o_taue865     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'taue865','Tau ext 865','', (/ ('', i=1, 9) /))
-  type(ctrl_out),save :: o_taue550_tr2     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'taue550_tr2','Tau ext 550tr2','', (/ ('', i=1, 9) /))
-  type(ctrl_out),save :: o_taue670_tr2     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'taue670_tr2','Tau ext 670tr2','', (/ ('', i=1, 9) /))
-  type(ctrl_out),save :: o_taue865_tr2     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'taue865_tr2','Tau ext 865tr2','', (/ ('', i=1, 9) /))
-  type(ctrl_out),save :: o_taue550_ss     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'taue550_ss','Tau ext 550ss','', (/ ('', i=1, 9) /))
-  type(ctrl_out),save :: o_taue670_ss     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'taue670_ss','Tau ext 670ss','', (/ ('', i=1, 9) /))
-  type(ctrl_out),save :: o_taue865_ss     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'taue865_ss','Tau ext 865ss','', (/ ('', i=1, 9) /))
-  type(ctrl_out),save :: o_taue550_dust     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'taue550_dust','Tau ext 550dust','', (/ ('', i=1, 9) /))
-  type(ctrl_out),save :: o_taue670_dust     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'taue670_dust','Tau ext 670dust','', (/ ('', i=1, 9) /))
-  type(ctrl_out),save :: o_taue865_dust     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'taue865_dust','Tau ext 865dust','', (/ ('', i=1, 9) /))
-  type(ctrl_out),save :: o_taue550_dustsco     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'taue550_dustsco','Tau ext 550dustsco','', (/ ('', i=1, 9) /))
-  type(ctrl_out),save :: o_taue670_dustsco     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'taue670_dustsco','Tau ext 670dustsco','', (/ ('', i=1, 9) /))
-  type(ctrl_out),save :: o_taue865_dustsco     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'taue865_dustsco','Tau ext 865dustsco','', (/ ('', i=1, 9) /))
-
-
-  type(ctrl_out),save :: o_taue550_terra     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
+  type(ctrl_out),save :: o_taue550    = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'taue550','Tau ext 550','', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_taue670     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'taue670','Tau ext 670','', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_taue865     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'taue865','Tau ext 865','', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_taue550_tr2     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'taue550_tr2','Tau ext 550tr2','', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_taue670_tr2     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'taue670_tr2','Tau ext 670tr2','', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_taue865_tr2     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'taue865_tr2','Tau ext 865tr2','', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_taue550_ss     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'taue550_ss','Tau ext 550ss','', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_taue670_ss     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'taue670_ss','Tau ext 670ss','', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_taue865_ss     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'taue865_ss','Tau ext 865ss','', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_taue550_dust     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'taue550_dust','Tau ext 550dust','', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_taue670_dust     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'taue670_dust','Tau ext 670dust','', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_taue865_dust     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'taue865_dust','Tau ext 865dust','', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_taue550_dustsco     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'taue550_dustsco','Tau ext 550dustsco','', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_taue670_dustsco     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'taue670_dustsco','Tau ext 670dustsco','', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_taue865_dustsco     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'taue865_dustsco','Tau ext 865dustsco','', (/ ('', i=1, 10) /))
+
+  type(ctrl_out),save :: o_taue550_terra     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
   'taue550_terra','Tau ext 550 terra','', &
-      (/ 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', &
-         't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)' /))
-  type(ctrl_out),save :: o_taue550_fine_terra     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
+      (/ 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', &
+         't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)' /))
+  type(ctrl_out),save :: o_taue550_fine_terra     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
   'taue550_fine_terra','Tau ext fine 550 terra','', &
-      (/ 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', &
-         't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)' /))
-  type(ctrl_out),save :: o_taue550_coss_terra     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
+      (/ 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)',  &
+         't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)' /))
+  type(ctrl_out),save :: o_taue550_coss_terra     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
   'taue550_coss_terra','Tau ext coss 550 terra','', &
-      (/ 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', &
-         't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)' /))
-  type(ctrl_out),save :: o_taue550_codu_terra     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
+      (/ 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)',  &
+         't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)' /))
+  type(ctrl_out),save :: o_taue550_codu_terra     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
   'taue550_codu_terra','Tau ext codu 550 terra','', &
-      (/ 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', &
-         't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)' /))
-  type(ctrl_out),save :: o_taue550_scdu_terra     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
+      (/ 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)',  &
+         't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)' /))
+  type(ctrl_out),save :: o_taue550_scdu_terra     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
   'taue550_scdu_terra','Tau ext scdu 550 terra','', &
-      (/ 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', &
-         't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)' /))
-
-  type(ctrl_out),save :: o_taue670_terra     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
+      (/ 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)',  &
+         't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)' /))
+
+  type(ctrl_out),save :: o_taue670_terra     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
   'taue670_terra','Tau ext 670 terra','', &
-      (/ 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', &
-         't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)' /))
-  type(ctrl_out),save :: o_taue670_fine_terra     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
+      (/ 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)',  &
+         't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)' /))
+  type(ctrl_out),save :: o_taue670_fine_terra     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
   'taue670_fine_terra','Tau ext fine 670 terra','', &
-      (/ 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', &
-         't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)' /))
-  type(ctrl_out),save :: o_taue670_coss_terra     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
+      (/ 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)',  &
+         't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)' /))
+  type(ctrl_out),save :: o_taue670_coss_terra     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
   'taue670_coss_terra','Tau ext coss 670 terra','', &
-      (/ 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', &
-         't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)' /))
-  type(ctrl_out),save :: o_taue670_codu_terra     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
+      (/ 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)',  &
+         't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)' /))
+  type(ctrl_out),save :: o_taue670_codu_terra     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
   'taue670_codu_terra','Tau ext codu 670 terra','', &
-      (/ 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', &
-         't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)' /))
-  type(ctrl_out),save :: o_taue670_scdu_terra     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
+      (/ 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)',  &
+         't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)' /))
+  type(ctrl_out),save :: o_taue670_scdu_terra     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
   'taue670_scdu_terra','Tau ext scdu 670 terra','', &
-      (/ 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', &
-         't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)' /))
-
-  type(ctrl_out),save :: o_taue865_terra     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
+      (/ 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)',  &
+         't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)' /))
+
+  type(ctrl_out),save :: o_taue865_terra     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
   'taue865_terra','Tau ext 865 terra','', &
-      (/ 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', &
-         't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)' /))
-  type(ctrl_out),save :: o_taue865_fine_terra     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
+      (/ 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)',  &
+         't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)' /))
+  type(ctrl_out),save :: o_taue865_fine_terra     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
   'taue865_fine_terra','Tau ext fine 865 terra','', &
-      (/ 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', &
-         't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)' /))
-  type(ctrl_out),save :: o_taue865_coss_terra     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
+      (/ 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)',  &
+         't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)' /))
+  type(ctrl_out),save :: o_taue865_coss_terra     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
   'taue865_coss_terra','Tau ext coss 865 terra','', &
-      (/ 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', &
-         't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)' /))
-  type(ctrl_out),save :: o_taue865_codu_terra     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
+      (/ 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)',  &
+         't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)' /))
+  type(ctrl_out),save :: o_taue865_codu_terra     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
   'taue865_codu_terra','Tau ext codu 865 terra','', &
-      (/ 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', &
-         't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)' /))
-  type(ctrl_out),save :: o_taue865_scdu_terra     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
+      (/ 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)',  &
+         't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)' /))
+  type(ctrl_out),save :: o_taue865_scdu_terra     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
   'taue865_scdu_terra','Tau ext scdu 865 terra','', &
-      (/ 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', &
-         't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)' /))
-
-  type(ctrl_out),save :: o_taue550_aqua     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
+      (/ 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)',  &
+         't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)' /))
+
+  type(ctrl_out),save :: o_taue550_aqua     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
   'taue550_aqua','Tau ext 550 aqua','', &
-      (/ 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', &
-         't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)' /))
-  type(ctrl_out),save :: o_taue550_fine_aqua     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
+      (/ 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)',  &
+         't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)' /))
+  type(ctrl_out),save :: o_taue550_fine_aqua     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
   'taue550_fine_aqua','Tau ext fine 550 aqua','', &
-      (/ 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', &
-         't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)' /))
-  type(ctrl_out),save :: o_taue550_coss_aqua     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
+      (/ 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)',  &
+         't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)' /))
+  type(ctrl_out),save :: o_taue550_coss_aqua     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
   'taue550_coss_aqua','Tau ext coss 550 aqua','', &
-      (/ 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', &
-         't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)' /))
-  type(ctrl_out),save :: o_taue550_codu_aqua     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
+      (/ 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)',  &
+         't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)' /))
+  type(ctrl_out),save :: o_taue550_codu_aqua     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
   'taue550_codu_aqua','Tau ext codu 550 aqua','', &
-      (/ 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', &
-         't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)' /))
-  type(ctrl_out),save :: o_taue550_scdu_aqua     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
+      (/ 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)',  &
+         't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)' /))
+  type(ctrl_out),save :: o_taue550_scdu_aqua     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
   'taue550_scdu_aqua','Tau ext scdu 550 aqua','', &
-      (/ 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', &
-         't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)' /))
-
-  type(ctrl_out),save :: o_taue670_aqua     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
+      (/ 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)',  &
+         't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)' /))
+
+  type(ctrl_out),save :: o_taue670_aqua     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
   'taue670_aqua','Tau ext 670 aqua','', &
-      (/ 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', &
-         't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)' /))
-  type(ctrl_out),save :: o_taue670_fine_aqua     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
+      (/ 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)',  &
+         't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)' /))
+  type(ctrl_out),save :: o_taue670_fine_aqua     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
   'taue670_fine_aqua','Tau ext fine 670 aqua','', &
-      (/ 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', &
-         't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)' /))
-  type(ctrl_out),save :: o_taue670_coss_aqua     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
+      (/ 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)',  &
+         't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)' /))
+  type(ctrl_out),save :: o_taue670_coss_aqua     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
   'taue670_coss_aqua','Tau ext coss 670 aqua','', &
-      (/ 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', &
-         't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)' /))
-  type(ctrl_out),save :: o_taue670_codu_aqua     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
+      (/ 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)',  &
+         't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)' /))
+  type(ctrl_out),save :: o_taue670_codu_aqua     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
   'taue670_codu_aqua','Tau ext codu 670 aqua','', &
-      (/ 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', &
-         't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)' /))
-  type(ctrl_out),save :: o_taue670_scdu_aqua     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
+      (/ 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)',  &
+         't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)' /))
+  type(ctrl_out),save :: o_taue670_scdu_aqua     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
   'taue670_scdu_aqua','Tau ext scdu 670 aqua','', &
-      (/ 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', &
-         't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)' /))
-
-  type(ctrl_out),save :: o_taue865_aqua     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
+      (/ 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)',  &
+         't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)' /))
+
+  type(ctrl_out),save :: o_taue865_aqua     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
   'taue865_aqua','Tau ext 865 aqua','', &
-      (/ 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', &
-         't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)' /))
-  type(ctrl_out),save :: o_taue865_fine_aqua     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
+      (/ 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)',  &
+         't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)' /))
+  type(ctrl_out),save :: o_taue865_fine_aqua     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
   'taue865_fine_aqua','Tau ext fine 865 aqua','', &
-      (/ 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', &
-         't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)' /))
-  type(ctrl_out),save :: o_taue865_coss_aqua     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
+      (/ 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)',  &
+         't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)' /))
+  type(ctrl_out),save :: o_taue865_coss_aqua     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
   'taue865_coss_aqua','Tau ext coss 865 aqua','', &
-      (/ 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', &
-         't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)' /))
-  type(ctrl_out),save :: o_taue865_codu_aqua     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
+      (/ 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)',  &
+         't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)' /))
+  type(ctrl_out),save :: o_taue865_codu_aqua     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
   'taue865_codu_aqua','Tau ext codu 865 aqua','', &
-      (/ 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', &
-         't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)' /))
-  type(ctrl_out),save :: o_taue865_scdu_aqua     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
+      (/ 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)',  &
+         't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)' /))
+  type(ctrl_out),save :: o_taue865_scdu_aqua     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
   'taue865_scdu_aqua','Tau ext scdu 865 aqua','', &
-      (/ 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', &
-         't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)' /))
-
-
-
-!  type(ctrl_out),save :: o_taue550_terra     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
+      (/ 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)',  &
+         't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)' /))
+
+!  type(ctrl_out),save :: o_taue550_terra     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
 !  'taue550_terra','Tau ext 550 terra','', &
-!      (/ 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', &
+!      (/ 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)',  &
 !         't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)' /))
 !
-!  type(ctrl_out),save :: o_taue670_aqua     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
+!  type(ctrl_out),save :: o_taue670_aqua     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
 !  'taue670_aqua','Tau ext 670 aqua','', &
-!      (/ 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', &
+!      (/ 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)',  &
 !         't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)' /))
 !
-!  type(ctrl_out),save :: o_taue670_terra     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
+!  type(ctrl_out),save :: o_taue670_terra     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
 !  'taue670_terra','Tau ext 670 terra','', &
-!      (/ 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', &
+!      (/ 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)',  &
 !         't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)' /))
 !
-!  type(ctrl_out),save :: o_taue865_aqua     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
+!  type(ctrl_out),save :: o_taue865_aqua     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
 !  'taue865_aqua','Tau ext 865 aqua','', &
-!      (/ 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', &
+!      (/ 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)',  &
 !         't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)' /))
 !
-!  type(ctrl_out),save :: o_taue865_terra     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
+!  type(ctrl_out),save :: o_taue865_terra     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
 !  'taue865_terra','Tau ext 865 terra','', &
-!      (/ 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', &
+!      (/ 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)',  &
 !         't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)' /))
-
 	
-  type(ctrl_out),save :: o_trm01     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'trm01','Burden PREC','', (/ ('', i=1, 9) /))
-  type(ctrl_out),save :: o_trm02     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'trm02','Burden FINE','', (/ ('', i=1, 9) /))
-  type(ctrl_out),save :: o_trm03     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'trm03','Burden COSS','', (/ ('', i=1, 9) /))
-  type(ctrl_out),save :: o_trm04     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'trm04','Burden CODU','', (/ ('', i=1, 9) /))
-  type(ctrl_out),save :: o_trm05     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'trm05','Burden SCDU','', (/ ('', i=1, 9) /))
-
-  type(ctrl_out),save :: o_sconc01     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'sconc01','Surf. Conc. PREC','', (/ ('', i=1, 9) /))
-  type(ctrl_out),save :: o_sconc02     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'sconc02','Surf. Conc. FINE','', (/ ('', i=1, 9) /))
-  type(ctrl_out),save :: o_sconc03     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'sconc03','Surf. Conc. COSS','', (/ ('', i=1, 9) /))
-  type(ctrl_out),save :: o_sconc04     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'sconc04','Surf. Conc. CODU','', (/ ('', i=1, 9) /))
-  type(ctrl_out),save :: o_sconc05     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'sconc05','Surf. Conc. SCDU','', (/ ('', i=1, 9) /))
-
-
-
+  type(ctrl_out),save :: o_trm01     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'trm01','Burden PREC','', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_trm02     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'trm02','Burden FINE','', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_trm03     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'trm03','Burden COSS','', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_trm04     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'trm04','Burden CODU','', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_trm05     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'trm05','Burden SCDU','', (/ ('', i=1, 10) /))
+
+  type(ctrl_out),save :: o_sconc01     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'sconc01','Surf. Conc. PREC','', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_sconc02     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'sconc02','Surf. Conc. FINE','', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_sconc03     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'sconc03','Surf. Conc. COSS','', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_sconc04     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'sconc04','Surf. Conc. CODU','', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_sconc05     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'sconc05','Surf. Conc. SCDU','', (/ ('', i=1, 10) /))
 
 !lessivage
 
-  type(ctrl_out),save :: o_flux01     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'flux01','emission PREC','', (/ ('', i=1, 9) /))
-  type(ctrl_out),save :: o_flux02     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'flux02','emission FINE','', (/ ('', i=1, 9) /))
-  type(ctrl_out),save :: o_flux03     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'flux03','emission COSS','', (/ ('', i=1, 9) /))
-  type(ctrl_out),save :: o_flux04     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'flux04','emission CODU','', (/ ('', i=1, 9) /))
-  type(ctrl_out),save :: o_flux05     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'flux05','emission SCDU','', (/ ('', i=1, 9) /))
-
-
-  type(ctrl_out),save :: o_ds01     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'ds01','Depot sec PREC','', (/ ('', i=1, 9) /))
-  type(ctrl_out),save :: o_ds02     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'ds02','Depot sec FINE','', (/ ('', i=1, 9) /))
-  type(ctrl_out),save :: o_ds03     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'ds03','Depot sec COSS','', (/ ('', i=1, 9) /))
-  type(ctrl_out),save :: o_ds04     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'ds04','Depot sec CODU','', (/ ('', i=1, 9) /))
-  type(ctrl_out),save :: o_ds05     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'ds05','Depot sec SCDU','', (/ ('', i=1, 9) /))
-
-  type(ctrl_out),save :: o_dh01     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'dh01','Depot hum PREC','', (/ ('', i=1, 9) /))
-  type(ctrl_out),save :: o_dh02     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'dh02','Depot hum FINE','', (/ ('', i=1, 9) /))
-  type(ctrl_out),save :: o_dh03     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'dh03','Depot hum COSS','', (/ ('', i=1, 9) /))
-  type(ctrl_out),save :: o_dh04     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'dh04','Depot hum CODU','', (/ ('', i=1, 9) /))
-  type(ctrl_out),save :: o_dh05     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'dh05','Depot hum SCDU','', (/ ('', i=1, 9) /))
-
-  type(ctrl_out),save :: o_dtrconv01     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'dtrconv01','Tiedke convective PREC','', (/ ('', i=1, 9) /))
-  type(ctrl_out),save :: o_dtrconv02     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'dtrconv02','Tiedke convective FINE','', (/ ('', i=1, 9) /))
-  type(ctrl_out),save :: o_dtrconv03     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'dtrconv03','Tiedke convective COSS','', (/ ('', i=1, 9) /))
-  type(ctrl_out),save :: o_dtrconv04     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'dtrconv04','Tiedke convective CODU','', (/ ('', i=1, 9) /))
-  type(ctrl_out),save :: o_dtrconv05     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'dtrconv05','Tiedke convective SCDU','', (/ ('', i=1, 9) /))
-
-  type(ctrl_out),save :: o_dtherm01     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'dtherm01','Thermals dtracer PREC','', (/ ('', i=1, 9) /))
-  type(ctrl_out),save :: o_dtherm02     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'dtherm02','Thermals dtracer FINE','', (/ ('', i=1, 9) /))
-  type(ctrl_out),save :: o_dtherm03     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'dtherm03','Thermals dtracer COSS','', (/ ('', i=1, 9) /))
-  type(ctrl_out),save :: o_dtherm04     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'dtherm04','Thermals dtracer CODU','', (/ ('', i=1, 9) /))
-  type(ctrl_out),save :: o_dtherm05     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'dtherm05','Thermals dtracer SCDU','', (/ ('', i=1, 9) /))
-
-  type(ctrl_out),save :: o_dhkecv01     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'dhkecv01','KE dep hum convective PREC','', (/ ('', i=1, 9) /))
-  type(ctrl_out),save :: o_dhkecv02     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'dhkecv02','KE dep hum convective FINE','', (/ ('', i=1, 9) /))
-  type(ctrl_out),save :: o_dhkecv03     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'dhkecv03','KE dep hum convective COSS','', (/ ('', i=1, 9) /))
-  type(ctrl_out),save :: o_dhkecv04     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'dhkecv04','KE dep hum convective CODU','', (/ ('', i=1, 9) /))
-  type(ctrl_out),save :: o_dhkecv05     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'dhkecv05','KE dep hum convective SCDU','', (/ ('', i=1, 9) /))
+  type(ctrl_out),save :: o_flux01     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'flux01','emission PREC','', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_flux02     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'flux02','emission FINE','', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_flux03     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'flux03','emission COSS','', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_flux04     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'flux04','emission CODU','', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_flux05     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'flux05','emission SCDU','', (/ ('', i=1, 10) /))
+
+  type(ctrl_out),save :: o_ds01     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'ds01','Depot sec PREC','', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_ds02     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'ds02','Depot sec FINE','', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_ds03     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'ds03','Depot sec COSS','', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_ds04     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'ds04','Depot sec CODU','', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_ds05     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'ds05','Depot sec SCDU','', (/ ('', i=1, 10) /))
+
+  type(ctrl_out),save :: o_dh01     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'dh01','Depot hum PREC','', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_dh02     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'dh02','Depot hum FINE','', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_dh03     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'dh03','Depot hum COSS','', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_dh04     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'dh04','Depot hum CODU','', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_dh05     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'dh05','Depot hum SCDU','', (/ ('', i=1, 10) /))
+
+  type(ctrl_out),save :: o_dtrconv01     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'dtrconv01','Tiedke convective PREC','', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_dtrconv02     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'dtrconv02','Tiedke convective FINE','', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_dtrconv03     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'dtrconv03','Tiedke convective COSS','', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_dtrconv04     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'dtrconv04','Tiedke convective CODU','', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_dtrconv05     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'dtrconv05','Tiedke convective SCDU','', (/ ('', i=1, 10) /))
+
+  type(ctrl_out),save :: o_dtherm01     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'dtherm01','Thermals dtracer PREC','', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_dtherm02     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'dtherm02','Thermals dtracer FINE','', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_dtherm03     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'dtherm03','Thermals dtracer COSS','', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_dtherm04     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'dtherm04','Thermals dtracer CODU','', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_dtherm05     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'dtherm05','Thermals dtracer SCDU','', (/ ('', i=1, 10) /))
+
+  type(ctrl_out),save :: o_dhkecv01     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'dhkecv01','KE dep hum convective PREC','', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_dhkecv02     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'dhkecv02','KE dep hum convective FINE','', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_dhkecv03     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'dhkecv03','KE dep hum convective COSS','', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_dhkecv04     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'dhkecv04','KE dep hum convective CODU','', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_dhkecv05     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'dhkecv05','KE dep hum convective SCDU','', (/ ('', i=1, 10) /))
 
 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-  type(ctrl_out),save :: o_d_tr_ds01     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'd_tr_ds01','Tendance dep sec  PREC','', (/ ('', i=1, 9) /))
-  type(ctrl_out),save :: o_d_tr_ds02     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'd_tr_ds02','Tendance dep sec FINE','', (/ ('', i=1, 9) /))
-  type(ctrl_out),save :: o_d_tr_ds03     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'd_tr_ds03','Tendance dep sec COSS','', (/ ('', i=1, 9) /))
-  type(ctrl_out),save :: o_d_tr_ds04     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'd_tr_ds04','Tendance depot sec CODU','', (/ ('', i=1, 9) /))
-  type(ctrl_out),save :: o_d_tr_ds05     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'd_tr_ds05','Tendance dep sec SCDU','', (/ ('', i=1, 9) /))
+  type(ctrl_out),save :: o_d_tr_ds01     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'd_tr_ds01','Tendance dep sec  PREC','', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_d_tr_ds02     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'd_tr_ds02','Tendance dep sec FINE','', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_d_tr_ds03     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'd_tr_ds03','Tendance dep sec COSS','', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_d_tr_ds04     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'd_tr_ds04','Tendance depot sec CODU','', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_d_tr_ds05     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'd_tr_ds05','Tendance dep sec SCDU','', (/ ('', i=1, 10) /))
 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 
-  type(ctrl_out),save :: o_dhkelsc01     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'dhkelsc01','KE dep hum large scale PREC','', (/ ('', i=1, 9) /))
-  type(ctrl_out),save :: o_dhkelsc02     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'dhkelsc02','KE dep hum large scale FINE','', (/ ('', i=1, 9) /))
-  type(ctrl_out),save :: o_dhkelsc03     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'dhkelsc03','KE dep hum large scale COSS','', (/ ('', i=1, 9) /))
-  type(ctrl_out),save :: o_dhkelsc04     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'dhkelsc04','KE dep hum large scale CODU','', (/ ('', i=1, 9) /))
-  type(ctrl_out),save :: o_dhkelsc05     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'dhkelsc05','KE dep hum large scale SCDU','', (/ ('', i=1, 9) /))
-
-
-  type(ctrl_out),save :: o_d_tr_cv01     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'd_tr_cv01','cvltr d_tr_cv PREC','', (/ ('', i=1, 9) /))
-  type(ctrl_out),save :: o_d_tr_cv02     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'd_tr_cv02','cvltr d_tr_cv FINE','', (/ ('', i=1, 9) /))
-  type(ctrl_out),save :: o_d_tr_cv03     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'd_tr_cv03','cvltr d_tr_cv COSS','', (/ ('', i=1, 9) /))
-  type(ctrl_out),save :: o_d_tr_cv04     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'd_tr_cv04','cvltr d_tr_cv CODU','', (/ ('', i=1, 9) /))
-  type(ctrl_out),save :: o_d_tr_cv05     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'd_tr_cv05','cvltr d_tr_cv SCDU','', (/ ('', i=1, 9) /))
-
-
-  type(ctrl_out),save :: o_d_tr_trsp01     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'd_tr_trsp01','cvltr d_tr_trsp PREC','', (/ ('', i=1, 9) /))
-  type(ctrl_out),save :: o_d_tr_trsp02     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'd_tr_trsp02','cvltr d_tr_trsp FINE','', (/ ('', i=1, 9) /))
-  type(ctrl_out),save :: o_d_tr_trsp03     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'd_tr_trsp03','cvltr d_tr_trsp COSS','', (/ ('', i=1, 9) /))
-  type(ctrl_out),save :: o_d_tr_trsp04     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'd_tr_trsp04','cvltr d_tr_trsp CODU','', (/ ('', i=1, 9) /))
-  type(ctrl_out),save :: o_d_tr_trsp05     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'd_tr_trsp05','cvltr d_tr_trsp SCDU','', (/ ('', i=1, 9) /))
-
-
-  type(ctrl_out),save :: o_d_tr_sscav01     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'd_tr_sscav01','cvltr d_tr_sscav PREC','', (/ ('', i=1, 9) /))
-  type(ctrl_out),save :: o_d_tr_sscav02     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'd_tr_sscav02','cvltr d_tr_sscav FINE','', (/ ('', i=1, 9) /))
-  type(ctrl_out),save :: o_d_tr_sscav03     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'd_tr_sscav03','cvltr d_tr_sscav COSS','', (/ ('', i=1, 9) /))
-  type(ctrl_out),save :: o_d_tr_sscav04     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'd_tr_sscav04','cvltr d_tr_sscav CODU','', (/ ('', i=1, 9) /))
-  type(ctrl_out),save :: o_d_tr_sscav05     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'd_tr_sscav05','cvltr d_tr_sscav SCDU','', (/ ('', i=1, 9) /))
-
-  type(ctrl_out),save :: o_d_tr_sat01     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'd_tr_sat01','cvltr d_tr_sat PREC','', (/ ('', i=1, 9) /))
-  type(ctrl_out),save :: o_d_tr_sat02     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'd_tr_sat02','cvltr d_tr_sat FINE','', (/ ('', i=1, 9) /))
-  type(ctrl_out),save :: o_d_tr_sat03     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'd_tr_sat03','cvltr d_tr_sat COSS','', (/ ('', i=1, 9) /))
-  type(ctrl_out),save :: o_d_tr_sat04     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'd_tr_sat04','cvltr d_tr_sat CODU','', (/ ('', i=1, 9) /))
-  type(ctrl_out),save :: o_d_tr_sat05     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'd_tr_sat05','cvltr d_tr_sat SCDU','', (/ ('', i=1, 9) /))
-
-  type(ctrl_out),save :: o_d_tr_uscav01     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'd_tr_uscav01','cvltr d_tr_uscav PREC','', (/ ('', i=1, 9) /))
-  type(ctrl_out),save :: o_d_tr_uscav02     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'd_tr_uscav02','cvltr d_tr_uscav FINE','', (/ ('', i=1, 9) /))
-  type(ctrl_out),save :: o_d_tr_uscav03     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'd_tr_uscav03','cvltr d_tr_uscav COSS','', (/ ('', i=1, 9) /))
-  type(ctrl_out),save :: o_d_tr_uscav04     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'd_tr_uscav04','cvltr d_tr_uscav CODU','', (/ ('', i=1, 9) /))
-  type(ctrl_out),save :: o_d_tr_uscav05     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'd_tr_uscav05','cvltr d_tr_uscav SCDU','', (/ ('', i=1, 9) /))
+  type(ctrl_out),save :: o_dhkelsc01     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'dhkelsc01','KE dep hum large scale PREC','', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_dhkelsc02     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'dhkelsc02','KE dep hum large scale FINE','', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_dhkelsc03     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'dhkelsc03','KE dep hum large scale COSS','', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_dhkelsc04     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'dhkelsc04','KE dep hum large scale CODU','', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_dhkelsc05     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'dhkelsc05','KE dep hum large scale SCDU','', (/ ('', i=1, 10) /))
+
+  type(ctrl_out),save :: o_d_tr_cv01     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'd_tr_cv01','cvltr d_tr_cv PREC','', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_d_tr_cv02     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'd_tr_cv02','cvltr d_tr_cv FINE','', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_d_tr_cv03     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'd_tr_cv03','cvltr d_tr_cv COSS','', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_d_tr_cv04     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'd_tr_cv04','cvltr d_tr_cv CODU','', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_d_tr_cv05     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'd_tr_cv05','cvltr d_tr_cv SCDU','', (/ ('', i=1, 10) /))
+
+  type(ctrl_out),save :: o_d_tr_trsp01     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'd_tr_trsp01','cvltr d_tr_trsp PREC','', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_d_tr_trsp02     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'd_tr_trsp02','cvltr d_tr_trsp FINE','', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_d_tr_trsp03     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'd_tr_trsp03','cvltr d_tr_trsp COSS','', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_d_tr_trsp04     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'd_tr_trsp04','cvltr d_tr_trsp CODU','', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_d_tr_trsp05     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'd_tr_trsp05','cvltr d_tr_trsp SCDU','', (/ ('', i=1, 10) /))
+
+  type(ctrl_out),save :: o_d_tr_sscav01     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'd_tr_sscav01','cvltr d_tr_sscav PREC','', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_d_tr_sscav02     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'd_tr_sscav02','cvltr d_tr_sscav FINE','', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_d_tr_sscav03     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'd_tr_sscav03','cvltr d_tr_sscav COSS','', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_d_tr_sscav04     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'd_tr_sscav04','cvltr d_tr_sscav CODU','', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_d_tr_sscav05     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'd_tr_sscav05','cvltr d_tr_sscav SCDU','', (/ ('', i=1, 10) /))
+
+  type(ctrl_out),save :: o_d_tr_sat01     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'd_tr_sat01','cvltr d_tr_sat PREC','', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_d_tr_sat02     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'd_tr_sat02','cvltr d_tr_sat FINE','', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_d_tr_sat03     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'd_tr_sat03','cvltr d_tr_sat COSS','', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_d_tr_sat04     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'd_tr_sat04','cvltr d_tr_sat CODU','', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_d_tr_sat05     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'd_tr_sat05','cvltr d_tr_sat SCDU','', (/ ('', i=1, 10) /))
+
+  type(ctrl_out),save :: o_d_tr_uscav01     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'd_tr_uscav01','cvltr d_tr_uscav PREC','', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_d_tr_uscav02     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'd_tr_uscav02','cvltr d_tr_uscav FINE','', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_d_tr_uscav03     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'd_tr_uscav03','cvltr d_tr_uscav COSS','', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_d_tr_uscav04     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'd_tr_uscav04','cvltr d_tr_uscav CODU','', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_d_tr_uscav05     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'd_tr_uscav05','cvltr d_tr_uscav SCDU','', (/ ('', i=1, 10) /))
 
 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+  type(ctrl_out),save :: o_d_tr_insc01     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'd_tr_insc01','large-scale d_tr_insc PREC','', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_d_tr_insc02     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'd_tr_insc02','large-scale d_tr_insc FINE','', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_d_tr_insc03     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'd_tr_insc03','large-scale d_tr_insc COSS','', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_d_tr_insc04     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'd_tr_insc04','large-scale d_tr_insc CODU','', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_d_tr_insc05     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'd_tr_insc05','large-scale d_tr_insc SCDU','', (/ ('', i=1, 10) /))
                 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-  type(ctrl_out),save :: o_d_tr_insc01     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'd_tr_insc01','large-scale d_tr_insc PREC','', (/ ('', i=1, 9) /))
-  type(ctrl_out),save :: o_d_tr_insc02     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'd_tr_insc02','large-scale d_tr_insc FINE','', (/ ('', i=1, 9) /))
-  type(ctrl_out),save :: o_d_tr_insc03     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'd_tr_insc03','large-scale d_tr_insc COSS','', (/ ('', i=1, 9) /))
-  type(ctrl_out),save :: o_d_tr_insc04     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'd_tr_insc04','large-scale d_tr_insc CODU','', (/ ('', i=1, 9) /))
-  type(ctrl_out),save :: o_d_tr_insc05     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'd_tr_insc05','large-scale d_tr_insc SCDU','', (/ ('', i=1, 9) /))
+  type(ctrl_out),save :: o_d_tr_bcscav01     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'd_tr_bcscav01','large-scale d_tr_bcscav PREC','', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_d_tr_bcscav02     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'd_tr_bcscav02','large-scale d_tr_bcscav FINE','', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_d_tr_bcscav03     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'd_tr_bcscav03','large-scale d_tr_bcscav COSS','', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_d_tr_bcscav04     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'd_tr_bcscav04','large-scale d_tr_bcscav CODU','', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_d_tr_bcscav05     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'd_tr_bcscav05','large-scale d_tr_bcscav SCDU','', (/ ('', i=1, 10) /))
                 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-  type(ctrl_out),save :: o_d_tr_bcscav01     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'd_tr_bcscav01','large-scale d_tr_bcscav PREC','', (/ ('', i=1, 9) /))
-  type(ctrl_out),save :: o_d_tr_bcscav02     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'd_tr_bcscav02','large-scale d_tr_bcscav FINE','', (/ ('', i=1, 9) /))
-  type(ctrl_out),save :: o_d_tr_bcscav03     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'd_tr_bcscav03','large-scale d_tr_bcscav COSS','', (/ ('', i=1, 9) /))
-  type(ctrl_out),save :: o_d_tr_bcscav04     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'd_tr_bcscav04','large-scale d_tr_bcscav CODU','', (/ ('', i=1, 9) /))
-  type(ctrl_out),save :: o_d_tr_bcscav05     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'd_tr_bcscav05','large-scale d_tr_bcscav SCDU','', (/ ('', i=1, 9) /))
+  type(ctrl_out),save :: o_d_tr_evapls01     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'd_tr_evapls01','large-scale d_tr_evapls PREC','', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_d_tr_evapls02     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'd_tr_evapls02','large-scale d_tr_evapls FINE','', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_d_tr_evapls03     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'd_tr_evapls03','large-scale d_tr_evapls COSS','', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_d_tr_evapls04     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'd_tr_evapls04','large-scale d_tr_evapls CODU','', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_d_tr_evapls05     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'd_tr_evapls05','large-scale d_tr_evapls SCDU','', (/ ('', i=1, 10) /))
                 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-  type(ctrl_out),save :: o_d_tr_evapls01     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'd_tr_evapls01','large-scale d_tr_evapls PREC','', (/ ('', i=1, 9) /))
-  type(ctrl_out),save :: o_d_tr_evapls02     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'd_tr_evapls02','large-scale d_tr_evapls FINE','', (/ ('', i=1, 9) /))
-  type(ctrl_out),save :: o_d_tr_evapls03     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'd_tr_evapls03','large-scale d_tr_evapls COSS','', (/ ('', i=1, 9) /))
-  type(ctrl_out),save :: o_d_tr_evapls04     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'd_tr_evapls04','large-scale d_tr_evapls CODU','', (/ ('', i=1, 9) /))
-  type(ctrl_out),save :: o_d_tr_evapls05     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'd_tr_evapls05','large-scale d_tr_evapls SCDU','', (/ ('', i=1, 9) /))
+  type(ctrl_out),save :: o_d_tr_ls01     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'd_tr_ls01','large-scale d_tr_ls PREC','', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_d_tr_ls02     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'd_tr_ls02','large-scale d_tr_ls FINE','', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_d_tr_ls03     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'd_tr_ls03','large-scale d_tr_ls COSS','', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_d_tr_ls04     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'd_tr_ls04','large-scale d_tr_ls CODU','', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_d_tr_ls05     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'd_tr_ls05','large-scale d_tr_ls SCDU','', (/ ('', i=1, 10) /))
                 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-  type(ctrl_out),save :: o_d_tr_ls01     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'd_tr_ls01','large-scale d_tr_ls PREC','', (/ ('', i=1, 9) /))
-  type(ctrl_out),save :: o_d_tr_ls02     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'd_tr_ls02','large-scale d_tr_ls FINE','', (/ ('', i=1, 9) /))
-  type(ctrl_out),save :: o_d_tr_ls03     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'd_tr_ls03','large-scale d_tr_ls COSS','', (/ ('', i=1, 9) /))
-  type(ctrl_out),save :: o_d_tr_ls04     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'd_tr_ls04','large-scale d_tr_ls CODU','', (/ ('', i=1, 9) /))
-  type(ctrl_out),save :: o_d_tr_ls05     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'd_tr_ls05','large-scale d_tr_ls SCDU','', (/ ('', i=1, 9) /))
+  type(ctrl_out),save :: o_d_tr_dyn01     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'd_tr_dyn01','cvltr d_tr_dyn PREC','', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_d_tr_dyn02     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'd_tr_dyn02','cvltr d_tr_dyn FINE','', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_d_tr_dyn03     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'd_tr_dyn03','cvltr d_tr_dyn COSS','', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_d_tr_dyn04     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'd_tr_dyn04','cvltr d_tr_dyn CODU','', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_d_tr_dyn05     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'd_tr_dyn05','cvltr d_tr_dyn SCDU','', (/ ('', i=1, 10) /))
                 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-
+  type(ctrl_out),save :: o_d_tr_cl01     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'd_tr_cl01','cvltr d_tr_cl PREC','', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_d_tr_cl02     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'd_tr_cl02','cvltr d_tr_cl FINE','', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_d_tr_cl03     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'd_tr_cl03','cvltr d_tr_cl COSS','', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_d_tr_cl04     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'd_tr_cl04','cvltr d_tr_cl CODU','', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_d_tr_cl05     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'd_tr_cl05','cvltr d_tr_cl SCDU','', (/ ('', i=1, 10) /))
                 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-  type(ctrl_out),save :: o_d_tr_dyn01     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'd_tr_dyn01','cvltr d_tr_dyn PREC','', (/ ('', i=1, 9) /))
-  type(ctrl_out),save :: o_d_tr_dyn02     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'd_tr_dyn02','cvltr d_tr_dyn FINE','', (/ ('', i=1, 9) /))
-  type(ctrl_out),save :: o_d_tr_dyn03     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'd_tr_dyn03','cvltr d_tr_dyn COSS','', (/ ('', i=1, 9) /))
-  type(ctrl_out),save :: o_d_tr_dyn04     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'd_tr_dyn04','cvltr d_tr_dyn CODU','', (/ ('', i=1, 9) /))
-  type(ctrl_out),save :: o_d_tr_dyn05     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'd_tr_dyn05','cvltr d_tr_dyn SCDU','', (/ ('', i=1, 9) /))
-                !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-                !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-  type(ctrl_out),save :: o_d_tr_cl01     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'd_tr_cl01','cvltr d_tr_cl PREC','', (/ ('', i=1, 9) /))
-  type(ctrl_out),save :: o_d_tr_cl02     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'd_tr_cl02','cvltr d_tr_cl FINE','', (/ ('', i=1, 9) /))
-  type(ctrl_out),save :: o_d_tr_cl03     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'd_tr_cl03','cvltr d_tr_cl COSS','', (/ ('', i=1, 9) /))
-  type(ctrl_out),save :: o_d_tr_cl04     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'd_tr_cl04','cvltr d_tr_cl CODU','', (/ ('', i=1, 9) /))
-  type(ctrl_out),save :: o_d_tr_cl05     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'd_tr_cl05','cvltr d_tr_cl SCDU','', (/ ('', i=1, 9) /))
-                !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-  type(ctrl_out),save :: o_d_tr_th01     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'd_tr_th01','cvltr d_tr_th PREC','', (/ ('', i=1, 9) /))
-  type(ctrl_out),save :: o_d_tr_th02     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'd_tr_th02','cvltr d_tr_th FINE','', (/ ('', i=1, 9) /))
-  type(ctrl_out),save :: o_d_tr_th03     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'd_tr_th03','cvltr d_tr_th COSS','', (/ ('', i=1, 9) /))
-  type(ctrl_out),save :: o_d_tr_th04     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'd_tr_th04','cvltr d_tr_th CODU','', (/ ('', i=1, 9) /))
-  type(ctrl_out),save :: o_d_tr_th05     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'd_tr_th05','cvltr d_tr_th SCDU','', (/ ('', i=1, 9) /))
-                !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+  type(ctrl_out),save :: o_d_tr_th01     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'd_tr_th01','cvltr d_tr_th PREC','', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_d_tr_th02     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'd_tr_th02','cvltr d_tr_th FINE','', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_d_tr_th03     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'd_tr_th03','cvltr d_tr_th COSS','', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_d_tr_th04     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'd_tr_th04','cvltr d_tr_th CODU','', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_d_tr_th05     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'd_tr_th05','cvltr d_tr_th SCDU','', (/ ('', i=1, 10) /))
 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-  type(ctrl_out),save :: o_sed_ss3D     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'sed_ss3D','Tendance Sedmet. COSS','', (/ ('', i=1, 9) /))
-  type(ctrl_out),save :: o_sed_dust3D     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'sed_dust3D','Tendance Sedmet. CODU','', (/ ('', i=1, 9) /))
-  type(ctrl_out),save :: o_sed_dustsco3D     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'sed_dustsco3D','Tendance Sedmet. SCDU','', (/ ('', i=1, 9) /))
+  type(ctrl_out),save :: o_sed_ss3D     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'sed_ss3D','Tendance Sedmet. COSS','', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_sed_dust3D     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'sed_dust3D','Tendance Sedmet. CODU','', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_sed_dustsco3D     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'sed_dustsco3D','Tendance Sedmet. SCDU','', (/ ('', i=1, 10) /))
 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-  type(ctrl_out),save :: o_sed_ss     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'sed_ss','Sedmet. COSS','', (/ ('', i=1, 9) /))
-  type(ctrl_out),save :: o_sed_dust     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'sed_dust','Sedmet. CODU','', (/ ('', i=1, 9) /))
-  type(ctrl_out),save :: o_sed_dustsco     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'sed_dustsco','Sedmet. SCDU','', (/ ('', i=1, 9) /))
-  type(ctrl_out),save :: o_g2p_gas     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'g2p_gas','Gas2particle gas sink','', (/ ('', i=1, 9) /))
-  type(ctrl_out),save :: o_g2p_aer     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'g2p_aer','Gas2particle tr2 src','', (/ ('', i=1, 9) /))
-
+  type(ctrl_out),save :: o_sed_ss     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'sed_ss','Sedmet. COSS','', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_sed_dust     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'sed_dust','Sedmet. CODU','', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_sed_dustsco     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'sed_dustsco','Sedmet. SCDU','', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_g2p_gas     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'g2p_gas','Gas2particle gas sink','', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_g2p_aer     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'g2p_aer','Gas2particle tr2 src','', (/ ('', i=1, 10) /))
 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 ! histrac
 
-  type(ctrl_out),save :: o_fluxbb     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'fluxbb','Flux BB','mg/m2/s', (/ ('', i=1, 9) /))
-
-  type(ctrl_out),save :: o_fluxff     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'fluxff','Flux FF','mg/m2/s', (/ ('', i=1, 9) /))
-
-  type(ctrl_out),save :: o_fluxbcbb     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'fluxbcbb','Flux BC-BB','mg/m2/s', (/ ('', i=1, 9) /))
-
-  type(ctrl_out),save :: o_fluxbcff     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'fluxbcff','Flux BC-FF','mg/m2/s', (/ ('', i=1, 9) /))
-
-  type(ctrl_out),save :: o_fluxbcnff     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'fluxbcnff','Flux BC-NFF','mg/m2/s', (/ ('', i=1, 9) /))
-
-  type(ctrl_out),save :: o_fluxbcba     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'fluxbcba','Flux BC-BA','mg/m2/s', (/ ('', i=1, 9) /))
-
-  type(ctrl_out),save :: o_fluxbc     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'fluxbc','Flux BC','mg/m2/s', (/ ('', i=1, 9) /))
-
-  type(ctrl_out),save :: o_fluxombb     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'fluxombb','Flux OM-BB','mg/m2/s', (/ ('', i=1, 9) /))
-
-  type(ctrl_out),save :: o_fluxomff     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'fluxomff','Flux OM-FF','mg/m2/s', (/ ('', i=1, 9) /))
-
-  type(ctrl_out),save :: o_fluxomnff     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'fluxomnff','Flux OM-NFF','mg/m2/s', (/ ('', i=1, 9) /))
-
-  type(ctrl_out),save :: o_fluxomba     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'fluxomba','Flux OM-BA','mg/m2/s', (/ ('', i=1, 9) /))
-
-  type(ctrl_out),save :: o_fluxomnat     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'fluxomnat','Flux OM-NT','mg/m2/s', (/ ('', i=1, 9) /))
-
-  type(ctrl_out),save :: o_fluxom     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'fluxom','Flux OM','mg/m2/s', (/ ('', i=1, 9) /))
-
-  type(ctrl_out),save :: o_fluxh2sff     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'fluxh2sff','Flux H2S FF','mgS/m2/s', (/ ('', i=1, 9) /))
-
-  type(ctrl_out),save :: o_fluxh2snff     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'fluxh2snff','Flux H2S non-FF','mgS/m2/s', (/ ('', i=1, 9) /))
-
-  type(ctrl_out),save :: o_fluxso2ff     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'fluxso2ff','Flux SO2 FF','mgS/m2/s', (/ ('', i=1, 9) /))
-
-  type(ctrl_out),save :: o_fluxso2nff     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'fluxso2nff','Flux SO2 non-FF','mgS/m2/s', (/ ('', i=1, 9) /))
-
-  type(ctrl_out),save :: o_fluxso2bb     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'fluxso2bb','Flux SO2 BB','mgS/m2/s', (/ ('', i=1, 9) /))
-
-  type(ctrl_out),save :: o_fluxso2vol     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'fluxso2vol','Flux SO2 Vol','mgS/m2/s', (/ ('', i=1, 9) /))
-
-  type(ctrl_out),save :: o_fluxso2ba     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'fluxso2ba','Flux SO2 Ba','mgS/m2/s', (/ ('', i=1, 9) /))
-
-  type(ctrl_out),save :: o_fluxso2     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'fluxso2','Flux SO2','mgS/m2/s', (/ ('', i=1, 9) /))
-
-  type(ctrl_out),save :: o_fluxso4ff     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'fluxso4ff','Flux SO4 FF','mgS/m2/s', (/ ('', i=1, 9) /))
-
-  type(ctrl_out),save :: o_fluxso4nff     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'fluxso4nff','Flux SO4 non-FF','mgS/m2/s', (/ ('', i=1, 9) /))
-
-  type(ctrl_out),save :: o_fluxso4bb     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'fluxso4bb','Flux SO4 BB','mgS/m2/s', (/ ('', i=1, 9) /))
-
-  type(ctrl_out),save :: o_fluxso4ba     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'fluxso4ba','Flux SO4 Ba','mgS/m2/s', (/ ('', i=1, 9) /))
-
-  type(ctrl_out),save :: o_fluxso4     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'fluxso4','Flux SO4','mgS/m2/s', (/ ('', i=1, 9) /))
-
-  type(ctrl_out),save :: o_fluxdms     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'fluxdms','Flux DMS','mgS/m2/s', (/ ('', i=1, 9) /))
-
-  type(ctrl_out),save :: o_fluxh2sbio     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'fluxh2sbio','Flux H2S Bio','mgS/m2/s', (/ ('', i=1, 9) /))
-
-  type(ctrl_out),save :: o_fluxdustec     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'fluxdustec','Flux Dust EC','mg/m2/s', (/ ('', i=1, 9) /))
-
-  type(ctrl_out),save :: o_fluxddfine     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'fluxddfine','DD Fine Mode','mg/m2/s', (/ ('', i=1, 9) /))
-
-  type(ctrl_out),save :: o_fluxddcoa     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'fluxddcoa','DD Coarse Mode','mg/m2/s', (/ ('', i=1, 9) /))
-
-  type(ctrl_out),save :: o_fluxddsco     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'fluxddsco','DD SCoarse Mode','mg/m2/s', (/ ('', i=1, 9) /))
-
-  type(ctrl_out),save :: o_fluxdd     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'fluxdd','Flux DD','mg/m2/s', (/ ('', i=1, 9) /))
-
-  type(ctrl_out),save :: o_fluxssfine     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'fluxssfine','SS Fine Mode','mg/m2/s', (/ ('', i=1, 9) /))
-
-  type(ctrl_out),save :: o_fluxsscoa     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'fluxsscoa','SS Coarse Mode','mg/m2/s', (/ ('', i=1, 9) /))
-
-  type(ctrl_out),save :: o_fluxss     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'fluxss','Flux SS','mg/m2/s', (/ ('', i=1, 9) /))
-
-  type(ctrl_out),save :: o_flux_sparam_ind     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'flux_sparam_ind','Ind emiss','mg/m2/s', (/ ('', i=1, 9) /))
-
-  type(ctrl_out),save :: o_flux_sparam_bb     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'flux_sparam_bb','BB emiss','mg/m2/s', (/ ('', i=1, 9) /))
-
-  type(ctrl_out),save :: o_flux_sparam_ff     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'flux_sparam_ff','FF emiss','mg/m2/s', (/ ('', i=1, 9) /))
-
-  type(ctrl_out),save :: o_flux_sparam_ddfine     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'flux_sparam_ddfine','DD fine emiss','mg/m2/s', (/ ('', i=1, 9) /))
-
-  type(ctrl_out),save :: o_flux_sparam_ddcoa     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'flux_sparam_ddcoa','DD coarse emiss','mg/m2/s', (/ ('', i=1, 9) /))
-
-  type(ctrl_out),save :: o_flux_sparam_ddsco     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'flux_sparam_ddsco','DD Scoarse emiss','mg/m2/s', (/ ('', i=1, 9) /))
-
-  type(ctrl_out),save :: o_flux_sparam_ssfine     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'flux_sparam_ssfine','SS fine emiss','mg/m2/s', (/ ('', i=1, 9) /))
-
-
-  type(ctrl_out),save :: o_flux_sparam_sscoa     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'flux_sparam_sscoa','SS coarse emiss','mg/m2/s', (/ ('', i=1, 9) /))
-
-  type(ctrl_out),save :: o_u10m_ss     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'u10m_ss','Zonal wind at 10 m SS','m/s', (/ ('', i=1, 9) /))
-
-  type(ctrl_out),save :: o_v10m_ss     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-  'v10m_ss','Meridional wind at 10 m SS','m/s', (/ ('', i=1, 9) /))
-
-
-!  type(ctrl_out),save :: o_     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10 /), &
-!  '','','', (/ ('', i=1, 9) /))
-
-
-
-!example  TYPE(ctrl_out), SAVE :: o_psbg = ctrl_out((/ 11, 11, 11, 11, 11, 11, 5, 5, 5 /), &
+  type(ctrl_out),save :: o_fluxbb     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'fluxbb','Flux BB','mg/m2/s', (/ ('', i=1, 10) /))
+
+  type(ctrl_out),save :: o_fluxff     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'fluxff','Flux FF','mg/m2/s', (/ ('', i=1, 10) /))
+
+  type(ctrl_out),save :: o_fluxbcbb     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'fluxbcbb','Flux BC-BB','mg/m2/s', (/ ('', i=1, 10) /))
+
+  type(ctrl_out),save :: o_fluxbcff     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'fluxbcff','Flux BC-FF','mg/m2/s', (/ ('', i=1, 10) /))
+
+  type(ctrl_out),save :: o_fluxbcnff     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'fluxbcnff','Flux BC-NFF','mg/m2/s', (/ ('', i=1, 10) /))
+
+  type(ctrl_out),save :: o_fluxbcba     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'fluxbcba','Flux BC-BA','mg/m2/s', (/ ('', i=1, 10) /))
+
+  type(ctrl_out),save :: o_fluxbc     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'fluxbc','Flux BC','mg/m2/s', (/ ('', i=1, 10) /))
+
+  type(ctrl_out),save :: o_fluxombb     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'fluxombb','Flux OM-BB','mg/m2/s', (/ ('', i=1, 10) /))
+
+  type(ctrl_out),save :: o_fluxomff     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'fluxomff','Flux OM-FF','mg/m2/s', (/ ('', i=1, 10) /))
+
+  type(ctrl_out),save :: o_fluxomnff     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'fluxomnff','Flux OM-NFF','mg/m2/s', (/ ('', i=1, 10) /))
+
+  type(ctrl_out),save :: o_fluxomba     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'fluxomba','Flux OM-BA','mg/m2/s', (/ ('', i=1, 10) /))
+
+  type(ctrl_out),save :: o_fluxomnat     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'fluxomnat','Flux OM-NT','mg/m2/s', (/ ('', i=1, 10) /))
+
+  type(ctrl_out),save :: o_fluxom     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'fluxom','Flux OM','mg/m2/s', (/ ('', i=1, 10) /))
+
+  type(ctrl_out),save :: o_fluxh2sff     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'fluxh2sff','Flux H2S FF','mgS/m2/s', (/ ('', i=1, 10) /))
+
+  type(ctrl_out),save :: o_fluxh2snff     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'fluxh2snff','Flux H2S non-FF','mgS/m2/s', (/ ('', i=1, 10) /))
+
+  type(ctrl_out),save :: o_fluxso2ff     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'fluxso2ff','Flux SO2 FF','mgS/m2/s', (/ ('', i=1, 10) /))
+
+  type(ctrl_out),save :: o_fluxso2nff     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'fluxso2nff','Flux SO2 non-FF','mgS/m2/s', (/ ('', i=1, 10) /))
+
+  type(ctrl_out),save :: o_fluxso2bb     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'fluxso2bb','Flux SO2 BB','mgS/m2/s', (/ ('', i=1, 10) /))
+
+  type(ctrl_out),save :: o_fluxso2vol     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'fluxso2vol','Flux SO2 Vol','mgS/m2/s', (/ ('', i=1, 10) /))
+
+  type(ctrl_out),save :: o_fluxso2ba     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'fluxso2ba','Flux SO2 Ba','mgS/m2/s', (/ ('', i=1, 10) /))
+
+  type(ctrl_out),save :: o_fluxso2     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'fluxso2','Flux SO2','mgS/m2/s', (/ ('', i=1, 10) /))
+
+  type(ctrl_out),save :: o_fluxso4ff     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'fluxso4ff','Flux SO4 FF','mgS/m2/s', (/ ('', i=1, 10) /))
+
+  type(ctrl_out),save :: o_fluxso4nff     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'fluxso4nff','Flux SO4 non-FF','mgS/m2/s', (/ ('', i=1, 10) /))
+
+  type(ctrl_out),save :: o_fluxso4bb     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'fluxso4bb','Flux SO4 BB','mgS/m2/s', (/ ('', i=1, 10) /))
+
+  type(ctrl_out),save :: o_fluxso4ba     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'fluxso4ba','Flux SO4 Ba','mgS/m2/s', (/ ('', i=1, 10) /))
+
+  type(ctrl_out),save :: o_fluxso4     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'fluxso4','Flux SO4','mgS/m2/s', (/ ('', i=1, 10) /))
+
+  type(ctrl_out),save :: o_fluxdms     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'fluxdms','Flux DMS','mgS/m2/s', (/ ('', i=1, 10) /))
+
+  type(ctrl_out),save :: o_fluxh2sbio     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'fluxh2sbio','Flux H2S Bio','mgS/m2/s', (/ ('', i=1, 10) /))
+
+  type(ctrl_out),save :: o_fluxdustec     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'fluxdustec','Flux Dust EC','mg/m2/s', (/ ('', i=1, 10) /))
+
+  type(ctrl_out),save :: o_fluxddfine     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'fluxddfine','DD Fine Mode','mg/m2/s', (/ ('', i=1, 10) /))
+
+  type(ctrl_out),save :: o_fluxddcoa     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'fluxddcoa','DD Coarse Mode','mg/m2/s', (/ ('', i=1, 10) /))
+
+  type(ctrl_out),save :: o_fluxddsco     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'fluxddsco','DD SCoarse Mode','mg/m2/s', (/ ('', i=1, 10) /))
+
+  type(ctrl_out),save :: o_fluxdd     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'fluxdd','Flux DD','mg/m2/s', (/ ('', i=1, 10) /))
+
+  type(ctrl_out),save :: o_fluxssfine     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'fluxssfine','SS Fine Mode','mg/m2/s', (/ ('', i=1, 10) /))
+
+  type(ctrl_out),save :: o_fluxsscoa     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'fluxsscoa','SS Coarse Mode','mg/m2/s', (/ ('', i=1, 10) /))
+
+  type(ctrl_out),save :: o_fluxss     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'fluxss','Flux SS','mg/m2/s', (/ ('', i=1, 10) /))
+
+  type(ctrl_out),save :: o_flux_sparam_ind     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'flux_sparam_ind','Ind emiss','mg/m2/s', (/ ('', i=1, 10) /))
+
+  type(ctrl_out),save :: o_flux_sparam_bb     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'flux_sparam_bb','BB emiss','mg/m2/s', (/ ('', i=1, 10) /))
+
+  type(ctrl_out),save :: o_flux_sparam_ff     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'flux_sparam_ff','FF emiss','mg/m2/s', (/ ('', i=1, 10) /))
+
+  type(ctrl_out),save :: o_flux_sparam_ddfine     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'flux_sparam_ddfine','DD fine emiss','mg/m2/s', (/ ('', i=1, 10) /))
+
+  type(ctrl_out),save :: o_flux_sparam_ddcoa     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'flux_sparam_ddcoa','DD coarse emiss','mg/m2/s', (/ ('', i=1, 10) /))
+
+  type(ctrl_out),save :: o_flux_sparam_ddsco     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'flux_sparam_ddsco','DD Scoarse emiss','mg/m2/s', (/ ('', i=1, 10) /))
+
+  type(ctrl_out),save :: o_flux_sparam_ssfine     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'flux_sparam_ssfine','SS fine emiss','mg/m2/s', (/ ('', i=1, 10) /))
+
+  type(ctrl_out),save :: o_flux_sparam_sscoa     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'flux_sparam_sscoa','SS coarse emiss','mg/m2/s', (/ ('', i=1, 10) /))
+
+  type(ctrl_out),save :: o_u10m_ss     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'u10m_ss','Zonal wind at 10 m SS','m/s', (/ ('', i=1, 10) /))
+
+  type(ctrl_out),save :: o_v10m_ss     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+  'v10m_ss','Meridional wind at 10 m SS','m/s', (/ ('', i=1, 10) /))
+
+!  type(ctrl_out),save :: o_     = ctrl_out((/ 4, 4, 4, 10, 10, 10, 10, 10, 10, 10 /), &
+!  '','','', (/ ('', i=1, 10) /))
+
+!example  TYPE(ctrl_out), SAVE :: o_psbg = ctrl_out((/ 11, 11, 11, 11, 11, 11, 5, 5, 5, 11 /), &
 !       'psbg', 'Pressure sfce below ground', '%', (/ "inst(X)", "inst(X)", "inst(X)", &
-!       "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)"  /))
-
-
-
+!       "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)"  /))
Index: LMDZ5/branches/testing/libf/phylmd/Dust/spla_output_write.h
===================================================================
--- LMDZ5/branches/testing/libf/phylmd/Dust/spla_output_write.h	(revision 2729)
+++ LMDZ5/branches/testing/libf/phylmd/Dust/spla_output_write.h	(revision 2787)
@@ -6,14 +6,14 @@
 ! traceur
 
-      CALL histwrite_phy( o_taue550          , diff_aod550_tot          )
-      CALL histwrite_phy( o_taue670          , diag_aod670_tot   )
+      CALL histwrite_phy( o_taue550          , diff_aod550_tot  )
+      CALL histwrite_phy( o_taue670          , diag_aod670_tot  )
       CALL histwrite_phy( o_taue865          , diag_aod865_tot  ) 
       IF(id_fine>0) CALL histwrite_phy( o_taue550_tr2      , diff_aod550_tr2  )
-      IF(id_fine>0) CALL histwrite_phy( o_taue670_tr2      , diag_aod670_tr2   )
+      IF(id_fine>0) CALL histwrite_phy( o_taue670_tr2      , diag_aod670_tr2  )
       IF(id_fine>0) CALL histwrite_phy( o_taue865_tr2      , diag_aod865_tr2  )
-      IF(id_coss>0) CALL histwrite_phy( o_taue550_ss       , diag_aod550_ss       )
+      IF(id_coss>0) CALL histwrite_phy( o_taue550_ss       , diag_aod550_ss   )
       IF(id_coss>0) CALL histwrite_phy( o_taue670_ss       , diag_aod670_ss   )
-      IF(id_coss>0) CALL histwrite_phy( o_taue865_ss       , diag_aod865_ss    )
-      IF(id_codu>0) CALL histwrite_phy( o_taue550_dust     , diag_aod550_dust   )
+      IF(id_coss>0) CALL histwrite_phy( o_taue865_ss       , diag_aod865_ss   )
+      IF(id_codu>0) CALL histwrite_phy( o_taue550_dust     , diag_aod550_dust )
       IF(id_codu>0) CALL histwrite_phy( o_taue670_dust     , diag_aod670_dust )
       IF(id_codu>0) CALL histwrite_phy( o_taue865_dust     , diag_aod865_dust )
@@ -22,35 +22,35 @@
       IF(id_scdu>0) CALL histwrite_phy( o_taue865_dustsco  , diag_aod865_dustsco )
       CALL histwrite_phy( o_taue550_aqua     , aod550_aqua  )
-      CALL histwrite_phy( o_taue550_terra    , aod550_terra    )
-      CALL histwrite_phy( o_taue670_aqua     , aod670_aqua     )
-      CALL histwrite_phy( o_taue670_terra    , aod670_terra    )
-      CALL histwrite_phy( o_taue865_aqua     , aod865_aqua    )
-      CALL histwrite_phy( o_taue865_terra    , aod865_terra    )
+      CALL histwrite_phy( o_taue550_terra    , aod550_terra )
+      CALL histwrite_phy( o_taue670_aqua     , aod670_aqua  )
+      CALL histwrite_phy( o_taue670_terra    , aod670_terra )
+      CALL histwrite_phy( o_taue865_aqua     , aod865_aqua  )
+      CALL histwrite_phy( o_taue865_terra    , aod865_terra )
 
       IF(id_fine>0) CALL histwrite_phy( o_taue550_fine_aqua     ,aod550_tr2_aqua   )
       IF(id_fine>0) CALL histwrite_phy( o_taue670_fine_aqua     ,aod670_tr2_aqua   )
       IF(id_fine>0) CALL histwrite_phy( o_taue865_fine_aqua     ,aod865_tr2_aqua   )
-      IF(id_coss>0) CALL histwrite_phy( o_taue550_coss_aqua      ,aod550_ss_aqua    )
-      IF(id_coss>0) CALL histwrite_phy( o_taue670_coss_aqua      ,aod670_ss_aqua    )
-      IF(id_coss>0) CALL histwrite_phy( o_taue865_coss_aqua      ,aod865_ss_aqua    )
-      IF(id_codu>0) CALL histwrite_phy( o_taue550_codu_aqua    ,aod550_dust_aqua    )
-      IF(id_codu>0) CALL histwrite_phy( o_taue670_codu_aqua    ,aod670_dust_aqua    )
-      IF(id_codu>0) CALL histwrite_phy( o_taue865_codu_aqua    ,aod865_dust_aqua    )
-      IF(id_scdu>0) CALL histwrite_phy( o_taue670_scdu_aqua ,aod670_dustsco_aqua    )
-      IF(id_scdu>0) CALL histwrite_phy( o_taue550_scdu_aqua ,aod550_dustsco_aqua    )
-      IF(id_scdu>0) CALL histwrite_phy( o_taue865_scdu_aqua ,aod865_dustsco_aqua    )
+      IF(id_coss>0) CALL histwrite_phy( o_taue550_coss_aqua      ,aod550_ss_aqua   )
+      IF(id_coss>0) CALL histwrite_phy( o_taue670_coss_aqua      ,aod670_ss_aqua   )
+      IF(id_coss>0) CALL histwrite_phy( o_taue865_coss_aqua      ,aod865_ss_aqua   )
+      IF(id_codu>0) CALL histwrite_phy( o_taue550_codu_aqua    ,aod550_dust_aqua   )
+      IF(id_codu>0) CALL histwrite_phy( o_taue670_codu_aqua    ,aod670_dust_aqua   )
+      IF(id_codu>0) CALL histwrite_phy( o_taue865_codu_aqua    ,aod865_dust_aqua   )
+      IF(id_scdu>0) CALL histwrite_phy( o_taue670_scdu_aqua ,aod670_dustsco_aqua   )
+      IF(id_scdu>0) CALL histwrite_phy( o_taue550_scdu_aqua ,aod550_dustsco_aqua   )
+      IF(id_scdu>0) CALL histwrite_phy( o_taue865_scdu_aqua ,aod865_dustsco_aqua   )
       
       IF(id_fine>0) CALL histwrite_phy( o_taue550_fine_terra     ,aod550_tr2_terra   )
       IF(id_fine>0) CALL histwrite_phy( o_taue670_fine_terra     ,aod670_tr2_terra   )
       IF(id_fine>0) CALL histwrite_phy( o_taue865_fine_terra     ,aod865_tr2_terra   )
-      IF(id_coss>0) CALL histwrite_phy( o_taue550_coss_terra      ,aod550_ss_terra    )
-      IF(id_coss>0) CALL histwrite_phy( o_taue670_coss_terra      ,aod670_ss_terra    )
-      IF(id_coss>0) CALL histwrite_phy( o_taue865_coss_terra      ,aod865_ss_terra    )
-      IF(id_codu>0) CALL histwrite_phy( o_taue550_codu_terra    ,aod550_dust_terra    )
-      IF(id_codu>0) CALL histwrite_phy( o_taue670_codu_terra    ,aod670_dust_terra    )
-      IF(id_codu>0) CALL histwrite_phy( o_taue865_codu_terra    ,aod865_dust_terra    )
-      IF(id_scdu>0) CALL histwrite_phy( o_taue670_scdu_terra ,aod670_dustsco_terra    )
-      IF(id_scdu>0) CALL histwrite_phy( o_taue550_scdu_terra ,aod550_dustsco_terra    )
-      IF(id_scdu>0) CALL histwrite_phy( o_taue865_scdu_terra ,aod865_dustsco_terra    )
+      IF(id_coss>0) CALL histwrite_phy( o_taue550_coss_terra      ,aod550_ss_terra   )
+      IF(id_coss>0) CALL histwrite_phy( o_taue670_coss_terra      ,aod670_ss_terra   )
+      IF(id_coss>0) CALL histwrite_phy( o_taue865_coss_terra      ,aod865_ss_terra   )
+      IF(id_codu>0) CALL histwrite_phy( o_taue550_codu_terra    ,aod550_dust_terra   )
+      IF(id_codu>0) CALL histwrite_phy( o_taue670_codu_terra    ,aod670_dust_terra   )
+      IF(id_codu>0) CALL histwrite_phy( o_taue865_codu_terra    ,aod865_dust_terra   )
+      IF(id_scdu>0) CALL histwrite_phy( o_taue670_scdu_terra ,aod670_dustsco_terra   )
+      IF(id_scdu>0) CALL histwrite_phy( o_taue550_scdu_terra ,aod550_dustsco_terra   )
+      IF(id_scdu>0) CALL histwrite_phy( o_taue865_scdu_terra ,aod865_dustsco_terra   )
 
 
@@ -133,5 +133,5 @@
       IF(id_codu>0) CALL histwrite_phy( o_d_tr_uscav04 , d_tr_uscav04 )
       IF(id_scdu>0) CALL histwrite_phy( o_d_tr_uscav05 , d_tr_uscav05 )
-      IF(id_prec>0) CALL histwrite_phy( o_d_tr_insc01 , d_tr_insc01 ) !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+      IF(id_prec>0) CALL histwrite_phy( o_d_tr_insc01 , d_tr_insc01 )
       IF(id_fine>0) CALL histwrite_phy( o_d_tr_insc02 , d_tr_insc02 )
       IF(id_coss>0) CALL histwrite_phy( o_d_tr_insc03 , d_tr_insc03 )
@@ -152,6 +152,5 @@
       IF(id_coss>0) CALL histwrite_phy( o_d_tr_ls03 , d_tr_ls03 )
       IF(id_codu>0) CALL histwrite_phy( o_d_tr_ls04 , d_tr_ls04 )
-      IF(id_scdu>0) CALL histwrite_phy( o_d_tr_ls05 , d_tr_ls05 )  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-      
+      IF(id_scdu>0) CALL histwrite_phy( o_d_tr_ls05 , d_tr_ls05 )
 
       IF(id_prec>0) CALL histwrite_phy( o_d_tr_dyn01 , d_tr_dyn01 )
@@ -159,5 +158,5 @@
       IF(id_coss>0) CALL histwrite_phy( o_d_tr_dyn03 , d_tr_dyn03 )
       IF(id_codu>0) CALL histwrite_phy( o_d_tr_dyn04 , d_tr_dyn04 )
-      IF(id_scdu>0) CALL histwrite_phy( o_d_tr_dyn05 , d_tr_dyn05 )  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+      IF(id_scdu>0) CALL histwrite_phy( o_d_tr_dyn05 , d_tr_dyn05 )
       
       IF(id_prec>0) CALL histwrite_phy( o_d_tr_cl01 , d_tr_cl01 )
@@ -165,11 +164,10 @@
       IF(id_coss>0) CALL histwrite_phy( o_d_tr_cl03 , d_tr_cl03 )
       IF(id_codu>0) CALL histwrite_phy( o_d_tr_cl04 , d_tr_cl04 )
-      IF(id_scdu>0) CALL histwrite_phy( o_d_tr_cl05 , d_tr_cl05 )  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+      IF(id_scdu>0) CALL histwrite_phy( o_d_tr_cl05 , d_tr_cl05 )
       IF(id_prec>0) CALL histwrite_phy( o_d_tr_th01 , d_tr_th01 )
       IF(id_fine>0) CALL histwrite_phy( o_d_tr_th02 , d_tr_th02 )
       IF(id_coss>0) CALL histwrite_phy( o_d_tr_th03 , d_tr_th03 )
       IF(id_codu>0) CALL histwrite_phy( o_d_tr_th04 , d_tr_th04 )
-      IF(id_scdu>0) CALL histwrite_phy( o_d_tr_th05 , d_tr_th05 )  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
+      IF(id_scdu>0) CALL histwrite_phy( o_d_tr_th05 , d_tr_th05 )
 
       IF(id_coss>0) CALL histwrite_phy( o_sed_ss , sed_ss)
@@ -232,9 +230,2 @@
       CALL histwrite_phy( o_u10m_ss             , u10m_ss              )
       CALL histwrite_phy( o_v10m_ss             , v10m_ss              )
-
-!      CALL histwrite_phy(  ,)
-!
-
-
-
-
Index: LMDZ5/branches/testing/libf/phylmd/Dust/splaeropt_5wv_rrtm.F90
===================================================================
--- LMDZ5/branches/testing/libf/phylmd/Dust/splaeropt_5wv_rrtm.F90	(revision 2787)
+++ LMDZ5/branches/testing/libf/phylmd/Dust/splaeropt_5wv_rrtm.F90	(revision 2787)
@@ -0,0 +1,180 @@
+!
+! $Id: splaeropt_5wv_rrtm.F90 2644 2016-10-02 16:55:08Z oboucher $
+!
+
+SUBROUTINE SPLAEROPT_5WV_RRTM(  &
+   zdm, zdh, tr_seri, RHcl,     &
+   tausum, tau )
+
+  USE DIMPHY
+  USE aero_mod
+  USE infotrac_phy
+  USE phys_local_var_mod, ONLY: od550aer,od865aer,ec550aer,od550lt1aer
+  !
+  ! Olivier Boucher Jan 2017
+  ! Based on Mie routines on ciclad CMIP6
+  !
+  IMPLICIT NONE
+  !
+  ! Input arguments:
+  !
+  REAL, DIMENSION(klon,klev), INTENT(IN)   :: zdh      !--m
+  REAL, DIMENSION(klon,klev), INTENT(IN)   :: zdm      !--kg/m2
+  REAL, DIMENSION(klon,klev), INTENT(IN)   :: RHcl     ! humidite relative ciel clair
+  REAL, DIMENSION(klon,klev,nbtr), INTENT(IN) :: tr_seri
+  !
+  ! Output arguments:
+  !
+  REAL, DIMENSION(klon,nwave,naero_tot), INTENT(OUT)      :: tausum
+  REAL, DIMENSION(klon,klev,nwave,naero_tot), INTENT(OUT) :: tau
+  !
+  ! Local
+  !
+  INTEGER, PARAMETER :: las = nwave_sw
+  LOGICAL :: soluble
+  
+  INTEGER :: i, k, m, itr, irh, aerindex
+  INTEGER :: spsol, spinsol, la
+  INTEGER :: RH_num(klon,klev)
+  INTEGER, PARAMETER :: la443 = 1
+  INTEGER, PARAMETER :: la550 = 2
+  INTEGER, PARAMETER :: la670 = 3
+  INTEGER, PARAMETER :: la765 = 4
+  INTEGER, PARAMETER :: la865 = 5
+  INTEGER, PARAMETER :: nbre_RH=12
+  INTEGER, PARAMETER :: naero_soluble=2
+  INTEGER, PARAMETER :: naero_insoluble=2
+  INTEGER, PARAMETER :: naero=naero_soluble+naero_insoluble
+
+  REAL, PARAMETER :: RH_tab(nbre_RH)=(/0.,10.,20.,30.,40.,50.,60.,70.,80.,85.,90.,95./)
+  REAL, PARAMETER :: RH_MAX=95.
+  REAL :: delta(klon,klev), rh(klon,klev)
+  REAL :: tau_ae5wv_int   ! Intermediate computation of epaisseur optique aerosol
+  REAL :: zrho
+  CHARACTER*20 modname
+  
+  ! Soluble components 1-accumulation mode soluble; 2- seasalt coarse
+  REAL :: alpha_aers_5wv(nbre_RH,las,naero_soluble)   ! Ext. coeff. ** m2/g 
+  ! Insoluble components 1- Dust: 2- BC; 3- POM
+  REAL :: alpha_aeri_5wv(las,naero_insoluble)         ! Ext. coeff. ** m2/g 
+  !
+  ! Proprietes optiques
+  !
+  REAL :: fact_RH(nbre_RH)
+
+! From here on we look at the optical parameters at 5 wavelengths:  
+! 443nm, 550, 670, 765 and 865 nm 
+!                                   le 12 AVRIL 2006 
+!  
+ DATA alpha_aers_5wv/ & 
+                           ! accumulation mode (sulfate+2% bc) soluble 
+       4.632, 4.632, 4.632, 4.632, 6.206, 6.827, 7.616, 8.716,10.514,12.025,14.688,21.539, &
+       3.981, 3.981, 3.981, 3.981, 5.346, 5.923, 6.662, 7.704, 9.437,10.914,13.562,20.591, &
+       3.265, 3.265, 3.265, 3.265, 4.400, 4.909, 5.565, 6.500, 8.081, 9.449,11.943,18.791, &
+       2.761, 2.761, 2.761, 2.761, 3.731, 4.182, 4.767, 5.606, 7.041, 8.294,10.610,17.118, &
+       2.307, 2.307, 2.307, 2.307, 3.129, 3.522, 4.034, 4.774, 6.052, 7.180, 9.286,15.340, &
+
+                           ! seasalt seasalt Coarse Soluble (CS)      
+       0.576, 0.690, 0.738, 0.789, 0.855, 0.935, 1.046, 1.212, 1.512, 1.785, 2.258, 3.449, &
+       0.595, 0.713, 0.763, 0.814, 0.880, 0.963, 1.079, 1.248, 1.550, 1.826, 2.306, 3.507, &
+       0.617, 0.738, 0.789, 0.842, 0.911, 0.996, 1.113, 1.286, 1.592, 1.871, 2.369, 3.562, &
+       0.632, 0.755, 0.808, 0.862, 0.931, 1.018, 1.140, 1.316, 1.626, 1.909, 2.409, 3.622, &
+       0.645, 0.771, 0.825, 0.880, 0.951, 1.039, 1.164, 1.344, 1.661, 1.948, 2.455, 3.682  /
+
+  DATA alpha_aeri_5wv/ &
+                                 ! coarse dust insoluble 
+       0.605, 0.611, 0.661, 0.714, 0.760, &
+                                 ! super coarse insoluble 
+       0.153, 0.156, 0.158, 0.157, 0.161 /
+  ! 
+  ! Initialisations
+  tausum(:,:,:)=0.
+  tau(:,:,:,:)=0.
+
+  modname='splaeropt_5wv_rrtm'
+
+  IF (naero.GT.naero_tot) THEN 
+    CALL abort_physic(modname,'Too many aerosol types',1)
+  ENDIF
+
+  DO irh=1,nbre_RH-1
+    fact_RH(irh)=1./(RH_tab(irh+1)-RH_tab(irh))
+  ENDDO
+   
+  DO k=1, klev
+    DO i=1, klon
+      rh(i,k)=MIN(RHcl(i,k)*100.,RH_MAX)
+      RH_num(i,k) = INT( rh(i,k)/10. + 1.)
+      IF (rh(i,k).GT.85.) RH_num(i,k)=10
+      IF (rh(i,k).GT.90.) RH_num(i,k)=11
+      delta(i,k)=(rh(i,k)-RH_tab(RH_num(i,k)))*fact_RH(RH_num(i,k))
+    ENDDO
+  ENDDO
+
+  DO itr=1,nbtr    !--loop over tracers  
+
+    IF (tname(itr+nqo)=='PREC') THEN       !--fine mode accumulation mode
+      CYCLE
+    ELSE IF (tname(itr+nqo)=='FINE') THEN  !--fine mode accumulation mode
+      soluble=.TRUE.
+      spsol=1
+      aerindex=1
+    ELSE IF (tname(itr+nqo)=='COSS') THEN  !--coarse mode sea salt
+      soluble=.TRUE.
+      spsol=2
+      aerindex=2
+    ELSE IF (tname(itr+nqo)=='CODU') THEN  !--coarse mode dust
+      soluble=.FALSE.
+      spinsol=1
+      aerindex=3
+    ELSE IF (tname(itr+nqo)=='SCDU') THEN  !--super coarse mode dust
+      soluble=.FALSE.
+      spinsol=2
+      aerindex=4
+    ELSE
+       CALL abort_physic(modname,'I cannot do aerosol optics for '//tname(itr+nqo),1)
+    ENDIF
+
+    DO la=1,las
+
+      !--only 550 and 865 nm are used
+      IF (la.NE.la550.AND.la.NE.la865) CYCLE
+
+      IF (soluble) THEN  !--soluble aerosol with RH dependence
+
+        DO k=1, klev
+          DO i=1, klon
+            tau_ae5wv_int = alpha_aers_5wv(RH_num(i,k),la,spsol)+DELTA(i,k)* &
+                           (alpha_aers_5wv(RH_num(i,k)+1,la,spsol) - & 
+                            alpha_aers_5wv(RH_num(i,k),la,spsol))
+            tau(i,k,la,aerindex) = tr_seri(i,k,itr)*zdm(i,k)*tau_ae5wv_int
+            tausum(i,la,aerindex)=tausum(i,la,aerindex)+tau(i,k,la,aerindex)
+          ENDDO
+        ENDDO
+
+      ELSE               !--cases of insoluble aerosol
+
+        DO k=1, klev
+          DO i=1, klon
+            tau_ae5wv_int = alpha_aeri_5wv(la,spinsol)
+            tau(i,k,la,aerindex) = tr_seri(i,k,itr)*zdm(i,k)*tau_ae5wv_int
+            tausum(i,la,aerindex)= tausum(i,la,aerindex)+tau(i,k,la,aerindex)
+          ENDDO
+        ENDDO
+
+      ENDIF
+
+    ENDDO   ! Boucle sur les longueurs d'onde
+  ENDDO     ! Boucle sur les masses de traceurs
+
+!--AOD calculations for diagnostics
+  od550aer(:)=SUM(tausum(:,la550,1:naero),dim=2)
+  od865aer(:)=SUM(tausum(:,la865,1:naero),dim=2)
+
+!--extinction coefficient for diagnostic
+  ec550aer(:,:)=SUM(tau(:,:,la550,1:naero),dim=3)/zdh(:,:)
+
+!--aod for particles lower than 1 micron
+  od550lt1aer(:)=tausum(:,la550,1)+tausum(:,la550,2)*0.3+tausum(:,la550,3)*0.2
+
+END SUBROUTINE SPLAEROPT_5WV_RRTM
Index: LMDZ5/branches/testing/libf/phylmd/Dust/splaeropt_6bands_rrtm.F90
===================================================================
--- LMDZ5/branches/testing/libf/phylmd/Dust/splaeropt_6bands_rrtm.F90	(revision 2787)
+++ LMDZ5/branches/testing/libf/phylmd/Dust/splaeropt_6bands_rrtm.F90	(revision 2787)
@@ -0,0 +1,264 @@
+!
+! $Id: splaeropt_6bands_rrtm.F90 2644 2016-10-02 16:55:08Z oboucher $
+!
+SUBROUTINE SPLAEROPT_6BANDS_RRTM ( &
+     zdm, tr_seri, RHcl,           &
+     tau_allaer, piz_allaer, cg_allaer )
+
+  USE dimphy
+  USE aero_mod
+  USE infotrac_phy
+  USE phys_local_var_mod, ONLY: absvisaer
+
+  ! Olivier Boucher Jan 2017
+  ! based on Mie routines on ciclad CMIP6
+  !
+  IMPLICIT NONE
+
+  INCLUDE "clesphys.h"
+  !
+  ! Input arguments:
+  !
+  REAL, DIMENSION(klon,klev),     INTENT(IN)  :: zdm        !--hauteur des couches en kg/m2
+  REAL, DIMENSION(klon,klev),     INTENT(IN)  :: RHcl       ! humidite relative ciel clair
+  REAL, DIMENSION(klon,klev,nbtr),INTENT(IN)  :: tr_seri
+  !
+  ! Output arguments:
+  ! 2= total aerosols 
+  ! 1= natural aerosols
+  !
+  REAL, DIMENSION(klon,klev,2,nbands_sw_rrtm), INTENT(OUT) :: tau_allaer ! epaisseur optique aerosol
+  REAL, DIMENSION(klon,klev,2,nbands_sw_rrtm), INTENT(OUT) :: piz_allaer ! single scattering albedo aerosol
+  REAL, DIMENSION(klon,klev,2,nbands_sw_rrtm), INTENT(OUT) :: cg_allaer  ! asymmetry parameter aerosol
+  !
+  ! Local
+  !
+  LOGICAL :: soluble
+  INTEGER :: i, k, irh, itr, inu
+  INTEGER :: aerindex, spsol, spinsol
+  INTEGER :: RH_num(klon,klev)
+
+  INTEGER, PARAMETER :: naero_soluble=2    ! 1- accumulation soluble; 2- coarse soluble
+  INTEGER, PARAMETER :: naero_insoluble=2  ! 1- coarse dust; 2- supercoarse dust
+  INTEGER, PARAMETER :: naero=naero_soluble+naero_insoluble
+
+  INTEGER, PARAMETER :: nbre_RH=12
+  REAL,PARAMETER :: RH_tab(nbre_RH)=(/0.,10.,20.,30.,40.,50.,60.,70.,80.,85.,90.,95./)
+  REAL, PARAMETER :: RH_MAX=95.
+  REAL :: delta(klon,klev), rh(klon,klev)
+  REAL :: tau_ae2b_int   ! Intermediate computation of epaisseur optique aerosol
+  REAL :: piz_ae2b_int   ! Intermediate computation of Single scattering albedo
+  REAL :: cg_ae2b_int    ! Intermediate computation of Assymetry parameter
+  REAL :: fact_RH(nbre_RH), tmp_var
+  !
+  REAL, DIMENSION(klon,klev,naero_tot,nbands_sw_rrtm) ::  tau_ae
+  REAL, DIMENSION(klon,klev,naero_tot,nbands_sw_rrtm) ::  piz_ae
+  REAL, DIMENSION(klon,klev,naero_tot,nbands_sw_rrtm) ::  cg_ae
+  !
+  ! Proprietes optiques
+  !
+  REAL:: alpha_aers_6bands(nbre_RH,nbands_sw_rrtm,naero_soluble)   !--unit m2/g aer
+  REAL:: alpha_aeri_6bands(nbands_sw_rrtm,naero_insoluble)         !--unit m2/g aer
+  REAL:: cg_aers_6bands(nbre_RH,nbands_sw_rrtm,naero_soluble)      !--unitless 
+  REAL:: cg_aeri_6bands(nbands_sw_rrtm,naero_insoluble)            !--unitless
+  REAL:: piz_aers_6bands(nbre_RH,nbands_sw_rrtm,naero_soluble)     !--unitless
+  REAL:: piz_aeri_6bands(nbands_sw_rrtm,naero_insoluble)           !--unitless
+  !
+  REAL, PARAMETER :: tau_min = 1.e-8
+  CHARACTER*20 modname
+
+!***************************************************************************
+!--the order of the soluble   species has to follow the spsol   index below
+!--the order of the insoluble species has to follow the spinsol index below
+
+  DATA alpha_aers_6bands/  & 
+       ! accumulation (sulfate+2% bc) mode soluble
+  5.212, 5.212, 5.212, 5.212, 6.973, 7.581, 8.349, 9.400,11.078,12.463,14.857,20.837, &
+  4.906, 4.906, 4.906, 4.906, 6.568, 7.195, 7.989, 9.088,10.869,12.354,14.951,21.545, &
+  3.940, 3.940, 3.940, 3.940, 5.291, 5.861, 6.591, 7.620, 9.332,10.791,13.410,20.370, &
+  2.292, 2.292, 2.292, 2.292, 3.105, 3.493, 3.996, 4.724, 5.978, 7.084, 9.146,15.067, &
+  0.762, 0.762, 0.762, 0.762, 1.050, 1.201, 1.401, 1.699, 2.232, 2.721, 3.675, 6.678, &
+  0.090, 0.090, 0.090, 0.090, 0.122, 0.141, 0.166, 0.204, 0.275, 0.344, 0.484, 0.973, &
+        ! coarse seasalt
+  0.547, 0.657, 0.705, 0.754, 0.817, 0.896, 1.008, 1.169, 1.456, 1.724, 2.199, 3.358, &
+  0.566, 0.679, 0.727, 0.776, 0.840, 0.920, 1.032, 1.196, 1.492, 1.760, 2.238, 3.416, &
+  0.596, 0.714, 0.764, 0.816, 0.882, 0.965, 1.081, 1.250, 1.552, 1.828, 2.310, 3.509, &
+  0.644, 0.771, 0.825, 0.880, 0.951, 1.040, 1.164, 1.345, 1.666, 1.957, 2.462, 3.700, &
+  0.640, 0.772, 0.829, 0.887, 0.965, 1.061, 1.198, 1.398, 1.758, 2.085, 2.658, 4.031, &
+  0.452, 0.562, 0.609, 0.659, 0.728, 0.813, 0.938, 1.125, 1.471, 1.797, 2.384, 3.855  /
+
+  DATA alpha_aeri_6bands/  & 
+       ! coarse dust insoluble
+  0.594, 0.610, 0.619, 0.762, 0.791, 0.495, &
+       ! supercoarse dust insoluble 
+  0.151, 0.152, 0.155, 0.159, 0.168, 0.167  /
+
+  DATA cg_aers_6bands/ &
+       ! accumulation (sulfate+2% bc) mode soluble 
+  0.692, 0.692, 0.692, 0.692, 0.735, 0.739, 0.744, 0.749, 0.755, 0.759, 0.765, 0.772, &
+  0.690, 0.690, 0.690, 0.690, 0.736, 0.740, 0.746, 0.752, 0.760, 0.765, 0.771, 0.779, &
+  0.678, 0.678, 0.678, 0.678, 0.727, 0.733, 0.740, 0.748, 0.759, 0.766, 0.775, 0.787, &
+  0.641, 0.641, 0.641, 0.641, 0.692, 0.700, 0.710, 0.721, 0.736, 0.746, 0.760, 0.781, &
+  0.553, 0.553, 0.553, 0.553, 0.603, 0.615, 0.627, 0.643, 0.664, 0.678, 0.699, 0.735, &
+  0.343, 0.343, 0.343, 0.343, 0.386, 0.399, 0.414, 0.433, 0.460, 0.480, 0.510, 0.569, &
+       ! seasalt coarse Soluble
+  0.754, 0.770, 0.776, 0.781, 0.784, 0.791, 0.797, 0.805, 0.815, 0.822, 0.828, 0.840, &
+  0.736, 0.753, 0.759, 0.765, 0.771, 0.778, 0.785, 0.793, 0.804, 0.811, 0.820, 0.831, &
+  0.716, 0.735, 0.742, 0.748, 0.754, 0.762, 0.769, 0.778, 0.789, 0.796, 0.807, 0.819, &
+  0.704, 0.725, 0.733, 0.739, 0.745, 0.752, 0.759, 0.768, 0.778, 0.784, 0.792, 0.803, &
+  0.716, 0.737, 0.744, 0.751, 0.756, 0.763, 0.770, 0.777, 0.786, 0.790, 0.795, 0.800, &
+  0.688, 0.730, 0.741, 0.751, 0.761, 0.771, 0.782, 0.795, 0.810, 0.820, 0.833, 0.849  /
+
+  DATA cg_aeri_6bands/ &
+       ! coarse dust insoluble
+  0.801, 0.779, 0.709, 0.698, 0.710, 0.687, &
+       ! super coarse dust insoluble
+  0.862, 0.871, 0.852, 0.799, 0.758, 0.651  /
+
+  DATA piz_aers_6bands/&
+       ! accumulation (sulfate+2% bc) mode soluble
+  0.941, 0.941, 0.941, 0.941, 0.958, 0.961, 0.965, 0.969, 0.974, 0.977, 0.981, 0.987, &
+  0.941, 0.941, 0.941, 0.941, 0.959, 0.963, 0.967, 0.971, 0.976, 0.979, 0.983, 0.988, &
+  0.953, 0.953, 0.953, 0.953, 0.967, 0.971, 0.974, 0.978, 0.982, 0.984, 0.988, 0.992, &
+  0.955, 0.955, 0.955, 0.955, 0.969, 0.972, 0.976, 0.980, 0.984, 0.986, 0.989, 0.994, &
+  0.936, 0.936, 0.936, 0.936, 0.955, 0.961, 0.966, 0.972, 0.978, 0.982, 0.987, 0.993, &
+  0.792, 0.792, 0.792, 0.792, 0.848, 0.867, 0.887, 0.907, 0.931, 0.944, 0.960, 0.980, &
+       ! seasalt coarse soluble
+  1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.001, 1.000, &
+  1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, &
+  1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, &
+  1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, &
+  0.994, 0.994, 0.995, 0.995, 0.995, 0.995, 0.996, 0.996, 0.996, 0.996, 0.996, 0.996, &
+  0.976, 0.867, 0.837, 0.814, 0.796, 0.774, 0.754, 0.735, 0.713, 0.702, 0.690, 0.675  /
+
+  DATA piz_aeri_6bands/ &
+       ! coarse dust insoluble
+  0.866, 0.875, 0.915, 0.977, 0.993, 0.971, &
+       ! super coarse dust insoluble
+  0.789, 0.749, 0.791, 0.918, 0.970, 0.909  /
+!
+  spsol = 0
+  spinsol = 0 
+
+  modname='splaeropt_6bands_rrt'
+
+  IF (NSW.NE.nbands_sw_rrtm) THEN
+     CALL abort_physic(modname,'Erreur NSW doit etre egal a 6 pour cette routine',1)
+  ENDIF
+
+  DO irh=1,nbre_RH-1
+    fact_RH(irh)=1./(RH_tab(irh+1)-RH_tab(irh))
+  ENDDO
+   
+  DO k=1, klev
+    DO i=1, klon
+      rh(i,k)=MIN(RHcl(i,k)*100.,RH_MAX)
+      RH_num(i,k) = INT(rh(i,k)/10. + 1.)
+      IF (rh(i,k).GT.85.) RH_num(i,k)=10
+      IF (rh(i,k).GT.90.) RH_num(i,k)=11
+      delta(i,k)=(rh(i,k)-RH_tab(RH_num(i,k)))*fact_RH(RH_num(i,k))
+    ENDDO
+  ENDDO
+
+  tau_ae(:,:,:,:)=0.
+  piz_ae(:,:,:,:)=0.
+  cg_ae(:,:,:,:)=0.
+    
+  DO itr=1, nbtr
+
+    IF (tname(itr+nqo)=='PREC') THEN       !--precursor
+      CYCLE
+    ELSE IF (tname(itr+nqo)=='FINE') THEN  !--fine mode accumulation mode
+      soluble=.TRUE.
+      spsol=1
+      aerindex=1
+    ELSE IF (tname(itr+nqo)=='COSS') THEN  !--coarse mode sea salt
+      soluble=.TRUE.
+      spsol=2
+      aerindex=2
+    ELSE IF (tname(itr+nqo)=='CODU') THEN  !--coarse mode dust
+      soluble=.FALSE.
+      spinsol=1
+      aerindex=3
+    ELSE IF (tname(itr+nqo)=='SCDU') THEN  !--super coarse mode dust
+      soluble=.FALSE.
+      spinsol=2
+      aerindex=4
+    ELSE
+       CALL abort_physic(modname,'I cannot do aerosol optics for '//tname(itr+nqo),1)
+    ENDIF
+
+    IF (soluble) THEN ! For aerosol soluble components
+
+         DO k=1, klev
+           DO i=1, klon
+
+             tmp_var=tr_seri(i,k,itr)*zdm(i,k) !-- g/m2
+
+             DO inu=1,NSW
+
+               tau_ae2b_int= alpha_aers_6bands(RH_num(i,k),inu,spsol)+ & 
+                             delta(i,k)* (alpha_aers_6bands(RH_num(i,k)+1,inu,spsol) - & 
+                             alpha_aers_6bands(RH_num(i,k),inu,spsol))
+                   
+               piz_ae2b_int = piz_aers_6bands(RH_num(i,k),inu,spsol) + & 
+                              delta(i,k)* (piz_aers_6bands(RH_num(i,k)+1,inu,spsol) - & 
+                              piz_aers_6bands(RH_num(i,k),inu,spsol))
+                   
+               cg_ae2b_int = cg_aers_6bands(RH_num(i,k),inu,spsol) + & 
+                             delta(i,k)* (cg_aers_6bands(RH_num(i,k)+1,inu,spsol) - & 
+                             cg_aers_6bands(RH_num(i,k),inu,spsol))
+
+               tau_ae(i,k,aerindex,inu)    = tmp_var*tau_ae2b_int
+               piz_ae(i,k,aerindex,inu)    = piz_ae2b_int
+               cg_ae(i,k,aerindex,inu)     = cg_ae2b_int
+
+             ENDDO
+           ENDDO
+         ENDDO
+
+    ELSE    ! For all aerosol insoluble components
+
+       DO k=1, klev
+         DO i=1, klon
+
+           tmp_var=tr_seri(i,k,itr)*zdm(i,k) !-- g/m2
+
+           DO inu=1,NSW
+             tau_ae2b_int = alpha_aeri_6bands(inu,spinsol)
+             piz_ae2b_int = piz_aeri_6bands(inu,spinsol)
+             cg_ae2b_int = cg_aeri_6bands(inu,spinsol) 
+
+             tau_ae(i,k,aerindex,inu) = tmp_var*tau_ae2b_int
+             piz_ae(i,k,aerindex,inu) = piz_ae2b_int
+             cg_ae(i,k,aerindex,inu)= cg_ae2b_int
+           ENDDO
+         ENDDO
+       ENDDO
+
+     ENDIF ! soluble / insoluble
+
+  ENDDO  ! nbtr
+
+!--all (natural + anthropogenic) aerosol
+  tau_allaer(:,:,2,:)=SUM(tau_ae(:,:,1:naero,:),dim=3) 
+  tau_allaer(:,:,2,:)=MAX(tau_allaer(:,:,2,:),tau_min)
+
+  piz_allaer(:,:,2,:)=SUM(tau_ae(:,:,1:naero,:)*piz_ae(:,:,1:naero,:),dim=3)/tau_allaer(:,:,2,:)
+  piz_allaer(:,:,2,:)=MIN(MAX(piz_allaer(:,:,2,:),0.01),1.0)
+  WHERE (tau_allaer(:,:,2,:).LE.tau_min) piz_allaer(:,:,2,:)=1.0
+
+  cg_allaer(:,:,2,:)=SUM(tau_ae(:,:,1:naero,:)*piz_ae(:,:,1:naero,:)*cg_ae(:,:,1:naero,:),dim=3)/  & 
+                     (tau_allaer(:,:,2,:)*piz_allaer(:,:,2,:))
+  cg_allaer(:,:,2,:)=MIN(MAX(cg_allaer(:,:,2,:),0.0),1.0)
+
+!--no aerosol
+  tau_allaer(:,:,1,:)=tau_min 
+  piz_allaer(:,:,1,:)=1.0 
+  cg_allaer(:,:,1,:)=0.0
+
+!--waveband 2 and all aerosol (third index = 2)
+  inu=2
+  absvisaer(:)=SUM((1-piz_allaer(:,:,2,inu))*tau_allaer(:,:,2,inu),dim=2)
+
+END SUBROUTINE SPLAEROPT_6BANDS_RRTM
Index: LMDZ5/branches/testing/libf/phylmd/Dust/splaeropt_lw_rrtm.F90
===================================================================
--- LMDZ5/branches/testing/libf/phylmd/Dust/splaeropt_lw_rrtm.F90	(revision 2787)
+++ LMDZ5/branches/testing/libf/phylmd/Dust/splaeropt_lw_rrtm.F90	(revision 2787)
@@ -0,0 +1,91 @@
+!
+! splaeropt_lw_rrtm.F90 2014-05-13 C. Kleinschmitt
+!                      2016-05-03 O. Boucher 
+!
+! This routine feeds aerosol LW properties to RRTM
+! we only consider absorption (not scattering)
+
+SUBROUTINE SPLAEROPT_LW_RRTM(ok_alw,zdm,tr_seri)
+
+  USE dimphy
+  USE aero_mod
+  USE infotrac_phy
+  USE phys_state_var_mod, ONLY : tau_aero_lw_rrtm
+  USE YOERAD, ONLY : NLW
+
+  IMPLICIT NONE
+
+  INCLUDE "clesphys.h"
+  !
+  ! Input arguments:
+  !
+  LOGICAL, INTENT(IN) :: ok_alw
+  REAL, DIMENSION(klon,klev), INTENT(IN)      :: zdm
+  REAL, DIMENSION(klon,klev,nbtr), INTENT(IN) :: tr_seri
+  !
+  ! Local arguments : 
+  !
+  INTEGER, PARAMETER :: naero_soluble=2    ! 1- accumulation soluble; 2- coarse soluble
+  INTEGER, PARAMETER :: naero_insoluble=2  ! 1- coarse dust; 2- supercoarse dust
+  INTEGER, PARAMETER :: naero=naero_soluble+naero_insoluble
+  !
+  INTEGER inu, itr, spinsol
+  CHARACTER*20 modname
+  !
+  !--absorption coefficient for coarse and super-coarse DUST
+  REAL:: alpha_abs_CIDUST_16bands(nbands_lw_rrtm,naero_insoluble)   !--unit m2/g 
+  DATA alpha_abs_CIDUST_16bands /                         &
+   ! Dust CO insoluble
+  0.001, 0.003, 0.005, 0.006, 0.011, 0.031, 0.157, 0.102, &
+  0.017, 0.056, 0.032, 0.008, 0.010, 0.011, 0.013, 0.016, & 
+   ! Dust SC insoluble
+  0.002, 0.004, 0.007, 0.010, 0.018, 0.043, 0.099, 0.071, &
+  0.021, 0.056, 0.033, 0.011, 0.013, 0.014, 0.016, 0.018 /
+
+  modname='splaeropt_lw_rrtm'
+  ! 
+  IF (NLW.NE.nbands_lw_rrtm) THEN
+    CALL abort_physic(modname,'Erreur NLW doit etre egal a 16 pour cette routine',1)
+  ENDIF
+  !
+  IF (ok_alw) THEN 
+    !
+    !--initialisation
+    tau_aero_lw_rrtm = 0.0
+    !
+    DO itr=1,nbtr
+      !
+      IF (tname(itr+nqo)=='PREC') THEN       !--precursor
+        CYCLE
+      ELSE IF (tname(itr+nqo)=='FINE') THEN  !--fine mode accumulation mode
+        CYCLE
+      ELSE IF (tname(itr+nqo)=='COSS') THEN  !--coarse mode sea salt
+        CYCLE
+      ELSE IF (tname(itr+nqo)=='CODU') THEN  !--coarse mode dust
+        spinsol=1
+      ELSE IF (tname(itr+nqo)=='SCDU') THEN  !--super coarse mode dust
+        spinsol=2
+      ELSE
+         CALL abort_physic(modname,'I cannot do aerosol optics for '//tname(itr+nqo),1)
+      ENDIF
+      !
+      DO inu=1,NLW
+        !
+        !--total aerosol
+        tau_aero_lw_rrtm(:,:,2,inu) = tau_aero_lw_rrtm(:,:,2,inu) + tr_seri(:,:,itr)*zdm(:,:)*alpha_abs_CIDUST_16bands(inu,spinsol)
+        !--no aerosol at all
+        tau_aero_lw_rrtm(:,:,1,inu) = tau_aero_lw_rrtm(:,:,1,inu) + 0.0
+        !
+      ENDDO
+    !
+    ENDDO
+    !
+    !--avoid very small values
+    tau_aero_lw_rrtm = MAX(tau_aero_lw_rrtm,1.e-15)
+    ! 
+  ELSE
+    !--default value
+    tau_aero_lw_rrtm = 1.e-15
+  ENDIF
+  !
+END SUBROUTINE SPLAEROPT_LW_RRTM
Index: LMDZ5/branches/testing/libf/phylmd/Dust/splaerosol_optic_rrtm.F90
===================================================================
--- LMDZ5/branches/testing/libf/phylmd/Dust/splaerosol_optic_rrtm.F90	(revision 2787)
+++ LMDZ5/branches/testing/libf/phylmd/Dust/splaerosol_optic_rrtm.F90	(revision 2787)
@@ -0,0 +1,83 @@
+! $Id: splaerosol_optic_rrtm.F90 2644 2016-10-02 16:55:08Z oboucher $
+!
+SUBROUTINE splaerosol_optic_rrtm( ok_alw, pplay, paprs, t_seri, rhcl, &
+     tr_seri, mass_solu_aero, mass_solu_aero_pi, &
+     tau_aero, piz_aero, cg_aero, &
+     tausum_aero, tau3d_aero )
+
+  ! This routine will :
+  ! 1) recevie the aerosols(already read and interpolated) corresponding to flag_aerosol
+  ! 2) calculate the optical properties for the aerosols
+  !
+
+  USE dimphy
+  USE aero_mod
+  USE infotrac_phy
+  USE YOMCST, ONLY: RD, RG
+
+  IMPLICIT NONE
+
+  INCLUDE "clesphys.h"
+
+
+  ! Input arguments
+  !****************************************************************************************
+  LOGICAL, INTENT(IN) :: ok_alw                      ! Apply aerosol LW effect or not
+  REAL, DIMENSION(klon,klev), INTENT(IN)   :: pplay
+  REAL, DIMENSION(klon,klev+1), INTENT(IN) :: paprs
+  REAL, DIMENSION(klon,klev), INTENT(IN)   :: t_seri
+  REAL, DIMENSION(klon,klev), INTENT(IN)   :: rhcl   ! humidite relative ciel clair
+  REAL, DIMENSION(klon,klev,nbtr), INTENT(IN) :: tr_seri ! concentration tracer
+
+  ! Output arguments
+  !****************************************************************************************
+  REAL, DIMENSION(klon,klev), INTENT(OUT)     :: mass_solu_aero    ! Total mass for all soluble aerosols
+  REAL, DIMENSION(klon,klev), INTENT(OUT)     :: mass_solu_aero_pi !     -"-     preindustrial values
+  REAL, DIMENSION(klon,klev,2,NSW), INTENT(OUT) :: tau_aero    ! Aerosol optical thickness
+  REAL, DIMENSION(klon,klev,2,NSW), INTENT(OUT) :: piz_aero    ! Single scattering albedo aerosol
+  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,klev,nwave,naero_tot), INTENT(OUT)  :: tau3d_aero
+
+  INTEGER i, k, itr
+  REAL, DIMENSION(klon,klev) :: zdm, zdh
+  REAL zrho, pdel
+  !
+  ! Calculate the total mass of all soluble accumulation mode aerosols
+  ! to be revisited for AR6
+  !
+  mass_solu_aero(:,:)    = 0.0
+  mass_solu_aero_pi(:,:) = 0.0
+  !
+  DO itr=1,nbtr
+    IF (tname(itr+nqo)=='FINE') THEN
+      mass_solu_aero(:,:)    = tr_seri(:,:,itr)
+      mass_solu_aero_pi(:,:) = tr_seri(:,:,itr)
+    ENDIF
+  ENDDO
+
+  ! Calculate layer thickness
+  DO k = 1, klev
+    DO i = 1, klon
+      pdel=paprs(i,k)-paprs(i,k+1)
+      zrho=pplay(i,k)/t_seri(i,k)/RD             ! kg/m3
+      zdh(i,k)=pdel/(RG*zrho)                    ! m
+      zdm(i,k)=pdel/RG                           ! kg/m2
+    ENDDO
+  ENDDO
+
+!--new aerosol properties
+! aeropt_6bands for rrtm
+  CALL splaeropt_6bands_rrtm(       &
+       zdm, tr_seri, rhcl,          & 
+       tau_aero, piz_aero, cg_aero )
+
+! aeropt_5wv only for validation and diagnostics
+  CALL splaeropt_5wv_rrtm(          &
+       zdm, zdh, tr_seri, rhcl,     & 
+       tausum_aero, tau3d_aero )
+
+! LW optical properties for tropospheric aerosols
+  CALL splaeropt_lw_rrtm(ok_alw,zdm,tr_seri)
+
+END SUBROUTINE splaerosol_optic_rrtm
Index: LMDZ5/branches/testing/libf/phylmd/StratAer/aer_sedimnt.F90
===================================================================
--- LMDZ5/branches/testing/libf/phylmd/StratAer/aer_sedimnt.F90	(revision 2729)
+++ LMDZ5/branches/testing/libf/phylmd/StratAer/aer_sedimnt.F90	(revision 2787)
@@ -14,5 +14,5 @@
 !-----------------------------------------------------------------------
 
-  USE phys_local_var_mod, ONLY: mdw, sfluxaer, DENSO4, f_r_wet, vsed_aer
+  USE phys_local_var_mod, ONLY: mdw, budg_sed_part, DENSO4, f_r_wet, vsed_aer
   USE dimphy, ONLY : klon,klev
   USE infotrac
@@ -106,10 +106,10 @@
 !---ZAERONWM1 now contains the surface concentration at the new timestep
 !---PFLUXAER in unit of xx m-2 s-1 
-sfluxaer(:)=0.0
+budg_sed_part(:)=0.0
 DO JL=1,klon
   ZRHO=pplay(JL,1)/(RD*t_seri(JL,1))
   DO nb=1,nbtr_bin
-    !compute sfluxaer as sum over bins in kg(S)/m2/s
-    sfluxaer(JL)=sfluxaer(JL)+ZRHO*ZAERONWM1(JL,nb)*ZVAER(JL,1,nb)*(mSatom/mH2SO4mol) &
+    !compute budg_sed_part as sum over bins in kg(S)/m2/s
+    budg_sed_part(JL)=budg_sed_part(JL)+ZRHO*ZAERONWM1(JL,nb)*ZVAER(JL,1,nb)*(mSatom/mH2SO4mol) &
                 & *dens_aer_dry*4./3.*RPI*(mdw(nb)/2.)**3
   ENDDO
Index: LMDZ5/branches/testing/libf/phylmd/StratAer/aerophys.F90
===================================================================
--- LMDZ5/branches/testing/libf/phylmd/StratAer/aerophys.F90	(revision 2729)
+++ LMDZ5/branches/testing/libf/phylmd/StratAer/aerophys.F90	(revision 2787)
@@ -6,5 +6,6 @@
   REAL,PARAMETER                         :: dens_aer_dry=1848.682308 ! dry aerosol particle mass density at T_0=293K[kg/m3]
   REAL,PARAMETER                         :: dens_aer_ref=1483.905336 ! aerosol particle mass density with 75% H2SO4 at T_0=293K[kg/m3]
-  REAL,PARAMETER                         :: mdwmin=0.002e-6          ! dry diameter of smallest aerosol particles [m]
+!  REAL,PARAMETER                         :: mdwmin=0.002e-6          ! dry diameter of smallest aerosol particles [m]
+  REAL,PARAMETER                         :: mdwmin=0.2e-6          ! dry diameter of smallest aerosol particles [m]  !--testing
   REAL,PARAMETER                         :: V_rat=2.0                ! volume ratio of neighboring size bins
   REAL,PARAMETER                         :: mfrac_H2SO4=0.75         ! default mass fraction of H2SO4 in the aerosol
Index: LMDZ5/branches/testing/libf/phylmd/StratAer/interp_sulf_input.F90
===================================================================
--- LMDZ5/branches/testing/libf/phylmd/StratAer/interp_sulf_input.F90	(revision 2729)
+++ LMDZ5/branches/testing/libf/phylmd/StratAer/interp_sulf_input.F90	(revision 2787)
@@ -8,5 +8,5 @@
   USE mod_phys_lmdz_mpi_data, ONLY :  is_mpi_root
   USE mod_phys_lmdz_omp_data, ONLY :  is_omp_root
-  USE phys_local_var_mod, ONLY : OCS_backgr_tend, SO2_backgr_tend
+  USE phys_local_var_mod, ONLY : budg_3D_backgr_ocs, budg_3D_backgr_so2
   USE phys_local_var_mod, ONLY : OCS_lifetime, SO2_lifetime
   USE mod_phys_lmdz_para 
@@ -34,4 +34,5 @@
   REAL OCS_tmp, SO2_tmp
   INTEGER, SAVE :: mth_pre
+!$OMP THREADPRIVATE(mth_pre)
 
 ! Champs reconstitues
@@ -244,6 +245,6 @@
         tr_seri(i,k,id_SO2_strat)=SO2_clim(i,k)
       ENDIF
-      OCS_backgr_tend(i,k)=tr_seri(i,k,id_OCS_strat)-OCS_tmp
-      SO2_backgr_tend(i,k)=tr_seri(i,k,id_SO2_strat)-SO2_tmp
+      budg_3D_backgr_ocs(i,k)=tr_seri(i,k,id_OCS_strat)-OCS_tmp
+      budg_3D_backgr_so2(i,k)=tr_seri(i,k,id_SO2_strat)-SO2_tmp
     ENDDO
   ENDDO
@@ -252,6 +253,6 @@
   DO i=1, klon
     DO k=1, klev
-      SO2_backgr_tend(i,k)=SO2_backgr_tend(i,k)*mSatom/mSO2mol*(paprs(i,k)-paprs(i,k+1))/RG/pdtphys
-      OCS_backgr_tend(i,k)=OCS_backgr_tend(i,k)*mSatom/mOCSmol*(paprs(i,k)-paprs(i,k+1))/RG/pdtphys
+      budg_3D_backgr_ocs(i,k)=budg_3D_backgr_ocs(i,k)*mSatom/mOCSmol*(paprs(i,k)-paprs(i,k+1))/RG/pdtphys
+      budg_3D_backgr_so2(i,k)=budg_3D_backgr_so2(i,k)*mSatom/mSO2mol*(paprs(i,k)-paprs(i,k+1))/RG/pdtphys
     ENDDO
   ENDDO
Index: LMDZ5/branches/testing/libf/phylmd/StratAer/micphy_tstep.F90
===================================================================
--- LMDZ5/branches/testing/libf/phylmd/StratAer/micphy_tstep.F90	(revision 2729)
+++ LMDZ5/branches/testing/libf/phylmd/StratAer/micphy_tstep.F90	(revision 2787)
@@ -4,5 +4,5 @@
   USE aerophys
   USE infotrac
-  USE phys_local_var_mod, ONLY: mdw, sulf_nucl, sulf_cond_evap, R2SO4, DENSO4, f_r_wet
+  USE phys_local_var_mod, ONLY: mdw, budg_3D_nucl, budg_3D_cond_evap, R2SO4, DENSO4, f_r_wet
   USE nucleation_tstep_mod
   USE cond_evap_tstep_mod
@@ -68,6 +68,6 @@
   IF (is_strato(ilon,ilev)) THEN
     ! initialize sulfur fluxes
-    sulf_nucl(ilon,ilev)=0.0
-    sulf_cond_evap(ilon,ilev)=0.0
+    budg_3D_nucl(ilon,ilev)=0.0
+    budg_3D_cond_evap(ilon,ilev)=0.0
     H2SO4_init=tr_seri(ilon,ilev,id_H2SO4_strat)
     ! adaptive timestep for nucleation and condensation
@@ -109,7 +109,7 @@
       CALL nucleation_part(nucl_rate,ntot,x,dt,Vbin,tr_seri(ilon,ilev,:))
       ! compute fluxes as diagnostic in [kg(S)/m2/layer/s] (now - for evap and + for cond)
-      sulf_cond_evap(ilon,ilev)=sulf_cond_evap(ilon,ilev)+mSatom/mH2SO4mol &
+      budg_3D_cond_evap(ilon,ilev)=budg_3D_cond_evap(ilon,ilev)+mSatom/mH2SO4mol &
                & *cond_evap_rate*(paprs(ilon,ilev)-paprs(ilon,ilev+1))/RG*dt/pdtphys
-      sulf_nucl(ilon,ilev)=sulf_nucl(ilon,ilev)+mSatom/mH2SO4mol &
+      budg_3D_nucl(ilon,ilev)=budg_3D_nucl(ilon,ilev)+mSatom/mH2SO4mol &
                & *nucl_rate*(paprs(ilon,ilev)-paprs(ilon,ilev+1))/RG*dt/pdtphys
       ! update time step
@@ -139,5 +139,5 @@
     CALL cond_evap_part(pdtphys,FL,ASO4,f_r_wet(ilon,ilev),RRSI,Vbin,tr_seri(ilon,ilev,:))
     ! compute fluxes as diagnostic in [kg(S)/m2/layer/s] (now - for evap and + for cond)
-    sulf_cond_evap(ilon,ilev)=sulf_cond_evap(ilon,ilev)+mSatom/mH2SO4mol &
+    budg_3D_cond_evap(ilon,ilev)=budg_3D_cond_evap(ilon,ilev)+mSatom/mH2SO4mol &
              & *evap_rate*(paprs(ilon,ilev)-paprs(ilon,ilev+1))/RG
   ENDIF
Index: LMDZ5/branches/testing/libf/phylmd/StratAer/ocs_to_so2.F90
===================================================================
--- LMDZ5/branches/testing/libf/phylmd/StratAer/ocs_to_so2.F90	(revision 2729)
+++ LMDZ5/branches/testing/libf/phylmd/StratAer/ocs_to_so2.F90	(revision 2787)
@@ -1,3 +1,3 @@
-SUBROUTINE ocs_to_so2(pdtphys,tr_seri,t_seri,pplay,paprs,sh,is_strato)
+SUBROUTINE ocs_to_so2(pdtphys,tr_seri,t_seri,pplay,paprs,is_strato)
 
   USE dimphy, ONLY : klon,klev
@@ -5,5 +5,5 @@
   USE infotrac
   USE YOMCST, ONLY : RG
-  USE phys_local_var_mod, ONLY : OCS_lifetime, ocs_convert
+  USE phys_local_var_mod, ONLY : OCS_lifetime, budg_3D_ocs_to_so2, budg_ocs_to_so2 
 
   IMPLICIT NONE
@@ -16,5 +16,4 @@
   REAL,DIMENSION(klon,klev),INTENT(IN)          :: pplay   ! pression pour le mileu de chaque couche (en Pa)
   REAL,DIMENSION(klon,klev+1),INTENT(IN)        :: paprs   ! pression pour chaque inter-couche (en Pa)
-  REAL,DIMENSION(klon,klev),INTENT(IN)          :: sh      ! humidite specifique   
   LOGICAL,DIMENSION(klon,klev),INTENT(IN)       :: is_strato
 
@@ -23,5 +22,7 @@
 
 !--convert OCS to SO2
-  ocs_convert(:,:)=0.0
+  budg_3D_ocs_to_so2(:,:)=0.0
+  budg_ocs_to_so2(:)=0.0
+
   DO ilon=1, klon
   DO ilev=1, klev
@@ -29,10 +30,11 @@
   IF (is_strato(ilon,ilev)) THEN
     IF (OCS_lifetime(ilon,ilev).GT.0.0) THEN
-      ocs_convert(ilon,ilev)=tr_seri(ilon,ilev,id_OCS_strat)*(1.0-exp(-pdtphys/OCS_lifetime(ilon,ilev)))
+      budg_3D_ocs_to_so2(ilon,ilev)=tr_seri(ilon,ilev,id_OCS_strat)*(1.0-exp(-pdtphys/OCS_lifetime(ilon,ilev)))
     ENDIF
-    tr_seri(ilon,ilev,id_OCS_strat)=tr_seri(ilon,ilev,id_OCS_strat) - ocs_convert(ilon,ilev)
-    tr_seri(ilon,ilev,id_SO2_strat)=tr_seri(ilon,ilev,id_SO2_strat) + mSO2mol/mOCSmol*ocs_convert(ilon,ilev)
-    !convert ocs_convert from kg(OCS)/kgA to kg(S)/m2/layer/s for saving as diagnostic
-    ocs_convert(ilon,ilev)=ocs_convert(ilon,ilev)*mSatom/mOCSmol*(paprs(ilon,ilev)-paprs(ilon,ilev+1))/RG/pdtphys
+    tr_seri(ilon,ilev,id_OCS_strat)=tr_seri(ilon,ilev,id_OCS_strat) - budg_3D_ocs_to_so2(ilon,ilev)
+    tr_seri(ilon,ilev,id_SO2_strat)=tr_seri(ilon,ilev,id_SO2_strat) + mSO2mol/mOCSmol*budg_3D_ocs_to_so2(ilon,ilev)
+    !convert budget from kg(OCS)/kgA to kg(S)/m2/layer/s for saving as diagnostic
+    budg_3D_ocs_to_so2(ilon,ilev)=budg_3D_ocs_to_so2(ilon,ilev)*mSatom/mOCSmol*(paprs(ilon,ilev)-paprs(ilon,ilev+1))/RG/pdtphys
+    budg_ocs_to_so2(ilon)=budg_ocs_to_so2(ilon)+budg_3D_ocs_to_so2(ilon,ilev) 
   ENDIF
   ENDDO
Index: LMDZ5/branches/testing/libf/phylmd/StratAer/so2_to_h2so4.F90
===================================================================
--- LMDZ5/branches/testing/libf/phylmd/StratAer/so2_to_h2so4.F90	(revision 2729)
+++ LMDZ5/branches/testing/libf/phylmd/StratAer/so2_to_h2so4.F90	(revision 2787)
@@ -1,3 +1,3 @@
-SUBROUTINE SO2_TO_H2SO4(pdtphys,tr_seri,t_seri,pplay,paprs,sh,is_strato)
+SUBROUTINE SO2_TO_H2SO4(pdtphys,tr_seri,t_seri,pplay,paprs,is_strato)
 
   USE dimphy, ONLY : klon,klev
@@ -5,5 +5,5 @@
   USE infotrac
   USE YOMCST, ONLY : RG
-  USE phys_local_var_mod, ONLY : SO2_lifetime, sulf_convert
+  USE phys_local_var_mod, ONLY : SO2_lifetime, budg_3D_so2_to_h2so4, budg_so2_to_h2so4
 
   IMPLICIT NONE
@@ -17,5 +17,4 @@
   REAL,DIMENSION(klon,klev),INTENT(IN)          :: pplay   ! pression pour le mileu de chaque couche (en Pa)
   REAL,DIMENSION(klon,klev+1),INTENT(IN)        :: paprs   ! pression pour chaque inter-couche (en Pa)
-  REAL,DIMENSION(klon,klev),INTENT(IN)          :: sh      ! humidite specifique   
   LOGICAL,DIMENSION(klon,klev),INTENT(IN)       :: is_strato ! stratospheric flag
 
@@ -24,5 +23,7 @@
 
 !--convert SO2 to H2SO4
-  sulf_convert(:,:)=0.0
+  budg_3D_so2_to_h2so4(:,:)=0.0
+  budg_so2_to_h2so4(:)=0.0
+
   DO ilon=1, klon
   DO ilev=1, klev
@@ -30,10 +31,11 @@
   IF (is_strato(ilon,ilev)) THEN
     IF (SO2_lifetime(ilon,ilev).GT.0.0) THEN
-      sulf_convert(ilon,ilev)=tr_seri(ilon,ilev,id_SO2_strat)*(1.0-exp(-pdtphys/SO2_lifetime(ilon,ilev)))
+      budg_3D_so2_to_h2so4(ilon,ilev)=tr_seri(ilon,ilev,id_SO2_strat)*(1.0-exp(-pdtphys/SO2_lifetime(ilon,ilev)))
     ENDIF
-    tr_seri(ilon,ilev,id_SO2_strat)=tr_seri(ilon,ilev,id_SO2_strat) - sulf_convert(ilon,ilev)
-    tr_seri(ilon,ilev,id_H2SO4_strat)=tr_seri(ilon,ilev,id_H2SO4_strat) + mH2SO4mol/mSO2mol*sulf_convert(ilon,ilev)
-    !convert sulf_convert from kg(SO2)/kgA to kg(S)/m2/layer/s for saving as diagnostic
-    sulf_convert(ilon,ilev)=sulf_convert(ilon,ilev)*mSatom/mSO2mol*(paprs(ilon,ilev)-paprs(ilon,ilev+1))/RG/pdtphys
+    tr_seri(ilon,ilev,id_SO2_strat)=tr_seri(ilon,ilev,id_SO2_strat) - budg_3D_so2_to_h2so4(ilon,ilev)
+    tr_seri(ilon,ilev,id_H2SO4_strat)=tr_seri(ilon,ilev,id_H2SO4_strat) + mH2SO4mol/mSO2mol*budg_3D_so2_to_h2so4(ilon,ilev)
+    !convert budget from kg(SO2)/kgA to kg(S)/m2/layer/s for saving as diagnostic
+    budg_3D_so2_to_h2so4(ilon,ilev)=budg_3D_so2_to_h2so4(ilon,ilev)*mSatom/mSO2mol*(paprs(ilon,ilev)-paprs(ilon,ilev+1))/RG/pdtphys
+    budg_so2_to_h2so4(ilon)=budg_so2_to_h2so4(ilon)+budg_3D_so2_to_h2so4(ilon,ilev)
   ENDIF
   ENDDO
Index: LMDZ5/branches/testing/libf/phylmd/StratAer/traccoag_mod.F90
===================================================================
--- LMDZ5/branches/testing/libf/phylmd/StratAer/traccoag_mod.F90	(revision 2729)
+++ LMDZ5/branches/testing/libf/phylmd/StratAer/traccoag_mod.F90	(revision 2787)
@@ -8,10 +8,8 @@
   SUBROUTINE traccoag(pdtphys, gmtime, debutphy, julien, &
        presnivs, xlat, xlon, pphis, pphi, &
-       t_seri, pplay, paprs, sh, rh , &
-       tr_seri)
-
-    USE phys_local_var_mod, ONLY: mdw, sulf_convert, sulf_nucl, sulf_cond_evap, &
-        & sfluxaer, ocs_convert, R2SO4, DENSO4, f_r_wet, SO2_backgr_tend, OCS_backgr_tend, &
-        & OCS_lifetime, SO2_lifetime, surf_PM25_sulf
+       t_seri, pplay, paprs, sh, rh, tr_seri)
+
+    USE phys_local_var_mod, ONLY: mdw, R2SO4, DENSO4, f_r_wet, surf_PM25_sulf, & 
+        & budg_emi_ocs, budg_emi_so2, budg_emi_h2so4, budg_emi_part 
 
     USE dimphy
@@ -71,5 +69,5 @@
     REAL,PARAMETER    :: altemiss_sai=17.e3     ! emission altitude in m
     REAL,PARAMETER    :: sigma_alt_sai=1.e3     ! standard deviation of emission altitude in m
-    REAL,PARAMETER    :: xlat_sai=0.0           ! latitude of SAI in degree
+    REAL,PARAMETER    :: xlat_sai=0.01          ! latitude of SAI in degree
     REAL,PARAMETER    :: xlon_sai=120.35        ! longitude of SAI in degree
 
@@ -90,6 +88,8 @@
     REAL                                   :: zrho                ! Density of air [kg/m3]
     REAL                                   :: zdz                 ! thickness of atm. model layer in m
+    REAL,DIMENSION(klev)                   :: zdm                 ! mass of atm. model layer in kg
     REAL,DIMENSION(klon,klev)              :: dens_aer            ! density of aerosol particles [kg/m3 aerosol] with default H2SO4 mass fraction
     REAL                                   :: dlat, dlon          ! d latitude and d longitude of grid in degree
+    REAL                                   :: emission            ! emission
 
     IF (is_mpi_root) THEN
@@ -141,17 +141,23 @@
     DO ilon=1, klon
     DO ilev=1, klev
-      m_air_gridbox(ilon,ilev)=(paprs(ilon,ilev)-paprs(ilon,ilev+1)) / RG * cell_area(ilon)
-    ENDDO
-    ENDDO
-
-    IF (debutphy) THEN
-      CALL gather(tr_seri, tr_seri_glo)
-      IF (MAXVAL(tr_seri_glo).LT.1.e-30) THEN
+      m_air_gridbox(ilon,ilev)=(paprs(ilon,ilev)-paprs(ilon,ilev+1))/RG*cell_area(ilon)
+    ENDDO
+    ENDDO
+
+!    IF (debutphy) THEN
+!      CALL gather(tr_seri, tr_seri_glo)
+!      IF (MAXVAL(tr_seri_glo).LT.1.e-30) THEN
 !--initialising tracer concentrations to zero
-        DO it=1, nbtr
-        tr_seri(:,:,it)=0.0
-        ENDDO
-      ENDIF
-    ENDIF
+!        DO it=1, nbtr
+!        tr_seri(:,:,it)=0.0
+!        ENDDO
+!      ENDIF
+!    ENDIF
+
+!--initialise emission diagnostics
+    budg_emi_ocs(:)=0.0
+    budg_emi_so2(:)=0.0
+    budg_emi_h2so4(:)=0.0
+    budg_emi_part(:)=0.0
 
 !--sulfur emission, depending on chosen scenario (flag_sulf_emit)
@@ -170,10 +176,13 @@
           IF  ( xlat(i).GE.xlat_vol-dlat .AND. xlat(i).LT.xlat_vol+dlat .AND. &
                 xlon(i).GE.xlon_vol-dlon .AND. xlon(i).LT.xlon_vol+dlon ) THEN
+! 
+          PRINT *,'coordinates of volcanic injection point=',xlat(i), xlon(i), day_cur, mth_cur, year_cur
 !         compute altLMDz
             altLMDz(:)=0.0
             DO k=1, klev
-              zrho=pplay(i,k)/t_seri(i,k)/RD            !air density in kg/m3
-              zdz=(paprs(i,k)-paprs(i,k+1))/zrho/RG     !thickness of layer in m
-              altLMDz(k+1)=altLMDz(k)+zdz
+              zrho=pplay(i,k)/t_seri(i,k)/RD       !air density in kg/m3
+              zdm(k)=(paprs(i,k)-paprs(i,k+1))/RG  !mass of layer in kg
+              zdz=zdm(k)/zrho                      !thickness of layer in m
+              altLMDz(k+1)=altLMDz(k)+zdz          !altitude of interface
             ENDDO
             !compute distribution of emission to vertical model layers (based on Gaussian peak in altitude)
@@ -194,7 +203,8 @@
             !vertically distributed emission
             DO k=1, klev
-              tr_seri(i,k,id_SO2_strat)=tr_seri(i,k,id_SO2_strat)+ &
-              & m_aer_emiss_vol*(mSO2mol/mSatom)/m_air_gridbox(i,k)*f_lay_emiss(k) &
-              & /(1.*86400./pdtphys) ! stretch emission over one day of Pinatubo eruption
+              ! stretch emission over one day of Pinatubo eruption
+              emission=m_aer_emiss_vol*(mSO2mol/mSatom)/m_air_gridbox(i,k)*f_lay_emiss(k)/1./86400. 
+              tr_seri(i,k,id_SO2_strat)=tr_seri(i,k,id_SO2_strat)+emission*pdtphys 
+              budg_emi_so2(i)=budg_emi_so2(i)+emission*zdm(k)*mSatom/mSO2mol
             ENDDO
           ENDIF ! emission grid cell
@@ -211,10 +221,13 @@
         IF  ( xlat(i).GE.xlat_sai-dlat .AND. xlat(i).LT.xlat_sai+dlat .AND. &
           &   xlon(i).GE.xlon_sai-dlon .AND. xlon(i).LT.xlon_sai+dlon ) THEN
+!
+          PRINT *,'coordinates of SAI point=',xlat(i), xlon(i), day_cur, mth_cur, year_cur
 !         compute altLMDz
           altLMDz(:)=0.0
           DO k=1, klev
-            zrho=pplay(i,k)/t_seri(i,k)/RD            !air density in kg/m3
-            zdz=(paprs(i,k)-paprs(i,k+1))/zrho/RG     !thickness of layer in m
-            altLMDz(k+1)=altLMDz(k)+zdz
+            zrho=pplay(i,k)/t_seri(i,k)/RD       !air density in kg/m3
+            zdm(k)=(paprs(i,k)-paprs(i,k+1))/RG  !mass of layer in kg
+            zdz=zdm(k)/zrho                      !thickness of layer in m
+            altLMDz(k+1)=altLMDz(k)+zdz          !altitude of interface
           ENDDO
           !compute distribution of emission to vertical model layers (based on Gaussian peak in altitude)
@@ -235,17 +248,16 @@
           !vertically distributed emission
           DO k=1, klev
-            tr_seri(i,k,id_SO2_strat)=tr_seri(i,k,id_SO2_strat)+ &
-            & m_aer_emiss_sai*(mSO2mol/mSatom)/m_air_gridbox(i,k)*f_lay_emiss(k) &
-            & /(360.*86400./pdtphys) ! stretch emission over whole year (360d)
-!            & /(60.*86400./pdtphys) ! stretch emission over 2 months (seasonal emission)
-!            & /7. ! distribute equally over 7 emission grid points
+            ! stretch emission over whole year (360d)
+            emission=m_aer_emiss_sai*(mSO2mol/mSatom)/m_air_gridbox(i,k)*f_lay_emiss(k)/360./86400.  
+            tr_seri(i,k,id_SO2_strat)=tr_seri(i,k,id_SO2_strat)+emission*pdtphys
+            budg_emi_so2(i)=budg_emi_so2(i)+emission*zdm(k)*mSatom/mSO2mol
           ENDDO
 !          !emission as monodisperse particles with 0.1um dry radius (BIN21)
 !          !vertically distributed emission
 !          DO k=1, klev
-!            tr_seri(i,k,id_BIN01_strat+20)=tr_seri(i,k,id_BIN01_strat+20)+ &
-!            & m_aer_emiss*(mH2SO4mol/mSatom)/m_part_dry(21)/m_air_gridbox(i,k)*f_lay_emiss(k) &
-!            & /(360.*86400./pdtphys) & ! stretch emission over whole year (360d)
-!            & /7. ! distribute equally over 7 emission grid points
+!            ! stretch emission over whole year (360d)
+!            emission=m_aer_emiss*(mH2SO4mol/mSatom)/m_part_dry(21)/m_air_gridbox(i,k)*f_lay_emiss(k)/360./86400 
+!            tr_seri(i,k,id_BIN01_strat+20)=tr_seri(i,k,id_BIN01_strat+20)+emission*pdtphys 
+!            budg_emi_part(i)=budg_emi_part(i)+emission*zdm(k)*mSatom/mH2SO4mol
 !          ENDDO
         ENDIF ! emission grid cell
@@ -259,8 +271,8 @@
 
 !--convert OCS to SO2 in the stratosphere
-    CALL ocs_to_so2(pdtphys,tr_seri,t_seri,pplay,paprs,sh,is_strato)
+    CALL ocs_to_so2(pdtphys,tr_seri,t_seri,pplay,paprs,is_strato)
 
 !--convert SO2 to H2SO4
-    CALL so2_to_h2so4(pdtphys,tr_seri,t_seri,pplay,paprs,sh,is_strato)
+    CALL so2_to_h2so4(pdtphys,tr_seri,t_seri,pplay,paprs,is_strato)
 
 !--common routine for nucleation and condensation/evaporation with adaptive timestep
@@ -282,5 +294,5 @@
           surf_PM25_sulf(i)=surf_PM25_sulf(i)+tr_seri(i,1,it+nbtr_sulgas) &
                            & *132./98.*dens_aer_dry*4./3.*RPI*(mdw(it)/2.)**3 &
-                           & *pplay(i,1)/t_seri(i,1)/RD*1e9
+                           & *pplay(i,1)/t_seri(i,1)/RD*1.e9
         ENDIF
       ENDDO
Index: LMDZ5/branches/testing/libf/phylmd/alpale_th.F90
===================================================================
--- LMDZ5/branches/testing/libf/phylmd/alpale_th.F90	(revision 2729)
+++ LMDZ5/branches/testing/libf/phylmd/alpale_th.F90	(revision 2787)
@@ -38,6 +38,7 @@
   REAL, DIMENSION(klon), INTENT(INOUT)                       :: alp_bl
   REAL, DIMENSION(klon), INTENT(INOUT)                       :: alp_bl_stat
-
-  REAL, DIMENSION(klon), INTENT(OUT)                         :: proba_notrig, random_notrig
+  REAL, DIMENSION(klon), INTENT(INOUT)                       :: proba_notrig
+
+  REAL, DIMENSION(klon), INTENT(OUT)                         :: random_notrig
 
   include "thermcell.h"
@@ -73,4 +74,14 @@
 !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 !
+!!
+!!  The following 3 lines should be commented if one wants to activate the 
+!! multiplication of no-trigger probabilities between calls to the convection 
+!! scheme.
+!!
+             do i=1,klon
+                proba_notrig(i)=1.
+             enddo
+!!
+!!
 !---------------------------------------
   IF (iflag_clos_bl .LT. 3) THEN
@@ -97,5 +108,5 @@
              !----Initialisations
              do i=1,klon
-                proba_notrig(i)=1.
+!!jyg                proba_notrig(i)=1.
                 random_notrig(i)=1e6*ale_bl_stat(i)-int(1e6*ale_bl_stat(i))
                 if ( random_notrig(i) > random_notrig_max ) random_notrig(i)=0.
@@ -120,6 +131,6 @@
                 do i=1,klon
                    if ( (ale_bl_stat(i) .gt. abs(cin(i))+1.e-10) )  then
-                      proba_notrig(i)=(1.-exp(-s_trig/s2(i)))** &
-                           (n2(i)*dtime/tau_trig(i))
+                      proba_notrig(i)=proba_notrig(i)* &
+                         (1.-exp(-s_trig/s2(i)))**(n2(i)*dtime/tau_trig(i))
                       !        print *, 'proba_notrig(i) ',proba_notrig(i)
                       if (random_notrig(i) .ge. proba_notrig(i)) then 
@@ -129,5 +140,5 @@
                       endif
                    else
-                      proba_notrig(i)=1.
+!!jyg                      proba_notrig(i)=1.
                       random_notrig(i)=0.
                       ale_bl_trig(i)=0.
@@ -139,6 +150,6 @@
                 do i=1,klon
                    if ( (Ale_bl(i) .gt. abs(cin(i))+1.e-10) )  then
-                      proba_notrig(i)=(1.-exp(-s_trig/s2(i)))** &
-                           (n2(i)*dtime/tau_trig(i))
+                      proba_notrig(i)=proba_notrig(i)* &
+                         (1.-exp(-s_trig/s2(i)))**(n2(i)*dtime/tau_trig(i))
                       !        print *, 'proba_notrig(i) ',proba_notrig(i)
                       if (random_notrig(i) .ge. proba_notrig(i)) then 
@@ -148,5 +159,5 @@
                       endif
                    else
-                      proba_notrig(i)=1.
+!!jyg                      proba_notrig(i)=1.
                       random_notrig(i)=0.
                       ale_bl_trig(i)=0.
@@ -223,5 +234,5 @@
         !----Initializations and random number generation
         do i=1,klon
-           proba_notrig(i)=1.
+!!jyg           proba_notrig(i)=1.
            random_notrig(i)=1e6*ale_bl_stat(i)-int(1e6*ale_bl_stat(i))
            if ( ale_bl_trig(i) .lt. abs(cin(i))+1.e-10 ) then 
@@ -244,5 +255,5 @@
               birth_number = n2(i)*exp(-s_trig/s2(i))
               birth_rate(i) = birth_number/(tau_trig(i)*cell_area(i))
-              proba_notrig(i)=exp(-birth_number*dtime/tau_trig(i))
+              proba_notrig(i)=proba_notrig(i)*exp(-birth_number*dtime/tau_trig(i))
               Alp_bl(i) = Alp_bl(i)* &
                           umexp(-birth_number*cv_feed_area/cell_area(i))/ &
@@ -250,5 +261,5 @@
                           tau_trig(i)*cv_feed_area/(dtime*cell_area(i))
           else 
-              proba_notrig(i)=1.
+!!jyg              proba_notrig(i)=1.
               random_notrig(i)=0.
               alp_bl(i)=0.
Index: LMDZ5/branches/testing/libf/phylmd/cal_tools_m.F90
===================================================================
--- LMDZ5/branches/testing/libf/phylmd/cal_tools_m.F90	(revision 2787)
+++ LMDZ5/branches/testing/libf/phylmd/cal_tools_m.F90	(revision 2787)
@@ -0,0 +1,89 @@
+MODULE cal_tools_m
+
+  USE ioipsl, ONLY: ioconf_calendar, ioget_mon_len, lock_calendar,             &
+                     ioget_calendar, ioget_year_len
+
+CONTAINS
+
+!-------------------------------------------------------------------------------
+!
+FUNCTION year_len(y,cal_in)
+!
+!-------------------------------------------------------------------------------
+  IMPLICIT NONE
+!-------------------------------------------------------------------------------
+! Arguments:
+  INTEGER                                :: year_len
+  INTEGER,                    INTENT(IN) :: y
+  CHARACTER(LEN=*), OPTIONAL, INTENT(IN) :: cal_in
+!-------------------------------------------------------------------------------
+! Local variables:
+  CHARACTER(LEN=20) :: cal_lmdz
+!-------------------------------------------------------------------------------
+  !--- No specified calendar: we need lmdz days number for current year
+  IF(.NOT.PRESENT(cal_in)) THEN; year_len=ioget_year_len(y); RETURN; END IF
+
+  !--- Get the lmdz calendar to reset at the end of the function
+  CALL ioget_calendar(cal_lmdz)
+
+  !--- Unlock calendar and set it to wanted one
+  CALL lock_calendar(.FALSE.); CALL ioconf_calendar(TRIM(cal_in))
+
+  !--- Get the number of days in this year
+  year_len=ioget_year_len(y)
+
+  !--- Back to original calendar
+  CALL lock_calendar(.FALSE.); CALL ioconf_calendar(TRIM(cal_lmdz))
+
+END FUNCTION year_len
+!
+!-------------------------------------------------------------------------------
+
+
+!-------------------------------------------------------------------------------
+!
+FUNCTION mid_month(y,cal_in)
+!
+!-------------------------------------------------------------------------------
+  IMPLICIT NONE
+!-------------------------------------------------------------------------------
+! Arguments:
+  INTEGER,                    INTENT(IN) :: y           ! year
+  CHARACTER(LEN=*), OPTIONAL, INTENT(IN) :: cal_in      ! calendar
+  REAL,                    DIMENSION(14) :: mid_month   ! mid-bins times
+!-------------------------------------------------------------------------------
+! Local variables:
+  CHARACTER(LEN=20)      :: cal_lmdz          ! lmdz current calendar
+  INTEGER, DIMENSION(14) :: tlen              ! months lengths (days)
+  INTEGER                :: m                 ! months counter
+  INTEGER                :: nd                ! number of days
+!-------------------------------------------------------------------------------
+  IF(PRESENT(cal_in)) THEN
+    CALL ioget_calendar(cal_lmdz)             !--- Keep track of lmdz calendar
+    CALL lock_calendar(.FALSE.)               !--- Unlock calendar
+    CALL ioconf_calendar(TRIM(cal_in))        !--- Change calendar to "cal_in"
+  END IF
+
+  !--- Get the length of each month
+  tlen(1 )=ioget_mon_len(y-1,12)
+  DO m=1,12; tlen(m+1)=ioget_mon_len(y,m); END DO
+  tlen(14)=ioget_mon_len(y+1, 1)
+
+  !--- Mid-bins times
+  mid_month(1)=-0.5*REAL(tlen(1))
+  DO m=2,14; mid_month(m)=mid_month(m-1)+0.5*REAL(tlen(m-1)+tlen(m)); END DO
+
+  IF(PRESENT(cal_in)) THEN
+    CALL lock_calendar(.FALSE.)               !--- Unlock calendar
+    CALL ioconf_calendar(TRIM(cal_lmdz))      !--- Restore original calendar
+  END IF
+
+END FUNCTION mid_month
+!
+!-------------------------------------------------------------------------------
+
+
+END MODULE cal_tools_m
+!
+!*******************************************************************************
+
Index: LMDZ5/branches/testing/libf/phylmd/calwake.F90
===================================================================
--- LMDZ5/branches/testing/libf/phylmd/calwake.F90	(revision 2729)
+++ LMDZ5/branches/testing/libf/phylmd/calwake.F90	(revision 2787)
@@ -26,4 +26,7 @@
 
   USE dimphy
+  USE phys_state_var_mod, ONLY: pctsrf
+  USE indice_sol_mod, ONLY: is_oce
+  USE print_control_mod, ONLY: mydebug=>debug , lunout, prt_level
   IMPLICIT NONE
   ! ======================================================================
@@ -51,5 +54,5 @@
   ! ------
   REAL, DIMENSION(klon, klev),   INTENT (OUT)        :: dt_wake, dq_wake
-  INTEGER, DIMENSION(klon),      INTENT (OUT)        :: wake_k
+  REAL, DIMENSION(klon),         INTENT (OUT)        :: wake_k
   REAL, DIMENSION(klon, klev),   INTENT (OUT)        :: wake_d_deltat_gw
   REAL, DIMENSION(klon),         INTENT (OUT)        :: wake_h
@@ -69,4 +72,5 @@
   ! -----------------
   INTEGER                                            :: i, l
+  INTEGER, DIMENSION(klon)                           :: znatsurf    ! 0 if pctsrf(is_oce)>0.1; 1 else.
   REAL                                               :: aire
   REAL, DIMENSION(klon, klev)                        :: p,  pi
@@ -97,7 +101,14 @@
 
 
-  ! print *, '-> calwake, wake_s ', wake_s(1)
+  IF (prt_level >= 10) THEN
+    print *, '-> calwake, wake_s input ', wake_s(1)
+  ENDIF
 
   rdcp = 1./3.5
+
+  znatsurf(:) = 0
+  DO i = 1,klon
+    IF (pctsrf(i,is_oce) < 0.1) znatsurf(i) = 1
+  ENDDO
 
 
@@ -124,4 +135,16 @@
   END DO
 
+!----------------------------------------------------------------
+!         Initialize tendencies to zero
+!----------------------------------------------------------------
+dtls(:,:) = 0.
+dqls(:,:) = 0.
+d_deltat_gw(:,:) = 0.
+d_deltatw(:,:) = 0.
+d_deltaqw(:,:) = 0.
+d_sigmaw(:) = 0.
+d_wdens(:) = 0.
+!
+
   DO i = 1, klon
     sigd0(i) = sigd(i)
@@ -132,7 +155,7 @@
   END DO
 
-  DO i = 1, klon
-    ktopw(i) = wake_k(i)
-  END DO
+!!jyg!  DO i = 1, klon                  
+!!jyg!    ktopw(i) = NINT(wake_k(i))    
+!!jyg!  END DO                          
 
   DO i = 1, klon
@@ -178,5 +201,5 @@
   END DO
 
-  CALL wake(p, ph, pi, dtime, &
+  CALL wake(znatsurf, p, ph, pi, dtime, &
     te, qe, omgbe, &
     dtdwn, dqdwn, amdwn, amup, dta, dqa, &
@@ -254,4 +277,5 @@
     END IF
   END DO
+!
 
 !jyg<  
Index: LMDZ5/branches/testing/libf/phylmd/cdrag.F90
===================================================================
--- LMDZ5/branches/testing/libf/phylmd/cdrag.F90	(revision 2729)
+++ LMDZ5/branches/testing/libf/phylmd/cdrag.F90	(revision 2787)
@@ -1,4 +1,4 @@
 !
-!$Id: cdrag.F90 ???? 2015-??-?? ??:??:??Z ? $
+!$Id$
 !
  SUBROUTINE cdrag( knon,  nsrf,   &
@@ -9,5 +9,5 @@
   USE dimphy
   USE indice_sol_mod
-  USE print_control_mod, ONLY: lunout
+  USE print_control_mod, ONLY: lunout, prt_level
   IMPLICIT NONE
 ! ================================================================= c
@@ -139,5 +139,5 @@
      IF (qsurf(i).LT.0.0)  ng_qsurf = ng_qsurf + 1
   ENDDO
-  IF (ng_q1.GT.0) THEN
+  IF (ng_q1.GT.0 .and. prt_level > 5) THEN
       WRITE(lunout,*)" *** Warning: Negative q1(humidity at 1st level) values in cdrag.F90 !"
       WRITE(lunout,*)" The total number of the grids is: ", ng_q1
@@ -146,5 +146,5 @@
 !      CALL abort_physic(modname,abort_message,1)
   ENDIF
-  IF (ng_qsurf.GT.0) THEN
+  IF (ng_qsurf.GT.0 .and. prt_level > 5) THEN
       WRITE(lunout,*)" *** Warning: Negative qsurf(humidity at surface) values in cdrag.F90 !"
       WRITE(lunout,*)" The total number of the grids is: ", ng_qsurf
@@ -172,5 +172,5 @@
 ! the negative qsurf and q1 are set to zero (as in coefcdrag)
      ztsolv = tsurf(i) * (1.0+RETV*max(qsurf(i),0.0)) ! negative qsurf set to zero
-     ztvd = (t1(i)+zgeop1(i)/RCPD/(1.+RVTMP2*q1(i))) &
+     ztvd = (t1(i)+zgeop1(i)/RCPD/(1.+RVTMP2*max(q1(i),0.0))) &
           *(1.+RETV*max(q1(i),0.0)) ! negative q1 set to zero
      zri(i) = zgeop1(i)*(ztvd-ztsolv)/(zdu2*ztvd)
Index: LMDZ5/branches/testing/libf/phylmd/clesphys.h
===================================================================
--- LMDZ5/branches/testing/libf/phylmd/clesphys.h	(revision 2729)
+++ LMDZ5/branches/testing/libf/phylmd/clesphys.h	(revision 2787)
@@ -13,5 +13,5 @@
        LOGICAL ok_limitvrai
        LOGICAL ok_all_xml
-       INTEGER nbapp_rad, iflag_con, nbapp_cv, iflag_ener_conserv
+       INTEGER nbapp_rad, iflag_con, nbapp_cv, nbapp_wk, iflag_ener_conserv
        REAL co2_ppm, co2_ppm0, solaire
        LOGICAL ok_suntime_rrtm
@@ -114,5 +114,5 @@
      &     , cycle_diurne, soil_model, new_oliq                         &
      &     , ok_orodr, ok_orolf, ok_limitvrai, nbapp_rad                &
-     &     , iflag_con, nbapp_cv                                        &
+     &     , iflag_con, nbapp_cv, nbapp_wk                              &
      &     , iflag_ener_conserv                                         &
      &     , ok_4xCO2atm                                                & 
Index: LMDZ5/branches/testing/libf/phylmd/conf_phys_m.F90
===================================================================
--- LMDZ5/branches/testing/libf/phylmd/conf_phys_m.F90	(revision 2729)
+++ LMDZ5/branches/testing/libf/phylmd/conf_phys_m.F90	(revision 2787)
@@ -17,5 +17,5 @@
        iflag_cld_th, &
        iflag_ratqs,ratqsbas,ratqshaut,tau_ratqs, &
-       ok_ade, ok_aie, ok_cdnc, aerosol_couple, &
+       ok_ade, ok_aie, ok_alw, ok_cdnc, aerosol_couple, &
        flag_aerosol, flag_aerosol_strat, new_aod, &
        flag_bc_internal_mixture, bl95_b0, bl95_b1,&
@@ -61,4 +61,5 @@
     ! ok_instan:  sorties instantanees
     ! ok_ade, ok_aie: apply or not aerosol direct and indirect effects
+    ! ok_alw: activate aerosol LW effect
     ! ok_cdnc, ok cloud droplet number concentration
     ! flag_aerosol_strat : flag pour les aerosols stratos
@@ -74,5 +75,5 @@
     LOGICAL              :: ok_LES
     LOGICAL              :: callstats
-    LOGICAL              :: ok_ade, ok_aie, ok_cdnc, aerosol_couple
+    LOGICAL              :: ok_ade, ok_aie, ok_alw, ok_cdnc, aerosol_couple
     INTEGER              :: flag_aerosol
     INTEGER              :: flag_aerosol_strat
@@ -93,5 +94,5 @@
     LOGICAL, SAVE       :: ok_LES_omp   
     LOGICAL, SAVE       :: callstats_omp
-    LOGICAL, SAVE       :: ok_ade_omp, ok_aie_omp, ok_cdnc_omp, aerosol_couple_omp
+    LOGICAL, SAVE       :: ok_ade_omp, ok_aie_omp, ok_alw_omp, ok_cdnc_omp, aerosol_couple_omp
     INTEGER, SAVE       :: flag_aerosol_omp
     INTEGER, SAVE       :: flag_aerosol_strat_omp
@@ -207,5 +208,5 @@
     LOGICAL,SAVE  :: ok_orodr_omp, ok_orolf_omp, ok_limitvrai_omp
     INTEGER, SAVE :: nbapp_rad_omp, iflag_con_omp
-    INTEGER, SAVE :: nbapp_cv_omp
+    INTEGER, SAVE :: nbapp_cv_omp, nbapp_wk_omp
     INTEGER, SAVE :: iflag_ener_conserv_omp
     LOGICAL, SAVE :: ok_conserv_q_omp
@@ -348,4 +349,12 @@
     CALL getin('ok_ade', ok_ade_omp)
 
+    !Config Key  = ok_alw
+    !Config Desc = Aerosol longwave effect or not?
+    !Config Def  = .FALSE.
+    !Config Help = Used in radlwsw.F
+    !
+    ok_alw_omp = .FALSE.
+    CALL getin('ok_alw', ok_alw_omp)
+
     !
     !Config Key  = ok_aie
@@ -389,16 +398,4 @@
     flag_aerosol_omp = 0
     CALL getin('flag_aerosol',flag_aerosol_omp)
-    !
-    !Config Key  = flag_aerosol_strat
-    !Config Desc = use stratospheric aerosols 0, 1, 2
-    ! - 0 = no stratospheric aerosols 
-    ! - 1 = stratospheric aerosols scaled from 550 nm AOD 
-    ! - 2 = stratospheric aerosol properties from CMIP6
-    !Config Def  = 0
-    !Config Help = Used in physiq.F
-    !
-    !
-    flag_aerosol_strat_omp = 0
-    CALL getin('flag_aerosol_strat',flag_aerosol_strat_omp)
 
     !
@@ -547,14 +544,4 @@
     solaire_omp = 1365.
     CALL getin('solaire', solaire_omp)
-    !
-    !Config Key  = ok_sun_time
-    !Config Desc = oui ou non variabilite solaire
-    !Config Def  = .FALSE.
-    !Config Help =
-    !
-    !
-    !valeur AMIP II
-    ok_suntime_rrtm_omp = .FALSE.
-    CALL getin('ok_suntime_rrtm',ok_suntime_rrtm_omp)
     !
     !Config Key  = co2_ppm
@@ -790,4 +777,12 @@
     CALL getin('nbapp_cv',nbapp_cv_omp)
 
+    !Config  Key  = nbapp_wk
+    !Config  Desc = Frequence d'appel aux wakes
+    !Config  Def  = 0
+    !Config  Help = Nombre  d'appels des routines de wakes
+    !Config         par jour. Si =0, appel a chaque pas de temps physique.
+    nbapp_wk_omp = 0
+    CALL getin('nbapp_wk',nbapp_wk_omp)
+
     !Config  Key  = iflag_ener_conserv
     !Config  Desc = Flag de convection
@@ -989,4 +984,30 @@
     CALL getin('ok_chlorophyll',ok_chlorophyll_omp)
     !albedo SB <<<
+    !
+    !Config Key  = ok_sun_time
+    !Config Desc = oui ou non variabilite solaire
+    !Config Def  = .FALSE.
+    !Config Help =
+    !
+    !
+    !valeur AMIP II
+    ok_suntime_rrtm_omp = .FALSE.
+    IF (iflag_rrtm_omp==1) THEN
+      CALL getin('ok_suntime_rrtm',ok_suntime_rrtm_omp)
+    ENDIF
+    !
+    !Config Key  = flag_aerosol_strat
+    !Config Desc = use stratospheric aerosols 0, 1, 2
+    ! - 0 = no stratospheric aerosols 
+    ! - 1 = stratospheric aerosols scaled from 550 nm AOD 
+    ! - 2 = stratospheric aerosol properties from CMIP6
+    !Config Def  = 0
+    !Config Help = Used in physiq.F
+    !
+    !
+    flag_aerosol_strat_omp = 0
+    IF (iflag_rrtm_omp==1) THEN
+      CALL getin('flag_aerosol_strat',flag_aerosol_strat_omp)
+    ENDIF
 
     !
@@ -2066,4 +2087,5 @@
     iflag_con = iflag_con_omp
     nbapp_cv = nbapp_cv_omp
+    nbapp_wk = nbapp_wk_omp
     iflag_ener_conserv = iflag_ener_conserv_omp
     ok_conserv_q = ok_conserv_q_omp
@@ -2152,4 +2174,5 @@
     ok_ade = ok_ade_omp
     ok_aie = ok_aie_omp
+    ok_alw = ok_alw_omp
     ok_cdnc = ok_cdnc_omp
     aerosol_couple = aerosol_couple_omp
@@ -2400,4 +2423,5 @@
     write(lunout,*)'iflag_con=',iflag_con
     write(lunout,*)'nbapp_cv=',nbapp_cv
+    write(lunout,*)'nbapp_wk=',nbapp_wk
     write(lunout,*)'iflag_ener_conserv=',iflag_ener_conserv
     write(lunout,*)'ok_conserv_q=',ok_conserv_q
@@ -2458,4 +2482,5 @@
     write(lunout,*)' ok_ade = ',ok_ade
     write(lunout,*)' ok_aie = ',ok_aie
+    write(lunout,*)' ok_alw = ',ok_alw
     write(lunout,*)' aerosol_couple = ', aerosol_couple
     write(lunout,*)' flag_aerosol = ', flag_aerosol
Index: LMDZ5/branches/testing/libf/phylmd/cosp/cosp_output_write_mod.F90
===================================================================
--- LMDZ5/branches/testing/libf/phylmd/cosp/cosp_output_write_mod.F90	(revision 2729)
+++ LMDZ5/branches/testing/libf/phylmd/cosp/cosp_output_write_mod.F90	(revision 2787)
@@ -370,5 +370,4 @@
      modis%Optical_Thickness_vs_Cloud_Top_Pressure(:,icl,:),nvertisccp,icl)           
    enddo
- endif
 
     where(modis%Optical_Thickness_vs_ReffIce == R_UNDEF) &
@@ -384,4 +383,5 @@
      modis%Optical_Thickness_vs_ReffLiq(:,icl,:),nvertReffLiq,icl)
     enddo
+ endif
 
  IF(.NOT.cosp_varsdefined) THEN
Index: LMDZ5/branches/testing/libf/phylmd/cv3_routines.F90
===================================================================
--- LMDZ5/branches/testing/libf/phylmd/cv3_routines.F90	(revision 2729)
+++ LMDZ5/branches/testing/libf/phylmd/cv3_routines.F90	(revision 2787)
@@ -83,4 +83,8 @@
 
 ! Var interm pour le getin
+     cv_flag_feed=1
+     CALL getin_p('cv_flag_feed',cv_flag_feed)
+     T_top_max = 1000.
+     CALL getin_p('t_top_max',T_top_max)
      dpbase=-40.
      CALL getin_p('dpbase',dpbase)
@@ -117,4 +121,5 @@
      CALL getin_p('tlcrit',tlcrit)
 
+    WRITE (*, *) 't_top_max=', t_top_max
     WRITE (*, *) 'dpbase=', dpbase
     WRITE (*, *) 'pbcrit=', pbcrit
@@ -453,4 +458,5 @@
     END DO
   END DO !  iter
+
   DO i = 1, len
     p2feed(i) = pfeed(i)
@@ -467,7 +473,19 @@
 ! --- are reasonable
 ! -------------------------------------------------------------------
-  DO i = 1, len
-    IF (((tnk(i)<250.0) .OR. (qnk(i)<=0.0)) .AND. (iflag(i)==0)) iflag(i) = 7
-  END DO
+  IF (cv_flag_feed == 1) THEN
+    DO i = 1, len
+      IF (((tnk(i)<250.0)                       .OR.  &
+           (qnk(i)<=0.0))                       .AND. &
+          (iflag(i)==0)) iflag(i) = 7
+    END DO
+  ELSEIF (cv_flag_feed >= 2) THEN
+! --- and demand that LCL be high enough
+    DO i = 1, len
+      IF (((tnk(i)<250.0)                       .OR.  &
+           (qnk(i)<=0.0)                        .OR.  &
+           (plcl(i)>min(0.99*ph(i,1),ph(i,3)))) .AND. &
+          (iflag(i)==0)) iflag(i) = 7
+    END DO
+  ENDIF
 
 ! -------------------------------------------------------------------
@@ -1056,5 +1074,5 @@
 END SUBROUTINE icefrac
 
-SUBROUTINE cv3_undilute2(nloc, ncum, nd, icb, icbs, nk, &
+SUBROUTINE cv3_undilute2(nloc, ncum, nd, iflag, icb, icbs, nk, &
                          tnk, qnk, gznk, hnk, t, q, qs, gz, &
                          p, ph, h, tv, lv, lf, pbase, buoybase, plcl, &
@@ -1101,4 +1119,5 @@
   REAL, DIMENSION (nloc, nd), INTENT (INOUT)         :: tp, tvp, clw   ! Input for k = 1, icb+1 (computed in cv3_undilute1)
                                                                        ! Output above
+  INTEGER, DIMENSION (nloc), INTENT (INOUT)          :: iflag
 
 !outputs:
@@ -1579,4 +1598,11 @@
 ! ori          frac(i)=max(frac(i),0.0)
 ! ori 540  continue
+
+! --------------------------------------------------------------------
+!   Prevent convection when top is too hot
+! --------------------------------------------------------------------
+  DO i = 1,ncum
+    IF (t(i,inb(i)) > T_top_max) iflag(i) = 10
+  ENDDO
 
 ! =====================================================================
@@ -2820,10 +2846,12 @@
         END IF !(amp2.gt.(0.1*amfac))
 
-! ***         limit magnitude of mp(i) to meet cfl condition      ***
-
-        ampmax = 2.0*(ph(il,i)-ph(il,i+1))*delti
-        amp2 = 2.0*(ph(il,i-1)-ph(il,i))*delti
-        ampmax = min(ampmax, amp2)
-        mp(il, i) = min(mp(il,i), ampmax)
+!jyg<    This part shifted 10 lines farther
+!!! ***         limit magnitude of mp(i) to meet cfl condition      ***
+!!
+!!        ampmax = 2.0*(ph(il,i)-ph(il,i+1))*delti
+!!        amp2 = 2.0*(ph(il,i-1)-ph(il,i))*delti
+!!        ampmax = min(ampmax, amp2)
+!!        mp(il, i) = min(mp(il,i), ampmax)
+!>jyg
 
 ! ***      force mp to decrease linearly to zero                 ***
@@ -2837,4 +2865,13 @@
           mp(il, i) = mp(il, i)*(ph(il,1)-ph(il,i))/(ph(il,1)-0.9*plcl(il))
         END IF
+
+!jyg<    Shifted part
+! ***         limit magnitude of mp(i) to meet cfl condition      ***
+
+        ampmax = 2.0*(ph(il,i)-ph(il,i+1))*delti
+        amp2 = 2.0*(ph(il,i-1)-ph(il,i))*delti
+        ampmax = min(ampmax, amp2)
+        mp(il, i) = min(mp(il,i), ampmax)
+!>jyg
 
       END IF ! (i.le.inb(il) .and. lwork(il) .and. i.ne.1)
Index: LMDZ5/branches/testing/libf/phylmd/cv3param.h
===================================================================
--- LMDZ5/branches/testing/libf/phylmd/cv3param.h	(revision 2729)
+++ LMDZ5/branches/testing/libf/phylmd/cv3param.h	(revision 2787)
@@ -11,6 +11,7 @@
       logical ok_intermittent
       integer noff, minorig, nl, nlp, nlm
+      integer cv_flag_feed
+      integer flag_epKEorig,flag_wb
       real sigdz, spfac
-      integer flag_epKEorig,flag_wb
       real pbcrit, ptcrit
       real elcrit, tlcrit
@@ -19,4 +20,5 @@
       real dtovsh, dpbase, dttrig
       real dtcrit, tau, beta, alpha, alpha1
+      real T_top_max
       real tau_stop, noconv_stop
       real wbmax
@@ -31,9 +33,10 @@
                       ,dtovsh, dpbase, dttrig &
                       ,dtcrit, tau, beta, alpha, alpha1 &
+                      ,T_top_max &
                       ,tau_stop, noconv_stop &
                       ,wbmax &
                       ,delta, betad  &
                       ,flag_epKEorig &
-                      ,flag_wb &
+                      ,flag_wb, cv_flag_feed &
                       ,noff, minorig, nl, nlp, nlm  &
                       ,ok_convstop, ok_intermittent &
Index: LMDZ5/branches/testing/libf/phylmd/cva_driver.F90
===================================================================
--- LMDZ5/branches/testing/libf/phylmd/cva_driver.F90	(revision 2729)
+++ LMDZ5/branches/testing/libf/phylmd/cva_driver.F90	(revision 2787)
@@ -353,4 +353,6 @@
 !         9     No moist convection: cloud base is higher
 !               then the level NL-1.
+!        10     No moist convection: cloud top is too warm.
+!
 
 ! ft:   Array of temperature tendency (K/s) of dimension ND, defined at same
@@ -907,5 +909,5 @@
         if (prt_level >= 9) &
              PRINT *, 'cva_driver -> cv3_undilute2'
-      CALL cv3_undilute2(nloc, ncum, nd, icb, icbs, nk, &              !na->nd
+      CALL cv3_undilute2(nloc, ncum, nd, iflag, icb, icbs, nk, &        !na->nd
                          tnk, qnk, gznk, hnk, t, q, qs, gz, &
                          p, ph, h, tv, lv, lf, pbase, buoybase, plcl, &
Index: LMDZ5/branches/testing/libf/phylmd/dyn1d/mod_1D_cases_read2.F90
===================================================================
--- LMDZ5/branches/testing/libf/phylmd/dyn1d/mod_1D_cases_read2.F90	(revision 2729)
+++ LMDZ5/branches/testing/libf/phylmd/dyn1d/mod_1D_cases_read2.F90	(revision 2787)
@@ -178,5 +178,5 @@
 
         print*,'Allocations OK'
-        call read_cas(nid,nlev_cas,nt_cas                                       &
+        call read_cas2(nid,nlev_cas,nt_cas                                       &
      &     ,z_cas,plev_cas,t_cas,q_cas,rh_cas,th_cas,rv_cas,u_cas,v_cas         &
      &     ,ug_cas,vg_cas,vitw_cas,du_cas,hu_cas,vu_cas,dv_cas,hv_cas,vv_cas    &
@@ -241,5 +241,6 @@
         allocate(z_cas(nlev_cas,nt_cas),zh_cas(nlev_cas+1))
         allocate(ap_cas(nlev_cas+1),bp_cas(nt_cas+1))
-        allocate(t_cas(nlev_cas,nt_cas),q_cas(nlev_cas,nt_cas),qv_cas(nlev_cas,nt_cas),ql_cas(nlev_cas,nt_cas),qi_cas(nlev_cas,nt_cas),rh_cas(nlev_cas,nt_cas))
+        allocate(t_cas(nlev_cas,nt_cas),q_cas(nlev_cas,nt_cas),qv_cas(nlev_cas,nt_cas),ql_cas(nlev_cas,nt_cas), &
+             qi_cas(nlev_cas,nt_cas),rh_cas(nlev_cas,nt_cas))
         allocate(th_cas(nlev_cas,nt_cas),thl_cas(nlev_cas,nt_cas),thv_cas(nlev_cas,nt_cas),rv_cas(nlev_cas,nt_cas))
         allocate(u_cas(nlev_cas,nt_cas),v_cas(nlev_cas,nt_cas),vitw_cas(nlev_cas,nt_cas),omega_cas(nlev_cas,nt_cas))
@@ -382,5 +383,5 @@
 END MODULE mod_1D_cases_read2
 !=====================================================================
-      subroutine read_cas(nid,nlevel,ntime                          &
+      subroutine read_cas2(nid,nlevel,ntime                          &
      &     ,zz,pp,temp,qv,rh,theta,rv,u,v,ug,vg,w,                   &
      &     du,hu,vu,dv,hv,vv,dt,dtrad,ht,vt,dq,hq,vq,                     &
@@ -423,5 +424,5 @@
 
        do i=1,nbvar3d
-         print *,'Dans read_cas, on va lire ',nid,i,name_var(i)
+         print *,'Dans read_cas2, on va lire ',nid,i,name_var(i)
        enddo
        do i=1,nbvar3d
@@ -433,5 +434,5 @@
        enddo
        do i=1,nbvar3d
-         print *,'Dans read_cas, on va lire ',var3didin(i),name_var(i)
+         print *,'Dans read_cas2, on va lire ',var3didin(i),name_var(i)
          if(i.LE.35) then
 #ifdef NC_DOUBLE
@@ -440,5 +441,5 @@
          ierr = NF_GET_VAR_REAL(nid,var3didin(i),resul)
 #endif
-         print *,'Dans read_cas, on a lu ',ierr,var3didin(i),name_var(i)
+         print *,'Dans read_cas2, on a lu ',ierr,var3didin(i),name_var(i)
          if(ierr/=NF_NOERR) then
             print *,'Pb a la lecture de cas.nc: ',name_var(i)
@@ -451,5 +452,5 @@
          ierr = NF_GET_VAR_REAL(nid,var3didin(i),resul1)
 #endif
-         print *,'Dans read_cas, on a lu ',ierr,var3didin(i),name_var(i)
+         print *,'Dans read_cas2, on a lu ',ierr,var3didin(i),name_var(i)
          if(ierr/=NF_NOERR) then
             print *,'Pb a la lecture de cas.nc: ',name_var(i)
@@ -501,5 +502,5 @@
 
          return 
-         end subroutine read_cas
+         end subroutine read_cas2
 !======================================================================
       subroutine read2_cas(nid,nlevel,ntime,                                       &
@@ -545,5 +546,6 @@
       data name_var/'coor_par_a','coor_par_b','height_h','pressure_h',&
      &'w','omega','ug','vg','uadv','uadvh','uadvv','vadv','vadvh','vadvv','tadv','tadvh','tadvv',&
-     &'qadv','qadvh','qadvv','thadv','thadvh','thadvv','thladvh','radv','radvh','radvv','radcool','q1','q2','ustress','vstress','rh',&
+     &'qadv','qadvh','qadvv','thadv','thadvh','thadvv','thladvh','radv','radvh','radvv','radcool','q1','q2','ustress','vstress', &
+     'rh',&
      &'height_f','pressure_f','temp','theta','thv','thl','qv','ql','qi','rv','u','v',&
      &'sfc_sens_flx','sfc_lat_flx','ts','ps','ustar','tke',&
@@ -686,5 +688,5 @@
          end subroutine read2_cas
 !======================================================================
-        SUBROUTINE interp_case_time(day,day1,annee_ref                &
+        SUBROUTINE interp_case_time2(day,day1,annee_ref                &
 !    &         ,year_cas,day_cas,nt_cas,pdt_forc,nlev_cas      &
      &         ,nt_cas,nlev_cas                                       &
@@ -887,5 +889,5 @@
 
         return
-        END SUBROUTINE interp_case_time
+        END SUBROUTINE interp_case_time2
 
 !**********************************************************************************************
Index: LMDZ5/branches/testing/libf/phylmd/iophys.F90
===================================================================
--- LMDZ5/branches/testing/libf/phylmd/iophys.F90	(revision 2729)
+++ LMDZ5/branches/testing/libf/phylmd/iophys.F90	(revision 2787)
@@ -1,6 +1,7 @@
       subroutine iophys_ecrit(nom,lllm,titre,unite,px)
-      USE dimphy
-      USE mod_phys_lmdz_para
-      USE mod_grid_phy_lmdz
+
+      USE mod_phys_lmdz_para, ONLY: klon_omp, is_mpi_root
+      USE mod_phys_lmdz_transfert_para, ONLY: gather
+      USE mod_grid_phy_lmdz, ONLY: klon_glo, nbp_lon, nbp_lat, grid1dto2d_glo
       IMPLICIT NONE
 
@@ -39,9 +40,4 @@
 !=================================================================
 
-#include "dimensions.h"
-#include "paramet.h"
-#include "netcdf.inc"
-#include "iotd.h"
-
 
 ! Arguments on input:
@@ -52,5 +48,5 @@
       real px(klon_omp,lllm)
       real xglo(klon_glo,lllm)
-      real zx(iim,jjp1,lllm)
+      real zx(nbp_lon,nbp_lat,lllm)
 
 
@@ -68,5 +64,5 @@
 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
       SUBROUTINE iophys_ini
-      USE mod_phys_lmdz_para
+      USE mod_phys_lmdz_para, ONLY: is_mpi_root
       USE vertical_layers_mod, ONLY: presnivs
       USE regular_lonlat_mod, ONLY: lon_reg, lat_reg
Index: LMDZ5/branches/testing/libf/phylmd/limit_read_mod.F90
===================================================================
--- LMDZ5/branches/testing/libf/phylmd/limit_read_mod.F90	(revision 2729)
+++ LMDZ5/branches/testing/libf/phylmd/limit_read_mod.F90	(revision 2787)
@@ -190,4 +190,5 @@
 !****************************************************************************************
     IF (first_call) THEN
+       first_call=.FALSE.
        ! calculate number of time steps for one day
        lmt_pas = NINT(86400./dtime * 1.0)
@@ -204,21 +205,6 @@
        END IF
 
-       first_call=.FALSE.
-    ENDIF
-  
-!****************************************************************************************
-! 1) Open the file limit.nc if it is the right moment to read, once a day.
-!    The file is read only by the master thread of the master mpi process(is_mpi_root)
-!    Check by the way if the number of records is correct.
-!
-!****************************************************************************************
-
-    is_modified = .FALSE.
-    IF (MOD(itime-1, lmt_pas) == 0 .OR. jour_lu /= jour ) THEN   ! time to read
-       jour_lu = jour
-       is_modified = .TRUE.
 !$OMP MASTER  ! Only master thread
        IF (is_mpi_root) THEN ! Only master processus
-
           ierr = NF90_OPEN ('limit.nc', NF90_NOWRITE, nid)
           IF (ierr /= NF90_NOERR) CALL abort_physic(modname,&
@@ -237,9 +223,6 @@
           ierr=NF90_INQUIRE(nid, UnlimitedDimID=ndimid)
           ierr=NF90_INQUIRE_DIMENSION(nid, ndimid, len=nn)
-          CALL num2str(nn,str)
-          abort_message='limit.nc records number ('//TRIM(str)//') does'//&
-            ' not match year length ('
-          CALL num2str(year_len,str)
-          abort_message=TRIM(abort_message)//TRIM(str)//')'
+          WRITE(abort_message,'(a,2(i0,a))')'limit.nc records number (',nn,') does no'//&
+            't match year length (',year_len,')'
           IF(nn/=year_len) CALL abort_physic(modname,abort_message,1)
 
@@ -247,10 +230,32 @@
           ierr=NF90_INQ_DIMID(nid, 'points_physiques', ndimid)
           ierr=NF90_INQUIRE_DIMENSION(nid, ndimid, len=nn)
-          CALL num2str(nn,str)
-          abort_message='limit.nc horizontal number of cells ('//TRIM(str)//') does'//&
-            ' not match LMDZ klon_glo ('
-          CALL num2str(klon_glo,str)
-          abort_message=TRIM(abort_message)//TRIM(str)//')'
+          WRITE(abort_message,'(a,2(i0,a))')'limit.nc horizontal number of cells (',nn, &
+            ') does not match LMDZ klon_glo (',klon_glo,')'
           IF(nn/=klon_glo) CALL abort_physic(modname,abort_message,1)
+
+          ierr = NF90_CLOSE(nid)
+          IF (ierr /= NF90_NOERR) CALL abort_physic(modname,'Pb when closing file', 1)
+       END IF ! is_mpi_root
+!$OMP END MASTER
+!$OMP BARRIER
+    END IF
+
+!****************************************************************************************
+! 1) Open the file limit.nc if it is the right moment to read, once a day.
+!    The file is read only by the master thread of the master mpi process(is_mpi_root)
+!    Check by the way if the number of records is correct.
+!
+!****************************************************************************************
+
+    is_modified = .FALSE.
+    IF (MOD(itime-1, lmt_pas) == 0 .OR. jour_lu /= jour ) THEN   ! time to read
+       jour_lu = jour
+       is_modified = .TRUE.
+!$OMP MASTER  ! Only master thread
+       IF (is_mpi_root) THEN ! Only master processus
+
+          ierr = NF90_OPEN ('limit.nc', NF90_NOWRITE, nid)
+          IF (ierr /= NF90_NOERR) CALL abort_physic(modname,&
+               'Pb d''ouverture du fichier de conditions aux limites',1)
 
           ! La tranche de donnees a lire:
@@ -370,17 +375,3 @@
   END SUBROUTINE limit_read_tot
 
-  !--------------------------------------------------------------------------------------
-  SUBROUTINE num2str(n,str)
-  !--------------------------------------------------------------------------------------
-  ! Arguments:
-    INTEGER,           INTENT(IN)  :: n
-    CHARACTER(LEN=99), INTENT(OUT) :: str
-  !--------------------------------------------------------------------------------------
-  ! Local variables:
-    INTEGER :: nn
-  !--------------------------------------------------------------------------------------
-    nn=n; str=''; DO WHILE(nn>0); str=CHAR(nn-10*(nn/10)-48)//TRIM(str); nn=nn/10; END DO
-  END SUBROUTINE num2str
-  !--------------------------------------------------------------------------------------
-
 END MODULE limit_read_mod
Index: LMDZ5/branches/testing/libf/phylmd/ocean_albedo.F90
===================================================================
--- LMDZ5/branches/testing/libf/phylmd/ocean_albedo.F90	(revision 2729)
+++ LMDZ5/branches/testing/libf/phylmd/ocean_albedo.F90	(revision 2787)
@@ -203,5 +203,7 @@
   ! Use Morel 91 formula to compute the diffuse
   ! reflectance below the surface
-  ZR00(1:knon)=(0.5*ZBW+ZBBP(1:knon))/(ZAW+ZAP(1:knon))*(0.6279-0.2227*ZHB(1:knon)-0.0513*ZHB(1:knon)**2 + (-0.3119+0.2465*ZHB(1:knon))*ZUE)
+  ZR00(1:knon) = (0.5*ZBW+ZBBP(1:knon)) / (ZAW+ZAP(1:knon)) &
+       * (0.6279-0.2227*ZHB(1:knon)-0.0513*ZHB(1:knon)**2 &
+       + (-0.3119+0.2465*ZHB(1:knon))*ZUE)
   ZRWDF(1:knon)=ZR00(1:knon)*(1.-ZR22(1:knon))*(1.-ZR11DF(1:knon))/(1.-ZR00(1:knon)*ZR22(1:knon))
    
Index: LMDZ5/branches/testing/libf/phylmd/phys_local_var_mod.F90
===================================================================
--- LMDZ5/branches/testing/libf/phylmd/phys_local_var_mod.F90	(revision 2729)
+++ LMDZ5/branches/testing/libf/phylmd/phys_local_var_mod.F90	(revision 2787)
@@ -255,6 +255,6 @@
       REAL,ALLOCATABLE,SAVE,DIMENSION(:)            :: ale_wake, alp_wake
 !$OMP THREADPRIVATE(ale_wake, alp_wake)           
-      REAL,ALLOCATABLE,SAVE,DIMENSION(:)            :: wake_h
-!$OMP THREADPRIVATE(wake_h)                       
+      REAL,ALLOCATABLE,SAVE,DIMENSION(:)            :: wake_h,wake_k
+!$OMP THREADPRIVATE(wake_h,wake_k)                       
     REAL,ALLOCATABLE,SAVE,DIMENSION(:,:)            :: wake_omg
 !$OMP THREADPRIVATE(wake_omg)                     
@@ -419,5 +419,6 @@
 
 #ifdef CPP_StratAer
-! variables for strat. aerosol CK
+!
+! variables for stratospheric aerosol
       REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: R2SO4
 !$OMP THREADPRIVATE(R2SO4)
@@ -426,22 +427,8 @@
       REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: f_r_wet
 !$OMP THREADPRIVATE(f_r_wet)
-      REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: sfluxaer
-!$OMP THREADPRIVATE(sfluxaer)
       REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: decfluxaer
 !$OMP THREADPRIVATE(decfluxaer)
       REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: mdw
 !$OMP THREADPRIVATE(mdw)
-      REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: sulf_convert
-!$OMP THREADPRIVATE(sulf_convert)
-      REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: sulf_nucl
-!$OMP THREADPRIVATE(sulf_nucl)
-      REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: sulf_cond_evap
-!$OMP THREADPRIVATE(sulf_cond_evap)
-      REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: ocs_convert
-!$OMP THREADPRIVATE(ocs_convert)
-      REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: SO2_backgr_tend
-!$OMP THREADPRIVATE(SO2_backgr_tend)
-      REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: OCS_backgr_tend
-!$OMP THREADPRIVATE(OCS_backgr_tend)
       REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: OCS_lifetime
 !$OMP THREADPRIVATE(OCS_lifetime)
@@ -456,14 +443,8 @@
       REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: tau_strat_550
 !$OMP THREADPRIVATE(tau_strat_550)
-      REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: tau_strat_550_lay
-!$OMP THREADPRIVATE(tau_strat_550_lay)
       REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: tau_strat_1020
 !$OMP THREADPRIVATE(tau_strat_1020)
       REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: tausum_strat
 !$OMP THREADPRIVATE(tausum_strat)
-      REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: sulf_dep_dry
-!$OMP THREADPRIVATE(sulf_dep_dry)
-      REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: sulf_dep_wet
-!$OMP THREADPRIVATE(sulf_dep_wet)
       REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: surf_PM25_sulf
 !$OMP THREADPRIVATE(surf_PM25_sulf)
@@ -472,4 +453,37 @@
       REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: vsed_aer
 !$OMP THREADPRIVATE(vsed_aer)
+!
+!---3D budget variables
+      REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: budg_3D_nucl
+!$OMP THREADPRIVATE(budg_3D_nucl)
+      REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: budg_3D_cond_evap
+!$OMP THREADPRIVATE(budg_3D_cond_evap)
+      REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: budg_3D_ocs_to_so2
+!$OMP THREADPRIVATE(budg_3D_ocs_to_so2)
+      REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: budg_3D_so2_to_h2so4
+!$OMP THREADPRIVATE(budg_3D_so2_to_h2so4)
+      REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: budg_3D_backgr_ocs
+!$OMP THREADPRIVATE(budg_3D_backgr_ocs)
+      REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: budg_3D_backgr_so2
+!$OMP THREADPRIVATE(budg_3D_backgr_so2)
+!
+!---2D budget variables
+      REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_dep_dry_h2so4
+      REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_dep_dry_part
+!$OMP THREADPRIVATE(budg_dep_dry_h2so4,budg_dep_dry_part)
+      REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_dep_wet_h2so4
+      REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_dep_wet_part
+!$OMP THREADPRIVATE(budg_dep_wet_h2so4,budg_dep_wet_part)
+      REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_emi_ocs
+      REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_emi_so2
+      REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_emi_h2so4
+      REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_emi_part
+!$OMP THREADPRIVATE(budg_emi_ocs,budg_emi_so2,budg_emi_h2so4,budg_emi_part)
+      REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_ocs_to_so2
+      REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_so2_to_h2so4
+      REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_h2so4_to_part
+!$OMP THREADPRIVATE(budg_ocs_to_so2,budg_so2_to_h2so4,budg_h2so4_to_part)
+      REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_sed_part
+!$OMP THREADPRIVATE(budg_sed_part)
 #endif
 
@@ -614,5 +628,5 @@
 !!          Wake variables
       ALLOCATE(ale_wake(klon), alp_wake(klon))
-      ALLOCATE(wake_h(klon))
+      ALLOCATE(wake_h(klon),wake_k(klon))
       ALLOCATE(wake_omg(klon, klev))
       ALLOCATE(d_deltat_wk(klon, klev), d_deltaq_wk(klon, klev))
@@ -718,13 +732,12 @@
       ALLOCATE (DENSO4(klon,klev))
       ALLOCATE (f_r_wet(klon,klev))
-      ALLOCATE (sfluxaer(klon))
       ALLOCATE (decfluxaer(klon,nbtr))
       ALLOCATE (mdw(nbtr))
-      ALLOCATE (sulf_convert(klon,klev))
-      ALLOCATE (sulf_nucl(klon,klev))
-      ALLOCATE (sulf_cond_evap(klon,klev))
-      ALLOCATE (ocs_convert(klon,klev))
-      ALLOCATE (SO2_backgr_tend(klon,klev))
-      ALLOCATE (OCS_backgr_tend(klon,klev))
+      ALLOCATE (budg_3D_nucl(klon,klev))
+      ALLOCATE (budg_3D_cond_evap(klon,klev))
+      ALLOCATE (budg_3D_ocs_to_so2(klon,klev))
+      ALLOCATE (budg_3D_so2_to_h2so4(klon,klev))
+      ALLOCATE (budg_3D_backgr_ocs(klon,klev))
+      ALLOCATE (budg_3D_backgr_so2(klon,klev))
       ALLOCATE (OCS_lifetime(klon,klev))
       ALLOCATE (SO2_lifetime(klon,klev))
@@ -733,9 +746,18 @@
       ALLOCATE (cg_bin(nbands_sw_rrtm+nbands_lw_rrtm+nwave+nwave_lw,nbtr))
       ALLOCATE (tau_strat_550(klon,klev))
-      ALLOCATE (tau_strat_550_lay(klon,klev))
       ALLOCATE (tau_strat_1020(klon,klev))
       ALLOCATE (tausum_strat(klon,3))
-      ALLOCATE (sulf_dep_dry(klon))
-      ALLOCATE (sulf_dep_wet(klon))
+      ALLOCATE (budg_dep_dry_h2so4(klon))
+      ALLOCATE (budg_dep_wet_h2so4(klon))
+      ALLOCATE (budg_dep_dry_part(klon))
+      ALLOCATE (budg_dep_wet_part(klon))
+      ALLOCATE (budg_emi_ocs(klon))
+      ALLOCATE (budg_emi_so2(klon))
+      ALLOCATE (budg_emi_h2so4(klon))
+      ALLOCATE (budg_emi_part(klon))
+      ALLOCATE (budg_ocs_to_so2(klon))
+      ALLOCATE (budg_so2_to_h2so4(klon))
+      ALLOCATE (budg_h2so4_to_part(klon))
+      ALLOCATE (budg_sed_part(klon))
       ALLOCATE (surf_PM25_sulf(klon))
       ALLOCATE (p_tropopause(klon))
@@ -867,5 +889,5 @@
 !
       DEALLOCATE(ale_wake, alp_wake)
-      DEALLOCATE(wake_h)
+      DEALLOCATE(wake_h,wake_k)
       DEALLOCATE(wake_omg)
       DEALLOCATE(d_deltat_wk, d_deltaq_wk)
@@ -964,13 +986,6 @@
       DEALLOCATE (DENSO4)
       DEALLOCATE (f_r_wet)
-      DEALLOCATE (sfluxaer)
       DEALLOCATE (decfluxaer)
       DEALLOCATE (mdw)
-      DEALLOCATE (sulf_convert)
-      DEALLOCATE (sulf_nucl)
-      DEALLOCATE (sulf_cond_evap)
-      DEALLOCATE (ocs_convert)
-      DEALLOCATE (SO2_backgr_tend)
-      DEALLOCATE (OCS_backgr_tend)
       DEALLOCATE (SO2_lifetime)
       DEALLOCATE (OCS_lifetime)
@@ -979,12 +994,27 @@
       DEALLOCATE (cg_bin)
       DEALLOCATE (tau_strat_550)
-      DEALLOCATE (tau_strat_550_lay)
       DEALLOCATE (tau_strat_1020)
       DEALLOCATE (tausum_strat)
-      DEALLOCATE (sulf_dep_dry)
-      DEALLOCATE (sulf_dep_wet)
       DEALLOCATE (surf_PM25_sulf)
       DEALLOCATE (p_tropopause)
       DEALLOCATE (vsed_aer)
+      DEALLOCATE (budg_3D_ocs_to_so2)
+      DEALLOCATE (budg_3D_so2_to_h2so4)
+      DEALLOCATE (budg_3D_backgr_ocs)
+      DEALLOCATE (budg_3D_backgr_so2)
+      DEALLOCATE (budg_3D_nucl)
+      DEALLOCATE (budg_3D_cond_evap)
+      DEALLOCATE (budg_dep_dry_h2so4)
+      DEALLOCATE (budg_dep_wet_h2so4)
+      DEALLOCATE (budg_dep_dry_part)
+      DEALLOCATE (budg_dep_wet_part)
+      DEALLOCATE (budg_emi_ocs)
+      DEALLOCATE (budg_emi_so2)
+      DEALLOCATE (budg_emi_h2so4)
+      DEALLOCATE (budg_emi_part)
+      DEALLOCATE (budg_ocs_to_so2)
+      DEALLOCATE (budg_so2_to_h2so4)
+      DEALLOCATE (budg_h2so4_to_part)
+      DEALLOCATE (budg_sed_part)
 #endif
 
Index: LMDZ5/branches/testing/libf/phylmd/phys_output_ctrlout_mod.F90
===================================================================
--- LMDZ5/branches/testing/libf/phylmd/phys_output_ctrlout_mod.F90	(revision 2729)
+++ LMDZ5/branches/testing/libf/phylmd/phys_output_ctrlout_mod.F90	(revision 2787)
@@ -19,24 +19,24 @@
 !!! Comosantes de la coordonnee sigma-hybride
 !!! Ap et Bp
-  TYPE(ctrl_out), SAVE :: o_Ahyb = ctrl_out((/ 1, 1, 1, 1, 1, 1, 11, 11, 11 /), &
-    'Ap', '', '', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_Bhyb = ctrl_out((/ 1, 1, 1, 1, 1, 1, 11, 11, 11 /), &
-    'Bp', '', '', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_Alt = ctrl_out((/ 1, 1, 1, 1, 1, 1, 11, 11, 11 /), &
-    'Alt', '', '', (/ ('', i=1, 9) /))
+  TYPE(ctrl_out), SAVE :: o_Ahyb = ctrl_out((/ 1, 1, 1, 1, 1, 1, 11, 11, 11, 11/), &
+    'Ap', '', '', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_Bhyb = ctrl_out((/ 1, 1, 1, 1, 1, 1, 11, 11, 11, 11/), &
+    'Bp', '', '', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_Alt = ctrl_out((/ 1, 1, 1, 1, 1, 1, 11, 11, 11, 11/), &
+    'Alt', '', '', (/ ('', i=1, 10) /))
 
 !!! 1D
-  TYPE(ctrl_out), SAVE :: o_phis = ctrl_out((/ 1, 1, 10, 5, 1, 1, 11, 11, 11 /), &
-    'phis', 'Surface geop.height', 'm2/s2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_aire = ctrl_out((/ 1, 1, 10,  10, 1, 1, 11, 11, 11 /), &
+  TYPE(ctrl_out), SAVE :: o_phis = ctrl_out((/ 1, 1, 10, 5, 1, 1, 11, 11, 11, 11/), &
+    'phis', 'Surface geop.height', 'm2/s2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_aire = ctrl_out((/ 1, 1, 10,  10, 1, 1, 11, 11, 11, 11/), &
     'aire', 'Grid area', '-', (/ 'once', 'once', 'once', 'once', 'once', 'once', &
-                                     'once', 'once', 'once' /))
-  TYPE(ctrl_out), SAVE :: o_contfracATM = ctrl_out((/ 10, 1,  1, 10, 10, 10, 11, 11, 11 /), &
+                                 'once', 'once', 'once', 'once' /))
+  TYPE(ctrl_out), SAVE :: o_contfracATM = ctrl_out((/ 10, 1,  1, 10, 10, 10, 11, 11, 11, 11/), &
     'contfracATM', '% sfce ter+lic', '-', &
-       (/ 'once', 'once', 'once', 'once', 'once', 'once', 'once', 'once', 'once' /)) 
-  TYPE(ctrl_out), SAVE :: o_contfracOR = ctrl_out((/ 10, 1,  10, 10, 10, 10, 11, 11, 11 /), &
-    'contfracOR', '% sfce terre OR', '-', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_aireTER = ctrl_out((/ 10, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'aireTER', 'Grid area CONT', '-', (/ ('', i=1, 9) /))
+       (/ 'once', 'once', 'once', 'once', 'once', 'once', 'once', 'once', 'once', 'once' /)) 
+  TYPE(ctrl_out), SAVE :: o_contfracOR = ctrl_out((/ 10, 1,  10, 10, 10, 10, 11, 11, 11, 11/), &
+    'contfracOR', '% sfce terre OR', '-', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_aireTER = ctrl_out((/ 10, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'aireTER', 'Grid area CONT', '-', (/ ('', i=1, 10) /))
 
 !!! 2D
@@ -44,759 +44,756 @@
 ! Marine
 
-  TYPE(ctrl_out), SAVE :: o_alt_tropo = ctrl_out((/1,1,1,1,1,10,10,10,10/),&
+  TYPE(ctrl_out), SAVE :: o_alt_tropo = ctrl_out((/1,1,1,1,1,10,10,10,10,10/),&
   'alt_tropo','Tropopause pressure','hPa',&
    (/ "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)",&
-    "inst(X)", "inst(X)","inst(X)" /))
-
-  TYPE(ctrl_out), SAVE :: o_map_prop_hc = ctrl_out((/1,1,1,1,1,10,10,10,10/),&
+      "inst(X)", "inst(X)", "inst(X)", "inst(X)" /))
+
+  TYPE(ctrl_out), SAVE :: o_map_prop_hc = ctrl_out((/1,1,1,1,1,10,10,10,10,10/),&
   'map_prop_hc','Proportion of high clouds',' ',&
    (/ "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)",&
-    "inst(X)", "inst(X)","inst(X)" /))
+      "inst(X)", "inst(X)", "inst(X)", "inst(X)" /))
 
   TYPE(ctrl_out), SAVE :: o_map_prop_hist = &
-  ctrl_out((/1,1,1,1,1,1,10,10,10/),&
+  ctrl_out((/1,1,1,1,1,1,10,10,10,10/),&
   'map_prop_hist','Proportion of high ice semi-transp clouds',' ',&
    (/ "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)",&
-    "inst(X)", "inst(X)","inst(X)" /))
+      "inst(X)", "inst(X)", "inst(X)", "inst(X)" /))
 
   TYPE(ctrl_out), SAVE :: o_map_emis_hc = &
-  ctrl_out((/1,1,1,1,1,1,10,10,10/),&
+  ctrl_out((/1,1,1,1,1,1,10,10,10,10/),&
   'map_emis_hc','Emissivity of high clouds',' ',&
    (/ "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)",&
-    "inst(X)", "inst(X)","inst(X)" /))
+      "inst(X)", "inst(X)", "inst(X)", "inst(X)" /))
 
   TYPE(ctrl_out), SAVE :: o_map_iwp_hc = &
-  ctrl_out((/1,1,1,1,1,10,10,10,10/),&
+  ctrl_out((/1,1,1,1,1,10,10,10,10,10/),&
   'map_iwp_hc','Ice water path of high clouds','g/m2',&
    (/ "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)",&
-    "inst(X)", "inst(X)","inst(X)" /))
+      "inst(X)", "inst(X)", "inst(X)", "inst(X)" /))
 
   TYPE(ctrl_out), SAVE :: o_map_deltaz_hc = &
-  ctrl_out((/1,1,1,1,1,10,10,10,10/),&
+  ctrl_out((/1,1,1,1,1,10,10,10,10,10/),&
   'map_deltaz_hc','geom thickness of high clouds','m',&
    (/ "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)",&
-    "inst(X)", "inst(X)","inst(X)" /))
+      "inst(X)", "inst(X)", "inst(X)", "inst(X)" /))
 
   TYPE(ctrl_out), SAVE :: o_map_pcld_hc = &
-  ctrl_out((/1,1,1,1,1,10,10,10,10/),&
+  ctrl_out((/1,1,1,1,1,10,10,10,10,10/),&
   'map_pcld_hc','cloud pressure of high clouds','hPa',&
    (/ "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)",&
-    "inst(X)", "inst(X)","inst(X)" /))
+      "inst(X)", "inst(X)", "inst(X)", "inst(X)" /))
 
    TYPE(ctrl_out), SAVE :: o_map_tcld_hc = &
-  ctrl_out((/1,1,1,1,1,10,10,10,10/),&
+  ctrl_out((/1,1,1,1,1,10,10,10,10,10/),&
   'map_tcld_hc','cloud temperature of high clouds','K',&
    (/ "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)",&
-    "inst(X)", "inst(X)","inst(X)" /))
-
+      "inst(X)", "inst(X)", "inst(X)", "inst(X)" /))
 
   TYPE(ctrl_out), SAVE :: o_map_emis_hist = &
-  ctrl_out((/1,1,1,1,1,10,10,10,10/),&
+  ctrl_out((/1,1,1,1,1,10,10,10,10,10/),&
   'map_emis_hist','Emissivity of high ice st clouds',' ',&
    (/ "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)",&
-    "inst(X)", "inst(X)","inst(X)" /))
+      "inst(X)", "inst(X)", "inst(X)", "inst(X)" /))
 
   TYPE(ctrl_out), SAVE :: o_map_iwp_hist = &
-  ctrl_out((/1,1,1,1,1,10,10,10,10/),&
+  ctrl_out((/1,1,1,1,1,10,10,10,10,10/),&
   'map_iwp_hist','Ice water path of high ice st clouds','g/m2',&
    (/ "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)",&
-    "inst(X)", "inst(X)","inst(X)" /))
+      "inst(X)", "inst(X)", "inst(X)", "inst(X)" /))
 
   TYPE(ctrl_out), SAVE :: o_map_deltaz_hist = &
-  ctrl_out((/1,1,1,1,1,10,10,10,10/),&
+  ctrl_out((/1,1,1,1,1,10,10,10,10,10/),&
   'map_deltaz_hist','geom thickness of high ice st clouds','m',&
    (/ "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)",&
-    "inst(X)", "inst(X)","inst(X)" /))
+      "inst(X)", "inst(X)", "inst(X)", "inst(X)" /))
 
   TYPE(ctrl_out), SAVE :: o_map_rad_hist = &
-  ctrl_out((/1,1,1,1,1,10,10,10,10/),&
+  ctrl_out((/1,1,1,1,1,10,10,10,10,10/),&
   'map_rad_hist','ice crystals radius in high ice st clouds','µm',&
    (/ "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)",&
-    "inst(X)", "inst(X)","inst(X)" /))
+      "inst(X)", "inst(X)", "inst(X)", "inst(X)" /))
 
 
  TYPE(ctrl_out), SAVE :: o_map_emis_Cb = &
-  ctrl_out((/1,1,1,1,1,10,10,10,10/),&
+  ctrl_out((/1,1,1,1,1,10,10,10,10,10/),&
   'map_emis_Cb','Emissivity of high Cb clouds',' ',&
    (/ "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)",&
-    "inst(X)", "inst(X)","inst(X)" /))
+      "inst(X)", "inst(X)", "inst(X)", "inst(X)" /))
 
  TYPE(ctrl_out), SAVE :: o_map_pcld_Cb = &
-  ctrl_out((/1,1,1,1,1,10,10,10,10/),&
+  ctrl_out((/1,1,1,1,1,10,10,10,10,10/),&
   'map_pcld_Cb','cloud pressure of high Cb clouds','hPa',&
    (/ "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)",&
-    "inst(X)", "inst(X)","inst(X)" /))
+      "inst(X)", "inst(X)", "inst(X)", "inst(X)" /))
 
  TYPE(ctrl_out), SAVE :: o_map_tcld_Cb = &
-  ctrl_out((/1,1,1,1,1,10,10,10,10/),&
+  ctrl_out((/1,1,1,1,1,10,10,10,10,10/),&
   'map_tcld_Cb','cloud temperature of high Cb clouds','K',&
    (/ "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)",&
-    "inst(X)", "inst(X)","inst(X)" /))
+      "inst(X)", "inst(X)", "inst(X)", "inst(X)" /))
 
 
  TYPE(ctrl_out), SAVE :: o_map_emis_Anv = &
-  ctrl_out((/1,1,1,1,1,10,10,10,10/),&
+  ctrl_out((/1,1,1,1,1,10,10,10,10,10/),&
   'map_emis_Anv','Emissivity of high Anv clouds',' ',&
    (/ "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)",&
-    "inst(X)", "inst(X)","inst(X)" /))
+      "inst(X)", "inst(X)", "inst(X)", "inst(X)" /))
 
  TYPE(ctrl_out), SAVE :: o_map_pcld_Anv = &
-  ctrl_out((/1,1,1,1,1,10,10,10,10/),&
+  ctrl_out((/1,1,1,1,1,10,10,10,10,10/),&
   'map_pcld_Anv','cloud pressure of high Anv clouds','hPa',&
    (/ "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)",&
-    "inst(X)", "inst(X)","inst(X)" /))
+      "inst(X)", "inst(X)", "inst(X)", "inst(X)" /))
 
   TYPE(ctrl_out), SAVE :: o_map_tcld_Anv = &
-  ctrl_out((/1,1,1,1,1,10,10,10,10/),&
+  ctrl_out((/1,1,1,1,1,10,10,10,10,10/),&
   'map_tcld_Anv','cloud temperature of high Anv clouds','K',&
    (/ "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)",&
-    "inst(X)", "inst(X)","inst(X)" /))
+      "inst(X)", "inst(X)", "inst(X)", "inst(X)" /))
 
   TYPE(ctrl_out), SAVE :: o_map_emis_ThCi = &
-  ctrl_out((/1,1,1,1,1,10,10,10,10/),&
+  ctrl_out((/1,1,1,1,1,10,10,10,10,10/),&
   'map_emis_ThCi','Emissivity of high ThCi clouds',' ',&
    (/ "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)",&
-    "inst(X)", "inst(X)","inst(X)" /))
+      "inst(X)", "inst(X)", "inst(X)", "inst(X)" /))
 
   TYPE(ctrl_out), SAVE :: o_map_pcld_ThCi = &
-  ctrl_out((/1,1,1,1,1,10,10,10,10/),&
+  ctrl_out((/1,1,1,1,1,10,10,10,10,10/),&
   'map_pcld_ThCi','cloud pressure of high ThCi clouds','hPa',&
    (/ "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)",&
-    "inst(X)", "inst(X)","inst(X)" /))
+      "inst(X)", "inst(X)", "inst(X)", "inst(X)" /))
 
   TYPE(ctrl_out), SAVE :: o_map_tcld_ThCi = &
-  ctrl_out((/10,10,1,10,10,10,10,10,10/),&
+  ctrl_out((/10,10,1,10,10,10,10,10,10,10/),&
   'map_tcld_ThCi','cloud temperature of high ThCi clouds','K',&
    (/ "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)",&
-    "inst(X)", "inst(X)","inst(X)" /))
+      "inst(X)", "inst(X)", "inst(X)", "inst(X)" /))
 
    TYPE(ctrl_out), SAVE :: o_map_ntot = &
-  ctrl_out((/1,1,1,1,1,10,10,10,10/),&
+  ctrl_out((/1,1,1,1,1,10,10,10,10,10/),&
   'map_ntot','total AIRS cloud fraction',' ',&
    (/ "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)",&
-    "inst(X)", "inst(X)","inst(X)" /))
+      "inst(X)", "inst(X)", "inst(X)", "inst(X)" /))
 
   TYPE(ctrl_out), SAVE :: o_map_hc = &
-  ctrl_out((/1,1,1,1,1,10,10,10,10/),&
+  ctrl_out((/1,1,1,1,1,10,10,10,10,10/),&
   'map_hc','high clouds AIRS cloud fraction',' ',&
    (/ "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)",&
-    "inst(X)", "inst(X)","inst(X)" /))
+      "inst(X)", "inst(X)", "inst(X)", "inst(X)" /))
 
   TYPE(ctrl_out), SAVE :: o_map_hist = &
-  ctrl_out((/1,1,1,1,1,10,10,10,10/),&
+  ctrl_out((/1,1,1,1,1,10,10,10,10,10/),&
   'map_hist','high clouds ice st AIRS cloud fraction',' ',&
    (/ "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)",&
-    "inst(X)", "inst(X)","inst(X)" /))
+      "inst(X)", "inst(X)", "inst(X)", "inst(X)" /))
 
   TYPE(ctrl_out), SAVE :: o_map_Cb = &
-  ctrl_out((/1,1,1,1,1,10,10,10,10/),&
+  ctrl_out((/1,1,1,1,1,10,10,10,10,10/),&
   'map_Cb','high clouds Cb AIRS cloud fraction',' ',&
    (/ "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)",&
-    "inst(X)", "inst(X)","inst(X)" /))
+      "inst(X)", "inst(X)", "inst(X)", "inst(X)" /))
 
  TYPE(ctrl_out), SAVE :: o_map_ThCi = &
-  ctrl_out((/1,1,1,1,1,10,10,10,10/),&
+  ctrl_out((/1,1,1,1,1,10,10,10,10,10/),&
   'map_ThCi','high clouds ThCi AIRS cloud fraction',' ',&
    (/ "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)",&
-    "inst(X)", "inst(X)","inst(X)" /))
+      "inst(X)", "inst(X)", "inst(X)", "inst(X)" /))
 
  TYPE(ctrl_out), SAVE :: o_map_Anv = &
-  ctrl_out((/1,1,1,1,1,10,10,10,10/),&
+  ctrl_out((/1,1,1,1,1,10,10,10,10,10/),&
   'map_Anv','high clouds Anv AIRS cloud fraction',' ',&
    (/ "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)",&
-    "inst(X)", "inst(X)","inst(X)" /))
-
+      "inst(X)", "inst(X)", "inst(X)", "inst(X)" /))
 
 ! Fin Marine
 
-  TYPE(ctrl_out), SAVE :: o_flat = ctrl_out((/ 5, 1, 10, 10, 5, 10, 11, 11, 11 /), &
-    'flat', 'Latent heat flux', 'W/m2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_ptstar = ctrl_out((/ 1, 1, 1, 10, 10, 10, 11, 11, 11 /), &
-    'ptstar', 'Air Surface Temperature', 'K', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_pt0 = ctrl_out((/ 1, 1, 1, 10, 10, 10, 11, 11, 11 /), &
-    'pt0', 'Standard Air Surface Temperature', 'K', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_slp = ctrl_out((/ 1, 1, 1, 10, 10, 10, 11, 11, 11 /), &
-    'slp', 'Sea Level Pressure', 'Pa', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_tsol = ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11 /), &
-    'tsol', 'Surface Temperature', 'K', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_t2m = ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11 /), &
-    't2m', 'Temperature 2m', 'K', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_t2m_min = ctrl_out((/ 20, 1, 10, 10, 10, 10, 11, 11, 11 /), &
+  TYPE(ctrl_out), SAVE :: o_flat = ctrl_out((/ 5, 1, 10, 10, 5, 10, 11, 11, 11, 11/), &
+    'flat', 'Latent heat flux', 'W/m2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_ptstar = ctrl_out((/ 1, 1, 1, 10, 10, 10, 11, 11, 11, 11/), &
+    'ptstar', 'Air Surface Temperature', 'K', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_pt0 = ctrl_out((/ 1, 1, 1, 10, 10, 10, 11, 11, 11, 11/), &
+    'pt0', 'Standard Air Surface Temperature', 'K', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_slp = ctrl_out((/ 1, 1, 1, 10, 10, 10, 11, 11, 11, 11/), &
+    'slp', 'Sea Level Pressure', 'Pa', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_tsol = ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/), &
+    'tsol', 'Surface Temperature', 'K', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_t2m = ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/), &
+    't2m', 'Temperature 2m', 'K', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_t2m_min = ctrl_out((/ 20, 1, 10, 10, 10, 10, 11, 11, 11, 11/), &
     't2m_min', 'Temp 2m min', 'K', &
-      (/ "t_min(X)", "t_min(X)", "t_min(X)", "t_min(X)", "t_min(X)", "t_min(X)", "t_min(X)", "t_min(X)", "t_min(X)" /))
-  TYPE(ctrl_out), SAVE :: o_t2m_max = ctrl_out((/ 20, 1, 10, 10, 10, 10, 11, 11, 11 /), &
+      (/ "t_min(X)", "t_min(X)", "t_min(X)", "t_min(X)", "t_min(X)", & 
+         "t_min(X)", "t_min(X)", "t_min(X)", "t_min(X)", "t_min(X)" /))
+  TYPE(ctrl_out), SAVE :: o_t2m_max = ctrl_out((/ 20, 1, 10, 10, 10, 10, 11, 11, 11, 11/), &
     't2m_max', 'Temp 2m max', 'K', &
       (/ "t_max(X)", "t_max(X)", "t_max(X)", "t_max(X)", "t_max(X)", &
-         "t_max(X)", "t_max(X)", "t_max(X)", "t_max(X)" /))
-
-  TYPE(ctrl_out), SAVE :: o_t2m_min_mon = ctrl_out((/ 1, 20, 20, 20, 20, 20, 20, 20, 20 /), &
+         "t_max(X)", "t_max(X)", "t_max(X)", "t_max(X)", "t_max(X)" /))
+
+  TYPE(ctrl_out), SAVE :: o_t2m_min_mon = ctrl_out((/ 1, 20, 20, 20, 20, 20, 20, 20, 20, 20 /), &
     't2m_min_mon', 'Monthly average min 2m temperature', 'K', &
-      (/ "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)" /))
-  TYPE(ctrl_out), SAVE :: o_t2m_max_mon = ctrl_out((/ 1, 20, 20, 20, 20, 20, 20, 20, 20 /), &
+      (/ "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)", & 
+         "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)" /))
+  TYPE(ctrl_out), SAVE :: o_t2m_max_mon = ctrl_out((/ 1, 20, 20, 20, 20, 20, 20, 20, 20, 20 /), &
     't2m_max_mon', 'Monthly average max 2m temperature', 'K', &
       (/ "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)", &
-         "inst(X)", "inst(X)", "inst(X)", "inst(X)" /))
+         "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)" /))
 
   TYPE(ctrl_out), SAVE, DIMENSION(4) :: o_t2m_srf = (/ &
-      ctrl_out((/ 10, 6, 10, 10, 10, 10, 11, 11, 11 /), &
-    't2m_ter', "Temp 2m "//clnsurf(1), "K", (/ ('', i=1, 9) /)), &
-      ctrl_out((/ 10, 6, 10, 10, 10, 10, 11, 11, 11 /), &
-    't2m_lic', "Temp 2m "//clnsurf(2), "K", (/ ('', i=1, 9) /)), &
-      ctrl_out((/ 10, 6, 10, 10, 10, 10, 11, 11, 11 /), &
-    't2m_oce', "Temp 2m "//clnsurf(3), "K", (/ ('', i=1, 9) /)), &
-      ctrl_out((/ 10, 6, 10, 10, 10, 10, 11, 11, 11 /), &
-    't2m_sic', "Temp 2m "//clnsurf(4), "K", (/ ('', i=1, 9) /)) /)
-
-  TYPE(ctrl_out), SAVE :: o_gusts = ctrl_out((/ 1, 1, 1, 10, 10, 10, 11, 11, 11 /), &
-    'gusts', 'surface gustiness', 'm2/s2', (/ ('', i=1, 9) /))
-
-  TYPE(ctrl_out), SAVE :: o_wind10m = ctrl_out((/ 1, 1, 1, 10, 10, 10, 11, 11, 11 /), &
-    'wind10m', '10-m wind speed', 'm/s', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_wind10max = ctrl_out((/ 10, 1, 10, 10, 10, 10, 11, 11, 11 /), &
+      ctrl_out((/ 10, 6, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    't2m_ter', "Temp 2m "//clnsurf(1), "K", (/ ('', i=1, 10) /)), &
+      ctrl_out((/ 10, 6, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    't2m_lic', "Temp 2m "//clnsurf(2), "K", (/ ('', i=1, 10) /)), &
+      ctrl_out((/ 10, 6, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    't2m_oce', "Temp 2m "//clnsurf(3), "K", (/ ('', i=1, 10) /)), &
+      ctrl_out((/ 10, 6, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    't2m_sic', "Temp 2m "//clnsurf(4), "K", (/ ('', i=1, 10) /)) /)
+
+  TYPE(ctrl_out), SAVE :: o_gusts = ctrl_out((/ 1, 1, 1, 10, 10, 10, 11, 11, 11, 11/), &
+    'gusts', 'surface gustiness', 'm2/s2', (/ ('', i=1, 10) /))
+
+  TYPE(ctrl_out), SAVE :: o_wind10m = ctrl_out((/ 1, 1, 1, 10, 10, 10, 11, 11, 11, 11/), &
+    'wind10m', '10-m wind speed', 'm/s', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_wind10max = ctrl_out((/ 10, 1, 10, 10, 10, 10, 11, 11, 11, 11/), &
     'wind10max', '10m wind speed max', 'm/s', &
     (/ "t_max(X)", "t_max(X)", "t_max(X)", "t_max(X)", "t_max(X)", & 
-     "t_max(X)", "t_max(X)", "t_max(X)", "t_max(X)" /))                                                                                                                                           
-  TYPE(ctrl_out), SAVE :: o_sicf = ctrl_out((/ 1, 1, 10, 10, 10, 10, 11, 11, 11 /), &
-    'sicf', 'Sea-ice fraction', '-', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_q2m = ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11 /), &
-    'q2m', 'Specific humidity 2m', 'kg/kg', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_ustar = ctrl_out((/ 1, 1, 10, 5, 10, 10, 11, 11, 11 /), &
-    'ustar', 'Friction velocity', 'm/s', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_u10m = ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11 /), &
-    'u10m', 'Vent zonal 10m', 'm/s', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_v10m = ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11 /), &
-    'v10m', 'Vent meridien 10m', 'm/s', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_psol = ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11 /), &
-    'psol', 'Surface Pressure', 'Pa', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_qsurf = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'qsurf', 'Surface Air humidity', 'kg/kg', (/ ('', i=1, 9) /))
+       "t_max(X)", "t_max(X)", "t_max(X)", "t_max(X)", "t_max(X)" /))
+
+  TYPE(ctrl_out), SAVE :: o_sicf = ctrl_out((/ 1, 1, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'sicf', 'Sea-ice fraction', '-', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_q2m = ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/), &
+    'q2m', 'Specific humidity 2m', 'kg/kg', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_ustar = ctrl_out((/ 1, 1, 10, 5, 10, 10, 11, 11, 11, 11/), &
+    'ustar', 'Friction velocity', 'm/s', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_u10m = ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/), &
+    'u10m', 'Vent zonal 10m', 'm/s', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_v10m = ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/), &
+    'v10m', 'Vent meridien 10m', 'm/s', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_psol = ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/), &
+    'psol', 'Surface Pressure', 'Pa', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_qsurf = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'qsurf', 'Surface Air humidity', 'kg/kg', (/ ('', i=1, 10) /))
 
   TYPE(ctrl_out), SAVE, DIMENSION(4) :: o_ustar_srf     = (/ &
-      ctrl_out((/ 10, 6, 10, 10, 10, 10, 11, 11, 11 /),'ustar_ter', &
-      "Friction velocity "//clnsurf(1),"m/s", (/ ('', i=1, 9) /)), &
-      ctrl_out((/ 10, 6, 10, 10, 10, 10, 11, 11, 11 /),'ustar_lic', &
-      "Friction velocity "//clnsurf(2),"m/s", (/ ('', i=1, 9) /)), &
-      ctrl_out((/ 10, 6, 10, 10, 10, 10, 11, 11, 11 /),'ustar_oce', &
-      "Friction velocity "//clnsurf(3),"m/s", (/ ('', i=1, 9) /)), &
-      ctrl_out((/ 10, 6, 10, 10, 10, 10, 11, 11, 11 /),'ustar_sic', &
-      "Friction velocity "//clnsurf(4),"m/s", (/ ('', i=1, 9) /)) /)
+      ctrl_out((/ 10, 6, 10, 10, 10, 10, 11, 11, 11, 11/),'ustar_ter', &
+      "Friction velocity "//clnsurf(1),"m/s", (/ ('', i=1, 10) /)), &
+      ctrl_out((/ 10, 6, 10, 10, 10, 10, 11, 11, 11, 11/),'ustar_lic', &
+      "Friction velocity "//clnsurf(2),"m/s", (/ ('', i=1, 10) /)), &
+      ctrl_out((/ 10, 6, 10, 10, 10, 10, 11, 11, 11, 11/),'ustar_oce', &
+      "Friction velocity "//clnsurf(3),"m/s", (/ ('', i=1, 10) /)), &
+      ctrl_out((/ 10, 6, 10, 10, 10, 10, 11, 11, 11, 11/),'ustar_sic', &
+      "Friction velocity "//clnsurf(4),"m/s", (/ ('', i=1, 10) /)) /)
 
   TYPE(ctrl_out), SAVE, DIMENSION(5) :: o_wstar         = (/ &
-      ctrl_out((/ 10, 6, 10, 10, 10, 10, 11, 11, 11 /),'wstar_ter', &
-      "Friction velocity "//clnsurf(1),"m/s", (/ ('', i=1, 9) /)), &
-      ctrl_out((/ 10, 6, 10, 10, 10, 10, 11, 11, 11 /),'wstar_lic', &
-      "Friction velocity "//clnsurf(2),"m/s", (/ ('', i=1, 9) /)), &
-      ctrl_out((/ 10, 6, 10, 10, 10, 10, 11, 11, 11 /),'wstar_oce', &
-      "Friction velocity "//clnsurf(3),"m/s", (/ ('', i=1, 9) /)), &
-      ctrl_out((/ 10, 6, 10, 10, 10, 10, 11, 11, 11 /),'wstar_sic', &
-      "Friction velocity "//clnsurf(4),"m/s", (/ ('', i=1, 9) /)), &
-      ctrl_out((/ 5, 5, 10, 10, 10, 10, 11, 11, 11 /),'wstar', &
-      "w* convective velocity "//clnsurf(4),"m/s", (/ ('', i=1, 9) /)) /)
+      ctrl_out((/ 10, 6, 10, 10, 10, 10, 11, 11, 11, 11/),'wstar_ter', &
+      "Friction velocity "//clnsurf(1),"m/s", (/ ('', i=1, 10) /)), &
+      ctrl_out((/ 10, 6, 10, 10, 10, 10, 11, 11, 11, 11/),'wstar_lic', &
+      "Friction velocity "//clnsurf(2),"m/s", (/ ('', i=1, 10) /)), &
+      ctrl_out((/ 10, 6, 10, 10, 10, 10, 11, 11, 11, 11/),'wstar_oce', &
+      "Friction velocity "//clnsurf(3),"m/s", (/ ('', i=1, 10) /)), &
+      ctrl_out((/ 10, 6, 10, 10, 10, 10, 11, 11, 11, 11/),'wstar_sic', &
+      "Friction velocity "//clnsurf(4),"m/s", (/ ('', i=1, 10) /)), &
+      ctrl_out((/ 5, 5, 10, 10, 10, 10, 11, 11, 11, 11/),'wstar', &
+      "w* convective velocity "//clnsurf(4),"m/s", (/ ('', i=1, 10) /)) /)
 
   TYPE(ctrl_out), SAVE, DIMENSION(4) :: o_u10m_srf     = (/ &
-      ctrl_out((/ 10, 6, 10, 10, 10, 10, 11, 11, 11 /),'u10m_ter', &
-      "Vent Zonal 10m "//clnsurf(1),"m/s", (/ ('', i=1, 9) /)), &
-      ctrl_out((/ 10, 6, 10, 10, 10, 10, 11, 11, 11 /),'u10m_lic', &
-      "Vent Zonal 10m "//clnsurf(2),"m/s", (/ ('', i=1, 9) /)), &
-      ctrl_out((/ 10, 6, 10, 10, 10, 10, 11, 11, 11 /),'u10m_oce', &
-      "Vent Zonal 10m "//clnsurf(3),"m/s", (/ ('', i=1, 9) /)), &
-      ctrl_out((/ 10, 6, 10, 10, 10, 10, 11, 11, 11 /),'u10m_sic', &
-      "Vent Zonal 10m "//clnsurf(4),"m/s", (/ ('', i=1, 9) /)) /)
+      ctrl_out((/ 10, 6, 10, 10, 10, 10, 11, 11, 11, 11/),'u10m_ter', &
+      "Vent Zonal 10m "//clnsurf(1),"m/s", (/ ('', i=1, 10) /)), &
+      ctrl_out((/ 10, 6, 10, 10, 10, 10, 11, 11, 11, 11/),'u10m_lic', &
+      "Vent Zonal 10m "//clnsurf(2),"m/s", (/ ('', i=1, 10) /)), &
+      ctrl_out((/ 10, 6, 10, 10, 10, 10, 11, 11, 11, 11/),'u10m_oce', &
+      "Vent Zonal 10m "//clnsurf(3),"m/s", (/ ('', i=1, 10) /)), &
+      ctrl_out((/ 10, 6, 10, 10, 10, 10, 11, 11, 11, 11/),'u10m_sic', &
+      "Vent Zonal 10m "//clnsurf(4),"m/s", (/ ('', i=1, 10) /)) /)
 
   TYPE(ctrl_out), SAVE, DIMENSION(4) :: o_v10m_srf     = (/ &
-      ctrl_out((/ 10, 6, 10, 10, 10, 10, 11, 11, 11 /),'v10m_ter', &
-      "Vent meredien 10m "//clnsurf(1),"m/s", (/ ('', i=1, 9) /)), &
-      ctrl_out((/ 10, 6, 10, 10, 10, 10, 11, 11, 11 /),'v10m_lic', &
-      "Vent meredien 10m "//clnsurf(2),"m/s", (/ ('', i=1, 9) /)), &
-      ctrl_out((/ 10, 6, 10, 10, 10, 10, 11, 11, 11 /),'v10m_oce', &
-      "Vent meredien 10m "//clnsurf(3),"m/s", (/ ('', i=1, 9) /)), &
-      ctrl_out((/ 10, 6, 10, 10, 10, 10, 11, 11, 11 /),'v10m_sic', &
-      "Vent meredien 10m "//clnsurf(4),"m/s", (/ ('', i=1, 9) /)) /)
-
-  TYPE(ctrl_out), SAVE :: o_qsol = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'qsol', 'Soil watter content', 'mm', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_ndayrain = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11 /), &
+      ctrl_out((/ 10, 6, 10, 10, 10, 10, 11, 11, 11, 11/),'v10m_ter', &
+      "Vent meredien 10m "//clnsurf(1),"m/s", (/ ('', i=1, 10) /)), &
+      ctrl_out((/ 10, 6, 10, 10, 10, 10, 11, 11, 11, 11/),'v10m_lic', &
+      "Vent meredien 10m "//clnsurf(2),"m/s", (/ ('', i=1, 10) /)), &
+      ctrl_out((/ 10, 6, 10, 10, 10, 10, 11, 11, 11, 11/),'v10m_oce', &
+      "Vent meredien 10m "//clnsurf(3),"m/s", (/ ('', i=1, 10) /)), &
+      ctrl_out((/ 10, 6, 10, 10, 10, 10, 11, 11, 11, 11/),'v10m_sic', &
+      "Vent meredien 10m "//clnsurf(4),"m/s", (/ ('', i=1, 10) /)) /)
+
+  TYPE(ctrl_out), SAVE :: o_qsol = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'qsol', 'Soil watter content', 'mm', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_ndayrain = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
     'ndayrain', 'Number of dayrain(liq+sol)', '-', &
-      (/ "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)" /))
-  TYPE(ctrl_out), SAVE :: o_precip = ctrl_out((/ 1, 1, 1, 10, 5, 10, 11, 11, 11 /), &
-    'precip', 'Precip Totale liq+sol', 'kg/(s*m2)', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_plul = ctrl_out((/ 1, 1, 1, 10, 10, 10, 11, 11, 11 /), &
-    'plul', 'Large-scale Precip.', 'kg/(s*m2)', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_plun = ctrl_out((/ 1, 1, 1, 10, 10, 10, 11, 11, 11 /), &
-    'plun', 'Numerical Precip.', 'kg/(s*m2)', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_pluc = ctrl_out((/ 1, 1, 1, 10, 5, 10, 11, 11, 11 /), &
-    'pluc', 'Convective Precip.', 'kg/(s*m2)', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_snow = ctrl_out((/ 1, 1, 10, 10, 5, 10, 11, 11, 11 /), &
-    'snow', 'Snow fall', 'kg/(s*m2)', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_evap = ctrl_out((/ 1, 1, 10, 10, 10, 10, 11, 11, 11 /), &
-    'evap', 'Evaporat', 'kg/(s*m2)', (/ ('', i=1, 9) /))
-
-  TYPE(ctrl_out), SAVE :: o_sens_prec_liq_oce = ctrl_out((/ 5, 5, 10, 10, 5, 10, 11, 11, 11 /), &
-    'sens_rain_oce', 'Sensible heat flux of liquid prec. over ocean', 'W/m2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_sens_prec_liq_sic = ctrl_out((/ 5, 5, 10, 10, 5, 10, 11, 11, 11 /), &
-    'sens_rain_sic', 'Sensible heat flux of liquid prec. over seaice', 'W/m2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_sens_prec_sol_oce = ctrl_out((/ 5, 5, 10, 10, 5, 10, 11, 11, 11 /), &
-    'sens_snow_oce', 'Sensible heat flux of solid prec. over ocean', 'W/m2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_sens_prec_sol_sic = ctrl_out((/ 5, 5, 10, 10, 5, 10, 11, 11, 11 /), &
-    'sens_snow_sic', 'Sensible heat flux of solid prec. over seaice', 'W/m2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_lat_prec_liq_oce = ctrl_out((/ 5, 5, 10, 10, 5, 10, 11, 11, 11 /), &
-    'lat_rain_oce', 'Latent heat flux of liquid prec. over ocean', 'W/m2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_lat_prec_liq_sic = ctrl_out((/ 5, 5, 10, 10, 5, 10, 11, 11, 11 /), &
-    'lat_rain_sic', 'Latent heat flux of liquid prec. over seaice', 'W/m2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_lat_prec_sol_oce = ctrl_out((/ 5, 5, 10, 10, 5, 10, 11, 11, 11 /), &
-    'lat_snow_oce', 'Latent heat flux of solid prec. over ocean', 'W/m2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_lat_prec_sol_sic = ctrl_out((/ 5, 5, 10, 10, 5, 10, 11, 11, 11 /), &
-    'lat_snow_sic', 'Latent heat flux of solid prec. over seaice', 'W/m2', (/ ('', i=1, 9) /))
+      (/ "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)" /))
+  TYPE(ctrl_out), SAVE :: o_precip = ctrl_out((/ 1, 1, 1, 10, 5, 10, 11, 11, 11, 11/), &
+    'precip', 'Precip Totale liq+sol', 'kg/(s*m2)', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_plul = ctrl_out((/ 1, 1, 1, 10, 10, 10, 11, 11, 11, 11/), &
+    'plul', 'Large-scale Precip.', 'kg/(s*m2)', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_plun = ctrl_out((/ 1, 1, 1, 10, 10, 10, 11, 11, 11, 11/), &
+    'plun', 'Numerical Precip.', 'kg/(s*m2)', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_pluc = ctrl_out((/ 1, 1, 1, 10, 5, 10, 11, 11, 11, 11/), &
+    'pluc', 'Convective Precip.', 'kg/(s*m2)', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_snow = ctrl_out((/ 1, 1, 10, 10, 5, 10, 11, 11, 11, 11/), &
+    'snow', 'Snow fall', 'kg/(s*m2)', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_evap = ctrl_out((/ 1, 1, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'evap', 'Evaporat', 'kg/(s*m2)', (/ ('', i=1, 10) /))
+
+  TYPE(ctrl_out), SAVE :: o_sens_prec_liq_oce = ctrl_out((/ 5, 5, 10, 10, 5, 10, 11, 11, 11, 11/), &
+    'sens_rain_oce', 'Sensible heat flux of liquid prec. over ocean', 'W/m2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_sens_prec_liq_sic = ctrl_out((/ 5, 5, 10, 10, 5, 10, 11, 11, 11, 11/), &
+    'sens_rain_sic', 'Sensible heat flux of liquid prec. over seaice', 'W/m2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_sens_prec_sol_oce = ctrl_out((/ 5, 5, 10, 10, 5, 10, 11, 11, 11, 11/), &
+    'sens_snow_oce', 'Sensible heat flux of solid prec. over ocean', 'W/m2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_sens_prec_sol_sic = ctrl_out((/ 5, 5, 10, 10, 5, 10, 11, 11, 11, 11/), &
+    'sens_snow_sic', 'Sensible heat flux of solid prec. over seaice', 'W/m2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_lat_prec_liq_oce = ctrl_out((/ 5, 5, 10, 10, 5, 10, 11, 11, 11, 11/), &
+    'lat_rain_oce', 'Latent heat flux of liquid prec. over ocean', 'W/m2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_lat_prec_liq_sic = ctrl_out((/ 5, 5, 10, 10, 5, 10, 11, 11, 11, 11/), &
+    'lat_rain_sic', 'Latent heat flux of liquid prec. over seaice', 'W/m2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_lat_prec_sol_oce = ctrl_out((/ 5, 5, 10, 10, 5, 10, 11, 11, 11, 11/), &
+    'lat_snow_oce', 'Latent heat flux of solid prec. over ocean', 'W/m2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_lat_prec_sol_sic = ctrl_out((/ 5, 5, 10, 10, 5, 10, 11, 11, 11, 11/), &
+    'lat_snow_sic', 'Latent heat flux of solid prec. over seaice', 'W/m2', (/ ('', i=1, 10) /))
 
 
   TYPE(ctrl_out), SAVE, DIMENSION(4) :: o_evap_srf     = (/ &
-      ctrl_out((/ 1, 6, 10, 10, 10, 10, 11, 11, 11 /),'evap_ter', &
-      "evaporation at surface "//clnsurf(1),"kg/(s*m2)", (/ ('', i=1, 9) /)), &
-      ctrl_out((/ 1, 6, 10, 10, 10, 10, 11, 11, 11 /),'evap_lic', &
-      "evaporation at surface "//clnsurf(2),"kg/(s*m2)", (/ ('', i=1, 9) /)), &
-      ctrl_out((/ 1, 6, 10, 10, 10, 10, 11, 11, 11 /),'evap_oce', &
-      "evaporation at surface "//clnsurf(3),"kg/(s*m2)", (/ ('', i=1, 9) /)), &
-      ctrl_out((/ 1, 6, 10, 10, 10, 10, 11, 11, 11 /),'evap_sic', &
-      "evaporation at surface "//clnsurf(4),"kg/(s*m2)", (/ ('', i=1, 9) /)) /)
-
-  TYPE(ctrl_out), SAVE :: o_msnow = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'msnow', 'Surface snow amount', 'kg/m2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_fsnow = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'fsnow', 'Surface snow area fraction', '-', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_tops = ctrl_out((/ 1, 1, 10, 10, 10, 10, 11, 11, 11 /), &
-    'tops', 'Solar rad. at TOA', 'W/m2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_tops0 = ctrl_out((/ 1, 5, 10, 10, 10, 10, 11, 11, 11 /), &
-    'tops0', 'CS Solar rad. at TOA', 'W/m2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_topl = ctrl_out((/ 1, 1, 10, 5, 10, 10, 11, 11, 11 /), &
-    'topl', 'IR rad. at TOA', 'W/m2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_topl0 = ctrl_out((/ 1, 5, 10, 10, 10, 10, 11, 11, 11 /), &
-    'topl0', 'IR rad. at TOA', 'W/m2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_SWupTOA = ctrl_out((/ 1, 4, 10, 10, 10, 10, 11, 11, 11 /), &
-    'SWupTOA', 'SWup at TOA', 'W/m2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_SWupTOAclr = ctrl_out((/ 1, 4, 10, 10, 10, 10, 11, 11, 11 /), &
-    'SWupTOAclr', 'SWup clear sky at TOA', 'W/m2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_SWdnTOA = ctrl_out((/ 1, 4, 10, 10, 10, 10, 11, 11, 11 /), &
-    'SWdnTOA', 'SWdn at TOA', 'W/m2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_SWdnTOAclr = ctrl_out((/ 1, 4, 10, 10, 10, 10, 11, 11, 11 /), &
-    'SWdnTOAclr', 'SWdn clear sky at TOA', 'W/m2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_nettop = ctrl_out((/ 1, 4, 10, 10, 10, 10, 11, 11, 11 /), &
-    'nettop', 'Net dn radiatif flux at TOA', 'W/m2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_SWup200 = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'SWup200', 'SWup at 200mb', 'W/m2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_SWup200clr = ctrl_out((/ 10, 1, 10, 10, 10, 10, 11, 11, 11 /), &
-    'SWup200clr', 'SWup clear sky at 200mb', 'W/m2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_SWdn200 = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'SWdn200', 'SWdn at 200mb', 'W/m2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_SWdn200clr = ctrl_out((/ 10, 1, 10, 10, 10, 10, 11, 11, 11 /), &
-    'SWdn200clr', 'SWdn clear sky at 200mb', 'W/m2', (/ ('', i=1, 9) /))
+      ctrl_out((/ 1, 6, 10, 10, 10, 10, 11, 11, 11, 11/),'evap_ter', &
+      "evaporation at surface "//clnsurf(1),"kg/(s*m2)", (/ ('', i=1, 10) /)), &
+      ctrl_out((/ 1, 6, 10, 10, 10, 10, 11, 11, 11, 11/),'evap_lic', &
+      "evaporation at surface "//clnsurf(2),"kg/(s*m2)", (/ ('', i=1, 10) /)), &
+      ctrl_out((/ 1, 6, 10, 10, 10, 10, 11, 11, 11, 11/),'evap_oce', &
+      "evaporation at surface "//clnsurf(3),"kg/(s*m2)", (/ ('', i=1, 10) /)), &
+      ctrl_out((/ 1, 6, 10, 10, 10, 10, 11, 11, 11, 11/),'evap_sic', &
+      "evaporation at surface "//clnsurf(4),"kg/(s*m2)", (/ ('', i=1, 10) /)) /)
+
+  TYPE(ctrl_out), SAVE :: o_msnow = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'msnow', 'Surface snow amount', 'kg/m2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_fsnow = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'fsnow', 'Surface snow area fraction', '-', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_tops = ctrl_out((/ 1, 1, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'tops', 'Solar rad. at TOA', 'W/m2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_tops0 = ctrl_out((/ 1, 5, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'tops0', 'CS Solar rad. at TOA', 'W/m2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_topl = ctrl_out((/ 1, 1, 10, 5, 10, 10, 11, 11, 11, 11/), &
+    'topl', 'IR rad. at TOA', 'W/m2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_topl0 = ctrl_out((/ 1, 5, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'topl0', 'IR rad. at TOA', 'W/m2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_SWupTOA = ctrl_out((/ 1, 4, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'SWupTOA', 'SWup at TOA', 'W/m2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_SWupTOAclr = ctrl_out((/ 1, 4, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'SWupTOAclr', 'SWup clear sky at TOA', 'W/m2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_SWdnTOA = ctrl_out((/ 1, 4, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'SWdnTOA', 'SWdn at TOA', 'W/m2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_SWdnTOAclr = ctrl_out((/ 1, 4, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'SWdnTOAclr', 'SWdn clear sky at TOA', 'W/m2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_nettop = ctrl_out((/ 1, 4, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'nettop', 'Net dn radiatif flux at TOA', 'W/m2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_SWup200 = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'SWup200', 'SWup at 200mb', 'W/m2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_SWup200clr = ctrl_out((/ 10, 1, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'SWup200clr', 'SWup clear sky at 200mb', 'W/m2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_SWdn200 = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'SWdn200', 'SWdn at 200mb', 'W/m2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_SWdn200clr = ctrl_out((/ 10, 1, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'SWdn200clr', 'SWdn clear sky at 200mb', 'W/m2', (/ ('', i=1, 10) /))
 
   ! arajouter
-  !  type(ctrl_out),save :: o_LWupTOA     = ctrl_out((/ 1, 4, 10, 10, 10, 10, 11, 11, 11 /),'LWupTOA', &
-  !    (/ ('', i=1, 9) /))
-  !  type(ctrl_out),save :: o_LWupTOAclr  = ctrl_out((/ 1, 4, 10, 10, 10, 10, 11, 11, 11 /),'LWupTOAclr', &
-  !    (/ ('', i=1, 9) /))
-  !  type(ctrl_out),save :: o_LWdnTOA     = ctrl_out((/ 1, 4, 10, 10, 10, 10, 11, 11, 11 /),'LWdnTOA', &
-  !    (/ ('', i=1, 9) /))
-  !  type(ctrl_out),save :: o_LWdnTOAclr  = ctrl_out((/ 1, 4, 10, 10, 10, 10, 11, 11, 11 /),'LWdnTOAclr', &
-  !    (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_LWup200 = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'LWup200', 'LWup at 200mb', 'W/m2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_LWup200clr = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'LWup200clr', 'LWup clear sky at 200mb', 'W/m2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_LWdn200 = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'LWdn200', 'LWdn at 200mb', 'W/m2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_LWdn200clr = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'LWdn200clr', 'LWdn clear sky at 200mb', 'W/m2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_sols = ctrl_out((/ 1, 1, 10, 10, 10, 10, 11, 11, 11 /), &
-    'sols', 'Solar rad. at surf.', 'W/m2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_sols0 = ctrl_out((/ 1, 5, 10, 10, 10, 10, 11, 11, 11 /), &
-    'sols0', 'Solar rad. at surf.', 'W/m2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_soll = ctrl_out((/ 1, 1, 10, 10, 10, 10, 11, 11, 11 /), &
-    'soll', 'IR rad. at surface', 'W/m2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_soll0 = ctrl_out((/ 1, 5, 10, 10, 10, 10, 11, 11, 11 /), &
-    'soll0', 'IR rad. at surface', 'W/m2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_radsol = ctrl_out((/ 1, 7, 10, 10, 10, 10, 11, 11, 11 /), &
-    'radsol', 'Rayonnement au sol', 'W/m2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_SWupSFC = ctrl_out((/ 1, 4, 10, 10, 5, 10, 11, 11, 11 /), &
-    'SWupSFC', 'SWup at surface', 'W/m2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_SWupSFCclr = ctrl_out((/ 1, 4, 10, 10, 5, 10, 11, 11, 11 /), &
-    'SWupSFCclr', 'SWup clear sky at surface', 'W/m2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_SWdnSFC = ctrl_out((/ 1, 1, 10, 10, 5, 10, 11, 11, 11 /), &
-    'SWdnSFC', 'SWdn at surface', 'W/m2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_SWdnSFCclr = ctrl_out((/ 1, 4, 10, 10, 5, 10, 11, 11, 11 /), &
-    'SWdnSFCclr', 'SWdn clear sky at surface', 'W/m2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_LWupSFC = ctrl_out((/ 1, 4, 10, 10, 5, 10, 11, 11, 11 /), &
-    'LWupSFC', 'Upwd. IR rad. at surface', 'W/m2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_LWupSFCclr = ctrl_out((/ 1, 4, 10, 10, 5, 10, 11, 11, 11 /), &
-    'LWupSFCclr', 'CS Upwd. IR rad. at surface', 'W/m2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_LWdnSFC = ctrl_out((/ 1, 4, 10, 10, 5, 10, 11, 11, 11 /), &
-    'LWdnSFC', 'Down. IR rad. at surface', 'W/m2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_LWdnSFCclr = ctrl_out((/ 1, 4, 10, 10, 5, 10, 11, 11, 11 /), &
-    'LWdnSFCclr', 'Down. CS IR rad. at surface', 'W/m2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_bils = ctrl_out((/ 1, 2, 10, 5, 10, 10, 11, 11, 11 /), &
-    'bils', 'Surf. total heat flux', 'W/m2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_bils_tke = ctrl_out((/ 1, 2, 10, 5, 10, 10, 11, 11, 11 /), &
-    'bils_tke', 'Surf. total heat flux', 'W/m2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_bils_diss = ctrl_out((/ 1, 2, 10, 5, 10, 10, 11, 11, 11 /), &
-    'bils_diss', 'Surf. total heat flux', 'W/m2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_bils_ec = ctrl_out((/ 1, 2, 10, 5, 10, 10, 11, 11, 11 /), &
-    'bils_ec', 'Surf. total heat flux correction', 'W/m2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_bils_ech = ctrl_out((/ 1, 2, 10, 5, 10, 10, 11, 11, 11 /), &
-    'bils_ech', 'Surf. total heat flux correction', 'W/m2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_bils_kinetic = ctrl_out((/ 1, 2, 10, 5, 10, 10, 11, 11, 11 /), &
-    'bils_kinetic', 'Surf. total heat flux', 'W/m2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_bils_enthalp = ctrl_out((/ 1, 2, 10, 5, 10, 10, 11, 11, 11 /), &
-    'bils_enthalp', 'Surf. total heat flux', 'W/m2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_bils_latent = ctrl_out((/ 1, 2, 10, 5, 10, 10, 11, 11, 11 /), &
-    'bils_latent', 'Surf. total heat flux', 'W/m2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_sens = ctrl_out((/ 1, 1, 10, 10, 5, 10, 11, 11, 11 /), &
-    'sens', 'Sensible heat flux', 'W/m2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_fder = ctrl_out((/ 1, 2, 10, 10, 10, 10, 11, 11, 11 /), &
-    'fder', 'Heat flux derivation', 'W/m2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_ffonte = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'ffonte', 'Thermal flux for snow melting', 'W/m2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_fqcalving = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'fqcalving', 'Ice Calving', 'kg/m2/s', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_fqfonte = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'fqfonte', 'Land ice melt', 'kg/m2/s', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_runofflic = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'runofflic', 'Land ice melt to ocean', 'kg/m2/s', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_taux = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'taux', 'Zonal wind stress', 'Pa', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_tauy = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'tauy', 'Meridional wind stress', 'Pa', (/ ('', i=1, 9) /))
+  !  type(ctrl_out),save :: o_LWupTOA     = ctrl_out((/ 1, 4, 10, 10, 10, 10, 11, 11, 11, 11/),'LWupTOA', &
+  !    (/ ('', i=1, 10) /))
+  !  type(ctrl_out),save :: o_LWupTOAclr  = ctrl_out((/ 1, 4, 10, 10, 10, 10, 11, 11, 11, 11/),'LWupTOAclr', &
+  !    (/ ('', i=1, 10) /))
+  !  type(ctrl_out),save :: o_LWdnTOA     = ctrl_out((/ 1, 4, 10, 10, 10, 10, 11, 11, 11, 11/),'LWdnTOA', &
+  !    (/ ('', i=1, 10) /))
+  !  type(ctrl_out),save :: o_LWdnTOAclr  = ctrl_out((/ 1, 4, 10, 10, 10, 10, 11, 11, 11, 11/),'LWdnTOAclr', &
+  !    (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_LWup200 = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'LWup200', 'LWup at 200mb', 'W/m2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_LWup200clr = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'LWup200clr', 'LWup clear sky at 200mb', 'W/m2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_LWdn200 = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'LWdn200', 'LWdn at 200mb', 'W/m2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_LWdn200clr = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'LWdn200clr', 'LWdn clear sky at 200mb', 'W/m2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_sols = ctrl_out((/ 1, 1, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'sols', 'Solar rad. at surf.', 'W/m2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_sols0 = ctrl_out((/ 1, 5, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'sols0', 'Solar rad. at surf.', 'W/m2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_soll = ctrl_out((/ 1, 1, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'soll', 'IR rad. at surface', 'W/m2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_soll0 = ctrl_out((/ 1, 5, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'soll0', 'IR rad. at surface', 'W/m2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_radsol = ctrl_out((/ 1, 7, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'radsol', 'Rayonnement au sol', 'W/m2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_SWupSFC = ctrl_out((/ 1, 4, 10, 10, 5, 10, 11, 11, 11, 11/), &
+    'SWupSFC', 'SWup at surface', 'W/m2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_SWupSFCclr = ctrl_out((/ 1, 4, 10, 10, 5, 10, 11, 11, 11, 11/), &
+    'SWupSFCclr', 'SWup clear sky at surface', 'W/m2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_SWdnSFC = ctrl_out((/ 1, 1, 10, 10, 5, 10, 11, 11, 11, 11/), &
+    'SWdnSFC', 'SWdn at surface', 'W/m2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_SWdnSFCclr = ctrl_out((/ 1, 4, 10, 10, 5, 10, 11, 11, 11, 11/), &
+    'SWdnSFCclr', 'SWdn clear sky at surface', 'W/m2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_LWupSFC = ctrl_out((/ 1, 4, 10, 10, 5, 10, 11, 11, 11, 11/), &
+    'LWupSFC', 'Upwd. IR rad. at surface', 'W/m2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_LWupSFCclr = ctrl_out((/ 1, 4, 10, 10, 5, 10, 11, 11, 11, 11/), &
+    'LWupSFCclr', 'CS Upwd. IR rad. at surface', 'W/m2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_LWdnSFC = ctrl_out((/ 1, 4, 10, 10, 5, 10, 11, 11, 11, 11/), &
+    'LWdnSFC', 'Down. IR rad. at surface', 'W/m2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_LWdnSFCclr = ctrl_out((/ 1, 4, 10, 10, 5, 10, 11, 11, 11, 11/), &
+    'LWdnSFCclr', 'Down. CS IR rad. at surface', 'W/m2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_bils = ctrl_out((/ 1, 2, 10, 5, 10, 10, 11, 11, 11, 11/), &
+    'bils', 'Surf. total heat flux', 'W/m2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_bils_tke = ctrl_out((/ 1, 2, 10, 5, 10, 10, 11, 11, 11, 11/), &
+    'bils_tke', 'Surf. total heat flux', 'W/m2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_bils_diss = ctrl_out((/ 1, 2, 10, 5, 10, 10, 11, 11, 11, 11/), &
+    'bils_diss', 'Surf. total heat flux', 'W/m2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_bils_ec = ctrl_out((/ 1, 2, 10, 5, 10, 10, 11, 11, 11, 11/), &
+    'bils_ec', 'Surf. total heat flux correction', 'W/m2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_bils_ech = ctrl_out((/ 1, 2, 10, 5, 10, 10, 11, 11, 11, 11/), &
+    'bils_ech', 'Surf. total heat flux correction', 'W/m2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_bils_kinetic = ctrl_out((/ 1, 2, 10, 5, 10, 10, 11, 11, 11, 11/), &
+    'bils_kinetic', 'Surf. total heat flux', 'W/m2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_bils_enthalp = ctrl_out((/ 1, 2, 10, 5, 10, 10, 11, 11, 11, 11/), &
+    'bils_enthalp', 'Surf. total heat flux', 'W/m2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_bils_latent = ctrl_out((/ 1, 2, 10, 5, 10, 10, 11, 11, 11, 11/), &
+    'bils_latent', 'Surf. total heat flux', 'W/m2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_sens = ctrl_out((/ 1, 1, 10, 10, 5, 10, 11, 11, 11, 11/), &
+    'sens', 'Sensible heat flux', 'W/m2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_fder = ctrl_out((/ 1, 2, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'fder', 'Heat flux derivation', 'W/m2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_ffonte = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'ffonte', 'Thermal flux for snow melting', 'W/m2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_fqcalving = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'fqcalving', 'Ice Calving', 'kg/m2/s', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_fqfonte = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'fqfonte', 'Land ice melt', 'kg/m2/s', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_runofflic = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'runofflic', 'Land ice melt to ocean', 'kg/m2/s', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_taux = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'taux', 'Zonal wind stress', 'Pa', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_tauy = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'tauy', 'Meridional wind stress', 'Pa', (/ ('', i=1, 10) /))
 
   TYPE(ctrl_out), SAVE, DIMENSION(4) :: o_taux_srf = (/           &
-      ctrl_out((/ 1, 6, 10, 10, 10, 10, 11, 11, 11 /),'taux_ter',             &
-      "Zonal wind stress"//clnsurf(1), "Pa", (/ ('', i=1, 9) /)), &
-      ctrl_out((/ 1, 6, 10, 10, 10, 10, 11, 11, 11 /),'taux_lic',             &
-      "Zonal wind stress"//clnsurf(2), "Pa", (/ ('', i=1, 9) /)), &
-      ctrl_out((/ 1, 6, 10, 10, 10, 10, 11, 11, 11 /),'taux_oce',             &
-      "Zonal wind stress"//clnsurf(3), "Pa", (/ ('', i=1, 9) /)), &
-      ctrl_out((/ 1, 6, 10, 10, 10, 10, 11, 11, 11 /),'taux_sic',             &
-      "Zonal wind stress"//clnsurf(4), "Pa", (/ ('', i=1, 9) /)) /)
+      ctrl_out((/ 1, 6, 10, 10, 10, 10, 11, 11, 11, 11/),'taux_ter',             &
+      "Zonal wind stress"//clnsurf(1), "Pa", (/ ('', i=1, 10) /)), &
+      ctrl_out((/ 1, 6, 10, 10, 10, 10, 11, 11, 11, 11/),'taux_lic',             &
+      "Zonal wind stress"//clnsurf(2), "Pa", (/ ('', i=1, 10) /)), &
+      ctrl_out((/ 1, 6, 10, 10, 10, 10, 11, 11, 11, 11/),'taux_oce',             &
+      "Zonal wind stress"//clnsurf(3), "Pa", (/ ('', i=1, 10) /)), &
+      ctrl_out((/ 1, 6, 10, 10, 10, 10, 11, 11, 11, 11/),'taux_sic',             &
+      "Zonal wind stress"//clnsurf(4), "Pa", (/ ('', i=1, 10) /)) /)
 
   TYPE(ctrl_out), SAVE, DIMENSION(4) :: o_tauy_srf     = (/             &
-      ctrl_out((/ 1, 6, 10, 10, 10, 10, 11, 11, 11 /),'tauy_ter',                   &
-      "Meridional wind stress "//clnsurf(1),"Pa", (/ ('', i=1, 9) /)),  &
-      ctrl_out((/ 1, 6, 10, 10, 10, 10, 11, 11, 11 /),'tauy_lic',                   &
-      "Meridional wind stress "//clnsurf(2),"Pa", (/ ('', i=1, 9) /)),  &
-      ctrl_out((/ 1, 6, 10, 10, 10, 10, 11, 11, 11 /),'tauy_oce',                   &
-      "Meridional wind stress "//clnsurf(3),"Pa", (/ ('', i=1, 9) /)),  &
-      ctrl_out((/ 1, 6, 10, 10, 10, 10, 11, 11, 11 /),'tauy_sic',                   &
-      "Meridional wind stress "//clnsurf(4),"Pa", (/ ('', i=1, 9) /)) /)
+      ctrl_out((/ 1, 6, 10, 10, 10, 10, 11, 11, 11, 11/),'tauy_ter',                   &
+      "Meridional wind stress "//clnsurf(1),"Pa", (/ ('', i=1, 10) /)),  &
+      ctrl_out((/ 1, 6, 10, 10, 10, 10, 11, 11, 11, 11/),'tauy_lic',                   &
+      "Meridional wind stress "//clnsurf(2),"Pa", (/ ('', i=1, 10) /)),  &
+      ctrl_out((/ 1, 6, 10, 10, 10, 10, 11, 11, 11, 11/),'tauy_oce',                   &
+      "Meridional wind stress "//clnsurf(3),"Pa", (/ ('', i=1, 10) /)),  &
+      ctrl_out((/ 1, 6, 10, 10, 10, 10, 11, 11, 11, 11/),'tauy_sic',                   &
+      "Meridional wind stress "//clnsurf(4),"Pa", (/ ('', i=1, 10) /)) /)
 
   TYPE(ctrl_out), SAVE, DIMENSION(4) :: o_pourc_srf    = (/ &
-      ctrl_out((/ 1, 7, 10, 10, 10, 10, 11, 11, 11 /),'pourc_ter',      &
-      "% "//clnsurf(1),"%", (/ ('', i=1, 9) /)),            &
-      ctrl_out((/ 1, 7, 10, 10, 10, 10, 11, 11, 11 /),'pourc_lic',      &
-      "% "//clnsurf(2),"%", (/ ('', i=1, 9) /)),            &
-      ctrl_out((/ 1, 7, 10, 10, 10, 10, 11, 11, 11 /),'pourc_oce',      &
-      "% "//clnsurf(3),"%", (/ ('', i=1, 9) /)),            &
-      ctrl_out((/ 1, 7, 10, 10, 10, 10, 11, 11, 11 /),'pourc_sic',      &
-      "% "//clnsurf(4),"%", (/ ('', i=1, 9) /)) /)
+      ctrl_out((/ 1, 7, 10, 10, 10, 10, 11, 11, 11, 11/),'pourc_ter',      &
+      "% "//clnsurf(1),"%", (/ ('', i=1, 10) /)),            &
+      ctrl_out((/ 1, 7, 10, 10, 10, 10, 11, 11, 11, 11/),'pourc_lic',      &
+      "% "//clnsurf(2),"%", (/ ('', i=1, 10) /)),            &
+      ctrl_out((/ 1, 7, 10, 10, 10, 10, 11, 11, 11, 11/),'pourc_oce',      &
+      "% "//clnsurf(3),"%", (/ ('', i=1, 10) /)),            &
+      ctrl_out((/ 1, 7, 10, 10, 10, 10, 11, 11, 11, 11/),'pourc_sic',      &
+      "% "//clnsurf(4),"%", (/ ('', i=1, 10) /)) /)
 
   TYPE(ctrl_out), SAVE, DIMENSION(4) :: o_fract_srf    = (/ &
-      ctrl_out((/ 1, 6, 10, 10, 10, 10, 11, 11, 11 /),'fract_ter',      &
-      "Fraction "//clnsurf(1),"1", (/ ('', i=1, 9) /)),     &
-      ctrl_out((/ 1, 6, 10, 10, 10, 10, 11, 11, 11 /),'fract_lic',      &
-      "Fraction "//clnsurf(2),"1", (/ ('', i=1, 9) /)),     &
-      ctrl_out((/ 1, 6, 10, 10, 10, 10, 11, 11, 11 /),'fract_oce',      &
-      "Fraction "//clnsurf(3),"1", (/ ('', i=1, 9) /)),     &
-      ctrl_out((/ 1, 6, 10, 10, 10, 10, 11, 11, 11 /),'fract_sic',      &
-      "Fraction "//clnsurf(4),"1", (/ ('', i=1, 9) /)) /)
+      ctrl_out((/ 1, 6, 10, 10, 10, 10, 11, 11, 11, 11/),'fract_ter',      &
+      "Fraction "//clnsurf(1),"1", (/ ('', i=1, 10) /)),     &
+      ctrl_out((/ 1, 6, 10, 10, 10, 10, 11, 11, 11, 11/),'fract_lic',      &
+      "Fraction "//clnsurf(2),"1", (/ ('', i=1, 10) /)),     &
+      ctrl_out((/ 1, 6, 10, 10, 10, 10, 11, 11, 11, 11/),'fract_oce',      &
+      "Fraction "//clnsurf(3),"1", (/ ('', i=1, 10) /)),     &
+      ctrl_out((/ 1, 6, 10, 10, 10, 10, 11, 11, 11, 11/),'fract_sic',      &
+      "Fraction "//clnsurf(4),"1", (/ ('', i=1, 10) /)) /)
 
   TYPE(ctrl_out), SAVE, DIMENSION(4) :: o_tsol_srf     = (/ &
-      ctrl_out((/ 1, 6, 10, 10, 10, 10, 11, 11, 11 /),'tsol_ter',       &
-      "Temperature "//clnsurf(1),"K", (/ ('', i=1, 9) /)),  &
-      ctrl_out((/ 1, 6, 10, 10, 10, 10, 11, 11, 11 /),'tsol_lic',       &
-      "Temperature "//clnsurf(2),"K", (/ ('', i=1, 9) /)),  &
-      ctrl_out((/ 1, 6, 10, 10, 10, 10, 11, 11, 11 /),'tsol_oce',       &
-      "Temperature "//clnsurf(3),"K", (/ ('', i=1, 9) /)),  &
-      ctrl_out((/ 1, 6, 10, 10, 10, 10, 11, 11, 11 /),'tsol_sic',       &
-      "Temperature "//clnsurf(4),"K", (/ ('', i=1, 9) /)) /)
+      ctrl_out((/ 1, 6, 10, 10, 10, 10, 11, 11, 11, 11/),'tsol_ter',       &
+      "Temperature "//clnsurf(1),"K", (/ ('', i=1, 10) /)),  &
+      ctrl_out((/ 1, 6, 10, 10, 10, 10, 11, 11, 11, 11/),'tsol_lic',       &
+      "Temperature "//clnsurf(2),"K", (/ ('', i=1, 10) /)),  &
+      ctrl_out((/ 1, 6, 10, 10, 10, 10, 11, 11, 11, 11/),'tsol_oce',       &
+      "Temperature "//clnsurf(3),"K", (/ ('', i=1, 10) /)),  &
+      ctrl_out((/ 1, 6, 10, 10, 10, 10, 11, 11, 11, 11/),'tsol_sic',       &
+      "Temperature "//clnsurf(4),"K", (/ ('', i=1, 10) /)) /)
 
   TYPE(ctrl_out), SAVE, DIMENSION(4) :: o_evappot_srf  = (/ &
-      ctrl_out((/ 1, 6, 10, 10, 10, 10, 11, 11, 11 /),'evappot_ter',    &
-      "Temperature"//clnsurf(1),"K", (/ ('', i=1, 9) /)),   &
-      ctrl_out((/ 4, 6, 10, 10, 10, 10, 11, 11, 11 /),'evappot_lic',    &
-      "Temperature"//clnsurf(2),"K", (/ ('', i=1, 9) /)),   &
-      ctrl_out((/ 4, 6, 10, 10, 10, 10, 11, 11, 11 /),'evappot_oce',    &
-      "Temperature"//clnsurf(3),"K", (/ ('', i=1, 9) /)),   &
-      ctrl_out((/ 4, 6, 10, 10, 10, 10, 11, 11, 11 /),'evappot_sic',    &
-      "Temperature"//clnsurf(4),"K", (/ ('', i=1, 9) /)) /)
+      ctrl_out((/ 1, 6, 10, 10, 10, 10, 11, 11, 11, 11/),'evappot_ter',    &
+      "Temperature"//clnsurf(1),"K", (/ ('', i=1, 10) /)),   &
+      ctrl_out((/ 4, 6, 10, 10, 10, 10, 11, 11, 11, 11/),'evappot_lic',    &
+      "Temperature"//clnsurf(2),"K", (/ ('', i=1, 10) /)),   &
+      ctrl_out((/ 4, 6, 10, 10, 10, 10, 11, 11, 11, 11/),'evappot_oce',    &
+      "Temperature"//clnsurf(3),"K", (/ ('', i=1, 10) /)),   &
+      ctrl_out((/ 4, 6, 10, 10, 10, 10, 11, 11, 11, 11/),'evappot_sic',    &
+      "Temperature"//clnsurf(4),"K", (/ ('', i=1, 10) /)) /)
 
   TYPE(ctrl_out), SAVE, DIMENSION(4) :: o_sens_srf     = (/          &
-      ctrl_out((/ 1, 6, 10, 7, 10, 10, 11, 11, 11 /),'sens_ter',                 &
-      "Sensible heat flux "//clnsurf(1),"W/m2", (/ ('', i=1, 9) /)), &
-      ctrl_out((/ 1, 6, 10, 7, 10, 10, 11, 11, 11 /),'sens_lic',                 &
-      "Sensible heat flux "//clnsurf(2),"W/m2", (/ ('', i=1, 9) /)), &
-      ctrl_out((/ 1, 6, 10, 7, 10, 10, 11, 11, 11 /),'sens_oce',                 &
-      "Sensible heat flux "//clnsurf(3),"W/m2", (/ ('', i=1, 9) /)), &
-      ctrl_out((/ 1, 6, 10, 7, 10, 10, 11, 11, 11 /),'sens_sic',                 &
-      "Sensible heat flux "//clnsurf(4),"W/m2", (/ ('', i=1, 9) /)) /)
+      ctrl_out((/ 1, 6, 10, 7, 10, 10, 11, 11, 11, 11/),'sens_ter',                 &
+      "Sensible heat flux "//clnsurf(1),"W/m2", (/ ('', i=1, 10) /)), &
+      ctrl_out((/ 1, 6, 10, 7, 10, 10, 11, 11, 11, 11/),'sens_lic',                 &
+      "Sensible heat flux "//clnsurf(2),"W/m2", (/ ('', i=1, 10) /)), &
+      ctrl_out((/ 1, 6, 10, 7, 10, 10, 11, 11, 11, 11/),'sens_oce',                 &
+      "Sensible heat flux "//clnsurf(3),"W/m2", (/ ('', i=1, 10) /)), &
+      ctrl_out((/ 1, 6, 10, 7, 10, 10, 11, 11, 11, 11/),'sens_sic',                 &
+      "Sensible heat flux "//clnsurf(4),"W/m2", (/ ('', i=1, 10) /)) /)
 
   TYPE(ctrl_out), SAVE, DIMENSION(4) :: o_lat_srf      = (/        &
-      ctrl_out((/ 1, 6, 10, 7, 10, 10, 11, 11, 11 /),'lat_ter',                &
-      "Latent heat flux "//clnsurf(1),"W/m2", (/ ('', i=1, 9) /)), &
-      ctrl_out((/ 1, 6, 10, 7, 10, 10, 11, 11, 11 /),'lat_lic',                &
-      "Latent heat flux "//clnsurf(2),"W/m2", (/ ('', i=1, 9) /)), &
-      ctrl_out((/ 1, 6, 10, 7, 10, 10, 11, 11, 11 /),'lat_oce',                &
-      "Latent heat flux "//clnsurf(3),"W/m2", (/ ('', i=1, 9) /)), &
-      ctrl_out((/ 1, 6, 10, 7, 10, 10, 11, 11, 11 /),'lat_sic',                &
-      "Latent heat flux "//clnsurf(4),"W/m2", (/ ('', i=1, 9) /)) /)
+      ctrl_out((/ 1, 6, 10, 7, 10, 10, 11, 11, 11, 11/),'lat_ter',                &
+      "Latent heat flux "//clnsurf(1),"W/m2", (/ ('', i=1, 10) /)), &
+      ctrl_out((/ 1, 6, 10, 7, 10, 10, 11, 11, 11, 11/),'lat_lic',                &
+      "Latent heat flux "//clnsurf(2),"W/m2", (/ ('', i=1, 10) /)), &
+      ctrl_out((/ 1, 6, 10, 7, 10, 10, 11, 11, 11, 11/),'lat_oce',                &
+      "Latent heat flux "//clnsurf(3),"W/m2", (/ ('', i=1, 10) /)), &
+      ctrl_out((/ 1, 6, 10, 7, 10, 10, 11, 11, 11, 11/),'lat_sic',                &
+      "Latent heat flux "//clnsurf(4),"W/m2", (/ ('', i=1, 10) /)) /)
 
   TYPE(ctrl_out), SAVE, DIMENSION(4) :: o_flw_srf      = (/ &
-      ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11 /),'flw_ter',       &
-      "LW "//clnsurf(1),"W/m2", (/ ('', i=1, 9) /)),        &
-      ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11 /),'flw_lic',       &
-      "LW "//clnsurf(2),"W/m2", (/ ('', i=1, 9) /)),        &
-      ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11 /),'flw_oce',       &
-      "LW "//clnsurf(3),"W/m2", (/ ('', i=1, 9) /)),        &
-      ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11 /),'flw_sic',       &
-      "LW "//clnsurf(4),"W/m2", (/ ('', i=1, 9) /)) /)
+      ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11, 11/),'flw_ter',       &
+      "LW "//clnsurf(1),"W/m2", (/ ('', i=1, 10) /)),        &
+      ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11, 11/),'flw_lic',       &
+      "LW "//clnsurf(2),"W/m2", (/ ('', i=1, 10) /)),        &
+      ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11, 11/),'flw_oce',       &
+      "LW "//clnsurf(3),"W/m2", (/ ('', i=1, 10) /)),        &
+      ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11, 11/),'flw_sic',       &
+      "LW "//clnsurf(4),"W/m2", (/ ('', i=1, 10) /)) /)
 
   TYPE(ctrl_out), SAVE, DIMENSION(4) :: o_fsw_srf      = (/ &
-      ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11 /),'fsw_ter',       &
-      "SW "//clnsurf(1),"W/m2", (/ ('', i=1, 9) /)),        &
-      ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11 /),'fsw_lic',       &
-      "SW "//clnsurf(2),"W/m2", (/ ('', i=1, 9) /)),        &
-      ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11 /),'fsw_oce',       &
-      "SW "//clnsurf(3),"W/m2", (/ ('', i=1, 9) /)),        &
-      ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11 /),'fsw_sic',       &
-      "SW "//clnsurf(4),"W/m2", (/ ('', i=1, 9) /)) /)
+      ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11, 11/),'fsw_ter',       &
+      "SW "//clnsurf(1),"W/m2", (/ ('', i=1, 10) /)),        &
+      ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11, 11/),'fsw_lic',       &
+      "SW "//clnsurf(2),"W/m2", (/ ('', i=1, 10) /)),        &
+      ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11, 11/),'fsw_oce',       &
+      "SW "//clnsurf(3),"W/m2", (/ ('', i=1, 10) /)),        &
+      ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11, 11/),'fsw_sic',       &
+      "SW "//clnsurf(4),"W/m2", (/ ('', i=1, 10) /)) /)
 
   TYPE(ctrl_out), SAVE, DIMENSION(4) :: o_wbils_srf    = (/ &
-      ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11 /),'wbils_ter',     &
-      "Bilan sol "//clnsurf(1),"W/m2", (/ ('', i=1, 9) /)), &
-      ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11 /),'wbils_lic',     &
-      "Bilan sol "//clnsurf(2),"W/m2", (/ ('', i=1, 9) /)), &
-      ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11 /),'wbils_oce',     &
-      "Bilan sol "//clnsurf(3),"W/m2", (/ ('', i=1, 9) /)), &
-      ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11 /),'wbils_sic',     &
-      "Bilan sol "//clnsurf(4),"W/m2", (/ ('', i=1, 9) /)) /)
+      ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11, 11/),'wbils_ter',     &
+      "Bilan sol "//clnsurf(1),"W/m2", (/ ('', i=1, 10) /)), &
+      ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11, 11/),'wbils_lic',     &
+      "Bilan sol "//clnsurf(2),"W/m2", (/ ('', i=1, 10) /)), &
+      ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11, 11/),'wbils_oce',     &
+      "Bilan sol "//clnsurf(3),"W/m2", (/ ('', i=1, 10) /)), &
+      ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11, 11/),'wbils_sic',     &
+      "Bilan sol "//clnsurf(4),"W/m2", (/ ('', i=1, 10) /)) /)
 
   TYPE(ctrl_out), SAVE, DIMENSION(4) :: o_wbilo_srf    = (/      &
-      ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11 /),'wbilo_ter',          &
-      "Bilan eau "//clnsurf(1),"kg/(m2*s)", (/ ('', i=1, 9) /)), &
-      ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11 /),'wbilo_lic',          &
-      "Bilan eau "//clnsurf(2),"kg/(m2*s)", (/ ('', i=1, 9) /)), &
-      ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11 /),'wbilo_oce',          &
-      "Bilan eau "//clnsurf(3),"kg/(m2*s)", (/ ('', i=1, 9) /)), &
-      ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11 /),'wbilo_sic',          &
-      "Bilan eau "//clnsurf(4),"kg/(m2*s)", (/ ('', i=1, 9) /)) /)
+      ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11, 11/),'wbilo_ter',          &
+      "Bilan eau "//clnsurf(1),"kg/(m2*s)", (/ ('', i=1, 10) /)), &
+      ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11, 11/),'wbilo_lic',          &
+      "Bilan eau "//clnsurf(2),"kg/(m2*s)", (/ ('', i=1, 10) /)), &
+      ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11, 11/),'wbilo_oce',          &
+      "Bilan eau "//clnsurf(3),"kg/(m2*s)", (/ ('', i=1, 10) /)), &
+      ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11, 11/),'wbilo_sic',          &
+      "Bilan eau "//clnsurf(4),"kg/(m2*s)", (/ ('', i=1, 10) /)) /)
 
   TYPE(ctrl_out), SAVE, DIMENSION(4) :: o_wevap_srf    = (/      &
-      ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11 /),'wevap_ter',          &
-      "Evap eau "//clnsurf(1),"kg/(m2*s)", (/ ('', i=1, 9) /)), &
-      ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11 /),'wevap_lic',          &
-      "Evap eau "//clnsurf(2),"kg/(m2*s)", (/ ('', i=1, 9) /)), &
-      ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11 /),'wevap_oce',          &
-      "Evap eau "//clnsurf(3),"kg/(m2*s)", (/ ('', i=1, 9) /)), &
-      ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11 /),'wevap_sic',          &
-      "Evap eau "//clnsurf(4),"kg/(m2*s)", (/ ('', i=1, 9) /)) /)
+      ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11, 11/),'wevap_ter',          &
+      "Evap eau "//clnsurf(1),"kg/(m2*s)", (/ ('', i=1, 10) /)), &
+      ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11, 11/),'wevap_lic',          &
+      "Evap eau "//clnsurf(2),"kg/(m2*s)", (/ ('', i=1, 10) /)), &
+      ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11, 11/),'wevap_oce',          &
+      "Evap eau "//clnsurf(3),"kg/(m2*s)", (/ ('', i=1, 10) /)), &
+      ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11, 11/),'wevap_sic',          &
+      "Evap eau "//clnsurf(4),"kg/(m2*s)", (/ ('', i=1, 10) /)) /)
 
   TYPE(ctrl_out), SAVE, DIMENSION(4) :: o_wrain_srf    = (/      &
-      ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11 /),'wrain_ter',          &
-      "Pluie eau "//clnsurf(1),"kg/(m2*s)", (/ ('', i=1, 9) /)), &
-      ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11 /),'wrain_lic',          &
-      "Pluie eau "//clnsurf(2),"kg/(m2*s)", (/ ('', i=1, 9) /)), &
-      ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11 /),'wrain_oce',          &
-      "Pluie eau "//clnsurf(3),"kg/(m2*s)", (/ ('', i=1, 9) /)), &
-      ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11 /),'wrain_sic',          &
-      "Pluie eau "//clnsurf(4),"kg/(m2*s)", (/ ('', i=1, 9) /)) /)
+      ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11, 11/),'wrain_ter',          &
+      "Pluie eau "//clnsurf(1),"kg/(m2*s)", (/ ('', i=1, 10) /)), &
+      ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11, 11/),'wrain_lic',          &
+      "Pluie eau "//clnsurf(2),"kg/(m2*s)", (/ ('', i=1, 10) /)), &
+      ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11, 11/),'wrain_oce',          &
+      "Pluie eau "//clnsurf(3),"kg/(m2*s)", (/ ('', i=1, 10) /)), &
+      ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11, 11/),'wrain_sic',          &
+      "Pluie eau "//clnsurf(4),"kg/(m2*s)", (/ ('', i=1, 10) /)) /)
 
   TYPE(ctrl_out), SAVE, DIMENSION(4) :: o_wsnow_srf    = (/      &
-      ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11 /),'wsnow_ter',          &
-      "Neige eau "//clnsurf(1),"kg/(m2*s)", (/ ('', i=1, 9) /)), &
-      ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11 /),'wsnow_lic',          &
-      "Neige eau "//clnsurf(2),"kg/(m2*s)", (/ ('', i=1, 9) /)), &
-      ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11 /),'wsnow_oce',          &
-      "Neige eau "//clnsurf(3),"kg/(m2*s)", (/ ('', i=1, 9) /)), &
-      ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11 /),'wsnow_sic',          &
-      "Neige eau "//clnsurf(4),"kg/(m2*s)", (/ ('', i=1, 9) /)) /)
-
-  TYPE(ctrl_out), SAVE :: o_cdrm = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'cdrm', 'Momentum drag coef.', '-', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_cdrh = ctrl_out((/ 1, 10, 10, 7, 10, 10, 11, 11, 11 /), &
-    'cdrh', 'Heat drag coef.', '-', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_cldl = ctrl_out((/ 1, 1, 10, 10, 10, 10, 11, 11, 11 /), &
-    'cldl', 'Low-level cloudiness', '-', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_cldm = ctrl_out((/ 1, 1, 10, 10, 10, 10, 11, 11, 11 /), &
-    'cldm', 'Mid-level cloudiness', '-', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_cldh = ctrl_out((/ 1, 1, 10, 10, 10, 10, 11, 11, 11 /), &
-    'cldh', 'High-level cloudiness', '-', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_cldt = ctrl_out((/ 1, 1, 2, 10, 5, 10, 11, 11, 11 /), &
-    'cldt', 'Total cloudiness', '-', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_JrNt = ctrl_out((/ 1, 1, 10, 7, 10, 10, 11, 11, 11 /), &
-    'JrNt', '1 if Day 0 if Night', '-', (/ ('', i=1, 9) /))                                                                                  
-  TYPE(ctrl_out), SAVE :: o_cldhjn = ctrl_out((/ 10, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'cldhjn', 'High-level cloudiness Day', '-', (/ ('', i=1, 9) /))                                                                                   
-  TYPE(ctrl_out), SAVE :: o_cldmjn = ctrl_out((/ 10, 10, 10, 10, 10, 10, 11, 11, 11/), &      
-    'cldmjn', 'Mid-level cloudiness day', '-', (/ ('', i=1, 9) /))                                                           
-  TYPE(ctrl_out), SAVE :: o_cldljn = ctrl_out((/ 10, 10, 10, 10, 10, 10, 11, 11, 11/), &       
-    'cldljn', 'Low-level cloudiness day', '-', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_cldtjn = ctrl_out((/ 10, 10, 10, 10, 10, 10, 11, 11, 11/), &     
-    'cldtjn', 'Total cloudiness day', '-', (/ ('', i=1, 9) /))
-                                                       
-  TYPE(ctrl_out), SAVE :: o_cldq = ctrl_out((/ 1, 1, 10, 10, 10, 10, 11, 11, 11 /), &
-    'cldq', 'Cloud liquid water path', 'kg/m2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_lwp = ctrl_out((/ 1, 5, 10, 10, 10, 10, 11, 11, 11 /), &
-    'lwp', 'Cloud water path', 'kg/m2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_iwp = ctrl_out((/ 1, 5, 10, 10, 10, 10, 11, 11, 11 /), &
-    'iwp', 'Cloud ice water path', 'kg/m2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_ue = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'ue', 'Zonal energy transport', '-', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_ve = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    've', 'Merid energy transport', '-', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_uq = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'uq', 'Zonal humidity transport', '-', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_vq = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'vq', 'Merid humidity transport', '-', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_cape = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'cape', 'Conv avlbl pot ener', 'J/kg', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_pbase = ctrl_out((/ 1, 5, 10, 10, 10, 10, 11, 11, 11 /), &
-    'pbase', 'Cld base pressure', 'Pa', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_ptop = ctrl_out((/ 1, 5, 10, 10, 10, 10, 11, 11, 11 /), &
-    'ptop', 'Cld top pressure', 'Pa', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_fbase = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'fbase', 'Cld base mass flux', 'kg/m2/s', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_plcl = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'plcl', 'Lifting Condensation Level', 'hPa', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_plfc = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'plfc', 'Level of Free Convection', 'hPa', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_wbeff = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'wbeff', 'Conv. updraft velocity at LFC (<100)', 'm/s', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_prw = ctrl_out((/ 1, 1, 10, 10, 10, 10, 11, 11, 11 /), &
-    'prw', 'Precipitable water', 'kg/m2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_prlw = ctrl_out((/ 1, 1, 10, 10, 10, 10, 11, 11, 11 /), &
-    'prlw', 'Precipitable liquid water', 'kg/m2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_prsw = ctrl_out((/ 1, 1, 10, 10, 10, 10, 11, 11, 11 /), &
-    'prsw', 'Precipitable solid water', 'kg/m2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_s_pblh = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    's_pblh', 'Boundary Layer Height', 'm', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_s_pblt = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    's_pblt', 't at Boundary Layer Height', 'K', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_s_lcl = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    's_lcl', 'Condensation level', 'm', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_s_therm = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    's_therm', 'Exces du thermique', 'K', (/ ('', i=1, 9) /))
+      ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11, 11/),'wsnow_ter',          &
+      "Neige eau "//clnsurf(1),"kg/(m2*s)", (/ ('', i=1, 10) /)), &
+      ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11, 11/),'wsnow_lic',          &
+      "Neige eau "//clnsurf(2),"kg/(m2*s)", (/ ('', i=1, 10) /)), &
+      ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11, 11/),'wsnow_oce',          &
+      "Neige eau "//clnsurf(3),"kg/(m2*s)", (/ ('', i=1, 10) /)), &
+      ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11, 11/),'wsnow_sic',          &
+      "Neige eau "//clnsurf(4),"kg/(m2*s)", (/ ('', i=1, 10) /)) /)
+
+  TYPE(ctrl_out), SAVE :: o_cdrm = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'cdrm', 'Momentum drag coef.', '-', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_cdrh = ctrl_out((/ 1, 10, 10, 7, 10, 10, 11, 11, 11, 11/), &
+    'cdrh', 'Heat drag coef.', '-', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_cldl = ctrl_out((/ 1, 1, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'cldl', 'Low-level cloudiness', '-', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_cldm = ctrl_out((/ 1, 1, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'cldm', 'Mid-level cloudiness', '-', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_cldh = ctrl_out((/ 1, 1, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'cldh', 'High-level cloudiness', '-', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_cldt = ctrl_out((/ 1, 1, 2, 10, 5, 10, 11, 11, 11, 11/), &
+    'cldt', 'Total cloudiness', '-', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_JrNt = ctrl_out((/ 1, 1, 10, 7, 10, 10, 11, 11, 11, 11/), &
+    'JrNt', '1 if Day 0 if Night', '-', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_cldhjn = ctrl_out((/ 10, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'cldhjn', 'High-level cloudiness Day', '-', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_cldmjn = ctrl_out((/ 10, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &      
+    'cldmjn', 'Mid-level cloudiness day', '-', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_cldljn = ctrl_out((/ 10, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &       
+    'cldljn', 'Low-level cloudiness day', '-', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_cldtjn = ctrl_out((/ 10, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &     
+    'cldtjn', 'Total cloudiness day', '-', (/ ('', i=1, 10) /))
+ 
+  TYPE(ctrl_out), SAVE :: o_cldq = ctrl_out((/ 1, 1, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'cldq', 'Cloud liquid water path', 'kg/m2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_lwp = ctrl_out((/ 1, 5, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'lwp', 'Cloud water path', 'kg/m2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_iwp = ctrl_out((/ 1, 5, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'iwp', 'Cloud ice water path', 'kg/m2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_ue = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'ue', 'Zonal energy transport', '-', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_ve = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    've', 'Merid energy transport', '-', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_uq = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'uq', 'Zonal humidity transport', '-', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_vq = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'vq', 'Merid humidity transport', '-', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_cape = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'cape', 'Conv avlbl pot ener', 'J/kg', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_pbase = ctrl_out((/ 1, 5, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'pbase', 'Cld base pressure', 'Pa', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_ptop = ctrl_out((/ 1, 5, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'ptop', 'Cld top pressure', 'Pa', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_fbase = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'fbase', 'Cld base mass flux', 'kg/m2/s', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_plcl = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'plcl', 'Lifting Condensation Level', 'hPa', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_plfc = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'plfc', 'Level of Free Convection', 'hPa', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_wbeff = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'wbeff', 'Conv. updraft velocity at LFC (<100)', 'm/s', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_prw = ctrl_out((/ 1, 1, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'prw', 'Precipitable water', 'kg/m2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_prlw = ctrl_out((/ 1, 1, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'prlw', 'Precipitable liquid water', 'kg/m2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_prsw = ctrl_out((/ 1, 1, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'prsw', 'Precipitable solid water', 'kg/m2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_s_pblh = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    's_pblh', 'Boundary Layer Height', 'm', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_s_pblt = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    's_pblt', 't at Boundary Layer Height', 'K', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_s_lcl = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    's_lcl', 'Condensation level', 'm', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_s_therm = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    's_therm', 'Exces du thermique', 'K', (/ ('', i=1, 10) /))
   !IM : Les champs suivants (s_capCL, s_oliqCL, s_cteiCL, s_trmb1, s_trmb2, s_trmb3) ne sont pas definis dans HBTM.F
-  ! type(ctrl_out),save :: o_s_capCL      = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11 /),'s_capCL', &
-!    (/ ('', i=1, 9) /))
-  ! type(ctrl_out),save :: o_s_oliqCL     = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11 /),'s_oliqCL', &
-!    (/ ('', i=1, 9) /))
-  ! type(ctrl_out),save :: o_s_cteiCL     = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11 /),'s_cteiCL', &
-!    (/ ('', i=1, 9) /))
-  ! type(ctrl_out),save :: o_s_trmb1      = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11 /),'s_trmb1', &
-!    (/ ('', i=1, 9) /))
-  ! type(ctrl_out),save :: o_s_trmb2      = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11 /),'s_trmb2', &
-!    (/ ('', i=1, 9) /))
-  ! type(ctrl_out),save :: o_s_trmb3      = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11 /),'s_trmb3', &
-    !(/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_slab_bils = ctrl_out((/ 1, 1, 10, 10, 10, 10, 11, 11, 11 /), &
-    'slab_bils', 'flux atmos - slab ponderes foce', 'W/m2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_slab_bilg = ctrl_out((/ 1, 1, 10, 10, 10, 10, 11, 11, 11 /), &
-    'slab_bilg', 'flux glace - slab ponderes fsic', 'W/m2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_slab_qflux = ctrl_out((/ 1, 1, 10, 10, 10, 10, 11, 11, 11 /), &
-    'slab_qflux', 'Correction flux slab', 'W/m2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_tslab = ctrl_out((/ 1, 1, 10, 10, 10, 10, 11, 11, 11 /), &
-    'tslab', 'Temperature ocean slab', 'K', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_slab_tice = ctrl_out((/ 1, 1, 10, 10, 10, 10, 11, 11, 11 /), &
-    'slab_tice', 'Temperature banquise slab', 'K', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_slab_sic = ctrl_out((/ 1, 1, 10, 10, 10, 10, 11, 11, 11 /), &
-    'seaice', 'Epaisseur banquise slab', 'kg/m2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_slab_hdiff = ctrl_out((/ 1, 1, 10, 10, 10, 10, 11, 11, 11 /), &
-    'slab_hdiff', 'Horizontal diffusion', 'W/m2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_slab_ekman = ctrl_out((/ 1, 1, 10, 10, 10, 10, 11, 11, 11 /), &
-    'slab_ekman', 'Ekman heat transport', 'W/m2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_ale_bl = ctrl_out((/ 1, 1, 1, 10, 10, 10, 11, 11, 11 /), &
-    'ale_bl', 'ALE BL', 'm2/s2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_alp_bl = ctrl_out((/ 1, 1, 1, 10, 10, 10, 11, 11, 11 /), &
-    'alp_bl', 'ALP BL', 'W/m2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_ale_wk = ctrl_out((/ 1, 1, 1, 10, 10, 10, 11, 11, 11 /), &
-    'ale_wk', 'ALE WK', 'm2/s2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_alp_wk = ctrl_out((/ 1, 1, 1, 10, 10, 10, 11, 11, 11 /), &
-    'alp_wk', 'ALP WK', 'W/m2', (/ ('', i=1, 9) /))
+  ! type(ctrl_out),save :: o_s_capCL      = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11, 11/),'s_capCL', &
+!    (/ ('', i=1, 10) /))
+  ! type(ctrl_out),save :: o_s_oliqCL     = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11, 11/),'s_oliqCL', &
+!    (/ ('', i=1, 10) /))
+  ! type(ctrl_out),save :: o_s_cteiCL     = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11, 11/),'s_cteiCL', &
+!    (/ ('', i=1, 10) /))
+  ! type(ctrl_out),save :: o_s_trmb1      = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11, 11/),'s_trmb1', &
+!    (/ ('', i=1, 10) /))
+  ! type(ctrl_out),save :: o_s_trmb2      = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11, 11/),'s_trmb2', &
+!    (/ ('', i=1, 10) /))
+  ! type(ctrl_out),save :: o_s_trmb3      = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11, 11/),'s_trmb3', &
+    !(/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_slab_bils = ctrl_out((/ 1, 1, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'slab_bils', 'flux atmos - slab ponderes foce', 'W/m2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_slab_bilg = ctrl_out((/ 1, 1, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'slab_bilg', 'flux glace - slab ponderes fsic', 'W/m2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_slab_qflux = ctrl_out((/ 1, 1, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'slab_qflux', 'Correction flux slab', 'W/m2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_tslab = ctrl_out((/ 1, 1, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'tslab', 'Temperature ocean slab', 'K', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_slab_tice = ctrl_out((/ 1, 1, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'slab_tice', 'Temperature banquise slab', 'K', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_slab_sic = ctrl_out((/ 1, 1, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'seaice', 'Epaisseur banquise slab', 'kg/m2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_slab_hdiff = ctrl_out((/ 1, 1, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'slab_hdiff', 'Horizontal diffusion', 'W/m2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_slab_ekman = ctrl_out((/ 1, 1, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'slab_ekman', 'Ekman heat transport', 'W/m2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_ale_bl = ctrl_out((/ 1, 1, 1, 10, 10, 10, 11, 11, 11, 11/), &
+    'ale_bl', 'ALE BL', 'm2/s2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_alp_bl = ctrl_out((/ 1, 1, 1, 10, 10, 10, 11, 11, 11, 11/), &
+    'alp_bl', 'ALP BL', 'W/m2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_ale_wk = ctrl_out((/ 1, 1, 1, 10, 10, 10, 11, 11, 11, 11/), &
+    'ale_wk', 'ALE WK', 'm2/s2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_alp_wk = ctrl_out((/ 1, 1, 1, 10, 10, 10, 11, 11, 11, 11/), &
+    'alp_wk', 'ALP WK', 'W/m2', (/ ('', i=1, 10) /))
 !!!
 !nrlmd+jyg<
-  type(ctrl_out),save :: o_dtvdf_x        = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'dtvdf_x', ' dtvdf off_wake','K/s', (/ ('', i=1, 9) /))
-  type(ctrl_out),save :: o_dtvdf_w        = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'dtvdf_w', ' dtvdf within_wake','K/s', (/ ('', i=1, 9) /))
-  type(ctrl_out),save :: o_dqvdf_x        = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'dqvdf_x', ' dqvdf off_wake','kg/kg/s', (/ ('', i=1, 9) /))
-  type(ctrl_out),save :: o_dqvdf_w        = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'dqvdf_w', ' dqvdf within_wake','kg/kg/s', (/ ('', i=1, 9) /))
+  type(ctrl_out),save :: o_dtvdf_x        = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'dtvdf_x', ' dtvdf off_wake','K/s', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_dtvdf_w        = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'dtvdf_w', ' dtvdf within_wake','K/s', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_dqvdf_x        = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'dqvdf_x', ' dqvdf off_wake','kg/kg/s', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_dqvdf_w        = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'dqvdf_w', ' dqvdf within_wake','kg/kg/s', (/ ('', i=1, 10) /))
 !!
-  type(ctrl_out),save :: o_sens_x        = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-'sens_x', 'sens off_wake', 'W/m2', (/ ('', i=1, 9) /))
-  type(ctrl_out),save :: o_sens_w        = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-'sens_w', 'sens within_wake', 'W/m2', (/ ('', i=1, 9) /))                                                                                   
-  type(ctrl_out),save :: o_flat_x        = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-'flat_x', 'flat off_wake', 'W/m2', (/ ('', i=1, 9) /))                                                                                   
-  type(ctrl_out),save :: o_flat_w        = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-'flat_w', 'flat within_wake', 'W/m2', (/ ('', i=1, 9) /))
+  type(ctrl_out),save :: o_sens_x        = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+'sens_x', 'sens off_wake', 'W/m2', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_sens_w        = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+'sens_w', 'sens within_wake', 'W/m2', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_flat_x        = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+'flat_x', 'flat off_wake', 'W/m2', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_flat_w        = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+'flat_w', 'flat within_wake', 'W/m2', (/ ('', i=1, 10) /))
 !!
-  type(ctrl_out),save :: o_delta_tsurf    = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-'delta_tsurf', 'Temperature difference (w-x)', 'K', (/ ('', i=1, 9) /))                                                                               
-  type(ctrl_out),save :: o_cdragh_x       = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-'cdragh_x', 'cdragh off-wake', '', (/ ('', i=1, 9) /))
-  type(ctrl_out),save :: o_cdragh_w       = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-'cdragh_w', 'cdragh within-wake', '', (/ ('', i=1, 9) /))                                                                                  
-  type(ctrl_out),save :: o_cdragm_x       = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-'cdragm_x', 'cdragm off-wake', '', (/ ('', i=1, 9) /))
-  type(ctrl_out),save :: o_cdragm_w       = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-'cdragm_w', 'cdrgam within-wake', '', (/ ('', i=1, 9) /))                                                                                  
-  type(ctrl_out),save :: o_kh             = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-'kh', 'Kh', 'kg/s/m2', (/ ('', i=1, 9) /))                                                                                        
-  type(ctrl_out),save :: o_kh_x           = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-'kh_x', 'Kh off-wake', 'kg/s/m2', (/ ('', i=1, 9) /))                                                                                      
-  type(ctrl_out),save :: o_kh_w           = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-'kh_w', 'Kh within-wake', 'kg/s/m2', (/ ('', i=1, 9) /))
+  type(ctrl_out),save :: o_delta_tsurf    = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+'delta_tsurf', 'Temperature difference (w-x)', 'K', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_cdragh_x       = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+'cdragh_x', 'cdragh off-wake', '', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_cdragh_w       = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+'cdragh_w', 'cdragh within-wake', '', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_cdragm_x       = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+'cdragm_x', 'cdragm off-wake', '', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_cdragm_w       = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+'cdragm_w', 'cdrgam within-wake', '', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_kh             = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+'kh', 'Kh', 'kg/s/m2', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_kh_x           = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+'kh_x', 'Kh off-wake', 'kg/s/m2', (/ ('', i=1, 10) /))
+  type(ctrl_out),save :: o_kh_w           = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+'kh_w', 'Kh within-wake', 'kg/s/m2', (/ ('', i=1, 10) /))
 !>nrlmd+jyg
 !!!
-  TYPE(ctrl_out), SAVE :: o_ale = ctrl_out((/ 1, 1, 1, 10, 10, 10, 11, 11, 11 /), &
-    'ale', 'ALE', 'm2/s2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_alp = ctrl_out((/ 1, 1, 1, 10, 10, 10, 11, 11, 11 /), &
-    'alp', 'ALP', 'W/m2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_cin = ctrl_out((/ 1, 1, 1, 10, 10, 10, 11, 11, 11 /), &
-    'cin', 'Convective INhibition', 'm2/s2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_wape = ctrl_out((/ 1, 1, 1, 10, 10, 10, 11, 11, 11 /), &
-    'wape', '', 'm2/s2', (/ ('', i=1, 9) /))
+  TYPE(ctrl_out), SAVE :: o_ale = ctrl_out((/ 1, 1, 1, 10, 10, 10, 11, 11, 11, 11/), &
+    'ale', 'ALE', 'm2/s2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_alp = ctrl_out((/ 1, 1, 1, 10, 10, 10, 11, 11, 11, 11/), &
+    'alp', 'ALP', 'W/m2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_cin = ctrl_out((/ 1, 1, 1, 10, 10, 10, 11, 11, 11, 11/), &
+    'cin', 'Convective INhibition', 'm2/s2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_wape = ctrl_out((/ 1, 1, 1, 10, 10, 10, 11, 11, 11, 11/), &
+    'wape', '', 'm2/s2', (/ ('', i=1, 10) /))
 
 !!! nrlmd le 10/04/2012
 
 !-------Spectre de thermiques de type 2 au LCL
-  TYPE(ctrl_out), SAVE :: o_n2 = ctrl_out((/ 1, 6, 6, 6, 10, 10, 11, 11, 11 /), &
-    'n2', 'Nombre de panaches de type 2', ' ', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_s2 = ctrl_out((/ 1, 6, 6, 6, 10, 10, 11, 11, 11 /), &
-    's2', 'Surface moyenne des panaches de type 2', 'm2', (/ ('', i=1, 9) /))
-                                                                             
-!-------Déclenchement stochastique                                           
-  TYPE(ctrl_out), SAVE :: o_proba_notrig = ctrl_out((/ 1, 6, 6, 6, 10, 10, 11, 11, 11 /), &
-    'proba_notrig', &
-                         'Probabilite de non-declenchement', ' ', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_random_notrig = ctrl_out((/ 1, 6, 6, 6, 10, 10, 11, 11, 11 /), &
-    'random_notrig', &
-                         'Tirage aleatoire de non-declenchement', ' ', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_ale_bl_stat = ctrl_out((/ 1, 6, 6, 6, 10, 10, 11, 11, 11 /), &
-    'ale_bl_stat', &
-       'ALE_BL_STAT', 'm2/s2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_ale_bl_trig = ctrl_out((/ 1, 6, 6, 6, 10, 10, 11, 11, 11 /), &
-    'ale_bl_trig', &
-       'ALE_BL_STAT + Condition S>Sthreshold', 'm2/s2', (/ ('', i=1, 9) /))
+  TYPE(ctrl_out), SAVE :: o_n2 = ctrl_out((/ 1, 6, 6, 6, 10, 10, 11, 11, 11, 11/), &
+    'n2', 'Nombre de panaches de type 2', ' ', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_s2 = ctrl_out((/ 1, 6, 6, 6, 10, 10, 11, 11, 11, 11/), &
+    's2', 'Surface moyenne des panaches de type 2', 'm2', (/ ('', i=1, 10) /))
+              
+!-------Déclenchement stochastiqu
+  TYPE(ctrl_out), SAVE :: o_proba_notrig = ctrl_out((/ 1, 6, 6, 6, 10, 10, 11, 11, 11, 11/), &
+    'proba_notrig', 'Probabilite de non-declenchement', ' ', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_random_notrig = ctrl_out((/ 1, 6, 6, 6, 10, 10, 11, 11, 11, 11/), &
+    'random_notrig', 'Tirage aleatoire de non-declenchement', ' ', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_ale_bl_stat = ctrl_out((/ 1, 6, 6, 6, 10, 10, 11, 11, 11, 11/), &
+    'ale_bl_stat', 'ALE_BL_STAT', 'm2/s2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_ale_bl_trig = ctrl_out((/ 1, 6, 6, 6, 10, 10, 11, 11, 11, 11/), &
+    'ale_bl_trig', 'ALE_BL_STAT + Condition S>Sthreshold', 'm2/s2', (/ ('', i=1, 10) /))
 
 !-------Fermeture statistique
-  TYPE(ctrl_out), SAVE :: o_alp_bl_det = ctrl_out((/ 1, 1, 1, 10, 10, 10, 11, 11, 11 /), &
-    'alp_bl_det', 'ALP_BL_DET', 'W/m2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_alp_bl_fluct_m = ctrl_out((/ 1, 1, 1, 10, 10, 10, 11, 11, 11 /), &
-    'alp_bl_fluct_m', 'ALP_BL_FLUCT_M', 'W/m2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_alp_bl_fluct_tke = ctrl_out((/ 1, 1, 1, 10, 10, 10, 11, 11, 11 /), &
-    'alp_bl_fluct_tke', 'ALP_BL_FLUCT_TKE', 'W/m2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_alp_bl_conv = ctrl_out((/ 1, 1, 1, 10, 10, 10, 11, 11, 11 /), &
-    'alp_bl_conv', 'ALP_BL_CONV', 'W/m2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_alp_bl_stat = ctrl_out((/ 1, 1, 1, 10, 10, 10, 11, 11, 11 /), &
-    'alp_bl_stat', 'ALP_BL_STAT', 'W/m2', (/ ('', i=1, 9) /))
+  TYPE(ctrl_out), SAVE :: o_alp_bl_det = ctrl_out((/ 1, 1, 1, 10, 10, 10, 11, 11, 11, 11/), &
+    'alp_bl_det', 'ALP_BL_DET', 'W/m2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_alp_bl_fluct_m = ctrl_out((/ 1, 1, 1, 10, 10, 10, 11, 11, 11, 11/), &
+    'alp_bl_fluct_m', 'ALP_BL_FLUCT_M', 'W/m2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_alp_bl_fluct_tke = ctrl_out((/ 1, 1, 1, 10, 10, 10, 11, 11, 11, 11/), &
+    'alp_bl_fluct_tke', 'ALP_BL_FLUCT_TKE', 'W/m2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_alp_bl_conv = ctrl_out((/ 1, 1, 1, 10, 10, 10, 11, 11, 11, 11/), &
+    'alp_bl_conv', 'ALP_BL_CONV', 'W/m2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_alp_bl_stat = ctrl_out((/ 1, 1, 1, 10, 10, 10, 11, 11, 11, 11/), &
+    'alp_bl_stat', 'ALP_BL_STAT', 'W/m2', (/ ('', i=1, 10) /))
 
 !!! fin nrlmd le 10/04/2012
@@ -805,774 +802,800 @@
 
   TYPE(ctrl_out), SAVE, DIMENSION(7) :: o_uSTDlevs     = (/                    &
-      ctrl_out((/ 1, 7, 7, 10, 10, 10, 11, 11, 11 /),'u850', "Zonal wind 850hPa", "m/s",     &
-      (/ 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)' /)), &
-      ctrl_out((/ 1, 7, 7, 10, 10, 10, 11, 11, 11 /),'u700', "Zonal wind 700hPa", "m/s",     &
-      (/ 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)' /)), &
-      ctrl_out((/ 1, 7, 7, 10, 10, 10, 11, 11, 11 /),'u500', "Zonal wind 500hPa", "m/s",     &
-      (/ 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)' /)), &
-      ctrl_out((/ 1, 7, 7, 10, 10, 10, 11, 11, 11 /),'u200', "Zonal wind 200hPa", "m/s",     &
-      (/ 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)' /)), &
-      ctrl_out((/ 1, 7, 7, 10, 10, 10, 11, 11, 11 /),'u100', "Zonal wind 100hPa", "m/s",     &
-      (/ 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)' /)), &
-      ctrl_out((/ 1, 7, 7, 10, 10, 10, 11, 11, 11 /),'u50', "Zonal wind 50hPa", "m/s",     &
-      (/ 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)' /)), &
-      ctrl_out((/ 1, 7, 7, 10, 10, 10, 11, 11, 11 /),'u10', "Zonal wind 10hPa", "m/s",     &
-      (/ 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)' /)) /)
+      ctrl_out((/ 1, 7, 7, 10, 10, 10, 11, 11, 11, 11/),'u850', "Zonal wind 850hPa", "m/s",     &
+      (/ 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)' /)), &
+      ctrl_out((/ 1, 7, 7, 10, 10, 10, 11, 11, 11, 11/),'u700', "Zonal wind 700hPa", "m/s",     &
+      (/ 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)' /)), &
+      ctrl_out((/ 1, 7, 7, 10, 10, 10, 11, 11, 11, 11/),'u500', "Zonal wind 500hPa", "m/s",     &
+      (/ 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)' /)), &
+      ctrl_out((/ 1, 7, 7, 10, 10, 10, 11, 11, 11, 11/),'u200', "Zonal wind 200hPa", "m/s",     &
+      (/ 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)' /)), &
+      ctrl_out((/ 1, 7, 7, 10, 10, 10, 11, 11, 11, 11/),'u100', "Zonal wind 100hPa", "m/s",     &
+      (/ 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)' /)), &
+      ctrl_out((/ 1, 7, 7, 10, 10, 10, 11, 11, 11, 11/),'u50', "Zonal wind 50hPa", "m/s",     &
+      (/ 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)' /)), &
+      ctrl_out((/ 1, 7, 7, 10, 10, 10, 11, 11, 11, 11/),'u10', "Zonal wind 10hPa", "m/s",     &
+      (/ 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)' /)) /)
 
   TYPE(ctrl_out), SAVE, DIMENSION(7) :: o_vSTDlevs     = (/                     &
-      ctrl_out((/ 1, 7, 7, 10, 10, 10, 11, 11, 11 /),'v850', "Meridional wind 850hPa", "m/s", &
-      (/ 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)' /)),  &
-      ctrl_out((/ 1, 7, 7, 10, 10, 10, 11, 11, 11 /),'v700', "Meridional wind 700hPa", "m/s", &
-      (/ 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)' /)),  &
-      ctrl_out((/ 1, 7, 7, 10, 10, 10, 11, 11, 11 /),'v500', "Meridional wind 500hPa", "m/s", &
-      (/ 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)' /)),  &
-      ctrl_out((/ 1, 7, 7, 10, 10, 10, 11, 11, 11 /),'v200', "Meridional wind 200hPa", "m/s", &
-      (/ 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)' /)),  &
-      ctrl_out((/ 1, 7, 7, 10, 10, 10, 11, 11, 11 /),'v100', "Meridional wind 100hPa", "m/s", &
-      (/ 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)' /)),  &
-      ctrl_out((/ 1, 7, 7, 10, 10, 10, 11, 11, 11 /),'v50', "Meridional wind 50hPa", "m/s",  &
-      (/ 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)' /)),  &
-      ctrl_out((/ 1, 7, 7, 10, 10, 10, 11, 11, 11 /),'v10', "Meridional wind 10hPa", "m/s",  &
-      (/ 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)' /)) /)
+      ctrl_out((/ 1, 7, 7, 10, 10, 10, 11, 11, 11, 11/),'v850', "Meridional wind 850hPa", "m/s", &
+      (/ 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)' /)),  &
+      ctrl_out((/ 1, 7, 7, 10, 10, 10, 11, 11, 11, 11/),'v700', "Meridional wind 700hPa", "m/s", &
+      (/ 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)' /)),  &
+      ctrl_out((/ 1, 7, 7, 10, 10, 10, 11, 11, 11, 11/),'v500', "Meridional wind 500hPa", "m/s", &
+      (/ 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)' /)),  &
+      ctrl_out((/ 1, 7, 7, 10, 10, 10, 11, 11, 11, 11/),'v200', "Meridional wind 200hPa", "m/s", &
+      (/ 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)' /)),  &
+      ctrl_out((/ 1, 7, 7, 10, 10, 10, 11, 11, 11, 11/),'v100', "Meridional wind 100hPa", "m/s", &
+      (/ 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)' /)),  &
+      ctrl_out((/ 1, 7, 7, 10, 10, 10, 11, 11, 11, 11/),'v50', "Meridional wind 50hPa", "m/s",  &
+      (/ 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)' /)),  &
+      ctrl_out((/ 1, 7, 7, 10, 10, 10, 11, 11, 11, 11/),'v10', "Meridional wind 10hPa", "m/s",  &
+      (/ 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)' /)) /)
 
   TYPE(ctrl_out), SAVE, DIMENSION(7) :: o_wSTDlevs     = (/                    &
-      ctrl_out((/ 1, 7, 7, 10, 10, 10, 11, 11, 11 /),'w850', "Vertical wind 850hPa", "Pa/s", &
-      (/ 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)' /)), &
-      ctrl_out((/ 1, 7, 7, 10, 10, 10, 11, 11, 11 /),'w700', "Vertical wind 700hPa", "Pa/s", &
-      (/ 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)' /)), &
-      ctrl_out((/ 1, 7, 7, 10, 10, 10, 11, 11, 11 /),'w500', "Vertical wind 500hPa", "Pa/s", &
-      (/ 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)' /)), &
-      ctrl_out((/ 1, 7, 7, 10, 10, 10, 11, 11, 11 /),'w200', "Vertical wind 200hPa", "Pa/s", &
-      (/ 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)' /)), &
-      ctrl_out((/ 1, 7, 7, 10, 10, 10, 11, 11, 11 /),'w100', "Vertical wind 100hPa", "Pa/s", &
-      (/ 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)' /)), &
-      ctrl_out((/ 1, 7, 7, 10, 10, 10, 11, 11, 11 /),'w50', "Vertical wind 50hPa", "Pa/s",  &
-      (/ 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)' /)), &
-      ctrl_out((/ 1, 7, 7, 10, 10, 10, 11, 11, 11 /),'w10', "Vertical wind 10hPa", "Pa/s",  &
-      (/ 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)' /)) /)
+      ctrl_out((/ 1, 7, 7, 10, 10, 10, 11, 11, 11, 11/),'w850', "Vertical wind 850hPa", "Pa/s", &
+      (/ 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)' /)), &
+      ctrl_out((/ 1, 7, 7, 10, 10, 10, 11, 11, 11, 11/),'w700', "Vertical wind 700hPa", "Pa/s", &
+      (/ 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)' /)), &
+      ctrl_out((/ 1, 7, 7, 10, 10, 10, 11, 11, 11, 11/),'w500', "Vertical wind 500hPa", "Pa/s", &
+      (/ 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)' /)), &
+      ctrl_out((/ 1, 7, 7, 10, 10, 10, 11, 11, 11, 11/),'w200', "Vertical wind 200hPa", "Pa/s", &
+      (/ 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)' /)), &
+      ctrl_out((/ 1, 7, 7, 10, 10, 10, 11, 11, 11, 11/),'w100', "Vertical wind 100hPa", "Pa/s", &
+      (/ 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)' /)), &
+      ctrl_out((/ 1, 7, 7, 10, 10, 10, 11, 11, 11, 11/),'w50', "Vertical wind 50hPa", "Pa/s",  &
+      (/ 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)' /)), &
+      ctrl_out((/ 1, 7, 7, 10, 10, 10, 11, 11, 11, 11/),'w10', "Vertical wind 10hPa", "Pa/s",  &
+      (/ 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)' /)) /)
 
   TYPE(ctrl_out), SAVE, DIMENSION(7) :: o_tSTDlevs     = (/                    &
-      ctrl_out((/ 1, 7, 7, 10, 10, 10, 11, 11, 11 /),'t850', "Temperature 850hPa", "K",      &
-      (/ 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)' /)), &
-      ctrl_out((/ 1, 7, 7, 10, 10, 10, 11, 11, 11 /),'t700', "Temperature 700hPa", "K",      &
-      (/ 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)' /)), &
-      ctrl_out((/ 1, 7, 7, 10, 10, 10, 11, 11, 11 /),'t500', "Temperature 500hPa", "K",      &
-      (/ 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)' /)), &
-      ctrl_out((/ 1, 7, 7, 10, 10, 10, 11, 11, 11 /),'t200', "Temperature 200hPa", "K",      &
-      (/ 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)' /)), &
-      ctrl_out((/ 1, 7, 7, 10, 10, 10, 11, 11, 11 /),'t100', "Temperature 100hPa", "K",      &
-      (/ 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)' /)), &
-      ctrl_out((/ 1, 7, 7, 10, 10, 10, 11, 11, 11 /),'t50',  "Temperature 50hPa", "K",      &
-      (/ 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)' /)), &
-      ctrl_out((/ 1, 7, 7, 10, 10, 10, 11, 11, 11 /),'t10',  "Temperature 10hPa", "K",      &
-      (/ 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)' /)) /)
+      ctrl_out((/ 1, 7, 7, 10, 10, 10, 11, 11, 11, 11/),'t850', "Temperature 850hPa", "K",      &
+      (/ 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)' /)), &
+      ctrl_out((/ 1, 7, 7, 10, 10, 10, 11, 11, 11, 11/),'t700', "Temperature 700hPa", "K",      &
+      (/ 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)' /)), &
+      ctrl_out((/ 1, 7, 7, 10, 10, 10, 11, 11, 11, 11/),'t500', "Temperature 500hPa", "K",      &
+      (/ 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)' /)), &
+      ctrl_out((/ 1, 7, 7, 10, 10, 10, 11, 11, 11, 11/),'t200', "Temperature 200hPa", "K",      &
+      (/ 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)' /)), &
+      ctrl_out((/ 1, 7, 7, 10, 10, 10, 11, 11, 11, 11/),'t100', "Temperature 100hPa", "K",      &
+      (/ 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)' /)), &
+      ctrl_out((/ 1, 7, 7, 10, 10, 10, 11, 11, 11, 11/),'t50',  "Temperature 50hPa", "K",      &
+      (/ 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)' /)), &
+      ctrl_out((/ 1, 7, 7, 10, 10, 10, 11, 11, 11, 11/),'t10',  "Temperature 10hPa", "K",      &
+      (/ 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)' /)) /)
 
   TYPE(ctrl_out), SAVE, DIMENSION(7) :: o_qSTDlevs     = (/                             &
-      ctrl_out((/ 1, 7, 7, 10, 10, 10, 11, 11, 11 /),'q850', "Specific humidity 850hPa", &
-      "kg/kg", (/ 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)' /)), &
-      ctrl_out((/ 1, 7, 7, 10, 10, 10, 11, 11, 11 /),'q700', "Specific humidity 700hPa", &
-      "kg/kg", (/ 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)' /)), &
-      ctrl_out((/ 1, 7, 7, 10, 10, 10, 11, 11, 11 /),'q500', "Specific humidity 500hPa", &
-      "kg/kg", (/ 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)' /)), &
-      ctrl_out((/ 1, 7, 7, 10, 10, 10, 11, 11, 11 /),'q200', "Specific humidity 200hPa", &
-      "kg/kg", (/ 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)' /)), &
-      ctrl_out((/ 1, 7, 7, 10, 10, 10, 11, 11, 11 /),'q100', "Specific humidity 100hPa", &
-      "kg/kg", (/ 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)' /)), &
-      ctrl_out((/ 1, 7, 7, 10, 10, 10, 11, 11, 11 /),'q50', "Specific humidity 50hPa",  &
-      "kg/kg", (/ 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)' /)), &
-      ctrl_out((/ 1, 7, 7, 10, 10, 10, 11, 11, 11 /),'q10', "Specific humidity 10hPa", &
-      "kg/kg", (/ 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)' /)) /)
+      ctrl_out((/ 1, 7, 7, 10, 10, 10, 11, 11, 11, 11/),'q850', "Specific humidity 850hPa", &
+      "kg/kg", (/ 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)' /)), &
+      ctrl_out((/ 1, 7, 7, 10, 10, 10, 11, 11, 11, 11/),'q700', "Specific humidity 700hPa", &
+      "kg/kg", (/ 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)' /)), &
+      ctrl_out((/ 1, 7, 7, 10, 10, 10, 11, 11, 11, 11/),'q500', "Specific humidity 500hPa", &
+      "kg/kg", (/ 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)' /)), &
+      ctrl_out((/ 1, 7, 7, 10, 10, 10, 11, 11, 11, 11/),'q200', "Specific humidity 200hPa", &
+      "kg/kg", (/ 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)' /)), &
+      ctrl_out((/ 1, 7, 7, 10, 10, 10, 11, 11, 11, 11/),'q100', "Specific humidity 100hPa", &
+      "kg/kg", (/ 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)' /)), &
+      ctrl_out((/ 1, 7, 7, 10, 10, 10, 11, 11, 11, 11/),'q50', "Specific humidity 50hPa",  &
+      "kg/kg", (/ 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)' /)), &
+      ctrl_out((/ 1, 7, 7, 10, 10, 10, 11, 11, 11, 11/),'q10', "Specific humidity 10hPa", &
+      "kg/kg", (/ 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)' /)) /)
 
   TYPE(ctrl_out), SAVE, DIMENSION(7) :: o_zSTDlevs   = (/                           &
-      ctrl_out((/ 1, 7, 7, 10, 10, 10, 11, 11, 11 /),'z850', "Geopotential height 850hPa",        &
-      "m", (/ 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)' /)), &
-      ctrl_out((/ 1, 7, 7, 10, 10, 10, 11, 11, 11 /),'z700', "Geopotential height 700hPa",        &
-      "m", (/ 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)' /)), &
-      ctrl_out((/ 1, 7, 7, 10, 10, 10, 11, 11, 11 /),'z500', "Geopotential height 500hPa",        &
-      "m", (/ 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)' /)), &
-      ctrl_out((/ 1, 7, 7, 10, 10, 10, 11, 11, 11 /),'z200', "Geopotential height 200hPa",        &
-      "m", (/ 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)' /)), &
-      ctrl_out((/ 1, 7, 7, 10, 10, 10, 11, 11, 11 /),'z100', "Geopotential height 100hPa",        &
-      "m", (/ 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)' /)), &
-      ctrl_out((/ 1, 7, 7, 10, 10, 10, 11, 11, 11 /),'z50', "Geopotential height 50hPa",         &
-      "m", (/ 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)' /)), &
-      ctrl_out((/ 1, 7, 7, 10, 10, 10, 11, 11, 11 /),'z10', "Geopotential height 10hPa",         &
-      "m", (/ 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)' /)) /)
-
-  TYPE(ctrl_out), SAVE :: o_t_oce_sic = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    't_oce_sic', 'Temp mixte oce-sic', 'K', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_weakinv = ctrl_out((/ 10, 1, 10, 10, 10, 10, 11, 11, 11 /), &
-    'weakinv', 'Weak inversion', '-', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_dthmin = ctrl_out((/ 10, 1, 10, 10, 10, 10, 11, 11, 11 /), &
-    'dthmin', 'dTheta mini', 'K/m', (/ ('', i=1, 9) /))
+      ctrl_out((/ 1, 7, 7, 10, 10, 10, 11, 11, 11, 11/),'z850', "Geopotential height 850hPa",        &
+      "m", (/ 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)' /)), &
+      ctrl_out((/ 1, 7, 7, 10, 10, 10, 11, 11, 11, 11/),'z700', "Geopotential height 700hPa",        &
+      "m", (/ 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)' /)), &
+      ctrl_out((/ 1, 7, 7, 10, 10, 10, 11, 11, 11, 11/),'z500', "Geopotential height 500hPa",        &
+      "m", (/ 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)' /)), &
+      ctrl_out((/ 1, 7, 7, 10, 10, 10, 11, 11, 11, 11/),'z200', "Geopotential height 200hPa",        &
+      "m", (/ 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)' /)), &
+      ctrl_out((/ 1, 7, 7, 10, 10, 10, 11, 11, 11, 11/),'z100', "Geopotential height 100hPa",        &
+      "m", (/ 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)' /)), &
+      ctrl_out((/ 1, 7, 7, 10, 10, 10, 11, 11, 11, 11/),'z50', "Geopotential height 50hPa",         &
+      "m", (/ 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)' /)), &
+      ctrl_out((/ 1, 7, 7, 10, 10, 10, 11, 11, 11, 11/),'z10', "Geopotential height 10hPa",         &
+      "m", (/ 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)' /)) /)
+
+  TYPE(ctrl_out), SAVE :: o_t_oce_sic = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    't_oce_sic', 'Temp mixte oce-sic', 'K', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_weakinv = ctrl_out((/ 10, 1, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'weakinv', 'Weak inversion', '-', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_dthmin = ctrl_out((/ 10, 1, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'dthmin', 'dTheta mini', 'K/m', (/ ('', i=1, 10) /))
 
   TYPE(ctrl_out), SAVE, DIMENSION(4) :: o_u10_srf      = (/ &
-      ctrl_out((/ 10, 4, 10, 10, 10, 10, 11, 11, 11 /),'u10_ter', "", "", (/ ('', i=1, 9) /)), &
-      ctrl_out((/ 10, 4, 10, 10, 10, 10, 11, 11, 11 /),'u10_lic', "", "", (/ ('', i=1, 9) /)), &
-      ctrl_out((/ 10, 4, 10, 10, 10, 10, 11, 11, 11 /),'u10_oce', "", "", (/ ('', i=1, 9) /)), &
-      ctrl_out((/ 10, 4, 10, 10, 10, 10, 11, 11, 11 /),'u10_sic', "", "", (/ ('', i=1, 9) /)) /)
+      ctrl_out((/ 10, 4, 10, 10, 10, 10, 11, 11, 11, 11/),'u10_ter', "", "", (/ ('', i=1, 10) /)), &
+      ctrl_out((/ 10, 4, 10, 10, 10, 10, 11, 11, 11, 11/),'u10_lic', "", "", (/ ('', i=1, 10) /)), &
+      ctrl_out((/ 10, 4, 10, 10, 10, 10, 11, 11, 11, 11/),'u10_oce', "", "", (/ ('', i=1, 10) /)), &
+      ctrl_out((/ 10, 4, 10, 10, 10, 10, 11, 11, 11, 11/),'u10_sic', "", "", (/ ('', i=1, 10) /)) /)
 
   TYPE(ctrl_out), SAVE, DIMENSION(4) :: o_v10_srf      = (/ &
-      ctrl_out((/ 10, 4, 10, 10, 10, 10, 11, 11, 11 /),'v10_ter', "", "", (/ ('', i=1, 9) /)), &
-      ctrl_out((/ 10, 4, 10, 10, 10, 10, 11, 11, 11 /),'v10_lic', "", "", (/ ('', i=1, 9) /)), &
-      ctrl_out((/ 10, 4, 10, 10, 10, 10, 11, 11, 11 /),'v10_oce', "", "", (/ ('', i=1, 9) /)), &
-      ctrl_out((/ 10, 4, 10, 10, 10, 10, 11, 11, 11 /),'v10_sic', "", "", (/ ('', i=1, 9) /)) /)
-
-  TYPE(ctrl_out), SAVE :: o_cldtau = ctrl_out((/ 10, 5, 10, 10, 10, 10, 11, 11, 11 /), &
-    'cldtau', 'Cloud optical thickness', '1', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_cldemi = ctrl_out((/ 10, 5, 10, 10, 10, 10, 11, 11, 11 /), &
-    'cldemi', 'Cloud optical emissivity', '1', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_rh2m = ctrl_out((/ 5, 5, 10, 10, 10, 10, 11, 11, 11 /), &
-    'rh2m', 'Relative humidity at 2m', '%', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_rh2m_min = ctrl_out((/ 10, 5, 10, 10, 10, 10, 11, 11, 11 /), &
+      ctrl_out((/ 10, 4, 10, 10, 10, 10, 11, 11, 11, 11/),'v10_ter', "", "", (/ ('', i=1, 10) /)), &
+      ctrl_out((/ 10, 4, 10, 10, 10, 10, 11, 11, 11, 11/),'v10_lic', "", "", (/ ('', i=1, 10) /)), &
+      ctrl_out((/ 10, 4, 10, 10, 10, 10, 11, 11, 11, 11/),'v10_oce', "", "", (/ ('', i=1, 10) /)), &
+      ctrl_out((/ 10, 4, 10, 10, 10, 10, 11, 11, 11, 11/),'v10_sic', "", "", (/ ('', i=1, 10) /)) /)
+
+  TYPE(ctrl_out), SAVE :: o_cldtau = ctrl_out((/ 10, 5, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'cldtau', 'Cloud optical thickness', '1', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_cldemi = ctrl_out((/ 10, 5, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'cldemi', 'Cloud optical emissivity', '1', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_rh2m = ctrl_out((/ 5, 5, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'rh2m', 'Relative humidity at 2m', '%', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_rh2m_min = ctrl_out((/ 10, 5, 10, 10, 10, 10, 11, 11, 11, 11/), &
     'rh2m_min', 'Min Relative humidity at 2m', '%',                        &
-      (/ 't_min(X)', 't_min(X)', 't_min(X)', 't_min(X)', 't_min(X)', 't_min(X)', 't_min(X)', 't_min(X)', 't_min(X)' /))
-  TYPE(ctrl_out), SAVE :: o_rh2m_max = ctrl_out((/ 10, 5, 10, 10, 10, 10, 11, 11, 11 /), &
-    'rh2m_max', 'Max Relative humidity at 2m', '%',                        &
-      (/ 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', &
+      (/ 't_min(X)', 't_min(X)', 't_min(X)', 't_min(X)', 't_min(X)', & 
+         't_min(X)', 't_min(X)', 't_min(X)', 't_min(X)', 't_min(X)' /))
+  TYPE(ctrl_out), SAVE :: o_rh2m_max = ctrl_out((/ 10, 5, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'rh2m_max', 'Max Relative humidity at 2m', '%',                         &
+      (/ 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', &
          't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)' /))
-  TYPE(ctrl_out), SAVE :: o_qsat2m = ctrl_out((/ 10, 5, 10, 10, 10, 10, 11, 11, 11 /), &
-    'qsat2m', 'Saturant humidity at 2m', '%', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_tpot = ctrl_out((/ 10, 5, 10, 10, 10, 10, 11, 11, 11 /), &
-    'tpot', 'Surface air potential temperature', 'K', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_tpote = ctrl_out((/ 10, 5, 10, 10, 10, 10, 11, 11, 11 /), &
-    'tpote', &
-      'Surface air equivalent potential temperature', 'K', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_tke = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'tke ', 'TKE', 'm2/s2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_tke_max = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'tke_max', 'TKE max', 'm2/s2',                                        &
+  TYPE(ctrl_out), SAVE :: o_qsat2m = ctrl_out((/ 10, 5, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'qsat2m', 'Saturant humidity at 2m', '%', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_tpot = ctrl_out((/ 10, 5, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'tpot', 'Surface air potential temperature', 'K', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_tpote = ctrl_out((/ 10, 5, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'tpote', 'Surface air equivalent potential temperature', 'K', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_tke = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'tke ', 'TKE', 'm2/s2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_tke_max = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'tke_max', 'TKE max', 'm2/s2',                                  &
       (/ 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', &
-         't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)' /))
+         't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)' /))
 
   TYPE(ctrl_out), SAVE, DIMENSION(4) :: o_tke_srf      = (/             &
-      ctrl_out((/ 10, 4, 10, 10, 10, 10, 11, 11, 11 /),'tke_ter',       &
-      "Max Turb. Kinetic Energy "//clnsurf(1),"m2/s2", (/ ('', i=1, 9) /)), &
-      ctrl_out((/ 10, 4, 10, 10, 10, 10, 11, 11, 11 /),'tke_lic',       &
-      "Max Turb. Kinetic Energy "//clnsurf(2),"m2/s2", (/ ('', i=1, 9) /)), &
-      ctrl_out((/ 10, 4, 10, 10, 10, 10, 11, 11, 11 /),'tke_oce',       &
-      "Max Turb. Kinetic Energy "//clnsurf(3),"m2/s2", (/ ('', i=1, 9) /)), &
-      ctrl_out((/ 10, 4, 10, 10, 10, 10, 11, 11, 11 /),'tke_sic',       &
-      "Max Turb. Kinetic Energy "//clnsurf(4),"m2/s2", (/ ('', i=1, 9) /)) /)
+      ctrl_out((/ 10, 4, 10, 10, 10, 10, 11, 11, 11, 11/),'tke_ter',       &
+      "Max Turb. Kinetic Energy "//clnsurf(1),"m2/s2", (/ ('', i=1, 10) /)), &
+      ctrl_out((/ 10, 4, 10, 10, 10, 10, 11, 11, 11, 11/),'tke_lic',       &
+      "Max Turb. Kinetic Energy "//clnsurf(2),"m2/s2", (/ ('', i=1, 10) /)), &
+      ctrl_out((/ 10, 4, 10, 10, 10, 10, 11, 11, 11, 11/),'tke_oce',       &
+      "Max Turb. Kinetic Energy "//clnsurf(3),"m2/s2", (/ ('', i=1, 10) /)), &
+      ctrl_out((/ 10, 4, 10, 10, 10, 10, 11, 11, 11, 11/),'tke_sic',       &
+      "Max Turb. Kinetic Energy "//clnsurf(4),"m2/s2", (/ ('', i=1, 10) /)) /)
 
   TYPE(ctrl_out), SAVE, DIMENSION(4) :: o_l_mixmin      = (/             &
-      ctrl_out((/ 10, 10, 10, 10, 10, 10, 11, 11, 11 /),'l_mixmin_ter',       &
-      "PBL mixing length "//clnsurf(1),"m", (/ ('', i=1, 9) /)), &
-      ctrl_out((/ 10, 10, 10, 10, 10, 10, 11, 11, 11 /),'l_mixmin_lic',       &
-      "PBL mixing length "//clnsurf(2),"m", (/ ('', i=1, 9) /)), &
-      ctrl_out((/ 10, 10, 10, 10, 10, 10, 11, 11, 11 /),'l_mixmin_oce',       &
-      "PBL mixing length "//clnsurf(3),"m", (/ ('', i=1, 9) /)), &
-      ctrl_out((/ 10, 10, 10, 10, 10, 10, 11, 11, 11 /),'l_mixmin_sic',       &
-      "PBL mixing length "//clnsurf(4),"m", (/ ('', i=1, 9) /)) /)
+      ctrl_out((/ 10, 10, 10, 10, 10, 10, 11, 11, 11, 11/),'l_mixmin_ter',       &
+      "PBL mixing length "//clnsurf(1),"m", (/ ('', i=1, 10) /)), &
+      ctrl_out((/ 10, 10, 10, 10, 10, 10, 11, 11, 11, 11/),'l_mixmin_lic',       &
+      "PBL mixing length "//clnsurf(2),"m", (/ ('', i=1, 10) /)), &
+      ctrl_out((/ 10, 10, 10, 10, 10, 10, 11, 11, 11, 11/),'l_mixmin_oce',       &
+      "PBL mixing length "//clnsurf(3),"m", (/ ('', i=1, 10) /)), &
+      ctrl_out((/ 10, 10, 10, 10, 10, 10, 11, 11, 11, 11/),'l_mixmin_sic',       &
+      "PBL mixing length "//clnsurf(4),"m", (/ ('', i=1, 10) /)) /)
 
   TYPE(ctrl_out), SAVE, DIMENSION(4) :: o_l_mix      = (/             &
-      ctrl_out((/ 10, 10, 10, 10, 10, 10, 11, 11, 11 /),'l_mix_ter',       &
-      "min PBL mixing length "//clnsurf(1),"m", (/ ('', i=1, 9) /)), &
-      ctrl_out((/ 10, 10, 10, 10, 10, 10, 11, 11, 11 /),'l_mix_lic',       &
-      "min PBL mixing length "//clnsurf(2),"m", (/ ('', i=1, 9) /)), &
-      ctrl_out((/ 10, 10, 10, 10, 10, 10, 11, 11, 11 /),'l_mix_oce',       &
-      "min PBL mixing length "//clnsurf(3),"m", (/ ('', i=1, 9) /)), &
-      ctrl_out((/ 10, 10, 10, 10, 10, 10, 11, 11, 11 /),'l_mix_sic',       &
-      "min PBL mixing length "//clnsurf(4),"m", (/ ('', i=1, 9) /)) /)
+      ctrl_out((/ 10, 10, 10, 10, 10, 10, 11, 11, 11, 11/),'l_mix_ter',       &
+      "min PBL mixing length "//clnsurf(1),"m", (/ ('', i=1, 10) /)), &
+      ctrl_out((/ 10, 10, 10, 10, 10, 10, 11, 11, 11, 11/),'l_mix_lic',       &
+      "min PBL mixing length "//clnsurf(2),"m", (/ ('', i=1, 10) /)), &
+      ctrl_out((/ 10, 10, 10, 10, 10, 10, 11, 11, 11, 11/),'l_mix_oce',       &
+      "min PBL mixing length "//clnsurf(3),"m", (/ ('', i=1, 10) /)), &
+      ctrl_out((/ 10, 10, 10, 10, 10, 10, 11, 11, 11, 11/),'l_mix_sic',       &
+      "min PBL mixing length "//clnsurf(4),"m", (/ ('', i=1, 10) /)) /)
 
   TYPE(ctrl_out), SAVE, DIMENSION(4) :: o_tke_max_srf  = (/                          &
-      ctrl_out((/ 10, 4, 10, 10, 10, 10, 11, 11, 11 /),'tke_max_ter',                &
+      ctrl_out((/ 10, 4, 10, 10, 10, 10, 11, 11, 11, 11/),'tke_max_ter',                &
       "Max Turb. Kinetic Energy "//clnsurf(1),"-",                                   &
       (/ "t_max(X)", "t_max(X)", "t_max(X)", "t_max(X)", "t_max(X)", &
-         "t_max(X)", "t_max(X)", "t_max(X)", "t_max(X)" /)), &
-      ctrl_out((/ 10, 4, 10, 10, 10, 10, 11, 11, 11 /),'tke_max_lic',                &
+         "t_max(X)", "t_max(X)", "t_max(X)", "t_max(X)", "t_max(X)" /)), &
+      ctrl_out((/ 10, 4, 10, 10, 10, 10, 11, 11, 11, 11/),'tke_max_lic',                &
       "Max Turb. Kinetic Energy "//clnsurf(2),"-",                                   &
       (/ "t_max(X)", "t_max(X)", "t_max(X)", "t_max(X)", "t_max(X)", &
-         "t_max(X)", "t_max(X)", "t_max(X)", "t_max(X)" /)), &
-      ctrl_out((/ 10, 4, 10, 10, 10, 10, 11, 11, 11 /),'tke_max_oce',                &
+         "t_max(X)", "t_max(X)", "t_max(X)", "t_max(X)", "t_max(X)" /)), &
+      ctrl_out((/ 10, 4, 10, 10, 10, 10, 11, 11, 11, 11/),'tke_max_oce',                &
       "Max Turb. Kinetic Energy "//clnsurf(3),"-",                                   &
       (/ "t_max(X)", "t_max(X)", "t_max(X)", "t_max(X)", "t_max(X)", &
-         "t_max(X)", "t_max(X)", "t_max(X)", "t_max(X)" /)), &
-      ctrl_out((/ 10, 4, 10, 10, 10, 10, 11, 11, 11 /),'tke_max_sic',                &
+         "t_max(X)", "t_max(X)", "t_max(X)", "t_max(X)", "t_max(X)" /)), &
+      ctrl_out((/ 10, 4, 10, 10, 10, 10, 11, 11, 11, 11/),'tke_max_sic',                &
       "Max Turb. Kinetic Energy "//clnsurf(4),"-",                                   &
       (/ "t_max(X)", "t_max(X)", "t_max(X)", "t_max(X)", "t_max(X)", &
-         "t_max(X)", "t_max(X)", "t_max(X)", "t_max(X)" /)) /)
+         "t_max(X)", "t_max(X)", "t_max(X)", "t_max(X)", "t_max(X)" /)) /)
 
   TYPE(ctrl_out), SAVE, DIMENSION(4) :: o_dltpbltke_srf      = (/             &
-      ctrl_out((/ 10, 4, 10, 10, 10, 10, 11, 11, 11 /),'dltpbltke_ter',       &
-      "TKE difference (w - x) "//clnsurf(1),"-", (/ ('', i=1, 9) /)), &
-      ctrl_out((/ 10, 4, 10, 10, 10, 10, 11, 11, 11 /),'dltpbltke_lic',       &
-      "TKE difference (w - x) "//clnsurf(2),"-", (/ ('', i=1, 9) /)), &
-      ctrl_out((/ 10, 4, 10, 10, 10, 10, 11, 11, 11 /),'dltpbltke_oce',       &
-      "TKE difference (w - x) "//clnsurf(3),"-", (/ ('', i=1, 9) /)), &
-      ctrl_out((/ 10, 4, 10, 10, 10, 10, 11, 11, 11 /),'dltpbltke_sic',       &
-      "TKE difference (w - x) "//clnsurf(4),"-", (/ ('', i=1, 9) /)) /)
-
-  TYPE(ctrl_out), SAVE :: o_kz = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'kz', 'Kz melange', 'm2/s', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_kz_max = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11 /), &
+      ctrl_out((/ 10, 4, 10, 10, 10, 10, 11, 11, 11, 11/),'dltpbltke_ter',       &
+      "TKE difference (w - x) "//clnsurf(1),"-", (/ ('', i=1, 10) /)), &
+      ctrl_out((/ 10, 4, 10, 10, 10, 10, 11, 11, 11, 11/),'dltpbltke_lic',       &
+      "TKE difference (w - x) "//clnsurf(2),"-", (/ ('', i=1, 10) /)), &
+      ctrl_out((/ 10, 4, 10, 10, 10, 10, 11, 11, 11, 11/),'dltpbltke_oce',       &
+      "TKE difference (w - x) "//clnsurf(3),"-", (/ ('', i=1, 10) /)), &
+      ctrl_out((/ 10, 4, 10, 10, 10, 10, 11, 11, 11, 11/),'dltpbltke_sic',       &
+      "TKE difference (w - x) "//clnsurf(4),"-", (/ ('', i=1, 10) /)) /)
+
+  TYPE(ctrl_out), SAVE :: o_kz = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'kz', 'Kz melange', 'm2/s', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_kz_max = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
     'kz_max', 'Kz melange max', 'm2/s',                                  &
       (/ 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', &
-         't_max(X)', "t_max(X)", "t_max(X)", "t_max(X)" /))
-  TYPE(ctrl_out), SAVE :: o_SWnetOR = ctrl_out((/ 10, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'SWnetOR', 'Sfce net SW radiation OR', 'W/m2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_SWdownOR = ctrl_out((/ 10, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'SWdownOR', 'Sfce incident SW radiation OR', 'W/m2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_LWdownOR = ctrl_out((/ 10, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'LWdownOR', 'Sfce incident LW radiation OR', 'W/m2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_snowl = ctrl_out((/ 10, 1, 10, 10, 10, 10, 11, 11, 11 /), &
-    'snowl', 'Solid Large-scale Precip.', 'kg/(m2*s)', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_cape_max = ctrl_out((/ 10, 1, 10, 10, 10, 10, 11, 11, 11 /), &
+         't_max(X)', "t_max(X)", "t_max(X)", "t_max(X)", "t_max(X)" /))
+  TYPE(ctrl_out), SAVE :: o_SWnetOR = ctrl_out((/ 10, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'SWnetOR', 'Sfce net SW radiation OR', 'W/m2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_SWdownOR = ctrl_out((/ 10, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'SWdownOR', 'Sfce incident SW radiation OR', 'W/m2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_LWdownOR = ctrl_out((/ 10, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'LWdownOR', 'Sfce incident LW radiation OR', 'W/m2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_snowl = ctrl_out((/ 10, 1, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'snowl', 'Solid Large-scale Precip.', 'kg/(m2*s)', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_cape_max = ctrl_out((/ 10, 1, 10, 10, 10, 10, 11, 11, 11, 11/), &
     'cape_max', 'CAPE max.', 'J/kg',                                       &
       (/ "t_max(X)", "t_max(X)", "t_max(X)", "t_max(X)", "t_max(X)", &
-         "t_max(X)", "t_max(X)", "t_max(X)", "t_max(X)" /))
-  TYPE(ctrl_out), SAVE :: o_solldown = ctrl_out((/ 10, 1, 10, 10, 10, 10, 11, 11, 11 /), &
-    'solldown', 'Down. IR rad. at surface', 'W/m2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_dtsvdfo = ctrl_out((/ 10, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'dtsvdfo', 'Boundary-layer dTs(o)', 'K/s', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_dtsvdft = ctrl_out((/ 10, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'dtsvdft', 'Boundary-layer dTs(t)', 'K/s', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_dtsvdfg = ctrl_out((/ 10, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'dtsvdfg', 'Boundary-layer dTs(g)', 'K/s', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_dtsvdfi = ctrl_out((/ 10, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'dtsvdfi', 'Boundary-layer dTs(g)', 'K/s', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_z0m = ctrl_out((/ 10, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'z0m', 'roughness length, momentum', '-', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_z0h = ctrl_out((/ 10, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'z0h', 'roughness length, enthalpy', '-', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_topswad = ctrl_out((/ 2, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'topswad', 'ADE at TOA', 'W/m2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_topswad0 = ctrl_out((/ 2, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'topswad0', 'ADE clear-sky at TOA', 'W/m2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_topswai = ctrl_out((/ 2, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'topswai', 'AIE at TOA', 'W/m2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_solswad = ctrl_out((/ 2, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'solswad', 'ADE at SRF', 'W/m2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_solswad0 = ctrl_out((/ 2, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'solswad0', 'ADE clear-sky at SRF', 'W/m2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_solswai = ctrl_out((/ 2, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'solswai', 'AIE at SFR', 'W/m2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_toplwad = ctrl_out((/ 2, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'toplwad', 'LW-ADE at TOA', 'W/m2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_toplwad0 = ctrl_out((/ 2, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'toplwad0', 'LW-ADE clear-sky at TOA', 'W/m2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_toplwai = ctrl_out((/ 2, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'toplwai', 'LW-AIE at TOA', 'W/m2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_sollwad = ctrl_out((/ 2, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'sollwad', 'LW-ADE at SRF', 'W/m2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_sollwad0 = ctrl_out((/ 2, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'sollwad0', 'LW-ADE clear-sky at SRF', 'W/m2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_sollwai = ctrl_out((/ 2, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'sollwai', 'LW-AIE at SFR', 'W/m2', (/ ('', i=1, 9) /))
+         "t_max(X)", "t_max(X)", "t_max(X)", "t_max(X)", "t_max(X)" /))
+  TYPE(ctrl_out), SAVE :: o_solldown = ctrl_out((/ 10, 1, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'solldown', 'Down. IR rad. at surface', 'W/m2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_dtsvdfo = ctrl_out((/ 10, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'dtsvdfo', 'Boundary-layer dTs(o)', 'K/s', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_dtsvdft = ctrl_out((/ 10, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'dtsvdft', 'Boundary-layer dTs(t)', 'K/s', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_dtsvdfg = ctrl_out((/ 10, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'dtsvdfg', 'Boundary-layer dTs(g)', 'K/s', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_dtsvdfi = ctrl_out((/ 10, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'dtsvdfi', 'Boundary-layer dTs(g)', 'K/s', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_z0m = ctrl_out((/ 10, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'z0m', 'roughness length, momentum', '-', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_z0h = ctrl_out((/ 10, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'z0h', 'roughness length, enthalpy', '-', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_topswad = ctrl_out((/ 2, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'topswad', 'ADE at TOA', 'W/m2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_topswad0 = ctrl_out((/ 2, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'topswad0', 'ADE clear-sky at TOA', 'W/m2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_topswai = ctrl_out((/ 2, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'topswai', 'AIE at TOA', 'W/m2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_solswad = ctrl_out((/ 2, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'solswad', 'ADE at SRF', 'W/m2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_solswad0 = ctrl_out((/ 2, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'solswad0', 'ADE clear-sky at SRF', 'W/m2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_solswai = ctrl_out((/ 2, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'solswai', 'AIE at SFR', 'W/m2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_toplwad = ctrl_out((/ 2, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'toplwad', 'LW-ADE at TOA', 'W/m2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_toplwad0 = ctrl_out((/ 2, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'toplwad0', 'LW-ADE clear-sky at TOA', 'W/m2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_toplwai = ctrl_out((/ 2, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'toplwai', 'LW-AIE at TOA', 'W/m2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_sollwad = ctrl_out((/ 2, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'sollwad', 'LW-ADE at SRF', 'W/m2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_sollwad0 = ctrl_out((/ 2, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'sollwad0', 'LW-ADE clear-sky at SRF', 'W/m2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_sollwai = ctrl_out((/ 2, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    '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 /),'OD550_'//name_aero_tau(1),     &
-       "Aerosol Optical depth at 550 nm "//name_aero_tau(1),"1", (/ ('', i=1, 9) /)),     &
-       ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11 /),'OD550_'//name_aero_tau(2),        &
-       "Aerosol Optical depth at 550 nm "//name_aero_tau(2),"2", (/ ('', i=1, 9) /)),     &
-       ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11 /),'OD550_'//name_aero_tau(3),        &
-       "Aerosol Optical depth at 550 nm "//name_aero_tau(3),"3", (/ ('', i=1, 9) /)),     &
-       ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11 /),'OD550_'//name_aero_tau(4),        &
-       "Aerosol Optical depth at 550 nm "//name_aero_tau(4),"4", (/ ('', i=1, 9) /)),     &
-       ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11 /),'OD550_'//name_aero_tau(5),        &
-       "Aerosol Optical depth at 550 nm "//name_aero_tau(5),"5", (/ ('', i=1, 9) /)),     &
-       ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11 /),'OD550_'//name_aero_tau(6),        &
-       "Aerosol Optical depth at 550 nm "//name_aero_tau(6),"6", (/ ('', i=1, 9) /)),     &
-       ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11 /),'OD550_'//name_aero_tau(7),        &
-       "Aerosol Optical depth at 550 nm "//name_aero_tau(7),"7", (/ ('', i=1, 9) /)),     &
-       ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11 /),'OD550_'//name_aero_tau(8),        &
-       "Aerosol Optical depth at 550 nm "//name_aero_tau(8),"8", (/ ('', i=1, 9) /)),     &
-       ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11 /),'OD550_'//name_aero_tau(9),        &
-       "Aerosol Optical depth at 550 nm "//name_aero_tau(9),"9", (/ ('', i=1, 9) /)),     &
-       ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11 /),'OD550_'//name_aero_tau(10),       &
-       "Aerosol Optical depth at 550 nm "//name_aero_tau(10),"10", (/ ('', i=1, 9) /)),   &
-       ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11 /),'OD550_'//name_aero_tau(11),       &
-       "Aerosol Optical depth at 550 nm "//name_aero_tau(11),"11", (/ ('', i=1, 9) /)),   &
-       ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11 /),'OD550_'//name_aero_tau(12),       &
-       "Aerosol Optical depth at 550 nm "//name_aero_tau(12),"12", (/ ('', i=1, 9) /)),   &
-       ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11 /),'OD550_'//name_aero_tau(13),       &
-       "Aerosol Optical depth at 550 nm "//name_aero_tau(13),"13", (/ ('', i=1, 9) /)),   &
-       ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11 /),'OD550_'//name_aero_tau(14),       &
-       "Aerosol Optical depth at 550 nm "//name_aero_tau(14),"14", (/ ('', i=1, 9) /)) /)
+       (/ 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),        &
+       "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),        &
+       "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),        &
+       "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),        &
+       "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),        &
+       "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),        &
+       "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),        &
+       "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),        &
+       "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),       &
+       "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),       &
+       "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),       &
+       "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),       &
+       "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),       &
+       "Aerosol Optical depth at 550 nm "//name_aero_tau(14),"14", (/ ('', i=1, 10) /)) /)
 !
-  TYPE(ctrl_out), SAVE :: o_tausumaero_lw = ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11 /), &
-    'OD_10um_STRAT', 'Stratospheric Aerosol Optical depth at 10 um ', '1', (/ ('', i=1, 9) /))
+  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) /))
 !
-  TYPE(ctrl_out), SAVE :: o_od550aer = ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11 /), &
-    'od550aer', 'Total aerosol optical depth at 550nm', '-', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_od865aer = ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11 /), &
-    'od865aer', 'Total aerosol optical depth at 870nm', '-', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_absvisaer = ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11 /), &
-    'absvisaer', 'Absorption aerosol visible optical depth', '-', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_od550lt1aer = ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11 /), &
-    'od550lt1aer', 'Fine mode optical depth', '-', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_sconcso4 = ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11 /), &
-    'sconcso4', 'Surface Concentration of Sulfate ', 'kg/m3', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_sconcno3 = ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11 /), &
-    'sconcno3', 'Surface Concentration of Nitrate ', 'kg/m3', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_sconcoa = ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11 /), &
-    'sconcoa', 'Surface Concentration of Organic Aerosol ', 'kg/m3', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_sconcbc = ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11 /), &
-    'sconcbc', 'Surface Concentration of Black Carbon ', 'kg/m3', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_sconcss = ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11 /), &
-    'sconcss', 'Surface Concentration of Sea Salt ', 'kg/m3', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_sconcdust = ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11 /), &
-    'sconcdust', 'Surface Concentration of Dust ', 'kg/m3', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_concso4 = ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11 /), &
-    'concso4', 'Concentration of Sulfate ', 'kg/m3', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_concno3 = ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11 /), &
-    'concno3', 'Concentration of Nitrate ', 'kg/m3', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_concoa = ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11 /), &
-    'concoa', 'Concentration of Organic Aerosol ', 'kg/m3', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_concbc = ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11 /), &
-    'concbc', 'Concentration of Black Carbon ', 'kg/m3', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_concss = ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11 /), &
-    'concss', 'Concentration of Sea Salt ', 'kg/m3', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_concdust = ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11 /), &
-    'concdust', 'Concentration of Dust ', 'kg/m3', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_loadso4 = ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11 /), &
-    'loadso4', 'Column Load of Sulfate ', 'kg/m2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_loadoa = ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11 /), &
-    'loadoa', 'Column Load of Organic Aerosol ', 'kg/m2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_loadbc = ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11 /), &
-    'loadbc', 'Column Load of Black Carbon ', 'kg/m2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_loadss = ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11 /), &
-    'loadss', 'Column Load of Sea Salt ', 'kg/m2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_loaddust = ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11 /), &
-    'loaddust', 'Column Load of Dust ', 'kg/m2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_swtoaas_nat = ctrl_out((/ 4, 6, 10, 10, 10, 10, 11, 11, 11 /), &
-    'swtoaas_nat', 'Natural aerosol radiative forcing all-sky at TOA', 'W/m2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_swsrfas_nat = ctrl_out((/ 4, 6, 10, 10, 10, 10, 11, 11, 11 /), &
-    'swsrfas_nat', 'Natural aerosol radiative forcing all-sky at SRF', 'W/m2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_swtoacs_nat = ctrl_out((/ 4, 6, 10, 10, 10, 10, 11, 11, 11 /), &
-    'swtoacs_nat', 'Natural aerosol radiative forcing clear-sky at TOA', 'W/m2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_swsrfcs_nat = ctrl_out((/ 4, 6, 10, 10, 10, 10, 11, 11, 11 /), &
-    'swsrfcs_nat', 'Natural aerosol radiative forcing clear-sky at SRF', 'W/m2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_swtoaas_ant = ctrl_out((/ 4, 6, 10, 10, 10, 10, 11, 11, 11 /), &
-    'swtoaas_ant', 'Anthropogenic aerosol radiative forcing all-sky at TOA', 'W/m2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_swsrfas_ant = ctrl_out((/ 4, 6, 10, 10, 10, 10, 11, 11, 11 /), &
-    'swsrfas_ant', 'Anthropogenic aerosol radiative forcing all-sky at SRF', 'W/m2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_swtoacs_ant = ctrl_out((/ 4, 6, 10, 10, 10, 10, 11, 11, 11 /), &
-    'swtoacs_ant', 'Anthropogenic aerosol radiative forcing clear-sky at TOA', 'W/m2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_swsrfcs_ant = ctrl_out((/ 4, 6, 10, 10, 10, 10, 11, 11, 11 /), &
-    'swsrfcs_ant', 'Anthropogenic aerosol radiative forcing clear-sky at SRF', 'W/m2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_swtoacf_nat = ctrl_out((/ 4, 6, 10, 10, 10, 10, 11, 11, 11 /), &
-    'swtoacf_nat', 'Natural aerosol impact on cloud radiative forcing at TOA', 'W/m2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_swsrfcf_nat = ctrl_out((/ 4, 6, 10, 10, 10, 10, 11, 11, 11 /), &
-    'swsrfcf_nat', 'Natural aerosol impact on cloud radiative forcing  at SRF', 'W/m2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_swtoacf_ant = ctrl_out((/ 4, 6, 10, 10, 10, 10, 11, 11, 11 /), &
-    'swtoacf_ant', 'Anthropogenic aerosol impact on cloud radiative forcing at TOA', 'W/m2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_swsrfcf_ant = ctrl_out((/ 4, 6, 10, 10, 10, 10, 11, 11, 11 /), &
-    'swsrfcf_ant', 'Anthropogenic aerosol impact on cloud radiative forcing at SRF', 'W/m2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_swtoacf_zero = ctrl_out((/ 4, 6, 10, 10, 10, 10, 11, 11, 11 /), &
-    'swtoacf_zero', 'Cloud radiative forcing (allsky-clearsky fluxes) at TOA', 'W/m2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_swsrfcf_zero = ctrl_out((/ 4, 6, 10, 10, 10, 10, 11, 11, 11 /), &
-    'swsrfcf_zero', 'Cloud radiative forcing (allsky-clearsky fluxes) at SRF', 'W/m2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_cldncl = ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11 /), &
-    'cldncl', 'CDNC at top of liquid water cloud', 'm-3', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_reffclwtop = ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11 /), &
-    'reffclwtop', 'Droplet effective radius at top of liquid water cloud', 'm', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_cldnvi = ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11 /), &
-    'cldnvi', 'Column Integrated Cloud Droplet Number', 'm-2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_lcc = ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11 /), &
-    'lcc', 'Cloud liquid fraction at top of cloud', '1', (/ ('', i=1, 9) /))
+  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_od865aer = ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'od865aer', 'Total aerosol optical depth at 870nm', '-', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_absvisaer = ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'absvisaer', 'Absorption aerosol visible optical depth', '-', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_od550lt1aer = ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'od550lt1aer', 'Fine mode optical depth', '-', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_sconcso4 = ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'sconcso4', 'Surface Concentration of Sulfate ', 'kg/m3', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_sconcno3 = ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'sconcno3', 'Surface Concentration of Nitrate ', 'kg/m3', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_sconcoa = ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'sconcoa', 'Surface Concentration of Organic Aerosol ', 'kg/m3', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_sconcbc = ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'sconcbc', 'Surface Concentration of Black Carbon ', 'kg/m3', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_sconcss = ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'sconcss', 'Surface Concentration of Sea Salt ', 'kg/m3', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_sconcdust = ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'sconcdust', 'Surface Concentration of Dust ', 'kg/m3', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_concso4 = ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'concso4', 'Concentration of Sulfate ', 'kg/m3', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_concno3 = ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'concno3', 'Concentration of Nitrate ', 'kg/m3', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_concoa = ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'concoa', 'Concentration of Organic Aerosol ', 'kg/m3', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_concbc = ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'concbc', 'Concentration of Black Carbon ', 'kg/m3', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_concss = ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'concss', 'Concentration of Sea Salt ', 'kg/m3', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_concdust = ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'concdust', 'Concentration of Dust ', 'kg/m3', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_loadso4 = ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'loadso4', 'Column Load of Sulfate ', 'kg/m2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_loadoa = ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'loadoa', 'Column Load of Organic Aerosol ', 'kg/m2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_loadbc = ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'loadbc', 'Column Load of Black Carbon ', 'kg/m2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_loadss = ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'loadss', 'Column Load of Sea Salt ', 'kg/m2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_loaddust = ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'loaddust', 'Column Load of Dust ', 'kg/m2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_swtoaas_nat = ctrl_out((/ 4, 6, 10, 10, 10, 10, 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/), &
+    '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/), &
+    '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/), &
+    '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/), &
+    '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/), &
+    '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/), &
+    '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/), &
+    '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/), &
+    '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/), &
+    '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/), &
+    '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/), &
+    '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/), &
+    '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/), &
+    '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/), &
+    'cldncl', 'CDNC at top of liquid water cloud', 'm-3', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_reffclwtop = ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'reffclwtop', 'Droplet effective radius at top of liquid water cloud', 'm', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_cldnvi = ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'cldnvi', 'Column Integrated Cloud Droplet Number', 'm-2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_lcc = ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'lcc', 'Cloud liquid fraction at top of cloud', '1', (/ ('', i=1, 10) /))
 
 #ifdef CPP_StratAer
-  TYPE(ctrl_out), SAVE :: o_ext_strat_550 = ctrl_out((/ 1, 6, 7, 10, 10, 10, 11, 11, 11 /), &
-    'ext_strat_550', 'Strat. aerosol extinction coefficient at 550 nm', '1/m', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_ext_strat_1020 = ctrl_out((/ 1, 6, 7, 10, 10, 10, 11, 11, 11 /), &
-    'ext_strat_1020', 'Strat. aerosol extinction coefficient at 1020 nm', '1/m', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_tau_strat_550 = ctrl_out((/ 1, 6, 7, 10, 10, 10, 11, 11, 11 /), &
-    'OD550_strat_only', 'Stratospheric Aerosol Optical depth at 550 nm ', '1', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_tau_strat_1020 = ctrl_out((/ 1, 6, 7, 10, 10, 10, 11, 11, 11 /), &
-    'OD1020_strat_only', 'Stratospheric Aerosol Optical depth at 1020 nm ', '1', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_sulf_convert = ctrl_out((/ 1, 6, 7, 10, 10, 10, 11, 11, 11 /), &
-    'sulf_convert', 'SO2 mass flux converted to H2SO4', 'kg(S)/m2/layer/s', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_sulf_nucl = ctrl_out((/ 1, 6, 7, 10, 10, 10, 11, 11, 11 /), &
-    'sulf_nucl', 'H2SO4 nucleation mass flux', 'kg(S)/m2/layer/s', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_sulf_cond_evap = ctrl_out((/ 1, 6, 7, 10, 10, 10, 11, 11, 11 /), &
-    'sulf_cond_evap', 'H2SO4 condensation/evaporation mass flux', 'kg(S)/m2/layer/s', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_ocs_convert = ctrl_out((/ 1, 6, 7, 10, 10, 10, 11, 11, 11 /), &
-    'ocs_convert', 'OCS mass flux converted to SO2', 'kg(S)/m2/layer/s', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_R2SO4 = ctrl_out((/ 1, 6, 7, 10, 10, 10, 11, 11, 11 /), &
-    'R2SO4', 'H2SO4 mass fraction in aerosol', '%', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_OCS_lifetime = ctrl_out((/ 1, 6, 7, 10, 10, 10, 11, 11, 11 /), &
-    'OCS_lifetime', 'OCS lifetime', 's', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_SO2_lifetime = ctrl_out((/ 1, 6, 7, 10, 10, 10, 11, 11, 11 /), &
-    'SO2_lifetime', 'SO2 lifetime', 's', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_SO2_backgr_tend = ctrl_out((/ 1, 6, 7, 10, 10, 10, 11, 11, 11 /), &
-    'SO2_backgr_tend', 'SO2 background tendency', 'kg(S)/m2/layer/s', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_OCS_backgr_tend = ctrl_out((/ 1, 6, 7, 10, 10, 10, 11, 11, 11 /), &
-    'OCS_backgr_tend', 'OCS background tendency', 'kg(S)/m2/layer/s', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_vsed_aer = ctrl_out((/ 1, 6, 7, 10, 10, 10, 11, 11, 11 /), &
-    'vsed_aer', 'Strat. aerosol sedimentation velocity (mass-weighted)', 'm/s', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_f_r_wet = ctrl_out((/ 1, 6, 7, 10, 10, 10, 11, 11, 11 /), &
-    'f_r_wet', 'Conversion factor dry to wet aerosol radius', '-', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_sulf_dep_dry = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'sulf_dep_dry', 'Sulfur dry deposition flux', 'kg(S)/m2/s', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_sulf_dep_wet = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'sulf_dep_wet', 'Sulfur wet deposition flux', 'kg(S)/m2/s', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_surf_PM25_sulf = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'surf_PM25_sulf', 'Sulfate PM2.5 concentration at the surface', 'ug/m3', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_p_tropopause = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'p_tropopause', 'Tropopause pressure', 'Pa', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_sfluxaer = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'sflux', 'Ground sedimentation flux of strat. particles', 'kg(S)/m2/s', (/ ('', i=1, 9) /))
+!--extinction coefficient
+  TYPE(ctrl_out), SAVE :: o_ext_strat_550 = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 1/), &
+    'ext_strat_550', 'Strat. aerosol extinction coefficient at 550 nm', '1/m', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_ext_strat_1020 = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 1/), &
+    'ext_strat_1020', 'Strat. aerosol extinction coefficient at 1020 nm', '1/m', (/ ('', i=1, 10) /))
+!--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) /))
+  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) /))
+!--chemistry
+  TYPE(ctrl_out), SAVE :: o_R2SO4 = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 1/), &
+    'R2SO4', 'H2SO4 mass fraction in aerosol', '%', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_OCS_lifetime = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 1/), &
+    'OCS_lifetime', 'OCS lifetime', 's', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_SO2_lifetime = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 1/), &
+    'SO2_lifetime', 'SO2 lifetime', 's', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_f_r_wet = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 1/), &
+    'f_r_wet', 'Conversion factor dry to wet aerosol radius', '-', (/ ('', i=1, 10) /))
+!--budget  3D
+  TYPE(ctrl_out), SAVE :: o_budg_3D_nucl = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 1/), &
+    'budg_3D_nucl', 'H2SO4 nucleation mass flux', 'kg(S)/m2/layer/s', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_budg_3D_cond_evap = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 1/), &
+    'budg_3D_cond_evap', 'H2SO4 condensation/evaporation mass flux', 'kg(S)/m2/layer/s', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_budg_3D_ocs_to_so2 = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 1/), &
+    'budg_3D_ocs_to_so2', 'OCS mass flux converted to SO2', 'kg(S)/m2/layer/s', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_budg_3D_so2_to_h2so4 = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 1/), &
+    'budg_3D_so2_to_h2so4', 'SO2 mass flux converted to H2SO4', 'kg(S)/m2/layer/s', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_budg_3D_backgr_ocs = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 1/), &
+    'budg_3D_backgr_ocs', 'OCS background tendency', 'kg(S)/m2/layer/s', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_budg_3D_backgr_so2 = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 1/), &
+    'budg_3D_backgr_so2', 'SO2 background tendency', 'kg(S)/m2/layer/s', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_vsed_aer = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 1/), &
+    'vsed_aer', 'Strat. aerosol sedimentation velocity (mass-weighted)', 'm/s', (/ ('', i=1, 10) /))
+!--budget  2D
+  TYPE(ctrl_out), SAVE :: o_budg_dep_dry_h2so4 = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 1/), &
+    'budg_dep_dry_h2so4', 'H2SO4 dry deposition flux', 'kg(S)/m2/s', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_budg_dep_wet_h2so4 = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 1/), &
+    'budg_dep_wet_h2so4', 'H2SO4 wet deposition flux', 'kg(S)/m2/s', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_budg_dep_dry_part = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 1/), &
+    'budg_dep_dry_part', 'particle dry deposition flux', 'kg(S)/m2/s', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_budg_dep_wet_part = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 1/), &
+    'budg_dep_wet_part', 'particle wet deposition flux', 'kg(S)/m2/s', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_budg_emi_ocs = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 1/), &
+    'budg_emi_ocs', 'OCS emission flux', 'kg(S)/m2/s', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_budg_emi_so2 = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 1/), &
+    'budg_emi_so2', 'SO2 emission flux', 'kg(S)/m2/s', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_budg_emi_h2so4 = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 1/), &
+    'budg_emi_h2so4', 'H2SO4 emission flux', 'kg(S)/m2/s', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_budg_emi_part = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 1/), &
+    'budg_emi_part', 'Particle emission flux', 'kg(S)/m2/s', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_budg_ocs_to_so2 = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 1/), &
+    'budg_ocs_to_so2', 'OCS to SO2 flux', 'kg(S)/m2/s', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_budg_so2_to_h2so4 = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 1/), &
+    'budg_so2_to_h2so4', 'SO2 to H2SO4 flux', 'kg(S)/m2/s', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_budg_h2so4_to_part = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 1/), &
+    'budg_h2so4_to_part', 'H2SO4 to part flux', 'kg(S)/m2/s', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_budg_sed_part = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 1/), &
+    'budg_sed_part', 'Ground sedimentation flux of strat. particles', 'kg(S)/m2/s', (/ ('', i=1, 10) /))
+!--tropopause height
+  TYPE(ctrl_out), SAVE :: o_p_tropopause = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 1/), &
+    'p_tropopause', 'Tropopause pressure', 'Pa', (/ ('', i=1, 10) /))
+!--surface PM25 due to strat aerosol
+  TYPE(ctrl_out), SAVE :: o_surf_PM25_sulf = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 1/), &
+    'surf_PM25_sulf', 'Sulfate PM2.5 concentration at the surface', 'ug/m3', (/ ('', i=1, 10) /))
 #endif
 
 !!!!!!!!!!!!!!!!!!!!!! 3D !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 
-  TYPE(ctrl_out), SAVE :: o_ec550aer = ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11 /), &
-    'ec550aer', 'Extinction at 550nm', 'm^-1', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_lwcon = ctrl_out((/ 2, 5, 10, 10, 10, 10, 11, 11, 11 /), &
-    'lwcon', 'Cloud liquid water content', 'kg/kg', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_iwcon = ctrl_out((/ 2, 5, 10, 10, 10, 10, 11, 11, 11 /), &
-    'iwcon', 'Cloud ice water content', 'kg/kg', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_temp = ctrl_out((/ 2, 3, 4, 10, 10, 10, 11, 11, 11 /), &
-    'temp', 'Air temperature', 'K', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_theta = ctrl_out((/ 2, 3, 4, 10, 10, 10, 11, 11, 11 /), &
-    'theta', 'Potential air temperature', 'K', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_ovap = ctrl_out((/ 2, 3, 4, 10, 10, 10, 11, 11, 11 /), &
-    'ovap', 'Specific humidity', 'kg/kg', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_ovapinit = ctrl_out((/ 2, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'ovapinit', 'Specific humidity (begin of timestep)', 'kg/kg', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_oliq = ctrl_out((/ 2, 3, 4, 10, 10, 10, 11, 11, 11 /), &
-    'oliq', 'Liquid water', 'kg/kg', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_ocond = ctrl_out((/ 2, 3, 4, 10, 10, 10, 11, 11, 11 /), &
-    'ocond', 'Condensed water', 'kg/kg', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_wvapp = ctrl_out((/ 2, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'wvapp', '', '', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_geop = ctrl_out((/ 2, 3, 10, 10, 10, 10, 11, 11, 11 /), &
-    'geop', 'Geopotential height', 'm2/s2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_vitu = ctrl_out((/ 2, 3, 4, 6, 10, 10, 11, 11, 11 /), &
-    'vitu', 'Zonal wind', 'm/s', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_vitv = ctrl_out((/ 2, 3, 4, 6, 10, 10, 11, 11, 11 /), &
-    'vitv', 'Meridional wind', 'm/s', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_vitw = ctrl_out((/ 2, 3, 10, 6, 10, 10, 11, 11, 11 /), &
-    'vitw', 'Vertical wind', 'Pa/s', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_pres = ctrl_out((/ 2, 3, 10, 10, 10, 10, 11, 11, 11 /), &
-    'pres', 'Air pressure', 'Pa', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_paprs = ctrl_out((/ 2, 3, 10, 10, 10, 10, 11, 11, 11 /), &
-    'paprs', 'Air pressure Inter-Couches', 'Pa', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_mass = ctrl_out((/ 2, 3, 10, 10, 10, 10, 11, 11, 11 /), &
-    'mass', 'Masse Couches', 'kg/m2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_zfull = ctrl_out((/ 2, 3, 10, 10, 10, 10, 11, 11, 11 /), &
-    'zfull', 'Altitude of full pressure levels', 'm', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_zhalf = ctrl_out((/ 2, 3, 10, 10, 10, 10, 11, 11, 11 /), &
-    'zhalf', 'Altitude of half pressure levels', 'm', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_rneb = ctrl_out((/ 2, 5, 10, 10, 10, 10, 11, 11, 11 /), &
-    'rneb', 'Cloud fraction', '-', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_rnebjn = ctrl_out((/ 2, 5, 10, 10, 10, 10, 11, 11,11 /), &      
-    'rnebjn', 'Cloud fraction in day', '-', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_rnebcon = ctrl_out((/ 2, 5, 10, 10, 10, 10, 11, 11, 11 /), &
-    'rnebcon', 'Convective Cloud Fraction', '-', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_rnebls = ctrl_out((/ 2, 5, 10, 10, 10, 10, 11, 11, 11 /), &
-    'rnebls', 'LS Cloud fraction', '-', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_rhum = ctrl_out((/ 2, 5, 10, 10, 10, 10, 11, 11, 11 /), &
-    'rhum', 'Relative humidity', '-', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_ozone = ctrl_out((/ 2, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'ozone', 'Ozone mole fraction', '-', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_ozone_light = ctrl_out((/ 2, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'ozone_daylight', 'Daylight ozone mole fraction', '-', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_upwd = ctrl_out((/ 2, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'upwd', 'saturated updraft', 'kg/m2/s', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_epmax_diag = ctrl_out((/ 2, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'epmax', 'epmax en fn cape', 'su', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_ep = ctrl_out((/ 2, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'ep', 'ep', 'su', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_duphy = ctrl_out((/ 2, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'duphy', 'Physics du', 'm/s2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_dtphy = ctrl_out((/ 2, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'dtphy', 'Physics dT', 'K/s', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_dqphy = ctrl_out((/ 2, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'dqphy', 'Physics dQ', '(kg/kg)/s', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_dqphy2d = ctrl_out((/ 2, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'dqphy2d', 'Physics dQ', '(kg/m2)/s', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_dqlphy = ctrl_out((/ 2, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'dqlphy', 'Physics dQL', '(kg/kg)/s', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_dqlphy2d = ctrl_out((/ 2, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'dqlphy2d', 'Physics dQL', '(kg/m2)/s', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_dqsphy = ctrl_out((/ 2, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'dqsphy', 'Physics dQS', '(kg/kg)/s', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_dqsphy2d = ctrl_out((/ 2, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'dqsphy2d', 'Physics dQS', '(kg/m2)/s', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_pr_con_l = ctrl_out((/ 2, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'pr_con_l', 'Convective precipitation lic', ' ', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_pr_con_i = ctrl_out((/ 2, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'pr_con_i', 'Convective precipitation ice', ' ', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_pr_lsc_l = ctrl_out((/ 2, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'pr_lsc_l', 'Large scale precipitation lic', ' ', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_pr_lsc_i = ctrl_out((/ 2, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'pr_lsc_i', 'Large scale precipitation ice', ' ', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_re = ctrl_out((/ 5, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    're', 'Cloud droplet effective radius', 'um', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_fl = ctrl_out((/ 5, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'fl', 'Denominator of Cloud droplet effective radius', ' ', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_scdnc = ctrl_out((/ 2,  6, 10, 10, 10, 10, 11, 11, 11 /), &
-    'scdnc', 'Cloud droplet number concentration', 'm-3', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_reffclws = ctrl_out((/ 2,  6, 10, 10, 10, 10, 11, 11, 11 /), &
-    'reffclws', 'Stratiform Cloud Droplet Effective Radius (aerosol diags.)', 'm', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_reffclwc = ctrl_out((/ 2,  6, 10, 10, 10, 10, 11, 11, 11 /), &
-    'reffclwc', 'Convective Cloud Droplet Effective Radius (aerosol diags.)', 'm', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_lcc3d = ctrl_out((/ 2,  6, 10, 10, 10, 10, 11, 11, 11 /), &
-    'lcc3d', 'Cloud liquid fraction', '1', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_lcc3dcon = ctrl_out((/ 2,  6, 10, 10, 10, 10, 11, 11, 11 /), &
-    'lcc3dcon', 'Convective cloud liquid fraction', '1', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_lcc3dstra = ctrl_out((/ 2,  6, 10, 10, 10, 10, 11, 11, 11 /), &
-    'lcc3dstra', 'Stratiform cloud liquid fraction', '1', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_stratomask = ctrl_out((/ 2,  6, 10, 10, 10, 10, 11, 11, 11 /), &
-    'stratomask', 'Stratospheric fraction', '1', (/ ('', i=1, 9) /))
+  TYPE(ctrl_out), SAVE :: o_ec550aer = ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'ec550aer', 'Extinction at 550nm', 'm^-1', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_lwcon = ctrl_out((/ 2, 5, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'lwcon', 'Cloud liquid water content', 'kg/kg', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_iwcon = ctrl_out((/ 2, 5, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'iwcon', 'Cloud ice water content', 'kg/kg', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_temp = ctrl_out((/ 2, 3, 4, 10, 10, 10, 11, 11, 11, 11/), &
+    'temp', 'Air temperature', 'K', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_theta = ctrl_out((/ 2, 3, 4, 10, 10, 10, 11, 11, 11, 11/), &
+    'theta', 'Potential air temperature', 'K', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_ovap = ctrl_out((/ 2, 3, 4, 10, 10, 10, 11, 11, 11, 11/), &
+    'ovap', 'Specific humidity', 'kg/kg', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_ovapinit = ctrl_out((/ 2, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'ovapinit', 'Specific humidity (begin of timestep)', 'kg/kg', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_oliq = ctrl_out((/ 2, 3, 4, 10, 10, 10, 11, 11, 11, 11/), &
+    'oliq', 'Liquid water', 'kg/kg', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_ocond = ctrl_out((/ 2, 3, 4, 10, 10, 10, 11, 11, 11, 11/), &
+    'ocond', 'Condensed water', 'kg/kg', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_wvapp = ctrl_out((/ 2, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'wvapp', '', '', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_geop = ctrl_out((/ 2, 3, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'geop', 'Geopotential height', 'm2/s2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_vitu = ctrl_out((/ 2, 3, 4, 6, 10, 10, 11, 11, 11, 11/), &
+    'vitu', 'Zonal wind', 'm/s', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_vitv = ctrl_out((/ 2, 3, 4, 6, 10, 10, 11, 11, 11, 11/), &
+    'vitv', 'Meridional wind', 'm/s', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_vitw = ctrl_out((/ 2, 3, 10, 6, 10, 10, 11, 11, 11, 11/), &
+    'vitw', 'Vertical wind', 'Pa/s', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_pres = ctrl_out((/ 2, 3, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'pres', 'Air pressure', 'Pa', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_paprs = ctrl_out((/ 2, 3, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'paprs', 'Air pressure Inter-Couches', 'Pa', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_mass = ctrl_out((/ 2, 3, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'mass', 'Masse Couches', 'kg/m2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_zfull = ctrl_out((/ 2, 3, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'zfull', 'Altitude of full pressure levels', 'm', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_zhalf = ctrl_out((/ 2, 3, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'zhalf', 'Altitude of half pressure levels', 'm', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_rneb = ctrl_out((/ 2, 5, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'rneb', 'Cloud fraction', '-', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_rnebjn = ctrl_out((/ 2, 5, 10, 10, 10, 10, 11, 11,11, 11/), &      
+    'rnebjn', 'Cloud fraction in day', '-', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_rnebcon = ctrl_out((/ 2, 5, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'rnebcon', 'Convective Cloud Fraction', '-', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_rnebls = ctrl_out((/ 2, 5, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'rnebls', 'LS Cloud fraction', '-', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_rhum = ctrl_out((/ 2, 5, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'rhum', 'Relative humidity', '-', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_ozone = ctrl_out((/ 2, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'ozone', 'Ozone mole fraction', '-', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_ozone_light = ctrl_out((/ 2, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'ozone_daylight', 'Daylight ozone mole fraction', '-', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_upwd = ctrl_out((/ 2, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'upwd', 'saturated updraft', 'kg/m2/s', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_epmax_diag = ctrl_out((/ 2, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'epmax', 'epmax en fn cape', 'su', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_ep = ctrl_out((/ 2, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'ep', 'ep', 'su', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_duphy = ctrl_out((/ 2, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'duphy', 'Physics du', 'm/s2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_dtphy = ctrl_out((/ 2, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'dtphy', 'Physics dT', 'K/s', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_dqphy = ctrl_out((/ 2, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'dqphy', 'Physics dQ', '(kg/kg)/s', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_dqphy2d = ctrl_out((/ 2, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'dqphy2d', 'Physics dQ', '(kg/m2)/s', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_dqlphy = ctrl_out((/ 2, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'dqlphy', 'Physics dQL', '(kg/kg)/s', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_dqlphy2d = ctrl_out((/ 2, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'dqlphy2d', 'Physics dQL', '(kg/m2)/s', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_dqsphy = ctrl_out((/ 2, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'dqsphy', 'Physics dQS', '(kg/kg)/s', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_dqsphy2d = ctrl_out((/ 2, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'dqsphy2d', 'Physics dQS', '(kg/m2)/s', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_pr_con_l = ctrl_out((/ 2, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'pr_con_l', 'Convective precipitation lic', ' ', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_pr_con_i = ctrl_out((/ 2, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'pr_con_i', 'Convective precipitation ice', ' ', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_pr_lsc_l = ctrl_out((/ 2, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'pr_lsc_l', 'Large scale precipitation lic', ' ', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_pr_lsc_i = ctrl_out((/ 2, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'pr_lsc_i', 'Large scale precipitation ice', ' ', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_re = ctrl_out((/ 5, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    're', 'Cloud droplet effective radius', 'um', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_fl = ctrl_out((/ 5, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'fl', 'Denominator of Cloud droplet effective radius', ' ', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_scdnc = ctrl_out((/ 2,  6, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'scdnc', 'Cloud droplet number concentration', 'm-3', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_reffclws = ctrl_out((/ 2,  6, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'reffclws', 'Stratiform Cloud Droplet Effective Radius (aerosol diags.)', 'm', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_reffclwc = ctrl_out((/ 2,  6, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'reffclwc', 'Convective Cloud Droplet Effective Radius (aerosol diags.)', 'm', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_lcc3d = ctrl_out((/ 2,  6, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'lcc3d', 'Cloud liquid fraction', '1', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_lcc3dcon = ctrl_out((/ 2,  6, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'lcc3dcon', 'Convective cloud liquid fraction', '1', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_lcc3dstra = ctrl_out((/ 2,  6, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'lcc3dstra', 'Stratiform cloud liquid fraction', '1', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_stratomask = ctrl_out((/ 2,  6, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'stratomask', 'Stratospheric fraction', '1', (/ ('', i=1, 10) /))
 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 
   TYPE(ctrl_out), SAVE, DIMENSION(4) :: o_albe_srf     = (/ &
-      ctrl_out((/ 3, 7, 10, 7, 10, 10, 11, 11, 11 /),'albe_ter', "Albedo VIS surf. "//clnsurf(1),"-", (/ ('', i=1, 9) /)), &
-      ctrl_out((/ 3, 7, 10, 7, 10, 10, 11, 11, 11 /),'albe_lic', "Albedo VIS surf. "//clnsurf(2),"-", (/ ('', i=1, 9) /)), &
-      ctrl_out((/ 3, 7, 10, 7, 10, 10, 11, 11, 11 /),'albe_oce', "Albedo VIS surf. "//clnsurf(3),"-", (/ ('', i=1, 9) /)), &
-      ctrl_out((/ 3, 7, 10, 7, 10, 10, 11, 11, 11 /),'albe_sic', "Albedo VIS surf. "//clnsurf(4),"-", (/ ('', i=1, 9) /)) /)
+      ctrl_out((/ 3, 7, 10, 7, 10, 10, 11, 11, 11, 11/),'albe_ter', "Albedo VIS surf. "//clnsurf(1),"-", (/ ('', i=1, 10) /)), &
+      ctrl_out((/ 3, 7, 10, 7, 10, 10, 11, 11, 11, 11/),'albe_lic', "Albedo VIS surf. "//clnsurf(2),"-", (/ ('', i=1, 10) /)), &
+      ctrl_out((/ 3, 7, 10, 7, 10, 10, 11, 11, 11, 11/),'albe_oce', "Albedo VIS surf. "//clnsurf(3),"-", (/ ('', i=1, 10) /)), &
+      ctrl_out((/ 3, 7, 10, 7, 10, 10, 11, 11, 11, 11/),'albe_sic', "Albedo VIS surf. "//clnsurf(4),"-", (/ ('', i=1, 10) /)) /)
 
   TYPE(ctrl_out), SAVE, DIMENSION(4) :: o_ages_srf     = (/ &
-      ctrl_out((/ 10, 10, 10, 10, 10, 10, 11, 11, 11 /),'ages_ter', "Snow age", "day", (/ ('', i=1, 9) /)), &
-      ctrl_out((/ 3, 10, 10, 10, 10, 10, 11, 11, 11 /),'ages_lic', "Snow age", "day", (/ ('', i=1, 9) /)), &
-      ctrl_out((/ 10, 10, 10, 10, 10, 10, 11, 11, 11 /),'ages_oce',"Snow age", "day", (/ ('', i=1, 9) /)), &
-      ctrl_out((/ 3, 10, 10, 10, 10, 10, 11, 11, 11 /),'ages_sic',"Snow age", "day", (/ ('', i=1, 9) /)) /)
+      ctrl_out((/ 10, 10, 10, 10, 10, 10, 11, 11, 11, 11/),'ages_ter', "Snow age", "day", (/ ('', i=1, 10) /)), &
+      ctrl_out((/ 3, 10, 10, 10, 10, 10, 11, 11, 11, 11/),'ages_lic', "Snow age", "day", (/ ('', i=1, 10) /)), &
+      ctrl_out((/ 10, 10, 10, 10, 10, 10, 11, 11, 11, 11/),'ages_oce',"Snow age", "day", (/ ('', i=1, 10) /)), &
+      ctrl_out((/ 3, 10, 10, 10, 10, 10, 11, 11, 11, 11/),'ages_sic',"Snow age", "day", (/ ('', i=1, 10) /)) /)
 
   TYPE(ctrl_out), SAVE, DIMENSION(4) :: o_snow_srf     = (/ &
-      ctrl_out((/ 10, 10, 10, 10, 10, 10, 11, 11, 11 /),'snow_ter', "Snow", "kg/m2", (/ ('', i=1, 9) /)), &
-      ctrl_out((/ 3, 10, 10, 10, 10, 10, 11, 11, 11 /),'snow_lic', "Snow", "kg/m2", (/ ('', i=1, 9) /)), &
-      ctrl_out((/ 10, 10, 10, 10, 10, 10, 11, 11, 11 /),'snow_oce',"Snow", "kg/m2", (/ ('', i=1, 9) /)), &
-      ctrl_out((/ 3, 10, 10, 10, 10, 10, 11, 11, 11 /),'snow_sic',"Snow", "kg/m2", (/ ('', i=1, 9) /)) /)
+      ctrl_out((/ 10, 10, 10, 10, 10, 10, 11, 11, 11, 11/),'snow_ter', "Snow", "kg/m2", (/ ('', i=1, 10) /)), &
+      ctrl_out((/ 3, 10, 10, 10, 10, 10, 11, 11, 11, 11/),'snow_lic', "Snow", "kg/m2", (/ ('', i=1, 10) /)), &
+      ctrl_out((/ 10, 10, 10, 10, 10, 10, 11, 11, 11, 11/),'snow_oce',"Snow", "kg/m2", (/ ('', i=1, 10) /)), &
+      ctrl_out((/ 3, 10, 10, 10, 10, 10, 11, 11, 11, 11/),'snow_sic',"Snow", "kg/m2", (/ ('', i=1, 10) /)) /)
 
   TYPE(ctrl_out), SAVE, DIMENSION(4) :: o_z0m_srf     = (/ &
-      ctrl_out((/ 3, 6, 10, 10, 10, 10, 11, 11, 11 /),'z0m_ter', "Surface roughness "//clnsurf(1),"m", (/ ('', i=1, 9) /)), &
-      ctrl_out((/ 3, 6, 10, 10, 10, 10, 11, 11, 11 /),'z0m_lic', "Surface roughness "//clnsurf(2),"m", (/ ('', i=1, 9) /)), &
-      ctrl_out((/ 3, 6, 10, 10, 10, 10, 11, 11, 11 /),'z0m_oce', "Surface roughness "//clnsurf(3),"m", (/ ('', i=1, 9) /)), &
-      ctrl_out((/ 3, 6, 10, 10, 10, 10, 11, 11, 11 /),'z0m_sic', "Surface roughness "//clnsurf(4),"m", (/ ('', i=1, 9) /)) /)
+      ctrl_out((/ 3, 6, 10, 10, 10, 10, 11, 11, 11, 11/),'z0m_ter', "Surface roughness "//clnsurf(1),"m", (/ ('', i=1, 10) /)), &
+      ctrl_out((/ 3, 6, 10, 10, 10, 10, 11, 11, 11, 11/),'z0m_lic', "Surface roughness "//clnsurf(2),"m", (/ ('', i=1, 10) /)), &
+      ctrl_out((/ 3, 6, 10, 10, 10, 10, 11, 11, 11, 11/),'z0m_oce', "Surface roughness "//clnsurf(3),"m", (/ ('', i=1, 10) /)), &
+      ctrl_out((/ 3, 6, 10, 10, 10, 10, 11, 11, 11, 11/),'z0m_sic', "Surface roughness "//clnsurf(4),"m", (/ ('', i=1, 10) /)) /)
 
   TYPE(ctrl_out), SAVE, DIMENSION(4) :: o_z0h_srf     = (/ &
-      ctrl_out((/ 3, 6, 10, 10, 10, 10, 11, 11, 11 /),'z0h_ter', "Surface roughness "//clnsurf(1),"m", (/ ('', i=1, 9) /)), &
-      ctrl_out((/ 3, 6, 10, 10, 10, 10, 11, 11, 11 /),'z0h_lic', "Surface roughness "//clnsurf(2),"m", (/ ('', i=1, 9) /)), &
-      ctrl_out((/ 3, 6, 10, 10, 10, 10, 11, 11, 11 /),'z0h_oce', "Surface roughness "//clnsurf(3),"m", (/ ('', i=1, 9) /)), &
-      ctrl_out((/ 3, 6, 10, 10, 10, 10, 11, 11, 11 /),'z0h_sic', "Surface roughness "//clnsurf(4),"m", (/ ('', i=1, 9) /)) /)
-
-  TYPE(ctrl_out), SAVE :: o_alb1 = ctrl_out((/ 3, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'alb1', 'Surface VIS albedo', '-', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_alb2 = ctrl_out((/ 3, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'alb2', 'Surface Near IR albedo', '-', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_clwcon = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'clwcon', 'Convective Cloud Liquid water content', 'kg/kg', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_Ma = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'Ma', 'undilute adiab updraft', 'kg/m2/s', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_dnwd = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'dnwd', 'saturated downdraft', 'kg/m2/s', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_dnwd0 = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'dnwd0', 'unsat. downdraft', 'kg/m2/s', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_mc = ctrl_out((/ 4, 5, 10, 10, 10, 10, 11, 11, 11 /), &
-    'mc', 'Convective mass flux', 'kg/m2/s', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_ftime_con = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11 /), &
+      ctrl_out((/ 3, 6, 10, 10, 10, 10, 11, 11, 11, 11/),'z0h_ter', "Surface roughness "//clnsurf(1),"m", (/ ('', i=1, 10) /)), &
+      ctrl_out((/ 3, 6, 10, 10, 10, 10, 11, 11, 11, 11/),'z0h_lic', "Surface roughness "//clnsurf(2),"m", (/ ('', i=1, 10) /)), &
+      ctrl_out((/ 3, 6, 10, 10, 10, 10, 11, 11, 11, 11/),'z0h_oce', "Surface roughness "//clnsurf(3),"m", (/ ('', i=1, 10) /)), &
+      ctrl_out((/ 3, 6, 10, 10, 10, 10, 11, 11, 11, 11/),'z0h_sic', "Surface roughness "//clnsurf(4),"m", (/ ('', i=1, 10) /)) /)
+
+  TYPE(ctrl_out), SAVE :: o_alb1 = ctrl_out((/ 3, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'alb1', 'Surface VIS albedo', '-', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_alb2 = ctrl_out((/ 3, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'alb2', 'Surface Near IR albedo', '-', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_clwcon = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'clwcon', 'Convective Cloud Liquid water content', 'kg/kg', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_Ma = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'Ma', 'undilute adiab updraft', 'kg/m2/s', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_dnwd = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'dnwd', 'saturated downdraft', 'kg/m2/s', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_dnwd0 = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'dnwd0', 'unsat. downdraft', 'kg/m2/s', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_mc = ctrl_out((/ 4, 5, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'mc', 'Convective mass flux', 'kg/m2/s', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_ftime_con = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
     'ftime_con', 'Fraction of time convection Occurs', ' ',                 &
-      (/ 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)' /))
-  TYPE(ctrl_out), SAVE :: o_dtdyn = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'dtdyn', 'Dynamics dT', 'K/s', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_dqdyn = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'dqdyn', 'Dynamics dQ', '(kg/kg)/s', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_dqdyn2d = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'dqdyn2d', 'Dynamics dQ', '(kg/m2)/s', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_dqldyn = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'dqldyn', 'Dynamics dQL', '(kg/kg)/s', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_dqldyn2d = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'dqldyn2d', 'Dynamics dQL', '(kg/m2)/s', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_dqsdyn = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'dqsdyn', 'Dynamics dQS', '(kg/kg)/s', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_dqsdyn2d = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'dqsdyn2d', 'Dynamics dQS', '(kg/m2)/s', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_dudyn = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'dudyn', 'Dynamics dU', 'm/s2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_dvdyn = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'dvdyn', 'Dynamics dV', 'm/s2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_dtcon = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'dtcon', 'Convection dT', 'K/s', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_ducon = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'ducon', 'Convection du', 'm/s2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_dvcon = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'dvcon', 'Convection dv', 'm/s2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_dqcon = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'dqcon', 'Convection dQ', '(kg/kg)/s', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_dqcon2d = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'dqcon2d', 'Convection dQ', '(kg/m2)/s', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_dtwak = ctrl_out((/ 4, 5, 10, 10, 10, 10, 11, 11, 11 /), &
-    'dtwak', 'Wake dT', 'K/s', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_dqwak = ctrl_out((/ 4, 5, 10, 10, 10, 10, 11, 11, 11 /), &
-    'dqwak', 'Wake dQ', '(kg/kg)/s', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_dqwak2d = ctrl_out((/ 4, 5, 10, 10, 10, 10, 11, 11, 11 /), &
-    'dqwak2d', 'Wake dQ', '(kg/m2)/s', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_wake_h = ctrl_out((/ 4, 5, 10, 10, 10, 10, 11, 11, 11 /), &
-    'wake_h', 'wake_h', '-', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_wake_s = ctrl_out((/ 4, 5, 10, 10, 10, 10, 11, 11, 11 /), &
-    'wake_s', 'wake_s', '-', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_wake_deltat = ctrl_out((/ 4, 5, 10, 10, 10, 10, 11, 11, 11 /), &
-    'wake_deltat', 'wake_deltat', ' ', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_wake_deltaq = ctrl_out((/ 4, 5, 10, 10, 10, 10, 11, 11, 11 /), &
-    'wake_deltaq', 'wake_deltaq', ' ', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_wake_omg = ctrl_out((/ 4, 5, 10, 10, 10, 10, 11, 11, 11 /), &
-    'wake_omg', 'wake_omg', ' ', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_wdtrainA = ctrl_out((/ 4, 5, 10,  4, 10, 10, 11, 11, 110 /), &
-    'wdtrainA', 'precipitation from AA', '-', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_wdtrainM = ctrl_out((/ 4, 5, 10,  4, 10, 10, 11, 11, 110 /), &
-    'wdtrainM', 'precipitation from mixture', '-', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_Vprecip = ctrl_out((/ 10, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'Vprecip', 'precipitation vertical profile', '-', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_ftd = ctrl_out((/ 4, 5, 10, 10, 10, 10, 11, 11, 11 /), &
-    'ftd', 'tend temp due aux descentes precip', '-', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_fqd = ctrl_out((/ 4, 5, 10, 10, 10, 10, 11, 11, 11 /), &
-    'fqd', 'tend vap eau due aux descentes precip', '-', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_dtlsc = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'dtlsc', 'Condensation dT', 'K/s', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_dtlschr = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'dtlschr', 'Large-scale condensational heating rate', 'K/s', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_dqlsc = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'dqlsc', 'Condensation dQ', '(kg/kg)/s', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_dqlsc2d = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'dqlsc2d', 'Condensation dQ', '(kg/m2)/s', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_beta_prec = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'beta_prec', 'LS Conversion rate to prec', '(kg/kg)/s', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_dtvdf = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'dtvdf', 'Boundary-layer dT', 'K/s', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_dtdis = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'dtdis', 'TKE dissipation dT', 'K/s', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_dqvdf = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'dqvdf', 'Boundary-layer dQ', '(kg/kg)/s', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_dqvdf2d = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'dqvdf2d', 'Boundary-layer dQ', '(kg/m2)/s', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_dteva = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'dteva', 'Reevaporation dT', 'K/s', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_dqeva = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'dqeva', 'Reevaporation dQ', '(kg/kg)/s', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_dqeva2d = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'dqeva2d', 'Reevaporation dQ', '(kg/m2)/s', (/ ('', i=1, 9) /))
+      (/ 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', & 
+         'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)' /))
+  TYPE(ctrl_out), SAVE :: o_dtdyn = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'dtdyn', 'Dynamics dT', 'K/s', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_dqdyn = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'dqdyn', 'Dynamics dQ', '(kg/kg)/s', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_dqdyn2d = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'dqdyn2d', 'Dynamics dQ', '(kg/m2)/s', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_dqldyn = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'dqldyn', 'Dynamics dQL', '(kg/kg)/s', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_dqldyn2d = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'dqldyn2d', 'Dynamics dQL', '(kg/m2)/s', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_dqsdyn = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'dqsdyn', 'Dynamics dQS', '(kg/kg)/s', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_dqsdyn2d = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'dqsdyn2d', 'Dynamics dQS', '(kg/m2)/s', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_dudyn = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'dudyn', 'Dynamics dU', 'm/s2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_dvdyn = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'dvdyn', 'Dynamics dV', 'm/s2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_dtcon = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'dtcon', 'Convection dT', 'K/s', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_ducon = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'ducon', 'Convection du', 'm/s2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_dvcon = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'dvcon', 'Convection dv', 'm/s2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_dqcon = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'dqcon', 'Convection dQ', '(kg/kg)/s', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_dqcon2d = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'dqcon2d', 'Convection dQ', '(kg/m2)/s', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_dtwak = ctrl_out((/ 4, 5, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'dtwak', 'Wake dT', 'K/s', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_dqwak = ctrl_out((/ 4, 5, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'dqwak', 'Wake dQ', '(kg/kg)/s', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_dqwak2d = ctrl_out((/ 4, 5, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'dqwak2d', 'Wake dQ', '(kg/m2)/s', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_wake_h = ctrl_out((/ 4, 5, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'wake_h', 'wake_h', '-', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_wake_s = ctrl_out((/ 4, 5, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'wake_s', 'wake_s', '-', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_wake_deltat = ctrl_out((/ 4, 5, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'wake_deltat', 'wake_deltat', ' ', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_wake_deltaq = ctrl_out((/ 4, 5, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'wake_deltaq', 'wake_deltaq', ' ', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_wake_omg = ctrl_out((/ 4, 5, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'wake_omg', 'wake_omg', ' ', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_wdtrainA = ctrl_out((/ 4, 5, 10,  4, 10, 10, 11, 11, 11, 11 /), &
+    'wdtrainA', 'precipitation from AA', '-', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_wdtrainM = ctrl_out((/ 4, 5, 10,  4, 10, 10, 11, 11, 11, 11 /), &
+    'wdtrainM', 'precipitation from mixture', '-', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_Vprecip = ctrl_out((/ 10, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'Vprecip', 'precipitation vertical profile', '-', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_ftd = ctrl_out((/ 4, 5, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'ftd', 'tend temp due aux descentes precip', '-', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_fqd = ctrl_out((/ 4, 5, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'fqd', 'tend vap eau due aux descentes precip', '-', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_dtlsc = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'dtlsc', 'Condensation dT', 'K/s', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_dtlschr = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'dtlschr', 'Large-scale condensational heating rate', 'K/s', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_dqlsc = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'dqlsc', 'Condensation dQ', '(kg/kg)/s', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_dqlsc2d = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'dqlsc2d', 'Condensation dQ', '(kg/m2)/s', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_beta_prec = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'beta_prec', 'LS Conversion rate to prec', '(kg/kg)/s', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_dtvdf = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'dtvdf', 'Boundary-layer dT', 'K/s', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_dtdis = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'dtdis', 'TKE dissipation dT', 'K/s', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_dqvdf = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'dqvdf', 'Boundary-layer dQ', '(kg/kg)/s', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_dqvdf2d = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'dqvdf2d', 'Boundary-layer dQ', '(kg/m2)/s', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_dteva = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'dteva', 'Reevaporation dT', 'K/s', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_dqeva = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'dqeva', 'Reevaporation dQ', '(kg/kg)/s', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_dqeva2d = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'dqeva2d', 'Reevaporation dQ', '(kg/m2)/s', (/ ('', i=1, 10) /))
 
 !!!!!!!!!!!!!!!! Specifique thermiques
-  TYPE(ctrl_out), SAVE :: o_dqlscth = ctrl_out((/ 10, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'dqlscth', 'dQ therm.', '(kg/kg)/s', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_dqlscth2d = ctrl_out((/ 10, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'dqlscth2d', 'dQ therm.', '(kg/m2)/s', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_dqlscst = ctrl_out((/ 10, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'dqlscst', 'dQ strat.', '(kg/kg)/s', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_dqlscst2d = ctrl_out((/ 10, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'dqlscst2d', 'dQ strat.', '(kg/m2)/s', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_dtlscth = ctrl_out((/ 10, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'dtlscth', 'dQ therm.', 'K/s', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_dtlscst = ctrl_out((/ 10, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'dtlscst', 'dQ strat.', 'K/s', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_plulth = ctrl_out((/ 10, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'plulth', 'Rainfall therm.', 'K/s', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_plulst = ctrl_out((/ 10, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'plulst', 'Rainfall strat.', 'K/s', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_lmaxth = ctrl_out((/ 10, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'lmaxth', "Upper level thermals", "", (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_ptconvth = ctrl_out((/ 10, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'ptconvth', 'POINTS CONVECTIFS therm.', ' ', (/ ('', i=1, 9) /))
+  TYPE(ctrl_out), SAVE :: o_dqlscth = ctrl_out((/ 10, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'dqlscth', 'dQ therm.', '(kg/kg)/s', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_dqlscth2d = ctrl_out((/ 10, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'dqlscth2d', 'dQ therm.', '(kg/m2)/s', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_dqlscst = ctrl_out((/ 10, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'dqlscst', 'dQ strat.', '(kg/kg)/s', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_dqlscst2d = ctrl_out((/ 10, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'dqlscst2d', 'dQ strat.', '(kg/m2)/s', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_dtlscth = ctrl_out((/ 10, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'dtlscth', 'dQ therm.', 'K/s', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_dtlscst = ctrl_out((/ 10, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'dtlscst', 'dQ strat.', 'K/s', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_plulth = ctrl_out((/ 10, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'plulth', 'Rainfall therm.', 'K/s', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_plulst = ctrl_out((/ 10, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'plulst', 'Rainfall strat.', 'K/s', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_lmaxth = ctrl_out((/ 10, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'lmaxth', "Upper level thermals", "", (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_ptconvth = ctrl_out((/ 10, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'ptconvth', 'POINTS CONVECTIFS therm.', ' ', (/ ('', i=1, 10) /))
 !!!!!!!!!!!!!!!!!!!!!!!!
-  TYPE(ctrl_out), SAVE :: o_ptconv = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'ptconv', 'POINTS CONVECTIFS', ' ', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_ratqs = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'ratqs', 'RATQS', ' ', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_dtthe = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'dtthe', 'Thermal dT', 'K/s', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_duthe = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'duthe', 'Thermal du', 'm/s2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_dvthe = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'dvthe', 'Thermal dv', 'm/s2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_f_th = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'f_th', 'Thermal plume mass flux', 'kg/(m2*s)', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_e_th = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'e_th', 'Thermal plume entrainment', 'K/s', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_w_th = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'w_th', 'Thermal plume vertical velocity', 'm/s', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_lambda_th = ctrl_out((/ 10, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'lambda_th', 'Thermal plume vertical velocity', 'm/s', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_ftime_th = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'ftime_th', 'Fraction of time Shallow convection occurs', ' ', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_q_th = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'q_th', 'Thermal plume total humidity', 'kg/kg', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_a_th = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'a_th', "Thermal plume fraction", "", (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_d_th = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'd_th', 'Thermal plume detrainment', 'K/s', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_f0_th = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'f0_th', 'Thermal closure mass flux', 'K/s', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_zmax_th = ctrl_out((/ 4,  4,  4,  5, 10, 10, 11, 11, 11 /), &
-    'zmax_th', 'Thermal plume height', 'K/s', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_dqthe = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'dqthe', 'Thermal dQ', '(kg/kg)/s', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_dqthe2d = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'dqthe2d', 'Thermal dQ', '(kg/m2)/s', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_dtajs = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'dtajs', 'Dry adjust. dT', 'K/s', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_dqajs = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'dqajs', 'Dry adjust. dQ', '(kg/kg)/s', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_dqajs2d = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'dqajs2d', 'Dry adjust. dQ', '(kg/m2)/s', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_dtswr = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'dtswr', 'SW radiation dT', 'K/s', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_dtsw0 = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'dtsw0', 'CS SW radiation dT', 'K/s', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_dtlwr = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'dtlwr', 'LW radiation dT', 'K/s', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_dtlw0 = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'dtlw0', 'CS LW radiation dT', 'K/s', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_dtec = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'dtec', 'Cinetic dissip dT', 'K/s', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_duvdf = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'duvdf', 'Boundary-layer dU', 'm/s2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_dvvdf = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'dvvdf', 'Boundary-layer dV', 'm/s2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_duoro = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'duoro', 'Orography dU', 'm/s2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_dvoro = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'dvoro', 'Orography dV', 'm/s2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_dulif = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'dulif', 'Orography dU', 'm/s2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_dvlif = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'dvlif', 'Orography dV', 'm/s2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_du_gwd_hines = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'du_gwd_hines', 'Hines GWD dU', 'm/s2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_dv_gwd_hines = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'dv_gwd_hines', 'Hines GWD dV', 'm/s2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_du_gwd_front = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'du_gwd_front', 'Fronts GWD dU', 'm/s2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_dv_gwd_front = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'dv_gwd_front', 'Fronts GWD dV', 'm/s2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_east_gwstress = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'east_gwstress', 'Eastward GW Stress', 'Pa', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_west_gwstress = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'west_gwstress', 'Westward GW Stress', 'Pa', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_dtoro = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'dtoro', 'Orography dT', 'K/s', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_dtlif = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'dtlif', 'Orography dT', 'K/s', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_dthin = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'dthin', 'Hines GWD dT', 'K/s', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_dqch4 = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'dqch4', 'H2O due to CH4 oxidation & photolysis', '(kg/kg)/s', (/ ('', i=1, 9) /))
+  TYPE(ctrl_out), SAVE :: o_ptconv = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'ptconv', 'POINTS CONVECTIFS', ' ', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_ratqs = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'ratqs', 'RATQS', ' ', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_dtthe = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'dtthe', 'Thermal dT', 'K/s', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_duthe = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'duthe', 'Thermal du', 'm/s2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_dvthe = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'dvthe', 'Thermal dv', 'm/s2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_f_th = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'f_th', 'Thermal plume mass flux', 'kg/(m2*s)', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_e_th = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'e_th', 'Thermal plume entrainment', 'K/s', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_w_th = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'w_th', 'Thermal plume vertical velocity', 'm/s', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_lambda_th = ctrl_out((/ 10, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'lambda_th', 'Thermal plume vertical velocity', 'm/s', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_ftime_th = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'ftime_th', 'Fraction of time Shallow convection occurs', ' ', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_q_th = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'q_th', 'Thermal plume total humidity', 'kg/kg', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_a_th = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'a_th', "Thermal plume fraction", "", (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_d_th = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'd_th', 'Thermal plume detrainment', 'K/s', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_f0_th = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'f0_th', 'Thermal closure mass flux', 'K/s', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_zmax_th = ctrl_out((/ 4,  4,  4,  5, 10, 10, 11, 11, 11, 11/), &
+    'zmax_th', 'Thermal plume height', 'K/s', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_dqthe = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'dqthe', 'Thermal dQ', '(kg/kg)/s', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_dqthe2d = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'dqthe2d', 'Thermal dQ', '(kg/m2)/s', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_dtajs = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'dtajs', 'Dry adjust. dT', 'K/s', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_dqajs = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'dqajs', 'Dry adjust. dQ', '(kg/kg)/s', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_dqajs2d = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'dqajs2d', 'Dry adjust. dQ', '(kg/m2)/s', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_dtswr = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'dtswr', 'SW radiation dT', 'K/s', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_dtsw0 = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'dtsw0', 'CS SW radiation dT', 'K/s', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_dtlwr = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'dtlwr', 'LW radiation dT', 'K/s', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_dtlw0 = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'dtlw0', 'CS LW radiation dT', 'K/s', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_dtec = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'dtec', 'Cinetic dissip dT', 'K/s', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_duvdf = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'duvdf', 'Boundary-layer dU', 'm/s2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_dvvdf = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'dvvdf', 'Boundary-layer dV', 'm/s2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_duoro = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'duoro', 'Orography dU', 'm/s2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_dvoro = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'dvoro', 'Orography dV', 'm/s2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_dulif = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'dulif', 'Orography dU', 'm/s2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_dvlif = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'dvlif', 'Orography dV', 'm/s2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_du_gwd_hines = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'du_gwd_hines', 'Hines GWD dU', 'm/s2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_dv_gwd_hines = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'dv_gwd_hines', 'Hines GWD dV', 'm/s2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_du_gwd_front = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'du_gwd_front', 'Fronts GWD dU', 'm/s2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_dv_gwd_front = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'dv_gwd_front', 'Fronts GWD dV', 'm/s2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_east_gwstress = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'east_gwstress', 'Eastward GW Stress', 'Pa', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_west_gwstress = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'west_gwstress', 'Westward GW Stress', 'Pa', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_dtoro = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'dtoro', 'Orography dT', 'K/s', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_dtlif = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'dtlif', 'Orography dT', 'K/s', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_dthin = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'dthin', 'Hines GWD dT', 'K/s', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_dqch4 = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'dqch4', 'H2O due to CH4 oxidation & photolysis', '(kg/kg)/s', (/ ('', i=1, 10) /))
 
   type(ctrl_out), save:: o_du_gwd_rando &
-       = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11 /), 'du_gwd_rando', &
-       "Random gravity waves dU/dt", "m/s2", (/ ('', i=1, 9) /))
+       = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), 'du_gwd_rando', &
+       "Random gravity waves dU/dt", "m/s2", (/ ('', i=1, 10) /))
   type(ctrl_out), save:: o_dv_gwd_rando &
-       = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11 /), 'dv_gwd_rando', &
-       "Random gravity waves dV/dt", "m/s2", (/ ('', i=1, 9) /))
+       = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), 'dv_gwd_rando', &
+       "Random gravity waves dV/dt", "m/s2", (/ ('', i=1, 10) /))
   type(ctrl_out), save:: o_ustr_gwd_hines &
-       = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11 /), 'ustr_gwd_hines', &
-       "zonal wind stress Hines gravity waves", "Pa", (/ ('', i=1, 9) /))
+       = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), 'ustr_gwd_hines', &
+       "zonal wind stress Hines gravity waves", "Pa", (/ ('', i=1, 10) /))
   type(ctrl_out), save:: o_vstr_gwd_hines &
-       = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11 /), 'vstr_gwd_hines', &
-       "meridional wind stress Hines gravity waves", "Pa", (/ ('', i=1, 9) /))
+       = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), 'vstr_gwd_hines', &
+       "meridional wind stress Hines gravity waves", "Pa", (/ ('', i=1, 10) /))
   type(ctrl_out), save:: o_ustr_gwd_front &
-       = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11 /), 'ustr_gwd_front', &
-       "zonal wind stress fronts gravity waves", "Pa", (/ ('', i=1, 9) /))
+       = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), 'ustr_gwd_front', &
+       "zonal wind stress fronts gravity waves", "Pa", (/ ('', i=1, 10) /))
   type(ctrl_out), save:: o_vstr_gwd_front &
-       = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11 /), 'vstr_gwd_front', &
-       "meridional wind stress fronts gravity waves", "Pa", (/ ('', i=1, 9) /))
+       = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), 'vstr_gwd_front', &
+       "meridional wind stress fronts gravity waves", "Pa", (/ ('', i=1, 10) /))
   type(ctrl_out), save:: o_ustr_gwd_rando &
-       = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11 /), 'ustr_gwd_rando', &
-       "zonal wind stress random gravity waves", "Pa", (/ ('', i=1, 9) /))
+       = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), 'ustr_gwd_rando', &
+       "zonal wind stress random gravity waves", "Pa", (/ ('', i=1, 10) /))
   type(ctrl_out), save:: o_vstr_gwd_rando &
-       = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11 /), 'vstr_gwd_rando', &
-       "meridional wind stress random gravity waves", "Pa", (/ ('', i=1, 9) /))
+       = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), 'vstr_gwd_rando', &
+       "meridional wind stress random gravity waves", "Pa", (/ ('', i=1, 10) /))
 
   TYPE(ctrl_out), SAVE, ALLOCATABLE :: o_trac(:)
@@ -1593,146 +1616,146 @@
   TYPE(ctrl_out), SAVE, ALLOCATABLE :: o_dtr_dry(:)
 
-  TYPE(ctrl_out), SAVE :: o_rsu = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'rsu', 'SW upward radiation', 'W m-2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_rsd = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'rsd', 'SW downward radiation', 'W m-2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_rlu = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'rlu', 'LW upward radiation', 'W m-2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_rld = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'rld', 'LW downward radiation', 'W m-2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_rsucs = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'rsucs', 'SW CS upward radiation', 'W m-2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_rsdcs = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'rsdcs', 'SW CS downward radiation', 'W m-2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_rlucs = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'rlucs', 'LW CS upward radiation', 'W m-2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_rldcs = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'rldcs', 'LW CS downward radiation', 'W m-2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_tnt = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'tnt', 'Tendency of air temperature', 'K s-1', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_tntc = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'tntc', 'Tendency of air temperature due to Moist Convection', 'K s-1', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_tntr = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'tntr', 'Air temperature tendency due to Radiative heating', 'K s-1', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_tntscpbl = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11 /),                  &
+  TYPE(ctrl_out), SAVE :: o_rsu = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'rsu', 'SW upward radiation', 'W m-2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_rsd = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'rsd', 'SW downward radiation', 'W m-2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_rlu = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'rlu', 'LW upward radiation', 'W m-2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_rld = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'rld', 'LW downward radiation', 'W m-2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_rsucs = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'rsucs', 'SW CS upward radiation', 'W m-2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_rsdcs = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'rsdcs', 'SW CS downward radiation', 'W m-2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_rlucs = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'rlucs', 'LW CS upward radiation', 'W m-2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_rldcs = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'rldcs', 'LW CS downward radiation', 'W m-2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_tnt = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'tnt', 'Tendency of air temperature', 'K s-1', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_tntc = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'tntc', 'Tendency of air temperature due to Moist Convection', 'K s-1', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_tntr = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'tntr', 'Air temperature tendency due to Radiative heating', 'K s-1', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_tntscpbl = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/),                  &
     'tntscpbl', 'Air temperature tendency due to St cloud and precipitation and BL mixing', &
-      'K s-1', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_tnhus = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'tnhus', 'Tendency of specific humidity', 's-1', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_tnhusc = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'tnhusc', 'Tendency of specific humidity due to convection', 's-1', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_tnhusscpbl = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'tnhusscpbl', 'Tendency of Specific humidity due to ST cl, precip and BL mixing', 's-1', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_evu = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'evu', 'Eddy viscosity coefficient for Momentum Variables', 'm2 s-1', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_h2o = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'h2o', 'Mass Fraction of Water', '1', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_mcd = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'mcd', 'Downdraft COnvective Mass Flux', 'kg/(m2*s)', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_dmc = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'dmc', 'Deep COnvective Mass Flux', 'kg/(m2*s)', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_ref_liq = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'ref_liq', 'Effective radius of convective cloud liquid water particle', 'm', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_ref_ice = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'ref_ice', 'Effective radius of startiform cloud ice particle', 'm', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_rsut4co2 = ctrl_out((/ 5, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'rsut4co2', 'TOA Out SW in 4xCO2 atmosphere', 'W/m2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_rlut4co2 = ctrl_out((/ 5, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'rlut4co2', 'TOA Out LW in 4xCO2 atmosphere', 'W/m2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_rsutcs4co2 = ctrl_out((/ 5, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'rsutcs4co2', 'TOA Out CS SW in 4xCO2 atmosphere', 'W/m2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_rlutcs4co2 = ctrl_out((/ 5, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'rlutcs4co2', 'TOA Out CS LW in 4xCO2 atmosphere', 'W/m2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_rsu4co2 = ctrl_out((/ 5, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'rsu4co2', 'Upwelling SW 4xCO2 atmosphere', 'W/m2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_rlu4co2 = ctrl_out((/ 5, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'rlu4co2', 'Upwelling LW 4xCO2 atmosphere', 'W/m2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_rsucs4co2 = ctrl_out((/ 5, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'rsucs4co2', 'Upwelling CS SW 4xCO2 atmosphere', 'W/m2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_rlucs4co2 = ctrl_out((/ 5, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'rlucs4co2', 'Upwelling CS LW 4xCO2 atmosphere', 'W/m2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_rsd4co2 = ctrl_out((/ 5, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'rsd4co2', 'Downwelling SW 4xCO2 atmosphere', 'W/m2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_rld4co2 = ctrl_out((/ 5, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'rld4co2', 'Downwelling LW 4xCO2 atmosphere', 'W/m2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_rsdcs4co2 = ctrl_out((/ 5, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'rsdcs4co2', 'Downwelling CS SW 4xCO2 atmosphere', 'W/m2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_rldcs4co2 = ctrl_out((/ 5, 10, 10, 10, 10, 10, 11, 11, 11 /), &
-    'rldcs4co2', 'Downwelling CS LW 4xCO2 atmosphere', 'W/m2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_snowsrf = ctrl_out((/ 1, 1, 10, 1, 10, 10, 11, 11, 11 /), &
-    'snowsrf', 'Snow mass at surface', 'kg/m2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_qsnow = ctrl_out((/ 1, 1, 10, 1, 10, 10, 11, 11, 11 /), &
-    'qsnow', 'Water contained in snow', 'kg/m2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_snowhgt = ctrl_out((/ 1, 1, 10, 1, 10, 10, 11, 11, 11 /), &
-    'snowhgt', 'Snow height at surface', 'm', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_toice = ctrl_out((/ 1, 1, 10, 1, 10, 10, 11, 11, 11 /), &
-    'to_ice', 'Snow passed to ice model', 'kg/m2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_sissnow = ctrl_out((/ 1, 1, 10, 1, 10, 10, 11, 11, 11 /), &
-    'sissnow', 'Snow in snow model', 'kg/m2', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_runoff = ctrl_out((/ 1, 1, 10, 1, 10, 10, 11, 11, 11 /), &
-    'runoff', 'Run-off rate land ice', 'kg/m2/s', (/ ('', i=1, 9) /))
-  TYPE(ctrl_out), SAVE :: o_albslw3 = ctrl_out((/ 1, 1, 1, 1, 10, 10, 11, 11, 11 /), &
-    'albslw3', 'Surface albedo LW3', '-', (/ ('', i=1, 9) /))
+      'K s-1', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_tnhus = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'tnhus', 'Tendency of specific humidity', 's-1', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_tnhusc = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'tnhusc', 'Tendency of specific humidity due to convection', 's-1', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_tnhusscpbl = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'tnhusscpbl', 'Tendency of Specific humidity due to ST cl, precip and BL mixing', 's-1', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_evu = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'evu', 'Eddy viscosity coefficient for Momentum Variables', 'm2 s-1', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_h2o = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'h2o', 'Mass Fraction of Water', '1', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_mcd = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'mcd', 'Downdraft COnvective Mass Flux', 'kg/(m2*s)', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_dmc = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'dmc', 'Deep COnvective Mass Flux', 'kg/(m2*s)', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_ref_liq = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'ref_liq', 'Effective radius of convective cloud liquid water particle', 'm', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_ref_ice = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'ref_ice', 'Effective radius of startiform cloud ice particle', 'm', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_rsut4co2 = ctrl_out((/ 5, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'rsut4co2', 'TOA Out SW in 4xCO2 atmosphere', 'W/m2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_rlut4co2 = ctrl_out((/ 5, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'rlut4co2', 'TOA Out LW in 4xCO2 atmosphere', 'W/m2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_rsutcs4co2 = ctrl_out((/ 5, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'rsutcs4co2', 'TOA Out CS SW in 4xCO2 atmosphere', 'W/m2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_rlutcs4co2 = ctrl_out((/ 5, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'rlutcs4co2', 'TOA Out CS LW in 4xCO2 atmosphere', 'W/m2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_rsu4co2 = ctrl_out((/ 5, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'rsu4co2', 'Upwelling SW 4xCO2 atmosphere', 'W/m2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_rlu4co2 = ctrl_out((/ 5, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'rlu4co2', 'Upwelling LW 4xCO2 atmosphere', 'W/m2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_rsucs4co2 = ctrl_out((/ 5, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'rsucs4co2', 'Upwelling CS SW 4xCO2 atmosphere', 'W/m2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_rlucs4co2 = ctrl_out((/ 5, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'rlucs4co2', 'Upwelling CS LW 4xCO2 atmosphere', 'W/m2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_rsd4co2 = ctrl_out((/ 5, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'rsd4co2', 'Downwelling SW 4xCO2 atmosphere', 'W/m2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_rld4co2 = ctrl_out((/ 5, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'rld4co2', 'Downwelling LW 4xCO2 atmosphere', 'W/m2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_rsdcs4co2 = ctrl_out((/ 5, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'rsdcs4co2', 'Downwelling CS SW 4xCO2 atmosphere', 'W/m2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_rldcs4co2 = ctrl_out((/ 5, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'rldcs4co2', 'Downwelling CS LW 4xCO2 atmosphere', 'W/m2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_snowsrf = ctrl_out((/ 1, 1, 10, 1, 10, 10, 11, 11, 11, 11/), &
+    'snowsrf', 'Snow mass at surface', 'kg/m2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_qsnow = ctrl_out((/ 1, 1, 10, 1, 10, 10, 11, 11, 11, 11/), &
+    'qsnow', 'Water contained in snow', 'kg/m2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_snowhgt = ctrl_out((/ 1, 1, 10, 1, 10, 10, 11, 11, 11, 11/), &
+    'snowhgt', 'Snow height at surface', 'm', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_toice = ctrl_out((/ 1, 1, 10, 1, 10, 10, 11, 11, 11, 11/), &
+    'to_ice', 'Snow passed to ice model', 'kg/m2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_sissnow = ctrl_out((/ 1, 1, 10, 1, 10, 10, 11, 11, 11, 11/), &
+    'sissnow', 'Snow in snow model', 'kg/m2', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_runoff = ctrl_out((/ 1, 1, 10, 1, 10, 10, 11, 11, 11, 11/), &
+    'runoff', 'Run-off rate land ice', 'kg/m2/s', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_albslw3 = ctrl_out((/ 1, 1, 1, 1, 10, 10, 11, 11, 11, 11/), &
+    'albslw3', 'Surface albedo LW3', '-', (/ ('', i=1, 10) /))
 
 !!!!!!!!!!!!! Sorties niveaux standards de pression NMC 
-  TYPE(ctrl_out), SAVE :: o_tnondef = ctrl_out((/ 11, 11, 11, 11, 11, 11, 5, 5, 5 /), &
+  TYPE(ctrl_out), SAVE :: o_tnondef = ctrl_out((/ 11, 11, 11, 11, 11, 11, 5, 5, 5, 11/), &
        'tnondef', 'Undefined value of T', 'K', (/ "inst(X)", "inst(X)", "inst(X)", "inst(X)", &
-       "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)"  /))
-  TYPE(ctrl_out), SAVE :: o_ta = ctrl_out((/ 11, 11, 11, 11, 11, 11, 5, 5, 5 /), &
+       "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)"  /))
+  TYPE(ctrl_out), SAVE :: o_ta = ctrl_out((/ 11, 11, 11, 11, 11, 11, 5, 5, 5, 11/), &
        'ta', 'Air temperature', 'K', (/ "inst(X)", "inst(X)", "inst(X)", "inst(X)", &
-       "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)"  /))
-  TYPE(ctrl_out), SAVE :: o_zg  = ctrl_out((/ 11, 11, 11, 11, 11, 11, 5, 5, 5 /), &
+       "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)"  /))
+  TYPE(ctrl_out), SAVE :: o_zg  = ctrl_out((/ 11, 11, 11, 11, 11, 11, 5, 5, 5, 11/), &
        'zg', 'Geopotential height', 'm', (/ "inst(X)", "inst(X)", "inst(X)", "inst(X)", &
-       "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)"  /))
-  TYPE(ctrl_out), SAVE :: o_hus = ctrl_out((/ 11, 11, 11, 11, 11, 11, 5, 5, 5 /), &
+       "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)"  /))
+  TYPE(ctrl_out), SAVE :: o_hus = ctrl_out((/ 11, 11, 11, 11, 11, 11, 5, 5, 5, 11/), &
        'hus', 'Specific humidity', '1', (/ "inst(X)", "inst(X)", "inst(X)", "inst(X)", &
-       "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)"  /))                                                                                    
-  TYPE(ctrl_out), SAVE :: o_hur = ctrl_out((/ 11, 11, 11, 11, 11, 11, 5, 5, 5 /), &
+       "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)"  /))
+  TYPE(ctrl_out), SAVE :: o_hur = ctrl_out((/ 11, 11, 11, 11, 11, 11, 5, 5, 5, 11/), &
        'hur', 'Relative humidity', '%', (/ "inst(X)", "inst(X)", "inst(X)", "inst(X)", &
-       "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)"  /))
-  TYPE(ctrl_out), SAVE :: o_ua = ctrl_out((/ 11, 11, 11, 11, 11, 11, 5, 5, 5 /), &
+       "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)"  /))
+  TYPE(ctrl_out), SAVE :: o_ua = ctrl_out((/ 11, 11, 11, 11, 11, 11, 5, 5, 5, 11/), &
        'ua', 'Eastward wind', 'm s-1', (/ "inst(X)", "inst(X)", "inst(X)", "inst(X)", &
-       "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)"  /))
-  TYPE(ctrl_out), SAVE :: o_va = ctrl_out((/ 11, 11, 11, 11, 11, 11, 5, 5, 5 /), &
-       'va', 'Northward wind', 'm s-1', (/ ('', i=1, 9)/))
-  TYPE(ctrl_out), SAVE :: o_wap = ctrl_out((/ 11, 11, 11, 11, 11, 11, 5, 5, 5 /), &
+       "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)"  /))
+  TYPE(ctrl_out), SAVE :: o_va = ctrl_out((/ 11, 11, 11, 11, 11, 11, 5, 5, 5, 11/), &
+       'va', 'Northward wind', 'm s-1', (/ ('', i=1, 10)/))
+  TYPE(ctrl_out), SAVE :: o_wap = ctrl_out((/ 11, 11, 11, 11, 11, 11, 5, 5, 5, 11/), &
        'wap', 'Lagrangian tendency of air pressure', 'Pa s-1', (/ "inst(X)", "inst(X)", "inst(X)", &
-       "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)"  /))
-  TYPE(ctrl_out), SAVE :: o_psbg = ctrl_out((/ 11, 11, 11, 11, 11, 11, 5, 5, 5 /), &
+       "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)"  /))
+  TYPE(ctrl_out), SAVE :: o_psbg = ctrl_out((/ 11, 11, 11, 11, 11, 11, 5, 5, 5, 11/), &
        'psbg', 'Pressure sfce below ground', '%', (/ "inst(X)", "inst(X)", "inst(X)", &
-       "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)"  /))
-  TYPE(ctrl_out), SAVE :: o_tro3 = ctrl_out((/ 11, 11, 11, 11, 11, 11, 5, 5, 5 /), &
+       "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)"  /))
+  TYPE(ctrl_out), SAVE :: o_tro3 = ctrl_out((/ 11, 11, 11, 11, 11, 11, 5, 5, 5, 11/), &
        'tro3', 'Ozone mole fraction', '1e-9', (/ "inst(X)", "inst(X)", "inst(X)", &
-       "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)"  /))
-  TYPE(ctrl_out), SAVE :: o_tro3_daylight = ctrl_out((/ 11, 11, 11, 11, 11, 11, 5, 5, 5 /), &
+       "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)"  /))
+  TYPE(ctrl_out), SAVE :: o_tro3_daylight = ctrl_out((/ 11, 11, 11, 11, 11, 11, 5, 5, 5, 11/), &
        'tro3_daylight', 'Daylight ozone mole fraction', '1e-9', (/ "inst(X)", "inst(X)", "inst(X)", &
-       "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)"  /))
-  TYPE(ctrl_out), SAVE :: o_uxv = ctrl_out((/ 11, 11, 11, 11, 11, 11, 6, 6, 6 /), &
+       "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)"  /))
+  TYPE(ctrl_out), SAVE :: o_uxv = ctrl_out((/ 11, 11, 11, 11, 11, 11, 6, 6, 6, 11/), &
        'uv', 'uv', 'm2/s2', (/ "inst(X)", "inst(X)", "inst(X)", &
-       "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)"  /))
-  TYPE(ctrl_out), SAVE :: o_vxq = ctrl_out((/ 11, 11, 11, 11, 11, 11, 6, 6, 6 /), &
+       "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)"  /))
+  TYPE(ctrl_out), SAVE :: o_vxq = ctrl_out((/ 11, 11, 11, 11, 11, 11, 6, 6, 6, 11/), &
        'vxq', 'vxq', 'm/s * (kg/kg)', (/ "inst(X)", "inst(X)", "inst(X)", &
-       "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)"  /))                                                                                                    
-  TYPE(ctrl_out), SAVE :: o_vxT = ctrl_out((/ 11, 11, 11, 11, 11, 11, 6, 6, 6 /), &
+       "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)"  /))
+  TYPE(ctrl_out), SAVE :: o_vxT = ctrl_out((/ 11, 11, 11, 11, 11, 11, 6, 6, 6, 11/), &
        'vT', 'vT', 'mK/s', (/ "inst(X)", "inst(X)", "inst(X)", &
-       "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)"  /))                                                                                      
-  TYPE(ctrl_out), SAVE :: o_wxq = ctrl_out((/ 11, 11, 11, 11, 11, 11, 6, 6, 6 /), &
+       "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)"  /))
+  TYPE(ctrl_out), SAVE :: o_wxq = ctrl_out((/ 11, 11, 11, 11, 11, 11, 6, 6, 6, 11/), &
        'wq', 'wq', '(Pa/s)*(kg/kg)', (/ "inst(X)", "inst(X)", "inst(X)", &
-       "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)"  /))                                                                                
-  TYPE(ctrl_out), SAVE :: o_vxphi = ctrl_out((/ 11, 11, 11, 11, 11, 11, 6, 6, 6 /), &
+       "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)"  /))
+  TYPE(ctrl_out), SAVE :: o_vxphi = ctrl_out((/ 11, 11, 11, 11, 11, 11, 6, 6, 6, 11/), &
        'vphi', 'vphi', 'm2/s', (/ "inst(X)", "inst(X)", "inst(X)", &
-       "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)"  /))                                                                                 
-  TYPE(ctrl_out), SAVE :: o_wxT = ctrl_out((/ 11, 11, 11, 11, 11, 11, 6, 6, 6 /), &
+       "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)"  /))
+  TYPE(ctrl_out), SAVE :: o_wxT = ctrl_out((/ 11, 11, 11, 11, 11, 11, 6, 6, 6, 11/), &
        'wT', 'wT', '"K*Pa/s', (/ "inst(X)", "inst(X)", "inst(X)", &
-       "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)"  /))                                                                                     
-  TYPE(ctrl_out), SAVE :: o_uxu = ctrl_out((/ 11, 11, 11, 11, 11, 11, 6, 6, 6 /), &
+       "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)"  /)) 
+  TYPE(ctrl_out), SAVE :: o_uxu = ctrl_out((/ 11, 11, 11, 11, 11, 11, 6, 6, 6, 11/), &
        'u2', 'u2', 'm2/s2', (/ "inst(X)", "inst(X)", "inst(X)", &
-       "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)"  /))                                                                                                                                         
-  TYPE(ctrl_out), SAVE :: o_vxv = ctrl_out((/ 11, 11, 11, 11, 11, 11, 6, 6, 6 /), &
+       "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)"  /))
+  TYPE(ctrl_out), SAVE :: o_vxv = ctrl_out((/ 11, 11, 11, 11, 11, 11, 6, 6, 6, 11/), &
        'v2', 'v2', 'm2/s2', (/ "inst(X)", "inst(X)", "inst(X)", &
-       "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)"  /))                                                                               
-   TYPE(ctrl_out), SAVE :: o_TxT = ctrl_out((/ 11, 11, 11, 11, 11, 11, 6, 6, 6 /), &
+       "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)"  /))
+   TYPE(ctrl_out), SAVE :: o_TxT = ctrl_out((/ 11, 11, 11, 11, 11, 11, 6, 6, 6, 11/), &
        'T2', 'T2', 'K2', (/ "inst(X)", "inst(X)", "inst(X)", &
-       "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)"  /))                                                                                  
+       "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)"  /))
 
 #ifdef CPP_Dust
Index: LMDZ5/branches/testing/libf/phylmd/phys_output_mod.F90
===================================================================
--- LMDZ5/branches/testing/libf/phylmd/phys_output_mod.F90	(revision 2729)
+++ LMDZ5/branches/testing/libf/phylmd/phys_output_mod.F90	(revision 2787)
@@ -113,5 +113,5 @@
     INTEGER, DIMENSION(nfiles)            :: phys_out_filelevels
     CHARACTER(LEN=20), DIMENSION(nfiles)  :: chtimestep = (/ 'Default', 'Default', 'Default', 'Default', 'Default', &
-                                                             'Default', 'Default', 'Default', 'Default' /)
+                                                             'Default', 'Default', 'Default', 'Default', 'Default' /)
     LOGICAL, DIMENSION(nfiles)            :: phys_out_filekeys
     LOGICAL, DIMENSION(nfiles)            :: phys_out_filestations
@@ -120,14 +120,14 @@
     !                 entre [phys_out_lonmin,phys_out_lonmax] et [phys_out_latmin,phys_out_latmax]
 
-    LOGICAL, DIMENSION(nfiles), SAVE  :: phys_out_regfkey       = (/ .FALSE., .FALSE., .FALSE.,  .FALSE., &
-                                                                    .FALSE., .FALSE., .FALSE., .FALSE.,  .FALSE. /)
-    REAL, DIMENSION(nfiles), SAVE     :: phys_out_lonmin        = (/   -180.,   -180.,   -180.,    -180., &
-                                                                     -180.,   -180., -180.,   -180.,    -180. /)
-    REAL, DIMENSION(nfiles), SAVE     :: phys_out_lonmax        = (/    180.,    180.,    180.,     180., &
-                                                                      180.,    180., 180.,    180.,     180. /)
-    REAL, DIMENSION(nfiles), SAVE     :: phys_out_latmin        = (/    -90.,    -90.,    -90.,     -90., &
-                                                                    -90., -90., -90.,    -90.,     -90. /)
-    REAL, DIMENSION(nfiles), SAVE     :: phys_out_latmax        = (/  90.,     90.,     90.,     90., &
-                                                                    90., 90., 90., 90., 90. /)                        
+    LOGICAL, DIMENSION(nfiles), SAVE  :: phys_out_regfkey       = (/ .FALSE., .FALSE., .FALSE., .FALSE., .FALSE., &
+                                                                     .FALSE., .FALSE., .FALSE., .FALSE., .FALSE. /)
+    REAL, DIMENSION(nfiles), SAVE     :: phys_out_lonmin        = (/ -180., -180., -180., -180., -180., &
+                                                                     -180., -180., -180., -180., -180. /)
+    REAL, DIMENSION(nfiles), SAVE     :: phys_out_lonmax        = (/  180.,  180.,  180.,  180.,  180., &
+                                                                      180.,  180.,  180.,  180.,  180. /)
+    REAL, DIMENSION(nfiles), SAVE     :: phys_out_latmin        = (/  -90.,  -90.,  -90.,  -90.,  -90., &
+                                                                      -90.,  -90.,  -90.,  -90.,  -90. /)
+    REAL, DIMENSION(nfiles), SAVE     :: phys_out_latmax        = (/   90.,   90.,   90.,   90.,   90., &
+                                                                       90.,   90.,   90.,   90.,   90. /)                        
 #ifdef CPP_XIOS
     ! ug Variables utilis\'ees pour r\'ecup\'erer le calendrier pour xios
@@ -149,6 +149,5 @@
     ALLOCATE(o_dtr_dry(nqtot),o_dtr_vdf(nqtot))
 
-
-    levmax = (/ klev, klev, klev, klev, klev, klev, nlevSTD, nlevSTD, nlevSTD /)
+    levmax = (/ klev, klev, klev, klev, klev, klev, nlevSTD, nlevSTD, nlevSTD, klev /)
 
     phys_out_filenames(1) = 'histmth'
@@ -160,5 +159,6 @@
     phys_out_filenames(7) = 'histmthNMC'
     phys_out_filenames(8) = 'histdayNMC'
-    phys_out_filenames(9) = 'histhfNMC.nc'
+    phys_out_filenames(9) = 'histhfNMC'
+    phys_out_filenames(10)= 'histstrataer'
 
     type_ecri(1) = 'ave(X)'
@@ -171,4 +171,5 @@
     type_ecri(8) = 'inst(X)'
     type_ecri(9) = 'inst(X)'
+    type_ecri(10)= 'ave(X)'
 
     clef_files(1) = ok_mensuel
@@ -181,4 +182,9 @@
     clef_files(8) = ok_histNMC(2)
     clef_files(9) = ok_histNMC(3)
+#ifdef CPP_StratAer
+    clef_files(10)= .TRUE.
+#else
+    clef_files(10)= .FALSE.
+#endif
 
     !sortir des fichiers "stations" si clef_stations(:)=.TRUE.
@@ -192,4 +198,5 @@
     clef_stations(8) = .FALSE.
     clef_stations(9) = .FALSE.
+    clef_stations(10)= .FALSE.
 
     lev_files(1) = lev_histmth
@@ -202,4 +209,5 @@
     lev_files(8) = levout_histNMC(2)
     lev_files(9) = levout_histNMC(3)
+    lev_files(10)= 5
 
     ecrit_files(1) = ecrit_mth
@@ -212,4 +220,5 @@
     ecrit_files(8) = freq_outNMC(2)
     ecrit_files(9) = freq_outNMC(3)
+    ecrit_files(10)= ecrit_mth
 
     !! Lectures des parametres de sorties dans physiq.def
@@ -248,4 +257,5 @@
     WRITE(lunout,*)'phys_out_filestations=',clef_stations
     WRITE(lunout,*)'phys_out_filelevels=',lev_files
+    WRITE(lunout,*)'phys_out_regfkey=',phys_out_regfkey
 
 ! A noter pour
@@ -331,5 +341,5 @@
       print*,'phys_output_open: Declare vertical axes for each file'
     ENDIF
-   IF (iff.le.6) THEN
+   IF (iff.LE.6.OR.iff.EQ.10) THEN
     CALL wxios_add_vaxis("presnivs", &
             levmax(iff) - levmin(iff) + 1, presnivs(levmin(iff):levmax(iff)))
@@ -392,4 +402,9 @@
                   itau_phy,zjulian,dtime,nhorim(iff),nid_files(iff))
           ELSE
+
+             IF (prt_level >= 10) THEN
+             WRITE(lunout,*)'phys_output_open: iff=',iff,'  phys_out_filenames(iff)=',phys_out_filenames(iff)
+             ENDIF
+
              CALL histbeg_phy_all(phys_out_filenames(iff),itau_phy,zjulian,&
                  dtime,nhorim(iff),nid_files(iff))
@@ -397,5 +412,5 @@
 
 #ifndef CPP_IOIPSL_NO_OUTPUT 
-          IF (iff.le.6) THEN
+          IF (iff.LE.6.OR.iff.EQ.10) THEN
              CALL histvert(nid_files(iff), "presnivs", "Vertical levels", "Pa", &  
                levmax(iff) - levmin(iff) + 1, &
@@ -412,4 +427,5 @@
 
           ELSE
+          ! NMC files
              CALL histvert(nid_files(iff), "plev", "pressure", "Pa", &
                levmax(iff) - levmin(iff) + 1, &
@@ -424,81 +440,81 @@
             DO iq=nqo+1,nqtot 
             iiq=niadv(iq)
-            o_trac(iq-nqo) = ctrl_out((/ 1, 5, 5, 5, 10, 10, 11, 11, 11 /), &
+            o_trac(iq-nqo) = ctrl_out((/ 1, 5, 5, 5, 10, 10, 11, 11, 11, 11 /), &
                            tname(iiq),'Tracer '//ttext(iiq), "-",  &
-                           (/ '', '', '', '', '', '', '', '', '' /))
-            o_dtr_vdf(iq-nqo) = ctrl_out((/ 4, 7, 7, 7, 10, 10, 11, 11, 11 /), &
+                           (/ '', '', '', '', '', '', '', '', '', '' /))
+            o_dtr_vdf(iq-nqo) = ctrl_out((/ 4, 7, 7, 7, 10, 10, 11, 11, 11, 11 /), &
                               'd'//trim(tname(iq))//'_vdf',  &
                               'Tendance tracer '//ttext(iiq), "-" , &
-                              (/ '', '', '', '', '', '', '', '', '' /))
-
-            o_dtr_the(iq-nqo) = ctrl_out((/ 5, 7, 7, 7, 10, 10, 11, 11, 11 /), &
+                              (/ '', '', '', '', '', '', '', '', '', '' /))
+
+            o_dtr_the(iq-nqo) = ctrl_out((/ 5, 7, 7, 7, 10, 10, 11, 11, 11, 11 /), &
                               'd'//trim(tname(iq))//'_the', &
                               'Tendance tracer '//ttext(iiq), "-", &
-                              (/ '', '', '', '', '', '', '', '', '' /))
-
-            o_dtr_con(iq-nqo) = ctrl_out((/ 5, 7, 7, 7, 10, 10, 11, 11, 11 /), &
+                              (/ '', '', '', '', '', '', '', '', '', '' /))
+
+            o_dtr_con(iq-nqo) = ctrl_out((/ 5, 7, 7, 7, 10, 10, 11, 11, 11, 11 /), &
                               'd'//trim(tname(iq))//'_con', &
                               'Tendance tracer '//ttext(iiq), "-", &
-                              (/ '', '', '', '', '', '', '', '', '' /))
-
-            o_dtr_lessi_impa(iq-nqo) = ctrl_out((/ 7, 7, 7, 7, 10, 10, 11, 11, 11 /), &
+                              (/ '', '', '', '', '', '', '', '', '', '' /))
+
+            o_dtr_lessi_impa(iq-nqo) = ctrl_out((/ 7, 7, 7, 7, 10, 10, 11, 11, 11, 11 /), &
                                      'd'//trim(tname(iq))//'_lessi_impa', &
                                      'Tendance tracer '//ttext(iiq), "-", &
-                                     (/ '', '', '', '', '', '', '', '', '' /))
-
-            o_dtr_lessi_nucl(iq-nqo) = ctrl_out((/ 7, 7, 7, 7, 10, 10, 11, 11, 11 /), &
+                                     (/ '', '', '', '', '', '', '', '', '', '' /))
+
+            o_dtr_lessi_nucl(iq-nqo) = ctrl_out((/ 7, 7, 7, 7, 10, 10, 11, 11, 11, 11 /), &
                                      'd'//trim(tname(iq))//'_lessi_nucl', &
                                      'Tendance tracer '//ttext(iiq), "-", &
-                                     (/ '', '', '', '', '', '', '', '', '' /))
-
-            o_dtr_insc(iq-nqo) = ctrl_out((/ 7, 7, 7, 7, 10, 10, 11, 11, 11 /), &
+                                     (/ '', '', '', '', '', '', '', '', '', '' /))
+
+            o_dtr_insc(iq-nqo) = ctrl_out((/ 7, 7, 7, 7, 10, 10, 11, 11, 11, 11 /), &
                                'd'//trim(tname(iq))//'_insc', &
                                'Tendance tracer '//ttext(iiq), "-", &
-                               (/ '', '', '', '', '', '', '', '', '' /))
-
-            o_dtr_bcscav(iq-nqo) = ctrl_out((/ 7, 7, 7, 7, 10, 10, 11, 11, 11 /), &
+                               (/ '', '', '', '', '', '', '', '', '', '' /))
+
+            o_dtr_bcscav(iq-nqo) = ctrl_out((/ 7, 7, 7, 7, 10, 10, 11, 11, 11, 11 /), &
                                  'd'//trim(tname(iq))//'_bcscav', &
                                  'Tendance tracer '//ttext(iiq), "-", &
-                                 (/ '', '', '', '', '', '', '', '', '' /))
-
-            o_dtr_evapls(iq-nqo) = ctrl_out((/ 7, 7, 7, 7, 10, 10, 11, 11, 11 /), &
+                                 (/ '', '', '', '', '', '', '', '', '', '' /))
+
+            o_dtr_evapls(iq-nqo) = ctrl_out((/ 7, 7, 7, 7, 10, 10, 11, 11, 11, 11 /), &
                                  'd'//trim(tname(iq))//'_evapls', &
                                  'Tendance tracer '//ttext(iiq), "-", &
-                                 (/ '', '', '', '', '', '', '', '', '' /))
-
-            o_dtr_ls(iq-nqo) = ctrl_out((/ 7, 7, 7, 7, 10, 10, 11, 11, 11 /), &
+                                 (/ '', '', '', '', '', '', '', '', '', '' /))
+
+            o_dtr_ls(iq-nqo) = ctrl_out((/ 7, 7, 7, 7, 10, 10, 11, 11, 11, 11 /), &
                              'd'//trim(tname(iq))//'_ls', &
                              'Tendance tracer '//ttext(iiq), "-", &
-                             (/ '', '', '', '', '', '', '', '', '' /))
-
-            o_dtr_trsp(iq-nqo) = ctrl_out((/ 7, 7, 7, 7, 10, 10, 11, 11, 11 /), &
+                             (/ '', '', '', '', '', '', '', '', '', '' /))
+
+            o_dtr_trsp(iq-nqo) = ctrl_out((/ 7, 7, 7, 7, 10, 10, 11, 11, 11, 11 /), &
                                'd'//trim(tname(iq))//'_trsp', &
                                'Tendance tracer '//ttext(iiq), "-", &
-                               (/ '', '', '', '', '', '', '', '', '' /))
-
-            o_dtr_sscav(iq-nqo) = ctrl_out((/ 7, 7, 7, 7, 10, 10, 11, 11, 11 /), &
+                               (/ '', '', '', '', '', '', '', '', '', '' /))
+
+            o_dtr_sscav(iq-nqo) = ctrl_out((/ 7, 7, 7, 7, 10, 10, 11, 11, 11, 11 /), &
                                 'd'//trim(tname(iq))//'_sscav', &
                                 'Tendance tracer '//ttext(iiq), "-", &
-                                (/ '', '', '', '', '', '', '', '', '' /))
-
-            o_dtr_sat(iq-nqo) = ctrl_out((/ 7, 7, 7, 7, 10, 10, 11, 11, 11 /), &
+                                (/ '', '', '', '', '', '', '', '', '', '' /))
+
+            o_dtr_sat(iq-nqo) = ctrl_out((/ 7, 7, 7, 7, 10, 10, 11, 11, 11, 11 /), &
                                'd'//trim(tname(iq))//'_sat', &
                                'Tendance tracer '//ttext(iiq), "-", &
-                               (/ '', '', '', '', '', '', '', '', '' /))
-
-            o_dtr_uscav(iq-nqo) = ctrl_out((/ 7, 7, 7, 7, 10, 10, 11, 11, 11 /), &
+                               (/ '', '', '', '', '', '', '', '', '', '' /))
+
+            o_dtr_uscav(iq-nqo) = ctrl_out((/ 7, 7, 7, 7, 10, 10, 11, 11, 11, 11 /), &
                                 'd'//trim(tname(iq))//'_uscav', &
                                 'Tendance tracer '//ttext(iiq), "-", &
-                                 (/ '', '', '', '', '', '', '', '', '' /))
-
-            o_dtr_dry(iq-nqo) = ctrl_out((/ 7, 7, 7, 7, 10, 10, 11, 11, 11 /), &
+                                 (/ '', '', '', '', '', '', '', '', '', '' /))
+
+            o_dtr_dry(iq-nqo) = ctrl_out((/ 7, 7, 7, 7, 10, 10, 11, 11, 11, 11 /), &
                               'cum'//'d'//trim(tname(iq))//'_dry', &
                               'tracer tendency dry deposition'//ttext(iiq), "-", &
-                              (/ '', '', '', '', '', '', '', '', '' /))
-
-            o_trac_cum(iq-nqo) = ctrl_out((/ 1, 4, 10, 10, 10, 10, 11, 11, 11 /), &
+                              (/ '', '', '', '', '', '', '', '', '', '' /))
+
+            o_trac_cum(iq-nqo) = ctrl_out((/ 1, 4, 10, 10, 10, 10, 11, 11, 11, 11 /), &
                                'cum'//tname(iiq),&
                                'Cumulated tracer '//ttext(iiq), "-", &
-                               (/ '', '', '', '', '', '', '', '', '' /))
+                               (/ '', '', '', '', '', '', '', '', '', '' /))
             ENDDO
       ENDIF
@@ -547,5 +563,4 @@
     type=str(ipos+1:il)
 
-
     IF ( il == ipos ) THEN
        type='day'
Index: LMDZ5/branches/testing/libf/phylmd/phys_output_var_mod.F90
===================================================================
--- LMDZ5/branches/testing/libf/phylmd/phys_output_var_mod.F90	(revision 2729)
+++ LMDZ5/branches/testing/libf/phylmd/phys_output_var_mod.F90	(revision 2787)
@@ -46,5 +46,5 @@
 
   ! ug Plein de variables venues de phys_output_mod
-  INTEGER, PARAMETER                           :: nfiles = 9
+  INTEGER, PARAMETER                           :: nfiles = 10
   LOGICAL, DIMENSION(nfiles), SAVE             :: clef_files
   LOGICAL, DIMENSION(nfiles), SAVE             :: clef_stations
Index: LMDZ5/branches/testing/libf/phylmd/phys_output_write_mod.F90
===================================================================
--- LMDZ5/branches/testing/libf/phylmd/phys_output_write_mod.F90	(revision 2729)
+++ LMDZ5/branches/testing/libf/phylmd/phys_output_write_mod.F90	(revision 2787)
@@ -25,5 +25,5 @@
 
     USE dimphy, ONLY: klon, klev, klevp1
-    USE infotrac, ONLY: nbtr
+    USE infotrac_phy, ONLY: nbtr
     USE mod_phys_lmdz_para, ONLY: is_north_pole_phy,is_south_pole_phy
     USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat
@@ -115,5 +115,5 @@
          o_swsrfcs_nat, o_swsrfcf_ant, &
          o_swtoacf_zero, o_swsrfcf_zero, &
-         o_topswai, o_solswai, o_scdnc, &
+         o_topswai, o_solswai, o_toplwai, o_sollwai, o_scdnc, &
          o_cldncl, o_reffclws, o_reffclwc, o_stratomask,&
          o_cldnvi, o_lcc, o_lcc3d, o_lcc3dcon, &
@@ -185,7 +185,11 @@
 #ifdef CPP_StratAer
     USE phys_output_ctrlout_mod, ONLY:  & 
-         o_sulf_convert, o_sulf_nucl, o_sulf_cond_evap, o_ocs_convert, &
-         o_sfluxaer, o_R2SO4, o_OCS_lifetime, o_SO2_lifetime, &
-         o_OCS_backgr_tend, o_SO2_backgr_tend, o_sulf_dep_dry, o_sulf_dep_wet, &
+         o_budg_3D_nucl, o_budg_3D_cond_evap, o_budg_3D_ocs_to_so2, o_budg_3D_so2_to_h2so4, &
+         o_budg_sed_part, o_R2SO4, o_OCS_lifetime, o_SO2_lifetime, &
+         o_budg_3D_backgr_ocs, o_budg_3D_backgr_so2, & 
+         o_budg_dep_dry_h2so4, o_budg_dep_wet_h2so4, &
+         o_budg_dep_dry_part, o_budg_dep_wet_part, & 
+         o_budg_emi_ocs, o_budg_emi_so2, o_budg_emi_h2so4, o_budg_emi_part, & 
+         o_budg_ocs_to_so2, o_budg_so2_to_h2so4, o_budg_h2so4_to_part, &
          o_surf_PM25_sulf, o_ext_strat_550, o_tau_strat_550, &
          o_p_tropopause, o_vsed_aer, o_tau_strat_1020, o_ext_strat_1020, o_f_r_wet
@@ -284,7 +288,11 @@
 #ifdef CPP_StratAer 
     USE phys_local_var_mod, ONLY:  &
-         sulf_convert, sulf_nucl, sulf_cond_evap, ocs_convert, &
-         sfluxaer, R2SO4, OCS_lifetime, SO2_lifetime, &
-         OCS_backgr_tend, SO2_backgr_tend, sulf_dep_dry, sulf_dep_wet, &
+         budg_3D_nucl, budg_3D_cond_evap, budg_3D_ocs_to_so2, budg_3D_so2_to_h2so4, &
+         budg_sed_part, R2SO4, OCS_lifetime, SO2_lifetime, &
+         budg_3D_backgr_ocs, budg_3D_backgr_so2, & 
+         budg_dep_dry_h2so4, budg_dep_wet_h2so4, &
+         budg_dep_dry_part, budg_dep_wet_part, &
+         budg_emi_ocs, budg_emi_so2, budg_emi_h2so4, budg_emi_part, & 
+         budg_ocs_to_so2, budg_so2_to_h2so4, budg_h2so4_to_part, & 
          surf_PM25_sulf, tau_strat_550, p_tropopause, tausum_strat, &
          vsed_aer, tau_strat_1020, f_r_wet
@@ -385,4 +393,7 @@
     TYPE(xios_field) :: child
 #endif
+#ifdef CPP_StratAer 
+    LOGICAL, PARAMETER :: debug_strataer=.FALSE.
+#endif
 
     ! On calcul le nouveau tau:
@@ -406,5 +417,5 @@
             iiq=niadv(iq)
             varname=trim(tname(iiq))
-            WRITE (lunout,*) 'XIOS var=', nqo, iq, varname
+            WRITE (lunout,*) 'XIOS var=', nqo, iq, nqtot, varname
             CALL xios_add_child(group_handle, child, varname)
             CALL xios_set_attr(child, name=varname, unit="kg kg-1")
@@ -455,5 +466,5 @@
             iiq=niadv(iq)
             varname='cum'//trim(tname(iiq))
-            WRITE (lunout,*) 'XIOS var=', iq, varname
+            WRITE (lunout,*) 'XIOS var=', iq, nqtot, varname
             CALL xios_add_child(group_handle, child, varname)
             CALL xios_set_attr(child, name=varname, unit="kg m-2")
@@ -468,4 +479,5 @@
     ! ug la boucle qui suit ne sert qu'une fois, pour l'initialisation, sinon il n'y a toujours qu'un seul passage:
     DO iinit=1, iinitend
+!      print *,'IFF iinit=', iinit, iinitend 
 #ifdef CPP_XIOS
        !$OMP MASTER
@@ -1194,18 +1206,27 @@
 #ifdef CPP_StratAer
        IF (type_trac=='coag') THEN
-          CALL histwrite_phy(o_sulf_convert, sulf_convert)
-          CALL histwrite_phy(o_sulf_nucl, sulf_nucl)
-          CALL histwrite_phy(o_sulf_cond_evap, sulf_cond_evap)
-          CALL histwrite_phy(o_ocs_convert, ocs_convert)
           CALL histwrite_phy(o_R2SO4, R2SO4)
           CALL histwrite_phy(o_OCS_lifetime, OCS_lifetime)
           CALL histwrite_phy(o_SO2_lifetime, SO2_lifetime)
-          CALL histwrite_phy(o_OCS_backgr_tend, OCS_backgr_tend)
-          CALL histwrite_phy(o_SO2_backgr_tend, SO2_backgr_tend)
-          CALL histwrite_phy(o_sulf_dep_dry, sulf_dep_dry)
-          CALL histwrite_phy(o_sulf_dep_wet, sulf_dep_wet)
+          CALL histwrite_phy(o_budg_3D_backgr_ocs,   budg_3D_backgr_ocs)
+          CALL histwrite_phy(o_budg_3D_backgr_so2,   budg_3D_backgr_so2)
+          CALL histwrite_phy(o_budg_3D_ocs_to_so2,   budg_3D_ocs_to_so2)
+          CALL histwrite_phy(o_budg_3D_so2_to_h2so4, budg_3D_so2_to_h2so4)
+          CALL histwrite_phy(o_budg_3D_nucl,         budg_3D_nucl)
+          CALL histwrite_phy(o_budg_3D_cond_evap,    budg_3D_cond_evap)
+          CALL histwrite_phy(o_budg_dep_dry_h2so4,   budg_dep_dry_h2so4)
+          CALL histwrite_phy(o_budg_dep_wet_h2so4,   budg_dep_wet_h2so4)
+          CALL histwrite_phy(o_budg_dep_dry_part,    budg_dep_dry_part)
+          CALL histwrite_phy(o_budg_dep_wet_part,    budg_dep_wet_part)
+          CALL histwrite_phy(o_budg_emi_ocs,         budg_emi_ocs)
+          CALL histwrite_phy(o_budg_emi_so2,         budg_emi_so2)
+          CALL histwrite_phy(o_budg_emi_h2so4,       budg_emi_h2so4)
+          CALL histwrite_phy(o_budg_emi_part,        budg_emi_part)
+          CALL histwrite_phy(o_budg_ocs_to_so2,      budg_ocs_to_so2)
+          CALL histwrite_phy(o_budg_so2_to_h2so4,    budg_so2_to_h2so4)
+          CALL histwrite_phy(o_budg_h2so4_to_part,   budg_h2so4_to_part)
+          CALL histwrite_phy(o_budg_sed_part,        budg_sed_part)
           CALL histwrite_phy(o_surf_PM25_sulf, surf_PM25_sulf)
           CALL histwrite_phy(o_p_tropopause, p_tropopause)
-          CALL histwrite_phy(o_sfluxaer, sfluxaer)
           CALL histwrite_phy(o_vsed_aer, vsed_aer)
           CALL histwrite_phy(o_f_r_wet, f_r_wet)
@@ -1264,5 +1285,7 @@
        IF (ok_aie) THEN
           CALL histwrite_phy(o_topswai, topswai_aero*swradcorr)
+          CALL histwrite_phy(o_toplwai, toplwai_aero*swradcorr)
           CALL histwrite_phy(o_solswai, solswai_aero*swradcorr)
+          CALL histwrite_phy(o_sollwai, sollwai_aero*swradcorr)
        ENDIF
        IF (flag_aerosol.GT.0.AND.ok_cdnc) THEN
@@ -1726,5 +1749,5 @@
        ! Champs interpolles sur des niveaux de pression
        missing_val=missing_val_nf90
-       DO iff=7, nfiles
+       DO iff=7, nfiles-1 !--OB: here we deal with files 7,8,9
 
           CALL histwrite_phy(o_tnondef,tnondef(:,:,iff-6),iff)
Index: LMDZ5/branches/testing/libf/phylmd/phys_state_var_mod.F90
===================================================================
--- LMDZ5/branches/testing/libf/phylmd/phys_state_var_mod.F90	(revision 2729)
+++ LMDZ5/branches/testing/libf/phylmd/phys_state_var_mod.F90	(revision 2787)
@@ -18,7 +18,9 @@
       INTEGER, SAVE :: radpas
       INTEGER, SAVE :: cvpas
+      INTEGER, SAVE :: wkpas
       REAL, PARAMETER :: missing_val_nf90=nf90_fill_real
 !$OMP THREADPRIVATE(radpas)
 !$OMP THREADPRIVATE(cvpas)
+!$OMP THREADPRIVATE(wkpas)
       REAL, SAVE :: dtime, solaire_etat0
 !$OMP THREADPRIVATE(dtime, solaire_etat0)
Index: LMDZ5/branches/testing/libf/phylmd/physiq_mod.F90
===================================================================
--- LMDZ5/branches/testing/libf/phylmd/physiq_mod.F90	(revision 2729)
+++ LMDZ5/branches/testing/libf/phylmd/physiq_mod.F90	(revision 2787)
@@ -16,9 +16,10 @@
        d_u, d_v, d_t, d_qx, d_ps)
 
+    use assert_m, only: assert
     USE ioipsl, only: histbeg, histvert, histdef, histend, histsync, &
          histwrite, ju2ymds, ymds2ju, getin
     USE geometry_mod, ONLY: cell_area, latitude_deg, longitude_deg
     USE phys_cal_mod, only: year_len, mth_len, days_elapsed, jh_1jan, &
-         year_cur, mth_cur,jD_cur, jH_cur, jD_ref
+         year_cur, mth_cur,jD_cur, jH_cur, jD_ref, day_cur, hour
     USE write_field_phy
     USE dimphy
@@ -29,5 +30,5 @@
     USE print_control_mod, ONLY: mydebug=>debug , lunout, prt_level
     USE phystokenc_mod, ONLY: offline, phystokenc
-    USE time_phylmdz_mod, only: raz_date, day_step_phy, update_time
+    USE time_phylmdz_mod, only: raz_date, day_step_phy, update_time,current_time
     USE vampir
     USE pbl_surface_mod, ONLY : pbl_surface
@@ -139,4 +140,5 @@
        kh, kh_x, kh_w, &
        !
+       wake_k, &
        ale_wake, alp_wake, & 
        wake_h, wake_omg, &
@@ -564,5 +566,6 @@
     !pourquoi y'a pas de save??
     !
-    INTEGER wake_k(klon)            ! Wake sommet
+!!!    INTEGER, SAVE, DIMENSION(klon)   :: wake_k
+!!!    !$OMP THREADPRIVATE(wake_k) 
     !
     !jyg<
@@ -782,7 +785,7 @@
     !ym      SAVE  
     !
-    INTEGER itapcv
-    SAVE itapcv
-    !$OMP THREADPRIVATE(itapcv)
+    INTEGER itapcv, itapwk
+    SAVE itapcv, itapwk
+    !$OMP THREADPRIVATE(itapcv, itapwk)
 
     !KE43
@@ -978,8 +981,9 @@
     ! Parameters
     LOGICAL ok_ade, ok_aie    ! Apply aerosol (in)direct effects or not
+    LOGICAL ok_alw            ! Apply aerosol LW effect or not
     LOGICAL ok_cdnc ! ok cloud droplet number concentration (O. Boucher 01-2013)
     REAL bl95_b0, bl95_b1   ! Parameter in Boucher and Lohmann (1995)
-    SAVE ok_ade, ok_aie, ok_cdnc, bl95_b0, bl95_b1
-    !$OMP THREADPRIVATE(ok_ade, ok_aie, ok_cdnc, bl95_b0, bl95_b1)
+    SAVE ok_ade, ok_aie, ok_alw, ok_cdnc, bl95_b0, bl95_b1
+    !$OMP THREADPRIVATE(ok_ade, ok_aie, ok_alw, ok_cdnc, bl95_b0, bl95_b1)
     LOGICAL, SAVE :: aerosol_couple ! true  : calcul des aerosols dans INCA
     ! false : lecture des aerosol dans un fichier
@@ -1076,4 +1080,5 @@
     INTEGER :: nbtr_tmp ! Number of tracer inside concvl
     REAL, dimension(klon,klev) :: sh_in ! Specific humidity entering in phytrac
+    REAL, dimension(klon,klev) :: ch_in ! Condensed humidity entering in phytrac (eau liquide)
     integer iostat
 
@@ -1122,5 +1127,7 @@
     ENDIF
 
-    !======================================================================
+    ! Quick check on pressure levels:
+    call assert(paprs(:, nbp_lev + 1) < paprs(:, nbp_lev), &
+            "physiq_mod paprs bad order")
 
     IF (first) THEN 
@@ -1140,5 +1147,5 @@
             fact_cldcon, facttemps,ok_newmicro,iflag_radia, &
             iflag_cld_th,iflag_ratqs,ratqsbas,ratqshaut,tau_ratqs, &
-            ok_ade, ok_aie, ok_cdnc, aerosol_couple,  &
+            ok_ade, ok_aie, ok_alw, ok_cdnc, aerosol_couple,  &
             flag_aerosol, flag_aerosol_strat, new_aod, &
             flag_bc_internal_mixture, bl95_b0, bl95_b1, &
@@ -1285,4 +1292,5 @@
        itaprad = 0
        itapcv = 0
+       itapwk = 0
 
        ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@@ -1300,7 +1308,15 @@
        ! Il se peut qu'il faille prendre une valeur differente de nbapp_rad
        ! pour obtenir le meme resultat.
-       dtime=pdtphys
-       IF (MOD(INT(86400./dtime),nbapp_rad).EQ.0) THEN
-          radpas = NINT( 86400./dtime/nbapp_rad)
+!jyg for fh<
+!!       dtime=pdtphys
+       dtime=NINT(pdtphys)
+       WRITE(lunout,*) 'Pas de temps dtime pdtphys ',dtime,pdtphys
+       IF (abs(dtime-pdtphys)>1.e-10) THEN
+          abort_message='pas de temps doit etre entier en seconde pour orchidee et XIOS'
+          CALL abort_physic(modname,abort_message,1)
+       ENDIF
+!>jyg
+       IF (MOD(NINT(86400./dtime),nbapp_rad).EQ.0) THEN
+          radpas = NINT( 86400./dtime)/nbapp_rad
        ELSE 
           WRITE(lunout,*) 'le nombre de pas de temps physique doit etre un ', &
@@ -1313,7 +1329,8 @@
        ENDIF
        IF (nbapp_cv .EQ. 0) nbapp_cv=86400./dtime
-       print *,'physiq, nbapp_cv ',nbapp_cv
-       IF (MOD(INT(86400./dtime),nbapp_cv).EQ.0) THEN
-          cvpas = NINT( 86400./dtime/nbapp_cv)
+       IF (nbapp_wk .EQ. 0) nbapp_wk=86400./dtime
+       print *,'physiq, nbapp_cv, nbapp_wk ',nbapp_cv,nbapp_wk
+       IF (MOD(NINT(86400./dtime),nbapp_cv).EQ.0) THEN
+          cvpas = NINT( 86400./dtime)/nbapp_cv
        print *,'physiq, cvpas ',cvpas
        ELSE 
@@ -1324,4 +1341,16 @@
           abort_message='nbre de pas de temps physique n est pas multiple ' &
                // 'de nbapp_cv'
+          call abort_physic(modname,abort_message,1)
+       ENDIF
+       IF (MOD(NINT(86400./dtime),nbapp_wk).EQ.0) THEN
+          wkpas = NINT( 86400./dtime)/nbapp_wk
+       print *,'physiq, wkpas ',wkpas
+       ELSE 
+          WRITE(lunout,*) 'le nombre de pas de temps physique doit etre un ', &
+               'multiple de nbapp_wk'
+          WRITE(lunout,*) 'changer nbapp_wk ou alors commenter ce test ', &
+               'mais 1+1<>2'
+          abort_message='nbre de pas de temps physique n est pas multiple ' &
+               // 'de nbapp_wk'
           call abort_physic(modname,abort_message,1)
        ENDIF
@@ -1563,5 +1592,5 @@
             jjmp1,nlevSTD,clevSTD,rlevSTD, dtime,ok_veget, &
             type_ocean,iflag_pbl,iflag_pbl_split,ok_mensuel,ok_journe, &
-            ok_hf,ok_instan,ok_LES,ok_ade,ok_aie,  &
+            ok_hf,ok_instan,ok_LES,ok_ade,ok_aie, &
             read_climoz, phys_out_filestations, &
             new_aod, aerosol_couple, &
@@ -1708,4 +1737,10 @@
     !
     itap   = itap + 1
+    IF (is_mpi_root .AND. is_omp_root) THEN
+      IF (prt_level > 5 .or. MOD(itap,5) == 0) THEN
+         WRITE(LUNOUT,*)'Entering physics current time = ', current_time
+         WRITE(LUNOUT,*)'Date = ',year_cur,'/',mth_cur,'/',day_cur,':',hour/3600
+      ENDIF
+    ENDIF
     !
     !
@@ -1923,45 +1958,48 @@
     ! Update ozone if day change
     IF (MOD(itap-1,lmt_pas) == 0) THEN
-      IF (read_climoz == 0) THEN
-       ! Once per day, update ozone from Royer:
-        IF (solarlong0<-999.) then
-           ! Generic case with evolvoing season
-           zzz=real(days_elapsed+1)
-        ELSE IF (abs(solarlong0-1000.)<1.e-4) then
-           ! Particular case with annual mean insolation
-           zzz=real(90) ! could be revisited
-           IF (read_climoz/=-1) THEN
-              abort_message ='read_climoz=-1 is recommended when ' &
-                   // 'solarlong0=1000.'
-              CALL abort_physic (modname,abort_message,1)
-           ENDIF
-        ELSE
-          ! Case where the season is imposed with solarlong0
-          zzz=real(90) ! could be revisited
-        ENDIF
-
-        wo(:,:,1)=ozonecm(latitude_deg, paprs,read_climoz,rjour=zzz)
-      ELSE
-        ro3i = int((days_elapsed + jh_cur - jh_1jan) / year_len * 360.) + 1   
-        IF (ro3i == 361) ro3i = 360
-        IF (read_climoz == 1) THEN
-           CALL regr_pr_av(ncid_climoz, (/"tro3"/), julien=ro3i, &
-                press_in_edg=press_climoz, paprs=paprs, v3=wo)
-        ELSE
-           ! read_climoz == 2
-           CALL regr_pr_av(ncid_climoz, (/"tro3         ", &
-                "tro3_daylight"/), julien=ro3i, press_in_edg=press_climoz, &
-                paprs=paprs, v3=wo)
-        ENDIF
-        ! Convert from mole fraction of ozone to column density of ozone in a
-        ! cell, in kDU:
-        FORALL (l = 1: read_climoz) wo(:, :, l) = wo(:, :, l) * rmo3 / rmd &
-             * zmasse / dobson_u / 1e3
-        ! (By regridding ozone values for LMDZ only once every 360th of
-        ! year, we have already neglected the variation of pressure in one
-        ! 360th of year. So do not recompute "wo" at each time step even if
-        ! "zmasse" changes a little.)
-     
-      ENDIF
+       IF (read_climoz <= 0) THEN
+          ! Once per day, update ozone from Royer:
+          IF (solarlong0<-999.) then
+             ! Generic case with evolvoing season
+             zzz=real(days_elapsed+1)
+          ELSE IF (abs(solarlong0-1000.)<1.e-4) then
+             ! Particular case with annual mean insolation
+             zzz=real(90) ! could be revisited
+             IF (read_climoz/=-1) THEN
+                abort_message ='read_climoz=-1 is recommended when ' &
+                     // 'solarlong0=1000.'
+                CALL abort_physic (modname,abort_message,1)
+             ENDIF
+          ELSE
+             ! Case where the season is imposed with solarlong0
+             zzz=real(90) ! could be revisited
+          ENDIF
+
+          wo(:,:,1)=ozonecm(latitude_deg, paprs,read_climoz,rjour=zzz)
+       ELSE
+          ro3i = int((days_elapsed + jh_cur - jh_1jan) / year_len * 360.) + 1
+
+          IF (ro3i == 361) ro3i = 360
+          ! (This should never occur, except perhaps because of roundup
+          ! error. See documentation.)
+
+          IF (read_climoz == 1) THEN
+             CALL regr_pr_av(ncid_climoz, (/"tro3"/), julien=ro3i, &
+                  press_in_edg=press_climoz, paprs=paprs, v3=wo)
+          ELSE
+             ! read_climoz == 2
+             CALL regr_pr_av(ncid_climoz, (/"tro3         ", &
+                  "tro3_daylight"/), julien=ro3i, press_in_edg=press_climoz, &
+                  paprs=paprs, v3=wo)
+          ENDIF
+          ! Convert from mole fraction of ozone to column density of ozone in a
+          ! cell, in kDU:
+          FORALL (l = 1: read_climoz) wo(:, :, l) = wo(:, :, l) * rmo3 / rmd &
+               * zmasse / dobson_u / 1e3
+          ! (By regridding ozone values for LMDZ only once per day, we
+          ! have already neglected the variation of pressure in one
+          ! day. So do not recompute "wo" at each time step even if
+          ! "zmasse" changes a little.)
+       ENDIF
     ENDIF
     !
@@ -2317,5 +2355,4 @@
     IF (prt_level.ge.1) write(lunout,*) 'omega(igout, :) = ', &
          omega(igout, :)
-
     !
     ! Appel de la convection tous les "cvpas"
@@ -2574,6 +2611,9 @@
     !    .              d_u_con, d_v_con)
 
+!jyg    Reinitialize proba_notrig and itapcv when convection has been called
+    proba_notrig(:) = 1.
     itapcv = 0
     ENDIF !  (MOD(itapcv,cvpas).EQ.0)
+!
     itapcv = itapcv+1
 
@@ -2640,62 +2680,68 @@
     IF (iflag_wake>=1) THEN
        !
-       !  Call wakes only when convection has been called
-       IF (itapcv .EQ. 1) THEN
-       !
-       DO k=1,klev
-          DO i=1,klon
-             dt_dwn(i,k)  = ftd(i,k) 
-             dq_dwn(i,k)  = fqd(i,k) 
-             M_dwn(i,k)   = dnwd0(i,k)
-             M_up(i,k)    = upwd(i,k)
-             dt_a(i,k)    = d_t_con(i,k)/dtime - ftd(i,k) 
-             dq_a(i,k)    = d_q_con(i,k)/dtime - fqd(i,k)
-          ENDDO
-       ENDDO
-
-       IF (iflag_wake==2) THEN
-          ok_wk_lsp(:)=max(sign(1.,wake_s(:)-wake_s_min_lsp),0.)
-          DO k = 1,klev
-             dt_dwn(:,k)= dt_dwn(:,k)+ &
-                  ok_wk_lsp(:)*(d_t_eva(:,k)+d_t_lsc(:,k))/dtime
-             dq_dwn(:,k)= dq_dwn(:,k)+ &
-                  ok_wk_lsp(:)*(d_q_eva(:,k)+d_q_lsc(:,k))/dtime
-          ENDDO
-       ELSEIF (iflag_wake==3) THEN
-          ok_wk_lsp(:)=max(sign(1.,wake_s(:)-wake_s_min_lsp),0.)
-          DO k = 1,klev
+       !
+       ! Call wakes every "wkpas" step
+       !
+       IF (MOD(itapwk,wkpas).EQ.0) THEN
+          !
+          DO k=1,klev
              DO i=1,klon
-                IF (rneb(i,k)==0.) THEN
-                   ! On ne tient compte des tendances qu'en dehors des
-                   ! nuages (c'est-\`a-dire a priri dans une region ou
-                   ! l'eau se reevapore).
-                   dt_dwn(i,k)= dt_dwn(i,k)+ &
-                        ok_wk_lsp(i)*d_t_lsc(i,k)/dtime
-                   dq_dwn(i,k)= dq_dwn(i,k)+ &
-                        ok_wk_lsp(i)*d_q_lsc(i,k)/dtime
-                ENDIF
+                dt_dwn(i,k)  = ftd(i,k) 
+                dq_dwn(i,k)  = fqd(i,k) 
+                M_dwn(i,k)   = dnwd0(i,k)
+                M_up(i,k)    = upwd(i,k)
+                dt_a(i,k)    = d_t_con(i,k)/dtime - ftd(i,k) 
+                dq_a(i,k)    = d_q_con(i,k)/dtime - fqd(i,k)
              ENDDO
           ENDDO
-       ENDIF
-
-       !
-       !calcul caracteristiques de la poche froide
-       CALL calWAKE (iflag_wake_tend, paprs, pplay, dtime, &
-            t_seri, q_seri, omega,  &
-            dt_dwn, dq_dwn, M_dwn, M_up,  &
-            dt_a, dq_a,  &
-            sigd,  &
-            wake_deltat, wake_deltaq, wake_s, wake_dens,  &
-            wake_dth, wake_h,  &
-            wake_pe, wake_fip, wake_gfl,  &
-            d_t_wake, d_q_wake,  &
-            wake_k, t_x, q_x,  &
-            wake_omgbdth, wake_dp_omgb,  &
-            wake_dtKE, wake_dqKE,  &
-            wake_omg, wake_dp_deltomg,  &
-            wake_spread, wake_Cstar, d_deltat_wk_gw,  &
-            d_deltat_wk, d_deltaq_wk, d_s_wk, d_dens_wk)
-         !
-       ENDIF  ! (mod(itapcv,cvpas) .EQ. 1)
+         
+          IF (iflag_wake==2) THEN
+             ok_wk_lsp(:)=max(sign(1.,wake_s(:)-wake_s_min_lsp),0.)
+             DO k = 1,klev
+                dt_dwn(:,k)= dt_dwn(:,k)+ &
+                     ok_wk_lsp(:)*(d_t_eva(:,k)+d_t_lsc(:,k))/dtime
+                dq_dwn(:,k)= dq_dwn(:,k)+ &
+                     ok_wk_lsp(:)*(d_q_eva(:,k)+d_q_lsc(:,k))/dtime
+             ENDDO
+          ELSEIF (iflag_wake==3) THEN
+             ok_wk_lsp(:)=max(sign(1.,wake_s(:)-wake_s_min_lsp),0.)
+             DO k = 1,klev
+                DO i=1,klon
+                   IF (rneb(i,k)==0.) THEN
+                      ! On ne tient compte des tendances qu'en dehors des
+                      ! nuages (c'est-\`a-dire a priri dans une region ou
+                      ! l'eau se reevapore).
+                      dt_dwn(i,k)= dt_dwn(i,k)+ &
+                           ok_wk_lsp(i)*d_t_lsc(i,k)/dtime
+                      dq_dwn(i,k)= dq_dwn(i,k)+ &
+                           ok_wk_lsp(i)*d_q_lsc(i,k)/dtime
+                   ENDIF
+                ENDDO
+             ENDDO
+          ENDIF
+         
+          !
+          !calcul caracteristiques de la poche froide
+          CALL calWAKE (iflag_wake_tend, paprs, pplay, dtime, &
+               t_seri, q_seri, omega,  &
+               dt_dwn, dq_dwn, M_dwn, M_up,  &
+               dt_a, dq_a,  &
+               sigd,  &
+               wake_deltat, wake_deltaq, wake_s, wake_dens,  &
+               wake_dth, wake_h,  &
+               wake_pe, wake_fip, wake_gfl,  &
+               d_t_wake, d_q_wake,  &
+               wake_k, t_x, q_x,  &
+               wake_omgbdth, wake_dp_omgb,  &
+               wake_dtKE, wake_dqKE,  &
+               wake_omg, wake_dp_deltomg,  &
+               wake_spread, wake_Cstar, d_deltat_wk_gw,  &
+               d_deltat_wk, d_deltaq_wk, d_s_wk, d_dens_wk)
+          !
+          !jyg    Reinitialize itapwk when wakes have been called
+          itapwk = 0
+       ENDIF !  (MOD(itapwk,wkpas).EQ.0)
+       !
+       itapwk = itapwk+1
        !
        !-----------------------------------------------------------------------
@@ -2705,5 +2751,5 @@
        !------------------------------------------------------------------------
 
-!       Increment Wake state variables
+       ! Increment Wake state variables
        IF (iflag_wake_tend .GT. 0.) THEN
 
@@ -3261,5 +3307,5 @@
        !jq - introduce the aerosol direct and first indirect radiative forcings
        !jq - Johannes Quaas, 27/11/2003 (quaas@lmd.jussieu.fr)
-       IF (flag_aerosol .gt. 0) THEN
+       IF (flag_aerosol .GT. 0) THEN
           IF (iflag_rrtm .EQ. 0) THEN !--old radiation
              IF (.NOT. aerosol_couple) THEN
@@ -3280,7 +3326,15 @@
 #ifdef CPP_RRTM
                 IF (NSW.EQ.6) THEN
-                   !--new aerosol properties
+                   !--new aerosol properties SW and LW
                    !
-                   CALL readaerosol_optic_rrtm( debut, aerosol_couple, &
+#ifdef CPP_Dust
+                   !--SPL aerosol model
+                   CALL splaerosol_optic_rrtm( ok_alw, pplay, paprs, t_seri, rhcl, &
+                        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)
+#else
+                   !--climatologies or INCA aerosols
+                   CALL readaerosol_optic_rrtm( debut, aerosol_couple, ok_alw, &
                         new_aod, flag_aerosol, flag_bc_internal_mixture, itap, jD_cur-jD_ref, &
                         pdtphys, pplay, paprs, t_seri, rhcl, presnivs,  &
@@ -3288,5 +3342,6 @@
                         tau_aero_sw_rrtm, piz_aero_sw_rrtm, cg_aero_sw_rrtm,  &
                         tausum_aero, tau3d_aero)
-
+#endif
+                   !
                 ELSE IF (NSW.EQ.2) THEN 
                    !--for now we use the old aerosol properties
@@ -3307,4 +3362,8 @@
                    piz_aero_sw_rrtm(:,:,2,:)=piz_aero(:,:,2,:)
                    cg_aero_sw_rrtm (:,:,2,:)=cg_aero (:,:,2,:)
+                   !
+                   !--no LW optics
+                   tau_aero_lw_rrtm(:,:,:,:) = 1.e-15
+                   !
                 ELSE
                    abort_message='Only NSW=2 or 6 are possible with ' &
@@ -3312,9 +3371,4 @@
                    CALL abort_physic(modname,abort_message,1)
                 ENDIF
-
-                !--call LW optical properties for tropospheric aerosols 
-                !--only works for INCA aerosol (aerosol_couple = TRUE)
-                CALL aeropt_lw_rrtm(aerosol_couple,paprs,tr_seri)
-                !
 #else
                 abort_message='You should compile with -rrtm if running ' &
@@ -3325,5 +3379,5 @@
              ENDIF
           ENDIF
-       ELSE
+       ELSE   !--flag_aerosol = 0 
           tausum_aero(:,:,:) = 0.
           mass_solu_aero(:,:) = 0.
@@ -4007,4 +4061,5 @@
     ELSE
        sh_in(:,:) = qx(:,:,ivap)
+       ch_in(:,:) = qx(:,:,iliq)
     ENDIF
 
@@ -4039,5 +4094,5 @@
          frac_impa,frac_nucl, beta_prec_fisrt,beta_prec, &
          presnivs, pphis,     pphi,     albsol1, &
-         sh_in,    rhcl,      cldfra,   rneb, &
+         sh_in,   ch_in,    rhcl,      cldfra,   rneb, &
          diafra,   cldliq,    itop_con, ibas_con, &
          pmflxr,   pmflxs,    prfl,     psfl, &
Index: LMDZ5/branches/testing/libf/phylmd/phytrac_mod.F90
===================================================================
--- LMDZ5/branches/testing/libf/phylmd/phytrac_mod.F90	(revision 2729)
+++ LMDZ5/branches/testing/libf/phylmd/phytrac_mod.F90	(revision 2787)
@@ -66,5 +66,5 @@
        frac_impa,frac_nucl,beta_fisrt,beta_v1,        &
        presnivs,  pphis,    pphi,     albsol,         &
-       sh,        rh,       cldfra,   rneb,           &
+       sh,        ch, rh,   cldfra,   rneb,           &
        diafra,    cldliq,   itop_con, ibas_con,       &
        pmflxr,    pmflxs,   prfl,     psfl,           &
@@ -103,5 +103,7 @@
 #ifdef CPP_StratAer
     USE traccoag_mod
-    USE phys_local_var_mod, ONLY: mdw, sulf_dep_dry, sulf_dep_wet
+    USE phys_local_var_mod, ONLY: mdw
+    USE phys_local_var_mod, ONLY: budg_dep_dry_h2so4, budg_dep_wet_h2so4
+    USE phys_local_var_mod, ONLY: budg_dep_dry_part,  budg_dep_wet_part
     USE infotrac, ONLY: nbtr_sulgas, id_SO2_strat, id_H2SO4_strat
     USE aerophys
@@ -137,4 +139,5 @@
     REAL,DIMENSION(klon,klev),INTENT(IN)   :: sh      ! humidite specifique
     REAL,DIMENSION(klon,klev),INTENT(IN)   :: rh      ! humidite relative
+    REAL,DIMENSION(klon,klev),INTENT(IN)   :: ch      ! eau liquide
     REAL,DIMENSION(klon,klev+1),INTENT(IN) :: paprs   ! pression pour chaque inter-couche (en Pa)
     REAL,DIMENSION(klon,klev),INTENT(IN)   :: pplay   ! pression pour le mileu de chaque couche (en Pa)
@@ -571,5 +574,5 @@
        write(lunout,*)  'flag_cvltr    = ', flag_cvltr
 
-       IF (lessivage.AND.config_inca.EQ.'inca') THEN
+       IF (lessivage .AND. type_trac .EQ. 'inca') THEN
           CALL abort_physic('phytrac', 'lessivage=T config_inca=inca impossible',1)
           STOP
@@ -698,5 +701,6 @@
        IF (type_trac=='coag') THEN
          ! initialize wet deposition flux of sulfur
-         sulf_dep_wet(:)=0.0
+         budg_dep_wet_h2so4(:)=0.0
+         budg_dep_wet_part(:)=0.0
          ! compute wet deposition flux of sulfur (sum over gases and particles)
          ! and convert to kg(S)/m2/s
@@ -706,8 +710,8 @@
          !do not include SO2 because most of it comes trom the troposphere
            IF (it==id_H2SO4_strat) THEN
-             sulf_dep_wet(i)=sulf_dep_wet(i)+d_tr_cv(i,k,it)*(mSatom/mH2SO4mol) &
+             budg_dep_wet_h2so4(i)=budg_dep_wet_h2so4(i)+d_tr_cv(i,k,it)*(mSatom/mH2SO4mol) &
                             & *(paprs(i,k)-paprs(i,k+1))/RG/pdtphys
            ELSEIF (it.GT.nbtr_sulgas) THEN
-             sulf_dep_wet(i)=sulf_dep_wet(i)+d_tr_cv(i,k,it)*(mSatom/mH2SO4mol)  &
+             budg_dep_wet_part(i)=budg_dep_wet_part(i)+d_tr_cv(i,k,it)*(mSatom/mH2SO4mol)  &
                             & *dens_aer_dry*4./3.*RPI*(mdw(it-nbtr_sulgas)/2.)**3 &
                             & *(paprs(i,k)-paprs(i,k+1))/RG/pdtphys
@@ -766,5 +770,6 @@
 
          ! initialize dry deposition flux of sulfur
-         sulf_dep_dry(:)=0.0
+         budg_dep_dry_h2so4(:)=0.0
+         budg_dep_dry_part(:)=0.0
 
          ! compute dry deposition velocity as function of surface type (numbers
@@ -800,7 +805,7 @@
                ! compute dry deposition flux of sulfur (sum over gases and particles)
                IF (it==id_H2SO4_strat) THEN
-                 sulf_dep_dry(:)=sulf_dep_dry(:)-source(:,it)*(mSatom/mH2SO4mol)
+                 budg_dep_dry_h2so4(:)=budg_dep_dry_h2so4(:)-source(:,it)*(mSatom/mH2SO4mol)
                ELSEIF (it.GT.nbtr_sulgas) THEN
-                 sulf_dep_dry(:)=sulf_dep_dry(:)-source(:,it)*(mSatom/mH2SO4mol)*dens_aer_dry &
+                 budg_dep_dry_part(:)=budg_dep_dry_part(:)-source(:,it)*(mSatom/mH2SO4mol)*dens_aer_dry &
                                 & *4./3.*RPI*(mdw(it-nbtr_sulgas)/2.)**3
                ENDIF
@@ -886,8 +891,8 @@
            DO it = 1, nbtr
              IF (it==id_H2SO4_strat) THEN
-               sulf_dep_wet(i)=sulf_dep_wet(i)+d_tr_ls(i,k,it)*(mSatom/mH2SO4mol) &
+               budg_dep_wet_h2so4(i)=budg_dep_wet_h2so4(i)+d_tr_ls(i,k,it)*(mSatom/mH2SO4mol) &
                               & *(paprs(i,k)-paprs(i,k+1))/RG/pdtphys
              ELSEIF (it.GT.nbtr_sulgas) THEN
-               sulf_dep_wet(i)=sulf_dep_wet(i)+d_tr_ls(i,k,it)*(mSatom/mH2SO4mol)  &
+               budg_dep_wet_part(i)=budg_dep_wet_part(i)+d_tr_ls(i,k,it)*(mSatom/mH2SO4mol)  &
                               & *dens_aer_dry*4./3.*RPI*(mdw(it-nbtr_sulgas)/2.)**3 &
                               & *(paprs(i,k)-paprs(i,k+1))/RG/pdtphys
@@ -1018,5 +1023,5 @@
             pdtphys,  t_seri,   paprs,          pplay,     &
             pmfu,     upwd,     ftsol,  pctsrf, pphis,     &
-            pphi,     albsol,   sh,             rh,        &
+            pphi,     albsol,   sh,    ch,     rh,        &
             cldfra,   rneb,     diafra,         cldliq,    &
             itop_con, ibas_con, pmflxr,         pmflxs,    &
Index: LMDZ5/branches/testing/libf/phylmd/readaerosolstrato.F90
===================================================================
--- LMDZ5/branches/testing/libf/phylmd/readaerosolstrato.F90	(revision 2729)
+++ LMDZ5/branches/testing/libf/phylmd/readaerosolstrato.F90	(revision 2787)
@@ -33,5 +33,5 @@
     real, pointer:: lev(:)
     integer i, k, band, wave
-    integer, save :: mth_pre
+    integer, save :: mth_pre=1
 !$OMP THREADPRIVATE(mth_pre)
 
Index: LMDZ5/branches/testing/libf/phylmd/rrtm/aeropt_5wv_rrtm.F90
===================================================================
--- LMDZ5/branches/testing/libf/phylmd/rrtm/aeropt_5wv_rrtm.F90	(revision 2729)
+++ LMDZ5/branches/testing/libf/phylmd/rrtm/aeropt_5wv_rrtm.F90	(revision 2787)
@@ -12,5 +12,6 @@
   USE DIMPHY
   USE aero_mod
-  USE phys_local_var_mod, only: od550aer,od865aer,ec550aer,od550lt1aer
+  USE phys_local_var_mod, ONLY: od550aer,od865aer,ec550aer,od550lt1aer
+  USE YOMCST, ONLY: RD,RG
 
   !
@@ -20,4 +21,5 @@
   !    a partir d'une sous-routine de Johannes Quaas pour les sulfates
   !    Olivier Boucher mars 2014 pour adaptation RRTM
+  !    
   !
   ! Refractive indices for seasalt come from Shettle and Fenn (1979)
@@ -50,21 +52,20 @@
   !
   IMPLICIT NONE
-  INCLUDE "YOMCST.h"
   !
   ! Input arguments:
   !
-  REAL, DIMENSION(klon,klev), INTENT(in)   :: pdel
-  REAL, DIMENSION(klon,klev,naero_tot), INTENT(in) :: m_allaer
-  REAL, DIMENSION(klon,klev), INTENT(in)   :: RHcl     ! humidite relative ciel clair
-  INTEGER,INTENT(in)                       :: flag_aerosol
-  LOGICAL,INTENT(in)                       :: flag_bc_internal_mixture
-  REAL, DIMENSION(klon,klev), INTENT(in)   :: pplay
-  REAL, DIMENSION(klon,klev), INTENT(in)   :: t_seri
+  REAL, DIMENSION(klon,klev), INTENT(IN)   :: pdel
+  REAL, DIMENSION(klon,klev,naero_tot), INTENT(IN) :: m_allaer
+  REAL, DIMENSION(klon,klev), INTENT(IN)   :: RHcl     ! humidite relative ciel clair
+  INTEGER,INTENT(IN)                       :: flag_aerosol
+  LOGICAL,INTENT(IN)                       :: flag_bc_internal_mixture
+  REAL, DIMENSION(klon,klev), INTENT(IN)   :: pplay
+  REAL, DIMENSION(klon,klev), INTENT(IN)   :: t_seri
   !
   ! Output arguments:
   !
-  REAL, DIMENSION(klon), INTENT(out)                      :: ai      ! POLDER aerosol index 
-  REAL, DIMENSION(klon,nwave,naero_tot), INTENT(out)      :: tausum
-  REAL, DIMENSION(klon,klev,nwave,naero_tot), INTENT(out) :: tau
+  REAL, DIMENSION(klon), INTENT(OUT)                      :: ai      ! POLDER aerosol index 
+  REAL, DIMENSION(klon,nwave,naero_tot), INTENT(OUT)      :: tausum
+  REAL, DIMENSION(klon,klev,nwave,naero_tot), INTENT(OUT) :: tau
 
   !
@@ -83,7 +84,8 @@
   INTEGER, PARAMETER :: la865 = 5
   INTEGER, PARAMETER :: nbre_RH=12
-  INTEGER, PARAMETER :: naero_soluble=7   !  1- BC soluble; 2- POM soluble; 3- SO4 acc.
-                                          !  4- SO4 coarse; 5 seasalt super-C; 6 seasalt coarse; 7 seasalt acc.
-  INTEGER, PARAMETER :: naero_insoluble=3 !  1- Dust; 2- BC insoluble; 3- POM insoluble
+  INTEGER, PARAMETER :: naero_soluble=9   !  1- BC soluble; 2- POM soluble; 3- SO4 coarse
+                                          !  4- SO4 acc; 5 seasalt super-C; 6 seasalt coarse; 7 seasalt acc.
+                                          !  8- NO3 coarse; 9- NO3 accumulation
+  INTEGER, PARAMETER :: naero_insoluble=4 !  1- Dust; 2- BC insoluble; 3- POM insoluble; 4- NO3 insoluble
 
   REAL :: zrho
@@ -101,7 +103,5 @@
   REAL :: zdh(klon,klev)
   
-   ! Soluble components 1- BC soluble; 2- POM soluble; 3- SO4 acc.; 4- SO4 coarse; 5 seasalt super-coarse; 6 seasalt coarse; 7 seasalt acc.
   REAL :: alpha_aers_5wv(nbre_RH,las,naero_soluble)   ! Ext. coeff. ** m2/g 
-   ! Insoluble components 1- Dust: 2- BC; 3- POM
   REAL :: alpha_aeri_5wv(las,naero_insoluble)         ! Ext. coeff. ** m2/g 
 
@@ -109,7 +109,7 @@
   ! BC internal mixture
   !
-  INTEGER, PARAMETER ::  nbclassbc = 5  ! Added by Rong Wang/OB for the 5 fractions
-                                       ! of BC in the soluble mode:
-                                       ! bc_content/0.001, 0.01, 0.02, 0.05, ! 0.1/
+  INTEGER, PARAMETER ::  nbclassbc = 6  ! Added by Rong Wang/OB for the 5 fractions
+                                        ! of BC in the soluble mode:
+                                        ! bc_content/0.001, 0.01, 0.02, 0.05, 0.1/
   ! for Maxwell-Garnet internal mixture
   ! Detailed theory can be found in R. Wang Estimation of global black carbon ! direct
@@ -124,93 +124,112 @@
   INTEGER :: n, classbc
 
-! From here on we look at the optical parameters at 5 wavelengths:  
-! 443nm, 550, 670, 765 and 865 nm 
-!                                   le 12 AVRIL 2006 
-!  
- DATA alpha_aers_5wv/ & 
-                                ! bc soluble 
-       7.930,7.930,7.930,7.930,7.930,7.930,7.930,7.930,10.893,12.618,14.550,16.613, & 
-       7.658,7.658,7.658,7.658,7.658,7.658,7.658,7.658,10.351,11.879,13.642,15.510, & 
-       7.195,7.195,7.195,7.195,7.195,7.195,7.195,7.195,9.551,10.847,12.381,13.994,  & 
-       6.736,6.736,6.736,6.736,6.736,6.736,6.736,6.736,8.818,9.938,11.283,12.687,   & 
-       6.277,6.277,6.277,6.277,6.277,6.277,6.277,6.277,8.123,9.094,10.275,11.501,   & 
-                                ! pom soluble 
-       6.676,6.676,6.676,6.676,6.710,6.934,7.141,7.569,8.034,8.529,9.456,10.511,  & 
-       5.109,5.109,5.109,5.109,5.189,5.535,5.960,6.852,8.008,9.712,12.897,19.676, & 
-       3.718,3.718,3.718,3.718,3.779,4.042,4.364,5.052,5.956,7.314,9.896,15.688,  & 
-       2.849,2.849,2.849,2.849,2.897,3.107,3.365,3.916,4.649,5.760,7.900,12.863,  & 
-       2.229,2.229,2.229,2.229,2.268,2.437,2.645,3.095,3.692,4.608,6.391,10.633,  & 
-                                ! Sulfate (Accumulation) 
-       5.751,6.215,6.690,7.024,7.599,8.195,9.156,10.355,12.660,14.823,18.908,24.508, & 
-       4.320,4.675,5.052,5.375,5.787,6.274,7.066,8.083,10.088,12.003,15.697,21.133,  & 
-       3.079,3.351,3.639,3.886,4.205,4.584,5.206,6.019,7.648,9.234,12.391,17.220,    & 
-       2.336,2.552,2.781,2.979,3.236,3.540,4.046,4.711,6.056,7.388,10.093,14.313,    & 
-       1.777,1.949,2.134,2.292,2.503,2.751,3.166,3.712,4.828,5.949,8.264,11.922,     & 
-                                ! Sulfate (Coarse) 
-       5.751,6.215,6.690,7.024,7.599,8.195,9.156,10.355,12.660,14.823,18.908,24.508, & 
-       4.320,4.675,5.052,5.375,5.787,6.274,7.066,8.083,10.088,12.003,15.697,21.133,  & 
-       3.079,3.351,3.639,3.886,4.205,4.584,5.206,6.019,7.648,9.234,12.391,17.220,    & 
-       2.336,2.552,2.781,2.979,3.236,3.540,4.046,4.711,6.056,7.388,10.093,14.313,    & 
-       1.777,1.949,2.134,2.292,2.503,2.751,3.166,3.712,4.828,5.949,8.264,11.922,     & 
-                           ! seasalt seasalt Super Coarse Soluble (SS)
-        0.218, 0.272, 0.293, 0.316, 0.343, 0.380, 0.429, 0.501, 0.636, 0.755, 0.967, 1.495, & 
-        0.221, 0.275, 0.297, 0.320, 0.348, 0.383, 0.432, 0.509, 0.640, 0.759, 0.972, 1.510, &
-        0.224, 0.279, 0.301, 0.324, 0.352, 0.388, 0.438, 0.514, 0.647, 0.768, 0.985, 1.514, &
-        0.227, 0.282, 0.303, 0.327, 0.356, 0.392, 0.441, 0.518, 0.652, 0.770, 0.987, 1.529, &
-        0.230, 0.285, 0.306, 0.330, 0.359, 0.396, 0.446, 0.522, 0.656, 0.777, 0.993, 1.539, &
-                           ! seasalt seasalt Coarse Soluble (CS)      
-        0.578, 0.706, 0.756, 0.809, 0.876, 0.964, 1.081, 1.256, 1.577, 1.858, 2.366, 3.613, &
-        0.598, 0.725, 0.779, 0.833, 0.898, 0.990, 1.109, 1.290, 1.609, 1.889, 2.398, 3.682, &
-        0.619, 0.750, 0.802, 0.857, 0.927, 1.022, 1.141, 1.328, 1.648, 1.939, 2.455, 3.729, &
-        0.633, 0.767, 0.820, 0.879, 0.948, 1.044, 1.167, 1.353, 1.683, 1.969, 2.491, 3.785, & 
-        0.648, 0.785, 0.838, 0.896, 0.967, 1.066, 1.192, 1.381, 1.714, 2.006, 2.531, 3.836, &
-                           ! seasalt seasalt Accumulation Soluble (AS)
-        4.432, 5.899, 6.505, 7.166, 7.964, 7.962, 9.232,11.257,14.979,18.337,24.223,37.811, &
-        3.298, 4.569, 5.110, 5.709, 6.446, 6.268, 7.396, 9.246,12.787,16.113,22.197,37.136, &
-        2.340, 3.358, 3.803, 4.303, 4.928, 4.696, 5.629, 7.198,10.308,13.342,19.120,34.296, &
-        1.789, 2.626, 2.999, 3.422, 3.955, 3.730, 4.519, 5.864, 8.593,11.319,16.653,31.331, &
-        1.359, 2.037, 2.343, 2.693, 3.139, 2.940, 3.596, 4.729, 7.076, 9.469,14.266,28.043 /
-
-  DATA alpha_aeri_5wv/ &
-                                 ! dust insoluble 
-        0.759, 0.770, 0.775, 0.775, 0.772, & 
-                                 !!jb bc insoluble 
-        11.536,10.033, 8.422, 7.234, 6.270, & 
-                                 ! pom insoluble 
-        5.042, 3.101, 1.890, 1.294, 0.934/ 
-
-  ! internal mixture
-  DATA alpha_MG_5wv/ &
-     ! bc content = 0.001
-       7.930,7.930,7.930,7.930,7.930,7.930,7.930,7.930,10.893,12.618,14.550,16.613, & 
-       7.658,7.658,7.658,7.658,7.658,7.658,7.658,7.658,10.351,11.879,13.642,15.510, & 
-       7.195,7.195,7.195,7.195,7.195,7.195,7.195,7.195,9.551,10.847,12.381,13.994,  & 
-       6.736,6.736,6.736,6.736,6.736,6.736,6.736,6.736,8.818,9.938,11.283,12.687,   & 
-       6.277,6.277,6.277,6.277,6.277,6.277,6.277,6.277,8.123,9.094,10.275,11.501,   & 
-     ! bc content = 0.01
-       7.930,7.930,7.930,7.930,7.930,7.930,7.930,7.930,10.893,12.618,14.550,16.613, & 
-       7.658,7.658,7.658,7.658,7.658,7.658,7.658,7.658,10.351,11.879,13.642,15.510, & 
-       7.195,7.195,7.195,7.195,7.195,7.195,7.195,7.195,9.551,10.847,12.381,13.994,  & 
-       6.736,6.736,6.736,6.736,6.736,6.736,6.736,6.736,8.818,9.938,11.283,12.687,   & 
-       6.277,6.277,6.277,6.277,6.277,6.277,6.277,6.277,8.123,9.094,10.275,11.501,   & 
-     ! bc content = 0.02
-       7.930,7.930,7.930,7.930,7.930,7.930,7.930,7.930,10.893,12.618,14.550,16.613, & 
-       7.658,7.658,7.658,7.658,7.658,7.658,7.658,7.658,10.351,11.879,13.642,15.510, & 
-       7.195,7.195,7.195,7.195,7.195,7.195,7.195,7.195,9.551,10.847,12.381,13.994,  & 
-       6.736,6.736,6.736,6.736,6.736,6.736,6.736,6.736,8.818,9.938,11.283,12.687,   & 
-       6.277,6.277,6.277,6.277,6.277,6.277,6.277,6.277,8.123,9.094,10.275,11.501,   & 
-     ! bc content = 0.05
-       7.930,7.930,7.930,7.930,7.930,7.930,7.930,7.930,10.893,12.618,14.550,16.613, & 
-       7.658,7.658,7.658,7.658,7.658,7.658,7.658,7.658,10.351,11.879,13.642,15.510, & 
-       7.195,7.195,7.195,7.195,7.195,7.195,7.195,7.195,9.551,10.847,12.381,13.994,  & 
-       6.736,6.736,6.736,6.736,6.736,6.736,6.736,6.736,8.818,9.938,11.283,12.687,   & 
-       6.277,6.277,6.277,6.277,6.277,6.277,6.277,6.277,8.123,9.094,10.275,11.501,   & 
-     ! bc content = 0.10
-       7.930,7.930,7.930,7.930,7.930,7.930,7.930,7.930,10.893,12.618,14.550,16.613, & 
-       7.658,7.658,7.658,7.658,7.658,7.658,7.658,7.658,10.351,11.879,13.642,15.510, & 
-       7.195,7.195,7.195,7.195,7.195,7.195,7.195,7.195,9.551,10.847,12.381,13.994,  & 
-       6.736,6.736,6.736,6.736,6.736,6.736,6.736,6.736,8.818,9.938,11.283,12.687,   & 
-       6.277,6.277,6.277,6.277,6.277,6.277,6.277,6.277,8.123,9.094,10.275,11.501 /
-
+! From here on we look at the optical parameters at 5 wavelengths: 443, 550, 670, 765 and 865 nm 
+
+ DATA alpha_aers_5wv/ &
+   ! BC Accumulation Soluble (AS)     
+  5.342, 5.342, 5.342, 5.342, 5.342, 5.829, 6.344, 7.470, 8.603, 8.736, 8.870,10.149, &
+  5.159, 5.159, 5.159, 5.159, 5.159, 5.608, 6.083, 7.121, 8.169, 8.293, 8.418, 9.612, &
+  4.849, 4.849, 4.849, 4.849, 4.849, 5.251, 5.674, 6.598, 7.533, 7.644, 7.756, 8.829, &
+  4.573, 4.573, 4.573, 4.573, 4.573, 4.936, 5.318, 6.152, 6.996, 7.096, 7.198, 8.171, &
+  4.274, 4.274, 4.274, 4.274, 4.274, 4.600, 4.942, 5.686, 6.441, 6.530, 6.621, 7.495, &
+   ! POM Accumulation Soluble (AS)    
+  5.300, 5.300, 5.300, 5.300, 5.300, 5.827, 6.392, 7.640, 8.898, 9.046, 9.195,10.606, &
+  4.569, 4.569, 4.569, 4.569, 4.569, 5.029, 5.528, 6.649, 7.802, 7.939, 8.077, 9.400, &
+  3.768, 3.768, 3.768, 3.768, 3.768, 4.152, 4.573, 5.533, 6.538, 6.658, 6.780, 7.955, &
+  3.210, 3.210, 3.210, 3.210, 3.210, 3.542, 3.909, 4.752, 5.644, 5.751, 5.860, 6.916, &
+  2.709, 2.709, 2.709, 2.709, 2.709, 2.994, 3.309, 4.041, 4.823, 4.917, 5.013, 5.949, &
+   ! Sulfate Coarse Soluble (CS)      
+  0.702, 0.702, 0.702, 0.702, 0.947, 1.025, 1.127, 1.266, 1.490, 1.675, 2.003, 2.857, &
+  0.725, 0.725, 0.725, 0.725, 0.977, 1.057, 1.163, 1.304, 1.529, 1.718, 2.051, 2.914, &
+  0.751, 0.751, 0.751, 0.751, 1.011, 1.093, 1.200, 1.345, 1.576, 1.768, 2.110, 2.973, &
+  0.769, 0.769, 0.769, 0.769, 1.034, 1.120, 1.227, 1.375, 1.613, 1.811, 2.153, 3.032, &
+  0.786, 0.786, 0.786, 0.786, 1.056, 1.144, 1.254, 1.406, 1.646, 1.850, 2.202, 3.088, &
+   !-- Sulfate Accumulation (BC content=0)
+  4.639, 4.639, 4.639, 4.639, 6.244, 6.878, 7.684, 8.805,10.638,12.174,14.880,21.828, &
+  3.966, 3.966, 3.966, 3.966, 5.359, 5.950, 6.707, 7.771, 9.540,11.046,13.742,20.884, &
+  3.234, 3.234, 3.234, 3.234, 4.393, 4.914, 5.587, 6.543, 8.160, 9.556,12.101,19.072, &
+  2.721, 2.721, 2.721, 2.721, 3.712, 4.175, 4.774, 5.634, 7.101, 8.383,10.747,17.381, &
+  2.262, 2.262, 2.262, 2.262, 3.102, 3.505, 4.030, 4.789, 6.097, 7.251, 9.403,15.581, &
+   ! Seasalt Super Coarse Soluble (SS)
+  0.194, 0.237, 0.254, 0.275, 0.299, 0.327, 0.366, 0.432, 0.544, 0.642, 0.824, 1.265, &
+  0.196, 0.240, 0.257, 0.278, 0.303, 0.331, 0.371, 0.437, 0.550, 0.648, 0.831, 1.274, &
+  0.198, 0.243, 0.260, 0.283, 0.306, 0.335, 0.376, 0.442, 0.557, 0.654, 0.839, 1.285, &
+  0.201, 0.246, 0.263, 0.286, 0.308, 0.338, 0.380, 0.445, 0.559, 0.660, 0.846, 1.289, &
+  0.203, 0.249, 0.266, 0.289, 0.312, 0.341, 0.384, 0.449, 0.564, 0.665, 0.852, 1.297, &
+   ! Seasalt Coarse Soluble (CS)      
+  0.576, 0.690, 0.738, 0.789, 0.855, 0.935, 1.046, 1.212, 1.512, 1.785, 2.258, 3.449, &
+  0.595, 0.713, 0.763, 0.814, 0.880, 0.963, 1.079, 1.248, 1.550, 1.826, 2.306, 3.507, &
+  0.617, 0.738, 0.789, 0.842, 0.911, 0.996, 1.113, 1.286, 1.592, 1.871, 2.369, 3.562, &
+  0.632, 0.755, 0.808, 0.862, 0.931, 1.018, 1.140, 1.316, 1.626, 1.909, 2.409, 3.622, &
+  0.645, 0.771, 0.825, 0.880, 0.951, 1.039, 1.164, 1.344, 1.661, 1.948, 2.455, 3.682, &
+   ! Seasalt Accumulation Soluble (AS)
+  3.684, 4.367, 4.711, 5.074, 5.438, 6.046, 6.793, 7.964,10.200,12.246,15.959,24.642, &
+  3.126, 3.717, 4.023, 4.349, 4.673, 5.229, 5.918, 7.018, 9.179,11.208,14.994,24.184, &
+  2.482, 2.973, 3.233, 3.511, 3.788, 4.272, 4.876, 5.858, 7.836, 9.739,13.393,22.658, &
+  2.086, 2.509, 2.735, 2.979, 3.220, 3.649, 4.186, 5.068, 6.874, 8.642,12.099,21.146, &
+  1.737, 2.097, 2.292, 2.503, 2.711, 3.086, 3.556, 4.337, 5.960, 7.571,10.779,19.427, &
+   ! Nitrate Coarse Soluble (CS)      
+  0.726, 0.726, 0.726, 0.796, 0.868, 0.947, 1.041, 1.246, 1.563, 1.872, 2.328, 2.447, &
+  0.753, 0.753, 0.753, 0.825, 0.900, 0.979, 1.075, 1.285, 1.610, 1.922, 2.385, 2.503, &
+  0.780, 0.780, 0.780, 0.854, 0.932, 1.013, 1.113, 1.326, 1.656, 1.979, 2.447, 2.579, &
+  0.797, 0.797, 0.797, 0.874, 0.953, 1.035, 1.138, 1.356, 1.697, 2.020, 2.495, 2.621, &
+  0.811, 0.811, 0.811, 0.890, 0.971, 1.055, 1.160, 1.384, 1.733, 2.062, 2.547, 2.675, &
+   ! Nitrate Accumulation Soluble (AS)
+  4.208, 4.208, 4.208, 4.693, 5.217, 5.778, 6.502, 8.108,10.722,13.327,17.185,18.210, &
+  3.386, 3.386, 3.386, 3.808, 4.268, 4.768, 5.420, 6.897, 9.377,11.923,15.803,16.852, &
+  2.650, 2.650, 2.650, 2.997, 3.380, 3.801, 4.357, 5.638, 7.850,10.189,13.858,14.870, &
+  2.174, 2.174, 2.174, 2.471, 2.802, 3.167, 3.652, 4.784, 6.774, 8.917,12.345,13.302, &
+  1.776, 1.776, 1.776, 2.028, 2.309, 2.622, 3.040, 4.026, 5.787, 7.717,10.858,11.745  /
+
+ DATA alpha_aeri_5wv/ &
+   ! Dust insoluble
+  0.788, 0.818, 0.842, 0.851, 0.853, &
+   ! BC insoluble 
+  5.342, 5.159, 4.849, 4.573, 4.274, &
+   ! POM insoluble
+  5.300, 4.569, 3.768, 3.210, 2.709, &
+   ! Nitrate insoluble
+  0.726, 0.753, 0.780, 0.797, 0.811 /
+
+! Added by R. Wang (July 31 2016)
+! properties for BC assuming Maxwell-Garnett rule and internal mixture
+
+   DATA alpha_MG_5wv/ &
+ !--BC content=0.001
+   4.293,  4.293,  4.293,  4.293,  4.320,  4.342,  4.271,  4.320,  4.476,  4.772,  5.310,  7.434, &
+   4.687,  4.687,  4.687,  4.687,  4.693,  4.602,  4.492,  4.413,  4.374,  4.462,  4.729,  6.274, &
+   4.802,  4.802,  4.802,  4.802,  4.776,  4.646,  4.516,  4.371,  4.231,  4.173,  4.217,  5.072, &
+   4.716,  4.716,  4.716,  4.716,  4.668,  4.548,  4.408,  4.249,  4.047,  3.951,  3.850,  4.259, &
+   4.520,  4.520,  4.520,  4.520,  4.461,  4.353,  4.230,  4.069,  3.850,  3.707,  3.524,  3.565, &
+ !--BC content=0.010
+   4.298,  4.298,  4.298,  4.298,  4.343,  4.333,  4.283,  4.325,  4.472,  4.751,  5.298,  7.402, &
+   4.692,  4.692,  4.692,  4.692,  4.695,  4.598,  4.499,  4.410,  4.383,  4.454,  4.739,  6.260, &
+   4.796,  4.796,  4.796,  4.796,  4.768,  4.644,  4.518,  4.376,  4.230,  4.172,  4.225,  5.048, &
+   4.708,  4.708,  4.708,  4.708,  4.659,  4.543,  4.411,  4.256,  4.053,  3.945,  3.855,  4.242, &
+   4.509,  4.509,  4.509,  4.509,  4.456,  4.351,  4.229,  4.072,  3.852,  3.707,  3.531,  3.560, &
+ !--BC content=0.020
+   4.301,  4.301,  4.301,  4.301,  4.353,  4.330,  4.291,  4.326,  4.478,  4.738,  5.288,  7.393, &
+   4.688,  4.688,  4.688,  4.688,  4.695,  4.596,  4.500,  4.412,  4.386,  4.454,  4.737,  6.248, &
+   4.787,  4.787,  4.787,  4.787,  4.761,  4.641,  4.516,  4.378,  4.231,  4.176,  4.226,  5.041, &
+   4.696,  4.696,  4.696,  4.696,  4.651,  4.538,  4.409,  4.256,  4.055,  3.948,  3.858,  4.240, &
+   4.497,  4.497,  4.497,  4.497,  4.448,  4.345,  4.225,  4.072,  3.854,  3.709,  3.535,  3.561, &
+ !--BC content=0.050
+   4.318,  4.318,  4.318,  4.318,  4.377,  4.337,  4.310,  4.334,  4.488,  4.724,  5.267,  7.342, &
+   4.678,  4.678,  4.678,  4.678,  4.693,  4.595,  4.506,  4.421,  4.396,  4.458,  4.734,  6.203, &
+   4.760,  4.760,  4.760,  4.760,  4.742,  4.631,  4.512,  4.381,  4.237,  4.185,  4.229,  5.015, &
+   4.662,  4.662,  4.662,  4.662,  4.629,  4.522,  4.401,  4.254,  4.062,  3.955,  3.867,  4.229, &
+   4.461,  4.461,  4.461,  4.461,  4.424,  4.328,  4.215,  4.068,  3.858,  3.718,  3.545,  3.562, &
+ !--BC content=0.100
+   4.348,  4.348,  4.348,  4.348,  4.404,  4.361,  4.337,  4.358,  4.503,  4.717,  5.240,  7.239, &
+   4.662,  4.662,  4.662,  4.662,  4.685,  4.596,  4.513,  4.437,  4.411,  4.468,  4.729,  6.123, &
+   4.716,  4.716,  4.716,  4.716,  4.713,  4.613,  4.505,  4.384,  4.249,  4.199,  4.235,  4.974, &
+   4.607,  4.607,  4.607,  4.607,  4.593,  4.497,  4.387,  4.252,  4.072,  3.969,  3.882,  4.212, &
+   4.403,  4.403,  4.403,  4.403,  4.385,  4.299,  4.196,  4.061,  3.865,  3.731,  3.564,  3.563, &
+ !--BC content=0.200
+   4.401,  4.401,  4.401,  4.401,  4.447,  4.409,  4.389,  4.405,  4.529,  4.715,  5.183,  7.007, &
+   4.631,  4.631,  4.631,  4.631,  4.666,  4.594,  4.526,  4.463,  4.439,  4.488,  4.714,  5.958, &
+   4.633,  4.633,  4.633,  4.633,  4.654,  4.575,  4.488,  4.387,  4.271,  4.224,  4.250,  4.894, &
+   4.505,  4.505,  4.505,  4.505,  4.520,  4.444,  4.356,  4.243,  4.089,  3.997,  3.912,  4.179, &
+   4.295,  4.295,  4.295,  4.295,  4.307,  4.239,  4.157,  4.045,  3.876,  3.757,  3.602,  3.569  /
   ! 
   ! Initialisations
@@ -252,5 +271,5 @@
      aerosol_name(1) = id_CIDUSTM_phy
   ELSEIF (flag_aerosol .EQ. 6) THEN 
-     nb_aer = 10
+     nb_aer = 13
      ALLOCATE (aerosol_name(nb_aer)) 
      aerosol_name(1) = id_ASSO4M_phy      
@@ -264,4 +283,7 @@
      aerosol_name(9) = id_CIDUSTM_phy
      aerosol_name(10)= id_CSSO4M_phy
+     aerosol_name(11)= id_CSNO3M_phy
+     aerosol_name(12)= id_ASNO3M_phy
+     aerosol_name(13)= id_CINO3M_phy
   ENDIF
 
@@ -315,4 +337,12 @@
         soluble=.TRUE.
         spsol=7
+    ELSEIF (aerosol_name(m).EQ.id_CSNO3M_phy) THEN
+        soluble=.TRUE.
+        spsol=8
+        fac=1.2903    ! NO3NH4/NO3 / mass conversion factor for AOD
+    ELSEIF (aerosol_name(m).EQ.id_ASNO3M_phy) THEN
+        soluble=.TRUE.
+        spsol=9
+        fac=1.2903    ! NO3NH4/NO3 / mass conversion factor for AOD
     ELSEIF (aerosol_name(m).EQ.id_CIDUSTM_phy) THEN 
         soluble=.FALSE.
@@ -324,4 +354,8 @@
         soluble=.FALSE.
         spinsol=3
+    ELSEIF (aerosol_name(m).EQ.id_CINO3M_phy) THEN 
+        soluble=.FALSE.
+        spinsol=4
+        fac=1.2903    ! NO3NH4/NO3 / mass conversion factor for AOD
     ELSE 
         CYCLE
@@ -345,5 +379,7 @@
              BC_massfra = m_allaer(i,k,id_ASBCM_phy)/(m_allaer(i,k,id_ASBCM_phy)+m_allaer(i,k,id_ASSO4M_phy))
 
-             IF (BC_massfra.GE.0.10) THEN
+             IF (BC_massfra.GE.0.20) THEN
+               classbc = 6
+             ELSEIF (BC_massfra.GE.0.10) THEN
                classbc = 5
              ELSEIF  (BC_massfra.GE.0.05) THEN
Index: LMDZ5/branches/testing/libf/phylmd/rrtm/aeropt_6bands_rrtm.F90
===================================================================
--- LMDZ5/branches/testing/libf/phylmd/rrtm/aeropt_6bands_rrtm.F90	(revision 2729)
+++ LMDZ5/branches/testing/libf/phylmd/rrtm/aeropt_6bands_rrtm.F90	(revision 2787)
@@ -11,4 +11,5 @@
   USE aero_mod
   USE phys_local_var_mod, only: absvisaer
+  USE YOMCST, ONLY: RG
 
   !    Yves Balkanski le 12 avril 2006
@@ -20,18 +21,16 @@
   !
   IMPLICIT NONE
-
-  INCLUDE "YOMCST.h"
+  ! 
   INCLUDE "clesphys.h"
-
   !
   ! Input arguments:
   !
-  REAL, DIMENSION(klon,klev),     INTENT(in)  :: pdel
-  REAL, DIMENSION(klon,klev,naero_tot),   INTENT(in)  :: m_allaer
-  REAL, DIMENSION(klon,klev,naero_tot),   INTENT(in)  :: m_allaer_pi
-  REAL, DIMENSION(klon,klev),     INTENT(in)  :: RHcl       ! humidite relative ciel clair
-  INTEGER,                        INTENT(in)  :: flag_aerosol
-  LOGICAL,                        INTENT(in)  :: flag_bc_internal_mixture
-  REAL, DIMENSION(klon,klev),     INTENT(in)  :: zrho
+  REAL, DIMENSION(klon,klev),     INTENT(IN)  :: pdel
+  REAL, DIMENSION(klon,klev,naero_tot),   INTENT(IN)  :: m_allaer
+  REAL, DIMENSION(klon,klev,naero_tot),   INTENT(IN)  :: m_allaer_pi
+  REAL, DIMENSION(klon,klev),     INTENT(IN)  :: RHcl       ! humidite relative ciel clair
+  INTEGER,                        INTENT(IN)  :: flag_aerosol
+  LOGICAL,                        INTENT(IN)  :: flag_bc_internal_mixture
+  REAL, DIMENSION(klon,klev),     INTENT(IN)  :: zrho
   !
   ! Output arguments:
@@ -39,12 +38,11 @@
   ! 1= natural aerosols
   !
-  REAL, DIMENSION(klon,klev,2,nbands_sw_rrtm), INTENT(out) :: tau_allaer ! epaisseur optique aerosol
-  REAL, DIMENSION(klon,klev,2,nbands_sw_rrtm), INTENT(out) :: piz_allaer ! single scattering albedo aerosol
-  REAL, DIMENSION(klon,klev,2,nbands_sw_rrtm), INTENT(out) :: cg_allaer  ! asymmetry parameter aerosol
-
+  REAL, DIMENSION(klon,klev,2,nbands_sw_rrtm), INTENT(OUT) :: tau_allaer ! epaisseur optique aerosol
+  REAL, DIMENSION(klon,klev,2,nbands_sw_rrtm), INTENT(OUT) :: piz_allaer ! single scattering albedo aerosol
+  REAL, DIMENSION(klon,klev,2,nbands_sw_rrtm), INTENT(OUT) :: cg_allaer  ! asymmetry parameter aerosol
   !
   ! Local
   !
-  LOGICAL ::  soluble
+  LOGICAL :: soluble
   INTEGER :: i, k,n, inu, m
   INTEGER :: spsol, spinsol
@@ -53,7 +51,9 @@
   INTEGER, PARAMETER :: nb_level=19 ! number of vertical levels in DATA
 
-  INTEGER, PARAMETER :: naero_soluble=7    ! 1- BC soluble; 2- POM soluble; 3- SO4. acc. 4- SO4 coarse
-                                           ! 5- seasalt super coarse  6- seasalt coarse   7- seasalt acc.
-  INTEGER, PARAMETER :: naero_insoluble=3  ! 1- Dust; 2- BC insoluble; 3- POM insoluble
+  INTEGER, PARAMETER :: naero_soluble=9    ! 1- BC soluble; 2- POM soluble; 3- SO4. acc. 4- SO4 coarse
+                                           ! 5- seasalt super coarse  6- seasalt
+                                           ! coarse  7- seasalt acc.
+                                           ! 8- NO3 coarse 9- NO3 acc.
+  INTEGER, PARAMETER :: naero_insoluble=4  ! 1- Dust; 2- BC insoluble; 3- POM insoluble; 4- NO3 insoluble
 
   INTEGER, PARAMETER :: nbre_RH=12
@@ -67,12 +67,12 @@
   REAL :: fac
   REAL :: zdh(klon,klev) 
-  INTEGER, ALLOCATABLE, DIMENSION(:)   :: aerosol_name
+  INTEGER, ALLOCATABLE, DIMENSION(:) :: aerosol_name
   INTEGER :: nb_aer
 
-  REAL, DIMENSION(klon,klev,naero_tot,nbands_sw_rrtm) ::  tau_ae
-  REAL, DIMENSION(klon,klev,naero_tot,nbands_sw_rrtm) ::  piz_ae
-  REAL, DIMENSION(klon,klev,naero_tot,nbands_sw_rrtm) ::  cg_ae
-
-  REAL, DIMENSION(klon,klev,naero_tot,nbands_sw_rrtm) ::  tau_ae_pi
+  REAL, DIMENSION(klon,klev,naero_tot,nbands_sw_rrtm) :: tau_ae
+  REAL, DIMENSION(klon,klev,naero_tot,nbands_sw_rrtm) :: piz_ae
+  REAL, DIMENSION(klon,klev,naero_tot,nbands_sw_rrtm) :: cg_ae
+
+  REAL, DIMENSION(klon,klev,naero_tot,nbands_sw_rrtm) :: tau_ae_pi
   REAL, DIMENSION(klon,klev,id_ASBCM_phy:id_ASBCM_phy,nbands_sw_rrtm) :: piz_ae_pi
   REAL, DIMENSION(klon,klev,id_ASBCM_phy:id_ASBCM_phy,nbands_sw_rrtm) :: cg_ae_pi
@@ -80,16 +80,16 @@
   ! Proprietes optiques
   !
-  REAL:: alpha_aers_6bands(nbre_RH,nbands_sw_rrtm,naero_soluble)   !--unit m2/g SO4
-  REAL:: alpha_aeri_6bands(nbands_sw_rrtm,naero_insoluble)
-  REAL:: cg_aers_6bands(nbre_RH,nbands_sw_rrtm,naero_soluble)      !--unit 
-  REAL:: cg_aeri_6bands(nbands_sw_rrtm,naero_insoluble)
-  REAL:: piz_aers_6bands(nbre_RH,nbands_sw_rrtm,naero_soluble)     !-- unit
-  REAL:: piz_aeri_6bands(nbands_sw_rrtm,naero_insoluble)        !-- unit
+  REAL:: alpha_aers_6bands(nbre_RH,nbands_sw_rrtm,naero_soluble)   !--unit m2/g
+  REAL:: alpha_aeri_6bands(nbands_sw_rrtm,naero_insoluble)         !--unit m2/g
+  REAL:: cg_aers_6bands(nbre_RH,nbands_sw_rrtm,naero_soluble)      !--unitless
+  REAL:: cg_aeri_6bands(nbands_sw_rrtm,naero_insoluble)            !--unitless
+  REAL:: piz_aers_6bands(nbre_RH,nbands_sw_rrtm,naero_soluble)     !--unitless
+  REAL:: piz_aeri_6bands(nbands_sw_rrtm,naero_insoluble)           !--unitless
   ! 
   ! BC internal mixture
   !
-  INTEGER, PARAMETER ::  nbclassbc = 5  ! Added by Rong Wang/OB for the 5 fractions
-                                       ! of BC in the soluble mode:
-                                       ! bc_content/0.001, 0.01, 0.02, 0.05, 0.1/
+  INTEGER, PARAMETER ::  nbclassbc = 6  ! Added by Rong Wang/OB for the 5 fractions
+                                        ! of BC in the soluble mode:
+                                        ! bc_content/0.001, 0.01, 0.02, 0.05, 0.1, 0.2/
   ! for Maxwell-Garnet internal mixture
   ! Detailed theory can be found in R. Wang Estimation of global black carbon direct
@@ -100,10 +100,9 @@
   REAL :: piz_MG_6bands(nbre_RH,nbands_sw_rrtm,nbclassbc)
   !
-  INTEGER :: id, classbc, classbc_pi
+  INTEGER :: aerindex, classbc, classbc_pi
   REAL :: tmp_var, tmp_var_pi, BC_massfra, BC_massfra_pi
-
-  !
-  REAL, PARAMETER :: tau_min = 1.e-15
-!  REAL, PARAMETER :: tau_min = 1.e-7
+  CHARACTER*20 :: modname
+  !
+  REAL, PARAMETER :: tau_min = 1.e-7
 
 !***************************************************************************
@@ -112,295 +111,366 @@
 
   DATA alpha_aers_6bands/  & 
-       ! bc soluble AS
-  6.497, 6.497, 6.497, 6.497, 6.497, 7.160, 7.875, 9.356,10.811,10.974,11.149,12.734, &
-  6.497, 6.497, 6.497, 6.497, 6.497, 7.160, 7.875, 9.356,10.811,10.974,11.149,12.734, &
-  5.900, 5.900, 5.900, 5.900, 5.900, 6.502, 7.151, 8.496, 9.818, 9.965,10.124,11.564, &
-  4.284, 4.284, 4.284, 4.284, 4.284, 4.721, 5.193, 6.169, 7.129, 7.236, 7.352, 8.397, &
-  2.163, 2.163, 2.163, 2.163, 2.163, 2.384, 2.622, 3.115, 3.600, 3.654, 3.712, 4.240, &
-  0.966, 0.966, 0.966, 0.966, 0.966, 1.065, 1.171, 1.392, 1.608, 1.632, 1.658, 1.894, &
-       ! pom soluble AS
-  6.443, 6.443, 6.443, 6.443, 6.443, 7.100, 7.809, 9.277,10.721,10.882,11.056,12.628, &
-  6.443, 6.443, 6.443, 6.443, 6.443, 7.100, 7.809, 9.277,10.721,10.882,11.056,12.628, &
-  4.381, 4.381, 4.381, 4.381, 4.381, 4.828, 5.310, 6.309, 7.290, 7.400, 7.518, 8.587, &
-  1.846, 1.846, 1.846, 1.846, 1.846, 2.034, 2.237, 2.658, 3.072, 3.118, 3.168, 3.618, &
-  0.377, 0.377, 0.377, 0.377, 0.377, 0.415, 0.456, 0.542, 0.627, 0.636, 0.646, 0.738, &
-  0.052, 0.052, 0.052, 0.052, 0.052, 0.057, 0.063, 0.075, 0.087, 0.088, 0.089, 0.102, &
-       ! sulfate AS   
-  6.554, 6.554, 6.554, 7.223, 7.931, 8.665, 9.438,10.736,14.275,17.755,17.755,31.722, &
-  6.554, 6.554, 6.554, 7.223, 7.931, 8.665, 9.438,10.736,14.275,17.755,17.755,31.722, &
-  4.381, 4.381, 4.381, 4.828, 5.301, 5.792, 6.309, 7.176, 9.542,11.868,11.868,21.204, &
-  1.727, 1.727, 1.727, 1.903, 2.090, 2.283, 2.487, 2.829, 3.762, 4.679, 4.679, 8.359, &
-  0.312, 0.312, 0.312, 0.344, 0.378, 0.413, 0.450, 0.511, 0.680, 0.846, 0.846, 1.511, &
-  0.121, 0.121, 0.121, 0.134, 0.147, 0.161, 0.175, 0.199, 0.264, 0.329, 0.329, 0.588, &
-       ! sulfate coarse CS
-  0.693, 0.693, 0.693, 0.764, 0.839, 0.917, 0.999, 1.136, 1.510, 1.879, 1.879, 3.356, &
-  0.693, 0.693, 0.693, 0.764, 0.839, 0.917, 0.999, 1.136, 1.510, 1.879, 1.879, 3.356, &
-  0.715, 0.715, 0.715, 0.788, 0.865, 0.945, 1.029, 1.171, 1.557, 1.936, 1.936, 3.459, &
-  0.736, 0.736, 0.736, 0.811, 0.891, 0.973, 1.060, 1.206, 1.603, 1.994, 1.994, 3.563, &
-  0.711, 0.711, 0.711, 0.783, 0.860, 0.939, 1.023, 1.164, 1.548, 1.925, 1.925, 3.439, &
-  0.602, 0.602, 0.602, 0.664, 0.729, 0.796, 0.867, 0.986, 1.312, 1.631, 1.631, 2.915, &
-        ! seasalt seasalt Super Coarse Soluble (SS)
-  0.214, 0.267, 0.287, 0.310, 0.337, 0.373, 0.421, 0.494, 0.625, 0.742, 0.956, 1.480, &
-  0.217, 0.270, 0.291, 0.314, 0.341, 0.377, 0.426, 0.499, 0.632, 0.751, 0.963, 1.490, &
-  0.221, 0.275, 0.297, 0.320, 0.348, 0.384, 0.434, 0.507, 0.642, 0.762, 0.976, 1.506, &
-  0.230, 0.285, 0.308, 0.331, 0.359, 0.396, 0.447, 0.522, 0.658, 0.780, 0.997, 1.536, &
-  0.250, 0.307, 0.330, 0.354, 0.384, 0.424, 0.477, 0.556, 0.696, 0.822, 1.044, 1.592, &
-  0.279, 0.347, 0.373, 0.401, 0.434, 0.478, 0.537, 0.625, 0.781, 0.918, 1.158, 1.744, &
-        ! seasalt seasalt Coarse Soluble (CS)      
-  0.550, 0.676, 0.724, 0.779, 0.841, 0.925, 1.040, 1.213, 1.523, 1.803, 2.306, 3.535, &
-  0.568, 0.695, 0.744, 0.798, 0.863, 0.950, 1.066, 1.240, 1.556, 1.839, 2.342, 3.588, &
-  0.599, 0.727, 0.779, 0.834, 0.901, 0.993, 1.111, 1.290, 1.612, 1.899, 2.411, 3.669, &
-  0.647, 0.786, 0.841, 0.899, 0.969, 1.069, 1.193, 1.384, 1.717, 2.015, 2.543, 3.842, &
-  0.663, 0.825, 0.889, 0.957, 1.038, 1.126, 1.268, 1.483, 1.862, 2.196, 2.780, 4.183, &
-  0.479, 0.644, 0.711, 0.785, 0.873, 0.904, 1.048, 1.275, 1.692, 2.072, 2.753, 4.430, &
-        ! seasalt seasalt Accumulation Soluble (AS)
-  6.128, 7.564, 8.127, 8.723, 9.421,10.014,11.250,13.113,16.320,19.061,23.675,34.158, &
-  5.080, 6.586, 7.197, 7.856, 8.645, 8.820,10.115,12.140,15.775,18.983,24.499,36.993, &
-  3.290, 4.541, 5.073, 5.663, 6.387, 6.227, 7.339, 9.161,12.645,15.918,21.908,36.673, &
-  1.389, 2.066, 2.371, 2.719, 3.161, 2.970, 3.623, 4.747, 7.064, 9.419,14.120,27.565, &
-  0.309, 0.497, 0.587, 0.693, 0.832, 0.777, 0.986, 1.364, 2.207, 3.136, 5.174,12.065, &
-  0.021, 0.037, 0.045, 0.054, 0.067, 0.065, 0.087, 0.129, 0.230, 0.353, 0.654, 1.885  /
+   ! BC Accumulation Soluble (AS)     
+  5.276, 5.276, 5.276, 5.276, 5.276, 5.797, 6.353, 7.568, 8.779, 8.920, 9.062,10.403, &
+  5.371, 5.371, 5.371, 5.371, 5.371, 5.870, 6.401, 7.559, 8.720, 8.857, 8.994,10.298, &
+  5.126, 5.126, 5.126, 5.126, 5.126, 5.572, 6.043, 7.073, 8.113, 8.235, 8.359, 9.544, &
+  4.225, 4.225, 4.225, 4.225, 4.225, 4.549, 4.887, 5.624, 6.370, 6.459, 6.548, 7.412, &
+  2.667, 2.667, 2.667, 2.667, 2.667, 2.840, 3.015, 3.382, 3.745, 3.788, 3.832, 4.251, &
+  1.113, 1.113, 1.113, 1.113, 1.113, 1.210, 1.307, 1.506, 1.699, 1.721, 1.744, 1.961, &
+   ! POM Accumulation Soluble (AS)    
+  5.962, 5.962, 5.962, 5.962, 5.962, 6.544, 7.153, 8.460, 9.732, 9.877,10.026,11.398, &
+  5.609, 5.609, 5.609, 5.609, 5.609, 6.163, 6.752, 8.041, 9.324, 9.473, 9.624,11.044, &
+  4.527, 4.527, 4.527, 4.527, 4.527, 4.982, 5.476, 6.586, 7.726, 7.861, 7.998, 9.306, &
+  2.697, 2.697, 2.697, 2.697, 2.697, 2.980, 3.293, 4.017, 4.790, 4.884, 4.979, 5.902, &
+  0.918, 0.918, 0.918, 0.918, 0.918, 1.025, 1.146, 1.435, 1.754, 1.794, 1.834, 2.232, &
+  0.105, 0.105, 0.105, 0.105, 0.105, 0.154, 0.211, 0.344, 0.491, 0.509, 0.528, 0.710, &
+  ! Sulfate Coarse Soluble (CS)      
+  0.670, 0.670, 0.670, 0.670, 0.905, 0.981, 1.081, 1.217, 1.434, 1.615, 1.940, 2.773, &
+  0.689, 0.689, 0.689, 0.689, 0.930, 1.009, 1.110, 1.247, 1.469, 1.655, 1.980, 2.825, &
+  0.726, 0.726, 0.726, 0.726, 0.978, 1.060, 1.164, 1.306, 1.533, 1.723, 2.056, 2.915, &
+  0.785, 0.785, 0.785, 0.785, 1.056, 1.144, 1.254, 1.406, 1.650, 1.852, 2.203, 3.103, &
+  0.795, 0.795, 0.795, 0.795, 1.064, 1.160, 1.282, 1.449, 1.720, 1.945, 2.340, 3.348, &
+  0.502, 0.502, 0.502, 0.502, 0.656, 0.728, 0.820, 0.950, 1.170, 1.360, 1.706, 2.666, &
+   !-- Sulfate Accumulation (BC content=0)
+  5.246, 5.246, 5.246, 5.246, 7.041, 7.658, 8.437, 9.503,11.204,12.608,15.030,21.080, &
+  4.924, 4.924, 4.924, 4.924, 6.619, 7.258, 8.067, 9.186,10.998,12.507,15.142,21.822, &
+  3.925, 3.925, 3.925, 3.925, 5.304, 5.888, 6.635, 7.686, 9.433,10.921,13.587,20.659, &
+  2.248, 2.248, 2.248, 2.248, 3.079, 3.477, 3.993, 4.738, 6.022, 7.153, 9.261,15.301, &
+  0.720, 0.720, 0.720, 0.720, 1.014, 1.169, 1.374, 1.678, 2.225, 2.726, 3.703, 6.779, &
+  0.069, 0.069, 0.069, 0.069, 0.102, 0.121, 0.146, 0.185, 0.258, 0.328, 0.472, 0.974, &
+   ! Seasalt Super Coarse Soluble (SS)
+  0.189, 0.232, 0.249, 0.270, 0.293, 0.322, 0.361, 0.425, 0.536, 0.634, 0.813, 1.250, &
+  0.192, 0.235, 0.252, 0.274, 0.296, 0.325, 0.365, 0.429, 0.542, 0.639, 0.821, 1.259, &
+  0.196, 0.240, 0.257, 0.279, 0.302, 0.331, 0.371, 0.437, 0.550, 0.649, 0.832, 1.274, &
+  0.204, 0.249, 0.267, 0.289, 0.313, 0.342, 0.384, 0.450, 0.565, 0.666, 0.851, 1.300, &
+  0.222, 0.270, 0.289, 0.313, 0.338, 0.369, 0.413, 0.482, 0.602, 0.705, 0.896, 1.355, &
+  0.244, 0.293, 0.313, 0.338, 0.364, 0.397, 0.443, 0.517, 0.646, 0.757, 0.960, 1.443, &
+   ! Seasalt Coarse Soluble (CS)      
+  0.547, 0.657, 0.705, 0.754, 0.817, 0.896, 1.008, 1.169, 1.456, 1.724, 2.199, 3.358, &
+  0.566, 0.679, 0.727, 0.776, 0.840, 0.920, 1.032, 1.196, 1.492, 1.760, 2.238, 3.416, &
+  0.596, 0.714, 0.764, 0.816, 0.882, 0.965, 1.081, 1.250, 1.552, 1.828, 2.310, 3.509, &
+  0.644, 0.771, 0.825, 0.880, 0.951, 1.040, 1.164, 1.345, 1.666, 1.957, 2.462, 3.700, &
+  0.640, 0.772, 0.829, 0.887, 0.965, 1.061, 1.198, 1.398, 1.758, 2.085, 2.658, 4.031, &
+  0.452, 0.562, 0.609, 0.659, 0.728, 0.813, 0.938, 1.125, 1.471, 1.797, 2.384, 3.855, &
+   ! Seasalt Accumulation Soluble (AS)
+  4.270, 5.032, 5.395, 5.772, 6.158, 6.768, 7.510, 8.634,10.695,12.512,15.740,23.122, &
+  3.952, 4.673, 5.030, 5.403, 5.781, 6.399, 7.156, 8.328,10.533,12.524,16.091,24.329, &
+  3.090, 3.676, 3.979, 4.301, 4.622, 5.172, 5.853, 6.941, 9.077,11.083,14.830,23.951, &
+  1.710, 2.069, 2.262, 2.471, 2.678, 3.048, 3.513, 4.285, 5.882, 7.467,10.618,19.102, &
+  0.529, 0.663, 0.737, 0.819, 0.901, 1.050, 1.244, 1.575, 2.301, 3.067, 4.704, 9.712, &
+  0.073, 0.142, 0.177, 0.215, 0.259, 0.328, 0.422, 0.579, 0.913, 1.263, 2.011, 4.358, &
+   ! Nitrate Coarse Soluble (CS)      
+  0.688, 0.688, 0.688, 0.755, 0.826, 0.900, 0.994, 1.190, 1.501, 1.804, 2.251, 2.374, &
+  0.712, 0.712, 0.712, 0.781, 0.853, 0.929, 1.023, 1.225, 1.540, 1.846, 2.299, 2.421, &
+  0.754, 0.754, 0.754, 0.826, 0.902, 0.980, 1.077, 1.286, 1.612, 1.925, 2.388, 2.509, &
+  0.809, 0.809, 0.809, 0.887, 0.969, 1.053, 1.160, 1.384, 1.732, 2.069, 2.557, 2.685, &
+  0.786, 0.786, 0.786, 0.867, 0.952, 1.043, 1.157, 1.403, 1.793, 2.171, 2.725, 2.871, &
+  0.703, 0.703, 0.703, 0.767, 0.836, 0.909, 1.002, 1.210, 1.552, 1.901, 2.434, 2.579, &
+   ! Nitrate Accumulation Soluble (AS)
+  5.251, 5.251, 5.251, 5.779, 6.336, 6.920, 7.655, 9.230,11.678,14.026,17.391,18.279, &
+  4.643, 4.643, 4.643, 5.152, 5.696, 6.276, 7.016, 8.640,11.238,13.787,17.511,18.494, &
+  3.373, 3.373, 3.373, 3.790, 4.245, 4.739, 5.383, 6.842, 9.289,11.804,15.637,16.675, &
+  1.779, 1.779, 1.779, 2.029, 2.309, 2.619, 3.033, 4.008, 5.746, 7.645,10.730,11.601, &
+  0.549, 0.549, 0.549, 0.639, 0.742, 0.859, 1.019, 1.412, 2.157, 3.029, 4.552, 5.002, &
+  0.367, 0.367, 0.367, 0.416, 0.471, 0.532, 0.614, 0.808, 1.166, 1.575, 2.281, 2.489  /
+
+  DATA piz_aers_6bands/&
+   ! BC Accumulation Soluble (AS)     
+  0.480, 0.480, 0.480, 0.480, 0.480, 0.487, 0.495, 0.513, 0.530, 0.532, 0.534, 0.553, &
+  0.469, 0.469, 0.469, 0.469, 0.469, 0.474, 0.480, 0.497, 0.514, 0.517, 0.519, 0.538, &
+  0.456, 0.456, 0.456, 0.456, 0.456, 0.464, 0.473, 0.495, 0.519, 0.522, 0.524, 0.550, &
+  0.427, 0.427, 0.427, 0.427, 0.427, 0.437, 0.448, 0.476, 0.505, 0.509, 0.512, 0.543, &
+  0.349, 0.349, 0.349, 0.349, 0.349, 0.358, 0.369, 0.396, 0.425, 0.429, 0.432, 0.465, &
+  0.196, 0.196, 0.196, 0.196, 0.196, 0.198, 0.202, 0.213, 0.226, 0.227, 0.229, 0.243, &
+   ! POM Accumulation Soluble (AS)    
+  0.956, 0.956, 0.956, 0.956, 0.956, 0.961, 0.964, 0.970, 0.974, 0.975, 0.975, 0.978, &
+  0.965, 0.965, 0.965, 0.965, 0.965, 0.969, 0.972, 0.977, 0.980, 0.980, 0.981, 0.983, &
+  0.969, 0.969, 0.969, 0.969, 0.969, 0.972, 0.975, 0.979, 0.983, 0.983, 0.983, 0.986, &
+  0.953, 0.953, 0.953, 0.953, 0.953, 0.958, 0.962, 0.969, 0.974, 0.975, 0.975, 0.979, &
+  0.892, 0.892, 0.892, 0.892, 0.892, 0.902, 0.912, 0.928, 0.940, 0.942, 0.943, 0.952, &
+  0.826, 0.826, 0.826, 0.826, 0.826, 0.658, 0.568, 0.479, 0.444, 0.442, 0.439, 0.426, &
+   ! Sulfate Coarse Soluble (CS)      
+  1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, &
+  1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, &
+  1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, &
+  1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, &
+  1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, &
+  1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, &
+   !-- Sulfate Accumulation (BC content=0)
+  1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, &
+  1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, &
+  1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, &
+  1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, &
+  1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, &
+  1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, &
+   ! Seasalt Super Coarse Soluble (SS)
+  1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, &
+  1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, &
+  1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, &
+  0.999, 0.999, 0.999, 0.999, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, &
+  0.983, 0.985, 0.986, 0.987, 0.987, 0.988, 0.988, 0.989, 0.989, 0.989, 0.989, 0.989, &
+  0.957, 0.792, 0.765, 0.740, 0.721, 0.704, 0.687, 0.670, 0.652, 0.643, 0.631, 0.617, &
+   ! Seasalt Coarse Soluble (CS)      
+  1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.001, 1.000, &
+  1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, &
+  1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, &
+  1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, &
+  0.994, 0.994, 0.995, 0.995, 0.995, 0.995, 0.996, 0.996, 0.996, 0.996, 0.996, 0.996, &
+  0.976, 0.867, 0.837, 0.814, 0.796, 0.774, 0.754, 0.735, 0.713, 0.702, 0.690, 0.675, &
+   ! Seasalt Accumulation Soluble (AS)
+  1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, &
+  1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, &
+  1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, &
+  1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, &
+  0.995, 0.996, 0.996, 0.996, 0.997, 0.997, 0.997, 0.998, 0.998, 0.998, 0.998, 0.999, &
+  0.919, 0.607, 0.553, 0.515, 0.480, 0.455, 0.434, 0.421, 0.421, 0.429, 0.449, 0.492, &
+   ! Nitrate Coarse Soluble (CS)      
+  1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, &
+  1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, &
+  1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, &
+  1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, &
+  0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.998, 0.998, 0.998, 0.998, 0.998, 0.998, &
+  0.707, 0.707, 0.707, 0.705, 0.702, 0.699, 0.697, 0.692, 0.686, 0.683, 0.679, 0.678, &
+   ! Nitrate Accumulation Soluble (AS)
+  1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, &
+  1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, &
+  1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, &
+  1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, &
+  0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, &
+  0.362, 0.362, 0.362, 0.362, 0.363, 0.365, 0.367, 0.375, 0.390, 0.406, 0.428, 0.434  /
+
+  DATA cg_aers_6bands/ &
+   ! BC Accumulation Soluble (AS)     
+  0.820, 0.820, 0.820, 0.820, 0.820, 0.831, 0.840, 0.852, 0.859, 0.860, 0.860, 0.864, &
+  0.760, 0.760, 0.760, 0.760, 0.760, 0.777, 0.791, 0.812, 0.826, 0.827, 0.828, 0.837, &
+  0.695, 0.695, 0.695, 0.695, 0.695, 0.716, 0.734, 0.762, 0.780, 0.782, 0.784, 0.797, &
+  0.603, 0.603, 0.603, 0.603, 0.603, 0.628, 0.649, 0.685, 0.710, 0.712, 0.715, 0.734, &
+  0.469, 0.469, 0.469, 0.469, 0.469, 0.494, 0.518, 0.559, 0.590, 0.593, 0.597, 0.622, &
+  0.276, 0.276, 0.276, 0.276, 0.276, 0.292, 0.308, 0.337, 0.361, 0.364, 0.367, 0.389, &
+   ! POM Accumulation Soluble (AS)    
+  0.687, 0.687, 0.687, 0.687, 0.687, 0.700, 0.711, 0.729, 0.740, 0.741, 0.742, 0.750, &
+  0.685, 0.685, 0.685, 0.685, 0.685, 0.699, 0.712, 0.731, 0.744, 0.745, 0.747, 0.756, &
+  0.673, 0.673, 0.673, 0.673, 0.673, 0.689, 0.702, 0.724, 0.739, 0.741, 0.742, 0.754, &
+  0.637, 0.637, 0.637, 0.637, 0.637, 0.653, 0.667, 0.691, 0.709, 0.711, 0.712, 0.726, &
+  0.553, 0.553, 0.553, 0.553, 0.553, 0.568, 0.582, 0.607, 0.628, 0.630, 0.632, 0.649, &
+  0.340, 0.340, 0.340, 0.340, 0.340, 0.350, 0.361, 0.382, 0.400, 0.402, 0.404, 0.422, &
+   ! Sulfate Coarse Soluble (CS)      
+  0.746, 0.746, 0.746, 0.746, 0.779, 0.785, 0.790, 0.796, 0.804, 0.810, 0.816, 0.830, &
+  0.730, 0.730, 0.730, 0.730, 0.764, 0.770, 0.775, 0.782, 0.791, 0.797, 0.806, 0.819, &
+  0.707, 0.707, 0.707, 0.707, 0.746, 0.752, 0.758, 0.765, 0.775, 0.781, 0.790, 0.805, &
+  0.691, 0.691, 0.691, 0.691, 0.736, 0.741, 0.747, 0.754, 0.763, 0.769, 0.778, 0.791, &
+  0.696, 0.696, 0.696, 0.696, 0.748, 0.753, 0.759, 0.767, 0.776, 0.781, 0.789, 0.800, &
+  0.711, 0.711, 0.711, 0.711, 0.766, 0.773, 0.782, 0.791, 0.803, 0.811, 0.822, 0.838, &
+   !-- Sulfate Accumulation (BC content=0)
+  0.674, 0.674, 0.674, 0.674, 0.724, 0.729, 0.735, 0.741, 0.749, 0.753, 0.760, 0.769, &
+  0.677, 0.677, 0.677, 0.677, 0.729, 0.734, 0.740, 0.747, 0.756, 0.761, 0.768, 0.777, &
+  0.671, 0.671, 0.671, 0.671, 0.723, 0.730, 0.737, 0.746, 0.757, 0.764, 0.773, 0.786, &
+  0.638, 0.638, 0.638, 0.638, 0.691, 0.700, 0.710, 0.721, 0.736, 0.746, 0.760, 0.781, &
+  0.553, 0.553, 0.553, 0.553, 0.604, 0.616, 0.629, 0.644, 0.665, 0.680, 0.700, 0.736, &
+  0.344, 0.344, 0.344, 0.344, 0.388, 0.401, 0.416, 0.435, 0.462, 0.482, 0.512, 0.571, &
+   ! Seasalt Super Coarse Soluble (SS)
+  0.795, 0.810, 0.814, 0.819, 0.824, 0.829, 0.832, 0.840, 0.846, 0.849, 0.854, 0.860, &
+  0.788, 0.804, 0.808, 0.813, 0.818, 0.823, 0.828, 0.834, 0.842, 0.847, 0.851, 0.858, &
+  0.775, 0.792, 0.797, 0.803, 0.808, 0.813, 0.820, 0.826, 0.835, 0.840, 0.846, 0.854, &
+  0.754, 0.773, 0.779, 0.785, 0.791, 0.796, 0.803, 0.811, 0.821, 0.827, 0.834, 0.844, &
+  0.735, 0.755, 0.761, 0.768, 0.774, 0.779, 0.786, 0.794, 0.804, 0.810, 0.817, 0.829, &
+  0.712, 0.782, 0.795, 0.808, 0.819, 0.829, 0.840, 0.852, 0.865, 0.873, 0.882, 0.895, &
+   ! Seasalt Coarse Soluble (CS)      
+  0.754, 0.770, 0.776, 0.781, 0.784, 0.791, 0.797, 0.805, 0.815, 0.822, 0.828, 0.840, &
+  0.736, 0.753, 0.759, 0.765, 0.771, 0.778, 0.785, 0.793, 0.804, 0.811, 0.820, 0.831, &
+  0.716, 0.735, 0.742, 0.748, 0.754, 0.762, 0.769, 0.778, 0.789, 0.796, 0.807, 0.819, &
+  0.704, 0.725, 0.733, 0.739, 0.745, 0.752, 0.759, 0.768, 0.778, 0.784, 0.792, 0.803, &
+  0.716, 0.737, 0.744, 0.751, 0.756, 0.763, 0.770, 0.777, 0.786, 0.790, 0.795, 0.800, &
+  0.688, 0.730, 0.741, 0.751, 0.761, 0.771, 0.782, 0.795, 0.810, 0.820, 0.833, 0.849, &
+   ! Seasalt Accumulation Soluble (AS)
+  0.686, 0.711, 0.719, 0.726, 0.733, 0.740, 0.748, 0.755, 0.763, 0.767, 0.770, 0.774, &
+  0.690, 0.716, 0.724, 0.731, 0.739, 0.747, 0.756, 0.764, 0.774, 0.778, 0.782, 0.784, &
+  0.683, 0.710, 0.719, 0.727, 0.735, 0.744, 0.754, 0.765, 0.777, 0.784, 0.791, 0.797, &
+  0.649, 0.676, 0.686, 0.695, 0.704, 0.714, 0.726, 0.739, 0.757, 0.768, 0.781, 0.797, &
+  0.559, 0.586, 0.596, 0.606, 0.616, 0.629, 0.643, 0.661, 0.686, 0.703, 0.726, 0.758, &
+  0.341, 0.358, 0.366, 0.375, 0.382, 0.395, 0.408, 0.428, 0.459, 0.484, 0.520, 0.581, &
+   ! Nitrate Coarse Soluble (CS)      
+  0.765, 0.765, 0.765, 0.773, 0.779, 0.785, 0.791, 0.803, 0.813, 0.819, 0.827, 0.828, &
+  0.754, 0.754, 0.754, 0.762, 0.769, 0.774, 0.781, 0.790, 0.802, 0.810, 0.817, 0.818, &
+  0.743, 0.743, 0.743, 0.751, 0.758, 0.763, 0.770, 0.779, 0.789, 0.797, 0.804, 0.806, &
+  0.737, 0.737, 0.737, 0.745, 0.752, 0.758, 0.764, 0.773, 0.781, 0.786, 0.792, 0.793, &
+  0.739, 0.739, 0.739, 0.749, 0.757, 0.763, 0.770, 0.779, 0.788, 0.793, 0.797, 0.798, &
+  0.651, 0.651, 0.651, 0.672, 0.690, 0.707, 0.724, 0.751, 0.779, 0.796, 0.813, 0.817, &
+   ! Nitrate Accumulation Soluble (AS)
+  0.713, 0.713, 0.713, 0.723, 0.732, 0.739, 0.746, 0.756, 0.765, 0.769, 0.772, 0.772, &
+  0.724, 0.724, 0.724, 0.734, 0.742, 0.750, 0.757, 0.767, 0.777, 0.782, 0.785, 0.785, &
+  0.719, 0.719, 0.719, 0.729, 0.738, 0.746, 0.754, 0.767, 0.780, 0.787, 0.793, 0.794, &
+  0.673, 0.673, 0.673, 0.685, 0.696, 0.706, 0.717, 0.734, 0.753, 0.766, 0.778, 0.781, &
+  0.565, 0.565, 0.565, 0.580, 0.593, 0.605, 0.619, 0.644, 0.673, 0.693, 0.716, 0.720, &
+  0.328, 0.328, 0.328, 0.338, 0.348, 0.359, 0.371, 0.396, 0.431, 0.459, 0.494, 0.502  /
 
   DATA alpha_aeri_6bands/  & 
-       ! dust insoluble CI
-  0.751, 0.751, 0.769, 0.772, 0.672, 0.437, &
-       ! bc insoluble AI
-  6.497, 6.497, 5.900, 4.284, 2.163, 0.966, &
-       ! pom insoluble AI
-  6.443, 6.443, 4.381, 1.846, 0.377, 0.052 /
-
-  DATA cg_aers_6bands/ &
-       ! bc soluble AS
-  0.721, 0.721, 0.721, 0.729, 0.735, 0.741, 0.746, 0.754, 0.762, 0.766, 0.769, 0.775, &
-  0.721, 0.721, 0.721, 0.729, 0.735, 0.741, 0.746, 0.754, 0.762, 0.766, 0.769, 0.775, &
-  0.643, 0.643, 0.643, 0.654, 0.662, 0.670, 0.677, 0.688, 0.698, 0.704, 0.707, 0.715, &
-  0.513, 0.513, 0.513, 0.522, 0.530, 0.536, 0.542, 0.552, 0.560, 0.565, 0.568, 0.575, &
-  0.321, 0.321, 0.321, 0.323, 0.325, 0.327, 0.328, 0.331, 0.333, 0.334, 0.335, 0.337, &
-  0.153, 0.153, 0.153, 0.149, 0.145, 0.142, 0.139, 0.135, 0.130, 0.128, 0.127, 0.123, &
-       ! pom soluble AS
-  0.687, 0.687, 0.687, 0.687, 0.687, 0.700, 0.710, 0.726, 0.736, 0.737, 0.738, 0.745, &
-  0.687, 0.687, 0.687, 0.687, 0.687, 0.700, 0.710, 0.726, 0.736, 0.737, 0.738, 0.745, &
-  0.658, 0.658, 0.658, 0.658, 0.658, 0.667, 0.674, 0.685, 0.692, 0.692, 0.693, 0.698, &
-  0.564, 0.564, 0.564, 0.564, 0.564, 0.566, 0.568, 0.571, 0.573, 0.573, 0.573, 0.574, &
-  0.363, 0.363, 0.363, 0.363, 0.363, 0.360, 0.357, 0.352, 0.350, 0.349, 0.349, 0.347, &
-  0.142, 0.142, 0.142, 0.142, 0.142, 0.139, 0.137, 0.133, 0.131, 0.131, 0.130, 0.129, &
-       ! sulfate AS 
-  0.675, 0.675, 0.675, 0.689, 0.701, 0.711, 0.720, 0.735, 0.748, 0.756, 0.760, 0.771, &
-  0.675, 0.675, 0.675, 0.689, 0.701, 0.711, 0.720, 0.735, 0.748, 0.756, 0.760, 0.771, &
-  0.653, 0.653, 0.653, 0.662, 0.670, 0.676, 0.683, 0.692, 0.701, 0.706, 0.709, 0.716, &
-  0.563, 0.563, 0.563, 0.565, 0.567, 0.569, 0.570, 0.573, 0.575, 0.576, 0.577, 0.579, &
-  0.362, 0.362, 0.362, 0.359, 0.356, 0.354, 0.352, 0.348, 0.345, 0.343, 0.342, 0.340, &
-  0.137, 0.137, 0.137, 0.135, 0.133, 0.132, 0.130, 0.128, 0.126, 0.125, 0.124, 0.122, &
-       ! sulfate coarse CS
-  0.803, 0.803, 0.803, 0.792, 0.783, 0.776, 0.769, 0.758, 0.747, 0.742, 0.738, 0.730, &
-  0.803, 0.803, 0.803, 0.792, 0.783, 0.776, 0.769, 0.758, 0.747, 0.742, 0.738, 0.730, &
-  0.799, 0.799, 0.799, 0.787, 0.777, 0.768, 0.760, 0.747, 0.736, 0.729, 0.725, 0.716, &
-  0.797, 0.797, 0.797, 0.782, 0.770, 0.760, 0.750, 0.735, 0.722, 0.714, 0.709, 0.698, &
-  0.810, 0.810, 0.810, 0.794, 0.781, 0.770, 0.759, 0.743, 0.728, 0.719, 0.714, 0.702, &
-  0.803, 0.803, 0.803, 0.790, 0.779, 0.770, 0.762, 0.748, 0.736, 0.729, 0.725, 0.715, &
-        ! seasalt seasalt Super Coarse Soluble (SS)
-  0.797, 0.800, 0.801, 0.802, 0.804, 0.822, 0.825, 0.828, 0.832, 0.835, 0.838, 0.843, &
-  0.788, 0.792, 0.794, 0.795, 0.796, 0.815, 0.818, 0.822, 0.827, 0.829, 0.833, 0.838, &
-  0.773, 0.778, 0.780, 0.782, 0.783, 0.802, 0.806, 0.811, 0.817, 0.820, 0.825, 0.832, &
-  0.746, 0.753, 0.755, 0.759, 0.760, 0.781, 0.787, 0.792, 0.800, 0.805, 0.811, 0.820, &
-  0.706, 0.714, 0.716, 0.720, 0.722, 0.749, 0.753, 0.761, 0.769, 0.774, 0.783, 0.797, &
-  0.681, 0.682, 0.682, 0.683, 0.684, 0.723, 0.727, 0.732, 0.738, 0.741, 0.748, 0.757, &
-        ! seasalt seasalt Coarse Soluble (CS)      
-  0.756, 0.761, 0.764, 0.766, 0.769, 0.790, 0.793, 0.799, 0.805, 0.810, 0.815, 0.823, &
-  0.736, 0.743, 0.747, 0.749, 0.751, 0.773, 0.778, 0.784, 0.793, 0.797, 0.804, 0.815, &
-  0.712, 0.719, 0.721, 0.725, 0.726, 0.752, 0.758, 0.764, 0.773, 0.779, 0.786, 0.800, &
-  0.690, 0.694, 0.695, 0.698, 0.699, 0.731, 0.738, 0.742, 0.751, 0.756, 0.764, 0.776, &
-  0.682, 0.683, 0.683, 0.683, 0.684, 0.725, 0.729, 0.733, 0.737, 0.740, 0.744, 0.752, &
-  0.669, 0.673, 0.674, 0.675, 0.676, 0.718, 0.724, 0.730, 0.736, 0.739, 0.742, 0.746, &
-        ! seasalt seasalt Accumulation Soluble (AS)
-  0.694, 0.692, 0.692, 0.691, 0.689, 0.737, 0.740, 0.742, 0.742, 0.740, 0.737, 0.731, &
-  0.685, 0.690, 0.691, 0.692, 0.692, 0.735, 0.741, 0.746, 0.750, 0.751, 0.750, 0.744, &
-  0.650, 0.662, 0.666, 0.670, 0.673, 0.710, 0.719, 0.729, 0.741, 0.747, 0.754, 0.757, &
-  0.561, 0.585, 0.593, 0.601, 0.609, 0.637, 0.651, 0.669, 0.691, 0.705, 0.723, 0.745, &
-  0.392, 0.427, 0.439, 0.451, 0.464, 0.480, 0.500, 0.526, 0.563, 0.588, 0.621, 0.671, &
-  0.144, 0.170, 0.179, 0.189, 0.201, 0.207, 0.224, 0.248, 0.285, 0.315, 0.359, 0.439 /
+   ! Dust insoluble
+  0.735, 0.765, 0.817, 0.846, 0.718, 0.414, &
+   ! BC insoluble 
+  5.276, 5.371, 5.126, 4.225, 2.667, 1.113, &
+   ! POM insoluble
+  5.962, 5.609, 4.527, 2.697, 0.918, 0.105, &
+   ! Nitrate insoluble
+  0.688, 0.712, 0.754, 0.809, 0.786, 0.703 /
+
+  DATA piz_aeri_6bands/ &
+   ! Dust insoluble
+  0.894, 0.902, 0.937, 0.980, 0.993, 0.967, &
+   ! BC insoluble 
+  0.820, 0.760, 0.695, 0.603, 0.469, 0.276, &
+   ! POM insoluble
+  0.687, 0.685, 0.673, 0.637, 0.553, 0.340, &
+   ! Nitrate insoluble
+  1.000, 1.000, 1.000, 1.000, 0.999, 0.707 /
 
   DATA cg_aeri_6bands/ &
-       ! dust insoluble CI
-  0.718, 0.718, 0.699, 0.661, 0.676, 0.670, &
-       ! bc insoluble AI
-  0.721, 0.721, 0.643, 0.513, 0.321, 0.153, &
-       ! pom insoluble AI
-  0.687, 0.687, 0.658, 0.564, 0.363, 0.142  /
-
-  DATA piz_aers_6bands/&
-       ! bc soluble AS
-  0.460, 0.460, 0.460, 0.460, 0.460, 0.534, 0.594, 0.688, 0.748, 0.754, 0.760, 0.803, &
-  0.460, 0.460, 0.460, 0.460, 0.460, 0.534, 0.594, 0.688, 0.748, 0.754, 0.760, 0.803, &
-  0.445, 0.445, 0.445, 0.445, 0.445, 0.521, 0.583, 0.679, 0.741, 0.747, 0.753, 0.798, &
-  0.394, 0.394, 0.394, 0.394, 0.394, 0.477, 0.545, 0.649, 0.718, 0.724, 0.730, 0.779, &
-  0.267, 0.267, 0.267, 0.267, 0.267, 0.365, 0.446, 0.571, 0.652, 0.660, 0.667, 0.725, &
-  0.121, 0.121, 0.121, 0.121, 0.121, 0.139, 0.155, 0.178, 0.193, 0.195, 0.196, 0.207, &
-       ! pom soluble AS
-  0.973, 0.973, 0.973, 0.973, 0.973, 0.977, 0.980, 0.984, 0.987, 0.988, 0.988, 0.990, &
-  0.973, 0.973, 0.973, 0.973, 0.973, 0.977, 0.980, 0.984, 0.987, 0.988, 0.988, 0.990, &
-  0.972, 0.972, 0.972, 0.972, 0.972, 0.976, 0.979, 0.984, 0.987, 0.987, 0.988, 0.990, &
-  0.940, 0.940, 0.940, 0.940, 0.940, 0.948, 0.955, 0.965, 0.972, 0.973, 0.973, 0.978, &
-  0.816, 0.816, 0.816, 0.816, 0.816, 0.839, 0.859, 0.888, 0.908, 0.910, 0.911, 0.925, &
-  0.663, 0.663, 0.663, 0.663, 0.663, 0.607, 0.562, 0.492, 0.446, 0.441, 0.437, 0.404, &
-       ! sulfate AS
-  1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, &
-  1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, &
-  1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, &
-  1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, &
-  0.988, 0.988, 0.988, 0.989, 0.990, 0.990, 0.991, 0.992, 0.993, 0.993, 0.994, 0.994, &
-  0.256, 0.256, 0.256, 0.263, 0.268, 0.273, 0.277, 0.284, 0.290, 0.294, 0.296, 0.301, &
-       ! sulfate coarse CS
-  1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, &
-  1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, &
-  1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, &
-  1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, &
-  0.996, 0.996, 0.996, 0.996, 0.996, 0.996, 0.996, 0.996, 0.996, 0.996, 0.996, 0.996, &
-  0.877, 0.877, 0.877, 0.873, 0.870, 0.867, 0.864, 0.860, 0.856, 0.854, 0.852, 0.849, &
-        ! seasalt seasalt Super Coarse Soluble (SS)
-  0.983, 0.982, 0.982, 0.982, 0.982, 0.992, 0.993, 0.994, 0.995, 0.996, 0.997, 0.998, &
-  0.984, 0.983, 0.983, 0.983, 0.983, 0.993, 0.994, 0.995, 0.996, 0.996, 0.997, 0.998, &
-  0.986, 0.985, 0.985, 0.985, 0.984, 0.993, 0.994, 0.995, 0.996, 0.997, 0.997, 0.998, &
-  0.989, 0.988, 0.988, 0.988, 0.987, 0.995, 0.996, 0.996, 0.997, 0.997, 0.998, 0.999, &
-  0.994, 0.993, 0.992, 0.992, 0.992, 0.997, 0.997, 0.998, 0.998, 0.998, 0.999, 0.999, &
-  0.997, 0.997, 0.997, 0.996, 0.996, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 1.000, &
-        ! seasalt seasalt Coarse Soluble (CS)      
-  0.988, 0.987, 0.987, 0.987, 0.986, 0.995, 0.995, 0.996, 0.997, 0.997, 0.998, 0.999, &
-  0.990, 0.989, 0.989, 0.989, 0.989, 0.995, 0.996, 0.997, 0.997, 0.998, 0.998, 0.999, &
-  0.993, 0.992, 0.992, 0.992, 0.991, 0.997, 0.997, 0.997, 0.998, 0.998, 0.998, 0.999, &
-  0.996, 0.995, 0.995, 0.995, 0.994, 0.998, 0.998, 0.998, 0.999, 0.999, 0.999, 0.999, &
-  0.998, 0.997, 0.997, 0.997, 0.997, 0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 1.000, &
-  0.999, 0.998, 0.998, 0.998, 0.998, 0.999, 0.999, 1.000, 1.000, 1.000, 1.000, 1.000, &
-        ! seasalt seasalt Accumulation Soluble (AS)
-  0.999, 0.998, 0.998, 0.998, 0.998, 0.999, 0.999, 1.000, 1.000, 1.000, 1.000, 1.000, &
-  0.999, 0.999, 0.999, 0.999, 0.999, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, &
-  0.999, 0.999, 0.999, 0.999, 0.999, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, &
-  0.999, 0.999, 0.999, 0.999, 0.999, 0.999, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, &
-  0.997, 0.998, 0.998, 0.998, 0.998, 0.999, 0.999, 0.999, 1.000, 1.000, 1.000, 1.000, &
-  0.985, 0.989, 0.990, 0.990, 0.991, 0.996, 0.997, 0.998, 0.999, 0.999, 0.999, 1.000 /
-
-  DATA piz_aeri_6bands/ &
-       ! dust insoluble CI
-  0.954, 0.954, 0.965, 0.981, 0.996, 0.990, &
-       ! bc insoluble AI
-  0.460, 0.460, 0.445, 0.394, 0.267, 0.121, &
-       ! pom insoluble AI
-  0.973, 0.973, 0.972, 0.940, 0.816, 0.663 /
+   ! Dust insoluble
+  0.756, 0.737, 0.713, 0.701, 0.696, 0.672, &
+   ! BC insoluble 
+  0.480, 0.469, 0.456, 0.427, 0.349, 0.196, &
+   ! POM insoluble
+  0.956, 0.965, 0.969, 0.953, 0.892, 0.826, &
+   ! Nitrate insoluble
+  0.765, 0.754, 0.743, 0.737, 0.739, 0.651 /
 
 ! Added by R. Wang (July 31 2016)
 ! properties for BC assuming Maxwell-Garnett rule and internal mixture
 
-  DATA alpha_MG_6bands/ &
-     ! bc content = 0.001
-  6.497, 6.497, 6.497, 6.497, 6.497, 7.160, 7.875, 9.356,10.811,10.974,11.149,12.734, &
-  6.497, 6.497, 6.497, 6.497, 6.497, 7.160, 7.875, 9.356,10.811,10.974,11.149,12.734, &
-  5.900, 5.900, 5.900, 5.900, 5.900, 6.502, 7.151, 8.496, 9.818, 9.965,10.124,11.564, &
-  4.284, 4.284, 4.284, 4.284, 4.284, 4.721, 5.193, 6.169, 7.129, 7.236, 7.352, 8.397, &
-  2.163, 2.163, 2.163, 2.163, 2.163, 2.384, 2.622, 3.115, 3.600, 3.654, 3.712, 4.240, &
-  0.966, 0.966, 0.966, 0.966, 0.966, 1.065, 1.171, 1.392, 1.608, 1.632, 1.658, 1.894, &
-     ! bc content = 0.01
-  6.497, 6.497, 6.497, 6.497, 6.497, 7.160, 7.875, 9.356,10.811,10.974,11.149,12.734, &
-  6.497, 6.497, 6.497, 6.497, 6.497, 7.160, 7.875, 9.356,10.811,10.974,11.149,12.734, &
-  5.900, 5.900, 5.900, 5.900, 5.900, 6.502, 7.151, 8.496, 9.818, 9.965,10.124,11.564, &
-  4.284, 4.284, 4.284, 4.284, 4.284, 4.721, 5.193, 6.169, 7.129, 7.236, 7.352, 8.397, &
-  2.163, 2.163, 2.163, 2.163, 2.163, 2.384, 2.622, 3.115, 3.600, 3.654, 3.712, 4.240, &
-  0.966, 0.966, 0.966, 0.966, 0.966, 1.065, 1.171, 1.392, 1.608, 1.632, 1.658, 1.894, &
-     ! bc content = 0.02
-  6.497, 6.497, 6.497, 6.497, 6.497, 7.160, 7.875, 9.356,10.811,10.974,11.149,12.734, &
-  6.497, 6.497, 6.497, 6.497, 6.497, 7.160, 7.875, 9.356,10.811,10.974,11.149,12.734, &
-  5.900, 5.900, 5.900, 5.900, 5.900, 6.502, 7.151, 8.496, 9.818, 9.965,10.124,11.564, &
-  4.284, 4.284, 4.284, 4.284, 4.284, 4.721, 5.193, 6.169, 7.129, 7.236, 7.352, 8.397, &
-  2.163, 2.163, 2.163, 2.163, 2.163, 2.384, 2.622, 3.115, 3.600, 3.654, 3.712, 4.240, &
-  0.966, 0.966, 0.966, 0.966, 0.966, 1.065, 1.171, 1.392, 1.608, 1.632, 1.658, 1.894, &
-     ! bc content = 0.05
-  6.497, 6.497, 6.497, 6.497, 6.497, 7.160, 7.875, 9.356,10.811,10.974,11.149,12.734, &
-  6.497, 6.497, 6.497, 6.497, 6.497, 7.160, 7.875, 9.356,10.811,10.974,11.149,12.734, &
-  5.900, 5.900, 5.900, 5.900, 5.900, 6.502, 7.151, 8.496, 9.818, 9.965,10.124,11.564, &
-  4.284, 4.284, 4.284, 4.284, 4.284, 4.721, 5.193, 6.169, 7.129, 7.236, 7.352, 8.397, &
-  2.163, 2.163, 2.163, 2.163, 2.163, 2.384, 2.622, 3.115, 3.600, 3.654, 3.712, 4.240, &
-  0.966, 0.966, 0.966, 0.966, 0.966, 1.065, 1.171, 1.392, 1.608, 1.632, 1.658, 1.894, &
-     ! bc content = 0.10
-  6.497, 6.497, 6.497, 6.497, 6.497, 7.160, 7.875, 9.356,10.811,10.974,11.149,12.734, &
-  6.497, 6.497, 6.497, 6.497, 6.497, 7.160, 7.875, 9.356,10.811,10.974,11.149,12.734, &
-  5.900, 5.900, 5.900, 5.900, 5.900, 6.502, 7.151, 8.496, 9.818, 9.965,10.124,11.564, &
-  4.284, 4.284, 4.284, 4.284, 4.284, 4.721, 5.193, 6.169, 7.129, 7.236, 7.352, 8.397, &
-  2.163, 2.163, 2.163, 2.163, 2.163, 2.384, 2.622, 3.115, 3.600, 3.654, 3.712, 4.240, &
-  0.966, 0.966, 0.966, 0.966, 0.966, 1.065, 1.171, 1.392, 1.608, 1.632, 1.658, 1.894 /
-
-  DATA cg_MG_6bands/ &
-     ! bc content = 0.001
-  0.721, 0.721, 0.721, 0.729, 0.735, 0.741, 0.746, 0.754, 0.762, 0.766, 0.769, 0.775, &
-  0.721, 0.721, 0.721, 0.729, 0.735, 0.741, 0.746, 0.754, 0.762, 0.766, 0.769, 0.775, &
-  0.643, 0.643, 0.643, 0.654, 0.662, 0.670, 0.677, 0.688, 0.698, 0.704, 0.707, 0.715, &
-  0.513, 0.513, 0.513, 0.522, 0.530, 0.536, 0.542, 0.552, 0.560, 0.565, 0.568, 0.575, &
-  0.321, 0.321, 0.321, 0.323, 0.325, 0.327, 0.328, 0.331, 0.333, 0.334, 0.335, 0.337, &
-  0.153, 0.153, 0.153, 0.149, 0.145, 0.142, 0.139, 0.135, 0.130, 0.128, 0.127, 0.123, &
-     ! bc content = 0.01
-  0.721, 0.721, 0.721, 0.729, 0.735, 0.741, 0.746, 0.754, 0.762, 0.766, 0.769, 0.775, &
-  0.721, 0.721, 0.721, 0.729, 0.735, 0.741, 0.746, 0.754, 0.762, 0.766, 0.769, 0.775, &
-  0.643, 0.643, 0.643, 0.654, 0.662, 0.670, 0.677, 0.688, 0.698, 0.704, 0.707, 0.715, &
-  0.513, 0.513, 0.513, 0.522, 0.530, 0.536, 0.542, 0.552, 0.560, 0.565, 0.568, 0.575, &
-  0.321, 0.321, 0.321, 0.323, 0.325, 0.327, 0.328, 0.331, 0.333, 0.334, 0.335, 0.337, &
-  0.153, 0.153, 0.153, 0.149, 0.145, 0.142, 0.139, 0.135, 0.130, 0.128, 0.127, 0.123, &
-     ! bc content = 0.02
-  0.721, 0.721, 0.721, 0.729, 0.735, 0.741, 0.746, 0.754, 0.762, 0.766, 0.769, 0.775, &
-  0.721, 0.721, 0.721, 0.729, 0.735, 0.741, 0.746, 0.754, 0.762, 0.766, 0.769, 0.775, &
-  0.643, 0.643, 0.643, 0.654, 0.662, 0.670, 0.677, 0.688, 0.698, 0.704, 0.707, 0.715, &
-  0.513, 0.513, 0.513, 0.522, 0.530, 0.536, 0.542, 0.552, 0.560, 0.565, 0.568, 0.575, &
-  0.321, 0.321, 0.321, 0.323, 0.325, 0.327, 0.328, 0.331, 0.333, 0.334, 0.335, 0.337, &
-  0.153, 0.153, 0.153, 0.149, 0.145, 0.142, 0.139, 0.135, 0.130, 0.128, 0.127, 0.123, &
-     ! bc content = 0.05
-  0.721, 0.721, 0.721, 0.729, 0.735, 0.741, 0.746, 0.754, 0.762, 0.766, 0.769, 0.775, &
-  0.721, 0.721, 0.721, 0.729, 0.735, 0.741, 0.746, 0.754, 0.762, 0.766, 0.769, 0.775, &
-  0.643, 0.643, 0.643, 0.654, 0.662, 0.670, 0.677, 0.688, 0.698, 0.704, 0.707, 0.715, &
-  0.513, 0.513, 0.513, 0.522, 0.530, 0.536, 0.542, 0.552, 0.560, 0.565, 0.568, 0.575, &
-  0.321, 0.321, 0.321, 0.323, 0.325, 0.327, 0.328, 0.331, 0.333, 0.334, 0.335, 0.337, &
-  0.153, 0.153, 0.153, 0.149, 0.145, 0.142, 0.139, 0.135, 0.130, 0.128, 0.127, 0.123, &
-     ! bc content = 0.10
-  0.721, 0.721, 0.721, 0.729, 0.735, 0.741, 0.746, 0.754, 0.762, 0.766, 0.769, 0.775, &
-  0.721, 0.721, 0.721, 0.729, 0.735, 0.741, 0.746, 0.754, 0.762, 0.766, 0.769, 0.775, &
-  0.643, 0.643, 0.643, 0.654, 0.662, 0.670, 0.677, 0.688, 0.698, 0.704, 0.707, 0.715, &
-  0.513, 0.513, 0.513, 0.522, 0.530, 0.536, 0.542, 0.552, 0.560, 0.565, 0.568, 0.575, &
-  0.321, 0.321, 0.321, 0.323, 0.325, 0.327, 0.328, 0.331, 0.333, 0.334, 0.335, 0.337, &
-  0.153, 0.153, 0.153, 0.149, 0.145, 0.142, 0.139, 0.135, 0.130, 0.128, 0.127, 0.123 /
-
-  DATA piz_MG_6bands/ &
-     ! bc content = 0.001
-  0.460, 0.460, 0.460, 0.460, 0.460, 0.534, 0.594, 0.688, 0.748, 0.754, 0.760, 0.803, &
-  0.460, 0.460, 0.460, 0.460, 0.460, 0.534, 0.594, 0.688, 0.748, 0.754, 0.760, 0.803, &
-  0.445, 0.445, 0.445, 0.445, 0.445, 0.521, 0.583, 0.679, 0.741, 0.747, 0.753, 0.798, &
-  0.394, 0.394, 0.394, 0.394, 0.394, 0.477, 0.545, 0.649, 0.718, 0.724, 0.730, 0.779, &
-  0.267, 0.267, 0.267, 0.267, 0.267, 0.365, 0.446, 0.571, 0.652, 0.660, 0.667, 0.725, &
-  0.121, 0.121, 0.121, 0.121, 0.121, 0.139, 0.155, 0.178, 0.193, 0.195, 0.196, 0.207, &
-     ! bc content = 0.01
-  0.460, 0.460, 0.460, 0.460, 0.460, 0.534, 0.594, 0.688, 0.748, 0.754, 0.760, 0.803, &
-  0.460, 0.460, 0.460, 0.460, 0.460, 0.534, 0.594, 0.688, 0.748, 0.754, 0.760, 0.803, &
-  0.445, 0.445, 0.445, 0.445, 0.445, 0.521, 0.583, 0.679, 0.741, 0.747, 0.753, 0.798, &
-  0.394, 0.394, 0.394, 0.394, 0.394, 0.477, 0.545, 0.649, 0.718, 0.724, 0.730, 0.779, &
-  0.267, 0.267, 0.267, 0.267, 0.267, 0.365, 0.446, 0.571, 0.652, 0.660, 0.667, 0.725, &
-  0.121, 0.121, 0.121, 0.121, 0.121, 0.139, 0.155, 0.178, 0.193, 0.195, 0.196, 0.207, &
-     ! bc content = 0.02
-  0.460, 0.460, 0.460, 0.460, 0.460, 0.534, 0.594, 0.688, 0.748, 0.754, 0.760, 0.803, &
-  0.460, 0.460, 0.460, 0.460, 0.460, 0.534, 0.594, 0.688, 0.748, 0.754, 0.760, 0.803, &
-  0.445, 0.445, 0.445, 0.445, 0.445, 0.521, 0.583, 0.679, 0.741, 0.747, 0.753, 0.798, &
-  0.394, 0.394, 0.394, 0.394, 0.394, 0.477, 0.545, 0.649, 0.718, 0.724, 0.730, 0.779, &
-  0.267, 0.267, 0.267, 0.267, 0.267, 0.365, 0.446, 0.571, 0.652, 0.660, 0.667, 0.725, &
-  0.121, 0.121, 0.121, 0.121, 0.121, 0.139, 0.155, 0.178, 0.193, 0.195, 0.196, 0.207, &
-     ! bc content = 0.05
-  0.460, 0.460, 0.460, 0.460, 0.460, 0.534, 0.594, 0.688, 0.748, 0.754, 0.760, 0.803, &
-  0.460, 0.460, 0.460, 0.460, 0.460, 0.534, 0.594, 0.688, 0.748, 0.754, 0.760, 0.803, &
-  0.445, 0.445, 0.445, 0.445, 0.445, 0.521, 0.583, 0.679, 0.741, 0.747, 0.753, 0.798, &
-  0.394, 0.394, 0.394, 0.394, 0.394, 0.477, 0.545, 0.649, 0.718, 0.724, 0.730, 0.779, &
-  0.267, 0.267, 0.267, 0.267, 0.267, 0.365, 0.446, 0.571, 0.652, 0.660, 0.667, 0.725, &
-  0.121, 0.121, 0.121, 0.121, 0.121, 0.139, 0.155, 0.178, 0.193, 0.195, 0.196, 0.207, &
-     ! bc content = 0.10
-  0.460, 0.460, 0.460, 0.460, 0.460, 0.534, 0.594, 0.688, 0.748, 0.754, 0.760, 0.803, &
-  0.460, 0.460, 0.460, 0.460, 0.460, 0.534, 0.594, 0.688, 0.748, 0.754, 0.760, 0.803, &
-  0.445, 0.445, 0.445, 0.445, 0.445, 0.521, 0.583, 0.679, 0.741, 0.747, 0.753, 0.798, &
-  0.394, 0.394, 0.394, 0.394, 0.394, 0.477, 0.545, 0.649, 0.718, 0.724, 0.730, 0.779, &
-  0.267, 0.267, 0.267, 0.267, 0.267, 0.365, 0.446, 0.571, 0.652, 0.660, 0.667, 0.725, &
-  0.121, 0.121, 0.121, 0.121, 0.121, 0.139, 0.155, 0.178, 0.193, 0.195, 0.196, 0.207 /
+   DATA alpha_MG_6bands/ &
+ !--BC content=0.001
+   3.546,  3.546,  3.546,  3.546,  3.640,  3.891,  3.883,  4.354,  4.967,  5.424,  6.412,  9.049, &
+   3.995,  3.995,  3.995,  3.995,  4.073,  4.091,  4.111,  4.209,  4.502,  4.878,  5.591,  8.029, &
+   4.650,  4.650,  4.650,  4.650,  4.661,  4.561,  4.472,  4.386,  4.373,  4.451,  4.726,  6.248, &
+   4.445,  4.445,  4.445,  4.445,  4.393,  4.291,  4.171,  4.017,  3.812,  3.682,  3.514,  3.593, &
+   2.837,  2.837,  2.837,  2.837,  2.824,  2.798,  2.760,  2.696,  2.579,  2.471,  2.265,  1.735, &
+   1.087,  1.087,  1.087,  1.087,  1.095,  1.101,  1.107,  1.110,  1.109,  1.101,  1.074,  0.944, &
+ !--BC content=0.010
+   3.550,  3.550,  3.550,  3.550,  3.623,  3.852,  4.006,  4.342,  4.945,  5.381,  6.394,  8.972, &
+   3.995,  3.995,  3.995,  3.995,  4.082,  4.094,  4.133,  4.235,  4.517,  4.871,  5.601,  8.001, &
+   4.653,  4.653,  4.653,  4.653,  4.662,  4.564,  4.475,  4.393,  4.376,  4.447,  4.736,  6.221, &
+   4.434,  4.434,  4.434,  4.434,  4.386,  4.286,  4.170,  4.021,  3.815,  3.680,  3.524,  3.583, &
+   2.831,  2.831,  2.831,  2.831,  2.820,  2.795,  2.757,  2.695,  2.579,  2.472,  2.270,  1.734, &
+   1.086,  1.086,  1.086,  1.086,  1.095,  1.101,  1.106,  1.110,  1.108,  1.101,  1.075,  0.944, &
+ !--BC content=0.020
+   3.549,  3.549,  3.549,  3.549,  3.630,  3.842,  4.016,  4.335,  4.928,  5.383,  6.369,  8.937, &
+   4.004,  4.004,  4.004,  4.004,  4.096,  4.100,  4.145,  4.243,  4.529,  4.870,  5.595,  7.973, &
+   4.650,  4.650,  4.650,  4.650,  4.662,  4.564,  4.478,  4.397,  4.379,  4.449,  4.734,  6.207, &
+   4.422,  4.422,  4.422,  4.422,  4.378,  4.280,  4.167,  4.020,  3.817,  3.683,  3.527,  3.583, &
+   2.824,  2.824,  2.824,  2.824,  2.815,  2.791,  2.754,  2.693,  2.579,  2.472,  2.272,  1.740, &
+   1.085,  1.085,  1.085,  1.085,  1.094,  1.100,  1.105,  1.109,  1.108,  1.100,  1.075,  0.945, &
+ !--BC content=0.050
+   3.563,  3.563,  3.563,  3.563,  3.662,  3.834,  4.019,  4.318,  4.889,  5.360,  6.305,  8.842, &
+   4.039,  4.039,  4.039,  4.039,  4.130,  4.126,  4.166,  4.261,  4.544,  4.863,  5.573,  7.895, &
+   4.641,  4.641,  4.641,  4.641,  4.659,  4.565,  4.483,  4.407,  4.389,  4.455,  4.731,  6.161, &
+   4.388,  4.388,  4.388,  4.388,  4.356,  4.264,  4.157,  4.017,  3.821,  3.691,  3.537,  3.582, &
+   2.805,  2.805,  2.805,  2.805,  2.801,  2.779,  2.744,  2.687,  2.577,  2.474,  2.279,  1.757, &
+   1.081,  1.081,  1.081,  1.081,  1.091,  1.098,  1.103,  1.107,  1.106,  1.099,  1.074,  0.949, &
+ !--BC content=0.100
+   3.607,  3.607,  3.607,  3.607,  3.701,  3.843,  4.021,  4.302,  4.841,  5.306,  6.214,  8.689, &
+   4.098,  4.098,  4.098,  4.098,  4.175,  4.168,  4.201,  4.291,  4.554,  4.854,  5.529,  7.763, &
+   4.627,  4.627,  4.627,  4.627,  4.651,  4.567,  4.490,  4.421,  4.403,  4.464,  4.723,  6.082, &
+   4.333,  4.333,  4.333,  4.333,  4.319,  4.236,  4.139,  4.011,  3.828,  3.704,  3.554,  3.580, &
+   2.773,  2.773,  2.773,  2.773,  2.778,  2.758,  2.727,  2.675,  2.573,  2.476,  2.291,  1.786, &
+   1.076,  1.076,  1.076,  1.076,  1.087,  1.094,  1.099,  1.103,  1.103,  1.097,  1.073,  0.954, &
+ !--BC content=0.200
+   3.702,  3.702,  3.702,  3.702,  3.768,  3.878,  4.030,  4.278,  4.757,  5.190,  6.032,  8.370, &
+   4.204,  4.204,  4.204,  4.204,  4.255,  4.246,  4.270,  4.345,  4.571,  4.837,  5.440,  7.494, &
+   4.598,  4.598,  4.598,  4.598,  4.633,  4.565,  4.502,  4.445,  4.428,  4.481,  4.706,  5.923, &
+   4.230,  4.230,  4.230,  4.230,  4.244,  4.179,  4.101,  3.996,  3.838,  3.728,  3.588,  3.581, &
+   2.710,  2.710,  2.710,  2.710,  2.730,  2.716,  2.693,  2.651,  2.564,  2.480,  2.314,  1.846, &
+   1.064,  1.064,  1.064,  1.064,  1.078,  1.085,  1.091,  1.096,  1.097,  1.091,  1.072,  0.965  /
+   
+   DATA piz_MG_6bands/ &
+ !--BC content=0.001
+  -3.984, -3.984, -3.984, -3.984, -3.395, -3.075, -3.051, -2.567, -2.053, -1.807, -1.308, -0.592, &
+  -3.014, -3.014, -3.014, -3.014, -2.520, -2.473, -2.411, -2.294, -2.027, -1.771, -1.368, -0.613, &
+  -1.142, -1.142, -1.142, -1.142, -0.930, -0.961, -0.981, -1.001, -0.981, -0.934, -0.798, -0.337, &
+  -0.202, -0.202, -0.202, -0.202, -0.129, -0.154, -0.183, -0.224, -0.284, -0.326, -0.383, -0.347, &
+   0.133,  0.133,  0.133,  0.133,  0.158,  0.146,  0.131,  0.107,  0.061,  0.015, -0.081, -0.433, &
+   0.137,  0.137,  0.137,  0.137,  0.148,  0.149,  0.149,  0.147,  0.139,  0.128,  0.098, -0.048, &
+ !--BC content=0.010
+  -3.640, -3.640, -3.640, -3.640, -3.219, -2.942, -2.761, -2.445, -1.983, -1.731, -1.262, -0.576, &
+  -2.791, -2.791, -2.791, -2.791, -2.383, -2.352, -2.290, -2.180, -1.943, -1.707, -1.321, -0.595, &
+  -1.069, -1.069, -1.069, -1.069, -0.889, -0.920, -0.945, -0.966, -0.954, -0.910, -0.775, -0.333, &
+  -0.185, -0.185, -0.185, -0.185, -0.119, -0.144, -0.173, -0.213, -0.275, -0.318, -0.372, -0.346, &
+   0.138,  0.138,  0.138,  0.138,  0.160,  0.149,  0.134,  0.110,  0.063,  0.018, -0.076, -0.430, &
+   0.137,  0.137,  0.137,  0.137,  0.148,  0.149,  0.150,  0.148,  0.140,  0.129,  0.099, -0.046, &
+ !--BC content=0.020
+  -3.369, -3.369, -3.369, -3.369, -3.033, -2.799, -2.619, -2.339, -1.913, -1.657, -1.223, -0.558, &
+  -2.592, -2.592, -2.592, -2.592, -2.254, -2.239, -2.185, -2.091, -1.869, -1.652, -1.284, -0.580, &
+  -1.004, -1.004, -1.004, -1.004, -0.849, -0.882, -0.909, -0.932, -0.926, -0.885, -0.758, -0.326, &
+  -0.168, -0.168, -0.168, -0.168, -0.108, -0.133, -0.163, -0.203, -0.265, -0.309, -0.364, -0.341, &
+   0.142,  0.142,  0.142,  0.142,  0.163,  0.152,  0.137,  0.113,  0.066,  0.022, -0.072, -0.422, &
+   0.138,  0.138,  0.138,  0.138,  0.149,  0.150,  0.150,  0.148,  0.140,  0.129,  0.100, -0.044, &
+ !--BC content=0.050
+  -2.743, -2.743, -2.743, -2.743, -2.582, -2.438, -2.292, -2.078, -1.729, -1.495, -1.123, -0.512, &
+  -2.121, -2.121, -2.121, -2.121, -1.939, -1.951, -1.926, -1.865, -1.688, -1.511, -1.188, -0.541, &
+  -0.839, -0.839, -0.839, -0.839, -0.742, -0.780, -0.812, -0.842, -0.848, -0.818, -0.707, -0.307, &
+  -0.121, -0.121, -0.121, -0.121, -0.078, -0.103, -0.133, -0.174, -0.236, -0.281, -0.337, -0.325, &
+   0.154,  0.154,  0.154,  0.154,  0.171,  0.160,  0.145,  0.121,  0.075,  0.032, -0.060, -0.399, &
+   0.141,  0.141,  0.141,  0.141,  0.150,  0.151,  0.152,  0.150,  0.142,  0.131,  0.103, -0.038, &
+ !--BC content=0.100
+  -2.025, -2.025, -2.025, -2.025, -2.035, -1.965, -1.875, -1.731, -1.475, -1.285, -0.980, -0.447, &
+  -1.569, -1.569, -1.569, -1.569, -1.540, -1.572, -1.580, -1.557, -1.444, -1.312, -1.052, -0.485, &
+  -0.628, -0.628, -0.628, -0.628, -0.593, -0.634, -0.672, -0.710, -0.732, -0.716, -0.631, -0.279, &
+  -0.054, -0.054, -0.054, -0.054, -0.032, -0.058, -0.088, -0.129, -0.191, -0.236, -0.295, -0.299, &
+   0.173,  0.173,  0.173,  0.173,  0.184,  0.173,  0.158,  0.135,  0.090,  0.048, -0.039, -0.361, &
+   0.145,  0.145,  0.145,  0.145,  0.153,  0.154,  0.154,  0.152,  0.144,  0.134,  0.107, -0.027, &
+ !--BC content=0.200
+  -1.155, -1.155, -1.155, -1.155, -1.300, -1.295, -1.272, -1.213, -1.077, -0.957, -0.747, -0.336, &
+  -0.884, -0.884, -0.884, -0.884, -0.979, -1.028, -1.065, -1.086, -1.054, -0.986, -0.820, -0.388, &
+  -0.332, -0.332, -0.332, -0.332, -0.360, -0.402, -0.444, -0.490, -0.531, -0.536, -0.492, -0.225, &
+   0.050,  0.050,  0.050,  0.050,  0.048,  0.022, -0.007, -0.047, -0.107, -0.152, -0.213, -0.245, &
+   0.204,  0.204,  0.204,  0.204,  0.208,  0.197,  0.182,  0.161,  0.120,  0.081,  0.002, -0.285, &
+   0.153,  0.153,  0.153,  0.153,  0.159,  0.159,  0.159,  0.157,  0.150,  0.140,  0.115, -0.005  /
+   
+   DATA cg_MG_6bands/ &
+ !--BC content=0.001
+   0.290,  0.290,  0.290,  0.290,  0.378,  0.381,  0.377,  0.378,  0.373,  0.344,  0.317,  0.118, &
+   0.374,  0.374,  0.374,  0.374,  0.469,  0.474,  0.480,  0.480,  0.475,  0.462,  0.438,  0.242, &
+   0.375,  0.375,  0.375,  0.375,  0.491,  0.502,  0.517,  0.527,  0.534,  0.529,  0.508,  0.255, &
+   0.242,  0.242,  0.242,  0.242,  0.455,  0.516,  0.577,  0.631,  0.687,  0.715,  0.748,  0.772, &
+   0.559,  0.559,  0.559,  0.559,  0.487,  0.461,  0.410,  0.303, -0.181, -3.594,  1.814,  1.164, &
+   0.323,  0.323,  0.323,  0.323,  0.339,  0.339,  0.337,  0.328,  0.295,  0.243,  0.045,  2.778, &
+ !--BC content=0.010
+   0.300,  0.300,  0.300,  0.300,  0.385,  0.389,  0.390,  0.386,  0.377,  0.353,  0.319,  0.116, &
+   0.384,  0.384,  0.384,  0.384,  0.478,  0.482,  0.488,  0.488,  0.483,  0.471,  0.442,  0.246, &
+   0.380,  0.380,  0.380,  0.380,  0.496,  0.507,  0.520,  0.531,  0.538,  0.534,  0.512,  0.259, &
+   0.233,  0.233,  0.233,  0.233,  0.454,  0.520,  0.581,  0.636,  0.691,  0.719,  0.752,  0.778, &
+   0.553,  0.553,  0.553,  0.553,  0.487,  0.461,  0.414,  0.308, -0.144, -2.858,  1.889,  1.165, &
+   0.323,  0.323,  0.323,  0.323,  0.338,  0.339,  0.337,  0.328,  0.295,  0.244,  0.051,  2.847, &
+ !--BC content=0.020
+   0.305,  0.305,  0.305,  0.305,  0.391,  0.394,  0.395,  0.390,  0.380,  0.358,  0.321,  0.112, &
+   0.391,  0.391,  0.391,  0.391,  0.484,  0.488,  0.493,  0.493,  0.488,  0.476,  0.445,  0.246, &
+   0.384,  0.384,  0.384,  0.384,  0.499,  0.511,  0.524,  0.534,  0.541,  0.537,  0.514,  0.260, &
+   0.219,  0.219,  0.219,  0.219,  0.451,  0.523,  0.586,  0.642,  0.696,  0.724,  0.756,  0.783, &
+   0.547,  0.547,  0.547,  0.547,  0.487,  0.461,  0.416,  0.315, -0.108, -2.308,  1.954,  1.170, &
+   0.322,  0.322,  0.322,  0.322,  0.338,  0.339,  0.337,  0.328,  0.296,  0.245,  0.056,  2.949, &
+ !--BC content=0.050
+   0.312,  0.312,  0.312,  0.312,  0.400,  0.402,  0.403,  0.398,  0.385,  0.364,  0.321,  0.094, &
+   0.402,  0.402,  0.402,  0.402,  0.495,  0.498,  0.503,  0.503,  0.496,  0.484,  0.451,  0.242, &
+   0.388,  0.388,  0.388,  0.388,  0.506,  0.518,  0.530,  0.541,  0.548,  0.544,  0.521,  0.259, &
+   0.152,  0.152,  0.152,  0.152,  0.434,  0.527,  0.599,  0.658,  0.711,  0.738,  0.768,  0.794, &
+   0.534,  0.534,  0.534,  0.534,  0.486,  0.463,  0.423,  0.332, -0.018, -1.355,  2.203,  1.188, &
+   0.321,  0.321,  0.321,  0.321,  0.337,  0.338,  0.336,  0.328,  0.297,  0.249,  0.071,  3.311, &
+ !--BC content=0.100
+   0.309,  0.309,  0.309,  0.309,  0.404,  0.405,  0.406,  0.401,  0.385,  0.364,  0.316,  0.057, &
+   0.406,  0.406,  0.406,  0.406,  0.503,  0.507,  0.511,  0.512,  0.504,  0.491,  0.456,  0.232, &
+   0.382,  0.382,  0.382,  0.382,  0.510,  0.523,  0.537,  0.548,  0.555,  0.551,  0.528,  0.255, &
+  -0.178, -0.178, -0.178, -0.178,  0.312,  0.524,  0.626,  0.692,  0.741,  0.765,  0.791,  0.816, &
+   0.519,  0.519,  0.519,  0.519,  0.486,  0.466,  0.432,  0.357,  0.091, -0.650,  2.968,  1.221, &
+   0.319,  0.319,  0.319,  0.319,  0.336,  0.337,  0.335,  0.328,  0.300,  0.255,  0.094,  4.314, &
+ !--BC content=0.200
+   0.267,  0.267,  0.267,  0.267,  0.388,  0.391,  0.392,  0.387,  0.370,  0.345,  0.287, -0.053, &
+   0.381,  0.381,  0.381,  0.381,  0.499,  0.506,  0.512,  0.514,  0.507,  0.494,  0.455,  0.198, &
+   0.318,  0.318,  0.318,  0.318,  0.494,  0.515,  0.535,  0.551,  0.561,  0.559,  0.535,  0.237, &
+   1.151,  1.151,  1.151,  1.151,  0.703,  0.643,  1.248,  0.874,  0.846,  0.846,  0.853,  0.868, &
+   0.502,  0.502,  0.502,  0.502,  0.486,  0.472,  0.447,  0.393,  0.226, -0.108,-43.753,  1.313, &
+   0.315,  0.315,  0.315,  0.315,  0.332,  0.334,  0.333,  0.327,  0.304,  0.266,  0.135, 21.079  /
 
 !----BEGINNING OF CALCULATIONS
+
+  modname='aeropt_6bands_rrtm'
 
   spsol = 0
@@ -408,6 +478,5 @@
 
   IF (NSW.NE.nbands_sw_rrtm) THEN
-     print *,'Erreur NSW doit etre egal a 6 pour cette routine'
-     stop
+    CALL abort_physic(modname,'Erreur NSW doit etre egal a 6 pour cette routine',1)
   ENDIF
 
@@ -440,5 +509,5 @@
      aerosol_name(1) = id_CIDUSTM_phy
   ELSEIF (flag_aerosol .EQ. 6) THEN 
-     nb_aer = 10
+     nb_aer = 13
      ALLOCATE (aerosol_name(nb_aer)) 
      aerosol_name(1) = id_ASSO4M_phy      
@@ -452,4 +521,7 @@
      aerosol_name(9) = id_CIDUSTM_phy
      aerosol_name(10)= id_CSSO4M_phy
+     aerosol_name(11)= id_CSNO3M_phy
+     aerosol_name(12)= id_ASNO3M_phy
+     aerosol_name(13)= id_CINO3M_phy
   ENDIF
 
@@ -491,9 +563,9 @@
         soluble=.TRUE.
         spsol=2 
-     ELSEIF (aerosol_name(m).EQ.id_ASSO4M_phy) THEN 
+     ELSEIF (aerosol_name(m).EQ.id_CSSO4M_phy) THEN 
         soluble=.TRUE.
         spsol=3
         fac=1.375    ! (NH4)2-SO4/SO4 132/96 mass conversion factor for AOD
-     ELSEIF  (aerosol_name(m).EQ.id_CSSO4M_phy) THEN
+     ELSEIF  (aerosol_name(m).EQ.id_ASSO4M_phy) THEN
         soluble=.TRUE.
         spsol=4
@@ -508,4 +580,12 @@
          soluble=.TRUE.
          spsol=7
+     ELSEIF (aerosol_name(m).EQ.id_CSNO3M_phy) THEN
+         soluble=.TRUE.
+         spsol=8
+         fac=1.2903    ! NO3NH4/NO3 / mass conversion factor for AOD
+     ELSEIF (aerosol_name(m).EQ.id_ASNO3M_phy) THEN
+         soluble=.TRUE.
+         spsol=9
+         fac=1.2903    ! NO3NH4/NO3 / mass conversion factor for AOD
      ELSEIF (aerosol_name(m).EQ.id_CIDUSTM_phy) THEN 
          soluble=.FALSE.
@@ -517,4 +597,8 @@
          soluble=.FALSE.
          spinsol=3
+     ELSEIF (aerosol_name(m).EQ.id_CINO3M_phy) THEN
+         soluble=.FALSE.
+         spinsol=4
+         fac=1.2903    ! NO3NH4/NO3 / mass conversion factor for AOD
      ELSE 
          CYCLE
@@ -522,5 +606,5 @@
 
     !--shortname for aerosol index
-    id=aerosol_name(m)
+    aerindex=aerosol_name(m)
 
     IF (soluble) THEN
@@ -532,11 +616,13 @@
            DO i=1, klon
 
-             tmp_var=m_allaer(i,k,spsol)/1.e6*zdh(i,k)*fac
-             tmp_var_pi=m_allaer_pi(i,k,spsol)/1.e6*zdh(i,k)*fac
+             tmp_var=m_allaer(i,k,aerindex)/1.e6*zdh(i,k)*fac
+             tmp_var_pi=m_allaer_pi(i,k,aerindex)/1.e6*zdh(i,k)*fac
 
              ! Calculate the dry BC/(BC+SUL) mass ratio for all (natural+anthropogenic) aerosols
              BC_massfra = m_allaer(i,k,id_ASBCM_phy)/(m_allaer(i,k,id_ASBCM_phy)+m_allaer(i,k,id_ASSO4M_phy))
 
-             IF (BC_massfra.GE.0.10) THEN
+             IF (BC_massfra.GE.0.20) THEN
+               classbc = 6
+             ELSEIF (BC_massfra.GE.0.10) THEN
                classbc = 5
              ELSEIF  (BC_massfra.GE.0.05) THEN
@@ -553,5 +639,7 @@
              BC_massfra_pi = m_allaer_pi(i,k,id_ASBCM_phy)/(m_allaer_pi(i,k,id_ASBCM_phy)+m_allaer_pi(i,k,id_ASSO4M_phy))
 
-             IF (BC_massfra_pi.GE.0.10) THEN
+             IF (BC_massfra_pi.GE.0.20) THEN
+               classbc_pi = 6
+             ELSEIF (BC_massfra_pi.GE.0.10) THEN
                classbc_pi = 5
              ELSEIF  (BC_massfra_pi.GE.0.05) THEN
@@ -565,5 +653,5 @@
              ENDIF
 
-             DO inu=1,NSW
+             DO inu=1, NSW
 
                !--all aerosols
@@ -580,7 +668,7 @@
                              cg_MG_6bands(RH_num(i,k),inu,classbc))
 
-               tau_ae(i,k,id,inu)    = tmp_var*tau_ae2b_int
-               piz_ae(i,k,id,inu)    = piz_ae2b_int
-               cg_ae(i,k,id,inu)     = cg_ae2b_int
+               tau_ae(i,k,aerindex,inu)    = tmp_var*tau_ae2b_int
+               piz_ae(i,k,aerindex,inu)    = piz_ae2b_int
+               cg_ae(i,k,aerindex,inu)     = cg_ae2b_int
 
                !--natural aerosols
@@ -597,7 +685,7 @@
                              cg_MG_6bands(RH_num(i,k),inu,classbc_pi))
 
-               tau_ae_pi(i,k,id,inu) = tmp_var_pi* tau_ae2b_int
-               piz_ae_pi(i,k,id,inu) = piz_ae2b_int
-               cg_ae_pi(i,k,id,inu)  = cg_ae2b_int
+               tau_ae_pi(i,k,aerindex,inu) = tmp_var_pi* tau_ae2b_int
+               piz_ae_pi(i,k,aerindex,inu) = piz_ae2b_int
+               cg_ae_pi(i,k,aerindex,inu)  = cg_ae2b_int
                         
              ENDDO
@@ -610,8 +698,8 @@
          DO k=1, klev
            DO i=1, klon
-             tmp_var=m_allaer(i,k,spsol)/1.e6*zdh(i,k)*fac
-             tmp_var_pi=m_allaer_pi(i,k,spsol)/1.e6*zdh(i,k)*fac
-
-             DO inu=1,NSW
+             tmp_var=m_allaer(i,k,aerindex)/1.e6*zdh(i,k)*fac
+             tmp_var_pi=m_allaer_pi(i,k,aerindex)/1.e6*zdh(i,k)*fac
+
+             DO inu=1, NSW
 
                tau_ae2b_int= alpha_aers_6bands(RH_num(i,k),inu,spsol)+ & 
@@ -627,8 +715,8 @@
                              cg_aers_6bands(RH_num(i,k),inu,spsol))
 
-               tau_ae(i,k,id,inu)    = tmp_var*tau_ae2b_int
-               tau_ae_pi(i,k,id,inu) = tmp_var_pi* tau_ae2b_int
-               piz_ae(i,k,id,inu)    = piz_ae2b_int
-               cg_ae(i,k,id,inu)     = cg_ae2b_int
+               tau_ae(i,k,aerindex,inu)    = tmp_var*tau_ae2b_int
+               tau_ae_pi(i,k,aerindex,inu) = tmp_var_pi* tau_ae2b_int
+               piz_ae(i,k,aerindex,inu)    = piz_ae2b_int
+               cg_ae(i,k,aerindex,inu)     = cg_ae2b_int
                         
              ENDDO
@@ -638,6 +726,6 @@
          !--external mixture case for soluble BC
          IF (spsol.EQ.1) THEN
-           piz_ae_pi(:,:,id,:) = piz_ae(:,:,id,:)
-           cg_ae_pi(:,:,id,:)  = cg_ae(:,:,id,:)
+           piz_ae_pi(:,:,aerindex,:) = piz_ae(:,:,aerindex,:)
+           cg_ae_pi(:,:,aerindex,:)  = cg_ae(:,:,aerindex,:)
          ENDIF
 
@@ -648,16 +736,16 @@
        DO k=1, klev
          DO i=1, klon
-           tmp_var=m_allaer(i,k,naero_soluble+spinsol)/1.e6*zdh(i,k)*fac
-           tmp_var_pi=m_allaer_pi(i,k,naero_soluble+spinsol)/1.e6*zdh(i,k)*fac
-
-           DO inu=1,NSW
+           tmp_var=m_allaer(i,k,aerindex)/1.e6*zdh(i,k)*fac
+           tmp_var_pi=m_allaer_pi(i,k,aerindex)/1.e6*zdh(i,k)*fac
+
+           DO inu=1, NSW
              tau_ae2b_int = alpha_aeri_6bands(inu,spinsol)
              piz_ae2b_int = piz_aeri_6bands(inu,spinsol)
              cg_ae2b_int = cg_aeri_6bands(inu,spinsol) 
 
-             tau_ae(i,k,id,inu) = tmp_var*tau_ae2b_int
-             tau_ae_pi(i,k,id,inu) = tmp_var_pi*tau_ae2b_int
-             piz_ae(i,k,id,inu) = piz_ae2b_int
-             cg_ae(i,k,id,inu)= cg_ae2b_int
+             tau_ae(i,k,aerindex,inu) = tmp_var*tau_ae2b_int
+             tau_ae_pi(i,k,aerindex,inu) = tmp_var_pi*tau_ae2b_int
+             piz_ae(i,k,aerindex,inu) = piz_ae2b_int
+             cg_ae(i,k,aerindex,inu)= cg_ae2b_int
            ENDDO
          ENDDO
Index: LMDZ5/branches/testing/libf/phylmd/rrtm/aeropt_lw_rrtm.F90
===================================================================
--- LMDZ5/branches/testing/libf/phylmd/rrtm/aeropt_lw_rrtm.F90	(revision 2729)
+++ LMDZ5/branches/testing/libf/phylmd/rrtm/aeropt_lw_rrtm.F90	(revision 2787)
@@ -2,105 +2,75 @@
 ! aeropt_lw_rrtm.F90 2014-05-13 C. Kleinschmitt
 !                    2016-05-03 O. Boucher 
+!                    2016-12-17 O. Boucher
 !
 ! This routine feeds aerosol LW properties to RRTM
 ! we only consider absorption (not scattering)
+! we only consider dust for now
 
-SUBROUTINE AEROPT_LW_RRTM(aerosol_couple,paprs,tr_seri)
+SUBROUTINE AEROPT_LW_RRTM(ok_alw, pdel, zrho, flag_aerosol, m_allaer, m_allaer_pi)
 
   USE dimphy
   USE aero_mod
-  USE infotrac_phy
-  USE phys_state_var_mod, ONLY : tau_aero_lw_rrtm
-  USE YOERAD, ONLY : NLW
+  USE phys_state_var_mod, ONLY: tau_aero_lw_rrtm
+  USE YOERAD, ONLY: NLW
+  USE YOMCST, ONLY: RG
 
   IMPLICIT NONE
 
-  INCLUDE "YOMCST.h"
   INCLUDE "clesphys.h"
   !
   ! Input arguments:
   !
-  LOGICAL, INTENT(IN)                         :: aerosol_couple
-  REAL, DIMENSION(klon,klev+1), INTENT(in)    :: paprs
-  REAL, DIMENSION(klon,klev,nbtr), INTENT(in) :: tr_seri
-  !
-  REAL, DIMENSION(klon,klev) :: zdp, mass_temp
-  ! 
+  LOGICAL, INTENT(IN)                              :: ok_alw
+  INTEGER, INTENT(IN)                              :: flag_aerosol
+  REAL, DIMENSION(klon,klev), INTENT(IN)           :: pdel, zrho
+  REAL, DIMENSION(klon,klev,naero_tot), INTENT(IN) :: m_allaer, m_allaer_pi
   !
   INTEGER inu, i, k
-  INTEGER :: id_ASBCM, id_ASPOMM, id_ASSO4M, id_ASMSAM, id_CSSO4M, id_CSMSAM, id_SSSSM
-  INTEGER :: id_CSSSM, id_ASSSM, id_CIDUSTM, id_AIBCM, id_AIPOMM, id_ASNO3M, id_CSNO3M, id_CINO3M
-
+  REAL :: zdh(klon,klev)
+  REAL :: tmp_var, tmp_var_pi
+  CHARACTER*20 modname
   !
   !--absorption coefficient for CIDUST
   REAL:: alpha_abs_CIDUST_16bands(nbands_lw_rrtm)   !--unit m2/g 
-  DATA alpha_abs_CIDUST_16bands /              & 
-       0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, & 
-       0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0  /
+  DATA alpha_abs_CIDUST_16bands /                         &
+  0.001, 0.003, 0.005, 0.006, 0.012, 0.030, 0.148, 0.098, &
+  0.017, 0.053, 0.031, 0.008, 0.010, 0.011, 0.013, 0.015  /
+  !
+  modname='aeropt_lw_rrtm'
   !
   IF (NLW.NE.nbands_lw_rrtm) THEN
-     print *,'Erreur NLW doit etre egal a 16 pour cette routine'
-     stop
+    CALL abort_physic(modname,'Erreur NLW doit etre egal a 16 pour cette routine',1)
   ENDIF
   ! 
-  IF (aerosol_couple) THEN 
-  ! 
-      do i=1,nbtr
-      select case(trim(solsym(i)))
-         case ("ASBCM")
-            id_ASBCM = i
-         case ("ASPOMM")
-            id_ASPOMM = i
-         case ("ASSO4M")
-            id_ASSO4M = i
-         case ("ASMSAM")
-            id_ASMSAM = i
-         case ("CSSO4M")
-            id_CSSO4M = i
-         case ("CSMSAM")
-            id_CSMSAM = i
-         case ("SSSSM")
-            id_SSSSM = i
-         case ("CSSSM")
-            id_CSSSM = i
-         case ("ASSSM")
-            id_ASSSM = i
-         case ("CIDUSTM")
-            id_CIDUSTM = i
-         case ("AIBCM")
-            id_AIBCM = i
-         case ("AIPOMM")
-            id_AIPOMM = i
-         case ("ASNO3M")
-            id_ASNO3M = i
-         case ("CSNO3M")
-            id_CSNO3M = i
-         case ("CINO3M")
-            id_CINO3M = i
-         end select
-    enddo
+  IF (ok_alw) THEN                                   !--aerosol LW effects
+   !
+   IF (flag_aerosol.EQ.5.OR.flag_aerosol.EQ.6) THEN  !-Dust
+    !
+    zdh(:,:)=pdel(:,:)/(RG*zrho(:,:))      ! m
     !
     DO k=1, klev
-       zdp(:,k) = (paprs(:,k)-paprs(:,k+1))/RG !--kg/m2
-    ENDDO
-    !
-    !--for now only consider dust
-    mass_temp(:,:)=tr_seri(:,:,id_CIDUSTM)  !--kg/kg
-    !
-    DO inu=1,NLW
-      !
-      !--total aerosol
-      tau_aero_lw_rrtm(:,:,2,inu) = mass_temp(:,:)*zdp(:,:)*1000.*alpha_abs_CIDUST_16bands(inu)
-      !--no aerosol at all
-      tau_aero_lw_rrtm(:,:,1,inu) = 0.0
+      DO i=1, klon
+         !
+         tmp_var   =m_allaer(i,k,id_CIDUSTM_phy)   /1.e6*zdh(i,k)  !--g/m2
+         tmp_var_pi=m_allaer_pi(i,k,id_CIDUSTM_phy)/1.e6*zdh(i,k)  !--g/m2
+         !
+         DO inu=1, NLW
+           !
+           !--total aerosol
+           tau_aero_lw_rrtm(i,k,2,inu) = MAX(1.e-15,tmp_var*alpha_abs_CIDUST_16bands(inu))
+           !--natural aerosol 
+!           tau_aero_lw_rrtm(:,:,1,inu) = MAX(1.e-15,tmp_var_pi*alpha_abs_CIDUST_16bands(inu))
+           tau_aero_lw_rrtm(i,k,1,inu) = 1.e-15  !--test
+           !
+         ENDDO
+      ENDDO
       !
     ENDDO
+    ! 
+   ENDIF
+   !
+  ELSE !--no aerosol LW effects
     !
-    !--avoid very small values
-    tau_aero_lw_rrtm = MAX(tau_aero_lw_rrtm,1.e-15)
-    ! 
-  ELSE !--not aerosol_couple
-    !
-    !--no LW effects if not coupled to INCA
     tau_aero_lw_rrtm = 1.e-15
   ENDIF
Index: LMDZ5/branches/testing/libf/phylmd/rrtm/read_rsun_rrtm.F90
===================================================================
--- LMDZ5/branches/testing/libf/phylmd/rrtm/read_rsun_rrtm.F90	(revision 2729)
+++ LMDZ5/branches/testing/libf/phylmd/rrtm/read_rsun_rrtm.F90	(revision 2787)
@@ -16,5 +16,5 @@
   USE mod_phys_lmdz_para
 
-  USE YOESW    , ONLY : RSUN
+  USE YOESW, ONLY : RSUN
 
   IMPLICIT NONE
@@ -33,5 +33,6 @@
 !$OMP THREADPRIVATE(TSI)
 
-  INTEGER, SAVE :: day_pre
+  INTEGER, SAVE :: day_pre=1
+!$OMP THREADPRIVATE(day_pre)
 
 !--only one processor reads
Index: LMDZ5/branches/testing/libf/phylmd/rrtm/readaerosol_optic_rrtm.F90
===================================================================
--- LMDZ5/branches/testing/libf/phylmd/rrtm/readaerosol_optic_rrtm.F90	(revision 2729)
+++ LMDZ5/branches/testing/libf/phylmd/rrtm/readaerosol_optic_rrtm.F90	(revision 2787)
@@ -1,5 +1,5 @@
 ! $Id$
 !
-SUBROUTINE readaerosol_optic_rrtm(debut, aerosol_couple,  &
+SUBROUTINE readaerosol_optic_rrtm(debut, aerosol_couple, ok_alw,  &
      new_aod, flag_aerosol, flag_bc_internal_mixture, itap, rjourvrai, &
      pdtphys, pplay, paprs, t_seri, rhcl, presnivs, &
@@ -30,4 +30,5 @@
   LOGICAL, INTENT(IN)                      :: debut
   LOGICAL, INTENT(IN)                      :: aerosol_couple
+  LOGICAL, INTENT(IN)                      :: ok_alw
   LOGICAL, INTENT(IN)                      :: new_aod
   INTEGER, INTENT(IN)                      :: flag_aerosol
@@ -281,6 +282,6 @@
   ! Calculate the total mass of all soluble aersosols
   ! to be revisited for AR6
-  mass_solu_aero(:,:)    = sulfacc(:,:)    + bcsol(:,:)    + pomsol(:,:)   + nitracc(:,:) + ssacu(:,:)
-  mass_solu_aero_pi(:,:) = sulfacc_pi(:,:) + bcsol_pi(:,:) + pomsol_pi(:,:) + nitracc_pi(:,:) + ssacu_pi(:,:) 
+  mass_solu_aero(:,:)    = sulfacc(:,:)    + bcsol(:,:)    + pomsol(:,:)    + nitracc(:,:)    + ssacu(:,:)
+  mass_solu_aero_pi(:,:) = sulfacc_pi(:,:) + bcsol_pi(:,:) + pomsol_pi(:,:) + nitracc_pi(:,:) + ssacu_pi(:,:)
 
   !****************************************************************************************
@@ -310,4 +311,7 @@
        pplay, t_seri,                &
        tausum_aero, tau3d_aero )
+
+  !--call LW optical properties for tropospheric aerosols 
+  CALL aeropt_lw_rrtm(ok_alw, pdel, zrho, flag_aerosol, m_allaer, m_allaer_pi)
 
   ! Diagnostics calculation for CMIP5 protocol
Index: LMDZ5/branches/testing/libf/phylmd/rrtm/readaerosolstrato1_rrtm.F90
===================================================================
--- LMDZ5/branches/testing/libf/phylmd/rrtm/readaerosolstrato1_rrtm.F90	(revision 2729)
+++ LMDZ5/branches/testing/libf/phylmd/rrtm/readaerosolstrato1_rrtm.F90	(revision 2787)
@@ -35,5 +35,6 @@
     REAL, POINTER:: lev(:)
     INTEGER k, band, wave, i
-    INTEGER, SAVE :: mth_pre
+    INTEGER, SAVE :: mth_pre=1
+!$OMP THREADPRIVATE(mth_pre)
 
     REAL, ALLOCATABLE, DIMENSION(:,:), SAVE :: tau_aer_strat
@@ -44,6 +45,4 @@
     REAL, ALLOCATABLE:: tauaerstrat_mois(:, :, :)
     REAL, ALLOCATABLE:: tauaerstrat_mois_glo(:, :)
-
-    REAL, ALLOCATABLE:: sum_tau_aer_strat(:)
 
 ! For NetCDF:
@@ -77,5 +76,4 @@
 
     IF (.not.ALLOCATED(tau_aer_strat)) ALLOCATE(tau_aer_strat(klon,klev))
-    IF (.not.ALLOCATED(sum_tau_aer_strat)) ALLOCATE(sum_tau_aer_strat(klon))
 
 !--we only read monthly strat aerosol data
Index: LMDZ5/branches/testing/libf/phylmd/rrtm/readaerosolstrato2_rrtm.F90
===================================================================
--- LMDZ5/branches/testing/libf/phylmd/rrtm/readaerosolstrato2_rrtm.F90	(revision 2729)
+++ LMDZ5/branches/testing/libf/phylmd/rrtm/readaerosolstrato2_rrtm.F90	(revision 2787)
@@ -41,5 +41,6 @@
     REAL, POINTER:: wav(:)
     INTEGER i,k,wave,band
-    INTEGER, SAVE :: mth_pre
+    INTEGER, SAVE :: mth_pre=1
+!$OMP THREADPRIVATE(mth_pre)
 
     REAL, ALLOCATABLE, DIMENSION(:,:,:), SAVE :: tau_aer_strat
Index: LMDZ5/branches/testing/libf/phylmd/stratosphere_mask.F90
===================================================================
--- LMDZ5/branches/testing/libf/phylmd/stratosphere_mask.F90	(revision 2729)
+++ LMDZ5/branches/testing/libf/phylmd/stratosphere_mask.F90	(revision 2787)
@@ -1,2 +1,5 @@
+!
+! $Id$
+!
 SUBROUTINE stratosphere_mask(t_seri, pplay, xlat)
 
@@ -31,4 +34,5 @@
 USE phys_local_var_mod, ONLY: p_tropopause
 #endif
+USE print_control_mod, ONLY: lunout, prt_level
 
 IMPLICIT NONE
@@ -98,6 +102,6 @@
 #endif
 
-IF (ifil.gt.0) THEN
-  print *,'Tropopause: number of undetermined values =', ifil
+IF (ifil.gt.0 .and. prt_level >5) THEN
+  write(lunout,*)'Tropopause: number of undetermined values =', ifil
 ENDIF
 
Index: LMDZ5/branches/testing/libf/phylmd/surf_landice_mod.F90
===================================================================
--- LMDZ5/branches/testing/libf/phylmd/surf_landice_mod.F90	(revision 2729)
+++ LMDZ5/branches/testing/libf/phylmd/surf_landice_mod.F90	(revision 2787)
@@ -30,4 +30,7 @@
     USE calcul_fluxs_mod
     USE phys_output_var_mod
+!FC
+    USE ioipsl_getin_p_mod, ONLY : getin_p
+
 #ifdef CPP_SISVAT
     USE surf_sisvat_mod,  ONLY : surf_sisvat
@@ -121,4 +124,5 @@
     CHARACTER (len = 80)                      :: abort_message
 
+
 !albedo SB >>>
     real,dimension(klon) :: alb1,alb2
@@ -127,4 +131,24 @@
 ! End definition
 !****************************************************************************************
+!FC 
+!FC
+   REAL,SAVE :: alb_vis_sno_lic
+  !$OMP THREADPRIVATE(alb_vis_sno_lic)
+   REAL,SAVE :: alb_nir_sno_lic
+  !$OMP THREADPRIVATE(alb_nir_sno_lic)
+  LOGICAL, SAVE :: firstcall = .TRUE.
+  !$OMP THREADPRIVATE(firstcall)
+!FC
+
+
+  IF (firstcall) THEN
+  alb_vis_sno_lic=0.77
+  CALL getin_p('alb_vis_sno_lic',alb_vis_sno_lic)
+           PRINT*, 'alb_vis_sno_lic',alb_vis_sno_lic
+  alb_nir_sno_lic=0.77
+  CALL getin_p('alb_nir_sno_lic',alb_nir_sno_lic)
+           PRINT*, 'alb_nir_sno_lic',alb_nir_sno_lic
+  firstcall=.false.
+  ENDIF
 !
 ! Initialize output variables
@@ -280,6 +304,6 @@
 
 ! Attantion: alb1 and alb2 are the same!
-    alb1(1:knon)  = 0.77
-    alb2(1:knon)  = alb1(1:knon)
+    alb1(1:knon)  = alb_vis_sno_lic
+    alb2(1:knon)  = alb_nir_sno_lic
 
 
Index: LMDZ5/branches/testing/libf/phylmd/tend_to_tke.F90
===================================================================
--- LMDZ5/branches/testing/libf/phylmd/tend_to_tke.F90	(revision 2787)
+++ LMDZ5/branches/testing/libf/phylmd/tend_to_tke.F90	(revision 2787)
@@ -0,0 +1,145 @@
+!***************************************************************************************
+! tend_to_tke.F90
+!*************
+!
+! Subroutine that adds a tendency on the TKE created by the 
+! fluxes of momentum retrieved from the wind speed tendencies
+! of the physics.
+! 
+! The basic concept is the following:
+! the TKE equation writes  de/dt = -u'w' du/dz -v'w' dv/dz +g/theta dtheta/dz +......
+!
+!
+! We expect contributions to the term u'w' and v'w' that do not come from the Yamada
+! scheme, for instance: gravity waves, drag from high vegetation..... These contributions
+! need to be accounted for.
+! we explicitely calculate the fluxes, integrating the wind speed 
+!                        tendency from the top of the atmospher
+!
+!
+!
+! contacts: Frederic Hourdin, Etienne Vignon
+!
+! History:
+!---------
+! - 1st redaction, Etienne, 15/10/2016
+! Ajout des 4 sous surfaces pour la tke
+! on sort l'ajout des tendances du if sur les deux cas, pour ne pas
+! dupliuqer les lignes
+! on enleve le pas de temps qui disprait dans les calculs
+!
+!
+!**************************************************************************************
+
+ SUBROUTINE tend_to_tke(dt,plev,exner,temp,windu,windv,dt_a,du_a,dv_a,tke,dtke)
+
+ USE dimphy, ONLY: klon, klev
+ USE indice_sol_mod, ONLY: nbsrf
+#include "YOMCST.h"
+
+! Declarations
+!==============
+
+
+! Inputs
+!-------
+  REAL dt                   ! Time step [s]
+  REAL plev(klon,klev+1)    ! inter-layer pressure [Pa]
+  REAL temp(klon,klev)      ! temperature [K], grid-cell average or for a one subsurface
+  REAL windu(klon,klev)     ! zonal wind [m/s], grid-cell average or for a one subsurface
+  REAL windv(klon,klev)     ! meridonal wind [m/s], grid-cell average or for a one subsurface
+  REAL exner(klon,klev)     ! Fonction d'Exner = T/theta
+  REAL dt_a(klon,klev)      ! Temperature tendency [K], grid-cell average or for a one subsurface
+  REAL du_a(klon,klev)      ! Zonal wind speed tendency [m/s], grid-cell average or for a one subsurface
+  REAL dv_a(klon,klev)      ! Meridional wind speed tendency [m/s], grid-cell average or for a one subsurface
+
+! Inputs/Outputs
+!---------------
+  REAL tke(klon,klev,nbsrf)       ! Turbulent Kinetic energy [m2/s2], grid-cell average or for a subsurface
+  REAL dtke(klon,klev)
+
+
+! Local
+!-------
+
+
+  INTEGER ig,k,isrf                 ! indices
+  REAL    masse(klon,klev)          ! mass in the layers [kg/m2]
+  REAL    unsmasse(klon,klev+1)     ! linear mass in the layers [kg/m2]
+  REAL    flux_rhotw(klon,klev+1)   ! flux massique de tempe. pot. rho*u'*theta'
+  REAL    flux_rhouw(klon,klev+1)   ! flux massique de quantit?? de mouvement rho*u'*w' [kg/m/s2]
+  REAL    flux_rhovw(klon,klev+1)   ! flux massique de quantit?? de mouvement rho*v'*w' [kg/m/s2]
+  REAL    tendt(klon,klev)        ! new temperature tke tendency [m2/s2/s]
+  REAL    tendu(klon,klev)        ! new zonal tke tendency [m2/s2/s]
+  REAL    tendv(klon,klev)        ! new meridonal tke tendency [m2/s2/s]
+  
+
+
+
+! First calculations:
+!=====================
+
+      unsmasse(:,:)=0.
+      DO k=1,klev
+         masse(:,k)=(plev(:,k)-plev(:,k+1))/RG
+         unsmasse(:,k)=unsmasse(:,k)+0.5/masse(:,k)
+         unsmasse(:,k+1)=unsmasse(:,k+1)+0.5/masse(:,k)
+      END DO
+
+      tendu(:,:)=0.0
+      tendv(:,:)=0.0
+
+! Method 1: Calculation of fluxes using a downward integration
+!============================================================
+
+
+ 
+! Flux calculation
+
+ flux_rhotw(:,klev+1)=0.
+ flux_rhouw(:,klev+1)=0.
+ flux_rhovw(:,klev+1)=0.
+
+   DO k=klev,1,-1
+      flux_rhotw(:,k)=flux_rhotw(:,k+1)+masse(:,k)*dt_a(:,k)/exner(:,k)
+      flux_rhouw(:,k)=flux_rhouw(:,k+1)+masse(:,k)*du_a(:,k)
+      flux_rhovw(:,k)=flux_rhovw(:,k+1)+masse(:,k)*dv_a(:,k)
+   ENDDO
+
+
+! TKE update:
+
+   DO k=2,klev
+      tendt(:,k)=-flux_rhotw(:,k)*(exner(:,k)-exner(:,k-1))*unsmasse(:,k)*RCPD
+      tendu(:,k)=-flux_rhouw(:,k)*(windu(:,k)-windu(:,k-1))*unsmasse(:,k)
+      tendv(:,k)=-flux_rhovw(:,k)*(windv(:,k)-windv(:,k-1))*unsmasse(:,k)
+   ENDDO
+   tendt(:,1)=-flux_rhotw(:,1)*(exner(:,1)-1.)*unsmasse(:,1)*RCPD
+   tendu(:,1)=-1.*flux_rhouw(:,1)*windu(:,1)*unsmasse(:,1)
+   tendv(:,1)=-1.*flux_rhovw(:,1)*windv(:,1)*unsmasse(:,1)
+
+
+ DO isrf=1,nbsrf
+    DO k=1,klev
+       tke(:,k,isrf)= tke(:,k,isrf)+tendu(:,k)+tendv(:,k)+tendt(:,k)
+       tke(:,k,isrf)= max(tke(:,k,isrf),1.e-10)
+    ENDDO
+ ENDDO
+
+ dtke(:,:)=tendt(:,:)+tendu(:,:)+tendv(:,:)
+
+
+  IF (klon==1) THEN
+  CALL iophys_ecrit('u',klev,'u','',windu)
+  CALL iophys_ecrit('v',klev,'v','',windu)
+  CALL iophys_ecrit('t',klev,'t','',temp)
+  CALL iophys_ecrit('tke1',klev,'tke1','',tke(:,1:klev,1))
+  CALL iophys_ecrit('tke2',klev,'tke2','',tke(:,1:klev,2))
+  CALL iophys_ecrit('tke3',klev,'tke3','',tke(:,1:klev,3))
+  CALL iophys_ecrit('tke4',klev,'tke4','',tke(:,1:klev,4))
+  CALL iophys_ecrit('theta',klev,'theta','',temp/exner)
+  CALL iophys_ecrit('Duv',klev,'Duv','',tendu(:,1:klev)+tendv(:,1:klev))
+  CALL iophys_ecrit('Dt',klev,'Dt','',tendt(:,1:klev))
+  ENDIF
+
+ END SUBROUTINE tend_to_tke
Index: LMDZ5/branches/testing/libf/phylmd/tracinca_mod.F90
===================================================================
--- LMDZ5/branches/testing/libf/phylmd/tracinca_mod.F90	(revision 2729)
+++ LMDZ5/branches/testing/libf/phylmd/tracinca_mod.F90	(revision 2787)
@@ -36,5 +36,5 @@
        pdtphys,  t_seri,   paprs,          pplay,     &
        pmfu,     upwd,     ftsol,  pctsrf, pphis,     &
-       pphi,     albsol,   sh,             rh,        &
+       pphi,     albsol,   sh,             ch, rh,    &
        cldfra,   rneb,     diafra,         cldliq,    &
        itop_con, ibas_con, pmflxr,         pmflxs,    &
@@ -76,4 +76,5 @@
     REAL,DIMENSION(klon,klev),INTENT(IN)   :: t_seri  ! Temperature
     REAL,DIMENSION(klon,klev),INTENT(IN)   :: sh      ! humidite specifique
+    REAL,DIMENSION(klon,klev),INTENT(IN)   :: ch      ! eau liquide
     REAL,DIMENSION(klon,klev),INTENT(IN)   :: rh      ! humidite relative
     REAL,DIMENSION(klon,klev+1),INTENT(IN) :: paprs   ! pression pour chaque inter-couche (en Pa)
@@ -185,4 +186,5 @@
          t_seri,     & !tfld
          sh,         & !sh
+         ch,         & !ql
          rh,         & !rh
          nbp_lon,    & !nx
Index: LMDZ5/branches/testing/libf/phylmd/wake.F90
===================================================================
--- LMDZ5/branches/testing/libf/phylmd/wake.F90	(revision 2729)
+++ LMDZ5/branches/testing/libf/phylmd/wake.F90	(revision 2787)
@@ -2,5 +2,5 @@
 ! $Id$
 
-SUBROUTINE wake(p, ph, pi, dtime, &
+SUBROUTINE wake(znatsurf, p, ph, pi, dtime, &
                 te0, qe0, omgb, &
                 dtdwn, dqdwn, amdwn, amup, dta, dqa, &
@@ -124,4 +124,5 @@
   ! --------------------
 
+  INTEGER, DIMENSION (klon),        INTENT(IN)          :: znatsurf
   REAL, DIMENSION (klon, klev),     INTENT(IN)          :: p, pi
   REAL, DIMENSION (klon, klev+1),   INTENT(IN)          :: ph
@@ -167,7 +168,14 @@
   LOGICAL, SAVE                                         :: first = .TRUE.
   !$OMP THREADPRIVATE(first)
-  REAL, SAVE                                            :: stark, wdens_ref, coefgw, alpk
+!jyg<
+!!  REAL, SAVE                                            :: stark, wdens_ref, coefgw, alpk
+  REAL, SAVE, DIMENSION(2)                              :: wdens_ref
+  REAL, SAVE                                            :: stark, coefgw, alpk
+!>jyg
   REAL, SAVE                                            :: crep_upper, crep_sol  
   !$OMP THREADPRIVATE(stark, wdens_ref, coefgw, alpk, crep_upper, crep_sol)
+
+  LOGICAL, SAVE                                         :: flag_wk_check_trgl
+  !$OMP THREADPRIVATE(flag_wk_check_trgl)
 
   REAL                                                  :: delta_t_min
@@ -200,4 +208,8 @@
   REAL, DIMENSION (klon)                                :: z, dz, hw0
   INTEGER, DIMENSION (klon)                             :: ktop, kupper
+
+  ! Variables liées au test de la forme triangulaire du profil de Delta_theta
+  REAL, DIMENSION (klon)                                :: sum_half_dth
+  REAL, DIMENSION (klon)                                :: dz_half
 
   ! Sub-timestep tendencies and related variables
@@ -312,6 +324,12 @@
   alpk=0.25
   CALL getin_p('alpk',alpk)
-  wdens_ref=8.E-12
-  CALL getin_p('wdens_ref',wdens_ref)
+!jyg<
+!!  wdens_ref=8.E-12
+!!  CALL getin_p('wdens_ref',wdens_ref)
+  wdens_ref(1)=8.E-12
+  wdens_ref(2)=8.E-12
+  CALL getin_p('wdens_ref_o',wdens_ref(1))    !wake number per unit area ; ocean
+  CALL getin_p('wdens_ref_l',wdens_ref(2))    !wake number per unit area ; land
+!>jyg
   coefgw=4.
   CALL getin_p('coefgw',coefgw)
@@ -319,6 +337,14 @@
   WRITE(*,*) 'stark=', stark
   WRITE(*,*) 'alpk=', alpk
-  WRITE(*,*) 'wdens_ref=', wdens_ref
+!jyg<
+!!  WRITE(*,*) 'wdens_ref=', wdens_ref
+  WRITE(*,*) 'wdens_ref_o=', wdens_ref(1)
+  WRITE(*,*) 'wdens_ref_l=', wdens_ref(2)
+!>jyg
   WRITE(*,*) 'coefgw=', coefgw 
+
+  flag_wk_check_trgl=.false.
+  CALL getin_p('flag_wk_check_trgl ', flag_wk_check_trgl)
+  WRITE(*,*) 'flag_wk_check_trgl=', flag_wk_check_trgl
 
   first=.false.
@@ -328,5 +354,10 @@
   ! Les densites peuvent evoluer si les poches debordent
   ! (voir au tout debut de la boucle sur les substeps)
-  wdens(:) = wdens_ref
+!jyg<
+!!  wdens(:) = wdens_ref
+  DO i = 1,klon
+    wdens(i) = wdens_ref(znatsurf(i)+1)
+  ENDDO 
+!>jyg
 
   ! print*,'stark',stark
@@ -824,6 +855,6 @@
 
   IF (prt_level>=10) THEN
-    PRINT *, 'wake-4, sigmaw(igout), cstar(igout), wape(igout) ', &
-                      sigmaw(igout), cstar(igout), wape(igout)
+    PRINT *, 'wake-4, sigmaw(igout), cstar(igout), wape(igout), ktop(igout) ', &
+                      sigmaw(igout), cstar(igout), wape(igout), ktop(igout)
   ENDIF
 
@@ -846,6 +877,6 @@
     END DO
     IF (prt_level>=10) THEN
-      PRINT *, 'wake-4.1, isubstep,wk_adv(igout),cstar(igout),wape(igout) ', &
-                          isubstep,wk_adv(igout),cstar(igout),wape(igout)
+      PRINT *, 'wake-4.1, isubstep,wk_adv(igout),cstar(igout),wape(igout), ptop(igout) ', &
+                          isubstep,wk_adv(igout),cstar(igout),wape(igout), ptop(igout)
     ENDIF
 
@@ -962,5 +993,6 @@
     IF (prt_level>=10) THEN
       PRINT *, 'wake-4.2, omg(igout,k) ', (k,omg(igout,k), k=1,klev)
-      PRINT *, 'wake-4.2, omgtop(igout) ', omgtop(igout)
+      PRINT *, 'wake-4.2, omgtop(igout), ptop(igout), ktop(igout) ', &
+                          omgtop(igout), ptop(igout), ktop(igout)
     ENDIF
 
@@ -1609,6 +1641,6 @@
 
   IF (prt_level>=10) THEN
-    PRINT *, 'wake-5, sigmaw(igout), cstar(igout), wape(igout) ', &
-                      sigmaw(igout), cstar(igout), wape(igout)
+    PRINT *, 'wake-5, sigmaw(igout), cstar(igout), wape(igout), ptop(igout) ', &
+                      sigmaw(igout), cstar(igout), wape(igout), ptop(igout)
   ENDIF
 
@@ -1632,4 +1664,5 @@
       sum_thvu(i) = 0.
       sum_dth(i) = 0.
+      sum_half_dth(i) = 0.
       sum_dq(i) = 0.
       sum_rho(i) = 0.
@@ -1646,4 +1679,6 @@
       av_dtdwn(i) = 0.
       av_dqdwn(i) = 0.
+
+      dthmin(i) = -delta_t_min
     END IF
   END DO
@@ -1685,4 +1720,5 @@
       z(i) = 1.
       dz(i) = 1.
+      dz_half(i) = 1.
       sum_thvu(i) = thu(i, 1)*(1.+epsim1*qu(i,1))*dz(i)
       sum_dth(i) = 0.
@@ -1696,4 +1732,5 @@
         ! cc
         dz(i) = -(amax1(ph(i,k+1),ptop(i))-ph(i,k))/(rho(i,k)*rg)
+        dz_half(i) = -(amax1(ph(i,k+1),0.5*(ptop(i)+ph(i,1)))-ph(i,k))/(rho(i,k)*rg)
         IF (dz(i)>0) THEN
           z(i) = z(i) + dz(i)
@@ -1707,4 +1744,9 @@
           sum_dtdwn(i) = sum_dtdwn(i) + dtdwn(i, k)*dz(i)
           sum_dqdwn(i) = sum_dqdwn(i) + dqdwn(i, k)*dz(i)
+!
+          dthmin(i) = min(dthmin(i), dth(i,k))
+        END IF
+        IF (dz_half(i)>0) THEN
+          sum_half_dth(i) = sum_half_dth(i) + dth(i, k)*dz_half(i)
         END IF
       END IF
@@ -1750,4 +1792,28 @@
 
   ! Filter out bad wakes
+
+  IF (flag_wk_check_trgl) THEN
+    ! Check triangular shape of dth profile
+    DO i = 1, klon
+      IF (ok_qx_qw(i)) THEN
+        !! print *,'wake, hw0(i), dthmin(i) ', hw0(i), dthmin(i)
+        !! print *,'wake, 2.*sum_dth(i)/(hw0(i)*dthmin(i)) ', &
+        !!                2.*sum_dth(i)/(hw0(i)*dthmin(i))
+        !! print *,'wake, sum_half_dth(i), sum_dth(i) ', &
+        !!                sum_half_dth(i), sum_dth(i)
+        IF ((hw0(i) < 1.) .or. (dthmin(i) >= -delta_t_min) ) THEN
+          wape2(i) = -1.
+          !! print *,'wake, rej 1'
+        ELSE IF (abs(2.*sum_dth(i)/(hw0(i)*dthmin(i)) - 1.) > 0.5) THEN
+          wape2(i) = -1.
+          !! print *,'wake, rej 2'
+        ELSE IF (abs(sum_half_dth(i)) < 0.5*abs(sum_dth(i)) ) THEN
+          wape2(i) = -1.
+          !! print *,'wake, rej 3'
+        END IF
+      END IF
+    END DO
+  END IF
+
 
   DO k = 1, klev
@@ -1882,5 +1948,8 @@
 
       ! cc nrlmd        IF ( wk_adv(i) .AND. k .LE. kupper(i)) THEN
-      IF (ok_qx_qw(i) .AND. k<=kupper(i)) THEN
+!jyg<
+!!      IF (ok_qx_qw(i) .AND. k<=kupper(i)) THEN
+      IF (ok_qx_qw(i)) THEN
+!>jyg
         ! cc
         dtls(i, k) = dtls(i, k)/dtime
