Index: LMDZ4/branches/LMDZ4-dev/libf/phylmd/ecribin.F
===================================================================
--- LMDZ4/branches/LMDZ4-dev/libf/phylmd/ecribin.F	(revision 1218)
+++ LMDZ4/branches/LMDZ4-dev/libf/phylmd/ecribin.F	(revision 1220)
@@ -94,6 +94,6 @@
       SUBROUTINE ecriture(nunit, r8, n)
       INTEGER nunit, n, i
-      REAL*8 r8(n)
-      REAL*4 r4(n)
+      REAL(KIND=8) r8(n)
+      REAL r4(n)
       DO i = 1, n
          r4(i) = r8(i)
Index: LMDZ4/branches/LMDZ4-dev/libf/phylmd/initphysto.F
===================================================================
--- LMDZ4/branches/LMDZ4-dev/libf/phylmd/initphysto.F	(revision 1218)
+++ LMDZ4/branches/LMDZ4-dev/libf/phylmd/initphysto.F	(revision 1220)
@@ -57,5 +57,5 @@
 C   Arguments
       character*(*) infile
-      integer*4 nhoriid, i
+      integer nhoriid, i
       real tstep, t_ops, t_wrt
       integer fileid, filevid
Index: LMDZ4/branches/LMDZ4-dev/libf/phylmd/newmicro.F
===================================================================
--- LMDZ4/branches/LMDZ4-dev/libf/phylmd/newmicro.F	(revision 1218)
+++ LMDZ4/branches/LMDZ4-dev/libf/phylmd/newmicro.F	(revision 1220)
@@ -399,16 +399,16 @@
             DO i = 1, klon
                zclear(i)=zclear(i)*(1.-MAX(pclc(i,k),zcloud(i)))
-     &              /(1.-MIN(zcloud(i),1.-ZEPSEC))
+     &              /(1.-MIN(real(zcloud(i), kind=8),1.-ZEPSEC))
                pct(i)=1.-zclear(i) 
                IF (pplay(i,k).LE.cetahb*paprs(i,1)) THEN
                   pch(i) = pch(i)*(1.-MAX(pclc(i,k),zcloud(i)))
-     &                 /(1.-MIN(zcloud(i),1.-ZEPSEC))
+     &                 /(1.-MIN(real(zcloud(i), kind=8),1.-ZEPSEC))
                ELSE IF (pplay(i,k).GT.cetahb*paprs(i,1) .AND.
      &                 pplay(i,k).LE.cetamb*paprs(i,1)) THEN
                   pcm(i) = pcm(i)*(1.-MAX(pclc(i,k),zcloud(i)))
-     &                 /(1.-MIN(zcloud(i),1.-ZEPSEC))
+     &                 /(1.-MIN(real(zcloud(i), kind=8),1.-ZEPSEC))
                ELSE IF (pplay(i,k).GT.cetamb*paprs(i,1)) THEN 
                   pcl(i) = pcl(i)*(1.-MAX(pclc(i,k),zcloud(i)))
-     &                 /(1.-MIN(zcloud(i),1.-ZEPSEC))
+     &                 /(1.-MIN(real(zcloud(i), kind=8),1.-ZEPSEC))
                endif
                zcloud(i)=pclc(i,k)
Index: LMDZ4/branches/LMDZ4-dev/libf/phylmd/open_climoz_m.F90
===================================================================
--- LMDZ4/branches/LMDZ4-dev/libf/phylmd/open_climoz_m.F90	(revision 1218)
+++ LMDZ4/branches/LMDZ4-dev/libf/phylmd/open_climoz_m.F90	(revision 1220)
@@ -10,5 +10,5 @@
     ! This procedure should be called once per "gcm" run, by a single
     ! thread of each MPI process.
-    ! The root process opens "climoz_LMDZ.nc", reads the pressure
+    ! The root MPI process opens "climoz_LMDZ.nc", reads the pressure
     ! levels and broadcasts them to the other processes.
 
Index: LMDZ4/branches/LMDZ4-dev/libf/phylmd/ozonecm_m.F90
===================================================================
--- LMDZ4/branches/LMDZ4-dev/libf/phylmd/ozonecm_m.F90	(revision 1218)
+++ LMDZ4/branches/LMDZ4-dev/libf/phylmd/ozonecm_m.F90	(revision 1220)
@@ -6,5 +6,5 @@
 contains
 
-  function ozonecm(rjour,rlat,paprs)
+  function ozonecm(rlat, paprs, rjour)
 
     ! The ozone climatology is based on an analytic formula which fits the
@@ -24,7 +24,7 @@
     use assert_m, only: assert
 
-    REAL, INTENT (IN) :: rjour
     REAL, INTENT (IN) :: rlat(:) ! (klon)
     REAL, INTENT (IN) :: paprs(:, :) ! (klon,klev+1)
+    REAL, INTENT (IN) :: rjour
 
     REAL ozonecm(klon,klev)
Index: LMDZ4/branches/LMDZ4-dev/libf/phylmd/physiq.F
===================================================================
--- LMDZ4/branches/LMDZ4-dev/libf/phylmd/physiq.F	(revision 1218)
+++ LMDZ4/branches/LMDZ4-dev/libf/phylmd/physiq.F	(revision 1220)
@@ -29,5 +29,5 @@
       USE fonte_neige_mod, ONLY  : fonte_neige_get_vars
       USE phys_output_mod
-      use open_climoz_m, only: open_climoz ! ozone climatology
+      use open_climoz_m, only: open_climoz ! ozone climatology from a file
       use regr_pr, only: regr_pr_av
       use netcdf95, only: nf95_close
@@ -284,5 +284,4 @@
       real T2STD(klon,nlevSTD)
 c
-#include "radepsi.h"
 #include "radopt.h"
 c
@@ -743,5 +742,5 @@
       EXTERNAL hgardfou  ! verifier les temperatures
       EXTERNAL nuage     ! calculer les proprietes radiatives
-      EXTERNAL o3cm      ! initialiser l'ozone
+CC      EXTERNAL o3cm      ! initialiser l'ozone
       EXTERNAL orbite    ! calculer l'orbite terrestre
       EXTERNAL phyetat0  ! lire l'etat initial de la physique
@@ -982,5 +981,5 @@
       REAL zx_tmp_fiNC(klon,nlevSTD) 
 c#endif
-      REAL*8 zx_tmp2_fi3d(klon,klev) ! variable temporaire pour champs 3D 
+      REAL(KIND=8) zx_tmp2_fi3d(klon,klev) ! variable temporaire pour champs 3D 
       REAL zx_tmp_2d(iim,jjmp1), zx_tmp_3d(iim,jjmp1,klev)
       REAL zx_lon(iim,jjmp1), zx_lat(iim,jjmp1)
@@ -1100,5 +1099,5 @@
       integer iunit
 
-      logical, save::  read_climoz ! read ozone climatology
+      logical, save::  read_climoz ! read ozone climatology from a file
       integer, save:: ncid_climoz ! NetCDF file containing ozone climatology
 
@@ -1713,11 +1712,10 @@
 c Prescrire l'ozone et calculer l'albedo sur l'ocean.
 c
-      IF (MOD(itap-1,lmt_pas) .EQ. 0) THEN
+      IF (MOD(itap-1,lmt_pas) == 0) THEN
 C        Once per day, update ozone:
          if (read_climoz) then
 C           Ozone climatology from a NetCDF file
-            call regr_pr_av(ncid_climoz, "tro3", days_elapsed+1, 
-     &           press_climoz,
-     $           paprs, wo)
+            call regr_pr_av(ncid_climoz, "tro3", julien=days_elapsed+1, 
+     &           press_in_edg=press_climoz, paprs=paprs, v3=wo)
 !           Convert from mole fraction of ozone to column density of ozone in a
 !           cell, in kDU:
@@ -1728,5 +1726,5 @@
 C           "zmasse" changes a little.)
          else
-            wo = ozonecm(real(days_elapsed+1), rlat, paprs)
+            wo = ozonecm(rlat, paprs, rjour=real(days_elapsed+1))
          end if
       ENDIF
Index: LMDZ4/branches/LMDZ4-dev/libf/phylmd/printflag.F
===================================================================
--- LMDZ4/branches/LMDZ4-dev/libf/phylmd/printflag.F	(revision 1218)
+++ LMDZ4/branches/LMDZ4-dev/libf/phylmd/printflag.F	(revision 1220)
@@ -132,18 +132,18 @@
        PRINT 100
 
- 4    FORMAT(2x,5(1H*),'  ok_journe= ',l3,3x,',ok_instan = ',
-     , l3,3x,',ok_region = ',l3,3x,5(1H*) )
+ 4    FORMAT(2x,5("*"),'  ok_journe= ',l3,3x,',ok_instan = ',
+     , l3,3x,',ok_region = ',l3,3x,5("*") )
 
- 7     FORMAT(2x,5(1H*),15x,'      ok_limitvrai   = ',l3,16x,5(1h*) )
+ 7     FORMAT(2x,5("*"),15x,'      ok_limitvrai   = ',l3,16x,5("*") )
 
  8     FORMAT(2x,'*****             radpas    =                      ' ,
      , i4,6x,' *****')
 
- 10    FORMAT(2x,5(1H*),'    Cycle_diurne = ',l3,4x,', Soil_model = ',
-     , l3,12x,6(1H*) )
+ 10    FORMAT(2x,5("*"),'    Cycle_diurne = ',l3,4x,', Soil_model = ',
+     , l3,12x,6("*") )
 
 
- 11    FORMAT(2x,5(1H*),'  new_oliq = ',l3,3x,', Ok_orodr = ',
-     , l3,3x,', Ok_orolf = ',l3,3x,5(1H*) )
+ 11    FORMAT(2x,5("*"),'  new_oliq = ',l3,3x,', Ok_orodr = ',
+     , l3,3x,', Ok_orolf = ',l3,3x,5("*") )
 
 
Index: LMDZ4/branches/LMDZ4-dev/libf/phylmd/radepsi.h
===================================================================
--- LMDZ4/branches/LMDZ4-dev/libf/phylmd/radepsi.h	(revision 1218)
+++ LMDZ4/branches/LMDZ4-dev/libf/phylmd/radepsi.h	(revision 1220)
@@ -2,6 +2,6 @@
 ! $Header$
 !
-      REAL*8 ZEELOG, ZEPSC, ZEPSCO, ZEPSCQ, ZEPSCT, ZEPSCW
-      REAL*8 ZEPSEC, ZEPSCR
+      REAL(KIND=8) ZEELOG, ZEPSC, ZEPSCO, ZEPSCQ, ZEPSCT, ZEPSCW
+      REAL(KIND=8) ZEPSEC, ZEPSCR
       PARAMETER (ZEELOG = 1.E-07) !1.e-10 (not good for 32-bit machines)
       PARAMETER (ZEPSC  = 1.E-20)
@@ -13,4 +13,4 @@
       PARAMETER (ZEPSCR = 1.0E-10)
 c
-      REAL*8 REPSCT
+      REAL(KIND=8) REPSCT
       PARAMETER (REPSCT=1.0E-10)
Index: LMDZ4/branches/LMDZ4-dev/libf/phylmd/radiation_AR4.F
===================================================================
--- LMDZ4/branches/LMDZ4-dev/libf/phylmd/radiation_AR4.F	(revision 1218)
+++ LMDZ4/branches/LMDZ4-dev/libf/phylmd/radiation_AR4.F	(revision 1220)
@@ -54,36 +54,36 @@
 C* ARGUMENTS:
 C
-      REAL*8 PSCT  ! constante solaire (valeur conseillee: 1370)
-cIM ctes ds clesphys.h   REAL*8 RCO2  ! concentration CO2 (IPCC: 353.E-06*44.011/28.97)
+      REAL(KIND=8) PSCT  ! constante solaire (valeur conseillee: 1370)
+cIM ctes ds clesphys.h   REAL(KIND=8) RCO2  ! concentration CO2 (IPCC: 353.E-06*44.011/28.97)
 #include "clesphys.h"
 C
-      REAL*8 PPSOL(KDLON)        ! SURFACE PRESSURE (PA)
-      REAL*8 PDP(KDLON,KFLEV)    ! LAYER THICKNESS (PA)
-      REAL*8 PPMB(KDLON,KFLEV+1) ! HALF-LEVEL PRESSURE (MB)
-C
-      REAL*8 PRMU0(KDLON)  ! COSINE OF ZENITHAL ANGLE
-      REAL*8 PFRAC(KDLON)  ! fraction de la journee
-C
-      REAL*8 PTAVE(KDLON,KFLEV)  ! LAYER TEMPERATURE (K)
-      REAL*8 PWV(KDLON,KFLEV)    ! SPECIFIC HUMIDITY (KG/KG)
-      REAL*8 PQS(KDLON,KFLEV)    ! SATURATED WATER VAPOUR (KG/KG)
-      REAL*8 POZON(KDLON,KFLEV)  ! OZONE CONCENTRATION (KG/KG)
-      REAL*8 PAER(KDLON,KFLEV,5) ! AEROSOLS' OPTICAL THICKNESS
-C
-      REAL*8 PALBD(KDLON,2)  ! albedo du sol (lumiere diffuse)
-      REAL*8 PALBP(KDLON,2)  ! albedo du sol (lumiere parallele)
-C
-      REAL*8 PCLDSW(KDLON,KFLEV)    ! CLOUD FRACTION
-      REAL*8 PTAU(KDLON,2,KFLEV)    ! CLOUD OPTICAL THICKNESS
-      REAL*8 PCG(KDLON,2,KFLEV)     ! ASYMETRY FACTOR
-      REAL*8 POMEGA(KDLON,2,KFLEV)  ! SINGLE SCATTERING ALBEDO
-C
-      REAL*8 PHEAT(KDLON,KFLEV) ! SHORTWAVE HEATING (K/DAY)
-      REAL*8 PHEAT0(KDLON,KFLEV)! SHORTWAVE HEATING (K/DAY) clear-sky
-      REAL*8 PALBPLA(KDLON)     ! PLANETARY ALBEDO
-      REAL*8 PTOPSW(KDLON)      ! SHORTWAVE FLUX AT T.O.A.
-      REAL*8 PSOLSW(KDLON)      ! SHORTWAVE FLUX AT SURFACE
-      REAL*8 PTOPSW0(KDLON)     ! SHORTWAVE FLUX AT T.O.A. (CLEAR-SKY)
-      REAL*8 PSOLSW0(KDLON)     ! SHORTWAVE FLUX AT SURFACE (CLEAR-SKY)
+      REAL(KIND=8) PPSOL(KDLON)        ! SURFACE PRESSURE (PA)
+      REAL(KIND=8) PDP(KDLON,KFLEV)    ! LAYER THICKNESS (PA)
+      REAL(KIND=8) PPMB(KDLON,KFLEV+1) ! HALF-LEVEL PRESSURE (MB)
+C
+      REAL(KIND=8) PRMU0(KDLON)  ! COSINE OF ZENITHAL ANGLE
+      REAL(KIND=8) PFRAC(KDLON)  ! fraction de la journee
+C
+      REAL(KIND=8) PTAVE(KDLON,KFLEV)  ! LAYER TEMPERATURE (K)
+      REAL(KIND=8) PWV(KDLON,KFLEV)    ! SPECIFIC HUMIDITY (KG/KG)
+      REAL(KIND=8) PQS(KDLON,KFLEV)    ! SATURATED WATER VAPOUR (KG/KG)
+      REAL(KIND=8) POZON(KDLON,KFLEV)  ! OZONE CONCENTRATION (KG/KG)
+      REAL(KIND=8) PAER(KDLON,KFLEV,5) ! AEROSOLS' OPTICAL THICKNESS
+C
+      REAL(KIND=8) PALBD(KDLON,2)  ! albedo du sol (lumiere diffuse)
+      REAL(KIND=8) PALBP(KDLON,2)  ! albedo du sol (lumiere parallele)
+C
+      REAL(KIND=8) PCLDSW(KDLON,KFLEV)    ! CLOUD FRACTION
+      REAL(KIND=8) PTAU(KDLON,2,KFLEV)    ! CLOUD OPTICAL THICKNESS
+      REAL(KIND=8) PCG(KDLON,2,KFLEV)     ! ASYMETRY FACTOR
+      REAL(KIND=8) POMEGA(KDLON,2,KFLEV)  ! SINGLE SCATTERING ALBEDO
+C
+      REAL(KIND=8) PHEAT(KDLON,KFLEV) ! SHORTWAVE HEATING (K/DAY)
+      REAL(KIND=8) PHEAT0(KDLON,KFLEV)! SHORTWAVE HEATING (K/DAY) clear-sky
+      REAL(KIND=8) PALBPLA(KDLON)     ! PLANETARY ALBEDO
+      REAL(KIND=8) PTOPSW(KDLON)      ! SHORTWAVE FLUX AT T.O.A.
+      REAL(KIND=8) PSOLSW(KDLON)      ! SHORTWAVE FLUX AT SURFACE
+      REAL(KIND=8) PTOPSW0(KDLON)     ! SHORTWAVE FLUX AT T.O.A. (CLEAR-SKY)
+      REAL(KIND=8) PSOLSW0(KDLON)     ! SHORTWAVE FLUX AT SURFACE (CLEAR-SKY)
 C
 C* LOCAL VARIABLES:
@@ -91,25 +91,25 @@
       real, parameter:: dobson_u = 2.1415e-05 ! Dobson unit, in kg m-2
 
-      REAL(kind=8) ZOZ(KDLON,KFLEV)
+      REAL(KIND=8) ZOZ(KDLON,KFLEV)
 !     column-density of ozone in layer, in kilo-Dobsons
 
