Index: LMDZ5/branches/testing/libf/phylmd/rrtm/read_rsun_rrtm.F90
===================================================================
--- LMDZ5/branches/testing/libf/phylmd/rrtm/read_rsun_rrtm.F90	(revision 2720)
+++ LMDZ5/branches/testing/libf/phylmd/rrtm/read_rsun_rrtm.F90	(revision 2729)
@@ -56,7 +56,12 @@
        ENDIF
 
-       IF (size(time).NE.year_len) THEN 
+!--test if time is different from year_len but allow a mismatch of 1 day
+       IF (size(time).NE.year_len.AND.size(time).NE.year_len+1) THEN
          PRINT *,'read_rsun_rrtm time <> year_len = ', size(time), year_len
          CALL abort_physic('read_rsun_rrtm','time dim should be the number of days in year',1)
+       ENDIF
+!--warning only if forcing file has 366 days but year_len has only 365
+       IF (size(time).EQ.year_len+1) THEN 
+         PRINT *,'Warning read_rsun_rrtm uses a leap year rsun for a noleap year'
        ENDIF
 
@@ -91,5 +96,5 @@
 
 !--copy 
-      RSUN(:)=SSI_FRAC(:,day_cur)
+      RSUN(1:NSW)=SSI_FRAC(:,day_cur)
       solaire=TSI(day_cur)
 
Index: LMDZ5/branches/testing/libf/phylmd/rrtm/readaerosolstrato2_rrtm.F90
===================================================================
--- LMDZ5/branches/testing/libf/phylmd/rrtm/readaerosolstrato2_rrtm.F90	(revision 2720)
+++ LMDZ5/branches/testing/libf/phylmd/rrtm/readaerosolstrato2_rrtm.F90	(revision 2729)
@@ -81,184 +81,193 @@
 
 !--only root reads the data
-    IF (is_mpi_root.AND.is_omp_root) THEN
+      IF (is_mpi_root.AND.is_omp_root) THEN
 
 !--check mth_cur
-    IF (mth_cur.LT.1.OR.mth_cur.GT.12) THEN
-      print *,'probleme avec le mois dans readaerosolstrat =', mth_cur
-    ENDIF
+        IF (mth_cur.LT.1.OR.mth_cur.GT.12) THEN
+          print *,'probleme avec le mois dans readaerosolstrat =', mth_cur
+        ENDIF
 
 !--initialize n_lon as input data is 2D (lat-alt) only
-    n_lon = nbp_lon
+        n_lon = nbp_lon
 
 !--Starts with SW optical properties
 
