Index: /LMDZ4/branches/LMDZ4-dev/libf/phylmd/readaerosol.F90
===================================================================
--- /LMDZ4/branches/LMDZ4-dev/libf/phylmd/readaerosol.F90	(revision 1269)
+++ /LMDZ4/branches/LMDZ4-dev/libf/phylmd/readaerosol.F90	(revision 1270)
@@ -7,5 +7,5 @@
 CONTAINS
 
-SUBROUTINE readaerosol(name_aero, type, iyr_in, klev_src, pt_ap, pt_b, pt_out, pt_psurf, pt_load, nbr_tsteps)
+SUBROUTINE readaerosol(name_aero, type, iyr_in, klev_src, pt_ap, pt_b, pt_out, psurf, load)
 
 !****************************************************************************************
@@ -34,17 +34,16 @@
   REAL, POINTER, DIMENSION(:)     :: pt_ap        ! Pointer for describing the vertical levels      
   REAL, POINTER, DIMENSION(:)     :: pt_b         ! Pointer for describing the vertical levels      
-  REAL, POINTER, DIMENSION(:,:,:) :: pt_out       ! The massvar distributions, DIMENSION(klon,klev_src, nbr_tsteps)
-  REAL, POINTER, DIMENSION(:,:)   :: pt_psurf     ! The massvar distributions, DIMENSION(klon, nbr_tsteps)
-  REAL, POINTER, DIMENSION(:,:)   :: pt_load      ! The massvar distributions, DIMENSION(klon, nbr_tsteps)
-  INTEGER                         :: nbr_tsteps   ! number of timesteps in read file (12 or 14)
+  REAL, POINTER, DIMENSION(:,:,:) :: pt_out       ! The massvar distributions, DIMENSION(klon, klev_src, 12)
+  REAL, DIMENSION(klon,12), INTENT(OUT) :: psurf  ! Surface pression for 12 months
+  REAL, DIMENSION(klon,12), INTENT(OUT) :: load   ! Aerosol mass load in each column for 12 months
 
   ! Local variables
-  CHARACTER(len=4)                  :: cyear
-  REAL, POINTER, DIMENSION(:,:,:)   :: pt_2
-  REAL, POINTER, DIMENSION(:,:)     :: psurf2, load2
-  REAL                              :: p0           ! Reference pressure
-  INTEGER                           :: iyr1, iyr2, klev_src2
-  INTEGER                           :: it, k, i
-  LOGICAL, PARAMETER                :: lonlyone=.FALSE.
+  CHARACTER(len=4)                :: cyear
+  REAL, POINTER, DIMENSION(:,:,:) :: pt_2
+  REAL, DIMENSION(klon,12)        :: psurf2, load2
+  REAL                            :: p0           ! Reference pressure
+  INTEGER                         :: iyr1, iyr2, klev_src2
+  INTEGER                         :: it, k, i
+  LOGICAL, PARAMETER              :: lonlyone=.FALSE.
 
 !****************************************************************************************
@@ -57,7 +56,7 @@
 !****************************************************************************************
      cyear='1980'
-     ! get_aero_fromfile returns pt_out allocated and initialized with data for nbr_tsteps month 
-     ! pt_out has dimensions (klon, klev_src, nbr_tsteps)
-     CALL get_aero_fromfile(name_aero, cyear, klev_src, pt_ap, pt_b, p0, pt_out, pt_psurf, pt_load, nbr_tsteps)
+     ! get_aero_fromfile returns pt_out allocated and initialized with data for 12 month 
+     ! pt_out has dimensions (klon, klev_src, 12)
+     CALL get_aero_fromfile(name_aero, cyear, klev_src, pt_ap, pt_b, p0, pt_out, psurf, load)
      
 
@@ -66,17 +65,7 @@
 !****************************************************************************************     
      cyear='.nat'