-      REAL*8 ZAKI(KDLON,2)     
-      REAL*8 ZCLD(KDLON,KFLEV)
-      REAL*8 ZCLEAR(KDLON) 
-      REAL*8 ZDSIG(KDLON,KFLEV)
-      REAL*8 ZFACT(KDLON)
-      REAL*8 ZFD(KDLON,KFLEV+1)
-      REAL*8 ZFDOWN(KDLON,KFLEV+1)
-      REAL*8 ZFU(KDLON,KFLEV+1)
-      REAL*8 ZFUP(KDLON,KFLEV+1)
-      REAL*8 ZRMU(KDLON)
-      REAL*8 ZSEC(KDLON)
-      REAL*8 ZUD(KDLON,5,KFLEV+1)
-      REAL*8 ZCLDSW0(KDLON,KFLEV)
+      REAL(KIND=8) ZAKI(KDLON,2)     
+      REAL(KIND=8) ZCLD(KDLON,KFLEV)
+      REAL(KIND=8) ZCLEAR(KDLON) 
+      REAL(KIND=8) ZDSIG(KDLON,KFLEV)
+      REAL(KIND=8) ZFACT(KDLON)
+      REAL(KIND=8) ZFD(KDLON,KFLEV+1)
+      REAL(KIND=8) ZFDOWN(KDLON,KFLEV+1)
+      REAL(KIND=8) ZFU(KDLON,KFLEV+1)
+      REAL(KIND=8) ZFUP(KDLON,KFLEV+1)
+      REAL(KIND=8) ZRMU(KDLON)
+      REAL(KIND=8) ZSEC(KDLON)
+      REAL(KIND=8) ZUD(KDLON,5,KFLEV+1)
+      REAL(KIND=8) ZCLDSW0(KDLON,KFLEV)
 c
-      REAL*8 ZFSUP(KDLON,KFLEV+1)
-      REAL*8 ZFSDN(KDLON,KFLEV+1)
-      REAL*8 ZFSUP0(KDLON,KFLEV+1)
-      REAL*8 ZFSDN0(KDLON,KFLEV+1)
+      REAL(KIND=8) ZFSUP(KDLON,KFLEV+1)
+      REAL(KIND=8) ZFSDN(KDLON,KFLEV+1)
+      REAL(KIND=8) ZFSUP0(KDLON,KFLEV+1)
+      REAL(KIND=8) ZFSDN0(KDLON,KFLEV+1)
 C
       INTEGER inu, jl, jk, i, k, kpl1
@@ -126,23 +126,23 @@
 c$OMP THREADPRIVATE(itapsw)
 cjq-Introduced for aerosol forcings
-      real*8 flag_aer
+      real(kind=8) flag_aer
       logical ok_ade, ok_aie    ! use aerosol forcings or not?
-      real*8 tauae(kdlon,kflev,2)  ! aerosol optical properties
-      real*8 pizae(kdlon,kflev,2)  ! (see aeropt.F)
-      real*8 cgae(kdlon,kflev,2)   ! -"-
-      REAL*8 PTAUA(KDLON,2,KFLEV)    ! CLOUD OPTICAL THICKNESS (pre-industrial value)
-      REAL*8 POMEGAA(KDLON,2,KFLEV)  ! SINGLE SCATTERING ALBEDO
-      REAL*8 PTOPSWAD(KDLON)     ! SHORTWAVE FLUX AT T.O.A.(+AEROSOL DIR)
-      REAL*8 PSOLSWAD(KDLON)     ! SHORTWAVE FLUX AT SURFACE(+AEROSOL DIR)
-      REAL*8 PTOPSWAI(KDLON)     ! SHORTWAVE FLUX AT T.O.A.(+AEROSOL IND)
-      REAL*8 PSOLSWAI(KDLON)     ! SHORTWAVE FLUX AT SURFACE(+AEROSOL IND)
+      real(kind=8) tauae(kdlon,kflev,2)  ! aerosol optical properties
+      real(kind=8) pizae(kdlon,kflev,2)  ! (see aeropt.F)
+      real(kind=8) cgae(kdlon,kflev,2)   ! -"-
+      REAL(KIND=8) PTAUA(KDLON,2,KFLEV)    ! CLOUD OPTICAL THICKNESS (pre-industrial value)
+      REAL(KIND=8) POMEGAA(KDLON,2,KFLEV)  ! SINGLE SCATTERING ALBEDO
+      REAL(KIND=8) PTOPSWAD(KDLON)     ! SHORTWAVE FLUX AT T.O.A.(+AEROSOL DIR)
+      REAL(KIND=8) PSOLSWAD(KDLON)     ! SHORTWAVE FLUX AT SURFACE(+AEROSOL DIR)
+      REAL(KIND=8) PTOPSWAI(KDLON)     ! SHORTWAVE FLUX AT T.O.A.(+AEROSOL IND)
+      REAL(KIND=8) PSOLSWAI(KDLON)     ! SHORTWAVE FLUX AT SURFACE(+AEROSOL IND)
 cjq - Fluxes including aerosol effects
-      REAL*8,allocatable,save :: ZFSUPAD(:,:)
+      REAL(KIND=8),allocatable,save :: ZFSUPAD(:,:)
 c$OMP THREADPRIVATE(ZFSUPAD)
-      REAL*8,allocatable,save :: ZFSDNAD(:,:)
+      REAL(KIND=8),allocatable,save :: ZFSDNAD(:,:)
 c$OMP THREADPRIVATE(ZFSDNAD)
-      REAL*8,allocatable,save :: ZFSUPAI(:,:)
+      REAL(KIND=8),allocatable,save :: ZFSUPAI(:,:)
 c$OMP THREADPRIVATE(ZFSUPAI)
-      REAL*8,allocatable,save :: ZFSDNAI(:,:)
+      REAL(KIND=8),allocatable,save :: ZFSDNAI(:,:)
 c$OMP THREADPRIVATE(ZFSDNAI)
       logical initialized
@@ -353,53 +353,53 @@
 C* ARGUMENTS:
 C
-      REAL*8 PSCT
-cIM ctes ds clesphys.h   REAL*8 RCO2
+      REAL(KIND=8) PSCT
+cIM ctes ds clesphys.h   REAL(KIND=8) RCO2
 #include "clesphys.h"
-      REAL*8 PCLDSW(KDLON,KFLEV)
-      REAL*8 PPMB(KDLON,KFLEV+1)
-      REAL*8 PPSOL(KDLON)
-      REAL*8 PRMU0(KDLON)
-      REAL*8 PFRAC(KDLON)
-      REAL*8 PTAVE(KDLON,KFLEV)
-      REAL*8 PWV(KDLON,KFLEV)
-C
-      REAL*8 PAKI(KDLON,2)
-      REAL*8 PCLD(KDLON,KFLEV)
-      REAL*8 PCLEAR(KDLON)
-      REAL*8 PDSIG(KDLON,KFLEV)
-      REAL*8 PFACT(KDLON)
-      REAL*8 PRMU(KDLON)
-      REAL*8 PSEC(KDLON)
-      REAL*8 PUD(KDLON,5,KFLEV+1)
+      REAL(KIND=8) PCLDSW(KDLON,KFLEV)
+      REAL(KIND=8) PPMB(KDLON,KFLEV+1)
+      REAL(KIND=8) PPSOL(KDLON)
+      REAL(KIND=8) PRMU0(KDLON)
+      REAL(KIND=8) PFRAC(KDLON)
+      REAL(KIND=8) PTAVE(KDLON,KFLEV)
+      REAL(KIND=8) PWV(KDLON,KFLEV)
+C
+      REAL(KIND=8) PAKI(KDLON,2)
+      REAL(KIND=8) PCLD(KDLON,KFLEV)
+      REAL(KIND=8) PCLEAR(KDLON)
+      REAL(KIND=8) PDSIG(KDLON,KFLEV)
+      REAL(KIND=8) PFACT(KDLON)
+      REAL(KIND=8) PRMU(KDLON)
+      REAL(KIND=8) PSEC(KDLON)
+      REAL(KIND=8) PUD(KDLON,5,KFLEV+1)
 C
 C* LOCAL VARIABLES:
 C
       INTEGER IIND(2)
-      REAL*8 ZC1J(KDLON,KFLEV+1)
-      REAL*8 ZCLEAR(KDLON)
-      REAL*8 ZCLOUD(KDLON)
-      REAL*8 ZN175(KDLON)
-      REAL*8 ZN190(KDLON)
-      REAL*8 ZO175(KDLON)
-      REAL*8 ZO190(KDLON)
-      REAL*8 ZSIGN(KDLON)
-      REAL*8 ZR(KDLON,2) 
-      REAL*8 ZSIGO(KDLON)
-      REAL*8 ZUD(KDLON,2)
-      REAL*8 ZRTH, ZRTU, ZWH2O, ZDSCO2, ZDSH2O, ZFPPW
+      REAL(KIND=8) ZC1J(KDLON,KFLEV+1)
+      REAL(KIND=8) ZCLEAR(KDLON)
+      REAL(KIND=8) ZCLOUD(KDLON)
+      REAL(KIND=8) ZN175(KDLON)
+      REAL(KIND=8) ZN190(KDLON)
+      REAL(KIND=8) ZO175(KDLON)
+      REAL(KIND=8) ZO190(KDLON)
+      REAL(KIND=8) ZSIGN(KDLON)
+      REAL(KIND=8) ZR(KDLON,2) 
+      REAL(KIND=8) ZSIGO(KDLON)
+      REAL(KIND=8) ZUD(KDLON,2)
+      REAL(KIND=8) ZRTH, ZRTU, ZWH2O, ZDSCO2, ZDSH2O, ZFPPW
       INTEGER jl, jk, jkp1, jkl, jklp1, ja
 C
 C* Prescribed Data:
 c
-      REAL*8 ZPDH2O,ZPDUMG
+      REAL(KIND=8) ZPDH2O,ZPDUMG
       SAVE ZPDH2O,ZPDUMG
 c$OMP THREADPRIVATE(ZPDH2O,ZPDUMG)
-      REAL*8 ZPRH2O,ZPRUMG
+      REAL(KIND=8) ZPRH2O,ZPRUMG
       SAVE ZPRH2O,ZPRUMG
 c$OMP THREADPRIVATE(ZPRH2O,ZPRUMG)
-      REAL*8 RTDH2O,RTDUMG
+      REAL(KIND=8) RTDH2O,RTDUMG
       SAVE RTDH2O,RTDUMG
 c$OMP THREADPRIVATE(RTDH2O,RTDUMG)
-      REAL*8 RTH2O ,RTUMG
+      REAL(KIND=8) RTH2O ,RTUMG
       SAVE RTH2O ,RTUMG
 c$OMP THREADPRIVATE(RTH2O ,RTUMG)
@@ -577,25 +577,25 @@
       INTEGER KNU
 c-OB
-      real*8 flag_aer
-      real*8 tauae(kdlon,kflev,2)
-      real*8 pizae(kdlon,kflev,2)
-      real*8 cgae(kdlon,kflev,2)
-      REAL*8 PAER(KDLON,KFLEV,5)
-      REAL*8 PALBD(KDLON,2)
-      REAL*8 PALBP(KDLON,2)
-      REAL*8 PCG(KDLON,2,KFLEV)  
-      REAL*8 PCLD(KDLON,KFLEV)
-      REAL*8 PCLDSW(KDLON,KFLEV)
-      REAL*8 PCLEAR(KDLON)
-      REAL*8 PDSIG(KDLON,KFLEV)
-      REAL*8 POMEGA(KDLON,2,KFLEV)
-      REAL*8 POZ(KDLON,KFLEV)
-      REAL*8 PRMU(KDLON)
-      REAL*8 PSEC(KDLON)
-      REAL*8 PTAU(KDLON,2,KFLEV)
-      REAL*8 PUD(KDLON,5,KFLEV+1)
-C
-      REAL*8 PFD(KDLON,KFLEV+1)
-      REAL*8 PFU(KDLON,KFLEV+1)
+      real(kind=8) flag_aer
+      real(kind=8) tauae(kdlon,kflev,2)
+      real(kind=8) pizae(kdlon,kflev,2)
+      real(kind=8) cgae(kdlon,kflev,2)
+      REAL(KIND=8) PAER(KDLON,KFLEV,5)
+      REAL(KIND=8) PALBD(KDLON,2)
+      REAL(KIND=8) PALBP(KDLON,2)
+      REAL(KIND=8) PCG(KDLON,2,KFLEV)  
+      REAL(KIND=8) PCLD(KDLON,KFLEV)
+      REAL(KIND=8) PCLDSW(KDLON,KFLEV)
+      REAL(KIND=8) PCLEAR(KDLON)
+      REAL(KIND=8) PDSIG(KDLON,KFLEV)
+      REAL(KIND=8) POMEGA(KDLON,2,KFLEV)
+      REAL(KIND=8) POZ(KDLON,KFLEV)
+      REAL(KIND=8) PRMU(KDLON)
+      REAL(KIND=8) PSEC(KDLON)
+      REAL(KIND=8) PTAU(KDLON,2,KFLEV)
+      REAL(KIND=8) PUD(KDLON,5,KFLEV+1)
+C
+      REAL(KIND=8) PFD(KDLON,KFLEV+1)
+      REAL(KIND=8) PFU(KDLON,KFLEV+1)
 C
 C* LOCAL VARIABLES:
@@ -603,23 +603,23 @@
       INTEGER IIND(4)
 C      
-      REAL*8 ZCGAZ(KDLON,KFLEV) 
-      REAL*8 ZDIFF(KDLON)
-      REAL*8 ZDIRF(KDLON)        
-      REAL*8 ZPIZAZ(KDLON,KFLEV)
-      REAL*8 ZRAYL(KDLON)
-      REAL*8 ZRAY1(KDLON,KFLEV+1)
-      REAL*8 ZRAY2(KDLON,KFLEV+1)
-      REAL*8 ZREFZ(KDLON,2,KFLEV+1)
-      REAL*8 ZRJ(KDLON,6,KFLEV+1)
-      REAL*8 ZRJ0(KDLON,6,KFLEV+1)
-      REAL*8 ZRK(KDLON,6,KFLEV+1)
-      REAL*8 ZRK0(KDLON,6,KFLEV+1)
-      REAL*8 ZRMUE(KDLON,KFLEV+1)
-      REAL*8 ZRMU0(KDLON,KFLEV+1)
-      REAL*8 ZR(KDLON,4)
-      REAL*8 ZTAUAZ(KDLON,KFLEV)
-      REAL*8 ZTRA1(KDLON,KFLEV+1)
-      REAL*8 ZTRA2(KDLON,KFLEV+1)
-      REAL*8 ZW(KDLON,4)
+      REAL(KIND=8) ZCGAZ(KDLON,KFLEV) 
+      REAL(KIND=8) ZDIFF(KDLON)
+      REAL(KIND=8) ZDIRF(KDLON)        
+      REAL(KIND=8) ZPIZAZ(KDLON,KFLEV)
+      REAL(KIND=8) ZRAYL(KDLON)
+      REAL(KIND=8) ZRAY1(KDLON,KFLEV+1)
+      REAL(KIND=8) ZRAY2(KDLON,KFLEV+1)
+      REAL(KIND=8) ZREFZ(KDLON,2,KFLEV+1)
+      REAL(KIND=8) ZRJ(KDLON,6,KFLEV+1)
+      REAL(KIND=8) ZRJ0(KDLON,6,KFLEV+1)
+      REAL(KIND=8) ZRK(KDLON,6,KFLEV+1)
+      REAL(KIND=8) ZRK0(KDLON,6,KFLEV+1)
+      REAL(KIND=8) ZRMUE(KDLON,KFLEV+1)
+      REAL(KIND=8) ZRMU0(KDLON,KFLEV+1)
+      REAL(KIND=8) ZR(KDLON,4)
+      REAL(KIND=8) ZTAUAZ(KDLON,KFLEV)
+      REAL(KIND=8) ZTRA1(KDLON,KFLEV+1)
+      REAL(KIND=8) ZTRA2(KDLON,KFLEV+1)
+      REAL(KIND=8) ZW(KDLON,4)
 C
       INTEGER jl, jk, k, jaj, ikm1, ikl
@@ -627,8 +627,8 @@
 c Prescribed Data:
 c
-      REAL*8 RSUN(2)
+      REAL(KIND=8) RSUN(2)
       SAVE RSUN
 c$OMP THREADPRIVATE(RSUN)
-      REAL*8 RRAY(2,6)
+      REAL(KIND=8) RRAY(2,6)
       SAVE RRAY
 c$OMP THREADPRIVATE(RRAY)
@@ -825,86 +825,86 @@
       INTEGER KNU
 c-OB
