Index: LMDZ6/branches/LMDZ_ECRad/libf/dyn3d/bilan_dyn.F
===================================================================
--- LMDZ6/branches/LMDZ_ECRad/libf/dyn3d/bilan_dyn.F	(revision 4203)
+++ LMDZ6/branches/LMDZ_ECRad/libf/dyn3d/bilan_dyn.F	(revision 4482)
@@ -185,5 +185,5 @@
            WRITE(lunout,*)'dt_app=',dt_app
            WRITE(lunout,*)'dt_cum=',dt_cum
-           stop
+           call abort_gcm('bilan_dyn','stopped',1)
         endif
 
Index: LMDZ6/branches/LMDZ_ECRad/libf/dyn3d/check_isotopes.F90
===================================================================
--- LMDZ6/branches/LMDZ_ECRad/libf/dyn3d/check_isotopes.F90	(revision 4203)
+++ LMDZ6/branches/LMDZ_ECRad/libf/dyn3d/check_isotopes.F90	(revision 4482)
@@ -2,5 +2,5 @@
    USE strings_mod, ONLY: maxlen, msg, strIdx, strStack, int2str, real2str
    USE infotrac,    ONLY: nqtot, niso, nphas, isotope, isoCheck, iqIsoPha, isoSelect, &
-                          ntiso, iH2O, nzone, tracers, isoName,  itZonIso, tnat
+                          ntiso, iH2O, nzone, tracers, isoName,  itZonIso, getKey
    IMPLICIT NONE
    include "dimensions.h"
@@ -10,5 +10,6 @@
    CHARACTER(LEN=maxlen) :: modname, msg1, nm(2)
    INTEGER :: ixt, ipha, k, i, iq, iiso, izon, ieau, iqeau, iqpar
-   INTEGER, ALLOCATABLE :: ix(:)
+   INTEGER, ALLOCATABLE ::   ix(:)
+   REAL,    ALLOCATABLE, SAVE :: tnat(:)
    REAL    :: xtractot, xiiso, deltaD, q1, q2
    REAL, PARAMETER :: borne     = 1e19,  &
@@ -28,9 +29,10 @@
    IF(niso == 0)        RETURN                   !--- No isotopes => finished
    IF(first) THEN
-      iso_eau = strIdx(isoName,'H2[16]O')
-      iso_HDO = strIdx(isoName,'H[2]HO')
-      iso_O18 = strIdx(isoName,'H2[18]O')
-      iso_O17 = strIdx(isoName,'H2[17]O')
-      iso_HTO = strIdx(isoName,'H[3]HO')
+      iso_eau = strIdx(isoName,'H216O')
+      iso_HDO = strIdx(isoName,'HDO')
+      iso_O18 = strIdx(isoName,'H218O')
+      iso_O17 = strIdx(isoName,'H217O')
+      iso_HTO = strIdx(isoName,'HTO')
+      IF(getKey('tnat', tnat)) CALL abort_gcm(modname, 'missing isotopic parameter', 1)
       first = .FALSE.
    END IF
Index: LMDZ6/branches/LMDZ_ECRad/libf/dyn3d/conf_gcm.F90
===================================================================
--- LMDZ6/branches/LMDZ_ECRad/libf/dyn3d/conf_gcm.F90	(revision 4203)
+++ LMDZ6/branches/LMDZ_ECRad/libf/dyn3d/conf_gcm.F90	(revision 4482)
@@ -415,5 +415,5 @@
         write(lunout,*)'conf_gcm: La valeur de clat passee par run.def', &
              ' est differente de celle lue sur le fichier  start '
-        STOP
+        CALL abort_gcm("conf_gcm","stopped",1)
      ENDIF
 
@@ -429,5 +429,5 @@
         write(lunout,*)'conf_gcm: La valeur de grossismx passee par ', &
              'run.def est differente de celle lue sur le fichier  start '
-        STOP
+        CALL abort_gcm("conf_gcm","stopped",1)
      ENDIF
 
@@ -443,5 +443,5 @@
         write(lunout,*)'conf_gcm: La valeur de grossismy passee par ', &
              'run.def est differente de celle lue sur le fichier  start '
-        STOP
+        CALL abort_gcm("conf_gcm","stopped",1)
      ENDIF
 
@@ -449,5 +449,5 @@
         write(lunout,*) &
              'conf_gcm: ***  ATTENTION !! grossismx < 1 .   *** '
-        STOP
+        CALL abort_gcm("conf_gcm","stopped",1)
      ELSE
         alphax = 1. - 1./ grossismx
@@ -457,5 +457,5 @@
         write(lunout,*) &
              'conf_gcm: ***  ATTENTION !! grossismy < 1 .   *** '
-        STOP
+        CALL abort_gcm("conf_gcm","stopped",1)
      ELSE
         alphay = 1. - 1./ grossismy
@@ -479,5 +479,5 @@
            write(lunout,*)' *** fxyhypb lu sur le fichier start est ', &
                 'F alors  qu il est  T  sur  run.def  ***'
-           STOP
+           CALL abort_gcm("conf_gcm","stopped",1)
         ENDIF
      ELSE
@@ -486,5 +486,5 @@
            write(lunout,*)' ***  fxyhypb lu sur le fichier start est ', &
                 'T alors  qu il est  F  sur  run.def  ****  '
-           STOP
+           CALL abort_gcm("conf_gcm","stopped",1)
         ENDIF
      ENDIF
@@ -502,5 +502,5 @@
            write(lunout,*)'conf_gcm: La valeur de dzoomx passee par ', &
                 'run.def est differente de celle lue sur le fichier  start '
-           STOP
+           CALL abort_gcm("conf_gcm","stopped",1)
         ENDIF
      ENDIF
@@ -518,5 +518,5 @@
            write(lunout,*)'conf_gcm: La valeur de dzoomy passee par ', &
                 'run.def est differente de celle lue sur le fichier  start '
-           STOP
+           CALL abort_gcm("conf_gcm","stopped",1)
         ENDIF
      ENDIF
@@ -533,5 +533,5 @@
            write(lunout,*)'conf_gcm: La valeur de taux passee par ', &
                 'run.def est differente de celle lue sur le fichier  start '
-           STOP
+           CALL abort_gcm("conf_gcm","stopped",1)
         ENDIF
      ENDIF
@@ -548,5 +548,5 @@
            write(lunout,*)'conf_gcm: La valeur de tauy passee par ', &
                 'run.def est differente de celle lue sur le fichier  start '
-           STOP
+           CALL abort_gcm("conf_gcm","stopped",1)
         ENDIF
      ENDIF
@@ -569,5 +569,5 @@
               write(lunout,*)' *** ysinus lu sur le fichier start est F', &
                    ' alors  qu il est  T  sur  run.def  ***'
-              STOP
+              CALL abort_gcm("conf_gcm","stopped",1)
            ENDIF
         ELSE
@@ -576,5 +576,5 @@
               write(lunout,*)' *** ysinus lu sur le fichier start est T', &
                    ' alors  qu il est  F  sur  run.def  ****  '
-              STOP
+              CALL abort_gcm("conf_gcm","stopped",1)
            ENDIF
         ENDIF
@@ -599,14 +599,4 @@
      type_trac = 'lmdz'
      CALL getin('type_trac',type_trac)
-
-     !Config  Key  = config_inca
-     !Config  Desc = Choix de configuration de INCA
-     !Config  Def  = none
-     !Config  Help = Choix de configuration de INCA :
-     !Config         'none' = sans INCA
-     !Config         'chem' = INCA avec calcul de chemie
-     !Config         'aero' = INCA avec calcul des aerosols 
-     config_inca = 'none'
-     CALL getin('config_inca',config_inca)
 
      !Config  Key  = ok_dynzon 
@@ -672,5 +662,4 @@
      write(lunout,*)' offline = ', offline
      write(lunout,*)' type_trac = ', type_trac
-     write(lunout,*)' config_inca = ', config_inca
      write(lunout,*)' ok_dynzon = ', ok_dynzon 
      write(lunout,*)' ok_dyn_ins = ', ok_dyn_ins 