-     ! get_aero_fromfile returns pt_out allocated and initialized with data for nbr_tsteps month 
-     ! pt_out has dimensions (klon, klev_src, nbr_tsteps)
-     CALL get_aero_fromfile(name_aero, cyear, klev_src, pt_ap, pt_b, p0, pt_out, pt_psurf, pt_load, nbr_tsteps)
-
-  ELSE IF (type == 'annuel') THEN
-! Read and return data from scenario annual files
-!****************************************************************************************     
-     WRITE(cyear,'(I4)') iyr_in
-     WRITE(lunout,*) 'get_aero 3 iyr_in=', iyr_in,'   ',cyear
-     ! get_aero_fromfile returns pt_out allocated and initialized with data for nbr_tsteps month 
-     ! pt_out has dimensions (klon, klev_src, nbr_tsteps)
-     CALL get_aero_fromfile(name_aero, cyear, klev_src, pt_ap, pt_b, p0, pt_out, pt_psurf, pt_load, nbr_tsteps)
-     
+     ! get_aero_fromfile returns pt_out allocated and initialized with data for 12 month 
+     ! pt_out has dimensions (klon, klev_src, 12)
+     CALL get_aero_fromfile(name_aero, cyear, klev_src, pt_ap, pt_b, p0, pt_out, psurf, load)
      
   ELSE IF (type == 'scenario') THEN
@@ -86,14 +75,14 @@
         cyear='.nat'
         WRITE(lunout,*) 'get_aero 1 iyr_in=', iyr_in,'   ',cyear
-        ! get_aero_fromfile returns pt_out allocated and initialized with data for nbr_tsteps month 
-        ! pt_out has dimensions (klon, klev_src, nbr_tsteps)
-        CALL get_aero_fromfile(name_aero, cyear, klev_src, pt_ap, pt_b, p0, pt_out, pt_psurf, pt_load, nbr_tsteps)
+        ! get_aero_fromfile returns pt_out allocated and initialized with data for 12 month 
+        ! pt_out has dimensions (klon, klev_src, 12)
+        CALL get_aero_fromfile(name_aero, cyear, klev_src, pt_ap, pt_b, p0, pt_out, psurf, load)
         
      ELSE IF (iyr_in .GE. 2100) THEN
         cyear='2100'
         WRITE(lunout,*) 'get_aero 2 iyr_in=', iyr_in,'   ',cyear
-        ! get_aero_fromfile returns pt_out allocated and initialized with data for nbr_tsteps month 
-        ! pt_out has dimensions (klon, klev_src, nbr_tsteps)
-        CALL get_aero_fromfile(name_aero, cyear, klev_src, pt_ap, pt_b, p0, pt_out, pt_psurf, pt_load, nbr_tsteps)
+        ! get_aero_fromfile returns pt_out allocated and initialized with data for 12 month 
+        ! pt_out has dimensions (klon, klev_src, 12)
+        CALL get_aero_fromfile(name_aero, cyear, klev_src, pt_ap, pt_b, p0, pt_out, psurf, load)
         
      ELSE
@@ -113,7 +102,7 @@
         WRITE(cyear,'(I4)') iyr1
         WRITE(lunout,*) 'get_aero 3 iyr_in=', iyr_in,'   ',cyear
-        ! get_aero_fromfile returns pt_out allocated and initialized with data for nbr_tsteps month 
-        ! pt_out has dimensions (klon, klev_src, nbr_tsteps)
-        CALL get_aero_fromfile(name_aero, cyear, klev_src, pt_ap, pt_b, p0, pt_out, pt_psurf, pt_load, nbr_tsteps)
+        ! get_aero_fromfile returns pt_out allocated and initialized with data for 12 month 
+        ! pt_out has dimensions (klon, klev_src, 12)
+        CALL get_aero_fromfile(name_aero, cyear, klev_src, pt_ap, pt_b, p0, pt_out, psurf, load)
         
         ! If to read two decades:
@@ -125,7 +114,7 @@
            
            NULLIFY(pt_2)