-      real*8 flag_aer
-      real*8 tauae(kdlon,kflev,2)
-      real*8 pizae(kdlon,kflev,2)
-      real*8 cgae(kdlon,kflev,2)
-      REAL*8 PAER(KDLON,KFLEV,5)
-      REAL*8 PAKI(KDLON,2)
-      REAL*8 PALBD(KDLON,2)
-      REAL*8 PALBP(KDLON,2)
-      REAL*8 PCG(KDLON,2,KFLEV)
-      REAL*8 PCLD(KDLON,KFLEV)
-      REAL*8 PCLDSW(KDLON,KFLEV)
-      REAL*8 PCLEAR(KDLON)
-      REAL*8 PDSIG(KDLON,KFLEV)
-      REAL*8 POMEGA(KDLON,2,KFLEV)
-      REAL*8 POZ(KDLON,KFLEV)
-      REAL*8 PQS(KDLON,KFLEV)
-      REAL*8 PRMU(KDLON)
-      REAL*8 PSEC(KDLON)
-      REAL*8 PTAU(KDLON,2,KFLEV)
-      REAL*8 PUD(KDLON,5,KFLEV+1)
-      REAL*8 PWV(KDLON,KFLEV)
-C
-      REAL*8 PFDOWN(KDLON,KFLEV+1)
-      REAL*8 PFUP(KDLON,KFLEV+1)
+      real(kind=8) flag_aer
+      real(kind=8) tauae(kdlon,kflev,2)
+      real(kind=8) pizae(kdlon,kflev,2)
+      real(kind=8) cgae(kdlon,kflev,2)
+      REAL(KIND=8) PAER(KDLON,KFLEV,5)
+      REAL(KIND=8) PAKI(KDLON,2)
+      REAL(KIND=8) PALBD(KDLON,2)
+      REAL(KIND=8) PALBP(KDLON,2)
+      REAL(KIND=8) PCG(KDLON,2,KFLEV)
+      REAL(KIND=8) PCLD(KDLON,KFLEV)
+      REAL(KIND=8) PCLDSW(KDLON,KFLEV)
+      REAL(KIND=8) PCLEAR(KDLON)
+      REAL(KIND=8) PDSIG(KDLON,KFLEV)
+      REAL(KIND=8) POMEGA(KDLON,2,KFLEV)
+      REAL(KIND=8) POZ(KDLON,KFLEV)
+      REAL(KIND=8) PQS(KDLON,KFLEV)
+      REAL(KIND=8) PRMU(KDLON)
+      REAL(KIND=8) PSEC(KDLON)
+      REAL(KIND=8) PTAU(KDLON,2,KFLEV)
+      REAL(KIND=8) PUD(KDLON,5,KFLEV+1)
+      REAL(KIND=8) PWV(KDLON,KFLEV)
+C
+      REAL(KIND=8) PFDOWN(KDLON,KFLEV+1)
+      REAL(KIND=8) PFUP(KDLON,KFLEV+1)
 C
 C* LOCAL VARIABLES:
 C
       INTEGER IIND2(2), IIND3(3)
-      REAL*8 ZCGAZ(KDLON,KFLEV)
-      REAL*8 ZFD(KDLON,KFLEV+1)
-      REAL*8 ZFU(KDLON,KFLEV+1) 
-      REAL*8 ZG(KDLON)
-      REAL*8 ZGG(KDLON)
-      REAL*8 ZPIZAZ(KDLON,KFLEV)
-      REAL*8 ZRAYL(KDLON)
-      REAL*8 ZRAY1(KDLON,KFLEV+1)
-      REAL*8 ZRAY2(KDLON,KFLEV+1)
-      REAL*8 ZREF(KDLON)
-      REAL*8 ZREFZ(KDLON,2,KFLEV+1)
-      REAL*8 ZRE1(KDLON)
-      REAL*8 ZRE2(KDLON)
-      REAL*8 ZRJ(KDLON,6,KFLEV+1)
-      REAL*8 ZRJ0(KDLON,6,KFLEV+1)
-      REAL*8 ZRK(KDLON,6,KFLEV+1)
-      REAL*8 ZRK0(KDLON,6,KFLEV+1)
-      REAL*8 ZRL(KDLON,8)
-      REAL*8 ZRMUE(KDLON,KFLEV+1)
-      REAL*8 ZRMU0(KDLON,KFLEV+1)
-      REAL*8 ZRMUZ(KDLON)
-      REAL*8 ZRNEB(KDLON)
-      REAL*8 ZRUEF(KDLON,8)
-      REAL*8 ZR1(KDLON) 
-      REAL*8 ZR2(KDLON,2)
-      REAL*8 ZR3(KDLON,3)
-      REAL*8 ZR4(KDLON)
-      REAL*8 ZR21(KDLON)
-      REAL*8 ZR22(KDLON)
-      REAL*8 ZS(KDLON)
-      REAL*8 ZTAUAZ(KDLON,KFLEV)
-      REAL*8 ZTO1(KDLON)
-      REAL*8 ZTR(KDLON,2,KFLEV+1)
-      REAL*8 ZTRA1(KDLON,KFLEV+1)
-      REAL*8 ZTRA2(KDLON,KFLEV+1)
-      REAL*8 ZTR1(KDLON)
-      REAL*8 ZTR2(KDLON)
-      REAL*8 ZW(KDLON)   
-      REAL*8 ZW1(KDLON)
-      REAL*8 ZW2(KDLON,2)
-      REAL*8 ZW3(KDLON,3)
-      REAL*8 ZW4(KDLON)
-      REAL*8 ZW5(KDLON)
+      REAL(KIND=8) ZCGAZ(KDLON,KFLEV)
+      REAL(KIND=8) ZFD(KDLON,KFLEV+1)
+      REAL(KIND=8) ZFU(KDLON,KFLEV+1) 
+      REAL(KIND=8) ZG(KDLON)
+      REAL(KIND=8) ZGG(KDLON)
+      REAL(KIND=8) ZPIZAZ(KDLON,KFLEV)
+      REAL(KIND=8) ZRAYL(KDLON)
+      REAL(KIND=8) ZRAY1(KDLON,KFLEV+1)
+      REAL(KIND=8) ZRAY2(KDLON,KFLEV+1)
+      REAL(KIND=8) ZREF(KDLON)
+      REAL(KIND=8) ZREFZ(KDLON,2,KFLEV+1)
+      REAL(KIND=8) ZRE1(KDLON)
+      REAL(KIND=8) ZRE2(KDLON)
+      REAL(KIND=8) ZRJ(KDLON,6,KFLEV+1)
+      REAL(KIND=8) ZRJ0(KDLON,6,KFLEV+1)
+      REAL(KIND=8) ZRK(KDLON,6,KFLEV+1)
+      REAL(KIND=8) ZRK0(KDLON,6,KFLEV+1)
+      REAL(KIND=8) ZRL(KDLON,8)
+      REAL(KIND=8) ZRMUE(KDLON,KFLEV+1)
+      REAL(KIND=8) ZRMU0(KDLON,KFLEV+1)
+      REAL(KIND=8) ZRMUZ(KDLON)
+      REAL(KIND=8) ZRNEB(KDLON)
+      REAL(KIND=8) ZRUEF(KDLON,8)
+      REAL(KIND=8) ZR1(KDLON) 
+      REAL(KIND=8) ZR2(KDLON,2)
+      REAL(KIND=8) ZR3(KDLON,3)
+      REAL(KIND=8) ZR4(KDLON)
+      REAL(KIND=8) ZR21(KDLON)
+      REAL(KIND=8) ZR22(KDLON)
+      REAL(KIND=8) ZS(KDLON)
+      REAL(KIND=8) ZTAUAZ(KDLON,KFLEV)
+      REAL(KIND=8) ZTO1(KDLON)
+      REAL(KIND=8) ZTR(KDLON,2,KFLEV+1)
+      REAL(KIND=8) ZTRA1(KDLON,KFLEV+1)
+      REAL(KIND=8) ZTRA2(KDLON,KFLEV+1)
+      REAL(KIND=8) ZTR1(KDLON)
+      REAL(KIND=8) ZTR2(KDLON)
+      REAL(KIND=8) ZW(KDLON)   
+      REAL(KIND=8) ZW1(KDLON)
+      REAL(KIND=8) ZW2(KDLON,2)
+      REAL(KIND=8) ZW3(KDLON,3)
+      REAL(KIND=8) ZW4(KDLON)
+      REAL(KIND=8) ZW5(KDLON)
 C
       INTEGER jl, jk, k, jaj, ikm1, ikl, jn, jabs, jkm1
       INTEGER jref, jkl, jklp1, jajp, jkki, jkkp4, jn2j, iabs
-      REAL*8 ZRMUM1, ZWH2O, ZCNEB, ZAA, ZBB, ZRKI, ZRE11
+      REAL(KIND=8) ZRMUM1, ZWH2O, ZCNEB, ZAA, ZBB, ZRKI, ZRE11
 C
 C* Prescribed Data:
 C
-      REAL*8 RSUN(2)
+      REAL(KIND=8) RSUN(2)
       SAVE RSUN
 c$OMP THREADPRIVATE(RSUN)
-      REAL*8 RRAY(2,6)
+      REAL(KIND=8) RRAY(2,6)
       SAVE RRAY
 c$OMP THREADPRIVATE(RRAY)
@@ -1361,45 +1361,45 @@
       INTEGER KNU
 c-OB
-      real*8 flag_aer
-      real*8 tauae(kdlon,kflev,2)
-      real*8 pizae(kdlon,kflev,2)
-      real*8 cgae(kdlon,kflev,2)
-      REAL*8 PAER(KDLON,KFLEV,5)
-      REAL*8 PALBP(KDLON,2)
-      REAL*8 PDSIG(KDLON,KFLEV)
-      REAL*8 PRAYL(KDLON)
-      REAL*8 PSEC(KDLON)
-C
-      REAL*8 PCGAZ(KDLON,KFLEV)     
-      REAL*8 PPIZAZ(KDLON,KFLEV)
-      REAL*8 PRAY1(KDLON,KFLEV+1)
-      REAL*8 PRAY2(KDLON,KFLEV+1)
-      REAL*8 PREFZ(KDLON,2,KFLEV+1)
-      REAL*8 PRJ(KDLON,6,KFLEV+1)
-      REAL*8 PRK(KDLON,6,KFLEV+1)
-      REAL*8 PRMU0(KDLON,KFLEV+1)
-      REAL*8 PTAUAZ(KDLON,KFLEV)
-      REAL*8 PTRA1(KDLON,KFLEV+1)
-      REAL*8 PTRA2(KDLON,KFLEV+1)
+      real(kind=8) flag_aer
+      real(kind=8) tauae(kdlon,kflev,2)
+      real(kind=8) pizae(kdlon,kflev,2)
+      real(kind=8) cgae(kdlon,kflev,2)
+      REAL(KIND=8) PAER(KDLON,KFLEV,5)
+      REAL(KIND=8) PALBP(KDLON,2)
+      REAL(KIND=8) PDSIG(KDLON,KFLEV)
+      REAL(KIND=8) PRAYL(KDLON)
+      REAL(KIND=8) PSEC(KDLON)
+C
+      REAL(KIND=8) PCGAZ(KDLON,KFLEV)     
+      REAL(KIND=8) PPIZAZ(KDLON,KFLEV)
+      REAL(KIND=8) PRAY1(KDLON,KFLEV+1)
+      REAL(KIND=8) PRAY2(KDLON,KFLEV+1)
+      REAL(KIND=8) PREFZ(KDLON,2,KFLEV+1)
+      REAL(KIND=8) PRJ(KDLON,6,KFLEV+1)
+      REAL(KIND=8) PRK(KDLON,6,KFLEV+1)
+      REAL(KIND=8) PRMU0(KDLON,KFLEV+1)
+      REAL(KIND=8) PTAUAZ(KDLON,KFLEV)
+      REAL(KIND=8) PTRA1(KDLON,KFLEV+1)
+      REAL(KIND=8) PTRA2(KDLON,KFLEV+1)
 C
 C* LOCAL VARIABLES:
 C
-      REAL*8 ZC0I(KDLON,KFLEV+1)       
-      REAL*8 ZCLE0(KDLON,KFLEV)
-      REAL*8 ZCLEAR(KDLON)
-      REAL*8 ZR21(KDLON)
-      REAL*8 ZR23(KDLON)
-      REAL*8 ZSS0(KDLON)
-      REAL*8 ZSCAT(KDLON)
-      REAL*8 ZTR(KDLON,2,KFLEV+1)
+      REAL(KIND=8) ZC0I(KDLON,KFLEV+1)       
+      REAL(KIND=8) ZCLE0(KDLON,KFLEV)
+      REAL(KIND=8) ZCLEAR(KDLON)
+      REAL(KIND=8) ZR21(KDLON)
+      REAL(KIND=8) ZR23(KDLON)
+      REAL(KIND=8) ZSS0(KDLON)
+      REAL(KIND=8) ZSCAT(KDLON)
+      REAL(KIND=8) ZTR(KDLON,2,KFLEV+1)
 C
       INTEGER jl, jk, ja, jae, jkl, jklp1, jaj, jkm1, in
-      REAL*8 ZTRAY, ZGAR, ZRATIO, ZFF, ZFACOA, ZCORAE
-      REAL*8 ZMUE, ZGAP, ZWW, ZTO, ZDEN, ZMU1, ZDEN1
-      REAL*8 ZBMU0, ZBMU1, ZRE11
+      REAL(KIND=8) ZTRAY, ZGAR, ZRATIO, ZFF, ZFACOA, ZCORAE
+      REAL(KIND=8) ZMUE, ZGAP, ZWW, ZTO, ZDEN, ZMU1, ZDEN1
+      REAL(KIND=8) ZBMU0, ZBMU1, ZRE11
 C
 C* Prescribed Data for Aerosols:
 C
-      REAL*8 TAUA(2,5), RPIZA(2,5), RCGA(2,5)
+      REAL(KIND=8) TAUA(2,5), RPIZA(2,5), RCGA(2,5)
       SAVE TAUA, RPIZA, RCGA
 c$OMP THREADPRIVATE(TAUA, RPIZA, RCGA)
@@ -1728,51 +1728,51 @@
 C
       INTEGER KNU
-      REAL*8 PALBD(KDLON,2)
-      REAL*8 PCG(KDLON,2,KFLEV)
-      REAL*8 PCLD(KDLON,KFLEV)
-      REAL*8 PDSIG(KDLON,KFLEV)
-      REAL*8 POMEGA(KDLON,2,KFLEV)
-      REAL*8 PRAYL(KDLON)
-      REAL*8 PSEC(KDLON)
-      REAL*8 PTAU(KDLON,2,KFLEV)
-C
-      REAL*8 PRAY1(KDLON,KFLEV+1)
-      REAL*8 PRAY2(KDLON,KFLEV+1)
-      REAL*8 PREFZ(KDLON,2,KFLEV+1)
-      REAL*8 PRJ(KDLON,6,KFLEV+1)
-      REAL*8 PRK(KDLON,6,KFLEV+1)
-      REAL*8 PRMUE(KDLON,KFLEV+1)
-      REAL*8 PCGAZ(KDLON,KFLEV)
-      REAL*8 PPIZAZ(KDLON,KFLEV)
-      REAL*8 PTAUAZ(KDLON,KFLEV)
-      REAL*8 PTRA1(KDLON,KFLEV+1)
-      REAL*8 PTRA2(KDLON,KFLEV+1)
+      REAL(KIND=8) PALBD(KDLON,2)
+      REAL(KIND=8) PCG(KDLON,2,KFLEV)
+      REAL(KIND=8) PCLD(KDLON,KFLEV)
+      REAL(KIND=8) PDSIG(KDLON,KFLEV)
+      REAL(KIND=8) POMEGA(KDLON,2,KFLEV)
+      REAL(KIND=8) PRAYL(KDLON)
+      REAL(KIND=8) PSEC(KDLON)
+      REAL(KIND=8) PTAU(KDLON,2,KFLEV)
+C
+      REAL(KIND=8) PRAY1(KDLON,KFLEV+1)
+      REAL(KIND=8) PRAY2(KDLON,KFLEV+1)
+      REAL(KIND=8) PREFZ(KDLON,2,KFLEV+1)
+      REAL(KIND=8) PRJ(KDLON,6,KFLEV+1)
+      REAL(KIND=8) PRK(KDLON,6,KFLEV+1)
+      REAL(KIND=8) PRMUE(KDLON,KFLEV+1)
+      REAL(KIND=8) PCGAZ(KDLON,KFLEV)
+      REAL(KIND=8) PPIZAZ(KDLON,KFLEV)
+      REAL(KIND=8) PTAUAZ(KDLON,KFLEV)
+      REAL(KIND=8) PTRA1(KDLON,KFLEV+1)
+      REAL(KIND=8) PTRA2(KDLON,KFLEV+1)
 C
 C* LOCAL VARIABLES:
 C
-      REAL*8 ZC1I(KDLON,KFLEV+1)
-      REAL*8 ZCLEQ(KDLON,KFLEV)
-      REAL*8 ZCLEAR(KDLON)
-      REAL*8 ZCLOUD(KDLON)
-      REAL*8 ZGG(KDLON)
-      REAL*8 ZREF(KDLON)
-      REAL*8 ZRE1(KDLON)
-      REAL*8 ZRE2(KDLON)
-      REAL*8 ZRMUZ(KDLON)
-      REAL*8 ZRNEB(KDLON)
-      REAL*8 ZR21(KDLON)
-      REAL*8 ZR22(KDLON)
-      REAL*8 ZR23(KDLON)
-      REAL*8 ZSS1(KDLON)
-      REAL*8 ZTO1(KDLON)
-      REAL*8 ZTR(KDLON,2,KFLEV+1)
-      REAL*8 ZTR1(KDLON)
-      REAL*8 ZTR2(KDLON)
-      REAL*8 ZW(KDLON)
+      REAL(KIND=8) ZC1I(KDLON,KFLEV+1)
+      REAL(KIND=8) ZCLEQ(KDLON,KFLEV)
+      REAL(KIND=8) ZCLEAR(KDLON)
+      REAL(KIND=8) ZCLOUD(KDLON)
+      REAL(KIND=8) ZGG(KDLON)
+      REAL(KIND=8) ZREF(KDLON)
+      REAL(KIND=8) ZRE1(KDLON)
+      REAL(KIND=8) ZRE2(KDLON)
+      REAL(KIND=8) ZRMUZ(KDLON)
+      REAL(KIND=8) ZRNEB(KDLON)
+      REAL(KIND=8) ZR21(KDLON)
+      REAL(KIND=8) ZR22(KDLON)
+      REAL(KIND=8) ZR23(KDLON)
+      REAL(KIND=8) ZSS1(KDLON)
+      REAL(KIND=8) ZTO1(KDLON)
+      REAL(KIND=8) ZTR(KDLON,2,KFLEV+1)
+      REAL(KIND=8) ZTR1(KDLON)
+      REAL(KIND=8) ZTR2(KDLON)
+      REAL(KIND=8) ZW(KDLON)
 C
       INTEGER jk, jl, ja, jkl, jklp1, jkm1, jaj