-    CALL nf95_open("tauswstrat.2D.nc", nf90_nowrite, ncid_in)
-
-    CALL nf95_inq_varid(ncid_in, "LEV", varid)
-    CALL nf95_gw_var(ncid_in, varid, lev)
-    n_lev = size(lev)
-    IF (n_lev.NE.klev) THEN 
-       abort_message='Le nombre de niveaux n est pas egal a klev'
-       CALL abort_physic(modname,abort_message,1)
-    ENDIF
-
-    CALL nf95_inq_varid(ncid_in, "LAT", varid)
-    CALL nf95_gw_var(ncid_in, varid, latitude)
-    n_lat = size(latitude)
-    IF (n_lat.NE.nbp_lat) THEN 
-       print *, 'latitude=', n_lat, nbp_lat
-       abort_message='Le nombre de lat n est pas egal a nbp_lat'
-       CALL abort_physic(modname,abort_message,1)
-    ENDIF
-
-    CALL nf95_inq_varid(ncid_in, "TIME", varid)
-    CALL nf95_gw_var(ncid_in, varid, time)
-    n_month = size(time)
-    IF (n_month.NE.12) THEN 
-       abort_message='Le nombre de month n est pas egal a 12'
-       CALL abort_physic(modname,abort_message,1)
-    ENDIF
-
-    CALL nf95_inq_varid(ncid_in, "WAV", varid)
-    CALL nf95_gw_var(ncid_in, varid, wav)
-    n_wav = size(wav)
-    print *, 'WAV aerosol strato=', n_wav, wav
-    IF (n_wav.NE.NSW) THEN 
-       abort_message='Le nombre de wav n est pas egal a NSW'
-       CALL abort_physic(modname,abort_message,1)
-    ENDIF
-
-    ALLOCATE(tauaerstrat(n_lat, n_lev, n_wav, n_month))
-    ALLOCATE(pizaerstrat(n_lat, n_lev, n_wav, n_month))
-    ALLOCATE(cgaerstrat(n_lat, n_lev, n_wav, n_month))
-
-    ALLOCATE(tauaerstrat_mois(n_lon, n_lat, n_lev, n_wav))
-    ALLOCATE(pizaerstrat_mois(n_lon, n_lat, n_lev, n_wav))
-    ALLOCATE(cgaerstrat_mois(n_lon, n_lat, n_lev, n_wav))
-
-    ALLOCATE(tauaerstrat_mois_glo(klon_glo, n_lev, n_wav))
-    ALLOCATE(pizaerstrat_mois_glo(klon_glo, n_lev, n_wav))
-    ALLOCATE(cgaerstrat_mois_glo(klon_glo, n_lev, n_wav))
+        CALL nf95_open("tauswstrat.2D.nc", nf90_nowrite, ncid_in)
+
+        CALL nf95_inq_varid(ncid_in, "LEV", varid)
+        CALL nf95_gw_var(ncid_in, varid, lev)
+        n_lev = size(lev)
+        IF (n_lev.NE.klev) THEN 
+           abort_message='Le nombre de niveaux n est pas egal a klev'
+           CALL abort_physic(modname,abort_message,1)
+        ENDIF
+
+        CALL nf95_inq_varid(ncid_in, "LAT", varid)
+        CALL nf95_gw_var(ncid_in, varid, latitude)
+        n_lat = size(latitude)
+        IF (n_lat.NE.nbp_lat) THEN 
+           print *, 'latitude=', n_lat, nbp_lat
+           abort_message='Le nombre de lat n est pas egal a nbp_lat'
+           CALL abort_physic(modname,abort_message,1)
+        ENDIF
+
+        CALL nf95_inq_varid(ncid_in, "TIME", varid)
+        CALL nf95_gw_var(ncid_in, varid, time)
+        n_month = size(time)
+        IF (n_month.NE.12) THEN 
+           abort_message='Le nombre de month n est pas egal a 12'
+           CALL abort_physic(modname,abort_message,1)
+        ENDIF
+
+        CALL nf95_inq_varid(ncid_in, "WAV", varid)
+        CALL nf95_gw_var(ncid_in, varid, wav)
+        n_wav = size(wav)
+        print *, 'WAV aerosol strato=', n_wav, wav
+        IF (n_wav.NE.NSW) THEN 
+           abort_message='Le nombre de wav n est pas egal a NSW'
+           CALL abort_physic(modname,abort_message,1)
+        ENDIF
+
+        ALLOCATE(tauaerstrat(n_lat, n_lev, n_wav, n_month))
+        ALLOCATE(pizaerstrat(n_lat, n_lev, n_wav, n_month))
+        ALLOCATE(cgaerstrat(n_lat, n_lev, n_wav, n_month))
+
+        ALLOCATE(tauaerstrat_mois(n_lon, n_lat, n_lev, n_wav))
+        ALLOCATE(pizaerstrat_mois(n_lon, n_lat, n_lev, n_wav))
+        ALLOCATE(cgaerstrat_mois(n_lon, n_lat, n_lev, n_wav))
+
+        ALLOCATE(tauaerstrat_mois_glo(klon_glo, n_lev, n_wav))
+        ALLOCATE(pizaerstrat_mois_glo(klon_glo, n_lev, n_wav))
+        ALLOCATE(cgaerstrat_mois_glo(klon_glo, n_lev, n_wav))
 
 !--reading stratospheric aerosol tau per layer
