Index: LMDZ6/trunk/libf/dyn3d/iniacademic.F90
===================================================================
--- LMDZ6/trunk/libf/dyn3d/iniacademic.F90	(revision 3975)
+++ LMDZ6/trunk/libf/dyn3d/iniacademic.F90	(revision 3976)
@@ -67,5 +67,5 @@
   LOGICAL ok_geost             ! Initialisation vent geost. ou nul
   LOGICAL ok_pv                ! Polar Vortex
-  REAL phi_pv,dphi_pv,gam_pv   ! Constantes pour polar vortex 
+  REAL phi_pv,dphi_pv,gam_pv,tetanoise   ! Constantes pour polar vortex 
 
   real zz,ran1
@@ -117,4 +117,27 @@
   CALL inigeom
   CALL inifilr
+
+  ! Initialize pressure and mass field if read_start=.false.
+  IF (.NOT. read_start) THEN
+     ! surface pressure
+     if (iflag_phys>2) then
+        ! specific value for CMIP5 aqua/terra planets
+        ! "Specify the initial dry mass to be equivalent to
+        !  a global mean surface pressure (101325 minus 245) Pa."
+        ps(:)=101080.  
+     else
+        ! use reference surface pressure
+        ps(:)=preff
+     endif
+     ! ground geopotential
+     phis(:)=0.
+     CALL pression ( ip1jmp1, ap, bp, ps, p       )
+     if (pressure_exner) then
+       CALL exner_hyb( ip1jmp1, ps, p, pks, pk)
+     else
+       call exner_milieu(ip1jmp1,ps,p,pks,pk)
+     endif
+     CALL massdair(p,masse)
+  ENDIF
 
   if (llm == 1) then
@@ -167,4 +190,7 @@
      gam_pv=4.              ! -dT/dz vortex (in K/km)
      CALL getin('gam_pv',gam_pv)
+     tetanoise=0.005
+     CALL getin('tetanoise',tetanoise)
+
 
      ! 2. Initialize fields towards which to relax
@@ -219,31 +245,22 @@
      ! 3. Initialize fields (if necessary)
      IF (.NOT. read_start) THEN
-        ! surface pressure
-        if (iflag_phys>2) then
-           ! specific value for CMIP5 aqua/terra planets
-           ! "Specify the initial dry mass to be equivalent to
-           !  a global mean surface pressure (101325 minus 245) Pa."
-           ps(:)=101080.  
-        else
-           ! use reference surface pressure
-           ps(:)=preff
-        endif
-        
-        ! ground geopotential
-        phis(:)=0.
-
-        CALL pression ( ip1jmp1, ap, bp, ps, p       )
-        if (pressure_exner) then
-          CALL exner_hyb( ip1jmp1, ps, p, pks, pk)
-        else
-          call exner_milieu(ip1jmp1,ps,p,pks,pk)
-        endif
-        CALL massdair(p,masse)
-
         ! bulk initialization of temperature
-        teta(:,:)=tetarappel(:,:)
+
+        IF (iflag_phys>10000) THEN
+        ! Particular case to impose a constant temperature T0=0.01*iflag_physx
+           teta(:,:)= 0.01*iflag_phys/(pk(:,:)/cpp)
+        ELSE
+           teta(:,:)=tetarappel(:,:)
+        ENDIF
 
         ! geopotential
         CALL geopot(ip1jmp1,teta,pk,pks,phis,phi)
+
+        DO l=1,llm
+          print*,'presnivs,play,l',presnivs(l),(pk(1,l)/cpp)**(1./kappa)*preff
+         !pks(ij) = (cpp/preff) * ps(ij)
+         !pk(ij,1) = .5*pks(ij)
+         ! pk = cpp * (p/preff)^kappa
+        ENDDO
 
         ! winds
@@ -292,5 +309,5 @@
         do l=1,llm
            do ij=iip2,ip1jm
-              teta(ij,l)=teta(ij,l)*(1.+0.005*ran1(idum))
+              teta(ij,l)=teta(ij,l)*(1.+tetanoise*ran1(idum))
            enddo
         enddo
Index: LMDZ6/trunk/libf/dyn3dmem/iniacademic_loc.F90
===================================================================
--- LMDZ6/trunk/libf/dyn3dmem/iniacademic_loc.F90	(revision 3975)
+++ LMDZ6/trunk/libf/dyn3dmem/iniacademic_loc.F90	(revision 3976)
@@ -73,5 +73,5 @@
   LOGICAL ok_geost             ! Initialisation vent geost. ou nul
   LOGICAL ok_pv                ! Polar Vortex