-      REAL*8 ZFACOA, ZFACOC, ZCORAE, ZCORCD
-      REAL*8 ZMUE, ZGAP, ZWW, ZTO, ZDEN, ZDEN1
-      REAL*8 ZMU1, ZRE11, ZBMU0, ZBMU1
+      REAL(KIND=8) ZFACOA, ZFACOC, ZCORAE, ZCORCD
+      REAL(KIND=8) ZMUE, ZGAP, ZWW, ZTO, ZDEN, ZDEN1
+      REAL(KIND=8) ZMU1, ZRE11, ZBMU0, ZBMU1
 C
 C     ------------------------------------------------------------------
@@ -2081,25 +2081,26 @@
 C* ARGUMENTS:
 C
-      REAL*8 PGG(KDLON)   ! ASSYMETRY FACTOR
-      REAL*8 PREF(KDLON)  ! REFLECTIVITY OF THE UNDERLYING LAYER
-      REAL*8 PRMUZ(KDLON) ! COSINE OF SOLAR ZENITH ANGLE
-      REAL*8 PTO1(KDLON)  ! OPTICAL THICKNESS
-      REAL*8 PW(KDLON)    ! SINGLE SCATTERING ALBEDO
-      REAL*8 PRE1(KDLON)  ! LAYER REFLECTIVITY (NO UNDERLYING-LAYER REFLECTION)
-      REAL*8 PRE2(KDLON)  ! LAYER REFLECTIVITY
-      REAL*8 PTR1(KDLON)  ! LAYER TRANSMISSIVITY (NO UNDERLYING-LAYER REFLECTION)
-      REAL*8 PTR2(KDLON)  ! LAYER TRANSMISSIVITY
+      REAL(KIND=8) PGG(KDLON)   ! ASSYMETRY FACTOR
+      REAL(KIND=8) PREF(KDLON)  ! REFLECTIVITY OF THE UNDERLYING LAYER
+      REAL(KIND=8) PRMUZ(KDLON) ! COSINE OF SOLAR ZENITH ANGLE
+      REAL(KIND=8) PTO1(KDLON)  ! OPTICAL THICKNESS
+      REAL(KIND=8) PW(KDLON)    ! SINGLE SCATTERING ALBEDO
+      REAL(KIND=8) PRE1(KDLON)  ! LAYER REFLECTIVITY (NO UNDERLYING-LAYER REFLECTION)
+      REAL(KIND=8) PRE2(KDLON)  ! LAYER REFLECTIVITY
+      REAL(KIND=8) PTR1(KDLON)  ! LAYER TRANSMISSIVITY (NO UNDERLYING-LAYER REFLECTION)
+      REAL(KIND=8) PTR2(KDLON)  ! LAYER TRANSMISSIVITY
 C
 C* LOCAL VARIABLES:
 C
       INTEGER jl
-      REAL*8 ZFF, ZGP, ZTOP, ZWCP, ZDT, ZX1, ZWM
-      REAL*8 ZRM2, ZRK, ZX2, ZRP, ZALPHA, ZBETA, ZARG
-      REAL*8 ZEXMU0, ZARG2, ZEXKP, ZEXKM, ZXP2P, ZXM2P, ZAP2B, ZAM2B
-      REAL*8 ZA11, ZA12, ZA13, ZA21, ZA22, ZA23
-      REAL*8 ZDENA, ZC1A, ZC2A, ZRI0A, ZRI1A
-      REAL*8 ZRI0B, ZRI1B
-      REAL*8 ZB21, ZB22, ZB23, ZDENB, ZC1B, ZC2B
-      REAL*8 ZRI0C, ZRI1C, ZRI0D, ZRI1D
+      REAL(KIND=8) ZFF, ZGP, ZTOP, ZWCP, ZDT, ZX1, ZWM
+      REAL(KIND=8) ZRM2, ZRK, ZX2, ZRP, ZALPHA, ZBETA, ZARG
+      REAL(KIND=8) ZEXMU0, ZARG2, ZEXKP, ZEXKM, ZXP2P, ZXM2P, ZAP2B,
+     $     ZAM2B
+      REAL(KIND=8) ZA11, ZA12, ZA13, ZA21, ZA22, ZA23
+      REAL(KIND=8) ZDENA, ZC1A, ZC2A, ZRI0A, ZRI1A
+      REAL(KIND=8) ZRI0B, ZRI1B
+      REAL(KIND=8) ZB21, ZB22, ZB23, ZDENB, ZC1B, ZC2B
+      REAL(KIND=8) ZRI0C, ZRI1C, ZRI0D, ZRI1D
 C     ------------------------------------------------------------------
 C
@@ -2216,16 +2217,16 @@
       INTEGER KNU     ! INDEX OF THE SPECTRAL INTERVAL
       INTEGER KA      ! INDEX OF THE ABSORBER
-      REAL*8 PU(KDLON)  ! ABSORBER AMOUNT
-C
-      REAL*8 PTR(KDLON) ! TRANSMISSION FUNCTION
+      REAL(KIND=8) PU(KDLON)  ! ABSORBER AMOUNT
+C
+      REAL(KIND=8) PTR(KDLON) ! TRANSMISSION FUNCTION
 C
 C* LOCAL VARIABLES:
 C
-      REAL*8 ZR1(KDLON), ZR2(KDLON)
+      REAL(KIND=8) ZR1(KDLON), ZR2(KDLON)
       INTEGER jl, i,j
 C
 C* Prescribed Data:
 C
-      REAL*8 APAD(2,3,7), BPAD(2,3,7), D(2,3)
+      REAL(KIND=8) APAD(2,3,7), BPAD(2,3,7), D(2,3)
       SAVE APAD, BPAD, D
 c$OMP THREADPRIVATE(APAD, BPAD, D)
@@ -2334,18 +2335,18 @@
       INTEGER KABS         ! NUMBER OF ABSORBERS
       INTEGER KIND(KABS)   ! INDICES OF THE ABSORBERS
-      REAL*8 PU(KDLON,KABS)  ! ABSORBER AMOUNT
-C
-      REAL*8 PTR(KDLON,KABS) ! TRANSMISSION FUNCTION
+      REAL(KIND=8) PU(KDLON,KABS)  ! ABSORBER AMOUNT
+C
+      REAL(KIND=8) PTR(KDLON,KABS) ! TRANSMISSION FUNCTION
 C
 C* LOCAL VARIABLES:
 C
-      REAL*8 ZR1(KDLON)
-      REAL*8 ZR2(KDLON)
-      REAL*8 ZU(KDLON)
+      REAL(KIND=8) ZR1(KDLON)
+      REAL(KIND=8) ZR2(KDLON)
+      REAL(KIND=8) ZU(KDLON)
       INTEGER jl, ja, i, j, ia
 C
 C* Prescribed Data:
 C
-      REAL*8 APAD(2,3,7), BPAD(2,3,7), D(2,3)
+      REAL(KIND=8) APAD(2,3,7), BPAD(2,3,7), D(2,3)
       SAVE APAD, BPAD, D
 c$OMP THREADPRIVATE(APAD, BPAD, D)
@@ -2468,60 +2469,60 @@
 C-----------------------------------------------------------------------
 cIM ctes ds clesphys.h
-c     REAL*8 RCO2   ! CO2 CONCENTRATION (IPCC:353.E-06* 44.011/28.97)
-c     REAL*8 RCH4   ! CH4 CONCENTRATION (IPCC: 1.72E-06* 16.043/28.97)
-c     REAL*8 RN2O   ! N2O CONCENTRATION (IPCC: 310.E-09* 44.013/28.97)
-c     REAL*8 RCFC11 ! CFC11 CONCENTRATION (IPCC: 280.E-12* 137.3686/28.97)
-c     REAL*8 RCFC12 ! CFC12 CONCENTRATION (IPCC: 484.E-12* 120.9140/28.97)
+c     REAL(KIND=8) RCO2   ! CO2 CONCENTRATION (IPCC:353.E-06* 44.011/28.97)
+c     REAL(KIND=8) RCH4   ! CH4 CONCENTRATION (IPCC: 1.72E-06* 16.043/28.97)
+c     REAL(KIND=8) RN2O   ! N2O CONCENTRATION (IPCC: 310.E-09* 44.013/28.97)
+c     REAL(KIND=8) RCFC11 ! CFC11 CONCENTRATION (IPCC: 280.E-12* 137.3686/28.97)
+c     REAL(KIND=8) RCFC12 ! CFC12 CONCENTRATION (IPCC: 484.E-12* 120.9140/28.97)
 #include "clesphys.h"
-      REAL*8 PCLDLD(KDLON,KFLEV)  ! DOWNWARD EFFECTIVE CLOUD COVER
-      REAL*8 PCLDLU(KDLON,KFLEV)  ! UPWARD EFFECTIVE CLOUD COVER
-      REAL*8 PDP(KDLON,KFLEV)     ! LAYER PRESSURE THICKNESS (Pa)
-      REAL*8 PDT0(KDLON)          ! SURFACE TEMPERATURE DISCONTINUITY (K)
-      REAL*8 PEMIS(KDLON)         ! SURFACE EMISSIVITY
-      REAL*8 PPMB(KDLON,KFLEV+1)  ! HALF LEVEL PRESSURE (mb)
-      REAL*8 PPSOL(KDLON)         ! SURFACE PRESSURE (Pa)
-      REAL(kind=8) POZON(KDLON,KFLEV)   ! O3 mass fraction
-      REAL*8 PTL(KDLON,KFLEV+1)   ! HALF LEVEL TEMPERATURE (K)
-      REAL*8 PAER(KDLON,KFLEV,5)  ! OPTICAL THICKNESS OF THE AEROSOLS
-      REAL*8 PTAVE(KDLON,KFLEV)   ! LAYER TEMPERATURE (K)
-      REAL*8 PVIEW(KDLON)         ! COSECANT OF VIEWING ANGLE
-      REAL*8 PWV(KDLON,KFLEV)     ! SPECIFIC HUMIDITY (kg/kg)
-C
-      REAL*8 PCOLR(KDLON,KFLEV)   ! LONG-WAVE TENDENCY (K/day)
-      REAL*8 PCOLR0(KDLON,KFLEV)  ! LONG-WAVE TENDENCY (K/day) clear-sky
-      REAL*8 PTOPLW(KDLON)        ! LONGWAVE FLUX AT T.O.A.
-      REAL*8 PSOLLW(KDLON)        ! LONGWAVE FLUX AT SURFACE
-      REAL*8 PTOPLW0(KDLON)       ! LONGWAVE FLUX AT T.O.A. (CLEAR-SKY)
-      REAL*8 PSOLLW0(KDLON)       ! LONGWAVE FLUX AT SURFACE (CLEAR-SKY)
+      REAL(KIND=8) PCLDLD(KDLON,KFLEV)  ! DOWNWARD EFFECTIVE CLOUD COVER
+      REAL(KIND=8) PCLDLU(KDLON,KFLEV)  ! UPWARD EFFECTIVE CLOUD COVER
+      REAL(KIND=8) PDP(KDLON,KFLEV)     ! LAYER PRESSURE THICKNESS (Pa)
+      REAL(KIND=8) PDT0(KDLON)          ! SURFACE TEMPERATURE DISCONTINUITY (K)
+      REAL(KIND=8) PEMIS(KDLON)         ! SURFACE EMISSIVITY
+      REAL(KIND=8) PPMB(KDLON,KFLEV+1)  ! HALF LEVEL PRESSURE (mb)
+      REAL(KIND=8) PPSOL(KDLON)         ! SURFACE PRESSURE (Pa)
+      REAL(KIND=8) POZON(KDLON,KFLEV)   ! O3 mass fraction
+      REAL(KIND=8) PTL(KDLON,KFLEV+1)   ! HALF LEVEL TEMPERATURE (K)
+      REAL(KIND=8) PAER(KDLON,KFLEV,5)  ! OPTICAL THICKNESS OF THE AEROSOLS
+      REAL(KIND=8) PTAVE(KDLON,KFLEV)   ! LAYER TEMPERATURE (K)
+      REAL(KIND=8) PVIEW(KDLON)         ! COSECANT OF VIEWING ANGLE
+      REAL(KIND=8) PWV(KDLON,KFLEV)     ! SPECIFIC HUMIDITY (kg/kg)
+C
+      REAL(KIND=8) PCOLR(KDLON,KFLEV)   ! LONG-WAVE TENDENCY (K/day)
+      REAL(KIND=8) PCOLR0(KDLON,KFLEV)  ! LONG-WAVE TENDENCY (K/day) clear-sky
+      REAL(KIND=8) PTOPLW(KDLON)        ! LONGWAVE FLUX AT T.O.A.
+      REAL(KIND=8) PSOLLW(KDLON)        ! LONGWAVE FLUX AT SURFACE
+      REAL(KIND=8) PTOPLW0(KDLON)       ! LONGWAVE FLUX AT T.O.A. (CLEAR-SKY)
+      REAL(KIND=8) PSOLLW0(KDLON)       ! LONGWAVE FLUX AT SURFACE (CLEAR-SKY)
 c Rajout LF
-      real*8 psollwdown(kdlon)    ! LONGWAVE downwards flux at surface
+      real(kind=8) psollwdown(kdlon)    ! LONGWAVE downwards flux at surface
 c Rajout IM
-cIM   real*8 psollwdownclr(kdlon) ! LONGWAVE CS downwards flux at surface
-cIM   real*8 ptoplwdown(kdlon)    ! LONGWAVE downwards flux at T.O.A.
-cIM   real*8 ptoplwdownclr(kdlon) ! LONGWAVE CS downwards flux at T.O.A.
+cIM   real(kind=8) psollwdownclr(kdlon) ! LONGWAVE CS downwards flux at surface
+cIM   real(kind=8) ptoplwdown(kdlon)    ! LONGWAVE downwards flux at T.O.A.
+cIM   real(kind=8) ptoplwdownclr(kdlon) ! LONGWAVE CS downwards flux at T.O.A.
 cIM
-      REAL*8 plwup(KDLON,KFLEV+1)  ! LW up total sky
-      REAL*8 plwup0(KDLON,KFLEV+1) ! LW up clear sky
-      REAL*8 plwdn(KDLON,KFLEV+1)  ! LW down total sky
-      REAL*8 plwdn0(KDLON,KFLEV+1) ! LW down clear sky
+      REAL(KIND=8) plwup(KDLON,KFLEV+1)  ! LW up total sky
+      REAL(KIND=8) plwup0(KDLON,KFLEV+1) ! LW up clear sky
+      REAL(KIND=8) plwdn(KDLON,KFLEV+1)  ! LW down total sky
+      REAL(KIND=8) plwdn0(KDLON,KFLEV+1) ! LW down clear sky
 C-------------------------------------------------------------------------
-      REAL*8 ZABCU(KDLON,NUA,3*KFLEV+1)
+      REAL(KIND=8) ZABCU(KDLON,NUA,3*KFLEV+1)
 
-      REAL(kind=8) ZOZ(KDLON,KFLEV)
+      REAL(KIND=8) ZOZ(KDLON,KFLEV)
 !     equivalent pressure of ozone in a layer, in Pa
 
-cym      REAL*8 ZFLUX(KDLON,2,KFLEV+1) ! RADIATIVE FLUXES (1:up; 2:down)
-cym      REAL*8 ZFLUC(KDLON,2,KFLEV+1) ! CLEAR-SKY RADIATIVE FLUXES
-cym      REAL*8 ZBINT(KDLON,KFLEV+1)            ! Intermediate variable
-cym      REAL*8 ZBSUI(KDLON)                    ! Intermediate variable
-cym      REAL*8,ZCTS(KDLON,KFLEV)               ! Intermediate variable
-cym      REAL*8 ZCNTRB(KDLON,KFLEV+1,KFLEV+1)   ! Intermediate variable
+cym      REAL(KIND=8) ZFLUX(KDLON,2,KFLEV+1) ! RADIATIVE FLUXES (1:up; 2:down)
+cym      REAL(KIND=8) ZFLUC(KDLON,2,KFLEV+1) ! CLEAR-SKY RADIATIVE FLUXES
+cym      REAL(KIND=8) ZBINT(KDLON,KFLEV+1)            ! Intermediate variable
+cym      REAL(KIND=8) ZBSUI(KDLON)                    ! Intermediate variable
+cym      REAL(KIND=8) ZCTS(KDLON,KFLEV)               ! Intermediate variable
+cym      REAL(KIND=8) ZCNTRB(KDLON,KFLEV+1,KFLEV+1)   ! Intermediate variable
 cym      SAVE ZFLUX, ZFLUC, ZBINT, ZBSUI, ZCTS, ZCNTRB
-      REAL*8,allocatable,save :: ZFLUX(:,:,:) ! RADIATIVE FLUXES (1:up; 2:down)
-      REAL*8,allocatable,save :: ZFLUC(:,:,:) ! CLEAR-SKY RADIATIVE FLUXES
-      REAL*8,allocatable,save :: ZBINT(:,:)            ! Intermediate variable
-      REAL*8,allocatable,save :: ZBSUI(:)                    ! Intermediate variable
-      REAL*8,allocatable,save :: ZCTS(:,:)               ! Intermediate variable
-      REAL*8,allocatable,save :: ZCNTRB(:,:,:)   ! Intermediate variable
+      REAL(KIND=8),allocatable,save :: ZFLUX(:,:,:) ! RADIATIVE FLUXES (1:up; 2:down)
+      REAL(KIND=8),allocatable,save :: ZFLUC(:,:,:) ! CLEAR-SKY RADIATIVE FLUXES
+      REAL(KIND=8),allocatable,save :: ZBINT(:,:)            ! Intermediate variable
+      REAL(KIND=8),allocatable,save :: ZBSUI(:)                    ! Intermediate variable
+      REAL(KIND=8),allocatable,save :: ZCTS(:,:)               ! Intermediate variable
+      REAL(KIND=8),allocatable,save :: ZCNTRB(:,:,:)   ! Intermediate variable
 c$OMP THREADPRIVATE(ZFLUX, ZFLUC, ZBINT, ZBSUI, ZCTS, ZCNTRB)
 c