-    CALL nf95_inq_varid(ncid_in, "TAU_SUN", varid)
-    ncerr = nf90_get_var(ncid_in, varid, tauaerstrat)
-    print *,'code erreur readaerosolstrato=', ncerr, varid
+        CALL nf95_inq_varid(ncid_in, "TAU_SUN", varid)
+        ncerr = nf90_get_var(ncid_in, varid, tauaerstrat)
+        print *,'code erreur readaerosolstrato=', ncerr, varid
 
 !--reading stratospheric aerosol omega per layer
-    CALL nf95_inq_varid(ncid_in, "OME_SUN", varid)
-    ncerr = nf90_get_var(ncid_in, varid, pizaerstrat)
-    print *,'code erreur readaerosolstrato=', ncerr, varid
+        CALL nf95_inq_varid(ncid_in, "OME_SUN", varid)
+        ncerr = nf90_get_var(ncid_in, varid, pizaerstrat)
+        print *,'code erreur readaerosolstrato=', ncerr, varid
 
 !--reading stratospheric aerosol g per layer
-    CALL nf95_inq_varid(ncid_in, "GGG_SUN", varid)
-    ncerr = nf90_get_var(ncid_in, varid, cgaerstrat)
-    print *,'code erreur readaerosolstrato sw=', ncerr, varid
-
-    CALL nf95_close(ncid_in)
+        CALL nf95_inq_varid(ncid_in, "GGG_SUN", varid)
+        ncerr = nf90_get_var(ncid_in, varid, cgaerstrat)
+        print *,'code erreur readaerosolstrato sw=', ncerr, varid
+
+        CALL nf95_close(ncid_in)
 
 !--select the correct month
 !--and copy into 1st longitude
-    tauaerstrat_mois(1,:,:,:) = tauaerstrat(:,:,:,mth_cur)
-    pizaerstrat_mois(1,:,:,:) = pizaerstrat(:,:,:,mth_cur)
-    cgaerstrat_mois(1,:,:,:)  = cgaerstrat(:,:,:,mth_cur)
+        tauaerstrat_mois(1,:,:,:) = tauaerstrat(:,:,:,mth_cur)
+        pizaerstrat_mois(1,:,:,:) = pizaerstrat(:,:,:,mth_cur)
+        cgaerstrat_mois(1,:,:,:)  = cgaerstrat(:,:,:,mth_cur)
 
 !--copy longitudes
-    DO i=2, n_lon
-     tauaerstrat_mois(i,:,:,:) = tauaerstrat_mois(1,:,:,:)
-     pizaerstrat_mois(i,:,:,:) = pizaerstrat_mois(1,:,:,:)
-      cgaerstrat_mois(i,:,:,:)  = cgaerstrat_mois(1,:,:,:)
-    ENDDO
+        DO i=2, n_lon
+         tauaerstrat_mois(i,:,:,:) = tauaerstrat_mois(1,:,:,:)
+         pizaerstrat_mois(i,:,:,:) = pizaerstrat_mois(1,:,:,:)
+         cgaerstrat_mois(i,:,:,:)  = cgaerstrat_mois(1,:,:,:)
+        ENDDO
 
 !---reduce to a klon_glo grid 
-    DO band=1, NSW
-      CALL grid2dTo1d_glo(tauaerstrat_mois(:,:,:,band),tauaerstrat_mois_glo(:,:,band))
-      CALL grid2dTo1d_glo(pizaerstrat_mois(:,:,:,band),pizaerstrat_mois_glo(:,:,band))
-      CALL grid2dTo1d_glo(cgaerstrat_mois(:,:,:,band),cgaerstrat_mois_glo(:,:,band))
-    ENDDO
+        DO band=1, NSW
+          CALL grid2dTo1d_glo(tauaerstrat_mois(:,:,:,band),tauaerstrat_mois_glo(:,:,band))
+          CALL grid2dTo1d_glo(pizaerstrat_mois(:,:,:,band),pizaerstrat_mois_glo(:,:,band))
+          CALL grid2dTo1d_glo(cgaerstrat_mois(:,:,:,band),cgaerstrat_mois_glo(:,:,band))
+        ENDDO
 
 !--Now LW optical properties
 !