@@ -712,5 +701,5 @@
         write(lunout,*) &
              'conf_gcm: ***  ATTENTION !! grossismx < 1 .   *** '
-        STOP
+        CALL abort_gcm("conf_gcm","stopped",1)
      ELSE
         alphax = 1. - 1./ grossismx
@@ -719,5 +708,5 @@
      IF( grossismy.LT.1. )  THEN
         write(lunout,*) 'conf_gcm: ***ATTENTION !! grossismy < 1 . *** '
-        STOP
+        CALL abort_gcm("conf_gcm","stopped",1)
      ELSE
         alphay = 1. - 1./ grossismy
@@ -795,14 +784,4 @@
      type_trac = 'lmdz'
      CALL getin('type_trac',type_trac)
-
-     !Config  Key  = config_inca
-     !Config  Desc = Choix de configuration de INCA
-     !Config  Def  = none
-     !Config  Help = Choix de configuration de INCA :
-     !Config         'none' = sans INCA
-     !Config         'chem' = INCA avec calcul de chemie
-     !Config         'aero' = INCA avec calcul des aerosols 
-     config_inca = 'none'
-     CALL getin('config_inca',config_inca)
 
      !Config  Key  = ok_dynzon 
@@ -912,5 +891,4 @@
      write(lunout,*)' offline = ', offline
      write(lunout,*)' type_trac = ', type_trac
-     write(lunout,*)' config_inca = ', config_inca
      write(lunout,*)' ok_dynzon = ', ok_dynzon
      write(lunout,*)' ok_dyn_ins = ', ok_dyn_ins 
Index: LMDZ6/branches/LMDZ_ECRad/libf/dyn3d/dynetat0.F90
===================================================================
--- LMDZ6/branches/LMDZ_ECRad/libf/dyn3d/dynetat0.F90	(revision 4203)
+++ LMDZ6/branches/LMDZ_ECRad/libf/dyn3d/dynetat0.F90	(revision 4482)
@@ -6,9 +6,9 @@
 ! Purpose: Initial state reading.
 !-------------------------------------------------------------------------------
-  USE infotrac,    ONLY: nqtot, tracers, niso, iqIsoPha, tnat, alpha_ideal, iH2O
+  USE infotrac,    ONLY: nqtot, tracers, niso, iqIsoPha, iH2O, isoName
   USE strings_mod, ONLY: maxlen, msg, strStack, real2str, int2str
   USE netcdf,      ONLY: NF90_OPEN,  NF90_NOWRITE, NF90_INQ_VARID, &
                          NF90_CLOSE, NF90_GET_VAR, NF90_NoErr
-  USE readTracFiles_mod, ONLY: new2oldName
+  USE readTracFiles_mod, ONLY: new2oldH2O, newHNO3, oldHNO3, getKey
   USE control_mod, ONLY: planet_type
   USE assert_eq_m, ONLY: assert_eq
@@ -41,5 +41,6 @@
   INTEGER, PARAMETER :: length=100
   INTEGER :: iq, fID, vID, idecal, iqParent, iName, iZone, iPhase
-  REAL    :: time, tab_cntrl(length)               !--- RUN PARAMS TABLE
+  REAL    :: time, tnat, alpha_ideal, tab_cntrl(length)    !--- RUN PARAMS TABLE
+  LOGICAL :: lSkip, ll
 !-------------------------------------------------------------------------------
   modname="dynetat0"
@@ -127,21 +128,26 @@
 
 !--- Tracers
+  ll=.FALSE.
+#ifdef REPROBUS
+  ll = NF90_INQ_VARID(fID, 'HNO3tot', vID) /= NF90_NoErr                                 !--- DETECT OLD REPRO start.nc FILE
+#endif
   DO iq=1,nqtot
     var = tracers(iq)%name
-    oldVar = new2oldName(var)
-    !--------------------------------------------------------------------------------------------------------------------------
-    IF(NF90_INQ_VARID(fID, var, vID) == NF90_NoErr) THEN                                 !=== REGULAR CASE
+    oldVar = new2oldH2O(var)
+    lSkip = ll .AND. var == 'HNO3'                                                       !--- FORCE "HNO3_g" READING FOR "HNO3"
+#ifdef REPROBUS
+    ix = strIdx(newHNO3, var); IF(ix /= 0) oldVar = oldHNO3(ix)                          !--- REPROBUS HNO3 exceptions
+#endif
+#ifdef INCA
+    IF(var == 'O3') oldVar = 'OX'                                                        !--- DEAL WITH INCA OZONE EXCEPTION
+#endif
+    !--------------------------------------------------------------------------------------------------------------------------
+    IF(NF90_INQ_VARID(fID, var, vID) == NF90_NoErr .AND. .NOT.lSkip) THEN                !=== REGULAR CASE: AVAILABLE VARIABLE
       CALL err(NF90_GET_VAR(fID,vID,q(:,:,:,iq)),"get",var)
     !--------------------------------------------------------------------------------------------------------------------------