-           ! get_aero_fromfile returns pt_2 allocated and initialized with data for nbr_tsteps month 
-           ! pt_2 has dimensions (klon, klev_src, nbr_tsteps)
-           CALL get_aero_fromfile(name_aero, cyear, klev_src2, pt_ap, pt_b, p0, pt_2, psurf2, load2, nbr_tsteps)
+           ! get_aero_fromfile returns pt_2 allocated and initialized with data for 12 month 
+           ! pt_2 has dimensions (klon, klev_src, 12)
+           CALL get_aero_fromfile(name_aero, cyear, klev_src2, pt_ap, pt_b, p0, pt_2, psurf2, load2)
            ! Test for same number of vertical levels
            IF (klev_src /= klev_src2) THEN
@@ -135,5 +124,5 @@
            
            ! Linare interpolate to the actual year:
-           DO it=1,nbr_tsteps
+           DO it=1,12
               DO k=1,klev_src
                  DO i = 1, klon
@@ -145,11 +134,11 @@
 
               DO i = 1, klon
-                 pt_psurf(i,it) = &
-                      pt_psurf(i,it) - FLOAT(iyr_in-iyr1)/FLOAT(iyr2-iyr1) * &
-                      (pt_psurf(i,it) - psurf2(i,it))
-
-                 pt_load(i,it) = &
-                      pt_load(i,it) - FLOAT(iyr_in-iyr1)/FLOAT(iyr2-iyr1) * &
-                      (pt_load(i,it) - load2(i,it))
+                 psurf(i,it) = &
+                      psurf(i,it) - FLOAT(iyr_in-iyr1)/FLOAT(iyr2-iyr1) * &
+                      (psurf(i,it) - psurf2(i,it))
+
+                 load(i,it) = &
+                      load(i,it) - FLOAT(iyr_in-iyr1)/FLOAT(iyr2-iyr1) * &
+                      (load(i,it) - load2(i,it))
               END DO
            END DO
@@ -157,6 +146,4 @@
            ! Deallocate pt_2 no more needed
            DEALLOCATE(pt_2)
-           DEALLOCATE(psurf2)
-           DEALLOCATE(load2)
            
         END IF ! lonlyone
@@ -172,7 +159,7 @@
 
 
-  SUBROUTINE get_aero_fromfile(varname, cyr, klev_src, pt_ap, pt_b, p0, pt_year, pt_psurf_out, pt_load_out, nbr_tsteps)
-!****************************************************************************************
-! Read nbr_tsteps month aerosol from file and distribute to local process on physical grid. 
+  SUBROUTINE get_aero_fromfile(varname, cyr, klev_src, pt_ap, pt_b, p0, pt_year, psurf_out, load_out)
+!****************************************************************************************
+! Read 12 month aerosol from file and distribute to local process on physical grid. 
 ! Vertical levels, klev_src, may differ from model levels if new file format.
 !
@@ -210,8 +197,7 @@
     REAL, POINTER, DIMENSION(:)           :: pt_b         ! Pointer for describing the vertical levels      
     REAL                                  :: p0           ! Reference pressure value
-    REAL, POINTER, DIMENSION(:,:,:)       :: pt_year      ! Pointer-variabale from file, nbr_tsteps month, grid : klon,klev_src
-    REAL, POINTER, DIMENSION(:,:)         :: pt_psurf_out    ! Surface pression for nbr_tsteps months
-    REAL, POINTER, DIMENSION(:,:)         :: pt_load_out     ! Aerosol mass load in each column
-    INTEGER                               :: nbr_tsteps ! number of month in file read
+    REAL, POINTER, DIMENSION(:,:,:)       :: pt_year      ! Pointer-variabale from file, 12 month, grid : klon,klev_src
+    REAL, DIMENSION(klon,12), INTENT(OUT) :: psurf_out    ! Surface pression for 12 months
+    REAL, DIMENSION(klon,12), INTENT(OUT) :: load_out     ! Aerosol mass load in each column
 
 ! Local variables
@@ -223,12 +209,12 @@
     REAL                  :: npole, spole
     REAL, ALLOCATABLE, DIMENSION(:,:,:)   :: varmth