-    CALL nf95_open("taulwstrat.2D.nc", nf90_nowrite, ncid_in)
-
-    CALL nf95_inq_varid(ncid_in, "LEV", varid)
-    CALL nf95_gw_var(ncid_in, varid, lev)
-    n_lev = size(lev)
-    IF (n_lev.NE.klev) THEN 
-       abort_message='Le nombre de niveaux n est pas egal a klev'
-       CALL abort_physic(modname,abort_message,1)
-    ENDIF
-
-    CALL nf95_inq_varid(ncid_in, "LAT", varid)
-    CALL nf95_gw_var(ncid_in, varid, latitude)
-    n_lat = size(latitude)
-    IF (n_lat.NE.nbp_lat) THEN 
-       abort_message='Le nombre de lat n est pas egal a nbp_lat'
-       CALL abort_physic(modname,abort_message,1)
-    ENDIF
-
-    CALL nf95_inq_varid(ncid_in, "TIME", varid)
-    CALL nf95_gw_var(ncid_in, varid, time)
-    n_month = size(time)
-    IF (n_month.NE.12) THEN 
-       abort_message='Le nombre de month n est pas egal a 12'
-       CALL abort_physic(modname,abort_message,1)
-    ENDIF
-
-    CALL nf95_inq_varid(ncid_in, "WAV", varid)
-    CALL nf95_gw_var(ncid_in, varid, wav)
-    n_wav = size(wav)
-    print *, 'WAV aerosol strato=', n_wav, wav
-    IF (n_wav.NE.NLW) THEN 
-       abort_message='Le nombre de wav n est pas egal a NLW'
-       CALL abort_physic(modname,abort_message,1)
-    ENDIF
-
-    ALLOCATE(taulwaerstrat(n_lat, n_lev, n_wav, n_month))
-    ALLOCATE(taulwaerstrat_mois(n_lon, n_lat, n_lev, n_wav))
-    ALLOCATE(taulwaerstrat_mois_glo(klon_glo, n_lev, n_wav))
+        CALL nf95_open("taulwstrat.2D.nc", nf90_nowrite, ncid_in)
+
+        CALL nf95_inq_varid(ncid_in, "LEV", varid)
+        CALL nf95_gw_var(ncid_in, varid, lev)
+        n_lev = size(lev)
+        IF (n_lev.NE.klev) THEN 
+           abort_message='Le nombre de niveaux n est pas egal a klev'
+           CALL abort_physic(modname,abort_message,1)
+        ENDIF
+
+        CALL nf95_inq_varid(ncid_in, "LAT", varid)
+        CALL nf95_gw_var(ncid_in, varid, latitude)
+        n_lat = size(latitude)
+        IF (n_lat.NE.nbp_lat) THEN 
+           abort_message='Le nombre de lat n est pas egal a nbp_lat'
+           CALL abort_physic(modname,abort_message,1)
+        ENDIF
+
+        CALL nf95_inq_varid(ncid_in, "TIME", varid)
+        CALL nf95_gw_var(ncid_in, varid, time)
+        n_month = size(time)
+        IF (n_month.NE.12) THEN 
+           abort_message='Le nombre de month n est pas egal a 12'
+           CALL abort_physic(modname,abort_message,1)
+        ENDIF
+
+        CALL nf95_inq_varid(ncid_in, "WAV", varid)
+        CALL nf95_gw_var(ncid_in, varid, wav)
+        n_wav = size(wav)
+        print *, 'WAV aerosol strato=', n_wav, wav
+        IF (n_wav.NE.NLW) THEN 
+           abort_message='Le nombre de wav n est pas egal a NLW'
+           CALL abort_physic(modname,abort_message,1)
+        ENDIF
+
+        ALLOCATE(taulwaerstrat(n_lat, n_lev, n_wav, n_month))
+        ALLOCATE(taulwaerstrat_mois(n_lon, n_lat, n_lev, n_wav))
+        ALLOCATE(taulwaerstrat_mois_glo(klon_glo, n_lev, n_wav))
 
 !--reading stratospheric aerosol lw tau per layer
