Index: trunk/LMDZ.PLUTO/libf/phypluto/condense_n2.F90
===================================================================
--- trunk/LMDZ.PLUTO/libf/phypluto/condense_n2.F90	(revision 3228)
+++ trunk/LMDZ.PLUTO/libf/phypluto/condense_n2.F90	(revision 3232)
@@ -495,4 +495,23 @@
           end do
 
+!             Value transfert at the surface interface when condensation sublimation:
+
+          if (zmflux(1).lt.0) then
+!               Surface condensation
+            zum(1)= zu(1)
+            zvm(1)= zv(1)
+            ztm(1) = ztc(1)
+          else
+!               Surface sublimation:
+            ztm(1) = ztsrf(ig) + pdtsrfc(ig)*ptimestep
+            zum(1) = 0
+            zvm(1) = 0
+          end if
+          do iq=1,nq
+              zqm(1,iq)=0. ! most tracer do not condense !
+          enddo
+!             Special case if the tracer is n2 gas
+          if (igcm_n2.ne.0) zqm(1,igcm_n2)=1.
+
            ztm(2:klev+1)=0.
            zum(2:klev+1)=0.
@@ -528,22 +547,4 @@
            end if
 
-!             Value transfert at the surface interface when condensation sublimation:
-
-          if (zmflux(1).lt.0) then
-!               Surface condensation
-            zum(1)= zu(1)
-            zvm(1)= zv(1)
-            ztm(1) = ztc(1)
-          else
-!               Surface sublimation:
-            ztm(1) = ztsrf(ig) + pdtsrfc(ig)*ptimestep
-            zum(1) = 0
-            zvm(1) = 0
-          end if
-          do iq=1,nq
-             zqm(1,iq)=0. ! most tracer do not condense !
-          enddo
-!             Special case if the tracer is n2 gas
-          if (igcm_n2.ne.0) zqm(1,igcm_n2)=1.
 
           !!! Source haze: 0.02 pourcent when n2 sublimes
Index: trunk/LMDZ.PLUTO/libf/phypluto/dyn1d/calcenergy_kcm.F90
===================================================================
--- trunk/LMDZ.PLUTO/libf/phypluto/dyn1d/calcenergy_kcm.F90	(revision 3228)
+++ 	(revision )
@@ -1,75 +1,0 @@
-subroutine calcenergy_kcm(nlayer,Tsurf,T,Play,Plev,Qsurf,Q,muvar,Eatmtot)
-
-
-use params_h, only : Rc
-use watercommon_h, only : mH2O
-use comcstfi_mod, only: g, mugaz
-implicit none
-
-!     ----------------------------------------------------------------
-!     Purpose: Calculate total energy of the (steam) atmosphere
-!     Authour: R. Wordsworth (2011)
-!     ----------------------------------------------------------------
-
-
-  ! inputs
-  integer,intent(in) :: nlayer
-  real Tsurf,T(1:nlayer)
-  real Play(1:nlayer),Plev(1:nlayer+1)
-  real Qsurf,Q(1:nlayer)
-  real muvar(1,nlayer+1)
-
-  ! internal
-  integer il
-  real m_n,m_v,cp_n,cp_v,cp_a,Eatmlay
-  real s_c,rho_v,L
-  double precision p_v, s_v, nul
-  real VMR(1:nlayer)
-
-  ! output
-  real Eatmtot
-
-  ! functions
-  double precision cp_neutral
-
-  m_n = mugaz/1000.
-  m_v = mH2O/1000.
-
-
-  do il=1,nlayer
-     VMR(il)=Q(il)*(muvar(1,il+1)/mH2O)
-  end do
-
-
-  Eatmtot = 0.0
-  do il=1,nlayer
-
-
-     cp_n = cp_neutral(dble(T(il)))
-     cp_v = (32.24+1.923d-3*T(il) + 1.055d-5*T(il)**2-3.511d-9*T(il)**3)/m_v
-     ! / by m_v makes it per kg not per mol
-
-     call psat_H2O(dble(T(il)),p_v)
-     p_v   = p_v*1d6
-     rho_v = real(p_v)*m_v/(real(Rc)*T(il))
-
-     call therm(dble(T(il)),dble(rho_v)*1d-3,nul,nul,nul,nul,nul,nul,nul,&
-                nul,nul,nul,s_v,nul)
-
-     s_c = 2.06 * log(T(il)/273.15)
-     s_v = s_v * 1d3
-     s_c = s_c * 1d3
-     L   = (real(s_v)-s_c)*T(il)
-
-     cp_a    = (1-VMR(il))*cp_n + VMR(il)*cp_v 
-     !cp_a    = (1-Q(il))*cp_n + Q(il)*cp_v 
-
-     Eatmlay = ( cp_a*T(il) + L*VMR(il) ) * (Plev(il)-Plev(il+1))/g
-
-     Eatmtot = Eatmtot + Eatmlay 
-  enddo
-
-  print*,'WARNING: E-calc currently assumes H2O saturation!'
-
-end subroutine calcenergy_kcm
-
Index: trunk/LMDZ.PLUTO/libf/phypluto/dyn1d/kcmprof_fn.F90
===================================================================
--- trunk/LMDZ.PLUTO/libf/phypluto/dyn1d/kcmprof_fn.F90	(revision 3228)
+++ trunk/LMDZ.PLUTO/libf/phypluto/dyn1d/kcmprof_fn.F90	(revision 3232)
@@ -2,8 +2,7 @@
 
 use params_h
