Index: trunk/LMDZ.GENERIC/libf/phystd/phyetat0_mod.F90
===================================================================
--- trunk/LMDZ.GENERIC/libf/phystd/phyetat0_mod.F90	(revision 3522)
+++ trunk/LMDZ.GENERIC/libf/phystd/phyetat0_mod.F90	(revision 3552)
@@ -4,4 +4,6 @@
 
 real, save :: tab_cntrl_mod(100)
+
+integer,save :: nid_start ! NetCDF file identifier for startfi.nc file
 
 !$OMP THREADPRIVATE(tab_cntrl_mod)
@@ -109,5 +111,5 @@
 if (startphy_file) then
   ! open physics initial state file:
-  call open_startphy(fichnom)
+  call open_startphy(fichnom,nid_start)
 
   ! possibility to modify tab_cntrl in tabfi
@@ -124,5 +126,5 @@
 if (startphy_file) then
   ! Load surface geopotential:
-  call get_field("phisfi",phisfi,found)
+  call get_field(nid_start,"phisfi",phisfi,found)
   if (.not.found) then
     call abort_physic(modname,"Failed loading <phisfi>",1)
@@ -136,5 +138,5 @@
 if (startphy_file) then
   ! Load bare ground albedo: (will be stored in surfdat_h)
-  call get_field("albedodat",albedodat,found)
+  call get_field(nid_start,"albedodat",albedodat,found)
   if (.not.found) then
     call abort_physic(modname,"Failed loading <albedodat>",1)
@@ -152,5 +154,5 @@
 if (startphy_file) then
   ! Load surface albedo (for now assume it is spectrally homogeneous)
-  call get_field("albedo",albedo(:,1),found)
+  call get_field(nid_start,"albedo",albedo(:,1),found)
   if (.not.found) then
     write(*,*) modname//": Failed loading <albedo>"
@@ -173,5 +175,5 @@
 ! ZMEA
 if (startphy_file) then
-  call get_field("ZMEA",zmea,found)
+  call get_field(nid_start,"ZMEA",zmea,found)
   if (.not.found) then
     call abort_physic(modname,"Failed loading <ZMEA>",1)
@@ -185,5 +187,5 @@
 ! ZSTD
 if (startphy_file) then
-  call get_field("ZSTD",zstd,found)
+  call get_field(nid_start,"ZSTD",zstd,found)
   if (.not.found) then
     call abort_physic(modname,"Failed loading <ZSTD>",1)
@@ -197,5 +199,5 @@
 ! ZSIG
 if (startphy_file) then
-  call get_field("ZSIG",zsig,found)
+  call get_field(nid_start,"ZSIG",zsig,found)
   if (.not.found) then
     call abort_physic(modname,"Failed loading <ZSIG>",1)
@@ -209,5 +211,5 @@
 ! ZGAM
 if (startphy_file) then
-  call get_field("ZGAM",zgam,found)
+  call get_field(nid_start,"ZGAM",zgam,found)
   if (.not.found) then
     call abort_physic(modname,"Failed loading <ZGAM>",1)
@@ -221,5 +223,5 @@
 ! ZTHE
 if (startphy_file) then
-  call get_field("ZTHE",zthe,found)
+  call get_field(nid_start,"ZTHE",zthe,found)
   if (.not.found) then
     call abort_physic(modname,"Failed loading <ZTHE>",1)
@@ -233,5 +235,5 @@
 ! Surface temperature :
 if (startphy_file) then
-  call get_field("tsurf",tsurf,found,indextime)
+  call get_field(nid_start,"tsurf",tsurf,found,indextime)
   if (.not.found) then
     call abort_physic(modname,"Failed loading <tsurf>",1)
@@ -245,5 +247,5 @@
 ! Surface emissivity
 if (startphy_file) then
-  call get_field("emis",emis,found,indextime)
+  call get_field(nid_start,"emis",emis,found,indextime)
   if (.not.found) then
     call abort_physic(modname,"Failed loading <emis>",1)
@@ -262,5 +264,5 @@
 if (CLFvarying) then
   if (startphy_file) then
-    call get_field("cloudfrac",cloudfrac,found,indextime)
+    call get_field(nid_start,"cloudfrac",cloudfrac,found,indextime)
     if (.not.found) then
       call abort_physic(modname,"Failed loading <cloudfrac>",1)
@@ -278,5 +280,5 @@
 if (CLFvarying) then
   if (startphy_file) then
-    call get_field("totcloudfrac",totcloudfrac,found,indextime)
+    call get_field(nid_start,"totcloudfrac",totcloudfrac,found,indextime)
     if (.not.found) then
       call abort_physic(modname,"Failed loading <totcloudfrac>",1)