-    CALL nf95_inq_varid(ncid_in, "TAU_EAR", varid)
-    ncerr = nf90_get_var(ncid_in, varid, taulwaerstrat)
-    print *,'code erreur readaerosolstrato lw=', ncerr, varid
-
-    CALL nf95_close(ncid_in)
+        CALL nf95_inq_varid(ncid_in, "TAU_EAR", varid)
+        ncerr = nf90_get_var(ncid_in, varid, taulwaerstrat)
+        print *,'code erreur readaerosolstrato lw=', ncerr, varid
+
+        CALL nf95_close(ncid_in)
 
 !--select the correct month
 !--and copy into 1st longitude
-    taulwaerstrat_mois(1,:,:,:) = taulwaerstrat(:,:,:,mth_cur)
+        taulwaerstrat_mois(1,:,:,:) = taulwaerstrat(:,:,:,mth_cur)
 !--copy longitudes
-    DO i=2, n_lon
-      taulwaerstrat_mois(i,:,:,:) = taulwaerstrat_mois(1,:,:,:)
-    ENDDO
+        DO i=2, n_lon
+          taulwaerstrat_mois(i,:,:,:) = taulwaerstrat_mois(1,:,:,:)
+        ENDDO
 
 !---reduce to a klon_glo grid 
-    DO band=1, NLW
-      CALL grid2dTo1d_glo(taulwaerstrat_mois(:,:,:,band),taulwaerstrat_mois_glo(:,:,band))
-    ENDDO
-
-    ENDIF !--is_mpi_root and is_omp_root
+        DO band=1, NLW
+          CALL grid2dTo1d_glo(taulwaerstrat_mois(:,:,:,band),taulwaerstrat_mois_glo(:,:,band))
+        ENDDO
+
+      ELSE !--proc other than mpi_root and omp_root
+           !--dummy allocation needed for debug mode
+
+        ALLOCATE(tauaerstrat_mois_glo(1,1,1))
+        ALLOCATE(pizaerstrat_mois_glo(1,1,1))
+        ALLOCATE(cgaerstrat_mois_glo(1,1,1))
+        ALLOCATE(taulwaerstrat_mois_glo(1,1,1))
+
+      ENDIF !--is_mpi_root and is_omp_root
 
 !$OMP BARRIER
 
 !--keep memory of previous month
-    mth_pre=mth_cur
+      mth_pre=mth_cur
 
 !--scatter on all proc
-    CALL scatter(tauaerstrat_mois_glo,tau_aer_strat)
-    CALL scatter(pizaerstrat_mois_glo,piz_aer_strat)
-    CALL scatter(cgaerstrat_mois_glo,cg_aer_strat)
-    CALL scatter(taulwaerstrat_mois_glo,taulw_aer_strat)
-
-    IF (is_mpi_root.AND.is_omp_root) THEN
-!
-    DEALLOCATE(tauaerstrat, pizaerstrat, cgaerstrat)
-    DEALLOCATE(tauaerstrat_mois, pizaerstrat_mois, cgaerstrat_mois)
-    DEALLOCATE(tauaerstrat_mois_glo,pizaerstrat_mois_glo,cgaerstrat_mois_glo)
-
-    DEALLOCATE(taulwaerstrat,taulwaerstrat_mois,taulwaerstrat_mois_glo)
-!
-    ENDIF !--is_mpi_root and is_omp_root
+      CALL scatter(tauaerstrat_mois_glo,tau_aer_strat)
+      CALL scatter(pizaerstrat_mois_glo,piz_aer_strat)
+      CALL scatter(cgaerstrat_mois_glo,cg_aer_strat)
+      CALL scatter(taulwaerstrat_mois_glo,taulw_aer_strat)
+
+      IF (is_mpi_root.AND.is_omp_root) THEN
+!
+        DEALLOCATE(tauaerstrat, pizaerstrat, cgaerstrat)
+        DEALLOCATE(tauaerstrat_mois, pizaerstrat_mois, cgaerstrat_mois)
+        DEALLOCATE(taulwaerstrat,taulwaerstrat_mois)
+!
+      ENDIF !--is_mpi_root and is_omp_root
+
+      DEALLOCATE(tauaerstrat_mois_glo,pizaerstrat_mois_glo,cgaerstrat_mois_glo)
+      DEALLOCATE(taulwaerstrat_mois_glo)
 
 !$OMP BARRIER