-use watercommon_h, only : mH2O
 use gases_h
 use comcstfi_mod, only: mugaz, cpp, g
-use callkeys_mod, only: co2cond
+use callkeys_mod, only: n2cond
 implicit none
 
@@ -97,7 +96,7 @@
      m_v   = 1.0
      tcrit = 1000.0
-  elseif(trim(gnom(vgas)).eq.'H2O')then
-     m_v   = dble(mH2O/1000.)
-     tcrit = 6.47d2
+!   elseif(trim(gnom(vgas)).eq.'H2O')then
+   !   m_v   = dble(mH2O/1000.) ! AF24: no water in Pluton
+   !   tcrit = 6.47d2
   elseif(trim(gnom(vgas)).eq.'NH3')then
      m_v   = 17.031/1000.
@@ -368,22 +367,4 @@
   enddo
 
-!    CO2 condensation 'haircut' of temperature profile if necessary
-  if(co2cond)then
-     print*,'CO2 condensation haircut - assumes CO2-dominated atmosphere!'
-     do ilay=2,nlayer
-        if(P_rcm(ilay).lt.518000.)then
-           TCO2cond = (-3167.8)/(log(.01*P_rcm(ilay))-23.23) ! Fanale's formula
-        else
-           TCO2cond = 684.2-92.3*log(P_rcm(ilay))+4.32*log(P_rcm(ilay))**2 
-           ! liquid-vapour transition (based on CRC handbook 2003 data)
-        endif
-
-        print*,'p=',P_rcm(ilay),', T=',T_rcm(ilay),' Tcond=',TCO2cond
-        if(T_rcm(ilay).lt.TCO2cond)then
-           T_rcm(ilay)=TCO2cond
-        endif
-     enddo
-  endif
-
   return
 end subroutine kcmprof_fn
Index: trunk/LMDZ.PLUTO/libf/phypluto/dyn1d/rcm1d.F
===================================================================
--- trunk/LMDZ.PLUTO/libf/phypluto/dyn1d/rcm1d.F	(revision 3228)
+++ trunk/LMDZ.PLUTO/libf/phypluto/dyn1d/rcm1d.F	(revision 3232)
@@ -89,6 +89,6 @@
       REAL,ALLOCATABLE :: qsurf(:)    ! tracer surface budget (e.g. kg.m-2)
       REAL,ALLOCATABLE :: tsoil(:)    ! subsurface soil temperature (K)
-!      REAL co2ice               ! co2ice layer (kg.m-2) !not used anymore
-      integer :: i_co2_ice=0     ! tracer index of co2 ice
+!      REAL n2ice               ! n2ice layer (kg.m-2) !not used anymore
+      integer :: i_n2_ice=0     ! tracer index of n2 ice
       integer :: i_h2o_ice=0     ! tracer index of h2o ice
       integer :: i_h2o_vap=0     ! tracer index of h2o vapor
@@ -235,6 +235,6 @@
       emisice(2)=0.95            ! Emissivite calotte sud  
 