-    REAL, ALLOCATABLE, DIMENSION(:,:,:,:) :: varyear       ! Global variable read from file, nbr_tsteps month
-    REAL, ALLOCATABLE, DIMENSION(:,:,:)   :: varyear_glo1D !(klon_glo, klev_src, nbr_tsteps)
+    REAL, ALLOCATABLE, DIMENSION(:,:,:,:) :: varyear       ! Global variable read from file, 12 month
+    REAL, ALLOCATABLE, DIMENSION(:,:,:)   :: varyear_glo1D !(klon_glo, klev_src, 12)
     REAL, ALLOCATABLE, DIMENSION(:)       :: varktmp
 
-    REAL, ALLOCATABLE, DIMENSION(:,:,:)   :: psurf_glo2D
-    REAL, ALLOCATABLE, DIMENSION(:,:)     :: psurf_glo1D
-    REAL, ALLOCATABLE, DIMENSION(:,:,:)   :: load_glo2D
-    REAL, ALLOCATABLE, DIMENSION(:,:)     :: load_glo1D
+    REAL, DIMENSION(iim,jjm+1,12)         :: psurf_glo2D   ! Surface pression for 12 months on dynamics global grid
+    REAL, DIMENSION(klon_glo,12)          :: psurf_glo1D   ! -"- on physical global grid
+    REAL, DIMENSION(iim,jjm+1,12)         :: load_glo2D    ! Load for 12 months on dynamics global grid
+    REAL, DIMENSION(klon_glo,12)          :: load_glo1D    ! -"- on physical global grid
     REAL, DIMENSION(iim,jjm+1)            :: vartmp
     REAL, DIMENSION(iim)                  :: lon_src              ! longitudes in file
@@ -287,25 +273,4 @@
           CALL abort_gcm('get_aero_fromfile', 'latitudes do not correspond between file and model',1)
        END IF
-
-! 1.5) Check number of month in file opened
-!
-!**************************************************************************************************
-       ierr = nf90_inq_dimid(ncid, 'TIME',dimid)
-!       ierr = nf90_inq_dimlen(ncid, dimid, nbr_tsteps)
-       CALL check_err( nf90_inquire_dimension(ncid, dimid, len = nbr_tsteps) )
-       IF (nbr_tsteps /= 12 .AND. nbr_tsteps /= 14) THEN
-         CALL abort_gcm('get_aero_fromfile', 'not the right number of months in aerosol file read',1)
-       ENDIF
-       write(lunout,*)'get_aero_fromfile: ', nbr_tsteps,' months to read from aerosols file'
-       call bcast(nbr_tsteps)
-
-! 1.6) Allocation of some variables once the number of months in the file has been determined
-!
-!**************************************************************************************************
-       ALLOCATE(psurf_glo2D(iim, jjm+1, nbr_tsteps), load_glo2D(iim, jjm+1, nbr_tsteps), stat=ierr)
-       IF (ierr /= 0) CALL abort_gcm('get_aero_fromfile', 'pb in allocation 0.5',1)
-       ALLOCATE(psurf_glo1D(klon_glo, nbr_tsteps), load_glo1D(klon_glo, nbr_tsteps), stat=ierr)
-       IF (ierr /= 0) CALL abort_gcm('get_aero_fromfile', 'pb in allocation 0.5',1)
-
 
 ! 2) Check if old or new file is avalabale.
@@ -336,5 +301,5 @@
        
      ! Allocate variables depending on the number of vertical levels
-       ALLOCATE(varmth(iim, jjm+1, klev_src), varyear(iim, jjm+1, klev_src, nbr_tsteps), stat=ierr)
+       ALLOCATE(varmth(iim, jjm+1, klev_src), varyear(iim, jjm+1, klev_src, 12), stat=ierr)
        IF (ierr /= 0) CALL abort_gcm('get_aero_fromfile', 'pb in allocation 1',1)
 
@@ -358,5 +323,5 @@
           CALL check_err( nf90_get_var(ncid, varid, varyear(:,:,:,:)) )
           
-! ++) Read surface pression, nbr_tsteps month in one variable
+! ++) Read surface pression, 12 month in one variable
 !****************************************************************************************
           ! Get variable id
@@ -398,5 +363,5 @@
 ! ++) Read the aerosol concentration month by month and concatenate to total variable varyear
 !****************************************************************************************
