Index: codes/icosagcm/branches/SATURN_DYNAMICO/ICOSAGCM/src/etat0.f90
===================================================================
--- codes/icosagcm/branches/SATURN_DYNAMICO/ICOSAGCM/src/etat0.f90	(revision 267)
+++ codes/icosagcm/branches/SATURN_DYNAMICO/ICOSAGCM/src/etat0.f90	(revision 268)
@@ -18,4 +18,5 @@
     USE etat0_dcmip5_mod, ONLY : getin_etat0_dcmip5=>getin_etat0
     USE etat0_williamson_mod, ONLY : getin_etat0_williamson=>getin_etat0
+    USE etat0_temperature_mod, ONLY: getin_etat0_temperature=>getin_etat0
     ! Old interface
     USE etat0_academic_mod, ONLY : etat0_academic=>etat0  
@@ -56,4 +57,7 @@
     CASE ('isothermal')
        CALL getin_etat0_isothermal
+       CALL etat0_collocated(f_phis,f_ps,f_mass,f_theta_rhodz,f_u, f_q)
+    CASE ('temperature_profile')
+       CALL getin_etat0_temperature
        CALL etat0_collocated(f_phis,f_ps,f_mass,f_theta_rhodz,f_u, f_q)
     CASE ('jablonowsky06')
@@ -150,4 +154,5 @@
     USE etat0_dcmip5_mod, ONLY : compute_dcmip5 => compute_etat0
     USE etat0_williamson_mod, ONLY : compute_w91_6 => compute_etat0
+    USE etat0_temperature_mod, ONLY: compute_etat0_temperature => compute_etat0
     IMPLICIT NONE
     REAL(rstd),INTENT(INOUT) :: ps(iim*jjm)
@@ -192,4 +197,7 @@
        CALL compute_etat0_isothermal(iim*jjm, phis, ps, temp_i, ulon_i, ulat_i, q)
        CALL compute_etat0_isothermal(3*iim*jjm, phis_e, ps_e, temp_e, ulon_e, ulat_e, q_e)
+    CASE ('temperature_profile')
+       CALL compute_etat0_temperature(iim*jjm, phis, ps, temp_i, ulon_i, ulat_i, q)
+       CALL compute_etat0_temperature(3*iim*jjm, phis_e, ps_e, temp_e, ulon_e, ulat_e, q_e)
     CASE('jablonowsky06')
        CALL compute_jablonowsky06(iim*jjm,lon_i,lat_i, phis, ps, temp_i, ulon_i, ulat_i)
Index: codes/icosagcm/branches/SATURN_DYNAMICO/ICOSAGCM/src/etat0_temperature.f90
===================================================================
--- codes/icosagcm/branches/SATURN_DYNAMICO/ICOSAGCM/src/etat0_temperature.f90	(revision 268)
+++ codes/icosagcm/branches/SATURN_DYNAMICO/ICOSAGCM/src/etat0_temperature.f90	(revision 268)
@@ -0,0 +1,80 @@
+MODULE etat0_temperature_mod
+  USE prec
+  USE icosa, ONLY: llm,nqtot
+  IMPLICIT NONE
+  REAL(rstd), SAVE, ALLOCATABLE :: t_profile(:)
+!$OMP THREADPRIVATE(t_profile)
+CONTAINS
+  
+  SUBROUTINE getin_etat0
+    USE getin_mod, ONLY: getin
+    USE mpipara, ONLY: is_mpi_root
+    USE omp_para, ONLY: omp_in_parallel
+    USE transfert_omp_mod, ONLY: bcast_omp
+    USE free_unit_mod, ONLY : free_unit
+    IMPLICIT NONE
+    INTEGER :: unit,ok
+    INTEGER :: l
+    CHARACTER(len=255) :: temperature_file
+  
+    temperature_file="profile.in" ! default file name
+    ! but users may want to use some other file name
+    CALL getin("temperature_profile_file",temperature_file)
+    
+    ALLOCATE(t_profile(llm))
+ 
+ !$OMP MASTER
+    unit=free_unit()
+    OPEN(unit,file=temperature_file,status="old",action="read",iostat=ok)
+    IF (ok/=0) THEN
+      WRITE(*,*) "getin_etat0 error: input file ",trim(temperature_file)," not found!"
+      CALL ABORT
+    ENDIF
+    ! read in t_profile() line by line, starting from first atmospheric
+    ! layer, up to model top
+    DO l=1,llm
+      READ(unit,fmt=*,iostat=ok) t_profile(l)
+      IF (ok/=0) THEN
+        WRITE(*,*) "getin_etat0 error: failed reading t_profile(l) for l=",l
+        CALL ABORT
+      ENDIF
+    ENDDO
+    
+    CLOSE(unit)
+    IF (is_mpi_root) THEN
+      WRITE(*,*) "Using input temperature profile from file ",trim(temperature_file),":"
+      DO l=1,llm
+         WRITE(*,*) "  TEMP(l=",l,")=",t_profile(l)
+      ENDDO
+    ENDIF
+!$OMP END MASTER
+
+    IF (omp_in_parallel()) THEN
+      CALL bcast_omp(t_profile)
+    ENDIF
+    
+  END SUBROUTINE getin_etat0
+
+  SUBROUTINE compute_etat0(ngrid, phis, ps, temp, ulon, ulat, q)
+    USE earth_const, ONLY: preff
+    IMPLICIT NONE  
+    INTEGER, INTENT(IN)    :: ngrid
+    REAL(rstd),INTENT(OUT) :: phis(ngrid)
+    REAL(rstd),INTENT(OUT) :: ps(ngrid)
+    REAL(rstd),INTENT(OUT) :: temp(ngrid,llm)
+    REAL(rstd),INTENT(OUT) :: ulon(ngrid,llm)
+    REAL(rstd),INTENT(OUT) :: ulat(ngrid,llm)
+    REAL(rstd),INTENT(OUT) :: q(ngrid,llm,nqtot)
+    INTEGER :: l
+    phis(:)=0
+    ps(:)=preff
+    DO l=1,llm
+      temp(:,l)=t_profile(l)
+    ENDDO
+    ulon(:,:)=0
+    ulat(:,:)=0
+    q(:,:,:)=0
+
+  END SUBROUTINE compute_etat0
+
+END MODULE etat0_temperature_mod