@@ -282,27 +291,27 @@
 !--weighted average for cg, piz and tau, adding strat aerosols on top of tropospheric ones
     DO band=1, NSW
-    WHERE (stratomask.GT.0.999999)
+      WHERE (stratomask.GT.0.999999)
 !--anthropogenic aerosols bands 1 to NSW 
-    cg_aero_sw_rrtm(:,:,2,band)  = ( cg_aero_sw_rrtm(:,:,2,band)*piz_aero_sw_rrtm(:,:,2,band)*tau_aero_sw_rrtm(:,:,2,band) + &
-                                     cg_aer_strat(:,:,band)*piz_aer_strat(:,:,band)*tau_aer_strat(:,:,band) ) /              &
-                                MAX( piz_aero_sw_rrtm(:,:,2,band)*tau_aero_sw_rrtm(:,:,2,band) +                             &
-                                     piz_aer_strat(:,:,band)*tau_aer_strat(:,:,band), 1.e-15 )
-    piz_aero_sw_rrtm(:,:,2,band) = ( piz_aero_sw_rrtm(:,:,2,band)*tau_aero_sw_rrtm(:,:,2,band) +                             &
-                                     piz_aer_strat(:,:,band)*tau_aer_strat(:,:,band) ) /                                     &
-                                MAX( tau_aero_sw_rrtm(:,:,2,band) + tau_aer_strat(:,:,band), 1.e-15 )
-    tau_aero_sw_rrtm(:,:,2,band)  = tau_aero_sw_rrtm(:,:,2,band) + tau_aer_strat(:,:,band)
+        cg_aero_sw_rrtm(:,:,2,band)  = ( cg_aero_sw_rrtm(:,:,2,band)*piz_aero_sw_rrtm(:,:,2,band)*tau_aero_sw_rrtm(:,:,2,band) + &
+                                         cg_aer_strat(:,:,band)*piz_aer_strat(:,:,band)*tau_aer_strat(:,:,band) ) /              &
+                                    MAX( piz_aero_sw_rrtm(:,:,2,band)*tau_aero_sw_rrtm(:,:,2,band) +                             &
+                                         piz_aer_strat(:,:,band)*tau_aer_strat(:,:,band), 1.e-15 )
+        piz_aero_sw_rrtm(:,:,2,band) = ( piz_aero_sw_rrtm(:,:,2,band)*tau_aero_sw_rrtm(:,:,2,band) +                             &
+                                         piz_aer_strat(:,:,band)*tau_aer_strat(:,:,band) ) /                                     &
+                                    MAX( tau_aero_sw_rrtm(:,:,2,band) + tau_aer_strat(:,:,band), 1.e-15 )
+        tau_aero_sw_rrtm(:,:,2,band)  = tau_aero_sw_rrtm(:,:,2,band) + tau_aer_strat(:,:,band)
 !--natural aerosols bands 1 to NSW