@@ -2652,42 +2653,42 @@
 C* ARGUMENTS:
 cIM ctes ds clesphys.h
-c     REAL*8 RCO2
-c     REAL*8 RCH4, RN2O, RCFC11, RCFC12
+c     REAL(KIND=8) RCO2
+c     REAL(KIND=8) RCH4, RN2O, RCFC11, RCFC12
 #include "clesphys.h"
-      REAL*8 PAER(KDLON,KFLEV,5)
-      REAL*8 PDP(KDLON,KFLEV)
-      REAL*8 PPMB(KDLON,KFLEV+1)
-      REAL*8 PPSOL(KDLON)
-      REAL*8 POZ(KDLON,KFLEV)
-      REAL*8 PTAVE(KDLON,KFLEV)
-      REAL*8 PVIEW(KDLON)
-      REAL*8 PWV(KDLON,KFLEV)
-C
-      REAL*8 PABCU(KDLON,NUA,3*KFLEV+1) ! EFFECTIVE ABSORBER AMOUNTS
+      REAL(KIND=8) PAER(KDLON,KFLEV,5)
+      REAL(KIND=8) PDP(KDLON,KFLEV)
+      REAL(KIND=8) PPMB(KDLON,KFLEV+1)
+      REAL(KIND=8) PPSOL(KDLON)
+      REAL(KIND=8) POZ(KDLON,KFLEV)
+      REAL(KIND=8) PTAVE(KDLON,KFLEV)
+      REAL(KIND=8) PVIEW(KDLON)
+      REAL(KIND=8) PWV(KDLON,KFLEV)
+C
+      REAL(KIND=8) PABCU(KDLON,NUA,3*KFLEV+1) ! EFFECTIVE ABSORBER AMOUNTS
 C
 C-----------------------------------------------------------------------
 C* LOCAL VARIABLES:
-      REAL*8 ZABLY(KDLON,NUA,3*KFLEV+1)
-      REAL*8 ZDUC(KDLON,3*KFLEV+1)
-      REAL*8 ZPHIO(KDLON)
-      REAL*8 ZPSC2(KDLON)
-      REAL*8 ZPSC3(KDLON)
-      REAL*8 ZPSH1(KDLON)
-      REAL*8 ZPSH2(KDLON)
-      REAL*8 ZPSH3(KDLON)
-      REAL*8 ZPSH4(KDLON)
-      REAL*8 ZPSH5(KDLON)
-      REAL*8 ZPSH6(KDLON)
-      REAL*8 ZPSIO(KDLON)
-      REAL*8 ZTCON(KDLON)
-      REAL*8 ZPHM6(KDLON)
-      REAL*8 ZPSM6(KDLON)
-      REAL*8 ZPHN6(KDLON)
-      REAL*8 ZPSN6(KDLON)
-      REAL*8 ZSSIG(KDLON,3*KFLEV+1)
-      REAL*8 ZTAVI(KDLON)
-      REAL*8 ZUAER(KDLON,Ninter)
-      REAL*8 ZXOZ(KDLON)
-      REAL*8 ZXWV(KDLON)
+      REAL(KIND=8) ZABLY(KDLON,NUA,3*KFLEV+1)
+      REAL(KIND=8) ZDUC(KDLON,3*KFLEV+1)
+      REAL(KIND=8) ZPHIO(KDLON)
+      REAL(KIND=8) ZPSC2(KDLON)
+      REAL(KIND=8) ZPSC3(KDLON)
+      REAL(KIND=8) ZPSH1(KDLON)
+      REAL(KIND=8) ZPSH2(KDLON)
+      REAL(KIND=8) ZPSH3(KDLON)
+      REAL(KIND=8) ZPSH4(KDLON)
+      REAL(KIND=8) ZPSH5(KDLON)
+      REAL(KIND=8) ZPSH6(KDLON)
+      REAL(KIND=8) ZPSIO(KDLON)
+      REAL(KIND=8) ZTCON(KDLON)
+      REAL(KIND=8) ZPHM6(KDLON)
+      REAL(KIND=8) ZPSM6(KDLON)
+      REAL(KIND=8) ZPHN6(KDLON)
+      REAL(KIND=8) ZPSN6(KDLON)
+      REAL(KIND=8) ZSSIG(KDLON,3*KFLEV+1)
+      REAL(KIND=8) ZTAVI(KDLON)
+      REAL(KIND=8) ZUAER(KDLON,Ninter)
+      REAL(KIND=8) ZXOZ(KDLON)
+      REAL(KIND=8) ZXWV(KDLON)
 C
       INTEGER jl, jk, jkj, jkjr, jkjp, ig1
@@ -2696,31 +2697,31 @@
       INTEGER jae1, jae2, jae3, jae, jjpn
       INTEGER ir, jc, jcp1
-      REAL*8 zdpm, zupm, zupmh2o, zupmco2, zupmo3, zu6, zup
-      REAL*8 zfppw, ztx, ztx2, zzably
-      REAL*8 zcah1, zcbh1, zcah2, zcbh2, zcah3, zcbh3
-      REAL*8 zcah4, zcbh4, zcah5, zcbh5, zcah6, zcbh6
-      REAL*8 zcac8, zcbc8
-      REAL*8 zalup, zdiff
+      REAL(KIND=8) zdpm, zupm, zupmh2o, zupmco2, zupmo3, zu6, zup
+      REAL(KIND=8) zfppw, ztx, ztx2, zzably
+      REAL(KIND=8) zcah1, zcbh1, zcah2, zcbh2, zcah3, zcbh3
+      REAL(KIND=8) zcah4, zcbh4, zcah5, zcbh5, zcah6, zcbh6
+      REAL(KIND=8) zcac8, zcbc8
+      REAL(KIND=8) zalup, zdiff
 c
-      REAL*8 PVGCO2, PVGH2O, PVGO3
-C
-      REAL*8 R10E  ! DECIMAL/NATURAL LOG.FACTOR
+      REAL(KIND=8) PVGCO2, PVGH2O, PVGO3
+C
+      REAL(KIND=8) R10E  ! DECIMAL/NATURAL LOG.FACTOR
       PARAMETER (R10E=0.4342945)
 c
 c Used Data Block:
 c
-      REAL*8 TREF
+      REAL(KIND=8) TREF
       SAVE TREF
 c$OMP THREADPRIVATE(TREF)
-      REAL*8 RT1(2)
+      REAL(KIND=8) RT1(2)
       SAVE RT1
 c$OMP THREADPRIVATE(RT1)
-      REAL*8 RAER(5,5)
+      REAL(KIND=8) RAER(5,5)
       SAVE RAER
 c$OMP THREADPRIVATE(RAER)
-      REAL*8 AT(8,3), BT(8,3)
+      REAL(KIND=8) AT(8,3), BT(8,3)
       SAVE AT, BT
 c$OMP THREADPRIVATE(AT, BT)
-      REAL*8 OCT(4)
+      REAL(KIND=8) OCT(4)
       SAVE OCT
 c$OMP THREADPRIVATE(OCT)
@@ -3053,32 +3054,32 @@
       INTEGER KLIM
 C
-      REAL*8 PDP(KDLON,KFLEV)
-      REAL*8 PDT0(KDLON)
-      REAL*8 PEMIS(KDLON)
-      REAL*8 PPMB(KDLON,KFLEV+1)
-      REAL*8 PTL(KDLON,KFLEV+1)
-      REAL*8 PTAVE(KDLON,KFLEV)
-C
-      REAL*8 PFLUC(KDLON,2,KFLEV+1)
+      REAL(KIND=8) PDP(KDLON,KFLEV)
+      REAL(KIND=8) PDT0(KDLON)
+      REAL(KIND=8) PEMIS(KDLON)
+      REAL(KIND=8) PPMB(KDLON,KFLEV+1)
+      REAL(KIND=8) PTL(KDLON,KFLEV+1)
+      REAL(KIND=8) PTAVE(KDLON,KFLEV)
+C
+      REAL(KIND=8) PFLUC(KDLON,2,KFLEV+1)
 C     
-      REAL*8 PABCU(KDLON,NUA,3*KFLEV+1)
-      REAL*8 PBINT(KDLON,KFLEV+1)
-      REAL*8 PBSUI(KDLON)
-      REAL*8 PCTS(KDLON,KFLEV)
-      REAL*8 PCNTRB(KDLON,KFLEV+1,KFLEV+1)
+      REAL(KIND=8) PABCU(KDLON,NUA,3*KFLEV+1)
+      REAL(KIND=8) PBINT(KDLON,KFLEV+1)
+      REAL(KIND=8) PBSUI(KDLON)
+      REAL(KIND=8) PCTS(KDLON,KFLEV)
+      REAL(KIND=8) PCNTRB(KDLON,KFLEV+1,KFLEV+1)
 C
 C-------------------------------------------------------------------------
 C
 C* LOCAL VARIABLES:
-      REAL*8 ZB(KDLON,Ninter,KFLEV+1)
-      REAL*8 ZBSUR(KDLON,Ninter)
-      REAL*8 ZBTOP(KDLON,Ninter)
-      REAL*8 ZDBSL(KDLON,Ninter,KFLEV*2)
-      REAL*8 ZGA(KDLON,8,2,KFLEV)
-      REAL*8 ZGB(KDLON,8,2,KFLEV)
-      REAL*8 ZGASUR(KDLON,8,2)
-      REAL*8 ZGBSUR(KDLON,8,2)
-      REAL*8 ZGATOP(KDLON,8,2)
-      REAL*8 ZGBTOP(KDLON,8,2)
+      REAL(KIND=8) ZB(KDLON,Ninter,KFLEV+1)
+      REAL(KIND=8) ZBSUR(KDLON,Ninter)
+      REAL(KIND=8) ZBTOP(KDLON,Ninter)
+      REAL(KIND=8) ZDBSL(KDLON,Ninter,KFLEV*2)
+      REAL(KIND=8) ZGA(KDLON,8,2,KFLEV)
+      REAL(KIND=8) ZGB(KDLON,8,2,KFLEV)
+      REAL(KIND=8) ZGASUR(KDLON,8,2)
+      REAL(KIND=8) ZGBSUR(KDLON,8,2)
+      REAL(KIND=8) ZGATOP(KDLON,8,2)
+      REAL(KIND=8) ZGBTOP(KDLON,8,2)
 C
       INTEGER nuaer, ntraer
@@ -3156,28 +3157,29 @@
 C* ARGUMENTS:
       INTEGER klim
-      REAL*8 PFLUC(KDLON,2,KFLEV+1) ! CLEAR-SKY RADIATIVE FLUXES
-      REAL*8 PBINT(KDLON,KFLEV+1)   ! HALF LEVEL PLANCK FUNCTION
-      REAL*8 PBSUIN(KDLON)          ! SURFACE PLANCK FUNCTION
-      REAL*8 PCNTRB(KDLON,KFLEV+1,KFLEV+1) !CLEAR-SKY ENERGY EXCHANGE
-      REAL*8 PCTS(KDLON,KFLEV)      ! CLEAR-SKY LAYER COOLING-TO-SPACE
+      REAL(KIND=8) PFLUC(KDLON,2,KFLEV+1) ! CLEAR-SKY RADIATIVE FLUXES
+      REAL(KIND=8) PBINT(KDLON,KFLEV+1)   ! HALF LEVEL PLANCK FUNCTION
+      REAL(KIND=8) PBSUIN(KDLON)          ! SURFACE PLANCK FUNCTION
+      REAL(KIND=8) PCNTRB(KDLON,KFLEV+1,KFLEV+1) !CLEAR-SKY ENERGY EXCHANGE
+      REAL(KIND=8) PCTS(KDLON,KFLEV)      ! CLEAR-SKY LAYER COOLING-TO-SPACE
 c
-      REAL*8 PCLDLD(KDLON,KFLEV)
-      REAL*8 PCLDLU(KDLON,KFLEV)
-      REAL*8 PEMIS(KDLON)
-C
-      REAL*8 PFLUX(KDLON,2,KFLEV+1)
+      REAL(KIND=8) PCLDLD(KDLON,KFLEV)
+      REAL(KIND=8) PCLDLU(KDLON,KFLEV)
+      REAL(KIND=8) PEMIS(KDLON)
+C
+      REAL(KIND=8) PFLUX(KDLON,2,KFLEV+1)
 C-----------------------------------------------------------------------
 C* LOCAL VARIABLES:
       INTEGER IMX(KDLON), IMXP(KDLON)
 C
-      REAL*8 ZCLEAR(KDLON),ZCLOUD(KDLON),ZDNF(KDLON,KFLEV+1,KFLEV+1)
+      REAL(KIND=8) ZCLEAR(KDLON),ZCLOUD(KDLON),
+     $     ZDNF(KDLON,KFLEV+1,KFLEV+1)
      S  , ZFD(KDLON), ZFN10(KDLON), ZFU(KDLON)
      S  , ZUPF(KDLON,KFLEV+1,KFLEV+1)
-      REAL*8 ZCLM(KDLON,KFLEV+1,KFLEV+1)
+      REAL(KIND=8) ZCLM(KDLON,KFLEV+1,KFLEV+1)
 C
       INTEGER jk, jl, imaxc, imx1, imx2, jkj, jkp1, jkm1
       INTEGER jk1, jk2, jkc, jkcp1, jcloud
       INTEGER imxm1, imxp1
-      REAL*8 zcfrac
+      REAL(KIND=8) zcfrac
 C     ------------------------------------------------------------------
 C
@@ -3565,26 +3567,26 @@
 C ARGUMENTS:
 C
-      REAL*8 PDT0(KDLON)
-      REAL*8 PTAVE(KDLON,KFLEV)
-      REAL*8 PTL(KDLON,KFLEV+1)
-C
-      REAL*8 PB(KDLON,Ninter,KFLEV+1) ! SPECTRAL HALF LEVEL PLANCK FUNCTION
-      REAL*8 PBINT(KDLON,KFLEV+1) ! HALF LEVEL PLANCK FUNCTION
-      REAL*8 PBSUIN(KDLON) ! SURFACE PLANCK FUNCTION
-      REAL*8 PBSUR(KDLON,Ninter) ! SURFACE SPECTRAL PLANCK FUNCTION
-      REAL*8 PBTOP(KDLON,Ninter) ! TOP SPECTRAL PLANCK FUNCTION
-      REAL*8 PDBSL(KDLON,Ninter,KFLEV*2) ! SUB-LAYER PLANCK FUNCTION GRADIENT
-      REAL*8 PGA(KDLON,8,2,KFLEV) ! dB/dT-weighted LAYER PADE APPROXIMANTS
-      REAL*8 PGB(KDLON,8,2,KFLEV) ! dB/dT-weighted LAYER PADE APPROXIMANTS
-      REAL*8 PGASUR(KDLON,8,2) ! SURFACE PADE APPROXIMANTS
-      REAL*8 PGBSUR(KDLON,8,2) ! SURFACE PADE APPROXIMANTS
-      REAL*8 PGATOP(KDLON,8,2) ! T.O.A. PADE APPROXIMANTS
-      REAL*8 PGBTOP(KDLON,8,2) ! T.O.A. PADE APPROXIMANTS
+      REAL(KIND=8) PDT0(KDLON)
+      REAL(KIND=8) PTAVE(KDLON,KFLEV)
+      REAL(KIND=8) PTL(KDLON,KFLEV+1)
+C
+      REAL(KIND=8) PB(KDLON,Ninter,KFLEV+1) ! SPECTRAL HALF LEVEL PLANCK FUNCTION
+      REAL(KIND=8) PBINT(KDLON,KFLEV+1) ! HALF LEVEL PLANCK FUNCTION
+      REAL(KIND=8) PBSUIN(KDLON) ! SURFACE PLANCK FUNCTION
+      REAL(KIND=8) PBSUR(KDLON,Ninter) ! SURFACE SPECTRAL PLANCK FUNCTION
+      REAL(KIND=8) PBTOP(KDLON,Ninter) ! TOP SPECTRAL PLANCK FUNCTION
+      REAL(KIND=8) PDBSL(KDLON,Ninter,KFLEV*2) ! SUB-LAYER PLANCK FUNCTION GRADIENT
+      REAL(KIND=8) PGA(KDLON,8,2,KFLEV) ! dB/dT-weighted LAYER PADE APPROXIMANTS
+      REAL(KIND=8) PGB(KDLON,8,2,KFLEV) ! dB/dT-weighted LAYER PADE APPROXIMANTS
+      REAL(KIND=8) PGASUR(KDLON,8,2) ! SURFACE PADE APPROXIMANTS
+      REAL(KIND=8) PGBSUR(KDLON,8,2) ! SURFACE PADE APPROXIMANTS
+      REAL(KIND=8) PGATOP(KDLON,8,2) ! T.O.A. PADE APPROXIMANTS
+      REAL(KIND=8) PGBTOP(KDLON,8,2) ! T.O.A. PADE APPROXIMANTS
 C
 C-------------------------------------------------------------------------
 C*  LOCAL VARIABLES:
       INTEGER INDB(KDLON),INDS(KDLON)
-      REAL*8 ZBLAY(KDLON,KFLEV),ZBLEV(KDLON,KFLEV+1)
-      REAL*8 ZRES(KDLON),ZRES2(KDLON),ZTI(KDLON),ZTI2(KDLON)
+      REAL(KIND=8) ZBLAY(KDLON,KFLEV),ZBLEV(KDLON,KFLEV+1)
+      REAL(KIND=8) ZRES(KDLON),ZRES2(KDLON),ZTI(KDLON),ZTI2(KDLON)
 c
       INTEGER jk, jl, ic, jnu, jf, jg