@@ -293,5 +295,5 @@
 ! Height of oceanic ice (added by BC 2010)
 if (startphy_file) then
-  call get_field("hice",hice,found,indextime)
+  call get_field(nid_start,"hice",hice,found,indextime)
   if (.not.found) then
     write(*,*) "phyetat0: Failed loading <hice>"
@@ -308,5 +310,5 @@
 if (startphy_file) then
   ! nature of the surface
-  call get_field("rnat",rnat,found,indextime)
+  call get_field(nid_start,"rnat",rnat,found,indextime)
   if (.not.found) then
     write(*,*) "phyetat0: Failed loading <rnat>"
@@ -329,5 +331,5 @@
 if (startphy_file) then
   ! Pourcentage of sea ice cover
-  call get_field("pctsrf_sic",pctsrf_sic,found,indextime)
+  call get_field(nid_start,"pctsrf_sic",pctsrf_sic,found,indextime)
   if (.not.found) then
     write(*,*) "phyetat0: Failed loading <pctsrf_sic>"
@@ -342,5 +344,5 @@
 if (startphy_file) then
   ! Slab ocean temperature (2 layers)
-  call get_field("tslab",tslab,found,indextime)
+  call get_field(nid_start,"tslab",tslab,found,indextime)
   if (.not.found) then
     write(*,*) "phyetat0: Failed loading <tslab>"
@@ -359,5 +361,5 @@
 if (startphy_file) then
   ! Oceanic ice temperature
-  call get_field("tsea_ice",tsea_ice,found,indextime)
+  call get_field(nid_start,"tsea_ice",tsea_ice,found,indextime)
   if (.not.found) then
     write(*,*) "phyetat0: Failed loading <tsea_ice>"
@@ -372,5 +374,5 @@
 if (startphy_file) then
   ! Oceanic ice temperature
-  call get_field("tice",tice,found,indextime)
+  call get_field(nid_start,"tice",tice,found,indextime)
   if (.not.found) then
     write(*,*) "phyetat0: Failed loading <tice>"
@@ -385,5 +387,5 @@
 if (startphy_file) then
   !  Oceanic ice quantity (kg/m^2)
-  call get_field("sea_ice",sea_ice,found,indextime)
+  call get_field(nid_start,"sea_ice",sea_ice,found,indextime)
   if (.not.found) then
     write(*,*) "phyetat0: Failed loading <sea_ice>"
@@ -399,5 +401,5 @@
 ! pbl wind variance
 if (startphy_file) then
-  call get_field("q2",q2,found,indextime)
+  call get_field(nid_start,"q2",q2,found,indextime)
   if (.not.found) then
     call abort_physic(modname,"Failed loading <q2>",1)
@@ -414,5 +416,5 @@
     txt=noms(iq)
     if (startphy_file) then
-      call get_field(txt,qsurf(:,iq),found,indextime)
+      call get_field(nid_start,txt,qsurf(:,iq),found,indextime)
       if (.not.found) then
         write(*,*) "phyetat0: Failed loading <",trim(txt),">"
@@ -440,5 +442,5 @@
 ! Non-orographic gravity waves
 if (startphy_file) then
-   call get_field("du_nonoro_gwd",du_nonoro_gwd,found,indextime)
+   call get_field(nid_start,"du_nonoro_gwd",du_nonoro_gwd,found,indextime)
    if (.not.found) then
       write(*,*) "phyetat0: <du_nonoro_gwd> not in file"
@@ -451,5 +453,5 @@
 endif ! of if (startphy_file)
 if (startphy_file) then
-   call get_field("dv_nonoro_gwd",dv_nonoro_gwd,found,indextime)
+   call get_field(nid_start,"dv_nonoro_gwd",dv_nonoro_gwd,found,indextime)
    if (.not.found) then
       write(*,*) "phyetat0: <dv_nonoro_gwd> not in file"
@@ -462,5 +464,5 @@
 endif ! of if (startphy_file)
 if (startphy_file) then
-   call get_field("east_gwstress",east_gwstress,found,indextime)
+   call get_field(nid_start,"east_gwstress",east_gwstress,found,indextime)
    if (.not.found) then
       write(*,*) "phyetat0: <east_gwstress> not in file"
@@ -473,5 +475,5 @@
 endif ! of if (startphy_file)
 if (startphy_file) then
-   call get_field("west_gwstress",west_gwstress,found,indextime)
+   call get_field(nid_start,"west_gwstress",west_gwstress,found,indextime)
    if (.not.found) then
       write(*,*) "phyetat0: <west_gwstress> not in file"
@@ -486,5 +488,5 @@
 ! close file:
 !
-if (startphy_file) call close_startphy
+if (startphy_file) call close_startphy(nid_start)
 
 end subroutine phyetat0