-      iceradius(1) = 100.e-6     ! mean scat radius of CO2 snow (north)
-      iceradius(2) = 100.e-6     ! mean scat radius of CO2 snow (south)
+      iceradius(1) = 100.e-6     ! mean scat radius of n2 snow (north)
+      iceradius(2) = 100.e-6     ! mean scat radius of n2 snow (south)
       dtemisice(1) = 2.          ! time scale for snow metamorphism (north)
       dtemisice(2) = 2.          ! time scale for snow metamorphism (south
@@ -313,11 +313,11 @@
             endif
           enddo !of do iq=1,nq
-! check for co2_ice / h2o_ice tracers:
-         i_co2_ice=0
+! check for n2_ice / h2o_ice tracers:
+         i_n2_ice=0
          i_h2o_ice=0
          i_h2o_vap=0
          do iq=1,nq
-           if (tname(iq)=="co2_ice") then
-             i_co2_ice=iq
+           if (tname(iq)=="n2") then
+             i_n2_ice=iq
            elseif (tname(iq)=="h2o_ice") then
              i_h2o_ice=iq
@@ -390,5 +390,5 @@
       call getin("rad",rad)
       ! Planetary  radius is needed to compute shadow of the rings
-      IF (rad.eq.-99999. .and. rings_shadow .eqv. .true.) THEN
+      IF (rad.eq.-99999.) THEN
           PRINT *,"STOP. I NEED rad IN RCM1D.DEF."
           STOP
@@ -623,10 +623,10 @@
             write(*,*)"  tracer:",trim(txt)
               
-            ! CO2
-            if (txt.eq."co2_ice") then
+            ! n2
+            if (txt.eq."n2_ice") then
                q(:,iq)=0.   ! kg/kg of atmosphere
                qsurf(iq)=0. ! kg/m2 at the surface               
-               ! Look for a "profile_co2_ice" input file
-               open(91,file='profile_co2_ice',status='old',
+               ! Look for a "profile_n2_ice" input file
+               open(91,file='profile_n2_ice',status='old',
      &         form='formatted',iostat=ierr)
                if (ierr.eq.0) then
@@ -636,8 +636,8 @@
                   enddo
                else
-                  write(*,*) "No profile_co2_ice file!"
+                  write(*,*) "No profile_n2_ice file!"
                endif
                close(91)
-            endif ! of if (txt.eq."co2")
+            endif ! of if (txt.eq."n2")
           
             ! WATER VAPOUR
@@ -739,5 +739,5 @@
       ENDDO
 
-c  emissivity / surface co2 ice ( + h2o ice??)
+c  emissivity / surface n2 ice ( + h2o ice??)
 c  -------------------------------------------
       emis(1)=emissiv ! default value for emissivity
@@ -745,14 +745,14 @@
       call getin("emis",emis(1))
       write(*,*) " emis = ",emis(1)
-      emissiv=emis(1) ! we do this so that condense_co2 sets things to the right
+      emissiv=emis(1) ! we do this so that condense_n2 sets things to the right
                    ! value if there is no snow
 
-      if(i_co2_ice.gt.0)then
-         qsurf(i_co2_ice)=0 ! default value for co2ice
-         print*,'Initial CO2 ice on the surface (kg.m-2)'
-         call getin("co2ice",qsurf(i_co2_ice))
-         write(*,*) " co2ice = ",qsurf(i_co2_ice)
-         IF (qsurf(i_co2_ice).ge.1.E+0) THEN
-            ! if we have some CO2 ice on the surface, change emissivity
+      if(i_n2_ice.gt.0)then
+         qsurf(i_n2_ice)=0 ! default value for n2ice
+         print*,'Initial n2 ice on the surface (kg.m-2)'
+         call getin("n2ice",qsurf(i_n2_ice))
+         write(*,*) " n2ice = ",qsurf(i_n2_ice)
+         IF (qsurf(i_n2_ice).ge.1.E+0) THEN
+            ! if we have some n2 ice on the surface, change emissivity
             if (latitude(1).ge.0) then ! northern hemisphere
               emis(1)=emisice(1)
@@ -911,7 +911,5 @@
       call physdem1("startfi.nc",nsoilmx,1,llm,nq,
      &                dtphys,time,
-     &                tsurf,tsoil,emis,q2,qsurf,
-     &                cloudfrac,totcloudfrac,hice, 
-     &                rnat,pctsrf_sic,tslab,tsea_ice,sea_ice)
+     &                tsurf,tsoil,emis,q2,qsurf)
 
 c=======================================================================
Index: trunk/LMDZ.PLUTO/libf/phypluto/physiq_mod.F90
===================================================================
--- trunk/LMDZ.PLUTO/libf/phypluto/physiq_mod.F90	(revision 3228)
+++ trunk/LMDZ.PLUTO/libf/phypluto/physiq_mod.F90	(revision 3232)
@@ -551,5 +551,5 @@
              tsoil(1:ngrid,isoil)=tsurf(1:ngrid)
            enddo
-           if (is_master) write(*,*) "Physiq: initializing day_ini to pdat !"
+           if (is_master) write(*,*) "Physiq: initializing day_ini to pday !"
            day_ini=pday
          endif
