Index: trunk/LMDZ.GENERIC/changelog.txt
===================================================================
--- trunk/LMDZ.GENERIC/changelog.txt	(revision 3422)
+++ trunk/LMDZ.GENERIC/changelog.txt	(revision 3423)
@@ -1970,2 +1970,5 @@
 Fix/clarification of the usage of tice (sea ice surface temperature) vs.
 tsea_ice (temperature of the top layer (ice or snow)).
+
+== 02/09/2024 == SB
+Including variable "tice" in startarchive and newstart
Index: trunk/LMDZ.GENERIC/libf/dynphy_lonlat/phystd/lect_start_archive.F
===================================================================
--- trunk/LMDZ.GENERIC/libf/dynphy_lonlat/phystd/lect_start_archive.F	(revision 3422)
+++ trunk/LMDZ.GENERIC/libf/dynphy_lonlat/phystd/lect_start_archive.F	(revision 3423)
@@ -3,5 +3,5 @@
      &     t,ucov,vcov,ps,h,phisold_newgrid,
      &     q,qsurf,surfith,nid,
-     &     rnat,pctsrf_sic,tslab,tsea_ice,sea_ice,
+     &     rnat,pctsrf_sic,tslab,tsea_ice,tice,sea_ice,
      &     du_nonoro_gwd,dv_nonoro_gwd,east_gwstress,west_gwstress)
 
@@ -71,5 +71,5 @@
       REAL,INTENT(OUT) :: tslab(ngrid,nslay)
       REAL ,INTENT(OUT) ::rnat(ngrid),pctsrf_sic(ngrid)
-      REAL,INTENT(OUT) :: tsea_ice(ngrid),sea_ice(ngrid)
+      REAL,INTENT(OUT) :: tsea_ice(ngrid),tice(ngrid),sea_ice(ngrid)
 c     REAL phisfi(ngrid)
       REAL,INTENT(OUT):: du_nonoro_gwd(ngrid,llm)
@@ -100,5 +100,5 @@
       REAL q2S(iip1,jjp1,llm+1),qsurfS(iip1,jjp1,nqtot)
       real tslabS(iip1,jjp1,nslay)
-      real pctsrf_sicS(iip1,jjp1),tsea_iceS(iip1,jjp1)
+      real pctsrf_sicS(iip1,jjp1),tsea_iceS(iip1,jjp1),ticeS(iip1,jjp1)
       real rnatS(iip1,jjp1), sea_iceS(iip1,jjp1)
       real du_nonoro_gwdS(iip1,jjp1,llm),dv_nonoro_gwdS(iip1,jjp1,llm)
@@ -134,5 +134,6 @@
       real, dimension(:,:,:), allocatable :: tslabold
       real, dimension(:,:), allocatable :: rnatold,pctsrf_sicold
-      real, dimension(:,:), allocatable :: tsea_iceold,sea_iceold
+      real, dimension(:,:), allocatable :: tsea_iceold,ticeold
+      real, dimension(:,:), allocatable :: sea_iceold
       real,allocatable :: du_nonoro_gwdold(:,:,:)
       real,allocatable :: dv_nonoro_gwdold(:,:,:)
@@ -292,4 +293,5 @@
       allocate(pctsrf_sicold(imold+1,jmold+1))
       allocate(tsea_iceold(imold+1,jmold+1))
+      allocate(ticeold(imold+1,jmold+1))
       allocate(sea_iceold(imold+1,jmold+1))
 
@@ -742,4 +744,17 @@
       IF (ierr .NE. NF_NOERR) THEN
          PRINT*, "lect_start_archive: Failed loading <tsea_ice>"
+      ENDIF
+c      
+      ierr = NF_INQ_VARID (nid, "tice", nvarid)
+      IF (ierr .NE. NF_NOERR) THEN
+         PRINT*, "lect_start_archive: Field <tice> not found"
+      ENDIF
+#ifdef NC_DOUBLE
+      ierr = NF_GET_VARA_DOUBLE(nid, nvarid,start,count,ticeold)
+#else
+      ierr = NF_GET_VARA_REAL(nid, nvarid,start,count,ticeold)
+#endif
+      IF (ierr .NE. NF_NOERR) THEN
+         PRINT*, "lect_start_archive: Failed loading <tice>"
       ENDIF
 c
@@ -1314,4 +1329,8 @@
      &                   rlonuold,rlatvold,rlonu,rlatv)
       call gr_dyn_fi (1,iim+1,jjm+1,ngrid,tsea_ices,tsea_ice)