-          DO imth=1, nbr_tsteps
+          DO imth=1, 12
              IF (imth.EQ.1) THEN
                 cvar=TRIM(varname)//'JAN'
@@ -459,5 +424,5 @@
           
           ! Inverse vertical levels for varyear 
-          DO imth=1, nbr_tsteps
+          DO imth=1, 12
              varmth(:,:,:) = varyear(:,:,:,imth) ! use varmth temporarly
              DO k=1, klev_src
@@ -490,5 +455,5 @@
 
 !     - Invert latitudes if necessary
-       DO imth=1, nbr_tsteps
+       DO imth=1, 12
           IF (invert_lat) THEN
 
@@ -535,5 +500,5 @@
        END DO ! imth
        
-       ALLOCATE(varyear_glo1D(klon_glo, klev_src, nbr_tsteps), stat=ierr)
+       ALLOCATE(varyear_glo1D(klon_glo, klev_src, 12), stat=ierr)
        IF (ierr /= 0) CALL abort_gcm('get_aero_fromfile', 'pb in allocation 3',1)
        
@@ -567,18 +532,11 @@
     ! Allocate space for output pointer variable at local process
     IF (ASSOCIATED(pt_year)) DEALLOCATE(pt_year)
-    write(lunout,*)'get_aero_fromfile: klon, ...',klon, klev_src, nbr_tsteps 
-    ALLOCATE(pt_year(klon, klev_src, nbr_tsteps), stat=ierr)
-!    IF (ierr /= 0) CALL abort_gcm('get_aero_fromfile', 'pb in allocation 5.1',1)
-    IF (ASSOCIATED(pt_psurf_out)) DEALLOCATE(pt_psurf_out)
-    ALLOCATE(pt_psurf_out(klon, nbr_tsteps), stat=ierr)
-!    IF (ierr /= 0) CALL abort_gcm('get_aero_fromfile', 'pb in allocation 5.2',1)
-    IF (ASSOCIATED(pt_load_out)) DEALLOCATE(pt_load_out)
-    ALLOCATE(pt_load_out(klon, nbr_tsteps), stat=ierr)
-!    IF (ierr /= 0) CALL abort_gcm('get_aero_fromfile', 'pb in allocation 5.3',1)
+    ALLOCATE(pt_year(klon, klev_src, 12), stat=ierr)
+    IF (ierr /= 0) CALL abort_gcm('get_aero_fromfile', 'pb in allocation 5',1)
 
     ! Scatter global field to local domain at local process
     CALL scatter(varyear_glo1D, pt_year)
-    CALL scatter(psurf_glo1D, pt_psurf_out)
-    CALL scatter(load_glo1D,  pt_load_out)
+    CALL scatter(psurf_glo1D, psurf_out)
+    CALL scatter(load_glo1D,  load_out)
 
 ! 7) Test for negative values
Index: /LMDZ4/branches/LMDZ4-dev/libf/phylmd/readaerosol_interp.F90
===================================================================
--- /LMDZ4/branches/LMDZ4-dev/libf/phylmd/readaerosol_interp.F90	(revision 1269)
+++ /LMDZ4/branches/LMDZ4-dev/libf/phylmd/readaerosol_interp.F90	(revision 1270)
@@ -79,16 +79,11 @@
 
   REAL, DIMENSION(:,:,:), POINTER   :: pt_tmp      ! Pointer allocated in readaerosol
-  REAL, DIMENSION(:,:), POINTER     :: pt_tmp_surf ! Pointer allocated in readaerosol
-  REAL, DIMENSION(:,:), POINTER     :: pt_tmp_load ! Pointer allocated in readaerosol
-  REAL, DIMENSION(:,:), POINTER     :: pt_tmp_pi_surf ! Pointer allocated in readaerosol
-  REAL, DIMENSION(:,:), POINTER     :: pt_tmp_pi_load ! Pointer allocated in readaerosol
   REAL, POINTER, DIMENSION(:), SAVE :: pt_ap, pt_b ! Pointer for describing the vertical levels 
 !$OMP THREADPRIVATE(pt_ap, pt_b)
   INTEGER, SAVE                     :: nbr_tsteps ! number of time steps in file read
   REAL, DIMENSION(14), SAVE         :: month_len, month_start, month_mid