-    cg_aero_sw_rrtm(:,:,1,band)  = ( cg_aero_sw_rrtm(:,:,1,band)*piz_aero_sw_rrtm(:,:,1,band)*tau_aero_sw_rrtm(:,:,1,band) + &
-                                     cg_aer_strat(:,:,band)*piz_aer_strat(:,:,band)*tau_aer_strat(:,:,band) ) /              &
-                                MAX( piz_aero_sw_rrtm(:,:,1,band)*tau_aero_sw_rrtm(:,:,1,band) +                             &
-                                     piz_aer_strat(:,:,band)*tau_aer_strat(:,:,band), 1.e-15 )
-    piz_aero_sw_rrtm(:,:,1,band) = ( piz_aero_sw_rrtm(:,:,1,band)*tau_aero_sw_rrtm(:,:,1,band) +                             &
-                                     piz_aer_strat(:,:,band)*tau_aer_strat(:,:,band) ) /                                     &
-                                MAX( tau_aero_sw_rrtm(:,:,1,band) + tau_aer_strat(:,:,band), 1.e-15 )
-    tau_aero_sw_rrtm(:,:,1,band)  = tau_aero_sw_rrtm(:,:,1,band) + tau_aer_strat(:,:,band)
+        cg_aero_sw_rrtm(:,:,1,band)  = ( cg_aero_sw_rrtm(:,:,1,band)*piz_aero_sw_rrtm(:,:,1,band)*tau_aero_sw_rrtm(:,:,1,band) + &
+                                         cg_aer_strat(:,:,band)*piz_aer_strat(:,:,band)*tau_aer_strat(:,:,band) ) /              &
+                                    MAX( piz_aero_sw_rrtm(:,:,1,band)*tau_aero_sw_rrtm(:,:,1,band) +                             &
+                                         piz_aer_strat(:,:,band)*tau_aer_strat(:,:,band), 1.e-15 )
+        piz_aero_sw_rrtm(:,:,1,band) = ( piz_aero_sw_rrtm(:,:,1,band)*tau_aero_sw_rrtm(:,:,1,band) +                             &
+                                         piz_aer_strat(:,:,band)*tau_aer_strat(:,:,band) ) /                                     &
+                                    MAX( tau_aero_sw_rrtm(:,:,1,band) + tau_aer_strat(:,:,band), 1.e-15 )
+        tau_aero_sw_rrtm(:,:,1,band)  = tau_aero_sw_rrtm(:,:,1,band) + tau_aer_strat(:,:,band)
 !--no stratospheric aerosol in index 1 for these tests
-!    cg_aero_sw_rrtm(:,:,1,band)  =  cg_aero_sw_rrtm(:,:,1,band)
-!    piz_aero_sw_rrtm(:,:,1,band)  = piz_aero_sw_rrtm(:,:,1,band)
-!    tau_aero_sw_rrtm(:,:,1,band)  = tau_aero_sw_rrtm(:,:,1,band)
+!        cg_aero_sw_rrtm(:,:,1,band)  =  cg_aero_sw_rrtm(:,:,1,band)
+!        piz_aero_sw_rrtm(:,:,1,band)  = piz_aero_sw_rrtm(:,:,1,band)
+!        tau_aero_sw_rrtm(:,:,1,band)  = tau_aero_sw_rrtm(:,:,1,band)
     ENDWHERE
     ENDDO
@@ -322,10 +331,10 @@
 
     DO band=1, NLW
-    WHERE (stratomask.GT.0.999999)
-    tau_aero_lw_rrtm(:,:,2,band)  = tau_aero_lw_rrtm(:,:,2,band) + taulw_aer_strat(:,:,band)
-    tau_aero_lw_rrtm(:,:,1,band)  = tau_aero_lw_rrtm(:,:,1,band) + taulw_aer_strat(:,:,band)
+      WHERE (stratomask.GT.0.999999)
+        tau_aero_lw_rrtm(:,:,2,band)  = tau_aero_lw_rrtm(:,:,2,band) + taulw_aer_strat(:,:,band)
+        tau_aero_lw_rrtm(:,:,1,band)  = tau_aero_lw_rrtm(:,:,1,band) + taulw_aer_strat(:,:,band)
 !--no stratospheric aerosols in index 1 for these tests
 !    tau_aero_lw_rrtm(:,:,1,band)  = tau_aero_lw_rrtm(:,:,1,band) 
-    ENDWHERE
+      ENDWHERE
     ENDDO
 