@@ -3592,10 +3594,10 @@
       INTEGER k, j, ixtox, indto, ixtx, indt
       INTEGER indsu, indtp
-      REAL*8 zdsto1, zdstox, zdst1, zdstx
+      REAL(KIND=8) zdsto1, zdstox, zdst1, zdstx
 c
 C* Quelques parametres:
-      REAL*8 TSTAND
+      REAL(KIND=8) TSTAND
       PARAMETER (TSTAND=250.0)
-      REAL*8 TSTP
+      REAL(KIND=8) TSTP
       PARAMETER (TSTP=12.5)
       INTEGER MXIXT
@@ -3603,11 +3605,11 @@
 C
 C* Used Data Block:
-      REAL*8 TINTP(11)
+      REAL(KIND=8) TINTP(11)
       SAVE TINTP
 c$OMP THREADPRIVATE(TINTP)
-      REAL*8 GA(11,16,3), GB(11,16,3)
+      REAL(KIND=8) GA(11,16,3), GB(11,16,3)
       SAVE GA, GB
 c$OMP THREADPRIVATE(GA, GB)
-      REAL*8 XP(6,6)
+      REAL(KIND=8) XP(6,6)
       SAVE XP
 c$OMP THREADPRIVATE(XP)
@@ -4964,31 +4966,31 @@
       INTEGER KUAER,KTRAER, KLIM
 C
-      REAL*8 PABCU(KDLON,NUA,3*KFLEV+1) ! EFFECTIVE ABSORBER AMOUNTS
-      REAL*8 PB(KDLON,Ninter,KFLEV+1) ! SPECTRAL HALF-LEVEL PLANCK FUNCTIONS
-      REAL*8 PBINT(KDLON,KFLEV+1) ! HALF-LEVEL PLANCK FUNCTIONS
-      REAL*8 PBSUR(KDLON,Ninter) ! SURFACE SPECTRAL PLANCK FUNCTION
-      REAL*8 PBSUIN(KDLON) ! SURFACE PLANCK FUNCTION
-      REAL*8 PBTOP(KDLON,Ninter) ! T.O.A. SPECTRAL PLANCK FUNCTION
-      REAL*8 PDBSL(KDLON,Ninter,KFLEV*2) ! SUB-LAYER PLANCK FUNCTION GRADIENT
-      REAL*8 PEMIS(KDLON) ! SURFACE EMISSIVITY
-      REAL*8 PPMB(KDLON,KFLEV+1) ! HALF-LEVEL PRESSURE (MB)
-      REAL*8 PTAVE(KDLON,KFLEV) ! TEMPERATURE
-      REAL*8 PGA(KDLON,8,2,KFLEV) ! PADE APPROXIMANTS
-      REAL*8 PGB(KDLON,8,2,KFLEV) ! PADE APPROXIMANTS
-      REAL*8 PGASUR(KDLON,8,2) ! PADE APPROXIMANTS
-      REAL*8 PGBSUR(KDLON,8,2) ! PADE APPROXIMANTS
-      REAL*8 PGATOP(KDLON,8,2) ! PADE APPROXIMANTS
-      REAL*8 PGBTOP(KDLON,8,2) ! PADE APPROXIMANTS
-C
-      REAL*8 PCNTRB(KDLON,KFLEV+1,KFLEV+1) ! CLEAR-SKY ENERGY EXCHANGE MATRIX
-      REAL*8 PCTS(KDLON,KFLEV) ! COOLING-TO-SPACE TERM
-      REAL*8 PFLUC(KDLON,2,KFLEV+1) ! CLEAR-SKY RADIATIVE FLUXES
+      REAL(KIND=8) PABCU(KDLON,NUA,3*KFLEV+1) ! EFFECTIVE ABSORBER AMOUNTS
+      REAL(KIND=8) PB(KDLON,Ninter,KFLEV+1) ! SPECTRAL HALF-LEVEL PLANCK FUNCTIONS
+      REAL(KIND=8) PBINT(KDLON,KFLEV+1) ! HALF-LEVEL PLANCK FUNCTIONS
+      REAL(KIND=8) PBSUR(KDLON,Ninter) ! SURFACE SPECTRAL PLANCK FUNCTION
+      REAL(KIND=8) PBSUIN(KDLON) ! SURFACE PLANCK FUNCTION
+      REAL(KIND=8) PBTOP(KDLON,Ninter) ! T.O.A. SPECTRAL PLANCK FUNCTION
+      REAL(KIND=8) PDBSL(KDLON,Ninter,KFLEV*2) ! SUB-LAYER PLANCK FUNCTION GRADIENT
+      REAL(KIND=8) PEMIS(KDLON) ! SURFACE EMISSIVITY
+      REAL(KIND=8) PPMB(KDLON,KFLEV+1) ! HALF-LEVEL PRESSURE (MB)
+      REAL(KIND=8) PTAVE(KDLON,KFLEV) ! TEMPERATURE
+      REAL(KIND=8) PGA(KDLON,8,2,KFLEV) ! PADE APPROXIMANTS
+      REAL(KIND=8) PGB(KDLON,8,2,KFLEV) ! PADE APPROXIMANTS
+      REAL(KIND=8) PGASUR(KDLON,8,2) ! PADE APPROXIMANTS
+      REAL(KIND=8) PGBSUR(KDLON,8,2) ! PADE APPROXIMANTS
+      REAL(KIND=8) PGATOP(KDLON,8,2) ! PADE APPROXIMANTS
+      REAL(KIND=8) PGBTOP(KDLON,8,2) ! PADE APPROXIMANTS
+C
+      REAL(KIND=8) PCNTRB(KDLON,KFLEV+1,KFLEV+1) ! CLEAR-SKY ENERGY EXCHANGE MATRIX
+      REAL(KIND=8) PCTS(KDLON,KFLEV) ! COOLING-TO-SPACE TERM
+      REAL(KIND=8) PFLUC(KDLON,2,KFLEV+1) ! CLEAR-SKY RADIATIVE FLUXES
 C-----------------------------------------------------------------------
 C LOCAL VARIABLES:
-      REAL*8 ZADJD(KDLON,KFLEV+1)
-      REAL*8 ZADJU(KDLON,KFLEV+1)
-      REAL*8 ZDBDT(KDLON,Ninter,KFLEV)
-      REAL*8 ZDISD(KDLON,KFLEV+1)
-      REAL*8 ZDISU(KDLON,KFLEV+1)
+      REAL(KIND=8) ZADJD(KDLON,KFLEV+1)
+      REAL(KIND=8) ZADJU(KDLON,KFLEV+1)
+      REAL(KIND=8) ZDBDT(KDLON,Ninter,KFLEV)
+      REAL(KIND=8) ZDISD(KDLON,KFLEV+1)
+      REAL(KIND=8) ZDISU(KDLON,KFLEV+1)
 C
       INTEGER jk, jl
@@ -5081,43 +5083,43 @@
       INTEGER KUAER,KTRAER, KLIM
 C
-      REAL*8 PABCU(KDLON,NUA,3*KFLEV+1) ! ABSORBER AMOUNTS
-      REAL*8 PADJD(KDLON,KFLEV+1) ! CONTRIBUTION BY ADJACENT LAYERS
-      REAL*8 PADJU(KDLON,KFLEV+1) ! CONTRIBUTION BY ADJACENT LAYERS
-      REAL*8 PB(KDLON,Ninter,KFLEV+1) ! SPECTRAL HALF-LEVEL PLANCK FUNCTIONS
-      REAL*8 PBINT(KDLON,KFLEV+1) ! HALF-LEVEL PLANCK FUNCTIONS
-      REAL*8 PBSUR(KDLON,Ninter) ! SPECTRAL SURFACE PLANCK FUNCTION
-      REAL*8 PBSUI(KDLON) ! SURFACE PLANCK FUNCTION
-      REAL*8 PBTOP(KDLON,Ninter) ! SPECTRAL T.O.A. PLANCK FUNCTION
-      REAL*8 PDISD(KDLON,KFLEV+1) ! CONTRIBUTION BY DISTANT LAYERS
-      REAL*8 PDISU(KDLON,KFLEV+1) ! CONTRIBUTION BY DISTANT LAYERS
-      REAL*8 PEMIS(KDLON) ! SURFACE EMISSIVITY
-      REAL*8 PPMB(KDLON,KFLEV+1) ! PRESSURE MB
-      REAL*8 PGA(KDLON,8,2,KFLEV) ! PADE APPROXIMANTS
-      REAL*8 PGB(KDLON,8,2,KFLEV) ! PADE APPROXIMANTS
-      REAL*8 PGASUR(KDLON,8,2) ! SURFACE PADE APPROXIMANTS
-      REAL*8 PGBSUR(KDLON,8,2) ! SURFACE PADE APPROXIMANTS
-      REAL*8 PGATOP(KDLON,8,2) ! T.O.A. PADE APPROXIMANTS
-      REAL*8 PGBTOP(KDLON,8,2) ! T.O.A. PADE APPROXIMANTS
-C
-      REAL*8 PFLUC(KDLON,2,KFLEV+1) ! CLEAR-SKY RADIATIVE FLUXES
-      REAL*8 PCTS(KDLON,KFLEV) ! COOLING-TO-SPACE TERM
+      REAL(KIND=8) PABCU(KDLON,NUA,3*KFLEV+1) ! ABSORBER AMOUNTS
+      REAL(KIND=8) PADJD(KDLON,KFLEV+1) ! CONTRIBUTION BY ADJACENT LAYERS
+      REAL(KIND=8) PADJU(KDLON,KFLEV+1) ! CONTRIBUTION BY ADJACENT LAYERS
+      REAL(KIND=8) PB(KDLON,Ninter,KFLEV+1) ! SPECTRAL HALF-LEVEL PLANCK FUNCTIONS
+      REAL(KIND=8) PBINT(KDLON,KFLEV+1) ! HALF-LEVEL PLANCK FUNCTIONS
+      REAL(KIND=8) PBSUR(KDLON,Ninter) ! SPECTRAL SURFACE PLANCK FUNCTION
+      REAL(KIND=8) PBSUI(KDLON) ! SURFACE PLANCK FUNCTION
+      REAL(KIND=8) PBTOP(KDLON,Ninter) ! SPECTRAL T.O.A. PLANCK FUNCTION
+      REAL(KIND=8) PDISD(KDLON,KFLEV+1) ! CONTRIBUTION BY DISTANT LAYERS
+      REAL(KIND=8) PDISU(KDLON,KFLEV+1) ! CONTRIBUTION BY DISTANT LAYERS
+      REAL(KIND=8) PEMIS(KDLON) ! SURFACE EMISSIVITY
+      REAL(KIND=8) PPMB(KDLON,KFLEV+1) ! PRESSURE MB
+      REAL(KIND=8) PGA(KDLON,8,2,KFLEV) ! PADE APPROXIMANTS
+      REAL(KIND=8) PGB(KDLON,8,2,KFLEV) ! PADE APPROXIMANTS
+      REAL(KIND=8) PGASUR(KDLON,8,2) ! SURFACE PADE APPROXIMANTS
+      REAL(KIND=8) PGBSUR(KDLON,8,2) ! SURFACE PADE APPROXIMANTS
+      REAL(KIND=8) PGATOP(KDLON,8,2) ! T.O.A. PADE APPROXIMANTS
+      REAL(KIND=8) PGBTOP(KDLON,8,2) ! T.O.A. PADE APPROXIMANTS
+C
+      REAL(KIND=8) PFLUC(KDLON,2,KFLEV+1) ! CLEAR-SKY RADIATIVE FLUXES
+      REAL(KIND=8) PCTS(KDLON,KFLEV) ! COOLING-TO-SPACE TERM
 C
 C* LOCAL VARIABLES:
 C
-      REAL*8 ZBGND(KDLON)
-      REAL*8 ZFD(KDLON)
-      REAL*8  ZFN10(KDLON)
-      REAL*8 ZFU(KDLON)
-      REAL*8  ZTT(KDLON,NTRA)
-      REAL*8 ZTT1(KDLON,NTRA)
-      REAL*8 ZTT2(KDLON,NTRA)
-      REAL*8  ZUU(KDLON,NUA) 
-      REAL*8 ZCNSOL(KDLON)
-      REAL*8 ZCNTOP(KDLON)
+      REAL(KIND=8) ZBGND(KDLON)
+      REAL(KIND=8) ZFD(KDLON)
+      REAL(KIND=8)  ZFN10(KDLON)
+      REAL(KIND=8) ZFU(KDLON)
+      REAL(KIND=8)  ZTT(KDLON,NTRA)
+      REAL(KIND=8) ZTT1(KDLON,NTRA)
+      REAL(KIND=8) ZTT2(KDLON,NTRA)
+      REAL(KIND=8)  ZUU(KDLON,NUA) 
+      REAL(KIND=8) ZCNSOL(KDLON)
+      REAL(KIND=8) ZCNTOP(KDLON)
 C
       INTEGER jk, jl, ja
       INTEGER jstra, jstru
       INTEGER ind1, ind2, ind3, ind4, in, jlim
-      REAL*8 zctstr
+      REAL(KIND=8) zctstr
 C-----------------------------------------------------------------------
 C
@@ -5406,25 +5408,25 @@
       INTEGER KUAER,KTRAER
 C
-      REAL*8 PABCU(KDLON,NUA,3*KFLEV+1) ! ABSORBER AMOUNTS
-      REAL*8 PDBDT(KDLON,Ninter,KFLEV) ! LAYER PLANCK FUNCTION GRADIENT
-      REAL*8 PGA(KDLON,8,2,KFLEV) ! PADE APPROXIMANTS
-      REAL*8 PGB(KDLON,8,2,KFLEV) ! PADE APPROXIMANTS
-C
-      REAL*8 PCNTRB(KDLON,KFLEV+1,KFLEV+1) ! ENERGY EXCHANGE MATRIX
-      REAL*8 PDISD(KDLON,KFLEV+1) !  CONTRIBUTION BY DISTANT LAYERS
-      REAL*8 PDISU(KDLON,KFLEV+1) !  CONTRIBUTION BY DISTANT LAYERS
+      REAL(KIND=8) PABCU(KDLON,NUA,3*KFLEV+1) ! ABSORBER AMOUNTS
+      REAL(KIND=8) PDBDT(KDLON,Ninter,KFLEV) ! LAYER PLANCK FUNCTION GRADIENT
+      REAL(KIND=8) PGA(KDLON,8,2,KFLEV) ! PADE APPROXIMANTS
+      REAL(KIND=8) PGB(KDLON,8,2,KFLEV) ! PADE APPROXIMANTS
+C
+      REAL(KIND=8) PCNTRB(KDLON,KFLEV+1,KFLEV+1) ! ENERGY EXCHANGE MATRIX
+      REAL(KIND=8) PDISD(KDLON,KFLEV+1) !  CONTRIBUTION BY DISTANT LAYERS
+      REAL(KIND=8) PDISU(KDLON,KFLEV+1) !  CONTRIBUTION BY DISTANT LAYERS
 C
 C* LOCAL VARIABLES:
 C
-      REAL*8 ZGLAYD(KDLON)
-      REAL*8 ZGLAYU(KDLON)
-      REAL*8 ZTT(KDLON,NTRA)
-      REAL*8 ZTT1(KDLON,NTRA)
-      REAL*8 ZTT2(KDLON,NTRA)
+      REAL(KIND=8) ZGLAYD(KDLON)
+      REAL(KIND=8) ZGLAYU(KDLON)
+      REAL(KIND=8) ZTT(KDLON,NTRA)
+      REAL(KIND=8) ZTT1(KDLON,NTRA)
+      REAL(KIND=8) ZTT2(KDLON,NTRA)
 C
       INTEGER jl, jk, ja, ikp1, ikn, ikd1, jkj, ikd2
       INTEGER ikjp1, ikm1, ikj, jlk, iku1, ijkl, iku2
       INTEGER ind1, ind2, ind3, ind4, itt
-      REAL*8 zww, zdzxdg, zdzxmg
+      REAL(KIND=8) zww, zdzxdg, zdzxmg
 C
 C*         1.    INITIALIZATION
@@ -5661,30 +5663,30 @@
       INTEGER KUAER,KTRAER
 C
-      REAL*8 PABCU(KDLON,NUA,3*KFLEV+1) ! ABSORBER AMOUNTS
-      REAL*8 PDBSL(KDLON,Ninter,KFLEV*2) ! SUB-LAYER PLANCK FUNCTION GRADIENT
-      REAL*8 PGA(KDLON,8,2,KFLEV) ! PADE APPROXIMANTS
-      REAL*8 PGB(KDLON,8,2,KFLEV) ! PADE APPROXIMANTS
-C
-      REAL*8 PADJD(KDLON,KFLEV+1) ! CONTRIBUTION OF ADJACENT LAYERS
-      REAL*8 PADJU(KDLON,KFLEV+1) ! CONTRIBUTION OF ADJACENT LAYERS
-      REAL*8 PCNTRB(KDLON,KFLEV+1,KFLEV+1) ! CLEAR-SKY ENERGY EXCHANGE MATRIX
-      REAL*8 PDBDT(KDLON,Ninter,KFLEV) !  LAYER PLANCK FUNCTION GRADIENT
+      REAL(KIND=8) PABCU(KDLON,NUA,3*KFLEV+1) ! ABSORBER AMOUNTS
+      REAL(KIND=8) PDBSL(KDLON,Ninter,KFLEV*2) ! SUB-LAYER PLANCK FUNCTION GRADIENT
+      REAL(KIND=8) PGA(KDLON,8,2,KFLEV) ! PADE APPROXIMANTS
+      REAL(KIND=8) PGB(KDLON,8,2,KFLEV) ! PADE APPROXIMANTS
+C
+      REAL(KIND=8) PADJD(KDLON,KFLEV+1) ! CONTRIBUTION OF ADJACENT LAYERS
+      REAL(KIND=8) PADJU(KDLON,KFLEV+1) ! CONTRIBUTION OF ADJACENT LAYERS
+      REAL(KIND=8) PCNTRB(KDLON,KFLEV+1,KFLEV+1) ! CLEAR-SKY ENERGY EXCHANGE MATRIX
+      REAL(KIND=8) PDBDT(KDLON,Ninter,KFLEV) !  LAYER PLANCK FUNCTION GRADIENT
 C
 C* LOCAL ARRAYS:
 C