-  REAL phi_pv,dphi_pv,gam_pv   ! Constantes pour polar vortex 
+  REAL phi_pv,dphi_pv,gam_pv,tetanoise   ! Constantes pour polar vortex 
 
   real zz,ran1
@@ -122,4 +122,38 @@
   CALL inigeom
   CALL inifilr
+
+  ! Initialize pressure and mass field if read_start=.false.
+  IF (.NOT. read_start) THEN
+    ! allocate global fields:
+!    allocate(vcov_glo(ip1jm,llm))
+    allocate(ucov_glo(ip1jmp1,llm))
+    allocate(teta_glo(ip1jmp1,llm))
+    allocate(ps_glo(ip1jmp1))
+    allocate(masse_glo(ip1jmp1,llm))
+    allocate(phis_glo(ip1jmp1))
+
+     ! surface pressure
+     if (iflag_phys>2) then
+        ! specific value for CMIP5 aqua/terra planets
+        ! "Specify the initial dry mass to be equivalent to
+        !  a global mean surface pressure (101325 minus 245) Pa."
+        ps_glo(:)=101080.  
+     else
+        ! use reference surface pressure
+        ps_glo(:)=preff
+     endif
+     
+     ! ground geopotential
+     phis_glo(:)=0.
+
+     CALL pression ( ip1jmp1, ap, bp, ps_glo, p       )
+     if (pressure_exner) then
+       CALL exner_hyb( ip1jmp1, ps_glo, p, pks, pk )
+     else
+       call exner_milieu(ip1jmp1,ps_glo,p,pks,pk)
+     endif
+     CALL massdair(p,masse_glo)
+  ENDIF
+
 
   if (llm == 1) then
@@ -172,4 +206,6 @@
      gam_pv=4.              ! -dT/dz vortex (in K/km)
      CALL getin('gam_pv',gam_pv)
+     tetanoise=0.005
+     CALL getin('tetanoise',tetanoise)
 
      ! 2. Initialize fields towards which to relax
@@ -224,37 +260,11 @@
      ! 3. Initialize fields (if necessary)
      IF (.NOT. read_start) THEN
-       ! allocate global fields:
-!       allocate(vcov_glo(ip1jm,llm))
-       allocate(ucov_glo(ip1jmp1,llm))
-       allocate(teta_glo(ip1jmp1,llm))
-       allocate(ps_glo(ip1jmp1))
-       allocate(masse_glo(ip1jmp1,llm))
-       allocate(phis_glo(ip1jmp1))
-
-        ! surface pressure
-        if (iflag_phys>2) then
-           ! specific value for CMIP5 aqua/terra planets
-           ! "Specify the initial dry mass to be equivalent to
-           !  a global mean surface pressure (101325 minus 245) Pa."
-           ps_glo(:)=101080.  
-        else
-           ! use reference surface pressure
-           ps_glo(:)=preff
-        endif
-        
-        ! ground geopotential
-        phis_glo(:)=0.
-
-        CALL pression ( ip1jmp1, ap, bp, ps_glo, p       )
-        if (pressure_exner) then
-          CALL exner_hyb( ip1jmp1, ps_glo, p, pks, pk )
-        else
-          call exner_milieu(ip1jmp1,ps_glo,p,pks,pk)
-        endif
-        CALL massdair(p,masse_glo)
-
         ! bulk initialization of temperature
-        teta_glo(:,:)=tetarappel(:,:)
-
+        IF (iflag_phys>10000) THEN
+        ! Particular case to impose a constant temperature T0=0.01*iflag_phys
+           teta_glo(:,:)= 0.01*iflag_phys/(pk(:,:)/cpp)
+        ELSE
+           teta_glo(:,:)=tetarappel(:,:)
+        ENDIF
         ! geopotential
         CALL geopot(ip1jmp1,teta_glo,pk,pks,phis_glo,phi)
@@ -306,5 +316,5 @@
         do l=1,llm
            do ij=iip2,ip1jm
-              teta_glo(ij,l)=teta_glo(ij,l)*(1.+0.005*ran1(idum))
+              teta_glo(ij,l)=teta_glo(ij,l)*(1.+tetanoise*ran1(idum))
            enddo
         enddo