+
+      call interp_horiz (ticeold,tices,imold,jmold,iim,jjm,1,
+     &                   rlonuold,rlatvold,rlonu,rlatv)
+      call gr_dyn_fi (1,iim+1,jjm+1,ngrid,tices,tice)
 
       call interp_horiz (sea_iceold,sea_ices,imold,jmold,iim,jjm,1,
@@ -1522,4 +1541,5 @@
       deallocate(pctsrf_sicold)
       deallocate(tsea_iceold)
+      deallocate(ticeold)
       deallocate(sea_iceold)
 
Index: trunk/LMDZ.GENERIC/libf/dynphy_lonlat/phystd/newstart.F
===================================================================
--- trunk/LMDZ.GENERIC/libf/dynphy_lonlat/phystd/newstart.F	(revision 3422)
+++ trunk/LMDZ.GENERIC/libf/dynphy_lonlat/phystd/newstart.F	(revision 3423)
@@ -128,5 +128,6 @@
       REAL,ALLOCATABLE :: tslab(:,:) ! slab ocean temperature
       REAL pctsrf_sic(ngridmx) ! sea ice cover
-      REAL tsea_ice(ngridmx) ! temperature sea_ice
+      REAL tsea_ice(ngridmx) ! sea ice temperature
+      REAL tice(ngridmx) ! top layer temp, snow/seaice
       REAL sea_ice(ngridmx) ! mass of sea ice (kg/m2)
 
@@ -367,5 +368,5 @@
      &        tsurf,tsoil,emis,spectral_albedofi,q2,qsurf,
      &        cloudfrac,totalfrac,hice,rnat,pctsrf_sic,tslab,tsea_ice,
-     &        sea_ice)
+     &        tice,sea_ice)
 
         ! copy albedo and soil thermal inertia on (local) physics grid
@@ -570,5 +571,5 @@
      &   t,ucov,vcov,ps,teta,phisold_newgrid,q,qsurf,
      &   surfith,nid,
-     &   rnat,pctsrf_sic,tslab,tsea_ice,sea_ice,
+     &   rnat,pctsrf_sic,tslab,tsea_ice,tice,sea_ice,
      &   du_nonoro_gwd,dv_nonoro_gwd,east_gwstress,west_gwstress)
         write(*,*) "OK, read start_archive file"
@@ -620,4 +621,5 @@
       write(*,*) 'noacglac  : H2O ice across Noachis Terra'
       write(*,*) 'oborealis : H2O ice across Vastitas Borealis'
+      write(*,*) 'oceanball : H2O liquid everywhere'
       write(*,*) 'iceball   : Thick ice layer all over surface'
       write(*,*) 'supercontinent: Create a continent of given Ab and TI'
@@ -1677,5 +1679,5 @@
      &                tsurf,tsoil,emis,spectral_albedofi,q2,qsurf,
      &                cloudfrac,totalfrac,hice,
-     &                rnat,pctsrf_sic,tslab,tsea_ice,sea_ice)
+     &                rnat,pctsrf_sic,tslab,tsea_ice,tice,sea_ice)
 
 c=======================================================================
Index: trunk/LMDZ.GENERIC/libf/dynphy_lonlat/phystd/start2archive.F
===================================================================
--- trunk/LMDZ.GENERIC/libf/dynphy_lonlat/phystd/start2archive.F	(revision 3422)
+++ trunk/LMDZ.GENERIC/libf/dynphy_lonlat/phystd/start2archive.F	(revision 3423)
@@ -87,5 +87,5 @@
       REAL rnat(ngridmx),pctsrf_sic(ngridmx),sea_ice(ngridmx)
       REAL, ALLOCATABLE :: tslab(:,:)
-      REAL tsea_ice(ngridmx)
+      REAL tsea_ice(ngridmx),tice(ngridmx)
 
 
@@ -109,5 +109,5 @@
       REAL rnatS(ip1jmp1),pctsrf_sicS(ip1jmp1),sea_iceS(ip1jmp1)
       REAL, ALLOCATABLE :: tslabS(:,:)
-      REAL tsea_iceS(ip1jmp1)
+      REAL tsea_iceS(ip1jmp1),ticeS(ip1jmp1)
 
 !     For non-orographic GW
@@ -250,6 +250,6 @@
 !       change FF 05/2011
      .       cloudfrac,totalcloudfrac,hice,
-!       change BC 05/2014
-     .       rnat,pctsrf_sic,tslab,tsea_ice,sea_ice)
+!       change BC 05/2014, SB 08/2024
+     .       rnat,pctsrf_sic,tslab,tsea_ice,tice,sea_ice)
 
 
@@ -363,4 +363,5 @@
       call gr_fi_dyn(1,ngridmx,iip1,jjp1,pctsrf_sic,pctsrf_sicS)
       call gr_fi_dyn(1,ngridmx,iip1,jjp1,tsea_ice,tsea_iceS)
+      call gr_fi_dyn(1,ngridmx,iip1,jjp1,tice,ticeS)
       call gr_fi_dyn(1,ngridmx,iip1,jjp1,sea_ice,sea_iceS)
       call gr_fi_dyn(nslay,ngridmx,iip1,jjp1,tslab,tslabS)
@@ -550,4 +551,6 @@
           call write_archive(nid,ntime,'tsea_ice'
      &            ,'tsea_ice','',2,tsea_iceS)
+          call write_archive(nid,ntime,'tice'
+     &            ,'tice','',2,ticeS)
         endif !ok_slab_ocean
       