-      REAL*8 ZGLAYD(KDLON)
-      REAL*8 ZGLAYU(KDLON)
-      REAL*8 ZTT(KDLON,NTRA)
-      REAL*8 ZTT1(KDLON,NTRA)
-      REAL*8 ZTT2(KDLON,NTRA)
-      REAL*8 ZUU(KDLON,NUA)
+      REAL(KIND=8) ZGLAYD(KDLON)
+      REAL(KIND=8) ZGLAYU(KDLON)
+      REAL(KIND=8) ZTT(KDLON,NTRA)
+      REAL(KIND=8) ZTT1(KDLON,NTRA)
+      REAL(KIND=8) ZTT2(KDLON,NTRA)
+      REAL(KIND=8) ZUU(KDLON,NUA)
 C
       INTEGER jk, jl, ja, im12, ind, inu, ixu, jg
       INTEGER ixd, ibs, idd, imu, jk1, jk2, jnu
-      REAL*8 zwtr
+      REAL(KIND=8) zwtr
 c
 C* Data Block:
 c
-      REAL*8 WG1(2)
+      REAL(KIND=8) WG1(2)
       SAVE WG1
 c$OMP THREADPRIVATE(WG1)
@@ -5870,27 +5872,27 @@
 C
 C-----------------------------------------------------------------------
-      REAL*8 O1H, O2H
+      REAL(KIND=8) O1H, O2H
       PARAMETER (O1H=2230.)
       PARAMETER (O2H=100.)
-      REAL*8 RPIALF0
+      REAL(KIND=8) RPIALF0
       PARAMETER (RPIALF0=2.0)
 C
 C* ARGUMENTS:
 C
-      REAL*8 PUU(KDLON,NUA)
-      REAL*8 PTT(KDLON,NTRA)
-      REAL*8 PGA(KDLON,8,2)
-      REAL*8 PGB(KDLON,8,2)
+      REAL(KIND=8) PUU(KDLON,NUA)
+      REAL(KIND=8) PTT(KDLON,NTRA)
+      REAL(KIND=8) PGA(KDLON,8,2)
+      REAL(KIND=8) PGB(KDLON,8,2)
 C
 C* LOCAL VARIABLES:
 C
-      REAL*8 zz, zxd, zxn
-      REAL*8 zpu, zpu10, zpu11, zpu12, zpu13
-      REAL*8 zeu, zeu10, zeu11, zeu12, zeu13
-      REAL*8 zx, zy, zsq1, zsq2, zvxy, zuxy
-      REAL*8 zaercn, zto1, zto2, zxch4, zych4, zxn2o, zyn2o
-      REAL*8 zsqn21, zodn21, zsqh42, zodh42
-      REAL*8 zsqh41, zodh41, zsqn22, zodn22, zttf11, zttf12
-      REAL*8 zuu11, zuu12, za11, za12
+      REAL(KIND=8) zz, zxd, zxn
+      REAL(KIND=8) zpu, zpu10, zpu11, zpu12, zpu13
+      REAL(KIND=8) zeu, zeu10, zeu11, zeu12, zeu13
+      REAL(KIND=8) zx, zy, zsq1, zsq2, zvxy, zuxy
+      REAL(KIND=8) zaercn, zto1, zto2, zxch4, zych4, zxn2o, zyn2o
+      REAL(KIND=8) zsqn21, zodn21, zsqh42, zodh42
+      REAL(KIND=8) zsqh41, zodh41, zsqn22, zodn22, zttf11, zttf12
+      REAL(KIND=8) zuu11, zuu12, za11, za12
       INTEGER jl, ja
 C     ------------------------------------------------------------------
@@ -6046,29 +6048,29 @@
 C
 C-----------------------------------------------------------------------
-      REAL*8 O1H, O2H
+      REAL(KIND=8) O1H, O2H
       PARAMETER (O1H=2230.)
       PARAMETER (O2H=100.)
-      REAL*8 RPIALF0
+      REAL(KIND=8) RPIALF0
       PARAMETER (RPIALF0=2.0)
 C
 C* ARGUMENTS:
 C
-      REAL*8 PGA(KDLON,8,2) ! PADE APPROXIMANTS
-      REAL*8 PGB(KDLON,8,2) ! PADE APPROXIMANTS
-      REAL*8 PUU1(KDLON,NUA) ! ABSORBER AMOUNTS FROM TOP TO LEVEL 1
-      REAL*8 PUU2(KDLON,NUA) ! ABSORBER AMOUNTS FROM TOP TO LEVEL 2
-      REAL*8 PTT(KDLON,NTRA) ! TRANSMISSION FUNCTIONS
+      REAL(KIND=8) PGA(KDLON,8,2) ! PADE APPROXIMANTS
+      REAL(KIND=8) PGB(KDLON,8,2) ! PADE APPROXIMANTS
+      REAL(KIND=8) PUU1(KDLON,NUA) ! ABSORBER AMOUNTS FROM TOP TO LEVEL 1
+      REAL(KIND=8) PUU2(KDLON,NUA) ! ABSORBER AMOUNTS FROM TOP TO LEVEL 2
+      REAL(KIND=8) PTT(KDLON,NTRA) ! TRANSMISSION FUNCTIONS
 C
 C* LOCAL VARIABLES:
 C
       INTEGER ja, jl
-      REAL*8 zz, zxd, zxn
-      REAL*8 zpu, zpu10, zpu11, zpu12, zpu13
-      REAL*8 zeu, zeu10, zeu11, zeu12, zeu13
-      REAL*8 zx, zy, zuxy, zsq1, zsq2, zvxy, zaercn, zto1, zto2
-      REAL*8 zxch4, zych4, zsqh41, zodh41
-      REAL*8 zxn2o, zyn2o, zsqn21, zodn21, zsqh42, zodh42
-      REAL*8 zsqn22, zodn22, za11, zttf11, za12, zttf12
-      REAL*8 zuu11, zuu12
+      REAL(KIND=8) zz, zxd, zxn
+      REAL(KIND=8) zpu, zpu10, zpu11, zpu12, zpu13
+      REAL(KIND=8) zeu, zeu10, zeu11, zeu12, zeu13
+      REAL(KIND=8) zx, zy, zuxy, zsq1, zsq2, zvxy, zaercn, zto1, zto2
+      REAL(KIND=8) zxch4, zych4, zsqh41, zodh41
+      REAL(KIND=8) zxn2o, zyn2o, zsqn21, zodn21, zsqh42, zodh42
+      REAL(KIND=8) zsqn22, zodn22, za11, zttf11, za12, zttf12
+      REAL(KIND=8) zuu11, zuu12
 C     ------------------------------------------------------------------
 C
Index: LMDZ4/branches/LMDZ4-dev/libf/phylmd/radlwsw.F90
===================================================================
--- LMDZ4/branches/LMDZ4-dev/libf/phylmd/radlwsw.F90	(revision 1218)
+++ LMDZ4/branches/LMDZ4-dev/libf/phylmd/radlwsw.F90	(revision 1220)
@@ -137,50 +137,49 @@
 
 ! Local variables
-  REAL*8 ZFSUP(KDLON,KFLEV+1)
-  REAL*8 ZFSDN(KDLON,KFLEV+1)
-  REAL*8 ZFSUP0(KDLON,KFLEV+1)
-  REAL*8 ZFSDN0(KDLON,KFLEV+1)
-  REAL*8 ZFLUP(KDLON,KFLEV+1)
-  REAL*8 ZFLDN(KDLON,KFLEV+1)
-  REAL*8 ZFLUP0(KDLON,KFLEV+1)
-  REAL*8 ZFLDN0(KDLON,KFLEV+1)
-  REAL*8 zx_alpha1, zx_alpha2
+  REAL(KIND=8) ZFSUP(KDLON,KFLEV+1)
+  REAL(KIND=8) ZFSDN(KDLON,KFLEV+1)
+  REAL(KIND=8) ZFSUP0(KDLON,KFLEV+1)
+  REAL(KIND=8) ZFSDN0(KDLON,KFLEV+1)
+  REAL(KIND=8) ZFLUP(KDLON,KFLEV+1)
+  REAL(KIND=8) ZFLDN(KDLON,KFLEV+1)
+  REAL(KIND=8) ZFLUP0(KDLON,KFLEV+1)
+  REAL(KIND=8) ZFLDN0(KDLON,KFLEV+1)
+  REAL(KIND=8) zx_alpha1, zx_alpha2
   INTEGER k, kk, i, j, iof, nb_gr
-  REAL*8 PSCT
-  REAL*8 PALBD(kdlon,2), PALBP(kdlon,2)
-  REAL*8 PEMIS(kdlon), PDT0(kdlon), PVIEW(kdlon)
-  REAL*8 PPSOL(kdlon), PDP(kdlon,KLEV)
-  REAL*8 PTL(kdlon,kflev+1), PPMB(kdlon,kflev+1)
-  REAL*8 PTAVE(kdlon,kflev)
-  REAL*8 PWV(kdlon,kflev), PQS(kdlon,kflev)
+  REAL(KIND=8) PSCT
+  REAL(KIND=8) PALBD(kdlon,2), PALBP(kdlon,2)
+  REAL(KIND=8) PEMIS(kdlon), PDT0(kdlon), PVIEW(kdlon)
+  REAL(KIND=8) PPSOL(kdlon), PDP(kdlon,KLEV)
+  REAL(KIND=8) PTL(kdlon,kflev+1), PPMB(kdlon,kflev+1)
+  REAL(KIND=8) PTAVE(kdlon,kflev)
+  REAL(KIND=8) PWV(kdlon,kflev), PQS(kdlon,kflev)
   real(kind=8) POZON(kdlon,kflev) ! mass fraction of ozone
-  REAL*8 PAER(kdlon,kflev,5)
-  REAL*8 PCLDLD(kdlon,kflev)
-  REAL*8 PCLDLU(kdlon,kflev)
-  REAL*8 PCLDSW(kdlon,kflev)
-  REAL*8 PTAU(kdlon,2,kflev)
-  REAL*8 POMEGA(kdlon,2,kflev)
-  REAL*8 PCG(kdlon,2,kflev)
-  REAL*8 zfract(kdlon), zrmu0(kdlon), zdist
-  REAL*8 zheat(kdlon,kflev), zcool(kdlon,kflev)
-  REAL*8 zheat0(kdlon,kflev), zcool0(kdlon,kflev)
-  REAL*8 ztopsw(kdlon), ztoplw(kdlon)
-  REAL*8 zsolsw(kdlon), zsollw(kdlon), zalbpla(kdlon)
-  REAL*8 zsollwdown(kdlon)
-  REAL*8 ztopsw0(kdlon), ztoplw0(kdlon)
-  REAL*8 zsolsw0(kdlon), zsollw0(kdlon)
-  REAL*8 zznormcp
-  REAL*8 tauaero(kdlon,kflev,9,2)                     ! aer opt properties
-  REAL*8 pizaero(kdlon,kflev,9,2)
-  REAL*8 cgaero(kdlon,kflev,9,2)
-  REAL*8 PTAUA(kdlon,2,kflev)                         ! present-day value of cloud opt thickness (PTAU is pre-industrial value), local use
-  REAL*8 POMEGAA(kdlon,2,kflev)                       ! dito for single scatt albedo
-  REAL*8 ztopswadaero(kdlon), zsolswadaero(kdlon)     ! Aerosol direct forcing at TOAand surface
-  REAL*8 ztopswad0aero(kdlon), zsolswad0aero(kdlon)   ! Aerosol direct forcing at TOAand surface
-  REAL*8 ztopswaiaero(kdlon), zsolswaiaero(kdlon)     ! dito, indirect
-  REAL*8 ztopsw_aero(kdlon,9), ztopsw0_aero(kdlon,9)
-  REAL*8 zsolsw_aero(kdlon,9), zsolsw0_aero(kdlon,9)
+  REAL(KIND=8) PAER(kdlon,kflev,5)
+  REAL(KIND=8) PCLDLD(kdlon,kflev)
+  REAL(KIND=8) PCLDLU(kdlon,kflev)
+  REAL(KIND=8) PCLDSW(kdlon,kflev)
+  REAL(KIND=8) PTAU(kdlon,2,kflev)
+  REAL(KIND=8) POMEGA(kdlon,2,kflev)
+  REAL(KIND=8) PCG(kdlon,2,kflev)
+  REAL(KIND=8) zfract(kdlon), zrmu0(kdlon), zdist
+  REAL(KIND=8) zheat(kdlon,kflev), zcool(kdlon,kflev)
+  REAL(KIND=8) zheat0(kdlon,kflev), zcool0(kdlon,kflev)
+  REAL(KIND=8) ztopsw(kdlon), ztoplw(kdlon)
+  REAL(KIND=8) zsolsw(kdlon), zsollw(kdlon), zalbpla(kdlon)
+  REAL(KIND=8) zsollwdown(kdlon)
+  REAL(KIND=8) ztopsw0(kdlon), ztoplw0(kdlon)
+  REAL(KIND=8) zsolsw0(kdlon), zsollw0(kdlon)
+  REAL(KIND=8) zznormcp
+  REAL(KIND=8) tauaero(kdlon,kflev,9,2)                     ! aer opt properties
+  REAL(KIND=8) pizaero(kdlon,kflev,9,2)
+  REAL(KIND=8) cgaero(kdlon,kflev,9,2)
+  REAL(KIND=8) PTAUA(kdlon,2,kflev)                         ! present-day value of cloud opt thickness (PTAU is pre-industrial value), local use
+  REAL(KIND=8) POMEGAA(kdlon,2,kflev)                       ! dito for single scatt albedo
+  REAL(KIND=8) ztopswadaero(kdlon), zsolswadaero(kdlon)     ! Aerosol direct forcing at TOAand surface
+  REAL(KIND=8) ztopswad0aero(kdlon), zsolswad0aero(kdlon)   ! Aerosol direct forcing at TOAand surface
+  REAL(KIND=8) ztopswaiaero(kdlon), zsolswaiaero(kdlon)     ! dito, indirect
+  REAL(KIND=8) ztopsw_aero(kdlon,9), ztopsw0_aero(kdlon,9)
+  REAL(KIND=8) zsolsw_aero(kdlon,9), zsolsw0_aero(kdlon,9)
   real, parameter:: dobson_u = 2.1415e-05 ! Dobson unit, in kg m-2
-
 
   ! initialisation
Index: LMDZ4/branches/LMDZ4-dev/libf/phylmd/regr_lat_time_climoz_m.F90
===================================================================
--- LMDZ4/branches/LMDZ4-dev/libf/phylmd/regr_lat_time_climoz_m.F90	(revision 1218)
+++ LMDZ4/branches/LMDZ4-dev/libf/phylmd/regr_lat_time_climoz_m.F90	(revision 1220)
@@ -44,12 +44,12 @@
 
     ! We assume that in the input file:
-    ! -- the latitude is in degrees and strictly monotonic (as all
-    ! NetCDF coordinate variables should be);
+    ! -- latitude is in degrees;
+    ! -- pressure is in hPa (even though we do not use pressure values
+    ! here, we write the unit of pressure in the NetCDF header, and we
+    ! will use the assumption later, when we regrid in pressure).
+    ! -- latitude and pressure are strictly monotonic (as all NetCDF
+    ! coordinate variables should be);
     ! -- time increases (even though we do not use values of the input
     ! time coordinate);
-    ! -- pressure is in hPa and in strictly ascending order (even
-    ! though we do not use pressure values here, we write the unit of
-    ! pressure in the NetCDF header, and we will use the assumptions later,
-    ! when we regrid in pressure).
 
     use regr1_step_av_m, only: regr1_step_av
@@ -81,6 +81,9 @@
     ! ascending order)
 
-    real, pointer:: plev(:) ! pressure level of input data
+    real, pointer:: plev(:)
+    ! pressure levels of input data, sorted in strictly ascending order
+
     logical desc_lat ! latitude in descending order in the input file
+    logical desc_plev ! pressure levels in descending order in the input file
 
     real, pointer:: o3_in(:, :, :) ! (n_lat, n_plev, 12 or 0:13)
@@ -110,8 +113,5 @@
 
     integer j
-
-    integer varid_in, varid_out, varid_plev, varid_time
-    integer varid
-    ! (for NetCDF)
+    integer varid_in, varid_out, varid_plev, varid_time, varid ! (for NetCDF)
 
     real, parameter:: tmidmonth(0:13) = (/(-15. + 30. * j, j = 0, 13)/)
@@ -153,5 +153,10 @@
     call nf95_gw_var(ncid_in, varid, plev)
     n_plev = size(plev)
-    ! (We only need the pressure coordinate to copy it to the output file.)
+    ! We only need the pressure coordinate to copy it to the output file.
+    ! The program "gcm" will assume that pressure levels are in
+    ! ascending order in the regridded climatology so invert order if
+    ! necessary:
+    desc_plev = plev(1) > plev(n_plev)
+    if (desc_plev) plev = plev(n_plev:1:-1)
 
     ! Create the output file and get the variable IDs:
@@ -168,4 +173,5 @@
     call nf95_gw_var(ncid_in, varid_in, o3_in)
     if (desc_lat) o3_in = o3_in(n_lat:1:-1, :, :)