-    ELSE IF(NF90_INQ_VARID(fID, oldVar, vID) == NF90_NoErr) THEN                         !=== OLD NAME
+    ELSE IF(NF90_INQ_VARID(fID, oldVar, vID) == NF90_NoErr) THEN                         !=== TRY WITH ALTERNATE NAME
       CALL msg('Tracer <'//TRIM(var)//'> is missing => initialized to <'//TRIM(oldVar)//'>', modname)
       CALL err(NF90_GET_VAR(fID,vID,q(:,:,:,iq)),"get",oldVar)
     !--------------------------------------------------------------------------------------------------------------------------
-#ifdef INCA
-    ELSE IF(NF90_INQ_VARID(fID, 'OX',   vID) == NF90_NoErr .AND. var == 'O3') THEN       !=== INCA: OX INSTEAD OF O3
-      CALL msg('Tracer <O3> is missing => initialized to <OX>', modname)
-      CALL err(NF90_GET_VAR(fID,vID,q(:,:,:,iq)),"get",'OX')
-    !--------------------------------------------------------------------------------------------------------------------------
-#endif
     ELSE IF(tracers(iq)%iso_iGroup == iH2O .AND. niso > 0) THEN                          !=== WATER ISOTOPES
       iName    = tracers(iq)%iso_iName
@@ -149,6 +155,8 @@
       iqParent = tracers(iq)%iqParent
       IF(tracers(iq)%iso_iZone == 0) THEN
+         IF(getKey('tnat', tnat, isoName(iName)) .OR. getKey('alpha', alpha_ideal, isoName(iName))) &
+            CALL abort_gcm(TRIM(modname), 'missing isotopic parameters', 1)
          CALL msg('Tracer <'//TRIM(var)//'> is missing => initialized with a simplified Rayleigh distillation law.', modname)
-         q(:,:,:,iq) = q(:,:,:,iqParent)*tnat(iName)*(q(:,:,:,iqParent)/30.e-3)**(alpha_ideal(iName)-1.)
+         q(:,:,:,iq) = q(:,:,:,iqParent)*tnat*(q(:,:,:,iqParent)/30.e-3)**(alpha_ideal-1.)
       ELSE
          CALL msg('Tracer <'//TRIM(var)//'> is missing => initialized to its parent isotope concentration.', modname)
Index: LMDZ6/branches/LMDZ_ECRad/libf/dyn3d/dynredem.F90
===================================================================
--- LMDZ6/branches/LMDZ_ECRad/libf/dyn3d/dynredem.F90	(revision 4203)
+++ LMDZ6/branches/LMDZ_ECRad/libf/dyn3d/dynredem.F90	(revision 4482)
@@ -167,5 +167,5 @@
 !-------------------------------------------------------------------------------
   USE strings_mod, ONLY: maxlen
-  USE infotrac, ONLY: nqtot, tracers, types_trac
+  USE infotrac, ONLY: nqtot, tracers, type_trac
   USE control_mod
   USE netcdf,   ONLY: NF90_OPEN,  NF90_NOWRITE, NF90_GET_VAR, NF90_INQ_VARID,  &
@@ -228,5 +228,5 @@
 !--- Tracers in file "start_trac.nc" (added by Anne)
   lread_inca=.FALSE.; fil="start_trac.nc"
-  IF(ANY(types_trac=='inca') .OR. ANY(types_trac=='inco')) INQUIRE(FILE=fil,EXIST=lread_inca)
+  IF(ANY(type_trac == ['inca','inco'])) INQUIRE(FILE=fil,EXIST=lread_inca)
   IF(lread_inca) CALL err(NF90_OPEN(fil,NF90_NOWRITE,nid_trac),"open")
 
Index: LMDZ6/branches/LMDZ_ECRad/libf/dyn3d/gcm.F90
===================================================================
--- LMDZ6/branches/LMDZ_ECRad/libf/dyn3d/gcm.F90	(revision 4203)
+++ LMDZ6/branches/LMDZ_ECRad/libf/dyn3d/gcm.F90	(revision 4482)
@@ -20,5 +20,5 @@
 
   USE filtreg_mod
-  USE infotrac
+  USE infotrac, ONLY: nqtot, init_infotrac
   USE control_mod
   USE mod_const_mpi, ONLY: COMM_LMDZ
@@ -178,5 +178,5 @@
 #ifdef CPP_IOIPSL
   if (calend == 'earth_360d') then
-     call ioconf_calendar('360d')
+     call ioconf_calendar('360_day')
      write(lunout,*)'CALENDRIER CHOISI: Terrestre a 360 jours/an'
   else if (calend == 'earth_365d') then
@@ -205,5 +205,5 @@
   !  Choix du nombre de traceurs et du schema pour l'advection
   !  dans fichier traceur.def, par default ou via INCA
-  call infotrac_init
+  call init_infotrac
 
   ! Allocation de la tableau q : champs advectes   
Index: LMDZ6/branches/LMDZ_ECRad/libf/dyn3d/groupe.F
===================================================================
--- LMDZ6/branches/LMDZ_ECRad/libf/dyn3d/groupe.F	(revision 4203)
+++ LMDZ6/branches/LMDZ_ECRad/libf/dyn3d/groupe.F	(revision 4482)
@@ -51,5 +51,6 @@
       if (firstcall) then
          if (groupe_ok) then
-           if(mod(iim,2**ngroup).ne.0) stop'probleme du nombre de point'
+            if(mod(iim,2**ngroup).ne.0)         
+     &        CALL abort_gcm('groupe','probleme du nombre de point',1)
          endif
          firstcall=.false.
Index: LMDZ6/branches/LMDZ_ECRad/libf/dyn3d/guide_mod.F90
===================================================================
--- LMDZ6/branches/LMDZ_ECRad/libf/dyn3d/guide_mod.F90	(revision 4203)
+++ LMDZ6/branches/LMDZ_ECRad/libf/dyn3d/guide_mod.F90	(revision 4482)
@@ -39,4 +39,6 @@
   REAL, PRIVATE, SAVE     :: lon_min_g,lon_max_g
   REAL, PRIVATE, SAVE     :: tau_lon,tau_lat
+
+  REAL, PRIVATE, SAVE     :: plim_guide_BL
 
   REAL, ALLOCATABLE, DIMENSION(:), PRIVATE, SAVE     :: alpha_u,alpha_v 
@@ -67,4 +69,5 @@
   SUBROUTINE guide_init
 
+    use netcdf, only: nf90_noerr
     USE control_mod, ONLY: day_step
     USE serre_mod, ONLY: grossismx
@@ -113,4 +116,6 @@
     CALL getpar('gamma4',.false.,gamma4,'Zone sans rappel elargie')
     CALL getpar('guide_BL',.true.,guide_BL,'guidage dans C.Lim')
+    CALL getpar('plim_guide_BL',85000.,plim_guide_BL,'BL top presnivs value')
+
 
 ! Sauvegarde du for�age
@@ -169,5 +174,5 @@
        if (ncidpl.eq.-99) then
           rcod=nf90_open('apbp.nc',Nf90_NOWRITe, ncidpl)
-          if (rcod.NE.NF_NOERR) THEN
+          if (rcod.NE.NF90_NOERR) THEN
              abort_message=' Nudging error -> no file apbp.nc'
              CALL abort_gcm(modname,abort_message,1)
@@ -177,5 +182,5 @@
        if (ncidpl.EQ.-99) then
           rcod=nf90_open('P.nc',Nf90_NOWRITe,ncidpl)
-          if (rcod.NE.NF_NOERR) THEN
+          if (rcod.NE.NF90_NOERR) THEN
              abort_message=' Nudging error -> no file P.nc'
              CALL abort_gcm(modname,abort_message,1)
@@ -186,5 +191,5 @@
            if (ncidpl.eq.-99) then
                rcod=nf90_open('u.nc',Nf90_NOWRITe,ncidpl)
-               if (rcod.NE.NF_NOERR) THEN
+               if (rcod.NE.NF90_NOERR) THEN
                   CALL abort_gcm(modname, &
                        ' Nudging error -> no file u.nc',1)
@@ -195,5 +200,5 @@
            if (ncidpl.eq.-99) then
                rcod=nf90_open('v.nc',nf90_nowrite,ncidpl)
-               if (rcod.NE.NF_NOERR) THEN
+               if (rcod.NE.NF90_NOERR) THEN
                   CALL abort_gcm(modname, &
                        ' Nudging error -> no file v.nc',1)
@@ -203,5 +208,5 @@
            if (ncidpl.eq.-99) then
                rcod=nf90_open('T.nc',nf90_nowrite,ncidpl)
-               if (rcod.NE.NF_NOERR) THEN
+               if (rcod.NE.NF90_NOERR) THEN
                   CALL abort_gcm(modname, &
                        ' Nudging error -> no file T.nc',1)
@@ -211,5 +216,5 @@
            if (ncidpl.eq.-99) then
                rcod=nf90_open('hur.nc',nf90_nowrite, ncidpl)
-               if (rcod.NE.NF_NOERR) THEN
+               if (rcod.NE.NF90_NOERR) THEN
                   CALL abort_gcm(modname, &
                        ' Nudging error -> no file hur.nc',1)
@@ -220,6 +225,6 @@
     endif 
     error=NF_INQ_DIMID(ncidpl,'LEVEL',rid)
-    IF (error.NE.NF_NOERR) error=NF_INQ_DIMID(ncidpl,'PRESSURE',rid)
-    IF (error.NE.NF_NOERR) THEN
+    IF (error.NE.NF90_NOERR) error=NF_INQ_DIMID(ncidpl,'PRESSURE',rid)
+    IF (error.NE.NF90_NOERR) THEN
         CALL abort_gcm(modname,'Nudging: error reading pressure levels',1)
     ENDIF
@@ -354,4 +359,6 @@
     INCLUDE "dimensions.h"
     INCLUDE "paramet.h"
+    INCLUDE "iniprint.h"
+
 
     ! Variables entree
@@ -377,4 +384,6 @@
     INTEGER       :: l
     CHARACTER(LEN=20) :: modname="guide_main"
+    CHARACTER (len = 80)   :: abort_message
+
 
 !-----------------------------------------------------------------------
@@ -399,5 +408,5 @@
         else
             do l=1,llm
-                alpha_pcor(l)=(1.+tanh((0.85-presnivs(l)/preff)/0.05))/2.
+               alpha_pcor(l)=(1.+tanh(((plim_guide_BL-presnivs(l))/preff)/0.05))/2.
             enddo
         endif
@@ -442,7 +451,8 @@
       IF (reste.EQ.0.) THEN
           IF (itau_test.EQ.itau) THEN
-            write(*,*)trim(modname)//' second pass in advreel at itau=',&
+            write(lunout,*)trim(modname)//' second pass in advreel at itau=',&
             itau
-            stop
+              abort_message='stopped'
+              CALL abort_gcm(modname,abort_message,1) 
           ELSE
               IF (guide_v) vnat1=vnat2
@@ -937,4 +947,5 @@
     integer i,j,ilon,ilat
     character(len=20),parameter :: modname="tau2alpha"
+    CHARACTER (len = 80)   :: abort_message
 
 
@@ -1033,5 +1044,6 @@
               if (gamma.lt.1.e-5) then
                 write(*,*)trim(modname)//' gamma =',gamma,'<1e-5'
-                stop
+                abort_message='stopped'
+                CALL abort_gcm(modname,abort_message,1)
               endif
               gamma=log(0.5)/log(gamma)
@@ -1078,7 +1090,8 @@
   SUBROUTINE guide_read(timestep)
 
+    use netcdf, only: NF90_GET_VAR, nf90_noerr
+
     IMPLICIT NONE
 
-    include "netcdf.inc"
     include "dimensions.h"
     include "paramet.h"
@@ -1103,24 +1116,24 @@
     if (first) then
          ncidpl=-99
-         write(*,*),trim(modname)//': opening nudging files '
+         write(*,*) trim(modname)//': opening nudging files '
 ! Niveaux de pression si non constants
          if (guide_plevs.EQ.1) then
-             write(*,*),trim(modname)//' Reading nudging on model levels'
+             write(*,*) trim(modname)//' Reading nudging on model levels'
              rcode = nf90_open('apbp.nc', nf90_nowrite, ncidpl)
-             IF (rcode.NE.NF_NOERR) THEN
+             IF (rcode.NE.NF90_NOERR) THEN
               abort_message='Nudging: error -> no file apbp.nc'
               CALL abort_gcm(modname,abort_message,1)
              ENDIF
              rcode = nf90_inq_varid(ncidpl, 'AP', varidap)
-             IF (rcode.NE.NF_NOERR) THEN
+             IF (rcode.NE.NF90_NOERR) THEN
               abort_message='Nudging: error -> no AP variable in file apbp.nc'
               CALL abort_gcm(modname,abort_message,1)
              ENDIF
              rcode = nf90_inq_varid(ncidpl, 'BP', varidbp)
-             IF (rcode.NE.NF_NOERR) THEN
+             IF (rcode.NE.NF90_NOERR) THEN
               abort_message='Nudging: error -> no BP variable in file apbp.nc'
               CALL abort_gcm(modname,abort_message,1)
              ENDIF
-             write(*,*),trim(modname)//' ncidpl,varidap',ncidpl,varidap
+             write(*,*) trim(modname)//' ncidpl,varidap',ncidpl,varidap
          endif
 
@@ -1128,14 +1141,14 @@
          if (guide_plevs.EQ.2) then
              rcode = nf90_open('P.nc', nf90_nowrite, ncidp)
-             IF (rcode.NE.NF_NOERR) THEN
+             IF (rcode.NE.NF90_NOERR) THEN
               abort_message='Nudging: error -> no file P.nc'
               CALL abort_gcm(modname,abort_message,1)
              ENDIF
              rcode = nf90_inq_varid(ncidp, 'PRES', varidp)
-             IF (rcode.NE.NF_NOERR) THEN 
+             IF (rcode.NE.NF90_NOERR) THEN 
               abort_message='Nudging: error -> no PRES variable in file P.nc'
               CALL abort_gcm(modname,abort_message,1)
              ENDIF
-             write(*,*),trim(modname)//' ncidp,varidp',ncidp,varidp
+             write(*,*) trim(modname)//' ncidp,varidp',ncidp,varidp
              if (ncidpl.eq.-99) ncidpl=ncidp
          endif
@@ -1144,14 +1157,14 @@
          if (guide_u) then
              rcode = nf90_open('u.nc', nf90_nowrite, ncidu)
-             IF (rcode.NE.NF_NOERR) THEN
+             IF (rcode.NE.NF90_NOERR) THEN
               abort_message='Nudging: error -> no file u.nc'
               CALL abort_gcm(modname,abort_message,1)
              ENDIF
              rcode = nf90_inq_varid(ncidu, 'UWND', varidu)
-             IF (rcode.NE.NF_NOERR) THEN
+             IF (rcode.NE.NF90_NOERR) THEN
               abort_message='Nudging: error -> no UWND variable in file u.nc'
               CALL abort_gcm(modname,abort_message,1)
              ENDIF
-             write(*,*),trim(modname)//' ncidu,varidu',ncidu,varidu
+             write(*,*) trim(modname)//' ncidu,varidu',ncidu,varidu
              if (ncidpl.eq.-99) ncidpl=ncidu
 
@@ -1175,14 +1188,14 @@
          if (guide_v) then
              rcode = nf90_open('v.nc', nf90_nowrite, ncidv)
-             IF (rcode.NE.NF_NOERR) THEN
+             IF (rcode.NE.NF90_NOERR) THEN
               abort_message='Nudging: error -> no file v.nc'
               CALL abort_gcm(modname,abort_message,1)
              ENDIF
              rcode = nf90_inq_varid(ncidv, 'VWND', varidv)
-             IF (rcode.NE.NF_NOERR) THEN
+             IF (rcode.NE.NF90_NOERR) THEN
               abort_message='Nudging: error -> no VWND variable in file v.nc'
               CALL abort_gcm(modname,abort_message,1)
              ENDIF
-             write(*,*),trim(modname)//' ncidv,varidv',ncidv,varidv
+             write(*,*) trim(modname)//' ncidv,varidv',ncidv,varidv
              if (ncidpl.eq.-99) ncidpl=ncidv
              
@@ -1208,14 +1221,14 @@
          if (guide_T) then
              rcode = nf90_open('T.nc', nf90_nowrite, ncidt)
-             IF (rcode.NE.NF_NOERR) THEN
+             IF (rcode.NE.NF90_NOERR) THEN
               abort_message='Nudging: error -> no file T.nc'
               CALL abort_gcm(modname,abort_message,1)
              ENDIF
              rcode = nf90_inq_varid(ncidt, 'AIR', varidt)
-             IF (rcode.NE.NF_NOERR) THEN
+             IF (rcode.NE.NF90_NOERR) THEN
               abort_message='Nudging: error -> no AIR variable in file T.nc'
               CALL abort_gcm(modname,abort_message,1)
              ENDIF
-             write(*,*),trim(modname)//' ncidT,varidT',ncidt,varidt
+             write(*,*) trim(modname)//' ncidT,varidT',ncidt,varidt
              if (ncidpl.eq.-99) ncidpl=ncidt
 
@@ -1239,14 +1252,14 @@
          if (guide_Q) then
              rcode = nf90_open('hur.nc', nf90_nowrite, ncidQ)
-             IF (rcode.NE.NF_NOERR) THEN
+             IF (rcode.NE.NF90_NOERR) THEN
               abort_message='Nudging: error -> no file hur.nc'
               CALL abort_gcm(modname,abort_message,1)
              ENDIF
              rcode = nf90_inq_varid(ncidQ, 'RH', varidQ)
-             IF (rcode.NE.NF_NOERR) THEN
+             IF (rcode.NE.NF90_NOERR) THEN
               abort_message='Nudging: error -> no RH variable in file hur.nc'
               CALL abort_gcm(modname,abort_message,1)
              ENDIF
-             write(*,*),trim(modname)//' ncidQ,varidQ',ncidQ,varidQ
+             write(*,*) trim(modname)//' ncidQ,varidQ',ncidQ,varidQ
              if (ncidpl.eq.-99) ncidpl=ncidQ
 
@@ -1270,14 +1283,14 @@
          if ((guide_P).OR.(guide_modele)) then
              rcode = nf90_open('ps.nc', nf90_nowrite, ncidps)
-             IF (rcode.NE.NF_NOERR) THEN
+             IF (rcode.NE.NF90_NOERR) THEN
               abort_message='Nudging: error -> no file ps.nc'
               CALL abort_gcm(modname,abort_message,1)
              ENDIF
              rcode = nf90_inq_varid(ncidps, 'SP', varidps)
-             IF (rcode.NE.NF_NOERR) THEN
+             IF (rcode.NE.NF90_NOERR) THEN
               abort_message='Nudging: error -> no SP variable in file ps.nc'
               CALL abort_gcm(modname,abort_message,1)
              ENDIF
-             write(*,*),trim(modname)//' ncidps,varidps',ncidps,varidps
+             write(*,*) trim(modname)//' ncidps,varidps',ncidps,varidps
          endif
 ! Coordonnee verticale
@@ -1285,21 +1298,12 @@
               rcode = nf90_inq_varid(ncidpl, 'LEVEL', varidpl)
               IF (rcode.NE.0) rcode = nf90_inq_varid(ncidpl, 'PRESSURE', varidpl)
-              write(*,*),trim(modname)//' ncidpl,varidpl',ncidpl,varidpl
+              write(*,*) trim(modname)//' ncidpl,varidpl',ncidpl,varidpl
          endif
 ! Coefs ap, bp pour calcul de la pression aux differents niveaux
          if (guide_plevs.EQ.1) then
-#ifdef NC_DOUBLE
-             status=NF_GET_VARA_DOUBLE(ncidpl,varidap,1,nlevnc,apnc)
-             status=NF_GET_VARA_DOUBLE(ncidpl,varidbp,1,nlevnc,bpnc)
-#else
-             status=NF_GET_VARA_REAL(ncidpl,varidap,1,nlevnc,apnc)
-             status=NF_GET_VARA_REAL(ncidpl,varidbp,1,nlevnc,bpnc)
-#endif
+             status=NF90_GET_VAR(ncidpl,varidap,apnc,[1],[nlevnc])
+             status=NF90_GET_VAR(ncidpl,varidbp,bpnc,[1],[nlevnc])
          ELSEIF (guide_plevs.EQ.0) THEN
-#ifdef NC_DOUBLE
-             status=NF_GET_VARA_DOUBLE(ncidpl,varidpl,1,nlevnc,apnc)
-#else
-             status=NF_GET_VARA_REAL(ncidpl,varidpl,1,nlevnc,apnc)
-#endif
+             status=NF90_GET_VAR(ncidpl,varidpl,apnc,[1],[nlevnc])
 !FC Pour les corrections la pression est deja en Pascals on commente la ligne ci-dessous
              IF(convert_Pa) apnc=apnc*100.! conversion en Pascals
@@ -1326,9 +1330,5 @@
 ! Pression 
      if (guide_plevs.EQ.2) then
-#ifdef NC_DOUBLE
-         status=NF_GET_VARA_DOUBLE(ncidp,varidp,start,count,pnat2)
-#else
-         status=NF_GET_VARA_REAL(ncidp,varidp,start,count,pnat2)
-#endif
+         status=NF90_GET_VAR(ncidp,varidp,pnat2,start,count)
          IF (invert_y) THEN
 !           PRINT*,"Invertion impossible actuellement"
@@ -1340,9 +1340,5 @@
 !  Vent zonal
      if (guide_u) then
-#ifdef NC_DOUBLE
-         status=NF_GET_VARA_DOUBLE(ncidu,varidu,start,count,unat2)
-#else
-         status=NF_GET_VARA_REAL(ncidu,varidu,start,count,unat2)
-#endif
+         status=NF90_GET_VAR(ncidu,varidu,unat2,start,count)
          IF (invert_y) THEN
            CALL invert_lat(iip1,jjp1,nlevnc,unat2)
@@ -1352,9 +1348,5 @@
 !  Temperature
      if (guide_T) then
-#ifdef NC_DOUBLE
-         status=NF_GET_VARA_DOUBLE(ncidt,varidt,start,count,tnat2)
-#else
-         status=NF_GET_VARA_REAL(ncidt,varidt,start,count,tnat2)
-#endif
+         status=NF90_GET_VAR(ncidt,varidt,tnat2,start,count)
          IF (invert_y) THEN
            CALL invert_lat(iip1,jjp1,nlevnc,tnat2)
@@ -1364,9 +1356,5 @@
 !  Humidite
      if (guide_Q) then
-#ifdef NC_DOUBLE
-         status=NF_GET_VARA_DOUBLE(ncidQ,varidQ,start,count,qnat2)
-#else
-         status=NF_GET_VARA_REAL(ncidQ,varidQ,start,count,qnat2)
-#endif
+         status=NF90_GET_VAR(ncidQ,varidQ,qnat2,start,count)
          IF (invert_y) THEN
            CALL invert_lat(iip1,jjp1,nlevnc,qnat2)
@@ -1378,9 +1366,5 @@
      if (guide_v) then
          count(2)=jjm
-#ifdef NC_DOUBLE
-         status=NF_GET_VARA_DOUBLE(ncidv,varidv,start,count,vnat2)
-#else
-         status=NF_GET_VARA_REAL(ncidv,varidv,start,count,vnat2)
-#endif
+         status=NF90_GET_VAR(ncidv,varidv,vnat2,start,count)
          IF (invert_y) THEN
            CALL invert_lat(iip1,jjm,nlevnc,vnat2)
@@ -1395,9 +1379,5 @@
          count(3)=1
          count(4)=0
-#ifdef NC_DOUBLE
-         status=NF_GET_VARA_DOUBLE(ncidps,varidps,start,count,psnat2)
-#else
-         status=NF_GET_VARA_REAL(ncidps,varidps,start,count,psnat2)
-#endif
+         status=NF90_GET_VAR(ncidps,varidps,psnat2,start,count)
          IF (invert_y) THEN
            CALL invert_lat(iip1,jjp1,1,psnat2)
@@ -1410,7 +1390,8 @@
   SUBROUTINE guide_read2D(timestep)
 
+    use netcdf, only: nf90_get_var, nf90_noerr
+
     IMPLICIT NONE
 
-    include "netcdf.inc"
     include "dimensions.h"
     include "paramet.h"
@@ -1443,15 +1424,15 @@
            write(*,*)trim(modname)//' Reading nudging on model levels'
            rcode = nf90_open('apbp.nc', nf90_nowrite, ncidpl)
-           IF (rcode.NE.NF_NOERR) THEN
+           IF (rcode.NE.NF90_NOERR) THEN
              abort_message='Nudging: error -> no file apbp.nc'
            CALL abort_gcm(modname,abort_message,1)
            ENDIF
            rcode = nf90_inq_varid(ncidpl, 'AP', varidap)
-           IF (rcode.NE.NF_NOERR) THEN
+           IF (rcode.NE.NF90_NOERR) THEN
              abort_message='Nudging: error -> no AP variable in file apbp.nc'
            CALL abort_gcm(modname,abort_message,1)
            ENDIF
            rcode = nf90_inq_varid(ncidpl, 'BP', varidbp)
-           IF (rcode.NE.NF_NOERR) THEN
+           IF (rcode.NE.NF90_NOERR) THEN
              abort_message='Nudging: error -> no BP variable in file apbp.nc'
              CALL abort_gcm(modname,abort_message,1)
@@ -1462,10 +1443,10 @@
          if (guide_plevs.EQ.2) then
            rcode = nf90_open('P.nc', nf90_nowrite, ncidp)
-           IF (rcode.NE.NF_NOERR) THEN
+           IF (rcode.NE.NF90_NOERR) THEN
              abort_message='Nudging: error -> no file P.nc'
              CALL abort_gcm(modname,abort_message,1)
            ENDIF
            rcode = nf90_inq_varid(ncidp, 'PRES', varidp)
-           IF (rcode.NE.NF_NOERR) THEN
+           IF (rcode.NE.NF90_NOERR) THEN
              abort_message='Nudging: error -> no PRES variable in file P.nc'
              CALL abort_gcm(modname,abort_message,1)
@@ -1477,10 +1458,10 @@
          if (guide_u) then
            rcode = nf90_open('u.nc', nf90_nowrite, ncidu)
-           IF (rcode.NE.NF_NOERR) THEN
+           IF (rcode.NE.NF90_NOERR) THEN
              abort_message='Nudging: error -> no file u.nc'
              CALL abort_gcm(modname,abort_message,1)
            ENDIF
            rcode = nf90_inq_varid(ncidu, 'UWND', varidu)
-           IF (rcode.NE.NF_NOERR) THEN
+           IF (rcode.NE.NF90_NOERR) THEN
              abort_message='Nudging: error -> no UWND variable in file u.nc'
              CALL abort_gcm(modname,abort_message,1)
@@ -1492,10 +1473,10 @@
          if (guide_v) then
            rcode = nf90_open('v.nc', nf90_nowrite, ncidv)
-           IF (rcode.NE.NF_NOERR) THEN
+           IF (rcode.NE.NF90_NOERR) THEN
              abort_message='Nudging: error -> no file v.nc'
              CALL abort_gcm(modname,abort_message,1)
            ENDIF
            rcode = nf90_inq_varid(ncidv, 'VWND', varidv)
-           IF (rcode.NE.NF_NOERR) THEN
+           IF (rcode.NE.NF90_NOERR) THEN
              abort_message='Nudging: error -> no VWND variable in file v.nc'
              CALL abort_gcm(modname,abort_message,1)
@@ -1507,10 +1488,10 @@
          if (guide_T) then
            rcode = nf90_open('T.nc', nf90_nowrite, ncidt)
-           IF (rcode.NE.NF_NOERR) THEN
+           IF (rcode.NE.NF90_NOERR) THEN
              abort_message='Nudging: error -> no file T.nc'
              CALL abort_gcm(modname,abort_message,1)
            ENDIF
            rcode = nf90_inq_varid(ncidt, 'AIR', varidt)
-           IF (rcode.NE.NF_NOERR) THEN
+           IF (rcode.NE.NF90_NOERR) THEN
              abort_message='Nudging: error -> no AIR variable in file T.nc'
              CALL abort_gcm(modname,abort_message,1)
@@ -1522,10 +1503,10 @@
          if (guide_Q) then
            rcode = nf90_open('hur.nc', nf90_nowrite, ncidQ)
-           IF (rcode.NE.NF_NOERR) THEN
+           IF (rcode.NE.NF90_NOERR) THEN
              abort_message='Nudging: error -> no file hur.nc'
              CALL abort_gcm(modname,abort_message,1)
            ENDIF
            rcode = nf90_inq_varid(ncidQ, 'RH', varidQ)
-           IF (rcode.NE.NF_NOERR) THEN
+           IF (rcode.NE.NF90_NOERR) THEN
              abort_message='Nudging: error -> no RH,variable in file hur.nc'
              CALL abort_gcm(modname,abort_message,1)
@@ -1537,10 +1518,10 @@
          if ((guide_P).OR.(guide_modele)) then
            rcode = nf90_open('ps.nc', nf90_nowrite, ncidps)
-           IF (rcode.NE.NF_NOERR) THEN
+           IF (rcode.NE.NF90_NOERR) THEN
              abort_message='Nudging: error -> no file ps.nc'
              CALL abort_gcm(modname,abort_message,1)
            ENDIF
            rcode = nf90_inq_varid(ncidps, 'SP', varidps)
-           IF (rcode.NE.NF_NOERR) THEN
+           IF (rcode.NE.NF90_NOERR) THEN
              abort_message='Nudging: error -> no SP variable in file ps.nc'
              CALL abort_gcm(modname,abort_message,1)
@@ -1556,17 +1537,8 @@
 ! Coefs ap, bp pour calcul de la pression aux differents niveaux
          if (guide_plevs.EQ.1) then
-#ifdef NC_DOUBLE
-             status=NF_GET_VARA_DOUBLE(ncidpl,varidap,1,nlevnc,apnc)
-             status=NF_GET_VARA_DOUBLE(ncidpl,varidbp,1,nlevnc,bpnc)
-#else
-             status=NF_GET_VARA_REAL(ncidpl,varidap,1,nlevnc,apnc)
-             status=NF_GET_VARA_REAL(ncidpl,varidbp,1,nlevnc,bpnc)
-#endif
+             status=NF90_GET_VAR(ncidpl,varidap,apnc,[1],[nlevnc])
+             status=NF90_GET_VAR(ncidpl,varidbp,bpnc,[1],[nlevnc])
          elseif (guide_plevs.EQ.0) THEN
-#ifdef NC_DOUBLE
-             status=NF_GET_VARA_DOUBLE(ncidpl,varidpl,1,nlevnc,apnc)
-#else
-             status=NF_GET_VARA_REAL(ncidpl,varidpl,1,nlevnc,apnc)
-#endif
+             status=NF90_GET_VAR(ncidpl,varidpl,apnc,[1],[nlevnc])
              apnc=apnc*100.! conversion en Pascals
              bpnc(:)=0.
@@ -1592,9 +1564,5 @@
 !  Pression
      if (guide_plevs.EQ.2) then
-#ifdef NC_DOUBLE
-         status=NF_GET_VARA_DOUBLE(ncidp,varidp,start,count,zu)
-#else
-         status=NF_GET_VARA_REAL(ncidp,varidp,start,count,zu)
-#endif
+         status=NF90_GET_VAR(ncidp,varidp,zu,start,count)
          DO i=1,iip1
              pnat2(i,:,:)=zu(:,:)
@@ -1609,9 +1577,5 @@
 !  Vent zonal
      if (guide_u) then
-#ifdef NC_DOUBLE
-         status=NF_GET_VARA_DOUBLE(ncidu,varidu,start,count,zu)
-#else
-         status=NF_GET_VARA_REAL(ncidu,varidu,start,count,zu)
-#endif
+         status=NF90_GET_VAR(ncidu,varidu,zu,start,count)
          DO i=1,iip1
              unat2(i,:,:)=zu(:,:)
@@ -1626,9 +1590,5 @@
 !  Temperature
      if (guide_T) then
-#ifdef NC_DOUBLE
-         status=NF_GET_VARA_DOUBLE(ncidt,varidt,start,count,zu)
-#else
-         status=NF_GET_VARA_REAL(ncidt,varidt,start,count,zu)
-#endif
+         status=NF90_GET_VAR(ncidt,varidt,zu,start,count)
          DO i=1,iip1
              tnat2(i,:,:)=zu(:,:)
@@ -1643,9 +1603,5 @@
 !  Humidite
      if (guide_Q) then
-#ifdef NC_DOUBLE
-         status=NF_GET_VARA_DOUBLE(ncidQ,varidQ,start,count,zu)
-#else
-         status=NF_GET_VARA_REAL(ncidQ,varidQ,start,count,zu)
-#endif
+         status=NF90_GET_VAR(ncidQ,varidQ,zu,start,count)
          DO i=1,iip1
              qnat2(i,:,:)=zu(:,:)
@@ -1661,9 +1617,5 @@
      if (guide_v) then
          count(2)=jjm
-#ifdef NC_DOUBLE
-         status=NF_GET_VARA_DOUBLE(ncidv,varidv,start,count,zv)
-#else
-         status=NF_GET_VARA_REAL(ncidv,varidv,start,count,zv)
-#endif
+         status=NF90_GET_VAR(ncidv,varidv,zv,start,count)
          DO i=1,iip1
              vnat2(i,:,:)=zv(:,:)
@@ -1683,9 +1635,5 @@
          count(3)=1
          count(4)=0
-#ifdef NC_DOUBLE
-         status=NF_GET_VARA_DOUBLE(ncidps,varidps,start,count,zu(:,1))
-#else
-         status=NF_GET_VARA_REAL(ncidps,varidps,start,count,zu(:,1))
-#endif
+         status=NF90_GET_VAR(ncidps,varidps,zu(:,1),start,count)
          DO i=1,iip1
              psnat2(i,:)=zu(:,1)
@@ -1706,5 +1654,5 @@
     USE comvert_mod, ONLY: presnivs
     use netcdf95, only: nf95_def_var, nf95_put_var
-    use netcdf, only: nf90_float
+    use netcdf, only: nf90_float, nf90_def_var
     
     IMPLICIT NONE
@@ -1748,13 +1696,13 @@
 
 ! Creation des variables dimensions
-        ierr=NF_DEF_VAR(nid,"LONU",NF_FLOAT,1,id_lonu,vid_lonu)
-        ierr=NF_DEF_VAR(nid,"LONV",NF_FLOAT,1,id_lonv,vid_lonv)
-        ierr=NF_DEF_VAR(nid,"LATU",NF_FLOAT,1,id_latu,vid_latu)
-        ierr=NF_DEF_VAR(nid,"LATV",NF_FLOAT,1,id_latv,vid_latv)
-        ierr=NF_DEF_VAR(nid,"LEVEL",NF_FLOAT,1,id_lev,vid_lev)
-        ierr=NF_DEF_VAR(nid,"cu",NF_FLOAT,2,(/id_lonu,id_latu/),vid_cu)
-        ierr=NF_DEF_VAR(nid,"cv",NF_FLOAT,2,(/id_lonv,id_latv/),vid_cv)
-        ierr=NF_DEF_VAR(nid,"au",NF_FLOAT,2,(/id_lonu,id_latu/),vid_au)
-        ierr=NF_DEF_VAR(nid,"av",NF_FLOAT,2,(/id_lonv,id_latv/),vid_av)
+        ierr=NF90_DEF_VAR(nid,"LONU",NF90_FLOAT,id_lonu,vid_lonu)
+        ierr=NF90_DEF_VAR(nid,"LONV",NF90_FLOAT,id_lonv,vid_lonv)
+        ierr=NF90_DEF_VAR(nid,"LATU",NF90_FLOAT,id_latu,vid_latu)
+        ierr=NF90_DEF_VAR(nid,"LATV",NF90_FLOAT,id_latv,vid_latv)
+        ierr=NF90_DEF_VAR(nid,"LEVEL",NF90_FLOAT,id_lev,vid_lev)
+        ierr=NF90_DEF_VAR(nid,"cu",NF90_FLOAT,(/id_lonu,id_latu/),vid_cu)
+        ierr=NF90_DEF_VAR(nid,"cv",NF90_FLOAT,(/id_lonv,id_latv/),vid_cv)
+        ierr=NF90_DEF_VAR(nid,"au",NF90_FLOAT,(/id_lonu,id_latu/),vid_au)
+        ierr=NF90_DEF_VAR(nid,"av",NF90_FLOAT,(/id_lonv,id_latv/),vid_av)
         call nf95_def_var(nid, "alpha_T", nf90_float, (/id_lonv, id_latu/), &
              varid_alpha_t)
@@ -1794,33 +1742,33 @@
 ! Pressure (GCM)
         dim4=(/id_lonv,id_latu,id_lev,id_tim/)
-        ierr = NF_DEF_VAR(nid,"SP",NF_FLOAT,4,dim4,varid)
+        ierr = NF90_DEF_VAR(nid,"SP",NF90_FLOAT,dim4,varid)
 ! Surface pressure (guidage)
         IF (guide_P) THEN
             dim3=(/id_lonv,id_latu,id_tim/)
-            ierr = NF_DEF_VAR(nid,"ps",NF_FLOAT,3,dim3,varid)
+            ierr = NF90_DEF_VAR(nid,"ps",NF90_FLOAT,dim3,varid)
         ENDIF
 ! Zonal wind
         IF (guide_u) THEN
             dim4=(/id_lonu,id_latu,id_lev,id_tim/)
-            ierr = NF_DEF_VAR(nid,"u",NF_FLOAT,4,dim4,varid)
-            ierr = NF_DEF_VAR(nid,"ua",NF_FLOAT,4,dim4,varid)
-            ierr = NF_DEF_VAR(nid,"ucov",NF_FLOAT,4,dim4,varid)
+            ierr = NF90_DEF_VAR(nid,"u",NF90_FLOAT,dim4,varid)
+            ierr = NF90_DEF_VAR(nid,"ua",NF90_FLOAT,dim4,varid)
+            ierr = NF90_DEF_VAR(nid,"ucov",NF90_FLOAT,dim4,varid)
         ENDIF
 ! Merid. wind
         IF (guide_v) THEN
             dim4=(/id_lonv,id_latv,id_lev,id_tim/)
-            ierr = NF_DEF_VAR(nid,"v",NF_FLOAT,4,dim4,varid)
-            ierr = NF_DEF_VAR(nid,"va",NF_FLOAT,4,dim4,varid)
-            ierr = NF_DEF_VAR(nid,"vcov",NF_FLOAT,4,dim4,varid)
+            ierr = NF90_DEF_VAR(nid,"v",NF90_FLOAT,dim4,varid)
+            ierr = NF90_DEF_VAR(nid,"va",NF90_FLOAT,dim4,varid)
+            ierr = NF90_DEF_VAR(nid,"vcov",NF90_FLOAT,dim4,varid)
         ENDIF
 ! Pot. Temperature
         IF (guide_T) THEN
             dim4=(/id_lonv,id_latu,id_lev,id_tim/)
-            ierr = NF_DEF_VAR(nid,"teta",NF_FLOAT,4,dim4,varid)
+            ierr = NF90_DEF_VAR(nid,"teta",NF90_FLOAT,dim4,varid)
         ENDIF
 ! Specific Humidity
         IF (guide_Q) THEN
             dim4=(/id_lonv,id_latu,id_lev,id_tim/)
-            ierr = NF_DEF_VAR(nid,"q",NF_FLOAT,4,dim4,varid)
+            ierr = NF90_DEF_VAR(nid,"q",NF90_FLOAT,dim4,varid)
         ENDIF
         
Index: LMDZ6/branches/LMDZ_ECRad/libf/dyn3d/iniacademic.F90
===================================================================
--- LMDZ6/branches/LMDZ_ECRad/libf/dyn3d/iniacademic.F90	(revision 4203)
+++ LMDZ6/branches/LMDZ_ECRad/libf/dyn3d/iniacademic.F90	(revision 4482)
@@ -5,5 +5,5 @@
 
   USE filtreg_mod, ONLY: inifilr
-  USE infotrac,    ONLY: nqtot, niso, tnat, alpha_ideal, iqIsoPha, tracers
+  USE infotrac,    ONLY: nqtot, niso, iqIsoPha, tracers, getKey, isoName
   USE control_mod, ONLY: day_step,planet_type
   use exner_hyb_m, only: exner_hyb
@@ -18,8 +18,11 @@
   USE comconst_mod, ONLY: cpp, kappa, g, daysec, dtvr, pi, im, jm
   USE logic_mod, ONLY: iflag_phys, read_start
-  USE comvert_mod, ONLY: ap, bp, preff, presnivs, pressure_exner
+  USE comvert_mod, ONLY: ap, bp, preff, pa, presnivs, pressure_exner
   USE temps_mod, ONLY: annee_ref, day_ini, day_ref
   USE ener_mod, ONLY: etot0,ptot0,ztot0,stot0,ang0
   USE readTracFiles_mod, ONLY: addPhase
+  use netcdf, only : NF90_NOWRITE,NF90_OPEN,NF90_NOERR,NF90_INQ_VARID
+  use netcdf, only : NF90_CLOSE, NF90_GET_VAR
+
 
   !   Author:    Frederic Hourdin      original: 15/01/93
@@ -64,4 +67,7 @@
   INTEGER i,j,l,lsup,ij, iq, iName, iPhase, iqParent
 
+  integer :: nid_relief,varid,ierr
+  real, dimension(iip1,jjp1) :: relief
+
   REAL teta0,ttp,delt_y,delt_z,eps ! Constantes pour profil de T
   REAL k_f,k_c_a,k_c_s         ! Constantes de rappel
@@ -73,5 +79,5 @@
   integer idum
 
-  REAL zdtvr
+  REAL zdtvr, tnat, alpha_ideal
   
   character(len=*),parameter :: modname="iniacademic"
@@ -118,19 +124,48 @@
   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
+
+     !------------------------------------------------------------------
+     ! Lecture eventuelle d'un fichier de relief interpollee sur la grille
+     ! du modele.
+     ! On suppose que le fichier relief_in.nc est stoké sur une grille
+     ! iim*jjp1
+     ! Facile a créer à partir de la commande
+     ! cdo remapcon,fichier_output_phys.nc Relief.nc relief_in.nc
+     !------------------------------------------------------------------
+
+     relief=0.
+     ierr = NF90_OPEN ('relief_in.nc', NF90_NOWRITE,nid_relief)
+     if (ierr.EQ.NF90_NOERR) THEN
+         ierr=NF90_INQ_VARID(nid_relief,'RELIEF',varid)
+         if (ierr==NF90_NOERR) THEN
+              ierr=NF90_GET_VAR(nid_relief,varid,relief(1:iim,1:jjp1))
+              relief(iip1,:)=relief(1,:)
+         else
+              CALL abort_gcm ('iniacademic','variable RELIEF pas la',1)
+         endif
      endif
+     ierr = NF90_CLOSE (nid_relief)
+
+     !------------------------------------------------------------------
+     ! Initialisation du geopotentiel au sol et de la pression
+     !------------------------------------------------------------------
+
+     print*,'relief=',minval(relief),maxval(relief),'g=',g
+     do j=1,jjp1
+        do i=1,iip1
+           phis((j-1)*iip1+i)=g*relief(i,j)
+        enddo
+     enddo
+     print*,'phis=',minval(phis),maxval(phis),'g=',g
 
      ! ground geopotential
-     phis(:)=0.
+     !phis(:)=0.
+     ps(:)=preff
      CALL pression ( ip1jmp1, ap, bp, ps, p       )
 
@@ -286,5 +321,7 @@
               iqParent = tracers(iq)%iqParent
               IF(tracers(iq)%iso_iZone == 0) THEN
-                 q(:,:,iq) = q(:,:,iqParent)*tnat(iName)*(q(:,:,iqParent)/30.e-3)**(alpha_ideal(iName)-1.)
+                 IF(getKey('tnat', tnat, isoName(iName)) .OR. getKey('alpha', alpha_ideal, isoName(iName))) &
+                    CALL abort_gcm(TRIM(modname), 'missing isotopic parameters', 1)
+                 q(:,:,iq) = q(:,:,iqParent)*tnat*(q(:,:,iqParent)/30.e-3)**(alpha_ideal-1.)
               ELSE
                  q(:,:,iq) = q(:,:,iqIsoPha(iName,iPhase))
Index: LMDZ6/branches/LMDZ_ECRad/libf/dyn3d/replay3d.F90
===================================================================
--- LMDZ6/branches/LMDZ_ECRad/libf/dyn3d/replay3d.F90	(revision 4203)
+++ LMDZ6/branches/LMDZ_ECRad/libf/dyn3d/replay3d.F90	(revision 4482)
@@ -170,5 +170,5 @@
 
 CALL suphel
-open(82,file='dump_param.bin',form='unformatted',status='old')
+!open(82,file='dump_param.bin',form='unformatted',status='old')
 
 
Index: LMDZ6/branches/LMDZ_ECRad/libf/dyn3d/vlsplt.F
===================================================================
--- LMDZ6/branches/LMDZ_ECRad/libf/dyn3d/vlsplt.F	(revision 4203)
+++ LMDZ6/branches/LMDZ_ECRad/libf/dyn3d/vlsplt.F	(revision 4482)
@@ -184,6 +184,4 @@
             DO ij=iip2,ip1jm-1
                dxqu(ij)=q(ij+1,l,iq)-q(ij,l,iq)
-c              IF(u_m(ij,l).lt.0.) stop'limx n admet pas les U<0'
-c              sigu(ij)=u_m(ij,l)/masse(ij,l,iq)
             ENDDO
             DO ij=iip1+iip1,ip1jm,iip1
@@ -310,5 +308,4 @@
       ENDDO
 #endif
-c	stop
 
 c	go to 9999
@@ -437,5 +434,5 @@
         enddo
       enddo
-      do ifils=1,tracers(iq)%nqChilds
+      do ifils=1,tracers(iq)%nqChildren
         iq2=tracers(iq)%iqDescen(ifils)
         call vlx(Ratio,pente_max,masseq,u_mq,iq2)
@@ -969,5 +966,5 @@
 ! CRisi: appel récursif de l'advection sur les fils.
 ! Il faut faire ça avant d'avoir mis à jour q et masse
-      !write(*,*) 'vlsplt 942: iq,nqChilds(iq)=',iq,nqChilds(iq)
+      !write(*,*) 'vlsplt 942: iq,nqChildren(iq)=',iq,nqChildren(iq)
       do ifils=1,tracers(iq)%nqDescen
         iq2=tracers(iq)%iqDescen(ifils)
@@ -987,5 +984,5 @@
       enddo
         
-      do ifils=1,tracers(iq)%nqChilds
+      do ifils=1,tracers(iq)%nqChildren
         iq2=tracers(iq)%iqDescen(ifils)
         call vlz(Ratio,pente_max,masseq,wq,iq2)
Index: LMDZ6/branches/LMDZ_ECRad/libf/dyn3d/vlspltqs.F
===================================================================
--- LMDZ6/branches/LMDZ_ECRad/libf/dyn3d/vlspltqs.F	(revision 4203)
+++ LMDZ6/branches/LMDZ_ECRad/libf/dyn3d/vlspltqs.F	(revision 4482)
@@ -248,6 +248,4 @@
             DO ij=iip2,ip1jm-1
                dxqu(ij)=q(ij+1,l,iq)-q(ij,l,iq)
-c              IF(u_m(ij,l).lt.0.) stop'limx n admet pas les U<0'
-c              sigu(ij)=u_m(ij,l)/masse(ij,l,iq)
             ENDDO
             DO ij=iip1+iip1,ip1jm,iip1
@@ -479,5 +477,6 @@
 ! CRisi: appel récursif de l'advection sur les fils.
 ! Il faut faire ça avant d'avoir mis à jour q et masse
-      !write(*,*) 'vlspltqs 326: iq,nqChilds(iq)=',iq,tracers(iq)%nqChilds
+      !write(*,*) 'vlspltqs 326: iq,nqChildren(iq)=',iq,
+!     &                 tracers(iq)%nqChildren
       
       do ifils=1,tracers(iq)%nqDescen
@@ -491,5 +490,5 @@
         enddo
       enddo
-      do ifils=1,tracers(iq)%nqChilds
+      do ifils=1,tracers(iq)%nqChildren
         iq2=tracers(iq)%iqDescen(ifils)
         call vlx(Ratio,pente_max,masseq,u_mq,iq2)
@@ -786,5 +785,6 @@
 ! CRisi: appel récursif de l'advection sur les fils.
 ! Il faut faire ça avant d'avoir mis à jour q et masse
-      !write(*,*) 'vlyqs 689: iq,nqChilds(iq)=',iq,tracers(iq)%nqChilds
+      !write(*,*) 'vlyqs 689: iq,nqChildren(iq)=',iq,
+!     &              tracers(iq)%nqChildren
    
       do ifils=1,tracers(iq)%nqDescen
@@ -797,5 +797,5 @@
         enddo
       enddo
-      do ifils=1,tracers(iq)%nqChilds
+      do ifils=1,tracers(iq)%nqChildren
         iq2=tracers(iq)%iqDescen(ifils)
         !write(*,*) 'vlyqs 783: appel rec de vly, iq2=',iq2
Index: LMDZ6/branches/LMDZ_ECRad/libf/dyn3d/wrgrads.F
===================================================================
--- LMDZ6/branches/LMDZ_ECRad/libf/dyn3d/wrgrads.F	(revision 4203)
+++ LMDZ6/branches/LMDZ_ECRad/libf/dyn3d/wrgrads.F	(revision 4482)
@@ -80,6 +80,5 @@
            print*,'nvar  ',nvar(if)
            print*,'vars ',(var(iv,if),iv=1,nvar(if))
-
-           stop
+           CALL abort_gcm("wrgrads","problem",1)
          endif
       endif
