copyright (C) 2001  MSC-RPN COMM  %%%MC2%%%
***s/r mc2ntr
*

      subroutine mc2ntr 1,12
      implicit none
*
**
#include "mc2nml.cdk"
#include "path.cdk"
#include "lun.cdk"
#include "lisctes.cdk"
#include "version.cdk"
#include "consdyn_8.cdk"
* 
      character*256 path
      logical set_dcst_8 
      integer status,err,longueur,exdb,exfin
      external set_dcst_8, longueur, exdb, exfin
      real , dimension (:) , allocatable :: topo_h
*
*----------------------------------------------------------------------
*
      call  open_status_file2 ('status_ent.dot')
      call write_status_file2 ('_status=ABORT' )
*
      err = exdb(Version_ent_S//Version_dstp_S,Version_S, 'NON')
*
      numproc  = 1
      gnstepno = 0
      un_rstrt = -1
*
      call getenvc('rep_from_which_model_is_launched',path)
      dfwmil = path(1:longueur(path))//'/process'
      nml    = path(1:longueur(path))//'/process/model_settings'
      climato = "process/climato"
      geophy  = "process/geophy"
*
*     *** Establishing configuration
*
      call gridcfg (un_rstrt,.true.,status)
      if (status.ne.1) goto 9991
      call pilctrl (un_rstrt,.true.,status)
      if (status.ne.1) goto 9991
      call mc2ctrl (.false.,status)
      if (status.ne.1) goto 9991
      if (gnmaphy.eq.1) then
         call phyctrl (.false.,status)
         if (status.ne.1) goto 9991
      endif
*
*     *** Initialization of physical constants
*
      if (.not.set_dcst_8 (cpd_8,lisctes,nbre,38,6)) stop
*
*     Positional parameters
*    
      call posipar
*
      call infiles
*
      allocate (topo_h(Grd_ni*Grd_nj*2))
      call e_geopfld ( topo_h )
*
      if (init3d.or.bcs) call e_dynfld ( topo_h )
*
      err = exfin(Version_ent_S//Version_dstp_S,Version_S,'OK')
      call write_status_file2 ('_status=ED')
      call close_status_file2 ()
*
 9991 continue
*
*-------------------------------------------------------------------
      stop
      end