-!$OMP THREADPRIVATE(month_len, month_start, month_mid)
+!$OMP THREADPRIVATE(nbr_tsteps, month_len, month_start, month_mid)
   REAL                              :: jDay
 
-!$OMP THREADPRIVATE(nbr_tsteps)
   LOGICAL            :: lnewday      ! Indicates if first time step at a new day
   LOGICAL            :: OLDNEWDAY
@@ -110,7 +105,7 @@
 
   ! Use phys_cal_mod
-! iday= day_cur
-! iyr = year_cur
-! im  = mth_cur
+  !iday= day_cur
+  !iyr = year_cur
+  !im  = mth_cur
 
   iday = INT(r_day)
@@ -153,9 +148,9 @@
      IF (ierr /= 0) CALL abort_gcm('readaerosol_interp', 'pb in allocation 2',1)
 
-!     ALLOCATE( psurf_year(klon, 12, naero_spc), pi_psurf_year(klon, 12, naero_spc), stat=ierr)
-!     IF (ierr /= 0) CALL abort_gcm('readaerosol_interp', 'pb in allocation 3',1)
-!
-!     ALLOCATE( load_year(klon, 12, naero_spc), pi_load_year(klon, 12, naero_spc), stat=ierr)
-!     IF (ierr /= 0) CALL abort_gcm('readaerosol_interp', 'pb in allocation 4',1)
+     ALLOCATE( psurf_year(klon, 12, naero_spc), pi_psurf_year(klon, 12, naero_spc), stat=ierr)
+     IF (ierr /= 0) CALL abort_gcm('readaerosol_interp', 'pb in allocation 3',1)
+
+     ALLOCATE( load_year(klon, 12, naero_spc), pi_load_year(klon, 12, naero_spc), stat=ierr)
+     IF (ierr /= 0) CALL abort_gcm('readaerosol_interp', 'pb in allocation 4',1)
 
      lnewday=.TRUE.
@@ -172,26 +167,18 @@
   IF ( (first .OR. iday==0) .AND. lnewday ) THEN 
      NULLIFY(pt_tmp)
-     NULLIFY(pt_tmp_surf)
-     NULLIFY(pt_tmp_pi_surf)
-     NULLIFY(pt_tmp_load)
-     NULLIFY(pt_tmp_pi_load)
 
      ! Reading values corresponding to the closest year taking into count the choice of aer_type. 
      ! For aer_type=scenario interpolation between 2 data sets is done in readaerosol.
      CALL readaerosol(name_aero(id_aero), aer_type, iyr, klev_src, pt_ap, pt_b, pt_tmp, &
-          pt_tmp_surf,pt_tmp_load,nbr_tsteps)
+          psurf_year(:,:,id_aero), load_year(:,:,id_aero))
      IF (.NOT. ALLOCATED(var_year)) THEN
-        ALLOCATE(var_year(klon, klev_src, nbr_tsteps, naero_spc), stat=ierr)
-        IF (ierr /= 0) CALL abort_gcm('readaerosol_interp', 'pb in allocation 5.1',1)
-        ALLOCATE( psurf_year(klon, nbr_tsteps, naero_spc), load_year(klon, nbr_tsteps, naero_spc), stat=ierr)
-        IF (ierr /= 0) CALL abort_gcm('readaerosol_interp', 'pb in allocation 5.2',1)
+        ALLOCATE(var_year(klon, klev_src, 12, naero_spc), stat=ierr)
+        IF (ierr /= 0) CALL abort_gcm('readaerosol_interp', 'pb in allocation 5',1)
      END IF
      var_year(:,:,:,id_aero) = pt_tmp(:,:,:)