+    if (desc_plev) o3_in = o3_in(:, n_plev:1:-1, :)
 
     call nf95_close(ncid_in)
@@ -219,5 +225,5 @@
     use netcdf95, only: nf95_create, nf95_def_dim, nf95_def_var, &
          nf95_put_att, nf95_enddef, nf95_copy_att, nf95_put_var
-    use netcdf, only: nf90_clobber, nf90_float, nf90_copy_att, nf90_global
+    use netcdf, only: nf90_clobber, nf90_float, nf90_global
 
     integer, intent(in):: ncid_in, n_plev
@@ -276,6 +282,4 @@
     ! Global attributes:
 
-    call nf95_put_att(ncid_out, nf90_global, "comment", "Regridded for LMDZ")
-
     ! The following commands, copying attributes, may fail.
     ! That is OK.
@@ -290,8 +294,14 @@
     call handle_err_copy_att("title")
 
+    call nf95_copy_att(ncid_in, nf90_global, "institution", ncid_out, &
+         nf90_global, ncerr)
+    call handle_err_copy_att("institution")
+
     call nf95_copy_att(ncid_in, nf90_global, "source", ncid_out, nf90_global, &
          ncerr)
     call handle_err_copy_att("source")
 
+    call nf95_put_att(ncid_out, nf90_global, "comment", "Regridded for LMDZ")
+
     call nf95_enddef(ncid_out)
 
@@ -311,5 +321,5 @@
 
       if (ncerr /= nf90_noerr) then
-         print *, "regr_lat_time_climoz_m prepare_out nf90_copy_att " &
+         print *, "regr_lat_time_climoz_m prepare_out nf95_copy_att " &
               // att_name // " -- " // trim(nf90_strerror(ncerr))
       end if
Index: LMDZ4/branches/LMDZ4-dev/libf/phylmd/regr_pr.F90
===================================================================
--- LMDZ4/branches/LMDZ4-dev/libf/phylmd/regr_pr.F90	(revision 1218)
+++ LMDZ4/branches/LMDZ4-dev/libf/phylmd/regr_pr.F90	(revision 1220)
@@ -1,4 +1,6 @@
 ! $Id$
 module regr_pr
+
+  ! Author: Lionel GUEZ
 
   ! In both procedures of this module:
Index: LMDZ4/branches/LMDZ4-dev/libf/phylmd/sw_aeroAR4.F90
===================================================================
--- LMDZ4/branches/LMDZ4-dev/libf/phylmd/sw_aeroAR4.F90	(revision 1218)
+++ LMDZ4/branches/LMDZ4-dev/libf/phylmd/sw_aeroAR4.F90	(revision 1220)
@@ -56,34 +56,34 @@
   !* ARGUMENTS:
   !
-  REAL*8 PSCT  ! constante solaire (valeur conseillee: 1370)
-
-  REAL*8 PPSOL(KDLON)        ! SURFACE PRESSURE (PA)
-  REAL*8 PDP(KDLON,KFLEV)    ! LAYER THICKNESS (PA)
-  REAL*8 PPMB(KDLON,KFLEV+1) ! HALF-LEVEL PRESSURE (MB)
-
-  REAL*8 PRMU0(KDLON)  ! COSINE OF ZENITHAL ANGLE
-  REAL*8 PFRAC(KDLON)  ! fraction de la journee
-
-  REAL*8 PTAVE(KDLON,KFLEV)  ! LAYER TEMPERATURE (K)
-  REAL*8 PWV(KDLON,KFLEV)    ! SPECIFI! HUMIDITY (KG/KG)
-  REAL*8 PQS(KDLON,KFLEV)    ! SATURATED WATER VAPOUR (KG/KG)
-  REAL*8 POZON(KDLON,KFLEV)  ! OZONE CONCENTRATION (KG/KG)
-  REAL*8 PAER(KDLON,KFLEV,5) ! AEROSOLS' OPTICAL THICKNESS
-
-  REAL*8 PALBD(KDLON,2)  ! albedo du sol (lumiere diffuse)
-  REAL*8 PALBP(KDLON,2)  ! albedo du sol (lumiere parallele)
-
-  REAL*8 PCLDSW(KDLON,KFLEV)    ! CLOUD FRACTION
-  REAL*8 PTAU(KDLON,2,KFLEV)    ! CLOUD OPTICAL THICKNESS
-  REAL*8 PCG(KDLON,2,KFLEV)     ! ASYMETRY FACTOR
-  REAL*8 POMEGA(KDLON,2,KFLEV)  ! SINGLE SCATTERING ALBEDO
-
-  REAL*8 PHEAT(KDLON,KFLEV) ! SHORTWAVE HEATING (K/DAY)
-  REAL*8 PHEAT0(KDLON,KFLEV)! SHORTWAVE HEATING (K/DAY) clear-sky
-  REAL*8 PALBPLA(KDLON)     ! PLANETARY ALBEDO
-  REAL*8 PTOPSW(KDLON)      ! SHORTWAVE FLUX AT T.O.A.
-  REAL*8 PSOLSW(KDLON)      ! SHORTWAVE FLUX AT SURFACE
-  REAL*8 PTOPSW0(KDLON)     ! SHORTWAVE FLUX AT T.O.A. (CLEAR-SKY)
-  REAL*8 PSOLSW0(KDLON)     ! SHORTWAVE FLUX AT SURFACE (CLEAR-SKY)
+  REAL(KIND=8) PSCT  ! constante solaire (valeur conseillee: 1370)
+
+  REAL(KIND=8) PPSOL(KDLON)        ! SURFACE PRESSURE (PA)
+  REAL(KIND=8) PDP(KDLON,KFLEV)    ! LAYER THICKNESS (PA)
+  REAL(KIND=8) PPMB(KDLON,KFLEV+1) ! HALF-LEVEL PRESSURE (MB)
+
+  REAL(KIND=8) PRMU0(KDLON)  ! COSINE OF ZENITHAL ANGLE
+  REAL(KIND=8) PFRAC(KDLON)  ! fraction de la journee
+
+  REAL(KIND=8) PTAVE(KDLON,KFLEV)  ! LAYER TEMPERATURE (K)
+  REAL(KIND=8) PWV(KDLON,KFLEV)    ! SPECIFI! HUMIDITY (KG/KG)
+  REAL(KIND=8) PQS(KDLON,KFLEV)    ! SATURATED WATER VAPOUR (KG/KG)
+  REAL(KIND=8) POZON(KDLON,KFLEV)  ! OZONE CONCENTRATION (KG/KG)
+  REAL(KIND=8) PAER(KDLON,KFLEV,5) ! AEROSOLS' OPTICAL THICKNESS
+
+  REAL(KIND=8) PALBD(KDLON,2)  ! albedo du sol (lumiere diffuse)
+  REAL(KIND=8) PALBP(KDLON,2)  ! albedo du sol (lumiere parallele)
+
+  REAL(KIND=8) PCLDSW(KDLON,KFLEV)    ! CLOUD FRACTION
+  REAL(KIND=8) PTAU(KDLON,2,KFLEV)    ! CLOUD OPTICAL THICKNESS
+  REAL(KIND=8) PCG(KDLON,2,KFLEV)     ! ASYMETRY FACTOR
+  REAL(KIND=8) POMEGA(KDLON,2,KFLEV)  ! SINGLE SCATTERING ALBEDO
+
+  REAL(KIND=8) PHEAT(KDLON,KFLEV) ! SHORTWAVE HEATING (K/DAY)
+  REAL(KIND=8) PHEAT0(KDLON,KFLEV)! SHORTWAVE HEATING (K/DAY) clear-sky
+  REAL(KIND=8) PALBPLA(KDLON)     ! PLANETARY ALBEDO
+  REAL(KIND=8) PTOPSW(KDLON)      ! SHORTWAVE FLUX AT T.O.A.
+  REAL(KIND=8) PSOLSW(KDLON)      ! SHORTWAVE FLUX AT SURFACE
+  REAL(KIND=8) PTOPSW0(KDLON)     ! SHORTWAVE FLUX AT T.O.A. (CLEAR-SKY)
+  REAL(KIND=8) PSOLSW0(KDLON)     ! SHORTWAVE FLUX AT SURFACE (CLEAR-SKY)
   !
   !* LOCAL VARIABLES:
@@ -91,25 +91,25 @@
   real, parameter:: dobson_u = 2.1415e-05 ! Dobson unit, in kg m-2
 
-  REAL(kind=8) ZOZ(KDLON,KFLEV)
+  REAL(KIND=8) ZOZ(KDLON,KFLEV)
   ! column-density of ozone in layer, in kilo-Dobsons
 
-  REAL*8 ZAKI(KDLON,2)     
-  REAL*8 ZCLD(KDLON,KFLEV)
-  REAL*8 ZCLEAR(KDLON) 
-  REAL*8 ZDSIG(KDLON,KFLEV)
-  REAL*8 ZFACT(KDLON)
-  REAL*8 ZFD(KDLON,KFLEV+1)
-  REAL*8 ZFDOWN(KDLON,KFLEV+1)
-  REAL*8 ZFU(KDLON,KFLEV+1)
-  REAL*8 ZFUP(KDLON,KFLEV+1)
-  REAL*8 ZRMU(KDLON)
-  REAL*8 ZSEC(KDLON)
-  REAL*8 ZUD(KDLON,5,KFLEV+1)
-  REAL*8 ZCLDSW0(KDLON,KFLEV)
-
-  REAL*8 ZFSUP(KDLON,KFLEV+1)
-  REAL*8 ZFSDN(KDLON,KFLEV+1)
-  REAL*8 ZFSUP0(KDLON,KFLEV+1)
-  REAL*8 ZFSDN0(KDLON,KFLEV+1)
+  REAL(KIND=8) ZAKI(KDLON,2)     
+  REAL(KIND=8) ZCLD(KDLON,KFLEV)
+  REAL(KIND=8) ZCLEAR(KDLON) 
+  REAL(KIND=8) ZDSIG(KDLON,KFLEV)
+  REAL(KIND=8) ZFACT(KDLON)
+  REAL(KIND=8) ZFD(KDLON,KFLEV+1)
+  REAL(KIND=8) ZFDOWN(KDLON,KFLEV+1)
+  REAL(KIND=8) ZFU(KDLON,KFLEV+1)
+  REAL(KIND=8) ZFUP(KDLON,KFLEV+1)
+  REAL(KIND=8) ZRMU(KDLON)
+  REAL(KIND=8) ZSEC(KDLON)
+  REAL(KIND=8) ZUD(KDLON,5,KFLEV+1)
+  REAL(KIND=8) ZCLDSW0(KDLON,KFLEV)
+
+  REAL(KIND=8) ZFSUP(KDLON,KFLEV+1)
+  REAL(KIND=8) ZFSDN(KDLON,KFLEV+1)
+  REAL(KIND=8) ZFSUP0(KDLON,KFLEV+1)
+  REAL(KIND=8) ZFSDN0(KDLON,KFLEV+1)
 
   INTEGER inu, jl, jk, i, k, kpl1
@@ -126,45 +126,45 @@
 
   !jq-Introduced for aerosol forcings
-  REAL*8, SAVE :: flag_aer
+  REAL(KIND=8), SAVE :: flag_aer
   !$OMP THREADPRIVATE(flag_aer)
 
   LOGICAL ok_ade, ok_aie    ! use aerosol forcings or not?
-  REAL*8 tauaero(kdlon,kflev,9,2)  ! aerosol optical properties
-  REAL*8 pizaero(kdlon,kflev,9,2)  ! (see aeropt.F)
-  REAL*8 cgaero(kdlon,kflev,9,2)   ! -"-
-  REAL*8 PTAUA(KDLON,2,KFLEV)    ! CLOUD OPTICAL THICKNESS (pre-industrial value)
-  REAL*8 POMEGAA(KDLON,2,KFLEV)  ! SINGLE SCATTERING ALBEDO
-  REAL*8 PTOPSWADAERO(KDLON)     ! SHORTWAVE FLUX AT T.O.A.(+AEROSOL DIR)
-  REAL*8 PSOLSWADAERO(KDLON)     ! SHORTWAVE FLUX AT SURFACE(+AEROSOL DIR)
-  REAL*8 PTOPSWAD0AERO(KDLON)     ! SHORTWAVE FLUX AT T.O.A.(+AEROSOL DIR)
-  REAL*8 PSOLSWAD0AERO(KDLON)     ! SHORTWAVE FLUX AT SURFACE(+AEROSOL DIR)
-  REAL*8 PTOPSWAIAERO(KDLON)     ! SHORTWAVE FLUX AT T.O.A.(+AEROSOL IND)
-  REAL*8 PSOLSWAIAERO(KDLON)     ! SHORTWAVE FLUX AT SURFACE(+AEROSOL IND)
-  REAL*8 PTOPSWAERO(KDLON,9)
-  REAL*8 PTOPSW0AERO(KDLON,9)
-  REAL*8 PSOLSWAERO(KDLON,9)
-  REAL*8 PSOLSW0AERO(KDLON,9)
+  REAL(KIND=8) tauaero(kdlon,kflev,9,2)  ! aerosol optical properties
+  REAL(KIND=8) pizaero(kdlon,kflev,9,2)  ! (see aeropt.F)
+  REAL(KIND=8) cgaero(kdlon,kflev,9,2)   ! -"-
+  REAL(KIND=8) PTAUA(KDLON,2,KFLEV)    ! CLOUD OPTICAL THICKNESS (pre-industrial value)
+  REAL(KIND=8) POMEGAA(KDLON,2,KFLEV)  ! SINGLE SCATTERING ALBEDO
+  REAL(KIND=8) PTOPSWADAERO(KDLON)     ! SHORTWAVE FLUX AT T.O.A.(+AEROSOL DIR)
+  REAL(KIND=8) PSOLSWADAERO(KDLON)     ! SHORTWAVE FLUX AT SURFACE(+AEROSOL DIR)
+  REAL(KIND=8) PTOPSWAD0AERO(KDLON)     ! SHORTWAVE FLUX AT T.O.A.(+AEROSOL DIR)
+  REAL(KIND=8) PSOLSWAD0AERO(KDLON)     ! SHORTWAVE FLUX AT SURFACE(+AEROSOL DIR)
+  REAL(KIND=8) PTOPSWAIAERO(KDLON)     ! SHORTWAVE FLUX AT T.O.A.(+AEROSOL IND)
+  REAL(KIND=8) PSOLSWAIAERO(KDLON)     ! SHORTWAVE FLUX AT SURFACE(+AEROSOL IND)
+  REAL(KIND=8) PTOPSWAERO(KDLON,9)
+  REAL(KIND=8) PTOPSW0AERO(KDLON,9)
+  REAL(KIND=8) PSOLSWAERO(KDLON,9)
+  REAL(KIND=8) PSOLSW0AERO(KDLON,9)
 
   !jq - Fluxes including aerosol effects
-  REAL*8,ALLOCATABLE,SAVE :: ZFSUPAD_AERO(:,:)
+  REAL(KIND=8),ALLOCATABLE,SAVE :: ZFSUPAD_AERO(:,:)
   !$OMP THREADPRIVATE(ZFSUPAD_AERO)
-  REAL*8,ALLOCATABLE,SAVE :: ZFSDNAD_AERO(:,:)
+  REAL(KIND=8),ALLOCATABLE,SAVE :: ZFSDNAD_AERO(:,:)
   !$OMP THREADPRIVATE(ZFSDNAD_AERO)
   !jq - Fluxes including aerosol effects
-  REAL*8,ALLOCATABLE,SAVE :: ZFSUPAD0_AERO(:,:)
+  REAL(KIND=8),ALLOCATABLE,SAVE :: ZFSUPAD0_AERO(:,:)
   !$OMP THREADPRIVATE(ZFSUPAD0_AERO)
-  REAL*8,ALLOCATABLE,SAVE :: ZFSDNAD0_AERO(:,:)
+  REAL(KIND=8),ALLOCATABLE,SAVE :: ZFSDNAD0_AERO(:,:)
   !$OMP THREADPRIVATE(ZFSDNAD0_AERO)
-  REAL*8,ALLOCATABLE,SAVE :: ZFSUPAI_AERO(:,:)
+  REAL(KIND=8),ALLOCATABLE,SAVE :: ZFSUPAI_AERO(:,:)
   !$OMP THREADPRIVATE(ZFSUPAI_AERO)
-  REAL*8,ALLOCATABLE,SAVE :: ZFSDNAI_AERO(:,:)
+  REAL(KIND=8),ALLOCATABLE,SAVE :: ZFSDNAI_AERO(:,:)
   !$OMP THREADPRIVATE(ZFSDNAI_AERO)
-  REAL*8,ALLOCATABLE,SAVE ::  ZFSUP_AERO(:,:,:)
+  REAL(KIND=8),ALLOCATABLE,SAVE ::  ZFSUP_AERO(:,:,:)
   !$OMP THREADPRIVATE(ZFSUP_AERO)
-  REAL*8,ALLOCATABLE,SAVE ::  ZFSDN_AERO(:,:,:)
+  REAL(KIND=8),ALLOCATABLE,SAVE ::  ZFSDN_AERO(:,:,:)
   !$OMP THREADPRIVATE(ZFSDN_AERO)
-  REAL*8,ALLOCATABLE,SAVE ::  ZFSUP0_AERO(:,:,:)
+  REAL(KIND=8),ALLOCATABLE,SAVE ::  ZFSUP0_AERO(:,:,:)
   !$OMP THREADPRIVATE(ZFSUP0_AERO)
-  REAL*8,ALLOCATABLE,SAVE ::  ZFSDN0_AERO(:,:,:)
+  REAL(KIND=8),ALLOCATABLE,SAVE ::  ZFSDN0_AERO(:,:,:)
   !$OMP THREADPRIVATE(ZFSDN0_AERO)
 