-     psurf_year(:,:,id_aero) = pt_tmp_surf(:,:)
-     load_year(:,:,id_aero) = pt_tmp_load(:,:)
 
      ! Reading values corresponding to the preindustrial concentrations.
      CALL readaerosol(name_aero(id_aero), 'preind', iyr, pi_klev_src, pt_ap, pt_b, pt_tmp, &
-          pt_tmp_surf,pt_tmp_load,nbr_tsteps)
+          pi_psurf_year(:,:,id_aero), pi_load_year(:,:,id_aero))
 
      ! klev_src must be the same in both files. 
@@ -204,16 +191,12 @@
 
      IF (.NOT. ALLOCATED(pi_var_year)) THEN
-        ALLOCATE(pi_var_year(klon, klev_src, nbr_tsteps, naero_spc), stat=ierr)
-        IF (ierr /= 0) CALL abort_gcm('readaerosol_interp', 'pb in allocation 6.1',1)
-        ALLOCATE( pi_psurf_year(klon, nbr_tsteps, naero_spc), pi_load_year(klon, nbr_tsteps, naero_spc), stat=ierr)
-        IF (ierr /= 0) CALL abort_gcm('readaerosol_interp', 'pb in allocation 6.2',1)
+        ALLOCATE(pi_var_year(klon, klev_src, 12, naero_spc), stat=ierr)
+        IF (ierr /= 0) CALL abort_gcm('readaerosol_interp', 'pb in allocation 6',1)
      END IF
      pi_var_year(:,:,:,id_aero) = pt_tmp(:,:,:)
-     pi_psurf_year(:,:,id_aero) = pt_tmp_surf(:,:)
-     pi_load_year(:,:,id_aero) = pt_tmp_load(:,:)
     
      IF (debug) THEN
-        CALL writefield_phy('var_year_first',var_year(:,:,1,id_aero),klev_src)
-        CALL writefield_phy('var_year_last',var_year(:,:,nbr_tsteps,id_aero),klev_src)
+        CALL writefield_phy('var_year_jan',var_year(:,:,1,id_aero),klev_src)
+        CALL writefield_phy('var_year_dec',var_year(:,:,12,id_aero),klev_src)
         CALL writefield_phy('psurf_src',psurf_year(:,:,id_aero),1)
         CALL writefield_phy('pi_psurf_src',pi_psurf_year(:,:,id_aero),1)
@@ -224,6 +207,4 @@
      ! Pointer no more useful, deallocate. 
      DEALLOCATE(pt_tmp)
-     DEALLOCATE(pt_tmp_surf)
-     DEALLOCATE(pt_tmp_load)
 
      ! Test if vertical interpolation will be needed.
@@ -259,8 +240,4 @@
      month_mid(:) = month_start (:) + month_len(:)/2.
 
-     write(55,*)'month_len = ',month_len
-     write(55,*)'month_start = ',month_start
-     write(55,*)'month_mid = ',month_mid
-       
   END IF  ! IF ( (first .OR. iday==0) .AND. lnewday ) THEN 
   
@@ -277,4 +254,5 @@
 !****************************************************************************************
     ! Find which months and days to use for time interpolation
+     nbr_tsteps = 12
      IF (nbr_tsteps == 12) then
        IF (jDay < month_mid(im+1)) THEN
@@ -313,26 +291,4 @@
      ENDIF
 
-!     ! Find which months and days to use for time interpolation
-!     IF (iday < im*30-15) THEN
-!        ! in the first half of the month use month before and actual month
-!        im2=im-1
-!        day2 = im2*30-15
-!        day1 = im2*30+15
-!        IF (im2 <= 0) THEN 
-!           ! the month is january, thus the month before december
-!           im2=12
-!        END IF
-!     ELSE
-!        ! the second half of the month
-!        im2=im+1
-!        IF (im2 > 12) THEN
-!           ! the month is december, the following thus january
-!           im2=1
-!        ENDIF
-!        day2 = im*30-15
-!        day1 = im*30+15
-!     END IF
-!      jDay = jDay+1
-!      write(55,*)'iday, jDay, im, im2, day1, day2 = ',iday, jDay, im, im2, day1, day2, nbr_tsteps
  
      ! Time interpolation, still on vertical source grid
