Index: vendors/AGRIF/r_01/AA_make
===================================================================
--- vendors/AGRIF/r_01/AA_make	(revision 2672)
+++ vendors/AGRIF/r_01/AA_make	(revision 2672)
@@ -0,0 +1,133 @@
+#- $Id: AA_make 1791 2009-12-15 02:02:04Z smasson $
+
+TMP=../../../tmp
+
+SRM=/bin/rm -f
+
+#-Q- sx8mercure C_L	= $(FC_L) 
+#-Q- sx8mercure C_O	= $(FC_O) 
+#-Q- sx9mercure C_L	= $(FC_L) 
+#-Q- sx9mercure C_O	= $(FC_O) 
+#-Q- sx8brodie C_L= $(FC_L) 
+#-Q- sx8brodie C_O= $(FC_O) 
+#-Q- sxdkrz C_L	= $(FC_L) 
+#-Q- sxdkrz C_O	= $(FC_O) 
+#-Q- es2 C_L	= $(FC_L) 
+#-Q- es2 C_O	= $(FC_O) 
+#-Q- sx8mercure F_O +=  -Wf"-init heap=zero"
+#-Q- sx9mercure F_O +=  -Wf"-init heap=zero" 
+#-Q- sx8brodie F_O +=   -Wf"-init heap=zero" 
+#-Q- sxdkrz F_O +=  -Wf"-init heap=zero" 
+#-Q- es2 F_O +=  -Wf"-init heap=zero" 
+#-Q- aix F_O = $(w_w) -I$(MODDIR) -qmoddir=$(MODDIR) -qextname
+#-Q- aix6 F_O = $(w_w) -I$(MODDIR) -qmoddir=$(MODDIR) -qextname
+#-Q- osxxlf F_O = $(w_w) -I$(MODDIR) -qmoddir=$(MODDIR) -qextname
+#-Q- linux F_O = $(F_D) $(F_P) -Mfixed -module $(MODDIR)
+
+AGRIFOBJS=AGRIF_OBJS
+AGRIFFILES=AGRIF_FILES
+AGRIFYOURFILES=AGRIF_YOURFILES
+
+FILENAMES= modbc modmpp modcluster modinit modinitvars modinterp  \
+	   modtypes modbcfunction modutil modcurgridfunctions \
+	   modmask modsauv modupdate modinterpbasic\
+	   modupdatebasic modlinktomodel modarrays modflux
+	   
+OBJS1=$(addprefix $(AGRIFOBJS)/,$(FILENAMES))
+OBJS=$(addsuffix .o,$(OBJS1))
+
+
+AGRIF_FILES1=$(addprefix $(AGRIFFILES)/,$(FILENAMES))
+AGRIF_FILES=$(addsuffix .F,$(AGRIF_FILES1))
+
+all :   conv_exe key $(MODDIR)/libagrif.a $(SXMODEL_LIB)
+	@echo AGRIF is OK
+
+conv_exe : 
+	@( cd LIB ; $(M_K) -f Makefile C_L="$(C_L)" C_O="$(C_O)" )
+
+key : 
+	-@if [ "`cat KEY_CPP`" != "$(P_P)" ] ; then \
+	echo "$(P_P)" > KEY_CPP ; fi
+
+$(MODDIR)/libagrif.a : $(OBJS)
+	@$(A_C) $@ $(OBJS)
+
+$(SXMODEL_LIB) : $(OBJS)
+#-Q- sxdkrz     @$(A_X) $@ $(OBJS)
+#-Q- es2     @$(A_X) $@ $(OBJS)
+
+$(AGRIFOBJS)/%.o : $(AGRIFFILES)/%.F KEY_CPP
+	@$(SRM) $(AGRIFYOURFILES)/$(*F).f
+	@$(P_C) $(P_O) $(AGRIFFILES)/$(*F).F > $(AGRIFYOURFILES)/$(*F).f
+	@$(F_C) $(F_O) $(FFLAGS_EXTEND) $(AGRIF_OPTS) -c $(AGRIFYOURFILES)/$(*F).f -o $(AGRIFOBJS)/$(*F).o
+#-Q- linux	@$(SRM) $*.lst
+#-Q- ibm	@$(SRM) $*.lst
+#-Q- aix	@$(SRM) $*.lst
+#-Q- aix6	@$(SRM) $*.lst
+#-Q- sx8mercure	mv *.mod $(MODDIR)
+#-Q- sx9mercure	mv *.mod $(MODDIR)
+#-Q- sx8brodie	mv *.mod $(MODDIR)
+#-Q- sxdkrz	mv *.mod $(MODDIR)
+#-Q- es2	mv *.mod $(MODDIR)
+#-Q- solaris	mv *.mod $(MODDIR)
+
+
+$(AGRIFOBJS)/modarrays.o: $(AGRIFOBJS)/modtypes.o
+
+$(AGRIFOBJS)/modbc.o: $(AGRIFOBJS)/modinterp.o
+
+$(AGRIFOBJS)/modbcfunction.o: $(AGRIFOBJS)/modupdate.o \
+			 $(AGRIFOBJS)/modflux.o  \
+			 $(AGRIFOBJS)/modbc.o 
+
+$(AGRIFOBJS)/modcluster.o: $(AGRIFOBJS)/modsauv.o \
+			$(AGRIFOBJS)/modinitvars.o \
+			$(AGRIFOBJS)/modcurgridfunctions.o
+
+$(AGRIFOBJS)/modcurgridfunctions.o: $(AGRIFOBJS)/modinit.o
+
+$(AGRIFOBJS)/modinit.o: $(AGRIFOBJS)/modlinktomodel.o \
+			$(AGRIFOBJS)/modtypes.o
+
+$(AGRIFOBJS)/modinitvars.o: $(AGRIFOBJS)/modlinktomodel.o \
+			$(AGRIFOBJS)/modtypes.o
+
+$(AGRIFOBJS)/modinterpbasic.o: $(AGRIFOBJS)/modtypes.o
+
+$(AGRIFOBJS)/modinterp.o: $(AGRIFOBJS)/modcurgridfunctions.o \
+			$(AGRIFOBJS)/modmask.o \
+			$(AGRIFOBJS)/modarrays.o \
+			$(AGRIFOBJS)/modmpp.o \
+			$(AGRIFOBJS)/modinterpbasic.o
+
+$(AGRIFOBJS)/modlinktomodel.o: $(AGRIFOBJS)/modtypes.o
+
+$(AGRIFOBJS)/modmask.o: $(AGRIFOBJS)/modtypes.o
+
+$(AGRIFOBJS)/modsauv.o: $(AGRIFOBJS)/modarrays.o \
+			$(AGRIFOBJS)/modlinktomodel.o \
+			$(AGRIFOBJS)/modtypes.o
+
+$(AGRIFOBJS)/modupdatebasic.o: $(AGRIFOBJS)/modtypes.o
+
+$(AGRIFOBJS)/modupdate.o: $(AGRIFOBJS)/modmask.o \
+			$(AGRIFOBJS)/modcurgridfunctions.o \
+			$(AGRIFOBJS)/modarrays.o \
+			$(AGRIFOBJS)/modmpp.o \
+			$(AGRIFOBJS)/modupdatebasic.o
+
+$(AGRIFOBJS)/modutil.o: $(AGRIFOBJS)/modcurgridfunctions.o \
+			$(AGRIFOBJS)/modcluster.o
+
+$(AGRIFOBJS)/modmpp.o: $(AGRIFOBJS)/modtypes.o \
+			$(AGRIFOBJS)/modarrays.o
+
+clean : FORCE
+	$(SRM) $(OBJS) $(MODOBJS)$(LIBDIR)/libagrif.a 
+	
+cleanall : FORCE
+	$(SRM) $(OBJS) $(MODOBJS)$(LIBDIR)/libagrif.a 
+	@(cd LIB ; $(M_K) -f Makefile clean )
+
+FORCE :
Index: vendors/AGRIF/r_01/AA_make.ldef
===================================================================
--- vendors/AGRIF/r_01/AA_make.ldef	(revision 2672)
+++ vendors/AGRIF/r_01/AA_make.ldef	(revision 2672)
@@ -0,0 +1,29 @@
+#- $Id: AA_make.ldef 1791 2009-12-15 02:02:04Z smasson $
+#---------------------------------------------------------------------
+#- Creation des elements relatifs a AGRIF (lib, config)
+#---------------------------------------------------------------------
+SHELL = /bin/sh
+#---------------------------------------------------------------------
+LIBDIR = ../../lib
+MODDIR = $(LIBDIR)
+#---------------------------------------------------------------------
+#--- -DNC_REAL option is needed if compiled in simple precision
+#--- In case you switch to double precision use -DNC_DOUBLE
+#-
+# Compilation:
+#-Q- lxiv7 FFLAGS_EXTEND=  -I..
+#-Q- lxiv8 FFLAGS_EXTEND=  -I..
+#-Q- sun   FFLAGS_EXTEND= -I..
+#-Q- aix   FFLAGS_EXTEND = -I.. -I$(HOME)/include/ -qsuffix=f=f
+#-Q- aix   AGRIF_OPTS = -qfixed -qrecur
+#-Q- aix6  FFLAGS_EXTEND = -I.. -I$(HOME)/include/ -qsuffix=f=f
+#-Q- aix6  AGRIF_OPTS = -qfixed -qrecur
+#-Q- ibm   FFLAGS_EXTEND = -I.. -I$(HOME)/include/ -qsuffix=f=f
+#-Q- ibm   AGRIF_OPTS = -qfixed -qrecur
+#-
+MODEL_LIB = $(LIBDIR)/libagrif.a
+SXMODEL_LIB = $(MODEL_LIB)
+#-Q- sxdkrz SXMODEL_LIB = $(LIBDIR)/libsxagrif.a
+#-Q- es2 SXMODEL_LIB = $(LIBDIR)/libsxagrif.a
+#-
+P_P=$(AGRIF_MPI)
Index: vendors/AGRIF/r_01/AGRIF_FILES/modarrays.F
===================================================================
--- vendors/AGRIF/r_01/AGRIF_FILES/modarrays.F	(revision 2672)
+++ vendors/AGRIF/r_01/AGRIF_FILES/modarrays.F	(revision 2672)
@@ -0,0 +1,1175 @@
+!
+! $Id: modarrays.F 662 2007-05-25 15:58:52Z opalod $
+!
+C     AGRIF (Adaptive Grid Refinement In Fortran)
+C
+C     Copyright (C) 2003 Laurent Debreu (Laurent.Debreu@imag.fr)
+C                        Christophe Vouland (Christophe.Vouland@imag.fr)    
+C
+C     This program is free software; you can redistribute it and/or modify
+C     it under the terms of the GNU General Public License as published by
+C     the Free Software Foundation; either version 2 of the License, or
+C     (at your option) any later version.
+C
+C     This program is distributed in the hope that it will be useful,
+C     but WITHOUT ANY WARRANTY; without even the implied warranty of
+C     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+C     GNU General Public License for more details.
+C
+C     You should have received a copy of the GNU General Public License
+C     along with this program; if not, write to the Free Software
+C     Foundation, Inc., 59 Temple Place- Suite 330, Boston, MA 02111-1307, USA.
+C
+C
+C
+CCC   Module Agrif_Arrays
+C      
+      Module Agrif_Arrays
+      Use Agrif_Types
+C
+      implicit none
+C      
+      Contains
+C     **************************************************************************
+CCC   Subroutine Agrif_Childbounds
+C     **************************************************************************
+C
+      Subroutine Agrif_Childbounds(nbdim,lboundloc,uboundloc,
+     &                 pttab,petab,pttruetab,cetruetab,memberin)
+C
+CCC   Description:
+CCC   Subroutine calculating the global indices of the child grid
+C
+C
+C     Declarations:
+C
+
+C
+C     Arguments
+      INTEGER :: nbdim
+      INTEGER,DIMENSION(nbdim) :: lboundloc,uboundloc
+      INTEGER,DIMENSION(nbdim) :: pttab,petab,pttruetab,cetruetab
+      LOGICAL :: memberin
+C
+C     Local variables
+      INTEGER :: i,lbglob,ubglob
+C
+#ifdef AGRIF_MPI
+      INTEGER :: indglob1,indglob2
+#endif
+C
+C
+      do i = 1,nbdim
+C
+        lbglob = lboundloc(i)
+        ubglob = uboundloc(i)
+C
+#ifdef AGRIF_MPI
+C
+        Call AGRIF_InvLoc(lbglob,Agrif_ProcRank,i,indglob1)
+C
+        Call AGRIF_InvLoc(ubglob,Agrif_ProcRank,i,indglob2)
+C
+        pttruetab(i) = max(pttab(i),indglob1)        
+C
+        cetruetab(i) = min(petab(i),indglob2)                 
+C
+#else
+C
+        pttruetab(i) = max(pttab(i),lbglob)        
+C
+        cetruetab(i) = min(petab(i),ubglob)
+C
+#endif
+C
+      enddo
+
+      memberin = .TRUE.
+
+      do i=1,nbdim
+        IF (cetruetab(i) < pttruetab(i)) THEN
+          memberin = .FALSE.
+          EXIT
+        ENDIF
+      enddo
+C
+      Return
+C
+C
+      End Subroutine Agrif_Childbounds
+C
+C
+C     **************************************************************************
+CCC   Subroutine Agrif_nbdim_Get_bound
+C     **************************************************************************
+C
+      Subroutine Agrif_nbdim_Get_bound(Variable,
+     &                           lower,upper,indice,nbdim)
+C
+CCC   Description:
+CCC   This subroutine is used to get the lower and the upper boundaries of a
+C     table. Output datas are scalar.
+C
+C     Declarations:
+C      
+      
+C
+C     Arguments      
+C
+      ! we want extract boundaries of this table
+      TYPE(AGRIF_Variable), Pointer :: Variable    
+      INTEGER              :: lower,upper ! output data
+      ! direction in wich we want to know the dimension
+      INTEGER              :: indice      
+      INTEGER              :: nbdim       ! dimension of the table
+C
+C     Local variables
+C
+
+      lower = Variable % lb(indice)
+      upper = Variable % ub(indice)
+      return
+C
+      End Subroutine Agrif_nbdim_Get_bound       
+C
+C
+C     **************************************************************************
+CCC   Subroutine Agrif_Get_bound_dimension
+C     **************************************************************************
+C
+      Subroutine Agrif_nbdim_Get_bound_dimension(Variable,
+     &                              lower,upper,nbdim)
+C
+CCC   Description:
+CCC   This subroutine is used to get the lower and the upper boundaries of a
+C        table. Output datas are scalar.
+C
+C     Declarations:
+C      
+      
+C
+C     Arguments      
+C
+      ! we want extract boundaries of this table
+      TYPE(AGRIF_Variable), Pointer     :: Variable    
+      INTEGER                  :: nbdim       ! dimension of the table
+      INTEGER,DIMENSION(nbdim) :: lower,upper ! output data
+C
+C     Local variables       
+C
+      lower = Variable % lb(1:nbdim)
+      upper = Variable % ub(1:nbdim)
+      return
+C
+      End Subroutine Agrif_nbdim_Get_bound_dimension     
+      
+C     **************************************************************************
+CCC   Subroutine Agrif_nbdim_allocation
+C     **************************************************************************
+C
+      Subroutine Agrif_nbdim_allocation(Variable,inf,sup,nbdim)
+C
+CCC   Description:
+CCC   This subroutine is used to Allocate the table Variable
+C
+C     Declarations:
+C      
+      
+C
+C     Arguments      
+C
+      TYPE(AGRIF_Variable), Pointer     :: Variable    
+      INTEGER                  :: nbdim       ! dimension of the table
+      INTEGER,DIMENSION(nbdim) :: inf,sup
+C
+C     Local variables       
+C
+      SELECT CASE (nbdim)
+      CASE (1)
+         allocate(Variable%array1(
+     &            inf(1):sup(1)))
+      CASE (2)
+          allocate(Variable%array2(
+     &            inf(1):sup(1),
+     &            inf(2):sup(2)))
+      CASE (3)
+         allocate(Variable%array3(
+     &            inf(1):sup(1),
+     &            inf(2):sup(2),
+     &            inf(3):sup(3)))
+      CASE (4)
+         allocate(Variable%array4(
+     &            inf(1):sup(1),
+     &            inf(2):sup(2),
+     &            inf(3):sup(3),
+     &            inf(4):sup(4)))
+      CASE (5)
+         allocate(Variable%array5(
+     &            inf(1):sup(1),
+     &            inf(2):sup(2),
+     &            inf(3):sup(3),
+     &            inf(4):sup(4),
+     &            inf(5):sup(5)))
+      CASE (6)
+         allocate(Variable%array6(
+     &            inf(1):sup(1),
+     &            inf(2):sup(2),
+     &            inf(3):sup(3),
+     &            inf(4):sup(4),
+     &            inf(5):sup(5),
+     &            inf(6):sup(6)))
+      END SELECT
+C
+      return
+C
+      End Subroutine Agrif_nbdim_allocation
+C
+C
+C     **************************************************************************
+CCC   Subroutine Agrif_nbdim_deallocation
+C     **************************************************************************
+C
+      Subroutine Agrif_nbdim_deallocation(Variable,nbdim)
+C
+CCC   Description:
+CCC   This subroutine is used to give the same value to the table Variable
+C
+C     Declarations:
+C      
+      
+C
+C     Arguments      
+C
+      TYPE(AGRIF_Variable), Pointer     :: Variable    
+      INTEGER                  :: nbdim       ! dimension of the table
+C
+C     Local variables       
+C
+
+      SELECT CASE (nbdim)
+      CASE (1)
+         Deallocate(Variable%array1)
+      CASE (2)
+         Deallocate(Variable%array2)
+      CASE (3)
+         Deallocate(Variable%array3)
+      CASE (4)
+         Deallocate(Variable%array4)
+      CASE (5)
+         Deallocate(Variable%array5)
+      CASE (6)
+         Deallocate(Variable%array6)
+      END SELECT
+C
+      return
+C
+      End Subroutine Agrif_nbdim_deallocation
+C
+C
+C     **************************************************************************
+CCC   Subroutine Agrif_nbdim_Full_VarEQreal
+C     **************************************************************************
+C
+      Subroutine Agrif_nbdim_Full_VarEQreal(Variable,Value,nbdim)
+C
+CCC   Description:
+CCC   This subroutine is used to get the lower and the upper boundaries of a
+C        table. Output datas are scalar.
+C
+C     Declarations:
+C      
+      
+C
+C     Arguments      
+C
+      TYPE(AGRIF_Variable), Pointer :: Variable    
+      REAL                 :: Value       
+      INTEGER              :: nbdim       ! dimension of the table
+C
+C     Local variables       
+C
+      SELECT CASE (nbdim)
+      CASE (1)
+        Variable%array1 = Value      
+      CASE (2)
+        Variable%array2 = Value
+      CASE (3)
+        Call Agrif_set_tozero3D(Variable%array3)
+!        Variable%array3 = Value
+      CASE (4)
+        Variable%array4 = Value
+      CASE (5)
+        Variable%array5 = Value
+      CASE (6)
+        Variable%array6 = Value
+      END SELECT
+C
+      return
+C
+      End Subroutine Agrif_nbdim_Full_VarEQreal   
+      
+      Subroutine Agrif_set_tozero3D(tab3D)
+      real,dimension(:,:,:),target :: tab3D
+      
+      tab3D = 0.
+      
+      end subroutine agrif_set_tozero3D    
+C
+C
+#if !defined AGRIF_MPI
+C     **************************************************************************
+CCC   Subroutine Agrif_nbdim_VarEQreal
+C     **************************************************************************
+C
+      Subroutine Agrif_nbdim_VarEQreal(Variable,inf,sup,Value,nbdim)
+C
+CCC   Description:
+CCC   This subroutine is used to give the same value to a part of 
+C        the table Variable
+C
+C     Declarations:
+C      
+      
+C
+C     Arguments      
+C
+      TYPE(AGRIF_Variable), Pointer :: Variable    
+      REAL                 :: Value       
+      INTEGER              :: nbdim       ! dimension of the table
+      INTEGER,DIMENSION(nbdim) :: inf,sup
+C
+C     Local variables       
+C
+      SELECT CASE (nbdim)
+      CASE (1)
+         Variable%array1(
+     &             inf(1):sup(1)
+     &             )  = Value
+      CASE (2)
+         Variable%array2(
+     &             inf(1):sup(1),
+     &             inf(2):sup(2)
+     &             )  = Value
+      CASE (3)
+         Variable%array3(
+     &             inf(1):sup(1),
+     &             inf(2):sup(2),
+     &             inf(3):sup(3)
+     &             )  = Value
+      CASE (4)
+         Variable%array4(
+     &             inf(1):sup(1),
+     &             inf(2):sup(2),
+     &             inf(3):sup(3),
+     &             inf(4):sup(4)
+     &             )  = Value
+      CASE (5)
+         Variable%array5(
+     &             inf(1):sup(1),
+     &             inf(2):sup(2),
+     &             inf(3):sup(3),
+     &             inf(4):sup(4),
+     &             inf(5):sup(5)
+     &             )  = Value
+      CASE (6)
+         Variable%array6(
+     &             inf(1):sup(1),
+     &             inf(2):sup(2),
+     &             inf(3):sup(3),
+     &             inf(4):sup(4),
+     &             inf(5):sup(5),
+     &             inf(6):sup(6)
+     &             )  = Value
+      END SELECT
+C
+      return
+C
+      End Subroutine Agrif_nbdim_VarEQreal       
+#endif
+C
+C
+C
+C     **************************************************************************
+CCC   Subroutine Agrif_nbdim_VarEQvar
+C     **************************************************************************
+C
+      Subroutine Agrif_nbdim_VarEQvar(Variable,inf,sup,
+     &                                Variable2,inf2,sup2,
+     &                                nbdim)
+C
+CCC   Description:
+CCC   This subroutine is used to give the value of a part of the table 
+C        Variable2 to the table Variable
+C
+C     Declarations:
+C      
+      
+C
+C     Arguments      
+C
+      TYPE(AGRIF_Variable), Pointer     :: Variable
+      TYPE(AGRIF_Variable), Pointer     :: Variable2
+      INTEGER                  :: nbdim       ! dimension of the table
+      INTEGER,DIMENSION(nbdim) :: inf,sup
+      INTEGER,DIMENSION(nbdim) :: inf2,sup2
+C
+C     Local variables       
+C
+      SELECT CASE (nbdim)
+      CASE (1)
+         Variable%array1(inf(1):sup(1)) = 
+     &         Variable2%array1(inf2(1):sup2(1))
+      CASE (2)
+     
+      Call Agrif_Copy_2d(Variable%array2,Variable2%array2,
+     &  lbound(Variable%array2),
+     &  lbound(Variable2%array2),
+     &  inf,sup,inf2,sup2)
+          
+      CASE (3)
+
+      Call Agrif_Copy_3d(Variable%array3,Variable2%array3,
+     &  lbound(Variable%array3),
+     &  lbound(Variable2%array3),
+     &  inf,sup,inf2,sup2)
+
+      CASE (4)
+      
+      Call Agrif_Copy_4d(Variable%array4,Variable2%array4,
+     &  lbound(Variable%array4),
+     &  lbound(Variable2%array4),
+     &  inf,sup,inf2,sup2)
+     
+      CASE (5)
+        Variable%array5(inf(1):sup(1),
+     &                         inf(2):sup(2), 
+     &                         inf(3):sup(3),
+     &                         inf(4):sup(4), 
+     &                         inf(5):sup(5)) = 
+     &         Variable2%array5(inf2(1):sup2(1),
+     &                          inf2(2):sup2(2),
+     &                          inf2(3):sup2(3),
+     &                          inf2(4):sup2(4),
+     &                          inf2(5):sup2(5))
+      CASE (6)
+        Variable%array6(inf(1):sup(1),
+     &                         inf(2):sup(2),
+     &                         inf(3):sup(3),
+     &                         inf(4):sup(4),
+     &                         inf(5):sup(5),
+     &                         inf(6):sup(6)) = 
+     &         Variable2%array6(inf2(1):sup2(1),
+     &                          inf2(2):sup2(2),
+     &                          inf2(3):sup2(3),
+     &                          inf2(4):sup2(4),
+     &                          inf2(5):sup2(5),
+     &                          inf2(6):sup2(6))
+      END SELECT
+C
+      return
+C
+      End Subroutine Agrif_nbdim_VarEQvar
+C
+C     **************************************************************************
+CCC   Subroutine Agrif_nbdim_Full_VarEQvar
+C     **************************************************************************
+C
+      Subroutine Agrif_nbdim_Full_VarEQvar(Variable,Variable2,
+     &                                nbdim)
+C
+CCC   Description:
+CCC   This subroutine is used to give the value of the table Variable2 
+C        to the table Variable
+C
+C     Declarations:
+C      
+      
+C
+C     Arguments      
+C
+      TYPE(AGRIF_Variable), Pointer     :: Variable
+      TYPE(AGRIF_Variable), Pointer     :: Variable2
+      INTEGER                  :: nbdim       ! dimension of the table
+C
+C     Local variables       
+C
+      SELECT CASE (nbdim)
+      CASE (1)
+          Variable%array1 = Variable2%array1
+      CASE (2)
+          Variable%array2 = Variable2%array2
+      CASE (3)
+          Variable%array3 = Variable2%array3
+      CASE (4)
+          Variable%array4 = Variable2%array4
+      CASE (5)
+          Variable%array5 = Variable2%array5
+      CASE (6)
+          Variable%array6 = Variable2%array6
+      END SELECT
+C
+      return
+C
+      End Subroutine Agrif_nbdim_Full_VarEQvar
+C
+C
+
+C     **************************************************************************
+CCC   Subroutine GiveAgrif_SpecialValueToTab_mpi
+C     **************************************************************************
+C
+      Subroutine GiveAgrif_SpecialValueToTab_mpi(Variable1,Variable2,
+     &                  bound1,lower,upper,Value,nbdim)
+C
+CCC   Description:
+CCC   
+C
+C     Declarations:
+C      
+      
+C
+C     Arguments      
+C
+      TYPE(AGRIF_VARIABLE), Pointer    :: Variable1
+      TYPE(AGRIF_VARIABLE), Pointer    :: Variable2
+      INTEGER                  :: nbdim
+      INTEGER,DIMENSION(:,:,:) :: bound1
+      INTEGER,DIMENSION(nbdim) :: lower,upper
+      REAL                     :: Value
+C
+C     Local variables       
+C
+      SELECT CASE (nbdim)
+      CASE (1)
+             Where (Variable1 % array1(
+     &           bound1(1,1,2):bound1(1,2,2)) 
+     &            == Value)
+             Variable2 % array1(bound1(1,1,1):bound1(1,2,1))
+     &                        = Value
+C      
+              End Where
+      CASE (2)
+             Where (Variable1 % array2(
+     &           bound1(1,1,2):bound1(1,2,2),
+     &           bound1(2,1,2):bound1(2,2,2)) 
+     &            == Value)
+             Variable2 % array2(bound1(1,1,1):bound1(1,2,1),
+     &                       bound1(2,1,1):bound1(2,2,1))
+     &                        = Value
+C      
+              End Where
+      CASE (3)
+             Where (Variable1 % array3(
+     &           bound1(1,1,2):bound1(1,2,2),
+     &                       bound1(2,1,2):bound1(2,2,2),
+     &                       bound1(3,1,2):bound1(3,2,2)) 
+     &            == Value)
+             Variable2 % array3(bound1(1,1,1):bound1(1,2,1),
+     &                       bound1(2,1,1):bound1(2,2,1),
+     &                       bound1(3,1,1):bound1(3,2,1))
+     &                         = Value
+C      
+              End Where
+      CASE (4)
+             Where (Variable1 % array4(
+     &           bound1(1,1,2):bound1(1,2,2),
+     &                       bound1(2,1,2):bound1(2,2,2),
+     &                       bound1(3,1,2):bound1(3,2,2),
+     &                       bound1(4,1,2):bound1(4,2,2)) 
+     &            == Value)
+             Variable2 % array4(bound1(1,1,1):bound1(1,2,1),
+     &                       bound1(2,1,1):bound1(2,2,1),
+     &                       bound1(3,1,1):bound1(3,2,1),
+     &                       bound1(4,1,1):bound1(4,2,1))
+     &                        = Value
+C      
+              End Where
+      CASE (5)
+             Where (Variable1 % array5(
+     &           bound1(1,1,2):bound1(1,2,2),
+     &                       bound1(2,1,2):bound1(2,2,2),
+     &                       bound1(3,1,2):bound1(3,2,2),
+     &                       bound1(4,1,2):bound1(4,2,2),
+     &                       bound1(5,1,2):bound1(5,2,2)) 
+     &            == Value)
+             Variable2 % array5(bound1(1,1,1):bound1(1,2,1),
+     &                       bound1(2,1,1):bound1(2,2,1),
+     &                       bound1(3,1,1):bound1(3,2,1),
+     &                       bound1(4,1,1):bound1(4,2,1),
+     &                       bound1(5,1,1):bound1(5,2,1))
+     &                        = Value
+C      
+              End Where
+      CASE (6)
+             Where (Variable1 % array6(
+     &           bound1(1,1,2):bound1(1,2,2),
+     &                       bound1(2,1,2):bound1(2,2,2),
+     &                       bound1(3,1,2):bound1(3,2,2),
+     &                       bound1(4,1,2):bound1(4,2,2),
+     &                       bound1(5,1,2):bound1(5,2,2),
+     &                       bound1(6,1,2):bound1(6,2,2)) 
+     &            == Value)
+             Variable2 % array6(bound1(1,1,1):bound1(1,2,1),
+     &                       bound1(2,1,1):bound1(2,2,1),
+     &                       bound1(3,1,1):bound1(3,2,1),
+     &                       bound1(4,1,1):bound1(4,2,1),
+     &                       bound1(5,1,1):bound1(5,2,1),
+     &                       bound1(6,1,1):bound1(6,2,1))
+     &                        = Value
+C      
+              End Where
+      END SELECT
+C
+      return
+C
+      End Subroutine GiveAgrif_SpecialValueToTab_mpi    
+
+C     **************************************************************************
+CCC   Subroutine GiveAgrif_SpecialValueToTab
+C     **************************************************************************
+C
+      Subroutine GiveAgrif_SpecialValueToTab(Variable1,Variable2,
+     &                  lower,upper,Value,nbdim)
+C
+CCC   Description:
+CCC   
+C
+C     Declarations:
+C      
+      
+C
+C     Arguments      
+C
+      TYPE(AGRIF_VARIABLE), Pointer    :: Variable1
+      TYPE(AGRIF_VARIABLE), Pointer    :: Variable2
+      INTEGER                  :: nbdim
+      INTEGER,DIMENSION(nbdim) :: lower,upper
+      REAL                     :: Value
+C
+C     Local variables       
+C
+      SELECT CASE (nbdim)
+      CASE (1)
+             Where (Variable1 % array1(
+     &           lower(1):upper(1))
+     &            == Value)
+             Variable2 % array1(lower(1):upper(1))
+     &                        = Value
+C      
+              End Where
+      CASE (2)
+             Where (Variable1 % array2(
+     &           lower(1):upper(1),
+     &           lower(2):upper(2)) 
+     &            == Value)
+             Variable2 % array2(lower(1):upper(1),
+     &                          lower(2):upper(2))
+     &                        = Value
+C      
+              End Where
+      CASE (3)
+             Where (Variable1 % array3(
+     &           lower(1):upper(1),
+     &           lower(2):upper(2), 
+     &           lower(3):upper(3)) 
+     &            == Value)
+             Variable2 % array3(lower(1):upper(1),
+     &                          lower(2):upper(2),
+     &                          lower(3):upper(3))
+     &                         = Value
+C      
+              End Where
+      CASE (4)
+             Where (Variable1 % array4(
+     &           lower(1):upper(1),
+     &           lower(2):upper(2), 
+     &           lower(3):upper(3),
+     &           lower(4):upper(4)) 
+     &            == Value)
+             Variable2 % array4(lower(1):upper(1),
+     &                          lower(2):upper(2),
+     &                          lower(3):upper(3),
+     &                          lower(4):upper(4))
+     &                        = Value
+C      
+              End Where
+      CASE (5)
+             Where (Variable1 % array5(
+     &           lower(1):upper(1),
+     &           lower(2):upper(2),
+     &           lower(3):upper(3),
+     &           lower(4):upper(4),
+     &           lower(5):upper(5)) 
+     &            == Value)
+             Variable2 % array5(lower(1):upper(1),
+     &                          lower(2):upper(2),
+     &                          lower(3):upper(3),
+     &                          lower(4):upper(4),
+     &                          lower(5):upper(5))
+     &                        = Value
+C      
+              End Where
+      CASE (6)
+             Where (Variable1 % array6(
+     &           lower(1):upper(1),
+     &           lower(2):upper(2),
+     &           lower(2):upper(3),
+     &           lower(4):upper(4),
+     &           lower(5):upper(5),
+     &           lower(6):upper(6)) 
+     &            == Value)
+             Variable2 % array6(lower(1):upper(1),
+     &                          lower(2):upper(2),
+     &                          lower(3):upper(3),
+     &                          lower(4):upper(4),
+     &                          lower(5):upper(5),
+     &                          lower(6):upper(6))
+     &                        = Value
+C      
+              End Where
+      END SELECT
+C
+      return
+C
+      End Subroutine GiveAgrif_SpecialValueToTab   
+
+C
+C
+#ifdef AGRIF_MPI
+C     **************************************************************************
+CCC   Subroutine Where_ValTabToTab_mpi
+C     **************************************************************************
+C
+      Subroutine Where_ValTabToTab_mpi(
+     &                  Variable1,Variable2,
+     &                  lower,upper,Value,nbdim)
+C
+CCC   Description:
+CCC   
+C
+C     Declarations:
+C      
+      
+C
+C     Arguments      
+C
+      TYPE(AGRIF_VARIABLE), Pointer     :: Variable1
+      TYPE(AGRIF_VARIABLE), Pointer     :: Variable2
+      INTEGER                  :: nbdim
+      INTEGER,DIMENSION(nbdim) :: lower,upper
+      REAL                     :: Value
+      INTEGER :: i,j,k,l,m,n
+C
+C     Local variables       
+C
+      SELECT CASE (nbdim)
+      CASE (1)
+            DO i = lower(1),upper(1)
+              IF (variable1%array1(i) == Value) then
+                variable1%array1(i)=Variable2%array1(i)
+              ENDIF
+            ENDDO
+      CASE (2)
+            DO j = lower(2),upper(2)
+            DO i = lower(1),upper(1)
+              IF (variable1%array2(i,j) == Value) then
+                variable1%array2(i,j)=Variable2%array2(i,j)
+              ENDIF
+            ENDDO
+            ENDDO
+      CASE (3)
+            DO k = lower(3),upper(3)
+            DO j = lower(2),upper(2)
+            DO i = lower(1),upper(1)
+              IF (variable1%array3(i,j,k) == Value) then
+                variable1%array3(i,j,k)=Variable2%array3(i,j,k)
+              ENDIF
+            ENDDO
+            ENDDO
+            ENDDO
+      CASE (4)
+            DO l = lower(4),upper(4)
+            DO k = lower(3),upper(3)
+            DO j = lower(2),upper(2)
+            DO i = lower(1),upper(1)
+              IF (variable1%array4(i,j,k,l) == Value) then
+                variable1%array4(i,j,k,l)=Variable2%array4(i,j,k,l)
+              ENDIF
+            ENDDO
+            ENDDO
+            ENDDO
+            ENDDO
+      CASE (5)
+            DO m = lower(5),upper(5)
+            DO l = lower(4),upper(4)
+            DO k = lower(3),upper(3)
+            DO j = lower(2),upper(2)
+            DO i = lower(1),upper(1)
+              IF (variable1%array5(i,j,k,l,m) == Value) then
+              variable1%array5(i,j,k,l,m)=Variable2%array5(i,j,k,l,m)
+              ENDIF
+            ENDDO
+            ENDDO
+            ENDDO
+            ENDDO
+            ENDDO
+      CASE (6)
+            DO n = lower(6),upper(6)
+            DO m = lower(5),upper(5)
+            DO l = lower(4),upper(4)
+            DO k = lower(3),upper(3)
+            DO j = lower(2),upper(2)
+            DO i = lower(1),upper(1)
+              IF (variable1%array6(i,j,k,l,m,n) == Value) then
+            variable1%array6(i,j,k,l,m,n)=Variable2%array6(i,j,k,l,m,n)
+              ENDIF
+            ENDDO
+            ENDDO
+            ENDDO
+            ENDDO
+            ENDDO
+            ENDDO
+      END SELECT
+C
+      return
+C
+      End Subroutine Where_ValTabToTab_mpi    
+#endif
+
+C     **************************************************************************
+CCC   Subroutine PreProcessToInterpOrUpdate
+C     **************************************************************************
+C
+      Subroutine PreProcessToInterpOrUpdate(parent,child,
+     &             petab_Child,
+     &             pttab_Child,pttab_Parent,
+     &             s_Child,s_Parent,
+     &             ds_Child,ds_Parent,
+     &             nbdim)
+C
+CCC   Description:
+CCC   
+C
+C     Declarations:
+C      
+C     arguments                                   
+      TYPE(AGRIF_PVariable) :: parent   ! Variable on the parent grid
+      TYPE(AGRIF_PVariable) :: child    ! Variable on the child grid
+      INTEGER :: nbdim                  
+      INTEGER,DIMENSION(6) :: pttab_child  
+      INTEGER,DIMENSION(6) :: petab_child      
+      INTEGER,DIMENSION(6) :: pttab_parent  
+      TYPE(AGRIF_Variable), Pointer :: root ! Pointer on the variable of the 
+                                            ! root grid
+      TYPE(Agrif_Grid), Pointer :: Agrif_Child_Gr,Agrif_Parent_Gr
+      REAL, DIMENSION(6) :: s_child,s_parent
+      REAL, DIMENSION(6) :: ds_child,ds_parent
+C     locals variables
+      INTEGER :: n
+      
+C
+C     Arguments      
+C
+
+C
+C     Local variables       
+C
+      Agrif_Child_Gr => Agrif_Curgrid
+      Agrif_Parent_Gr => Agrif_Curgrid % parent
+C
+      root => child % var % root_var 
+C
+C     Number of dimensions of the current grid
+      nbdim = root % nbdim
+C      
+      do n=1,nbdim
+C            
+        Select case(root % interptab(n))
+C
+C       Value of interptab(n) can be either x,y,z or N for a no space 
+C       DIMENSION            
+C
+C         The DIMENSION is 'x'
+          case('x')
+C
+            pttab_Child(n) = root % point(1)
+C            
+            pttab_Parent(n) = root % point(1)
+C        
+            s_Child(n) = Agrif_Child_Gr % Agrif_x(1)
+C
+            s_Parent(n) = Agrif_Parent_Gr % Agrif_x(1)
+C        
+            ds_Child(n) = Agrif_Child_Gr % Agrif_d(1)
+C
+            ds_Parent(n) = Agrif_Parent_Gr % Agrif_d(1)
+C                      
+            if (root % posvar(n).EQ.1) then
+C          
+              petab_Child(n) = pttab_Child(n) + Agrif_Child_Gr%nb(1)
+C        
+              else
+C          
+                petab_Child(n) = pttab_Child(n) + 
+     &                              Agrif_Child_Gr%nb(1) - 1
+C          
+                s_Child(n) = s_Child(n) + ds_Child(n)/2.
+C
+                s_Parent(n) = s_Parent(n) + ds_Parent(n)/2.
+C        
+            endif                  
+C
+C         The DIMENSION is 'y'
+          case('y')
+C
+            pttab_Child(n) = root % point(2)
+C            
+            pttab_Parent(n) = root % point(2)
+C        
+            s_Child(n) = Agrif_Child_Gr % Agrif_x(2)
+C
+            s_Parent(n) = Agrif_Parent_Gr % Agrif_x(2) 
+C        
+            ds_Child(n) = Agrif_Child_Gr % Agrif_d(2)
+C
+            ds_Parent(n) = Agrif_Parent_Gr % Agrif_d(2)
+C                      
+            if (root % posvar(n).EQ.1) then
+C          
+             petab_Child(n) = pttab_Child(n) + Agrif_Child_Gr%nb(2)
+C          
+              else
+C          
+                petab_Child(n) = pttab_Child(n) + 
+     &                       Agrif_Child_Gr%nb(2) - 1
+C          
+                s_Child(n) = s_Child(n) + ds_Child(n)/2.
+C
+                s_Parent(n) = s_Parent(n) + ds_Parent(n)/2.
+C        
+            endif
+            
+C
+C         The DIMENSION is 'z'                            
+          case('z')
+C
+            pttab_Child(n) = root % point(3)
+C            
+            pttab_Parent(n) = root % point(3)
+C        
+            s_Child(n) = Agrif_Child_Gr % Agrif_x(3)
+C
+            s_Parent(n) = Agrif_Parent_Gr % Agrif_x(3)
+C        
+            ds_Child(n) = Agrif_Child_Gr % Agrif_d(3)
+C
+            ds_Parent(n) = Agrif_Parent_Gr % Agrif_d(3)
+C                      
+            if (root % posvar(n).EQ.1) then
+C          
+             petab_Child(n) = pttab_Child(n) + Agrif_Child_Gr%nb(3)
+C          
+              else
+C          
+                petab_Child(n) = pttab_Child(n) + 
+     &                      Agrif_Child_Gr%nb(3) - 1
+C
+                s_Child(n) = s_Child(n) + ds_Child(n)/2.
+C
+                s_Parent(n) = s_Parent(n) + ds_Parent(n)/2.
+C        
+            endif       
+C 
+C         The DIMENSION is not space                            
+          case('N')
+C
+C         The next coefficients are calculated in order to do a simple copy of 
+C         values of the grid variable when the procedure of interpolation is 
+C         called for this DIMENSION 
+C      
+            Call Agrif_nbdim_Get_bound(child % var,
+     &                           pttab_Child(n),petab_Child(n),n,nbdim)
+C
+C           No interpolation but only a copy of the values of the grid variable
+C
+            pttab_Parent(n) = pttab_Child(n)
+C              
+            s_Child(n)=0.
+C      
+            s_Parent(n)=0. 
+C      
+            ds_Child(n)=1.
+C      
+            ds_Parent(n)=1.
+C
+        End select
+C            
+      enddo     
+C
+      return
+C
+      End Subroutine PreProcessToInterpOrUpdate     
+
+#ifdef AGRIF_MPI
+C
+C     **************************************************************************
+CCC   Subroutine GetLocalBoundaries
+C     **************************************************************************
+C
+      Subroutine GetLocalBoundaries(tab1,tab2,i,lb,ub,deb,fin)
+C
+CCC   Descritpion:
+C 
+C
+C     Declarations:
+C
+
+C
+C
+C     Scalar arguments
+      INTEGER  ::  tab1,tab2
+      INTEGER  ::  i
+      INTEGER  ::  lb,ub
+      INTEGER  ::  deb,fin
+C
+C     Local scalars
+      INTEGER  ::  imin,imax
+      INTEGER  ::  i1,i2
+C
+C
+      Call AGRIF_InvLoc(lb,AGRIF_ProcRank,i,imin)
+C
+      Call AGRIF_InvLoc(ub,AGRIF_ProcRank,i,imax)
+C
+C
+      if (imin > tab2) then
+C
+          i1 = imax - imin
+C
+        else
+C
+          i1 = max(tab1 - imin,0)
+C
+      endif
+C
+      if (imax < tab1) then
+C
+          i2 = -(imax - imin)
+C
+        else
+C
+          i2 = min(tab2 - imax,0)
+C
+      endif
+C
+      deb = lb + i1
+C
+      fin = ub + i2
+C
+C
+      End Subroutine GetLocalBoundaries
+C
+#endif
+C
+C
+#ifdef AGRIF_MPI
+C
+C
+C     **************************************************************************
+CCC   Subroutine Agrif_GlobtoLocInd2
+C     **************************************************************************
+C
+      Subroutine Agrif_GlobtoLocInd2(tabarray,lboundl,uboundl,tab1,tab2,
+     &                              nbdim,rank,member)
+C
+CCC   Description:
+CCC   For a global index located on the current processor, tabarray gives the 
+CCC   corresponding local index   
+C
+C
+C     Declarations:
+C
+
+C
+C     Arguments
+      INTEGER :: nbdim
+      INTEGER,DIMENSION(nbdim) :: tab1,tab2
+      INTEGER,DIMENSION(nbdim,2,2 ) :: tabarray
+      INTEGER,DIMENSION(nbdim) :: lboundl,uboundl
+      INTEGER :: rank
+      LOGICAL :: member
+C    
+C     Local variables
+      INTEGER :: i,i1,k
+      INTEGER :: nbloc(nbdim)
+C
+C
+      tabarray(:,1,:) =  HUGE(1)
+      tabarray(:,2,:) =  -HUGE(1)
+
+      nbloc = 0
+C        
+      do i = 1,nbdim
+C       
+        Call Agrif_Invloc(lboundl(i),rank,i,i1)
+        
+        do k=tab1(i)+lboundl(i)-i1,tab2(i)+lboundl(i)-i1
+          IF ((k .GE. lboundl(i)) .AND. (k.LE.uboundl(i))) THEN
+            nbloc(i) = 1
+            tabarray(i,1,1) = min(tabarray(i,1,1),k-lboundl(i)+i1)
+            tabarray(i,2,1) = max(tabarray(i,2,1),k-lboundl(i)+i1)
+        
+            tabarray(i,1,2) = min(tabarray(i,1,2),k)
+            tabarray(i,2,2) = max(tabarray(i,2,2),k)
+          ENDIF
+        enddo
+C
+      enddo
+
+      member = .FALSE.
+      IF (sum(nbloc) == nbdim) member = .TRUE.
+C
+      Return
+C
+C
+      End Subroutine Agrif_GlobtoLocInd2
+C
+#endif      
+
+      Subroutine Agrif_Copy_2d(tabout,tabin,l,m,inf,sup,inf2,sup2)
+      integer,dimension(2) :: l,m,inf,sup,inf2,sup2
+      real,target,dimension(l(1):,l(2):) :: tabout
+      real,target,dimension(m(1):,m(2):) :: tabin
+          tabout(inf(1):sup(1),
+     &                         inf(2):sup(2)) = 
+     &         tabin(inf2(1):sup2(1),
+     &                          inf2(2):sup2(2))
+      End Subroutine Agrif_Copy_2d
+      
+      Subroutine Agrif_Copy_3d(tabout,tabin,l,m,inf,sup,inf2,sup2)
+      integer,dimension(3) :: l,m,inf,sup,inf2,sup2
+      real,target,dimension(l(1):,l(2):,l(3):) :: tabout
+      real,target,dimension(m(1):,m(2):,m(3):) :: tabin
+          tabout(inf(1):sup(1),
+     &                         inf(2):sup(2), 
+     &                         inf(3):sup(3)) = 
+     &         tabin(inf2(1):sup2(1),
+     &                          inf2(2):sup2(2),
+     &                          inf2(3):sup2(3))
+      End Subroutine Agrif_Copy_3d
+      
+      Subroutine Agrif_Copy_4d(tabout,tabin,l,m,inf,sup,inf2,sup2)
+      integer,dimension(4) :: l,m,inf,sup,inf2,sup2
+      real,target,dimension(l(1):,l(2):,l(3):,l(4):) :: tabout
+      real,target,dimension(m(1):,m(2):,m(3):,m(4):) :: tabin
+          tabout(inf(1):sup(1),
+     &                         inf(2):sup(2), 
+     &                         inf(3):sup(3), 
+     &                         inf(4):sup(4)) = 
+     &         tabin(inf2(1):sup2(1),
+     &                          inf2(2):sup2(2),
+     &                          inf2(3):sup2(3),
+     &                          inf2(4):sup2(4))
+      End Subroutine Agrif_Copy_4d      
+
+      End Module Agrif_Arrays
Index: vendors/AGRIF/r_01/AGRIF_FILES/modbc.F
===================================================================
--- vendors/AGRIF/r_01/AGRIF_FILES/modbc.F	(revision 2672)
+++ vendors/AGRIF/r_01/AGRIF_FILES/modbc.F	(revision 2672)
@@ -0,0 +1,1337 @@
+!
+! $Id: modbc.F 779 2007-12-22 17:04:17Z rblod $
+!
+C     AGRIF (Adaptive Grid Refinement In Fortran)
+C
+C     Copyright (C) 2003 Laurent Debreu (Laurent.Debreu@imag.fr)
+C                        Christophe Vouland (Christophe.Vouland@imag.fr)    
+C
+C     This program is free software; you can redistribute it and/or modify
+C     it under the terms of the GNU General Public License as published by
+C     the Free Software Foundation; either version 2 of the License, or
+C     (at your option) any later version.
+C
+C     This program is distributed in the hope that it will be useful,
+C     but WITHOUT ANY WARRANTY; without even the implied warranty of
+C     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+C     GNU General Public License for more details.
+C
+C     You should have received a copy of the GNU General Public License
+C     along with this program; if not, write to the Free Software
+C     Foundation, Inc., 59 Temple Place- Suite 330, Boston, MA 02111-1307, USA.
+C
+C
+C
+CCC   Module Agrif_Boundary 
+C 
+      Module Agrif_Boundary  
+C
+CCC   Description:
+CCC   Module to calculate the boundary conditions on the child grids from their
+CCC   parent grids.
+C
+C     Modules used:  
+C   
+      Use Agrif_Interpolation        
+C
+      IMPLICIT NONE
+C        
+      CONTAINS   
+C     Define procedures contained in this module
+C
+C
+      
+C
+C     **************************************************************************
+CCC   Subroutine Agrif_Interp_bc_1d
+C     **************************************************************************
+C 
+      Subroutine Agrif_Interp_bc_1d(TypeInterp,parent,child,tab,deb,fin,
+     &                              weight,pweight,procname)
+C
+CCC   Description:
+CCC   Subroutine to calculate the boundary conditions on a fine grid for a 1D 
+CCC   grid variable.
+C
+C     Declarations:
+C      
+      
+C
+C     Arguments      
+      External :: procname
+      Optional :: procname
+      INTEGER,DIMENSION(6,6) :: TypeInterp    ! TYPE of interpolation (linear, 
+                                            ! lagrange, spline, ... )
+      TYPE(AGRIF_PVariable) :: parent       ! Variable on the parent grid
+      TYPE(AGRIF_PVariable) :: child        ! Variable on the child grid
+      TYPE(AGRIF_PVariable) :: childtemp    ! Temporary variable on the child 
+                                            ! grid
+      INTEGER :: deb,fin                    ! Positions where interpolations are
+                                            ! done on the fine grid 
+      REAL, DIMENSION(
+     &         child%var%lb(1):child%var%ub(1) 
+     &    ), Target :: tab ! Values of the grid variable
+      LOGICAL :: pweight                    ! Indicates if weight is used for  
+                                            ! the temporal interpolation 
+      REAL :: weight                        ! Coefficient for the time 
+                                            ! interpolation
+C
+C
+C     Definition of a temporary AGRIF_PVariable data TYPE representing the grid
+C     variable.   
+C
+      allocate(childtemp % var)  
+C
+      childtemp % var % root_var => child % var % root_var
+C      
+C     Values of the grid variable
+      childtemp % var % parray1 => tab  
+C
+C     Temporary results for the time interpolation before and after the space 
+C     interpolation 
+      childtemp % var % oldvalues2D => child % var % oldvalues2D
+C 
+C     Index indicating if a space interpolation is necessary
+      childtemp % var % interpIndex => child % var % interpIndex       
+      childtemp % var % Interpolationshouldbemade = 
+     &                 child % var % Interpolationshouldbemade   
+      childtemp % var % list_interp => child % var% list_interp 
+      
+      childtemp % var% lb = child % var % lb
+      childtemp % var% ub = child % var % ub         
+C
+C     Call to the procedure for the calculations of the boundary conditions
+      IF (present(procname)) THEN
+      Call Agrif_CorrectVariable
+     &     (TypeInterp,parent,childtemp,deb,fin,pweight,weight,procname)
+      ELSE
+      Call Agrif_CorrectVariable
+     &     (TypeInterp,parent,childtemp,deb,fin,pweight,weight)
+      ENDIF
+
+C   
+      child % var % oldvalues2D => childtemp % var % oldvalues2D
+      child % var % list_interp => childtemp % var %list_interp
+C         
+      deallocate(childtemp % var)
+C
+C       
+      End Subroutine Agrif_Interp_bc_1D
+C
+      
+C
+C
+C
+C     **************************************************************************
+CCC   Subroutine Agrif_Interp_bc_2d
+C     **************************************************************************
+C 
+      Subroutine Agrif_Interp_bc_2d(TypeInterp,parent,child,tab,deb,fin,
+     &                              weight,pweight,procname)
+C
+CCC   Description:
+CCC   Subroutine to calculate the boundary conditions on a fine grid for a 2D 
+CCC   grid variable.
+C
+C     Declarations:
+C      
+      
+C
+C     Arguments      
+      External :: procname
+      Optional :: procname
+      INTEGER,DIMENSION(6,6) :: TypeInterp    ! TYPE of interpolation (linear, 
+                                            ! lagrange, spline, ... )
+      TYPE(AGRIF_PVariable) :: parent       ! Variable on the parent grid
+      TYPE(AGRIF_PVariable) :: child        ! Variable on the child grid
+      TYPE(AGRIF_PVariable) :: childtemp    ! Temporary variable on the child 
+                                            ! grid
+      INTEGER :: deb,fin                    ! Positions where interpolations are
+                                            ! done on the fine grid 
+      REAL, DIMENSION(
+     &         child%var%lb(1):child%var%ub(1),
+     &         child%var%lb(2):child%var%ub(2) 
+     &    ), Target :: tab ! Values of the grid variable
+      LOGICAL :: pweight                    ! Indicates if weight is used for  
+                                            ! the temporal interpolation 
+      REAL :: weight                        ! Coefficient for the time 
+                                            ! interpolation
+C
+C
+C     Definition of a temporary AGRIF_PVariable data TYPE representing the grid
+C     variable.   
+C
+      allocate(childtemp % var)  
+C
+      childtemp % var % root_var => child % var % root_var
+C      
+C     Values of the grid variable
+      childtemp % var % parray2 => tab  
+C
+C     Temporary results for the time interpolation before and after the space 
+C     interpolation 
+      childtemp % var % oldvalues2D => child % var % oldvalues2D
+C 
+C     Index indicating if a space interpolation is necessary
+      childtemp % var % interpIndex => child % var % interpIndex       
+      childtemp % var % Interpolationshouldbemade = 
+     &                 child % var % Interpolationshouldbemade   
+      childtemp % var % list_interp => child % var% list_interp 
+      
+      childtemp % var% lb = child % var % lb
+      childtemp % var% ub = child % var % ub         
+C
+C     Call to the procedure for the calculations of the boundary conditions
+      IF (present(procname)) THEN
+      Call Agrif_CorrectVariable
+     &     (TypeInterp,parent,childtemp,deb,fin,pweight,weight,procname)
+      ELSE
+      Call Agrif_CorrectVariable
+     &     (TypeInterp,parent,childtemp,deb,fin,pweight,weight)
+      ENDIF
+
+C   
+      child % var % oldvalues2D => childtemp % var % oldvalues2D
+      child % var % list_interp => childtemp % var %list_interp
+C         
+      deallocate(childtemp % var)
+C
+C       
+      End Subroutine Agrif_Interp_bc_2D
+C
+C
+C
+C     **************************************************************************
+CCC   Subroutine Agrif_Interp_bc_3d
+C     **************************************************************************
+C 
+      Subroutine Agrif_Interp_bc_3d(TypeInterp,parent,child,tab,deb,fin,
+     &                              weight,pweight,procname)            
+C
+CCC   Description:
+CCC   Subroutine to calculate the boundary conditions on a fine grid for a 3D 
+CCC   variable.
+C
+C     Declarations:
+C      
+      
+C
+C     Arguments 
+      External :: procname
+      Optional :: procname     
+      INTEGER,DIMENSION(6,6) :: TypeInterp    ! TYPE of interpolation (linear, 
+                                            ! lagrange, spline, ... )
+      TYPE(AGRIF_PVariable) :: parent       ! Variable on the parent grid
+      TYPE(AGRIF_PVariable) :: child        ! Variable on the child grid
+      TYPE(AGRIF_PVariable) :: childtemp    ! Temporary variable on the child
+                                            ! grid
+      INTEGER :: deb,fin                    ! Positions where interpolations 
+                                            ! are done on the fine grid 
+      REAL, DIMENSION(
+     &         child%var%lb(1):child%var%ub(1),
+     &         child%var%lb(2):child%var%ub(2),
+     &         child%var%lb(3):child%var%ub(3)
+     &         ), Target :: tab ! Values of the grid variable
+      LOGICAL :: pweight                    ! Indicates if weight is used for 
+                                            ! the temporal interpolation 
+      REAL :: weight                        ! Coefficient for the time 
+                                            ! interpolation
+C
+C
+C     Definition of a temporary AGRIF_PVariable data TYPE representing the grid 
+C     variable.  
+C
+      allocate(childtemp % var)  
+C
+      childtemp % var % root_var => child % var % root_var       
+C      
+C     Values of the grid variable
+      childtemp % var % parray3 => tab
+C
+C     Temporary results for the time interpolation before and after the space 
+C     interpolation  
+      childtemp % var % oldvalues2D => child % var % oldvalues2D
+C 
+C     Index indicating if a space interpolation is necessary
+      childtemp % var % interpIndex => child % var % interpIndex
+      childtemp % var % Interpolationshouldbemade = 
+     &                 child % var % Interpolationshouldbemade 
+      childtemp % var % list_interp => child % var% list_interp 
+      
+      childtemp % var% lb = child % var % lb
+      childtemp % var% ub = child % var % ub
+C
+C     Call to the procedure for the calculations of the boundary conditions     
+      IF (present(procname)) THEN
+      Call Agrif_CorrectVariable
+     &     (TypeInterp,parent,childtemp,deb,fin,pweight,weight,procname)
+      ELSE
+      Call Agrif_CorrectVariable
+     &     (TypeInterp,parent,childtemp,deb,fin,pweight,weight)
+      ENDIF
+C
+      child % var % oldvalues2D => childtemp % var % oldvalues2D
+      child % var % list_interp => childtemp % var %list_interp      
+C      
+      deallocate(childtemp % var)
+C
+C       
+      End Subroutine Agrif_Interp_bc_3D               
+C
+C
+C
+C
+C     **************************************************************************
+CCC   Subroutine Agrif_Interp_bc_4d
+C     **************************************************************************
+C 
+      Subroutine Agrif_Interp_bc_4d(TypeInterp,parent,child,tab,deb,fin,
+     &                             weight,pweight,procname)            
+C
+CCC   Description:
+CCC   Subroutine to calculate the boundary conditions on a fine grid for a 4D 
+CCC   grid variable.
+C
+C     Declarations:
+C      
+      
+C
+C     Arguments      
+      External :: procname
+      Optional :: procname     
+      INTEGER,DIMENSION(6,6) :: TypeInterp      ! TYPE of interpolation (linear, 
+                                              ! lagrange, spline, ... )
+      TYPE(AGRIF_PVariable) :: parent         ! Variable on the parent grid
+      TYPE(AGRIF_PVariable) :: child          ! Variable on the child grid
+      TYPE(AGRIF_PVariable) :: childtemp      ! Temporary varaiable on the child
+                                              ! grid
+      INTEGER :: deb,fin                      ! Positions where interpolations 
+                                              ! are done on the fine grid 
+      REAL, DIMENSION(
+     &         child%var%lb(1):child%var%ub(1),
+     &         child%var%lb(2):child%var%ub(2),
+     &         child%var%lb(3):child%var%ub(3),
+     &         child%var%lb(4):child%var%ub(4)
+     &        ), Target :: tab ! Values of the grid variable
+      LOGICAL :: pweight                      ! Indicates if weight is used for 
+                                              ! the temporal interpolation 
+      REAL :: weight                          ! Coefficient for the time 
+                                              ! interpolation
+C
+C
+C     Definition of a temporary AGRIF_PVariable data TYPE representing the grid 
+C     variable.  
+C
+      allocate(childtemp % var)  
+C
+      childtemp % var % root_var => child % var % root_var 
+C      
+C     Values of the grid variable
+      childtemp % var % parray4 => tab  
+C
+C     Temporary results for the time interpolation before and after the space 
+C     interpolation       
+      childtemp % var % oldvalues2D => child % var % oldvalues2D
+C 
+C     Index indicating if a space interpolation is necessary
+      childtemp % var % interpIndex => child % var % interpIndex       
+      childtemp % var % Interpolationshouldbemade = 
+     &                 child % var % Interpolationshouldbemade  
+      childtemp % var % list_interp => child % var% list_interp 
+      
+      childtemp % var% lb = child % var % lb
+      childtemp % var% ub = child % var % ub               
+C
+C     Call to the procedure for the calculations of the boundary conditions
+      IF (present(procname)) THEN
+      Call Agrif_CorrectVariable
+     &     (TypeInterp,parent,childtemp,deb,fin,pweight,weight,procname)
+      ELSE
+      Call Agrif_CorrectVariable
+     &     (TypeInterp,parent,childtemp,deb,fin,pweight,weight)
+      ENDIF
+C
+      child % var % oldvalues2D => childtemp % var % oldvalues2D
+      child % var % list_interp => childtemp % var %list_interp      
+C      
+      deallocate(childtemp % var)
+C
+C       
+      End Subroutine Agrif_Interp_bc_4D
+C
+C
+C
+C     **************************************************************************
+CCC   Subroutine Agrif_Interp_bc_5d
+C     **************************************************************************
+C 
+      Subroutine Agrif_Interp_bc_5d(TypeInterp,parent,child,tab,deb,fin,
+     &                             weight,pweight,procname)            
+C
+CCC   Description:
+CCC   Subroutine to calculate the boundary conditions on a fine grid for a 5D 
+CCC   grid variable.
+C
+C     Declarations:
+C      
+      
+C
+C     Arguments      
+      External :: procname
+      Optional :: procname     
+      INTEGER,DIMENSION(6,6) :: TypeInterp      ! TYPE of interpolation (linear, 
+                                              ! lagrange, spline, ... )
+      TYPE(AGRIF_PVariable) :: parent         ! Variable on the parent grid
+      TYPE(AGRIF_PVariable) :: child          ! Variable on the child grid
+      TYPE(AGRIF_PVariable) :: childtemp      ! Temporary varaiable on the child
+                                              ! grid
+      INTEGER :: deb,fin                      ! Positions where interpolations 
+                                              ! are done on the fine grid 
+      REAL, DIMENSION(
+     &         child%var%lb(1):child%var%ub(1),
+     &         child%var%lb(2):child%var%ub(2),
+     &         child%var%lb(3):child%var%ub(3),
+     &         child%var%lb(4):child%var%ub(4),
+     &         child%var%lb(5):child%var%ub(5)
+     &         ), Target :: tab ! Values of the grid variable
+      LOGICAL :: pweight                      ! Indicates if weight is used for 
+                                              ! the temporal interpolation 
+      REAL :: weight                          ! Coefficient for the time 
+                                              ! interpolation
+C
+C
+C     Definition of a temporary AGRIF_PVariable data TYPE representing the grid 
+C     variable.  
+C
+      allocate(childtemp % var)  
+C
+      childtemp % var % root_var => child % var % root_var 
+C      
+C     Values of the grid variable
+      childtemp % var % parray5 => tab  
+C
+C     Temporary results for the time interpolation before and after the space 
+C     interpolation       
+      childtemp % var % oldvalues2D => child % var % oldvalues2D
+C 
+C     Index indicating if a space interpolation is necessary
+      childtemp % var % interpIndex => child % var % interpIndex       
+      childtemp % var % Interpolationshouldbemade = 
+     &                 child % var % Interpolationshouldbemade 
+      childtemp % var % list_interp => child % var% list_interp  
+      
+      childtemp % var% lb = child % var % lb
+      childtemp % var% ub = child % var % ub
+                     
+C
+C     Call to the procedure for the calculations of the boundary conditions  
+      IF (present(procname)) THEN
+      Call Agrif_CorrectVariable
+     &     (TypeInterp,parent,childtemp,deb,fin,pweight,weight,procname)
+      ELSE
+      Call Agrif_CorrectVariable
+     &     (TypeInterp,parent,childtemp,deb,fin,pweight,weight)
+      ENDIF
+C
+      child % var % oldvalues2D => childtemp % var % oldvalues2D
+      child % var % list_interp => childtemp % var %list_interp      
+C      
+      deallocate(childtemp % var)
+C
+C       
+      End Subroutine Agrif_Interp_bc_5D
+C
+C
+C
+C
+C     **************************************************************************
+CCC   Subroutine Agrif_Interp_bc_6d
+C     **************************************************************************
+C 
+      Subroutine Agrif_Interp_bc_6d(TypeInterp,parent,child,tab,deb,fin,
+     &                             weight,pweight)            
+C
+CCC   Description:
+CCC   Subroutine to calculate the boundary conditions on a fine grid for a 6D 
+CCC   grid variable.
+C
+C     Declarations:
+C      
+      
+C
+C     Arguments      
+      INTEGER,DIMENSION(6,6) :: TypeInterp      ! TYPE of interpolation (linear, 
+                                              ! lagrange, spline, ... )
+      TYPE(AGRIF_PVariable) :: parent         ! Variable on the parent grid
+      TYPE(AGRIF_PVariable) :: child          ! Variable on the child grid
+      TYPE(AGRIF_PVariable) :: childtemp      ! Temporary varaiable on the child
+                                              ! grid
+      INTEGER :: deb,fin                      ! Positions where interpolations 
+                                              ! are done on the fine grid 
+      REAL, DIMENSION(
+     &         child%var%lb(1):child%var%ub(1),
+     &         child%var%lb(2):child%var%ub(2),
+     &         child%var%lb(3):child%var%ub(3),
+     &         child%var%lb(4):child%var%ub(4),
+     &         child%var%lb(5):child%var%ub(5),
+     &         child%var%lb(6):child%var%ub(6)
+     &         ), Target :: tab ! Values of the grid variable
+      LOGICAL :: pweight                      ! Indicates if weight is used for 
+                                              ! the temporal interpolation 
+      REAL :: weight                          ! Coefficient for the time 
+                                              ! interpolation
+C
+C
+C     Definition of a temporary AGRIF_PVariable data TYPE representing the grid 
+C     variable.  
+C
+      allocate(childtemp % var)  
+C
+      childtemp % var % root_var => child % var % root_var 
+C      
+C     Values of the grid variable
+      childtemp % var % parray6 => tab  
+C
+C     Temporary results for the time interpolation before and after the space 
+C     interpolation       
+      childtemp % var % oldvalues2D => child % var % oldvalues2D
+C 
+C     Index indicating if a space interpolation is necessary
+      childtemp % var % interpIndex => child % var % interpIndex       
+      childtemp % var % Interpolationshouldbemade = 
+     &                 child % var % Interpolationshouldbemade 
+      childtemp % var % list_interp => child % var% list_interp  
+      
+      childtemp % var% lb = child % var % lb
+      childtemp % var% ub = child % var % ub               
+C
+C     Call to the procedure for the calculations of the boundary conditions
+      Call Agrif_CorrectVariable
+     &     (TypeInterp,parent,childtemp,deb,fin,pweight,weight)
+C
+      child % var % oldvalues2D => childtemp % var % oldvalues2D
+      child % var % list_interp => childtemp % var %list_interp      
+C      
+      deallocate(childtemp % var)
+C
+C       
+      End Subroutine Agrif_Interp_bc_6D
+C
+C
+C     **************************************************************************
+CCC   Subroutine Agrif_CorrectVariable
+C     **************************************************************************
+C
+      Subroutine AGRIF_CorrectVariable(TypeInterp,parent,child,deb,fin,
+     &                                 pweight,weight,procname)
+C
+CCC   Description:
+CCC   Subroutine to calculate the boundary conditions on a fine grid.
+C
+C     Declarations:
+C      
+      
+C
+C     Arguments
+      External :: procname
+      Optional :: procname
+      TYPE(AGRIF_PVariable) :: parent         ! Variable on the parent grid
+      TYPE(AGRIF_PVariable) :: child          ! Variable on the child grid
+      INTEGER,DIMENSION(6,6)  :: TypeInterp     ! TYPE of interpolation
+                                              !    (linear,lagrange,...)
+      INTEGER               :: deb,fin        ! Positions where boundary
+                                              !    conditions are calculated
+      LOGICAL               :: pweight        ! Indicates if weight is used 
+                                              !    for the time interpolation 
+      REAL                  :: weight         ! Coefficient for the time
+                                              !    interpolation
+C
+C     Local scalars
+      TYPE(Agrif_Grid)    , Pointer :: Agrif_Child_Gr,Agrif_Parent_Gr
+      TYPE(AGRIF_Variable), Pointer :: root   ! Variable on the root grid
+      INTEGER                       :: nbdim  ! Number of dimensions of 
+                                              !    the grid variable 
+      INTEGER                       :: n
+      INTEGER,DIMENSION(6)          :: pttab_child  ! Index of the first point
+                                                    !    inside the domain for
+                                                    !    the child grid variable
+      INTEGER,DIMENSION(6)          :: pttab_parent ! Index of the first point
+                                                    !    inside the domain for
+                                                    !    the parent grid
+                                                    !    variable
+      INTEGER,DIMENSION(6)          :: nbtab_Child  ! Number of the cells
+      INTEGER,DIMENSION(6)          :: posvartab_Child    ! Position of the
+                                                    !    variable on the cell 
+      INTEGER,DIMENSION(6)          :: loctab_Child ! Indicates if the child
+                                                    !    grid has a common
+                                                    !    border with the root
+                                                    !    grid      
+      REAL, DIMENSION(6)            :: s_child,s_parent   ! Positions of the
+                                                    !    parent and child grids
+      REAL, DIMENSION(6)            :: ds_child,ds_parent ! Space steps of the
+                                                    !    parent and child grids 
+C
+C
+      loctab_child(:) = 0
+C
+      Agrif_Child_Gr => Agrif_Curgrid
+      Agrif_Parent_Gr => Agrif_Curgrid % parent
+      root => child % var % root_var 
+      nbdim = root % nbdim
+C
+      do n = 1,nbdim
+        posvartab_child(n) = root % posvar(n)      
+      enddo
+C
+C
+      do n = 1,nbdim
+C
+        Select case(root % interptab(n))
+C
+          case('x') ! x DIMENSION
+C
+            nbtab_Child(n) = Agrif_Child_Gr % nb(1)
+            pttab_Child(n) = root % point(1)
+            pttab_Parent(n) = root % point(1)
+            s_Child(n) = Agrif_Child_Gr % Agrif_x(1)
+            s_Parent(n) = Agrif_Parent_Gr % Agrif_x(1)
+            ds_Child(n) = Agrif_Child_Gr % Agrif_d(1)
+            ds_Parent(n) = Agrif_Parent_Gr % Agrif_d(1)
+            if (root % posvar(n) == 2) then
+                s_Child(n) = s_Child(n) + ds_Child(n)/2.
+                s_Parent(n) = s_Parent(n) + ds_Parent(n)/2.
+            endif
+C
+            if (Agrif_CURGRID % NearRootBorder(1)) 
+     &         loctab_child(n) = -1
+            if (Agrif_CURGRID % DistantRootBorder(1))
+     &         loctab_child(n) = -2
+            if ((Agrif_CURGRID % NearRootBorder(1)) .AND. 
+     &          (Agrif_CURGRID % DistantRootBorder(1))) 
+     &         loctab_child(n) = -3
+C
+          case('y') ! y DIMENSION      
+C
+            nbtab_Child(n) = Agrif_Child_Gr % nb(2)
+            pttab_Child(n) = root % point(2)
+            pttab_Parent(n) = root % point(2)
+            s_Child(n) = Agrif_Child_Gr % Agrif_x(2)
+            s_Parent(n) = Agrif_Parent_Gr % Agrif_x(2) 
+            ds_Child(n) = Agrif_Child_Gr % Agrif_d(2)
+            ds_Parent(n) = Agrif_Parent_Gr % Agrif_d(2)
+            if (root % posvar(n) == 2) then        
+                s_Child(n) = s_Child(n) + ds_Child(n)/2.
+                s_Parent(n) = s_Parent(n) + ds_Parent(n)/2.
+            endif        
+C
+            if (Agrif_CURGRID % NearRootBorder(2)) 
+     &         loctab_child(n) = -1
+            if (Agrif_CURGRID % DistantRootBorder(2)) 
+     &         loctab_child(n) = -2
+            if ((Agrif_CURGRID % NearRootBorder(2)) .AND. 
+     &          (Agrif_CURGRID % DistantRootBorder(2))) 
+     &         loctab_child(n) = -3
+C
+          case('z') ! z DIMENSION
+C
+            nbtab_Child(n) = Agrif_Child_Gr % nb(3)
+            pttab_Child(n) = root % point(3)
+            pttab_Parent(n) = root % point(3)
+            s_Child(n) = Agrif_Child_Gr % Agrif_x(3)
+            s_Parent(n) = Agrif_Parent_Gr % Agrif_x(3)
+            ds_Child(n) = Agrif_Child_Gr % Agrif_d(3)
+            ds_Parent(n) = Agrif_Parent_Gr % Agrif_d(3)
+            if (root % posvar(n) == 2) then        
+                s_Child(n) = s_Child(n) + ds_Child(n)/2.
+                s_Parent(n) = s_Parent(n) + ds_Parent(n)/2.
+            endif        
+C
+            if (Agrif_CURGRID % NearRootBorder(3)) 
+     &         loctab_child(n) = -1
+            if (Agrif_CURGRID % DistantRootBorder(3)) 
+     &         loctab_child(n) = -2
+            if ((Agrif_CURGRID % NearRootBorder(3)) .AND. 
+     &          (Agrif_CURGRID % DistantRootBorder(3))) 
+     &         loctab_child(n) = -3
+C
+          case('N') ! No space DIMENSION      
+C
+            nbtab_Child(n) = child % var % ub(n) - child % var % lb(n)
+            pttab_Child(n) = child % var % lb(n)
+C
+C           No interpolation but only a copy of the values of the grid variable
+C      
+            posvartab_child(n) = 1
+            pttab_Parent(n)= pttab_Child(n)
+            s_Child(n)=0.
+            s_Parent(n)=0. 
+            ds_Child(n)=1.
+            ds_Parent(n)=1.
+            loctab_child(n) = -3
+C
+        End select
+C
+      enddo
+C
+         IF (present(procname)) THEN
+          Call AGRIF_CorrectnD
+     &         (TypeInterp,parent,child,deb,fin,pweight,weight,
+     &          pttab_Child(1:nbdim),pttab_Parent(1:nbdim),
+     &          nbtab_Child(1:nbdim),posvartab_Child(1:nbdim),
+     &          loctab_Child(1:nbdim),
+     &          s_Child(1:nbdim),s_Parent(1:nbdim),
+     &          ds_Child(1:nbdim),ds_Parent(1:nbdim),nbdim,procname)
+        ELSE
+          Call AGRIF_CorrectnD
+     &         (TypeInterp,parent,child,deb,fin,pweight,weight,
+     &          pttab_Child(1:nbdim),pttab_Parent(1:nbdim),
+     &          nbtab_Child(1:nbdim),posvartab_Child(1:nbdim),
+     &          loctab_Child(1:nbdim),
+     &          s_Child(1:nbdim),s_Parent(1:nbdim),
+     &          ds_Child(1:nbdim),ds_Parent(1:nbdim),nbdim)
+         ENDIF
+C
+C
+      End subroutine AGRIF_CorrectVariable
+C
+C     **************************************************************************
+CCC   Subroutine Agrif_Correctnd
+C     **************************************************************************
+C
+      Subroutine AGRIF_Correctnd(TypeInterp,parent,child,deb,fin,
+     &                           pweight,weight,
+     &                           pttab_child,pttab_Parent,
+     &                           nbtab_Child,posvartab_Child,
+     &                           loctab_Child,
+     &                           s_Child,s_Parent,
+     &                           ds_Child,ds_Parent,nbdim,procname)
+C
+CCC   Description:
+CCC   Subroutine to calculate the boundary conditions for a nD grid variable on 
+CCC   a fine grid by using a space and time interpolations; it is called by the 
+CCC   Agrif_CorrectVariable procedure.
+C
+C
+C     Declarations:
+C
+      
+C
+#ifdef AGRIF_MPI
+C
+#include "mpif.h"
+C
+#endif
+C
+C     Arguments
+      External :: procname
+      Optional :: procname
+      INTEGER,DIMENSION(6,6) :: TypeInterp ! TYPE of interpolation (linear, 
+                                         !   spline,...)  
+      TYPE(AGRIF_PVariable)    :: parent ! Variable on the parent grid
+      TYPE(AGRIF_PVariable)    :: child  ! Variable on the child grid 
+      INTEGER                  :: deb,fin ! Positions where interpolations 
+                                         !    are done
+      LOGICAL                  :: pweight ! Indicates if weight is used for 
+                                         !    the temporal interpolation
+      REAL                     :: weight ! Coefficient for the temporal
+                                         !    interpolation
+      INTEGER                  :: nbdim  ! Number of dimensions of the grid
+                                         !    variable
+      INTEGER,DIMENSION(nbdim) :: pttab_child ! Index of the first point inside
+                                         !    the domain for the parent 
+                                         !    grid variable
+      INTEGER,DIMENSION(nbdim) :: pttab_Parent ! Index of the first point 
+                                         !   inside the domain for the 
+                                         !   child grid variable
+      INTEGER,DIMENSION(nbdim) :: nbtab_Child ! Number of cells of the child
+                                         !    grid
+      INTEGER,DIMENSION(nbdim) :: posvartab_Child ! Position of the grid
+                                         !    variable (1 or 2)
+      INTEGER,DIMENSION(nbdim) :: loctab_Child ! Indicates if the child 
+                                        !    grid has a common border with 
+                                        !    the root grid
+      REAL   ,DIMENSION(nbdim) :: s_Child,s_Parent ! Positions of the parent 
+                                        !   and child grids 
+      REAL   ,DIMENSION(nbdim) :: ds_Child,ds_Parent ! Space steps of the 
+                                        !    parent and child grids
+C
+C     Local variables
+      TYPE(AGRIF_PVariable)        :: restore ! Variable on the parent     
+      INTEGER,DIMENSION(nbdim,2)   :: lubglob
+      INTEGER                      :: i          
+      INTEGER                      :: kindex  ! Index used for safeguard 
+                                       !    and time interpolation
+      INTEGER,DIMENSION(nbdim,2,2) :: indtab ! Arrays indicating the limits 
+                                       !    of the child     
+      INTEGER,DIMENSION(nbdim,2,2) :: indtruetab ! grid variable where 
+                                       !   boundary conditions are 
+      INTEGER,DIMENSION(nbdim,2,2,nbdim)   :: ptres,ptres2 ! calculated
+      INTEGER                      :: nb,ndir,n,sizetab(1)
+      REAL, DIMENSION(:), Allocatable :: tab ! Array used for the interpolation
+      REAL    :: c1t,c2t               ! Coefficients for the time interpolation
+                                       !    (c2t=1-c1t) 
+C
+#ifdef AGRIF_MPI
+C
+      INTEGER,DIMENSION(nbdim)   :: lower,upper
+      INTEGER,DIMENSION(nbdim)   :: ltab,utab
+      INTEGER,DIMENSION(nbdim)   :: lb,ub
+      INTEGER,DIMENSION(nbdim,2) :: iminmaxg
+      INTEGER                    :: code
+C
+#endif            
+C      
+C
+      indtab(1:nbdim,2,1) = pttab_child(1:nbdim) + nbtab_child(1:nbdim)
+     &          + deb
+      indtab(1:nbdim,2,2) = indtab(1:nbdim,2,1) + ( fin - deb )
+       
+      indtab(1:nbdim,1,1) = pttab_child(1:nbdim) - fin
+      indtab(1:nbdim,1,2) = pttab_child(1:nbdim) - deb
+                  
+      WHERE (posvartab_child(1:nbdim) == 2)
+        indtab(1:nbdim,1,1) = indtab(1:nbdim,1,1) - 1
+        indtab(1:nbdim,1,2) = indtab(1:nbdim,1,2) - 1
+      END WHERE
+      
+
+#if !defined AGRIF_MPI
+      Call Agrif_nbdim_Get_bound_dimension(child%var,lubglob(:,1),
+     &              lubglob(:,2),nbdim)
+C
+#else
+C     
+      Call Agrif_nbdim_Get_bound_dimension(child%var,lb,ub,nbdim)
+      
+      DO i = 1,nbdim
+C
+        Call Agrif_Invloc(lb(i),Agrif_Procrank,i,iminmaxg(i,1))
+        Call Agrif_Invloc(ub(i),Agrif_Procrank,i,iminmaxg(i,2))
+C
+      ENDDO
+C
+      iminmaxg(1:nbdim,2) = - iminmaxg(1:nbdim,2)
+      
+      CALL MPI_ALLREDUCE(iminmaxg,lubglob,2*nbdim,MPI_INTEGER,MPI_MIN,
+     &                     MPI_COMM_WORLD,code)  
+     
+      lubglob(1:nbdim,2) = - lubglob(1:nbdim,2)      
+C
+#endif 
+C     
+      indtruetab(1:nbdim,1,1) = max(indtab(1:nbdim,1,1),
+     &     lubglob(1:nbdim,1))
+      indtruetab(1:nbdim,1,2) = max(indtab(1:nbdim,1,2),
+     &     lubglob(1:nbdim,1))
+      indtruetab(1:nbdim,2,1) = min(indtab(1:nbdim,2,1),
+     &     lubglob(1:nbdim,2))
+      indtruetab(1:nbdim,2,2) = min(indtab(1:nbdim,2,2),
+     &     lubglob(1:nbdim,2))
+
+                              
+C 
+C
+      do nb = 1,nbdim
+C
+        do ndir = 1,2      
+C
+          if (loctab_child(nb) /= (-ndir) 
+     &        .AND. loctab_child(nb) /= -3) then
+C           
+              do n = 1,2
+C
+                ptres(nb,n,ndir,nb) = indtruetab(nb,ndir,n)  
+C
+              enddo              
+C
+              do i = 1,nbdim
+C     
+                if (i .NE. nb) then      
+C
+                    if (loctab_child(i) == -1 
+     &                                 .OR. loctab_child(i) == -3) then
+C
+                        ptres(i,1,ndir,nb) = pttab_child(i)
+C
+                      else
+C
+                        ptres(i,1,ndir,nb) = indtruetab(i,1,1)
+C
+                    endif
+C
+                    if (loctab_child(i) == -2 
+     &                                 .OR. loctab_child(i) == -3) then
+C
+                        if (posvartab_child(i) == 1) then
+C
+                            ptres(i,2,ndir,nb) = pttab_child(i)
+     &                                                 + nbtab_child(i)
+C
+                          else
+C
+                            ptres(i,2,ndir,nb) = pttab_child(i)
+     &                                             + nbtab_child(i) - 1
+C
+                        endif                             
+C
+                      else
+C
+                        ptres(i,2,ndir,nb) = indtruetab(i,2,2)
+C
+                    endif                        
+C      
+                endif
+C      
+              enddo
+      
+C
+#if defined AGRIF_MPI
+                 Call Agrif_nbdim_Get_bound_dimension
+     &                    (child%var,lower,upper,nbdim)
+
+              do i = 1,nbdim
+C
+                 Call GetLocalBoundaries(ptres(i,1,ndir,nb),
+     &                                  ptres(i,2,ndir,nb),i,
+     &                                  lower(i),upper(i),
+     &                                  ltab(i),utab(i))
+                 ptres2(i,1,ndir,nb) = max(ltab(i),lower(i)) 
+                 ptres2(i,2,ndir,nb) = min(utab(i),upper(i))
+                 if ((i == nb) .AND. (ndir == 1)) then 
+                     ptres2(i,2,ndir,nb) = max(utab(i),lower(i))
+                 elseif ((i == nb) .AND. (ndir == 2)) then
+                     ptres2(i,1,ndir,nb) = min(ltab(i),upper(i)) 
+                 endif
+C
+              enddo
+#else
+              ptres2(:,:,ndir,nb) = ptres(:,:,ndir,nb)
+#endif      
+            
+        endif
+      
+        enddo
+       enddo
+C
+      if (child % var % interpIndex 
+     &        /= Agrif_Curgrid % parent % ngridstep .OR.
+     &    child%var%Interpolationshouldbemade ) then
+C
+C     Space interpolation 
+C      
+      kindex = 1    
+      
+
+C
+      do nb = 1,nbdim
+C
+        do ndir = 1,2
+C
+          if (loctab_child(nb) /= (-ndir) 
+     &        .AND. loctab_child(nb) /= -3) then  
+C
+              IF (present(procname)) THEN
+              Call Agrif_InterpnD
+     &             (TYPEInterp(nb,:),parent,child,
+     &              ptres(1:nbdim,1,ndir,nb),ptres(1:nbdim,2,ndir,nb),
+     &              pttab_child(1:nbdim),pttab_Parent(1:nbdim),
+     &              s_Child(1:nbdim),s_Parent(1:nbdim),
+     &              ds_Child(1:nbdim),ds_Parent(1:nbdim),
+     &              restore,.FALSE.,nbdim,procname)
+              ELSE
+              Call Agrif_InterpnD              
+     &             (TYPEInterp(nb,:),parent,child,
+     &              ptres(1:nbdim,1,ndir,nb),ptres(1:nbdim,2,ndir,nb),
+     &              pttab_child(1:nbdim),pttab_Parent(1:nbdim),
+     &              s_Child(1:nbdim),s_Parent(1:nbdim),
+     &              ds_Child(1:nbdim),ds_Parent(1:nbdim),
+     &              restore,.FALSE.,nbdim)
+              ENDIF
+     
+              IF (.NOT. child%var%interpolationshouldbemade) THEN
+C     
+C             Safeguard of the values of the grid variable (at times n and n+1
+C                on the parent grid)
+C      
+              sizetab(1) = 1
+C
+              do i = 1,nbdim
+C          
+                sizetab(1) = sizetab(1)
+     &              * (ptres2(i,2,ndir,nb)-ptres2(i,1,ndir,nb)+1)
+C      
+              enddo
+
+              Call saveAfterInterp(child,
+     &           ptres2(:,:,ndir,nb),kindex,sizetab(1),nbdim)
+C
+           ENDIF
+C
+          endif
+C
+        enddo       
+C
+      enddo     
+C
+C
+      child % var % interpIndex = Agrif_Curgrid % parent % ngridstep
+C
+C
+      endif  
+      
+              IF (.NOT. child%var%interpolationshouldbemade) THEN
+C
+C
+C     Calculation of the coefficients c1t and c2t for the temporary
+C        interpolation
+      if (pweight) then
+C
+          c1t = weight
+C
+        else
+C
+          c1t = (REAL(AGRIF_Nbstepint()) + 1.) / Agrif_Rhot()
+C
+      endif
+C                                  
+      c2t = 1. - c1t
+C           
+C     Time interpolation
+C
+      kindex = 1
+C
+      do nb = 1,nbdim
+C
+        do ndir = 1,2      
+C
+          if (loctab_child(nb) /= (-ndir) 
+     &        .AND. loctab_child(nb) /= -3) then
+
+              Call timeInterpolation
+     &             (child,ptres2(:,:,ndir,nb),kindex,c1t,c2t,nbdim)
+          endif
+C
+        enddo
+C      
+      enddo
+C      
+
+       ENDIF
+C  
+      End Subroutine Agrif_Correctnd
+C
+C
+C     **************************************************************************
+CCC   Subroutine saveAfterInterp
+C     **************************************************************************
+C
+      Subroutine saveAfterInterp(child,bounds,kindex,newsize,nbdim)
+C
+CCC   Descritpion:
+CCC   Subroutine used to save the values of the grid variable on the fine grid 
+CCC   after the space interpolation. 
+C
+C     Declarations:
+C
+      
+C
+C     argument
+      TYPE (AGRIF_PVariable) :: child   ! The fine grid variable
+      INTEGER                :: kindex  ! Index indicating where this safeguard 
+                                        ! is done on the fine grid
+      INTEGER :: nbdim, newsize
+      INTEGER,DIMENSION(nbdim,2) :: bounds
+C
+C     Local scalars
+      INTEGER                      :: ir,jr,kr,lr,mr,nr
+C
+C
+C     Allocation of the array oldvalues2d
+
+C
+      if (newsize .LE. 0) return
+C
+      Call Agrif_Checksize
+     &     (child,kindex+newsize)  
+
+      if (child % var % interpIndex 
+     &        /= Agrif_Curgrid % parent % ngridstep ) then
+       child%var%oldvalues2d(1,kindex:kindex+newsize-1)=
+     &        child%var%oldvalues2d(2,kindex:kindex+newsize-1)
+      endif
+
+      SELECT CASE (nbdim)
+      CASE (1)
+
+!CDIR ALTCODE
+         do ir=bounds(1,1),bounds(1,2)
+            child%var%oldvalues2d(2,kindex) =
+     &           child%var%parray1(ir)
+            kindex = kindex + 1
+         enddo       
+C
+      CASE (2)
+
+        do jr=bounds(2,1),bounds(2,2)
+!CDIR ALTCODE
+           do ir=bounds(1,1),bounds(1,2)
+            child%var%oldvalues2d(2,kindex) =
+     &           child%var%parray2(ir,jr)
+            kindex = kindex + 1
+           enddo
+         enddo      
+C
+      CASE (3)
+        do kr=bounds(3,1),bounds(3,2)
+          do jr=bounds(2,1),bounds(2,2)
+!CDIR ALTCODE
+             do ir=bounds(1,1),bounds(1,2)
+            child%var%oldvalues2d(2,kindex) =
+     &           child%var%parray3(ir,jr,kr)
+            kindex = kindex + 1
+             enddo
+           enddo
+         enddo       
+C
+      CASE (4)
+          do lr=bounds(4,1),bounds(4,2)
+           do kr=bounds(3,1),bounds(3,2)
+             do jr=bounds(2,1),bounds(2,2)
+!CDIR ALTCODE
+               do ir=bounds(1,1),bounds(1,2)
+            child%var%oldvalues2d(2,kindex) =
+     &           child%var%parray4(ir,jr,kr,lr)
+            kindex = kindex + 1
+               enddo
+             enddo
+           enddo
+         enddo         
+C
+      CASE (5)
+         do mr=bounds(5,1),bounds(5,2)
+           do lr=bounds(4,1),bounds(4,2)
+            do kr=bounds(3,1),bounds(3,2) 
+              do jr=bounds(2,1),bounds(2,2)
+!CDIR ALTCODE
+                 do ir=bounds(1,1),bounds(1,2)
+            child%var%oldvalues2d(2,kindex) =
+     &           child%var%parray5(ir,jr,kr,lr,mr)
+            kindex = kindex + 1
+                 enddo
+               enddo
+             enddo
+           enddo
+         enddo   
+C
+      CASE (6)
+        do nr=bounds(6,1),bounds(6,2)
+           do mr=bounds(5,1),bounds(5,2)
+             do lr=bounds(4,1),bounds(4,2)
+               do kr=bounds(3,1),bounds(3,2)
+                do jr=bounds(2,1),bounds(2,2)
+!CDIR ALTCODE
+                   do ir=bounds(1,1),bounds(1,2)
+            child%var%oldvalues2d(2,kindex) =
+     &           child%var%parray6(ir,jr,kr,lr,mr,nr)
+            kindex = kindex + 1
+                   enddo
+                 enddo
+               enddo
+             enddo
+           enddo
+         enddo       
+      END SELECT
+C
+C                                                  
+      End subroutine saveAfterInterp
+C
+C
+C
+C     **************************************************************************
+CCC   Subroutine timeInterpolation
+C     **************************************************************************
+C
+      Subroutine timeInterpolation(child,bounds,kindex,c1t,c2t,nbdim) 
+C
+CCC   Descritpion:
+CCC   Subroutine for a linear time interpolation on the child grid. 
+C
+C     Declarations:
+C
+      
+C
+C     argument
+      TYPE (AGRIF_PVariable) :: child  ! The fine grid variable
+      INTEGER :: nbdim
+      INTEGER,DIMENSION(nbdim,2) :: bounds
+      INTEGER                :: kindex ! Index indicating the values of the fine
+                                       ! grid got before and after the space 
+                                       ! interpolation and used for the time 
+                                       ! interpolation
+      REAL                   :: c1t,c2t! coefficients for the time interpolation
+                                       ! (c2t=1-c1t)  
+C
+C     Local aruments      
+      INTEGER :: i
+C     Local scalars
+      INTEGER                      :: ir,jr,kr,lr,mr,nr      
+C
+C
+      
+      SELECT CASE (nbdim)
+      CASE (1)
+
+!CDIR ALTCODE
+         do ir=bounds(1,1),bounds(1,2)
+                child%var%parray1(ir) =
+     &           c2t*child % var % oldvalues2d(1,kindex)   
+     &         + c1t*child % var % oldvalues2d(2,kindex)    
+            kindex = kindex + 1
+         enddo       
+C
+      CASE (2)
+
+        do jr=bounds(2,1),bounds(2,2)
+!CDIR ALTCODE
+           do ir=bounds(1,1),bounds(1,2)
+                child%var%parray2(ir,jr) =
+     &           c2t*child % var % oldvalues2d(1,kindex)   
+     &         + c1t*child % var % oldvalues2d(2,kindex) 
+            kindex = kindex + 1
+           enddo
+         enddo      
+C
+      CASE (3)
+        do kr=bounds(3,1),bounds(3,2)
+          do jr=bounds(2,1),bounds(2,2)
+!CDIR ALTCODE
+             do ir=bounds(1,1),bounds(1,2)
+                child%var%parray3(ir,jr,kr) =
+     &           c2t*child % var % oldvalues2d(1,kindex)   
+     &         + c1t*child % var % oldvalues2d(2,kindex) 
+            kindex = kindex + 1
+             enddo
+           enddo
+         enddo       
+C
+      CASE (4)
+          do lr=bounds(4,1),bounds(4,2)
+           do kr=bounds(3,1),bounds(3,2)
+             do jr=bounds(2,1),bounds(2,2)
+!CDIR ALTCODE
+               do ir=bounds(1,1),bounds(1,2)
+                child%var%parray4(ir,jr,kr,lr) =
+     &           c2t*child % var % oldvalues2d(1,kindex)   
+     &         + c1t*child % var % oldvalues2d(2,kindex) 
+            kindex = kindex + 1
+               enddo
+             enddo
+           enddo
+         enddo         
+C
+      CASE (5)
+         do mr=bounds(5,1),bounds(5,2)
+           do lr=bounds(4,1),bounds(4,2)
+            do kr=bounds(3,1),bounds(3,2) 
+              do jr=bounds(2,1),bounds(2,2)
+!CDIR ALTCODE
+                 do ir=bounds(1,1),bounds(1,2)
+                child%var%parray5(ir,jr,kr,lr,mr) =
+     &           c2t*child % var % oldvalues2d(1,kindex)   
+     &         + c1t*child % var % oldvalues2d(2,kindex) 
+            kindex = kindex + 1
+                 enddo
+               enddo
+             enddo
+           enddo
+         enddo   
+C
+      CASE (6)
+        do nr=bounds(6,1),bounds(6,2)
+           do mr=bounds(5,1),bounds(5,2)
+             do lr=bounds(4,1),bounds(4,2)
+               do kr=bounds(3,1),bounds(3,2)
+                do jr=bounds(2,1),bounds(2,2)
+!CDIR ALTCODE
+                   do ir=bounds(1,1),bounds(1,2)
+                child%var%parray6(ir,jr,kr,lr,mr,nr) =
+     &           c2t*child % var % oldvalues2d(1,kindex)   
+     &         + c1t*child % var % oldvalues2d(2,kindex) 
+            kindex = kindex + 1
+                   enddo
+                 enddo
+               enddo
+             enddo
+           enddo
+         enddo       
+      END SELECT
+                                                   
+C
+C
+      End subroutine timeInterpolation      
+C
+C
+C
+C     **************************************************************************
+CCC   Subroutine Agrif_Checksize
+C     **************************************************************************
+C
+      Subroutine Agrif_Checksize(child,newsize)
+C
+CCC   Descritpion:
+CCC   Subroutine used in the saveAfterInterp procedure to allocate the 
+CCC   oldvalues2d array. 
+C
+C     Declarations:
+C
+      
+C      
+C     TYPE argument
+      TYPE (AGRIF_PVariable) :: child  ! The fine grid variable
+C 
+C     Scalar arguments
+      INTEGER :: newsize               ! Size of the domains where the boundary 
+                                       ! conditions are calculated  
+C
+C     Local arrays
+      REAL, DIMENSION(:,:), Allocatable :: tempoldvalues ! Temporary array
+C                
+C
+      if (.NOT. associated(child % var % oldvalues2d)) then
+C
+          allocate(child % var % oldvalues2d(2,newsize))
+C  
+          child % var % oldvalues2d=0.
+C
+        else
+C
+          if (SIZE(child % var % oldvalues2d,2) < newsize) then   
+C
+              allocate(tempoldvalues(2,SIZE(child % var %
+     &                                    oldvalues2d,2)))
+C
+              tempoldvalues = child % var % oldvalues2d
+C
+              deallocate(child % var % oldvalues2d)
+C
+              allocate(child % var % oldvalues2d(2,newsize))
+C            
+              child%var%oldvalues2d=0.
+C
+              child % var % oldvalues2d(:,1:SIZE(tempoldvalues,2)) = 
+     &        tempoldvalues(:,:)
+C
+              deallocate(tempoldvalues)
+C
+          endif 
+C
+      endif                                                    
+C
+C
+      End  Subroutine Agrif_Checksize
+C
+C
+C
+C      
+      End Module AGRIF_boundary
+
Index: vendors/AGRIF/r_01/AGRIF_FILES/modbcfunction.F
===================================================================
--- vendors/AGRIF/r_01/AGRIF_FILES/modbcfunction.F	(revision 2672)
+++ vendors/AGRIF/r_01/AGRIF_FILES/modbcfunction.F	(revision 2672)
@@ -0,0 +1,2448 @@
+!
+! $Id: modbcfunction.F 779 2007-12-22 17:04:17Z rblod $
+!
+C     AGRIF (Adaptive Grid Refinement In Fortran)
+C
+C     Copyright (C) 2003 Laurent Debreu (Laurent.Debreu@imag.fr)
+C                        Christophe Vouland (Christophe.Vouland@imag.fr)    
+C
+C     This program is free software; you can redistribute it and/or modify
+C     it under the terms of the GNU General Public License as published by
+C     the Free Software Foundation; either version 2 of the License, or
+C     (at your option) any later version.
+C
+C     This program is distributed in the hope that it will be useful,
+C     but WITHOUT ANY WARRANTY; without even the implied warranty of
+C     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+C     GNU General Public License for more details.
+C
+C     You should have received a copy of the GNU General Public License
+C     along with this program; if not, write to the Free Software
+C     Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+C
+C
+C
+CCC   Module AGRIF_bcfunction
+C
+C 
+      Module  Agrif_bcfunction
+CCC   Description:
+CCC   
+C
+C     Modules used:
+C  
+      Use Agrif_Boundary
+      Use Agrif_Update
+      Use Agrif_fluxmod
+      Use Agrif_Save
+C             
+      IMPLICIT NONE
+C
+      interface Agrif_Bc_variable
+          module procedure Agrif_Bc_variable0d,
+     &                     Agrif_Bc_variable1d,
+     &                     Agrif_Bc_variable2d,
+     &                     Agrif_Bc_variable3d,
+     &                     Agrif_Bc_variable4d,
+     &                     Agrif_Bc_variable5d
+      end interface       
+C
+      interface Agrif_Set_Parent
+          module procedure Agrif_Set_Parent_int,
+     &                     Agrif_Set_Parent_real
+      end interface       
+C
+      interface Agrif_Interp_variable
+          module procedure Agrif_Interp_var0d,
+     &                     Agrif_Interp_var1d,
+     &                     Agrif_Interp_var2d,
+     &                     Agrif_Interp_var3d,
+     &                     Agrif_Interp_var4d,
+     &                     Agrif_Interp_var5d
+      end interface       
+C
+      interface Agrif_Init_variable
+          module procedure Agrif_Init_variable0d,
+     &                     Agrif_Init_variable1d,
+     &                     Agrif_Init_variable2d,
+     &                     Agrif_Init_variable3d,
+     &                     Agrif_Init_variable4d
+      end interface       
+C
+      interface Agrif_update_variable
+          module procedure Agrif_update_var0d,
+     &                     Agrif_update_var1d,
+     &                     Agrif_update_var2d,
+     &                     Agrif_update_var3d,
+     &                     Agrif_update_var4d,
+     &                     Agrif_update_var5d
+      end interface      
+      
+      interface Agrif_Save_Forrestore
+         module procedure Agrif_Save_Forrestore0d,    
+     &                    Agrif_Save_Forrestore2d,    
+     &                    Agrif_Save_Forrestore3d,    
+     &                    Agrif_Save_Forrestore4d
+      end interface
+C
+      Contains 
+C
+C     **************************************************************************
+CCC   Subroutine Agrif_Set_type
+C     **************************************************************************
+C 
+      Subroutine Agrif_Set_type(tabvarsindic,posvar,point)
+C
+CCC   Description:
+CCC   To set the TYPE of the variable.
+C
+C     Modules used:
+C      
+
+C
+C     Declarations:
+C      
+C
+C
+C     Arguments      
+C
+      INTEGER, DIMENSION(:) :: posvar
+      INTEGER, DIMENSION(:) :: point
+C
+      INTEGER :: tabvarsindic ! indice of the variable in tabvars
+      INTEGER :: dimensio ! DIMENSION of the variable
+      INTEGER :: i
+C
+C
+C     Begin 
+C
+      dimensio = Agrif_Mygrid % tabvars(tabvarsindic) %var % nbdim
+C
+      if (.not.associated(Agrif_Mygrid % tabvars(tabvarsindic)
+     &                                 %var % posvar)) then
+      Allocate( 
+     & Agrif_Mygrid % tabvars(tabvarsindic)%var % posvar(dimensio))
+      endif 
+            
+      do i = 1 , dimensio
+         Agrif_Mygrid % tabvars(tabvarsindic) %var % posvar(i)
+     &                       = posvar(i)
+         Agrif_Mygrid % tabvars(tabvarsindic) %var % point(i) 
+     &                       = point(i)
+      enddo
+C
+C
+      End Subroutine Agrif_Set_type
+C
+C
+C     **************************************************************************
+CCC   Subroutine Agrif_Set_parent_int
+C     **************************************************************************
+C 
+      Subroutine Agrif_Set_parent_int(tabvarsindic,value)
+C
+CCC   Description:
+CCC   To set the TYPE of the variable.
+C
+C     Modules used:
+C      
+
+C
+C     Declarations:
+C      
+C
+C
+C     Arguments      
+C
+      INTEGER :: tabvarsindic ! indice of the variable in tabvars
+      INTEGER :: Value
+C
+C     Begin 
+C
+      Agrif_Curgrid % parent % tabvars(tabvarsindic) % 
+     &         var % iarray0 = value
+C
+C
+      End Subroutine Agrif_Set_parent_int
+C
+C
+C     **************************************************************************
+CCC   Subroutine Agrif_Set_parent_real
+C     **************************************************************************
+C 
+      Subroutine Agrif_Set_parent_real(tabvarsindic,value)
+C
+CCC   Description:
+CCC   To set the TYPE of the variable.
+C
+C     Modules used:
+C      
+
+C
+C     Declarations:
+C      
+C
+C
+C     Arguments      
+C
+      INTEGER :: tabvarsindic ! indice of the variable in tabvars
+      REAL :: Value
+C
+C     Begin 
+C
+      Agrif_Curgrid % parent % tabvars(tabvarsindic) % 
+     &          var % array0 = value
+C
+C
+      End Subroutine Agrif_Set_parent_real
+C
+C
+C
+C     **************************************************************************
+CCC   Subroutine Agrif_Set_raf
+C     **************************************************************************
+C 
+      Subroutine Agrif_Set_raf(tabvarsindic,tabraf)
+C
+CCC   Description:
+CCC   Attention tabraf est de taille trois si on ne raffine pas suivant z la
+CCC             troisieme entree du tableau tabraf est 'N'
+C
+C     Modules used:
+C      
+
+C
+C     Declarations:
+C      
+C     Arguments      
+C
+      CHARACTER(*) ,DIMENSION(:) :: tabraf
+C
+      INTEGER :: tabvarsindic ! indice of the variable in tabvars
+      INTEGER :: dimensio ! DIMENSION of the variable
+      INTEGER :: i
+C
+C
+C     Begin 
+C
+      dimensio = Agrif_Mygrid % tabvars(tabvarsindic) %var % nbdim
+C        
+      if (.not.associated(Agrif_Mygrid % tabvars(tabvarsindic)
+     &                                 %var % interptab)) then 
+      Allocate(
+     & Agrif_Mygrid % tabvars(tabvarsindic)%var% interptab(dimensio))
+      endif
+
+      do i = 1 , dimensio
+         Agrif_Mygrid % tabvars(tabvarsindic) %var % interptab(i) 
+     &                 = TRIM(tabraf(i))
+      enddo
+C
+      End Subroutine Agrif_Set_raf
+C
+C
+C
+C     **************************************************************************
+CCC   Subroutine Agrif_Set_bc
+C     **************************************************************************
+C 
+      Subroutine Agrif_Set_bc(tabvarsindic,point,
+     &          Interpolationshouldbemade)
+C
+CCC   Description:
+CCC
+C
+C     Modules used:
+C      
+
+C
+C     Declarations:
+C      
+C     Arguments      
+C
+      INTEGER, DIMENSION(2) :: point
+      LOGICAL, OPTIONAL :: Interpolationshouldbemade
+C
+      INTEGER :: tabvarsindic, indic ! indice of the variable in tabvars
+      TYPE(Agrif_PVariable),Pointer ::tabvars
+      
+    
+C
+C
+C     Begin 
+C
+C     
+
+      indic = tabvarsindic
+      if (tabvarsindic >=0) then
+        if (agrif_curgrid%tabvars(tabvarsindic)%var%nbdim == 0) then
+          indic = agrif_curgrid%tabvars(tabvarsindic)%var%iarray0
+        endif
+      endif
+      
+      if (indic <=0) then
+      tabvars => Agrif_Search_Variable(Agrif_Curgrid,-indic)
+      else
+      tabvars=>Agrif_Curgrid % tabvars(indic)
+      endif  
+      
+      if (Agrif_Curgrid % fixedrank .NE. 0) then  
+       IF (.Not.Associated(tabvars%var% interpIndex)) THEN
+        Allocate(tabvars%var % interpIndex)
+          tabvars%var % interpIndex = -1
+
+        Allocate(tabvars%var % oldvalues2D(2,1))
+          tabvars%var % oldvalues2D = 0. 
+       ENDIF      
+       if ( PRESENT(Interpolationshouldbemade) ) then
+         tabvars%var %
+     &     Interpolationshouldbemade = Interpolationshouldbemade
+       endif
+
+      endif
+C
+      tabvars%var % bcinf = point(1)
+      tabvars%var % bcsup = point(2)
+C
+      End Subroutine Agrif_Set_bc
+C
+C
+C     **************************************************************************
+CCC   Subroutine Agrif_Set_interp
+C     **************************************************************************
+C 
+      Subroutine Agrif_Set_interp(tabvarsindic,interp,interp1,interp2,
+     &                interp3)
+C
+CCC   Description:
+C
+C     Declarations:
+C      
+C     Arguments      
+C
+      INTEGER, OPTIONAL      :: interp,interp1,interp2,interp3
+C
+      INTEGER :: tabvarsindic, indic ! indice of the variable in tabvars
+      TYPE(Agrif_PVariable),Pointer ::tabvars
+      
+    
+C
+C
+C     Begin 
+C
+C     
+      indic = tabvarsindic
+      if (tabvarsindic >=0) then
+        if (agrif_curgrid%tabvars(tabvarsindic)%var%nbdim == 0) then
+          indic = agrif_curgrid%tabvars(tabvarsindic)%var%iarray0
+        endif
+      endif 
+      
+      if (indic <=0) then
+      tabvars => Agrif_Search_Variable(Agrif_Mygrid,-indic)
+      else
+      tabvars=>Agrif_Mygrid % tabvars(indic)
+      endif      
+C
+C     Begin 
+C
+      tabvars % var % Typeinterp = 
+     &    Agrif_Constant
+      IF (present(interp)) THEN
+      tabvars % var % Typeinterp = 
+     &           interp
+      ENDIF
+      IF (present(interp1)) THEN
+      tabvars % var % Typeinterp(1) = 
+     &           interp1
+      ENDIF
+      IF (present(interp2)) THEN
+      tabvars % var % Typeinterp(2) = 
+     &           interp2
+      ENDIF
+      IF (present(interp3)) THEN
+      tabvars % var % Typeinterp(3) = 
+     &           interp3
+      ENDIF
+C
+      End Subroutine Agrif_Set_interp
+C
+C     **************************************************************************
+CCC   Subroutine Agrif_Set_bcinterp
+C     **************************************************************************
+C 
+      Subroutine Agrif_Set_bcinterp(tabvarsindic,interp,interp1,
+     &      interp2,interp3,interp11,interp12,interp21,interp22)
+C
+CCC   Description:
+
+C
+C     Modules used:
+C      
+
+C
+C     Declarations:
+C      
+C     Arguments      
+C
+      INTEGER, OPTIONAL      :: interp,interp1,interp2,interp3
+      INTEGER, OPTIONAL      :: interp11,interp12,interp21,interp22
+C
+      INTEGER :: tabvarsindic, indic ! indice of the variable in tabvars
+      TYPE(Agrif_PVariable),Pointer ::tabvars
+      
+    
+C
+C
+C     Begin 
+C
+C     
+
+      indic = tabvarsindic
+      if (tabvarsindic >=0) then
+        if (agrif_curgrid%tabvars(tabvarsindic)%var%nbdim == 0) then
+          indic = agrif_curgrid%tabvars(tabvarsindic)%var%iarray0
+        endif
+      endif 
+      
+      if (indic <=0) then
+      tabvars => Agrif_Search_Variable(Agrif_Mygrid,-indic)
+      else
+      tabvars=>Agrif_Mygrid % tabvars(indic)
+      endif 
+C
+      tabvars% var % bctypeinterp = 
+     &           Agrif_Constant   
+      IF (present(interp)) THEN
+      tabvars% var % bctypeinterp = 
+     &           interp
+      ENDIF       
+      IF (present(interp1)) THEN
+      tabvars% var % bctypeinterp(1:2,1) = 
+     &           interp1
+      ENDIF       
+      IF (present(interp11)) THEN
+      tabvars% var % bctypeinterp(1,1) = 
+     &           interp11
+      ENDIF
+      IF (present(interp12)) THEN
+      tabvars% var % bctypeinterp(1,2) = 
+     &           interp12
+      ENDIF          
+      IF (present(interp2)) THEN
+      tabvars% var % bctypeinterp(1:2,2) = 
+     &           interp2
+      ENDIF
+      IF (present(interp21)) THEN
+      tabvars% var % bctypeinterp(2,1) = 
+     &           interp21
+      ENDIF      
+      IF (present(interp22)) THEN
+      tabvars% var % bctypeinterp(2,2) = 
+     &           interp22
+      ENDIF            
+      IF (present(interp3)) THEN
+      tabvars% var % bctypeinterp(1:2,3) =
+     &           interp3
+      ENDIF
+C
+      End Subroutine Agrif_Set_bcinterp
+C
+C
+C     **************************************************************************
+CCC   Subroutine Agrif_Set_Update
+C     **************************************************************************
+C 
+      Subroutine Agrif_Set_Update(tabvarsindic,point)
+C
+CCC   Description:
+CCC
+C
+C     Modules used:
+C      
+
+C
+C     Declarations:
+C      
+C     Arguments      
+C
+      INTEGER, DIMENSION(2) :: point
+C
+      INTEGER :: tabvarsindic ! indice of the variable in tabvars
+C
+C
+C     Begin 
+C
+      Agrif_Curgrid%tabvars(tabvarsindic)%var % updateinf = point(1)
+      Agrif_Curgrid%tabvars(tabvarsindic)%var % updatesup = point(2)
+C
+      End Subroutine Agrif_Set_Update
+C
+C
+C
+C     **************************************************************************
+CCC   Subroutine Agrif_Set_UpdateType
+C     **************************************************************************
+C 
+      Subroutine Agrif_Set_UpdateType(tabvarsindic,
+     &                                  update,update1,update2,
+     &                                  update3,update4,update5)
+C
+CCC   Description:
+
+C
+C     Modules used:
+C      
+
+C
+C     Declarations:
+C      
+C     Arguments      
+C
+      INTEGER, OPTIONAL           :: update, update1,
+     &       update2, update3,update4,update5
+C
+      INTEGER :: tabvarsindic,indic ! indice of the variable in tabvars
+      TYPE(Agrif_PVariable),Pointer :: roottabvars      
+C
+C
+C     Begin 
+
+      indic = tabvarsindic
+
+      if (tabvarsindic >=0) then
+        if (agrif_curgrid%tabvars(tabvarsindic)%var%nbdim == 0) then
+          indic = agrif_curgrid%tabvars(tabvarsindic)%var%iarray0
+        endif
+      endif 
+      
+      if (indic <=0) then
+      roottabvars => Agrif_Search_Variable(Agrif_Mygrid,-indic)      
+      else
+      roottabvars => Agrif_Mygrid % tabvars(indic)
+      endif
+      
+C
+      roottabvars% var % typeupdate = 
+     &                   Agrif_Update_Copy
+      
+      IF (present(update)) THEN
+        roottabvars% var % typeupdate = 
+     &           update
+      ENDIF
+      IF (present(update1)) THEN
+        roottabvars% var % typeupdate(1) = 
+     &           update1
+      ENDIF  
+      IF (present(update2)) THEN
+        roottabvars% var % typeupdate(2) = 
+     &           update2
+      ENDIF  
+      IF (present(update3)) THEN
+        roottabvars% var % typeupdate(3) = 
+     &           update3
+      ENDIF 
+      IF (present(update4)) THEN
+        roottabvars% var % typeupdate(4) = 
+     &           update4
+      ENDIF       
+      IF (present(update5)) THEN
+        roottabvars% var % typeupdate(5) = 
+     &           update5
+      ENDIF                  
+C
+      End Subroutine Agrif_Set_UpdateType           
+C
+C
+C     **************************************************************************
+CCC   Subroutine Agrif_Set_restore
+C     **************************************************************************
+C 
+      Subroutine Agrif_Set_restore(tabvarsindic)
+C
+CCC   Description:
+CCC   
+C
+C     Modules used:
+C      
+
+C
+C     Declarations:
+C      
+C     Arguments      
+C
+      INTEGER :: tabvarsindic,indic ! indice of the variable in tabvars
+C
+C     Begin 
+C
+      indic = tabvarsindic
+      if (tabvarsindic >=0) then
+        if (agrif_curgrid%tabvars(tabvarsindic)%var%nbdim == 0) then
+          indic = agrif_curgrid%tabvars(tabvarsindic)%var%iarray0
+        endif
+      endif  
+C
+      Agrif_Mygrid%tabvars(indic)%var % restaure = .TRUE.
+C
+      End Subroutine Agrif_Set_restore
+C
+C
+C     **************************************************************************
+CCC   Subroutine Agrif_Init_variable0d
+C     **************************************************************************
+      Subroutine Agrif_Init_variable0d(tabvarsindic0,tabvarsindic,
+     &        procname)
+
+      INTEGER :: tabvarsindic0 ! indice of the variable in tabvars
+      INTEGER :: tabvarsindic,indic ! indice of the variable in tabvars
+      External :: procname
+      Optional ::  procname
+C
+      if (Agrif_Root()) Return
+C      
+      indic = tabvarsindic
+      if (tabvarsindic >=0) then
+        if (agrif_curgrid%tabvars(tabvarsindic)%var%nbdim == 0) then
+          indic = agrif_curgrid%tabvars(tabvarsindic)%var%iarray0
+        endif
+      endif 
+      
+      if (present(procname)) then
+      CALL Agrif_Interp_variable(tabvarsindic0,indic,procname)
+      CALL Agrif_Bc_variable(tabvarsindic0,indic,1.,procname)
+      else
+      CALL Agrif_Interp_variable(tabvarsindic0,indic)
+      CALL Agrif_Bc_variable(tabvarsindic0,indic,1.)
+      endif
+
+      End Subroutine Agrif_Init_variable0d
+C
+C
+C     **************************************************************************
+CCC   Subroutine Agrif_Init_variable1d
+C     **************************************************************************
+      Subroutine Agrif_Init_variable1d(q,tabvarsindic,procname)
+
+      REAL, DIMENSION(:) :: q
+      INTEGER :: tabvarsindic, indic ! indice of the variable in tabvars
+      External :: procname
+      Optional ::  procname
+
+C
+      if (Agrif_Root()) Return
+C      
+      indic = tabvarsindic
+      if (tabvarsindic >=0) then
+        if (agrif_curgrid%tabvars(tabvarsindic)%var%nbdim == 0) then
+          indic = agrif_curgrid%tabvars(tabvarsindic)%var%iarray0
+        endif
+      endif      
+C
+      if (present(procname)) then
+      CALL Agrif_Interp_variable(q,indic,procname)
+      CALL Agrif_Bc_variable(q,indic,1.,procname)
+      else
+      CALL Agrif_Interp_variable(q,indic)
+      CALL Agrif_Bc_variable(q,indic,1.)
+      endif
+
+      End Subroutine Agrif_Init_variable1d
+C
+C     **************************************************************************
+CCC   Subroutine Agrif_Init_variable2d
+C     **************************************************************************
+      Subroutine Agrif_Init_variable2d(q,tabvarsindic,procname)
+
+      REAL,  DIMENSION(:,:) :: q
+      INTEGER :: tabvarsindic ! indice of the variable in tabvars
+      External :: procname
+      Optional ::  procname
+      integer :: indic
+
+C
+      if (Agrif_Root()) Return
+C
+      indic = tabvarsindic
+      if (tabvarsindic >=0) then
+        if (agrif_curgrid%tabvars(tabvarsindic)%var%nbdim == 0) then
+          indic = agrif_curgrid%tabvars(tabvarsindic)%var%iarray0
+        endif
+      endif 
+      
+      if (present(procname)) then
+      CALL Agrif_Interp_variable(q,indic,procname)
+      CALL Agrif_Bc_variable(q,indic,1.,procname)
+      else
+      CALL Agrif_Interp_variable(q,indic)
+      CALL Agrif_Bc_variable(q,indic,1.)
+      endif
+
+
+      End Subroutine Agrif_Init_variable2d
+C
+C
+C     **************************************************************************
+CCC   Subroutine Agrif_Init_variable3d
+C     **************************************************************************
+      Subroutine Agrif_Init_variable3d(q,tabvarsindic,procname)
+
+      REAL,  DIMENSION(:,:,:) :: q
+      INTEGER :: tabvarsindic,indic ! indice of the variable in tabvars
+      External :: procname
+      Optional ::  procname
+C
+      if (Agrif_Root()) Return
+C      
+      indic = tabvarsindic
+      if (tabvarsindic >=0) then
+        if (agrif_curgrid%tabvars(tabvarsindic)%var%nbdim == 0) then
+          indic = agrif_curgrid%tabvars(tabvarsindic)%var%iarray0
+        endif
+      endif      
+C
+      if (present(procname)) then
+      CALL Agrif_Interp_variable(q,indic,procname)
+      CALL Agrif_Bc_variable(q,indic,1.,procname)
+      else
+      CALL Agrif_Interp_variable(q,indic)
+      CALL Agrif_Bc_variable(q,indic,1.)
+      endif
+
+C
+      End Subroutine Agrif_Init_variable3d
+C
+C
+C     **************************************************************************
+CCC   Subroutine Agrif_Init_variable4d
+C     **************************************************************************
+      Subroutine Agrif_Init_variable4d(q,tabvarsindic,procname)
+
+      REAL,  DIMENSION(:,:,:,:) :: q
+      INTEGER :: tabvarsindic, indic ! indice of the variable in tabvars
+      External :: procname
+      Optional ::  procname
+C
+      if (Agrif_Root()) Return
+C      
+      indic = tabvarsindic
+      if (tabvarsindic >=0) then
+        if (agrif_curgrid%tabvars(tabvarsindic)%var%nbdim == 0) then
+          indic = agrif_curgrid%tabvars(tabvarsindic)%var%iarray0
+        endif
+      endif       
+C
+      if (present(procname)) then
+      CALL Agrif_Interp_variable(q,indic,procname)
+      CALL Agrif_Bc_variable(q,indic,1.,procname)
+      else
+      CALL Agrif_Interp_variable(q,indic)
+      CALL Agrif_Bc_variable(q,indic,1.)
+      endif
+
+C
+      End Subroutine Agrif_Init_variable4d      
+C
+C
+C     **************************************************************************
+CCC   Subroutine Agrif_Bc_variable0d
+C     **************************************************************************
+      Subroutine Agrif_Bc_variable0d(tabvarsindic0,tabvarsindic,
+     &                               calledweight,procname)
+
+      INTEGER :: tabvarsindic0 ! indice of the variable in tabvars
+      INTEGER :: tabvarsindic ! indice of the variable in tabvars
+C        
+      External :: procname
+      Optional ::  procname
+      REAL, OPTIONAL :: calledweight
+      REAL    :: weight
+      LOGICAL :: pweight
+C
+      INTEGER :: dimensio      
+
+      if (Agrif_Root()) Return
+C
+      dimensio =  Agrif_Mygrid % tabvars(tabvarsindic) % var % nbdim    
+C
+      if ( PRESENT(calledweight) ) then
+        weight=calledweight      
+        pweight = .TRUE.
+      else
+        weight = 0.
+        pweight = .FALSE.
+      endif
+C      
+C
+
+      
+      if ( dimensio .EQ. 1 ) Call Agrif_Interp_Bc_1D(
+     & Agrif_Mygrid % tabvars(tabvarsindic) % var % bctypeinterp,
+     & Agrif_Curgrid % parent % tabvars(tabvarsindic),
+     & Agrif_Curgrid % tabvars(tabvarsindic),
+     & Agrif_Curgrid % tabvars(tabvarsindic0) %var % array1,
+     & Agrif_Curgrid % tabvars(tabvarsindic) % var % bcinf,
+     & Agrif_Curgrid % tabvars(tabvarsindic) % var % bcsup,
+     & weight,
+     & pweight)
+C
+      if ( dimensio .EQ. 2 ) then
+      IF (present(procname)) THEN
+      Call Agrif_Interp_Bc_2D(
+     & Agrif_Mygrid % tabvars(tabvarsindic) % var % bctypeinterp,
+     & Agrif_Curgrid % parent % tabvars(tabvarsindic),
+     & Agrif_Curgrid % tabvars(tabvarsindic),
+     & Agrif_Curgrid % tabvars(tabvarsindic0) %var % array2,
+     & Agrif_Curgrid % tabvars(tabvarsindic) % var % bcinf,
+     & Agrif_Curgrid % tabvars(tabvarsindic) % var % bcsup,
+     & weight,pweight,procname)
+      ELSE
+          
+      Call Agrif_Interp_Bc_2D(
+     & Agrif_Mygrid % tabvars(tabvarsindic) % var % bctypeinterp,
+     & Agrif_Curgrid % parent % tabvars(tabvarsindic),
+     & Agrif_Curgrid % tabvars(tabvarsindic),
+     & Agrif_Curgrid % tabvars(tabvarsindic0) %var % array2,
+     & Agrif_Curgrid % tabvars(tabvarsindic) % var % bcinf,
+     & Agrif_Curgrid % tabvars(tabvarsindic) % var % bcsup,
+     & weight,pweight)
+      ENDIF
+      endif
+C
+      if ( dimensio .EQ. 3 ) then
+      IF (present(procname)) THEN
+
+      Call Agrif_Interp_Bc_3D(
+     & Agrif_Mygrid % tabvars(tabvarsindic) % var % bctypeinterp,
+     & Agrif_Curgrid % parent % tabvars(tabvarsindic),
+     & Agrif_Curgrid % tabvars(tabvarsindic),
+     & Agrif_Curgrid % tabvars(tabvarsindic0) %var % array3,
+     & Agrif_Curgrid % tabvars(tabvarsindic) % var % bcinf,
+     & Agrif_Curgrid % tabvars(tabvarsindic) % var % bcsup,
+     & weight,pweight,procname)      
+      ELSE
+      Call Agrif_Interp_Bc_3D(
+     & Agrif_Mygrid % tabvars(tabvarsindic) % var % bctypeinterp,
+     & Agrif_Curgrid % parent % tabvars(tabvarsindic),
+     & Agrif_Curgrid % tabvars(tabvarsindic),
+     & Agrif_Curgrid % tabvars(tabvarsindic0) %var % array3,
+     & Agrif_Curgrid % tabvars(tabvarsindic) % var % bcinf,
+     & Agrif_Curgrid % tabvars(tabvarsindic) % var % bcsup,
+     & weight,pweight)
+      ENDIF
+      endif
+C
+      if ( dimensio .EQ. 4 ) then
+      IF (present(procname)) THEN
+      Call Agrif_Interp_Bc_4D(
+     & Agrif_Mygrid % tabvars(tabvarsindic) % var % bctypeinterp,
+     & Agrif_Curgrid % parent % tabvars(tabvarsindic),
+     & Agrif_Curgrid % tabvars(tabvarsindic),
+     & Agrif_Curgrid % tabvars(tabvarsindic0) %var % array4,     
+     & Agrif_Curgrid % tabvars(tabvarsindic) % var % bcinf,
+     & Agrif_Curgrid % tabvars(tabvarsindic) % var % bcsup,
+     & weight,pweight,procname)      
+      ELSE
+      Call Agrif_Interp_Bc_4D(
+     & Agrif_Mygrid % tabvars(tabvarsindic) % var % bctypeinterp,
+     & Agrif_Curgrid % parent % tabvars(tabvarsindic),
+     & Agrif_Curgrid % tabvars(tabvarsindic),
+     & Agrif_Curgrid % tabvars(tabvarsindic0) %var % array4,     
+     & Agrif_Curgrid % tabvars(tabvarsindic) % var % bcinf,
+     & Agrif_Curgrid % tabvars(tabvarsindic) % var % bcsup,
+     & weight,pweight)
+      ENDIF
+      endif
+C
+      if ( dimensio .EQ. 5 ) then
+      IF (present(procname)) THEN
+      Call Agrif_Interp_Bc_5D(
+     & Agrif_Mygrid % tabvars(tabvarsindic) % var % bctypeinterp,
+     & Agrif_Curgrid % parent % tabvars(tabvarsindic),
+     & Agrif_Curgrid % tabvars(tabvarsindic),
+     & Agrif_Curgrid % tabvars(tabvarsindic0) %var % array5,
+     & Agrif_Curgrid % tabvars(tabvarsindic) % var % bcinf,
+     & Agrif_Curgrid % tabvars(tabvarsindic) % var % bcsup,
+     & weight,pweight,procname)      
+      ELSE
+      Call Agrif_Interp_Bc_5D(
+     & Agrif_Mygrid % tabvars(tabvarsindic) % var % bctypeinterp,
+     & Agrif_Curgrid % parent % tabvars(tabvarsindic),
+     & Agrif_Curgrid % tabvars(tabvarsindic),
+     & Agrif_Curgrid % tabvars(tabvarsindic0) %var % array5,
+     & Agrif_Curgrid % tabvars(tabvarsindic) % var % bcinf,
+     & Agrif_Curgrid % tabvars(tabvarsindic) % var % bcsup,
+     & weight,pweight)
+      ENDIF
+      endif
+C
+      if ( dimensio .EQ. 6 ) Call Agrif_Interp_Bc_6D(
+     & Agrif_Mygrid % tabvars(tabvarsindic) % var % bctypeinterp,
+     & Agrif_Curgrid % parent % tabvars(tabvarsindic),
+     & Agrif_Curgrid % tabvars(tabvarsindic),
+     & Agrif_Curgrid % tabvars(tabvarsindic0) %var % array6,
+     & Agrif_Curgrid % tabvars(tabvarsindic) % var % bcinf,
+     & Agrif_Curgrid % tabvars(tabvarsindic) % var % bcsup,
+     & weight,
+     & pweight)
+C
+C
+      End Subroutine Agrif_Bc_variable0d
+C
+C
+C     **************************************************************************
+CCC   Subroutine Agrif_Bc_variable1d
+C     **************************************************************************
+      Subroutine Agrif_Bc_variable1d(q,tabvarsindic,calledweight,
+     &                               procname)
+
+      REAL   , Dimension(:)          :: q
+      External :: procname
+      Optional ::  procname
+      INTEGER :: tabvarsindic, indic ! indice of the variable in tabvars
+C        
+      REAL, OPTIONAL :: calledweight
+      REAL    :: weight
+      LOGICAL :: pweight
+      TYPE(Agrif_PVariable),Pointer ::tabvars,parenttabvars,roottabvars
+C
+C      
+C      
+      If (Agrif_Root()) Return
+C      
+      indic = tabvarsindic
+      if (tabvarsindic >=0) then
+        if (agrif_curgrid%tabvars(tabvarsindic)%var%nbdim == 0) then
+          indic = agrif_curgrid%tabvars(tabvarsindic)%var%iarray0
+        endif
+      endif         
+      
+      if ( PRESENT(calledweight) ) then
+        weight=calledweight      
+        pweight = .TRUE.
+      else
+        weight = 0.
+        pweight = .FALSE.
+      endif
+      
+      if (indic <=0) then
+      tabvars => Agrif_Search_Variable(Agrif_Curgrid,-indic)
+      parenttabvars => tabvars%parent_var
+      roottabvars => Agrif_Search_Variable(Agrif_Mygrid,-indic)
+      else
+      tabvars=>Agrif_Curgrid % tabvars(indic)
+      parenttabvars => Agrif_Curgrid % parent % tabvars(indic)
+      roottabvars => Agrif_Mygrid % tabvars(indic)
+      endif
+            
+      IF (present(procname)) THEN
+      Call Agrif_Interp_Bc_1D(
+     & roottabvars % var % bctypeinterp,
+     & parenttabvars,
+     & tabvars,q,
+     & tabvars % var % bcinf,
+     & tabvars % var % bcsup,
+     & weight,pweight,procname)      
+      ELSE
+      Call Agrif_Interp_Bc_1D(
+     & roottabvars % var % bctypeinterp,
+     & parenttabvars,
+     & tabvars,q,
+     & tabvars % var % bcinf,
+     & tabvars % var % bcsup,
+     & weight,pweight)
+      ENDIF
+      End Subroutine Agrif_Bc_variable1d 
+      
+C
+C     **************************************************************************
+CCC   Subroutine Agrif_Bc_variable2d
+C     **************************************************************************
+      Subroutine Agrif_Bc_variable2d(q,tabvarsindic,calledweight,
+     &                               procname)
+
+      REAL   , Dimension(:,:)          :: q
+      External :: procname
+      Optional ::  procname
+      INTEGER :: tabvarsindic, indic ! indice of the variable in tabvars
+C        
+      REAL, OPTIONAL :: calledweight
+      REAL    :: weight
+      LOGICAL :: pweight
+      TYPE(Agrif_PVariable),Pointer ::tabvars,parenttabvars,roottabvars
+C
+C      
+C      
+      If (Agrif_Root()) Return
+C      
+      indic = tabvarsindic
+      if (tabvarsindic >=0) then
+        if (agrif_curgrid%tabvars(tabvarsindic)%var%nbdim == 0) then
+          indic = agrif_curgrid%tabvars(tabvarsindic)%var%iarray0
+        endif
+      endif       
+      
+      if ( PRESENT(calledweight) ) then
+        weight=calledweight      
+        pweight = .TRUE.
+      else
+        weight = 0.
+        pweight = .FALSE.
+      endif
+      
+      if (indic <=0) then
+      tabvars => Agrif_Search_Variable(Agrif_Curgrid,-indic)
+      parenttabvars => tabvars%parent_var
+      roottabvars => Agrif_Search_Variable(Agrif_Mygrid,-indic)
+      else
+      tabvars=>Agrif_Curgrid % tabvars(indic)
+      parenttabvars => Agrif_Curgrid % parent % tabvars(indic)
+      roottabvars => Agrif_Mygrid % tabvars(indic)
+      endif
+            
+      IF (present(procname)) THEN
+      Call Agrif_Interp_Bc_2D(
+     & roottabvars % var % bctypeinterp,
+     & parenttabvars,
+     & tabvars,q,
+     & tabvars % var % bcinf,
+     & tabvars % var % bcsup,
+     & weight,pweight,procname)      
+      ELSE
+      Call Agrif_Interp_Bc_2D(
+     & roottabvars % var % bctypeinterp,
+     & parenttabvars,
+     & tabvars,q,
+     & tabvars % var % bcinf,
+     & tabvars % var % bcsup,
+     & weight,pweight)
+      ENDIF
+      End Subroutine Agrif_Bc_variable2d
+            
+C
+C     **************************************************************************
+CCC   Subroutine Agrif_Bc_variable3d
+C     **************************************************************************
+      Subroutine Agrif_Bc_variable3d(q,tabvarsindic,calledweight,
+     &                               procname)
+
+      REAL   , Dimension(:,:,:)          :: q
+      External :: procname
+      Optional ::  procname
+      INTEGER :: tabvarsindic, indic ! indice of the variable in tabvars
+C        
+      REAL, OPTIONAL :: calledweight
+      REAL    :: weight
+      LOGICAL :: pweight
+      TYPE(Agrif_PVariable),Pointer ::tabvars,parenttabvars,roottabvars
+C
+C      
+C      
+      If (Agrif_Root()) Return
+C      
+      indic = tabvarsindic
+      if (tabvarsindic >=0) then
+        if (agrif_curgrid%tabvars(tabvarsindic)%var%nbdim == 0) then
+          indic = agrif_curgrid%tabvars(tabvarsindic)%var%iarray0
+        endif
+      endif       
+      
+      if ( PRESENT(calledweight) ) then
+        weight=calledweight      
+        pweight = .TRUE.
+      else
+        weight = 0.
+        pweight = .FALSE.
+      endif
+      
+      if (indic <=0) then
+      tabvars => Agrif_Search_Variable(Agrif_Curgrid,-indic)
+      parenttabvars => tabvars%parent_var
+      roottabvars => Agrif_Search_Variable(Agrif_Mygrid,-indic)
+      else
+      tabvars=>Agrif_Curgrid % tabvars(indic)
+      parenttabvars => Agrif_Curgrid % parent % tabvars(indic)
+      roottabvars => Agrif_Mygrid % tabvars(indic)
+      endif
+            
+      IF (present(procname)) THEN
+      Call Agrif_Interp_Bc_3D(
+     & roottabvars % var % bctypeinterp,
+     & parenttabvars,
+     & tabvars,q,
+     & tabvars % var % bcinf,
+     & tabvars % var % bcsup,
+     & weight,pweight,procname)      
+      ELSE
+      Call Agrif_Interp_Bc_3D(
+     & roottabvars % var % bctypeinterp,
+     & parenttabvars,
+     & tabvars,q,
+     & tabvars % var % bcinf,
+     & tabvars % var % bcsup,
+     & weight,pweight)
+      ENDIF
+      End Subroutine Agrif_Bc_variable3d
+      
+C
+C     **************************************************************************
+CCC   Subroutine Agrif_Bc_variable4d
+C     **************************************************************************
+      Subroutine Agrif_Bc_variable4d(q,tabvarsindic,calledweight,
+     &                               procname)
+
+      REAL   , Dimension(:,:,:,:)          :: q
+      External :: procname
+      Optional ::  procname
+      INTEGER :: tabvarsindic, indic ! indice of the variable in tabvars
+C        
+      REAL, OPTIONAL :: calledweight
+      REAL    :: weight
+      LOGICAL :: pweight
+      TYPE(Agrif_PVariable),Pointer ::tabvars,parenttabvars,roottabvars
+C
+C      
+C      
+      If (Agrif_Root()) Return
+      
+C      
+      indic = tabvarsindic
+      if (tabvarsindic >=0) then
+        if (agrif_curgrid%tabvars(tabvarsindic)%var%nbdim == 0) then
+          indic = agrif_curgrid%tabvars(tabvarsindic)%var%iarray0
+        endif
+      endif      
+      
+      if ( PRESENT(calledweight) ) then
+        weight=calledweight      
+        pweight = .TRUE.
+      else
+        weight = 0.
+        pweight = .FALSE.
+      endif
+      
+      if (indic <=0) then
+      tabvars => Agrif_Search_Variable(Agrif_Curgrid,-indic)
+      parenttabvars => tabvars%parent_var
+      roottabvars => Agrif_Search_Variable(Agrif_Mygrid,-indic)
+      else
+      tabvars=>Agrif_Curgrid % tabvars(indic)
+      parenttabvars => Agrif_Curgrid % parent % tabvars(indic)
+      roottabvars => Agrif_Mygrid % tabvars(indic)
+      endif
+            
+      IF (present(procname)) THEN
+      Call Agrif_Interp_Bc_4D(
+     & roottabvars % var % bctypeinterp,
+     & parenttabvars,
+     & tabvars,q,
+     & tabvars % var % bcinf,
+     & tabvars % var % bcsup,
+     & weight,pweight,procname)      
+      ELSE
+      Call Agrif_Interp_Bc_4D(
+     & roottabvars % var % bctypeinterp,
+     & parenttabvars,
+     & tabvars,q,
+     & tabvars % var % bcinf,
+     & tabvars % var % bcsup,
+     & weight,pweight)
+      ENDIF
+      End Subroutine Agrif_Bc_variable4d
+            
+C
+C     **************************************************************************
+CCC   Subroutine Agrif_Bc_variable5d
+C     **************************************************************************
+      Subroutine Agrif_Bc_variable5d(q,tabvarsindic,calledweight,
+     &                               procname)
+
+      REAL   , Dimension(:,:,:,:,:)          :: q
+      External :: procname
+      Optional ::  procname
+      INTEGER :: tabvarsindic, indic ! indice of the variable in tabvars
+C        
+      REAL, OPTIONAL :: calledweight
+      REAL    :: weight
+      LOGICAL :: pweight
+      TYPE(Agrif_PVariable),Pointer ::tabvars,parenttabvars,roottabvars
+C
+C      
+C      
+      If (Agrif_Root()) Return
+C      
+      indic = tabvarsindic
+      if (tabvarsindic >=0) then
+        if (agrif_curgrid%tabvars(tabvarsindic)%var%nbdim == 0) then
+          indic = agrif_curgrid%tabvars(tabvarsindic)%var%iarray0
+        endif
+      endif      
+      
+      if ( PRESENT(calledweight) ) then
+        weight=calledweight      
+        pweight = .TRUE.
+      else
+        weight = 0.
+        pweight = .FALSE.
+      endif
+      
+      if (indic <=0) then
+      tabvars => Agrif_Search_Variable(Agrif_Curgrid,-indic)
+      parenttabvars => tabvars%parent_var
+      roottabvars => Agrif_Search_Variable(Agrif_Mygrid,-indic)
+      else
+      tabvars=>Agrif_Curgrid % tabvars(indic)
+      parenttabvars => Agrif_Curgrid % parent % tabvars(indic)
+      roottabvars => Agrif_Mygrid % tabvars(indic)
+      endif
+            
+      IF (present(procname)) THEN
+      Call Agrif_Interp_Bc_5d(
+     & roottabvars % var % bctypeinterp,
+     & parenttabvars,
+     & tabvars,q,
+     & tabvars % var % bcinf,
+     & tabvars % var % bcsup,
+     & weight,pweight,procname)      
+      ELSE
+      Call Agrif_Interp_Bc_5d(
+     & roottabvars % var % bctypeinterp,
+     & parenttabvars,
+     & tabvars,q,
+     & tabvars % var % bcinf,
+     & tabvars % var % bcsup,
+     & weight,pweight)
+      ENDIF
+      End Subroutine Agrif_Bc_variable5d
+      
+C
+C     **************************************************************************
+CCC   Subroutine Agrif_Interp_var0D
+C     **************************************************************************
+C 
+      Subroutine Agrif_Interp_var0d(tabvarsindic0,tabvarsindic,procname)
+
+      INTEGER :: tabvarsindic0 ! indice of the variable in tabvars
+      INTEGER :: tabvarsindic, indic  ! indice of the variable in tabvars
+      INTEGER :: dimensio  ! indice of the variable in tabvars
+      External :: procname
+      Optional ::  procname
+C      
+      if (Agrif_Root()) Return
+C      
+      indic = tabvarsindic
+      if (tabvarsindic >=0) then
+        if (agrif_curgrid%tabvars(tabvarsindic)%var%nbdim == 0) then
+          indic = agrif_curgrid%tabvars(tabvarsindic)%var%iarray0
+        endif
+      endif       
+C     
+      dimensio = Agrif_Mygrid % tabvars(indic) % var % nbdim 
+C
+      if ( dimensio .EQ. 1 ) then
+       if (present(procname)) then
+       Call Agrif_Interp_1D(
+     & Agrif_Mygrid % tabvars(indic) % var %  TypeInterp,
+     & Agrif_Curgrid % parent % tabvars(indic),
+     & Agrif_Curgrid % tabvars(indic),
+     & Agrif_Curgrid % tabvars(tabvarsindic0) % var % array1 ,     
+     & Agrif_Mygrid % tabvars(indic) % var % restaure,
+     & Agrif_Mygrid % tabvars(indic) %var % nbdim,procname)
+       else
+       Call Agrif_Interp_1D(
+     & Agrif_Mygrid % tabvars(indic) % var %  TypeInterp,
+     & Agrif_Curgrid % parent % tabvars(indic),
+     & Agrif_Curgrid % tabvars(indic),
+     & Agrif_Curgrid % tabvars(tabvarsindic0) % var % array1 ,     
+     & Agrif_Mygrid % tabvars(indic) % var % restaure,
+     & Agrif_Mygrid % tabvars(indic) %var % nbdim)
+       endif
+       endif
+C
+      if ( dimensio .EQ. 2 ) then
+      if (present(procname)) then
+       Call Agrif_Interp_2D(
+     & Agrif_Mygrid % tabvars(indic) % var %  TypeInterp,
+     & Agrif_Curgrid % parent % tabvars(indic),
+     & Agrif_Curgrid % tabvars(indic),
+     & Agrif_Curgrid % tabvars(tabvarsindic0) % var % array2 ,     
+     & Agrif_Mygrid % tabvars(indic) % var % restaure,
+     & Agrif_Mygrid % tabvars(indic) %var % nbdim,procname)
+      else
+       Call Agrif_Interp_2D(
+     & Agrif_Mygrid % tabvars(indic) % var %  TypeInterp,
+     & Agrif_Curgrid % parent % tabvars(indic),
+     & Agrif_Curgrid % tabvars(indic),
+     & Agrif_Curgrid % tabvars(tabvarsindic0) % var % array2 ,     
+     & Agrif_Mygrid % tabvars(indic) % var % restaure,
+     & Agrif_Mygrid % tabvars(indic) %var % nbdim)
+      endif
+      endif
+C
+      if ( dimensio .EQ. 3 ) then
+      if (present(procname)) then
+       Call Agrif_Interp_3D(
+     & Agrif_Mygrid % tabvars(indic) % var %  TypeInterp,
+     & Agrif_Curgrid % parent % tabvars(indic),
+     & Agrif_Curgrid % tabvars(indic),
+     & Agrif_Curgrid % tabvars(tabvarsindic0) % var % array3 ,     
+     & Agrif_Mygrid % tabvars(indic) % var % restaure,
+     & Agrif_Mygrid % tabvars(indic) %var % nbdim,procname)
+      else
+       Call Agrif_Interp_3D(
+     & Agrif_Mygrid % tabvars(indic) % var %  TypeInterp,
+     & Agrif_Curgrid % parent % tabvars(indic),
+     & Agrif_Curgrid % tabvars(indic),
+     & Agrif_Curgrid % tabvars(tabvarsindic0) % var % array3 ,     
+     & Agrif_Mygrid % tabvars(indic) % var % restaure,
+     & Agrif_Mygrid % tabvars(indic) %var % nbdim)
+      endif
+      endif
+C
+      if ( dimensio .EQ. 4 ) then
+      if (present(procname)) then
+       Call Agrif_Interp_4D(
+     & Agrif_Mygrid % tabvars(indic) % var %  TypeInterp,
+     & Agrif_Curgrid % parent % tabvars(indic),
+     & Agrif_Curgrid % tabvars(indic),
+     & Agrif_Curgrid % tabvars(tabvarsindic0) % var % array4 ,     
+     & Agrif_Mygrid % tabvars(indic) % var % restaure,
+     & Agrif_Mygrid % tabvars(indic) %var % nbdim,procname)
+      else
+       Call Agrif_Interp_4D(
+     & Agrif_Mygrid % tabvars(indic) % var %  TypeInterp,
+     & Agrif_Curgrid % parent % tabvars(indic),
+     & Agrif_Curgrid % tabvars(indic),
+     & Agrif_Curgrid % tabvars(tabvarsindic0) % var % array4 ,     
+     & Agrif_Mygrid % tabvars(indic) % var % restaure,
+     & Agrif_Mygrid % tabvars(indic) %var % nbdim)
+      endif
+      endif
+C
+      if ( dimensio .EQ. 5 ) then
+      if (present(procname)) then
+       Call Agrif_Interp_5D(
+     & Agrif_Mygrid % tabvars(indic) % var %  TypeInterp,
+     & Agrif_Curgrid % parent % tabvars(indic),
+     & Agrif_Curgrid % tabvars(indic),
+     & Agrif_Curgrid % tabvars(tabvarsindic0) % var % array5 ,     
+     & Agrif_Mygrid % tabvars(indic) % var % restaure,
+     & Agrif_Mygrid % tabvars(indic) %var % nbdim,procname)
+      else
+       Call Agrif_Interp_5D(
+     & Agrif_Mygrid % tabvars(indic) % var %  TypeInterp,
+     & Agrif_Curgrid % parent % tabvars(indic),
+     & Agrif_Curgrid % tabvars(indic),
+     & Agrif_Curgrid % tabvars(tabvarsindic0) % var % array5 ,     
+     & Agrif_Mygrid % tabvars(indic) % var % restaure,
+     & Agrif_Mygrid % tabvars(indic) %var % nbdim)
+       endif
+       endif
+C
+      if ( dimensio .EQ. 6 ) then
+      if (present(procname)) then
+       Call Agrif_Interp_6D(
+     & Agrif_Mygrid % tabvars(indic) % var %  TypeInterp,
+     & Agrif_Curgrid % parent % tabvars(indic),
+     & Agrif_Curgrid % tabvars(indic),
+     & Agrif_Curgrid % tabvars(tabvarsindic0) % var % array6 ,     
+     & Agrif_Mygrid % tabvars(indic) % var % restaure,
+     & Agrif_Mygrid % tabvars(indic) %var % nbdim,procname)
+      else
+       Call Agrif_Interp_6D(
+     & Agrif_Mygrid % tabvars(indic) % var %  TypeInterp,
+     & Agrif_Curgrid % parent % tabvars(indic),
+     & Agrif_Curgrid % tabvars(indic),
+     & Agrif_Curgrid % tabvars(tabvarsindic0) % var % array6 ,     
+     & Agrif_Mygrid % tabvars(indic) % var % restaure,
+     & Agrif_Mygrid % tabvars(indic) %var % nbdim)
+      endif
+      endif
+C
+      Return
+      End Subroutine Agrif_Interp_var0d
+C
+C     **************************************************************************
+CCC   Subroutine Agrif_Interp_var1d
+C     **************************************************************************
+C 
+      Subroutine Agrif_Interp_var1d(q,tabvarsindic,procname)
+
+      REAL, DIMENSION(:) :: q
+      INTEGER :: tabvarsindic, indic ! indice of the variable in tabvars
+      External :: procname
+      Optional ::  procname
+      TYPE(Agrif_PVariable),Pointer ::tabvars,parenttabvars,roottabvars      
+C
+      if (Agrif_Root()) Return
+C      
+C      
+      indic = tabvarsindic
+      if (tabvarsindic >=0) then
+        if (agrif_curgrid%tabvars(tabvarsindic)%var%nbdim == 0) then
+          indic = agrif_curgrid%tabvars(tabvarsindic)%var%iarray0
+        endif
+      endif 
+      
+      if (indic <=0) then
+      tabvars => Agrif_Search_Variable(Agrif_Curgrid,-indic)
+      parenttabvars => tabvars%parent_var
+      roottabvars => Agrif_Search_Variable(Agrif_Mygrid,-indic)
+      else
+      tabvars=>Agrif_Curgrid % tabvars(indic)
+      parenttabvars => Agrif_Curgrid % parent % tabvars(indic)
+      roottabvars => Agrif_Mygrid % tabvars(indic)
+      endif
+      
+      if (present(procname)) then
+      Call Agrif_Interp_1D(
+     & roottabvars % var %  TypeInterp,
+     & parenttabvars,
+     & tabvars,q,
+     & roottabvars % var % restaure,
+     & roottabvars %var % nbdim,procname)
+      else
+      Call Agrif_Interp_1D(
+     & roottabvars % var %  TypeInterp,
+     & parenttabvars,
+     & tabvars,q,
+     & roottabvars % var % restaure,
+     & roottabvars %var % nbdim)
+     
+      endif
+      Return
+      End Subroutine Agrif_Interp_var1d
+C
+C     **************************************************************************
+CCC   Subroutine Agrif_Interp_var2d
+C     **************************************************************************
+C 
+      Subroutine Agrif_Interp_var2d(q,tabvarsindic,procname)
+
+      REAL,  DIMENSION(:,:) :: q
+      INTEGER :: tabvarsindic, indic ! indice of the variable in tabvars
+      External :: procname
+      Optional ::  procname
+      TYPE(Agrif_PVariable),Pointer ::tabvars,parenttabvars,roottabvars      
+C
+      if (Agrif_Root()) Return
+C      
+      indic = tabvarsindic
+      if (tabvarsindic >=0) then
+        if (agrif_curgrid%tabvars(tabvarsindic)%var%nbdim == 0) then
+          indic = agrif_curgrid%tabvars(tabvarsindic)%var%iarray0
+        endif
+      endif 
+      
+      if (indic <=0) then
+      tabvars => Agrif_Search_Variable(Agrif_Curgrid,-indic)
+      parenttabvars => tabvars%parent_var
+      roottabvars => Agrif_Search_Variable(Agrif_Mygrid,-indic)
+      if (tabvars%var%restaure) then
+        if (agrif_curgrid%ngridstep == 0) then
+          call AGRIF_CopyFromold_AllOneVar
+     &            (Agrif_Curgrid,Agrif_OldMygrid,indic)
+        endif
+      endif
+      else
+      tabvars=>Agrif_Curgrid % tabvars(indic)
+      parenttabvars => Agrif_Curgrid % parent % tabvars(indic)
+      roottabvars => Agrif_Mygrid % tabvars(indic)
+      endif
+
+            
+      if (present(procname)) then
+      Call Agrif_Interp_2D(
+     & roottabvars % var %  TypeInterp,
+     & parenttabvars,
+     & tabvars,q,
+     & roottabvars % var % restaure,
+     & roottabvars %var % nbdim,procname)
+      else
+      Call Agrif_Interp_2D(
+     & roottabvars % var %  TypeInterp,
+     & parenttabvars,
+     & tabvars,q,
+     & roottabvars % var % restaure,
+     & roottabvars %var % nbdim)
+     
+      endif 
+      Return
+      End Subroutine Agrif_Interp_var2d
+C
+C     **************************************************************************
+CCC   Subroutine Agrif_Interp_var3d
+C     **************************************************************************
+C 
+      Subroutine Agrif_Interp_var3d(q,tabvarsindic,procname)
+
+      REAL,  DIMENSION(:,:,:) :: q
+      INTEGER :: tabvarsindic, indic ! indice of the variable in tabvars
+      External :: procname
+      Optional ::  procname
+      TYPE(Agrif_PVariable),Pointer ::tabvars,parenttabvars,roottabvars      
+C
+      if (Agrif_Root()) Return
+C      
+
+      indic = tabvarsindic
+      if (tabvarsindic >=0) then
+        if (agrif_curgrid%tabvars(tabvarsindic)%var%nbdim == 0) then
+          indic = agrif_curgrid%tabvars(tabvarsindic)%var%iarray0
+        endif
+      endif 
+      
+      if (indic <=0) then
+      tabvars => Agrif_Search_Variable(Agrif_Curgrid,-indic)
+      parenttabvars => tabvars%parent_var
+      roottabvars => Agrif_Search_Variable(Agrif_Mygrid,-indic)
+      if (tabvars%var%restaure) then
+        if (agrif_curgrid%ngridstep == 0) then
+          call AGRIF_CopyFromold_AllOneVar
+     &            (Agrif_Curgrid,Agrif_OldMygrid,indic)
+        endif
+      endif      
+      else
+      tabvars=>Agrif_Curgrid % tabvars(indic)
+      parenttabvars => Agrif_Curgrid % parent % tabvars(indic)
+      roottabvars => Agrif_Mygrid % tabvars(indic)
+      endif
+
+      if (present(procname)) then
+      Call Agrif_Interp_3D(
+     & roottabvars % var %  TypeInterp,
+     & parenttabvars,
+     & tabvars,q,
+     & roottabvars % var % restaure,
+     & roottabvars %var % nbdim,procname)
+      else
+      Call Agrif_Interp_3D(
+     & roottabvars % var %  TypeInterp,
+     & parenttabvars,
+     & tabvars,q,
+     & roottabvars % var % restaure,
+     & roottabvars %var % nbdim)
+     
+      endif   
+      Return
+      End Subroutine Agrif_Interp_var3d
+C
+C     **************************************************************************
+CCC   Subroutine Agrif_Interp_var4d
+C     **************************************************************************
+C 
+      Subroutine Agrif_Interp_var4d(q,tabvarsindic,procname)
+
+      REAL,  DIMENSION(:,:,:,:) :: q
+      INTEGER :: tabvarsindic, indic ! indice of the variable in tabvars
+      External :: procname
+      Optional ::  procname
+      TYPE(Agrif_PVariable),Pointer ::tabvars,parenttabvars,roottabvars  
+C
+      if (Agrif_Root()) Return
+C      
+      indic = tabvarsindic
+      if (tabvarsindic >=0) then
+        if (agrif_curgrid%tabvars(tabvarsindic)%var%nbdim == 0) then
+          indic = agrif_curgrid%tabvars(tabvarsindic)%var%iarray0
+        endif
+      endif 
+      
+      if (indic <=0) then
+      tabvars => Agrif_Search_Variable(Agrif_Curgrid,-indic)
+      parenttabvars => tabvars%parent_var
+      roottabvars => Agrif_Search_Variable(Agrif_Mygrid,-indic)
+      if (tabvars%var%restaure) then
+        if (agrif_curgrid%ngridstep == 0) then
+          call AGRIF_CopyFromold_AllOneVar
+     &            (Agrif_Curgrid,Agrif_OldMygrid,indic)
+        endif
+      endif      
+      else
+      tabvars=>Agrif_Curgrid % tabvars(indic)
+      parenttabvars => Agrif_Curgrid % parent % tabvars(indic)
+      roottabvars => Agrif_Mygrid % tabvars(indic)
+      endif
+            
+      if (present(procname)) then
+      Call Agrif_Interp_4D(
+     & roottabvars % var %  TypeInterp,
+     & parenttabvars,
+     & tabvars,q,
+     & roottabvars % var % restaure,
+     & roottabvars %var % nbdim,procname)
+      else
+      Call Agrif_Interp_4D(
+     & roottabvars % var %  TypeInterp,
+     & parenttabvars,
+     & tabvars,q,
+     & roottabvars % var % restaure,
+     & roottabvars %var % nbdim)
+     
+      endif      
+
+      Return
+      End Subroutine Agrif_Interp_var4d     
+C
+C     **************************************************************************
+CCC   Subroutine Agrif_Interp_var5d
+C     **************************************************************************
+C 
+      Subroutine Agrif_Interp_var5d(q,tabvarsindic,procname)
+
+      REAL,  DIMENSION(:,:,:,:,:) :: q
+      INTEGER :: tabvarsindic, indic ! indice of the variable in tabvars
+      External :: procname
+      Optional ::  procname
+      TYPE(Agrif_PVariable),Pointer ::tabvars,parenttabvars,roottabvars      
+C
+      if (Agrif_Root()) Return
+C      
+
+      indic = tabvarsindic
+      if (tabvarsindic >=0) then
+        if (agrif_curgrid%tabvars(tabvarsindic)%var%nbdim == 0) then
+          indic = agrif_curgrid%tabvars(tabvarsindic)%var%iarray0
+        endif
+      endif 
+      
+      if (indic <=0) then
+      tabvars => Agrif_Search_Variable(Agrif_Curgrid,-indic)
+      parenttabvars => tabvars%parent_var
+      roottabvars => Agrif_Search_Variable(Agrif_Mygrid,-indic)
+      else
+      tabvars=>Agrif_Curgrid % tabvars(indic)
+      parenttabvars => Agrif_Curgrid % parent % tabvars(indic)
+      roottabvars => Agrif_Mygrid % tabvars(indic)
+      endif
+      
+      if (present(procname)) then
+      Call Agrif_Interp_5D(
+     & roottabvars % var %  TypeInterp,
+     & parenttabvars,
+     & tabvars,q,
+     & roottabvars % var % restaure,
+     & roottabvars %var % nbdim,procname)
+      else
+      Call Agrif_Interp_5D(
+     & roottabvars % var %  TypeInterp,
+     & parenttabvars,
+     & tabvars,q,
+     & roottabvars % var % restaure,
+     & roottabvars %var % nbdim)
+     
+      endif
+      Return
+      End Subroutine Agrif_Interp_var5d       
+C
+C     **************************************************************************
+CCC   Subroutine Agrif_update_var0d
+C     **************************************************************************
+C 
+      Subroutine Agrif_update_var0d(tabvarsindic0,tabvarsindic,
+     &                              locupdate,locupdate1,
+     &                  locupdate2,procname)
+
+      INTEGER :: tabvarsindic ! indice of the variable in tabvars
+      INTEGER :: tabvarsindic0 ! indice of the variable in tabvars
+      External :: procname
+      Optional ::  procname      
+      INTEGER :: dimensio
+      INTEGER, DIMENSION(2), OPTIONAL :: locupdate
+      INTEGER, DIMENSION(2), OPTIONAL :: locupdate1
+      INTEGER, DIMENSION(2), OPTIONAL :: locupdate2            
+C
+      dimensio = Agrif_Mygrid % tabvars(tabvarsindic) % var % nbdim 
+C      
+      if (Agrif_Root()) Return
+      
+C     
+      IF (present(locupdate)) THEN
+      Agrif_Curgrid%tabvars(tabvarsindic)%var % updateinf(1:dimensio)
+     &      = locupdate(1)
+      Agrif_Curgrid%tabvars(tabvarsindic)%var % updatesup(1:dimensio) 
+     &      = locupdate(2)
+      ELSE
+      Agrif_Curgrid%tabvars(tabvarsindic)%var % updateinf(1:dimensio) 
+     &      = -99
+      Agrif_Curgrid%tabvars(tabvarsindic)%var % updatesup(1:dimensio) 
+     &      = -99
+      ENDIF
+      
+      IF (present(locupdate1)) THEN
+      Agrif_Curgrid%tabvars(tabvarsindic)%var % updateinf(1) 
+     &      = locupdate1(1)
+      Agrif_Curgrid%tabvars(tabvarsindic)%var % updatesup(1) 
+     &      = locupdate1(2)
+      ENDIF  
+      
+      IF (present(locupdate2)) THEN
+      Agrif_Curgrid%tabvars(tabvarsindic)%var % updateinf(2) 
+     &      = locupdate2(1)
+      Agrif_Curgrid%tabvars(tabvarsindic)%var % updatesup(2) 
+     &      = locupdate2(2)
+      ENDIF             
+ 
+      if ( dimensio .EQ. 1 ) then
+      IF (present(procname)) THEN
+      Call Agrif_Update_1D(
+     & Agrif_Mygrid % tabvars(tabvarsindic) % var % typeupdate,
+     & Agrif_Curgrid % parent % tabvars(tabvarsindic),
+     & Agrif_Curgrid % tabvars(tabvarsindic),
+     & Agrif_Curgrid % tabvars(tabvarsindic0) % var % array1 ,     
+     & Agrif_Curgrid % tabvars(tabvarsindic) % var % updateinf,
+     & Agrif_Curgrid % tabvars(tabvarsindic) % var % updatesup,
+     & procname)
+      ELSE
+      Call Agrif_Update_1D(
+     & Agrif_Mygrid % tabvars(tabvarsindic) % var % typeupdate,
+     & Agrif_Curgrid % parent % tabvars(tabvarsindic),
+     & Agrif_Curgrid % tabvars(tabvarsindic),
+     & Agrif_Curgrid % tabvars(tabvarsindic0) % var % array1 ,     
+     & Agrif_Curgrid % tabvars(tabvarsindic) % var % updateinf,
+     & Agrif_Curgrid % tabvars(tabvarsindic) % var % updatesup)      
+      ENDIF
+      endif
+      if ( dimensio .EQ. 2 ) then
+      IF (present(procname)) THEN
+      Call Agrif_Update_2D(
+     & Agrif_Mygrid % tabvars(tabvarsindic) % var % typeupdate,
+     & Agrif_Curgrid % parent % tabvars(tabvarsindic),
+     & Agrif_Curgrid % tabvars(tabvarsindic),
+     & Agrif_Curgrid % tabvars(tabvarsindic0) % var % array2 ,     
+     & Agrif_Curgrid % tabvars(tabvarsindic) % var % updateinf,
+     & Agrif_Curgrid % tabvars(tabvarsindic) % var % updatesup,
+     & procname)
+      ELSE
+      Call Agrif_Update_2D(
+     & Agrif_Mygrid % tabvars(tabvarsindic) % var % typeupdate,
+     & Agrif_Curgrid % parent % tabvars(tabvarsindic),
+     & Agrif_Curgrid % tabvars(tabvarsindic),
+     & Agrif_Curgrid % tabvars(tabvarsindic0) % var % array2 ,     
+     & Agrif_Curgrid % tabvars(tabvarsindic) % var % updateinf,
+     & Agrif_Curgrid % tabvars(tabvarsindic) % var % updatesup)      
+      ENDIF
+      endif
+      if ( dimensio .EQ. 3 ) then
+      IF (present(procname)) THEN
+      Call Agrif_Update_3D(
+     & Agrif_Mygrid % tabvars(tabvarsindic) % var % typeupdate,
+     & Agrif_Curgrid % parent % tabvars(tabvarsindic),
+     & Agrif_Curgrid % tabvars(tabvarsindic),
+     & Agrif_Curgrid % tabvars(tabvarsindic0) % var % array3 ,     
+     & Agrif_Curgrid % tabvars(tabvarsindic) % var % updateinf,
+     & Agrif_Curgrid % tabvars(tabvarsindic) % var % updatesup,
+     & procname)
+      ELSE
+      Call Agrif_Update_3D(
+     & Agrif_Mygrid % tabvars(tabvarsindic) % var % typeupdate,
+     & Agrif_Curgrid % parent % tabvars(tabvarsindic),
+     & Agrif_Curgrid % tabvars(tabvarsindic),
+     & Agrif_Curgrid % tabvars(tabvarsindic0) % var % array3 ,     
+     & Agrif_Curgrid % tabvars(tabvarsindic) % var % updateinf,
+     & Agrif_Curgrid % tabvars(tabvarsindic) % var % updatesup)      
+      ENDIF
+      endif
+      if ( dimensio .EQ. 4 ) then
+      IF (present(procname)) THEN
+      Call Agrif_Update_4D(
+     & Agrif_Mygrid % tabvars(tabvarsindic) % var % typeupdate,
+     & Agrif_Curgrid % parent % tabvars(tabvarsindic),
+     & Agrif_Curgrid % tabvars(tabvarsindic),
+     & Agrif_Curgrid % tabvars(tabvarsindic0) % var % array4 ,     
+     & Agrif_Curgrid % tabvars(tabvarsindic) % var % updateinf,
+     & Agrif_Curgrid % tabvars(tabvarsindic) % var % updatesup,
+     & procname)
+      ELSE
+      Call Agrif_Update_4D(
+     & Agrif_Mygrid % tabvars(tabvarsindic) % var % typeupdate,
+     & Agrif_Curgrid % parent % tabvars(tabvarsindic),
+     & Agrif_Curgrid % tabvars(tabvarsindic),
+     & Agrif_Curgrid % tabvars(tabvarsindic0) % var % array4 ,     
+     & Agrif_Curgrid % tabvars(tabvarsindic) % var % updateinf,
+     & Agrif_Curgrid % tabvars(tabvarsindic) % var % updatesup)      
+      ENDIF
+      endif
+      if ( dimensio .EQ. 5 ) then
+      IF (present(procname)) THEN
+      Call Agrif_Update_5D(
+     & Agrif_Mygrid % tabvars(tabvarsindic) % var % typeupdate,
+     & Agrif_Curgrid % parent % tabvars(tabvarsindic),
+     & Agrif_Curgrid % tabvars(tabvarsindic),
+     & Agrif_Curgrid % tabvars(tabvarsindic0) % var % array5 ,     
+     & Agrif_Curgrid % tabvars(tabvarsindic) % var % updateinf,
+     & Agrif_Curgrid % tabvars(tabvarsindic) % var % updatesup,
+     & procname)
+      ELSE
+      Call Agrif_Update_5D(
+     & Agrif_Mygrid % tabvars(tabvarsindic) % var % typeupdate,
+     & Agrif_Curgrid % parent % tabvars(tabvarsindic),
+     & Agrif_Curgrid % tabvars(tabvarsindic),
+     & Agrif_Curgrid % tabvars(tabvarsindic0) % var % array5 ,     
+     & Agrif_Curgrid % tabvars(tabvarsindic) % var % updateinf,
+     & Agrif_Curgrid % tabvars(tabvarsindic) % var % updatesup)      
+      ENDIF
+      endif
+
+      Return
+      End Subroutine Agrif_update_var0d
+C
+C
+C     **************************************************************************
+CCC   Subroutine Agrif_update_var1d
+C     **************************************************************************
+C 
+      Subroutine Agrif_update_var1d(q,tabvarsindic,locupdate,
+     &  locupdate1,locupdate2,procname)
+
+      REAL,  DIMENSION(:) :: q
+      INTEGER :: tabvarsindic,indic ! indice of the variable in tabvars
+      External :: procname
+      Optional ::  procname      
+      INTEGER, DIMENSION(2), OPTIONAL :: locupdate
+      INTEGER, DIMENSION(2), OPTIONAL :: locupdate1
+      INTEGER, DIMENSION(2), OPTIONAL :: locupdate2        
+      TYPE(Agrif_PVariable),Pointer ::tabvars,parenttabvars,roottabvars   
+C      
+      if (Agrif_Root()) Return
+C     
+
+      indic = tabvarsindic
+      if (tabvarsindic >=0) then
+        if (agrif_curgrid%tabvars(tabvarsindic)%var%nbdim == 0) then
+          indic = agrif_curgrid%tabvars(tabvarsindic)%var%iarray0
+        endif
+      endif 
+      
+      if (indic <=0) then
+      tabvars => Agrif_Search_Variable(Agrif_Curgrid,-indic)
+      parenttabvars => tabvars%parent_var
+      roottabvars => Agrif_Search_Variable(Agrif_Mygrid,-indic)      
+      else
+      tabvars=>Agrif_Curgrid % tabvars(indic)
+      parenttabvars => Agrif_Curgrid % parent % tabvars(indic)
+      roottabvars => Agrif_Mygrid % tabvars(indic)
+      endif
+      
+      IF (present(locupdate)) THEN
+      tabvars%var % updateinf(1:1) 
+     &      = locupdate(1)
+      tabvars%var % updatesup(1:1) 
+     &      = locupdate(2)
+      ELSE
+      tabvars%var % updateinf(1:1) 
+     &      = -99
+      tabvars%var % updatesup(1:1) 
+     &      = -99
+      ENDIF
+      
+      IF (present(locupdate1)) THEN
+      tabvars%var % updateinf(1) 
+     &      = locupdate1(1)
+      tabvars%var % updatesup(1) 
+     &      = locupdate1(2)
+      ENDIF  
+      
+      IF (present(locupdate2)) THEN
+      tabvars%var % updateinf(2) 
+     &      = locupdate2(1)
+      tabvars%var % updatesup(2) 
+     &      = locupdate2(2)
+      ENDIF       
+ 
+      IF (present(procname)) THEN
+      Call Agrif_Update_1D(
+     & roottabvars % var % typeupdate,
+     & parenttabvars,
+     & tabvars,q,
+     & tabvars % var % updateinf,
+     & tabvars % var % updatesup,
+     & procname)
+      ELSE 
+      Call Agrif_Update_1D(
+     & roottabvars % var % typeupdate,
+     & parenttabvars,
+     & tabvars,q,
+     & tabvars % var % updateinf,
+     & tabvars % var % updatesup)       
+      ENDIF
+
+      Return
+      End Subroutine Agrif_update_var1d
+C
+C
+C     **************************************************************************
+CCC   Subroutine Agrif_update_var2d
+C     **************************************************************************
+C 
+      Subroutine Agrif_update_var2d(q,tabvarsindic,locupdate,
+     &  locupdate1,locupdate2,procname)
+
+      REAL,  DIMENSION(:,:) :: q
+      External :: procname
+      Optional ::  procname
+      INTEGER, DIMENSION(2), OPTIONAL :: locupdate 
+      INTEGER, DIMENSION(2), OPTIONAL :: locupdate1
+      INTEGER, DIMENSION(2), OPTIONAL :: locupdate2        
+      INTEGER :: tabvarsindic,indic ! indice of the variable in tabvars
+      TYPE(Agrif_PVariable),Pointer ::tabvars,parenttabvars,roottabvars       
+C      
+      IF (Agrif_Root()) RETURN
+      
+C 
+      indic = tabvarsindic
+      if (tabvarsindic >=0) then
+        if (agrif_curgrid%tabvars(tabvarsindic)%var%nbdim == 0) then
+          indic = agrif_curgrid%tabvars(tabvarsindic)%var%iarray0
+        endif
+      endif 
+      
+      if (indic <=0) then
+      tabvars => Agrif_Search_Variable(Agrif_Curgrid,-indic)
+      parenttabvars => tabvars%parent_var
+      roottabvars => Agrif_Search_Variable(Agrif_Mygrid,-indic)      
+      else
+      tabvars=>Agrif_Curgrid % tabvars(indic)
+      parenttabvars => Agrif_Curgrid % parent % tabvars(indic)
+      roottabvars => Agrif_Mygrid % tabvars(indic)
+      endif
+      
+      IF (present(locupdate)) THEN
+      tabvars%var % updateinf(1:2) 
+     &      = locupdate(1)
+      tabvars%var % updatesup(1:2) 
+     &      = locupdate(2)
+      ELSE
+      tabvars%var % updateinf(1:2) 
+     &      = -99
+      tabvars%var % updatesup(1:2) 
+     &      = -99
+      ENDIF
+      
+      IF (present(locupdate1)) THEN
+      tabvars%var % updateinf(1) 
+     &      = locupdate1(1)
+      tabvars%var % updatesup(1) 
+     &      = locupdate1(2)
+      ENDIF  
+      
+      IF (present(locupdate2)) THEN
+      tabvars%var % updateinf(2) 
+     &      = locupdate2(1)
+      tabvars%var % updatesup(2) 
+     &      = locupdate2(2)
+      ENDIF
+ 
+      IF (present(procname)) THEN
+      Call Agrif_Update_2D(
+     & roottabvars % var % typeupdate,
+     & parenttabvars,
+     & tabvars,q,
+     & tabvars % var % updateinf,
+     & tabvars % var % updatesup,
+     & procname)
+      ELSE 
+      Call Agrif_Update_2D(
+     & roottabvars % var % typeupdate,
+     & parenttabvars,
+     & tabvars,q,
+     & tabvars % var % updateinf,
+     & tabvars % var % updatesup)       
+      ENDIF
+
+      Return
+      End Subroutine Agrif_update_var2d
+C 
+C
+C     **************************************************************************
+CCC   Subroutine Agrif_update_var3d
+C     **************************************************************************
+C 
+      Subroutine Agrif_update_var3d(q,tabvarsindic,locupdate,
+     &  locupdate1,locupdate2,procname)
+
+      REAL,  DIMENSION(:,:,:) :: q
+      External :: procname
+      Optional ::  procname
+      INTEGER, DIMENSION(2), OPTIONAL :: locupdate
+      INTEGER, DIMENSION(2), OPTIONAL :: locupdate1
+      INTEGER, DIMENSION(2), OPTIONAL :: locupdate2        
+      INTEGER :: tabvarsindic,indic ! indice of the variable in tabvars
+      TYPE(Agrif_PVariable),Pointer ::tabvars,parenttabvars,roottabvars       
+C      
+      IF (Agrif_Root()) RETURN 
+C      
+      indic = tabvarsindic
+      if (tabvarsindic >=0) then
+        if (agrif_curgrid%tabvars(tabvarsindic)%var%nbdim == 0) then
+          indic = agrif_curgrid%tabvars(tabvarsindic)%var%iarray0
+        endif
+      endif 
+      
+      if (indic <=0) then
+      tabvars => Agrif_Search_Variable(Agrif_Curgrid,-indic)
+      parenttabvars => tabvars%parent_var
+      roottabvars => Agrif_Search_Variable(Agrif_Mygrid,-indic)      
+      else
+      tabvars=>Agrif_Curgrid % tabvars(indic)
+      parenttabvars => Agrif_Curgrid % parent % tabvars(indic)
+      roottabvars => Agrif_Mygrid % tabvars(indic)
+      endif
+      
+      IF (present(locupdate)) THEN
+      tabvars%var % updateinf(1:3) 
+     &      = locupdate(1)
+      tabvars%var % updatesup(1:3) 
+     &      = locupdate(2)
+      ELSE
+      tabvars%var % updateinf(1:3) 
+     &      = -99
+      tabvars%var % updatesup(1:3) 
+     &      = -99
+      ENDIF      
+      
+      IF (present(locupdate1)) THEN
+      tabvars%var % updateinf(1) 
+     &      = locupdate1(1)
+      tabvars%var % updatesup(1) 
+     &      = locupdate1(2)
+      ENDIF  
+      
+      IF (present(locupdate2)) THEN
+      tabvars%var % updateinf(2) 
+     &      = locupdate2(1)
+      tabvars%var % updatesup(2) 
+     &      = locupdate2(2)
+      ENDIF
+
+      IF (present(procname)) THEN
+      Call Agrif_Update_3D(
+     & roottabvars % var % typeupdate,
+     & parenttabvars,
+     & tabvars,q,
+     & tabvars % var % updateinf,
+     & tabvars % var % updatesup,
+     & procname)
+      ELSE 
+      Call Agrif_Update_3D(
+     & roottabvars % var % typeupdate,
+     & parenttabvars,
+     & tabvars,q,
+     & tabvars % var % updateinf,
+     & tabvars % var % updatesup)       
+      ENDIF
+
+      Return
+      End Subroutine Agrif_update_var3d
+C 
+C
+C     **************************************************************************
+CCC   Subroutine Agrif_update_var4d
+C     **************************************************************************
+C 
+      Subroutine Agrif_update_var4d(q,tabvarsindic,locupdate,
+     &  locupdate1,locupdate2,procname)
+
+      REAL,  DIMENSION(:,:,:,:) :: q
+      External :: procname
+      Optional ::  procname
+      INTEGER, DIMENSION(2), OPTIONAL :: locupdate
+      INTEGER, DIMENSION(2), OPTIONAL :: locupdate1
+      INTEGER, DIMENSION(2), OPTIONAL :: locupdate2        
+      INTEGER :: tabvarsindic,indic ! indice of the variable in tabvars
+      TYPE(Agrif_PVariable),Pointer ::tabvars,parenttabvars,roottabvars       
+C      
+      IF (Agrif_Root()) RETURN
+      indic = tabvarsindic
+      if (tabvarsindic >=0) then
+        if (agrif_curgrid%tabvars(tabvarsindic)%var%nbdim == 0) then
+          indic = agrif_curgrid%tabvars(tabvarsindic)%var%iarray0
+        endif
+      endif 
+      
+      if (indic <=0) then
+      tabvars => Agrif_Search_Variable(Agrif_Curgrid,-indic)
+      parenttabvars => tabvars%parent_var
+      roottabvars => Agrif_Search_Variable(Agrif_Mygrid,-indic)     
+      else
+      tabvars=>Agrif_Curgrid % tabvars(indic)
+      parenttabvars => Agrif_Curgrid % parent % tabvars(indic)
+      roottabvars => Agrif_Mygrid % tabvars(indic)
+      endif      
+C      
+      IF (present(locupdate)) THEN
+      tabvars%var % updateinf(1:4) 
+     &      = locupdate(1)
+      tabvars%var % updatesup(1:4) 
+     &      = locupdate(2)
+      ELSE
+      tabvars%var % updateinf(1:4) 
+     &      = -99
+      tabvars%var % updatesup(1:4) 
+     &      = -99
+      ENDIF
+      
+      IF (present(locupdate1)) THEN
+      tabvars%var % updateinf(1) 
+     &      = locupdate1(1)
+      tabvars%var % updatesup(1) 
+     &      = locupdate1(2)
+      ENDIF  
+      
+      IF (present(locupdate2)) THEN
+      tabvars%var % updateinf(2) 
+     &      = locupdate2(1)
+      tabvars%var % updatesup(2) 
+     &      = locupdate2(2)
+      ENDIF
+
+      IF (present(procname)) THEN
+      Call Agrif_Update_4D(
+     & roottabvars % var % typeupdate,
+     & parenttabvars,
+     & tabvars,q,
+     & tabvars % var % updateinf,
+     & tabvars % var % updatesup,
+     & procname)
+      ELSE 
+      Call Agrif_Update_4D(
+     & roottabvars % var % typeupdate,
+     & parenttabvars,
+     & tabvars,q,
+     & tabvars % var % updateinf,
+     & tabvars % var % updatesup)       
+      ENDIF
+
+      Return
+      End Subroutine Agrif_update_var4d  
+C 
+C
+C     **************************************************************************
+CCC   Subroutine Agrif_update_var5d
+C     **************************************************************************
+C 
+      Subroutine Agrif_update_var5d(q,tabvarsindic,locupdate,
+     &  locupdate1,locupdate2,procname)
+
+      REAL,  DIMENSION(:,:,:,:,:) :: q
+      External :: procname
+      Optional ::  procname
+      INTEGER, DIMENSION(2), OPTIONAL :: locupdate
+      INTEGER, DIMENSION(2), OPTIONAL :: locupdate1
+      INTEGER, DIMENSION(2), OPTIONAL :: locupdate2        
+      INTEGER :: tabvarsindic,indic ! indice of the variable in tabvars
+      TYPE(Agrif_PVariable),Pointer ::tabvars,parenttabvars,roottabvars       
+C
+      IF (Agrif_Root()) RETURN
+C     
+      indic = tabvarsindic
+      if (tabvarsindic >=0) then
+        if (agrif_curgrid%tabvars(tabvarsindic)%var%nbdim == 0) then
+          indic = agrif_curgrid%tabvars(tabvarsindic)%var%iarray0
+        endif
+      endif 
+      
+      if (indic <=0) then
+      tabvars => Agrif_Search_Variable(Agrif_Curgrid,-indic)
+      parenttabvars => tabvars%parent_var
+      roottabvars => Agrif_Search_Variable(Agrif_Mygrid,-indic)      
+      else
+      tabvars=>Agrif_Curgrid % tabvars(indic)
+      parenttabvars => Agrif_Curgrid % parent % tabvars(indic)
+      roottabvars => Agrif_Mygrid % tabvars(indic)
+      endif
+       
+      IF (present(locupdate)) THEN
+      tabvars%var % updateinf(1:5) 
+     &      = locupdate(1)
+      tabvars%var % updatesup(1:5) 
+     &      = locupdate(2)
+      ELSE
+      tabvars%var % updateinf(1:5) 
+     &      = -99
+      tabvars%var % updatesup(1:5) 
+     &      = -99
+      ENDIF
+      
+      IF (present(locupdate1)) THEN
+      tabvars%var % updateinf(1) 
+     &      = locupdate1(1)
+      tabvars%var % updatesup(1) 
+     &      = locupdate1(2)
+      ENDIF  
+      
+      IF (present(locupdate2)) THEN
+      tabvars%var % updateinf(2) 
+     &      = locupdate2(1)
+      tabvars%var % updatesup(2) 
+     &      = locupdate2(2)
+      ENDIF
+
+      IF (present(procname)) THEN
+      Call Agrif_Update_5D(
+     & roottabvars % var % typeupdate,
+     & parenttabvars,
+     & tabvars,q,
+     & tabvars % var % updateinf,
+     & tabvars % var % updatesup,
+     & procname)
+      ELSE 
+      Call Agrif_Update_5D(
+     & roottabvars % var % typeupdate,
+     & parenttabvars,
+     & tabvars,q,
+     & tabvars % var % updateinf,
+     & tabvars % var % updatesup)       
+      ENDIF
+
+      Return
+      End Subroutine Agrif_update_var5d  
+          
+      Subroutine Agrif_Declare_Flux(fluxname,profilename) 
+      character*(*) :: fluxname, profilename
+      Type(Agrif_Flux), pointer :: newflux
+      Type(Agrif_Profile), pointer  :: parcours
+      logical :: foundprofile
+      integer :: i,j,n
+            
+      foundprofile = .FALSE.
+      parcours => Agrif_Myprofiles
+      
+      Do While (Associated(parcours))
+         IF (parcours % profilename == profilename) THEN
+           foundprofile = .TRUE.
+           EXIT
+         ENDIF
+         parcours => parcours%nextprofile
+      End Do      
+      
+      IF (.NOT.foundprofile) THEN
+      write(*,*) 'The profile '''
+     &           //TRIM(profilename)//''' has not been declared'  
+      stop    
+      ENDIF
+      
+      Allocate(Newflux)
+      
+      Newflux % fluxname = fluxname
+      
+      Newflux % profile => parcours
+      
+      Newflux % nextflux => Agrif_Curgrid % fluxes
+      
+      Agrif_Curgrid % fluxes => Newflux
+      
+      End Subroutine Agrif_Declare_Flux  
+       
+      Subroutine Agrif_Save_Flux(fluxname, fluxtab)
+      character*(*) :: fluxname
+      REAL, DIMENSION(:,:) :: fluxtab
+      
+      
+      Type(Agrif_Flux), pointer :: Flux
+      
+      Type(Agrif_pgrid), pointer :: parcours_child
+      
+      Type(Agrif_grid), Pointer :: currentgrid,oldcurgrid
+      
+      IF (.Not.Agrif_Root()) THEN
+      Flux => Agrif_Search_Flux(fluxname)
+
+      IF (.NOT.Flux%fluxallocated) THEN
+        CALL Agrif_AllocateFlux(Flux,fluxtab)
+      ENDIF
+      
+      Call Agrif_Save_Fluxtab(Flux,fluxtab)
+      
+      ENDIF
+      
+      oldcurgrid=> Agrif_Curgrid
+      
+      parcours_child => Agrif_Curgrid%child_grids
+      
+      Do While (Associated(parcours_child))
+        currentgrid => parcours_child%gr
+        Agrif_Curgrid => parcours_child%gr
+        Flux => Agrif_Search_Flux(fluxname)
+        IF (.NOT.Flux%fluxallocated) THEN
+          CALL Agrif_AllocateFlux(Flux,fluxtab)
+        ENDIF        
+        Call Agrif_Save_Fluxtab_child(Flux,fluxtab)
+        parcours_child=> parcours_child%next
+      End Do
+      
+      Agrif_Curgrid=>oldcurgrid
+      
+      End Subroutine Agrif_Save_Flux
+
+      Subroutine Agrif_Cancel_Flux(fluxname)
+      character*(*) :: fluxname
+      
+      Type(Agrif_Flux), pointer :: Flux
+      
+      Flux => Agrif_Search_Flux(fluxname)
+
+      IF (Flux%FluxAllocated) Call Agrif_Cancel_Fluxarray(Flux)
+      
+      End Subroutine Agrif_Cancel_Flux
+ 
+      Subroutine Agrif_Flux_Correction(fluxname, procname)
+      character*(*) :: fluxname
+      external :: procname
+      
+      Type(Agrif_Flux), pointer :: Flux
+      
+      Flux => Agrif_Search_Flux(fluxname)
+      
+      Call Agrif_FluxCorrect(Flux, procname)
+
+      
+      End Subroutine Agrif_Flux_Correction
+
+
+                              
+      Subroutine Agrif_Declare_Profile_flux(profilename,posvar,
+     &    firstpoint,raf)
+      character*(*) :: profilename
+      Type(Agrif_Profile), Pointer :: newprofile
+      INTEGER, DIMENSION(:) :: posvar
+      INTEGER, DIMENSION(:) :: firstpoint
+      CHARACTER(*) ,DIMENSION(:) :: raf      
+      INTEGER :: dimensio
+            
+      dimensio = SIZE(posvar)
+C
+C    
+      Allocate(newprofile)
+      Allocate(newprofile%posvar(dimensio))
+      Allocate(newprofile%interptab(dimensio))
+      newprofile%profilename = profilename
+      newprofile%interptab = raf
+      newprofile%nbdim = dimensio
+      newprofile%posvar = posvar
+      newprofile%point(1:dimensio) = firstpoint
+      
+      newprofile % nextprofile => Agrif_myprofiles
+      
+      Agrif_myprofiles => newprofile
+      
+      End Subroutine Agrif_Declare_Profile_flux
+
+      Subroutine Agrif_Save_ForRestore0D(tabvarsindic0,tabvarsindic)
+      integer :: tabvarsindic0, tabvarsindic
+      integer :: dimensio
+      
+      dimensio =  Agrif_Mygrid % tabvars(tabvarsindic0) % var % nbdim
+      
+      select case(dimensio)
+      case(2)
+          call Agrif_Save_ForRestore2D(
+     &      Agrif_Curgrid % tabvars(tabvarsindic0) % var % array2,
+     &      tabvarsindic)
+      case(3)
+          call Agrif_Save_ForRestore3D(
+     &      Agrif_Curgrid % tabvars(tabvarsindic0) % var % array3,
+     &      tabvarsindic)
+      case(4)
+          call Agrif_Save_ForRestore4D(
+     &      Agrif_Curgrid % tabvars(tabvarsindic0) % var % array4,
+     &      tabvarsindic)     
+      end select
+
+      Return
+      End Subroutine Agrif_Save_ForRestore0D 
+      
+    
+      
+      Subroutine Agrif_Save_ForRestore2D(q,tabvarsindic)
+      real,dimension(:,:) :: q
+      integer :: tabvarsindic, indic
+      TYPE(Agrif_PVariable),Pointer ::tabvars, roottabvars    
+ 
+       indic = tabvarsindic
+      if (tabvarsindic >=0) then
+        if (agrif_curgrid%tabvars(tabvarsindic)%var%nbdim == 0) then
+          indic = agrif_curgrid%tabvars(tabvarsindic)%var%iarray0
+        endif
+      endif
+      
+      if (indic <=0) then
+      tabvars => Agrif_Search_Variable(Agrif_Curgrid,-indic)
+      roottabvars => Agrif_Search_Variable(Agrif_Mygrid,-indic)
+      else
+      tabvars=>Agrif_Curgrid % tabvars(indic)
+      roottabvars => Agrif_Mygrid % tabvars(indic)
+      endif      
+      if (.not.allocated(tabvars%var%array2)) then      
+      allocate(tabvars%var%array2(tabvars%var%lb(1):tabvars%var%ub(1),
+     &                            tabvars%var%lb(2):tabvars%var%ub(2)))
+      endif
+      tabvars%var%array2 = q
+      roottabvars%var%restaure = .true.
+      
+      Return
+      End Subroutine Agrif_Save_ForRestore2D  
+      
+      Subroutine Agrif_Save_ForRestore3D(q,tabvarsindic)
+      real,dimension(:,:,:) :: q
+      integer :: tabvarsindic, indic
+      TYPE(Agrif_PVariable),Pointer ::tabvars, roottabvars    
+ 
+       indic = tabvarsindic
+      if (tabvarsindic >=0) then
+        if (agrif_curgrid%tabvars(tabvarsindic)%var%nbdim == 0) then
+          indic = agrif_curgrid%tabvars(tabvarsindic)%var%iarray0
+        endif
+      endif
+      
+      if (indic <=0) then
+      tabvars => Agrif_Search_Variable(Agrif_Curgrid,-indic)
+      roottabvars => Agrif_Search_Variable(Agrif_Mygrid,-indic)
+      else
+      tabvars=>Agrif_Curgrid % tabvars(indic)
+      roottabvars => Agrif_Mygrid % tabvars(indic)
+      endif      
+
+      if (.not.allocated(tabvars%var%array3)) then
+      allocate(tabvars%var%array3(tabvars%var%lb(1):tabvars%var%ub(1),
+     &                            tabvars%var%lb(2):tabvars%var%ub(2),
+     &                            tabvars%var%lb(3):tabvars%var%ub(3)))
+      endif
+      tabvars%var%array3 = q
+      roottabvars%var%restaure = .true.
+      
+      Return
+      End Subroutine Agrif_Save_ForRestore3D
+      
+      Subroutine Agrif_Save_ForRestore4D(q,tabvarsindic)
+      real,dimension(:,:,:,:) :: q
+      integer :: tabvarsindic, indic
+      TYPE(Agrif_PVariable),Pointer ::tabvars, roottabvars    
+ 
+       indic = tabvarsindic
+      if (tabvarsindic >=0) then
+        if (agrif_curgrid%tabvars(tabvarsindic)%var%nbdim == 0) then
+          indic = agrif_curgrid%tabvars(tabvarsindic)%var%iarray0
+        endif
+      endif
+      
+      if (indic <=0) then
+      tabvars => Agrif_Search_Variable(Agrif_Curgrid,-indic)
+      roottabvars => Agrif_Search_Variable(Agrif_Mygrid,-indic)
+      else
+      tabvars=>Agrif_Curgrid % tabvars(indic)
+      roottabvars => Agrif_Mygrid % tabvars(indic)
+      endif
+
+      if (.not.allocated(tabvars%var%array4)) then         
+      allocate(tabvars%var%array4(tabvars%var%lb(1):tabvars%var%ub(1),
+     &                            tabvars%var%lb(2):tabvars%var%ub(2),
+     &                            tabvars%var%lb(3):tabvars%var%ub(3),
+     &                            tabvars%var%lb(4):tabvars%var%ub(4)))
+      endif
+      tabvars%var%array4 = q
+      roottabvars%var%restaure = .true.
+      
+      Return
+      End Subroutine Agrif_Save_ForRestore4D                   
+C
+      End module Agrif_bcfunction
Index: vendors/AGRIF/r_01/AGRIF_FILES/modcluster.F
===================================================================
--- vendors/AGRIF/r_01/AGRIF_FILES/modcluster.F	(revision 2672)
+++ vendors/AGRIF/r_01/AGRIF_FILES/modcluster.F	(revision 2672)
@@ -0,0 +1,1452 @@
+!
+! $Id: modcluster.F 662 2007-05-25 15:58:52Z opalod $
+!
+C     AGRIF (Adaptive Grid Refinement In Fortran)
+C
+C     Copyright (C) 2003 Laurent Debreu (Laurent.Debreu@imag.fr)
+C                        Christophe Vouland (Christophe.Vouland@imag.fr)    
+C
+C     This program is free software; you can redistribute it and/or modify
+C     it under the terms of the GNU General Public License as published by
+C     the Free Software Foundation; either version 2 of the License, or
+C     (at your option) any later version.
+C
+C     This program is distributed in the hope that it will be useful,
+C     but WITHOUT ANY WARRANTY; without even the implied warranty of
+C     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+C     GNU General Public License for more details.
+C
+C     You should have received a copy of the GNU General Public License
+C     along with this program; if not, write to the Free Software
+C     Foundation, Inc., 59 Temple Place- Suite 330, Boston, MA 02111-1307, USA.
+C
+C
+C
+CCC   Module AGRIF_Clustering  
+C
+C
+      Module Agrif_Clustering 
+C
+CCC   Description:
+CCC   Module to create and initialize the grid hierarchy from the 
+CCC   AGRIF_FixedGrids.in file.
+C
+C     Modules used:
+C  
+      Use Agrif_Curgridfunctions 
+      Use Agrif_Init_Vars
+      Use Agrif_Save
+C             
+      IMPLICIT NONE
+C        
+      Contains 
+C     Define procedures contained in this module
+C
+C
+C
+C     **************************************************************************
+CCC   Subroutine Agrif_Cluster_All  
+C     **************************************************************************
+C
+      Recursive Subroutine Agrif_Cluster_All(g,coarsegrid)
+C
+CCC   Description:
+CCC   Subroutine for the clustering. A temporary grid hierarchy, pointed by 
+CCC   coarsegrid, is created.
+C
+CC    Method:
+CC            
+C
+C     Declarations:
+C
+C     Pointer arguments    
+      TYPE(AGRIF_grid)     ,pointer   :: g        ! Pointer on the current grid
+      TYPE(AGRIF_rectangle),pointer   :: coarsegrid
+C      
+C     Local pointer         
+      TYPE(AGRIF_lrectangle),pointer  :: parcours 
+      TYPE(AGRIF_grid)      ,pointer  :: newgrid 
+      REAL                            :: g_eps
+      INTEGER                         :: iii
+C      
+      g_eps = huge(1.)
+      do iii = 1 , Agrif_Probdim
+         g_eps = min(g_eps,g%Agrif_d(iii))
+      enddo
+C
+      g_eps = g_eps/100.                  
+C
+C     Necessary condition for clustering 
+      do iii = 1 , Agrif_Probdim
+         if (g%Agrif_d(iii)/Agrif_coeffref(iii).LT.
+     &                   (Agrif_mind(iii)-g_eps)) Return
+      enddo
+C
+      Nullify(coarsegrid%childgrids)
+C
+      Call Agrif_ClusterGridnD(g,coarsegrid) 
+C
+      parcours => coarsegrid % childgrids                   
+C      
+      do while (associated(parcours))
+C      
+C       Newgrid is created. It is a copy of a fine grid created previously by
+C          clustering.      
+        Allocate(newgrid)
+C      
+        Nullify(newgrid%child_grids)
+C
+        do iii = 1 , Agrif_Probdim
+           newgrid % nb(iii) = (parcours % r % imax(iii) - 
+     &                          parcours % r % imin(iii)) *
+     &                          Agrif_Coeffref(iii)
+C        
+           newgrid % Agrif_x(iii) = g%Agrif_x(iii) + 
+     &                         (parcours %r % imin(iii) -1) 
+     &                         *g%Agrif_d(iii)
+C 
+           newgrid % Agrif_d(iii) = g%Agrif_d(iii) / Agrif_Coeffref(iii)
+C
+        enddo
+C
+        if ( Agrif_Probdim .EQ. 1 ) then
+           allocate(newgrid%tabpoint1D(newgrid%nb(1)+1))
+           newgrid%tabpoint1D = 0
+        endif
+C
+        if ( Agrif_Probdim .EQ. 2 ) then
+           allocate(newgrid%tabpoint2D(newgrid%nb(1)+1,
+     &                                 newgrid%nb(2)+1))
+           newgrid%tabpoint2D = 0      
+        endif
+C
+        if ( Agrif_Probdim .EQ. 3 ) then
+           allocate(newgrid%tabpoint3D(newgrid%nb(1)+1,
+     &                                 newgrid%nb(2)+1,
+     &                                 newgrid%nb(3)+1))
+           newgrid%tabpoint3D = 0
+        endif
+C       Points detection on newgrid
+        Call Agrif_TabpointsnD(Agrif_mygrid,newgrid) 
+C
+C       Recursive call to Agrif_Cluster_All            
+        Call Agrif_Cluster_All (newgrid, parcours % r)     
+C
+        parcours => parcours % next 
+C      
+        if ( Agrif_Probdim .EQ. 1 ) Deallocate(newgrid%tabpoint1D)
+        if ( Agrif_Probdim .EQ. 2 ) Deallocate(newgrid%tabpoint2D)
+        if ( Agrif_Probdim .EQ. 3 ) Deallocate(newgrid%tabpoint3D)
+C
+        Deallocate(newgrid)   
+C
+      enddo
+C
+C      
+      End Subroutine Agrif_Cluster_All
+C
+C     **************************************************************************
+CCC   Subroutine Agrif_TabpointsnD
+C     **************************************************************************
+C
+      Recursive Subroutine Agrif_TabpointsnD(g,newgrid)
+C
+CCC   Description:
+CCC   Copy on newgrid of points detected on the grid hierarchy pointed by g.   
+C
+CC    Method:
+CC            
+C
+C     Declarations:
+C
+C     Arguments
+      TYPE(Agrif_Grid),pointer   :: g,newgrid
+C
+C     Local variables      
+      TYPE(Agrif_Pgrid),pointer  :: parcours
+C
+      REAL                  :: g_eps,newgrid_eps,eps
+      REAL   , DIMENSION(3) :: newmin,newmax
+      REAL   , DIMENSION(3) :: gmin,gmax
+      REAL   , DIMENSION(3) :: xmin
+      INTEGER, DIMENSION(3) :: igmin,inewmin
+      INTEGER, DIMENSION(3) :: inewmax
+      INTEGER               :: iii
+      INTEGER               :: i,j,k
+      INTEGER               :: i0,j0,k0
+C
+C     
+      parcours => g % child_grids
+C
+      do While(associated(parcours))
+        Call Agrif_TabpointsnD(parcours%gr,newgrid)
+        parcours => parcours % next
+      enddo      
+C
+      g_eps = 10.
+      newgrid_eps = 10.
+C      
+      do iii = 1 , Agrif_probdim
+         g_eps = min( g_eps , g % Agrif_d(iii) )
+         newgrid_eps = min(newgrid_eps,newgrid%Agrif_d(iii))
+      enddo
+C
+      eps = min(g_eps,newgrid_eps)/100.                  
+C                   
+      do iii = 1 , Agrif_probdim
+         if (newgrid%Agrif_d(iii) .LT. (g%Agrif_d(iii)-eps)) Return
+C                   
+         gmin(iii) = g%Agrif_x(iii)
+         gmax(iii) = g%Agrif_x(iii) + g%nb(iii) * g%Agrif_d(iii)
+C 
+         newmin(iii) = newgrid%Agrif_x(iii)
+         newmax(iii) = newgrid%Agrif_x(iii) + newgrid%nb(iii) *
+     &                 newgrid%Agrif_d(iii)
+C      
+         if (gmax(iii) .LT. newmin(iii)) Return
+C
+         if (gmin(iii) .GT. newmax(iii)) Return
+C           
+         inewmin(iii) = 1 - floor(-(max(gmin(iii),newmin(iii))-
+     &                    newmin(iii))
+     &                   /newgrid%Agrif_d(iii)) 
+C          
+         xmin(iii) = newgrid%Agrif_x(iii) + (inewmin(iii)-1)*
+     &              newgrid%Agrif_d(iii)          
+C        
+         igmin(iii) = 1 + nint((xmin(iii)-gmin(iii))/g%Agrif_d(iii))
+C
+         inewmax(iii) = 1 + int((min(gmax(iii),newmax(iii))-
+     &                  newmin(iii))/newgrid%Agrif_d(iii))
+      enddo
+C                
+      if ( Agrif_probdim .EQ. 1 ) then
+         i0 = igmin(1)
+         do i = inewmin(1),inewmax(1)
+            newgrid%tabpoint1D(i) = max(
+     &                           newgrid%tabpoint1D(i),
+     &                           g%tabpoint1D(i0))
+         enddo
+         i0 = i0 + int(newgrid%Agrif_d(1)/g%Agrif_d(1))
+      endif
+C
+      if ( Agrif_probdim .EQ. 2 ) then
+         i0 = igmin(1)
+         do i = inewmin(1),inewmax(1)
+            j0 = igmin(2)
+            do j = inewmin(2),inewmax(2)
+               newgrid%tabpoint2D(i,j) = max(
+     &                           newgrid%tabpoint2D(i,j),
+     &                           g%tabpoint2D(i0,j0))
+               j0 = j0 + int(newgrid%Agrif_d(2)/g%Agrif_d(2))
+            enddo
+            i0 = i0 + int(newgrid%Agrif_d(1)/g%Agrif_d(1))
+         enddo
+      endif
+C
+      if ( Agrif_probdim .EQ. 3 ) then
+         i0 = igmin(1)
+         do i = inewmin(1),inewmax(1)
+            j0 = igmin(2)
+            do j = inewmin(2),inewmax(2)
+               k0 = igmin(3)
+               do k = inewmin(3),inewmax(3)
+                  newgrid%tabpoint3D(i,j,k) = max(
+     &                           newgrid%tabpoint3D(i,j,k),
+     &                           g%tabpoint3D(i0,j0,k0))
+                  k0 = k0 + int(newgrid%Agrif_d(3)/g%Agrif_d(3))
+               enddo                                        
+               j0 = j0 + int(newgrid%Agrif_d(2)/g%Agrif_d(2))
+            enddo
+            i0 = i0 + int(newgrid%Agrif_d(1)/g%Agrif_d(1))
+         enddo
+      endif
+C
+      Return
+C
+C
+      End Subroutine Agrif_TabpointsnD
+C
+C     **************************************************************************
+CCC   Subroutine Agrif_ClusterGridnD
+C     **************************************************************************
+C      
+      Subroutine Agrif_ClusterGridnD(g,coarsegrid)
+C
+CCC   Description:
+CCC   Clustering on the grid pointed by g.
+C
+CC    Method:
+CC            
+C
+C     Declarations:
+C
+C     Pointer arguments
+      TYPE(AGRIF_grid)     ,pointer  :: g          ! Pointer on the current grid
+      TYPE(AGRIF_rectangle),pointer  :: coarsegrid
+C
+C     Local variables      
+      TYPE(Agrif_rectangle) :: newrect
+      TYPE(Agrif_Variable)  :: newflag
+C
+      INTEGER               :: i,j,k
+      INTEGER ,DIMENSION(3) :: sx
+      INTEGER               :: bufferwidth,flagpoints
+      INTEGER               :: n1,n2,m1,m2,o1,o2
+      INTEGER               :: iii
+C
+C      
+      bufferwidth = int(Agrif_Minwidth/5.)
+C      
+      do iii = 1 , Agrif_probdim
+         sx(iii) = g % nb(iii) + 1
+      enddo
+C                  
+      if ( Agrif_probdim .EQ. 1 ) then
+         allocate(newflag%iarray1(sx(1)))
+         newflag%iarray1 = 0      
+      endif
+      if ( Agrif_probdim .EQ. 2 ) then
+         allocate(newflag%iarray2(sx(1),sx(2)))
+         newflag%iarray2 = 0      
+      endif
+      if ( Agrif_probdim .EQ. 3 ) then
+         allocate(newflag%iarray3(sx(1),sx(2),sx(3)))
+         newflag%iarray3 = 0      
+      endif
+C
+      flagpoints = 0 
+C      
+      if (bufferwidth>0) then 
+C      
+         if ( Agrif_probdim .EQ. 1 ) then
+            do i = bufferwidth,sx(1)-bufferwidth+1      
+               if (g % tabpoint1D(i) .EQ. 1) then
+                  m1 = i - bufferwidth + 1
+                  m2 = i + bufferwidth - 1                  
+                  flagpoints = flagpoints + 1
+                  newflag%iarray1(m1:m2)=1 
+               endif 
+            enddo    
+         endif
+C
+        if ( Agrif_probdim .EQ. 2 ) then
+           do i = bufferwidth,sx(1)-bufferwidth+1      
+               do j = bufferwidth,sx(2)-bufferwidth+1
+                  if (g % tabpoint2D(i,j) .EQ. 1) then
+                     n1 = j - bufferwidth + 1
+                     n2 = j + bufferwidth - 1
+                     m1 = i - bufferwidth + 1
+                     m2 = i + bufferwidth - 1                  
+                     flagpoints = flagpoints + 1
+                     newflag%iarray2(m1:m2,n1:n2)=1 
+                  endif  
+               enddo    
+            enddo
+         endif
+C
+        if ( Agrif_probdim .EQ. 3 ) then
+            do i = bufferwidth,sx(1)-bufferwidth+1      
+               do j = bufferwidth,sx(2)-bufferwidth+1
+                  do k = bufferwidth,sx(3)-bufferwidth+1
+                     if (g % tabpoint3D(i,j,k) .EQ. 1) then
+                        o1 = k - bufferwidth + 1
+                        o2 = k + bufferwidth - 1
+                        n1 = j - bufferwidth + 1
+                        n2 = j + bufferwidth - 1
+                        m1 = i - bufferwidth + 1
+                        m2 = i + bufferwidth - 1                  
+                        flagpoints = flagpoints + 1
+                        newflag%iarray3(m1:m2,n1:n2,o1:o2)=1 
+                     endif 
+                  enddo  
+               enddo    
+            enddo
+        endif
+      else
+          flagpoints = 1       
+C
+          if ( Agrif_probdim .EQ. 1 ) then
+          newflag%iarray1 = g % tabpoint1D
+          endif
+          if ( Agrif_probdim .EQ. 2 ) then
+          newflag%iarray2 = g % tabpoint2D
+          endif
+          if ( Agrif_probdim .EQ. 3 ) then
+          newflag%iarray3 = g % tabpoint3D
+          endif
+      endif
+C       
+      if (flagpoints .EQ. 0) then       
+          if ( Agrif_probdim .EQ. 1 ) deallocate(newflag%iarray1) 
+          if ( Agrif_probdim .EQ. 2 ) deallocate(newflag%iarray2) 
+          if ( Agrif_probdim .EQ. 3 ) deallocate(newflag%iarray3) 
+          Return 
+      endif       
+C      
+      do iii = 1 , Agrif_probdim
+         newrect % imin(iii) = 1
+         newrect % imax(iii) = sx(iii)
+      enddo
+C      
+      Call Agrif_Clusternd(newflag,
+     &                     coarsegrid%childgrids,newrect) 
+C      
+      if ( Agrif_probdim .EQ. 1 ) deallocate(newflag%iarray1)
+      if ( Agrif_probdim .EQ. 2 ) deallocate(newflag%iarray2)
+      if ( Agrif_probdim .EQ. 3 ) deallocate(newflag%iarray3)
+C  
+C    
+      End Subroutine Agrif_ClusterGridnD
+C
+C     **************************************************************************
+CCC   Subroutine Agrif_ClusternD
+C     **************************************************************************
+C
+      Recursive subroutine Agrif_Clusternd(flag,boxlib,oldB) 
+C
+CCC   Description:
+CCC   Clustering on the grid pointed by oldB.
+C
+CC    Method:
+CC            
+C
+C     Declarations:
+C
+C     Arguments  
+      TYPE(Agrif_rectangle) ::  oldB    
+      TYPE(Agrif_Variable)  :: flag
+c      INTEGER,DIMENSION(oldB%imin(1):oldB%imax(1),
+c     &                  oldB%imin(2):oldB%imax(2)) :: flag
+      TYPE(Agrif_lrectangle),pointer :: boxlib      
+C
+C     Local variables      
+      TYPE(Agrif_lrectangle),pointer :: tempbox,parcbox,parcbox2       
+      TYPE(Agrif_rectangle) :: newB,newB2
+      INTEGER :: i,j,k,iii
+      INTEGER,DIMENSION(:),allocatable :: i_sig 
+      INTEGER,DIMENSION(:),allocatable :: j_sig       
+      INTEGER,DIMENSION(:),allocatable :: k_sig       
+      INTEGER,DIMENSION(3) :: ipu,ipl
+      INTEGER,DIMENSION(3) :: istr,islice
+      REAL :: cureff
+      REAL :: neweff
+      INTEGER :: ValMax,ValSum,TailleTab
+      INTEGER :: nbpoints,nbpointsflag  
+      LOGICAL :: test
+C          
+      allocate(i_sig(oldB%imin(1):oldB%imax(1)))
+      if ( Agrif_probdim .GE. 2 ) 
+     & allocate(j_sig(oldB%imin(2):oldB%imax(2)))
+      if ( Agrif_probdim .EQ. 3 ) 
+     & allocate(k_sig(oldB%imin(3):oldB%imax(3)))
+C
+      test = .FALSE.
+      do iii = 1 , Agrif_probdim
+         test = test .OR. ( (oldB%imax(iii)-oldB%imin(iii)+1) 
+     &                    .LT. Agrif_Minwidth)
+      enddo
+      if ( test ) Return
+C     
+      if ( Agrif_probdim .EQ. 1 ) i_sig = flag%iarray1
+      if ( Agrif_probdim .EQ. 2 ) then
+         do i = oldB%imin(1),oldB%imax(1)
+           i_sig(i) = SUM(flag%iarray2(i,
+     &                            oldB%imin(2):oldB%imax(2)))
+         enddo
+         do j = oldB%imin(2),oldB%imax(2)
+           j_sig(j) = SUM(flag%iarray2(
+     &                            oldB%imin(1):oldB%imax(1),j))
+         enddo      
+      endif
+      if ( Agrif_probdim .EQ. 3 ) then
+         do i = oldB%imin(1),oldB%imax(1)
+            i_sig(i) = SUM(flag%iarray3(i,
+     &                            oldB%imin(2):oldB%imax(2),
+     &                            oldB%imin(3):oldB%imax(3)))
+         enddo
+         do j = oldB%imin(2),oldB%imax(2)
+            j_sig(j) = SUM(flag%iarray3(
+     &                          oldB%imin(1):oldB%imax(1),j,
+     &                          oldB%imin(3):oldB%imax(3)))
+         enddo
+         do k = oldB%imin(3),oldB%imax(3)
+            k_sig(k) = SUM(flag%iarray3(
+     &                          oldB%imin(1):oldB%imax(1),
+     &                          oldB%imin(2):oldB%imax(2),k))
+         enddo      
+      endif
+C                    
+      do iii = 1 , Agrif_probdim
+         ipl(iii) = oldB%imin(iii)
+         ipu(iii) = oldB%imax(iii)
+      enddo
+C           
+      Call Agrif_Clusterprune(i_sig,ipl(1),ipu(1)) 
+      if ( Agrif_probdim .GE. 2 ) 
+     &   Call Agrif_Clusterprune(j_sig,ipl(2),ipu(2))      
+      if ( Agrif_probdim .EQ. 3 ) 
+     &   Call Agrif_Clusterprune(k_sig,ipl(3),ipu(3))      
+C     
+      test = .TRUE.
+      do iii = 1 , Agrif_probdim
+         test = test .AND. (ipl(iii).EQ.oldB%imin(iii))
+         test = test .AND. (ipu(iii).EQ.oldB%imax(iii))
+      enddo
+      
+      if (.NOT. test) then 
+          do iii = 1 , Agrif_probdim
+             newB%imin(iii) = ipl(iii)
+             newB%imax(iii) = ipu(iii)
+          enddo
+C        
+          if ( Agrif_probdim .EQ. 1 ) 
+     &       nbpoints = SUM(flag%iarray1(newB%imin(1):newB%imax(1)))   
+          if ( Agrif_probdim .EQ. 2 ) 
+     &       nbpoints = SUM(flag%iarray2(newB%imin(1):newB%imax(1),
+     &                           newB%imin(2):newB%imax(2)))   
+          if ( Agrif_probdim .EQ. 3 ) 
+     &       nbpoints = SUM(flag%iarray3(newB%imin(1):newB%imax(1),
+     &                           newB%imin(2):newB%imax(2),   
+     &                           newB%imin(3):newB%imax(3)))
+C   
+          if ( Agrif_probdim .EQ. 1 ) 
+     &       TailleTab = newB%imax(1)-newB%imin(1)+1
+          if ( Agrif_probdim .EQ. 2 ) 
+     &       TailleTab = (newB%imax(1)-newB%imin(1)+1)*
+     &                   (newB%imax(2)-newB%imin(2)+1)
+          if ( Agrif_probdim .EQ. 3 ) 
+     &       TailleTab = (newB%imax(1)-newB%imin(1)+1)*
+     &                   (newB%imax(2)-newB%imin(2)+1)*
+     &                   (newB%imax(3)-newB%imin(3)+1)
+C
+          neweff = REAL(nbpoints)/TailleTab
+C     
+          if (nbpoints.GT.0) then
+C        
+              if ((neweff .GT .Agrif_efficiency)) then
+                  Call Agrif_Add_Rectangle(newB,boxlib)
+                  Return
+              else
+C            
+                  tempbox => boxlib
+                  newB2 = newB
+                  Call Agrif_Clusternd(flag,
+     &                      boxlib,newB)
+C     
+C                 Compute new efficiency
+C
+                  cureff = neweff
+                  parcbox2 => boxlib
+                  nbpoints = 0
+                  nbpointsflag = 0
+C
+                  do While (associated(parcbox2))
+                    if (associated(parcbox2,tempbox)) Exit
+                    newB = parcbox2%r
+C
+                    if ( Agrif_probdim .EQ. 1 ) Valsum = 
+     &                                 SUM(flag%iarray1(
+     &                                 newB%imin(1):newB%imax(1)))
+                    if ( Agrif_probdim .EQ. 2 ) Valsum = 
+     &                                 SUM(flag%iarray2(
+     &                                 newB%imin(1):newB%imax(1),
+     &                                 newB%imin(2):newB%imax(2)))
+                    if ( Agrif_probdim .EQ. 3 ) Valsum = 
+     &                                 SUM(flag%iarray3(
+     &                                 newB%imin(1):newB%imax(1),
+     &                                 newB%imin(2):newB%imax(2),
+     &                                 newB%imin(3):newB%imax(3)))
+C
+                    nbpointsflag = nbpointsflag + ValSum
+                    if ( Agrif_probdim .EQ. 1 ) 
+     &                 TailleTab = newB%imax(1)-newB%imin(1)+1
+                    if ( Agrif_probdim .EQ. 2 ) 
+     &                 TailleTab = (newB%imax(1)-newB%imin(1)+1)*
+     &                             (newB%imax(2)-newB%imin(2)+1)
+                    if ( Agrif_probdim .EQ. 3 ) 
+     &                 TailleTab = (newB%imax(1)-newB%imin(1)+1)*
+     &                             (newB%imax(2)-newB%imin(2)+1)*
+     &                             (newB%imax(3)-newB%imin(3)+1)
+                    nbpoints = nbpoints + TailleTab
+                    parcbox2 => parcbox2%next  
+                  enddo  
+C coefficient 1.05 avant 1.15 possibilité de laisser choix à l utilisateur
+                  if  (REAL(nbpointsflag)/REAL(nbpoints)
+     &                 .LT.(1.0001*cureff)) then
+                      parcbox2 => boxlib            
+                      do While (associated(parcbox2))
+                        if (associated(parcbox2,tempbox)) Exit
+                        deallocate(parcbox2%r)
+                        parcbox2 => parcbox2%next             
+                      enddo      
+                      boxlib => tempbox
+                      Call Agrif_Add_Rectangle(newB2,boxlib)
+                      Return
+                  endif
+              endif         
+          endif
+          Return
+      endif 
+C       
+      do iii = 1 , Agrif_Probdim
+         istr(iii) = oldB%imax(iii)
+         islice(iii) = oldB%imin(iii)
+      enddo     
+C      
+      Call Agrif_Clusterslice(i_sig,islice(1),istr(1)) 
+      if ( Agrif_probdim .GE. 2 ) 
+     & Call Agrif_Clusterslice(j_sig,islice(2),istr(2)) 
+      if ( Agrif_probdim .EQ. 3 ) 
+     & Call Agrif_Clusterslice(k_sig,islice(3),istr(3)) 
+C      
+      ValSum = 0
+      do iii = 1 , Agrif_Probdim
+         Valsum = valSum + islice(iii)
+      enddo
+C      
+      if ( Valsum .EQ. -Agrif_Probdim ) then 
+          Call Agrif_Add_Rectangle(oldB,boxlib) 
+          Return 
+      endif 
+C       
+      nullify(tempbox)
+      tempbox => boxlib
+      if ( Agrif_probdim .EQ. 1 ) 
+     &      cureff  = oldB%imax(1)-oldB%imin(1)+1
+      if ( Agrif_probdim .EQ. 2 ) 
+     &      cureff  = (oldB%imax(1)-oldB%imin(1)+1)*
+     &                (oldB%imax(2)-oldB%imin(2)+1)
+      if ( Agrif_probdim .EQ. 3 ) 
+     &       cureff = (oldB%imax(1)-oldB%imin(1)+1)*
+     &                (oldB%imax(2)-oldB%imin(2)+1)*
+     &                (oldB%imax(3)-oldB%imin(3)+1)
+      Nullify(parcbox)
+C 
+      do iii = 1 , Agrif_Probdim
+          newB%imax(iii) = oldB%imax(iii)            
+          newB%imin(iii) = oldB%imin(iii)
+      enddo     
+C
+      ValMax = 0
+      do iii = 1 , Agrif_Probdim
+         ValMax = Max(ValMax,istr(iii))
+      enddo
+C
+      if (istr(1) .EQ. ValMax ) then
+          newB%imax(1) = islice(1)
+          Call Agrif_Add_Rectangle(newB,parcbox)                   
+          newB%imin(1) = islice(1)+1
+          newB%imax(1) = oldB%imax(1)
+          Call Agrif_Add_Rectangle(newB,parcbox)
+      elseif ( Agrif_probdim .GE. 2 ) then
+         if (istr(2) .EQ. ValMax ) then
+            newB%imax(2) = islice(2)
+            Call Agrif_Add_Rectangle(newB,parcbox)
+            newB%imin(2) = islice(2)+1
+            newB%imax(2) = oldB%imax(2)
+            Call Agrif_Add_Rectangle(newB,parcbox)
+         elseif ( Agrif_probdim .EQ. 3 ) then
+            newB%imax(3) = islice(3)
+            Call Agrif_Add_Rectangle(newB,parcbox)
+            newB%imin(3) = islice(3)+1
+            newB%imax(3) = oldB%imax(3)
+            Call Agrif_Add_Rectangle(newB,parcbox)
+         endif
+      endif
+C      
+      do While (associated(parcbox))
+        newB = parcbox%r            
+C
+        if ( Agrif_probdim .EQ. 1 ) nbpoints = 
+     &                                 SUM(flag%iarray1(
+     &                                 newB%imin(1):newB%imax(1)))
+        if ( Agrif_probdim .EQ. 2 ) nbpoints = 
+     &                                 SUM(flag%iarray2(
+     &                                 newB%imin(1):newB%imax(1),
+     &                                 newB%imin(2):newB%imax(2)))
+        if ( Agrif_probdim .EQ. 3 ) nbpoints = 
+     &                                 SUM(flag%iarray3(
+     &                                 newB%imin(1):newB%imax(1),
+     &                                 newB%imin(2):newB%imax(2),
+     &                                 newB%imin(3):newB%imax(3)))
+C      
+       if ( Agrif_probdim .EQ. 1 ) 
+     &                 TailleTab = newB%imax(1)-newB%imin(1)+1
+       if ( Agrif_probdim .EQ. 2 ) 
+     &                 TailleTab = (newB%imax(1)-newB%imin(1)+1)*
+     &                             (newB%imax(2)-newB%imin(2)+1)
+       if ( Agrif_probdim .EQ. 3 ) 
+     &                 TailleTab = (newB%imax(1)-newB%imin(1)+1)*
+     &                             (newB%imax(2)-newB%imin(2)+1)*
+     &                             (newB%imax(3)-newB%imin(3)+1)
+
+        neweff = REAL(nbpoints) / TailleTab
+C     
+        if (nbpoints .GT. 0) then
+C      
+            if ((neweff .GT .Agrif_efficiency)) then
+                Call Agrif_Add_Rectangle(newB,boxlib)
+            else
+                tempbox => boxlib
+                newB2 = newB
+                Call Agrif_Clusternd(flag,
+     &                      boxlib,newB)
+C
+C               Compute new efficiency
+C
+                cureff = neweff
+                parcbox2 => boxlib
+                nbpoints = 0
+                nbpointsflag = 0
+C
+                do While (associated(parcbox2))
+                  if (associated(parcbox2,tempbox)) Exit
+                  newB = parcbox2%r
+C
+                  if ( Agrif_probdim .EQ. 1 ) ValSum = 
+     &                                 SUM(flag%iarray1(
+     &                                 newB%imin(1):newB%imax(1)))
+                  if ( Agrif_probdim .EQ. 2 ) ValSum = 
+     &                                 SUM(flag%iarray2(
+     &                                 newB%imin(1):newB%imax(1),
+     &                                 newB%imin(2):newB%imax(2)))
+                  if ( Agrif_probdim .EQ. 3 ) ValSum = 
+     &                                 SUM(flag%iarray3(
+     &                                 newB%imin(1):newB%imax(1),
+     &                                 newB%imin(2):newB%imax(2),
+     &                                 newB%imin(3):newB%imax(3)))
+C
+                  nbpointsflag = nbpointsflag + ValSum
+C
+                    if ( Agrif_probdim .EQ. 1 ) 
+     &                 TailleTab = newB%imax(1)-newB%imin(1)+1
+                    if ( Agrif_probdim .EQ. 2 ) 
+     &                 TailleTab = (newB%imax(1)-newB%imin(1)+1)*
+     &                             (newB%imax(2)-newB%imin(2)+1)
+                    if ( Agrif_probdim .EQ. 3 ) 
+     &                 TailleTab = (newB%imax(1)-newB%imin(1)+1)*
+     &                             (newB%imax(2)-newB%imin(2)+1)*
+     &                             (newB%imax(3)-newB%imin(3)+1)
+
+                  nbpoints = nbpoints + TailleTab
+C              
+                  parcbox2 => parcbox2%next  
+                enddo   
+C            
+                if  (REAL(nbpointsflag)/REAL(nbpoints)
+     &               .LT.(1.15*cureff)) then
+                    parcbox2 => boxlib            
+                    do While (associated(parcbox2))
+                      if (associated(parcbox2,tempbox)) Exit
+                      deallocate(parcbox2%r)
+                      parcbox2 => parcbox2%next             
+                    enddo
+                    boxlib => tempbox
+                    Call Agrif_Add_Rectangle(newB2,boxlib)
+                endif
+            endif
+        endif
+        parcbox => parcbox%next
+      enddo
+C      
+C      
+      Return
+C      
+      End Subroutine Agrif_Clusternd 
+C
+C     **************************************************************************
+CCC   Subroutine Agrif_Clusterslice
+C     **************************************************************************
+C                           
+      Subroutine Agrif_Clusterslice(sig,slice,str) 
+C
+C
+CCC   Description:
+CCC   
+C
+CC    Method:
+CC            
+C
+C     Declarations:
+C
+C     Arguments 
+      INTEGER                      :: slice,str
+      INTEGER,DIMENSION(slice:str) :: sig 
+C
+C     Local variables      
+      INTEGER                      :: ideb,ifin
+      INTEGER                      :: i,t,a,di,ts 
+      INTEGER,DIMENSION(slice:str) :: lap 
+C
+C    
+      ideb = slice
+      ifin = str
+C    
+      if (SIZE(sig) <= 2*Agrif_Minwidth) then
+          str = -1 
+          slice = -1 
+          Return
+      endif
+C      
+      t = -1 
+      a = -1 
+C
+      do i = ideb+Agrif_Minwidth-1,ifin-Agrif_Minwidth
+          if (sig(i) .EQ. 0) then
+              if ((i-ideb) < (ifin-i)) then
+                  di = i - ideb
+                else 
+                  di = ifin - i 
+              endif
+C
+              if (di > t) then
+                a = i 
+                t = di 
+              endif
+         endif
+      enddo
+C      
+      if (a .NE. (-1)) then
+          slice = a 
+          str = t 
+          Return
+      endif
+C      
+      t = -1 
+      a = -1 
+C      
+      do i = ideb+1,ifin-1 
+        lap(i) = sig(i+1) + sig(i-1) - 2*sig(i) 
+      enddo
+C      
+      do i = ideb + Agrif_Minwidth-1,ifin-Agrif_Minwidth
+        if ((lap(i+1)*lap(i)) .LE. 0) then
+            ts = ABS(lap(i+1) - lap(i)) 
+            if (ts > t) then
+                t = ts 
+                a = i
+            endif
+       endif
+      enddo
+C      
+      if (a .EQ. (ideb + Agrif_Minwidth - 1)) then
+          a = -1
+          t = -1
+      endif
+C      
+      slice = a 
+      str = t 
+C
+C      
+      End Subroutine Agrif_Clusterslice       
+C
+C
+C    
+C     **************************************************************************
+CCC   Subroutine Agrif_Clusterprune
+C     **************************************************************************
+C      
+      Subroutine Agrif_Clusterprune(sig,pl,pu) 
+C
+C
+CCC   Description:
+CCC   
+C
+CC    Method:
+CC            
+C
+C     Declarations:
+C
+C     Arguments
+      INTEGER                  :: pl,pu 
+      INTEGER,DIMENSION(pl:pu) :: sig
+C
+C     Local variables      
+      INTEGER :: ideb,ifin       
+      INTEGER :: diff,addl,addu,udist,ldist  
+C
+C      
+      ideb = pl
+      ifin = pu
+C      
+      if (SIZE(sig) <= Agrif_Minwidth) then
+          return 
+      endif 
+C       
+      do While ((sig(pl) .EQ. 0) .AND. (pl < ifin)) 
+        pl = pl + 1 
+      enddo 
+C       
+      do While ((sig(pu) .EQ. 0) .AND. (pu > ideb)) 
+        pu = pu - 1 
+      enddo 
+C       
+      if ((pu-pl) < Agrif_Minwidth) then
+          diff = Agrif_Minwidth - (pu - pl + 1) 
+          udist = ifin - pu 
+          ldist = pl - ideb
+          addl = diff / 2 
+          addu = diff - addl 
+          if (addu > udist) then
+              addu = udist 
+              addl = diff - addu 
+          endif
+C         
+          if (addl > ldist) then
+              addl = ldist 
+              addu = diff - addl
+          endif
+C         
+          pu = pu + addu 
+          pl = pl - addl         
+C      
+      endif 
+C       
+C
+      End Subroutine Agrif_Clusterprune
+C
+C
+C              
+C     **************************************************************************
+CCC   Subroutine Agrif_Add_Rectangle 
+C     **************************************************************************
+C        
+      Subroutine Agrif_Add_Rectangle(R,LR)
+C
+CCC   Description:
+CCC   Subroutine to add the Agrif_Rectangle R in a list managed by LR.
+C
+C     Declarations:
+C
+C     Arguments               
+      TYPE(AGRIF_rectangle)           :: R  
+      TYPE(AGRIF_lrectangle), Pointer :: LR
+C
+C     Local variable        
+      TYPE(AGRIF_lrectangle), Pointer :: newrect  
+C
+      INTEGER                         :: iii 
+C
+C        
+      allocate(newrect)
+      allocate(newrect % r)
+C
+      newrect % r = R
+C      
+      do iii = 1 , Agrif_Probdim
+         newrect % r % spaceref(iii) = Agrif_Coeffref(iii)
+         newrect % r % timeref(iii) = Agrif_Coeffreft(iii)
+      enddo
+C              
+      newrect % r % number = -1            
+      Nullify(newrect % r % childgrids)
+      newrect % next => LR  
+      LR => newrect  
+C
+C      
+      End Subroutine Agrif_Add_Rectangle   
+C  
+C
+C  
+C     **************************************************************************
+CCC   Subroutine Agrif_Read_Fix_Grd  
+C     **************************************************************************
+C      
+      Recursive Subroutine Agrif_Read_Fix_Grd(coarsegrid,j,nunit)
+C
+CCC   Description:
+CCC   Subroutine to create the grid hierarchy from the reading of the 
+CCC   AGRIF_FixedGrids.in file.
+C
+CC    Method:
+CC    Recursive subroutine and creation of a first grid hierarchy from the
+CC    reading of the AGRIF_FixedGrids.in file.        
+C
+C     Declarations:
+C
+C     Pointer argument      
+      TYPE(AGRIF_rectangle), Pointer   :: coarsegrid ! Pointer on the first grid
+                                                     ! of the grid hierarchy
+C                                    
+C     Scalar arguments                                    
+      INTEGER                          :: j          ! Number of the new grid
+      INTEGER                          :: nunit      ! unit associated with file
+C      
+C     Local variables      
+      TYPE(AGRIF_rectangle)            :: newrect    ! Pointer on a new grid   
+      TYPE(AGRIF_lrectangle), Pointer  :: parcours   ! Pointer for the recursive
+                                                     !    procedure
+      TYPE(AGRIF_lrectangle), Pointer  :: newlrect
+      TYPE(AGRIF_lrectangle), Pointer  :: end_list       
+      INTEGER                          :: i          ! for each child grid
+      INTEGER                          :: nb_grids   ! Number of child grids
+      INTEGER                          :: iii
+C          
+C
+      Nullify(newrect%childgrids)
+C      
+C     Reading of the number of child grids        
+      read(nunit,*) nb_grids
+C      
+C     coarsegrid%nbgridchild = nb_grids
+C      
+      allocate(end_list)
+C
+      nullify(end_list % r)
+      nullify(end_list % next)
+C      
+      coarsegrid % childgrids => end_list
+C
+C     Reading of imin(1),imax(1),imin(2),imax(2),imin(3),imax(3), and space and
+C        time refinement factors for each child grid.
+C     Creation and addition of the new grid to the grid hierarchy. 
+C
+      do i = 1,nb_grids
+        allocate(newlrect)      
+        newrect % number = j   ! Number of the grid
+C
+        if ( Agrif_USE_ONLY_FIXED_GRIDS .EQ. 0 ) then
+           if (Agrif_Probdim == 3) then  
+            read(nunit,*) newrect % imin(1), newrect % imax(1),
+     &                    newrect % imin(2), newrect % imax(2),
+     &                    newrect % imin(3), newrect % imax(3),
+     &                    newrect % spaceref(1),newrect % spaceref(2),
+     &                    newrect % spaceref(3),
+     &                    newrect % timeref(1),newrect % timeref(2),
+     &                    newrect % timeref(3)
+           elseif (Agrif_Probdim == 2) then            
+            read(nunit,*) newrect % imin(1),newrect % imax(1),
+     &                  newrect % imin(2),newrect % imax(2),
+     &                    newrect % spaceref(1),newrect % spaceref(2),
+     &                    newrect % timeref(1),newrect % timeref(2)
+           elseif (Agrif_Probdim == 1) then
+            read(nunit,*) newrect % imin(1), newrect % imax(1),
+     &                    newrect % spaceref(1),
+     &                    newrect % timeref(1)
+           endif
+        else
+           if (Agrif_Probdim == 3) then  
+            read(nunit,*) newrect % imin(1), newrect % imax(1),
+     &                    newrect % imin(2), newrect % imax(2),
+     &                    newrect % imin(3), newrect % imax(3),
+     &                    newrect % spaceref(1),newrect % spaceref(2),
+     &                    newrect % spaceref(3),
+     &                    newrect % timeref(1)
+           elseif (Agrif_Probdim == 2) then            
+            read(nunit,*) newrect % imin(1),newrect % imax(1),
+     &                  newrect % imin(2),newrect % imax(2),
+     &                    newrect % spaceref(1),newrect % spaceref(2),
+     &                    newrect % timeref(1)
+           elseif (Agrif_Probdim == 1) then
+            read(nunit,*) newrect % imin(1), newrect % imax(1),
+     &                    newrect % spaceref(1),
+     &                    newrect % timeref(1)
+           endif
+C
+           if ( Agrif_probdim .GE. 2 ) then
+              do iii = 2 , Agrif_probdim
+                 newrect % timeref(iii) = newrect % timeref(1) 
+              enddo
+           endif
+C
+        endif
+C
+C       Addition to the grid hierarchy
+C
+        nullify(newrect % childgrids)
+        j = j + 1
+        Allocate(newlrect%r)
+        newlrect % r = newrect 
+        nullify(newlrect % next)
+        end_list % next => newlrect
+        end_list => end_list % next
+      enddo
+C      
+      coarsegrid % childgrids => coarsegrid % childgrids % next
+      parcours => coarsegrid % childgrids
+C
+C     Recursive operation to create the grid hierarchy branch by branch
+C
+      do while (associated(parcours))
+        call Agrif_Read_Fix_Grd (parcours % r,j,nunit)
+        parcours => parcours % next
+      enddo
+C      
+C
+      End Subroutine Agrif_Read_Fix_Grd        
+C        
+C 
+C
+C     **************************************************************************
+CCC   Subroutine Agrif_Create_Grids  
+C     **************************************************************************
+C
+      Recursive Subroutine Agrif_Create_Grids(g,coarsegrid)
+C
+CCC   Description:
+CCC   Subroutine to create the grid hierarchy (g) from the one created with the
+CCC   Agrif_Read_Fix_Grd or Agrif_Cluster_All procedures (coarsegrid).
+C
+CC    Method:
+CC    Recursive subroutine.        
+C
+C     Declarations:
+C
+C     Pointer arguments        
+      TYPE(AGRIF_grid)     , Pointer  :: g          ! Pointer on the root coarse
+                                                    ! grid
+      TYPE(AGRIF_rectangle), Pointer  :: coarsegrid ! Pointer on the root coarse
+                                                    ! grid of the grid hierarchy
+                                                    ! created with the
+                                                    ! Agrif_Read_Fix_Grd
+                                                    ! subroutine
+C
+C     Local pointers
+      TYPE(Agrif_grid)      , Pointer :: newgrid    ! New grid
+      TYPE(Agrif_pgrid)     , Pointer :: newpgrid
+      TYPE(Agrif_pgrid)     , Pointer :: parcours2
+      TYPE(Agrif_lrectangle), Pointer :: parcours
+      TYPE(Agrif_pgrid)     , Pointer :: end_list
+      TYPE(Agrif_pgrid)     , Pointer :: parcours3
+C
+C     Local scalars      
+      LOGICAL                         :: nullliste
+      INTEGER                         :: iii
+      INTEGER                         :: moving_grid_id = 0      
+
+C
+      parcours3 => g % child_grids
+C     
+      if (associated(parcours3)) then
+          do While (associated(parcours3 % next))
+            parcours3 => parcours3 % next
+          enddo
+          end_list => parcours3
+          nullliste=.FALSE.
+        else
+          allocate(end_list)
+          nullify(end_list % gr)
+          nullify(end_list % next)      
+          g % child_grids => end_list 
+          parcours3 => end_list      
+          nullliste=.TRUE.
+      endif
+C      
+      parcours => coarsegrid % childgrids
+C      
+C     Creation of the grid hierarchy from the one created by using the 
+C     Agrif_Read_Fix_Grd subroutine 
+C
+      do while (associated(parcours))
+        allocate(newgrid)        
+        moving_grid_id=moving_grid_id+1
+        newgrid % grid_id = moving_grid_id
+        do iii = 1 , Agrif_Probdim
+           newgrid % spaceref(iii) = parcours % r % spaceref(iii)
+           newgrid % timeref(iii) = parcours % r % timeref(iii)
+        enddo
+C
+        do iii = 1 , Agrif_Probdim
+          newgrid % nb(iii) = (parcours % r % imax(iii) 
+     &                       - parcours % r % imin(iii)) 
+     &                       * parcours % r % spaceref(iii)
+C     
+          newgrid % ix(iii) =  parcours % r % imin(iii)
+C
+          newgrid % Agrif_d(iii) = g % Agrif_d(iii) 
+     &                  / REAL(newgrid % spaceref(iii))
+C
+          newgrid % Agrif_x(iii) = g % Agrif_x(iii) +
+     &      (parcours % r % imin(iii) - 1)* g % Agrif_d(iii)
+C      
+        enddo
+C
+C       Pointer on the parent grid                        
+C
+        newgrid % parent => g      
+
+C       Level of the current grid
+        newgrid % level = newgrid % parent % level + 1
+        if (newgrid % level > Agrif_MaxLevelLoc) then
+          Agrif_MaxLevelLoc = newgrid%level
+        endif
+
+C      
+C       Grid pointed by newgrid is a fixed grid      
+C
+        if (parcours % r % number .GT. 0) then      
+            newgrid % fixed = .true.  
+          else
+            newgrid % fixed = .false.
+        endif
+C
+C       Number of the grid pointed by newgrid
+        newgrid % fixedrank = parcours % r % number
+C           
+C       No time calculation on this grid         
+        newgrid % ngridstep = 0      
+C
+C       Test indicating if the current grid has a common border with the root 
+C       coarse grid in the x direction
+        do iii = 1 , Agrif_Probdim
+           newgrid % NearRootBorder(iii) = .FALSE.
+C        
+           if ((newgrid % parent % NearRootBorder(iii)) .AND. 
+     &         (newgrid % ix(iii) == 1)) then
+               newgrid % NearRootBorder(iii) = .TRUE.
+           endif
+C
+           newgrid % DistantRootBorder(iii) = .FALSE.
+C 
+           if ((newgrid % parent % DistantRootBorder(iii)) .AND. 
+     &         (newgrid % ix(iii) + 
+     &         (newgrid % nb(iii)/newgrid % spaceref(iii))  
+     &          - 1  == newgrid % parent % nb(iii))) then
+               newgrid % DistantRootBorder(iii) = .TRUE.
+           endif
+        enddo
+C
+C       Writing in output files
+C
+        newgrid % oldgrid = .FALSE.      
+C
+C     
+C       Definition of the CHARACTERistics of the variable of the grid pointed by
+C       newgrid 
+        Call Agrif_Create_Var (newgrid)
+C      
+C       Instanciation of the grid pointed by newgrid and its variables
+        Call Agrif_Instance (newgrid)
+C       
+C       Nullify the variable of the grid pointed by newgrid
+C
+C
+C       Addition of this grid to the grid hierarchy 
+C      
+        nullify(newgrid % child_grids)
+        allocate(newpgrid)  
+        newpgrid % gr => newgrid
+        nullify(newpgrid % next)
+        end_list % next => newpgrid
+        end_list => end_list % next               
+        parcours => parcours % next
+C
+C       Updating the total number of fixed grids
+        if (newgrid % fixed) then
+            AGRIF_nbfixedgrids = AGRIF_nbfixedgrids + 1
+        endif
+C                  
+      enddo
+C
+C
+      if (nullliste) then
+          g % child_grids => g % child_grids % next
+          parcours2 => g % child_grids
+          deallocate(parcours3)
+        else
+          parcours2 => parcours3 % next
+      endif
+C      
+      parcours => coarsegrid % childgrids
+C
+C     Recursive call to the subroutine Agrif_Create_Fixed_Grids to create the
+C     grid hierarchy
+C      
+      do while (associated(parcours))
+        Call Agrif_Create_Grids (parcours2 % gr,parcours % r)
+        parcours => parcours % next
+        parcours2 => parcours2 % next
+      enddo 
+C      
+      Return      
+C                  
+      End Subroutine Agrif_Create_Grids
+C
+C      
+C
+C     **************************************************************************
+CCC   Subroutine Agrif_Init_Hierarchy  
+C     **************************************************************************
+C
+      Recursive Subroutine Agrif_Init_Hierarchy(g) 
+C
+CCC   Description:
+CCC   Subroutine to initialize all the grids except the root coarse grid (this 
+CCC   one, pointed by AGRIF_mygrid, is initialized by the subroutine 
+CCC   Agrif_Init_Grids defi ned in the module Agrif_Util and called in the main 
+CCC   program ). 
+C
+CC    Method:
+CC    Recursive subroutine.        
+C
+C     Declarations:
+C
+C     Pointer argument      
+      TYPE(AGRIF_grid), Pointer  :: g         ! Pointer on the root coarse grid 
+C      
+C     Local variables      
+      TYPE(AGRIF_pgrid), Pointer :: parcours  ! Pointer for the recursive call
+      LOGICAL                    :: Init_Hierarchy
+C      
+C
+      parcours=>g%child_grids
+C      
+      do while (associated(parcours))
+        Init_Hierarchy = .false.
+        if ( AGRIF_USE_FIXED_GRIDS .EQ. 1 .OR. 
+     &       AGRIF_USE_ONLY_FIXED_GRIDS .EQ. 1 ) then
+           if ((parcours%gr%fixed) 
+     &         .AND. (Agrif_mygrid%ngridstep == 0)) then
+              Init_Hierarchy = .true.
+           endif      
+       endif
+C
+       if (.NOT. parcours%gr%fixed) Init_Hierarchy = .true.
+       if (parcours % gr % oldgrid) Init_Hierarchy = .false.
+C
+       if (Init_Hierarchy) then 
+C
+C           Instanciation of the grid pointed by parcours%gr and its variables 
+            Call Agrif_Instance (parcours % gr)
+C    
+C           Allocation of the arrays containing values of the variables of the
+C           grid pointed by parcours%gr      
+C      
+            Call Agrif_Allocation (parcours % gr)   
+C            
+            Call Agrif_initialisations(parcours % gr)              
+C       
+            Call Agrif_Instance(parcours % gr)
+C
+            if ( Agrif_USE_ONLY_FIXED_GRIDS .EQ. 0 ) then
+              Call Agrif_Allocate_Restore (parcours % gr)
+            endif
+C
+            if ( Agrif_USE_ONLY_FIXED_GRIDS .EQ. 0 ) then
+C              Initialization by copy of the grids created by clustering 
+               Call AGRIF_CopyFromold_All (parcours%gr,
+     &                                     Agrif_oldmygrid)
+            endif
+C
+C           Initialization by interpolation 
+C           (this routine is written by the user) 
+            Call Agrif_InitValues()
+C
+            if ( Agrif_USE_ONLY_FIXED_GRIDS .EQ. 0 ) then
+               Call Agrif_Free_Restore (parcours % gr)
+            endif
+C
+       endif                                  
+       parcours => parcours % next 
+C         
+      enddo
+C
+      parcours => g % child_grids
+C      
+C     Recursive operation to initialize all the grids
+      do while (associated(parcours))
+        Call Agrif_Init_Hierarchy (parcours%gr)
+        parcours => parcours%next
+      enddo
+C      
+      End Subroutine Agrif_Init_Hierarchy 
+C
+C     **************************************************************************
+CCC   Subroutine Agrif_Allocate_Restore  
+C     **************************************************************************
+C
+      Subroutine Agrif_Allocate_Restore(Agrif_Gr)
+C      
+C      
+C     Modules used:
+C
+      TYPE(AGRIF_grid), Pointer  :: Agrif_Gr   ! Pointer on the root coarse grid
+C     
+      INTEGER                    :: i
+C
+        do i = 1 , Agrif_NbVariables
+            if ( Agrif_Mygrid%tabvars(i)%var % restaure ) then
+            if ( Agrif_Gr%tabvars(i)%var % nbdim .EQ. 1 ) then    
+            Allocate( Agrif_Gr%tabvars(i)%var%  
+     &    Restore1D(lbound(Agrif_Gr%tabvars(i)%var%array1,1) 
+     &    :ubound(Agrif_Gr%tabvars(i)%var%array1,1))) 
+            Agrif_Gr%tabvars(i)%var%Restore1D = 0
+C
+            endif
+            if ( Agrif_Gr%tabvars(i)%var % nbdim .EQ. 2 ) then
+            Allocate( Agrif_Gr%tabvars(i)%var%Restore2D(  
+     &      lbound(Agrif_Gr%tabvars(i)%var%array2,1):         
+     &      ubound(Agrif_Gr%tabvars(i)%var%array2,1),         
+     &      lbound(Agrif_Gr%tabvars(i)%var%array2,2)          
+     &      :ubound(Agrif_Gr%tabvars(i)%var%array2,2)))         
+            Agrif_Gr%tabvars(i)%var%Restore2D = 0
+C
+            endif
+            if ( Agrif_Mygrid%tabvars(i)%var % nbdim .EQ. 3 ) then
+C     
+            Allocate( Agrif_Gr%tabvars(i)%var%Restore3D( 
+     &      lbound(Agrif_Gr%tabvars(i)%var%array3,1):        
+     &      ubound(Agrif_Gr%tabvars(i)%var%array3,1),        
+     &      lbound(Agrif_Gr%tabvars(i)%var%array3,2):        
+     &      ubound(Agrif_Gr%tabvars(i)%var%array3,2),        
+     &      lbound(Agrif_Gr%tabvars(i)%var%array3,3):        
+     &      ubound(Agrif_Gr%tabvars(i)%var%array3,3)))  
+            Agrif_Gr%tabvars(i)%var%Restore3D = 0
+            endif
+C 
+            endif
+          enddo
+C
+      Return
+C
+C      
+      End Subroutine Agrif_Allocate_Restore      
+C
+C
+C
+C
+C     **************************************************************************
+CCC   Subroutine Agrif_Free_Restore  
+C     **************************************************************************
+C
+      Subroutine Agrif_Free_Restore(Agrif_Gr)
+C
+C      
+C     Pointer argument      
+      TYPE(AGRIF_grid), Pointer  :: Agrif_Gr   ! Pointer on the root coarse grid
+      INTEGER :: i     
+C
+      do i = 1 , Agrif_NbVariables
+         if ( Agrif_Mygrid % tabvars(i) % var % restaure) then
+C  
+            if (associated(Agrif_Gr%tabvars(i)%var%Restore1D)) then
+               Deallocate(Agrif_Gr%tabvars(i)%var%Restore1D)
+            endif
+            if (associated(Agrif_Gr%tabvars(i)%var%Restore2D)) then
+               Deallocate(Agrif_Gr%tabvars(i)%var%Restore2D)
+            endif
+            if (associated(Agrif_Gr%tabvars(i)%var%Restore3D)) then
+               Deallocate(Agrif_Gr%tabvars(i)%var%Restore3D)
+            endif
+            if (associated(Agrif_Gr%tabvars(i)%var%Restore4D)) then
+               Deallocate(Agrif_Gr%tabvars(i)%var%Restore4D)
+            endif
+            if (associated(Agrif_Gr%tabvars(i)%var%Restore5D)) then
+               Deallocate(Agrif_Gr%tabvars(i)%var%Restore5D)
+            endif
+            if (associated(Agrif_Gr%tabvars(i)%var%Restore6D)) then
+               Deallocate(Agrif_Gr%tabvars(i)%var%Restore6D)
+            endif
+C 
+        endif
+      enddo
+C 
+      Return
+C
+C      
+      End Subroutine Agrif_Free_Restore
+C
+C
+C
+      End Module Agrif_Clustering
Index: vendors/AGRIF/r_01/AGRIF_FILES/modcurgridfunctions.F
===================================================================
--- vendors/AGRIF/r_01/AGRIF_FILES/modcurgridfunctions.F	(revision 2672)
+++ vendors/AGRIF/r_01/AGRIF_FILES/modcurgridfunctions.F	(revision 2672)
@@ -0,0 +1,990 @@
+!
+! $Id: modcurgridfunctions.F 774 2007-12-18 16:45:53Z rblod $
+!
+C     AGRIF (Adaptive Grid Refinement In Fortran)
+C
+C     Copyright (C) 2003 Laurent Debreu (Laurent.Debreu@imag.fr)
+C                        Christophe Vouland (Christophe.Vouland@imag.fr)    
+C
+C     This program is free software; you can redistribute it and/or modify
+C     it under the terms of the GNU General Public License as published by
+C     the Free Software Foundation; either version 2 of the License, or
+C     (at your option) any later version.
+C
+C     This program is distributed in the hope that it will be useful,
+C     but WITHOUT ANY WARRANTY; without even the implied warranty of
+C     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+C     GNU General Public License for more details.
+C
+C     You should have received a copy of the GNU General Public License
+C     along with this program; if not, write to the Free Software
+C     Foundation, Inc., 59 Temple Place-  Suite 330, Boston, MA 02111-1307, USA.
+C
+C
+C
+CCC   Module Agrif_CurgridFunctions      
+C      
+      Module Agrif_CurgridFunctions    
+C  
+CCC   Description:
+CCC   Module to define some procedures concerning the current grid
+C
+C     Modules used: 
+C
+      Use Agrif_Init
+C
+      IMPLICIT NONE
+C
+C
+      Contains
+C     Define procedures contained in this module
+C
+C     **************************************************************************
+CCC   Function Agrif_Rhot
+C     **************************************************************************
+C
+      Function Agrif_Rhot()
+C  
+CCC   Description:
+CCC   Function returning the time refinement factor of the current grid.
+C
+C     Declarations:
+C  
+      
+C
+      REAL :: Agrif_Rhot  ! Result
+C
+C     Local scalar      
+      INTEGER :: res         ! Intermediate result
+      INTEGER :: iii
+C
+C
+      res=1
+C
+      do iii = 1 , Agrif_Probdim
+         res = max(res, AGRIF_Curgrid % timeref(iii))
+      enddo
+C
+      Agrif_Rhot = float(res)
+C
+C
+      End function Agrif_rhot
+C
+C
+C
+C
+C     **************************************************************************
+CCC   Function Agrif_IRhot
+C     **************************************************************************
+C
+      Function Agrif_IRhot()
+C  
+CCC   Description:
+CCC   Function returning the time refinement factor of the current grid.
+C
+C     Declarations:
+C  
+      
+C
+      INTEGER :: Agrif_IRhot  ! Result
+C
+C     Local scalar      
+      INTEGER :: res         ! Intermediate result
+      INTEGER :: iii
+C
+C
+      res=1
+C
+      do iii = 1 , Agrif_Probdim
+         res = max(res, AGRIF_Curgrid % timeref(iii))
+      enddo
+C
+      Agrif_IRhot = res
+C
+C
+      End function Agrif_IRhot
+C
+C
+C
+C     **************************************************************************
+CCC   Function Agrif_Parent_Rhot
+C     **************************************************************************
+C
+      Function Agrif_Parent_Rhot()
+C  
+CCC   Description:
+CCC   Function returning the time refinement factor of the parent grid of the 
+CCC   current grid.
+C
+C     Declarations:
+C  
+      
+C
+      REAL :: Agrif_Parent_Rhot  ! Result
+C
+C     Local scalar      
+      INTEGER :: res         ! Intermediate result
+      INTEGER :: iii
+C
+C
+      res=1
+C
+      do iii = 1 , Agrif_Probdim
+         res = max(res, AGRIF_Curgrid % parent % timeref(iii))
+      enddo
+C
+      Agrif_Parent_Rhot = float(res)
+C
+C
+      End function Agrif_Parent_Rhot      
+C
+C
+C     **************************************************************************
+CCC   Function Agrif_Parent_IRhot
+C     **************************************************************************
+C
+      Function Agrif_Parent_IRhot()
+C  
+CCC   Description:
+CCC   Function returning the time refinement factor of the parent grid of the 
+CCC   current grid.
+C
+C     Declarations:
+C  
+      
+C
+      INTEGER :: Agrif_Parent_IRhot  ! Result
+C
+C     Local scalar      
+      INTEGER :: res         ! Intermediate result
+      INTEGER :: iii
+C
+C
+      res=1
+C
+      do iii = 1 , Agrif_Probdim
+         res = max(res, AGRIF_Curgrid % parent % timeref(iii))
+      enddo
+C
+      Agrif_Parent_IRhot = res
+C
+C
+      End function Agrif_Parent_IRhot      
+C
+C
+C     **************************************************************************
+CCC   Function Agrif_Nbstepint
+C     **************************************************************************
+C
+      Function Agrif_Nbstepint()
+C  
+CCC   Description:
+CCC   Function for the calculation of the coefficients used for the time 
+CCC   interpolation (module Agrif_Boundary).
+C
+C     Declarations:
+C  
+      
+C            
+      INTEGER :: Agrif_nbstepint  ! result
+C
+C
+      Agrif_nbstepint = mod(AGRIF_CURGRID % ngridstep,
+     &                      int(AGRIF_rhot()))
+C
+C
+      End function Agrif_Nbstepint
+C
+C
+C
+CC    **************************************************************************
+CCC   Function Agrif_Parent_Nbstepint
+C     **************************************************************************
+C
+      Function Agrif_Parent_Nbstepint()
+C  
+CCC   Description:
+CCC   Function for the calculation of the coefficients used for the time 
+CCC   interpolation (module Agrif_Boundary).
+C
+C     Declarations:
+C  
+      
+C            
+      INTEGER :: Agrif_Parent_Nbstepint  ! result
+C
+C
+      Agrif_Parent_Nbstepint = mod(AGRIF_CURGRID % parent % ngridstep, 
+     &                             int(AGRIF_Parent_Rhot()))
+C
+C
+      End function Agrif_Parent_Nbstepint
+C
+C     **************************************************************************
+CCC   Subroutine Agrif_InterpNearBorderX
+C     **************************************************************************
+C
+      Subroutine Agrif_InterpNearBorderX()
+C  
+CCC   Description:
+CCC   Subroutine allowing to interpole (in the x direction) on a near border of 
+CCC   the current grid if this one has a common border with the root coarse 
+CCC   grid.   
+C
+C     Declarations:
+C  
+      
+C
+C
+      AGRIF_CURGRID % NearRootBorder(1) = .FALSE.             
+C
+C
+      End Subroutine Agrif_InterpNearBorderX 
+C
+C
+C
+C     **************************************************************************
+CCC   Subroutine Agrif_InterpDistantBorderX
+C     **************************************************************************
+C
+      Subroutine Agrif_InterpDistantBorderX()
+C  
+CCC   Description:
+CCC   Subroutine allowing to interpole (in the x direction) on a distant border 
+CCC   of the current grid if this one has a common border with the root coarse  
+CCC   grid.
+C
+C     Declarations:
+C  
+
+C
+C
+      AGRIF_CURGRID % DistantRootBorder(1) = .FALSE.             
+C
+C
+      End Subroutine Agrif_InterpDistantBorderX                 
+C
+C
+C
+C     **************************************************************************
+CCC   Subroutine Agrif_InterpNearBorderY
+C     **************************************************************************
+C
+      Subroutine Agrif_InterpNearBorderY()
+C  
+CCC   Description:
+CCC   Subroutine allowing to interpole (in the y direction) on a near border of 
+CCC   the current grid if this one has a common border with the root coarse 
+CCC   grid.
+C
+C     Declarations:
+C  
+      
+C
+C
+      AGRIF_CURGRID % NearRootBorder(2) = .FALSE.             
+C
+C
+      End Subroutine Agrif_InterpNearBorderY
+C
+C
+C
+C     **************************************************************************
+CCC   Subroutine Agrif_InterpDistantBorderY
+C     **************************************************************************
+C
+      Subroutine Agrif_InterpDistantBorderY()
+C  
+CCC   Description:
+CCC   Subroutine allowing to interpole (in the y direction) on a distant border 
+CCC   of the current grid if this one has a common border with the root coarse  
+CCC   grid.
+C
+C     Declarations:
+C  
+      
+C
+C
+      AGRIF_CURGRID % DistantRootBorder(2) = .FALSE.             
+C
+C
+      End Subroutine Agrif_InterpDistantBorderY      
+C
+C
+C
+C     **************************************************************************
+CCC   Subroutine Agrif_InterpNearBorderZ
+C     **************************************************************************
+C
+      Subroutine Agrif_InterpNearBorderZ()
+C  
+CCC   Description:
+CCC   Subroutine allowing to interpole (in the z direction) on a near border of 
+CCC   the current grid if this one has a common border with the root coarse 
+CCC   grid.
+C
+C     Declarations:
+C  
+      
+C
+C
+      AGRIF_CURGRID % NearRootBorder(3) = .FALSE.             
+C
+C
+      End Subroutine Agrif_InterpNearBorderZ
+C
+C
+C
+C     **************************************************************************
+CCC   Subroutine Agrif_InterpDistantBorderZ
+C     **************************************************************************
+C
+      Subroutine Agrif_InterpDistantBorderZ()
+C  
+CCC   Description:
+CCC   Subroutine allowing to interpole (in the z direction) on a distant border 
+CCC   of the current grid if this one has a common border with the root coarse  
+CCC   grid.
+C
+C     Declarations:
+C  
+      
+C
+C
+      AGRIF_CURGRID % DistantRootBorder(3) = .FALSE.             
+C
+C
+      End Subroutine Agrif_InterpDistantBorderZ
+C 
+C     **************************************************************************
+CCC   Function Agrif_Parent_Nb_Step
+C     ************************************************************************** 
+C 
+      Function AGRIF_Parent_Nb_Step() 
+C  
+CCC   Description:
+CCC   Function returning the number of time steps of the parent grid of the
+CCC   current grid.
+C
+C     Declarations:
+C    
+      
+C
+      INTEGER :: AGRIF_Parent_Nb_Step ! Result 
+C
+C
+      if (Agrif_Root()) then  
+C     
+          Agrif_Parent_Nb_Step = -1 
+C       
+        else
+C       
+          Agrif_Parent_Nb_Step = Agrif_Curgrid % parent % ngridstep
+C     
+      endif
+C
+C     
+      End function Agrif_Parent_Nb_Step    
+C 
+C
+C 
+C     **************************************************************************
+CCC   Function Agrif_Root
+C     **************************************************************************
+C
+      Function Agrif_Root()
+C     
+CCC   Description:
+CCC   Function indicating if the current grid is or not the root grid.
+C
+C     Declarations:
+C
+      
+C
+      LOGICAL :: Agrif_Root   ! Result
+C    
+C
+      if (AGRIF_CURGRID % fixedrank .EQ. 0) then
+C          
+          Agrif_Root = .TRUE.
+C    
+        else
+C    
+          Agrif_Root = .FALSE.
+C     
+      endif
+C
+C    
+      End function Agrif_Root
+C
+C
+C
+C     **************************************************************************
+CCC   Function Agrif_Parent_Root
+C     **************************************************************************
+C
+      Function Agrif_Parent_Root()
+C     
+CCC   Description:
+CCC   Function indicating if the parent grid of the current grid is or not the 
+CCC   root grid.
+C
+C     Declarations:
+C
+      
+C
+      LOGICAL :: Agrif_Parent_Root   ! Result
+C    
+C
+      if (AGRIF_CURGRID % parent % fixedrank .EQ. 0) then
+C          
+          Agrif_Parent_Root = .TRUE.
+C    
+        else
+C    
+          Agrif_Parent_Root = .FALSE.
+C     
+      endif
+C
+C    
+      End function Agrif_Parent_Root     
+C 
+C
+C 
+C     **************************************************************************
+CCC   Function Agrif_Fixed
+C     **************************************************************************
+C 
+      Function Agrif_Fixed()
+C  
+CCC   Description:
+CCC   Function returning the number of the current grid.
+C
+C     Declarations:
+C   
+      
+C
+      INTEGER Agrif_Fixed   ! Result 
+C 
+C
+      if (Agrif_Curgrid % fixed) then
+C     
+          Agrif_Fixed = Agrif_Curgrid % fixedrank 
+C
+        else
+C     
+         Agrif_Fixed = -1
+C        
+      endif
+C
+C     
+      End function Agrif_Fixed 
+C
+C
+C
+C     **************************************************************************
+CCC   Function Agrif_Parent_Fixed
+C     **************************************************************************
+ 
+      Function Agrif_Parent_Fixed()
+C  
+CCC   Description:
+CCC   Function returning the number of the parent grid of the current grid.
+C
+C     Declarations:
+C   
+      
+C
+      INTEGER Agrif_Parent_Fixed   ! Result 
+C 
+C
+      if (Agrif_Curgrid % parent % fixed) then
+C     
+          Agrif_Parent_Fixed = AGRIF_CURGRID % parent % fixedrank 
+C
+        else
+C     
+         Agrif_Parent_Fixed = 0
+C        
+      endif
+C
+C     
+      End function Agrif_Parent_Fixed
+C
+C
+C
+C     **************************************************************************
+CCC   Function Agrif_Is_Fixed
+C     **************************************************************************
+ 
+      Function Agrif_Is_Fixed()
+C  
+CCC   Description:
+CCC   Function returning true if the current grid is fixed.
+C
+C     Declarations:
+C   
+      
+C
+      LOGICAL Agrif_Is_Fixed   ! Result 
+C 
+C
+      if (Agrif_Curgrid % fixed) then
+C     
+          Agrif_Is_Fixed = .true.
+C
+        else
+C     
+          Agrif_Is_Fixed = .false.
+C        
+      endif
+C
+C     
+      End function Agrif_Is_Fixed
+C
+C
+C
+C     **************************************************************************
+CCC   Function Agrif_Parent_Is_Fixed
+C     **************************************************************************
+ 
+      Function Agrif_Parent_Is_Fixed()
+C  
+CCC   Description:
+CCC   Function returning true if the parent grid of the current grid is fixed.
+C
+C     Declarations:
+C   
+      
+C
+      LOGICAL Agrif_Parent_Is_Fixed   ! Result 
+C 
+C
+      if (Agrif_Curgrid % parent % fixed) then
+C     
+          Agrif_Parent_Is_Fixed = .true.
+C
+        else
+C     
+          Agrif_Parent_Is_Fixed = .false.
+C        
+      endif
+C
+C     
+      End function Agrif_Parent_Is_Fixed            
+C
+C 
+C
+C     **************************************************************************
+CCC   Function AGRIF_CFixed
+C     **************************************************************************
+ 
+            Function AGRIF_CFixed()
+C  
+CCC   Description:
+CCC   Function returning the number of the current grid.
+C
+C     Declarations:
+C   
+      
+C
+      CHARACTER(3) AGRIF_CFixed   ! Result 
+C
+C     Local variables      
+      CHARACTER(3) cfixed
+      INTEGER fixed
+C 
+C
+      fixed = Agrif_Fixed()
+C      
+      if(fixed.NE.-1) then
+C
+           if (fixed .LE. 9) then
+C
+               write(cfixed,'(i1)')fixed
+C 
+           else
+C   
+               write(cfixed,'(i2)')fixed
+C      
+           endif
+C
+           AGrif_Cfixed=cfixed
+C      
+      else
+C
+      print*,'Call to AGRIF_CFixed() on a moving grid'
+      stop
+C
+      endif     
+
+      End function AGRIF_CFixed
+C
+C
+C
+C     **************************************************************************
+CCC   Function AGRIF_Parent_CFixed
+C     **************************************************************************
+ 
+      Function AGRIF_Parent_CFixed()
+C  
+CCC   Description:
+CCC   Function returning the number of the parent grid of the current grid.
+C
+C     Declarations:
+C   
+      
+C
+      CHARACTER(3) AGRIF_Parent_CFixed   ! Result 
+C
+C     Local variables      
+      CHARACTER(3) cfixed
+      INTEGER fixed
+C 
+C
+      fixed = Agrif_Parent_Fixed()
+C      
+      if(fixed.NE.-1) then
+C
+          if (fixed .LE. 9) then
+C
+              write(cfixed,'(i1)')fixed
+C      
+          else
+C        
+              write(cfixed,'(i2)')fixed
+C      
+          endif
+C
+          AGrif_Parent_Cfixed=cfixed
+C
+      else
+C
+      print*,'Illegal call to AGRIF_Parent_CFixed()'
+      stop     
+C
+      endif
+
+      End function AGRIF_Parent_CFixed      
+C
+C
+C
+C     **************************************************************************
+CCC   Subroutine Agrif_ChildGrid_to_ParentGrid
+C     **************************************************************************
+C
+      Subroutine Agrif_ChildGrid_to_ParentGrid()
+C  
+CCC   Description:
+CCC   Subroutine allowing to make the pointer AGRIF_CURGRID point on the parent
+CCC   grid of the current grid.
+C
+C     Declarations:
+C  
+      
+C
+      
+      Agrif_Curgrid%Parent%save_grid => Agrif_Curgrid
+C
+      Call Agrif_Instance(Agrif_Curgrid%parent)            
+C
+C
+      End Subroutine Agrif_ChildGrid_to_ParentGrid
+C
+C
+C
+C     **************************************************************************
+CCC   Subroutine Agrif_ParentGrid_to_ChildGrid
+C     **************************************************************************
+C
+      Subroutine Agrif_ParentGrid_to_ChildGrid()
+C  
+CCC   Description:
+CCC   Subroutine allowing to make the pointer AGRIF_CURGRID point on the child 
+CCC   grid after having called the Agrif_ChildGrid_to_ParentGrid subroutine.
+C
+C     Declarations:
+C  
+      
+C
+C
+      Call Agrif_Instance(Agrif_Curgrid%save_grid)
+C
+C
+      End Subroutine Agrif_ParentGrid_to_ChildGrid
+C
+C
+C
+C     **************************************************************************
+CCC   Function Agrif_Get_Unit
+C     **************************************************************************
+C
+      Function Agrif_Get_Unit()
+
+CCC   Description : return a unit not connected to any file
+C
+C     Declarations
+C
+      
+C
+      INTEGER Agrif_Get_Unit
+C
+C     Local scalars
+      INTEGER n
+      LOGICAL op
+C
+      INTEGER :: nunit
+      INTEGER :: iii,out,iiimax
+      Logical :: BEXIST
+      INTEGER,DIMENSION(1:1000) :: ForbiddenUnit
+C
+C
+C     Load forbidden Unit if the file Agrif_forbidenUnit exist
+C      
+
+      INQUIRE(FILE='Agrif_forbiddenUnit.txt',EXIST=BEXIST)
+      If (.not. BEXIST) Then
+c          File Agrif_forbiddenUnit.txt not found
+      Else
+           nunit = 777
+           open(nunit,file='Agrif_forbiddenUnit.txt',form='formatted',
+     &          status="old")
+              iii = 1
+              do while ( .TRUE. )
+                 read(nunit,*,END = 99) ForbiddenUnit(iii)
+                 iii = iii + 1
+              enddo
+   99         CONTINUE
+              iiimax = iii
+           close(nunit)
+      endif     
+C 
+      do n = 7,1000
+C 
+        Inquire(Unit=n,Opened=op)
+C
+        out = 0
+        if ( BEXIST .AND. .NOT.op) then
+           do iii = 1 , iiimax
+              if ( n .EQ. ForbiddenUnit(iii) ) out = 1
+           enddo
+        endif
+C
+        if (.NOT.op .AND. out .EQ. 0) exit
+C      
+      enddo
+C
+      Agrif_Get_Unit=n
+C
+C
+      End Function Agrif_Get_Unit
+      
+      Subroutine Agrif_Set_Efficiency(eff)
+      REAL :: eff
+      
+      IF ((eff.LT.0.).OR.(eff.GT.1)) THEN
+      write(*,*)'Error Efficiency should be between 0 and 1'
+      stop
+      ELSE
+      Agrif_efficiency = eff
+      ENDIF
+      End Subroutine Agrif_Set_Efficiency
+      
+      Subroutine Agrif_Set_Regridding(regfreq)
+      INTEGER :: regfreq
+      
+      IF (regfreq.LT.0) THEN
+      write(*,*)'Regridding frequency should be positive'
+      stop
+      ELSE
+      Agrif_regridding = regfreq
+      ENDIF
+      End Subroutine Agrif_Set_Regridding
+C
+C
+C     **************************************************************************
+CCC   subroutine Agrif_Set_coeffref_x
+C     **************************************************************************
+      subroutine Agrif_Set_coeffref_x(coefref)
+
+      integer :: coefref
+
+      if (coefref.LT.0) then
+         write(*,*)'Coefficient of raffinement should be positive'
+         stop
+      else
+         AGRIF_coeffref(1) = coefref
+      endif
+      end subroutine Agrif_Set_coeffref_x
+C
+C     **************************************************************************
+CCC   subroutine Agrif_Set_coeffref_y
+C     **************************************************************************
+      subroutine Agrif_Set_coeffref_y(coefref)
+
+      integer :: coefref
+
+      if (coefref.LT.0) then
+         write(*,*)'Coefficient of raffinement should be positive'
+         stop
+      else
+         AGRIF_coeffref(2) = coefref
+      endif
+      end subroutine Agrif_Set_coeffref_y
+C
+C     **************************************************************************
+CCC   subroutine Agrif_Set_coeffref_z
+C     **************************************************************************
+      subroutine Agrif_Set_coeffref_z(coefref)
+
+      integer :: coefref
+
+      if (coefref.LT.0) then
+         write(*,*)'Coefficient of raffinement should be positive'
+         stop
+      else
+         AGRIF_coeffref(3) = coefref
+      endif
+      end subroutine Agrif_Set_coeffref_z
+C
+C     **************************************************************************
+CCC   subroutine Agrif_Set_coeffreft_x
+C     **************************************************************************
+      subroutine Agrif_Set_coeffreft_x(coefref)
+
+      integer :: coefref
+
+      if (coefref.LT.0) then
+         write(*,*)'Coefficient of time raffinement should be positive'
+         stop
+      else
+         AGRIF_coeffreft(1) = coefref
+      endif
+      end subroutine Agrif_Set_coeffreft_x
+C
+C     **************************************************************************
+CCC   subroutine Agrif_Set_coeffreft_y
+C     **************************************************************************
+      subroutine Agrif_Set_coeffreft_y(coefref)
+
+      integer :: coefref
+
+      if (coefref.LT.0) then
+         write(*,*)'Coefficient of time raffinement should be positive'
+         stop
+      else
+         AGRIF_coeffreft(2) = coefref
+      endif
+      end subroutine Agrif_Set_coeffreft_y
+C
+C     **************************************************************************
+CCC   subroutine Agrif_Set_coeffreft_z
+C     **************************************************************************
+      subroutine Agrif_Set_coeffreft_z(coefref)
+
+      integer :: coefref
+
+      if (coefref.LT.0) then
+         write(*,*)'Coefficient of time raffinement should be positive'
+         stop
+      else
+         AGRIF_coeffreft(3) = coefref
+      endif
+      end subroutine Agrif_Set_coeffreft_z
+C
+C     **************************************************************************
+CCC   subroutine Agrif_Set_Minwidth
+C     **************************************************************************
+      subroutine Agrif_Set_Minwidth(coefminwidth)
+
+      integer :: coefminwidth
+
+      if (coefminwidth.LT.0) then
+         write(*,*)'Coefficient of Minwidth should be positive'
+         stop
+      else
+         Agrif_Minwidth = coefminwidth
+      endif
+      end subroutine Agrif_Set_Minwidth
+C
+C     **************************************************************************
+CCC   subroutine Agrif_Set_Rafmax
+C     **************************************************************************
+      subroutine Agrif_Set_Rafmax(coefrafmax)
+
+      integer :: coefrafmax
+      integer :: i
+      real :: res
+
+      if (coefrafmax.LT.0) then
+         write(*,*)'Coefficient of  should be positive'
+         stop
+      else
+         res = 1.
+         do i = 1 , coefrafmax - 1
+            res = res * FLOAT(AGRIF_coeffref(1))
+         enddo
+         if ( res .EQ. 0 ) res = 1
+         Agrif_Mind(1) = 1. / res
+C
+         res = 1.
+         do i = 1 , coefrafmax - 1
+            res = res * FLOAT(AGRIF_coeffref(2))
+         enddo
+         if ( res .EQ. 0 ) res = 1
+         Agrif_Mind(2) = 1. / res
+C
+         res = 1.
+         do i = 1 , coefrafmax - 1
+            res = res * FLOAT(AGRIF_coeffref(3))
+         enddo
+         if ( res .EQ. 0 ) res = 1
+         Agrif_Mind(3) = 1. / res
+C
+      endif
+      end subroutine Agrif_Set_Rafmax
+C
+C     **************************************************************************
+CCC   subroutine Agrif_Open_File
+C     **************************************************************************
+      subroutine Agrif_Open_File(num_id,name_file)
+
+      integer :: num_id
+      character(*) :: name_file
+
+      num_id = Agrif_Get_Unit()
+      if ( .NOT. Agrif_Root() ) then
+         name_file = TRIM(Agrif_CFixed())//'_'//TRIM(name_file)
+      endif
+
+      end subroutine Agrif_Open_File
+
+C     **************************************************************************
+CCC    subroutine Agrif_Set_MaskMaxSearch
+C     **************************************************************************
+      subroutine Agrif_Set_MaskMaxSearch(mymaxsearch)
+      integer mymaxsearch
+      MaxSearch = mymaxsearch
+      end subroutine Agrif_Set_MaskMaxSearch
+      
+C *****************************************************************
+CCC  subroutine Agrif_Level
+C *****************************************************************
+      Function Agrif_Level()
+      Integer :: Agrif_Level
+     
+      Agrif_Level = Agrif_Curgrid % level
+     
+      End Function Agrif_Level
+      
+C *****************************************************************
+CCC  subroutine Agrif_MaxLevel
+C *****************************************************************
+      Function Agrif_MaxLevel()
+      Integer :: Agrif_MaxLevel
+     
+      Agrif_MaxLevel = Agrif_MaxLevelLoc
+     
+      End Function Agrif_MaxLevel      
+
+      End Module Agrif_CurgridFunctions 
Index: vendors/AGRIF/r_01/AGRIF_FILES/modflux.F
===================================================================
--- vendors/AGRIF/r_01/AGRIF_FILES/modflux.F	(revision 2672)
+++ vendors/AGRIF/r_01/AGRIF_FILES/modflux.F	(revision 2672)
@@ -0,0 +1,339 @@
+C     Agrif (Adaptive Grid Refinement In Fortran)
+C
+C     Copyright (C) 2003 Laurent Debreu (Laurent.Debreu@imag.fr)
+C                        Christophe Vouland (Christophe.Vouland@imag.fr)    
+C
+C     This program is free software; you can redistribute it and/or modify
+C     it under the terms of the GNU General Public License as published by
+C     the Free Software Foundation; either version 2 of the License, or
+C     (at your option) any later version.
+C
+C     This program is distributed in the hope that it will be useful,
+C     but WITHOUT ANY WARRANTY; without even the implied warranty of
+C     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+C     GNU General Public License for more details.
+C
+C     You should have received a copy of the GNU General Public License
+C     along with this program; if not, write to the Free Software
+C     Foundation, Inc., 59 Temple Place-Suite 330, Boston, MA 02111-1307, USA.
+C
+C
+C
+CCC   Module Agrif_fluxmod
+C
+      Module Agrif_fluxmod
+      Use Agrif_types
+      Use Agrif_Arrays
+      Use Agrif_Curgridfunctions
+      
+      CONTAINS  
+      
+      
+      Subroutine Agrif_AllocateFlux(Flux,fluxtab)
+      Type(Agrif_Flux), Pointer :: Flux
+      Real, Dimension(:,:) :: fluxtab
+      Type(Agrif_Profile), Pointer :: Profile
+      Integer :: dimensio,n,n2
+      INTEGER, DIMENSION(:,:), Pointer :: normalsizes
+      INTEGER, DIMENSION(6) :: unitarray
+      Type(Agrif_Variable), Pointer :: fluxtabvar
+      Integer :: nbout
+      
+      Profile => Flux%profile
+      dimensio = Profile%nbdim
+      
+      unitarray = 1
+      
+      do n=1,dimensio
+        IF (Profile%posvar(n) == 1) THEN
+          IF (Profile%interptab(n) == 'x') THEN
+            Allocate(Flux%fluxtabx)
+            fluxtabvar => Flux%fluxtabx
+          ELSE IF (Profile%interptab(n) == 'y') THEN
+            Allocate(Flux%fluxtaby)
+            fluxtabvar => Flux%fluxtaby
+          ELSE IF (Profile%interptab(n) == 'z') THEN
+            Allocate(Flux%fluxtabz)
+            fluxtabvar => Flux%fluxtabz
+          ENDIF
+          ALLOCATE(fluxtabvar%iarray2(2,6))
+          normalsizes=>fluxtabvar%iarray2
+          normalsizes(1,1) = 2
+          nbout = 1
+          DO n2 = 1,dimensio
+            IF (n2 .NE. n) THEN
+              nbout = nbout + 1
+              If ((Profile%posvar(n2) == 1)
+     &            .OR.(Profile%posvar(n2) == 2)) THEN
+                IF (Profile%interptab(n2) == 'x') THEN
+                  normalsizes(2,n2) = 
+     &                Agrif_Curgrid%nb(1)/agrif_Curgrid%spaceref(1)
+                  normalsizes(1,nbout) = 
+     &                Agrif_Curgrid%nb(1)/agrif_Curgrid%spaceref(1)
+                ELSE IF (Profile%interptab(n2) == 'y') THEN
+                  normalsizes(2,n2) = 
+     &                Agrif_Curgrid%nb(2)/agrif_Curgrid%spaceref(2)
+                  normalsizes(1,nbout) = 
+     &                Agrif_Curgrid%nb(2)/agrif_Curgrid%spaceref(2)
+                ELSE IF (Profile%interptab(n2) == 'z') THEN
+                  normalsizes(2,n2) = 
+     &                Agrif_Curgrid%nb(3)/agrif_Curgrid%spaceref(3)
+                  normalsizes(1,nbout) = 
+     &                Agrif_Curgrid%nb(3)/agrif_Curgrid%spaceref(3)
+                ENDIF
+              ELSE
+                normalsizes(2,n2) = SIZE(fluxtab,n2)
+                normalsizes(1,nbout) = SIZE(fluxtab,n2)
+              ENDIF
+            ENDIF
+          ENDDO          
+        ENDIF
+      enddo
+      
+      
+      do n=1,dimensio
+        IF (Profile%posvar(n) == 1) THEN
+          IF (Profile%interptab(n) == 'x') THEN
+            fluxtabvar => Flux%fluxtabx
+          ELSE IF (Profile%interptab(n) == 'y') THEN
+            fluxtabvar => Flux%fluxtaby
+          ELSE IF (Profile%interptab(n) == 'z') THEN
+            fluxtabvar => Flux%fluxtabz
+          ENDIF
+          Call Agrif_nbdim_allocation(fluxtabvar,unitarray(1:dimensio),
+     &          fluxtabvar%iarray2(1,1:dimensio),dimensio)
+        ENDIF
+      enddo
+      
+      Flux%fluxallocated = .TRUE.
+      
+      End Subroutine Agrif_AllocateFlux
+      
+      FUNCTION Agrif_Search_Flux(fluxname)
+      character*(*) fluxname
+      Type(Agrif_Flux), Pointer :: Agrif_Search_Flux
+      
+      Type(Agrif_Flux), pointer :: parcours
+      Logical :: foundflux
+      
+      foundflux = .FALSE.
+      parcours => Agrif_Curgrid%fluxes
+      
+      Do While (Associated(parcours))
+         IF (parcours % fluxname == fluxname) THEN
+           foundflux = .TRUE.
+           EXIT
+         ENDIF
+         parcours => parcours%nextflux
+      End Do
+      
+      IF (.NOT.foundflux) THEN
+      write(*,*) 'The array flux '''
+     &           //TRIM(fluxname)//''' has not been declared'
+      stop
+      ENDIF      
+      
+      Agrif_Search_Flux => parcours
+      
+      End Function Agrif_Search_Flux
+      
+      Subroutine Agrif_Save_Fluxtab(Flux,Fluxtab)
+      Type(Agrif_Flux), Pointer :: Flux
+      Real, Dimension(:,:) :: Fluxtab
+      INTEGER, DIMENSION(:,:), Pointer :: normalsizes
+      INTEGER, DIMENSION(6) :: normalsizes2, normalsizes3
+      INTEGER, DIMENSION(6) :: unitarray2, unitarray3
+      Type(Agrif_Variable), Pointer :: fluxtabvar
+      Type(Agrif_Profile), Pointer :: Profile
+      Integer :: dimensio,n,n2,j,j1,j2
+      
+      Profile => Flux%profile
+      dimensio = Profile%nbdim
+            
+      do n=1,dimensio
+        IF (Profile%posvar(n) == 1) THEN
+          IF (Profile%interptab(n) == 'x') THEN
+            fluxtabvar => Flux%fluxtabx
+          ELSE IF (Profile%interptab(n) == 'y') THEN
+            fluxtabvar => Flux%fluxtaby
+          ELSE IF (Profile%interptab(n) == 'z') THEN
+            fluxtabvar => Flux%fluxtabz
+          ENDIF 
+          normalsizes => fluxtabvar%iarray2
+          unitarray2 = 1
+          unitarray3 = 1
+          normalsizes2 = normalsizes(1,:)
+          normalsizes3 = normalsizes(2,:)
+          
+          unitarray3(n) = Profile%point(n)
+          normalsizes3(n) = Profile%point(n) 
+                              
+          SELECT CASE(dimensio)
+          CASE(1)
+          CASE(2)
+            j1 = unitarray3(2)
+            Do j=unitarray3(2),normalsizes3(2)
+            do j2 = j1,j1+Agrif_curgrid%spaceref(2)
+!            print *,'flux stocke fiun = ',j2,fluxtab(unitarray3(1),j2)
+            enddo
+            fluxtabvar%array2(1:1,j) = 
+     &      fluxtabvar%array2(1:1,j) +
+     &             SUM(fluxtab(unitarray3(1):normalsizes3(1),
+     &                        j1:j1+Agrif_Curgrid%spaceref(2)))
+             j1 = j1+Agrif_Curgrid%spaceref(2)
+            EndDo
+          END SELECT
+          
+          unitarray3(n) = Profile%point(n)+Agrif_Curgrid%nb(n)
+          normalsizes3(n) = Profile%point(n)+Agrif_Curgrid%nb(n) 
+          SELECT CASE(dimensio)
+          CASE(1)
+          CASE(2)
+            j1 = unitarray3(2)
+            Do j=unitarray3(2),normalsizes3(2)
+            fluxtabvar%array2(2:2,j) = 
+     &      fluxtabvar%array2(2:2,j) +
+     &             SUM(fluxtab(unitarray3(1):normalsizes3(1),
+     &                        j1:j1+Agrif_Curgrid%spaceref(2)))
+             j1 = j1+Agrif_Curgrid%spaceref(2)
+            EndDo
+         END SELECT
+        ENDIF
+      enddo
+                  
+      End Subroutine Agrif_Save_Fluxtab
+
+      Subroutine Agrif_Save_Fluxtab_child(Flux,Fluxtab)
+      Type(Agrif_Flux), Pointer :: Flux
+      Real, Dimension(:,:) :: Fluxtab
+      INTEGER, DIMENSION(:,:), Pointer :: normalsizes
+      INTEGER, DIMENSION(6) :: normalsizes2, normalsizes3
+      INTEGER, DIMENSION(6) :: unitarray2, unitarray3
+      Type(Agrif_Variable), Pointer :: fluxtabvar
+      Type(Agrif_Profile), Pointer :: Profile
+      Integer :: dimensio,n,n2
+      
+      Profile => Flux%profile
+      dimensio = Profile%nbdim
+            
+      do n=1,dimensio
+        IF (Profile%posvar(n) == 1) THEN
+          IF (Profile%interptab(n) == 'x') THEN
+            fluxtabvar => Flux%fluxtabx
+          ELSE IF (Profile%interptab(n) == 'y') THEN
+            fluxtabvar => Flux%fluxtaby
+          ELSE IF (Profile%interptab(n) == 'z') THEN
+            fluxtabvar => Flux%fluxtabz
+          ENDIF 
+          normalsizes => fluxtabvar%iarray2
+          unitarray2 = 1
+          unitarray3 = 1
+          normalsizes2 = normalsizes(1,:)
+          normalsizes3 = normalsizes(2,:)
+          
+          unitarray3(n) = Profile%point(n)+Agrif_Curgrid%ix(n)
+          normalsizes3(n) = unitarray3(n)
+                              
+          SELECT CASE(dimensio)
+          CASE(1)
+          CASE(2)
+            fluxtabvar%array2(1:1,
+     &                        unitarray2(2):normalsizes2(2)) = 
+     &      - fluxtab(unitarray3(1):normalsizes3(1),
+     &                        unitarray3(2):normalsizes3(2))
+!        print *,'flux stocke = ',fluxtab(unitarray3(1):normalsizes3(1),
+!     &                        unitarray3(2):normalsizes3(2))
+          END SELECT
+          
+          unitarray3(n) = unitarray3(n)+
+     &         Agrif_Curgrid%nb(n)/Agrif_Curgrid%spaceref(n)
+          normalsizes3(n) = unitarray3(n)
+          SELECT CASE(dimensio)
+          CASE(1)
+          CASE(2)
+            fluxtabvar%array2(2:2,
+     &                        unitarray2(2):normalsizes2(2)) = 
+     &      - fluxtab(unitarray3(1):normalsizes3(1),
+     &                        unitarray3(2):normalsizes3(2))    
+         END SELECT
+        ENDIF
+      enddo
+                  
+      End Subroutine Agrif_Save_Fluxtab_child
+      
+      Subroutine Agrif_Cancel_Fluxarray(Flux)
+      Type(Agrif_Flux), Pointer :: Flux
+      Type(Agrif_Variable), Pointer :: fluxtabvar
+      Type(Agrif_Profile), Pointer :: Profile
+      Integer :: dimensio,n,n2
+      
+      Profile => Flux%profile
+      dimensio = Profile%nbdim
+            
+      do n=1,dimensio
+        IF (Profile%posvar(n) == 1) THEN
+          IF (Profile%interptab(n) == 'x') THEN
+            fluxtabvar => Flux%fluxtabx
+          ELSE IF (Profile%interptab(n) == 'y') THEN
+            fluxtabvar => Flux%fluxtaby
+          ELSE IF (Profile%interptab(n) == 'z') THEN
+            fluxtabvar => Flux%fluxtabz
+          ENDIF 
+                              
+          SELECT CASE(dimensio)
+          CASE(1)
+          CASE(2)
+            fluxtabvar%array2 = 0.
+          END SELECT
+        ENDIF
+      enddo
+                  
+      End Subroutine Agrif_Cancel_Fluxarray  
+      
+      Subroutine Agrif_FluxCorrect(Flux, procname)
+      Type(Agrif_Flux), Pointer :: Flux
+      External :: procname
+      Type(Agrif_Variable), Pointer :: fluxtabvar
+      Type(Agrif_Profile), Pointer :: Profile
+      Integer :: dimensio,n,n2,j1,j2
+      Integer, Dimension(:), Allocatable :: Loctab
+      Integer :: locind
+      
+      Profile => Flux%profile
+      dimensio = Profile%nbdim
+
+      do n=1,dimensio
+        IF (Profile%posvar(n) == 1) THEN
+          IF (Profile%interptab(n) == 'x') THEN
+            fluxtabvar => Flux%fluxtabx
+            locind = 1
+          ELSE IF (Profile%interptab(n) == 'y') THEN
+            fluxtabvar => Flux%fluxtaby
+            locind = 2
+          ELSE IF (Profile%interptab(n) == 'z') THEN
+            fluxtabvar => Flux%fluxtabz
+            locind = 3
+          ENDIF 
+                              
+          SELECT CASE(dimensio)
+          CASE(1)
+          CASE(2)
+           Allocate(Loctab(2))
+           Loctab(1) = Agrif_Curgrid%ix(locind)
+           Loctab(2) = Agrif_Curgrid%ix(locind)+
+     &         Agrif_Curgrid%nb(locind)/Agrif_Curgrid%spaceref(locind)
+           j1 = agrif_curgrid%ix(2)
+           j2 = agrif_curgrid%ix(2)+
+     &        agrif_curgrid%nb(2)/Agrif_curgrid%spaceref(2)
+           Call Agrif_ChildGrid_to_ParentGrid()
+            Call procname(fluxtabvar%array2,Loctab(1),Loctab(2),j1,j2)
+           Call Agrif_ParentGrid_to_ChildGrid()
+          END SELECT
+        ENDIF
+      enddo
+      
+      If (Allocated(Loctab)) Deallocate(Loctab)
+                  
+      End Subroutine Agrif_FluxCorrect 
+          
+      End Module Agrif_fluxmod
Index: vendors/AGRIF/r_01/AGRIF_FILES/modinit.F
===================================================================
--- vendors/AGRIF/r_01/AGRIF_FILES/modinit.F	(revision 2672)
+++ vendors/AGRIF/r_01/AGRIF_FILES/modinit.F	(revision 2672)
@@ -0,0 +1,252 @@
+C     AGRIF (Adaptive Grid Refinement In Fortran)
+C
+C     Copyright (C) 2003 Laurent Debreu (Laurent.Debreu@imag.fr)
+C                        Christophe Vouland (Christophe.Vouland@imag.fr)    
+C
+C     This program is free software; you can redistribute it and/or modify
+C     it under the terms of the GNU General Public License as published by
+C     the Free Software Foundation; either version 2 of the License, or
+C     (at your option) any later version.
+C
+C     This program is distributed in the hope that it will be useful,
+C     but WITHOUT ANY WARRANTY; without even the implied warranty of
+C     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+C     GNU General Public License for more details.
+C
+C     You should have received a copy of the GNU General Public License
+C     along with this program; if not, write to the Free Software
+C     Foundation, Inc., 59 Temple Place-  Suite 330, Boston, MA 02111-1307, USA.
+C
+C
+C
+CCC   Module Agrif_Init
+C
+      Module Agrif_Init 
+C
+CCC   Description:
+CCC   Several operations on the variables of the current grid (creation,
+CCC   instanciation, ...) used during the creation of the grid hierarchy and
+CCC   during the time integration.
+C
+C     Modules used: 
+C
+      Use Agrif_Types 
+      Use Agrif_link
+C   
+      IMPLICIT NONE
+C
+      Contains
+C     Defininition of the procedures contained in this module
+C
+C     **************************************************************************
+CCC   Subroutine Agrif_Allocation  
+C     **************************************************************************
+C  
+      Subroutine Agrif_Allocation(Agrif_Gr)
+C
+CCC   Description:
+CCC   Subroutine to allocate the arrays containing the values of the variables 
+CCC   of the current grd.
+C
+CC    Method:
+CC    Use of the allocate function.  
+C
+C     Declarations:
+C      
+C     Pointer argument:
+      TYPE(AGRIF_grid), Pointer :: Agrif_Gr  ! Pointer on the current grid
+C 
+C     Allocation of the arrays of the variables  
+C     We cut this in several files to avoid long compilation timings
+C
+      Call Agrif_Allocationcalls(Agrif_Gr)
+C
+      if ( Agrif_USE_ONLY_FIXED_GRIDS .EQ. 0 ) then
+C
+         if ( Agrif_Probdim .EQ. 1 ) 
+     &      Allocate(Agrif_Gr%tabpoint1D(Agrif_Gr%nb(1)+1))
+         if ( Agrif_Probdim .EQ. 2 ) 
+     &      Allocate(Agrif_Gr%tabpoint2D(Agrif_Gr%nb(1)+1,
+     &       Agrif_Gr%nb(2)+1))      
+         if ( Agrif_Probdim .EQ. 3 ) 
+     &      Allocate(Agrif_Gr%tabpoint3D(Agrif_Gr%nb(1)+1,
+     &       Agrif_Gr%nb(2)+1,Agrif_Gr%nb(3)+1))      
+C
+      endif
+C 
+      End Subroutine Agrif_Allocation
+C
+C     **************************************************************************
+CCC   Subroutine Agrif_Instance 
+C     **************************************************************************
+C 
+      Subroutine Agrif_Instance(Agrif_Gr)
+C
+CCC   Description:
+CCC   Subroutine to do an instance of the common variables to the variables of  
+CCC   the current grid.
+C
+CC    Method:
+CC    Pointing the common variables on these of the current grid.  
+C
+C     Declarations:
+C        
+
+C
+C
+
+C
+C     Pointer argument: 
+      Type(Agrif_Grid), Pointer :: Agrif_Gr   ! Pointer on the current grid  
+C 
+C
+      Agrif_Curgrid => Agrif_Gr
+      Agrif_tabvars => Agrif_Curgrid % tabvars
+C
+      Call Agrif_Get_numberofcells(Agrif_Gr)
+C
+C
+C     Calculation of isf,jsf,nzsf and of the index of the output file 
+      Call Agrif_InitWorkSpace() 
+C
+C 
+      End Subroutine Agrif_Instance
+C
+C
+C     **************************************************************************
+CCC   Subroutine Agrif_initialisations  
+C     **************************************************************************
+      Subroutine Agrif_initialisations(Agrif_Gr)
+C
+CCC   Description:
+C
+CC    Method:
+C
+C     Declarations:
+C        
+      INTEGER :: i
+C
+C     Pointer argument: 
+      Type(Agrif_Grid), Pointer  :: Agrif_Gr
+      
+C
+      do i = 1 , Agrif_NbVariables
+C 
+         Agrif_Gr % tabvars(i) % var % nbdim = 0
+C
+         if (allocated(Agrif_Gr%tabvars(i)%var%array1)) then
+             Agrif_Gr % tabvars(i) % var % nbdim = 1
+             Agrif_Gr % tabvars(i) % var % lb(1:1) = 
+     &         lbound(Agrif_Gr%tabvars(i)%var%array1)
+             Agrif_Gr % tabvars(i) % var % ub(1:1) = 
+     &         ubound(Agrif_Gr%tabvars(i)%var%array1)     
+         endif
+         if (allocated(Agrif_Gr%tabvars(i)%var%array2)) then
+             Agrif_Gr % tabvars(i) % var % nbdim = 2
+             Agrif_Gr % tabvars(i) % var % lb(1:2) = 
+     &         lbound(Agrif_Gr%tabvars(i)%var%array2)
+             Agrif_Gr % tabvars(i) % var % ub(1:2) = 
+     &         ubound(Agrif_Gr%tabvars(i)%var%array2)
+         endif
+         if (allocated(Agrif_Gr%tabvars(i)%var%array3)) then
+             Agrif_Gr % tabvars(i) % var % nbdim = 3
+             Agrif_Gr % tabvars(i) % var % lb(1:3) = 
+     &         lbound(Agrif_Gr%tabvars(i)%var%array3)
+             Agrif_Gr % tabvars(i) % var % ub(1:3) = 
+     &         ubound(Agrif_Gr%tabvars(i)%var%array3)
+         endif
+         if (allocated(Agrif_Gr%tabvars(i)%var%array4)) then
+             Agrif_Gr % tabvars(i) % var % nbdim = 4
+             Agrif_Gr % tabvars(i) % var % lb(1:4) = 
+     &         lbound(Agrif_Gr%tabvars(i)%var%array4)
+             Agrif_Gr % tabvars(i) % var % ub(1:4) = 
+     &         ubound(Agrif_Gr%tabvars(i)%var%array4)
+         endif
+         if (allocated(Agrif_Gr%tabvars(i)%var%array5)) then
+             Agrif_Gr % tabvars(i) % var % nbdim = 5
+             Agrif_Gr % tabvars(i) % var % lb(1:5) = 
+     &         lbound(Agrif_Gr%tabvars(i)%var%array5)
+             Agrif_Gr % tabvars(i) % var % ub(1:5) = 
+     &         ubound(Agrif_Gr%tabvars(i)%var%array5)
+         endif
+         if (allocated(Agrif_Gr%tabvars(i)%var%array6)) then
+             Agrif_Gr % tabvars(i) % var % nbdim = 6
+             Agrif_Gr % tabvars(i) % var % lb(1:6) = 
+     &         lbound(Agrif_Gr%tabvars(i)%var%array6)
+             Agrif_Gr % tabvars(i) % var % ub(1:6) = 
+     &         ubound(Agrif_Gr%tabvars(i)%var%array6)
+         endif
+C
+         if (allocated(Agrif_Gr%tabvars(i)%var%darray1)) then
+             Agrif_Gr % tabvars(i) % var % nbdim = 1
+         endif
+         if (allocated(Agrif_Gr%tabvars(i)%var%darray2)) then
+             Agrif_Gr % tabvars(i) % var % nbdim = 2
+         endif
+         if (allocated(Agrif_Gr%tabvars(i)%var%darray3)) then
+             Agrif_Gr % tabvars(i) % var % nbdim = 3
+         endif
+         if (allocated(Agrif_Gr%tabvars(i)%var%darray4)) then
+             Agrif_Gr % tabvars(i) % var % nbdim = 4
+         endif
+         if (allocated(Agrif_Gr%tabvars(i)%var%darray5)) then
+             Agrif_Gr % tabvars(i) % var % nbdim = 5
+         endif
+         if (allocated(Agrif_Gr%tabvars(i)%var%darray6)) then
+             Agrif_Gr % tabvars(i) % var % nbdim = 6
+         endif
+C
+         if (allocated(Agrif_Gr%tabvars(i)%var%larray1)) then
+             Agrif_Gr % tabvars(i) % var % nbdim = 1
+         endif
+         if (allocated(Agrif_Gr%tabvars(i)%var%larray2)) then
+             Agrif_Gr % tabvars(i) % var % nbdim = 2
+         endif
+         if (allocated(Agrif_Gr%tabvars(i)%var%larray3)) then
+             Agrif_Gr % tabvars(i) % var % nbdim = 3
+         endif
+         if (allocated(Agrif_Gr%tabvars(i)%var%larray4)) then
+             Agrif_Gr % tabvars(i) % var % nbdim = 4
+         endif
+         if (allocated(Agrif_Gr%tabvars(i)%var%larray5)) then
+             Agrif_Gr % tabvars(i) % var % nbdim = 5
+         endif
+         if (allocated(Agrif_Gr%tabvars(i)%var%larray6)) then
+             Agrif_Gr % tabvars(i) % var % nbdim = 6
+         endif
+C
+         if (allocated(Agrif_Gr%tabvars(i)%var%iarray1)) then
+             Agrif_Gr % tabvars(i) % var % nbdim = 1
+         endif
+         if (allocated(Agrif_Gr%tabvars(i)%var%iarray2)) then
+             Agrif_Gr % tabvars(i) % var % nbdim = 2
+         endif
+         if (allocated(Agrif_Gr%tabvars(i)%var%iarray3)) then
+             Agrif_Gr % tabvars(i) % var % nbdim = 3
+         endif
+         if (allocated(Agrif_Gr%tabvars(i)%var%iarray4)) then
+             Agrif_Gr % tabvars(i) % var % nbdim = 4
+         endif
+         if (allocated(Agrif_Gr%tabvars(i)%var%iarray5)) then
+             Agrif_Gr % tabvars(i) % var % nbdim = 5
+         endif
+         if (allocated(Agrif_Gr%tabvars(i)%var%iarray6)) then
+             Agrif_Gr % tabvars(i) % var % nbdim = 6
+         endif
+C
+         if (allocated(Agrif_Gr%tabvars(i)%var%carray1)) then
+             Agrif_Gr % tabvars(i) % var % nbdim = 1
+         endif
+         if (allocated(Agrif_Gr%tabvars(i)%var%carray2)) then
+             Agrif_Gr % tabvars(i) % var % nbdim = 2
+         endif
+C 
+      enddo
+C
+      Return
+C 
+C
+      End Subroutine Agrif_initialisations
+C 
+C
+      End Module AGRIF_Init 
Index: vendors/AGRIF/r_01/AGRIF_FILES/modinitvars.F
===================================================================
--- vendors/AGRIF/r_01/AGRIF_FILES/modinitvars.F	(revision 2672)
+++ vendors/AGRIF/r_01/AGRIF_FILES/modinitvars.F	(revision 2672)
@@ -0,0 +1,125 @@
+!
+! $Id: modinitvars.F 662 2007-05-25 15:58:52Z opalod $
+!
+C     Agrif (Adaptive Grid Refinement In Fortran)
+C
+C     Copyright (C) 2003 Laurent Debreu (Laurent.Debreu@imag.fr)
+C                        Christophe Vouland (Christophe.Vouland@imag.fr)    
+C
+C     This program is free software; you can redistribute it and/or modify
+C     it under the terms of the GNU General Public License as published by
+C     the Free Software Foundation; either version 2 of the License, or
+C     (at your option) any later version.
+C
+C     This program is distributed in the hope that it will be useful,
+C     but WITHOUT ANY WARRANTY; without even the implied warranty of
+C     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+C     GNU General Public License for more details.
+C
+C     You should have received a copy of the GNU General Public License
+C     along with this program; if not, write to the Free Software
+C     Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+C
+C
+C
+CCC   Module Agrif_Init_Vars
+C
+      Module Agrif_Init_Vars
+C
+CCC   Description:
+CCC   Initialization of the variables of the current grid.
+C
+C     Modules used: 
+C      
+      Use Agrif_Types
+      Use Agrif_link
+C   
+      IMPLICIT NONE
+C
+      Contains
+C     Defininition of the procedures contained in this module 
+C  
+C 
+C     **************************************************************************
+CCC   Subroutine Agrif_Create_var 
+C     **************************************************************************
+C  
+      Subroutine Agrif_Create_Var(Agrif_Gr)
+C
+CCC   Description:
+CCC   Allocation of the field "var" of the grid variables.
+CCC   Fields "root_var", "nbdim" and "parent_var" of the grid variables.
+CCC   Array "tabvars" of the current grid. 
+C
+CC    Method:                  
+C 
+C     Declarations:
+C
+      
+C
+C     Pointer argument:
+      TYPE(Agrif_Grid),pointer   :: Agrif_Gr  ! Pointer on the current grid
+      INTEGER :: nb
+C
+C     Array "tabvars" of the current grid. 
+C
+      Allocate(Agrif_Gr % tabvars(Agrif_NbVariables))
+C      
+      do nb = 1, Agrif_NbVariables
+        Allocate(Agrif_Gr % tabvars(nb) % var)
+      enddo
+
+C     Fields "root_var", "nbdim" and "parent_var" of the grid variables.     
+      if (Agrif_Gr % fixedrank .NE.0) then
+         do nb = 1, Agrif_NbVariables     
+            Agrif_Gr % tabvars(nb) % parent_var => 
+     &      Agrif_Gr % parent %tabvars(nb)
+            Agrif_Gr % tabvars(nb) % var % nbdim =
+     &      Agrif_Mygrid % tabvars(nb) % var % nbdim
+            Agrif_Gr % tabvars(nb) % var % root_var =>
+     &      Agrif_Mygrid % tabvars(nb) % var          
+         enddo
+      endif
+C           
+      End Subroutine Agrif_Create_Var
+C
+C
+C     **************************************************************************
+CCC   Subroutine Agrif_CreateVar
+C     **************************************************************************
+C 
+      Subroutine Agrif_CreateVar(Agrif_Gr)            
+C
+CCC   Description:
+CCC   This subroutine allows to make a link between Mygrid and the current grid 
+C
+C     Modules used:
+C      
+C
+C     Declarations:
+C      
+C
+C
+C     Arguments      
+C
+      TYPE(Agrif_Grid),pointer   :: Agrif_Gr    ! Pointer on the current grid
+      INTEGER                    :: i           ! Loop
+C
+      if (Agrif_Gr % fixedrank .NE. 0) then
+C  
+         do i = 1 , Agrif_NbVariables 
+            Agrif_Gr % tabvars(i) % parent_var => 
+     &      Agrif_Gr % parent % tabvars(i) 
+            Agrif_Gr % tabvars(i) % var % root_var => 
+     &      Agrif_Mygrid % tabvars(i) % var
+            Agrif_Gr % tabvars(i) % var % nbdim  = 
+     &      Agrif_Gr % parent % tabvars(i) % var % nbdim
+         enddo 
+C	 
+      endif 
+C       
+      End Subroutine Agrif_CreateVar
+C
+C
+C
+      End Module Agrif_Init_Vars
Index: vendors/AGRIF/r_01/AGRIF_FILES/modinterp.F
===================================================================
--- vendors/AGRIF/r_01/AGRIF_FILES/modinterp.F	(revision 2672)
+++ vendors/AGRIF/r_01/AGRIF_FILES/modinterp.F	(revision 2672)
@@ -0,0 +1,2270 @@
+!
+! $Id: modinterp.F 779 2007-12-22 17:04:17Z rblod $
+!
+C     AGRIF (Adaptive Grid Refinement In Fortran)
+C
+C     Copyright (C) 2003 Laurent Debreu (Laurent.Debreu@imag.fr)
+C                        Christophe Vouland (Christophe.Vouland@imag.fr)    
+C
+C     This program is free software; you can redistribute it and/or modify
+C     it under the terms of the GNU General Public License as published by
+C     the Free Software Foundation; either version 2 of the License, or
+C     (at your option) any later version.
+C
+C     This program is distributed in the hope that it will be useful,
+C     but WITHOUT ANY WARRANTY; without even the implied warranty of
+C     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+C     GNU General Public License for more details.
+C
+C     You should have received a copy of the GNU General Public License
+C     along with this program; if not, write to the Free Software
+C     Foundation, Inc., 59 Temple Place- Suite 330, Boston, MA 02111-1307, USA.
+C
+C
+C
+CCC   Module Agrif_Interpolation
+C
+      Module Agrif_Interpolation
+C
+CCC   Description:
+CCC   Module to initialize a fine grid from its parent grid, by using a space 
+CCC   interpolation
+C
+C     Modules used:
+C  
+      Use Agrif_Interpbasic
+      Use Agrif_Arrays
+      Use Agrif_Mask 
+      Use Agrif_CurgridFunctions
+#if defined AGRIF_MPI
+      Use Agrif_mpp
+#endif
+C      
+      IMPLICIT NONE
+      logical,  private:: precomputedone(7) = .FALSE.
+C
+      CONTAINS
+C     Define procedures contained in this module        
+C
+C
+C
+C     **************************************************************************
+CCC   Subroutine Agrif_Interp_1d
+C     **************************************************************************
+C 
+      Subroutine Agrif_Interp_1d(TypeInterp,parent,child,tab,
+     &    torestore,nbdim,procname)            
+C
+CCC   Description:
+CCC   Subroutine to calculate the boundary conditions of a fine grid for a 1D
+C        grid variable.
+C
+C     Declarations:
+C      
+      
+C
+C     Arguments      
+      INTEGER :: nbdim
+      INTEGER,DIMENSION(6) :: TypeInterp     ! Kind of interpolation
+                                             !    (linear,lagrange,spline)
+      TYPE(AGRIF_PVariable) :: parent        ! Variable on the parent grid
+      TYPE(AGRIF_PVariable) :: child         ! Variable on the child grid
+      TYPE(AGRIF_PVariable) :: childtemp     ! Temporary variable on the child
+                                             !    grid
+      LOGICAL :: torestore
+      REAL, DIMENSION(
+     &         child%var%lb(1):child%var%ub(1)
+     &         ), Target :: tab    ! Result
+      External :: procname
+      Optional ::  procname
+C
+C
+      allocate(childtemp % var)  
+C      
+C     Pointer on the root variable
+      childtemp % var % root_var => child % var %root_var
+C      
+C     Number of dimensions of the grid variable
+      childtemp % var % nbdim = nbdim
+C
+C     Tab is the result of the interpolation
+      childtemp % var % parray1 => tab 
+      
+      childtemp % var % lb = child % var % lb
+      childtemp % var % ub = child % var % ub  
+            
+C      
+      if (torestore) then
+C 
+          childtemp % var % parray1 = child % var % array1
+C          
+          childtemp % var % restore1D => child % var % restore1D
+C      
+        else
+C        
+          Nullify(childtemp % var % restore1D)
+C      
+      endif     
+C 
+C     Index indicating (in the Agrif_Interp1D procedure) if a space
+C        interpolation is necessary
+      childtemp % var % interpIndex => child % var % interpIndex       
+      childtemp % var % Interpolationshouldbemade = 
+     &    child % var % Interpolationshouldbemade 
+      childtemp % var % list_interp => child % var% list_interp            
+C      
+      if (present(procname)) then
+      Call Agrif_InterpVariable
+     &     (TypeInterp,parent,childtemp,torestore,procname)
+      else
+      Call Agrif_InterpVariable
+     &     (TypeInterp,parent,childtemp,torestore)
+      endif
+      child % var % list_interp => childtemp % var %list_interp     
+C      
+      deallocate(childtemp % var)
+C
+C       
+      End Subroutine Agrif_Interp_1D
+C
+C
+C
+C     **************************************************************************
+CCC   Subroutine Agrif_Interp_2d
+C     **************************************************************************
+C 
+      Subroutine Agrif_Interp_2d(TypeInterp,parent,child,tab,
+     &                           torestore,nbdim,procname)            
+C
+CCC   Description:
+CCC   Subroutine to calculate the boundary conditions of a fine grid for a 2D
+C        grid variable.
+C
+C     Declarations:
+C      
+      
+C
+C     Arguments      
+      INTEGER :: nbdim
+      INTEGER,DIMENSION(6) :: TypeInterp     ! Kind of interpolation
+                                             !    (linear,lagrange,spline)
+      TYPE(AGRIF_PVariable) :: parent        ! Variable on the parent grid
+      TYPE(AGRIF_PVariable) :: child         ! Variable on the child grid
+      TYPE(AGRIF_PVariable) :: childtemp     ! Temporary variable on the child
+                                             !    grid
+      LOGICAL :: torestore
+      REAL, DIMENSION(
+     &         child%var%lb(1):child%var%ub(1),
+     &         child%var%lb(2):child%var%ub(2)
+     &    ), Target :: tab    ! Result
+      External :: procname
+      Optional ::  procname
+C
+C
+      allocate(childtemp % var)  
+C      
+C     Pointer on the root variable
+      childtemp % var % root_var => child % var %root_var
+C      
+C     Number of dimensions of the grid variable
+      childtemp % var % nbdim = nbdim
+C
+C     Tab is the result of the interpolation
+      childtemp % var % parray2 => tab  
+      
+      childtemp % var % lb = child % var % lb
+      childtemp % var % ub = child % var % ub
+      
+C
+      if (torestore) then      
+C 
+          childtemp % var % parray2 = child % var % array2          
+C 
+          childtemp % var % restore2D => child % var % restore2D        
+C      
+        else
+C        
+          Nullify(childtemp % var % restore2D)
+C      
+      endif       
+C 
+C     Index indicating (in the Agrif_Interp2D procedure) if a space
+C        interpolation is necessary
+      childtemp % var % interpIndex => child % var % interpIndex       
+      childtemp % var % Interpolationshouldbemade = 
+     &    child % var % Interpolationshouldbemade   
+      childtemp % var % list_interp => child % var% list_interp          
+C     
+      if (present(procname)) then
+      Call Agrif_InterpVariable
+     &     (TypeInterp,parent,childtemp,torestore,procname)
+      else
+      Call Agrif_InterpVariable
+     &     (TypeInterp,parent,childtemp,torestore)
+      endif
+
+      child % var % list_interp => childtemp % var %list_interp     
+C      
+      deallocate(childtemp % var)
+C
+C       
+      End Subroutine Agrif_Interp_2D
+C
+C
+C
+C     **************************************************************************
+CCC   Subroutine Agrif_Interp_3d
+C     **************************************************************************
+C 
+      Subroutine Agrif_Interp_3d(TypeInterp,parent,child,tab,
+     &   torestore,nbdim,procname)            
+C
+CCC   Description:
+CCC   Subroutine to calculate the boundary conditions of a fine grid for a 3D
+C        grid variable.
+C
+C     Declarations:
+C      
+      
+C
+C     Arguments      
+      INTEGER :: nbdim
+      INTEGER,DIMENSION(6) :: TypeInterp     ! Kind of interpolation
+                                             !    (linear,lagrange,spline)
+      TYPE(AGRIF_PVariable) :: parent        ! Variable on the parent grid
+      TYPE(AGRIF_PVariable) :: child         ! Variable on the child grid
+      TYPE(AGRIF_PVariable) :: childtemp     ! Temporary variable on the child
+                                             !    grid
+      LOGICAL :: torestore
+      REAL, DIMENSION(
+     &         child%var%lb(1):child%var%ub(1),
+     &         child%var%lb(2):child%var%ub(2),
+     &         child%var%lb(3):child%var%ub(3)
+     &      ), Target :: tab  ! Results
+      External :: procname
+      Optional ::  procname
+C
+C
+      allocate(childtemp % var)  
+C
+C     Pointer on the root variable
+      childtemp % var % root_var => child % var %root_var
+C      
+C     Number of dimensions of the grid variable
+      childtemp % var % nbdim = nbdim  
+C     
+C     Tab is the result of the interpolation 
+      childtemp % var % parray3 => tab 
+      
+      childtemp % var % lb = child % var % lb
+      childtemp % var % ub = child % var % ub        
+C      
+      if (torestore) then
+C     
+          childtemp % var % parray3 = child % var % array3
+C
+          childtemp % var % restore3D => child % var % restore3D
+C      
+        else
+C        
+          Nullify(childtemp % var % restore3D)
+C      
+      endif
+C 
+C     Index indicating (in the Agrif_Interp3D procedure) if a space
+C        interpolation is necessary
+      childtemp % var % interpIndex => child % var % interpIndex    
+      childtemp % var % Interpolationshouldbemade = 
+     &    child % var % Interpolationshouldbemade   
+      childtemp % var % list_interp => child % var% list_interp          
+C     
+
+      if (present(procname)) then
+      Call Agrif_InterpVariable
+     &     (TypeInterp,parent,childtemp,torestore,procname)
+      else
+      Call Agrif_InterpVariable
+     &     (TypeInterp,parent,childtemp,torestore)
+      endif
+
+
+      child % var % list_interp => childtemp % var %list_interp     
+C      
+      deallocate(childtemp % var)
+C
+C       
+      End Subroutine Agrif_Interp_3D               
+C
+C
+C
+C     **************************************************************************
+CCC   Subroutine Agrif_Interp_4d
+C     **************************************************************************
+C 
+      Subroutine Agrif_Interp_4d(TypeInterp,parent,child,tab,
+     &   torestore,nbdim,procname)            
+C
+CCC   Description:
+CCC   Subroutine to calculate the boundary conditions of a fine grid for a 4D
+C        grid variable.
+C
+C     Declarations:
+C      
+      
+C
+C     Arguments      
+      INTEGER :: nbdim
+      INTEGER,DIMENSION(6) :: TypeInterp     ! Kind of interpolation
+                                             !    (linear,lagrange,spline)
+      TYPE(AGRIF_PVariable) :: parent        ! Variable on the parent grid
+      TYPE(AGRIF_PVariable) :: child         ! Variable on the child grid
+      TYPE(AGRIF_PVariable) :: childtemp     ! Temporary variable on the child
+                                             !    grid
+      LOGICAL :: torestore
+      REAL, DIMENSION(
+     &         child%var%lb(1):child%var%ub(1),
+     &         child%var%lb(2):child%var%ub(2),
+     &         child%var%lb(3):child%var%ub(3),
+     &         child%var%lb(4):child%var%ub(4)
+     &      ), Target :: tab  ! Results
+      External :: procname
+      Optional ::  procname
+C
+C
+      allocate(childtemp % var)  
+C
+C     Pointer on the root variable
+      childtemp % var % root_var => child % var %root_var
+C      
+C     Number of dimensions of the grid variable
+      childtemp % var % nbdim = nbdim  
+C      
+C     Tab is the result of the interpolation
+      childtemp % var % parray4 => tab 
+      
+      childtemp % var % lb = child % var % lb
+      childtemp % var % ub = child % var % ub  
+            
+C 
+      if (torestore) then
+C 
+          childtemp % var % parray4 = child % var % array4
+C
+          childtemp % var % restore4D => child % var % restore4D
+C      
+        else
+C        
+          Nullify(childtemp % var % restore4D)
+C      
+      endif        
+C 
+C     Index indicating (in the Agrif_Interp4D procedure) if a space
+C        interpolation is necessary
+      childtemp % var % interpIndex => child % var % interpIndex    
+      childtemp % var % Interpolationshouldbemade = 
+     &    child % var % Interpolationshouldbemade  
+      childtemp % var % list_interp => child % var% list_interp           
+C     
+      if (present(procname)) then
+      Call Agrif_InterpVariable
+     &     (TypeInterp,parent,childtemp,torestore,procname)
+      else
+      Call Agrif_InterpVariable
+     &     (TypeInterp,parent,childtemp,torestore)
+      endif
+
+
+      child % var % list_interp => childtemp % var %list_interp
+C      
+      deallocate(childtemp % var)
+C
+C       
+      End Subroutine Agrif_Interp_4D
+C
+C
+C
+C     **************************************************************************
+CCC   Subroutine Agrif_Interp_5d
+C     **************************************************************************
+C 
+      Subroutine Agrif_Interp_5d(TypeInterp,parent,child,tab,
+     &   torestore,nbdim,procname)            
+C
+CCC   Description:
+CCC   Subroutine to calculate the boundary conditions of a fine grid for a 5D
+C        grid variable.
+C
+C     Declarations:
+C      
+      
+C
+C     Arguments      
+      INTEGER :: nbdim
+      INTEGER,DIMENSION(6) :: TypeInterp     ! Kind of interpolation
+                                             !    (linear,lagrange,spline)
+      TYPE(AGRIF_PVariable) :: parent        ! Variable on the parent grid
+      TYPE(AGRIF_PVariable) :: child         ! Variable on the child grid
+      TYPE(AGRIF_PVariable) :: childtemp     ! Temporary variable on the child
+                                             !    grid
+      LOGICAL :: torestore
+      REAL, DIMENSION(
+     &         child%var%lb(1):child%var%ub(1),
+     &         child%var%lb(2):child%var%ub(2),
+     &         child%var%lb(3):child%var%ub(3),
+     &         child%var%lb(4):child%var%ub(4),
+     &         child%var%lb(5):child%var%ub(5)
+     &      ),  Target :: tab  ! Results
+      External :: procname
+      Optional ::  procname
+C
+C
+      allocate(childtemp % var)  
+C
+C     Pointer on the root variable
+      childtemp % var % root_var => child % var %root_var
+C      
+C     Number of dimensions of the grid variable
+      childtemp % var % nbdim = nbdim  
+C      
+C     Tab is the result of the interpolation
+      childtemp % var % parray5 => tab  
+      
+      childtemp % var % lb = child % var % lb
+      childtemp % var % ub = child % var % ub  
+            
+C      
+      if (torestore) then
+C 
+          childtemp % var % parray5 = child % var % array5
+C
+          childtemp % var % restore5D => child % var % restore5D
+C      
+        else
+C        
+          Nullify(childtemp % var % restore5D)
+C      
+      endif       
+C 
+C     Index indicating (in the Agrif_Interp5D procedure) if a space
+C        interpolation is necessary
+      childtemp % var % interpIndex => child % var % interpIndex    
+      childtemp % var % Interpolationshouldbemade = 
+     &    child % var % Interpolationshouldbemade   
+      childtemp % var % list_interp => child % var% list_interp          
+C      
+      if (present(procname)) then
+      Call Agrif_InterpVariable
+     &     (TypeInterp,parent,childtemp,torestore,procname)
+      else
+      Call Agrif_InterpVariable
+     &     (TypeInterp,parent,childtemp,torestore)
+      endif
+
+     
+      child % var % list_interp => childtemp % var %list_interp
+C      
+      deallocate(childtemp % var)
+C
+C       
+      End Subroutine Agrif_Interp_5D
+C
+C
+C
+C     **************************************************************************
+CCC   Subroutine Agrif_Interp_6d
+C     **************************************************************************
+C 
+      Subroutine Agrif_Interp_6d(TypeInterp,parent,child,tab,
+     &  torestore,nbdim,procname)            
+C
+CCC   Description:
+CCC   Subroutine to calculate the boundary conditions of a fine grid for a 6D
+C        grid variable.
+C
+C     Declarations:
+C      
+      
+C
+C     Arguments      
+      INTEGER :: nbdim
+      INTEGER,DIMENSION(6) :: TypeInterp     ! Kind of interpolation
+                                             !    (linear,lagrange,spline)
+      TYPE(AGRIF_PVariable) :: parent        ! Variable on the parent grid
+      TYPE(AGRIF_PVariable) :: child         ! Variable on the child grid
+      TYPE(AGRIF_PVariable) :: childtemp     ! Temporary variable on the child
+                                             !    grid
+      LOGICAL :: torestore
+      REAL, DIMENSION(
+     &         child%var%lb(1):child%var%ub(1),
+     &         child%var%lb(2):child%var%ub(2),
+     &         child%var%lb(3):child%var%ub(3),
+     &         child%var%lb(4):child%var%ub(4),
+     &         child%var%lb(5):child%var%ub(5),
+     &         child%var%lb(6):child%var%ub(6)
+     &      ),  Target :: tab  ! Results
+      External :: procname
+      Optional ::  procname
+C
+C
+      allocate(childtemp % var)  
+C
+C     Pointer on the root variable
+      childtemp % var % root_var => child % var %root_var
+C      
+C     Number of dimensions of the grid variable
+      childtemp % var % nbdim = nbdim  
+C      
+C     Tab is the result of the interpolation
+      childtemp % var % parray6 => tab  
+      
+      childtemp % var % lb = child % var % lb
+      childtemp % var % ub = child % var % ub  
+            
+C      
+      if (torestore) then
+C 
+          childtemp % var % parray6 = child % var % array6
+C
+          childtemp % var % restore6D => child % var % restore6D
+C      
+        else
+C        
+          Nullify(childtemp % var % restore6D)
+C      
+      endif       
+C 
+C     Index indicating (in the Agrif_Interp6D procedure) if a space
+C        interpolation is necessary
+      childtemp % var % interpIndex => child % var % interpIndex    
+      childtemp % var % Interpolationshouldbemade = 
+     &    child % var % Interpolationshouldbemade  
+     
+      childtemp % var % list_interp => child % var% list_interp           
+C      
+
+      if (present(procname)) then
+      Call Agrif_InterpVariable
+     &     (TypeInterp,parent,childtemp,torestore,procname)
+      else
+      Call Agrif_InterpVariable
+     &     (TypeInterp,parent,childtemp,torestore)
+      endif
+
+
+C      
+      child % var % list_interp => childtemp % var %list_interp
+      deallocate(childtemp % var)
+C
+C       
+      End Subroutine Agrif_Interp_6D
+C
+C
+C
+C     **************************************************************************
+C     Subroutine Agrif_InterpVariable    
+C     **************************************************************************
+C   
+      Subroutine Agrif_InterpVariable(TYPEinterp,parent,child,torestore,
+     &            procname)
+C
+CCC   Description:
+CCC   Subroutine to set some arguments of subroutine Agrif_InterpnD, n being the
+CCC   DIMENSION of the grid variable.
+C
+CC    Declarations:
+C       
+c      
+C      
+C
+C     Scalar argument
+      INTEGER,DIMENSION(6) :: TYPEinterp! TYPE of interpolation
+                                        !    (linear,spline,...)
+C     Data TYPE arguments                                   
+      TYPE(AGRIF_PVariable) :: parent   ! Variable on the parent grid
+      TYPE(AGRIF_PVariable) :: child    ! Variable on the child grid
+C
+C     LOGICAL argument      
+      LOGICAL:: torestore               ! Its value is .false., it indicates the
+                                        ! results of the interpolation are    
+                                        ! applied on the whole current grid   
+C
+C     Local scalars      
+      INTEGER               :: nbdim          ! Number of dimensions of the
+                                              !    current grid
+      INTEGER ,DIMENSION(6) :: pttab_child  
+      INTEGER ,DIMENSION(6) :: petab_child      
+      INTEGER ,DIMENSION(6) :: pttab_parent  
+      REAL    ,DIMENSION(6) :: s_child,s_parent
+      REAL    ,DIMENSION(6) :: ds_child,ds_parent
+      External :: procname
+      Optional ::  procname
+
+C
+      Call PreProcessToInterpOrUpdate(parent,child,
+     &             petab_Child(1:nbdim),
+     &             pttab_Child(1:nbdim),pttab_Parent(1:nbdim),
+     &             s_Child(1:nbdim),s_Parent(1:nbdim),
+     &             ds_Child(1:nbdim),ds_Parent(1:nbdim),
+     &             nbdim)
+C
+C
+C     Call to a procedure of interpolation against the number of dimensions of 
+C     the grid variable
+C
+
+      if (present(procname)) then
+      call Agrif_InterpnD
+     &            (TYPEinterp,parent,child,
+     &             pttab_Child(1:nbdim),petab_Child(1:nbdim),
+     &             pttab_Child(1:nbdim),pttab_Parent(1:nbdim),
+     &             s_Child(1:nbdim),s_Parent(1:nbdim),
+     &             ds_Child(1:nbdim),ds_Parent(1:nbdim),
+     &             child,torestore,nbdim,procname)
+      else
+      call Agrif_InterpnD
+     &            (TYPEinterp,parent,child,
+     &             pttab_Child(1:nbdim),petab_Child(1:nbdim),
+     &             pttab_Child(1:nbdim),pttab_Parent(1:nbdim),
+     &             s_Child(1:nbdim),s_Parent(1:nbdim),
+     &             ds_Child(1:nbdim),ds_Parent(1:nbdim),
+     &             child,torestore,nbdim)
+
+      endif
+C
+      Return
+C
+C
+      End subroutine Agrif_InterpVariable       
+C
+C
+C     **************************************************************************
+C     Subroutine Agrif_InterpnD  
+C     **************************************************************************
+C  
+      Subroutine Agrif_InterpnD(TYPEinterp,parent,child,
+     &                          pttab,petab,
+     &                          pttab_Child,pttab_Parent,
+     &                          s_Child,s_Parent,ds_Child,ds_Parent,
+     &                          restore,torestore,nbdim,procname)
+C
+C     Description:
+C     Subroutine to interpolate a nD grid variable from its parent grid,
+C     by using a space interpolation. 
+C
+C     Declarations:
+C
+      
+C
+#ifdef AGRIF_MPI
+C
+#include "mpif.h"
+C
+#endif
+C
+C     Arguments
+      External :: procname
+      Optional :: procname
+      INTEGER                    :: nbdim
+      INTEGER,DIMENSION(6)       :: TYPEinterp         ! TYPE of interpolation
+                                                       !    (linear,...)
+      TYPE(AGRIF_PVARIABLE)      :: parent             ! Variable of the parent
+                                                       !    grid
+      TYPE(AGRIF_PVARIABLE)      :: child              ! Variable of the child
+                                                       !    grid
+      INTEGER,DIMENSION(nbdim)   :: pttab              ! Index of the first
+                                                       !    point inside the
+                                                       !    domain
+      INTEGER,DIMENSION(nbdim)   :: petab              ! Index of the first
+                                                       !    point inside the
+                                                       !    domain
+      INTEGER,DIMENSION(nbdim)   :: pttab_Child        ! Index of the first
+                                                       !    point inside the
+                                                       !    domain for the child
+                                                       !    grid variable
+      INTEGER,DIMENSION(nbdim)   :: pttab_Parent       ! Index of the first
+                                                       !    point inside the
+                                                       !    domain for the
+                                                       !    parent grid variable
+      TYPE(AGRIF_PVARIABLE)      :: restore            ! Indicates points where
+                                                       !    interpolation
+      REAL,DIMENSION(nbdim)      :: s_Child,s_Parent   ! Positions of the parent
+                                                       !    and child grids
+      REAL,DIMENSION(nbdim)      :: ds_Child,ds_Parent ! Space steps of the
+                                                       !    parent and child
+                                                       !    grids
+      LOGICAL                        :: torestore      ! Indicates if the array
+                                                       !    restore is used
+C
+C     Local pointers
+      TYPE(AGRIF_PVARIABLE),SAVE      :: tempP,tempPextend  ! Temporary parent grid variable
+      TYPE(AGRIF_PVARIABLE),SAVE      :: tempC      ! Temporary child grid variable
+C
+C     Local scalars        
+      INTEGER                     :: i,j,k,l,m,n
+      INTEGER,DIMENSION(nbdim)    :: pttruetab,cetruetab
+      INTEGER,DIMENSION(nbdim)    :: indmin,indmax
+      LOGICAL,DIMENSION(nbdim)    :: noraftab
+      REAL   ,DIMENSION(nbdim)    :: s_Child_temp,s_Parent_temp
+      INTEGER,DIMENSION(nbdim)    :: lowerbound,upperbound
+      INTEGER,DIMENSION(nbdim)    :: indminglob,indmaxglob
+      INTEGER,DIMENSION(nbdim,2,2) :: childarray
+      INTEGER,DIMENSION(nbdim,2,2) :: parentarray
+      LOGICAL :: memberin,member
+      TYPE(AGRIF_PVARIABLE),SAVE                      ::  parentvalues
+      LOGICAL :: find_list_interp
+      INTEGER,DIMENSION(nbdim)    :: indminglob2,indmaxglob2      
+C
+#ifdef AGRIF_MPI
+C
+      LOGICAL :: memberout
+      INTEGER,PARAMETER                          :: etiquette = 100
+      INTEGER                                    :: code
+      INTEGER,DIMENSION(nbdim,4)           :: tab3
+      INTEGER,DIMENSION(nbdim,4,0:Agrif_Nbprocs-1) :: tab4
+      INTEGER,DIMENSION(nbdim,0:Agrif_Nbprocs-1,8) :: tab4t
+      LOGICAL, DIMENSION(0:Agrif_Nbprocs-1) :: memberinall
+      LOGICAL, DIMENSION(0:Agrif_Nbprocs-1) :: sendtoproc1,recvfromproc1
+      LOGICAL, DIMENSION(1) :: memberin1
+C
+#endif      
+C     
+
+C   
+C     Boundaries of the current grid where interpolation is done
+
+      IF (Associated(child%var%list_interp)) THEN
+      Call Agrif_Find_list_interp(child%var%list_interp,pttab,petab,
+     &                          pttab_Child,pttab_Parent,nbdim,
+     &                          indmin,indmax,indminglob,
+     &       indmaxglob,indminglob2,indmaxglob2,parentarray,
+     &       pttruetab,cetruetab,member,memberin,find_list_interp
+#if defined AGRIF_MPI
+     &       ,tab4t,memberinall,sendtoproc1,recvfromproc1
+#endif
+     &    )
+      ELSE
+      find_list_interp = .FALSE.
+      ENDIF
+      
+      IF (.not.find_list_interp) THEN
+
+      Call Agrif_nbdim_Get_bound_dimension(child % var,
+     &                               lowerbound,upperbound,nbdim)
+      
+      Call Agrif_Childbounds(nbdim,lowerbound,upperbound,
+     &                                   pttab,petab,
+     &                                   pttruetab,cetruetab,memberin)
+     
+C
+      Call Agrif_Parentbounds(TYPEinterp,nbdim,indminglob,indmaxglob,
+     &                        s_Parent_temp,s_Child_temp,
+     &                        s_Child,ds_Child,
+     &                        s_Parent,ds_Parent,
+     &                        pttab,petab,
+     &                        pttab_Child,pttab_Parent,
+     &                        child%var%root_var%posvar,
+     &                        child % var % root_var % interptab)
+       
+#ifdef AGRIF_MPI
+       IF (memberin) THEN
+        Call Agrif_Parentbounds(TYPEinterp,nbdim,indmin,indmax,
+     &                        s_Parent_temp,s_Child_temp,
+     &                        s_Child,ds_Child,
+     &                        s_Parent,ds_Parent,
+     &                        pttruetab,cetruetab,
+     &                        pttab_Child,pttab_Parent,
+     &                        child%var%root_var%posvar,
+     &                        child % var % root_var % interptab)
+      ENDIF
+       
+      Call Agrif_nbdim_Get_bound_dimension(parent%var,
+     &                              lowerbound,upperbound,nbdim)
+       
+      Call Agrif_ChildGrid_to_ParentGrid()
+C
+      Call Agrif_Childbounds(nbdim,
+     &                       lowerbound,upperbound,
+     &                       indminglob,indmaxglob,
+     &                       indminglob2,indmaxglob2,member)
+
+C
+      IF (member) THEN
+      Call Agrif_GlobtoLocInd2(parentarray,
+     &                     lowerbound,upperbound,
+     &                     indminglob2,indmaxglob2,
+     &                     nbdim,Agrif_Procrank,
+     &                     member)
+       endif
+       
+      Call Agrif_ParentGrid_to_ChildGrid()
+#else
+      parentarray(:,1,1) = indminglob
+      parentarray(:,2,1) = indmaxglob
+      parentarray(:,1,2) = indminglob
+      parentarray(:,2,2) = indmaxglob
+      indmin = indminglob
+      indmax = indmaxglob
+      member = .TRUE.
+#endif
+
+      ELSE
+      
+#if !defined AGRIF_MPI
+      parentarray(:,1,1) = indminglob
+      parentarray(:,2,1) = indmaxglob
+      parentarray(:,1,2) = indminglob
+      parentarray(:,2,2) = indmaxglob
+      indmin = indminglob
+      indmax = indmaxglob
+      member = .TRUE.
+      s_Parent_temp = s_Parent + (indminglob - pttab_Parent)*ds_Parent
+      s_Child_temp = s_Child + (pttab - pttab_Child) * ds_Child
+#else      
+      s_Parent_temp = s_Parent + (indmin - pttab_Parent)*ds_Parent
+      s_Child_temp = s_Child + (pttruetab - pttab_Child) * ds_Child
+#endif      
+           
+      ENDIF
+
+      IF (member) THEN
+      IF (.not.associated(tempP%var)) allocate(tempP%var)
+
+C
+      Call Agrif_nbdim_allocation(tempP%var,
+     &     parentarray(:,1,1),parentarray(:,2,1),nbdim)
+
+      Call Agrif_nbdim_Full_VarEQreal(tempP%var,0.,nbdim)
+
+      IF (present(procname)) THEN
+      Call Agrif_ChildGrid_to_ParentGrid()
+            SELECT CASE (nbdim)
+        CASE(1)
+          CALL procname(tempP%var%array1,
+     &                          parentarray(1,1,2),parentarray(1,2,2))
+        CASE(2)
+          CALL procname(tempP%var%array2,
+     &                          parentarray(1,1,2),parentarray(1,2,2),
+     &                          parentarray(2,1,2),parentarray(2,2,2))
+        CASE(3)
+          CALL procname(tempP%var%array3,
+     &                          parentarray(1,1,2),parentarray(1,2,2),
+     &                          parentarray(2,1,2),parentarray(2,2,2),
+     &                          parentarray(3,1,2),parentarray(3,2,2))
+        CASE(4)
+          CALL procname(tempP%var%array4,
+     &                          parentarray(1,1,2),parentarray(1,2,2),
+     &                          parentarray(2,1,2),parentarray(2,2,2),
+     &                          parentarray(3,1,2),parentarray(3,2,2),
+     &                          parentarray(4,1,2),parentarray(4,2,2))
+        CASE(5)
+          CALL procname(tempP%var%array5,
+     &                          parentarray(1,1,2),parentarray(1,2,2),
+     &                          parentarray(2,1,2),parentarray(2,2,2),
+     &                          parentarray(3,1,2),parentarray(3,2,2),
+     &                          parentarray(4,1,2),parentarray(4,2,2),
+     &                          parentarray(5,1,2),parentarray(5,2,2))
+        CASE(6)
+          CALL procname(tempP%var%array6,
+     &                          parentarray(1,1,2),parentarray(1,2,2),
+     &                          parentarray(2,1,2),parentarray(2,2,2),
+     &                          parentarray(3,1,2),parentarray(3,2,2),
+     &                          parentarray(4,1,2),parentarray(4,2,2),
+     &                          parentarray(5,1,2),parentarray(5,2,2),
+     &                          parentarray(6,1,2),parentarray(6,2,2))
+            END SELECT
+      Call Agrif_ParentGrid_to_ChildGrid()
+      ELSE
+
+      Call Agrif_nbdim_VarEQvar(tempP%var,
+     &        parentarray(:,1,1),parentarray(:,2,1),
+     &        parent%var,parentarray(:,1,2),parentarray(:,2,2),
+     &        nbdim)
+      ENDIF
+            endif
+
+#ifdef AGRIF_MPI
+      if (.not.find_list_interp) then
+      tab3(:,1) = indminglob2(:)
+      tab3(:,2) = indmaxglob2(:)
+      tab3(:,3) = indmin(:)
+      tab3(:,4) = indmax(:)
+C
+C
+      Call MPI_ALLGATHER(tab3,4*nbdim,MPI_INTEGER,tab4,4*nbdim,
+     &                   MPI_INTEGER,MPI_COMM_WORLD,code)
+
+      IF (.not.associated(tempPextend%var)) Allocate(tempPextend%var)
+
+      DO k=0,Agrif_Nbprocs-1
+       do j=1,4
+         do i=1,nbdim
+         tab4t(i,k,j) = tab4(i,j,k)
+                enddo
+      enddo
+      enddo
+      
+      memberin1(1) = memberin
+      CALL MPI_ALLGATHER(memberin1,1,MPI_LOGICAL,memberinall,
+     &                  1,MPI_LOGICAL,MPI_COMM_WORLD,code)
+
+       Call Get_External_Data_first(tab4t(:,:,1),
+     &            tab4t(:,:,2),
+     &            tab4t(:,:,3),tab4t(:,:,4),nbdim,member,memberin,
+     &            memberinall,sendtoproc1,recvfromproc1,tab4t(:,:,5),
+     & tab4t(:,:,6),tab4t(:,:,7),tab4t(:,:,8))
+          
+      endif     
+           
+!      Call Get_External_Data(tempP,tempPextend,tab4t(:,:,1),
+!     &            tab4t(:,:,2),
+!     &            tab4t(:,:,3),tab4t(:,:,4),nbdim,member,memberin,
+!     &            memberinall)
+     
+      Call ExchangeSameLevel2(sendtoproc1,recvfromproc1,nbdim,
+     &            tab4t(:,:,3),tab4t(:,:,4),tab4t(:,:,5),tab4t(:,:,6),
+     &            tab4t(:,:,7),tab4t(:,:,8),memberin,tempP,
+     &            tempPextend)
+#else
+      tempPextend%var => tempP%var
+#endif
+
+      if (.not.find_list_interp) then
+      Call Agrif_Addto_list_interp(child%var%list_interp,pttab,petab,
+     &                          pttab_Child,pttab_Parent,indmin,indmax,
+     &   indminglob,indmaxglob,indminglob2,indmaxglob2,parentarray,
+     &   pttruetab,cetruetab,member,memberin,nbdim
+#if defined AGRIF_MPI
+     &   ,tab4t,memberinall,sendtoproc1,recvfromproc1
+#endif
+     &    )
+      endif   
+C
+C
+      IF (memberin) THEN
+      IF (.not.associated(tempC%var)) allocate(tempC%var)
+C
+
+      Call Agrif_nbdim_allocation(tempC%var,pttruetab,cetruetab,nbdim)
+
+C
+C
+C     Special values on the parent grid
+      if (Agrif_UseSpecialValue) then
+C
+          noraftab(1:nbdim) =
+     &         child % var % root_var % interptab(1:nbdim) .EQ. 'N'
+C
+          IF (.not.associated(parentvalues%var))
+     &            Allocate(parentvalues%var)
+C
+          Call Agrif_nbdim_allocation
+     &               (parentvalues%var,indmin,indmax,nbdim)
+          Call Agrif_nbdim_Full_VarEQvar
+     &               (parentvalues%var,tempPextend%var,nbdim)
+C
+          Call Agrif_CheckMasknD(tempPextend,
+     &                           parentvalues,
+     &                           indmin(1:nbdim),indmax(1:nbdim),
+     &                           indmin(1:nbdim),indmax(1:nbdim),
+     &                           noraftab(1:nbdim),nbdim)
+C
+          Call Agrif_nbdim_deallocation(parentvalues%var,nbdim)
+C          Deallocate(parentvalues%var)
+C
+C
+      endif      
+
+C
+C
+C     Interpolation of the current grid
+
+      IF (memberin) THEN
+      if ( nbdim .EQ. 1 ) then
+         Call Agrif_Interp_1D_recursive(TypeInterp,
+     &           tempPextend%var%array1,tempC%var%array1,
+     &           indmin,indmax,
+     &           pttruetab,cetruetab,
+     &           s_Child_temp,s_Parent_temp,
+     &           ds_Child,ds_Parent,nbdim)
+      elseif ( nbdim .EQ. 2 ) then
+
+         Call Agrif_Interp_2D_recursive(TypeInterp,
+     &           tempPextend%var%array2,tempC%var%array2,
+     &           indmin,indmax,
+     &           pttruetab,cetruetab,
+     &           s_Child_temp,s_Parent_temp,
+     &           ds_Child,ds_Parent,nbdim)
+      elseif ( nbdim .EQ. 3 ) then
+
+         Call Agrif_Interp_3D_recursive(TypeInterp,
+     &           tempPextend%var%array3,tempC%var%array3,
+     &           indmin,indmax,
+     &           pttruetab,cetruetab,
+     &           s_Child_temp,s_Parent_temp,
+     &           ds_Child,ds_Parent,nbdim)
+      elseif ( nbdim .EQ. 4 ) then
+         Call Agrif_Interp_4D_recursive(TypeInterp,
+     &           tempPextend%var%array4,tempC%var%array4,
+     &           indmin,indmax,
+     &           pttruetab,cetruetab,
+     &           s_Child_temp,s_Parent_temp,
+     &           ds_Child,ds_Parent,nbdim)
+      elseif ( nbdim .EQ. 5 ) then
+         Call Agrif_Interp_5D_recursive(TypeInterp,
+     &           tempPextend%var%array5,tempC%var%array5,
+     &           indmin,indmax,
+     &           pttruetab,cetruetab,
+     &           s_Child_temp,s_Parent_temp,
+     &           ds_Child,ds_Parent,nbdim)
+      elseif ( nbdim .EQ. 6 ) then
+         Call Agrif_Interp_6D_recursive(TypeInterp,
+     &           tempPextend%var%array6,tempC%var%array6,
+     &           indmin,indmax,
+     &           pttruetab,cetruetab,
+     &           s_Child_temp,s_Parent_temp,
+     &           ds_Child,ds_Parent,nbdim)
+       endif
+
+
+C  
+
+      Call Agrif_nbdim_Get_bound_dimension(child % var,
+     &                               lowerbound,upperbound,nbdim)
+
+#ifdef AGRIF_MPI
+      Call Agrif_GlobtoLocInd2(childarray,
+     &                     lowerbound,upperbound,
+     &                     pttruetab,cetruetab,
+     &                     nbdim,Agrif_Procrank,
+     &                     memberout)
+
+#else
+       childarray(:,1,1) = pttruetab
+       childarray(:,2,1) = cetruetab
+       childarray(:,1,2) = pttruetab
+       childarray(:,2,2) = cetruetab
+ccccccccccccccc       memberout = .TRUE.
+#endif
+
+
+C
+C
+C     Special values on the child grid  
+      if (Agrif_UseSpecialValueFineGrid) then
+C
+
+          Call GiveAgrif_SpecialValueToTab_mpi(child%var,tempC%var,
+     &                 childarray,
+     &                 pttruetab,cetruetab,
+     &                 Agrif_SpecialValueFineGrid,nbdim)
+
+C        
+      endif
+      
+      endif
+
+C
+      if (torestore) then
+C
+#ifdef AGRIF_MPI
+C
+        SELECT CASE (nbdim)
+        CASE (1)
+             do i = pttruetab(1),cetruetab(1)         
+ChildarrayAModifier                if (restore%var%restore1D(i) == 0) 
+ChildarrayAModifier     &                child%var%array1(childarray(i,1,2)
+ChildarrayAModifier     &                                 ) = 
+ChildarrayAModifier     &                tempC%var%array1(i)
+             enddo
+        CASE (2)
+             do i = pttruetab(1),cetruetab(1)
+             do j = pttruetab(2),cetruetab(2)
+ChildarrayAModifier                   if (restore%var%restore2D(i,j) == 0) 
+ChildarrayAModifier     &                child%var%array2(childarray(i,1,2),
+ChildarrayAModifier     &                                 childarray(j,2,2)) = 
+ChildarrayAModifier     &                tempC%var%array2(i,j)
+             enddo
+             enddo
+        CASE (3)
+             do i = pttruetab(1),cetruetab(1)
+             do j = pttruetab(2),cetruetab(2)  
+             do k = pttruetab(3),cetruetab(3)
+ChildarrayAModifier                      if (restore%var%restore3D(i,j,k) == 0) 
+ChildarrayAModifier     &                child%var%array3(childarray(i,1,2),
+ChildarrayAModifier     &                                 childarray(j,2,2),
+ChildarrayAModifier     &                                 childarray(k,3,2)) = 
+ChildarrayAModifier     &                tempC%var%array3(i,j,k)
+             enddo
+             enddo
+             enddo
+        CASE (4)
+             do i = pttruetab(1),cetruetab(1)
+             do j = pttruetab(2),cetruetab(2)
+             do k = pttruetab(3),cetruetab(3)
+             do l = pttruetab(4),cetruetab(4)
+ChildarrayAModifier                         if (restore%var%restore4D(i,j,k,l) == 0) 
+ChildarrayAModifier     &                      child%var%array4(childarray(i,1,2),
+ChildarrayAModifier     &                                       childarray(j,2,2),
+ChildarrayAModifier     &                                       childarray(k,3,2),
+ChildarrayAModifier     &                                       childarray(l,4,2)) = 
+ChildarrayAModifier     &                      tempC%var%array4(i,j,k,l)
+             enddo
+             enddo
+             enddo
+             enddo
+        CASE (5)
+             do i = pttruetab(1),cetruetab(1)
+             do j = pttruetab(2),cetruetab(2)
+             do k = pttruetab(3),cetruetab(3)
+             do l = pttruetab(4),cetruetab(4)
+             do m = pttruetab(5),cetruetab(5)
+ChildarrayAModifier              if (restore%var%restore5D(i,j,k,l,m) == 0) 
+ChildarrayAModifier     &                child%var%array5(childarray(i,1,2),
+ChildarrayAModifier     &                                 childarray(j,2,2),
+ChildarrayAModifier     &                                 childarray(k,3,2),
+ChildarrayAModifier     &                                 childarray(l,4,2),
+ChildarrayAModifier     &                                 childarray(m,5,2)) = 
+ChildarrayAModifier     &                tempC%var%array5(i,j,k,l,m)
+             enddo
+             enddo
+             enddo
+             enddo
+             enddo
+        CASE (6)
+             do i = pttruetab(1),cetruetab(1)
+             do j = pttruetab(2),cetruetab(2)
+             do k = pttruetab(3),cetruetab(3)
+             do l = pttruetab(4),cetruetab(4)
+             do m = pttruetab(5),cetruetab(5)
+             do n = pttruetab(6),cetruetab(6)
+ChildarrayAModifier              if (restore%var%restore6D(i,j,k,l,m,n) == 0) 
+ChildarrayAModifier     &                child%var%array6(childarray(i,1,2),
+ChildarrayAModifier     &                                 childarray(j,2,2),
+ChildarrayAModifier     &                                 childarray(k,3,2),
+ChildarrayAModifier     &                                 childarray(l,4,2),
+ChildarrayAModifier     &                                 childarray(m,5,2),
+ChildarrayAModifier     &                                 childarray(n,6,2)) = 
+ChildarrayAModifier     &                tempC%var%array6(i,j,k,l,m,n)
+             enddo
+             enddo
+             enddo
+             enddo
+             enddo
+             enddo
+        END SELECT
+C
+#else
+        SELECT CASE (nbdim)
+        CASE (1)
+           do i = pttruetab(1),cetruetab(1)         
+            if (restore%var%restore1D(i) == 0)
+     &            child % var % parray1(i) = 
+     &            tempC % var % array1(i)    
+          enddo
+        CASE (2)
+           do j = pttruetab(2),cetruetab(2)
+             do i = pttruetab(1),cetruetab(1) 
+              if (restore%var%restore2D(i,j) == 0)     
+     &              child % var % parray2(i,j) = 
+     &              tempC % var % array2(i,j)    
+              enddo
+             enddo
+        CASE (3)
+           do k = pttruetab(3),cetruetab(3)
+           do j = pttruetab(2),cetruetab(2)
+             do i = pttruetab(1),cetruetab(1) 
+              if (restore%var%restore3D(i,j,k) == 0)
+     &                  child % var % parray3(i,j,k) =
+     &                  tempC % var % array3(i,j,k)    
+                  enddo
+              enddo
+             enddo
+        CASE (4)
+           do l = pttruetab(4),cetruetab(4)
+           do k = pttruetab(3),cetruetab(3)
+          do j = pttruetab(2),cetruetab(2)
+             do i = pttruetab(1),cetruetab(1)
+                if (restore%var%restore4D(i,j,k,l) == 0)
+     &                 child % var % parray4(i,j,k,l) = 
+     &                 tempC % var % array4(i,j,k,l)    
+             enddo
+             enddo
+              enddo
+             enddo
+        CASE (5)
+           do m = pttruetab(5),cetruetab(5)
+          do l = pttruetab(4),cetruetab(4)
+         do k = pttruetab(3),cetruetab(3)
+           do j = pttruetab(2),cetruetab(2)
+             do i = pttruetab(1),cetruetab(1)
+                if (restore%var%restore5D(i,j,k,l,m) == 0)
+     &                  child % var % parray5(i,j,k,l,m) = 
+     &                  tempC % var % array5(i,j,k,l,m)    
+             enddo
+             enddo
+                  enddo
+              enddo
+             enddo
+        CASE (6)
+           do n = pttruetab(6),cetruetab(6)
+          do m = pttruetab(5),cetruetab(5)
+          do l = pttruetab(4),cetruetab(4)
+         do k = pttruetab(3),cetruetab(3)
+          do j = pttruetab(2),cetruetab(2)
+             do i = pttruetab(1),cetruetab(1)
+                if (restore%var%restore6D(i,j,k,l,m,n) == 0)
+     &                      child % var % parray6(i,j,k,l,m,n) = 
+     &                      tempC % var % array6(i,j,k,l,m,n)    
+             enddo
+            enddo
+                      enddo
+                  enddo
+              enddo
+             enddo
+        END SELECT
+C
+#endif
+C        
+        else
+C
+C
+          IF (memberin) THEN
+          SELECT CASE (nbdim)
+          CASE (1)
+            child%var%parray1(childarray(1,1,2):childarray(1,2,2)) =
+     &       tempC%var%array1(childarray(1,1,1):childarray(1,2,1))
+          CASE (2)
+            child%var%parray2(childarray(1,1,2):childarray(1,2,2),
+     &                       childarray(2,1,2):childarray(2,2,2)) =
+     &      tempC%var%array2(childarray(1,1,1):childarray(1,2,1),
+     &                       childarray(2,1,1):childarray(2,2,1))
+          CASE (3)
+            child%var%parray3(childarray(1,1,2):childarray(1,2,2),
+     &                       childarray(2,1,2):childarray(2,2,2),
+     &                       childarray(3,1,2):childarray(3,2,2)) =
+     &      tempC%var%array3(childarray(1,1,1):childarray(1,2,1),
+     &                       childarray(2,1,1):childarray(2,2,1),
+     &                       childarray(3,1,1):childarray(3,2,1))
+          CASE (4)
+            child%var%parray4(childarray(1,1,2):childarray(1,2,2),
+     &                       childarray(2,1,2):childarray(2,2,2),
+     &                       childarray(3,1,2):childarray(3,2,2),
+     &                       childarray(4,1,2):childarray(4,2,2)) =
+     &      tempC%var%array4(childarray(1,1,1):childarray(1,2,1),
+     &                       childarray(2,1,1):childarray(2,2,1),
+     &                       childarray(3,1,1):childarray(3,2,1),
+     &                       childarray(4,1,1):childarray(4,2,1))
+          CASE (5)
+            child%var%parray5(childarray(1,1,2):childarray(1,2,2),
+     &                       childarray(2,1,2):childarray(2,2,2),
+     &                       childarray(3,1,2):childarray(3,2,2),
+     &                       childarray(4,1,2):childarray(4,2,2),
+     &                       childarray(5,1,2):childarray(5,2,2)) =
+     &      tempC%var%array5(childarray(1,1,1):childarray(1,2,1),
+     &                       childarray(2,1,1):childarray(2,2,1),
+     &                       childarray(3,1,1):childarray(3,2,1),
+     &                       childarray(4,1,1):childarray(4,2,1),
+     &                       childarray(5,1,1):childarray(5,2,1))
+          CASE (6)
+            child%var%parray6(childarray(1,1,2):childarray(1,2,2),
+     &                       childarray(2,1,2):childarray(2,2,2),
+     &                       childarray(3,1,2):childarray(3,2,2),
+     &                       childarray(4,1,2):childarray(4,2,2),
+     &                       childarray(5,1,2):childarray(5,2,2),
+     &                       childarray(6,1,2):childarray(6,2,2)) =
+     &      tempC%var%array6(childarray(1,1,1):childarray(1,2,1),
+     &                       childarray(2,1,1):childarray(2,2,1),
+     &                       childarray(3,1,1):childarray(3,2,1),
+     &                       childarray(4,1,1):childarray(4,2,1),
+     &                       childarray(5,1,1):childarray(5,2,1),
+     &                       childarray(6,1,1):childarray(6,2,1))
+          END SELECT
+          ENDIF
+C
+C       
+      endif
+
+        Call Agrif_nbdim_deallocation(tempPextend%var,nbdim)
+C        deallocate(tempPextend%var)
+
+      Call Agrif_nbdim_deallocation(tempC%var,nbdim)
+      
+C      Deallocate(tempC % var)
+      ELSE
+      
+C      deallocate(tempPextend%var)
+
+      ENDIF
+C
+C             
+C     Deallocations
+#ifdef AGRIF_MPI        
+      IF (member) THEN
+      Call Agrif_nbdim_deallocation(tempP%var,nbdim)
+C      Deallocate(tempP % var)
+      endif
+#endif
+C
+C
+      
+C
+C
+      End Subroutine Agrif_InterpnD 
+C
+C
+C
+C                  
+C
+C     **************************************************************************
+CCC   Subroutine Agrif_Parentbounds
+C     **************************************************************************
+C
+      Subroutine Agrif_Parentbounds(TYPEinterp,nbdim,indmin,indmax,
+     &                              s_Parent_temp,
+     &                              s_Child_temp,s_Child,ds_Child,
+     &                              s_Parent,ds_Parent,
+     &                              pttruetab,cetruetab,pttab_Child,
+     &                              pttab_Parent,posvar,interptab)
+C
+CCC   Description:
+CCC   Subroutine calculating the bounds of the parent grid for the interpolation
+CCC   of the child grid     
+C
+C
+C     Declarations:
+C
+C
+C     Arguments
+      INTEGER :: nbdim
+      INTEGER, DIMENSION(6) :: TypeInterp
+      INTEGER,DIMENSION(nbdim) :: indmin,indmax
+      REAL,DIMENSION(nbdim) :: s_Parent_temp,s_child_temp
+      REAL,DIMENSION(nbdim) :: s_Child,ds_child
+      REAL,DIMENSION(nbdim) :: s_Parent,ds_Parent
+      INTEGER,DIMENSION(nbdim) :: pttruetab,cetruetab
+      INTEGER,DIMENSION(nbdim) :: pttab_Child,pttab_Parent
+      INTEGER,DIMENSION(nbdim) :: posvar
+      CHARACTER(6), DIMENSION(nbdim) :: interptab
+C
+C     Local variables
+      INTEGER :: i
+      REAL,DIMENSION(nbdim) :: dim_newmin,dim_newmax      
+C
+      dim_newmin = s_Child + (pttruetab - pttab_Child) * ds_Child
+      dim_newmax = s_Child + (cetruetab - pttab_Child) * ds_Child
+      
+      DO i = 1,nbdim         
+C     
+        indmin(i) = pttab_Parent(i) + 
+     &         agrif_int((dim_newmin(i)-s_Parent(i))/ds_Parent(i))
+C
+        indmax(i) = pttab_Parent(i) + 
+     &                agrif_ceiling((dim_newmax(i)-
+     &                s_Parent(i))/ds_Parent(i))
+     
+C
+C
+C       Necessary for the Quadratic interpolation
+C  
+
+        IF ((pttruetab(i) == cetruetab(i)) .AND. 
+     &                           (posvar(i) == 1)) THEN
+        ELSEIF (interptab(i) .EQ. 'N') THEN
+        ELSEIF ( TYPEinterp(i) .eq. Agrif_ppm .or.
+     &      TYPEinterp(i) .eq. Agrif_eno  .or.
+     &      TYPEinterp(i) .eq. Agrif_weno) THEN            
+           indmin(i) = indmin(i) - 2  
+           indmax(i) = indmax(i) + 2                  
+        ELSE IF (( TYPEinterp(i) .ne. Agrif_constant )
+     &        .AND.( TYPEinterp(i) .ne. Agrif_linear )) THEN
+           indmin(i) = indmin(i) - 1  
+           indmax(i) = indmax(i) + 1
+        ENDIF
+        
+
+C        
+       ENDDO 
+C
+        s_Parent_temp = s_Parent + (indmin - pttab_Parent) * ds_Parent
+C     
+        s_Child_temp = s_Child + (pttruetab - pttab_Child) * ds_Child
+C
+C
+      Return
+C
+C
+      End Subroutine Agrif_Parentbounds
+C
+C
+C
+C     **************************************************************************
+CCC   Subroutine Agrif_Interp_1D_Recursive 
+C     **************************************************************************
+C
+      Subroutine Agrif_Interp_1D_recursive(TypeInterp,tabin,tabout,
+     &           indmin,indmax, 
+     &           pttab_child,petab_child,
+     &           s_child,s_parent,ds_child,ds_parent,nbdim)     
+C
+CCC   Description:
+CCC   Subroutine for the interpolation of a 1D grid variable. 
+CCC   It calls Agrif_InterpBase. 
+C
+C     Declarations:
+C
+      
+C
+C     Arguments
+      INTEGER :: nbdim
+      INTEGER,DIMENSION(1) :: TypeInterp
+      INTEGER, DIMENSION(nbdim) :: indmin,indmax
+      INTEGER, DIMENSION(nbdim) :: pttab_child,petab_child
+      REAL, DIMENSION(nbdim) :: s_child,s_parent
+      REAL, DIMENSION(nbdim) :: ds_child,ds_parent
+      REAL, INTENT(IN),DIMENSION(indmin(nbdim):indmax(nbdim)) :: tabin        
+      REAL, INTENT(OUT),
+     &      DIMENSION(pttab_child(nbdim):petab_child(nbdim)) :: tabout
+      INTEGER :: coeffraf
+C
+C
+C     Commentaire perso : nbdim vaut toujours 1 ici. 
+C
+      coeffraf = nint(ds_parent(nbdim)/ds_child(nbdim))
+      
+      Call Agrif_InterpBase(TypeInterp(1),
+     &                  tabin(indmin(nbdim):indmax(nbdim)),
+     &                  tabout(pttab_child(nbdim):petab_child(nbdim)),
+     &                  indmin(nbdim),indmax(nbdim),            
+     &                  pttab_child(nbdim),petab_child(nbdim),
+     &                  s_parent(nbdim),s_child(nbdim),
+     &                  ds_parent(nbdim),ds_child(nbdim),coeffraf)
+                
+C                
+      Return
+C
+C
+      End Subroutine Agrif_Interp_1D_recursive
+C
+C
+C      
+C     **************************************************************************
+CCC   Subroutine Agrif_Interp_2D_Recursive 
+C     **************************************************************************
+C
+      Subroutine Agrif_Interp_2D_recursive(TypeInterp,
+     &           tabin,tabout,
+     &           indmin,indmax,   
+     &           pttab_child,petab_child,
+     &            s_child, s_parent,
+     &           ds_child,ds_parent,
+     &           nbdim)
+C
+CCC   Description:
+CCC   Subroutine for the interpolation of a 2D grid variable. 
+CCC   It calls Agrif_Interp_1D_recursive and Agrif_InterpBase.    
+C
+C     Declarations:
+C
+      
+C     
+      INTEGER                   :: nbdim
+      INTEGER,DIMENSION(2)      :: TypeInterp
+      INTEGER, DIMENSION(nbdim) :: indmin,indmax
+      INTEGER, DIMENSION(nbdim) :: pttab_child,petab_child
+      REAL   , DIMENSION(nbdim) ::  s_child, s_parent
+      REAL   , DIMENSION(nbdim) :: ds_child,ds_parent
+      REAL   ,INTENT(IN), DIMENSION(
+     &                indmin(nbdim-1):indmax(nbdim-1),
+     &                indmin(nbdim):indmax(nbdim)
+     &                ) :: tabin        
+      REAL   ,INTENT(OUT), DIMENSION(
+     &                pttab_child(nbdim-1):petab_child(nbdim-1),
+     &                pttab_child(nbdim):petab_child(nbdim)
+     &                ) :: tabout
+C
+C     Local variables      
+      REAL, DIMENSION(pttab_child(nbdim-1):petab_child(nbdim-1),
+     &                 indmin(nbdim):indmax(nbdim)) :: tabtemp
+      INTEGER i,j
+      INTEGER :: coeffraf
+      REAL   , DIMENSION(
+     &                pttab_child(nbdim):petab_child(nbdim),
+     &                pttab_child(nbdim-1):petab_child(nbdim-1)
+     &                ) :: tabout_trsp
+      REAL, DIMENSION(indmin(nbdim):indmax(nbdim),
+     &        pttab_child(nbdim-1):petab_child(nbdim-1)) :: tabtemp_trsp
+
+C
+C
+C
+C
+C     Commentaire perso : nbdim vaut toujours 2 ici.
+C
+      coeffraf = nint ( ds_parent(1) / ds_child(1) )
+      IF((TypeInterp(1) == Agrif_Linear) .AND. (coeffraf /= 1 ) )THEN
+
+!---CDIR NEXPAND
+          IF(.NOT. precomputedone(1) ) call linear1Dprecompute2D(
+     &          indmax(2)-indmin(2)+1,   
+     &          indmax(1)-indmin(1)+1,   
+     &          petab_child(1)-pttab_child(1)+1,
+     &          s_parent(1),s_child(1),ds_parent(1),ds_child(1),1)
+!---CDIR NEXPAND
+           call linear1daftercompute(tabin,tabtemp,
+     &          size(tabin), size(tabtemp),  
+     &          s_parent(1),s_child(1),ds_parent(1),ds_child(1),1)
+ 
+      ELSEIF((TypeInterp(1) == Agrif_PPM) .AND. (coeffraf /= 1 ) )THEN
+!---CDIR NEXPAND
+          IF(.NOT. precomputedone(1) ) call ppm1Dprecompute2D(
+     &          indmax(2)-indmin(2)+1,   
+     &          indmax(1)-indmin(1)+1,   
+     &          petab_child(1)-pttab_child(1)+1,
+     &          s_parent(1),s_child(1),ds_parent(1),ds_child(1),1)
+!---CDIR NEXPAND
+           call ppm1daftercompute(tabin,tabtemp,
+     &          size(tabin), size(tabtemp),  
+     &          s_parent(1),s_child(1),ds_parent(1),ds_child(1),1)
+
+      ELSE
+
+      do j = indmin(nbdim),indmax(nbdim)
+C        
+!---CDIR NEXPAND
+        Call Agrif_Interp_1D_recursive(TypeInterp(1),
+     &         tabin(indmin(nbdim-1):indmax(nbdim-1),j),
+     &         tabtemp(pttab_child(nbdim-1):petab_child(nbdim-1),j),
+     &         indmin(1:nbdim-1),indmax(1:nbdim-1),
+     &         pttab_child(1:nbdim-1),petab_child(1:nbdim-1),
+     &         s_child(1:nbdim-1),s_parent(1:nbdim-1),
+     &         ds_child(1:nbdim-1),ds_parent(1:nbdim-1),nbdim-1)
+C        
+      enddo
+      ENDIF   
+
+      coeffraf = nint(ds_parent(nbdim)/ds_child(nbdim))
+      
+      tabtemp_trsp = TRANSPOSE(tabtemp)
+
+      IF((TypeInterp(2) == Agrif_Linear) .AND. (coeffraf /= 1 ) )THEN
+
+!---CDIR NEXPAND
+          IF(.NOT. precomputedone(2) ) call linear1Dprecompute2D(
+     &          petab_child(1)-pttab_child(1)+1,
+     &          indmax(2)-indmin(2)+1,
+     &          petab_child(2)-pttab_child(2)+1,
+     &          s_parent(2),s_child(2),ds_parent(2),ds_child(2),2)
+!---CDIR NEXPAND
+           call linear1daftercompute(tabtemp_trsp,tabout_trsp,
+     &          size(tabtemp_trsp), size(tabout_trsp),
+     &          s_parent(2),s_child(2),ds_parent(2),ds_child(2),2)
+
+      ELSEIF((TypeInterp(2) == Agrif_PPM) .AND. (coeffraf /= 1 ) )THEN
+
+!---CDIR NEXPAND
+           IF(.NOT. precomputedone(1) )call ppm1Dprecompute2D(
+     &          petab_child(1)-pttab_child(1)+1,
+     &          indmax(2)-indmin(2)+1,
+     &          petab_child(2)-pttab_child(2)+1,
+     &          s_parent(2),s_child(2),ds_parent(2),ds_child(2),2)
+!---CDIR NEXPAND
+           call ppm1daftercompute(tabtemp_trsp,tabout_trsp,
+     &          size(tabtemp_trsp), size(tabout_trsp),
+     &          s_parent(2),s_child(2),ds_parent(2),ds_child(2),2)
+
+      ELSE
+      do i=pttab_child(nbdim-1),petab_child(nbdim-1)
+C
+!---CDIR NEXPAND
+        Call Agrif_InterpBase(TypeInterp(2),
+     &           tabtemp_trsp(indmin(nbdim):indmax(nbdim),i),
+     &           tabout_trsp(pttab_child(nbdim):petab_child(nbdim),i),
+     &           indmin(nbdim),indmax(nbdim),
+     &           pttab_child(nbdim),petab_child(nbdim),
+     &           s_parent(nbdim),s_child(nbdim),
+     &           ds_parent(nbdim),ds_child(nbdim),coeffraf)
+
+C        
+      enddo
+      ENDIF
+      
+      tabout = TRANSPOSE(tabout_trsp)
+C
+      Return
+C
+C
+      End Subroutine Agrif_Interp_2D_recursive
+C
+C
+C      
+C     **************************************************************************
+CCC   Subroutine Agrif_Interp_3D_Recursive 
+C     **************************************************************************
+C
+      Subroutine Agrif_Interp_3D_recursive(TypeInterp,tabin,tabout,
+     &           indmin,indmax,   
+     &           pttab_child,petab_child,
+     &           s_child,s_parent,ds_child,ds_parent,nbdim)
+C
+CCC   Description:
+CCC   Subroutine for the interpolation of a 3D grid variable. 
+CCC   It calls Agrif_Interp_2D_recursive and Agrif_InterpBase.    
+C
+C     Declarations:
+C
+      
+C     
+      INTEGER :: nbdim
+      INTEGER,DIMENSION(3) :: TypeInterp
+      INTEGER, DIMENSION(nbdim) :: indmin,indmax
+      INTEGER, DIMENSION(nbdim) :: pttab_child,petab_child
+      REAL, DIMENSION(nbdim) :: s_child,s_parent,ds_child,ds_parent
+      REAL,INTENT(IN), DIMENSION(indmin(nbdim-2):indmax(nbdim-2),
+     &                indmin(nbdim-1):indmax(nbdim-1),
+     &                indmin(nbdim)  :indmax(nbdim)) :: tabin        
+      REAL,INTENT(OUT),
+     &        DIMENSION(pttab_child(nbdim-2):petab_child(nbdim-2),
+     &                pttab_child(nbdim-1):petab_child(nbdim-1),
+     &                pttab_child(nbdim):petab_child(nbdim)) :: tabout
+C
+C     Local variables      
+      REAL, DIMENSION(pttab_child(nbdim-2):petab_child(nbdim-2),
+     &                 pttab_child(nbdim-1):petab_child(nbdim-1),
+     &                 indmin(nbdim):indmax(nbdim)) :: tabtemp
+      INTEGER i,j,k
+      INTEGER :: coeffraf, locind_child_left, kdeb
+C
+C
+      coeffraf = nint ( ds_parent(1) / ds_child(1) )
+      IF((TypeInterp(1) == Agrif_Linear) .AND. (coeffraf/=1))THEN 
+        Call linear1Dprecompute2D(
+     &          indmax(2)-indmin(2)+1,
+     &          indmax(1)-indmin(1)+1,
+     &          petab_child(1)-pttab_child(1)+1,
+     &          s_parent(1),s_child(1),ds_parent(1),ds_child(1),1)
+      precomputedone(1) = .TRUE. 
+      ELSEIF((TypeInterp(1) == Agrif_PPM) .AND. (coeffraf/=1))THEN
+        Call ppm1Dprecompute2D(
+     &          indmax(2)-indmin(2)+1,
+     &          indmax(1)-indmin(1)+1,
+     &          petab_child(1)-pttab_child(1)+1,
+     &          s_parent(1),s_child(1),ds_parent(1),ds_child(1),1)
+      precomputedone(1) = .TRUE.
+      ENDIF
+
+      coeffraf = nint ( ds_parent(2) / ds_child(2) )
+      IF((TypeInterp(2) == Agrif_Linear) .AND. (coeffraf/=1)) THEN
+         Call linear1Dprecompute2D(
+     &          petab_child(1)-pttab_child(1)+1,
+     &          indmax(2)-indmin(2)+1,
+     &          petab_child(2)-pttab_child(2)+1,
+     &          s_parent(2),s_child(2),ds_parent(2),ds_child(2),2)
+      precomputedone(2) = .TRUE. 
+      ELSEIF((TypeInterp(2) == Agrif_PPM) .AND. (coeffraf/=1)) THEN
+         Call ppm1Dprecompute2D(
+     &          petab_child(1)-pttab_child(1)+1,
+     &          indmax(2)-indmin(2)+1,
+     &          petab_child(2)-pttab_child(2)+1,
+     &          s_parent(2),s_child(2),ds_parent(2),ds_child(2),2)
+      precomputedone(2) = .TRUE.
+      ENDIF
+
+      do k = indmin(nbdim),indmax(nbdim)
+C        
+        Call Agrif_Interp_2D_recursive(TypeInterp(1:2),
+     &         tabin(indmin(nbdim-2):indmax(nbdim-2),
+     &         indmin(nbdim-1):indmax(nbdim-1),k),
+     &         tabtemp(pttab_child(nbdim-2):petab_child(nbdim-2),
+     &         pttab_child(nbdim-1):petab_child(nbdim-1),k),
+     &         indmin(1:nbdim-1),indmax(1:nbdim-1),
+     &         pttab_child(1:nbdim-1),petab_child(1:nbdim-1),
+     &         s_child(1:nbdim-1),s_parent(1:nbdim-1),
+     &         ds_child(1:nbdim-1),ds_parent(1:nbdim-1),nbdim-1)
+C        
+      enddo
+      
+      precomputedone(1) = .FALSE.
+      precomputedone(2) = .FALSE.
+      coeffraf = nint ( ds_parent(3) / ds_child(3) )
+
+      Call Agrif_Compute_nbdim_interp(s_parent(nbdim),s_child(nbdim),
+     &  ds_parent(nbdim),ds_child(nbdim),coeffraf,locind_child_left)
+           
+      IF (coeffraf == 1) THEN
+      
+      kdeb = indmin(3)+locind_child_left-2
+      do k=pttab_child(3),petab_child(3)
+      kdeb = kdeb + 1
+      do j = pttab_child(2),petab_child(2)
+        do i = pttab_child(1),petab_child(1)
+        tabout(i,j,k) = tabtemp(i,j,kdeb)
+      enddo
+      enddo
+      enddo
+              
+      ELSE      
+C
+      do j=pttab_child(nbdim-1),petab_child(nbdim-1) 
+C        
+        do i=pttab_child(nbdim-2),petab_child(nbdim-2)
+C
+          Call Agrif_InterpBase(TypeInterp(3),
+     &           tabtemp(i,j,indmin(nbdim):indmax(nbdim)),
+     &           tabout(i,j,pttab_child(nbdim):petab_child(nbdim)),
+     &           indmin(nbdim),indmax(nbdim),
+     &           pttab_child(nbdim),petab_child(nbdim),
+     &           s_parent(nbdim),s_child(nbdim),
+     &           ds_parent(nbdim),ds_child(nbdim),coeffraf)
+C
+        enddo 
+C       
+      enddo
+      ENDIF
+C
+      Return
+C        
+C
+      End Subroutine Agrif_Interp_3D_recursive
+C
+C
+C
+C     **************************************************************************
+CCC   Subroutine Agrif_Interp_4D_Recursive 
+C     **************************************************************************
+C
+      Subroutine Agrif_Interp_4D_recursive(TypeInterp,tabin,tabout,
+     &           indmin,indmax,   
+     &           pttab_child,petab_child,
+     &           s_child,s_parent,ds_child,ds_parent,nbdim)
+C
+CCC   Description:
+CCC   Subroutine for the interpolation of a 4D grid variable. 
+CCC   It calls Agrif_Interp_3D_recursive and Agrif_InterpBase.    
+C
+C     Declarations:
+C
+      
+C     
+      INTEGER :: nbdim
+      INTEGER,DIMENSION(4) :: TypeInterp
+      INTEGER, DIMENSION(nbdim) :: indmin,indmax
+      INTEGER, DIMENSION(nbdim) :: pttab_child,petab_child
+      REAL, DIMENSION(nbdim) :: s_child,s_parent,ds_child,ds_parent
+      REAL,INTENT(IN), DIMENSION(indmin(nbdim-3):indmax(nbdim-3),
+     &                indmin(nbdim-2):indmax(nbdim-2),
+     &                indmin(nbdim-1):indmax(nbdim-1),
+     &                indmin(nbdim):indmax(nbdim)) :: tabin        
+      REAL,INTENT(OUT),
+     &       DIMENSION(pttab_child(nbdim-3):petab_child(nbdim-3),
+     &                pttab_child(nbdim-2):petab_child(nbdim-2),
+     &                pttab_child(nbdim-1):petab_child(nbdim-1),
+     &                pttab_child(nbdim):petab_child(nbdim)) :: tabout
+C
+C     Local variables      
+      REAL, DIMENSION(pttab_child(nbdim-3):petab_child(nbdim-3),
+     &                 pttab_child(nbdim-2):petab_child(nbdim-2),
+     &                 pttab_child(nbdim-1):petab_child(nbdim-1),  
+     &                 indmin(nbdim):indmax(nbdim)) :: tabtemp
+      INTEGER i,j,k,l
+      INTEGER :: coeffraf
+C
+C
+      do l = indmin(nbdim),indmax(nbdim)
+C        
+        Call Agrif_Interp_3D_recursive(TypeInterp(1:3),
+     &         tabin(indmin(nbdim-3):indmax(nbdim-3),
+     &               indmin(nbdim-2):indmax(nbdim-2),
+     &               indmin(nbdim-1):indmax(nbdim-1),l),
+     &         tabtemp(pttab_child(nbdim-3):petab_child(nbdim-3),
+     &         pttab_child(nbdim-2):petab_child(nbdim-2),
+     &         pttab_child(nbdim-1):petab_child(nbdim-1),l),
+     &         indmin(1:nbdim-1),indmax(1:nbdim-1),
+     &         pttab_child(1:nbdim-1),petab_child(1:nbdim-1),
+     &         s_child(1:nbdim-1),s_parent(1:nbdim-1),
+     &         ds_child(1:nbdim-1),ds_parent(1:nbdim-1),nbdim-1)
+C        
+      enddo
+C
+      coeffraf = nint(ds_parent(nbdim)/ds_child(nbdim))
+      
+      do k = pttab_child(nbdim-1),petab_child(nbdim-1)
+C
+        do j = pttab_child(nbdim-2),petab_child(nbdim-2) 
+C        
+          do i = pttab_child(nbdim-3),petab_child(nbdim-3)
+C
+            Call Agrif_InterpBase(TypeInterp(4),
+     &           tabtemp(i,j,k,indmin(nbdim):indmax(nbdim)),
+     &           tabout(i,j,k,pttab_child(nbdim):petab_child(nbdim)),
+     &           indmin(nbdim),indmax(nbdim),
+     &           pttab_child(nbdim),petab_child(nbdim),
+     &           s_parent(nbdim),s_child(nbdim),
+     &           ds_parent(nbdim),ds_child(nbdim),coeffraf)
+C
+          enddo
+C
+        enddo 
+C       
+      enddo
+C
+      Return
+C
+C        
+      End Subroutine Agrif_Interp_4D_recursive
+C
+C
+C
+C     **************************************************************************
+CCC   Subroutine Agrif_Interp_5D_Recursive 
+C     **************************************************************************
+C
+      Subroutine Agrif_Interp_5D_recursive(TypeInterp,tabin,tabout,
+     &           indmin,indmax,   
+     &           pttab_child,petab_child,
+     &           s_child,s_parent,ds_child,ds_parent,nbdim)
+C
+CCC   Description:
+CCC   Subroutine for the interpolation of a 5D grid variable. 
+CCC   It calls Agrif_Interp_4D_recursive and Agrif_InterpBase.    
+C
+C     Declarations:
+C
+      
+C     
+      INTEGER :: nbdim
+      INTEGER,DIMENSION(5) :: TypeInterp
+      INTEGER, DIMENSION(nbdim) :: indmin,indmax
+      INTEGER, DIMENSION(nbdim) :: pttab_child,petab_child
+      REAL, DIMENSION(nbdim) :: s_child,s_parent,ds_child,ds_parent
+      REAL,INTENT(IN), DIMENSION(indmin(nbdim-4):indmax(nbdim-4),
+     &                indmin(nbdim-3):indmax(nbdim-3),
+     &                indmin(nbdim-2):indmax(nbdim-2),
+     &                indmin(nbdim-1):indmax(nbdim-1),
+     &                indmin(nbdim):indmax(nbdim)) :: tabin  
+      REAL,INTENT(OUT),
+     &    DIMENSION(pttab_child(nbdim-4):petab_child(nbdim-4),
+     &                pttab_child(nbdim-3):petab_child(nbdim-3),
+     &                pttab_child(nbdim-2):petab_child(nbdim-2),
+     &                pttab_child(nbdim-1):petab_child(nbdim-1),
+     &                pttab_child(nbdim):petab_child(nbdim)) :: tabout
+C
+C     Local variables      
+      REAL, DIMENSION(pttab_child(nbdim-4):petab_child(nbdim-4),
+     &                 pttab_child(nbdim-3):petab_child(nbdim-3),
+     &                 pttab_child(nbdim-2):petab_child(nbdim-2),
+     &                 pttab_child(nbdim-1):petab_child(nbdim-1),    
+     &                 indmin(nbdim):indmax(nbdim)) :: tabtemp
+      INTEGER i,j,k,l,m
+      INTEGER :: coeffraf
+C
+C
+      do m = indmin(nbdim),indmax(nbdim)
+C        
+        Call Agrif_Interp_4D_recursive(TypeInterp(1:4),
+     &         tabin(indmin(nbdim-4):indmax(nbdim-4),
+     &               indmin(nbdim-3):indmax(nbdim-3),
+     &               indmin(nbdim-2):indmax(nbdim-2),
+     &               indmin(nbdim-1):indmax(nbdim-1),m),
+     &         tabtemp(pttab_child(nbdim-4):petab_child(nbdim-4),
+     &                 pttab_child(nbdim-3):petab_child(nbdim-3),
+     &                 pttab_child(nbdim-2):petab_child(nbdim-2),
+     &                 pttab_child(nbdim-1):petab_child(nbdim-1),m),
+     &         indmin(1:nbdim-1),indmax(1:nbdim-1),
+     &         pttab_child(1:nbdim-1),petab_child(1:nbdim-1),
+     &         s_child(1:nbdim-1),s_parent(1:nbdim-1),
+     &         ds_child(1:nbdim-1),ds_parent(1:nbdim-1),nbdim-1)
+C        
+      enddo
+      
+      coeffraf = nint(ds_parent(nbdim)/ds_child(nbdim))
+C
+      do l = pttab_child(nbdim-1),petab_child(nbdim-1) 
+C
+        do k = pttab_child(nbdim-2),petab_child(nbdim-2)
+C
+          do j = pttab_child(nbdim-3),petab_child(nbdim-3) 
+C        
+            do i = pttab_child(nbdim-4),petab_child(nbdim-4)
+C
+              Call Agrif_InterpBase(TypeInterp(5),
+     &             tabtemp(i,j,k,l,indmin(nbdim):indmax(nbdim)),
+     &                    tabout(i,j,k,l,
+     &             pttab_child(nbdim):petab_child(nbdim)),
+     &             indmin(nbdim),indmax(nbdim),
+     &             pttab_child(nbdim),petab_child(nbdim),
+     &             s_parent(nbdim),s_child(nbdim),
+     &             ds_parent(nbdim),ds_child(nbdim),coeffraf)
+C
+            enddo
+C
+          enddo
+C
+        enddo 
+C       
+      enddo
+C
+C
+      Return
+C
+C        
+      End Subroutine Agrif_Interp_5D_recursive
+C
+C
+C
+C     **************************************************************************
+CCC   Subroutine Agrif_Interp_6D_Recursive 
+C     **************************************************************************
+C
+      Subroutine Agrif_Interp_6D_recursive(TypeInterp,tabin,tabout,
+     &           indmin,indmax,   
+     &           pttab_child,petab_child,
+     &           s_child,s_parent,ds_child,ds_parent,nbdim)
+C
+CCC   Description:
+CCC   Subroutine for the interpolation of a 6D grid variable. 
+CCC   It calls Agrif_Interp_4D_recursive and Agrif_InterpBase.    
+C
+C     Declarations:
+C
+      
+C     
+      INTEGER :: nbdim
+      INTEGER,DIMENSION(6) :: TypeInterp
+      INTEGER, DIMENSION(nbdim) :: indmin,indmax
+      INTEGER, DIMENSION(nbdim) :: pttab_child,petab_child
+      REAL, DIMENSION(nbdim) :: s_child,s_parent,ds_child,ds_parent
+      REAL,INTENT(IN), DIMENSION(indmin(nbdim-5):indmax(nbdim-5),
+     &                indmin(nbdim-4):indmax(nbdim-4),
+     &                indmin(nbdim-3):indmax(nbdim-3), 
+     &                indmin(nbdim-2):indmax(nbdim-2),
+     &                indmin(nbdim-1):indmax(nbdim-1),
+     &                indmin(nbdim):indmax(nbdim)) :: tabin        
+      REAL,INTENT(OUT),
+     &    DIMENSION(pttab_child(nbdim-5):petab_child(nbdim-5),
+     &                pttab_child(nbdim-4):petab_child(nbdim-4),
+     &                pttab_child(nbdim-3):petab_child(nbdim-3),
+     &                pttab_child(nbdim-2):petab_child(nbdim-2),
+     &                pttab_child(nbdim-1):petab_child(nbdim-1),
+     &                pttab_child(nbdim):petab_child(nbdim)) :: tabout
+C
+C     Local variables      
+      REAL, DIMENSION(pttab_child(nbdim-5):petab_child(nbdim-5),
+     &                 pttab_child(nbdim-4):petab_child(nbdim-4),
+     &                 pttab_child(nbdim-3):petab_child(nbdim-3),
+     &                 pttab_child(nbdim-2):petab_child(nbdim-2),    
+     &                 pttab_child(nbdim-1):petab_child(nbdim-1),    
+     &                 indmin(nbdim):indmax(nbdim)) :: tabtemp
+      INTEGER i,j,k,l,m,n
+      INTEGER :: coeffraf
+C
+C        
+C
+      do n = indmin(nbdim),indmax(nbdim)
+C        
+        Call Agrif_Interp_5D_recursive(TypeInterp(1:5),
+     &         tabin(indmin(nbdim-5):indmax(nbdim-5),
+     &               indmin(nbdim-4):indmax(nbdim-4),
+     &               indmin(nbdim-3):indmax(nbdim-3),
+     &               indmin(nbdim-2):indmax(nbdim-2),
+     &               indmin(nbdim-1):indmax(nbdim-1),n),
+     &         tabtemp(pttab_child(nbdim-5):petab_child(nbdim-5),
+     &                 pttab_child(nbdim-4):petab_child(nbdim-4),
+     &                 pttab_child(nbdim-3):petab_child(nbdim-3),
+     &                 pttab_child(nbdim-2):petab_child(nbdim-2),
+     &                 pttab_child(nbdim-1):petab_child(nbdim-1),n),
+     &         indmin(1:nbdim-1),indmax(1:nbdim-1),
+     &         pttab_child(1:nbdim-1),petab_child(1:nbdim-1),
+     &         s_child(1:nbdim-1),s_parent(1:nbdim-1),
+     &         ds_child(1:nbdim-1),ds_parent(1:nbdim-1),nbdim-1)
+C        
+      enddo
+      
+      coeffraf = nint(ds_parent(nbdim)/ds_child(nbdim))
+C
+      do m = pttab_child(nbdim-1),petab_child(nbdim-1) 
+      do l = pttab_child(nbdim-2),petab_child(nbdim-2) 
+C
+        do k = pttab_child(nbdim-3),petab_child(nbdim-3)
+C
+          do j = pttab_child(nbdim-4),petab_child(nbdim-4) 
+C        
+            do i = pttab_child(nbdim-5),petab_child(nbdim-5)
+C
+              Call Agrif_InterpBase(TypeInterp(6),
+     &             tabtemp(i,j,k,l,m,indmin(nbdim):indmax(nbdim)),
+     &                    tabout(i,j,k,l,m,
+     &                    pttab_child(nbdim):petab_child(nbdim)),
+     &             indmin(nbdim),indmax(nbdim),
+     &             pttab_child(nbdim),petab_child(nbdim),
+     &             s_parent(nbdim),s_child(nbdim),
+     &             ds_parent(nbdim),ds_child(nbdim),coeffraf)
+C
+            enddo
+C
+          enddo
+C
+        enddo 
+C       
+      enddo
+      enddo
+C                
+C
+      Return
+C
+C        
+      End Subroutine Agrif_Interp_6D_recursive
+C
+C
+C
+C     **************************************************************************
+CCC   Subroutine Agrif_InterpBase  
+C     **************************************************************************
+C  
+      Subroutine Agrif_InterpBase(TypeInterp,
+     &                           parenttab,childtab,
+     &                           indmin,indmax,pttab_child,petab_child,
+     &                           s_parent,s_child,ds_parent,ds_child,
+     &                           coeffraf)   
+C
+CCC   Description:
+CCC   Subroutine calling the interpolation method chosen by the user (linear, 
+CCC   lagrange or spline). 
+C
+C     Declarations:
+C
+      
+C
+      INTEGER                :: TypeInterp
+      INTEGER :: indmin,indmax
+      INTEGER :: pttab_child,petab_child
+      REAL,INTENT(IN),DIMENSION(indmin:indmax)           :: parenttab       
+      REAL,INTENT(OUT),DIMENSION(pttab_child:petab_child) :: childtab        
+      REAL    :: s_parent,s_child,ds_parent,ds_child 
+      INTEGER :: coeffraf
+C 
+C
+       IF ((indmin == indmax).AND.(pttab_child == petab_child)) THEN
+         childtab(pttab_child) = parenttab(indmin)
+       ELSEIF (TYPEinterp .EQ. AGRIF_LINEAR) then    
+C
+C         Linear interpolation 
+  
+          Call linear1D
+     &         (parenttab,childtab,
+     &          indmax-indmin+1,petab_child-pttab_child+1,
+     &          s_parent,s_child,ds_parent,ds_child)
+C          
+      elseif ( TYPEinterp .EQ. AGRIF_PPM ) then
+
+          Call ppm1D
+     &         (parenttab,childtab,
+     &         indmax-indmin+1,petab_child-pttab_child+1,
+     &         s_parent,s_child,ds_parent,ds_child)
+C
+
+        elseif (TYPEinterp .EQ. AGRIF_LAGRANGE) then
+C          
+C         Lagrange interpolation    
+          Call lagrange1D
+     &        (parenttab,childtab,
+     &         indmax-indmin+1,petab_child-pttab_child+1,
+     &         s_parent,s_child,ds_parent,ds_child)
+C            
+        elseif (TYPEinterp .EQ. AGRIF_ENO) then
+C          
+C         Eno interpolation
+          Call eno1D
+     &         (parenttab,childtab,
+     &         indmax-indmin+1,petab_child-pttab_child+1,
+     &         s_parent,s_child,ds_parent,ds_child)
+C        
+        elseif (TYPEinterp .EQ. AGRIF_WENO) then
+C          
+C         Eno interpolation
+          Call weno1D
+     &         (parenttab,childtab,
+     &         indmax-indmin+1,petab_child-pttab_child+1,
+     &         s_parent,s_child,ds_parent,ds_child)
+C            
+        Else if (TYPEinterp .EQ. AGRIF_LINEARCONSERV) then
+C          
+C         Linear conservative interpolation
+          
+          Call linear1Dconserv
+     &         (parenttab,childtab,
+     &         indmax-indmin+1,petab_child-pttab_child+1,
+     &         s_parent,s_child,ds_parent,ds_child)   
+C              
+        Else if (TYPEinterp .EQ. AGRIF_LINEARCONSERVLIM) then
+C          
+C         Linear conservative interpolation
+          
+          Call linear1Dconservlim
+     &         (parenttab,childtab,
+     &         indmax-indmin+1,petab_child-pttab_child+1,
+     &         s_parent,s_child,ds_parent,ds_child)         
+C              
+        elseif (TYPEinterp .EQ. AGRIF_CONSTANT) then
+C          
+          Call constant1D
+     &         (parenttab,childtab,
+     &         indmax-indmin+1,petab_child-pttab_child+1,
+     &         s_parent,s_child,ds_parent,ds_child)
+C              
+      endif 
+C
+C      
+      End Subroutine Agrif_InterpBase 
+C
+
+      Subroutine Agrif_Compute_nbdim_interp(s_parent,s_child,
+     &  ds_parent,ds_child,coeffraf,locind_child_left)
+      real :: s_parent,s_child,ds_parent,ds_child
+      integer :: coeffraf,locind_child_left
+     
+      coeffraf = nint(ds_parent/ds_child)
+      locind_child_left = 1 + agrif_int((s_child-s_parent)/ds_parent)
+      End Subroutine Agrif_Compute_nbdim_interp
+C          
+
+      Subroutine Agrif_Find_list_interp(list_interp,pttab,petab,
+     &                          pttab_Child,pttab_Parent,nbdim,
+     &                          indmin,indmax,indminglob,
+     &      indmaxglob,indminglob2,indmaxglob2,parentarray,
+     &       pttruetab,cetruetab,member,memberin,
+     &      find_list_interp
+#if defined AGRIF_MPI
+     &     ,tab4t,memberinall,sendtoproc1,recvfromproc1
+#endif
+     &    )     
+      TYPE(Agrif_List_Interp_Loc), Pointer :: list_interp
+      INTEGER :: nbdim
+      INTEGER,DIMENSION(nbdim)   :: pttab,petab,pttab_Child,pttab_Parent
+      LOGICAL :: find_list_interp
+      Type(Agrif_List_Interp_loc), Pointer :: parcours
+      INTEGER,DIMENSION(nbdim)   :: indmin,indmax  
+      INTEGER,DIMENSION(nbdim)   :: indminglob,indmaxglob
+      INTEGER,DIMENSION(nbdim)   :: pttruetab,cetruetab      
+      INTEGER,DIMENSION(nbdim)   :: indminglob2,indmaxglob2  
+      INTEGER,DIMENSION(nbdim,2,2) :: parentarray
+      LOGICAL :: member, memberin
+      INTEGER :: i
+#ifdef AGRIF_MPI
+C
+      INTEGER,DIMENSION(nbdim,0:Agrif_Nbprocs-1,8) :: tab4t
+      LOGICAL, DIMENSION(0:Agrif_Nbprocs-1) :: memberinall
+      LOGICAL, DIMENSION(0:Agrif_Nbprocs-1) :: sendtoproc1,recvfromproc1
+#endif 
+                    
+      find_list_interp = .FALSE.
+      
+      parcours => list_interp
+      Find_loop :   Do While (associated(parcours))
+        Do i=1,nbdim
+          IF ((pttab(i) /= parcours%interp_loc%pttab(i)).OR.
+     &        (petab(i) /= parcours%interp_loc%petab(i)).OR.
+     &        (pttab_child(i) /= parcours%interp_loc%pttab_child(i)).OR.
+     &        (pttab_parent(i) /= parcours%interp_loc%pttab_parent(i)))
+     &               THEN
+            parcours=>parcours%suiv
+            Cycle Find_loop
+          ENDIF
+        EndDo
+
+        indmin = parcours%interp_loc%indmin(1:nbdim)
+        indmax = parcours%interp_loc%indmax(1:nbdim)
+        
+        pttruetab = parcours%interp_loc%pttruetab(1:nbdim)
+        cetruetab = parcours%interp_loc%cetruetab(1:nbdim)
+                
+#if !defined AGRIF_MPI
+        indminglob = parcours%interp_loc%indminglob(1:nbdim)
+        indmaxglob = parcours%interp_loc%indmaxglob(1:nbdim)
+#else
+        indminglob2 = parcours%interp_loc%indminglob2(1:nbdim)
+        indmaxglob2 = parcours%interp_loc%indmaxglob2(1:nbdim)
+        parentarray = parcours%interp_loc%parentarray(1:nbdim,:,:)
+        member = parcours%interp_loc%member
+        tab4t = parcours%interp_loc%tab4t(1:nbdim,0:Agrif_Nbprocs-1,1:8)
+        memberinall = parcours%interp_loc%memberinall(0:Agrif_Nbprocs-1)
+        sendtoproc1 = parcours%interp_loc%sendtoproc1(0:Agrif_Nbprocs-1)
+        recvfromproc1 = 
+     &    parcours%interp_loc%recvfromproc1(0:Agrif_Nbprocs-1)
+#endif        
+        memberin = parcours%interp_loc%memberin
+        find_list_interp = .TRUE.   
+        Exit Find_loop
+      End Do Find_loop  
+                              
+      End Subroutine Agrif_Find_list_interp   
+      
+      Subroutine Agrif_AddTo_list_interp(list_interp,pttab,petab,
+     &                          pttab_Child,pttab_Parent,indmin,indmax,
+     &                          indminglob,indmaxglob,
+     &                          indminglob2,indmaxglob2,
+     &                          parentarray,pttruetab,cetruetab,
+     &                          member,memberin,nbdim
+#if defined AGRIF_MPI
+     &      ,tab4t,memberinall,sendtoproc1,recvfromproc1
+#endif
+     &    )
+          
+      TYPE(Agrif_List_Interp_Loc), Pointer :: list_interp
+      INTEGER :: nbdim
+      INTEGER,DIMENSION(nbdim)   :: pttab,petab,pttab_Child,pttab_Parent
+      INTEGER,DIMENSION(nbdim)   :: indmin,indmax
+      INTEGER,DIMENSION(nbdim)   :: indminglob,indmaxglob
+      INTEGER,DIMENSION(nbdim)   :: indminglob2,indmaxglob2
+      INTEGER,DIMENSION(nbdim)   :: pttruetab,cetruetab
+      INTEGER,DIMENSION(nbdim,2,2) :: parentarray
+      LOGICAL :: member, memberin
+#ifdef AGRIF_MPI
+C
+      INTEGER,DIMENSION(nbdim,0:Agrif_Nbprocs-1,8) :: tab4t
+      LOGICAL,DIMENSION(0:Agrif_Nbprocs-1) :: memberinall
+      LOGICAL,DIMENSION(0:Agrif_Nbprocs-1) :: sendtoproc1
+      LOGICAL,DIMENSION(0:Agrif_Nbprocs-1) :: recvfromproc1
+#endif                   
+      Type(Agrif_List_Interp_loc), Pointer :: parcours
+            
+       Allocate(parcours)
+      Allocate(parcours%interp_loc)
+      
+      parcours%interp_loc%pttab(1:nbdim) = pttab(1:nbdim)
+      parcours%interp_loc%petab(1:nbdim) = petab(1:nbdim)
+      parcours%interp_loc%pttab_child(1:nbdim) = pttab_child(1:nbdim)
+      parcours%interp_loc%pttab_parent(1:nbdim) = pttab_parent(1:nbdim)
+  
+  
+      parcours%interp_loc%indmin(1:nbdim) = indmin(1:nbdim)
+      parcours%interp_loc%indmax(1:nbdim) = indmax(1:nbdim)
+
+      parcours%interp_loc%memberin = memberin
+#if !defined AGRIF_MPI
+      parcours%interp_loc%indminglob(1:nbdim) = indminglob(1:nbdim)
+      parcours%interp_loc%indmaxglob(1:nbdim) = indmaxglob(1:nbdim)
+#else
+      parcours%interp_loc%indminglob2(1:nbdim) = indminglob2(1:nbdim)
+      parcours%interp_loc%indmaxglob2(1:nbdim) = indmaxglob2(1:nbdim)
+      parcours%interp_loc%parentarray(1:nbdim,:,:) 
+     &       = parentarray(1:nbdim,:,:)
+      parcours%interp_loc%member = member
+      Allocate(parcours%interp_loc%tab4t(nbdim,0:Agrif_Nbprocs-1,8))
+      Allocate(parcours%interp_loc%memberinall(0:Agrif_Nbprocs-1))
+      Allocate(parcours%interp_loc%sendtoproc1(0:Agrif_Nbprocs-1))
+      Allocate(parcours%interp_loc%recvfromproc1(0:Agrif_Nbprocs-1))                  
+      parcours%interp_loc%tab4t=tab4t   
+      parcours%interp_loc%memberinall=memberinall   
+      parcours%interp_loc%sendtoproc1=sendtoproc1
+      parcours%interp_loc%recvfromproc1=recvfromproc1            
+#endif      
+
+      parcours%interp_loc%pttruetab(1:nbdim) = pttruetab(1:nbdim)
+      parcours%interp_loc%cetruetab(1:nbdim) = cetruetab(1:nbdim)
+      
+      parcours%suiv => list_interp
+      
+      list_interp => parcours
+      End Subroutine Agrif_Addto_list_interp 
+                
+      End Module Agrif_Interpolation
Index: vendors/AGRIF/r_01/AGRIF_FILES/modinterpbasic.F
===================================================================
--- vendors/AGRIF/r_01/AGRIF_FILES/modinterpbasic.F	(revision 2672)
+++ vendors/AGRIF/r_01/AGRIF_FILES/modinterpbasic.F	(revision 2672)
@@ -0,0 +1,1706 @@
+!
+! $Id: modinterpbasic.F 779 2007-12-22 17:04:17Z rblod $
+!
+C     AGRIF (Adaptive Grid Refinement In Fortran)
+C
+C     Copyright (C) 2003 Laurent Debreu (Laurent.Debreu@imag.fr)
+C                        Christophe Vouland (Christophe.Vouland@imag.fr)    
+C
+C     This program is free software; you can redistribute it and/or modify
+C     it under the terms of the GNU General Public License as published by
+C     the Free Software Foundation; either version 2 of the License, or
+C     (at your option) any later version.
+C
+C     This program is distributed in the hope that it will be useful,
+C     but WITHOUT ANY WARRANTY; without even the implied warranty of
+C     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+C     GNU General Public License for more details.
+C
+C     You should have received a copy of the GNU General Public License
+C     along with this program; if not, write to the Free Software
+C     Foundation, Inc., 59 Temple Place- Suite 330, Boston, MA 02111-1307, USA.
+C
+C
+C
+CCC   Module Agrif_Interpbasic
+C
+      Module Agrif_Interpbasic
+C
+CCC   Description:
+CCC   Module containing different procedures of interpolation (linear,lagrange,
+CCC   spline,...) used in the Agrif_Interpolation module.
+C
+C     Modules used:
+      USE Agrif_types
+C
+      IMPLICIT NONE
+C             
+      Real,Dimension(Agrif_MaxRaff) :: tabdiff2, tabdiff3
+      Real,Dimension(5,Agrif_MaxRaff,3) :: tabppm
+      Real,Dimension(:),Allocatable::tabtest4   
+      Integer, Dimension(:,:), Allocatable :: indparent
+      Integer, Dimension(:,:), Allocatable :: 
+     &           indparentppm,indchildppm
+      Integer, Dimension(:), Allocatable :: 
+     &           indparentppm_1d,indchildppm_1d
+      Real, Dimension(:,:),Allocatable :: coeffparent   
+       
+      CONTAINS
+C     Define procedures contained in this module
+C  
+C     **************************************************************************  
+CCC   Subroutine Linear1d  
+C     ************************************************************************** 
+C 
+      Subroutine Linear1d(x,y,np,nc,
+     &                    s_parent,s_child,ds_parent,ds_child) 
+C
+CCC   Description:
+CCC   Subroutine to do a linear 1D interpolation on a child grid (vector y) from
+CCC   its parent grid (vector x).  
+C
+CC    Method:
+C
+C     Declarations:
+C
+      
+C        
+C     Arguments
+      INTEGER             :: np,nc      
+      REAL,INTENT(IN), DIMENSION(np) :: x      
+      REAL,INTENT(OUT), DIMENSION(nc) :: y  
+      REAL                :: s_parent,s_child,ds_parent,ds_child
+C
+C     Local scalars
+      INTEGER :: i,coeffraf,locind_parent_left
+      REAL    :: ypos,globind_parent_left,globind_parent_right
+      REAL    :: invds, invds2
+      REAL :: ypos2,diff
+C
+C
+
+      coeffraf = nint(ds_parent/ds_child)
+C
+      if (coeffraf == 1) then
+C
+          locind_parent_left = 1 + nint((s_child - s_parent)/ds_parent)
+C        
+          y(1:nc) = x(locind_parent_left:locind_parent_left+nc-1)
+C
+          return
+C
+      endif                          
+C
+      ypos = s_child 
+
+      locind_parent_left = 1 + agrif_int((ypos - s_parent)/ds_parent)
+
+        globind_parent_left = s_parent 
+     &                        + (locind_parent_left - 1)*ds_parent
+
+        globind_parent_right = globind_parent_left + ds_parent
+
+C
+      invds = 1./ds_parent
+      invds2 = ds_child/ds_parent
+      
+      ypos2 = ypos*invds
+      globind_parent_right=globind_parent_right*invds
+      
+      do i = 1,nc-1
+C
+        if (ypos2 > globind_parent_right) then
+           locind_parent_left = locind_parent_left + 1.
+           globind_parent_right = globind_parent_right + 1.
+           ypos2 = ypos*invds+(i-1)*invds2           
+        endif
+        
+        diff=(globind_parent_right - ypos2)
+        y(i) = (diff*x(locind_parent_left)
+     &        + (1.-diff)*x(locind_parent_left+1))
+C
+        ypos2 = ypos2 + invds2
+C
+      enddo
+C
+      ypos = s_child + (nc-1)*ds_child
+      locind_parent_left = 1 + agrif_int((ypos - s_parent)/ds_parent)
+C
+      if (locind_parent_left == np) then
+C
+          y(nc) = x(np)
+C
+        else
+C
+          globind_parent_left = s_parent 
+     &                        + (locind_parent_left - 1)*ds_parent  
+C      
+          y(nc) = ((globind_parent_left + ds_parent - ypos)
+     &            *x(locind_parent_left)
+     &          + (ypos - globind_parent_left)
+     &            *x(locind_parent_left+1))*invds
+C
+      endif                                          
+C           
+      Return
+C
+C       
+      End Subroutine Linear1d   
+      
+      Subroutine Linear1dprecompute2d(np2, np,nc,
+     &                    s_parent,s_child,ds_parent,ds_child,dir)
+C
+CCC   Description:
+CCC   Subroutine to compute 2D coefficient and index for a linear 1D interpolation
+CCC   on a child grid (vector y) from its parent grid (vector x).
+C
+CC    Method:
+C
+C     Declarations:
+C
+
+C        
+C     Arguments
+      INTEGER             :: np,nc,np2,dir
+      REAL                :: s_parent,s_child,ds_parent,ds_child
+C
+C     Local scalars
+      INTEGER :: i,j,coeffraf,locind_parent_left,inc,inc1,inc2,toto 
+      Integer, Dimension(:,:), Allocatable :: indparent_tmp
+      Real, Dimension(:,:), Allocatable :: coeffparent_tmp
+      REAL    :: ypos,globind_parent_left,globind_parent_right
+      REAL    :: invds, invds2, invds3
+      REAL :: ypos2,diff
+C
+C
+
+      coeffraf = nint(ds_parent/ds_child)
+C
+      ypos = s_child
+
+      locind_parent_left = 1 + agrif_int((ypos - s_parent)/ds_parent)
+
+        globind_parent_left = s_parent
+     &                        + (locind_parent_left - 1)*ds_parent
+
+        globind_parent_right = globind_parent_left + ds_parent
+
+C
+      invds = 1./ds_parent
+      invds2 = ds_child/ds_parent
+      invds3 = 0.5/real(coeffraf)
+
+      ypos2 = ypos*invds
+      globind_parent_right=globind_parent_right*invds
+
+      if (.not.allocated(indparent)) then
+      allocate(indparent(nc*np2,3),coeffparent(nc*np2,3))
+      else
+      if (size(indparent,1)<nc*np2) then
+      allocate(coeffparent_tmp(size(indparent,1),size(indparent,2)))
+      allocate(indparent_tmp(size(indparent,1),size(indparent,2)))
+      coeffparent_tmp=coeffparent 
+      indparent_tmp=indparent 
+      deallocate(indparent,coeffparent)
+      allocate(indparent(nc*np2,3),coeffparent(nc*np2,3))
+      coeffparent(1:size(coeffparent_tmp,1),1:size(coeffparent_tmp,2))
+     &  = coeffparent_tmp 
+      indparent(1:size(indparent_tmp,1),1:size(indparent_tmp,2))
+     & = indparent_tmp
+      deallocate(indparent_tmp,coeffparent_tmp)
+      endif
+      endif
+
+      do i = 1,nc-1
+C
+        if (ypos2 > globind_parent_right) then
+           locind_parent_left = locind_parent_left + 1
+           globind_parent_right = globind_parent_right + 1.
+           ypos2 = ypos*invds+(i-1)*invds2
+        endif
+
+        diff=(globind_parent_right - ypos2)
+        diff = invds3*nint(2*coeffraf*diff)
+        indparent(i,dir) = locind_parent_left
+
+        coeffparent(i,dir) = diff
+        
+        ypos2 = ypos2 + invds2
+C
+      enddo
+C
+      ypos = s_child + (nc-1)*ds_child
+      locind_parent_left = 1 + agrif_int((ypos - s_parent)/ds_parent)
+
+      if (locind_parent_left == np) then
+      indparent(nc,dir) = locind_parent_left-1
+      coeffparent(nc,dir) = 0.
+        else
+C
+          globind_parent_left = s_parent
+     &                        + (locind_parent_left - 1)*ds_parent
+C      
+       indparent(nc,dir) = locind_parent_left
+       diff = (globind_parent_left + ds_parent - ypos)
+     &       * invds
+        diff = invds3*nint(2*coeffraf*diff)
+         coeffparent(nc,dir) = diff
+        endif                                           
+
+      do i=2, np2
+      inc  =  i*nc
+      inc1 = (i-1)*nc
+      inc2 = (i-2)*nc 
+!CDIR ALTCODE
+      indparent(1+inc1:inc,dir) = indparent(1+inc2:inc1,dir)+np
+!CDIR ALTCODE
+      coeffparent(1+inc1:inc,dir) =coeffparent(1:nc,dir)
+      enddo      
+
+      Return
+C
+C       
+      End Subroutine Linear1dprecompute2d
+
+
+
+      Subroutine Linear1dprecompute(np,nc,
+     &                    s_parent,s_child,ds_parent,ds_child) 
+C
+CCC   Description:
+CCC   Subroutine to compute 1D coefficient and index for a linear 1D interpolation
+CCC   on a child grid (vector y) from its parent grid (vector x).
+C
+CC    Method:
+C
+C     Declarations:
+C
+      
+C        
+C     Arguments
+      INTEGER             :: np,nc 
+      REAL                :: s_parent,s_child,ds_parent,ds_child
+C
+C     Local scalars
+      INTEGER :: i,coeffraf,locind_parent_left
+      REAL    :: ypos,globind_parent_left,globind_parent_right
+      REAL    :: invds, invds2, invds3
+      REAL :: ypos2,diff
+C
+C
+
+      coeffraf = nint(ds_parent/ds_child)
+C
+      if (coeffraf == 1) then
+C
+          return
+C
+      endif                          
+C
+      ypos = s_child 
+
+      locind_parent_left = 1 + agrif_int((ypos - s_parent)/ds_parent)
+
+        globind_parent_left = s_parent 
+     &                        + (locind_parent_left - 1)*ds_parent
+
+        globind_parent_right = globind_parent_left + ds_parent
+
+C
+      invds = 1./ds_parent
+      invds2 = ds_child/ds_parent
+      invds3 = 0.5/real(coeffraf)      
+      
+      ypos2 = ypos*invds
+      globind_parent_right=globind_parent_right*invds
+      
+      if (.not.allocated(indparent)) then
+      allocate(indparent(nc,1),coeffparent(nc,1))
+      else
+      if (size(indparent)<nc) then
+      deallocate(indparent,coeffparent)
+      allocate(indparent(nc,1),coeffparent(nc,1))
+      endif
+      endif
+      
+      do i = 1,nc-1
+C
+        if (ypos2 > globind_parent_right) then
+           locind_parent_left = locind_parent_left + 1
+           globind_parent_right = globind_parent_right + 1.
+           ypos2 = ypos*invds+(i-1)*invds2           
+        endif
+        
+        diff=(globind_parent_right - ypos2)
+        
+        diff = invds3*nint(2*coeffraf*diff)
+                
+        indparent(i,1) = locind_parent_left
+
+        coeffparent(i,1) = diff
+        ypos2 = ypos2 + invds2
+C
+      enddo
+C
+      ypos = s_child + (nc-1)*ds_child
+      locind_parent_left = 1 + agrif_int((ypos - s_parent)/ds_parent)
+      
+      if (locind_parent_left == np) then
+      indparent(nc,1) = locind_parent_left-1
+      coeffparent(nc,1) = 0.
+        else
+C
+          globind_parent_left = s_parent 
+     &                        + (locind_parent_left - 1)*ds_parent  
+C      
+       indparent(nc,1) = locind_parent_left
+ 
+       diff = (globind_parent_left + ds_parent - ypos)
+     &       * invds
+        diff = invds3*nint(2*coeffraf*diff)
+         coeffparent(nc,1) = diff
+         endif                                          
+C           
+      Return
+C
+C       
+      End Subroutine Linear1dprecompute 
+      
+      Subroutine Linear1daftercompute(x,y,np,nc,
+     &                    s_parent,s_child,ds_parent,ds_child,dir) 
+C
+CCC   Description:
+CCC   Subroutine to do a linear 1D interpolation on a child grid (vector y) from
+CCC   its parent grid (vector x) using precomputed coefficient and index.  
+C
+CC    Method:
+C
+C     Declarations:
+C
+      
+C        
+C     Arguments
+      INTEGER             :: np,nc,dir      
+      REAL,INTENT(IN), DIMENSION(np) :: x      
+      REAL,INTENT(OUT), DIMENSION(nc) :: y  
+      REAL                :: s_parent,s_child,ds_parent,ds_child
+C
+C     Local scalars
+      INTEGER :: i,coeffraf,locind_parent_left
+      REAL    :: ypos,globind_parent_left,globind_parent_right
+      REAL    :: invds, invds2
+      REAL :: ypos2,diff
+C
+C
+
+!CDIR ALTCODE
+!CDIR NODEP
+      do i = 1,nc
+C
+       y(i)=coeffparent(i,dir)*x(MAX(indparent(i,dir),1))+
+     &      (1.-coeffparent(i,dir))*x(indparent(i,dir)+1)
+C
+      enddo                                     
+C           
+      Return
+C
+C       
+      End Subroutine Linear1daftercompute            
+       
+C
+C
+C
+C     **************************************************************************  
+CCC   Subroutine Lagrange1d  
+C     **************************************************************************
+C
+      Subroutine Lagrange1d(x,y,np,nc,
+     &                      s_parent,s_child,ds_parent,ds_child)
+C
+CCC   Description:
+CCC   Subroutine to do a lagrange 1D interpolation on a child grid (vector y) 
+CCC   from its parent grid (vector x).  
+C
+CC    Method:
+C
+C     Declarations:
+C
+      
+C             
+C     Arguments
+      INTEGER             :: np,nc      
+      REAL,INTENT(IN), DIMENSION(np) :: x      
+      REAL,INTENT(OUT), DIMENSION(nc) :: y  
+      REAL                :: s_parent,s_child,ds_parent,ds_child 
+C
+C     Local scalars
+      INTEGER :: i,coeffraf,locind_parent_left
+      REAL    :: ypos,globind_parent_left
+      REAL    :: X1,X2,X3 
+      real :: deltax,invdsparent
+      real t1,t2,t3,t4,t5,t6,t7,t8
+C
+C 
+      if (np <= 2) then
+C      
+          Call Linear1D(x,y,np,nc,
+     &                  s_parent,s_child,ds_parent,ds_child)
+C         
+         Return
+C 
+      endif
+C
+      coeffraf = nint(ds_parent/ds_child)
+C
+      if (coeffraf == 1) then
+C
+          locind_parent_left = 1 + nint((s_child - s_parent)/ds_parent)
+C        
+          y(1:nc) = x(locind_parent_left:locind_parent_left+nc-1)
+C
+          return
+C
+      endif
+      
+      invdsparent=1./ds_parent
+C
+      ypos = s_child      
+C
+      do i = 1,nc
+C
+        locind_parent_left = 1 + agrif_int((ypos - s_parent)/ds_parent)
+C
+
+        globind_parent_left = s_parent 
+     &                        + (locind_parent_left - 1)*ds_parent 
+     
+C        deltax = invdsparent*(ypos-globind_parent_left)
+        deltax = nint(coeffraf*deltax)/real(coeffraf)
+        
+        ypos = ypos + ds_child
+         if (abs(deltax).LE.0.0001) then
+           y(i)=x(locind_parent_left)
+           
+           cycle
+         endif
+C           
+C
+        t2 = deltax - 2.
+        t3 = deltax - 1.
+        t4 = deltax + 1.
+        
+        t5 = -(1./6.)*deltax*t2*t3
+        t6 = 0.5*t2*t3*t4
+        t7 = -0.5*deltax*t2*t4
+        t8 = (1./6.)*deltax*t3*t4
+        
+        y(i)=t5*x(locind_parent_left-1)+t6*x(locind_parent_left)
+     &  +t7*x(locind_parent_left+1)+t8*x(locind_parent_left+2)
+C
+C
+      enddo
+C
+      return
+C
+C       
+      End Subroutine Lagrange1d 
+C
+C
+C     **************************************************************************  
+CCC   Subroutine Constant1d  
+C     ************************************************************************** 
+C 
+      Subroutine constant1d(x,y,np,nc,
+     &                    s_parent,s_child,ds_parent,ds_child) 
+C
+CCC   Description:
+CCC   Subroutine to do a linear 1D interpolation on a child grid (vector y) from
+CCC   its parent grid (vector x).  
+C
+CC    Method:
+C
+C     Declarations:
+C
+      
+C        
+C     Arguments
+      INTEGER             :: np,nc      
+      REAL,INTENT(IN), DIMENSION(np) :: x      
+      REAL,INTENT(OUT), DIMENSION(nc) :: y  
+      REAL                :: s_parent,s_child,ds_parent,ds_child
+C
+C     Local scalars
+      INTEGER :: i,coeffraf,locind_parent
+      REAL    :: ypos
+C
+C
+
+      coeffraf = nint(ds_parent/ds_child)
+C
+      if (coeffraf == 1) then
+C
+          locind_parent = 1 + nint((s_child - s_parent)/ds_parent)
+C        
+          y(1:nc) = x(locind_parent:locind_parent+nc-1)
+C
+          return
+C
+      endif                          
+C
+      ypos = s_child      
+C
+      do i = 1,nc
+C
+        locind_parent = 1 + nint((ypos - s_parent)/ds_parent)
+C
+        y(i) = x(locind_parent)
+C
+        ypos = ypos + ds_child
+C
+      enddo
+C           
+      Return
+C
+C       
+      End Subroutine constant1d   
+C
+C     **************************************************************************  
+CCC   Subroutine Linear1dconserv
+C     ************************************************************************** 
+C 
+      Subroutine Linear1dconserv(x,y,np,nc,
+     &                    s_parent,s_child,ds_parent,ds_child) 
+C
+CCC   Description:
+CCC   Subroutine to do a linear 1D interpolation on a child grid (vector y) from
+CCC   its parent grid (vector x).  
+C
+CC    Method:
+C
+C     Declarations:
+C
+      Implicit none
+C        
+C     Arguments
+      Integer             :: np,nc      
+      Real, Dimension(np) :: x      
+      Real, Dimension(nc) :: y
+      Real, Dimension(:),Allocatable :: ytemp
+      Real                :: s_parent,s_child,ds_parent,ds_child
+C
+C     Local scalars
+      Integer :: i,coeffraf,locind_parent_left,locind_parent_last
+      Real    :: ypos
+      integer :: i1,i2,ii
+      real :: xpmin,xpmax,slope
+      INTEGER :: diffmod
+      REAL :: xdiffmod
+
+C
+C
+
+      coeffraf = nint(ds_parent/ds_child)
+C
+      If (coeffraf == 1) Then
+C
+          locind_parent_left = 1 + nint((s_child - s_parent)/ds_parent)
+C        
+          y(1:nc) = x(locind_parent_left:locind_parent_left+nc-1)
+C
+          return
+C
+      End If
+C              
+      diffmod = 0
+      IF (mod(coeffraf,2) == 0) diffmod = 1  
+
+      xdiffmod = real(diffmod)/2.
+                         
+      allocate(ytemp(-2*coeffraf:nc+2*coeffraf))
+C
+      ypos = s_child  
+C      
+      locind_parent_left = 1 + agrif_int((ypos - s_parent)/ds_parent) 
+
+      locind_parent_last = 1 +
+     &  agrif_ceiling((ypos +(nc - 1) *ds_child - s_parent)/ds_parent)
+     
+      xpmin = s_parent + (locind_parent_left-1)*ds_parent 
+      xpmax = s_parent + (locind_parent_last-1)*ds_parent          
+      
+      i1 = 1+agrif_int((xpmin-s_child)/ds_child)
+      i2 = 1+agrif_int((xpmax-s_child)/ds_child)
+
+      i = i1
+      
+      if (locind_parent_left == 1) then
+        slope=
+     &   (x(locind_parent_left+1)-x(locind_parent_left))/(coeffraf)
+      else
+         slope=
+     &   (x(locind_parent_left+1)-x(locind_parent_left-1))/(2.*coeffraf)
+      endif
+      
+        do ii=i-coeffraf/2+diffmod,i+coeffraf/2
+          ytemp(ii) = x(locind_parent_left)+(ii-i-xdiffmod/2.)*slope
+        enddo 
+
+        locind_parent_left = locind_parent_left + 1
+                      
+      do i=i1 +  coeffraf, i2 - coeffraf,coeffraf
+        slope=
+     &   (x(locind_parent_left+1)-x(locind_parent_left-1))/(2.*coeffraf)
+        do ii=i-coeffraf/2+diffmod,i+coeffraf/2
+          ytemp(ii) = x(locind_parent_left)+(ii-i-xdiffmod/2.)*slope
+        enddo
+        locind_parent_left = locind_parent_left + 1
+      enddo
+      
+      i = i2
+      
+      if (locind_parent_left == np) then
+        slope=
+     &   (x(locind_parent_left)-x(locind_parent_left-1))/(coeffraf)
+      else
+         slope=
+     &   (x(locind_parent_left+1)-x(locind_parent_left-1))/(2.*coeffraf)
+      endif
+      
+        do ii=i-coeffraf/2+diffmod,nc
+          ytemp(ii) = x(locind_parent_left)+(ii-i-xdiffmod/2.)*slope
+        enddo      
+C
+      y(1:nc)=ytemp(1:nc)                                   
+C           
+      deallocate(ytemp)
+      Return
+C       
+      End Subroutine Linear1dconserv
+      
+C
+C     **************************************************************************  
+CCC   Subroutine Linear1dconservlim
+C     ************************************************************************** 
+C 
+      Subroutine Linear1dconservlim(x,y,np,nc,
+     &                    s_parent,s_child,ds_parent,ds_child) 
+C
+CCC   Description:
+CCC   Subroutine to do a linear 1D interpolation on a child grid (vector y) from
+CCC   its parent grid (vector x).  
+C
+CC    Method:
+C
+C     Declarations:
+C
+      Implicit none
+C        
+C     Arguments
+      Integer             :: np,nc      
+      Real, Dimension(np) :: x      
+      Real, Dimension(nc) :: y
+      Real, Dimension(:),Allocatable :: ytemp
+      Real                :: s_parent,s_child,ds_parent,ds_child
+C
+C     Local scalars
+      Integer :: i,coeffraf,locind_parent_left,locind_parent_last
+      Real    :: ypos
+      integer :: i1,i2,ii
+      real :: xpmin,xpmax,slope
+      INTEGER :: diffmod
+      real :: xdiffmod
+C
+C
+
+      coeffraf = nint(ds_parent/ds_child)
+C
+      If (coeffraf == 1) Then
+C
+          locind_parent_left = 1 + nint((s_child - s_parent)/ds_parent)
+C        
+          y(1:nc) = x(locind_parent_left:locind_parent_left+nc-1)
+C
+          return
+C
+      End If
+C
+      IF (coeffraf .NE.3) THEN
+      print *,'LINEARCONSERVLIM not ready for refinement ratio = ',
+     &   coeffraf
+      stop
+      ENDIF   
+      
+      diffmod = 0
+      IF (mod(coeffraf,2) == 0) diffmod = 1        
+
+      xdiffmod = real(diffmod)/2.
+                         
+      allocate(ytemp(-2*coeffraf:nc+2*coeffraf))
+C
+      ypos = s_child  
+C      
+      locind_parent_left = 1 + agrif_int((ypos - s_parent)/ds_parent) 
+
+      locind_parent_last = 1 +
+     &  agrif_ceiling((ypos +(nc - 1) *ds_child - s_parent)/ds_parent)
+     
+      xpmin = s_parent + (locind_parent_left-1)*ds_parent 
+      xpmax = s_parent + (locind_parent_last-1)*ds_parent          
+      
+      i1 = 1+agrif_int((xpmin-s_child)/ds_child)
+      i2 = 1+agrif_int((xpmax-s_child)/ds_child)
+
+      i = i1
+      
+      if (locind_parent_left == 1) then
+        slope=0.       
+      else
+        slope = vanleer(x(locind_parent_left-1:locind_parent_left+1))
+        slope = slope / coeffraf    
+      endif
+      
+        do ii=i-coeffraf/2+diffmod,i+coeffraf/2
+          ytemp(ii) = x(locind_parent_left)+(ii-i-xdiffmod/2.)*slope
+        enddo 
+
+        locind_parent_left = locind_parent_left + 1
+                      
+      do i=i1 +  coeffraf, i2 - coeffraf,coeffraf     
+        slope = vanleer(x(locind_parent_left-1:locind_parent_left+1))
+        slope = slope / coeffraf
+
+        do ii=i-coeffraf/2+diffmod,i+coeffraf/2
+          ytemp(ii) = x(locind_parent_left)+(ii-i-xdiffmod/2.)*slope
+        enddo
+        locind_parent_left = locind_parent_left + 1
+      enddo
+      
+      i = i2
+      
+      if (locind_parent_left == np) then
+        slope=0.     
+      else
+        slope = vanleer(x(locind_parent_left-1:locind_parent_left+1))
+        slope = slope / coeffraf      
+      endif
+      
+        do ii=i-coeffraf/2+diffmod,nc
+          ytemp(ii) = x(locind_parent_left)+(ii-i-xdiffmod/2.)*slope
+        enddo      
+C
+      y(1:nc)=ytemp(1:nc)                                   
+C           
+      deallocate(ytemp)
+      Return
+C       
+      End Subroutine Linear1dconservlim      
+C         
+
+C     **************************************************************************  
+CCC   Subroutine ppm1d
+C     ************************************************************************** 
+C 
+      Subroutine ppm1d(x,y,np,nc,
+     &                    s_parent,s_child,ds_parent,ds_child) 
+C
+CCC   Description:
+CCC   Subroutine to do a 1D interpolation and apply monotonicity constraints
+CCC   using piecewise parabolic method  
+CCC   on a child grid (vector y) from its parent grid (vector x).
+CC    Method:
+C
+C     Declarations:
+C
+      Implicit none
+C        
+C     Arguments
+      Integer             :: np,nc      
+      Real, INTENT(IN),Dimension(np) :: x      
+      Real, INTENT(OUT),Dimension(nc) :: y
+C      Real, Dimension(:),Allocatable :: ytemp
+      Real                :: s_parent,s_child,ds_parent,ds_child
+C
+C     Local scalars
+      Integer :: i,coeffraf,locind_parent_left,locind_parent_last
+      Integer :: iparent,ipos,pos,nmin,nmax
+      Real    :: ypos
+      integer :: i1,jj
+      Real :: xpmin,a
+C      
+      Real :: xrmin,xrmax,am3,s2,s1  
+      Real, Dimension(np) :: xl,delta,a6,slope
+C      Real, Dimension(:),Allocatable  :: diff,diff2,diff3    
+      INTEGER :: diffmod
+      REAL :: invcoeffraf
+C      
+      coeffraf = nint(ds_parent/ds_child)
+C
+      If (coeffraf == 1) Then
+          locind_parent_left = 1 + nint((s_child - s_parent)/ds_parent)
+!CDIR ALTCODE
+!CDIR SHORTLOOP
+          y(1:nc) = x(locind_parent_left:locind_parent_left+nc-1)
+          return
+      End If
+      invcoeffraf = ds_child/ds_parent
+C      
+
+      IF( .NOT. allocated(tabtest4) ) THEN    
+      Allocate(tabtest4(-2*coeffraf:nc+2*coeffraf))
+      ELSE
+         IF (size(tabtest4) .LT. nc+4*coeffraf+1)THEN
+         deallocate( tabtest4 )
+         Allocate(tabtest4(-2*coeffraf:nc+2*coeffraf))
+         ENDIF
+      ENDIF
+            
+      ypos = s_child  
+C
+      locind_parent_left = 1 + agrif_int((ypos - s_parent)/ds_parent) 
+      locind_parent_last = 1 +
+     &      agrif_ceiling((ypos +(nc - 1) 
+     &      *ds_child - s_parent)/ds_parent)  
+C
+      xpmin = s_parent + (locind_parent_left-1)*ds_parent       
+      i1 = 1+agrif_int((xpmin-s_child)/ds_child)        
+C     
+C
+      
+!CDIR NOVECTOR
+      Do i=1,coeffraf
+        tabdiff2(i)=(real(i)-0.5)*invcoeffraf
+      EndDo
+
+      a = invcoeffraf**2 
+      tabdiff3(1) = (1./3.)*a
+      a=2.*a
+!CDIR NOVECTOR
+      Do i=2,coeffraf
+        tabdiff3(i) = tabdiff3(i-1)+(real(i)-1)*a
+      EndDo
+C
+      if( locind_parent_last+2 <= np ) then
+           nmax = locind_parent_last+2    
+      else if( locind_parent_last+1 <= np ) then
+           nmax = locind_parent_last+1
+      else
+           nmax = locind_parent_last 
+      endif     
+C      
+      if(locind_parent_left-1 >= 1) then
+          nmin = locind_parent_left-1
+      else 
+          nmin = locind_parent_left
+      endif    
+C 
+C
+!CDIR ALTCODE
+!CDIR SHORTLOOP
+      Do i = nmin,nmax
+         slope(i) = x(i) - x(i-1)
+      Enddo
+
+!CDIR ALTCODE
+!CDIR SHORTLOOP
+      Do i = nmin+1,nmax-1
+         xl(i)= 0.5*(x(i-1)+x(i))
+     &      -0.08333333333333*(slope(i+1)-slope(i-1)) 
+      Enddo
+C
+C apply parabolic monotonicity
+!CDIR ALTCODE
+!CDIR SHORTLOOP
+       Do i = locind_parent_left,locind_parent_last
+          delta(i) = xl(i+1) - xl(i)
+          a6(i) = 6.*x(i)-3.*(xl(i) +xl(i+1))
+C
+       End do   
+C
+        diffmod = 0
+       IF (mod(coeffraf,2) == 0) diffmod = 1
+C
+        ipos = i1
+C               
+        Do iparent = locind_parent_left,locind_parent_last       
+             pos=1
+!CDIR ALTCODE
+!CDIR SHORTLOOP
+             Do jj = ipos - coeffraf/2+diffmod,ipos + coeffraf/2
+C
+               tabtest4(jj) = xl(iparent)   
+     &             + tabdiff2(pos) *  (delta(iparent)+a6(iparent))
+     &             - tabdiff3(pos) *  a6(iparent)
+               pos = pos+1 
+             End do 
+             ipos = ipos + coeffraf
+C
+        End do
+C
+C
+!CDIR ALTCODE
+!CDIR SHORTLOOP
+        y(1:nc)=tabtest4(1:nc)
+        
+      Return
+      End Subroutine ppm1d
+      
+
+      Subroutine ppm1dprecompute2d(np2,np,nc,
+     &                    s_parent,s_child,ds_parent,ds_child,dir)
+C
+CCC   Description:
+CCC   Subroutine to compute 2D coefficients and index for a 1D interpolation
+CCC   using piecewise parabolic method  
+CC    Method: 
+C
+C     Declarations:
+C
+      Implicit none
+C        
+C     Arguments
+      Integer             :: np2,np,nc,dir
+C      Real, Dimension(:),Allocatable :: ytemp
+      Real                :: s_parent,s_child,ds_parent,ds_child
+C
+C     Local scalars
+      Integer, Dimension(:,:), Allocatable :: indparent_tmp
+      Integer, Dimension(:,:), Allocatable :: indchild_tmp
+      Integer :: i,coeffraf,locind_parent_left,locind_parent_last
+      Integer :: iparent,ipos,pos,nmin,nmax
+      Real    :: ypos
+      integer :: i1,jj
+      Real :: xpmin,a
+C      
+      Real :: xrmin,xrmax,am3,s2,s1
+      Real, Dimension(np) :: xl,delta,a6,slope
+      INTEGER :: diffmod
+      REAL :: invcoeffraf
+C      
+      coeffraf = nint(ds_parent/ds_child)
+C
+      invcoeffraf = ds_child/ds_parent
+C 
+
+      if (.not.allocated(indparentppm)) then
+      allocate(
+     & indparentppm(np2*nc,3),
+     & indchildppm(np2*nc,3)
+     &        )
+      else
+      if (size(indparentppm,1)<np2*nc) then
+      allocate(
+     &  indparent_tmp(size(indparentppm,1),size(indparentppm,2)),
+     &  indchild_tmp(size(indparentppm,1),size(indparentppm,2)))
+      indparent_tmp = indparentppm 
+      indchild_tmp  = indchildppm 
+      deallocate(indparentppm,indchildppm)
+      allocate(
+     &indparentppm(np2*nc,3),
+     &indchildppm(np2*nc,3)
+     &        )
+      indparentppm(1:size(indparent_tmp,1),1:size(indparent_tmp,2))
+     & = indparent_tmp
+      indchildppm(1:size(indparent_tmp,1),1:size(indparent_tmp,2))
+     & = indchild_tmp
+      deallocate(indparent_tmp,indchild_tmp)
+      endif
+      endif
+
+      if (.not.allocated(indparentppm_1d)) then
+      allocate(indparentppm_1d(-2*coeffraf:nc+2*coeffraf),
+     &         indchildppm_1d(-2*coeffraf:nc+2*coeffraf))
+      else
+      if (size(indparentppm_1d)<nc+4*coeffraf+1) then
+      deallocate(indparentppm_1d,indchildppm_1d)
+      allocate(indparentppm_1d(-2*coeffraf:nc+2*coeffraf),
+     &         indchildppm_1d(-2*coeffraf:nc+2*coeffraf))
+      endif
+      endif
+
+
+      ypos = s_child
+C
+      locind_parent_left = 1 + agrif_int((ypos - s_parent)/ds_parent)
+      locind_parent_last = 1 +
+     &      agrif_ceiling((ypos +(nc - 1)
+     &      *ds_child - s_parent)/ds_parent)
+C
+      xpmin = s_parent + (locind_parent_left-1)*ds_parent
+      i1 = 1+agrif_int((xpmin-s_child)/ds_child)
+C     
+C
+
+      Do i=1,coeffraf
+        tabdiff2(i)=(real(i)-0.5)*invcoeffraf
+      EndDo
+
+      a = invcoeffraf**2
+      tabdiff3(1) = (1./3.)*a
+      a=2.*a
+!CDIR ALTCODE
+      Do i=2,coeffraf
+        tabdiff3(i) = tabdiff3(i-1)+(real(i)-1)*a
+      EndDo
+
+!CDIR ALTCODE
+      Do i=1,coeffraf
+      tabppm(1,i,dir) = 0.08333333333333*
+     &              (-1.+4*tabdiff2(i)-3*tabdiff3(i))
+      tabppm(2,i,dir) = 0.08333333333333*
+     &              (7.-26.*tabdiff2(i)+18.*tabdiff3(i))
+      tabppm(3,i,dir) = 0.08333333333333*
+     &              (7.+30*tabdiff2(i)-30*tabdiff3(i))
+      tabppm(4,i,dir) = 0.08333333333333*
+     &              (-1.-10.*tabdiff2(i)+18.*tabdiff3(i))
+      tabppm(5,i,dir) = 0.08333333333333*
+     &              (2*tabdiff2(i)-3*tabdiff3(i))                   
+      End Do
+C 
+C
+        diffmod = 0
+       IF (mod(coeffraf,2) == 0) diffmod = 1
+C
+        ipos = i1
+C               
+        Do iparent = locind_parent_left,locind_parent_last
+             pos=1
+!CDIR ALTCODE
+             Do jj = ipos - coeffraf/2+diffmod,ipos + coeffraf/2
+         indparentppm_1d(jj) = iparent-2
+         indchildppm_1d(jj) = pos
+               pos = pos+1
+             End do
+             ipos = ipos + coeffraf
+C
+        End do
+     
+       Do i=1,np2
+
+       indparentppm(1+(i-1)*nc:i*nc,dir) = 
+     &             indparentppm_1d(1:nc) + (i-1)*np
+       indchildppm (1+(i-1)*nc:i*nc,dir) = 
+     &             indchildppm_1d (1:nc) 
+
+       End do
+
+      Return
+      End Subroutine ppm1dprecompute2d
+
+
+      Subroutine ppm1dprecompute(np,nc,
+     &                    s_parent,s_child,ds_parent,ds_child) 
+C
+CCC   Description:
+CCC   Subroutine to compute coefficient and index for  a 1D interpolation 
+CCC   using piecewise parabolic method  
+CC    Method:
+C
+C     Declarations:
+C
+      Implicit none
+C        
+C     Arguments
+      Integer             :: np,nc
+C      Real, Dimension(:),Allocatable :: ytemp
+      Real                :: s_parent,s_child,ds_parent,ds_child
+C
+C     Local scalars
+      Integer :: i,coeffraf,locind_parent_left,locind_parent_last
+      Integer :: iparent,ipos,pos,nmin,nmax
+      Real    :: ypos
+      integer :: i1,jj
+      Real :: xpmin,a
+C      
+      Real :: xrmin,xrmax,am3,s2,s1  
+      Real, Dimension(np) :: xl,delta,a6,slope
+C      Real, Dimension(:),Allocatable  :: diff,diff2,diff3    
+      INTEGER :: diffmod
+      REAL :: invcoeffraf
+C      
+      coeffraf = nint(ds_parent/ds_child)
+C
+      If (coeffraf == 1) Then
+          return
+      End If
+      invcoeffraf = ds_child/ds_parent
+C 
+      
+      if (.not.allocated(indparentppm)) then
+      allocate(indparentppm(-2*coeffraf:nc+2*coeffraf,1),
+     &         indchildppm(-2*coeffraf:nc+2*coeffraf,1))
+      else
+      if (size(indparentppm,1)<nc+4*coeffraf+1) then
+      deallocate(indparentppm,indchildppm)
+      allocate(indparentppm(-2*coeffraf:nc+2*coeffraf,1),
+     &         indchildppm(-2*coeffraf:nc+2*coeffraf,1))
+      endif
+      endif
+            
+      ypos = s_child  
+C
+      locind_parent_left = 1 + agrif_int((ypos - s_parent)/ds_parent) 
+      locind_parent_last = 1 +
+     &      agrif_ceiling((ypos +(nc - 1) 
+     &      *ds_child - s_parent)/ds_parent)  
+C
+      xpmin = s_parent + (locind_parent_left-1)*ds_parent       
+      i1 = 1+agrif_int((xpmin-s_child)/ds_child)        
+C     
+C
+      
+      Do i=1,coeffraf
+        tabdiff2(i)=(real(i)-0.5)*invcoeffraf
+      EndDo
+
+      a = invcoeffraf**2 
+      tabdiff3(1) = (1./3.)*a
+      a=2.*a
+!CDIR ALTCODE
+!!!CDIR SHORTLOOP
+      Do i=2,coeffraf
+        tabdiff3(i) = tabdiff3(i-1)+(real(i)-1)*a
+      EndDo
+      
+!CDIR ALTCODE
+!!!CDIR SHORTLOOP
+      Do i=1,coeffraf
+      tabppm(1,i,1) = 0.08333333333333*(-1.+4*tabdiff2(i)-3*tabdiff3(i))
+      tabppm(2,i,1) = 0.08333333333333*
+     &              (7.-26.*tabdiff2(i)+18.*tabdiff3(i))
+      tabppm(3,i,1) =0.08333333333333*(7.+30*tabdiff2(i)-30*tabdiff3(i))
+      tabppm(4,i,1) = 0.08333333333333*
+     &              (-1.-10.*tabdiff2(i)+18.*tabdiff3(i))     
+      tabppm(5,i,1) = 0.08333333333333*(2*tabdiff2(i)-3*tabdiff3(i)) 
+      End Do   
+C 
+C
+        diffmod = 0
+       IF (mod(coeffraf,2) == 0) diffmod = 1
+C
+        ipos = i1
+C               
+        Do iparent = locind_parent_left,locind_parent_last       
+             pos=1
+!CDIR ALTCODE
+!CDIR SHORTLOOP
+             Do jj = ipos - coeffraf/2+diffmod,ipos + coeffraf/2
+         indparentppm(jj,1) = iparent-2
+         indchildppm(jj,1) = pos
+               pos = pos+1 
+             End do 
+             ipos = ipos + coeffraf
+C
+        End do
+        
+      Return
+      End Subroutine ppm1dprecompute
+      
+      Subroutine ppm1daftercompute(x,y,np,nc,
+     &                    s_parent,s_child,ds_parent,ds_child,dir) 
+C
+CCC   Description:
+CCC   Subroutine to do a 1D interpolation and apply monotonicity constraints
+CCC   using piecewise parabolic method  
+CCC   on a child grid (vector y) from its parent grid (vector x).
+CC    Method: Use precomputed coefficient and index
+C
+C     Declarations:
+C
+      Implicit none
+C        
+C     Arguments
+      Integer             :: np,nc,dir
+      Real, INTENT(IN),Dimension(np) :: x      
+      Real, INTENT(OUT),Dimension(nc) :: y
+C      Real, Dimension(:),Allocatable :: ytemp
+      Real                :: s_parent,s_child,ds_parent,ds_child
+C
+C     Local scalars
+      Integer :: i,coeffraf,locind_parent_left,locind_parent_last
+      Integer :: iparent,ipos,pos,nmin,nmax
+      Real    :: ypos
+      integer :: i1,jj
+      Real :: xpmin,a
+C      
+      Real :: xrmin,xrmax,am3,s2,s1  
+      Real, Dimension(np) :: xl,delta,a6,slope
+      INTEGER :: diffmod
+C      
+C
+      do i=1,nc
+      y(i)=tabppm(1,indchildppm(i,dir),dir)*x(indparentppm(i,dir))+
+     &        tabppm(2,indchildppm(i,dir),dir)*x(indparentppm(i,dir)+1)+
+     &        tabppm(3,indchildppm(i,dir),dir)*x(indparentppm(i,dir)+2)+
+     &        tabppm(4,indchildppm(i,dir),dir)*x(indparentppm(i,dir)+3)+
+     &        tabppm(5,indchildppm(i,dir),dir)*x(indparentppm(i,dir)+4)
+      enddo
+        
+      Return
+      End Subroutine ppm1daftercompute            
+      
+C     **************************************************************************  
+CCC   Subroutine weno1d
+C     ************************************************************************** 
+C 
+      Subroutine weno1dnew(x,y,np,nc,
+     &                    s_parent,s_child,ds_parent,ds_child) 
+C
+CCC   Description:
+CCC   Subroutine to do a 1D interpolation and apply monotonicity constraints
+CCC   using piecewise parabolic method  
+CCC   on a child grid (vector y) from its parent grid (vector x).
+CC    Method:
+C
+C     Declarations:
+C
+      Implicit none
+C        
+C     Arguments
+      Integer             :: np,nc
+      Real, Dimension(np) :: x
+      Real, Dimension(nc) :: y
+      Real, Dimension(:),Allocatable :: ytemp
+      Real                :: s_parent,s_child,ds_parent,ds_child
+C
+C     Local scalars
+      Integer :: i,coeffraf,locind_parent_left,locind_parent_last
+      Integer :: iparent,ipos,pos,nmin,nmax
+      Real    :: ypos
+      integer :: i1,jj
+      Real :: xpmin,cavg,a,b
+C      
+      Real :: xrmin,xrmax,am3,s2,s1
+      Real, Dimension(np) :: xr,xl,delta,a6,slope,slope2,smooth
+      Real, Dimension(:),Allocatable  :: diff,diff2,diff3
+      INTEGER :: diffmod
+      REAL :: invcoeffraf
+      integer :: s,l,k
+      integer :: etan, etap
+      real :: delta0, delta1, delta2
+      real :: epsilon
+      parameter (epsilon = 1.D-8)
+      real, dimension(:,:), allocatable :: ak, ck
+C      
+      coeffraf = nint(ds_parent/ds_child)
+C
+      If (coeffraf == 1) Then
+          locind_parent_left = 1 + nint((s_child - s_parent)/ds_parent)
+          y(1:nc) = x(locind_parent_left:locind_parent_left+nc-1)
+          return
+      End If
+      invcoeffraf = ds_child/ds_parent
+      Allocate(ak(0:1,coeffraf))
+      Allocate(ck(0:1,coeffraf))
+            
+C      
+      Allocate(ytemp(-2*coeffraf:nc+2*coeffraf))
+      ypos = s_child
+C
+      locind_parent_left = 1 + agrif_int((ypos - s_parent)/ds_parent)
+      locind_parent_last = 1 +
+     &      agrif_ceiling((ypos +(nc - 1)
+     &      *ds_child - s_parent)/ds_parent)
+C
+      xpmin = s_parent + (locind_parent_left-1)*ds_parent
+      i1 = 1+agrif_int((xpmin-s_child)/ds_child)
+C     
+      Allocate( diff(coeffraf),diff2(coeffraf),diff3(coeffraf) )
+C      
+      diff(1)=0.5*invcoeffraf
+      do i=2,coeffraf
+         diff(i) = diff(i-1)+invcoeffraf
+      enddo
+      
+      ak = 0.
+      ck = 0.
+      
+      do i=1,coeffraf
+         do k=0,1
+         do s=0,2
+         do l=0,2
+           if (l /= s) then
+            ak(k,i) = ak(k,i)+(diff(i)-(k-l+1.))
+           endif
+         enddo
+         enddo
+         enddo
+               
+         etap = 0
+         etan = 0
+         do k=0,1
+          if (ak(k,i) > 0) then
+            etap = etap+1
+          else if (ak(k,i) < 0) then
+            etan = etan + 1
+          endif
+         enddo
+               
+         do k=0,1
+           if (ak(k,i) == 0) then
+            Ck(k,i) = 1.
+           else if (ak(k,i) > 0) then
+            Ck(k,i) = 1./(etap * ak(k,i))
+           else
+            Ck(k,i) = -1./(etan * ak(k,i))
+           endif
+         enddo
+      enddo
+                     
+C      
+      a = 0.
+      b = invcoeffraf
+      Do i=1,coeffraf
+         diff2(i) = 0.5*(b*b - a*a)  
+         diff3(i) = (1./3.)*(b*b*b - a*a*a)
+         a = a + invcoeffraf
+         b = b + invcoeffraf
+      End do
+C
+      if( locind_parent_last+2 <= np ) then
+           nmax = locind_parent_last+2    
+      elseif( locind_parent_last+1 <= np ) then
+           nmax = locind_parent_last+1
+      else
+           nmax = locind_parent_last 
+      endif     
+C      
+      if(locind_parent_left-2 >= 1) then
+          nmin = locind_parent_left-2
+      elseif(locind_parent_left-1 >= 1) then
+          nmin = locind_parent_left-1
+      else 
+          nmin = locind_parent_left
+      endif    
+C 
+      Do i = nmin+1,nmax
+         slope(i) = (x(i) - x(i-1))
+      Enddo 
+      DO i=nmin+2,nmax
+        smooth(i) = 0.5*(slope(i)**2+slope(i-1)**2)
+     &       +(slope(i)-slope(i-1))**2
+      enddo
+C
+        diffmod = 0
+        IF (mod(coeffraf,2) == 0) diffmod = 1           
+C
+        ipos = i1
+C               
+        Do iparent = locind_parent_left,locind_parent_last       
+             pos=1
+             
+            delta0=1./(epsilon+smooth(iparent  ))**3
+            delta1=1./(epsilon+smooth(iparent+1))**3
+            delta2=1./(epsilon+smooth(iparent+2))**3   
+                      
+             Do jj = ipos - coeffraf/2+diffmod,ipos + coeffraf/2
+C
+               pos = pos+1 
+             End do 
+             ipos = ipos + coeffraf
+C
+        End do     
+C
+C
+        y(1:nc)=ytemp(1:nc)                                 
+        deallocate(ytemp)                
+        deallocate(diff, diff2, diff3)
+        
+        deallocate(ak,ck)
+        
+      Return
+      End Subroutine weno1dnew
+      
+C     **************************************************************************  
+CCC   Subroutine weno1d
+C     ************************************************************************** 
+C 
+      Subroutine weno1d(x,y,np,nc,
+     &                    s_parent,s_child,ds_parent,ds_child) 
+C
+CCC   Description:
+CCC   Subroutine to do a 1D interpolation and apply monotonicity constraints
+CCC   using piecewise parabolic method  
+CCC   on a child grid (vector y) from its parent grid (vector x).
+CC    Method:
+C
+C     Declarations:
+C
+      Implicit none
+C        
+C     Arguments
+      Integer             :: np,nc
+      Real, Dimension(np) :: x
+      Real, Dimension(nc) :: y
+      Real, Dimension(:),Allocatable :: ytemp
+      Real                :: s_parent,s_child,ds_parent,ds_child
+C
+C     Local scalars
+      Integer :: i,coeffraf,locind_parent_left,locind_parent_last
+      Integer :: iparent,ipos,pos,nmin,nmax
+      Real    :: ypos
+      integer :: i1,jj
+      Real :: xpmin,cavg,a,b
+C      
+      Real :: xrmin,xrmax,am3,s2,s1
+      Real, Dimension(np) :: xr,xl,delta,a6,slope,slope2
+      Real, Dimension(:),Allocatable  :: diff,diff2,diff3
+      INTEGER :: diffmod
+      REAL :: invcoeffraf
+      integer :: s,l,k
+      integer :: etan, etap
+      real :: delta0, delta1,sumdelta
+      real :: epsilon
+      parameter (epsilon = 1.D-8)
+C      
+      coeffraf = nint(ds_parent/ds_child)
+C
+      If (coeffraf == 1) Then
+          locind_parent_left = 1 + nint((s_child - s_parent)/ds_parent)
+          y(1:nc) = x(locind_parent_left:locind_parent_left+nc-1)
+          return
+      End If
+      invcoeffraf = ds_child/ds_parent
+            
+C      
+      Allocate(ytemp(-2*coeffraf:nc+2*coeffraf))
+      ypos = s_child
+C
+      locind_parent_left = 1 + agrif_int((ypos - s_parent)/ds_parent)
+      locind_parent_last = 1 +
+     &      agrif_ceiling((ypos +(nc - 1)
+     &      *ds_child - s_parent)/ds_parent)
+C
+      xpmin = s_parent + (locind_parent_left-1)*ds_parent
+      i1 = 1+agrif_int((xpmin-s_child)/ds_child)
+C     
+      Allocate( diff(coeffraf))
+C      
+      diff(1)=0.5*invcoeffraf
+      do i=2,coeffraf
+         diff(i) = diff(i-1)+invcoeffraf
+      enddo
+C
+      if( locind_parent_last+2 <= np ) then
+           nmax = locind_parent_last+2   
+      else if( locind_parent_last+1 <= np ) then
+           nmax = locind_parent_last+1
+      else
+           nmax = locind_parent_last 
+      endif     
+C      
+      if(locind_parent_left-1 >= 1) then
+          nmin = locind_parent_left-1
+      else 
+          nmin = locind_parent_left
+      endif    
+C 
+      Do i = nmin+1,nmax
+         slope(i) = (x(i) - x(i-1))
+      Enddo 
+C
+        diffmod = 0
+        IF (mod(coeffraf,2) == 0) diffmod = 1           
+C
+        ipos = i1
+C               
+        Do iparent = locind_parent_left,locind_parent_last       
+             pos=1
+            delta0=1./(epsilon+slope(iparent  )**2)**2
+            delta1=1./(epsilon+slope(iparent+1)**2)**2
+            sumdelta = 1./(delta0+delta1)             
+             Do jj = ipos - coeffraf/2+diffmod,ipos + coeffraf/2
+C                              
+          ytemp(jj) = x(iparent)+(diff(pos)-0.5)*(
+     &                delta0*slope(iparent)+
+     &                delta1*slope(iparent+1))*sumdelta
+               pos = pos+1 
+             End do 
+             ipos = ipos + coeffraf
+C
+        End do     
+C
+C
+        y(1:nc)=ytemp(1:nc)                                 
+        deallocate(ytemp)                
+        deallocate(diff)
+        
+      Return
+      End Subroutine weno1d
+                 
+C                              
+C     **************************************************************************  
+CCC   Subroutine eno1d
+C     ************************************************************************** 
+C 
+      Subroutine eno1d(x,y,np,nc,
+     &                    s_parent,s_child,ds_parent,ds_child) 
+C
+CCC   Description:
+CCC   ---- p 163-164 Computational gasdynamics ----
+CCC   Subroutine to do a 1D interpolation 
+CCC   using piecewise polynomial ENO reconstruction technique  
+CCC   on a child grid (vector y) from its parent grid (vector x).
+CC    Method:
+C
+C     Declarations:
+C
+      Implicit none
+C        
+C     Arguments
+      Integer             :: np,nc      
+      Real, Dimension(np) :: x      
+      Real, Dimension(nc) :: y
+      Real, Dimension(:),Allocatable :: ytemp
+      Real                :: s_parent,s_child,ds_parent,ds_child
+C
+C     Local scalars
+      Integer :: i,coeffraf,locind_parent_left,locind_parent_last
+      Integer :: ipos,pos
+      Real    :: ypos,xi
+      integer :: i1,jj
+      Real :: xpmin,cavg
+C 
+      Real, Dimension(3,np) :: dd,c
+      Integer :: left
+C           
+      Real, DImension(1:np+1) :: xhalf
+      Real, Dimension(:,:),Allocatable  :: Xbar 
+      INTEGER :: diffmod     
+C
+      coeffraf = nint(ds_parent/ds_child)
+C      
+      If (coeffraf == 1) Then
+          locind_parent_left = 1 + nint((s_child - s_parent)/ds_parent)
+          y(1:nc) = x(locind_parent_left:locind_parent_left+nc-1)
+          return
+      End If     
+      
+      diffmod = 0
+      IF (mod(coeffraf,2) == 0) diffmod = 1  
+C      
+      Allocate(ytemp(-2*coeffraf:nc+2*coeffraf))
+      ypos = s_child  
+      locind_parent_left = 1 + agrif_int((ypos - s_parent)/ds_parent) 
+      locind_parent_last = 1 +
+     &      agrif_ceiling((ypos +(nc - 1) *ds_child - 
+     &      s_parent)/ds_parent)       
+      xpmin = s_parent + (locind_parent_left-1)*ds_parent      
+      i1 = 1+agrif_int((xpmin-s_child)/ds_child)           
+C      
+      xhalf(np+1) = np + 0.5
+      Do i = 1,np
+          xhalf(i) = i - 0.5
+      Enddo
+C
+C compute divided differences
+C
+      dd(1,1:np) = x(1:np)
+      dd(2,1:np-1) = 0.5*( dd(1,2:np) - dd(1,1:np-1) )
+      dd(3,1:np-2) = (1./3.)*( dd(2,2:np-1) - dd(2,1:np-2) )
+C
+      Allocate( Xbar( coeffraf,2 ) )
+      xi = 0.5
+      Do i = 1,coeffraf
+        Xbar(i,1) = (i-1)*ds_child/ds_parent - xi
+        Xbar(i,2) = i*ds_child/ds_parent - xi
+      Enddo
+C
+      ipos = i1
+C           
+      DO i = locind_parent_left,locind_parent_last           
+         left = i           
+         do jj = 2,3
+             If(abs(dd(jj,left)) .gt. abs(dd(jj,left-1)))
+     &               left = left-1            
+         enddo
+C           
+C  convert to Taylor series form
+C
+         Call Taylor(i,xhalf(left:left+2),dd(1:3,left),c(1:3,i))
+      ENDDO     
+C
+C evaluate the reconstruction on each cell
+C
+       DO i = locind_parent_left,locind_parent_last  
+C
+         cavg = 0.
+         pos = 1.            
+C         
+         Do jj = ipos - coeffraf/2+diffmod,ipos + coeffraf/2
+           ytemp(jj) =(c(1,i)*(Xbar(pos,2)-Xbar(pos,1))
+     &                +c(2,i)*(Xbar(pos,2)*Xbar(pos,2)-
+     &                         Xbar(pos,1)*Xbar(pos,1))
+     &                +c(3,i)*(Xbar(pos,2)*Xbar(pos,2)*Xbar(pos,2)-
+     &                         Xbar(pos,1)*Xbar(pos,1)*Xbar(pos,1)))
+     &                         *coeffraf
+           cavg = cavg + ytemp(jj)
+           pos = pos+1
+         Enddo                
+         ipos = ipos + coeffraf                 
+      ENDDO
+C
+      y(1:nc)=ytemp(1:nc)                                            
+      deallocate(ytemp,Xbar)                 
+C      
+      Return       
+      End Subroutine eno1d
+C 
+C      
+C     **************************************************************************  
+CCC   Subroutine taylor
+C     ************************************************************************** 
+C       
+      subroutine taylor(ind,xhalf,dd,c)      
+C      
+      Integer :: ind
+      real,dimension(3) :: dd,c     
+      real,dimension(0:3,0:3) :: d 
+      real,dimension(3) :: xhalf    
+      integer ::i,j
+C      
+C
+      d(0,0:3)=1.
+      do i = 1,3
+         d(i,0)=(ind-xhalf(i))*d(i-1,0)
+      enddo  
+C      
+      do i = 1,3
+         do j = 1,3-i
+           d(i,j) = d(i,j-1) + (ind-xhalf(i+j))*d(i-1,j)
+         enddo
+      enddo
+C         
+      do j = 1,3        
+         c(j) = 0.
+         do i=0,3-j
+            c(j) = c(j) + d(i,j)*dd(i+j)         
+         enddo
+      enddo
+C      
+      end subroutine taylor    
+      
+      
+      REAL FUNCTION vanleer(tab)
+      REAL, DIMENSION(3) :: tab
+       real res1
+       real p1,p2,p3
+       
+       p1=(tab(3)-tab(1))/2.
+       p2=2.*(tab(2)-tab(1))
+       p3=2.*(tab(3)-tab(2))
+       
+       if ((p1>0.).AND.(p2>0.).AND.(p3>0)) then
+          res1=minval((/p1,p2,p3/))
+       elseif ((p1<0.).AND.(p2<0.).AND.(p3<0)) then
+          res1=maxval((/p1,p2,p3/))
+       else
+          res1=0.
+       endif
+          
+          vanleer = res1   
+      
+      
+      END FUNCTION vanleer 
+
+C      
+      End Module Agrif_Interpbasic
Index: vendors/AGRIF/r_01/AGRIF_FILES/modlinktomodel.F
===================================================================
--- vendors/AGRIF/r_01/AGRIF_FILES/modlinktomodel.F	(revision 2672)
+++ vendors/AGRIF/r_01/AGRIF_FILES/modlinktomodel.F	(revision 2672)
@@ -0,0 +1,173 @@
+C     AGRIF (Adaptive Grid Refinement In Fortran)
+C
+C     Copyright (C) 2003 Laurent Debreu (Laurent.Debreu@imag.fr)
+C                        Christophe Vouland (Christophe.Vouland@imag.fr)    
+C
+C     This program is free software; you can redistribute it and/or modify
+C     it under the terms of the GNU General Public License as published by
+C     the Free Software Foundation; either version 2 of the License, or
+C     (at your option) any later version.
+C
+C     This program is distributed in the hope that it will be useful,
+C     but WITHOUT ANY WARRANTY; without even the implied warranty of
+C     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+C     GNU General Public License for more details.
+C
+C     You should have received a copy of the GNU General Public License
+C     along with this program; if not, write to the Free Software
+C     Foundation, Inc., 59 Temple Place -  Suite 330, Boston, MA 02111-1307, USA.
+C
+C
+      Module Agrif_link
+C
+CCC   Description:
+CCC   This module is used to link AGRIF files to the model
+C
+C     Modules used: 
+C
+c        external Agrif_InitValues
+c        external Agrif_InitWorkspace
+c        external Agrif_detect
+C
+        external Agrif_probdim_modtype_def
+        external Agrif_clustering_def
+C     Interface                       
+      Interface
+         Subroutine Agrif_Set_numberofcells(Agrif_Gr)
+         Use Agrif_Types, Only : Agrif_grid
+         TYPE(Agrif_Grid), Pointer :: Agrif_Gr   ! Pointer on the current grid  
+         End Subroutine Agrif_Set_numberofcells
+      End interface
+      Interface
+         Subroutine Agrif_Get_numberofcells(Agrif_Gr)
+         Use Agrif_Types, Only : Agrif_grid
+         TYPE(Agrif_Grid), Pointer :: Agrif_Gr   ! Pointer on the current grid  
+         End Subroutine Agrif_Get_numberofcells
+      End interface
+      Interface
+         Subroutine Agrif_Allocationcalls(Agrif_Gr)
+         Use Agrif_Types, Only : Agrif_grid
+         TYPE(Agrif_Grid), Pointer :: Agrif_Gr   ! Pointer on the current grid  
+         End Subroutine Agrif_Allocationcalls
+      End interface
+C   
+      End Module Agrif_link
+C     **************************************************************************
+CCC   Function Agrif_parent
+C        modify by conv. To use : un_parent = Agrif_Parent(un)
+C     **************************************************************************
+CCC   Function Agrif_Get_Coarse_Grid
+C        modify by conv. To use : un_Mygrid = Agrif_Get_Coarse_grid(un)
+C     **************************************************************************
+CCC   Function Agrif_Rhox
+C        modify by conv. To use : var = Agrif_Rhox()
+C                    REAL(Agrif_Curgrid % spaceref(1))
+C     **************************************************************************
+CCC   Function Agrif_Parent_Rhox
+C        modify by conv. To use : var = Agrif_Parent_Rhox()
+C                    REAL(Agrif_Curgrid % parent % spaceref(1))
+C     **************************************************************************
+CCC   Function Agrif_Irhox
+C        modify by conv. To use : var = Agrif_Parent_IRhox()
+C                    Agrif_Curgrid % spaceref(1)
+C     **************************************************************************
+CCC   Function Agrif_Parent_Irhox
+C        modify by conv. To use : var = Agrif_Parent_IRhox()
+C                    Agrif_Curgrid % parent % spaceref(1)
+C     **************************************************************************
+CCC   Function Agrif_Rhoy
+C        modify by conv. To use : var = Agrif_Rhoy()
+C                    REAL(Agrif_Curgrid % spaceref(2))
+C     **************************************************************************
+CCC   Function Agrif_Parent_Rhoy
+C        modify by conv. To use : var = Agrif_Parent_Rhoy()
+C                    REAL(Agrif_Curgrid % parent % spaceref(2))
+C     **************************************************************************
+CCC   Function Agrif_Irhoy
+C        modify by conv. To use : var = Agrif_Parent_IRhoy()
+C                    Agrif_Curgrid % spaceref(2)
+C     **************************************************************************
+CCC   Function Agrif_Parent_Irhoy
+C        modify by conv. To use : var = Agrif_Parent_IRhoy()
+C                    Agrif_Curgrid % parent % spaceref(2)
+C     **************************************************************************
+CCC   Function Agrif_Rhoz
+C        modify by conv. To use : var = Agrif_Rhoz()
+C                    REAL(Agrif_Curgrid % spaceref(3))
+C     **************************************************************************
+CCC   Function Agrif_Parent_Rhoz
+C        modify by conv. To use : var = Agrif_Parent_Rhoz()
+C                    REAL(Agrif_Curgrid % parent % spaceref(3))
+C     **************************************************************************
+CCC   Function Agrif_Irhoz
+C        modify by conv. To use : var = Agrif_Parent_IRhoz()
+C                    Agrif_Curgrid % spaceref(3)
+C     **************************************************************************
+CCC   Function Agrif_Parent_Irhoz
+C        modify by conv. To use : var = Agrif_Parent_IRhoz()
+C                    Agrif_Curgrid % parent % spaceref(3)
+C     **************************************************************************
+CCC   Function Agrif_NearCommonBorderX
+C        modify by conv. To use : var = Agrif_NearCommonBorderX()
+C                       AGRIF_CURGRID % NearRootBorder(1)
+C     **************************************************************************
+CCC   Function Agrif_NearCommonBorderY
+C        modify by conv. To use : var = Agrif_NearCommonBorderY()
+C                       AGRIF_CURGRID % NearRootBorder(2)
+C     **************************************************************************
+CCC   Function Agrif_NearCommonBorderZ
+C        modify by conv. To use : var = Agrif_NearCommonBorderZ()
+C                       AGRIF_CURGRID % NearRootBorder(3)
+C     **************************************************************************
+CCC   Function Agrif_DistantCommonBorderX
+C        modify by conv. To use : var = Agrif_DistantCommonBorderX()
+C                       AGRIF_CURGRID % DistantRootBorder(1)
+C     **************************************************************************
+CCC   Function Agrif_DistantCommonBorderY
+C        modify by conv. To use : var = Agrif_DistantCommonBorderY()
+C                       AGRIF_CURGRID % DistantRootBorder(2)
+C     **************************************************************************
+CCC   Function Agrif_DistantCommonBorderZ
+C        modify by conv. To use : var = Agrif_DistantCommonBorderZ()
+C                       AGRIF_CURGRID % DistantRootBorder(3)
+C     **************************************************************************
+CCC   Function Agrif_Nb_Step
+C        modify by conv. To use : var = Agrif_Nb_Step()
+C                          AGRIF_CURGRID % ngridstep
+C     **************************************************************************
+CCC   Function Agrif_Nb_Fine_Grids
+C        modify by conv. To use : var = Agrif_Nb_Fine_Grids()
+C                         Agrif_nbfixedgrids 
+C     **************************************************************************
+CCC   Function Agrif_Ix
+C        modify by conv. To use : var = Agrif_Ix()
+C                         Agrif_CURGRID % ix(1) 
+C     **************************************************************************
+CCC   Function Agrif_Parent_Ix
+C        modify by conv. To use : var = Agrif_Parent_Ix()
+C                        Agrif_CURGRID % parent % ix(1) 
+C     **************************************************************************
+CCC   Function Agrif_Iy
+C        modify by conv. To use : var = Agrif_Iy()
+C                        AGRIF_CURGRID % ix(2) 
+C     **************************************************************************
+CCC   Function Agrif_Parent_Iy
+C        modify by conv. To use : var = Agrif_Parent_Iy()
+C                       Agrif_CURGRID % parent % ix(2) 
+C     **************************************************************************
+CCC   Function Agrif_Iz
+C        modify by conv. To use : var = Agrif_Iz()
+C                      AGRIF_CURGRID % ix(3) 
+C     **************************************************************************
+CCC   Function Agrif_Parent_Iz
+C        modify by conv. To use : var = Agrif_Parent_Iz()
+C                     Agrif_CURGRID % parent % ix(3) 
+C     **************************************************************************
+CCC   Function Agrif_Get_grid_id
+C        modify by conv. To use : var = Agrif_Get_grid_id()
+C                    Agrif_CURGRID % grid_id
+C     **************************************************************************
+CCC   Function Agrif_Get_parent_id
+C        modify by conv. To use : var = Agrif_Get_parent_id()
+C                    Agrif_CURGRID % parent % grid_id
+C     **************************************************************************
Index: vendors/AGRIF/r_01/AGRIF_FILES/modmask.F
===================================================================
--- vendors/AGRIF/r_01/AGRIF_FILES/modmask.F	(revision 2672)
+++ vendors/AGRIF/r_01/AGRIF_FILES/modmask.F	(revision 2672)
@@ -0,0 +1,688 @@
+!
+! $Id: modmask.F 779 2007-12-22 17:04:17Z rblod $
+!
+C     AGRIF (Adaptive Grid Refinement In Fortran)
+C
+C     Copyright (C) 2003 Laurent Debreu (Laurent.Debreu@imag.fr)
+C                        Christophe Vouland (Christophe.Vouland@imag.fr)    
+C
+C     This program is free software; you can redistribute it and/or modify
+C     it under the terms of the GNU General Public License as published by
+C     the Free Software Foundation; either version 2 of the License, or
+C     (at your option) any later version.
+C
+C     This program is distributed in the hope that it will be useful,
+C     but WITHOUT ANY WARRANTY; without even the implied warranty of
+C     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+C     GNU General Public License for more details.
+C
+C     You should have received a copy of the GNU General Public License
+C     along with this program; if not, write to the Free Software
+C     Foundation, Inc., 59 Temple Place -  Suite 330, Boston, MA 02111-1307, USA.
+C
+C
+C
+CCC   Module Agrif_Mask
+C
+      Module Agrif_Mask
+C
+CCC   Description:
+CCC   Module for masks
+C
+C     Modules used: 
+C
+      Use Agrif_Types       
+C
+      IMPLICIT NONE
+C
+      CONTAINS
+C     Define procedures contained in this module
+C
+C     **************************************************************************
+C     Subroutine Agrif_CheckMasknD
+C     **************************************************************************
+C       
+      Subroutine Agrif_CheckMasknD(tempP,parent,pbtab,petab,ppbtab,
+     &               ppetab,noraftab,nbdim)
+C
+CCC   Description:
+CCC   Subroutine called in the procedure Agrif_InterpnD to recalculate the value 
+CCC   of the parent grid variable when this one is equal to Agrif_SpecialValue. 
+C
+C     Declarations:
+C
+       
+C
+C     Arrays arguments      
+      INTEGER :: nbdim
+      INTEGER,DIMENSION(nbdim) :: pbtab  ! Limits of the parent grid used  
+      INTEGER,DIMENSION(nbdim) :: petab  ! interpolation of the child grid
+      LOGICAL,DIMENSION(nbdim) :: noraftab
+      INTEGER,DIMENSION(nbdim) :: ppbtab,ppetab
+C
+C     Pointer argument
+      TYPE(AGRIF_PVARIABLE) :: tempP  ! Part of the parent grid used for 
+                                      ! the interpolation of the child grid                     
+C     Data TYPE argument                                   
+      TYPE(AGRIF_PVARIABLE) :: parent      ! The parent grid
+C
+C     Local scalar
+      INTEGER                   :: i0,j0,k0,l0,m0,n0
+C      
+C     Local arrays
+C
+C      
+      SELECT CASE (nbdim)
+      CASE (1)
+         do i0 = pbtab(1),petab(1)
+         IF (tempP%var%array1(i0)
+     &                        == Agrif_SpecialValue) Then
+            Call CalculNewValTempP((/i0/),
+     &                             tempP,parent,
+     &                             ppbtab,ppetab,
+     &                             noraftab,nbdim)
+         ENDIF
+         enddo
+      CASE (2)
+         do j0 = pbtab(2),petab(2)
+         do i0 = pbtab(1),petab(1)
+         IF (tempP%var%array2(i0,j0)
+     &                        == Agrif_SpecialValue) Then
+            Call CalculNewValTempP((/i0,j0/),
+     &                             tempP,parent,
+     &                             ppbtab,ppetab,
+     &                             noraftab,nbdim)
+         ENDIF
+         enddo  
+         enddo
+      CASE (3)
+         do k0 = pbtab(3),petab(3)
+         do j0 = pbtab(2),petab(2)
+         do i0 = pbtab(1),petab(1)
+         IF (tempP%var%array3(i0,j0,k0)
+     &                        == Agrif_SpecialValue) Then
+!------CDIR NEXPAND
+            Call CalculNewValTempP3D((/i0,j0,k0/),
+     &      tempP%var%array3(ppbtab(1),ppbtab(2),ppbtab(3)),
+     &      parent%var%array3(ppbtab(1),ppbtab(2),ppbtab(3)),
+     &                           ppbtab,ppetab,
+     &                           noraftab,MaxSearch,Agrif_SpecialValue)
+     
+c            Call CalculNewValTempP((/i0,j0,k0/),
+c     &                             tempP,parent,
+c     &                             ppbtab,ppetab,
+c     &                             noraftab,nbdim)
+          
+         ENDIF
+         enddo
+         enddo  
+         enddo
+      CASE (4)
+         do l0 = pbtab(4),petab(4)
+         do k0 = pbtab(3),petab(3)
+         do j0 = pbtab(2),petab(2)
+         do i0 = pbtab(1),petab(1)
+         IF (tempP%var%array4(i0,j0,k0,l0) 
+     &                        == Agrif_SpecialValue) Then
+            Call CalculNewValTempP4D((/i0,j0,k0,l0/),
+     &      tempP%var%array4(ppbtab(1),ppbtab(2),ppbtab(3),ppbtab(4)),
+     &      parent%var%array4(ppbtab(1),ppbtab(2),ppbtab(3),ppbtab(4)),
+     &                           ppbtab,ppetab,
+     &                           noraftab,MaxSearch,Agrif_SpecialValue)
+         ENDIF
+         enddo
+         enddo
+         enddo  
+         enddo
+      CASE (5)
+         do m0 = pbtab(5),petab(5)
+         do l0 = pbtab(4),petab(4)
+         do k0 = pbtab(3),petab(3)
+         do j0 = pbtab(2),petab(2)
+         do i0 = pbtab(1),petab(1)
+         IF (tempP%var%array5(i0,j0,k0,l0,m0) 
+     &                       == Agrif_SpecialValue) Then
+            Call CalculNewValTempP((/i0,j0,k0,l0,m0/),
+     &                             tempP,parent,
+     &                             ppbtab,ppetab,
+     &                             noraftab,nbdim)
+         ENDIF
+         enddo
+         enddo
+         enddo  
+         enddo
+         enddo
+      CASE (6)
+         do n0 = pbtab(6),petab(6)
+         do m0 = pbtab(5),petab(5)
+         do l0 = pbtab(4),petab(4)
+         do k0 = pbtab(3),petab(3)
+         do j0 = pbtab(2),petab(2)
+         do i0 = pbtab(1),petab(1)
+         IF (tempP%var%array6(i0,j0,k0,l0,m0,n0) 
+     &                       == Agrif_SpecialValue) Then
+            Call CalculNewValTempP((/i0,j0,k0,l0,m0,n0/),
+     &                             tempP,parent,
+     &                             ppbtab,ppetab,
+     &                             noraftab,nbdim)
+         ENDIF
+         enddo
+         enddo
+         enddo
+         enddo  
+         enddo
+         enddo
+      END SELECT
+C
+C      
+C     
+      End Subroutine Agrif_CheckMasknD
+C
+C
+C     **************************************************************************
+C     Subroutine CalculNewValTempP
+C     **************************************************************************
+C       
+      Subroutine CalculNewValTempP(indic,
+     &               tempP,parent,ppbtab,
+     &               ppetab,noraftab,nbdim)
+C
+CCC   Description:
+CCC   Subroutine called in the procedure Agrif_InterpnD to recalculate the value 
+CCC   of the parent grid variable when this one is equal to Agrif_SpecialValue. 
+C
+C     Declarations:
+C
+       
+C
+C     Arrays arguments      
+      INTEGER :: nbdim
+      INTEGER,DIMENSION(nbdim) :: indic
+      LOGICAL,DIMENSION(nbdim) :: noraftab
+      INTEGER,DIMENSION(nbdim) :: ppbtab,ppetab
+C
+C     Pointer argument
+      TYPE(AGRIF_PVARIABLE) :: tempP  ! Part of the parent grid used for 
+                                      ! the interpolation of the child grid                     
+C     Data TYPE argument                                   
+      TYPE(AGRIF_PVARIABLE) :: parent      ! The parent grid
+C
+C     Local scalar
+      INTEGER                  :: i,ii,iii,jj,kk,ll,mm,nn 
+      INTEGER,DIMENSION(nbdim) :: imin,imax,idecal
+      INTEGER                  :: Nbvals
+      REAL                     :: Res
+      REAL                     :: ValParent
+      INTEGER                  :: ValMax
+      LOGICAL                  :: firsttest
+C      
+C     Local arrays      
+C
+      ValMax = 1
+      do iii = 1 , nbdim
+         IF (.NOT.noraftab(iii)) THEN
+         ValMax = max(ValMax,ppetab(iii)-indic(iii))
+         ValMax = max(ValMax,indic(iii)-ppbtab(iii))
+         ENDIF
+      enddo
+C
+      Valmax = min(Valmax,MaxSearch)
+C
+!CDIR NOVECTOR
+      imin = indic
+!CDIR NOVECTOR
+      imax = indic
+C
+         i = 1
+         firsttest = .TRUE.
+C
+         do While(i <= ValMax)
+C
+         IF ((i == 1).AND.(firsttest)) i = Valmax
+
+            do iii = 1 , nbdim
+               if (.NOT.noraftab(iii)) then
+                  imin(iii) = max(indic(iii) - i,ppbtab(iii))
+                  imax(iii) = min(indic(iii) + i,ppetab(iii))
+                  if (firsttest) then               
+                  if (indic(iii).GT.ppbtab(iii)) then
+
+!CDIR NOVECTOR
+                     idecal = indic
+                     idecal(iii) = idecal(iii)-1
+                     SELECT CASE(nbdim)
+                     CASE (1)
+                        if (tempP%var%array1(idecal(1)
+     &                            ) == Agrif_SpecialValue) then
+                           imin(iii) = imax(iii)
+                        endif                     
+                     CASE (2)
+                        if (tempP%var%array2(idecal(1),
+     &            idecal(2)) == Agrif_SpecialValue) then
+                           imin(iii) = imax(iii)
+                        endif
+                     CASE (3)
+                        if (tempP%var%array3(idecal(1),
+     &            idecal(2),idecal(3)) 
+     &                               == Agrif_SpecialValue) then
+                           imin(iii) = imax(iii)
+                        endif  
+                     CASE (4)
+                        if (tempP%var%array4(idecal(1),
+     &            idecal(2),idecal(3),idecal(4)) 
+     &                               == Agrif_SpecialValue) then
+                           imin(iii) = imax(iii)
+                        endif     
+                     CASE (5)
+                        if (tempP%var%array5(idecal(1),
+     &            idecal(2),idecal(3),idecal(4),idecal(5)) 
+     &                               == Agrif_SpecialValue) then
+                           imin(iii) = imax(iii)
+                        endif  
+                     CASE (6)
+                        if (tempP%var%array6(idecal(1),
+     &            idecal(2),idecal(3),idecal(4),idecal(5),idecal(6)) 
+     &                               == Agrif_SpecialValue) then
+                           imin(iii) = imax(iii)
+                        endif                                                                                           
+                     END SELECT
+                  endif
+                  endif
+               endif            
+            enddo
+C
+            Res = 0.
+            Nbvals = 0
+C
+            SELECT CASE(nbdim)
+            CASE (1)
+!CDIR ALTCODE
+!CDIR SHORTLOOP
+               do ii = imin(1),imax(1)
+                    ValParent = parent%var%array1(ii)
+                    if ( ValParent .NE. Agrif_SpecialValue) then
+                        Res = Res + ValParent
+                        Nbvals = Nbvals + 1
+                    endif 
+               enddo
+C
+            CASE (2)
+               do jj = imin(2),imax(2)
+!CDIR ALTCODE
+!CDIR SHORTLOOP
+               do ii = imin(1),imax(1)
+                    ValParent = parent%var%array2(ii,jj)
+                    if ( ValParent .NE. Agrif_SpecialValue) then
+                        Res = Res + ValParent
+                        Nbvals = Nbvals + 1
+                    endif 
+               enddo  
+               enddo
+               
+            CASE (3)
+               do kk = imin(3),imax(3)
+               do jj = imin(2),imax(2)
+!CDIR ALTCODE
+!CDIR SHORTLOOP
+               do ii = imin(1),imax(1)
+                    ValParent = parent%var%array3(ii,jj,kk)
+                    if ( ValParent .NE. Agrif_SpecialValue) then
+                        Res = Res + ValParent
+                        Nbvals = Nbvals + 1
+                    endif 
+                        enddo
+                  enddo  
+               enddo
+
+            CASE (4)
+               do ll = imin(4),imax(4)
+               do kk = imin(3),imax(3)
+               do jj = imin(2),imax(2)
+!CDIR ALTCODE
+!CDIR SHORTLOOP
+               do ii = imin(1),imax(1)
+                    ValParent = parent%var%array4(ii,jj,kk,ll)
+                    if ( ValParent .NE. Agrif_SpecialValue) then
+                        Res = Res + ValParent
+                        Nbvals = Nbvals + 1
+                    endif 
+                              enddo
+                        enddo
+                  enddo  
+               enddo
+
+            CASE (5)
+               do mm = imin(5),imax(5)
+               do ll = imin(4),imax(4)
+               do kk = imin(3),imax(3)
+               do jj = imin(2),imax(2)
+!CDIR ALTCODE
+!CDIR SHORTLOOP
+               do ii = imin(1),imax(1)
+                    ValParent = parent%var%array5(ii,jj,kk,ll,mm)
+                    if ( ValParent .NE. Agrif_SpecialValue) then
+                        Res = Res + ValParent
+                        Nbvals = Nbvals + 1
+                    endif 
+                                    enddo
+                              enddo
+                        enddo
+                  enddo  
+               enddo
+
+            CASE (6)
+               do nn = imin(6),imax(6)
+               do mm = imin(5),imax(5)
+               do ll = imin(4),imax(4)
+               do kk = imin(3),imax(3)
+               do jj = imin(2),imax(2)
+!CDIR ALTCODE
+!CDIR SHORTLOOP
+               do ii = imin(1),imax(1)
+                    ValParent = parent%var%array6(ii,jj,kk,ll,mm,nn)
+                    if ( ValParent .NE. Agrif_SpecialValue) then
+                        Res = Res + ValParent
+                        Nbvals = Nbvals + 1
+                    endif 
+                                          enddo
+                                    enddo
+                              enddo
+                        enddo
+                  enddo  
+               enddo
+
+            END SELECT
+C
+C
+            
+            if (Nbvals.GT.0) then
+              if (firsttest) then
+                   firsttest = .FALSE.
+                   i=1
+                   cycle
+              endif
+            SELECT CASE(nbdim)
+            CASE (1)              
+              tempP%var%array1(indic(1)) 
+     &           = Res/Nbvals
+            CASE (2)
+              tempP%var%array2(indic(1),
+     &                            indic(2)) = Res/Nbvals
+            CASE (3)
+              tempP%var%array3(indic(1),
+     &                            indic(2),indic(3)) = Res/Nbvals
+            CASE (4)
+              tempP%var%array4(indic(1),
+     &                            indic(2),indic(3),indic(4))
+     &                = Res/Nbvals
+            CASE (5)
+              tempP%var%array5(indic(1),
+     &                            indic(2),indic(3),indic(4),
+     &                   indic(5)) = Res/Nbvals
+            CASE (6)
+              tempP%var%array6(indic(1),
+     &                            indic(2),indic(3),indic(4),
+     &                           indic(5),indic(6)) = Res/Nbvals
+            END SELECT
+              exit
+            else
+               if (firsttest) exit
+               i = i + 1                      
+            endif
+          enddo            
+C     
+      End Subroutine CalculNewValTempP
+C
+C
+      End Module Agrif_Mask     
+      
+      Subroutine CalculNewValTempP3D(indic,
+     &               tempP,parent,ppbtab,
+     &               ppetab,noraftab,MaxSearch,Agrif_SpecialValue)
+C
+CCC   Description:
+CCC   Subroutine called in the procedure Agrif_InterpnD to recalculate the value 
+CCC   of the parent grid variable when this one is equal to Agrif_SpecialValue. 
+C
+C     Declarations:
+C
+       
+C
+C     Arrays arguments      
+      INTEGER, PARAMETER :: nbdim = 3
+      INTEGER,DIMENSION(nbdim) :: indic
+      LOGICAL,DIMENSION(nbdim) :: noraftab
+      INTEGER,DIMENSION(nbdim) :: ppbtab,ppetab
+      REAL :: Agrif_SpecialValue
+C
+C     Pointer argument
+      REAL,DIMENSION(ppbtab(1):ppetab(1),ppbtab(2):ppetab(2),
+     &    ppbtab(3):ppetab(3)) :: tempP, parent  ! Part of the parent grid used for 
+                                      ! the interpolation of the child grid                     
+C
+C     Local scalar
+      INTEGER                  :: i,ii,iii,jj,kk,ll,mm,nn 
+      INTEGER,DIMENSION(nbdim) :: imin,imax,idecal
+      INTEGER                  :: Nbvals
+      REAL                     :: Res
+      REAL                     :: ValParent
+      INTEGER                  :: ValMax
+      INTEGER :: MaxSearch
+      LOGICAL :: Existunmasked
+C      
+C     Local arrays      
+C
+      ValMax = 1
+!CDIR NOVECTOR
+      do iii = 1 , nbdim
+         IF (.NOT.noraftab(iii)) THEN
+         ValMax = max(ValMax,ppetab(iii)-indic(iii))
+         ValMax = max(ValMax,indic(iii)-ppbtab(iii))
+         ENDIF
+      enddo
+C
+      Valmax = min(Valmax,MaxSearch)
+C
+!CDIR NOVECTOR
+      imin = indic
+!CDIR NOVECTOR
+      imax = indic
+      
+!CDIR NOVECTOR
+         idecal = indic	 
+C
+         i = Valmax
+
+            do iii = 1 , nbdim
+               if (.NOT.noraftab(iii)) then
+                  imin(iii) = max(indic(iii) - i,ppbtab(iii))
+                  imax(iii) = min(indic(iii) + i,ppetab(iii))
+         
+                  if (indic(iii).GT.ppbtab(iii)) then
+
+                     idecal(iii) = idecal(iii)-1
+
+                        if (tempP(idecal(1),idecal(2),idecal(3)) 
+     &                               == Agrif_SpecialValue) then
+                           imin(iii) = imax(iii)
+                        endif
+
+                     idecal(iii) = idecal(iii)+1
+                  endif
+
+               endif            
+            enddo
+C
+            Existunmasked = .FALSE.
+C
+               do kk = imin(3),imax(3)
+               do jj = imin(2),imax(2)
+!CDIR NOVECTOR
+               do ii = imin(1),imax(1)
+                    if ( parent(ii,jj,kk) .NE. Agrif_SpecialValue) then
+                        Existunmasked = .TRUE.
+                       exit
+                    endif 
+                        enddo
+                  enddo  
+               enddo
+C
+C
+          if (.Not.Existunmasked) return
+C
+         i = 1
+C
+         do While(i <= ValMax)
+C
+
+            do iii = 1 , nbdim
+               if (.NOT.noraftab(iii)) then
+                  imin(iii) = max(indic(iii) - i,ppbtab(iii))
+                  imax(iii) = min(indic(iii) + i,ppetab(iii))
+               endif            
+            enddo
+C
+            Res = 0.
+            Nbvals = 0
+C
+               do kk = imin(3),imax(3)
+               do jj = imin(2),imax(2)
+!CDIR NOVECTOR
+               do ii = imin(1),imax(1)
+                    ValParent = parent(ii,jj,kk)
+                    if ( ValParent .NE. Agrif_SpecialValue) then
+                        Res = Res + ValParent
+                        Nbvals = Nbvals + 1
+                    endif 
+                        enddo
+                  enddo  
+               enddo
+C
+C
+            
+            if (Nbvals.GT.0) then
+              tempP(indic(1),indic(2),indic(3)) = Res/Nbvals
+              exit
+            else
+               i = i + 1                      
+            endif
+          enddo            
+C     
+      End Subroutine CalculNewValTempP3D        
+
+      Subroutine CalculNewValTempP4D(indic,
+     &               tempP,parent,ppbtab,
+     &               ppetab,noraftab,MaxSearch,Agrif_SpecialValue)
+C
+CCC   Description:
+CCC   Subroutine called in the procedure Agrif_InterpnD to recalculate the value 
+CCC   of the parent grid variable when this one is equal to Agrif_SpecialValue. 
+C
+C     Declarations:
+C
+       
+C
+C     Arrays arguments      
+      INTEGER, PARAMETER :: nbdim = 4
+      INTEGER,DIMENSION(nbdim) :: indic
+      LOGICAL,DIMENSION(nbdim) :: noraftab
+      INTEGER,DIMENSION(nbdim) :: ppbtab,ppetab
+      INTEGER :: MaxSearch      
+      REAL :: Agrif_SpecialValue      
+C
+C     Pointer argument
+      REAL,DIMENSION(ppbtab(1):ppetab(1),ppbtab(2):ppetab(2),
+     &    ppbtab(3):ppetab(3),
+     &    ppbtab(4):ppetab(4)) :: tempP, parent  ! Part of the parent grid used for 
+                                      ! the interpolation of the child grid                     
+C
+C     Local scalar
+      INTEGER                  :: i,ii,iii,jj,kk,ll,mm,nn 
+      INTEGER,DIMENSION(nbdim) :: imin,imax,idecal
+      INTEGER                  :: Nbvals
+      REAL                     :: Res
+      REAL                     :: ValParent
+      INTEGER                  :: ValMax
+      LOGICAL                  :: firsttest
+C      
+C     Local arrays      
+C
+      ValMax = 1
+      do iii = 1 , nbdim
+         IF (.NOT.noraftab(iii)) THEN
+         ValMax = max(ValMax,ppetab(iii)-indic(iii))
+         ValMax = max(ValMax,indic(iii)-ppbtab(iii))
+         ENDIF
+      enddo
+C
+      Valmax = min(Valmax,MaxSearch)
+C
+      imin = indic
+      imax = indic
+C
+         i = 1
+         firsttest = .TRUE.
+         idecal = indic	 
+	 
+C
+         do While(i <= ValMax)
+C
+         IF ((i == 1).AND.(firsttest)) i = Valmax
+
+            do iii = 1 , nbdim
+               if (.NOT.noraftab(iii)) then
+                  imin(iii) = max(indic(iii) - i,ppbtab(iii))
+                  imax(iii) = min(indic(iii) + i,ppetab(iii))
+                  if (firsttest) then               
+                  if (indic(iii).GT.ppbtab(iii)) then
+
+
+                     idecal(iii) = idecal(iii)-1
+		     
+                     if (tempP(idecal(1),idecal(2),idecal(3),idecal(4))
+     &                               == Agrif_SpecialValue) then
+                           imin(iii) = imax(iii)
+                     endif
+		     
+		     idecal(iii) = idecal(iii)+1
+                  endif
+                  endif
+               endif            
+            enddo
+C
+            Res = 0.
+            Nbvals = 0
+C
+               do ll = imin(4),imax(4)
+               do kk = imin(3),imax(3)
+               do jj = imin(2),imax(2)
+               do ii = imin(1),imax(1)
+                    ValParent = parent(ii,jj,kk,ll)
+                    if ( ValParent .NE. Agrif_SpecialValue) then
+                        Res = Res + ValParent
+                        Nbvals = Nbvals + 1
+                    endif 
+                              enddo
+                        enddo
+                  enddo  
+               enddo
+C
+C
+            
+            if (Nbvals.GT.0) then
+              if (firsttest) then
+                   firsttest = .FALSE.
+                   i=1
+                   cycle
+              endif
+	      
+              tempP(indic(1),indic(2),indic(3),indic(4)) = Res/Nbvals
+	    
+              exit
+            else
+               if (firsttest) exit
+               i = i + 1                      
+            endif
+          enddo            
+C     
+      End Subroutine CalculNewValTempP4D        
Index: vendors/AGRIF/r_01/AGRIF_FILES/modmpp.F
===================================================================
--- vendors/AGRIF/r_01/AGRIF_FILES/modmpp.F	(revision 2672)
+++ vendors/AGRIF/r_01/AGRIF_FILES/modmpp.F	(revision 2672)
@@ -0,0 +1,1119 @@
+!
+! $Id: modmpp.F 779 2007-12-22 17:04:17Z rblod $
+!
+C     AGRIF (Adaptive Grid Refinement In Fortran)
+C
+C     Copyright (C) 2003 Laurent Debreu (Laurent.Debreu@imag.fr)
+C                        Christophe Vouland (Christophe.Vouland@imag.fr)
+C
+C     This program is free software; you can redistribute it and/or modify
+C     it under the terms of the GNU General Public License as published by
+C     the Free Software Foundation; either version 2 of the License, or
+C     (at your option) any later version.
+C
+C     This program is distributed in the hope that it will be useful,
+C     but WITHOUT ANY WARRANTY; without even the implied warranty of
+C     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+C     GNU General Public License for more details.
+C
+C     You should have received a copy of the GNU General Public License
+C     along with this program; if not, write to the Free Software
+C     Foundation, Inc., 59 Temple Place- Suite 330, Boston, MA 02111-1307, USA.
+C
+C
+C
+CCC   Module Agrif_mpp
+C
+      Module Agrif_mpp
+      Use Agrif_Types
+      Use Agrif_Arrays
+
+      Contains
+#ifdef AGRIF_MPI
+      Subroutine Get_External_Data_first(pttruetab,
+     &   cetruetab,pttruetabwhole,cetruetabwhole,nbdim,memberin,
+     &   memberout,memberoutall1,sendtoproc,recvfromproc,imin,imax,
+     &   imin_recv,imax_recv)
+
+      IMPLICIT NONE
+#include "mpif.h"
+      INTEGER :: nbdim
+      INTEGER,DIMENSION(nbdim,0:Agrif_NbProcs-1)    :: pttruetab,
+     &                                                 cetruetab
+      INTEGER,DIMENSION(nbdim,0:Agrif_NbProcs-1)    :: pttruetabwhole,
+     &                                                 cetruetabwhole
+      INTEGER :: k,i,k2
+      LOGICAL, DIMENSION(0:Agrif_Nbprocs-1) :: sendtoproc, recvfromproc
+      INTEGER,DIMENSION(nbdim,0:Agrif_NbProcs-1):: imin,imax,
+     &   imin_recv,imax_recv
+      LOGICAL :: memberin, memberout
+      INTEGER :: imintmp, imaxtmp,j,i1
+      INTEGER :: imin1,imax1
+      LOGICAL :: tochange,tochangebis
+      INTEGER,DIMENSION(nbdim,0:Agrif_NbProcs-1)    :: pttruetab2,
+     &                                                 cetruetab2
+      LOGICAL :: memberout1(1),memberoutall(0:Agrif_Nbprocs-1)
+      LOGICAL, OPTIONAL :: memberoutall1(0:Agrif_Nbprocs-1)
+      INTEGER :: code
+      
+C pttruetab2 and cetruetab2 are modified arraysin order to always
+C send the most inner points
+
+        
+        IF (present(memberoutall1)) THEN
+        memberoutall = memberoutall1
+        ELSE
+         memberout1(1) = memberout
+
+         CALL MPI_ALLGATHER(memberout1,1,MPI_LOGICAL,memberoutall,
+     &                  1,MPI_LOGICAL,MPI_COMM_WORLD,code)
+        ENDIF
+         pttruetab2(:,Agrif_Procrank) = pttruetab(:,Agrif_Procrank)
+         cetruetab2(:,Agrif_Procrank) = cetruetab(:,Agrif_Procrank)
+         do k2=0,Agrif_Nbprocs-1
+            do i=1,nbdim
+
+           tochangebis=.TRUE.
+           DO i1=1,nbdim
+            IF (i .NE. i1) THEN
+              IF ((pttruetab(i1,Agrif_Procrank).NE.pttruetab(i1,k2)).OR.
+     &          (cetruetab(i1,Agrif_Procrank).NE.cetruetab(i1,k2))) THEN
+                   tochangebis = .FALSE.
+               EXIT
+              ENDIF
+             ENDIF
+           ENDDO
+
+           IF (tochangebis) THEN
+
+
+          imin1 = max(pttruetab(i,Agrif_Procrank),
+     &                    pttruetab(i,k2))
+          imax1 = min(cetruetab(i,Agrif_Procrank),
+     &                    cetruetab(i,k2))
+
+C Always send the most interior points
+
+           tochange = .false.
+           IF (cetruetab(i,Agrif_Procrank)> cetruetab(i,k2)) THEN
+
+           DO j=imin1,imax1
+             IF ((cetruetab(i,k2)-j) >
+     &             (j-pttruetab(i,Agrif_Procrank))) THEN
+             imintmp = j+1
+             tochange = .TRUE.
+             ELSE
+              EXIT
+             ENDIF
+          ENDDO
+          ENDIF
+
+           if (tochange) then
+C
+              pttruetab2(i,Agrif_Procrank) = imintmp
+C
+          endif
+
+           tochange = .FALSE.
+           imaxtmp=0
+           IF (pttruetab(i,Agrif_Procrank) < pttruetab(i,k2)) THEN
+          DO j=imax1,imin1,-1
+            IF ((j-pttruetab(i,k2)) >
+     &             (cetruetab(i,Agrif_Procrank)-j)) THEN
+             imaxtmp = j-1
+             tochange = .TRUE.
+            ELSE
+             EXIT
+            ENDIF
+          ENDDO
+
+          ENDIF
+
+                    if (tochange) then
+C
+              cetruetab2(i,Agrif_Procrank) = imaxtmp
+C
+          endif
+C
+
+          ENDIF
+           enddo
+         enddo
+
+
+       do k = 0,Agrif_NbProcs-1
+C
+        sendtoproc(k) = .true.
+C
+!CDIR SHORTLOOP
+        do i = 1,nbdim
+C
+          imin(i,k) = max(pttruetab2(i,Agrif_Procrank),
+     &                    pttruetabwhole(i,k))
+          imax(i,k) = min(cetruetab2(i,Agrif_Procrank),
+     &                    cetruetabwhole(i,k))
+C
+          if (imin(i,k) > imax(i,k)) then
+C
+              sendtoproc(k) = .false.
+C
+          endif
+C
+        enddo
+        IF (.NOT.memberoutall(k)) THEN
+           sendtoproc(k) = .FALSE.
+        ENDIF
+C
+      enddo
+      
+      Call Exchangesamelevel_first(sendtoproc,nbdim,imin,imax,
+     &     recvfromproc,imin_recv,imax_recv)
+      
+      End Subroutine Get_External_Data_first
+C
+      Subroutine Get_External_Data(tempC,tempCextend,pttruetab,
+     &   cetruetab,pttruetabwhole,cetruetabwhole,nbdim,memberin,
+     &   memberout,memberoutall1)
+
+      IMPLICIT NONE
+#include "mpif.h"
+      INTEGER :: nbdim
+      TYPE(Agrif_PVariable) :: tempC, tempCextend
+      INTEGER,DIMENSION(nbdim,0:Agrif_NbProcs-1)    :: pttruetab,
+     &                                                 cetruetab
+      INTEGER,DIMENSION(nbdim,0:Agrif_NbProcs-1)    :: pttruetabwhole,
+     &                                                 cetruetabwhole
+      INTEGER :: k,i,k2
+      LOGICAL :: sendtoproc(0:Agrif_Nbprocs-1)
+      INTEGER,DIMENSION(nbdim,0:Agrif_NbProcs-1)    :: imin,imax
+      LOGICAL :: memberin, memberout
+      INTEGER :: imintmp, imaxtmp,j,i1
+      INTEGER :: imin1,imax1
+      LOGICAL :: tochange,tochangebis
+      INTEGER,DIMENSION(nbdim,0:Agrif_NbProcs-1)    :: pttruetab2,
+     &                                                 cetruetab2
+      LOGICAL :: memberout1(1),memberoutall(0:Agrif_Nbprocs-1)
+      LOGICAL, OPTIONAL :: memberoutall1(0:Agrif_Nbprocs-1)
+      INTEGER :: code
+
+C pttruetab2 and cetruetab2 are modified arraysin order to always
+C send the most inner points
+
+        
+        IF (present(memberoutall1)) THEN
+        memberoutall = memberoutall1
+        ELSE
+         memberout1(1) = memberout
+
+         CALL MPI_ALLGATHER(memberout1,1,MPI_LOGICAL,memberoutall,
+     &                  1,MPI_LOGICAL,MPI_COMM_WORLD,code)
+        ENDIF
+         pttruetab2(:,Agrif_Procrank) = pttruetab(:,Agrif_Procrank)
+         cetruetab2(:,Agrif_Procrank) = cetruetab(:,Agrif_Procrank)
+         do k2=0,Agrif_Nbprocs-1
+            do i=1,nbdim
+
+           tochangebis=.TRUE.
+           DO i1=1,nbdim
+            IF (i .NE. i1) THEN
+              IF ((pttruetab(i1,Agrif_Procrank).NE.pttruetab(i1,k2)).OR.
+     &          (cetruetab(i1,Agrif_Procrank).NE.cetruetab(i1,k2))) THEN
+                   tochangebis = .FALSE.
+               EXIT
+              ENDIF
+             ENDIF
+           ENDDO
+
+           IF (tochangebis) THEN
+
+
+          imin1 = max(pttruetab(i,Agrif_Procrank),
+     &                    pttruetab(i,k2))
+          imax1 = min(cetruetab(i,Agrif_Procrank),
+     &                    cetruetab(i,k2))
+
+C Always send the most interior points
+
+           tochange = .false.
+           IF (cetruetab(i,Agrif_Procrank)> cetruetab(i,k2)) THEN
+
+           DO j=imin1,imax1
+             IF ((cetruetab(i,k2)-j) >
+     &             (j-pttruetab(i,Agrif_Procrank))) THEN
+             imintmp = j+1
+             tochange = .TRUE.
+             ELSE
+              EXIT
+             ENDIF
+          ENDDO
+          ENDIF
+
+           if (tochange) then
+C
+              pttruetab2(i,Agrif_Procrank) = imintmp
+C
+          endif
+
+           tochange = .FALSE.
+           imaxtmp=0
+           IF (pttruetab(i,Agrif_Procrank) < pttruetab(i,k2)) THEN
+          DO j=imax1,imin1,-1
+            IF ((j-pttruetab(i,k2)) >
+     &             (cetruetab(i,Agrif_Procrank)-j)) THEN
+             imaxtmp = j-1
+             tochange = .TRUE.
+            ELSE
+             EXIT
+            ENDIF
+          ENDDO
+
+          ENDIF
+
+                    if (tochange) then
+C
+              cetruetab2(i,Agrif_Procrank) = imaxtmp
+C
+          endif
+C
+
+          ENDIF
+           enddo
+         enddo
+
+
+       do k = 0,Agrif_NbProcs-1
+C
+        sendtoproc(k) = .true.
+C
+!CDIR SHORTLOOP
+        do i = 1,nbdim
+C
+          imin(i,k) = max(pttruetab2(i,Agrif_Procrank),
+     &                    pttruetabwhole(i,k))
+          imax(i,k) = min(cetruetab2(i,Agrif_Procrank),
+     &                    cetruetabwhole(i,k))
+C
+          if (imin(i,k) > imax(i,k)) then
+C
+              sendtoproc(k) = .false.
+C
+          endif
+C
+        enddo
+        IF (.NOT.memberoutall(k)) THEN
+           sendtoproc(k) = .FALSE.
+        ENDIF
+C
+      enddo
+
+
+c       IF (.NOT.memberin) sendtoproc = .FALSE.
+
+      IF (memberout) THEN
+      Call Agrif_nbdim_allocation(tempCextend%var,
+     &                 pttruetabwhole(:,Agrif_ProcRank),
+     &                 cetruetabwhole(:,Agrif_ProcRank),nbdim)
+      call Agrif_nbdim_Full_VarEQreal(tempCextend%var,0.,nbdim)
+      ENDIF
+
+      IF (sendtoproc(Agrif_ProcRank)) THEN
+           Call Agrif_nbdim_VarEQvar(tempCextend%var,
+     &                               imin(:,Agrif_Procrank),
+     &                               imax(:,Agrif_Procrank),
+     &                               tempC%var,
+     &                               imin(:,Agrif_Procrank),
+     &                               imax(:,Agrif_Procrank),
+     &                               nbdim)
+      ENDIF
+
+      Call Exchangesamelevel(sendtoproc,nbdim,imin,imax,tempC,
+     &     tempCextend)
+
+      End Subroutine Get_External_Data
+
+       Subroutine ExchangeSameLevel(sendtoproc,nbdim,imin,imax,
+     &          tempC,tempCextend)
+      Implicit None
+      INTEGER :: nbdim
+      INTEGER,DIMENSION(nbdim,0:Agrif_Nbprocs-1) :: imin,imax
+      INTEGER,DIMENSION(nbdim,2,0:Agrif_Nbprocs-1) :: iminmax_temp
+      INTEGER,DIMENSION(nbdim,0:Agrif_Nbprocs-1) :: imin_recv,imax_recv
+      TYPE(Agrif_PVARIABLE) :: tempC,tempCextend
+      LOGICAL,DIMENSION(0:Agrif_Nbprocs-1)       :: sendtoproc
+      LOGICAL,DIMENSION(0:Agrif_Nbprocs-1)       :: recvfromproc
+      LOGICAL                                    :: res
+      TYPE(AGRIF_PVARIABLE), SAVE                      :: temprecv
+
+#include "mpif.h"
+          INTEGER :: i,k
+          INTEGER :: etiquette = 100
+          INTEGER :: code, datasize
+          INTEGER,DIMENSION(MPI_STATUS_SIZE)   :: statut
+
+
+      do k = 0,Agrif_ProcRank-1
+C
+C
+            Call MPI_SEND(sendtoproc(k),1,MPI_LOGICAL,k,etiquette,
+     &                    MPI_COMM_WORLD,code)
+C
+            if (sendtoproc(k)) then
+C
+                iminmax_temp(:,1,k) = imin(:,k)
+                iminmax_temp(:,2,k) = imax(:,k)
+
+                Call MPI_SEND(iminmax_temp(:,:,k),
+     &                        2*nbdim,MPI_INTEGER,k,etiquette,
+     &                        MPI_COMM_WORLD,code)
+C
+                datasize = 1
+C
+!CDIR SHORTLOOP
+                do i = 1,nbdim
+C
+                  datasize = datasize * (imax(i,k)-imin(i,k)+1)
+C
+                enddo
+C
+                SELECT CASE(nbdim)
+                CASE(1)
+                   Call MPI_SEND(tempC%var%array1(
+     &                        imin(1,k):imax(1,k)),
+     &                        datasize,MPI_DOUBLE_PRECISION,k,etiquette,
+     &                        MPI_COMM_WORLD,code)
+                CASE(2)
+                   Call MPI_SEND(tempC%var%array2(
+     &                        imin(1,k):imax(1,k),
+     &                        imin(2,k):imax(2,k)),
+     &                        datasize,MPI_DOUBLE_PRECISION,k,etiquette,
+     &                        MPI_COMM_WORLD,code)
+                CASE(3)
+                
+                  Call Agrif_Send_3Darray(tempC%var%array3,
+     &             lbound(tempC%var%array3),imin(:,k),imax(:,k),k)
+                CASE(4)
+                   Call MPI_SEND(tempC%var%array4(
+     &                        imin(1,k):imax(1,k),
+     &                        imin(2,k):imax(2,k),
+     &                        imin(3,k):imax(3,k),
+     &                        imin(4,k):imax(4,k)),
+     &                        datasize,MPI_DOUBLE_PRECISION,k,etiquette,
+     &                        MPI_COMM_WORLD,code)
+                CASE(5)
+                   Call MPI_SEND(tempC%var%array5(
+     &                        imin(1,k):imax(1,k),
+     &                        imin(2,k):imax(2,k),
+     &                        imin(3,k):imax(3,k),
+     &                        imin(4,k):imax(4,k),
+     &                        imin(5,k):imax(5,k)),
+     &                        datasize,MPI_DOUBLE_PRECISION,k,etiquette,
+     &                        MPI_COMM_WORLD,code)
+                CASE(6)
+                   Call MPI_SEND(tempC%var%array6(
+     &                        imin(1,k):imax(1,k),
+     &                        imin(2,k):imax(2,k),
+     &                        imin(3,k):imax(3,k),
+     &                        imin(4,k):imax(4,k),
+     &                        imin(5,k):imax(5,k),
+     &                        imin(6,k):imax(6,k)),
+     &                        datasize,MPI_DOUBLE_PRECISION,k,etiquette,
+     &                        MPI_COMM_WORLD,code)
+                END SELECT
+C
+            endif
+
+C
+      enddo
+C
+C
+C     Reception from others processors of the necessary part of the parent grid
+      do k = Agrif_ProcRank+1,Agrif_Nbprocs-1
+C
+C
+            Call MPI_RECV(res,1,MPI_LOGICAL,k,etiquette,
+     &                    MPI_COMM_WORLD,statut,code)
+C
+            recvfromproc(k) = res
+
+C
+            if (recvfromproc(k)) then
+C
+                Call MPI_RECV(iminmax_temp(:,:,k),
+     &                        2*nbdim,MPI_INTEGER,k,etiquette,
+     &                        MPI_COMM_WORLD,statut,code)
+
+                imin_recv(:,k) = iminmax_temp(:,1,k)
+                imax_recv(:,k) = iminmax_temp(:,2,k)
+
+                datasize = 1
+C
+!CDIR SHORTLOOP
+                do i = 1,nbdim
+C
+                datasize = datasize * (imax_recv(i,k)-imin_recv(i,k)+1)
+C
+                enddo
+
+             IF (.Not.Associated(temprecv%var)) allocate(temprecv%var)
+             call Agrif_nbdim_allocation(temprecv%var,imin_recv(:,k),
+     &   imax_recv(:,k),nbdim)
+            SELECT CASE(nbdim)
+            CASE(1)
+              Call MPI_RECV(temprecv%var%array1,
+     &               datasize,MPI_DOUBLE_PRECISION,k,etiquette,
+     &               MPI_COMM_WORLD,statut,code)
+            CASE(2)
+              Call MPI_RECV(temprecv%var%array2,
+     &               datasize,MPI_DOUBLE_PRECISION,k,etiquette,
+     &               MPI_COMM_WORLD,statut,code)
+            CASE(3)
+              Call MPI_RECV(temprecv%var%array3,
+     &               datasize,MPI_DOUBLE_PRECISION,k,etiquette,
+     &               MPI_COMM_WORLD,statut,code)
+
+            CASE(4)
+              Call MPI_RECV(temprecv%var%array4,
+     &               datasize,MPI_DOUBLE_PRECISION,k,etiquette,
+     &               MPI_COMM_WORLD,statut,code)
+            CASE(5)
+              Call MPI_RECV(temprecv%var%array5,
+     &               datasize,MPI_DOUBLE_PRECISION,k,etiquette,
+     &               MPI_COMM_WORLD,statut,code)
+            CASE(6)
+              Call MPI_RECV(temprecv%var%array6,
+     &               datasize,MPI_DOUBLE_PRECISION,k,etiquette,
+     &               MPI_COMM_WORLD,statut,code)
+       END SELECT
+                        
+            Call where_valtabtotab_mpi(tempCextend%var,
+     &             temprecv%var,imin_recv(:,k),imax_recv(:,k),0.,nbdim)
+     
+                Call Agrif_nbdim_deallocation(temprecv%var,nbdim)
+C                deallocate(temprecv%var)
+
+            endif
+
+C
+      enddo
+
+C     Reception from others processors of the necessary part of the parent grid
+      do k = Agrif_ProcRank+1,Agrif_Nbprocs-1
+C
+C
+            
+            Call MPI_SEND(sendtoproc(k),1,MPI_LOGICAL,k,etiquette,
+     &                    MPI_COMM_WORLD,code)
+C
+            if (sendtoproc(k)) then
+C
+                iminmax_temp(:,1,k) = imin(:,k)
+                iminmax_temp(:,2,k) = imax(:,k)
+
+                Call MPI_SEND(iminmax_temp(:,:,k),
+     &                        2*nbdim,MPI_INTEGER,k,etiquette,
+     &                        MPI_COMM_WORLD,code)
+C
+                SELECT CASE(nbdim)
+                CASE(1)
+                datasize=SIZE(tempC%var%array1(
+     &                        imin(1,k):imax(1,k)))
+                   Call MPI_SEND(tempC%var%array1(
+     &                        imin(1,k):imax(1,k)),
+     &                        datasize,MPI_DOUBLE_PRECISION,k,etiquette,
+     &                        MPI_COMM_WORLD,code)
+                CASE(2)
+                datasize=SIZE(tempC%var%array2(
+     &                        imin(1,k):imax(1,k),
+     &                        imin(2,k):imax(2,k)))
+                   Call MPI_SEND(tempC%var%array2(
+     &                        imin(1,k):imax(1,k),
+     &                        imin(2,k):imax(2,k)),
+     &                        datasize,MPI_DOUBLE_PRECISION,k,etiquette,
+     &                        MPI_COMM_WORLD,code)
+                CASE(3)
+                datasize=SIZE(tempC%var%array3(
+     &                        imin(1,k):imax(1,k),
+     &                        imin(2,k):imax(2,k),
+     &                        imin(3,k):imax(3,k)))
+                   Call MPI_SEND(tempC%var%array3(
+     &                        imin(1,k):imax(1,k),
+     &                        imin(2,k):imax(2,k),
+     &                        imin(3,k):imax(3,k)),
+     &                        datasize,MPI_DOUBLE_PRECISION,k,etiquette,
+     &                        MPI_COMM_WORLD,code)
+                CASE(4)
+                datasize=SIZE(tempC%var%array4(
+     &                        imin(1,k):imax(1,k),
+     &                        imin(2,k):imax(2,k),
+     &                        imin(3,k):imax(3,k),
+     &                        imin(4,k):imax(4,k)))
+                   Call MPI_SEND(tempC%var%array4(
+     &                        imin(1,k):imax(1,k),
+     &                        imin(2,k):imax(2,k),
+     &                        imin(3,k):imax(3,k),
+     &                        imin(4,k):imax(4,k)),
+     &                        datasize,MPI_DOUBLE_PRECISION,k,etiquette,
+     &                        MPI_COMM_WORLD,code)
+                CASE(5)
+                datasize=SIZE(tempC%var%array5(
+     &                        imin(1,k):imax(1,k),
+     &                        imin(2,k):imax(2,k),
+     &                        imin(3,k):imax(3,k),
+     &                        imin(4,k):imax(4,k),
+     &                        imin(5,k):imax(5,k)))
+                   Call MPI_SEND(tempC%var%array5(
+     &                        imin(1,k):imax(1,k),
+     &                        imin(2,k):imax(2,k),
+     &                        imin(3,k):imax(3,k),
+     &                        imin(4,k):imax(4,k),
+     &                        imin(5,k):imax(5,k)),
+     &                        datasize,MPI_DOUBLE_PRECISION,k,etiquette,
+     &                        MPI_COMM_WORLD,code)
+                CASE(6)
+                datasize=SIZE(tempC%var%array6(
+     &                        imin(1,k):imax(1,k),
+     &                        imin(2,k):imax(2,k),
+     &                        imin(3,k):imax(3,k),
+     &                        imin(4,k):imax(4,k),
+     &                        imin(5,k):imax(5,k),
+     &                        imin(6,k):imax(6,k)))
+                   Call MPI_SEND(tempC%var%array6(
+     &                        imin(1,k):imax(1,k),
+     &                        imin(2,k):imax(2,k),
+     &                        imin(3,k):imax(3,k),
+     &                        imin(4,k):imax(4,k),
+     &                        imin(5,k):imax(5,k),
+     &                        imin(6,k):imax(6,k)),
+     &                        datasize,MPI_DOUBLE_PRECISION,k,etiquette,
+     &                        MPI_COMM_WORLD,code)
+                END SELECT
+C
+            endif
+
+C
+      enddo
+C
+C
+C     Reception from others processors of the necessary part of the parent grid
+      do k = Agrif_ProcRank-1,0,-1
+C
+C
+            Call MPI_RECV(res,1,MPI_LOGICAL,k,etiquette,
+     &                    MPI_COMM_WORLD,statut,code)
+C
+            recvfromproc(k) = res
+
+C
+            if (recvfromproc(k)) then
+C
+                Call MPI_RECV(iminmax_temp(:,:,k),
+     &                        2*nbdim,MPI_INTEGER,k,etiquette,
+     &                        MPI_COMM_WORLD,statut,code)
+
+C                imin_recv(:,k) = iminmax_temp(:,1,k)
+C                imax_recv(:,k) = iminmax_temp(:,2,k)
+
+C                datasize = 1
+C
+C                do i = 1,nbdim
+C
+C                datasize = datasize * (imax_recv(i,k)-imin_recv(i,k)+1)
+C
+C                enddo
+             IF (.Not.Associated(temprecv%var)) allocate(temprecv%var)
+             call Agrif_nbdim_allocation(temprecv%var,
+     &   iminmax_temp(:,1,k),iminmax_temp(:,2,k),nbdim)
+            SELECT CASE(nbdim)
+            CASE(1)
+              datasize=SIZE(temprecv%var%array1)
+              Call MPI_RECV(temprecv%var%array1,
+     &               datasize,MPI_DOUBLE_PRECISION,k,etiquette,
+     &               MPI_COMM_WORLD,statut,code)
+            CASE(2)
+              datasize=SIZE(temprecv%var%array2)
+              Call MPI_RECV(temprecv%var%array2,
+     &               datasize,MPI_DOUBLE_PRECISION,k,etiquette,
+     &               MPI_COMM_WORLD,statut,code)
+            CASE(3)
+              datasize=SIZE(temprecv%var%array3)
+              Call MPI_RECV(temprecv%var%array3,
+     &               datasize,MPI_DOUBLE_PRECISION,k,etiquette,
+     &               MPI_COMM_WORLD,statut,code)
+
+            CASE(4)
+              datasize=SIZE(temprecv%var%array4)
+              Call MPI_RECV(temprecv%var%array4,
+     &               datasize,MPI_DOUBLE_PRECISION,k,etiquette,
+     &               MPI_COMM_WORLD,statut,code)
+            CASE(5)
+              datasize=SIZE(temprecv%var%array5)
+              Call MPI_RECV(temprecv%var%array5,
+     &               datasize,MPI_DOUBLE_PRECISION,k,etiquette,
+     &               MPI_COMM_WORLD,statut,code)
+            CASE(6)
+              datasize=SIZE(temprecv%var%array6)
+              Call MPI_RECV(temprecv%var%array6,
+     &               datasize,MPI_DOUBLE_PRECISION,k,etiquette,
+     &               MPI_COMM_WORLD,statut,code)
+          END SELECT
+            
+            Call where_valtabtotab_mpi(tempCextend%var,
+     &             temprecv%var,iminmax_temp(:,1,k),iminmax_temp(:,2,k)
+     &            ,0.,nbdim)
+     
+                Call Agrif_nbdim_deallocation(temprecv%var,nbdim)
+C                deallocate(temprecv%var)
+            endif
+
+C
+      enddo
+
+          End Subroutine ExchangeSamelevel
+          
+       Subroutine ExchangeSameLevel_first(sendtoproc,nbdim,imin,imax,
+     &          recvfromproc,imin_recv,imax_recv)
+      Implicit None
+      INTEGER :: nbdim
+      INTEGER,DIMENSION(nbdim,0:Agrif_Nbprocs-1) :: imin,imax
+      INTEGER,DIMENSION(nbdim,2,0:Agrif_Nbprocs-1) :: iminmax_temp
+      INTEGER,DIMENSION(nbdim,0:Agrif_Nbprocs-1) :: imin_recv,imax_recv
+      LOGICAL,DIMENSION(0:Agrif_Nbprocs-1)       :: sendtoproc
+      LOGICAL,DIMENSION(0:Agrif_Nbprocs-1)       :: recvfromproc
+      LOGICAL                                    :: res
+
+#include "mpif.h"
+          INTEGER :: i,k
+          INTEGER :: etiquette = 100
+          INTEGER :: code, datasize
+          INTEGER,DIMENSION(MPI_STATUS_SIZE)   :: statut
+
+     
+      do k = 0,Agrif_ProcRank-1
+C
+C
+            Call MPI_SEND(sendtoproc(k),1,MPI_LOGICAL,k,etiquette,
+     &                    MPI_COMM_WORLD,code)
+C
+            if (sendtoproc(k)) then
+C
+                iminmax_temp(:,1,k) = imin(:,k)
+                iminmax_temp(:,2,k) = imax(:,k)
+
+                Call MPI_SEND(iminmax_temp(:,:,k),
+     &                        2*nbdim,MPI_INTEGER,k,etiquette,
+     &                        MPI_COMM_WORLD,code)
+C
+            endif
+
+C
+      enddo
+C
+C
+C     Reception from others processors of the necessary part of the parent grid
+      do k = Agrif_ProcRank+1,Agrif_Nbprocs-1
+C
+C
+            Call MPI_RECV(res,1,MPI_LOGICAL,k,etiquette,
+     &                    MPI_COMM_WORLD,statut,code)
+C
+            recvfromproc(k) = res
+
+C
+            if (recvfromproc(k)) then
+C
+                Call MPI_RECV(iminmax_temp(:,:,k),
+     &                        2*nbdim,MPI_INTEGER,k,etiquette,
+     &                        MPI_COMM_WORLD,statut,code)
+
+                imin_recv(:,k) = iminmax_temp(:,1,k)
+                imax_recv(:,k) = iminmax_temp(:,2,k)
+            endif
+
+C
+      enddo
+
+C     Reception from others processors of the necessary part of the parent grid
+      do k = Agrif_ProcRank+1,Agrif_Nbprocs-1
+C
+C
+            
+            Call MPI_SEND(sendtoproc(k),1,MPI_LOGICAL,k,etiquette,
+     &                    MPI_COMM_WORLD,code)
+C
+            if (sendtoproc(k)) then
+C
+                iminmax_temp(:,1,k) = imin(:,k)
+                iminmax_temp(:,2,k) = imax(:,k)
+
+                Call MPI_SEND(iminmax_temp(:,:,k),
+     &                        2*nbdim,MPI_INTEGER,k,etiquette,
+     &                        MPI_COMM_WORLD,code)
+C
+            endif
+
+C
+      enddo
+C
+C
+C     Reception from others processors of the necessary part of the parent grid
+      do k = Agrif_ProcRank-1,0,-1
+C
+C
+            Call MPI_RECV(res,1,MPI_LOGICAL,k,etiquette,
+     &                    MPI_COMM_WORLD,statut,code)
+C
+            recvfromproc(k) = res
+
+C
+            if (recvfromproc(k)) then
+C
+                Call MPI_RECV(iminmax_temp(:,:,k),
+     &                        2*nbdim,MPI_INTEGER,k,etiquette,
+     &                        MPI_COMM_WORLD,statut,code)
+
+                imin_recv(:,k) = iminmax_temp(:,1,k)
+                imax_recv(:,k) = iminmax_temp(:,2,k)
+            endif
+
+C
+      enddo
+
+          End Subroutine ExchangeSamelevel_first          
+
+       Subroutine ExchangeSameLevel2(sendtoproc,recvfromproc,
+     &   nbdim,
+     &          pttruetabwhole,cetruetabwhole,imin,imax,
+     &          imin_recv,imax_recv,memberout,tempC,tempCextend)
+      Implicit None
+      INTEGER :: nbdim
+      INTEGER,DIMENSION(nbdim,0:Agrif_Nbprocs-1) :: imin,imax
+      INTEGER,DIMENSION(nbdim,0:Agrif_Nbprocs-1) :: pttruetabwhole,
+     &     cetruetabwhole
+      INTEGER,DIMENSION(nbdim,0:Agrif_Nbprocs-1) :: imin_recv,imax_recv
+      TYPE(Agrif_PVARIABLE) :: tempC,tempCextend
+      LOGICAL,DIMENSION(0:Agrif_Nbprocs-1)       :: sendtoproc
+      LOGICAL,DIMENSION(0:Agrif_Nbprocs-1)       :: recvfromproc
+      LOGICAL                                    :: res
+      LOGICAL :: memberout
+      TYPE(AGRIF_PVARIABLE), SAVE                      :: temprecv
+
+#include "mpif.h"
+          INTEGER :: i,k
+          INTEGER :: etiquette = 100
+          INTEGER :: code, datasize
+          INTEGER,DIMENSION(MPI_STATUS_SIZE)   :: statut
+
+      IF (memberout) THEN
+      Call Agrif_nbdim_allocation(tempCextend%var,
+     &                 pttruetabwhole(:,Agrif_ProcRank),
+     &                 cetruetabwhole(:,Agrif_ProcRank),nbdim)
+      call Agrif_nbdim_Full_VarEQreal(tempCextend%var,0.,nbdim)
+      ENDIF
+
+      IF (sendtoproc(Agrif_ProcRank)) THEN
+           Call Agrif_nbdim_VarEQvar(tempCextend%var,
+     &                               imin(:,Agrif_Procrank),
+     &                               imax(:,Agrif_Procrank),
+     &                               tempC%var,
+     &                               imin(:,Agrif_Procrank),
+     &                               imax(:,Agrif_Procrank),
+     &                               nbdim)
+      ENDIF
+
+      do k = 0,Agrif_ProcRank-1
+C
+C
+C
+            if (sendtoproc(k)) then
+C
+                datasize = 1
+C
+!CDIR SHORTLOOP
+                do i = 1,nbdim
+C
+                  datasize = datasize * (imax(i,k)-imin(i,k)+1)
+C
+                enddo
+C
+
+                SELECT CASE(nbdim)
+                CASE(1)
+                   Call MPI_SEND(tempC%var%array1(
+     &                        imin(1,k):imax(1,k)),
+     &                        datasize,MPI_DOUBLE_PRECISION,k,etiquette,
+     &                        MPI_COMM_WORLD,code)
+                CASE(2)               
+                   Call MPI_SEND(tempC%var%array2(
+     &                        imin(1,k):imax(1,k),
+     &                        imin(2,k):imax(2,k)),
+     &                        datasize,MPI_DOUBLE_PRECISION,k,etiquette,
+     &                        MPI_COMM_WORLD,code)
+                CASE(3)
+     
+                  Call Agrif_Send_3Darray(tempC%var%array3,
+     &             lbound(tempC%var%array3),imin(:,k),imax(:,k),k)
+                CASE(4)
+                   Call MPI_SEND(tempC%var%array4(
+     &                        imin(1,k):imax(1,k),
+     &                        imin(2,k):imax(2,k),
+     &                        imin(3,k):imax(3,k),
+     &                        imin(4,k):imax(4,k)),
+     &                        datasize,MPI_DOUBLE_PRECISION,k,etiquette,
+     &                        MPI_COMM_WORLD,code)
+                CASE(5)
+                   Call MPI_SEND(tempC%var%array5(
+     &                        imin(1,k):imax(1,k),
+     &                        imin(2,k):imax(2,k),
+     &                        imin(3,k):imax(3,k),
+     &                        imin(4,k):imax(4,k),
+     &                        imin(5,k):imax(5,k)),
+     &                        datasize,MPI_DOUBLE_PRECISION,k,etiquette,
+     &                        MPI_COMM_WORLD,code)
+                CASE(6)
+                   Call MPI_SEND(tempC%var%array6(
+     &                        imin(1,k):imax(1,k),
+     &                        imin(2,k):imax(2,k),
+     &                        imin(3,k):imax(3,k),
+     &                        imin(4,k):imax(4,k),
+     &                        imin(5,k):imax(5,k),
+     &                        imin(6,k):imax(6,k)),
+     &                        datasize,MPI_DOUBLE_PRECISION,k,etiquette,
+     &                        MPI_COMM_WORLD,code)
+                END SELECT
+C
+            endif
+
+C
+      enddo
+C
+C
+C     Reception from others processors of the necessary part of the parent grid
+      do k = Agrif_ProcRank+1,Agrif_Nbprocs-1
+
+C
+            if (recvfromproc(k)) then
+
+                datasize = 1
+C
+!CDIR SHORTLOOP
+                do i = 1,nbdim
+C
+                datasize = datasize * (imax_recv(i,k)-imin_recv(i,k)+1)
+C
+                enddo
+
+             IF (.Not.Associated(temprecv%var)) allocate(temprecv%var)
+             call Agrif_nbdim_allocation(temprecv%var,imin_recv(:,k),
+     &   imax_recv(:,k),nbdim)
+            SELECT CASE(nbdim)
+            CASE(1)
+              Call MPI_RECV(temprecv%var%array1,
+     &               datasize,MPI_DOUBLE_PRECISION,k,etiquette,
+     &               MPI_COMM_WORLD,statut,code)
+            CASE(2)           
+              Call MPI_RECV(temprecv%var%array2,
+     &               datasize,MPI_DOUBLE_PRECISION,k,etiquette,
+     &               MPI_COMM_WORLD,statut,code)
+            CASE(3)       
+              Call MPI_RECV(temprecv%var%array3,
+     &               datasize,MPI_DOUBLE_PRECISION,k,etiquette,
+     &               MPI_COMM_WORLD,statut,code)
+
+            CASE(4)
+              Call MPI_RECV(temprecv%var%array4,
+     &               datasize,MPI_DOUBLE_PRECISION,k,etiquette,
+     &               MPI_COMM_WORLD,statut,code)
+            CASE(5)
+              Call MPI_RECV(temprecv%var%array5,
+     &               datasize,MPI_DOUBLE_PRECISION,k,etiquette,
+     &               MPI_COMM_WORLD,statut,code)
+            CASE(6)
+              Call MPI_RECV(temprecv%var%array6,
+     &               datasize,MPI_DOUBLE_PRECISION,k,etiquette,
+     &               MPI_COMM_WORLD,statut,code)
+       END SELECT
+                        
+            Call where_valtabtotab_mpi(tempCextend%var,
+     &             temprecv%var,imin_recv(:,k),imax_recv(:,k),0.,nbdim)
+     
+                Call Agrif_nbdim_deallocation(temprecv%var,nbdim)
+C                deallocate(temprecv%var)
+
+            endif
+
+C
+      enddo
+
+C     Reception from others processors of the necessary part of the parent grid
+      do k = Agrif_ProcRank+1,Agrif_Nbprocs-1
+C
+C
+            if (sendtoproc(k)) then
+C
+                SELECT CASE(nbdim)
+                CASE(1)
+                datasize=SIZE(tempC%var%array1(
+     &                        imin(1,k):imax(1,k)))
+                   Call MPI_SEND(tempC%var%array1(
+     &                        imin(1,k):imax(1,k)),
+     &                        datasize,MPI_DOUBLE_PRECISION,k,etiquette,
+     &                        MPI_COMM_WORLD,code)
+                CASE(2)                
+                datasize=SIZE(tempC%var%array2(
+     &                        imin(1,k):imax(1,k),
+     &                        imin(2,k):imax(2,k)))
+                   Call MPI_SEND(tempC%var%array2(
+     &                        imin(1,k):imax(1,k),
+     &                        imin(2,k):imax(2,k)),
+     &                        datasize,MPI_DOUBLE_PRECISION,k,etiquette,
+     &                        MPI_COMM_WORLD,code)
+                CASE(3)
+                datasize=SIZE(tempC%var%array3(
+     &                        imin(1,k):imax(1,k),
+     &                        imin(2,k):imax(2,k),
+     &                        imin(3,k):imax(3,k)))
+                   Call MPI_SEND(tempC%var%array3(
+     &                        imin(1,k):imax(1,k),
+     &                        imin(2,k):imax(2,k),
+     &                        imin(3,k):imax(3,k)),
+     &                        datasize,MPI_DOUBLE_PRECISION,k,etiquette,
+     &                        MPI_COMM_WORLD,code)
+                CASE(4)
+                datasize=SIZE(tempC%var%array4(
+     &                        imin(1,k):imax(1,k),
+     &                        imin(2,k):imax(2,k),
+     &                        imin(3,k):imax(3,k),
+     &                        imin(4,k):imax(4,k)))
+                   Call MPI_SEND(tempC%var%array4(
+     &                        imin(1,k):imax(1,k),
+     &                        imin(2,k):imax(2,k),
+     &                        imin(3,k):imax(3,k),
+     &                        imin(4,k):imax(4,k)),
+     &                        datasize,MPI_DOUBLE_PRECISION,k,etiquette,
+     &                        MPI_COMM_WORLD,code)
+                CASE(5)
+                datasize=SIZE(tempC%var%array5(
+     &                        imin(1,k):imax(1,k),
+     &                        imin(2,k):imax(2,k),
+     &                        imin(3,k):imax(3,k),
+     &                        imin(4,k):imax(4,k),
+     &                        imin(5,k):imax(5,k)))
+                   Call MPI_SEND(tempC%var%array5(
+     &                        imin(1,k):imax(1,k),
+     &                        imin(2,k):imax(2,k),
+     &                        imin(3,k):imax(3,k),
+     &                        imin(4,k):imax(4,k),
+     &                        imin(5,k):imax(5,k)),
+     &                        datasize,MPI_DOUBLE_PRECISION,k,etiquette,
+     &                        MPI_COMM_WORLD,code)
+                CASE(6)
+                datasize=SIZE(tempC%var%array6(
+     &                        imin(1,k):imax(1,k),
+     &                        imin(2,k):imax(2,k),
+     &                        imin(3,k):imax(3,k),
+     &                        imin(4,k):imax(4,k),
+     &                        imin(5,k):imax(5,k),
+     &                        imin(6,k):imax(6,k)))
+                   Call MPI_SEND(tempC%var%array6(
+     &                        imin(1,k):imax(1,k),
+     &                        imin(2,k):imax(2,k),
+     &                        imin(3,k):imax(3,k),
+     &                        imin(4,k):imax(4,k),
+     &                        imin(5,k):imax(5,k),
+     &                        imin(6,k):imax(6,k)),
+     &                        datasize,MPI_DOUBLE_PRECISION,k,etiquette,
+     &                        MPI_COMM_WORLD,code)
+                END SELECT
+C
+            endif
+
+C
+      enddo
+C
+C
+C     Reception from others processors of the necessary part of the parent grid
+      do k = Agrif_ProcRank-1,0,-1
+C
+
+C
+            if (recvfromproc(k)) then
+C
+             IF (.Not.Associated(temprecv%var)) allocate(temprecv%var)
+             call Agrif_nbdim_allocation(temprecv%var,
+     &   imin_recv(:,k),imax_recv(:,k),nbdim)
+            SELECT CASE(nbdim)
+            CASE(1)
+              datasize=SIZE(temprecv%var%array1)
+              Call MPI_RECV(temprecv%var%array1,
+     &               datasize,MPI_DOUBLE_PRECISION,k,etiquette,
+     &               MPI_COMM_WORLD,statut,code)
+            CASE(2)           
+              datasize=SIZE(temprecv%var%array2)
+              Call MPI_RECV(temprecv%var%array2,
+     &               datasize,MPI_DOUBLE_PRECISION,k,etiquette,
+     &               MPI_COMM_WORLD,statut,code)
+            CASE(3)           
+              datasize=SIZE(temprecv%var%array3)
+              Call MPI_RECV(temprecv%var%array3,
+     &               datasize,MPI_DOUBLE_PRECISION,k,etiquette,
+     &               MPI_COMM_WORLD,statut,code)
+
+            CASE(4)
+              datasize=SIZE(temprecv%var%array4)
+              Call MPI_RECV(temprecv%var%array4,
+     &               datasize,MPI_DOUBLE_PRECISION,k,etiquette,
+     &               MPI_COMM_WORLD,statut,code)
+            CASE(5)
+              datasize=SIZE(temprecv%var%array5)
+              Call MPI_RECV(temprecv%var%array5,
+     &               datasize,MPI_DOUBLE_PRECISION,k,etiquette,
+     &               MPI_COMM_WORLD,statut,code)
+            CASE(6)
+              datasize=SIZE(temprecv%var%array6)
+              Call MPI_RECV(temprecv%var%array6,
+     &               datasize,MPI_DOUBLE_PRECISION,k,etiquette,
+     &               MPI_COMM_WORLD,statut,code)
+          END SELECT
+            
+            Call where_valtabtotab_mpi(tempCextend%var,
+     &             temprecv%var,imin_recv(:,k),imax_recv(:,k)
+     &            ,0.,nbdim)
+     
+                Call Agrif_nbdim_deallocation(temprecv%var,nbdim)
+C                deallocate(temprecv%var)
+            endif
+
+C
+      enddo
+                  
+          End Subroutine ExchangeSamelevel2
+          
+          Subroutine Agrif_Send_3Darray(tab3D,bounds,imin,imax,k)
+          integer, dimension(3) :: bounds, imin, imax
+          real,dimension(bounds(1):,bounds(2):,bounds(3):),target
+     &                             :: tab3D
+          integer :: k
+          integer :: etiquette = 100
+          integer :: datasize, code
+#include "mpif.h"   
+
+          datasize = SIZE(tab3D(
+     &                       imin(1):imax(1),
+     &                        imin(2):imax(2),
+     &                        imin(3):imax(3)))
+       
+                   Call MPI_SEND(tab3D(
+     &                        imin(1):imax(1),
+     &                        imin(2):imax(2),
+     &                        imin(3):imax(3)),
+     &                        datasize,MPI_DOUBLE_PRECISION,k,etiquette,
+     &                        MPI_COMM_WORLD,code)
+     
+         End Subroutine Agrif_Send_3Darray
+
+#else
+      Subroutine Agrif_mpp_empty()
+      End Subroutine Agrif_mpp_empty
+#endif
+
+      End Module Agrif_mpp
Index: vendors/AGRIF/r_01/AGRIF_FILES/modsauv.F
===================================================================
--- vendors/AGRIF/r_01/AGRIF_FILES/modsauv.F	(revision 2672)
+++ vendors/AGRIF/r_01/AGRIF_FILES/modsauv.F	(revision 2672)
@@ -0,0 +1,937 @@
+!
+! $Id: modsauv.F 662 2007-05-25 15:58:52Z opalod $
+!
+C     AGRIF (Adaptive Grid Refinement In Fortran)
+C
+C     Copyright (C) 2003 Laurent Debreu (Laurent.Debreu@imag.fr)
+C                        Christophe Vouland (Christophe.Vouland@imag.fr)    
+C
+C     This program is free software; you can redistribute it and/or modify
+C     it under the terms of the GNU General Public License as published by
+C     the Free Software Foundation; either version 2 of the License, or
+C     (at your option) any later version.
+C
+C     This program is distributed in the hope that it will be useful,
+C     but WITHOUT ANY WARRANTY; without even the implied warranty of
+C     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+C     GNU General Public License for more details.
+C
+C     You should have received a copy of the GNU General Public License
+C     along with this program; if not, write to the Free Software
+C     Foundation, Inc., 59 Temple Place- Suite 330, Boston, MA 02111-1307, USA.
+C
+C
+C
+CCC   Module Agrif_Save  
+C
+      Module Agrif_Save 
+C
+CCC   Description:   
+CCC   Module for the initialization by copy of the grids created by clustering.
+C
+C     Modules used:
+C      
+      Use Agrif_Types
+      Use Agrif_Link
+      Use Agrif_Arrays
+      Use Agrif_Variables
+C
+      IMPLICIT NONE
+C
+      Contains
+C     Definition of procedures contained in this module.
+C
+C
+      Subroutine Agrif_Deallocate_Arrays(Var)
+      type(Agrif_Variable), pointer :: Var
+      
+            if (ALLOCATED(var%array1)) then
+               Deallocate(var%array1)
+            endif
+            if (ALLOCATED(var%array2)) then
+               Deallocate(var%array2)
+            endif
+            if (ALLOCATED(var%array3)) then
+               Deallocate(var%array3)
+            endif
+            if (ALLOCATED(var%array4)) then
+               Deallocate(var%array4)
+            endif
+            if (ALLOCATED(var%array5)) then
+               Deallocate(var%array5)
+            endif
+            if (ALLOCATED(var%array6)) then
+               Deallocate(var%array6)
+            endif
+C
+            if (ALLOCATED(var%darray1)) then
+               Deallocate(var%darray1)
+            endif
+            if (ALLOCATED(var%darray2)) then
+               Deallocate(var%darray2)
+            endif
+            if (ALLOCATED(var%darray3)) then
+               Deallocate(var%darray3)
+            endif
+            if (ALLOCATED(var%darray4)) then
+               Deallocate(var%darray4)
+            endif
+            if (ALLOCATED(var%darray5)) then
+               Deallocate(var%darray5)
+            endif
+            if (ALLOCATED(var%darray6)) then
+               Deallocate(var%darray6)
+            endif
+C
+            if (ALLOCATED(var%larray1)) then
+               Deallocate(var%larray1)
+            endif
+            if (ALLOCATED(var%larray2)) then
+               Deallocate(var%larray2)
+            endif
+            if (ALLOCATED(var%larray3)) then
+               Deallocate(var%larray3)
+            endif
+            if (ALLOCATED(var%larray4)) then
+               Deallocate(var%larray4)
+            endif
+            if (ALLOCATED(var%larray5)) then
+               Deallocate(var%larray5)
+            endif
+            if (ALLOCATED(var%larray6)) then
+               Deallocate(var%larray6)
+            endif
+C
+            if (ALLOCATED(var%iarray1)) then
+               Deallocate(var%iarray1)
+            endif
+            if (ALLOCATED(var%iarray2)) then
+               Deallocate(var%iarray2)
+            endif
+            if (ALLOCATED(var%iarray3)) then
+               Deallocate(var%iarray3)
+            endif
+            if (ALLOCATED(var%iarray4)) then
+               Deallocate(var%iarray4)
+            endif
+            if (ALLOCATED(var%iarray5)) then
+               Deallocate(var%iarray5)
+            endif
+            if (ALLOCATED(var%iarray6)) then
+               Deallocate(var%iarray6)
+            endif
+C
+            if (ALLOCATED(var%carray1)) then
+               Deallocate(var%carray1)
+            endif
+            if (ALLOCATED(var%carray2)) then
+               Deallocate(var%carray2)
+            endif
+C
+            if (associated(var%oldvalues2D)) then
+               Deallocate(var%oldvalues2D)
+            endif
+            if (associated(var%interpIndex)) then
+               Deallocate(var%interpIndex)
+            endif
+            
+            if (associated(var%posvar)) then
+               Deallocate(var%posvar)
+            endif     
+            
+            if (associated(var%interptab)) then
+               Deallocate(var%interptab)
+            endif
+            
+      Return
+      End Subroutine Agrif_Deallocate_Arrays    
+C
+C     **************************************************************************
+CCC   Subroutine Agrif_Free_data_before
+C     **************************************************************************
+C
+      Subroutine Agrif_Free_data_before(Agrif_Gr)
+C
+CCC   Description:
+CCC   
+C
+CC    Method:
+CC            
+C
+C     Declarations:
+C
+      
+C      
+C     Pointer argument    
+      TYPE(Agrif_Grid),pointer   :: Agrif_Gr ! Pointer on the current grid
+      INTEGER i 
+      Type(Agrif_List_Variables), pointer :: parcours      
+C
+C   
+      do i = 1 , AGRIF_NbVariables
+         if ( .NOT. Agrif_Mygrid % tabvars(i) % var % restaure) then
+C 
+            call Agrif_Deallocate_Arrays(Agrif_Gr%tabvars(i)%var)
+            
+          endif
+           
+C
+         if (associated(Agrif_Gr%tabvars(i)%var%list_interp)) then
+           Call Agrif_Free_list_interp
+     &                          (Agrif_Gr%tabvars(i)%var%list_interp)
+         endif                             
+C
+       if ( .NOT. Agrif_Mygrid % tabvars(i) % var % restaure) then
+            Deallocate(Agrif_Gr%tabvars(i)%var)
+C 
+        endif
+      enddo
+      
+      parcours => Agrif_Gr%variables
+    
+      do i=1,Agrif_Gr%NbVariables
+       if (.NOT. parcours%pvar%var%root_var%restaure) then
+        call Agrif_Deallocate_Arrays(parcours%pvar%var)
+       endif
+        if (associated(parcours%pvar%var%list_interp)) then
+           Call Agrif_Free_list_interp
+     &                          (parcours%pvar%var%list_interp)
+         endif                             
+C
+       if ( .NOT. parcours%pvar%var%root_var % restaure) then
+            Deallocate(parcours%pvar%var)
+C 
+        endif
+        parcours => parcours%nextvariable
+      enddo
+C
+C 
+C
+      if ( Agrif_USE_ONLY_FIXED_GRIDS .EQ. 0 ) then
+         if ( Agrif_Probdim .EQ. 1 ) Deallocate(Agrif_Gr%tabpoint1D)
+         if ( Agrif_Probdim .EQ. 2 ) Deallocate(Agrif_Gr%tabpoint2D)
+         if ( Agrif_Probdim .EQ. 3 ) Deallocate(Agrif_Gr%tabpoint3D)
+      endif
+C          
+      Return
+C
+C
+      End Subroutine Agrif_Free_data_before
+C
+C
+      Recursive Subroutine Agrif_Free_list_interp(list_interp)
+      TYPE(Agrif_List_Interp_Loc), Pointer :: list_interp
+      
+      if (associated(list_interp%suiv))
+     &      Call Agrif_Free_list_interp(list_interp%suiv)
+     
+#ifdef AGRIF_MPI
+       Deallocate(list_interp%interp_loc%tab4t)
+       Deallocate(list_interp%interp_loc%memberinall)
+       Deallocate(list_interp%interp_loc%sendtoproc1)
+       Deallocate(list_interp%interp_loc%recvfromproc1)
+#endif
+       Deallocate(list_interp%interp_loc)
+       Deallocate(list_interp)
+       Nullify(list_interp)
+
+      End Subroutine Agrif_Free_list_interp      
+C
+C     **************************************************************************
+CCC   Subroutine Agrif_Free_data_after
+C     **************************************************************************
+C      
+      Subroutine Agrif_Free_data_after(Agrif_Gr)
+C
+CCC   Description:
+CCC   
+C
+CC    Method:
+CC            
+C
+C     Declarations:
+C
+C
+      
+C
+C     Pointer argument    
+      TYPE(Agrif_Grid),pointer   :: Agrif_Gr  ! Pointer on the current grid
+      INTEGER i
+      Type(Agrif_List_Variables), pointer :: parcours, rootparcours
+C
+C      
+      do i = 1 , AGRIF_NbVariables
+         if ( Agrif_Mygrid % tabvars(i) % var % restaure) then
+         
+         call Agrif_Deallocate_Arrays(Agrif_Gr%tabvars(i)%var)
+         !
+            Deallocate(Agrif_Gr%tabvars(i)%var)
+! 
+         endif
+      enddo
+      
+      parcours => Agrif_Gr%variables
+      rootparcours=>Agrif_Mygrid%variables
+    
+      do i=1,Agrif_Gr%NbVariables
+       if (rootparcours%pvar%var%restaure) then
+        call Agrif_Deallocate_Arrays(parcours%pvar%var)
+      
+            Deallocate(parcours%pvar%var)
+C 
+        endif
+        parcours => parcours%nextvariable
+        rootparcours => rootparcours%nextvariable        
+      enddo
+            
+C
+C      
+      Return
+C
+C
+      End Subroutine Agrif_Free_data_after      
+C
+C
+CC    **************************************************************************
+CCC   Subroutine AGRIF_CopyFromold_All
+C     **************************************************************************
+C
+      Recursive Subroutine AGRIF_CopyFromold_All(g,oldchildgrids)
+C
+CCC   Description:
+CCC   Routine called in the Agrif_Init_Hierarchy procedure 
+C       (Agrif_Clustering module). 
+C
+CC    Method:        
+C
+C     Declarations:
+C
+      
+C      
+C     Pointer argument    
+      TYPE(AGRIF_grid),pointer   :: g ! Pointer on the current grid
+      TYPE(AGRIF_pgrid),pointer   :: oldchildgrids
+C
+C     Local pointer
+      TYPE(AGRIF_pgrid),pointer  :: parcours ! Pointer for the recursive 
+                                             ! procedure 
+      REAL g_eps,eps,oldgrid_eps
+      INTEGER :: out
+      INTEGER :: iii
+C
+      out = 0
+C                                                                           
+      parcours => oldchildgrids  
+C
+      do while (associated(parcours))
+C 
+        if ((.NOT. g % fixed) .AND. (parcours % gr %oldgrid)) then
+C        
+            g_eps = huge(1.)
+            oldgrid_eps = huge(1.)
+            do iii = 1 , Agrif_Probdim
+               g_eps = min(g_eps,g % Agrif_d(iii))
+               oldgrid_eps = min(oldgrid_eps,
+     &                       parcours % gr % Agrif_d(iii))
+            enddo
+C
+            eps = min(g_eps,oldgrid_eps)/100.                  
+C
+            do iii = 1 , Agrif_Probdim
+
+               if (g % Agrif_d(iii) .LT. 
+     &             (parcours % gr % Agrif_d(iii) - eps)) then
+C            
+                   parcours => parcours % next
+C            
+                   out = 1
+C   
+                   Exit
+C             
+               endif
+C      
+            enddo
+        if ( out .EQ. 1 ) Cycle
+C
+            Call AGRIF_CopyFromOld(g,parcours%gr)
+C
+        endif
+C                     
+        Call Agrif_CopyFromold_All
+     &             (g, parcours % gr % child_grids)
+C        
+        parcours => parcours % next
+C        
+      enddo
+C
+C     
+      Return      
+C
+C
+      End Subroutine AGRIF_CopyFromold_All
+C
+C
+C      
+C     **************************************************************************
+CCC   Subroutine Agrif_CopyFromold
+C     **************************************************************************
+C      
+      Subroutine Agrif_CopyFromold(Agrif_New_Gr,Agrif_Old_Gr)
+C
+CCC   Description:
+CCC   Call to the Agrif_Copy procedure.
+C
+CC    Method:
+CC            
+C
+C     Declarations:
+C
+      
+C      
+C     Pointer argument    
+      TYPE(Agrif_Grid),Pointer   :: Agrif_New_Gr  ! Pointer on the current grid
+      TYPE(Agrif_Grid),Pointer :: Agrif_Old_Gr    ! Pointer on an old grid
+      INTEGER :: i
+C
+C      
+      do i = 1 , AGRIF_NbVariables
+         if ( Agrif_Mygrid % tabvars(i) % var % restaure ) then
+C
+            Call Agrif_Copy(Agrif_New_Gr,Agrif_Old_Gr,
+     &           Agrif_New_Gr % tabvars(i),
+     &           Agrif_Old_Gr % tabvars(i))
+C
+        endif
+      enddo
+
+C      
+C            
+      Return
+C
+C      
+      End Subroutine Agrif_CopyFromold
+      
+CC    **************************************************************************
+CCC   Subroutine AGRIF_CopyFromold_AllOneVar
+C     **************************************************************************
+C
+      Recursive Subroutine AGRIF_CopyFromold_AllOneVar(g,oldchildgrids,
+     &   indic)
+C
+CCC   Description:
+CCC   Routine called in the Agrif_Init_Hierarchy procedure 
+C       (Agrif_Clustering module). 
+C
+CC    Method:        
+C
+C     Declarations:
+C
+      
+C      
+C     Pointer argument    
+      TYPE(AGRIF_grid),pointer   :: g ! Pointer on the current grid
+      TYPE(AGRIF_pgrid),pointer   :: oldchildgrids
+      integer :: indic
+C
+C     Local pointer
+      TYPE(AGRIF_pgrid),pointer  :: parcours ! Pointer for the recursive 
+                                             ! procedure 
+      REAL g_eps,eps,oldgrid_eps
+      INTEGER :: out
+      INTEGER :: iii
+C
+      out = 0
+C                                                                           
+      parcours => oldchildgrids  
+C
+      do while (associated(parcours))
+C 
+        if ((.NOT. g % fixed) .AND. (parcours % gr %oldgrid)) then
+C        
+            g_eps = huge(1.)
+            oldgrid_eps = huge(1.)
+            do iii = 1 , Agrif_Probdim
+               g_eps = min(g_eps,g % Agrif_d(iii))
+               oldgrid_eps = min(oldgrid_eps,
+     &                       parcours % gr % Agrif_d(iii))
+            enddo
+C
+            eps = min(g_eps,oldgrid_eps)/100.                  
+C
+            do iii = 1 , Agrif_Probdim
+
+               if (g % Agrif_d(iii) .LT. 
+     &             (parcours % gr % Agrif_d(iii) - eps)) then
+C            
+                   parcours => parcours % next
+C            
+                   out = 1
+C   
+                   Exit
+C             
+               endif
+C      
+            enddo
+        if ( out .EQ. 1 ) Cycle
+C
+            Call AGRIF_CopyFromOldOneVar(g,parcours%gr,indic)
+C
+        endif
+C                     
+        Call Agrif_CopyFromold_AllOneVar
+     &             (g, parcours % gr % child_grids,indic)
+C        
+        parcours => parcours % next
+C        
+      enddo
+C
+C     
+      Return      
+C
+C
+      End Subroutine AGRIF_CopyFromold_AllOneVar
+C
+C
+C      
+C     **************************************************************************
+CCC   Subroutine Agrif_CopyFromoldOneVar
+C     **************************************************************************
+C      
+      Subroutine Agrif_CopyFromoldOneVar(Agrif_New_Gr,Agrif_Old_Gr,
+     &    indic)
+C
+CCC   Description:
+CCC   Call to the Agrif_Copy procedure.
+C
+CC    Method:
+CC            
+C
+C     Declarations:
+C
+      
+C      
+C     Pointer argument    
+      TYPE(Agrif_Grid),Pointer   :: Agrif_New_Gr  ! Pointer on the current grid
+      TYPE(Agrif_Grid),Pointer :: Agrif_Old_Gr    ! Pointer on an old grid
+      INTEGER :: indic
+      INTEGER :: i
+      TYPE(Agrif_PVariable),Pointer ::tabvars,oldtabvars      
+C
+C      
+      tabvars => Agrif_Search_Variable(Agrif_New_Gr,-indic)
+      oldtabvars => Agrif_Search_Variable(Agrif_Old_Gr,-indic)
+
+      Call Agrif_Nbdim_Allocation(tabvars%var,
+     &  tabvars%var%lb,tabvars%var%ub,
+     &  tabvars%var%nbdim)
+     
+      Call Agrif_Copy(Agrif_New_Gr,Agrif_Old_Gr,
+     &           tabvars,oldtabvars)
+
+
+C      
+C            
+      Return
+C
+C      
+      End Subroutine Agrif_CopyFromoldOneVar      
+      
+C
+C
+CC
+C
+C
+C     **************************************************************************
+CCC   Subroutine Agrif_Copy
+C     **************************************************************************
+C      
+      Subroutine Agrif_Copy(Agrif_New_Gr,Agrif_Old_Gr,New_Var,Old_Var)
+C     
+CCC   Description:
+CCC   Sets arguments of the Agrif_UpdatenD procedures, n being the number of 
+CCC   DIMENSION of the grid variable.
+C
+CC    Method:
+CC            
+C
+C     Declarations:
+C
+      
+C
+C     Pointer argument    
+      TYPE(Agrif_Grid),Pointer   :: Agrif_New_Gr   ! Pointer on the current grid
+      TYPE(Agrif_Grid), Pointer :: Agrif_Old_Gr    ! Pointer on an old grid
+      TYPE(Agrif_Pvariable) :: New_Var, Old_Var
+      INTEGER :: nbdim                  ! Number of dimensions of the current 
+                                        ! grid      
+      INTEGER,DIMENSION(6) :: pttabnew  ! Indexes of the first point in the 
+                                        ! domain
+      INTEGER,DIMENSION(6) :: petabnew  ! Indexes of the first point in the 
+                                        ! domain
+      INTEGER,DIMENSION(6) :: pttabold  ! Indexes of the first point in the 
+                                        ! domain
+      INTEGER,DIMENSION(6) :: petabold  ! Indexes of the first point in the 
+                                        ! domain
+      INTEGER,DIMENSION(6) :: nbtabold  ! Number of cells in each direction
+      
+      INTEGER,DIMENSION(6) :: nbtabnew  ! Number of cells in each direction   
+      TYPE(AGRIF_Variable), Pointer :: root ! Pointer on the variable of the 
+                                            ! root grid
+      REAL, DIMENSION(6) :: snew,sold
+      REAL, DIMENSION(6) :: dsnew,dsold                              
+      REAL :: eps
+      INTEGER :: n
+C
+C  
+      root => New_Var % var % root_var 
+C      
+      nbdim = root % nbdim
+C         
+      do n=1,nbdim
+C  
+        select case(root % interptab(n))
+C        
+        case('x')                
+C
+          pttabnew(n) = root % point(1)
+C        
+          pttabold(n) = root % point(1)
+C        
+          snew(n) = Agrif_New_Gr % Agrif_x(1)
+C
+          sold(n) = Agrif_Old_Gr % Agrif_x(1) 
+C        
+          dsnew(n) = Agrif_New_Gr % Agrif_d(1)
+C
+          dsold(n) = Agrif_Old_Gr % Agrif_d(1)
+C                      
+          if (root % posvar(n) .EQ. 1) then
+C          
+              petabnew(n) = pttabnew(n) + Agrif_New_Gr % nb(1)
+C          
+              petabold(n) = pttabold(n) + Agrif_Old_Gr % nb(1)         
+C        
+            else
+C          
+              petabnew(n) = pttabnew(n) + Agrif_New_Gr % nb(1) - 1
+C          
+              petabold(n) = pttabold(n) + Agrif_Old_Gr % nb(1) - 1
+C
+              snew(n) = snew(n) + dsnew(n)/2.
+C
+              sold(n) = sold(n) + dsold(n)/2.
+C        
+          endif           
+C        
+        case('y')
+C        
+          pttabnew(n) = root % point(2)
+C        
+          pttabold(n) = root % point(2)
+C        
+          snew(n) = Agrif_New_Gr % Agrif_x(2)
+C        
+          sold(n) = Agrif_Old_Gr % Agrif_x(2)
+C        
+          dsnew(n) = Agrif_New_Gr % Agrif_d(2)
+C        
+          dsold(n) = Agrif_Old_Gr % Agrif_d(2)
+C                
+          if (root % posvar(n) .EQ. 1) then
+C        
+              petabnew(n) = pttabnew(n) + Agrif_New_Gr % nb(2)
+C          
+              petabold(n) = pttabold(n) + Agrif_Old_Gr % nb(2)         
+C        
+            else
+C          
+              petabnew(n) = pttabnew(n) + Agrif_New_Gr % nb(2) - 1
+C          
+              petabold(n) = pttabold(n) + Agrif_Old_Gr % nb(2) - 1
+C
+              snew(n) = snew(n) + dsnew(n)/2.
+C
+              sold(n) = sold(n) + dsold(n)/2.                    
+C        
+          endif 
+C        
+        case('z')
+C        
+          pttabnew(n) = root % point(3)
+C        
+          pttabold(n) = root % point(3)
+C        
+          snew(n) = Agrif_New_Gr % Agrif_x(3)
+C        
+          sold(n) = Agrif_Old_Gr % Agrif_x(3)
+C        
+          dsnew(n) = Agrif_New_Gr % Agrif_d(3)
+C        
+          dsold(n) = Agrif_Old_Gr % Agrif_d(3)
+C                
+          if (root % posvar(n) .EQ. 1) then
+C        
+              petabnew(n) = pttabnew(n) + Agrif_New_Gr % nb(3)
+C          
+              petabold(n) = pttabold(n) + Agrif_Old_Gr % nb(3)         
+C        
+            else
+C          
+             petabnew(n) = pttabnew(n) + Agrif_New_Gr % nb(3) - 1
+C          
+             petabold(n) = pttabold(n) + Agrif_Old_Gr % nb(3) - 1
+C
+             snew(n) = snew(n) + dsnew(n)/2.
+C
+             sold(n) = sold(n) + dsold(n)/2.                   
+C        
+          endif
+C          
+        case('N')
+C        
+          Call Agrif_nbdim_Get_bound(New_Var%var,
+     &                           pttabnew(n),petabnew(n),
+     &                           n,nbdim)
+C        
+          pttabold(n) = pttabnew(n)
+C      
+          petabold(n) = petabnew(n)
+C              
+          snew(n) = 0.
+C      
+          sold(n) = 0. 
+C      
+          dsnew(n) = 1.
+C      
+          dsold(n) = 1.
+C        
+        end select
+C      
+      enddo
+C      
+      do n = 1,nbdim
+C      
+        nbtabnew(n) = petabnew(n) - pttabnew(n)
+C      
+        nbtabold(n) = petabold(n) - pttabold(n)      
+C 
+      enddo      
+C
+      eps = min(minval(dsnew(1:nbdim)),minval(dsold(1:nbdim)))
+C     
+      eps = eps/100.      
+C      
+      do n = 1,nbdim
+C      
+        if (snew(n) .GT. (sold(n)+dsold(n)*nbtabold(n)+eps)) Return
+C      
+        if ((snew(n)+dsnew(n)*nbtabnew(n)-eps) .LT. sold(n)) Return
+C      
+      enddo
+C            
+C
+      Call AGRIF_CopynD
+     &        (New_Var,Old_Var,pttabold,petabold,pttabnew,petabnew,
+     &         sold,snew,dsold,dsnew,nbdim) 
+C      
+C 
+      Return
+C      
+C
+      End Subroutine Agrif_Copy
+C
+C
+C
+C     **************************************************************************
+CCC   Subroutine Agrif_CopynD
+C     **************************************************************************
+C      
+      Subroutine Agrif_CopynD(New_Var,Old_Var,pttabold,petabold,
+     &                        pttabnew,petabnew,sold,snew,dsold,
+     &                        dsnew,nbdim)
+C     
+CCC   Description:
+CCC   Copy of the nD New_Var variable from the nD Old_Var variable.
+C
+CC    Method:
+CC            
+C
+C     Declarations:
+C
+      
+C
+      INTEGER :: nbdim
+      TYPE(Agrif_Pvariable) :: New_Var, Old_Var     
+      INTEGER,DIMENSION(nbdim) :: pttabnew 
+      INTEGER,DIMENSION(nbdim) :: petabnew
+      INTEGER,DIMENSION(nbdim) :: pttabold
+      INTEGER,DIMENSION(nbdim) :: petabold      
+      REAL, DIMENSION(nbdim) :: snew,sold
+      REAL, DIMENSION(nbdim) :: dsnew,dsold 
+C
+      INTEGER :: i,j,k,l,m,n,i0,j0,k0,l0,m0,n0
+C
+      REAL, DIMENSION(nbdim) :: dim_gmin,dim_gmax
+      REAL, DIMENSION(nbdim) :: dim_newmin,dim_newmax
+      REAL, DIMENSION(nbdim) :: dim_min
+      INTEGER, DIMENSION(nbdim) :: ind_gmin,ind_newmin
+      INTEGER, DIMENSION(nbdim) ::  ind_newmax
+C               
+C
+      do i = 1,nbdim
+C      
+        dim_gmin(i) = sold(i)
+        dim_gmax(i) = sold(i) + (petabold(i)-pttabold(i)) * dsold(i)
+C 
+        dim_newmin(i) = snew(i)
+        dim_newmax(i) = snew(i) + (petabnew(i)-pttabnew(i)) * dsnew(i)
+C
+      enddo         
+C
+      do i = 1,nbdim
+C  
+        if (dim_gmax(i) .LT. dim_newmin(i)) Return
+C      
+        if (dim_gmin(i) .GT. dim_newmax(i)) Return
+C
+      enddo
+C
+C
+      do i = 1,nbdim
+C 
+        ind_newmin(i) = pttabnew(i) - floor(-(max(dim_gmin(i),
+     &                      dim_newmin(i))-dim_newmin(i))/dsnew(i)) 
+C      
+        dim_min(i) = snew(i) + (ind_newmin(i)-pttabnew(i))*dsnew(i)
+C      
+        ind_gmin(i) = pttabold(i) + nint((dim_min(i)-
+     &                dim_gmin(i))/dsold(i))      
+C
+        ind_newmax(i) = pttabnew(i) 
+     &                  + int((min(dim_gmax(i),dim_newmax(i))
+     &                         -dim_newmin(i))/dsnew(i))
+C
+      enddo 
+C
+C
+C
+      SELECT CASE (nbdim)
+      CASE (1)
+         i0 = ind_gmin(1)
+         do i = ind_newmin(1),ind_newmax(1)
+            New_Var % var % array1(i) =
+     &      Old_Var % var % array1(i0)
+            New_Var % var % restore1D(i) = 1   
+         i0 = i0 + int(dsnew(1)/dsold(1))
+         enddo
+      CASE (2)
+
+        i0 = ind_gmin(1)
+        do i = ind_newmin(1),ind_newmax(1)
+        j0 = ind_gmin(2)
+        do j = ind_newmin(2),ind_newmax(2)
+           New_Var % var % array2(i,j) =
+     &            Old_Var % var % array2(i0,j0)
+           New_Var % var % restore2D(i,j) = 1
+               j0 = j0 + int(dsnew(2)/dsold(2))
+        enddo
+        i0 = i0 + int(dsnew(1)/dsold(1))
+        enddo
+      CASE (3)
+        i0 = ind_gmin(1)
+        do i = ind_newmin(1),ind_newmax(1)
+        j0 = ind_gmin(2)
+        do j = ind_newmin(2),ind_newmax(2)
+        k0 = ind_gmin(3)
+        do k = ind_newmin(3),ind_newmax(3)
+           New_Var % var % array3(i,j,k) =
+     &                  Old_Var % var % array3(i0,j0,k0)
+           New_Var % var % restore3D(i,j,k) = 1   
+                     k0 = k0 + int(dsnew(3)/dsold(3))
+        enddo
+        j0 = j0 + int(dsnew(2)/dsold(2))
+        enddo
+        i0 = i0 + int(dsnew(1)/dsold(1))
+        enddo
+      CASE (4)
+        i0 = ind_gmin(1)
+        do i = ind_newmin(1),ind_newmax(1)
+        j0 = ind_gmin(2)
+        do j = ind_newmin(2),ind_newmax(2)
+        k0 = ind_gmin(3)
+        do k = ind_newmin(3),ind_newmax(3)
+        l0 = ind_gmin(4)
+        do l = ind_newmin(4),ind_newmax(4) 
+           New_Var % var % array4(i,j,k,l) =
+     &                        Old_Var % var % array4(i0,j0,k0,l0)
+           New_Var % var % restore4D(i,j,k,l) = 1   
+        l0 = l0 + int(dsnew(4)/dsold(4))
+        enddo
+        k0 = k0 + int(dsnew(3)/dsold(3))
+        enddo
+        j0 = j0 + int(dsnew(2)/dsold(2))
+        enddo
+        i0 = i0 + int(dsnew(1)/dsold(1))
+        enddo
+      CASE (5)
+        i0 = ind_gmin(1)
+        do i = ind_newmin(1),ind_newmax(1)
+        j0 = ind_gmin(2)
+        do j = ind_newmin(2),ind_newmax(2)
+        k0 = ind_gmin(3)
+        do k = ind_newmin(3),ind_newmax(3)
+        l0 = ind_gmin(4)
+        do l = ind_newmin(4),ind_newmax(4) 
+        m0 = ind_gmin(5)
+        do m = ind_newmin(5),ind_newmax(5)
+           New_Var % var % array5(i,j,k,l,m) =
+     &                        Old_Var % var % array5(i0,j0,k0,l0,m0)
+           New_Var % var % restore5D(i,j,k,l,m) = 1
+        m0 = m0 + int(dsnew(5)/dsold(5)) 
+        enddo
+        l0 = l0 + int(dsnew(4)/dsold(4))
+        enddo
+        k0 = k0 + int(dsnew(3)/dsold(3))
+        enddo
+        j0 = j0 + int(dsnew(2)/dsold(2))
+        enddo
+        i0 = i0 + int(dsnew(1)/dsold(1))
+        enddo
+      CASE (6)
+        i0 = ind_gmin(1)
+        do i = ind_newmin(1),ind_newmax(1)
+        j0 = ind_gmin(2)
+        do j = ind_newmin(2),ind_newmax(2)
+        k0 = ind_gmin(3)
+        do k = ind_newmin(3),ind_newmax(3)
+        l0 = ind_gmin(4)
+        do l = ind_newmin(4),ind_newmax(4) 
+        m0 = ind_gmin(5)
+        do m = ind_newmin(5),ind_newmax(5)
+        n0 = ind_gmin(6)
+        do n = ind_newmin(6),ind_newmax(6)
+           New_Var % var % array6(i,j,k,l,m,n) =
+     &                        Old_Var % var % array6(i0,j0,k0,l0,m0,n0)
+           New_Var % var % restore6D(i,j,k,l,m,n) = 1
+        n0 = n0 + int(dsnew(6)/dsold(6)) 
+        enddo
+        m0 = m0 + int(dsnew(5)/dsold(5)) 
+        enddo
+        l0 = l0 + int(dsnew(4)/dsold(4))
+        enddo
+        k0 = k0 + int(dsnew(3)/dsold(3))
+        enddo
+        j0 = j0 + int(dsnew(2)/dsold(2))
+        enddo
+        i0 = i0 + int(dsnew(1)/dsold(1))
+        enddo
+      END SELECT
+C           
+      Return
+C
+C
+      End Subroutine Agrif_CopynD                    
+C
+C
+C
+      End module Agrif_Save
Index: vendors/AGRIF/r_01/AGRIF_FILES/modtypes.F
===================================================================
--- vendors/AGRIF/r_01/AGRIF_FILES/modtypes.F	(revision 2672)
+++ vendors/AGRIF/r_01/AGRIF_FILES/modtypes.F	(revision 2672)
@@ -0,0 +1,459 @@
+C     Agrif (Adaptive Grid Refinement In Fortran)
+C
+C     Copyright (C) 2003 Laurent Debreu (Laurent.Debreu@imag.fr)
+C                        Christophe Vouland (Christophe.Vouland@imag.fr)    
+C
+C     This program is free software; you can redistribute it and/or modify
+C     it under the terms of the GNU General Public License as published by
+C     the Free Software Foundation; either version 2 of the License, or
+C     (at your option) any later version.
+C
+C     This program is distributed in the hope that it will be useful,
+C     but WITHOUT ANY WARRANTY; without even the implied warranty of
+C     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+C     GNU General Public License for more details.
+C
+C     You should have received a copy of the GNU General Public License
+C     along with this program; if not, write to the Free Software
+C     Foundation, Inc., 59 Temple Place-Suite 330, Boston, MA 02111-1307, USA.
+C
+C
+C
+CCC   Module Agrif_types  
+C
+      Module Agrif_types 
+C
+CCC   Description:
+CCC   Definition of data types used in Agrif, of several variables and
+C        PARAMETERs.     
+C
+      IMPLICIT NONE
+      
+C     Maximum refinement ratio
+
+      INTEGER, PARAMETER :: Agrif_MaxRaff = 7
+      
+C     Maximum number of grids of the hierarchy
+      INTEGER, PARAMETER :: Agrif_NbMaxGrids = 10
+                  
+C
+C     **************************************************************************
+CCC   TYPE Agrif_LRECTANGLE
+C     **************************************************************************
+C
+CCC   Description:
+CCC   Data TYPE allowing a grid to reach a grid on the same level or its child
+CCC   grids.
+C
+      TYPE Agrif_lrectangle  
+           TYPE(Agrif_rectangle) , Pointer :: r    ! to reach a child grid
+           TYPE(Agrif_lrectangle), Pointer :: next ! to reach a grid on the 
+                                                   !    same level
+      End TYPE Agrif_lrectangle  
+C
+C     **************************************************************************
+CCC   TYPE Agrif_RECTANGLE: 
+C     **************************************************************************
+C
+CCC   Description:
+CCC   Data TYPE to define several CHARACTERistics of a grid (number,position,
+CCC   time and space refinement factors,...). 
+C
+      TYPE Agrif_rectangle
+           INTEGER                         :: number      ! Number of the grid
+           ! Number of child grids 
+           INTEGER                         :: nbgridchild 
+           ! Minimal position in the x,y and z direction
+           INTEGER, DIMENSION(3)           :: imin        
+           ! Maximal position in the x,y and z direction 
+           INTEGER, DIMENSION(3)           :: imax 
+           ! Space refinement factor in the x,y and z direction  
+           INTEGER, DIMENSION(3)           :: spaceref    
+           ! Time refinement factor in the x,y and z direction
+           INTEGER, DIMENSION(3)           :: timeref     
+           ! Pointer to reach a grid on  the same level or a child grid
+           TYPE(Agrif_lrectangle), Pointer :: childgrids  
+      End TYPE Agrif_rectangle  
+C
+C
+C
+C     **************************************************************************
+CCC   TYPE Agrif_PGrid
+C     **************************************************************************
+C
+CCC   Description:
+CCC   Data TYPE to go over the grid hierarchy (used for the creation of this 
+CCC   grid hierarchy and during the time integration).
+C 
+      TYPE Agrif_pgrid  
+           ! allows to reach a child grid  
+           TYPE(Agrif_grid) , Pointer :: gr
+           ! allows to reach the grids of the same level 
+           TYPE(Agrif_pgrid), Pointer :: next 
+      End TYPE Agrif_pgrid 
+C
+C
+C
+C     **************************************************************************
+CCC   TYPE Agrif_PVariable
+C     **************************************************************************
+C
+CCC   Description:
+CCC   Data TYPE to define a grid variable.
+C
+      TYPE Agrif_PVariable 
+           ! This field allows to get the various CHARACTERistics 
+           !   of the variable (defined by the Agrif_Variable data TYPE)
+           TYPE(Agrif_Variable) , Pointer :: var  
+           ! Pointer on the parent grid
+           TYPE(Agrif_PVariable), Pointer :: parent_var 
+      End TYPE Agrif_PVariable 
+C
+C     **************************************************************************
+CCC   TYPE Agrif_Grid
+C     **************************************************************************
+C
+CCC   Description:
+CCC   Data TYPE to define a grid (position, space and time refinement factors).
+C
+      TYPE Agrif_grid  
+           ! pointer on the parent grid 
+           TYPE(Agrif_grid)                    ,Pointer :: parent      
+           ! pointer on the child grids 
+           TYPE(Agrif_pgrid)                   ,Pointer :: child_grids 
+           ! List of the grid variables   
+           TYPE(Agrif_PVariable), DIMENSION(:) ,Pointer :: tabvars  
+           ! pointer on the save grid 
+           TYPE(Agrif_grid)                    ,Pointer :: save_grid                
+C
+           ! Global x,y and z position
+           REAL    ,DIMENSION(3)                   :: Agrif_x   
+           ! Global space step in the x,y and z direction
+           REAL    ,DIMENSION(3)                   :: Agrif_d
+           ! number of cells in the x,y and z direction
+           INTEGER ,DIMENSION(3)                   :: nb        
+           ! minimal position in the x,y and z direction
+           INTEGER ,DIMENSION(3)                   :: ix        
+           ! Space refinement factor in the x,y and z direction
+           INTEGER ,DIMENSION(3)                   :: spaceref  
+           ! Time refinement factor in the x,y and z direction 
+           INTEGER ,DIMENSION(3)                   :: timeref   
+           INTEGER ,DIMENSION(:)          ,Pointer :: restore1D   
+           INTEGER ,DIMENSION(:,:)        ,Pointer :: restore2D   
+           INTEGER ,DIMENSION(:,:,:)      ,Pointer :: restore3D 
+           INTEGER ,DIMENSION(:,:,:,:)    ,Pointer :: restore4D
+           INTEGER ,DIMENSION(:,:,:,:,:)  ,Pointer :: restore5D
+           INTEGER ,DIMENSION(:,:,:,:,:,:),Pointer :: restore6D
+           ! number of time step  
+           INTEGER                                 :: ngridstep 
+           INTEGER                                 :: rank  
+           !moving grid id
+           INTEGER                                 :: grid_id
+           ! number of the grid 
+           INTEGER                                 :: fixedrank 
+           ! fixed or moving grid ?  
+           LOGICAL                                 :: fixed     
+           LOGICAL                                 :: oldgrid   
+C          LOGICALs indicating if the current grid has a common border 
+C             with the root coarse grid
+           LOGICAL ,DIMENSION(3)                   :: NearRootBorder
+           LOGICAL ,DIMENSION(3)                   :: DistantRootBorder
+C          Arrays for adaptive grid refinement
+           REAL    ,DIMENSION(:)          ,Pointer :: valtabpoint1D
+           REAL    ,DIMENSION(:,:)        ,Pointer :: valtabpoint2D
+           REAL    ,DIMENSION(:,:,:)      ,Pointer :: valtabpoint3D
+           INTEGER ,DIMENSION(:)          ,Pointer :: tabpoint1D
+           INTEGER ,DIMENSION(:,:)        ,Pointer :: tabpoint2D
+           INTEGER ,DIMENSION(:,:,:)      ,Pointer :: tabpoint3D
+           Type(Agrif_List_Variables), Pointer     :: variables=>NULL()
+           INTEGER                                 :: NbVariables = 0
+           Type(Agrif_Flux), Pointer               :: fluxes => NULL()
+           INTEGER                                 :: level
+           ! level of the grid in the hierarchy
+      End TYPE Agrif_grid
+C
+C     **************************************************************************
+CCC   TYPE Agrif_VARIABLE
+C     **************************************************************************
+C     
+CCC   Description:
+CCC   Data TYPE to CHARACTERize a grid variable.   
+C
+      TYPE Agrif_Variable 
+         CHARACTER*80 :: variablename
+C       
+         ! Pointer on the variable of the root grid 
+         TYPE(Agrif_Variable), Pointer :: root_var 
+C
+         ! index of the first point in the REAL domain (x,y and z direction)
+         INTEGER     ,DIMENSION(6)          :: point
+         ! position of the variable on the cell (1 for the boarder of 
+         !    the edge, 2 for the center)
+         INTEGER     ,DIMENSION(:) ,Pointer :: posvar      => NULL() 
+         ! Indication for the space interpolation (module Agrif_Boundary)
+         INTEGER                   ,Pointer :: interpIndex => NULL() 
+         ! number of DIMENSIONs of the grid variable
+         INTEGER                            :: nbdim = 0             
+         ! Array indicating the TYPE of DIMENSION (space or not) for 
+         !    each of them 
+         CHARACTER(6),DIMENSION(:) ,Pointer :: interptab   => NULL() 
+C        Arrays containing the values of the grid variables (REAL)
+         REAL                                    :: array0 
+         REAL   , DIMENSION(:)          ,ALLOCATABLE :: array1    
+         REAL   , DIMENSION(:,:)        ,ALLOCATABLE :: array2    
+         REAL   , DIMENSION(:,:,:)      ,ALLOCATABLE :: array3    
+         REAL   , DIMENSION(:,:,:,:)    ,ALLOCATABLE :: array4    
+         REAL   , DIMENSION(:,:,:,:,:)  ,ALLOCATABLE :: array5    
+         REAL   , DIMENSION(:,:,:,:,:,:),ALLOCATABLE :: array6  
+         
+         REAL   , DIMENSION(:)          ,POINTER :: parray1    
+         REAL   , DIMENSION(:,:)        ,POINTER :: parray2    
+         REAL   , DIMENSION(:,:,:)      ,POINTER :: parray3    
+         REAL   , DIMENSION(:,:,:,:)    ,POINTER :: parray4    
+         REAL   , DIMENSION(:,:,:,:,:)  ,POINTER :: parray5    
+         REAL   , DIMENSION(:,:,:,:,:,:),POINTER :: parray6
+         
+C        Arrays containing the values of the grid variables (REAL*8)
+         REAL*8                                 :: darray0
+         REAL*8, DIMENSION(:)          ,ALLOCATABLE :: darray1   
+         REAL*8, DIMENSION(:,:)        ,ALLOCATABLE :: darray2   
+         REAL*8, DIMENSION(:,:,:)      ,ALLOCATABLE :: darray3   
+         REAL*8, DIMENSION(:,:,:,:)    ,ALLOCATABLE :: darray4   
+         REAL*8, DIMENSION(:,:,:,:,:)  ,ALLOCATABLE :: darray5   
+         REAL*8, DIMENSION(:,:,:,:,:,:),ALLOCATABLE :: darray6   
+C        Arrays containing the values of the grid variables (REAL*4)
+         REAL*4                                 :: sarray0
+         REAL*4, DIMENSION(:)          ,ALLOCATABLE :: sarray1   
+         REAL*4, DIMENSION(:,:)        ,ALLOCATABLE :: sarray2   
+         REAL*4, DIMENSION(:,:,:)      ,ALLOCATABLE :: sarray3   
+         REAL*4, DIMENSION(:,:,:,:)    ,ALLOCATABLE :: sarray4   
+         REAL*4, DIMENSION(:,:,:,:,:)  ,ALLOCATABLE :: sarray5   
+         REAL*4, DIMENSION(:,:,:,:,:,:),ALLOCATABLE :: sarray6   
+C        Arrays containing the values of the grid variables (LOGICAL)
+         LOGICAL                                 :: larray0
+         LOGICAL, DIMENSION(:)          ,ALLOCATABLE :: larray1   
+         LOGICAL, DIMENSION(:,:)        ,ALLOCATABLE :: larray2   
+         LOGICAL, DIMENSION(:,:,:)      ,ALLOCATABLE :: larray3   
+         LOGICAL, DIMENSION(:,:,:,:)    ,ALLOCATABLE :: larray4   
+         LOGICAL, DIMENSION(:,:,:,:,:)  ,ALLOCATABLE :: larray5   
+         LOGICAL, DIMENSION(:,:,:,:,:,:),ALLOCATABLE :: larray6   
+C         Arrays containing the values of the grid variables (INTEGER)   
+         INTEGER                                 :: iarray0
+         INTEGER, DIMENSION(:)          ,ALLOCATABLE :: iarray1   
+         INTEGER, DIMENSION(:,:)        ,ALLOCATABLE :: iarray2   
+         INTEGER, DIMENSION(:,:,:)      ,ALLOCATABLE :: iarray3   
+         INTEGER, DIMENSION(:,:,:,:)    ,ALLOCATABLE :: iarray4   
+         INTEGER, DIMENSION(:,:,:,:,:)  ,ALLOCATABLE :: iarray5   
+         INTEGER, DIMENSION(:,:,:,:,:,:),ALLOCATABLE :: iarray6   
+C
+         INTEGER, DIMENSION(:)          ,Pointer :: restore1D => NULL()
+         INTEGER, DIMENSION(:,:)        ,Pointer :: restore2D => NULL()
+         INTEGER, DIMENSION(:,:,:)      ,Pointer :: restore3D => NULL()
+         INTEGER, DIMENSION(:,:,:,:)    ,Pointer :: restore4D => NULL()
+         INTEGER, DIMENSION(:,:,:,:,:)  ,Pointer :: restore5D => NULL()
+         INTEGER, DIMENSION(:,:,:,:,:,:),Pointer :: restore6D => NULL()
+C   
+         CHARACTER(2050)                          :: carray0
+         CHARACTER(200), DIMENSION(:)    ,ALLOCATABLE :: carray1
+         CHARACTER(200), DIMENSION(:,:)  ,ALLOCATABLE :: carray2
+C
+         ! Array used for the time interpolation
+         REAL   , DIMENSION(:,:)      ,Pointer :: oldvalues2D => NULL()
+
+         ! if the variable should be restore -> =1
+         LOGICAL :: restaure = .FALSE.
+         ! the interpolation should be made in any case
+         LOGICAL :: Interpolationshouldbemade = .FALSE. 
+         INTEGER :: bcinf ! option bc
+         INTEGER :: bcsup ! option bc
+         INTEGER, DIMENSION(6) :: updateinf ! option update
+         INTEGER, DIMENSION(6) :: updatesup ! option update         
+         INTEGER, DIMENSION(6,6) :: bcTYPEinterp ! option bcinterp
+         INTEGER, DIMENSION(6) :: TYPEinterp ! option interp
+         INTEGER, DIMENSION(6) :: TYPEupdate ! option update
+         
+         INTEGER, DIMENSION(6) :: lb, ub
+         
+         Type(Agrif_List_Interp_Loc), Pointer :: list_interp => NULL()
+         Type(Agrif_List_Interp_Loc), Pointer :: list_update => NULL()
+C
+      End TYPE Agrif_Variable 
+      
+      Type Agrif_Interp_Loc
+      integer,dimension(6) :: pttab,petab,
+     &                          pttab_Child,pttab_Parent = -99
+      integer,dimension(6) :: indmin, indmax
+      INTEGER,DIMENSION(6)    :: pttruetab,cetruetab
+      logical :: member, memberin      
+#if !defined AGRIF_MPI      
+      integer,dimension(6) :: indminglob,indmaxglob
+#else
+      integer,dimension(6) :: indminglob2,indmaxglob2
+      INTEGER,DIMENSION(6,2,2) :: parentarray
+      INTEGER,DIMENSION(:,:,:), POINTER :: tab4t
+      LOGICAL, DIMENSION(:), POINTER :: memberinall
+      INTEGER,DIMENSION(:,:,:), POINTER :: tab5t
+      LOGICAL, DIMENSION(:), POINTER :: memberinall2
+      LOGICAL, DIMENSION(:), POINTER :: sendtoproc1    
+      LOGICAL, DIMENSION(:), POINTER :: recvfromproc1      
+      LOGICAL, DIMENSION(:), POINTER :: sendtoproc2      
+      LOGICAL, DIMENSION(:), POINTER :: recvfromproc2      
+#endif      
+      End Type Agrif_Interp_Loc
+      
+      Type Agrif_List_Interp_Loc
+      Type(Agrif_Interp_Loc), Pointer :: interp_loc
+      Type(Agrif_List_Interp_Loc), Pointer :: suiv
+      End Type Agrif_List_Interp_Loc
+
+       TYPE Agrif_List_Variables
+         Type(Agrif_PVariable), Pointer :: pvar
+         Type(Agrif_List_Variables), Pointer :: nextvariable  => NULL()
+       END TYPE Agrif_List_Variables
+               
+       TYPE Agrif_Profile
+          character*80 :: profilename
+C
+         ! index of the first point in the REAL domain (x,y and z direction)
+         INTEGER     ,DIMENSION(6)          :: point
+         ! position of the variable on the cell (1 for the boarder of 
+         !    the edge, 2 for the center)
+         INTEGER     ,DIMENSION(:) ,Pointer :: posvar      => NULL() 
+         ! Indication for the space interpolation (module Agrif_Boundary)
+         INTEGER                   ,Pointer :: interpIndex => NULL() 
+         ! number of DIMENSIONs of the grid variable
+         INTEGER                            :: nbdim = 0             
+         ! Array indicating the TYPE of DIMENSION (space or not) for 
+         !    each of them 
+         CHARACTER(6),DIMENSION(:) ,Pointer :: interptab   => NULL() 
+         Type(Agrif_Variable), Pointer :: var
+         Type(Agrif_Profile), Pointer :: nextprofile  => NULL()
+       END TYPE Agrif_Profile
+       
+       Type(Agrif_Profile), Pointer :: Agrif_MyProfiles => NULL()
+           
+C  Boundaries Fluxes
+
+      Type Agrif_Flux
+        Character*80 fluxname
+        Type(Agrif_Variable), Pointer :: fluxtabx
+        Type(Agrif_Variable), Pointer :: fluxtaby
+        Type(Agrif_Variable), Pointer :: fluxtabz        
+        Type(Agrif_Profile), Pointer  :: profile
+        Logical :: Fluxallocated = .FALSE.
+        Type(Agrif_Flux), Pointer     :: nextflux => NULL()
+      End Type Agrif_Flux      
+C
+C     **************************************************************************
+CCC   Different PARAMETERs
+C     **************************************************************************
+      TYPE(Agrif_PVariable), DIMENSION(:) ,Pointer :: Agrif_tabvars
+C
+      ! this pointer always points on the root grid of the grid hierarchy
+      TYPE(Agrif_grid)  ,Pointer :: Agrif_Mygrid      
+      ! Pointer used in the Agrif_regrid subroutine (Agrif_Util module). 
+      !    It contains  the safeguard of the grid hierarchy.
+      TYPE(Agrif_pgrid) ,Pointer :: Agrif_oldmygrid   
+      ! pointer to the current grid (the link is done by using the
+      !    Agrif_Instance   procedure (module Agrif_Init)) 
+      TYPE(Agrif_grid)  ,Pointer :: Agrif_Curgrid
+      ! Pointer used in the Agrif_ChildGrid_to_ParentGrid and 
+      !    Agrif_ParentGrid_to_ChildGrid subroutines 
+      !    (Agrif_CurgridFunctions module). It contains the 
+      !    safeguard of the current grid hierarchy.
+      TYPE(Agrif_grid)  ,Pointer :: Agrif_saveCURGRID
+C
+      ! Problem DIMENSION
+      INTEGER               :: Agrif_Probdim
+      ! number of variables
+      INTEGER               :: Agrif_NbVariables
+      ! number of fixed grids in the grid hierarchy
+      INTEGER               :: Agrif_nbfixedgrids            
+      ! space refinement factor
+      INTEGER ,DIMENSION(3) :: Agrif_coeffref
+      ! time refinement factor
+      INTEGER ,DIMENSION(3) :: Agrif_coeffreft
+      ! LOGICAL to use special values on the parent grid
+      LOGICAL               :: Agrif_UseSpecialValue
+      ! LOGICAL to use special values on the parent grid
+      LOGICAL               :: Agrif_UseSpecialValueInUpdate
+      ! LOGICAL to use special values on the current grid
+      LOGICAL               :: Agrif_UseSpecialValueFineGrid
+      ! Special values on the parent grid
+      REAL                  :: Agrif_SpecialValue
+      ! Special values on the current grid
+      REAL                  :: Agrif_SpecialValueFineGrid
+C   clustering PARAMETERs
+      INTEGER               :: Agrif_Regridding = 10
+      INTEGER               :: Agrif_Minwidth
+      REAL                  :: Agrif_Efficiency = 0.7
+      INTEGER               :: MaxSearch = 5
+      REAL    ,DIMENSION(3) :: Agrif_mind
+C     PARAMETERs for the interpolation of the child grids
+      ! linear interpolation
+      INTEGER ,PARAMETER    :: Agrif_linear=1
+      ! lagrange interpolation
+      INTEGER ,PARAMETER    :: Agrif_lagrange=2
+      ! spline interpolation
+      INTEGER ,PARAMETER    :: Agrif_eno=3
+      ! user s interpolation
+      INTEGER ,PARAMETER    :: Agrif_user_interp=4
+      ! constant interpolation
+      INTEGER ,PARAMETER    :: Agrif_constant=5
+      ! linear conservative interpolation 
+      INTEGER ,PARAMETER    :: Agrif_linearconserv=6
+      ! linear conservative interpolation       
+      INTEGER ,PARAMETER    :: Agrif_linearconservlim=7
+      INTEGER ,PARAMETER    :: Agrif_ppm=8 
+      INTEGER ,PARAMETER    :: Agrif_weno=9         
+C     PARAMETERs for the update of the parent grids      
+      INTEGER ,PARAMETER    :: Agrif_Update_Copy=1           ! copy
+      INTEGER ,PARAMETER    :: Agrif_Update_Average=2        ! average
+      INTEGER ,PARAMETER    :: Agrif_Update_Full_Weighting=3 ! full-weighting 
+C     Raffinement grid switch definition
+      ! Agrif_USE_ONLY_FIXED_GRIDS =1 if fixed grid mode
+      INTEGER               :: Agrif_USE_ONLY_FIXED_GRIDS    
+      ! Agrif_USE_FIXED_GRIDS = 1 if AMR mode + fixed grid 
+      !    else only AMR mode
+      INTEGER               :: Agrif_USE_FIXED_GRIDS
+      INTEGER               :: Agrif_Maxlevelloc
+C
+#ifdef AGRIF_MPI
+      INTEGER :: Agrif_Nbprocs  ! Number of processors
+      INTEGER :: Agrif_ProcRank ! Rank of the current processor 
+      INTEGER :: Agrif_Group    ! Group associated to MPI_COMM_WORLD
+      INTEGER :: Agrif_MPIPREC
+#endif
+C
+      contains
+C   
+      Integer Function agrif_ceiling(x)
+C             
+          Real :: x
+          Integer ::i 
+C
+          i = floor(x)
+C      
+          if( abs(x - i).le.0.0001 )then
+             agrif_ceiling = i
+          else
+             agrif_ceiling = i+1
+          endif      
+C
+      End Function
+C
+      Integer Function agrif_int(x)
+C             
+          Real :: x
+          Integer ::i 
+C
+          i = floor(x) + 1
+C      
+          if( abs(x - i).le.0.0001 )then
+             agrif_int = i
+          else
+             agrif_int = i-1
+          endif      
+C
+      End Function
+      End Module Agrif_TYPEs  
Index: vendors/AGRIF/r_01/AGRIF_FILES/modupdate.F
===================================================================
--- vendors/AGRIF/r_01/AGRIF_FILES/modupdate.F	(revision 2672)
+++ vendors/AGRIF/r_01/AGRIF_FILES/modupdate.F	(revision 2672)
@@ -0,0 +1,2675 @@
+!
+! $Id: modupdate.F 779 2007-12-22 17:04:17Z rblod $
+!
+C     AGRIF (Adaptive Grid Refinement In Fortran)
+C
+C     Copyright (C) 2003 Laurent Debreu (Laurent.Debreu@imag.fr)
+C                        Christophe Vouland (Christophe.Vouland@imag.fr)    
+C
+C     This program is free software; you can redistribute it and/or modify
+C     it under the terms of the GNU General Public License as published by
+C     the Free Software Foundation; either version 2 of the License, or
+C     (at your option) any later version.
+C
+C     This program is distributed in the hope that it will be useful,
+C     but WITHOUT ANY WARRANTY; without even the implied warranty of
+C     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+C     GNU General Public License for more details.
+C
+C     You should have received a copy of the GNU General Public License
+C     along with this program; if not, write to the Free Software
+C     Foundation, Inc., 59 Temple Place- Suite 330, Boston, MA 02111-1307, USA.
+C
+C
+C
+CCC   Module Agrif_Update
+C
+      Module Agrif_Update
+C
+CCC   Description:
+CCC   Module to update a parent grid from its child grids
+C
+C     Modules used:
+C   
+      Use Agrif_Updatebasic
+c      Use Agrif_Boundary
+      Use Agrif_Arrays
+      Use Agrif_CurgridFunctions
+      Use Agrif_Mask
+#ifdef AGRIF_MPI
+      Use Agrif_mpp
+#endif
+C
+      IMPLICIT NONE
+      logical, private :: precomputedone(7) = .FALSE.      
+C      
+      CONTAINS
+C     Define procedures contained in this module
+C
+C
+C
+C     **************************************************************************
+CCC   Subroutine Agrif_Update_1d
+C     **************************************************************************
+C 
+      Subroutine Agrif_Update_1d(TypeUpdate,parent,child,tab,deb,fin,
+     &                           procname)
+C
+CCC   Description:
+CCC   Subroutine to update a 1D grid variable on the parent grid.
+C
+C     Declarations:
+C
+      
+C
+C     Arguments      
+      INTEGER, DIMENSION(6) :: TypeUpdate                  ! TYPE of update (copy or average)
+      TYPE(AGRIF_PVariable) :: parent        ! Variable on the parent grid
+      TYPE(AGRIF_PVariable) :: child         ! Variable on the child grid
+      TYPE(AGRIF_PVariable) :: childtemp     ! Temporary variable on the child
+      INTEGER, DIMENSION(6) :: deb,fin       ! Positions where interpolations 
+                                              ! are done on the fine grid       
+      External :: procname
+      Optional ::  procname      
+      REAL, DIMENSION(
+     &         child%var%lb(1):child%var%ub(1)
+     &         ), Target :: tab    ! Result
+C
+C
+C     Definition of a temporary AGRIF_PVariable data TYPE  
+      allocate(childtemp % var)
+C
+C     Pointer on the root variable
+      childtemp % var % root_var => child % var %root_var
+C      
+C     Number of dimensions of the grid variable
+      childtemp % var % nbdim = 1  
+C      
+C     Values on the current grid used for the update
+C      childtemp % var % array1 => tab
+      
+      childtemp % var % lb = child % var % lb
+      childtemp % var % ub = child % var % ub             
+      
+C      childtemp % var % list_update => child%var%list_update
+             
+C
+     
+      IF (present(procname)) THEN
+      CALL Agrif_UpdateVariable
+     &     (TypeUpdate,parent,child,deb,fin,procname)
+      ELSE
+      CALL Agrif_UpdateVariable
+     &     (TypeUpdate,parent,child,deb,fin)
+      ENDIF     
+C      
+C      child % var % list_update => childtemp%var%list_update
+      
+      deallocate(childtemp % var)
+C
+C       
+      End Subroutine Agrif_Update_1D
+C
+C
+C
+C     **************************************************************************
+CCC   Subroutine Agrif_Update_2d
+C     **************************************************************************
+C 
+
+      Subroutine Agrif_Update_2d(TypeUpdate,parent,child,tab,deb,fin,
+     &                           procname)
+C
+CCC   Description:
+CCC   Subroutine to update a 2D grid variable on the parent grid.
+C
+C     Declarations:
+C
+      
+C
+C     Arguments      
+      INTEGER, DIMENSION(6) :: TypeUpdate                  ! TYPE of update (copy or average)
+      TYPE(AGRIF_PVariable) :: parent        ! Variable on the parent grid
+      TYPE(AGRIF_PVariable) :: child         ! Variable on the child grid
+      TYPE(AGRIF_PVariable) :: childtemp     ! Temporary variable on the child
+      INTEGER, DIMENSION(6) :: deb,fin       ! Positions where interpolations  
+                                              ! are done on the fine grid 
+                                              
+      External :: procname
+      Optional ::  procname
+                                                          
+      REAL, DIMENSION(
+     &         child%var%lb(1):child%var%ub(1),
+     &         child%var%lb(2):child%var%ub(2)
+     &    ), Target :: tab    ! Result
+C
+C
+C     Definition of a temporary AGRIF_PVariable data TYPE
+      allocate(childtemp % var)
+C
+C     Pointer on the root variable
+      childtemp % var % root_var => child % var %root_var
+C      
+C     Number of dimensions of the grid variable
+      childtemp % var % nbdim = 2  
+C      
+C     Values on the current grid used for the update
+C      childtemp % var % array2 => tab 
+      
+      childtemp % var % lb = child % var % lb
+      childtemp % var % ub = child % var % ub             
+      
+C      childtemp % var % list_update => child%var%list_update      
+C
+      IF (present(procname)) THEN
+      CALL Agrif_UpdateVariable
+     &     (TypeUpdate,parent,child,deb,fin,procname)
+      ELSE
+      CALL Agrif_UpdateVariable
+     &     (TypeUpdate,parent,child,deb,fin)
+      ENDIF
+C      
+C      child % var % list_update => childtemp%var%list_update
+      
+      deallocate(childtemp % var)
+C
+C       
+      End Subroutine Agrif_Update_2D
+C
+C
+C
+C     **************************************************************************
+CCC   Subroutine Agrif_Update_3d
+C     **************************************************************************
+C 
+      Subroutine Agrif_Update_3d(TypeUpdate,parent,child,tab,deb,fin,
+     &                           procname)
+C
+CCC   Description:
+CCC   Subroutine to update a 3D grid variable on the parent grid.
+C
+C     Declarations:
+C
+      
+C
+C     Arguments      
+      INTEGER, DIMENSION(6) :: TypeUpdate                  ! TYPE of update (copy or average)
+      TYPE(AGRIF_PVariable) :: parent        ! Variable on the parent grid
+      TYPE(AGRIF_PVariable) :: child         ! Variable on the child grid
+      TYPE(AGRIF_PVariable) :: childtemp     ! Temporary variable on the child
+      INTEGER, DIMENSION(6) :: deb,fin       ! Positions where interpolations 
+                                              ! are done on the fine grid    
+      External :: procname
+      Optional ::  procname
+                                                       
+      REAL, DIMENSION(
+     &         child%var%lb(1):child%var%ub(1),
+     &         child%var%lb(2):child%var%ub(2),
+     &         child%var%lb(3):child%var%ub(3)
+     &      ), Target :: tab  ! Results  
+C
+C
+C     Definition of a temporary AGRIF_PVariable data TYPE  
+      allocate(childtemp % var)
+C
+C     Pointer on the root variable
+      childtemp % var % root_var => child % var %root_var
+C      
+C     Number of dimensions of the grid variable
+      childtemp % var % nbdim = 3  
+C      
+C     Values on the current grid used for the update
+C      childtemp % var % array3 => tab     
+      
+      childtemp % var % lb = child % var % lb
+      childtemp % var % ub = child % var % ub  
+            
+      
+C      childtemp % var % list_update => child%var%list_update      
+C
+      IF (present(procname)) THEN
+      CALL Agrif_UpdateVariable
+     &     (TypeUpdate,parent,child,deb,fin,procname)
+      ELSE
+      CALL Agrif_UpdateVariable
+     &     (TypeUpdate,parent,child,deb,fin)
+      ENDIF
+C      
+C      child % var % list_update => childtemp%var%list_update
+      
+      DEALLOCATE(childtemp % var)
+C
+C       
+      End Subroutine Agrif_Update_3D
+C
+C
+C
+C     **************************************************************************
+CCC   Subroutine Agrif_Update_4d
+C     **************************************************************************
+C 
+      Subroutine Agrif_Update_4d(TypeUpdate,parent,child,tab,deb,fin,
+     &                           procname)
+C
+CCC   Description:
+CCC   Subroutine to update a 4D grid variable on the parent grid.
+C
+C     Declarations:
+C
+      
+C
+C     Arguments      
+      INTEGER, DIMENSION(6) :: TypeUpdate                  ! TYPE of update (copy or average)
+      TYPE(AGRIF_PVariable) :: parent        ! Variable on the parent grid
+      TYPE(AGRIF_PVariable) :: child         ! Variable on the child grid
+      TYPE(AGRIF_PVariable) :: childtemp     ! Temporary variable on the child
+      INTEGER, DIMENSION(6) :: deb,fin       ! Positions where interpolations 
+                                              ! are done on the fine grid     
+      External :: procname
+      Optional ::  procname        
+      REAL, DIMENSION(
+     &         child%var%lb(1):child%var%ub(1),
+     &         child%var%lb(2):child%var%ub(2),
+     &         child%var%lb(3):child%var%ub(3),
+     &         child%var%lb(4):child%var%ub(4)
+     &      ), Target :: tab  ! Results
+C
+C
+C     Definition of a temporary AGRIF_PVariable data TYPE  
+      allocate(childtemp % var)
+C
+C     Pointer on the root variable
+      childtemp % var % root_var => child % var %root_var
+C      
+C     Number of dimensions of the grid variable
+      childtemp % var % nbdim = 4  
+C      
+C     Values on the current grid used for the update
+C      childtemp % var % array4 => tab     
+      
+      childtemp % var % lb = child % var % lb
+      childtemp % var % ub = child % var % ub  
+            
+      
+C      childtemp % var % list_update => child%var%list_update
+            
+C
+      IF (present(procname)) THEN
+      CALL Agrif_UpdateVariable
+     &     (TypeUpdate,parent,child,deb,fin,procname)
+      ELSE
+      CALL Agrif_UpdateVariable
+     &     (TypeUpdate,parent,child,deb,fin)
+      ENDIF
+
+C      child % var % list_update => childtemp%var%list_update      
+C
+      deallocate(childtemp % var)
+C
+C       
+      End Subroutine Agrif_Update_4D
+C
+C
+C
+C     **************************************************************************
+CCC   Subroutine Agrif_Update_5d
+C     **************************************************************************
+C 
+      Subroutine Agrif_Update_5d(TypeUpdate,parent,child,tab,deb,fin,
+     &                           procname)
+C
+CCC   Description:
+CCC   Subroutine to update a 5D grid variable on the parent grid.
+C
+C     Declarations:
+C
+      
+C
+C     Arguments      
+      INTEGER, DIMENSION(6) :: TypeUpdate                  ! TYPE of update (copy or average)
+      TYPE(AGRIF_PVariable) :: parent        ! Variable on the parent grid
+      TYPE(AGRIF_PVariable) :: child         ! Variable on the child grid
+      TYPE(AGRIF_PVariable) :: childtemp     ! Temporary variable on the child
+      INTEGER, DIMENSION(6) :: deb,fin       ! Positions where interpolations 
+                                              ! are done on the fine grid     
+      External :: procname
+      Optional ::  procname
+              
+      REAL, DIMENSION(
+     &         child%var%lb(1):child%var%ub(1),
+     &         child%var%lb(2):child%var%ub(2),
+     &         child%var%lb(3):child%var%ub(3),
+     &         child%var%lb(4):child%var%ub(4),
+     &         child%var%lb(5):child%var%ub(5)
+     &      ),  Target :: tab  ! Results
+C
+C
+C     Definition of a temporary AGRIF_PVariable data TYPE  
+      allocate(childtemp % var)
+C
+C     Pointer on the root variable
+      childtemp % var % root_var => child % var %root_var
+C
+C     Number of dimensions of the grid variable
+      childtemp % var % nbdim = 5  
+C      
+C     Values on the current grid used for the update
+C      childtemp % var % array5 => tab      
+      
+      childtemp % var % lb = child % var % lb
+      childtemp % var % ub = child % var % ub        
+      
+C      childtemp % var % list_update => child%var%list_update      
+C
+      IF (present(procname)) THEN
+      CALL Agrif_UpdateVariable
+     &     (TypeUpdate,parent,child,deb,fin,procname)
+      ELSE
+      CALL Agrif_UpdateVariable
+     &     (TypeUpdate,parent,child,deb,fin)
+      ENDIF
+      
+C      child % var % list_update => childtemp%var%list_update
+            
+C      
+      deallocate(childtemp % var)
+C
+C       
+      End Subroutine Agrif_Update_5D
+C
+C
+C
+C
+C     **************************************************************************
+CCC   Subroutine Agrif_Update_6d
+C     **************************************************************************
+C 
+      Subroutine Agrif_Update_6d(TypeUpdate,parent,child,tab,deb,fin)
+C
+CCC   Description:
+CCC   Subroutine to update a 6D grid variable on the parent grid.
+C
+C     Declarations:
+C
+      
+C
+C     Arguments      
+      INTEGER, DIMENSION(6) :: TypeUpdate                  ! TYPE of update (copy or average)
+      TYPE(AGRIF_PVariable) :: parent        ! Variable on the parent grid
+      TYPE(AGRIF_PVariable) :: child         ! Variable on the child grid
+      TYPE(AGRIF_PVariable) :: childtemp     ! Temporary variable on the child
+      INTEGER, DIMENSION(6) :: deb,fin       ! Positions where interpolations 
+                                              ! are done on the fine grid       
+      REAL, DIMENSION(
+     &         child%var%lb(1):child%var%ub(1),
+     &         child%var%lb(2):child%var%ub(2),
+     &         child%var%lb(3):child%var%ub(3),
+     &         child%var%lb(4):child%var%ub(4),
+     &         child%var%lb(5):child%var%ub(5),
+     &         child%var%lb(6):child%var%ub(6)
+     &      ),  Target :: tab  ! Results
+C
+C
+C     Definition of a temporary AGRIF_PVariable data TYPE  
+      allocate(childtemp % var)
+C
+C     Pointer on the root variable
+      childtemp % var % root_var => child % var %root_var
+C      
+C     Number of dimensions of the grid variable
+      childtemp % var % nbdim = 6  
+C      
+C     Values on the current grid used for the update
+C      childtemp % var % array6 => tab      
+      
+      childtemp % var % lb = child % var % lb
+      childtemp % var % ub = child % var % ub  
+            
+C      childtemp % var % list_update => child%var%list_update
+C
+      Call Agrif_UpdateVariable
+     &     (TypeUpdate,parent,child,deb,fin)
+     
+C      child % var % list_update => childtemp%var%list_update
+           
+C      
+      deallocate(childtemp % var)
+C
+C       
+      End Subroutine Agrif_Update_6D
+C
+C
+C
+C     **************************************************************************  
+C     Subroutine Agrif_UpdateVariable    
+C     **************************************************************************  
+C   
+      Subroutine Agrif_UpdateVariable(TypeUpdate,parent,child,deb,fin,
+     &                   procname)   
+C
+CCC   Description:
+CCC   Subroutine to set arguments of Agrif_UpdatenD, n being the number of
+C         dimensions of the grid variable.
+C
+CC    Declarations:
+C      
+c      
+C      
+C     Scalar argument
+      INTEGER, DIMENSION(6) :: TypeUpdate                  ! TYPE of update (copy or average)
+C     Data TYPE arguments
+      TYPE(AGRIF_PVariable) :: parent   ! Variable on the parent grid
+      TYPE(AGRIF_PVariable) :: child    ! Variable on the child grid 
+      INTEGER, DIMENSION(6) :: deb,fin       ! Positions where interpolations 
+                                        !    are calculated     
+      External :: procname
+      Optional ::  procname
+      
+C
+C     Local scalars      
+      INTEGER :: nbdim                  ! Number of dimensions of the current
+                                        !    grid
+      INTEGER ,DIMENSION(6) :: pttab_child  
+      INTEGER ,DIMENSION(6) :: petab_child      
+      INTEGER ,DIMENSION(6) :: pttab_parent  
+      REAL    ,DIMENSION(6) :: s_child,s_parent
+      REAL    ,DIMENSION(6) :: ds_child,ds_parent
+      INTEGER,DIMENSION(6)          :: loctab_Child ! Indicates if the child
+                                        !    grid has a common border with 
+                                        !    the root grid            
+      TYPE(AGRIF_Variable), Pointer :: root               ! Variable on the root grid
+      INTEGER,DIMENSION(6)          :: posvartab_Child    ! Position of the
+                                        !    variable on the cell
+      INTEGER,DIMENSION(6)          :: nbtab_Child        ! Number of the cells    
+      INTEGER :: n              
+      LOGICAL :: wholeupdate
+C
+C 
+
+      loctab_child(:) = 0
+C
+      root => child % var % root_var 
+      nbdim = root % nbdim
+C
+      do n = 1,nbdim
+        posvartab_child(n) = root % posvar(n)
+      enddo
+C      
+      
+      Call PreProcessToInterpOrUpdate(parent,child,
+     &             petab_Child(1:nbdim),
+     &             pttab_Child(1:nbdim),pttab_Parent(1:nbdim),
+     &             s_Child(1:nbdim),s_Parent(1:nbdim),
+     &             ds_Child(1:nbdim),ds_Parent(1:nbdim),
+     &             nbdim)
+C
+C
+      do n = 1,nbdim
+C
+        Select case(root % interptab(n))
+C
+          case('x') ! x DIMENSION
+C
+            nbtab_Child(n) = Agrif_Curgrid % nb(1)
+C
+          case('y') ! y DIMENSION      
+C
+            nbtab_Child(n) = Agrif_Curgrid % nb(2)
+C
+          case('z') ! z DIMENSION
+C
+            nbtab_Child(n) = Agrif_Curgrid % nb(3)
+C
+          case('N') ! No space DIMENSION      
+C
+            
+            nbtab_Child(n) = child % var % ub(n) - child % var % lb(n)
+C
+C           No interpolation but only a copy of the values of the grid variable      
+C      
+            posvartab_child(n) = 1
+            
+            loctab_child(n) = -3
+C
+        End select
+C
+      enddo
+      
+C     Call to a procedure of update according to the number of dimensions of
+C     the grid variable
+
+      wholeupdate = .FALSE.
+      
+      do n=1,nbdim
+      if (loctab_child(n) /= -3) then
+        if (deb(n)>fin(n)) wholeupdate = .TRUE.
+        if ((deb(n) == -99).AND.(deb(n)==fin(n))) wholeupdate=.TRUE.
+      endif
+      enddo
+
+       IF (present(procname)) THEN
+
+          IF (wholeupdate) THEN
+
+          Call AGRIF_UpdateWhole
+     &         (TypeUpdate,parent,child,deb,fin,
+     &          pttab_Child(1:nbdim),pttab_Parent(1:nbdim),
+     &          nbtab_Child(1:nbdim),posvartab_Child(1:nbdim),
+     &          loctab_Child(1:nbdim),
+     &          s_Child(1:nbdim),s_Parent(1:nbdim),
+     &          ds_Child(1:nbdim),ds_Parent(1:nbdim),nbdim,procname)  
+         ELSE
+          Call AGRIF_UpdateBcnD
+     &         (TypeUpdate,parent,child,deb,fin,
+     &          pttab_Child(1:nbdim),pttab_Parent(1:nbdim),
+     &          nbtab_Child(1:nbdim),posvartab_Child(1:nbdim),
+     &          loctab_Child(1:nbdim),
+     &          s_Child(1:nbdim),s_Parent(1:nbdim),
+     &          ds_Child(1:nbdim),ds_Parent(1:nbdim),nbdim,procname)  
+         ENDIF
+       ELSE
+         IF (wholeupdate) THEN
+          Call AGRIF_UpdateWhole
+     &         (TypeUpdate,parent,child,deb,fin,
+     &          pttab_Child(1:nbdim),pttab_Parent(1:nbdim),
+     &          nbtab_Child(1:nbdim),posvartab_Child(1:nbdim),
+     &          loctab_Child(1:nbdim),
+     &          s_Child(1:nbdim),s_Parent(1:nbdim),
+     &          ds_Child(1:nbdim),ds_Parent(1:nbdim),nbdim)
+         ELSE
+          Call AGRIF_UpdateBcnD
+     &         (TypeUpdate,parent,child,deb,fin,
+     &          pttab_Child(1:nbdim),pttab_Parent(1:nbdim),
+     &          nbtab_Child(1:nbdim),posvartab_Child(1:nbdim),
+     &          loctab_Child(1:nbdim),
+     &          s_Child(1:nbdim),s_Parent(1:nbdim),
+     &          ds_Child(1:nbdim),ds_Parent(1:nbdim),nbdim)
+         ENDIF
+       ENDIF
+C
+      Return
+C
+C
+      End subroutine Agrif_UpdateVariable
+C
+C     **************************************************************************
+CCC   Subroutine Agrif_UpdateWhole
+C     **************************************************************************               
+C
+      Subroutine AGRIF_UpdateWhole(TypeUpdate,parent,child,deb,fin,
+     &                           pttab_child,pttab_Parent,
+     &                           nbtab_Child,posvartab_Child,
+     &                           loctab_Child,
+     &                           s_Child,s_Parent,
+     &                           ds_Child,ds_Parent,nbdim,procname)
+C
+CCC   Description:
+CCC   Subroutine to calculate the boundary conditions for a nD grid variable on 
+CCC   a fine grid by using a space and time interpolations; it is called by the 
+CCC   Agrif_CorrectVariable procedure.
+C
+C
+C     Declarations:
+C
+      
+C
+#ifdef AGRIF_MPI
+C
+#include "mpif.h"
+C
+#endif
+C
+C     Arguments
+      INTEGER, DIMENSION(6) :: TypeUpdate            ! TYPE of update (copy or
+                                                     !    average) 
+      TYPE(AGRIF_PVariable)    :: parent             ! Variable on the parent
+                                                     !    grid
+      TYPE(AGRIF_PVariable)    :: child              ! Variable on the child
+                                                     !    grid 
+      INTEGER, DIMENSION(6) :: deb, fin
+      INTEGER                  :: nbdim              ! Number of dimensions of
+                                                     !    the grid variable
+      INTEGER,DIMENSION(nbdim) :: pttab_child        ! Index of the first point
+                                                     !    inside the domain for
+                                                     !    the parent grid
+                                                     !    variable
+      INTEGER,DIMENSION(nbdim) :: pttab_Parent       ! Index of the first point
+                                                     !    inside the domain for
+                                                     !    the child grid
+                                                     !    variable
+      INTEGER,DIMENSION(nbdim) :: nbtab_Child        ! Number of cells of the
+                                                     !    child grid
+      INTEGER,DIMENSION(nbdim) :: posvartab_Child    ! Position of the grid
+                                                     !    variable (1 or 2)
+      INTEGER,DIMENSION(nbdim) :: loctab_Child       ! Indicates if the child
+                                                     !    grid has a common
+                                                     !    border with the root
+                                                     !    grid
+      REAL   ,DIMENSION(nbdim) :: s_Child,s_Parent   ! Positions of the parent
+                                                     !    and child grids 
+      REAL   ,DIMENSION(nbdim) :: ds_Child,ds_Parent ! Space steps of the parent
+                                                     !    and child grids
+      External :: procname
+      Optional ::  procname      
+C
+C     Local variables     
+      INTEGER,DIMENSION(nbdim,2)   :: lubglob
+      INTEGER                      :: i                 
+      INTEGER,DIMENSION(nbdim,2,2) :: indtab         ! Arrays indicating the
+                                                     !    limits of the child
+      INTEGER,DIMENSION(nbdim,2,2) :: indtruetab     ! grid variable where
+                                                     !   boundary conditions are
+      integer :: coeffraf
+      INTEGER :: debloc, finloc
+C
+#ifdef AGRIF_MPI
+C
+      INTEGER,DIMENSION(nbdim)   :: lb,ub
+      INTEGER,DIMENSION(nbdim,2) :: iminmaxg
+      INTEGER                    :: code
+C
+#endif
+C      
+C
+C indtab contains the limits for the fine grid points that will be used
+C in the update scheme
+
+      DO i = 1, nbdim
+        coeffraf = nint(ds_Parent(i)/ds_Child(i))
+        debloc = 0
+        finloc = nbtab_Child(i)/coeffraf - 1
+
+        IF (posvartab_child(i) == 1) THEN
+           finloc = finloc - 1
+        ENDIF
+
+        IF (deb(i) > fin(i)) THEN
+          debloc = deb(i)
+          finloc = finloc - deb(i)
+        ENDIF
+
+        indtab(i,1,1) = pttab_child(i) + (debloc + 1) * coeffraf
+        indtab(i,1,2) = pttab_child(i) + (finloc + 1) * coeffraf
+
+        IF (posvartab_child(i) == 1) THEN
+          IF (TypeUpdate(i) .EQ. Agrif_Update_Full_Weighting) THEN
+            indtab(i,1,1) = indtab(i,1,1) - (coeffraf - 1)
+            indtab(i,1,2) = indtab(i,1,2) + (coeffraf - 1)        
+          ELSE IF (TypeUpdate(i) .NE. Agrif_Update_Copy) THEN
+            indtab(i,1,1) = indtab(i,1,1) - coeffraf / 2
+            indtab(i,1,2) = indtab(i,1,2) + coeffraf / 2
+          ENDIF
+        ELSE
+          indtab(i,1,1) = indtab(i,1,1) - coeffraf
+          indtab(i,1,2) = indtab(i,1,2) - 1
+C at this point, indices are OK for an average          
+          IF ((TypeUpdate(i) .EQ. Agrif_Update_Full_Weighting)) THEN
+            indtab(i,1,1) = indtab(i,1,1) - coeffraf/2
+            indtab(i,1,2) = indtab(i,1,2) + coeffraf/2
+          ENDIF
+        ENDIF
+        IF (loctab_child(i) == -3) THEN
+           indtab(i,1,1) = pttab_child(i)
+C
+               if (posvartab_child(i) == 1) then
+C
+               indtab(i,1,2) = pttab_child(i) + nbtab_child(i) 
+C
+               else
+C
+               indtab(i,1,2) = pttab_child(i) + nbtab_child(i) - 1
+               ENDIF
+        ENDIF
+      ENDDO
+
+C lubglob contains the global lbound and ubound of the child array
+C lubglob(:,1) : global lbound for each dimension
+C lubglob(:,2) : global lbound for each dimension
+
+#if !defined AGRIF_MPI
+        Call Agrif_nbdim_Get_bound_dimension(child % var,lubglob(:,1),
+     &               lubglob(:,2),nbdim)
+C
+#else
+C     
+        Call Agrif_nbdim_Get_bound_dimension(child % var,lb,ub,nbdim)
+      DO i = 1,nbdim
+C
+        Call Agrif_Invloc(lb(i),Agrif_Procrank,i,iminmaxg(i,1))
+        Call Agrif_Invloc(ub(i),Agrif_Procrank,i,iminmaxg(i,2))
+C
+      ENDDO
+C
+      iminmaxg(1:nbdim,2) = - iminmaxg(1:nbdim,2)
+      
+      CALL MPI_ALLREDUCE(iminmaxg,lubglob,2*nbdim,MPI_INTEGER,MPI_MIN,
+     &                     MPI_COMM_WORLD,code)
+
+      lubglob(1:nbdim,2) = - lubglob(1:nbdim,2)      
+C
+#endif 
+C
+      indtruetab(1:nbdim,1,1) = max(indtab(1:nbdim,1,1),
+     &     lubglob(1:nbdim,1))
+      indtruetab(1:nbdim,1,2) = min(indtab(1:nbdim,1,2),
+     &     lubglob(1:nbdim,2))
+
+C
+C
+           IF (present(procname)) THEN
+              Call Agrif_UpdatenD              
+     &             (TypeUpdate,parent,child,
+     &              indtruetab(1:nbdim,1,1),indtruetab(1:nbdim,1,2),
+     &              pttab_child(1:nbdim),pttab_Parent(1:nbdim),
+     &              s_Child(1:nbdim),s_Parent(1:nbdim),
+     &              ds_Child(1:nbdim),ds_Parent(1:nbdim),
+     &              posvartab_child,loctab_Child,
+     &              nbdim,procname)
+           ELSE
+              Call Agrif_UpdatenD              
+     &             (TypeUpdate,parent,child,
+     &              indtruetab(1:nbdim,1,1),indtruetab(1:nbdim,1,2),
+     &              pttab_child(1:nbdim),pttab_Parent(1:nbdim),
+     &              s_Child(1:nbdim),s_Parent(1:nbdim),
+     &              ds_Child(1:nbdim),ds_Parent(1:nbdim),
+     &              posvartab_child,loctab_Child,
+     &              nbdim)           
+           ENDIF        
+C
+C      
+C  
+      End Subroutine Agrif_UpdateWhole
+C
+C     **************************************************************************
+CCC   Subroutine Agrif_UpdateBcnd
+C     **************************************************************************               
+C
+      Subroutine AGRIF_UpdateBcnd(TypeUpdate,parent,child,deb,fin,
+     &                           pttab_child,pttab_Parent,
+     &                           nbtab_Child,posvartab_Child,
+     &                           loctab_Child,
+     &                           s_Child,s_Parent,
+     &                           ds_Child,ds_Parent,nbdim,procname)
+C
+CCC   Description:
+CCC   Subroutine to calculate the boundary conditions for a nD grid variable on
+CCC   a fine grid by using a space and time interpolations; it is called by the 
+CCC   Agrif_CorrectVariable procedure.
+C
+C
+C     Declarations:
+C
+      
+C
+#ifdef AGRIF_MPI
+C
+#include "mpif.h"
+C
+#endif
+C
+C     Arguments
+      INTEGER, DIMENSION(6) :: TypeUpdate            ! TYPE of update 
+                                                     !   (copy or average) 
+      TYPE(AGRIF_PVariable)    :: parent             ! Variable on the parent
+                                                     !   grid
+      TYPE(AGRIF_PVariable)    :: child              ! Variable on the child
+                                                     !   grid 
+      INTEGER, DIMENSION(6) :: deb, fin
+      INTEGER                  :: nbdim              ! Number of dimensions of
+                                                     !   the grid variable
+      INTEGER,DIMENSION(nbdim) :: pttab_child        ! Index of the first point
+                                                     !   inside the domain for
+                                                     !   the parent grid
+                                                     !   variable
+      INTEGER,DIMENSION(nbdim) :: pttab_Parent       ! Index of the first point
+                                                     !   inside the domain for
+                                                     !   the child grid variable
+      INTEGER,DIMENSION(nbdim) :: nbtab_Child        ! Number of cells of the
+                                                     !   child grid
+      INTEGER,DIMENSION(nbdim) :: posvartab_Child    ! Position of the grid
+                                                     !   variable (1 or 2)
+      INTEGER,DIMENSION(nbdim) :: loctab_Child       ! Indicates if the child
+                                                     !   grid has a common
+                                                     !   border with the root
+                                                     !   grid
+      REAL   ,DIMENSION(nbdim) :: s_Child,s_Parent   ! Positions of the parent
+                                                     !   and child grids 
+      REAL   ,DIMENSION(nbdim) :: ds_Child,ds_Parent ! Space steps of the parent
+                                                     !   and child grids
+      External :: procname
+      Optional ::  procname      
+C
+C     Local variables
+      INTEGER,DIMENSION(nbdim,2)   :: lubglob
+      INTEGER                      :: i                 
+      INTEGER,DIMENSION(nbdim,2,2) :: indtab         ! Arrays indicating the
+                                                     !   limits of the child
+      INTEGER,DIMENSION(nbdim,2,2) :: indtruetab     ! grid variable where
+                                                     !  boundary conditions are 
+      INTEGER,DIMENSION(nbdim,2,2,nbdim)   :: ptres      ! calculated
+      INTEGER                      :: nb,ndir,n
+      integer :: coeffraf
+C
+#ifdef AGRIF_MPI
+C
+      INTEGER,DIMENSION(nbdim)   :: lb,ub
+      INTEGER,DIMENSION(nbdim,2) :: iminmaxg
+      INTEGER                    :: code
+C
+#endif
+C      
+C
+
+      DO i = 1, nbdim
+        coeffraf = nint(ds_Parent(i)/ds_Child(i))
+        indtab(i,1,1) = pttab_child(i) + (deb(i) + 1) * coeffraf
+        indtab(i,1,2) = pttab_child(i) + (fin(i) + 1) * coeffraf
+
+        indtab(i,2,1) = pttab_child(i) + nbtab_child(i)
+     &    - (fin(i) + 1) *  coeffraf
+        indtab(i,2,2) = pttab_child(i) + nbtab_child(i)
+     &    - (deb(i) + 1) *  coeffraf
+
+        IF (posvartab_child(i) == 1) THEN
+          IF (TypeUpdate(i) .EQ. Agrif_Update_Full_Weighting) THEN
+            indtab(i,:,1) = indtab(i,:,1) - (coeffraf - 1)
+            indtab(i,:,2) = indtab(i,:,2) + (coeffraf - 1)        
+          ELSE IF (TypeUpdate(i) .NE. Agrif_Update_Copy) THEN
+            indtab(i,:,1) = indtab(i,:,1) - coeffraf / 2
+            indtab(i,:,2) = indtab(i,:,2) + coeffraf / 2
+          ENDIF
+        ELSE
+          indtab(i,1,1) = indtab(i,1,1) - coeffraf
+          indtab(i,1,2) = indtab(i,1,2) - 1
+          indtab(i,2,2) = indtab(i,2,2) + coeffraf - 1
+          IF (TypeUpdate(i) .EQ. Agrif_Update_Full_Weighting) THEN
+            indtab(i,1,1) = indtab(i,1,1) - coeffraf/2
+            indtab(i,1,2) = indtab(i,1,2) + coeffraf/2
+            indtab(i,2,1) = indtab(i,2,1) - coeffraf/2
+            indtab(i,2,2) = indtab(i,2,2) + coeffraf/2
+          ENDIF          
+        ENDIF
+      ENDDO
+
+#if !defined AGRIF_MPI      
+        Call Agrif_nbdim_Get_bound_dimension(child % var,lubglob(:,1),
+     &               lubglob(:,2),nbdim)
+
+C
+#else
+C     
+        Call Agrif_nbdim_Get_bound_dimension(child % var,lb,ub,nbdim)
+      DO i = 1,nbdim
+C
+        Call Agrif_Invloc(lb(i),Agrif_Procrank,i,iminmaxg(i,1))
+        Call Agrif_Invloc(ub(i),Agrif_Procrank,i,iminmaxg(i,2))
+C
+      ENDDO
+C
+      iminmaxg(1:nbdim,2) = - iminmaxg(1:nbdim,2)
+      
+      CALL MPI_ALLREDUCE(iminmaxg,lubglob,2*nbdim,MPI_INTEGER,MPI_MIN,
+     &                     MPI_COMM_WORLD,code)  
+     
+      lubglob(1:nbdim,2) = - lubglob(1:nbdim,2)      
+C
+#endif 
+C     
+      indtruetab(1:nbdim,1,1) = max(indtab(1:nbdim,1,1),
+     &     lubglob(1:nbdim,1))
+      indtruetab(1:nbdim,1,2) = max(indtab(1:nbdim,1,2),
+     &     lubglob(1:nbdim,1))
+      indtruetab(1:nbdim,2,1) = min(indtab(1:nbdim,2,1),
+     &     lubglob(1:nbdim,2))
+      indtruetab(1:nbdim,2,2) = min(indtab(1:nbdim,2,2),
+     &     lubglob(1:nbdim,2))
+                        
+C 
+C
+      do nb = 1,nbdim
+C
+        do ndir = 1,2
+C
+          if (loctab_child(nb) /= -3) then
+C           
+              do n = 1,2
+C
+                ptres(nb,n,ndir,nb) = indtruetab(nb,ndir,n)
+C
+              enddo              
+C
+              do i = 1,nbdim
+C     
+                if (i .NE. nb) then      
+C
+                    if (loctab_child(i) == -3) then
+C
+                        ptres(i,1,ndir,nb) = pttab_child(i)
+C
+                      else
+C
+                        ptres(i,1,ndir,nb) = indtruetab(i,1,1)
+C
+                    endif
+C
+                    if (loctab_child(i) == -3) then
+C
+                        if (posvartab_child(i) == 1) then
+C
+                            ptres(i,2,ndir,nb) = pttab_child(i) 
+     &                                + nbtab_child(i)
+C
+                          else
+C
+                            ptres(i,2,ndir,nb) = pttab_child(i) 
+     &                             + nbtab_child(i) - 1
+C
+                        endif                             
+C
+                      else
+C
+                        ptres(i,2,ndir,nb) = indtruetab(i,2,2)
+C
+                    endif                        
+C      
+                endif
+C      
+              enddo
+      
+C
+            
+        endif
+      
+        enddo
+       enddo
+C
+
+C
+
+      do nb = 1,nbdim
+C
+        do ndir = 1,2                
+C
+          if (loctab_child(nb) /= -3) then
+C
+           IF (present(procname)) THEN
+              Call Agrif_UpdatenD              
+     &             (TypeUpdate,parent,child,
+     &              ptres(1:nbdim,1,ndir,nb),ptres(1:nbdim,2,ndir,nb),
+     &              pttab_child(1:nbdim),pttab_Parent(1:nbdim),
+     &              s_Child(1:nbdim),s_Parent(1:nbdim),
+     &              ds_Child(1:nbdim),ds_Parent(1:nbdim),
+     &              posvartab_Child,loctab_Child,
+     &              nbdim,procname,nb,ndir)
+           ELSE
+              Call Agrif_UpdatenD              
+     &             (TypeUpdate,parent,child,
+     &              ptres(1:nbdim,1,ndir,nb),ptres(1:nbdim,2,ndir,nb),
+     &              pttab_child(1:nbdim),pttab_Parent(1:nbdim),
+     &              s_Child(1:nbdim),s_Parent(1:nbdim),
+     &              ds_Child(1:nbdim),ds_Parent(1:nbdim),
+     &              posvartab_Child,loctab_Child,
+     &              nbdim)           
+           ENDIF
+C
+          endif
+          
+C
+        enddo       
+C
+      enddo
+C
+C      
+C  
+      End Subroutine Agrif_UpdateBcnd
+C
+C     **************************************************************************  
+CCC   Subroutine Agrif_UpdatenD  
+C     **************************************************************************  
+C  
+      Subroutine Agrif_UpdatenD(TypeUpdate,parent,child,
+     &                          pttab,petab,
+     &                          pttab_Child,pttab_Parent,
+     &                          s_Child,s_Parent,
+     &                          ds_Child,ds_Parent,
+     &                          posvartab_Child,loctab_Child,
+     &                          nbdim,procname,nb,ndir)  
+C
+C     Description:
+C     Subroutine to update a 2D grid variable on the parent grid of 
+C        the current grid. 
+C
+C     Declarations:
+C
+      
+C
+#ifdef AGRIF_MPI
+C
+#include "mpif.h"
+C
+#endif
+C
+C     Arguments
+      INTEGER                    :: nbdim
+      INTEGER, DIMENSION(6) :: TypeUpdate              ! TYPE of update 
+                                                       !  (copy or average)
+      TYPE(AGRIF_PVARIABLE)      :: parent             ! Variable of the parent
+                                                       !   grid   
+      TYPE(AGRIF_PVARIABLE)      :: child              ! Variable of the child
+                                                       !   grid
+      INTEGER,DIMENSION(nbdim)   :: pttab              ! Index of the first
+                                                       !   point inside the
+                                                       !   domain
+      INTEGER,DIMENSION(nbdim)   :: petab              ! Index of the first
+                                                       !   point inside the
+                                                       !   domain
+      INTEGER,DIMENSION(nbdim)   :: pttab_Child        ! Index of the first
+                                                       !   point inside the
+                                                       !   domain for the child
+                                                       !   grid variable
+      INTEGER,DIMENSION(nbdim)   :: pttab_Parent       ! Index of the first
+                                                       !   point inside the
+                                                       !   domain for the parent
+                                                       !   grid variable
+      REAL,DIMENSION(nbdim)      :: s_Child,s_Parent   ! Positions of the parent
+                                                       !   and child grids
+      REAL,DIMENSION(nbdim)      :: ds_Child,ds_Parent ! Space steps of the
+                                                       !   parent and child
+                                                       !   grids 
+      External :: procname
+      Optional ::  procname
+      Integer :: nb,ndir
+      Optional :: nb,ndir
+      
+C
+C     Local pointers
+      TYPE(AGRIF_PVARIABLE), SAVE      :: tempP      ! Temporary parent grid variable
+      TYPE(AGRIF_PVARIABLE), SAVE      :: tempC      ! Temporary child grid variable
+C
+C     Local scalars
+      INTEGER,DIMENSION(nbdim)    :: pttruetab,cetruetab
+      INTEGER,DIMENSION(nbdim)    :: posvartab_Child,loctab_Child
+      INTEGER,DIMENSION(nbdim)    :: indmin,indmax
+      INTEGER,DIMENSION(nbdim)    :: indminglob,indmaxglob
+      REAL   ,DIMENSION(nbdim)    :: s_Child_temp,s_Parent_temp
+cccccccc      LOGICAL,DIMENSION(nbdim)    :: noraftab
+      INTEGER,DIMENSION(nbdim)    :: lowerbound,upperbound
+      LOGICAL :: memberin, member
+      INTEGER,DIMENSION(nbdim)    :: pttruetabwhole,cetruetabwhole
+      INTEGER,DIMENSION(nbdim,2,2) :: childarray
+      INTEGER,DIMENSION(nbdim,2,2) :: parentarray
+      TYPE(AGRIF_PVARIABLE), SAVE      :: tempCextend,tempPextend ! Temporary child
+      INTEGER :: nbin, ndirin
+C
+#ifdef AGRIF_MPI
+C
+      INTEGER,DIMENSION(nbdim)    :: indminglob2,indmaxglob2
+      LOGICAL, DIMENSION(0:Agrif_Nbprocs-1) :: sendtoproc1,recvfromproc1
+      LOGICAL, DIMENSION(0:Agrif_Nbprocs-1) :: sendtoproc2,recvfromproc2      
+      INTEGER                              :: code
+      INTEGER                              :: i,j,k
+      INTEGER,DIMENSION(nbdim,4)           :: tab3
+      INTEGER,DIMENSION(nbdim,4,0:Agrif_Nbprocs-1) :: tab4
+      INTEGER,DIMENSION(nbdim,0:Agrif_Nbprocs-1,8) :: tab4t
+      INTEGER,DIMENSION(nbdim,0:Agrif_Nbprocs-1,8) :: tab5t      
+      LOGICAL :: find_list_update
+      LOGICAL, DIMENSION(0:Agrif_Nbprocs-1) :: memberinall, memberinall2
+      LOGICAL, DIMENSION(1) :: memberin1      
+C
+#endif
+C
+  
+C
+C     local lbound and ubound of the child array
+
+      Call Agrif_nbdim_Get_bound_dimension(child%var,
+     &                              lowerbound,upperbound,nbdim)
+
+C here pttab and petab corresponds to the (global) indices of the points needed
+C in the update
+C pttruetab and cetruetab contains only indices that are present
+C on the local processor
+
+      Call Agrif_Childbounds(nbdim,
+     &                       lowerbound,upperbound,
+     &                       pttab,petab,
+     &                       pttruetab,cetruetab,memberin)
+
+       Call Agrif_Prtbounds(nbdim,indminglob,indmaxglob,s_Parent_temp,
+     &                     s_Child_temp,s_Child,ds_Child,
+     &                     s_Parent,ds_Parent,
+     &                     pttab,petab,pttab_Child,
+     &                     pttab_Parent,
+     &                     posvartab_Child,TypeUpdate,loctab_Child
+#ifdef AGRIF_MPI
+     &                 ,pttruetabwhole,cetruetabwhole
+#endif
+     &     )
+
+#ifdef AGRIF_MPI
+      IF (memberin) THEN
+       Call Agrif_GlobtoLocInd2(childarray,
+     &                     lowerbound,upperbound,
+     &                     pttruetab,cetruetab,
+     &                     nbdim,Agrif_Procrank,
+     &                     member)
+
+      ENDIF
+
+
+         Call Agrif_Prtbounds(nbdim,indmin,indmax,s_Parent_temp,
+     &                     s_Child_temp,s_Child,ds_Child,
+     &                     s_Parent,ds_Parent,
+     &                     pttruetab,cetruetab,pttab_Child,
+     &                     pttab_Parent,
+     &                     posvartab_Child,TypeUpdate,loctab_Child
+     &                 ,pttruetabwhole,cetruetabwhole
+     &     )
+
+#else
+       indmin = indminglob
+       indmax = indmaxglob
+       pttruetabwhole = pttruetab
+       cetruetabwhole = cetruetab
+       childarray(:,1,2) = pttruetab
+       childarray(:,2,2) = cetruetab
+#endif
+
+       IF (present(procname)) THEN
+       IF (.Not.present(nb)) THEN
+       nbin=0
+       ndirin=0
+       ELSE
+       nbin = nb
+       ndirin = ndir
+       ENDIF
+       ENDIF
+       
+      IF (memberin) THEN
+      IF (.not.associated(tempC%var)) allocate(tempC%var)
+
+C
+      Call Agrif_nbdim_allocation(tempC%var,
+     &                 pttruetab,cetruetab,nbdim)
+
+      Call Agrif_nbdim_Full_VarEQreal(tempC%var,0.,nbdim)
+
+      IF (present(procname)) THEN
+        SELECT CASE (nbdim)
+        CASE(1)
+          CALL procname(tempC%var%array1,
+     &                          childarray(1,1,2),childarray(1,2,2),
+     &                                   .TRUE.,nbin,ndirin)
+        CASE(2)
+          CALL procname(tempC%var%array2,
+     &                          childarray(1,1,2),childarray(1,2,2),
+     &                          childarray(2,1,2),childarray(2,2,2),
+     &                                   .TRUE.,nbin,ndirin)
+        CASE(3)
+          CALL procname(tempC%var%array3,
+     &                          childarray(1,1,2),childarray(1,2,2),
+     &                          childarray(2,1,2),childarray(2,2,2),
+     &                          childarray(3,1,2),childarray(3,2,2),
+     &                                   .TRUE.,nbin,ndirin)
+        CASE(4)
+          CALL procname(tempC%var%array4,
+     &                          childarray(1,1,2),childarray(1,2,2),
+     &                          childarray(2,1,2),childarray(2,2,2),
+     &                          childarray(3,1,2),childarray(3,2,2),
+     &                          childarray(4,1,2),childarray(4,2,2),
+     &                                   .TRUE.,nbin,ndirin)
+        CASE(5)
+          CALL procname(tempC%var%array5,
+     &                          childarray(1,1,2),childarray(1,2,2),
+     &                          childarray(2,1,2),childarray(2,2,2),
+     &                          childarray(3,1,2),childarray(3,2,2),
+     &                          childarray(4,1,2),childarray(4,2,2),
+     &                          childarray(5,1,2),childarray(5,2,2),
+     &                                   .TRUE.,nbin,ndirin)
+        CASE(6)
+          CALL procname(tempC%var%array6,
+     &                          childarray(1,1,2),childarray(1,2,2),
+     &                          childarray(2,1,2),childarray(2,2,2),
+     &                          childarray(3,1,2),childarray(3,2,2),
+     &                          childarray(4,1,2),childarray(4,2,2),
+     &                          childarray(5,1,2),childarray(5,2,2),
+     &                          childarray(6,1,2),childarray(6,2,2),
+     &                                   .TRUE.,nbin,ndirin)
+        END SELECT
+      ELSE
+      Call Agrif_nbdim_VarEQvar(tempC%var,pttruetab,cetruetab,
+     &          child%var,childarray(:,1,2),childarray(:,2,2),
+     &                          nbdim)
+      ENDIF
+
+      ENDIF
+
+
+
+C
+C
+#ifdef AGRIF_MPI
+C
+C     tab2 contains the necessary limits of the parent grid for each processor
+
+      IF (Associated(child%var%list_update)) THEN
+      Call Agrif_Find_list_update(child%var%list_update,pttab,petab,
+     &                          pttab_Child,pttab_Parent,nbdim,
+     &       find_list_update,tab4t,tab5t,memberinall,memberinall2,
+     &     sendtoproc1,recvfromproc1,sendtoproc2,recvfromproc2)
+      ELSE
+      find_list_update = .FALSE.
+      ENDIF
+      
+      if (.not.find_list_update) then      
+      tab3(:,1) = pttruetab(:)
+      tab3(:,2) = cetruetab(:)
+      tab3(:,3) = pttruetabwhole(:)
+      tab3(:,4) = cetruetabwhole(:)
+C
+C
+      Call MPI_ALLGATHER(tab3,4*nbdim,MPI_INTEGER,tab4,4*nbdim,
+     &                   MPI_INTEGER,MPI_COMM_WORLD,code)
+
+      IF (.not.associated(tempCextend%var)) Allocate(tempCextend%var)
+      DO k=0,Agrif_Nbprocs-1
+       do j=1,4
+         do i=1,nbdim
+         tab4t(i,k,j) = tab4(i,j,k)
+         enddo
+       enddo
+      enddo
+      
+      memberin1(1) = memberin
+      CALL MPI_ALLGATHER(memberin1,1,MPI_LOGICAL,memberinall,
+     &                  1,MPI_LOGICAL,MPI_COMM_WORLD,code)
+ 
+       Call Get_External_Data_first(tab4t(:,:,1),
+     &            tab4t(:,:,2),
+     &            tab4t(:,:,3),tab4t(:,:,4),nbdim,memberin,memberin,
+     &            memberinall,sendtoproc1,recvfromproc1,tab4t(:,:,5),
+     & tab4t(:,:,6),tab4t(:,:,7),tab4t(:,:,8))
+               
+      endif
+
+      Call ExchangeSameLevel2(sendtoproc1,recvfromproc1,nbdim,
+     &            tab4t(:,:,3),tab4t(:,:,4),tab4t(:,:,5),tab4t(:,:,6),
+     &            tab4t(:,:,7),tab4t(:,:,8),memberin,tempC,
+     &            tempCextend) 
+           
+!      Call Get_External_Data(tempC,tempCextend,tab4t(:,:,1),
+!     &            tab4t(:,:,2),
+!     &            tab4t(:,:,3),tab4t(:,:,4),nbdim,memberin,memberin,
+!     &            memberinall)
+
+#else
+      tempCextend%var => tempC%var
+#endif
+
+C
+C
+C     Update of the parent grid (tempP) from the child grid (tempC)
+
+
+      IF (memberin) THEN
+
+      IF (.not.associated(tempP%var)) allocate(tempP%var)
+      Call Agrif_nbdim_allocation(tempP%var,
+     &                 indmin,indmax,nbdim)
+
+      if ( nbdim .EQ. 1 ) then
+         tempP%var%array1 = 0.
+         Call Agrif_Update_1D_recursive(TypeUpdate,
+     &           tempP%var%array1,tempCextend%var%array1,
+     &           indmin,indmax,
+     &           pttruetabwhole,cetruetabwhole,
+     &           s_Child_temp,s_Parent_temp,
+     &           ds_Child,ds_Parent,nbdim)
+      endif
+      if ( nbdim .EQ. 2 ) then
+         Call Agrif_Update_2D_recursive(TypeUpdate,
+     &           tempP%var%array2,tempCextend%var%array2,
+     &           indmin,indmax,
+     &           pttruetabwhole,cetruetabwhole,
+     &           s_Child_temp,s_Parent_temp,
+     &           ds_Child,ds_Parent,nbdim)
+      endif
+
+      if ( nbdim .EQ. 3 ) then
+         Call Agrif_Update_3D_recursive(TypeUpdate,
+     &           tempP%var%array3,tempCextend%var%array3,
+     &           indmin,indmax,
+     &           pttruetabwhole,cetruetabwhole,
+     &           s_Child_temp,s_Parent_temp,
+     &           ds_Child,ds_Parent,nbdim)
+      endif
+      if ( nbdim .EQ. 4 ) then
+         Call Agrif_Update_4D_recursive(TypeUpdate,
+     &           tempP%var%array4,tempCextend%var%array4,
+     &           indmin,indmax,
+     &           pttruetabwhole,cetruetabwhole,
+     &           s_Child_temp,s_Parent_temp,
+     &           ds_Child,ds_Parent,nbdim)
+      endif
+      if ( nbdim .EQ. 5 ) then
+         Call Agrif_Update_5D_recursive(TypeUpdate,
+     &           tempP%var%array5,tempCextend%var%array5,
+     &           indmin,indmax,
+     &           pttruetabwhole,cetruetabwhole,
+     &           s_Child_temp,s_Parent_temp,
+     &           ds_Child,ds_Parent,nbdim)
+      endif
+      if ( nbdim .EQ. 6 ) then
+         Call Agrif_Update_6D_recursive(TypeUpdate,
+     &           tempP%var%array6,tempCextend%var%array6,
+     &           indmin,indmax,
+     &           pttruetabwhole,cetruetabwhole,
+     &           s_Child_temp,s_Parent_temp,
+     &           ds_Child,ds_Parent,nbdim)
+      endif
+
+      Call Agrif_nbdim_deallocation(tempCextend%var,nbdim)
+C      Deallocate(tempCextend%var)
+
+      ENDIF
+
+#ifdef AGRIF_MPI
+      Call Agrif_nbdim_Get_bound_dimension(parent%var,
+     &                              lowerbound,upperbound,nbdim)
+
+      Call Agrif_ChildGrid_to_ParentGrid()
+C
+      Call Agrif_Childbounds(nbdim,
+     &                       lowerbound,upperbound,
+     &                       indminglob,indmaxglob,
+     &                       indminglob2,indmaxglob2,member)
+C
+      IF (member) THEN
+      Call Agrif_GlobtoLocInd2(parentarray,
+     &                     lowerbound,upperbound,
+     &                     indminglob2,indmaxglob2,
+     &                     nbdim,Agrif_Procrank,
+     &                     member)
+      ENDIF
+
+      Call Agrif_ParentGrid_to_ChildGrid()
+
+      if (.not.find_list_update) then
+      tab3(:,1) = indmin(:)
+      tab3(:,2) = indmax(:)
+      tab3(:,3) = indminglob2(:)
+      tab3(:,4) = indmaxglob2(:)
+C
+      Call MPI_ALLGATHER(tab3,4*nbdim,MPI_INTEGER,tab4,4*nbdim,
+     &                   MPI_INTEGER,MPI_COMM_WORLD,code)
+
+      IF (.not.associated(tempPextend%var)) Allocate(tempPextend%var)
+      DO k=0,Agrif_Nbprocs-1
+       do j=1,4
+         do i=1,nbdim
+         tab5t(i,k,j) = tab4(i,j,k)
+         enddo
+       enddo
+      enddo
+ 
+      memberin1(1) = member
+      CALL MPI_ALLGATHER(memberin1,1,MPI_LOGICAL,memberinall2,
+     &                  1,MPI_LOGICAL,MPI_COMM_WORLD,code)
+ 
+      Call Get_External_Data_first(tab5t(:,:,1),
+     &            tab5t(:,:,2),
+     &            tab5t(:,:,3),tab5t(:,:,4),nbdim,memberin,member,
+     &            memberinall2,sendtoproc2,recvfromproc2,tab5t(:,:,5),
+     & tab5t(:,:,6),tab5t(:,:,7),tab5t(:,:,8))
+          
+      Call Agrif_Addto_list_update(child%var%list_update,pttab,petab,
+     &                          pttab_Child,pttab_Parent,nbdim
+     &   ,tab4t,tab5t,memberinall,memberinall2,
+     &   sendtoproc1,recvfromproc1,sendtoproc2,recvfromproc2) 
+          
+      endif
+      
+c      Call Get_External_Data(tempP,tempPextend,tab5t(:,:,1),
+c     &            tab5t(:,:,2),
+c     &            tab5t(:,:,3),tab5t(:,:,4),nbdim,memberin,member,
+c     &            memberinall2)
+     
+      Call ExchangeSameLevel2(sendtoproc2,recvfromproc2,nbdim,
+     &            tab5t(:,:,3),tab5t(:,:,4),tab5t(:,:,5),tab5t(:,:,6),
+     &            tab5t(:,:,7),tab5t(:,:,8),member,tempP,
+     &            tempPextend)     
+
+#else
+      tempPextend%var => tempP%var
+      parentarray(:,1,1) = indmin
+      parentarray(:,2,1) = indmax
+      parentarray(:,1,2) = indmin
+      parentarray(:,2,2) = indmax
+      member = .TRUE.
+#endif
+
+C
+C
+C
+C     Special values on the child grid
+      if (Agrif_UseSpecialValueFineGrid) then
+C
+ccc         noraftab(1:nbdim) =
+ccc     &    child % var % root_var % interptab(1:nbdim) .EQ. 'N'
+C
+#ifdef AGRIF_MPI
+C
+c          Allocate(childvalues% var)
+C
+c          Call Agrif_nbdim_allocation(childvalues%var,
+c     &                      pttruetab,cetruetab,nbdim)
+c          Call Agrif_nbdim_Full_VarEQvar(childvalues% var,
+c     &                                tempC% var,
+c     &                                nbdim)
+c          Call Agrif_CheckMasknD(tempC,childvalues,
+c     &                           pttruetab(1:nbdim),cetruetab(1:nbdim),
+c     &                           pttruetab(1:nbdim),cetruetab(1:nbdim),
+c     &                           noraftab(1:nbdim),nbdim)
+c          Call Agrif_nbdim_deallocation(childvalues% var,nbdim)
+c         Deallocate(childvalues % var)
+C
+#else
+C
+c          Call Agrif_nbdim_Get_bound_dimension(child%var,
+c     &                              lowerbound,upperbound,nbdim)
+c          Call Agrif_CheckMasknD(tempC,child,
+c     &                           pttruetab(1:nbdim),cetruetab(1:nbdim),
+c     &                           lowerbound,
+c     &                           upperbound,
+c     &                           noraftab(1:nbdim),nbdim)
+C
+#endif
+C
+      endif
+
+
+C
+C
+C
+C
+C     Special values on the parent grid
+      if (Agrif_UseSpecialValue) then
+C
+#ifdef AGRIF_MPI
+C
+c          Call GiveAgrif_SpecialValueToTab_mpi(parent%var,tempP%var,
+c     &                 parentarray,
+c     &                 indmin,indmax,
+c     &                 Agrif_SpecialValue,nbdim)
+C
+C
+#else
+C
+c          Call GiveAgrif_SpecialValueToTab(parent%var,tempP%var,
+c     &                  indmin,indmax,
+c     &                  Agrif_SpecialValue,nbdim)
+C
+#endif
+C
+C
+      endif   
+C
+C
+        IF (member) THEN
+
+          IF (present(procname)) THEN
+            CALL Agrif_ChildGrid_to_ParentGrid()
+            SELECT CASE(nbdim)
+            CASE(1)
+            CALL procname(
+     &      tempPextend%var%array1(
+     &                      parentarray(1,1,1):parentarray(1,2,1)),
+     &                      parentarray(1,1,2),parentarray(1,2,2),
+     &                                   .FALSE.,nbin,ndirin
+     &                      )
+            CASE(2)
+            CALL procname(
+     &      tempPextend%var%array2(
+     &                      parentarray(1,1,1):parentarray(1,2,1),
+     &                      parentarray(2,1,1):parentarray(2,2,1)),
+     &                      parentarray(1,1,2),parentarray(1,2,2),
+     &                      parentarray(2,1,2),parentarray(2,2,2),
+     &                                   .FALSE.,nbin,ndirin
+     &                      )
+            CASE(3)
+            CALL procname(
+     &      tempPextend%var%array3(
+     &                      parentarray(1,1,1):parentarray(1,2,1),
+     &                      parentarray(2,1,1):parentarray(2,2,1),
+     &                      parentarray(3,1,1):parentarray(3,2,1)),
+     &                      parentarray(1,1,2),parentarray(1,2,2),
+     &                      parentarray(2,1,2),parentarray(2,2,2),
+     &                      parentarray(3,1,2),parentarray(3,2,2),
+     &                                   .FALSE.,nbin,ndirin
+     &                      )
+            CASE(4)
+            CALL procname(
+     &      tempPextend%var%array4(
+     &                      parentarray(1,1,1):parentarray(1,2,1),
+     &                      parentarray(2,1,1):parentarray(2,2,1),
+     &                      parentarray(3,1,1):parentarray(3,2,1),
+     &                      parentarray(4,1,1):parentarray(4,2,1)),
+     &                      parentarray(1,1,2),parentarray(1,2,2),
+     &                      parentarray(2,1,2),parentarray(2,2,2),
+     &                      parentarray(3,1,2),parentarray(3,2,2),
+     &                      parentarray(4,1,2),parentarray(4,2,2),
+     &                                   .FALSE.,nbin,ndirin
+     &                      )
+            CASE(5)
+            CALL procname(
+     &      tempPextend%var%array5(
+     &                      parentarray(1,1,1):parentarray(1,2,1),
+     &                      parentarray(2,1,1):parentarray(2,2,1),
+     &                      parentarray(3,1,1):parentarray(3,2,1),
+     &                      parentarray(4,1,1):parentarray(4,2,1),
+     &                      parentarray(5,1,1):parentarray(5,2,1)),
+     &                      parentarray(1,1,2),parentarray(1,2,2),
+     &                      parentarray(2,1,2),parentarray(2,2,2),
+     &                      parentarray(3,1,2),parentarray(3,2,2),
+     &                      parentarray(4,1,2),parentarray(4,2,2),
+     &                      parentarray(5,1,2),parentarray(5,2,2),
+     &                                   .FALSE.,nbin,ndirin
+     &                      )
+            CASE(6)
+            CALL procname(
+     &      tempPextend%var%array6(
+     &                      parentarray(1,1,1):parentarray(1,2,1),
+     &                      parentarray(2,1,1):parentarray(2,2,1),
+     &                      parentarray(3,1,1):parentarray(3,2,1),
+     &                      parentarray(4,1,1):parentarray(4,2,1),
+     &                      parentarray(5,1,1):parentarray(5,2,1),
+     &                      parentarray(6,1,1):parentarray(6,2,1)),
+     &                      parentarray(1,1,2),parentarray(1,2,2),
+     &                      parentarray(2,1,2),parentarray(2,2,2),
+     &                      parentarray(3,1,2),parentarray(3,2,2),
+     &                      parentarray(4,1,2),parentarray(4,2,2),
+     &                      parentarray(5,1,2),parentarray(5,2,2),
+     &                      parentarray(6,1,2),parentarray(6,2,2),
+     &                                   .FALSE.,nbin,ndirin
+     &                      )
+            END SELECT
+            CALL Agrif_ParentGrid_to_ChildGrid()
+          ELSE
+            SELECT CASE(nbdim)
+            CASE(1)
+            parent%var%array1(parentarray(1,1,2):parentarray(1,2,2)) =
+     &      tempPextend%var%array1(
+     &                      parentarray(1,1,1):parentarray(1,2,1))
+            CASE(2)
+            parent%var%array2(parentarray(1,1,2):parentarray(1,2,2),
+     &                      parentarray(2,1,2):parentarray(2,2,2)) =
+     &      tempPextend%var%array2(
+     &                      parentarray(1,1,1):parentarray(1,2,1),
+     &                      parentarray(2,1,1):parentarray(2,2,1))
+            CASE(3)
+            parent%var%array3(parentarray(1,1,2):parentarray(1,2,2),
+     &                      parentarray(2,1,2):parentarray(2,2,2),
+     &                      parentarray(3,1,2):parentarray(3,2,2)) =
+     &      tempPextend%var%array3(
+     &                      parentarray(1,1,1):parentarray(1,2,1),
+     &                      parentarray(2,1,1):parentarray(2,2,1),
+     &                      parentarray(3,1,1):parentarray(3,2,1))
+            CASE(4)
+            parent%var%array4(parentarray(1,1,2):parentarray(1,2,2),
+     &                      parentarray(2,1,2):parentarray(2,2,2),
+     &                      parentarray(3,1,2):parentarray(3,2,2),
+     &                      parentarray(4,1,2):parentarray(4,2,2)) =
+     &      tempPextend%var%array4(
+     &                      parentarray(1,1,1):parentarray(1,2,1),
+     &                      parentarray(2,1,1):parentarray(2,2,1),
+     &                      parentarray(3,1,1):parentarray(3,2,1),
+     &                      parentarray(4,1,1):parentarray(4,2,1))
+            CASE(5)
+            parent%var%array5(parentarray(1,1,2):parentarray(1,2,2),
+     &                      parentarray(2,1,2):parentarray(2,2,2),
+     &                      parentarray(3,1,2):parentarray(3,2,2),
+     &                      parentarray(4,1,2):parentarray(4,2,2),
+     &                      parentarray(5,1,2):parentarray(5,2,2)) =
+     &      tempPextend%var%array5(
+     &                      parentarray(1,1,1):parentarray(1,2,1),
+     &                      parentarray(2,1,1):parentarray(2,2,1),
+     &                      parentarray(3,1,1):parentarray(3,2,1),
+     &                      parentarray(4,1,1):parentarray(4,2,1),
+     &                      parentarray(5,1,1):parentarray(5,2,1))
+            CASE(6)
+            parent%var%array6(parentarray(1,1,2):parentarray(1,2,2),
+     &                      parentarray(2,1,2):parentarray(2,2,2),
+     &                      parentarray(3,1,2):parentarray(3,2,2),
+     &                      parentarray(4,1,2):parentarray(4,2,2),
+     &                      parentarray(5,1,2):parentarray(5,2,2),
+     &                      parentarray(6,1,2):parentarray(6,2,2)) =
+     &      tempPextend%var%array6(
+     &                      parentarray(1,1,1):parentarray(1,2,1),
+     &                      parentarray(2,1,1):parentarray(2,2,1),
+     &                      parentarray(3,1,1):parentarray(3,2,1),
+     &                      parentarray(4,1,1):parentarray(4,2,1),
+     &                      parentarray(5,1,1):parentarray(5,2,1),
+     &                      parentarray(6,1,1):parentarray(6,2,1))
+            END SELECT
+          ENDIF
+
+        Call Agrif_nbdim_deallocation(tempPextend%var,nbdim)
+       ENDIF
+C
+C
+C     Deallocations
+
+      IF (memberin) THEN
+#ifdef AGRIF_MPI
+      Call Agrif_nbdim_deallocation(tempP%var,nbdim)
+      Call Agrif_nbdim_deallocation(tempC%var,nbdim)
+!      Deallocate(tempC % var)
+#endif
+!      Deallocate(tempP % var)
+      ENDIF
+#ifdef AGRIF_MPI
+!      Deallocate(tempPextend%var)
+!      IF (.Not.memberin) Deallocate(tempCextend%var)
+#endif
+
+C
+C
+      End Subroutine Agrif_UpdatenD
+C
+C
+C     **************************************************************************
+CCC   Subroutine Agrif_Prtbounds
+C     **************************************************************************
+C
+      Subroutine Agrif_Prtbounds(nbdim,indmin,indmax,s_Parent_temp,
+     &                              s_Child_temp,s_Child,ds_Child,
+     &                              s_Parent,ds_Parent,
+     &                              pttruetab,cetruetab,pttab_Child,
+     &                              pttab_Parent,
+     &                              posvartab_child,TypeUpdate,
+     &                              loctab_Child
+#ifdef AGRIF_MPI
+     &                 ,pttruetabwhole,cetruetabwhole
+#endif
+     &                 )
+C
+CCC   Description:
+CCC   Subroutine calculating the bounds of the parent grid to be updated
+CCC   by the child grid     
+C
+C
+C     Declarations:
+C
+      
+C
+#ifdef AGRIF_MPI
+cccccccccccccccccccccccccc#include "mpif.h"
+#endif
+C
+C     Arguments
+      INTEGER :: nbdim
+      INTEGER,DIMENSION(nbdim) :: indmin,indmax
+      REAL,DIMENSION(nbdim) :: s_Parent_temp,s_child_temp
+      REAL,DIMENSION(nbdim) :: s_Child,ds_child
+      REAL,DIMENSION(nbdim) :: s_Parent,ds_Parent
+      INTEGER,DIMENSION(nbdim) :: pttruetab,cetruetab
+      INTEGER,DIMENSION(nbdim) :: posvartab_child,TypeUpdate
+      INTEGER,DIMENSION(nbdim) :: loctab_Child
+      INTEGER,DIMENSION(nbdim) :: pttab_Child,pttab_Parent
+C
+C     Local variables
+      INTEGER :: i
+      REAL,DIMENSION(nbdim) :: dim_newmin,dim_newmax      
+#ifdef AGRIF_MPI
+      INTEGER,DIMENSION(nbdim)    :: pttruetabwhole,cetruetabwhole
+      REAL :: positionmin,positionmax
+      INTEGER :: imin,imax
+      INTEGER :: coeffraf
+#endif
+C
+C
+      do i = 1,nbdim
+C
+        dim_newmin(i) = s_Child(i) + (pttruetab(i) -
+     &                                pttab_Child(i)) * ds_Child(i)
+C
+        dim_newmax(i) = s_Child(i) + (cetruetab(i) - 
+     &                                pttab_Child(i)) * ds_Child(i)
+C     
+        indmin(i) = pttab_Parent(i) +
+     &        agrif_ceiling((dim_newmin(i)-s_Parent(i))/ds_Parent(i))
+C
+        indmax(i) = pttab_Parent(i) +
+     &        agrif_int((dim_newmax(i)-s_Parent(i))/ds_Parent(i))
+C
+#ifdef AGRIF_MPI
+        positionmin = s_Parent(i) + (indmin(i)-
+     &                          pttab_Parent(i))*ds_Parent(i)
+        IF (loctab_Child(i) .NE. -3) THEN
+        IF (posvartab_child(i) == 1) THEN
+          IF (TypeUpdate(i) .EQ. Agrif_Update_Average) THEN
+          positionmin = positionmin - ds_Parent(i)/2.
+          ELSE IF (TypeUpdate(i) .EQ. Agrif_Update_Full_Weighting) THEN
+          positionmin = positionmin - (ds_Parent(i)-ds_Child(i))
+          ENDIF
+        ELSE
+          IF (TypeUpdate(i).NE.Agrif_Update_Full_Weighting) THEN
+            positionmin = positionmin - ds_Parent(i)/2.
+          ELSE
+          coeffraf = nint(ds_Parent(i)/ds_Child(i))
+          if (mod(coeffraf,2) == 1) then
+            positionmin = positionmin - (ds_Parent(i)-ds_Child(i))
+          else
+            positionmin = positionmin - (ds_Parent(i)-ds_Child(i))-ds_Child(i)/2.
+          endif
+          ENDIF
+        ENDIF
+        ENDIF
+        imin = pttab_Child(i) +
+     &        agrif_ceiling((positionmin-s_Child(i))/ds_Child(i))
+
+       positionmin = s_Child(i) + (imin -
+     &                                pttab_Child(i)) * ds_Child(i)
+
+        pttruetabwhole(i) = imin
+
+        positionmax = s_Parent(i) + (indmax(i)-
+     &                          pttab_Parent(i))*ds_Parent(i)
+        IF (loctab_Child(i) .NE. -3) THEN
+        IF (posvartab_child(i) == 1) THEN
+          IF (TypeUpdate(i) .EQ. Agrif_Update_Average) THEN
+        positionmax = positionmax  + ds_Parent(i)/2.
+          ELSE IF (TypeUpdate(i) .EQ. Agrif_Update_Full_Weighting) THEN
+          positionmax = positionmax  + (ds_Parent(i)-ds_Child(i))
+          ENDIF
+        ELSE
+          IF (TypeUpdate(i).NE.Agrif_Update_Full_Weighting) THEN        
+            positionmax = positionmax  + ds_Parent(i)/2.
+          ELSE
+          coeffraf = nint(ds_Parent(i)/ds_Child(i))
+          if (mod(coeffraf,2) == 1) then
+            positionmax = positionmax + (ds_Parent(i)-ds_Child(i))
+          else
+            positionmax = positionmax + (ds_Parent(i)-ds_Child(i)) + ds_Child(i)/2.
+          endif
+
+          ENDIF        
+        ENDIF
+        ENDIF
+        imax = pttab_Child(i) +
+     &        agrif_int((positionmax-s_Child(i))/ds_Child(i))
+
+        positionmax = s_Child(i) + (imax -
+     &                                pttab_Child(i)) * ds_Child(i)
+
+        cetruetabwhole(i) = imax
+
+#endif
+C
+        s_Parent_temp(i) = s_Parent(i) + 
+     &                     (indmin(i) - pttab_Parent(i)) * 
+     &                      ds_Parent(i) 
+C     
+        s_Child_temp(i) = dim_newmin(i)
+
+#ifdef AGRIF_MPI
+        s_Child_temp(i) = positionmin
+#endif
+C
+      enddo
+C
+      Return
+C
+C
+      End Subroutine Agrif_Prtbounds
+C
+C
+C
+C
+
+C
+C
+C
+C     **************************************************************************  
+CCC   Subroutine Agrif_Update_2D_Recursive 
+C     **************************************************************************
+C
+      Subroutine Agrif_Update_2D_recursive(TypeUpdate,tempP,tempC,
+     &                                     indmin,indmax,
+     &                                     pttab_child,petab_child,
+     &                                     s_child,s_parent,
+     &                                     ds_child,ds_parent,nbdim)
+C
+CCC   Description:
+CCC   Subroutine to update a 2D grid variable on the parent grid. 
+CCC   It calls Agrif_Update_1D_Recursive and Agrif_UpdateBase.   
+C
+CC    Method:
+C
+C     Declarations:
+C
+      
+C     
+      INTEGER                   :: nbdim
+      INTEGER, DIMENSION(nbdim) :: TypeUpdate            ! TYPE of update (copy or average)
+      INTEGER, DIMENSION(nbdim) :: indmin,indmax
+      INTEGER, DIMENSION(nbdim) :: pttab_child,petab_child
+      REAL, DIMENSION(nbdim)    :: s_child,s_parent
+      REAL, DIMENSION(nbdim)    :: ds_child,ds_parent
+      REAL, DIMENSION(indmin(1):indmax(1),
+     &                indmin(2):indmax(2))           :: tempP
+C      REAL, DIMENSION(pttab_child(1):petab_child(1),
+C     &                pttab_child(2):petab_child(2)) :: tempC
+     
+      REAL, DIMENSION(:,:) :: tempC     
+C
+C     Local variables      
+      REAL, DIMENSION(indmin(1):indmax(1),
+     &                 pttab_child(2):petab_child(2)) :: tabtemp
+      REAL, DIMENSION(indmin(2):indmax(2),
+     &                indmin(1):indmax(1))           :: tempP_trsp
+      REAL, DIMENSION(pttab_child(2):petab_child(2),
+     &                 indmin(1):indmax(1)) :: tabtemp_trsp
+      INTEGER :: i,j
+      INTEGER :: coeffraf,locind_child_left
+C
+      tabtemp = 0.
+
+
+      coeffraf = nint ( ds_parent(1) / ds_child(1) ) 
+      IF((TypeUpdate(1) == AGRIF_Update_average) 
+     &                 .AND. (coeffraf /= 1 ))THEN
+!---CDIR NEXPAND
+         IF(.NOT. precomputedone(1) ) Call average1Dprecompute2D
+     &       (petab_child(2)-pttab_child(2)+1,
+     &        indmax(1)-indmin(1)+1,
+     &        petab_child(1)-pttab_child(1)+1,
+     &        s_parent(1),s_child(1),ds_parent(1),ds_child(1),1)
+!---CDIR NEXPAND
+          Call average1Daftercompute
+     &       (  tabtemp, tempC,
+     &          size(tabtemp), size(tempC),
+     &          s_parent(1),s_child(1),ds_parent(1),ds_child(1),1)
+ 
+      ELSEIF((TypeUpdate(1) == AGRIF_Update_copy)
+     &                 .AND. (coeffraf /= 1 ))THEN
+!---CDIR NEXPAND
+         IF(.NOT. precomputedone(1) ) Call copy1Dprecompute2D
+     &       (petab_child(2)-pttab_child(2)+1,
+     &        indmax(1)-indmin(1)+1,
+     &        petab_child(1)-pttab_child(1)+1,
+     &        s_parent(1),s_child(1),ds_parent(1),ds_child(1),1)
+!---CDIR NEXPAND
+          Call copy1Daftercompute
+     &       (  tabtemp, tempC,
+     &          size(tabtemp), size(tempC),
+     &          s_parent(1),s_child(1),ds_parent(1),ds_child(1),1)
+
+      ELSE
+      do j = pttab_child(nbdim),petab_child(nbdim)
+C
+!---CDIR NEXPAND
+        Call Agrif_Update_1D_recursive(TypeUpdate(1:nbdim-1),    
+     &         tabtemp(:,j),
+     &         tempC(:,j-pttab_child(nbdim)+1),
+     &         indmin(1:nbdim-1),indmax(1:nbdim-1),
+     &         pttab_child(1:nbdim-1),petab_child(1:nbdim-1),
+     &         s_child(1:nbdim-1),s_parent(1:nbdim-1),
+     &         ds_child(1:nbdim-1),ds_parent(1:nbdim-1),nbdim-1)
+C
+      enddo
+      ENDIF
+      tabtemp_trsp = TRANSPOSE(tabtemp) 
+      coeffraf = nint(ds_parent(nbdim)/ds_child(nbdim))
+    
+!---CDIR NEXPAND
+      Call Agrif_Compute_nbdim_update(s_parent(nbdim),s_child(nbdim),
+     &  ds_parent(nbdim),ds_child(nbdim),coeffraf,locind_child_left)
+C
+      
+      tempP_trsp = 0. 
+
+      IF((TypeUpdate(2) == AGRIF_Update_average)
+     &                .AND. (coeffraf /= 1 ))THEN
+!---CDIR NEXPAND
+         IF(.NOT. precomputedone(2) ) Call average1Dprecompute2D
+     &      ( indmax(1)-indmin(1)+1,
+     &        indmax(2)-indmin(2)+1,
+     &        petab_child(2)-pttab_child(2)+1,
+     &        s_parent(2),s_child(2),ds_parent(2),ds_child(2),2)
+!---CDIR NEXPAND
+          Call average1Daftercompute
+     &       (  tempP_trsp, tabtemp_trsp,
+     &          size(tempP_trsp), size(tabtemp_trsp),
+     &          s_parent(2),s_child(2),ds_parent(2),ds_child(2),2)
+
+      ELSEIF((TypeUpdate(2) == AGRIF_Update_copy)
+     &                .AND. (coeffraf /= 1 ))THEN
+!---CDIR NEXPAND
+         IF(.NOT. precomputedone(2) ) Call copy1Dprecompute2D
+     &      ( indmax(1)-indmin(1)+1,
+     &        indmax(2)-indmin(2)+1,
+     &        petab_child(2)-pttab_child(2)+1,
+     &        s_parent(2),s_child(2),ds_parent(2),ds_child(2),2)
+!---CDIR NEXPAND
+          Call copy1Daftercompute
+     &       (  tempP_trsp, tabtemp_trsp,
+     &          size(tempP_trsp), size(tabtemp_trsp),
+     &          s_parent(2),s_child(2),ds_parent(2),ds_child(2),2)
+
+      ELSE
+
+      do i = indmin(1),indmax(1)
+C
+!---CDIR NEXPAND
+        Call Agrif_UpdateBase(TypeUpdate(2),
+     &           tempP_trsp(indmin(nbdim):indmax(nbdim),i),
+     &          tabtemp_trsp(pttab_child(nbdim):petab_child(nbdim),i),
+     &           indmin(nbdim),indmax(nbdim),
+     &           pttab_child(nbdim),petab_child(nbdim),
+     &           s_parent(nbdim),s_child(nbdim),
+     &           ds_parent(nbdim),ds_child(nbdim),
+     &                  coeffraf,locind_child_left)
+C        
+      enddo
+      
+      ENDIF
+
+      tempP = TRANSPOSE(tempP_trsp)
+C
+      Return
+C
+C
+      End Subroutine Agrif_Update_2D_recursive
+C
+C
+C
+C     **************************************************************************  
+CCC   Subroutine Agrif_Update_3D_Recursive 
+C     **************************************************************************
+C
+      Subroutine Agrif_Update_3D_recursive(TypeUpdate,tempP,tempC,
+     &                                     indmin,indmax,   
+     &                                     pttab_child,petab_child,
+     &                                     s_child,s_parent,
+     &                                     ds_child,ds_parent,nbdim)
+C
+CCC   Description:
+CCC   Subroutine to update a 3D grid variable on the parent grid. 
+CCC   It calls Agrif_Update_2D_Recursive and Agrif_UpdateBase.   
+C
+CC    Method:
+C
+C     Declarations:
+C
+      
+C     
+      INTEGER                   :: nbdim
+      INTEGER, DIMENSION(nbdim) :: TypeUpdate            ! TYPE of update (copy or average)
+      INTEGER, DIMENSION(nbdim) :: indmin,indmax
+      INTEGER, DIMENSION(nbdim) :: pttab_child,petab_child
+      REAL, DIMENSION(nbdim)    :: s_child,s_parent
+      REAL, DIMENSION(nbdim)    :: ds_child,ds_parent
+      REAL, DIMENSION(indmin(1):indmax(1),
+     &                indmin(2):indmax(2),
+     &                indmin(3):indmax(3))           :: tempP
+      REAL, DIMENSION(pttab_child(1):petab_child(1),
+     &                pttab_child(2):petab_child(2),
+     &                pttab_child(3):petab_child(3)) :: tempC
+C
+C     Local variables      
+      REAL, DIMENSION(indmin(1):indmax(1),
+     &                 indmin(2):indmax(2), 
+     &                 pttab_child(3):petab_child(3)) :: tabtemp
+      INTEGER :: i,j,k
+      INTEGER :: coeffraf,locind_child_left
+      INTEGER :: kdeb
+C
+C
+      coeffraf = nint ( ds_parent(1) / ds_child(1) )
+      IF((TypeUpdate(1) == AGRIF_Update_average)
+     &                 .AND. (coeffraf /= 1 ))THEN
+!---CDIR NEXPAND
+         Call average1Dprecompute2D
+     &       (petab_child(2)-pttab_child(2)+1,
+     &        indmax(1)-indmin(1)+1,
+     &        petab_child(1)-pttab_child(1)+1,
+     &        s_parent(1),s_child(1),ds_parent(1),ds_child(1),1)
+      precomputedone(1) = .TRUE.
+      ELSEIF((TypeUpdate(1) == AGRIF_Update_copy)
+     &                 .AND. (coeffraf /= 1 ))THEN
+!---CDIR NEXPAND
+         Call copy1Dprecompute2D
+     &       (petab_child(2)-pttab_child(2)+1,
+     &        indmax(1)-indmin(1)+1,
+     &        petab_child(1)-pttab_child(1)+1,
+     &        s_parent(1),s_child(1),ds_parent(1),ds_child(1),1)
+      precomputedone(1) = .TRUE.
+      ENDIF
+
+      coeffraf = nint ( ds_parent(2) / ds_child(2) )
+      IF((TypeUpdate(2) == AGRIF_Update_average)
+     &                .AND. (coeffraf /= 1 ))THEN
+!---CDIR NEXPAND
+         Call average1Dprecompute2D
+     &      ( indmax(1)-indmin(1)+1,
+     &        indmax(2)-indmin(2)+1,
+     &        petab_child(2)-pttab_child(2)+1,
+     &        s_parent(2),s_child(2),ds_parent(2),ds_child(2),2)
+      precomputedone(2) = .TRUE.
+      ELSEIF((TypeUpdate(2) == AGRIF_Update_copy)
+     &                .AND. (coeffraf /= 1 ))THEN
+!---CDIR NEXPAND
+         Call copy1Dprecompute2D
+     &      ( indmax(1)-indmin(1)+1,
+     &        indmax(2)-indmin(2)+1,
+     &        petab_child(2)-pttab_child(2)+1,
+     &        s_parent(2),s_child(2),ds_parent(2),ds_child(2),2)
+      precomputedone(2) = .TRUE.
+      ENDIF
+
+
+      do k = pttab_child(nbdim),petab_child(nbdim)
+C
+        Call Agrif_Update_2D_recursive(TypeUpdate(1:nbdim-1),    
+     &         tabtemp(:,:,k),
+     &         tempC(:,:,k),
+     &         indmin(1:nbdim-1),indmax(1:nbdim-1),
+     &         pttab_child(1:nbdim-1),petab_child(1:nbdim-1),
+     &         s_child(1:nbdim-1),s_parent(1:nbdim-1),
+     &         ds_child(1:nbdim-1),ds_parent(1:nbdim-1),nbdim-1)
+C
+      enddo
+C
+      precomputedone(1) = .FALSE.
+      precomputedone(2) = .FALSE.
+      coeffraf = nint ( ds_parent(3) / ds_child(3) )
+
+      Call Agrif_Compute_nbdim_update(s_parent(nbdim),s_child(nbdim),
+     &  ds_parent(nbdim),ds_child(nbdim),coeffraf,locind_child_left)
+      
+      IF (coeffraf == 1) THEN
+      
+      kdeb = pttab_child(3)+locind_child_left-2
+      do k=indmin(3),indmax(3)
+      kdeb = kdeb + 1
+      do j = indmin(2),indmax(2)
+        do i = indmin(1),indmax(1)
+        tempP(i,j,k) = tabtemp(i,j,kdeb)
+      enddo
+      enddo
+      enddo
+              
+      ELSE
+      tempP = 0.
+C
+      do j = indmin(2),indmax(2)
+C
+        do i = indmin(1),indmax(1)
+C
+          Call Agrif_UpdateBase(TypeUpdate(3),
+     &           tempP(i,j,:),
+     &          tabtemp(i,j,:),
+     &           indmin(nbdim),indmax(nbdim),
+     &           pttab_child(nbdim),petab_child(nbdim),
+     &           s_parent(nbdim),s_child(nbdim),
+     &           ds_parent(nbdim),ds_child(nbdim),
+     &                  coeffraf,locind_child_left)
+C
+        enddo 
+C        
+      enddo
+      ENDIF
+C
+      Return
+C
+C
+      End Subroutine Agrif_Update_3D_recursive
+C
+C
+C
+C     **************************************************************************  
+CCC   Subroutine Agrif_Update_4D_Recursive 
+C     **************************************************************************
+C
+      Subroutine Agrif_Update_4D_recursive(TypeUpdate,tempP,tempC,
+     &                                     indmin,indmax,   
+     &                                     pttab_child,petab_child,
+     &                                     s_child,s_parent,
+     &                                     ds_child,ds_parent,nbdim)
+C
+CCC   Description:
+CCC   Subroutine to update a 4D grid variable on the parent grid. 
+CCC   It calls Agrif_Update_3D_Recursive and Agrif_UpdateBase.    
+C
+CC    Method:
+C
+C     Declarations:
+C
+      
+C     
+      INTEGER                   :: nbdim
+      INTEGER, DIMENSION(nbdim) :: TypeUpdate            ! TYPE of update (copy or average)
+      INTEGER, DIMENSION(nbdim) :: indmin,indmax
+      INTEGER, DIMENSION(nbdim) :: pttab_child,petab_child
+      REAL, DIMENSION(nbdim)    :: s_child,s_parent
+      REAL, DIMENSION(nbdim)    :: ds_child,ds_parent
+      REAL, DIMENSION(indmin(1):indmax(1),
+     &                indmin(2):indmax(2),
+     &                indmin(3):indmax(3),
+     &                indmin(4):indmax(4))           :: tempP
+      REAL, DIMENSION(pttab_child(1):petab_child(1),
+     &                pttab_child(2):petab_child(2),
+     &                pttab_child(3):petab_child(3),
+     &                pttab_child(4):petab_child(4)) :: tempC
+C
+C     Local variables      
+      REAL, DIMENSION(:,:,:,:), Allocatable :: tabtemp
+      INTEGER :: i,j,k,l
+      INTEGER :: coeffraf,locind_child_left
+C
+C
+      Allocate(tabtemp(indmin(1):indmax(1),
+     &                 indmin(2):indmax(2),
+     &                 indmin(3):indmax(3), 
+     &                 pttab_child(4):petab_child(4)))
+C
+      do l = pttab_child(nbdim),petab_child(nbdim)
+C
+        Call Agrif_Update_3D_recursive(TypeUpdate(1:nbdim-1),    
+     &         tabtemp(indmin(nbdim-3):indmax(nbdim-3),
+     &                 indmin(nbdim-2):indmax(nbdim-2),
+     &                 indmin(nbdim-1):indmax(nbdim-1),l),
+     &         tempC(pttab_child(nbdim-3):petab_child(nbdim-3),
+     &               pttab_child(nbdim-2):petab_child(nbdim-2),
+     &               pttab_child(nbdim-1):petab_child(nbdim-1),l),
+     &         indmin(1:nbdim-1),indmax(1:nbdim-1),
+     &         pttab_child(1:nbdim-1),petab_child(1:nbdim-1),
+     &         s_child(1:nbdim-1),s_parent(1:nbdim-1),
+     &         ds_child(1:nbdim-1),ds_parent(1:nbdim-1),nbdim-1)
+C
+      enddo
+      
+      Call Agrif_Compute_nbdim_update(s_parent(nbdim),s_child(nbdim),
+     &  ds_parent(nbdim),ds_child(nbdim),coeffraf,locind_child_left)
+C
+      tempP = 0.
+
+      do k = indmin(3),indmax(3)
+C
+        do j = indmin(2),indmax(2)
+C
+          do i = indmin(1),indmax(1)
+C
+            Call Agrif_UpdateBase(TypeUpdate(4),
+     &           tempP(i,j,k,indmin(nbdim):indmax(nbdim)),
+     &          tabtemp(i,j,k,pttab_child(nbdim):petab_child(nbdim)),
+     &           indmin(nbdim),indmax(nbdim),
+     &           pttab_child(nbdim),petab_child(nbdim),
+     &           s_parent(nbdim),s_child(nbdim),
+     &           ds_parent(nbdim),ds_child(nbdim),
+     &                  coeffraf,locind_child_left)
+C
+          enddo 
+C
+        enddo 
+C        
+      enddo
+C
+      Deallocate(tabtemp)
+C
+      Return
+C
+C
+      End Subroutine Agrif_Update_4D_recursive
+C
+C
+C
+C     **************************************************************************  
+CCC   Subroutine Agrif_Update_5D_Recursive 
+C     **************************************************************************
+C
+      Subroutine Agrif_Update_5D_recursive(TypeUpdate,tempP,tempC,
+     &                                     indmin,indmax,   
+     &                                     pttab_child,petab_child,
+     &                                     s_child,s_parent,
+     &                                     ds_child,ds_parent,nbdim)
+C
+CCC   Description:
+CCC   Subroutine to update a 5D grid variable on the parent grid. 
+CCC   It calls Agrif_Update_4D_Recursive and Agrif_UpdateBase.    
+C
+CC    Method:
+C
+C     Declarations:
+C
+      
+C     
+      INTEGER                   :: nbdim
+      INTEGER, DIMENSION(nbdim) :: TypeUpdate            ! TYPE of update (copy or average)
+      INTEGER, DIMENSION(nbdim) :: indmin,indmax
+      INTEGER, DIMENSION(nbdim) :: pttab_child,petab_child
+      REAL, DIMENSION(nbdim)    :: s_child,s_parent
+      REAL, DIMENSION(nbdim)    :: ds_child,ds_parent
+      REAL, DIMENSION(indmin(1):indmax(1),
+     &                indmin(2):indmax(2),
+     &                indmin(3):indmax(3),
+     &                indmin(4):indmax(4),
+     &                indmin(5):indmax(5))           :: tempP
+      REAL, DIMENSION(pttab_child(1):petab_child(1),
+     &                pttab_child(2):petab_child(2),
+     &                pttab_child(3):petab_child(3),
+     &                pttab_child(4):petab_child(4),
+     &                pttab_child(5):petab_child(5)) :: tempC
+C
+C     Local variables      
+      REAL, DIMENSION(:,:,:,:,:), Allocatable :: tabtemp
+      INTEGER :: i,j,k,l,m
+      INTEGER :: coeffraf,locind_child_left
+C
+C
+      Allocate(tabtemp(indmin(1):indmax(1),
+     &                 indmin(2):indmax(2),
+     &                 indmin(3):indmax(3),
+     &                 indmin(4):indmax(4),   
+     &                 pttab_child(5):petab_child(5)))
+C
+      do m = pttab_child(nbdim),petab_child(nbdim)
+C
+        Call Agrif_Update_4D_recursive(TypeUpdate(1:nbdim-1),    
+     &         tabtemp(indmin(nbdim-4):indmax(nbdim-4),
+     &                 indmin(nbdim-3):indmax(nbdim-3),
+     &                 indmin(nbdim-2):indmax(nbdim-2),
+     &                 indmin(nbdim-1):indmax(nbdim-1),m),
+     &         tempC(pttab_child(nbdim-4):petab_child(nbdim-4),
+     &               pttab_child(nbdim-3):petab_child(nbdim-3),
+     &               pttab_child(nbdim-2):petab_child(nbdim-2),
+     &               pttab_child(nbdim-1):petab_child(nbdim-1),m),
+     &         indmin(1:nbdim-1),indmax(1:nbdim-1),
+     &         pttab_child(1:nbdim-1),petab_child(1:nbdim-1),
+     &         s_child(1:nbdim-1),s_parent(1:nbdim-1),
+     &         ds_child(1:nbdim-1),ds_parent(1:nbdim-1),nbdim-1)
+C
+      enddo
+      
+      Call Agrif_Compute_nbdim_update(s_parent(nbdim),s_child(nbdim),
+     &  ds_parent(nbdim),ds_child(nbdim),coeffraf,locind_child_left)
+      tempP = 0.
+C
+      do l = indmin(4),indmax(4)
+C
+        do k = indmin(3),indmax(3)
+C
+          do j = indmin(2),indmax(2)
+C
+            do i = indmin(1),indmax(1)
+C
+              Call Agrif_UpdateBase(TypeUpdate(5),
+     &           tempP(i,j,k,l,indmin(nbdim):indmax(nbdim)),
+     &          tabtemp(i,j,k,l,
+     &                   pttab_child(nbdim):petab_child(nbdim)),
+     &           indmin(nbdim),indmax(nbdim),
+     &           pttab_child(nbdim),petab_child(nbdim),
+     &           s_parent(nbdim),s_child(nbdim),
+     &           ds_parent(nbdim),ds_child(nbdim),
+     &                  coeffraf,locind_child_left)
+C
+            enddo
+C
+          enddo 
+C
+        enddo 
+C        
+      enddo
+C
+      Deallocate(tabtemp)
+C
+      Return
+C
+C
+      End Subroutine Agrif_Update_5D_recursive
+C
+C
+C
+C
+C     **************************************************************************  
+CCC   Subroutine Agrif_Update_6D_Recursive 
+C     **************************************************************************
+C
+      Subroutine Agrif_Update_6D_recursive(TypeUpdate,tempP,tempC,
+     &                                     indmin,indmax,   
+     &                                     pttab_child,petab_child,
+     &                                     s_child,s_parent,
+     &                                     ds_child,ds_parent,nbdim)
+C
+CCC   Description:
+CCC   Subroutine to update a 6D grid variable on the parent grid. 
+CCC   It calls Agrif_Update_5D_Recursive and Agrif_UpdateBase.    
+C
+CC    Method:
+C
+C     Declarations:
+C
+      
+C     
+      INTEGER                   :: nbdim
+      INTEGER, DIMENSION(nbdim) :: TypeUpdate            ! TYPE of update (copy or average)
+      INTEGER, DIMENSION(nbdim) :: indmin,indmax
+      INTEGER, DIMENSION(nbdim) :: pttab_child,petab_child
+      REAL, DIMENSION(nbdim)    :: s_child,s_parent
+      REAL, DIMENSION(nbdim)    :: ds_child,ds_parent
+      REAL, DIMENSION(indmin(1):indmax(1),
+     &                indmin(2):indmax(2),
+     &                indmin(3):indmax(3),
+     &                indmin(4):indmax(4),
+     &                indmin(5):indmax(5),
+     &                indmin(6):indmax(6))           :: tempP
+      REAL, DIMENSION(pttab_child(1):petab_child(1),
+     &                pttab_child(2):petab_child(2),
+     &                pttab_child(3):petab_child(3),
+     &                pttab_child(4):petab_child(4),
+     &                pttab_child(5):petab_child(5),
+     &                pttab_child(6):petab_child(6)) :: tempC
+C
+C     Local variables      
+      REAL, DIMENSION(:,:,:,:,:,:), Allocatable :: tabtemp
+      INTEGER :: i,j,k,l,m,n
+      INTEGER :: coeffraf,locind_child_left
+C
+C
+      Allocate(tabtemp(indmin(1):indmax(1),
+     &                 indmin(2):indmax(2),
+     &                 indmin(3):indmax(3),
+     &                 indmin(4):indmax(4),   
+     &                 indmin(5):indmax(5),   
+     &                 pttab_child(6):petab_child(6)))
+C
+      do n = pttab_child(nbdim),petab_child(nbdim)
+C
+        Call Agrif_Update_5D_recursive(TypeUpdate(1:nbdim-1),    
+     &         tabtemp(indmin(nbdim-5):indmax(nbdim-5),
+     &                 indmin(nbdim-4):indmax(nbdim-4),
+     &                 indmin(nbdim-3):indmax(nbdim-3),
+     &                 indmin(nbdim-2):indmax(nbdim-2),
+     &                 indmin(nbdim-1):indmax(nbdim-1),n),
+     &         tempC(pttab_child(nbdim-5):petab_child(nbdim-5),
+     &               pttab_child(nbdim-4):petab_child(nbdim-4),
+     &               pttab_child(nbdim-3):petab_child(nbdim-3),
+     &               pttab_child(nbdim-2):petab_child(nbdim-2),
+     &               pttab_child(nbdim-1):petab_child(nbdim-1),n),
+     &         indmin(1:nbdim-1),indmax(1:nbdim-1),
+     &         pttab_child(1:nbdim-1),petab_child(1:nbdim-1),
+     &         s_child(1:nbdim-1),s_parent(1:nbdim-1),
+     &         ds_child(1:nbdim-1),ds_parent(1:nbdim-1),nbdim-1)
+C
+      enddo
+      
+      Call Agrif_Compute_nbdim_update(s_parent(nbdim),s_child(nbdim),
+     &  ds_parent(nbdim),ds_child(nbdim),coeffraf,locind_child_left)
+C
+      tempP = 0.
+
+      do m = indmin(5),indmax(5)
+      do l = indmin(4),indmax(4)
+C
+        do k = indmin(3),indmax(3)
+C
+          do j = indmin(2),indmax(2)
+C
+            do i = indmin(1),indmax(1)
+C
+              Call Agrif_UpdateBase(TypeUpdate(6),
+     &           tempP(i,j,k,l,m,indmin(nbdim):indmax(nbdim)),
+     &          tabtemp(i,j,k,l,m,
+     &                   pttab_child(nbdim):petab_child(nbdim)),
+     &           indmin(nbdim),indmax(nbdim),
+     &           pttab_child(nbdim),petab_child(nbdim),
+     &           s_parent(nbdim),s_child(nbdim),
+     &           ds_parent(nbdim),ds_child(nbdim),
+     &                  coeffraf,locind_child_left)
+C
+            enddo
+C
+          enddo 
+C
+        enddo 
+C        
+      enddo
+      enddo
+C
+      Deallocate(tabtemp)
+C
+      Return
+C
+C
+      End Subroutine Agrif_Update_6D_recursive
+C
+C
+C
+C     **************************************************************************  
+CCC   Subroutine Agrif_UpdateBase  
+C     **************************************************************************  
+C  
+      Subroutine Agrif_UpdateBase(TypeUpdate,
+     &                            parenttab,childtab,
+     &                            indmin,indmax,pttab_child,petab_child,
+     &                            s_parent,s_child,ds_parent,ds_child,
+     &                            coeffraf,locind_child_left)
+C
+CCC   Description:
+CCC   Subroutine calling the updating method chosen by the user (copy, average
+CCC   or full-weighting).    
+C
+CC    Method:
+C
+C     Declarations:
+C
+      
+C
+      INTEGER :: TypeUpdate
+      INTEGER :: indmin,indmax
+      INTEGER :: pttab_child,petab_child
+      REAL,DIMENSION(indmin:indmax)           :: parenttab       
+      REAL,DIMENSION(pttab_child:petab_child) :: childtab      
+      REAL    :: s_parent,s_child
+      REAL    :: ds_parent,ds_child      
+      INTEGER :: coeffraf,locind_child_left
+C
+C
+      if (TypeUpdate == AGRIF_Update_copy) then
+C             
+          Call agrif_copy1D
+     &       (parenttab,childtab,
+     &          indmax-indmin+1,petab_child-pttab_child+1,
+     &          s_parent,s_child,ds_parent,ds_child)     
+C
+        elseif (TypeUpdate == AGRIF_Update_average) then
+C           
+          Call average1D
+     &       (parenttab,childtab,
+     &          indmax-indmin+1,petab_child-pttab_child+1,
+     &          s_parent,s_child,ds_parent,ds_child) 
+C
+        elseif (TypeUpdate == AGRIF_Update_full_weighting) then
+C             
+          Call full_weighting1D
+     &       (parenttab,childtab,
+     &          indmax-indmin+1,petab_child-pttab_child+1,
+     &          s_parent,s_child,ds_parent,ds_child,
+     &          coeffraf,locind_child_left)
+C
+      endif 
+C
+      Return                
+C
+C      
+      End Subroutine Agrif_UpdateBase
+C
+C
+
+      Subroutine Agrif_Compute_nbdim_update(s_parent,s_child,
+     &  ds_parent,ds_child,coeffraf,locind_child_left)
+      real :: s_parent,s_child,ds_parent,ds_child
+      integer :: coeffraf,locind_child_left
+     
+      coeffraf = nint(ds_parent/ds_child)
+      locind_child_left = 1 + agrif_int((s_parent-s_child)/ds_child)
+      
+      End Subroutine Agrif_Compute_nbdim_update
+ 
+#if defined AGRIF_MPI      
+      Subroutine Agrif_Find_list_update(list_update,pttab,petab,
+     &                          pttab_Child,pttab_Parent,nbdim,
+     &     find_list_update,tab4t,tab5t,memberinall,memberinall2,
+     &     sendtoproc1,recvfromproc1,sendtoproc2,recvfromproc2)     
+      TYPE(Agrif_List_Interp_Loc), Pointer :: list_update
+      INTEGER :: nbdim
+      INTEGER,DIMENSION(nbdim)   :: pttab,petab,pttab_Child,pttab_Parent
+      LOGICAL :: find_list_update
+      Type(Agrif_List_Interp_loc), Pointer :: parcours
+      INTEGER :: i
+C
+      INTEGER,DIMENSION(nbdim,0:Agrif_Nbprocs-1,8) :: tab4t
+      INTEGER,DIMENSION(nbdim,0:Agrif_Nbprocs-1,8) :: tab5t      
+      LOGICAL, DIMENSION(0:Agrif_Nbprocs-1) :: memberinall,memberinall2
+      LOGICAL, DIMENSION(0:Agrif_Nbprocs-1) :: sendtoproc1,recvfromproc1      
+      LOGICAL, DIMENSION(0:Agrif_Nbprocs-1) :: sendtoproc2,recvfromproc2      
+                    
+      find_list_update = .FALSE.
+      
+      parcours => list_update
+      
+      Find_loop :   Do While (associated(parcours))
+        Do i=1,nbdim
+          IF ((pttab(i) /= parcours%interp_loc%pttab(i)).OR.
+     &        (petab(i) /= parcours%interp_loc%petab(i)).OR.
+     &        (pttab_child(i) /= parcours%interp_loc%pttab_child(i)).OR.
+     &        (pttab_parent(i) /= parcours%interp_loc%pttab_parent(i)))
+     &               THEN
+            parcours=>parcours%suiv
+            Cycle Find_loop
+          ENDIF
+        EndDo
+        
+        tab4t = parcours%interp_loc%tab4t(1:nbdim,0:Agrif_Nbprocs-1,1:8)
+        memberinall = parcours%interp_loc%memberinall(0:Agrif_Nbprocs-1)
+        
+        tab5t = parcours%interp_loc%tab5t(1:nbdim,0:Agrif_Nbprocs-1,1:8)
+        memberinall2 = 
+     &       parcours%interp_loc%memberinall2(0:Agrif_Nbprocs-1)
+        sendtoproc1 = 
+     &       parcours%interp_loc%sendtoproc1(0:Agrif_Nbprocs-1)   
+        recvfromproc1 = 
+     &       parcours%interp_loc%recvfromproc1(0:Agrif_Nbprocs-1)     
+        sendtoproc2 = 
+     &       parcours%interp_loc%sendtoproc2(0:Agrif_Nbprocs-1)   
+        recvfromproc2 = 
+     &       parcours%interp_loc%recvfromproc2(0:Agrif_Nbprocs-1)          
+        
+        find_list_update = .TRUE.   
+        Exit Find_loop
+      End Do Find_loop  
+                              
+      End Subroutine Agrif_Find_list_update  
+      
+      Subroutine Agrif_AddTo_list_update(list_update,pttab,petab,
+     &                          pttab_Child,pttab_Parent,nbdim
+     &      ,tab4t,tab5t,memberinall,memberinall2,
+     &      sendtoproc1,recvfromproc1,sendtoproc2,recvfromproc2)
+          
+      TYPE(Agrif_List_Interp_Loc), Pointer :: list_update
+      INTEGER :: nbdim
+      INTEGER,DIMENSION(nbdim)   :: pttab,petab,pttab_Child,pttab_Parent
+      INTEGER,DIMENSION(nbdim,0:Agrif_Nbprocs-1,8) :: tab4t
+      INTEGER,DIMENSION(nbdim,0:Agrif_Nbprocs-1,8) :: tab5t      
+      LOGICAL,DIMENSION(0:Agrif_Nbprocs-1) :: memberinall, memberinall2
+      LOGICAL,DIMENSION(0:Agrif_Nbprocs-1) :: sendtoproc1, recvfromproc1      
+      LOGICAL,DIMENSION(0:Agrif_Nbprocs-1) :: sendtoproc2, recvfromproc2
+
+      Type(Agrif_List_Interp_loc), Pointer :: parcours
+            
+       Allocate(parcours)
+      Allocate(parcours%interp_loc)
+      
+      parcours%interp_loc%pttab(1:nbdim) = pttab(1:nbdim)
+      parcours%interp_loc%petab(1:nbdim) = petab(1:nbdim)
+      parcours%interp_loc%pttab_child(1:nbdim) = pttab_child(1:nbdim)
+      parcours%interp_loc%pttab_parent(1:nbdim) = pttab_parent(1:nbdim)
+      Allocate(parcours%interp_loc%tab4t(nbdim,0:Agrif_Nbprocs-1,8))
+      Allocate(parcours%interp_loc%memberinall(0:Agrif_Nbprocs-1))
+      
+      Allocate(parcours%interp_loc%tab5t(nbdim,0:Agrif_Nbprocs-1,8))
+      Allocate(parcours%interp_loc%memberinall2(0:Agrif_Nbprocs-1))
+      Allocate(parcours%interp_loc%sendtoproc1(0:Agrif_Nbprocs-1))
+      Allocate(parcours%interp_loc%recvfromproc1(0:Agrif_Nbprocs-1))      
+      Allocate(parcours%interp_loc%sendtoproc2(0:Agrif_Nbprocs-1))
+      Allocate(parcours%interp_loc%recvfromproc2(0:Agrif_Nbprocs-1))            
+            
+      parcours%interp_loc%tab4t=tab4t   
+      parcours%interp_loc%memberinall=memberinall
+ 
+      parcours%interp_loc%tab5t=tab5t   
+      parcours%interp_loc%memberinall2=memberinall2
+      parcours%interp_loc%sendtoproc1=sendtoproc1   
+      parcours%interp_loc%recvfromproc1=recvfromproc1      
+      parcours%interp_loc%sendtoproc2=sendtoproc2       
+      parcours%interp_loc%recvfromproc2=recvfromproc2      
+            
+      parcours%suiv => list_update
+      
+      list_update => parcours
+      
+      End Subroutine Agrif_Addto_list_update
+#endif
+           
+
+C     **************************************************************************
+CCC   Subroutine Agrif_Update_1D_Recursive
+C     **************************************************************************
+C
+      Subroutine Agrif_Update_1D_recursive(TypeUpdate,tempP,tempC,
+     &                                     indmin,indmax,
+     &                                     pttab_child,petab_child,
+     &                                     s_child,s_parent,
+     &                                     ds_child,ds_parent,nbdim)
+C
+CCC   Description:
+CCC   Subroutine to update a 1D grid variable on the parent grid.
+C
+CC    Method:
+C
+C     Declarations:
+C
+      
+C
+C     Arguments
+      INTEGER                   :: nbdim
+      INTEGER, DIMENSION(nbdim) :: TypeUpdate            ! TYPE of update (copy or average)
+      INTEGER, DIMENSION(nbdim) :: indmin,indmax
+      INTEGER, DIMENSION(nbdim) :: pttab_child,petab_child
+      REAL, DIMENSION(nbdim)    :: s_child,s_parent
+      REAL, DIMENSION(nbdim)    :: ds_child,ds_parent
+      REAL, DIMENSION(indmin(nbdim):indmax(nbdim))           :: tempP
+      REAL, DIMENSION(pttab_child(nbdim):petab_child(nbdim)) :: tempC
+      INTEGER :: coeffraf,locind_child_left
+C
+C
+      Call Agrif_Compute_nbdim_update(s_parent(nbdim),s_child(nbdim),
+     &  ds_parent(nbdim),ds_child(nbdim),coeffraf,locind_child_left)
+      
+      Call Agrif_UpdateBase(TypeUpdate(1),
+     &                  tempP(indmin(nbdim):indmax(nbdim)),
+     &                  tempC(pttab_child(nbdim):petab_child(nbdim)),
+     &                  indmin(nbdim),indmax(nbdim),           
+     &                  pttab_child(nbdim),petab_child(nbdim),
+     &                  s_parent(nbdim),s_child(nbdim),
+     &                  ds_parent(nbdim),ds_child(nbdim),
+     &                  coeffraf,locind_child_left)
+
+C
+      Return
+C
+C
+      End Subroutine Agrif_Update_1D_recursive      
+
+      End Module Agrif_Update
Index: vendors/AGRIF/r_01/AGRIF_FILES/modupdatebasic.F
===================================================================
--- vendors/AGRIF/r_01/AGRIF_FILES/modupdatebasic.F	(revision 2672)
+++ vendors/AGRIF/r_01/AGRIF_FILES/modupdatebasic.F	(revision 2672)
@@ -0,0 +1,659 @@
+!
+! $Id: modupdatebasic.F 779 2007-12-22 17:04:17Z rblod $
+!
+C     AGRIF (Adaptive Grid Refinement In Fortran)
+C
+C     Copyright (C) 2003 Laurent Debreu (Laurent.Debreu@imag.fr)
+C                        Christophe Vouland (Christophe.Vouland@imag.fr)    
+C
+C     This program is free software; you can redistribute it and/or modify
+C     it under the terms of the GNU General Public License as published by
+C     the Free Software Foundation; either version 2 of the License, or
+C     (at your option) any later version.
+C
+C     This program is distributed in the hope that it will be useful,
+C     but WITHOUT ANY WARRANTY; without even the implied warranty of
+C     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+C     GNU General Public License for more details.
+C
+C     You should have received a copy of the GNU General Public License
+C     along with this program; if not, write to the Free Software
+C     Foundation, Inc., 59 Temple Place -  Suite 330, Boston, MA 02111-1307, USA.
+C
+C
+C
+CCC   Module Agrif_Updatebasic
+C      
+C
+      Module Agrif_Updatebasic
+C
+CCC   Description:
+CCC   Module containing different procedures of update (copy,average,
+CCC   full_weighting) used in the Agrif_Update module.
+C
+C     Modules used:
+C
+      USE Agrif_types
+      
+      IMPLICIT NONE
+      
+      integer,dimension(:,:),allocatable :: indchildcopy
+      integer,dimension(:,:),allocatable :: indchildaverage
+C             
+
+      CONTAINS
+C     Define procedures contained in this module
+C
+C
+C
+C     **************************************************************************  
+CCC   Subroutine Copy1d  
+C     ************************************************************************** 
+C
+      Subroutine agrif_copy1d(x,y,np,nc,
+     &                  s_parent,s_child,ds_parent,ds_child) 
+C
+CCC   Description:
+CCC   Subroutine to do a copy on a parent grid (vector x) from its child grid 
+CCC   (vector y).  
+C
+CC    Method:
+C
+C     Declarations:
+C
+      
+C        
+C     Arguments
+      INTEGER             :: np,nc      
+      REAL, DIMENSION(np) :: x      
+      REAL, DIMENSION(nc) :: y  
+      REAL                :: s_parent,s_child
+      REAL                :: ds_parent,ds_child
+C
+C     Local variables
+      INTEGER :: i,locind_child_left,coeffraf
+C 
+C
+      coeffraf = nint(ds_parent/ds_child)
+C
+      if (coeffraf == 1) then
+C
+          locind_child_left = 1 + nint((s_parent - s_child)/ds_child)
+C        
+!CDIR ALTCODE
+          x(1:np) = y(locind_child_left:locind_child_left+np-1)
+C
+          return
+C
+      endif
+C
+      
+      locind_child_left = 1 + nint((s_parent - s_child)/ds_child)
+      
+!CDIR ALTCODE
+      do i = 1,np
+C      
+         x(i) = y(locind_child_left)
+C
+         locind_child_left = locind_child_left + coeffraf
+C         
+      enddo    
+       
+C
+      Return 
+C
+C
+      End Subroutine agrif_copy1d
+
+C     **************************************************************************  
+CCC   Subroutine Copy1dprecompute  
+C     ************************************************************************** 
+C
+      Subroutine copy1dprecompute2d(nc2,np,nc,
+     &                  s_parent,s_child,ds_parent,ds_child,dir)
+C
+CCC   Description:
+CCC   Subroutine to precompute index for a copy on a parent grid (vector x) from
+CCC   its child grid (vector y).
+C
+CC    Method:
+C
+C     Declarations:
+C
+
+C        
+C     Arguments
+      INTEGER             :: nc2,np,nc
+      INTEGER             :: dir   
+      REAL                :: s_parent,s_child
+      REAL                :: ds_parent,ds_child
+C
+C     Local variables
+      INTEGER,DIMENSION(:,:),ALLOCATABLE :: indchildcopy_tmp
+      INTEGER :: i,locind_child_left,coeffraf
+C 
+C
+      coeffraf = nint(ds_parent/ds_child)
+C
+      locind_child_left = 1 + nint((s_parent - s_child)/ds_child)
+
+      if (.not.allocated(indchildcopy)) then
+      allocate(indchildcopy(np*nc2,3))
+      else
+      if (size(indchildcopy,1)<np*nc2) then
+      allocate( indchildcopy_tmp(
+     &         size(indchildcopy,1),size(indchildcopy,2)))
+      indchildcopy_tmp = indchildcopy
+      deallocate(indchildcopy)
+      allocate(indchildcopy(np*nc2,3))
+      indchildcopy(1:size(indchildcopy_tmp,1),
+     &              1:size(indchildcopy_tmp,2)) = indchildcopy_tmp
+      deallocate(indchildcopy_tmp)
+      endif
+      endif
+
+
+      do i = 1,np
+C      
+         indchildcopy(i,dir) = locind_child_left
+         locind_child_left = locind_child_left + coeffraf
+C         
+      enddo
+
+      do i =2, nc2
+        indchildcopy(1+(i-1)*np:i*np,dir)=
+     &       indchildcopy(1+(i-2)*np:(i-1)*np,dir) + nc 
+      enddo
+
+C
+      Return
+C
+C
+      End Subroutine copy1dprecompute2d
+
+C
+C
+C     **************************************************************************  
+CCC   Subroutine Copy1dprecompute  
+C     ************************************************************************** 
+C
+      Subroutine copy1dprecompute(np,nc,
+     &                  s_parent,s_child,ds_parent,ds_child,dir)
+C
+CCC   Description:
+CCC   Subroutine to precompute index for a copy on a parent grid (vector x) from
+CCC   its child grid (vector y).
+C
+CC    Method:
+C
+C     Declarations:
+C
+
+C        
+C     Arguments
+      INTEGER             :: np,nc
+      INTEGER             :: dir
+      REAL                :: s_parent,s_child
+      REAL                :: ds_parent,ds_child
+C
+C     Local variables
+      INTEGER :: i,locind_child_left,coeffraf
+C 
+C
+      coeffraf = nint(ds_parent/ds_child)
+C
+      locind_child_left = 1 + nint((s_parent - s_child)/ds_child)
+
+      if (.not.allocated(indchildcopy)) then
+      allocate(indchildcopy(np,1))
+      else
+      if (size(indchildcopy)<np) then
+      deallocate(indchildcopy)
+      allocate(indchildcopy(np,1))
+      endif
+      endif
+
+!CDIR ALTCODE
+      do i = 1,np
+C      
+         indchildcopy(i,1) = locind_child_left
+         locind_child_left = locind_child_left + coeffraf
+C         
+      enddo
+
+C
+      Return
+C
+C
+      End Subroutine copy1dprecompute
+C
+C
+C     **************************************************************************  
+CCC   Subroutine Copy1daftercompute  
+C     ************************************************************************** 
+C
+      Subroutine copy1daftercompute(x,y,np,nc,
+     &                  s_parent,s_child,ds_parent,ds_child,dir)
+C
+CCC   Description:
+CCC   Subroutine to do a copy on a parent grid (vector x) from its child grid 
+CCC   (vector y) using precomputed index.  
+C
+CC    Method:
+C
+C     Declarations:
+C
+  
+C        
+C     Arguments
+      INTEGER             :: np,nc
+      INTEGER             :: dir
+      REAL, DIMENSION(np) :: x
+      REAL, DIMENSION(nc) :: y
+      REAL                :: s_parent,s_child
+      REAL                :: ds_parent,ds_child
+C
+C     Local variables
+      INTEGER :: i
+C 
+C
+      
+!CDIR ALTCODE
+      do i = 1,np
+C      
+         x(i) = y(indchildcopy(i,dir))
+C
+      enddo
+  
+C
+      Return
+C
+C
+      End Subroutine copy1daftercompute
+
+
+C
+C     **************************************************************************  
+CCC   Subroutine Average1d  
+C     ************************************************************************** 
+C   
+      Subroutine average1d(x,y,np,nc,
+     &                     s_parent,s_child,ds_parent,ds_child) 
+C
+CCC   Description:
+CCC   Subroutine to do an update by average on a parent grid (vector x)from its 
+CCC   child grid (vector y).
+C
+C     Arguments
+      INTEGER             :: np,nc      
+      REAL, DIMENSION(np) :: x      
+      REAL, DIMENSION(nc) :: y  
+      REAL                :: s_parent,s_child
+      REAL                :: ds_parent,ds_child
+C
+C     Local variables
+      INTEGER :: i,locind_child_left,coeffraf,ii
+      REAL    :: xpos, invcoeffraf 
+      INTEGER :: nbnonnuls
+      INTEGER :: diffmod
+C 
+C
+      coeffraf = nint(ds_parent/ds_child)
+      invcoeffraf = 1./coeffraf
+C
+      if (coeffraf == 1) then
+C
+          locind_child_left = 1 + nint((s_parent - s_child)/ds_child)
+C        
+          x(1:np) = y(locind_child_left:locind_child_left+np-1)
+C
+          return
+C
+      endif
+C
+      xpos = s_parent      
+      
+      x = 0.
+C
+      diffmod = 0
+      
+      IF ( mod(coeffraf,2) == 0 ) diffmod = 1
+
+        locind_child_left = 1 + agrif_int((xpos - s_child)/ds_child)
+C
+      IF (Agrif_UseSpecialValueInUpdate) THEN
+
+      do i = 1,np
+          nbnonnuls = 0
+!CDIR NOVECTOR
+          Do ii = -coeffraf/2+locind_child_left+diffmod,
+     &                coeffraf/2+locind_child_left
+C 
+               IF (y(ii) .NE. Agrif_SpecialValueFineGrid) THEN
+               nbnonnuls = nbnonnuls + 1
+               x(i) = x(i) + y(ii)
+               ENDIF
+          End Do
+               IF (nbnonnuls .NE. 0) THEN
+                  x(i) = x(i)/nbnonnuls
+               ELSE
+                  x(i) = Agrif_SpecialValueFineGrid
+               ENDIF
+        locind_child_left = locind_child_left + coeffraf
+      enddo
+
+      ELSE 
+
+!CDIR ALTCODE
+      do i = 1,np
+!CDIR NOVECTOR
+          Do ii = -coeffraf/2+locind_child_left+diffmod,
+     &                coeffraf/2+locind_child_left
+C 
+               x(i) = x(i) + y(ii)
+          End Do
+                 x(i) = x(i)*invcoeffraf
+        locind_child_left = locind_child_left + coeffraf
+      enddo
+
+      ENDIF
+
+      Return 
+C            
+C     
+      End Subroutine average1d
+      
+      Subroutine average1dprecompute2d(nc2,np,nc,
+     &                     s_parent,s_child,ds_parent,ds_child,dir)
+C
+CCC   Description:
+CCC   Subroutine to do an update by average on a parent grid (vector x)from its 
+CCC   child grid (vector y).
+C
+C     Arguments
+      INTEGER             :: nc2,np,nc,dir
+      REAL                :: s_parent,s_child
+      REAL                :: ds_parent,ds_child
+C
+C     Local variables
+      INTEGER :: i,locind_child_left,coeffraf,ii
+      INTEGER,DIMENSION(:,:),ALLOCATABLE :: indchildaverage_tmp
+      REAL    :: xpos, invcoeffraf
+      INTEGER :: nbnonnuls
+      INTEGER :: diffmod
+C 
+C
+      coeffraf = nint(ds_parent/ds_child)
+C
+      xpos = s_parent
+C
+      diffmod = 0
+
+      IF ( mod(coeffraf,2) == 0 ) diffmod = 1
+
+      locind_child_left = 1 + agrif_int((xpos - s_child)/ds_child)
+
+      if (.not.allocated(indchildaverage)) then
+      allocate(indchildaverage(np*nc2,3))
+      else
+      if (size(indchildaverage,1)<np*nc2) then
+      allocate( indchildaverage_tmp(
+     &         size(indchildaverage,1),size(indchildaverage,2)))
+      indchildaverage_tmp = indchildaverage
+      deallocate(indchildaverage)
+      allocate(indchildaverage(np*nc2,3))
+      indchildaverage(1:size(indchildaverage_tmp,1),
+     &              1:size(indchildaverage_tmp,2)) = indchildaverage_tmp
+      deallocate(indchildaverage_tmp)
+      endif
+      endif
+
+      do i = 1,np
+        indchildaverage(i,dir)= -coeffraf/2+locind_child_left
+     &                                    +diffmod
+        locind_child_left = locind_child_left + coeffraf
+      enddo
+      do i = 2,nc2
+        indchildaverage(1+(i-1)*np:i*np,dir)= 
+     &                 indchildaverage(1+(i-2)*np:(i-1)*np,dir) + nc 
+      enddo
+
+      Return 
+C            
+C     
+      End Subroutine average1dprecompute2d
+      
+
+      Subroutine average1dprecompute(np,nc,
+     &                     s_parent,s_child,ds_parent,ds_child) 
+C
+CCC   Description:
+CCC   Subroutine to do an update by average on a parent grid (vector x)from its 
+CCC   child grid (vector y).
+C
+C     Arguments
+      INTEGER             :: np,nc 
+      REAL                :: s_parent,s_child
+      REAL                :: ds_parent,ds_child
+C
+C     Local variables
+      INTEGER :: i,locind_child_left,coeffraf,ii
+      REAL    :: xpos, invcoeffraf 
+      INTEGER :: nbnonnuls
+      INTEGER :: diffmod
+C 
+C
+      coeffraf = nint(ds_parent/ds_child)
+
+C
+      if (coeffraf == 1) then
+C
+          return
+C
+      endif
+            
+C
+      xpos = s_parent
+C
+      diffmod = 0
+      
+      IF ( mod(coeffraf,2) == 0 ) diffmod = 1
+
+        locind_child_left = 1 + agrif_int((xpos - s_child)/ds_child)
+
+      if (.not.allocated(indchildaverage)) then
+      allocate(indchildaverage(np,1))
+      else
+      if (size(indchildaverage,1)<np) then
+      deallocate(indchildaverage)
+      allocate(indchildaverage(np,1))
+      endif
+      endif
+      
+!CDIR ALTCODE
+      do i = 1,np
+C 
+        indchildaverage(i,1)=-coeffraf/2+locind_child_left+diffmod
+        locind_child_left = locind_child_left + coeffraf
+      enddo
+
+      Return 
+C            
+C     
+      End Subroutine average1dprecompute
+      
+      Subroutine average1daftercompute(x,y,np,nc,
+     &                     s_parent,s_child,ds_parent,ds_child,dir) 
+C
+CCC   Description:
+CCC   Subroutine to do an update by average on a parent grid (vector x)from its 
+CCC   child grid (vector y).
+C
+C     Arguments
+      INTEGER             :: np,nc,dir      
+      REAL, DIMENSION(np) :: x      
+      REAL, DIMENSION(nc) :: y  
+      REAL                :: s_parent,s_child
+      REAL                :: ds_parent,ds_child
+C
+C     Local variables
+      INTEGER :: i,locind_child_left,coeffraf,ii,j
+      REAL    :: xpos, invcoeffraf 
+      REAL, PARAMETER :: one_third=1./3.
+      INTEGER, DIMENSION(np) :: nbnonnuls
+      INTEGER :: diffmod
+      REAL, DIMENSION(0:5) :: invcoeff=(/1.,1.,0.5,one_third,0.25,0.2/)
+C 
+C
+      coeffraf = nint(ds_parent/ds_child)
+      invcoeffraf = 1./coeffraf      
+C      
+C
+      IF (Agrif_UseSpecialValueInUpdate) THEN
+
+      nbnonnuls = 0
+      do  j =1, coeffraf
+          do i=1, np
+               IF (y(indchildaverage(i,dir) + j -1) .NE. 
+     &               Agrif_SpecialValueFineGrid) THEN
+               nbnonnuls(i) = nbnonnuls(i) + 1
+               x(i) = x(i) +  y(indchildaverage(i,dir) + j -1 )
+               ENDIF
+          End Do
+      enddo
+      do i=1,np
+      x(i)= x(i)*invcoeff(nbnonnuls(i)) 
+      enddo
+
+      ELSE
+!CDIR NOLOOPCHG
+      do  j =1, coeffraf
+!CDIR VECTOR
+          do i=1, np
+             x(i) = x(i) + y(indchildaverage(i,dir) + j -1 )
+          enddo
+      enddo
+       x = x * invcoeffraf
+      ENDIF
+
+      Return 
+C            
+C     
+      End Subroutine average1daftercompute            
+C
+C
+C
+C     **************************************************************************  
+CCC   Subroutine Full_weighting1d  
+C     **************************************************************************  
+C
+      Subroutine full_weighting1D(x,y,np,nc,
+     &                            s_parent,s_child,ds_parent,ds_child,
+     &                            coeffraf,locind_child_left) 
+C
+CCC   Description:
+CCC   Subroutine to do an update by full_weighting on a parent grid (vector x) 
+CCC   from its child grid (vector y).
+C 
+C     Arguments
+      INTEGER             :: np,nc      
+      REAL, DIMENSION(np) :: x      
+      REAL, DIMENSION(nc) :: y  
+      REAL                :: s_parent,s_child
+      REAL                :: ds_parent,ds_child
+C
+C     Local variables
+      INTEGER :: i,locind_child_left,coeffraf
+      REAL    :: xpos,sumweight,weight
+      INTEGER :: ii,diffmod
+      REAL :: xposfin
+      INTEGER :: it1,it2
+      INTEGER :: i1,i2
+      REAL :: invsumweight
+      REAL :: weights(-(coeffraf):coeffraf)
+      
+C
+C
+      if (coeffraf == 1) then
+C        
+          x(1:np) = y(locind_child_left:locind_child_left+np-1)
+C
+          return
+C
+      endif
+C
+      xpos = s_parent      
+      
+       x = 0.
+
+       xposfin = s_child + ds_child * (locind_child_left - 1)
+       IF (abs(xposfin - xpos).LT.0.001) THEN
+          diffmod = 0
+       ELSE
+          diffmod = 1
+       ENDIF
+C
+       
+      if (diffmod == 1) THEN
+        invsumweight=1./(2.*coeffraf**2)
+        do i=-coeffraf,-1
+          weights(i) = invsumweight*(2*(coeffraf+i)+1)
+        enddo
+        do i=0,coeffraf-1
+          weights(i)=weights(-(i+1))
+        enddo
+        it1 = -coeffraf
+        i1 = -(coeffraf-1)+locind_child_left
+        i2 = 2*coeffraf - 1
+      else
+        invsumweight=1./coeffraf**2
+        do i=-(coeffraf-1),0
+          weights(i) = invsumweight*(coeffraf + i)
+        enddo
+        do i=1,coeffraf-1
+          weights(i) = invsumweight*(coeffraf - i)
+        enddo
+        it1 = -(coeffraf-1)
+        i1 = -(coeffraf-1)+locind_child_left
+        i2 = 2*coeffraf - 2
+      endif
+
+      sumweight = 0                    
+      do i = 1,np
+C
+          it2 = it1
+          Do ii = i1,i1+i2
+C
+           IF (Agrif_UseSpecialValueInUpdate) THEN
+            IF (y(ii) .NE. Agrif_SpecialValueFineGrid) THEN
+               x(i) = x(i) + weights(it2)*y(ii)
+               sumweight = sumweight+weights(it2)
+            ENDIF
+           ELSE           
+               x(i) = x(i) + weights(it2)*y(ii)
+           ENDIF           
+           
+          it2 = it2+1
+          End Do
+
+           IF (Agrif_UseSpecialValueInUpdate) THEN          
+                 IF (sumweight .NE. 0.) THEN
+                    x(i) = x(i)/sumweight
+                    sumweight = 0
+                 ELSE
+                    x(i) = Agrif_SpecialValueFineGrid
+                 ENDIF
+           ENDIF
+        
+        i1 = i1 + coeffraf
+C
+      enddo    
+C
+
+      Return 
+C            
+C
+      End Subroutine full_weighting1D 
+
+C
+      End module AGRIF_updatebasic
Index: vendors/AGRIF/r_01/AGRIF_FILES/modutil.F
===================================================================
--- vendors/AGRIF/r_01/AGRIF_FILES/modutil.F	(revision 2672)
+++ vendors/AGRIF/r_01/AGRIF_FILES/modutil.F	(revision 2672)
@@ -0,0 +1,847 @@
+!
+! $Id: modutil.F 662 2007-05-25 15:58:52Z opalod $
+!
+C     Agrif (Adaptive Grid Refinement In Fortran)
+C
+C     Copyright (C) 2003 Laurent Debreu (Laurent.Debreu@imag.fr)
+C                        Christophe Vouland (Christophe.Vouland@imag.fr)    
+C
+C     This program is free software; you can redistribute it and/or modify
+C     it under the terms of the GNU General Public License as published by
+C     the Free Software Foundation; either version 2 of the License, or
+C     (at your option) any later version.
+C
+C     This program is distributed in the hope that it will be useful,
+C     but WITHOUT ANY WARRANTY; without even the implied warranty of
+C     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+C     GNU General Public License for more details.
+C
+C     You should have received a copy of the GNU General Public License
+C     along with this program; if not, write to the Free Software
+C     Foundation, Inc., 59 Temple Place-  Suite 330, Boston, MA 02111-1307, USA.
+C
+C
+C
+CCC   Module Agrif_Util 
+C 
+      Module Agrif_Util 
+C
+C
+CCC   Description:   
+CCC   This module contains the two procedures called in the main program : 
+CCC   Agrif_Init_Grids allowing the initialization of the root coarse grid, and
+CCC   Agrif_Step allowing the creation of the grid hierarchy and the management
+CCC   of the time integration. 
+C
+C     Modules used:
+C
+      Use Agrif_Clustering    
+      Use Agrif_bcfunction
+C      
+      IMPLICIT NONE
+C
+      Contains
+C     Definition of procedures contained in this module.
+C
+C     **************************************************************************
+CCC   Subroutine Agrif_Step
+C     **************************************************************************
+C 
+      Subroutine Agrif_Step(procname) 
+C
+CCC   Description:
+CCC   Subroutine to create the grid hierarchy and to manage the time integration 
+CCC   procedure. It is called in the main program.
+C
+CC    Method:
+CC    Call on subroutines Agrif_Regrid and Agrif_Integrate.
+C
+C     Declarations:
+C
+      Optional :: procname
+      External :: procname
+C
+#ifdef AGRIF_MPI
+      Integer      :: code
+#include "mpif.h"
+C
+C
+      If (Agrif_Mygrid % ngridstep == 0) Then
+          Call MPI_COMM_SIZE(MPI_COMM_WORLD,Agrif_Nbprocs,code)
+          Call MPI_COMM_RANK(MPI_COMM_WORLD,Agrif_ProcRank,code)
+          Call MPI_COMM_GROUP(MPI_COMM_WORLD,Agrif_Group,code)
+      endif
+#endif
+C
+C     Creation and initialization of the grid hierarchy 
+C
+C  
+C    Set the clustering variables
+C
+      Call Agrif_clustering_def()
+C      
+      if ( Agrif_USE_ONLY_FIXED_GRIDS .EQ. 1 ) then
+C     
+         If (Agrif_Mygrid % ngridstep == 0) then
+C
+            Call Agrif_Regrid
+C 
+            Call Agrif_Instance           
+     &          (Agrif_Mygrid)           
+         endif
+C
+      else
+C    
+         If (mod(Agrif_Mygrid % ngridstep, Agrif_Regridding) == 0) then
+C
+            Call Agrif_Regrid
+C  
+            Call Agrif_Instance           
+     &          (Agrif_Mygrid)  
+C            
+         endif
+C
+      endif
+C
+C     Time integration of the grid hierarchy
+C
+      If (present(procname)) Then
+         Call Agrif_Integrate (Agrif_Mygrid,procname)
+      Else
+         Call Agrif_Integrate (Agrif_Mygrid)      
+      endif
+C    
+      If (associated(Agrif_Mygrid%child_grids)) 
+     &   Call Agrif_Instance (Agrif_Mygrid)
+C
+      Return
+C             
+      End Subroutine Agrif_Step      
+
+C     **************************************************************************
+CCC   Subroutine Agrif_Step_Child
+C     **************************************************************************
+C
+      Subroutine Agrif_Step_Child(procname)
+C
+CCC   Description:
+CCC   Subroutine to create the grid hierarchy and to manage the time integration
+CCC   procedure. It is called in the main program.
+C
+CC    Method:
+CC    Call on subroutines Agrif_Regrid and Agrif_Integrate.
+C
+C     Declarations:
+C
+      Optional :: procname
+      External :: procname
+C
+C     Time integration of the grid hierarchy
+C
+      If (present(procname)) Then
+         Call Agrif_Integrate_Child (Agrif_Mygrid,procname)
+      Else
+         Call Agrif_Integrate_Child (Agrif_Mygrid)
+      endif
+C    
+      If (associated(Agrif_Mygrid%child_grids))
+     &   Call Agrif_Instance (Agrif_Mygrid)
+C
+      Return
+C
+      End Subroutine Agrif_Step_Child
+
+C
+C
+C
+C     **************************************************************************
+CCC   Subroutine Agrif_Regrid
+C     **************************************************************************
+C
+      Subroutine Agrif_Regrid
+C
+CCC   Description:
+CCC   Subroutine to create the grid hierarchy from fixed grids and 
+CC       adaptive mesh refinement.
+C
+CC    Method:        
+C
+C     Declarations:
+C
+C     Local variables      
+      Type(Agrif_Rectangle), Pointer     :: coarsegrid_fixed
+      Type(Agrif_Rectangle), Pointer     :: coarsegrid_moving  
+      INTEGER                            :: j
+      INTEGER :: nunit
+      INTEGER                            :: iii
+      Logical :: BEXIST
+C 
+      if ( Agrif_USE_ONLY_FIXED_GRIDS .EQ. 0 )
+     &   Call Agrif_detect_all(Agrif_Mygrid) ! Detection of areas to be refined
+C
+      Allocate(coarsegrid_fixed)
+      Allocate(coarsegrid_moving)
+C
+      if ( Agrif_USE_ONLY_FIXED_GRIDS .EQ. 0 ) 
+     &    Call Agrif_Cluster_All(Agrif_Mygrid,coarsegrid_moving) ! Clustering
+C
+      if ( Agrif_USE_FIXED_GRIDS .EQ. 1 .OR. 
+     &     Agrif_USE_ONLY_FIXED_GRIDS .EQ. 1 ) then
+C
+      If (Agrif_Mygrid % ngridstep == 0) Then
+          nunit = Agrif_Get_Unit()
+          open(nunit,file='AGRIF_FixedGrids.in',form='formatted',
+     &           status="old",ERR=99) ! Opening of the Agrif_FixedGrids.in file
+          j = 1
+C         Creation of the grid hierarchy from the Agrif_FixedGrids.in file 
+            do iii = 1 , Agrif_Probdim
+               coarsegrid_fixed % imin(iii) = 1
+               coarsegrid_fixed % imax(iii) = Agrif_Mygrid % nb(iii) + 1
+            enddo
+C      
+            Call Agrif_Read_Fix_Grd (coarsegrid_fixed,j,nunit)     
+            close(nunit) ! Closing of the Agrif_FixedGrids.in file 
+C
+          Nullify(Agrif_oldmygrid)
+          Nullify(Agrif_Mygrid  % child_grids)
+C        
+C         Creation of the grid hierarchy from coarsegrid_fixed
+            Call Agrif_Create_Grids (Agrif_Mygrid,coarsegrid_fixed)
+        Else        
+          Agrif_oldmygrid => Agrif_Mygrid % child_grids
+         endif
+      else
+      Agrif_oldmygrid => Agrif_Mygrid % child_grids
+      Nullify(Agrif_Mygrid  % child_grids)
+      endif
+C
+      if ( Agrif_USE_ONLY_FIXED_GRIDS .EQ. 0 ) then
+C
+      Call Agrif_Save_All(Agrif_oldmygrid)      
+C      
+      Call Agrif_Free_before_All(Agrif_oldmygrid)
+C 
+C     Creation of the grid hierarchy from coarsegrid_moving    
+      Call Agrif_Create_Grids
+     &     (Agrif_Mygrid,coarsegrid_moving)
+C
+      endif
+C
+C     Initialization of the grid hierarchy by copy or interpolation
+C
+      Call Agrif_Init_Hierarchy(Agrif_Mygrid)
+C
+      if ( Agrif_USE_ONLY_FIXED_GRIDS .EQ. 0 ) 
+     &        Call Agrif_Free_after_All(Agrif_oldmygrid)
+C
+      Deallocate(coarsegrid_fixed)
+      Deallocate(coarsegrid_moving)
+C      
+      Return
+C
+C     Opening error
+C
+   99 INQUIRE(FILE='AGRIF_FixedGrids.in',EXIST=BEXIST)
+      If (.not. BEXIST) Then
+          print*,'ERROR : File AGRIF_FixedGrids.in not found.'
+          STOP 
+        Else
+          print*,'Error opening file AGRIF_FixedGrids.in'
+          STOP         
+      endif     
+C      
+      End Subroutine Agrif_Regrid
+C
+C     **************************************************************************
+CCC   Subroutine Agrif_detect_All
+C     **************************************************************************
+C
+      Recursive Subroutine Agrif_detect_all(g)
+C
+CCC   Description:
+CCC   Subroutine to detect areas to be refined.
+C
+CC    Method:        
+C
+C     Declarations:
+C
+      
+C      
+C     Pointer argument    
+      TYPE(Agrif_Grid) ,pointer  :: g        ! Pointer on the current grid
+C      
+C     Local variables
+      Type(Agrif_pgrid),pointer  :: parcours ! Pointer for the recursive 
+                                             ! procedure      
+      INTEGER, DIMENSION(3)      :: size
+      INTEGER                    :: iii
+      Real :: g_eps     
+C
+      parcours => g % child_grids
+C  
+C     To be positioned on the finer grids of the grid hierarchy          
+C  
+      do while (associated(parcours))       
+         Call Agrif_detect_all (parcours % gr)  
+        parcours => parcours % next             
+      enddo
+C
+      g_eps = huge(1.)
+      do iii = 1 , Agrif_Probdim
+         g_eps=min(g_eps,g%Agrif_d(iii))
+      enddo
+C
+      g_eps = g_eps/100.
+C          
+      if ( Agrif_Probdim .EQ. 1 ) g%tabpoint1D=0
+      if ( Agrif_Probdim .EQ. 2 ) g%tabpoint2D=0
+      if ( Agrif_Probdim .EQ. 3 ) g%tabpoint3D=0
+C      
+      do iii = 1 , Agrif_Probdim
+         if (g%Agrif_d(iii)/Agrif_coeffref(iii).LT.
+     &                     (Agrif_mind(iii)-g_eps)) Return
+      enddo
+C                                       
+      Call Agrif_instance(g)
+C  
+C     Detection (Agrif_detect is a user s routine)
+C      
+     
+      do iii = 1 , Agrif_Probdim
+         size(iii) = g%nb(iii) + 1
+      enddo
+C
+      SELECT CASE (Agrif_Probdim)
+      CASE (1) 
+         Call Agrif_detect(g%tabpoint1D,size)
+      CASE (2) 
+         Call Agrif_detect(g%tabpoint2D,size)
+      CASE (3) 
+         Call Agrif_detect(g%tabpoint3D,size)
+      END SELECT
+C
+C     Addition of the areas detected on the child grids
+C      
+      parcours => g % child_grids 
+C           
+      Do while (associated(parcours))
+        Call Agrif_Add_detected_areas (g,parcours % gr)
+        parcours => parcours % next 
+      enddo
+C     
+      Return      
+C
+      End Subroutine Agrif_detect_all
+C      
+C
+C
+C     **************************************************************************
+CCC   Subroutine Agrif_Add_detected_areas
+C     **************************************************************************
+C      
+      Subroutine Agrif_Add_detected_areas(parentgrid,childgrid)
+C
+CCC   Description:
+CCC   Subroutine to add on the parent grid the areas detected 
+CC       on its child grids.
+C
+CC    Method:        
+C
+C     Declarations:
+C
+      
+C 
+      Type(Agrif_Grid),pointer   :: parentgrid,childgrid
+C      
+      Integer :: i,j,k
+C
+      do i = 1,childgrid%nb(1)+1
+         if ( Agrif_Probdim .EQ. 1 ) then
+            If (childgrid%tabpoint1D(i).EQ.1) Then
+                parentgrid%tabpoint1D(childgrid%ix(1)+
+     &                 (i-1)/Agrif_Coeffref(1)) = 1
+            endif
+         else
+            do j=1,childgrid%nb(2)+1
+               if (Agrif_Probdim.EQ.2) then
+              If (childgrid%tabpoint2D(i,j).EQ.1) Then
+                  parentgrid%tabpoint2D(
+     &                  childgrid%ix(1)+(i-1)/Agrif_Coeffref(1),
+     &                  childgrid%ix(2)+(j-1)/Agrif_Coeffref(2)) = 1
+                  endif
+               else
+                  do k=1,childgrid%nb(3)+1
+                If (childgrid%tabpoint3D(i,j,k).EQ.1) Then
+                    parentgrid%tabpoint3D(
+     &                     childgrid%ix(1)+(i-1)/Agrif_Coeffref(1),
+     &                     childgrid%ix(2)+(j-1)/Agrif_Coeffref(2),
+     &                     childgrid%ix(3)+(k-1)/Agrif_Coeffref(3)) = 1
+                     endif
+                  enddo
+               endif
+            enddo
+         endif
+      enddo
+C      
+      Return
+C
+      End Subroutine Agrif_Add_detected_areas   
+C      
+C
+C     **************************************************************************
+CCC   Subroutine Agrif_Free_before_All
+C     **************************************************************************
+C
+      Recursive Subroutine Agrif_Free_before_All(g)
+C
+CCC   Description:
+C
+CC    Method:        
+C
+C     Declarations:
+C
+C     Pointer argument    
+      Type(Agrif_pgrid),pointer   :: g        ! Pointer on the current grid
+C
+C     Local pointer
+      Type(Agrif_pgrid),pointer  :: parcours ! Pointer for the recursive 
+                                             ! procedure      
+C
+C
+      parcours => g        
+C      
+      Do while (associated(parcours))     
+        If (.not. parcours%gr%fixed) Then
+            Call Agrif_Free_data_before(parcours%gr)
+            parcours % gr % oldgrid = .TRUE.        
+        endif
+C
+        Call Agrif_Free_before_all (parcours % gr % child_grids)
+C  
+        parcours => parcours % next             
+      enddo
+C     
+      Return      
+C
+C
+      End Subroutine Agrif_Free_before_All
+C     **************************************************************************
+CCC   Subroutine Agrif_Save_All
+C     **************************************************************************
+C
+      Recursive Subroutine Agrif_Save_All(g)
+C
+CCC   Description:
+C
+CC    Method:        
+C
+C     Declarations:
+C
+C     Pointer argument    
+      Type(Agrif_pgrid),pointer   :: g        ! Pointer on the current grid
+C
+C     Local pointer
+      Type(Agrif_pgrid),pointer  :: parcours ! Pointer for the recursive 
+                                             ! procedure      
+C
+C
+      parcours => g        
+C      
+      Do while (associated(parcours))     
+        If (.not. parcours%gr%fixed) Then
+            Call Agrif_Instance(parcours%gr)
+            Call Agrif_Before_Regridding()
+            parcours % gr % oldgrid = .TRUE.        
+        endif
+C
+        Call Agrif_Save_All (parcours % gr % child_grids)
+C  
+        parcours => parcours % next             
+      enddo
+C     
+      Return      
+C
+C
+      End Subroutine Agrif_Save_All      
+C
+C
+C
+C     **************************************************************************
+CCC   Subroutine Agrif_Free_after_All
+C     **************************************************************************
+C
+      Recursive Subroutine Agrif_Free_after_All(g)
+C
+CCC   Description:
+C
+CC    Method:        
+C
+C     Declarations:
+C
+      
+C      
+C     Pointer argument    
+      Type(Agrif_pgrid),pointer   :: g       ! Pointer on the current grid
+C
+C     Local pointers
+      TYPE(Agrif_pgrid),pointer  :: parcours ! Pointer for the recursive proced
+      Type(Agrif_pgrid),pointer  :: preparcours   
+      Type(Agrif_pgrid),pointer  :: preparcoursini 
+C
+C
+      Allocate(preparcours)
+C 
+      preparcoursini => preparcours
+C 
+      Nullify(preparcours % gr)
+C 
+      preparcours % next => g
+C
+      parcours => g
+C      
+      Do while (associated(parcours))
+C
+         if ( (.NOT. parcours% gr% fixed) .AND.
+     &        (parcours% gr% oldgrid    ) ) then
+          Call Agrif_Free_data_after(parcours%gr)
+         endif
+C
+         Call Agrif_Free_after_all (parcours % gr % child_grids)
+C
+      If (parcours % gr % oldgrid) Then
+          Deallocate(parcours % gr)
+          preparcours % next => parcours % next
+          Deallocate(parcours)
+          parcours => preparcours % next
+        Else
+          preparcours => preparcours % next
+          parcours => parcours % next 
+         endif       
+      enddo
+C
+      Deallocate(preparcoursini)
+C     
+      Return      
+C
+      End Subroutine Agrif_Free_after_All
+C
+C
+C     **************************************************************************
+CCC   Subroutine Agrif_Integrate
+C     **************************************************************************
+C
+      Recursive Subroutine Agrif_Integrate(g, procname)         
+C
+CCC   Description:
+CCC   Subroutine to manage the time integration of the grid hierarchy.
+C
+CC    Method:
+CC    Recursive subroutine and call on subroutines Agrif_Instance & Agrif_Step
+C
+C     Declarations:
+C
+      
+C      
+C     Pointer argument    
+      Type(Agrif_Grid),pointer   :: g        ! Pointer on the current grid
+C
+C     main procedure name
+      Optional :: procname
+      External :: procname      
+C      
+C     Local pointer
+      Type(Agrif_pgrid),pointer  :: parcours ! Pointer for the recursive 
+                                             ! procedure
+C
+C     Local scalars
+      INTEGER                    :: nbt      ! Number of time steps 
+                                             ! of the current grid
+      INTEGER                    :: k        
+      INTEGER                    :: iii
+C  
+C     Instanciation of the variables of the current grid
+      If (g%fixedrank .NE.0) Then      
+      Call Agrif_Instance
+     &     (g)
+      End If
+C       
+C     One step on the current grid      
+C
+      If (present(procname)) Then
+         Call procname ()      
+      Else
+        write(*,*) 'The name of the step subroutine has not '
+        write(*,*) 'been given in the subroutine Agrif_Integrate'
+        stop
+      endif
+C
+C     Number of time steps on the current grid      
+C
+      g%ngridstep = g % ngridstep + 1
+C      
+      parcours => g % child_grids
+C    
+C     Recursive procedure for the time integration of the grid hierarchy      
+      Do while (associated(parcours))
+C
+C       Instanciation of the variables of the current grid            
+        Call Agrif_Instance
+     &           (parcours % gr)
+C       
+C       Number of time steps
+        nbt = 1
+        do iii = 1 , Agrif_Probdim
+           nbt = max(nbt, parcours % gr % timeref(iii))
+        enddo
+C       
+        Do k = 1,nbt
+C       
+           If (present(procname)) Then
+                 Call Agrif_Integrate (parcours % gr, procname)
+           Else
+                 Call Agrif_Integrate (parcours % gr)      
+           endif
+C       
+        enddo     
+C  
+        parcours => parcours % next
+C     
+      enddo
+C
+C      
+      End Subroutine Agrif_Integrate 
+
+C     **************************************************************************
+CCC   Subroutine Agrif_Integrate_Child
+C     **************************************************************************
+C
+      Recursive Subroutine Agrif_Integrate_Child(g,procname)
+C
+CCC   Description:
+CCC   Subroutine to manage the time integration of the grid hierarchy.
+C
+CC    Method:
+CC    Recursive subroutine and call on subroutines Agrif_Instance & Agrif_Step.
+C
+C     Declarations:
+C
+
+C
+C     Pointer argument
+      Type(Agrif_Grid),pointer   :: g        ! Pointer on the current grid
+C
+C     main procedure name
+      Optional :: procname
+      External :: procname
+C
+C     Local pointer
+      Type(Agrif_pgrid),pointer  :: parcours ! Pointer for the recursive
+                                             ! procedure
+C
+C     One step on the current grid
+C
+      If (present(procname)) Then
+         Call procname ()      
+      Else
+        write(*,*) 'The name of the step subroutine has not '
+        write(*,*) 'been given in the subroutine Agrif_Integrate'
+        stop
+      endif
+C
+C     Number of time steps on the current grid
+C
+C
+      parcours => g % child_grids
+C
+C     Recursive procedure for the time integration of the grid hierarchy      
+      Do while (associated(parcours))
+C
+C       Instanciation of the variables of the current grid
+        Call Agrif_Instance
+     &           (parcours % gr)
+
+C       
+           If (present(procname)) Then
+                 Call Agrif_Integrate_Child (parcours % gr, procname)
+           Else
+                 Call Agrif_Integrate_Child (parcours % gr)
+           endif
+C  
+        parcours => parcours % next
+C     
+      enddo
+C
+C
+      End Subroutine Agrif_Integrate_Child
+
+C
+C
+C     **************************************************************************
+CCC   Subroutine Agrif_Init_Grids
+C     **************************************************************************
+C      
+      Subroutine Agrif_Init_Grids
+C
+CCC   Description:
+CCC   Subroutine to initialize the root coarse grid pointed by Agrif_Mygrid. 
+CCC   It is called in the main program.
+C
+C     Declarations:
+C
+C
+      INTEGER :: iii
+C
+C             definition of the probdim and modtypes variables
+C
+#ifdef AGRIF_MPI
+#include "mpif.h"
+      Agrif_MPIPREC = MPI_DOUBLE_PRECISION
+#endif
+      Call Agrif_probdim_modtype_def()
+C      
+      Agrif_UseSpecialValue = .FALSE.
+      Agrif_UseSpecialValueFineGrid = .FALSE.
+      Agrif_SpecialValue = 0.
+      Agrif_SpecialValueFineGrid = 0.
+C      
+C     Allocation of Agrif_Mygrid
+      allocate(Agrif_Mygrid)
+C      
+C     Space and time refinement factors are set to 1 on the root grid
+C
+      do iii = 1 , Agrif_Probdim
+         Agrif_Mygrid % spaceref(iii) = 1
+         Agrif_Mygrid % timeref(iii) = 1
+      enddo
+C      
+C     Initialization of the number of time steps    
+      Agrif_Mygrid % ngridstep = 0
+      Agrif_Mygrid % grid_id = 0
+C
+C     No parent grid for the root coarse grid
+      Nullify(Agrif_Mygrid % parent)
+C      
+C     Initialization of the minimum positions, global abscissa and space steps  
+      do iii= 1 ,  Agrif_Probdim
+         Agrif_Mygrid % ix(iii) = 1            
+         Agrif_Mygrid % Agrif_x(iii) = 0.
+         Agrif_Mygrid % Agrif_d(iii) = 1. 
+C     Borders of the root coarse grid 
+         Agrif_Mygrid % NearRootBorder(iii) = .true.  
+         Agrif_Mygrid % DistantRootBorder(iii) = .true.      
+      enddo
+C  
+C     The root coarse grid is a fixed grid
+      Agrif_Mygrid % fixed = .TRUE.
+C     Level of the root grid
+      Agrif_Mygrid % level = 0
+C     Maximum level in the hierarchy
+      Agrif_MaxLevelLoc = 0
+      
+C      
+C     Number of the grid pointed by Agrif_Mygrid (root coarse grid)
+      Agrif_Mygrid % rank = 1      
+C 
+C     Number of the root grid as a fixed grid   
+      Agrif_Mygrid % fixedrank = 0  
+C 
+C     Initialization of some fields of the root grid variables     
+      Call Agrif_Create_Var (Agrif_Mygrid)
+C      
+C     Initialization of the other fields of the root grid variables (number of 
+C     cells, positions, number and type of its dimensions, ...)  
+      Call Agrif_Set_numberofcells(Agrif_Mygrid)
+C      
+      Call Agrif_Instance (Agrif_Mygrid)      
+C
+      Call Agrif_Set_numberofcells(Agrif_Mygrid)          
+C             
+C     Allocation of the array containing the values of the grid variables
+      Call Agrif_Allocation (Agrif_Mygrid)
+C        
+      Call Agrif_initialisations(Agrif_Mygrid)    
+C      
+      nullify(Agrif_Mygrid % child_grids)
+C 
+C     Total number of fixed grids   
+      Agrif_nbfixedgrids = 0         
+C      
+      Call Agrif_Instance (Agrif_Mygrid)
+C        
+      End Subroutine Agrif_Init_Grids  
+C
+C
+C     **************************************************************************
+CCC   Subroutine Agrif_Deallocation
+C     **************************************************************************
+C      
+      Subroutine Agrif_Deallocation
+C
+CCC   Description:
+CCC   Subroutine to initialize the root coarse grid pointed by Agrif_Mygrid. 
+CCC   It is called in the main program.
+C
+C     Declarations:
+C
+C
+      INTEGER :: nb
+C
+C             definition of the probdim and modtypes variables
+C
+      do nb = 1, Agrif_NbVariables
+          if ( allocated(Agrif_Mygrid % tabvars(nb) % var % array1) ) 
+     &       Deallocate(Agrif_Mygrid % tabvars(nb) % var % array1)
+          if ( allocated(Agrif_Mygrid % tabvars(nb) % var % array2) ) 
+     &       Deallocate(Agrif_Mygrid % tabvars(nb) % var % array2)
+          if ( allocated(Agrif_Mygrid % tabvars(nb) % var % array3) ) 
+     &       Deallocate(Agrif_Mygrid % tabvars(nb) % var % array3)
+          if ( allocated(Agrif_Mygrid % tabvars(nb) % var % array4) ) 
+     &       Deallocate(Agrif_Mygrid % tabvars(nb) % var % array4)
+          if ( allocated(Agrif_Mygrid % tabvars(nb) % var % array5) ) 
+     &       Deallocate(Agrif_Mygrid % tabvars(nb) % var % array5)
+          if ( allocated(Agrif_Mygrid % tabvars(nb) % var % array6) ) 
+     &       Deallocate(Agrif_Mygrid % tabvars(nb) % var % array6)
+C
+          if ( allocated(Agrif_Mygrid % tabvars(nb) % var % iarray1) ) 
+     &       Deallocate(Agrif_Mygrid % tabvars(nb) % var % iarray1)
+          if ( allocated(Agrif_Mygrid % tabvars(nb) % var % iarray2) ) 
+     &       Deallocate(Agrif_Mygrid % tabvars(nb) % var % iarray2)
+          if ( allocated(Agrif_Mygrid % tabvars(nb) % var % iarray3) ) 
+     &       Deallocate(Agrif_Mygrid % tabvars(nb) % var % iarray3)
+          if ( allocated(Agrif_Mygrid % tabvars(nb) % var % iarray4) ) 
+     &       Deallocate(Agrif_Mygrid % tabvars(nb) % var % iarray4)
+          if ( allocated(Agrif_Mygrid % tabvars(nb) % var % iarray5) ) 
+     &       Deallocate(Agrif_Mygrid % tabvars(nb) % var % iarray5)
+          if ( allocated(Agrif_Mygrid % tabvars(nb) % var % iarray6) ) 
+     &       Deallocate(Agrif_Mygrid % tabvars(nb) % var % iarray6)
+C
+          if ( allocated(Agrif_Mygrid % tabvars(nb) % var % larray1) ) 
+     &       Deallocate(Agrif_Mygrid % tabvars(nb) % var % larray1)
+          if ( allocated(Agrif_Mygrid % tabvars(nb) % var % larray2) ) 
+     &       Deallocate(Agrif_Mygrid % tabvars(nb) % var % larray2)
+          if ( allocated(Agrif_Mygrid % tabvars(nb) % var % larray3) ) 
+     &       Deallocate(Agrif_Mygrid % tabvars(nb) % var % larray3)
+          if ( allocated(Agrif_Mygrid % tabvars(nb) % var % larray4) ) 
+     &       Deallocate(Agrif_Mygrid % tabvars(nb) % var % larray4)
+          if ( allocated(Agrif_Mygrid % tabvars(nb) % var % larray5) ) 
+     &       Deallocate(Agrif_Mygrid % tabvars(nb) % var % larray5)
+          if ( allocated(Agrif_Mygrid % tabvars(nb) % var % larray6) ) 
+     &       Deallocate(Agrif_Mygrid % tabvars(nb) % var % larray6)
+C
+          if ( allocated(Agrif_Mygrid % tabvars(nb) % var % carray1) ) 
+     &       Deallocate(Agrif_Mygrid % tabvars(nb) % var % carray1)
+          if ( allocated(Agrif_Mygrid % tabvars(nb) % var % carray2) ) 
+     &       Deallocate(Agrif_Mygrid % tabvars(nb) % var % carray2)
+      enddo
+C
+      do nb = 1, Agrif_NbVariables
+        Deallocate(Agrif_Mygrid % tabvars(nb) % var)
+      enddo
+C
+      Deallocate(Agrif_Mygrid % tabvars)
+C
+      Deallocate(Agrif_Mygrid)
+C
+      End Subroutine  Agrif_Deallocation 
+C
+      End module Agrif_Util 
Index: vendors/AGRIF/r_01/AGRIF_FILES/modvariables.F
===================================================================
--- vendors/AGRIF/r_01/AGRIF_FILES/modvariables.F	(revision 2672)
+++ vendors/AGRIF/r_01/AGRIF_FILES/modvariables.F	(revision 2672)
@@ -0,0 +1,152 @@
+      Module Agrif_Variables 
+      Use Agrif_CurgridFunctions
+      
+      Contains
+      Subroutine Agrif_Declare_Variable(posvar,firstpoint,
+     &    raf,lb,ub,varid,torestore)
+      character*(80) :: variablename
+      Type(Agrif_List_Variables), Pointer :: newvariable,newvariablep
+      INTEGER, DIMENSION(:) :: posvar
+      INTEGER, DIMENSION(:) :: lb,ub
+      INTEGER, DIMENSION(:) :: firstpoint
+      CHARACTER(*) ,DIMENSION(:) :: raf        
+      TYPE(Agrif_Pvariable), Pointer :: parent_var,root_var
+      INTEGER :: dimensio
+      INTEGER :: varid
+      LOGICAL, OPTIONAL :: torestore
+      LOGICAL :: restaure
+            
+!      if (agrif_root()) return
+
+      variablename = 'xxx'
+      
+      restaure = .FALSE.
+      if (agrif_mygrid%ngridstep /= 0) then
+        if (present(torestore)) restaure = torestore
+      endif
+      
+      dimensio = SIZE(posvar)
+C
+C    
+      Allocate(newvariable)
+      Allocate(newvariable%pvar)
+      Allocate(newvariable%pvar%var)
+      Allocate(newvariable%pvar%var%posvar(dimensio))
+      Allocate(newvariable%pvar%var%interptab(dimensio))
+      newvariable%pvar%var%variablename = variablename
+      newvariable%pvar%var%interptab = raf
+      newvariable%pvar%var%nbdim = dimensio
+      newvariable%pvar%var%posvar = posvar
+      newvariable%pvar%var%point(1:dimensio) = firstpoint
+      newvariable%pvar%var%restaure = restaure
+
+      newvariable%pvar%var%lb(1:dimensio) = lb(1:dimensio)
+      newvariable%pvar%var%ub(1:dimensio) = ub(1:dimensio)
+      
+      if (restaure) then
+      select case(dimensio)
+      case(1)
+                  Allocate( newvariable%pvar%var%Restore1D(  
+     &      lb(1):ub(1)))         
+            newvariable%pvar%var%Restore1D = 0      
+      case(2)
+                  Allocate( newvariable%pvar%var%Restore2D(  
+     &      lb(1):ub(1),lb(2):ub(2)))         
+            newvariable%pvar%var%Restore2D = 0
+      case(3)
+                  Allocate( newvariable%pvar%var%Restore3D(  
+     &      lb(1):ub(1),lb(2):ub(2),lb(3):ub(3)))         
+            newvariable%pvar%var%Restore3D = 0
+      case(4)
+                  Allocate( newvariable%pvar%var%Restore4D(  
+     &      lb(1):ub(1),lb(2):ub(2),lb(3):ub(3),lb(4):ub(4)))         
+            newvariable%pvar%var%Restore4D = 0
+      case(5)
+                  Allocate( newvariable%pvar%var%Restore5D(  
+     &      lb(1):ub(1),lb(2):ub(2),lb(3):ub(3),lb(4):ub(4),
+     &      lb(5):ub(5)))         
+            newvariable%pvar%var%Restore5D = 0            
+      end select
+      endif
+      
+      newvariable % nextvariable => Agrif_Curgrid%variables
+      
+      Agrif_Curgrid%variables => newvariable
+      Agrif_Curgrid%Nbvariables = Agrif_Curgrid%Nbvariables + 1
+
+      varid = -Agrif_Curgrid%Nbvariables
+
+!       if (agrif_curgrid%parent%nbvariables < agrif_curgrid%nbvariables)
+!     &       then
+!      Allocate(newvariablep)
+!      Allocate(newvariablep%pvar)
+!      Allocate(newvariablep%pvar%var)      
+!      Allocate(newvariablep%pvar%var%posvar(dimensio))
+!      Allocate(newvariablep%pvar%var%interptab(dimensio))
+!      newvariablep%pvar%var%variablename = variablename
+!      newvariablep%pvar%var%interptab = raf
+!      newvariablep%pvar%var%nbdim = dimensio
+!      newvariablep%pvar%var%posvar = posvar
+!      newvariablep%pvar%var%point(1:dimensio) = firstpoint
+!      newvariablep%pvar%var%restaure = restaure      
+! 
+!      newvariablep%pvar%var%lb(1:dimensio) = lb(1:dimensio)
+!      newvariablep%pvar%var%ub(1:dimensio) = ub(1:dimensio)
+!           
+!      newvariablep % nextvariable => Agrif_Curgrid%parent%variables
+!      
+!      Agrif_Curgrid%parent%variables => newvariablep       
+!      
+!      Agrif_Curgrid%parent%Nbvariables = 
+!     &    Agrif_Curgrid%parent%Nbvariables + 1
+!      parent_var=>newvariablep%pvar
+!      else
+!      parent_var=>Agrif_Search_Variable
+!     &              (Agrif_Curgrid%parent,Agrif_Curgrid%nbvariables)
+!       endif
+       
+       if (.not.agrif_root()) then
+      parent_var=>Agrif_Search_Variable
+     &              (Agrif_Curgrid%parent,Agrif_Curgrid%nbvariables)       
+       
+       newvariable%pvar%parent_var=>parent_var
+       do i=1,dimensio
+         if (parent_var%var%interptab(i)=='N') then
+           parent_var%var%lb(i)=lb(i)
+           parent_var%var%ub(i)=ub(i)
+         endif
+       enddo
+       endif       
+      
+      root_var=>Agrif_Search_Variable
+     &              (Agrif_Mygrid,Agrif_Curgrid%nbvariables)
+     
+      newvariable%pvar%var%root_var=>root_var%var
+      
+           
+      End Subroutine Agrif_Declare_Variable
+
+      FUNCTION Agrif_Search_Variable(grid,varid)
+      integer :: varid
+      Type(Agrif_Pvariable), Pointer :: Agrif_Search_variable
+      Type(Agrif_grid), Pointer :: grid
+      
+      Type(Agrif_List_Variables), pointer :: parcours
+      Logical :: foundvariable
+      integer nb
+      integer :: varidinv
+      
+      foundvariable = .FALSE.
+      parcours => grid%variables
+      varidinv = 1 + grid%nbvariables - varid
+
+      do nb=1,varidinv-1
+         parcours => parcours%nextvariable    
+      End Do
+      
+      Agrif_Search_variable => parcours%pvar
+      
+      
+      End Function Agrif_Search_variable
+      
+      End Module Agrif_Variables      
Index: vendors/AGRIF/r_01/KEY_CPP
===================================================================
--- vendors/AGRIF/r_01/KEY_CPP	(revision 2672)
+++ vendors/AGRIF/r_01/KEY_CPP	(revision 2672)
@@ -0,0 +1,1 @@
+
Index: vendors/AGRIF/r_01/LIB/DiversListe.c
===================================================================
--- vendors/AGRIF/r_01/LIB/DiversListe.c	(revision 2672)
+++ vendors/AGRIF/r_01/LIB/DiversListe.c	(revision 2672)
@@ -0,0 +1,606 @@
+/******************************************************************************/
+/*                                                                            */
+/*     CONV (converter) for Agrif (Adaptive Grid Refinement In Fortran)       */
+/*                                                                            */
+/* Copyright or   or Copr. Laurent Debreu (Laurent.Debreu@imag.fr)            */
+/*                        Cyril Mazauric (Cyril_Mazauric@yahoo.fr)            */
+/* This software is governed by the CeCILL-C license under French law and     */
+/* abiding by the rules of distribution of free software.  You can  use,      */
+/* modify and/ or redistribute the software under the terms of the CeCILL-C   */
+/* license as circulated by CEA, CNRS and INRIA at the following URL          */
+/* "http://www.cecill.info".                                                  */
+/*                                                                            */
+/* As a counterpart to the access to the source code and  rights to copy,     */
+/* modify and redistribute granted by the license, users are provided only    */
+/* with a limited warranty  and the software's author,  the holder of the     */
+/* economic rights,  and the successive licensors  have only  limited         */
+/* liability.                                                                 */
+/*                                                                            */
+/* In this respect, the user's attention is drawn to the risks associated     */
+/* with loading,  using,  modifying and/or developing or reproducing the      */
+/* software by the user in light of its specific status of free software,     */
+/* that may mean  that it is complicated to manipulate,  and  that  also      */
+/* therefore means  that it is reserved for developers  and  experienced      */
+/* professionals having in-depth computer knowledge. Users are therefore      */
+/* encouraged to load and test the software's suitability as regards their    */
+/* requirements in conditions enabling the security of their systems and/or   */
+/* data to be ensured and,  more generally, to use and operate it in the      */
+/* same conditions as regards security.                                       */
+/*                                                                            */
+/* The fact that you are presently reading this means that you have had       */
+/* knowledge of the CeCILL-C license and that you accept its terms.           */
+/******************************************************************************/
+/* version 1.7                                                                */
+/******************************************************************************/
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "decl.h"
+
+/******************************************************************************/
+/*                           Add_Common_var_1                                 */
+/******************************************************************************/
+/*  This subroutines is used to add the variable defined in common in the     */
+/*     List_Common_Var                                                        */
+/******************************************************************************/
+/*                                                                            */
+/******************************************************************************/
+void Add_Common_var_1()
+{
+   listvar *newvar;
+   listvar *newvar2;
+   variable *newvariable;
+   listdim *dims;
+   char listdimension[LONG_C];
+   char ligne[LONG_C];
+   int out;
+
+   if ( firstpass == 1 )
+   {
+
+   newvar = (listvar *)malloc(sizeof(listvar));
+   newvariable = (variable *)malloc(sizeof(variable));
+   /*                                                                         */
+   Init_Variable(newvariable);
+   /*                                                                         */
+   strcpy(newvariable->v_nomvar,commonvar);
+   Save_Length(commonvar,4);
+   strcpy(newvariable->v_commonname,commonblockname);
+   Save_Length(commonblockname,7);
+   strcpy(newvariable->v_modulename,curmodulename);
+   Save_Length(curmodulename,6);
+   strcpy(newvariable->v_subroutinename,subroutinename);
+   Save_Length(subroutinename,11);
+   newvariable->v_positioninblock= positioninblock;
+   newvariable->v_common=1;
+   strcpy(newvariable->v_commoninfile,mainfile);
+   Save_Length(mainfile,10);
+
+   newvar->var = newvariable;
+
+   if ( commondim )
+   {
+      newvariable->v_dimension=commondim;
+      newvariable->v_dimensiongiven=1;
+      newvariable->v_nbdim=num_dims(commondim);
+      /* Creation of the string for the dimension of this variable            */
+      dimsempty = 1;
+      strcpy(listdimension,"");
+
+      if ( commondim )
+      {
+         dims = commondim;
+         while (dims)
+         {
+            if ( strcasecmp(dims->dim.first,"") ||
+                 strcasecmp(dims->dim.last,""))  dimsempty = 0;
+            sprintf(ligne,"%s:%s",dims->dim.first,dims->dim.last);
+            strcat(listdimension,ligne);
+            if ( dims->suiv ) strcat(listdimension,",");
+            dims = dims->suiv;
+         }
+         if ( dimsempty == 1 ) newvariable->v_dimsempty=1;
+      }
+      strcpy(newvariable->v_readedlistdimension,listdimension);
+      Save_Length(listdimension,15);
+   }
+
+
+   newvar->suiv = NULL;
+
+   if ( !List_Common_Var )
+   {
+      List_Common_Var = newvar;
+   }
+   else
+   {
+      newvar2 = List_Common_Var;
+      out = 0 ;
+      while ( newvar2 && out == 0 )
+      {
+         if ( !strcasecmp(newvar2->var->v_nomvar,commonvar) &&
+              !strcasecmp(newvar2->var->v_commonname,commonblockname) &&
+              !strcasecmp(newvar2->var->v_subroutinename,subroutinename)
+                          ) out = 1 ;
+         else newvar2 = newvar2->suiv;
+      }
+      if ( out == 0 )
+      {
+         newvar->suiv = List_Common_Var;
+         List_Common_Var = newvar;
+      }
+      else
+      {
+         free(newvar);
+      }
+   }
+   }
+}
+
+/******************************************************************************/
+/*                           Addtolistnom                                     */
+/******************************************************************************/
+/* This subroutine is used to add a variable to the list                      */
+/******************************************************************************/
+/*                                                                            */
+/******************************************************************************/
+listnom *Addtolistnom(char *nom, listnom *listin,int value)
+{
+   listnom *newnom;
+   listnom *parcours;
+   int out;
+
+   newnom=(listnom *) malloc (sizeof (listnom));
+   strcpy(newnom->o_nom,nom);
+   Save_Length(nom,23);
+   newnom->o_val = value;
+   newnom->suiv = NULL;
+
+   if ( !listin ) listin = newnom;
+   else
+   {
+      parcours = listin;
+      out = 0 ;
+      while ( parcours && out == 0 )
+      {
+         if ( !strcasecmp(parcours->o_nom,nom) ) out = 1 ;
+         else parcours=parcours->suiv;
+      }
+      if ( out == 0 )
+      {
+          newnom->suiv = listin;
+          listin = newnom;
+      }
+      else
+      {
+         free(newnom);
+      }
+   }
+   return listin;
+}
+
+/******************************************************************************/
+/*                           Addtolistname                                    */
+/******************************************************************************/
+/* This subroutine is used to add a        variable to the list               */
+/******************************************************************************/
+/*        _______     _______     _______     _______     _______             */
+/*       +      +    +      +    +      +    +      +    +      +             */
+/*       + NEW  +--->+ glob +--->+ glob +--->+ glob +--->+ glob +             */
+/*       +______+    +______+    +______+    +______+    +______+             */
+/*                                                                            */
+/*                                                                            */
+/*                                                                            */
+/******************************************************************************/
+listname *Addtolistname(char *nom,listname *input)
+{
+   listname *newnom;
+   listname *parcours;
+   int out;
+
+   if ( !input )
+   {
+      newnom=(listname *) malloc (sizeof (listname));
+      strcpy(newnom->n_name,nom);
+      Save_Length(nom,20);
+      newnom->suiv = NULL;
+      input = newnom;
+   }
+   else
+   {
+      parcours = input;
+      out = 0 ;
+      while ( parcours && out == 0 )
+      {
+         if ( !strcasecmp(parcours->n_name,nom) ) out = 1;
+         else parcours=parcours->suiv;
+      }
+      if ( out == 0 )
+      {
+         newnom=(listname *) malloc (sizeof (listname));
+         strcpy(newnom->n_name,nom);
+         Save_Length(nom,20);
+         newnom->suiv = input;
+         input = newnom;
+      }
+   }
+   return input;
+}
+
+/******************************************************************************/
+/*                    ModuleIsDefineInInputFile                               */
+/******************************************************************************/
+/* This subroutine is used to know if the module is defined in the input file */
+/******************************************************************************/
+/*                                                                            */
+/*                                                                            */
+/******************************************************************************/
+int ModuleIsDefineInInputFile(char *name)
+{
+   listnom *newnom;
+   int out;
+
+   out = 0;
+   if ( listofmodules )
+   {
+      newnom = listofmodules;
+      while( newnom && out == 0 )
+      {
+         if ( !strcasecmp(newnom->o_nom,name) ) out = 1 ;
+         else newnom=newnom->suiv;
+      }
+   }
+   return out;
+}
+
+/******************************************************************************/
+/*                      Addmoduletothelisttmp                                 */
+/******************************************************************************/
+/* This subroutine is used to add a record to a list of struct                */
+/* listusemodule                                                              */
+/******************************************************************************/
+/*                                                                            */
+/*       subroutine sub ... USE mod1 ===> insert in list                      */
+/*        _______     _______     _______     _______     _______             */
+/*       +      +    +      +    +      +    +      +    +      +             */
+/*       + NEW  +--->+ list +--->+ list +--->+ list +--->+ list +             */
+/*       +______+    +______+    +______+    +______+    +______+             */
+/*                                                                            */
+/*       list =  listofmoduletmp                                              */
+/*                                                                            */
+/******************************************************************************/
+void Addmoduletothelisttmp(char *name)
+{
+  listusemodule *newmodule;
+  listusemodule *parcours;
+  int out;
+
+  if ( !listofmoduletmp)
+  {
+    newmodule =(listusemodule *)malloc(sizeof(listusemodule));
+    strcpy(newmodule->u_usemodule,name);
+    Save_Length(name,16);
+    strcpy(newmodule->u_cursubroutine,subroutinename);
+    Save_Length(subroutinename,18);
+    newmodule->suiv = NULL;
+    listofmoduletmp = newmodule ;
+  }
+  else
+  {
+    parcours = listofmoduletmp;
+    out = 0;
+    while( parcours && out == 0 )
+    {
+       if ( !strcasecmp(parcours->u_usemodule,name) ) out = 1;
+       else parcours = parcours->suiv;
+    }
+    if ( out == 0 )
+    {
+       newmodule =(listusemodule *)malloc(sizeof(listusemodule));
+       strcpy(newmodule->u_usemodule,name);
+       Save_Length(name,16);
+       strcpy(newmodule->u_cursubroutine,subroutinename);
+       Save_Length(subroutinename,18);
+       newmodule->suiv = listofmoduletmp;
+       listofmoduletmp = newmodule;
+    }
+  }
+}
+
+/******************************************************************************/
+/*                          Add_NameOfModule_1                                */
+/******************************************************************************/
+/* This subroutine is used to add a        variable to the list               */
+/******************************************************************************/
+/*        _______     _______     _______     _______     _______             */
+/*       +      +    +      +    +      +    +      +    +      +             */
+/*       + NEW  +--->+ glob +--->+ glob +--->+ glob +--->+ glob +             */
+/*       +______+    +______+    +______+    +______+    +______+             */
+/*                                                                            */
+/*                                                                            */
+/*                                                                            */
+/******************************************************************************/
+void Add_NameOfModule_1(char *nom)
+{
+   listnom *newnom;
+
+   if ( firstpass == 1 )
+   {
+      newnom=(listnom *) malloc (sizeof (listnom));
+      strcpy(newnom->o_nom,nom);
+      Save_Length(nom,23);
+      newnom->suiv = List_NameOfModule;
+      List_NameOfModule = newnom;
+   }
+}
+
+/******************************************************************************/
+/*                          Add_NameOfCommon_1                                */
+/******************************************************************************/
+/* This subroutine is used to add a        variable to the list               */
+/******************************************************************************/
+/*        _______     _______     _______     _______     _______             */
+/*       +      +    +      +    +      +    +      +    +      +             */
+/*       + NEW  +--->+ glob +--->+ glob +--->+ glob +--->+ glob +             */
+/*       +______+    +______+    +______+    +______+    +______+             */
+/*                                                                            */
+/*                                                                            */
+/*                                                                            */
+/******************************************************************************/
+void Add_NameOfCommon_1(char *nom,char *cursubroutinename)
+{
+   listnom *newnom;
+   listnom *parcours;
+
+   if ( firstpass == 1 )
+   {
+      parcours = List_NameOfCommon;
+      while ( parcours && strcasecmp(parcours->o_nom,nom) )
+                                                      parcours = parcours->suiv;
+      if ( !parcours )
+      {
+         newnom=(listnom *) malloc (sizeof (listnom));
+         strcpy(newnom->o_nom,nom);
+         strcpy(newnom->o_subroutinename,cursubroutinename);
+         Save_Length(nom,23);
+         newnom->suiv = List_NameOfCommon;
+         List_NameOfCommon = newnom;
+      }
+   }
+}
+
+/******************************************************************************/
+/*                     Add_CouplePointed_Var_1                                */
+/******************************************************************************/
+/* Firstpass 1                                                                */
+/* We should complete the listvarpointtovar                                   */
+/******************************************************************************/
+/*                                                                            */
+/******************************************************************************/
+void Add_CouplePointed_Var_1(char *namemodule,listcouple *couple)
+{
+   listvarpointtovar *pointtmp;
+
+   if ( firstpass == 1 )
+   {
+      /* we should complete the List_CouplePointed_Var                        */
+      pointtmp=(listvarpointtovar *)malloc(sizeof(listvarpointtovar));
+      strcpy(pointtmp->t_usemodule,namemodule);
+      Save_Length(namemodule,28);
+      strcpy(pointtmp->t_cursubroutine,subroutinename);
+      Save_Length(subroutinename,29);
+      pointtmp->t_couple = couple;
+      if ( List_CouplePointed_Var )
+      {
+         pointtmp->suiv = List_CouplePointed_Var;
+         List_CouplePointed_Var = pointtmp;
+      }
+      else
+      {
+         pointtmp->suiv = NULL;
+         List_CouplePointed_Var = pointtmp;
+      }
+   }
+}
+
+/******************************************************************************/
+/*                           Add_Include_1                                    */
+/******************************************************************************/
+/* This subroutine is used to add a record to a list of struct                */
+/*  List_Include                                                              */
+/******************************************************************************/
+/*                                                                            */
+/*       subroutine sub ... include mod1 ===> insert in list                  */
+/*        _______     _______     _______     _______     _______             */
+/*       +      +    +      +    +      +    +      +    +      +             */
+/*       + NEW  +--->+ list +--->+ list +--->+ list +--->+ list +             */
+/*       +______+    +______+    +______+    +______+    +______+             */
+/*                                                                            */
+/*       list =  List_Include                                                 */
+/*                                                                            */
+/******************************************************************************/
+void Add_Include_1(char *name)
+{
+  listusemodule *newinclude;
+
+  if ( firstpass == 1 )
+  {
+  newinclude =(listusemodule *)malloc(sizeof(listusemodule));
+  strcpy(newinclude->u_usemodule,name);
+  Save_Length(name,16);
+  strcpy(newinclude->u_cursubroutine,subroutinename);
+  Save_Length(subroutinename,18);
+  newinclude->suiv = NULL;
+
+  if ( !List_Include)
+  {
+     List_Include  = newinclude ;
+  }
+  else
+  {
+    newinclude->suiv = List_Include;
+    List_Include = newinclude;
+  }
+  }
+}
+
+/******************************************************************************/
+/*                     Add_ImplicitNoneSubroutine_1                           */
+/******************************************************************************/
+/* This subroutine is used to add a record to a list of struct                */
+/******************************************************************************/
+/*                                                                            */
+/*                                                                            */
+/******************************************************************************/
+void Add_ImplicitNoneSubroutine_1()
+{
+
+  if ( firstpass == 1 )
+  {
+     List_ImplicitNoneSubroutine = Addtolistname(subroutinename,
+                                                   List_ImplicitNoneSubroutine);
+  }
+}
+
+
+/******************************************************************************/
+/*                        WriteIncludeDeclaration                             */
+/******************************************************************************/
+/* Firstpass 0                                                                */
+/******************************************************************************/
+/*                                                                            */
+/******************************************************************************/
+void WriteIncludeDeclaration()
+{
+  listusemodule *newinclude;
+
+  newinclude = List_Include;
+  fprintf(fortranout,"\n");
+  while ( newinclude )
+  {
+     if ( !strcasecmp(newinclude->u_cursubroutine,subroutinename) )
+     {
+        fprintf(fortranout,"      INCLUDE %s \n",newinclude->u_usemodule);
+     }
+     newinclude = newinclude ->suiv;
+  }
+}
+
+/******************************************************************************/
+/*                          Add_Save_Var_1                                    */
+/******************************************************************************/
+/* This subroutine is used to add a record to List_Save_Var                   */
+/******************************************************************************/
+/*        _______     _______     _______     _______     _______             */
+/*       +      +    +      +    +      +    +      +    +      +             */
+/*       + NEW  +--->+ Save +--->+ Save +--->+ Save +--->+  Save+             */
+/*       +______+    +______+    +______+    +______+    +______+             */
+/*                                                                            */
+/******************************************************************************/
+void Add_Save_Var_1 (char *name,listdim *d)
+{
+  listvar *newvar;
+  listdim *dims;
+  char ligne[LONG_C];
+  char listdimension[LONG_C];
+
+  if ( firstpass == 1 )
+  {
+     newvar=(listvar *)malloc(sizeof(listvar));
+     newvar->var=(variable *)malloc(sizeof(variable));
+     /*                                                                       */
+     Init_Variable(newvar->var);
+     /*                                                                       */
+     newvar->var->v_save=1;
+     strcpy(newvar->var->v_nomvar,name);
+     Save_Length(name,4);
+     strcpy(newvar->var->v_modulename,curmodulename);
+     Save_Length(curmodulename,6);
+     strcpy(newvar->var->v_subroutinename,subroutinename);
+     Save_Length(subroutinename,11);
+     strcpy(newvar->var->v_commoninfile,mainfile);
+     Save_Length(mainfile,10);
+
+     newvar->var->v_dimension=d;
+     /* Creation of the string for the dimension of this variable             */
+     dimsempty = 1;
+
+     if ( d )
+     {
+        newvar->var->v_dimensiongiven=1;
+        dims = d;
+        while (dims)
+        {
+           if ( strcasecmp(dims->dim.first,"") || strcasecmp(dims->dim.last,""))
+                                                                  dimsempty = 0;
+           sprintf(ligne,"%s:%s",dims->dim.first,dims->dim.last);
+           strcat(listdimension,ligne);
+           if ( dims->suiv )
+           {
+              strcat(listdimension,",");
+           }
+           dims = dims->suiv;
+        }
+        if ( dimsempty == 1 ) newvar->var->v_dimsempty=1;
+     }
+
+/*     strcpy(newvar->var->v_readedlistdimension,listdimension);
+     Save_Length(listdimension,15);*/
+     /*                                                                       */
+     newvar->suiv = NULL;
+
+     if ( !List_Save_Var )
+     {
+        List_Save_Var  = newvar ;
+     }
+     else
+     {
+        newvar->suiv = List_Save_Var;
+        List_Save_Var = newvar;
+     }
+  }
+}
+
+void Add_Save_Var_dcl_1 (listvar *var)
+{
+  listvar *newvar;
+  listvar *parcours;
+
+  if ( firstpass == 1 )
+  {
+     parcours = var;
+     while ( parcours )
+     {
+        newvar=(listvar *)malloc(sizeof(listvar));
+        newvar->var=(variable *)malloc(sizeof(variable));
+        /*                                                                    */
+        Init_Variable(newvar->var);
+        /*                                                                    */
+        newvar->var->v_save=1;
+        strcpy(newvar->var->v_nomvar,parcours->var->v_nomvar);
+        strcpy(newvar->var->v_modulename,curmodulename);
+        Save_Length(curmodulename,6);
+        strcpy(newvar->var->v_subroutinename,subroutinename);
+        Save_Length(subroutinename,11);
+        strcpy(newvar->var->v_commoninfile,mainfile);
+        Save_Length(mainfile,10);
+        /*                                                                    */
+        strcpy(newvar->var->v_readedlistdimension,
+             parcours->var->v_readedlistdimension);
+        newvar->var->v_nbdim = parcours->var->v_nbdim;
+        newvar->var->v_dimension = parcours->var->v_dimension;
+        /*                                                                    */
+        newvar->var->v_dimensiongiven=parcours->var->v_dimensiongiven;
+        /*                                                                    */
+        newvar->suiv = NULL;
+
+        if ( !List_Save_Var ) List_Save_Var  = newvar ;
+        else
+        {
+           newvar->suiv = List_Save_Var;
+           List_Save_Var = newvar;
+        }
+        parcours = parcours->suiv;
+     }
+  }
+}
Index: vendors/AGRIF/r_01/LIB/Makefile
===================================================================
--- vendors/AGRIF/r_01/LIB/Makefile	(revision 2672)
+++ vendors/AGRIF/r_01/LIB/Makefile	(revision 2672)
@@ -0,0 +1,50 @@
+#- option to debug
+C_D = -g # -g -Wall
+# Compilation:
+CC		= cc -O
+#-
+OBJS = main.o WriteInFile.o toamr.o fortran.o  \
+       dependfile.o SubLoopCreation.o WorkWithlistvarindoloop.o \
+       WorkWithvarofsubroutineliste.o WorkWithParameterlist.o \
+       Writedeclarations.o WorkWithglobliste.o UtilFortran.o \
+       UtilNotGridDep.o WorkWithlistdatavariable.o \
+       DiversListe.o UtilAgrif.o WorkWithAllocatelist.o \
+       UtilCharacter.o UtilListe.o UtilFile.o \
+       WorkWithlistofmodulebysubroutine.o WorkWithlistmoduleinfile.o \
+       WorkWithlistofcoupled.o
+
+
+.SUFFIXES:
+.SUFFIXES: .c .o
+
+all : conv
+	@echo CONV is ok
+
+conv :  $(OBJS)
+	@$(CC) $(OBJS) -o ../$@
+
+main.o : main.c
+fortran.o : fortran.c	
+toamr.o : toamr.c decl.h
+WriteInFile.o : WriteInFile.c decl.h
+dependfile.o : dependfile.c decl.h	
+SubLoopCreation.o : SubLoopCreation.c decl.h	
+WorkWithglobliste.o : WorkWithglobliste.c decl.h	
+WorkWithlistvarindoloop.o : WorkWithlistvarindoloop.c decl.h	
+WorkWithvarofsubroutineliste.o : WorkWithvarofsubroutineliste.c decl.h	
+Writedeclarations.o : Writedeclarations.c decl.h	
+UtilFortran.o : UtilFortran.c decl.h	
+WorkWithParameterlist.o : WorkWithParameterlist.c decl.h	
+UtilNotGridDep.o : UtilNotGridDep.c decl.h	
+WorkWithlistdatavariable.o : WorkWithlistdatavariable.c decl.h	
+DiversListe.o : DiversListe.c decl.h	
+UtilAgrif.o : UtilAgrif.c decl.h	
+WorkWithAllocatelist.o : WorkWithAllocatelist.c decl.h
+UtilCharacter.o : UtilCharacter.c decl.h
+UtilListe.o : UtilListe.c decl.h
+UtilFile.o : UtilFile.c decl.h
+WorkWithlistofmodulebysubroutine.o : WorkWithlistofmodulebysubroutine.c decl.h
+WorkWithlistmoduleinfile.o : WorkWithlistmoduleinfile.c decl.h
+WorkWithlistofcoupled.o : WorkWithlistofcoupled.c decl.h
+clean : 
+	/bin/rm -f *.o y.output
Index: vendors/AGRIF/r_01/LIB/Makefile.lex
===================================================================
--- vendors/AGRIF/r_01/LIB/Makefile.lex	(revision 2672)
+++ vendors/AGRIF/r_01/LIB/Makefile.lex	(revision 2672)
@@ -0,0 +1,76 @@
+# Compilation:
+CC		= cc -O -g -Wall
+LEX		= flex
+
+# option de flex et pas de lex
+LEXFLAGS=-i
+YACC = byacc -t -v -g
+YACC = bison -t -v -g
+
+
+OBJS = main.o WriteInFile.o toamr.o fortran.o  \
+       dependfile.o SubLoopCreation.o WorkWithlistvarindoloop.o \
+       WorkWithvarofsubroutineliste.o WorkWithParameterlist.o \
+       Writedeclarations.o WorkWithglobliste.o UtilFortran.o \
+       UtilNotGridDep.o WorkWithlistdatavariable.o \
+       DiversListe.o UtilAgrif.o WorkWithAllocatelist.o \
+       UtilCharacter.o UtilListe.o UtilFile.o \
+       WorkWithlistofmodulebysubroutine.o WorkWithlistmoduleinfile.o \
+       WorkWithlistofcoupled.o
+
+.SUFFIXES:
+.SUFFIXES: .c .o
+
+all : conv
+
+conv :  $(OBJS)
+	$(CC) $(OBJS)  $(LEXLIB) -o ../$@
+
+main.o : main.c
+main.c : convert.tab.c  convert.yy.c
+	rm -f main.c
+	cat convert.tab.c  convert.yy.c > main.c
+	rm -f convert.yy.c convert.tab.c
+fortran.o : fortran.c
+fortran.c : fortran.tab.c fortran.yy.c
+	rm -f fortran.c
+	cat fortran.tab.c  fortran.yy.c > fortran.c
+#rm -f fortran.yy.c fortran.tab.c
+convert.tab.c : convert.y decl.h
+	$(YACC) convert.y
+#	mv -f y.tab.c convert.tab.c
+fortran.tab.c : fortran.y decl.h
+	$(YACC) -p fortran fortran.y
+#	mv -f y.tab.c fortran.tab.c
+#	mv -f y.output fortran.output
+#	mv -f y.dot fortran.dot
+convert.yy.c : convert.lex
+	$(LEX) $(LEXFLAGS) -oconvert.yy.c convert.lex
+fortran.yy.c : fortran.lex
+	$(LEX) $(LEXFLAGS) -Pfortran -ofortran.yy.c fortran.lex
+	
+toamr.o : toamr.c decl.h
+WriteInFile.o : WriteInFile.c decl.h
+dependfile.o : dependfile.c decl.h
+SubLoopCreation.o : SubLoopCreation.c decl.h
+WorkWithglobliste.o : WorkWithglobliste.c decl.h
+WorkWithlistvarindoloop.o : WorkWithlistvarindoloop.c decl.h
+WorkWithvarofsubroutineliste.o : WorkWithvarofsubroutineliste.c decl.h
+Writedeclarations.o : Writedeclarations.c decl.h
+UtilFortran.o : UtilFortran.c decl.h
+WorkWithParameterlist.o : WorkWithParameterlist.c decl.h
+UtilNotGridDep.o : UtilNotGridDep.c decl.h
+WorkWithlistdatavariable.o : WorkWithlistdatavariable.c decl.h
+DiversListe.o : DiversListe.c decl.h
+UtilAgrif.o : UtilAgrif.c decl.h
+WorkWithAllocatelist.o : WorkWithAllocatelist.c decl.h
+UtilCharacter.o : UtilCharacter.c decl.h
+UtilListe.o : UtilListe.c decl.h
+UtilFile.o : UtilFile.c decl.h
+WorkWithlistofmodulebysubroutine.o : WorkWithlistofmodulebysubroutine.c decl.h
+WorkWithlistmoduleinfile.o : WorkWithlistmoduleinfile.c decl.h
+WorkWithlistofcoupled.o : WorkWithlistofcoupled.c decl.h
+clean : 
+	/bin/rm -f *.o y.tab.c main.c lex.yy.c fortran.c \
+	fortran.tab.c fortran.yy.c convert.tab.c convert.yy.c \
+	y.output
Index: vendors/AGRIF/r_01/LIB/Makefile.lex.byacc
===================================================================
--- vendors/AGRIF/r_01/LIB/Makefile.lex.byacc	(revision 2672)
+++ vendors/AGRIF/r_01/LIB/Makefile.lex.byacc	(revision 2672)
@@ -0,0 +1,76 @@
+# Compilation:
+CC		= cc -O -g -Wall
+LEX		= flex
+
+# option de flex et pas de lex
+LEXFLAGS=-i
+YACC = byacc -t -v -g
+YACC = bison -t -v -g
+
+
+OBJS = main.o WriteInFile.o toamr.o fortran.o  \
+       dependfile.o SubLoopCreation.o WorkWithlistvarindoloop.o \
+       WorkWithvarofsubroutineliste.o WorkWithParameterlist.o \
+       Writedeclarations.o WorkWithglobliste.o UtilFortran.o \
+       UtilNotGridDep.o WorkWithlistdatavariable.o \
+       DiversListe.o UtilAgrif.o WorkWithAllocatelist.o \
+       UtilCharacter.o UtilListe.o UtilFile.o \
+       WorkWithlistofmodulebysubroutine.o WorkWithlistmoduleinfile.o \
+       WorkWithlistofcoupled.o
+
+.SUFFIXES:
+.SUFFIXES: .c .o
+
+all : conv
+
+conv :  $(OBJS)
+	$(CC) $(OBJS)  $(LEXLIB) -o ../$@
+
+main.o : main.c
+main.c : convert.tab.c  convert.yy.c
+	rm -f main.c
+	cat convert.tab.c  convert.yy.c > main.c
+	rm -f convert.yy.c convert.tab.c
+fortran.o : fortran.c
+fortran.c : fortran.tab.c fortran.yy.c
+	rm -f fortran.c
+	cat fortran.tab.c  fortran.yy.c > fortran.c
+#rm -f fortran.yy.c fortran.tab.c
+convert.tab.c : convert.y decl.h
+	$(YACC) convert.y
+	mv -f y.tab.c convert.tab.c
+fortran.tab.c : fortran.y decl.h
+	$(YACC) -p fortran fortran.y
+	mv -f y.tab.c fortran.tab.c
+	mv -f y.output fortran.output
+	mv -f y.dot fortran.dot
+convert.yy.c : convert.lex
+	$(LEX) $(LEXFLAGS) -oconvert.yy.c convert.lex
+fortran.yy.c : fortran.lex
+	$(LEX) $(LEXFLAGS) -Pfortran -ofortran.yy.c fortran.lex
+	
+toamr.o : toamr.c decl.h
+WriteInFile.o : WriteInFile.c decl.h
+dependfile.o : dependfile.c decl.h
+SubLoopCreation.o : SubLoopCreation.c decl.h
+WorkWithglobliste.o : WorkWithglobliste.c decl.h
+WorkWithlistvarindoloop.o : WorkWithlistvarindoloop.c decl.h
+WorkWithvarofsubroutineliste.o : WorkWithvarofsubroutineliste.c decl.h
+Writedeclarations.o : Writedeclarations.c decl.h
+UtilFortran.o : UtilFortran.c decl.h
+WorkWithParameterlist.o : WorkWithParameterlist.c decl.h
+UtilNotGridDep.o : UtilNotGridDep.c decl.h
+WorkWithlistdatavariable.o : WorkWithlistdatavariable.c decl.h
+DiversListe.o : DiversListe.c decl.h
+UtilAgrif.o : UtilAgrif.c decl.h
+WorkWithAllocatelist.o : WorkWithAllocatelist.c decl.h
+UtilCharacter.o : UtilCharacter.c decl.h
+UtilListe.o : UtilListe.c decl.h
+UtilFile.o : UtilFile.c decl.h
+WorkWithlistofmodulebysubroutine.o : WorkWithlistofmodulebysubroutine.c decl.h
+WorkWithlistmoduleinfile.o : WorkWithlistmoduleinfile.c decl.h
+WorkWithlistofcoupled.o : WorkWithlistofcoupled.c decl.h
+clean : 
+	/bin/rm -f *.o y.tab.c main.c lex.yy.c fortran.c \
+	fortran.tab.c fortran.yy.c convert.tab.c convert.yy.c \
+	y.output
Index: vendors/AGRIF/r_01/LIB/SubLoopCreation.c
===================================================================
--- vendors/AGRIF/r_01/LIB/SubLoopCreation.c	(revision 2672)
+++ vendors/AGRIF/r_01/LIB/SubLoopCreation.c	(revision 2672)
@@ -0,0 +1,492 @@
+/******************************************************************************/
+/*                                                                            */
+/*     CONV (converter) for Agrif (Adaptive Grid Refinement In Fortran)       */
+/*                                                                            */
+/* Copyright or   or Copr. Laurent Debreu (Laurent.Debreu@imag.fr)            */
+/*                        Cyril Mazauric (Cyril_Mazauric@yahoo.fr)            */
+/* This software is governed by the CeCILL-C license under French law and     */
+/* abiding by the rules of distribution of free software.  You can  use,      */
+/* modify and/ or redistribute the software under the terms of the CeCILL-C   */
+/* license as circulated by CEA, CNRS and INRIA at the following URL          */
+/* "http://www.cecill.info".                                                  */
+/*                                                                            */
+/* As a counterpart to the access to the source code and  rights to copy,     */
+/* modify and redistribute granted by the license, users are provided only    */
+/* with a limited warranty  and the software's author,  the holder of the     */
+/* economic rights,  and the successive licensors  have only  limited         */
+/* liability.                                                                 */
+/*                                                                            */
+/* In this respect, the user's attention is drawn to the risks associated     */
+/* with loading,  using,  modifying and/or developing or reproducing the      */
+/* software by the user in light of its specific status of free software,     */
+/* that may mean  that it is complicated to manipulate,  and  that  also      */
+/* therefore means  that it is reserved for developers  and  experienced      */
+/* professionals having in-depth computer knowledge. Users are therefore      */
+/* encouraged to load and test the software's suitability as regards their    */
+/* requirements in conditions enabling the security of their systems and/or   */
+/* data to be ensured and,  more generally, to use and operate it in the      */
+/* same conditions as regards security.                                       */
+/*                                                                            */
+/* The fact that you are presently reading this means that you have had       */
+/* knowledge of the CeCILL-C license and that you accept its terms.           */
+/******************************************************************************/
+/* version 1.7                                                                */
+/******************************************************************************/
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "decl.h"
+
+
+/******************************************************************************/
+/*     preparation and write of the argument list of a subroutine             */
+/******************************************************************************/
+
+
+/******************************************************************************/
+/*                             writeheadnewsub_0                              */
+/******************************************************************************/
+/* Firstpass 0                                                                */
+/* We should write the head of the subroutine sub_loop_<subroutinename>       */
+/******************************************************************************/
+/*                                                                            */
+/******************************************************************************/
+void writeheadnewsub_0()
+{
+   char ligne[LONG_C];
+
+   if ( firstpass == 0 && IsTabvarsUseInArgument_0() == 1 )
+   {
+      if ( todebug == 1 ) printf("Enter in writeheadnewsub_0\n");
+      /* we should add the use agrif_uti l if it is necessary                 */
+      WriteHeadofSubroutineLoop();
+      WriteUsemoduleDeclaration(subroutinename);
+      if ( ImplicitNoneInSubroutine() == 1 ) fprintf(fortranout,
+                                                       "      IMPLICIT NONE\n");
+      WriteIncludeDeclaration();
+      /*                                                                      */
+      /* We should write once the declaration of tables (extract              */
+      /*    from pointer) in the new subroutine                               */
+      if ( mark == 1 ) fprintf(fortranout,"!!! 000000000000000 \n");
+
+      if ( SubInList_ContainsSubroutine() == 0 ) WriteLocalParamDeclaration();
+      if ( mark == 1 ) fprintf(fortranout,"!!! 111111111111111 \n");
+
+      sprintf(ligne,"\n#include \"ParamFile%s.h\" \n",subroutinename);
+      tofich(fortranout,ligne,1);
+
+      WriteArgumentDeclaration_Sort();
+
+      if ( mark == 1 ) fprintf(fortranout,"!!! 222222222222222 \n");
+      writesub_loopdeclaration_tab(List_UsedInSubroutine_Var,fortranout);
+      if ( mark == 1 ) fprintf(fortranout,"!!! 333333333333333 \n");
+      writesub_loopdeclaration_scalar(List_UsedInSubroutine_Var,paramout);
+      if ( mark == 1 ) fprintf(fortranout,"!!! 444444444444444 \n");
+      /* now we should write the function declaration                         */
+      /*    case if it is the                                                 */
+      WriteFunctionDeclaration(1);
+      if ( mark == 1 ) fprintf(fortranout,"!!! 555555555555555 \n");
+
+//      if ( SubInList_ContainsSubroutine() == 0 ) WriteSubroutineDeclaration(1);
+  
+      if ( mark == 1 ) fprintf(fortranout,"!!! 666666666666666 \n");
+      if ( todebug == 1 ) printf("Out of writeheadnewsub_0\n");
+   }
+   else if ( firstpass == 0 )
+   {
+      AddUseAgrifUtil_0(fortranout);
+      WriteUsemoduleDeclaration(subroutinename);
+      WriteIncludeDeclaration();
+      if ( ImplicitNoneInSubroutine() == 1 ) fprintf(fortranout,
+                                                       "      IMPLICIT NONE\n");
+      if ( mark == 1 ) fprintf(fortranout,"!!! aaaaaaaaaaaaaaa \n");
+      WriteLocalParamDeclaration();
+      if ( mark == 1 ) fprintf(fortranout,"!!! bbbbbbbbbbbbbbb \n");
+      if ( functiondeclarationisdone == 0 ) WriteFunctionDeclaration(1);
+      if ( mark == 1 ) fprintf(fortranout,"!!! bbbbbbccccccccc \n");      
+      WriteArgumentDeclaration_beforecall();
+/*      writesub_loopdeclaration_scalar(List_SubroutineArgument_Var,fortranout);
+      writesub_loopdeclaration_tab(List_SubroutineArgument_Var,fortranout);*/
+      if ( mark == 1 ) fprintf(fortranout,"!!! ccccccccccccccc \n");
+      if ( mark == 1 ) fprintf(fortranout,"!!! ddddddddddddddd \n");
+//      WriteSubroutineDeclaration(1);
+      if ( mark == 1 ) fprintf(fortranout,"!!! eeeeeeeeeeeeeee \n");
+   }
+}
+
+
+/******************************************************************************/
+/*                    WriteVariablelist_subloop                               */
+/******************************************************************************/
+/* This subroutine is used to write the list of the variable which            */
+/* should be called by the sub_loop_<name> subroutine                         */
+/* The first part is composed by the list of the local variables              */
+/******************************************************************************/
+/*                                                                            */
+/*    List_SubroutineDeclaration_Var    a,b,c,  &                             */
+/*                                      d,e,f,  &                             */
+/*     a,b,c,d,e,f,g,h     ========>    g,h                                   */
+/*                                                                            */
+/******************************************************************************/
+void WriteVariablelist_subloop(FILE *outputfile,char *ligne)
+{
+   listvar *parcours;
+   int compteur;
+
+   if ( todebug == 1 ) printf("Enter in WriteVariablelist_subloop\n");
+   parcours = List_SubroutineArgument_Var;
+   didvariableadded = 0;
+   compteur = 0 ;
+
+   while ( parcours )
+   {
+
+      /* if the readed variable is a variable of the subroutine               */
+      /*    subroutinename we should write the name of this variable          */
+      /*    in the output file                                                */
+      if ( !strcasecmp(parcours->var->v_subroutinename,subroutinename) )
+      {
+         if ( didvariableadded == 1 )
+         {
+            strcat(ligne,",");
+         }
+         strcat(ligne,parcours->var->v_nomvar);
+         didvariableadded = 1;
+      }
+      parcours = parcours -> suiv;
+   }
+   parcours = List_FunctionType_Var;
+   while ( parcours )
+   {
+      if ( !strcasecmp(parcours->var->v_subroutinename,subroutinename) )
+      {
+         if ( didvariableadded == 1 )
+         {
+            strcat(ligne,",");
+         }
+         strcat(ligne,parcours->var->v_nomvar);
+         didvariableadded = 1;
+      }
+      parcours = parcours -> suiv;
+   }
+   if ( todebug == 1 ) printf("Out of WriteVariablelist_subloop\n");
+}
+
+
+/******************************************************************************/
+/*                     WriteVariablelist_subloop_Call                         */
+/******************************************************************************/
+/* This subroutine is used to write the list of the variable which            */
+/* should be called by the sub_loop_<name> subroutine into the called         */
+/* The second part is composed by the list of the global table                */
+/******************************************************************************/
+/*                                                                            */
+/*   List_UsedInSubroutine_Var SubloopScalar = 0 | SubloopScalar = 1          */
+/*                                a,b,c,  &      |  a,b(1,1),c,      &        */
+/*     a,b,c,d,e,f,g,h  =====>    d,e,f,  &      |  d(1),e(1,1,1),f, &        */
+/*                                g,h            |  g,h(1,1)                  */
+/*                                                                            */
+/******************************************************************************/
+void WriteVariablelist_subloop_Call(FILE *outputfile,char *ligne)
+{
+   listvar *parcours;
+   char ligne2[10];
+   int i;
+   int compteur ;
+
+   if ( todebug == 1 ) printf("Enter in WriteVariablelist_subloop_Call\n");
+   parcours = List_UsedInSubroutine_Var;
+   compteur = 0 ;
+   while ( parcours )
+   {
+      /* if the readed variable is a variable of the subroutine               */
+      /*    subroutinename we should write the name of this variable          */
+      /*    in the output file                                                */
+      if ( !strcasecmp(parcours->var->v_subroutinename,subroutinename)  &&
+           (parcours->var->v_pointerdeclare == 0 || !strcasecmp(parcours->var->v_typevar,"type"))
+         )
+      {
+         if ( didvariableadded == 1 )
+         {
+            strcat(ligne," , ");
+         }
+         strcat(ligne,vargridcurgridtabvars(parcours->var,0));
+         /* if it is asked in the call of the conv we should give             */
+         /* scalar in argument, so we should put (1,1,1) after the            */
+         /* the name of the variable                                          */
+         if (  SubloopScalar != 0 &&
+               (
+               (parcours->var->v_pointerdeclare == 0 || !strcasecmp(parcours->var->v_typevar,"type"))) &&
+               parcours->var->v_nbdim != 0 )
+         {
+             i = 1;
+             while ( i <=  parcours->var->v_nbdim )
+             {
+                if ( i == 1 ) strcat(ligne,"( ");
+                if ( SubloopScalar == 2 )
+                {
+                   strcat(ligne,":");
+                   if ( i != parcours->var->v_nbdim ) strcat(ligne,",");
+                }
+                else
+                {
+                   strcat(ligne," lbound( ");
+                   strcat(ligne,vargridcurgridtabvars(parcours->var,0));
+                   strcat(ligne,",");
+                   strcpy(ligne2,"");
+                   sprintf(ligne2,"%d",i);
+                   strcat(ligne,ligne2);
+                   if ( i != parcours->var->v_nbdim ) strcat(ligne,"),");
+                }
+                if ( i == parcours->var->v_nbdim ) strcat(ligne,"))");
+                i++;
+             }
+         }
+         didvariableadded = 1;
+         compteur = compteur +1 ;
+         /*if ( retour77 == 0 )
+         {
+            strcat(ligne," &");
+            fprintf(outputfile,"\n");
+         }
+         else fprintf(outputfile,"\n     & ");*/
+         /*tofich(outputfile,ligne,0);*/
+      }
+      parcours = parcours -> suiv;
+   }
+   
+//   Save_Length(ligne,41);
+//   tofich(outputfile,ligne,0);
+   /* Now we should replace the last ", &" by " &"                            */
+/*   if ( didvariableadded != 0 && retour77 == 0 ) fseek(outputfile,-1,SEEK_CUR);
+   if ( didvariableadded == 0 ) fseek(outputfile,-1,SEEK_CUR);*/
+   if ( todebug == 1 ) printf("Out of WriteVariablelist_subloop_Call\n");
+}
+
+
+/******************************************************************************/
+/*                       WriteVariablelist_subloop_Def                        */
+/******************************************************************************/
+/* This subroutine is used to write the list of the variable which            */
+/* should be called by the sub_loop_<name> subroutine into the def            */
+/* The second part is composed by the list of the global table                */
+/* <name>_tmp                                                                 */
+/******************************************************************************/
+/*                                                                            */
+/*       List_UsedInSubroutine_Var                                            */
+/*                                a-tmp,b-tmp,c_tmp, &                        */
+/*     a,b,c,d,e,f,g,h  =====>    d_tmp,e_tmp,f_tmp, &                        */
+/*                                g_tmp,h_tmp                                 */
+/*                                                                            */
+/******************************************************************************/
+void WriteVariablelist_subloop_Def(FILE *outputfile, char *ligne)
+{
+   listvar *parcours;
+/*   char ligne[LONG_40M];*/
+   int compteur;
+
+   if ( todebug == 1 ) printf("Enter in WriteVariablelist_subloop_Def\n");
+   parcours = List_UsedInSubroutine_Var;
+   compteur = 0 ;
+   while ( parcours )
+   {
+      /* if the readed variable is a variable of the subroutine               */
+      /*    subrotinename we should write the name of this variable           */
+      /*    in the output file                                                */
+      if ( !strcasecmp(parcours->var->v_subroutinename,subroutinename)  &&
+           (parcours->var->v_pointerdeclare == 0 || !strcasecmp(parcours->var->v_typevar,"type"))
+         )
+      {
+         if ( didvariableadded == 1 )
+         {
+            strcat(ligne,",");
+         }
+         strcat(ligne,parcours->var->v_nomvar);
+         didvariableadded = 1;
+      }
+      parcours = parcours -> suiv;
+   }
+ /*  if ( compteur != 3 && compteur != 0 )
+   {
+      if ( retour77 == 0 ) fprintf(outputfile,"\n      %s &",ligne);
+      else fprintf(outputfile,"\n     & %s",ligne);
+   }*/
+   Save_Length(ligne,41);
+ //  tofich(outputfile,ligne,0);
+
+   /* Now we should replace the last ", &" by " &"                            */
+  /* if ( didvariableadded != 0 && retour77 == 0 ) fseek(outputfile,-1,SEEK_CUR);
+   if ( didvariableadded == 0 ) fseek(outputfile,-1,SEEK_CUR);*/
+   if ( todebug == 1 ) printf("Out of WriteVariablelist_subloop_Def\n");
+   
+}
+
+
+
+/******************************************************************************/
+/*                      WriteHeadofSubroutineLoop                             */
+/******************************************************************************/
+/* This subroutine is used to write the head of the subroutine                */
+/* Sub_Loop_<name>                                                            */
+/******************************************************************************/
+/*                 Sub_loop_subroutine.h                                      */
+/*                                                                            */
+/*                 subroutine Sub_Loop_subroutine ( &                         */
+/*                 a,b,c, &                                                   */
+/* SubLoopScalar   d,e(1,1),f(1,1,1), &                                       */
+/*                 g,h  &                                                     */
+/*                 )                                                          */
+/******************************************************************************/
+void WriteHeadofSubroutineLoop()
+{
+   char ligne[LONG_40M];
+   FILE * subloop;
+
+   if ( todebug == 1 ) printf("Enter in WriteHeadofSubroutineLoop\n");
+   tofich(fortranout,"\n",1);
+   /* Open this newfile                                                       */
+   sprintf(ligne,"Sub_Loop_%s.h",subroutinename);
+   subloop = associate(ligne);
+   /*                                                                         */
+   if (isrecursive) 
+   {
+   sprintf(ligne,"      recursive subroutine Sub_Loop_%s(",subroutinename);
+   }
+   else
+   {
+   sprintf(ligne,"      subroutine Sub_Loop_%s(",subroutinename);
+   }
+   /*                                                                         */
+   WriteVariablelist_subloop(subloop,ligne);
+   WriteVariablelist_subloop_Def(subloop,ligne);
+   /*                                                                         */
+     strcat(ligne,")");
+   tofich(subloop,ligne,1);
+   /* if USE agrif_Uti l should be add                                        */
+   AddUseAgrifUtil_0(subloop);
+   /*                                                                         */
+   oldfortranout = fortranout;
+   fortranout = subloop;
+   if ( todebug == 1 ) printf("Out of WriteHeadofSubroutineLoop\n");
+}
+
+/******************************************************************************/
+/*                closeandcallsubloopandincludeit_0                           */
+/******************************************************************************/
+/* Firstpass 0                                                                */
+/* We should close the sub_loop subroutine, call it and close the             */
+/* function (suborfun = 0)                                                    */
+/* subroutine (suborfun = 1)                                                  */
+/* end (suborfun = 2)                                                         */
+/* end program (suborfun = 3)                                                 */
+/* and include the sub_loop subroutine after                                  */
+/******************************************************************************/
+/*                                                                            */
+/******************************************************************************/
+void closeandcallsubloopandincludeit_0(int suborfun)
+{
+   char ligne[LONG_40M];
+
+   if ( firstpass == 0 )
+   {
+
+   if ( todebug == 1 ) printf("Enter in closeandcallsubloopandincludeit_0\n");
+   if ( IsTabvarsUseInArgument_0() == 1 )
+   {
+      /* We should remove the key word end subroutine                         */
+      RemoveWordCUR_0(fortranout,(long)(-(pos_cur-pos_endsubroutine)),
+                                          pos_cur-pos_endsubroutine);
+      /* We should close the loop subroutine                                  */
+      sprintf(ligne,"\n      end subroutine Sub_Loop_%s",subroutinename);
+      tofich(fortranout,ligne,1);
+      fclose(fortranout);
+      fortranout = oldfortranout;
+
+
+      AddUseAgrifUtilBeforeCall_0(fortranout);
+      if ( functiondeclarationisdone == 0 ) WriteFunctionDeclaration(0);
+      WriteArgumentDeclaration_beforecall();
+      if ( !strcasecmp(subofagrifinitgrids,subroutinename) )
+                     fprintf(oldfortranout,"      Call Agrif_Init_Grids () \n");
+      /* Now we add the call af the new subroutine                            */
+      sprintf(ligne,"\n      Call Sub_Loop_%s( ",subroutinename);
+      /* Write the list of the local variables used in this new subroutine    */
+      WriteVariablelist_subloop(fortranout,ligne);
+      /* Write the list of the global tables used in this new subroutine      */
+      /*    in doloop                                                         */
+      WriteVariablelist_subloop_Call(fortranout,ligne);
+      /* Close the parenthesis of the new subroutine called                   */
+       strcat(ligne,")");
+      
+      tofich(fortranout,ligne,1);
+
+      /* We should close the original subroutine                              */
+      if ( suborfun == 3 ) sprintf(ligne,"\n      end program %s"
+                                                               ,subroutinename);
+      if ( suborfun == 2 ) sprintf(ligne,"\n      end");
+      if ( suborfun == 1 ) sprintf(ligne,"\n      end subroutine %s"
+                                                               ,subroutinename);
+      if ( suborfun == 0 ) sprintf(ligne,"\n      end function %s"
+                                                               ,subroutinename);
+      tofich(fortranout,ligne,1);
+      /* we should include the above file in the original code                */
+      sprintf(ligne,"\n#include \"Sub_Loop_%s.h\" \n",subroutinename);
+      tofich(fortranout,ligne,1);
+      }
+    oldfortranout = (FILE *)NULL;      
+   if ( todebug == 1 ) printf("Out of closeandcallsubloopandincludeit_0\n");
+   }
+   
+}
+
+
+
+
+void closeandcallsubloop_contains_0()
+{
+   char ligne[LONG_40M];
+
+   if ( firstpass == 0 )
+   {
+   if ( todebug == 1 ) printf("Enter in closeandcallsubloopandincludeit_0\n");
+   if ( IsTabvarsUseInArgument_0() == 1 )
+   {
+      Remove_Word_Contains_0();
+      sprintf(ligne,"\n      end subroutine Sub_Loop_%s",subroutinename);
+      tofich(fortranout,ligne,1);
+      fclose(fortranout);
+      fortranout = oldfortranout;
+
+      AddUseAgrifUtilBeforeCall_0(fortranout);
+      if ( ImplicitNoneInSubroutine() == 1 ) fprintf(fortranout,
+                                                       "      IMPLICIT NONE\n");
+      WriteLocalParamDeclaration();
+      if ( functiondeclarationisdone == 0 ) WriteFunctionDeclaration(0);
+      WriteArgumentDeclaration_beforecall();
+      WriteSubroutineDeclaration(0);
+      if ( !strcasecmp(subofagrifinitgrids,subroutinename) )
+                     fprintf(oldfortranout,"      Call Agrif_Init_Grids () \n");
+      /* Now we add the call af the new subroutine                            */
+      if ( retour77 == 0 ) sprintf(ligne,"\n      Call Sub_Loop_%s( &"
+                                                               ,subroutinename);
+      else sprintf(ligne,"\n      Call Sub_Loop_%s( ",subroutinename);
+      fprintf(fortranout,ligne);
+      /* Write the list of the local variables used in this new subroutine    */
+      WriteVariablelist_subloop(fortranout,ligne);
+      /* Write the list of the global tables used in this new subroutine      */
+      /*    in doloop                                                         */
+      WriteVariablelist_subloop_Call(fortranout,ligne);
+      /* Close the parenthesis of the new subroutine called                   */
+      sprintf(ligne,")");
+      tofich(fortranout,ligne,1);
+      /* We should close the original subroutine                              */
+      sprintf(ligne,"\n      contains");
+      tofich(fortranout,ligne,1);
+      /* we should include the above file in the original code                */
+      sprintf(ligne,"\n#include \"Sub_Loop_%s.h\" \n",subroutinename);
+      tofich(fortranout,ligne,1);
+      }
+   oldfortranout = (FILE *)NULL;
+   if ( todebug == 1 ) printf("Out of closeandcallsubloopandincludeit_0\n");
+   }
+}
Index: vendors/AGRIF/r_01/LIB/UtilAgrif.c
===================================================================
--- vendors/AGRIF/r_01/LIB/UtilAgrif.c	(revision 2672)
+++ vendors/AGRIF/r_01/LIB/UtilAgrif.c	(revision 2672)
@@ -0,0 +1,996 @@
+/******************************************************************************/
+/*                                                                            */
+/*     CONV (converter) for Agrif (Adaptive Grid Refinement In Fortran)       */
+/*                                                                            */
+/* Copyright or   or Copr. Laurent Debreu (Laurent.Debreu@imag.fr)            */
+/*                        Cyril Mazauric (Cyril_Mazauric@yahoo.fr)            */
+/* This software is governed by the CeCILL-C license under French law and     */
+/* abiding by the rules of distribution of free software.  You can  use,      */
+/* modify and/ or redistribute the software under the terms of the CeCILL-C   */
+/* license as circulated by CEA, CNRS and INRIA at the following URL          */
+/* "http://www.cecill.info".                                                  */
+/*                                                                            */
+/* As a counterpart to the access to the source code and  rights to copy,     */
+/* modify and redistribute granted by the license, users are provided only    */
+/* with a limited warranty  and the software's author,  the holder of the     */
+/* economic rights,  and the successive licensors  have only  limited         */
+/* liability.                                                                 */
+/*                                                                            */
+/* In this respect, the user's attention is drawn to the risks associated     */
+/* with loading,  using,  modifying and/or developing or reproducing the      */
+/* software by the user in light of its specific status of free software,     */
+/* that may mean  that it is complicated to manipulate,  and  that  also      */
+/* therefore means  that it is reserved for developers  and  experienced      */
+/* professionals having in-depth computer knowledge. Users are therefore      */
+/* encouraged to load and test the software's suitability as regards their    */
+/* requirements in conditions enabling the security of their systems and/or   */
+/* data to be ensured and,  more generally, to use and operate it in the      */
+/* same conditions as regards security.                                       */
+/*                                                                            */
+/* The fact that you are presently reading this means that you have had       */
+/* knowledge of the CeCILL-C license and that you accept its terms.           */
+/******************************************************************************/
+/* version 1.7                                                                */
+/******************************************************************************/
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "decl.h"
+/******************************************************************************/
+/*                      Vartonumber                                           */
+/******************************************************************************/
+/* This subroutine is used to know if Agrif_ is locate in the char            */
+/* tokname                                                                    */
+/******************************************************************************/
+/*                                                                            */
+/******************************************************************************/
+int Vartonumber(char *tokname)
+{
+   int agrifintheword;
+
+   agrifintheword = 0;
+        if ( !strcasecmp(tokname,"Agrif_parent")         ) agrifintheword = 1;
+   else if ( !strcasecmp(tokname,"Agrif_set_type")       ) agrifintheword = 1;
+   else if ( !strcasecmp(tokname,"Agrif_set_raf")        ) agrifintheword = 1;
+   else if ( !strcasecmp(tokname,"Agrif_set_bc")         ) agrifintheword = 1;
+   else if ( !strcasecmp(tokname,"Agrif_set_bcinterp")   ) agrifintheword = 1;
+   else if ( !strcasecmp(tokname,"Agrif_Root")           ) agrifintheword = 1;
+   else if ( !strcasecmp(tokname,"Agrif_CFixed")         ) agrifintheword = 1;
+   else if ( !strcasecmp(tokname,"Agrif_Fixed")          ) agrifintheword = 1;
+   else if ( !strcasecmp(tokname,"Agrif_bc_variable")    ) agrifintheword = 1;
+   else if ( !strcasecmp(tokname,"Agrif_set_parent")     ) agrifintheword = 1;
+   else if ( !strcasecmp(tokname,"Agrif_interp_variable")) agrifintheword = 1;
+   else if ( !strcasecmp(tokname,"Agrif_init_variable")  ) agrifintheword = 1;
+   else if ( !strcasecmp(tokname,"Agrif_update_variable")) agrifintheword = 1;
+   else if ( !strcasecmp(tokname,"Agrif_Set_interp")     ) agrifintheword = 1;
+   else if ( !strcasecmp(tokname,"Agrif_Set_Update")     ) agrifintheword = 1;
+   else if ( !strcasecmp(tokname,"Agrif_Set_UpdateType") ) agrifintheword = 1;
+   else if ( !strcasecmp(tokname,"Agrif_Set_restore")    ) agrifintheword = 1;
+   else if ( !strcasecmp(tokname,"Agrif_Save_Forrestore")) agrifintheword = 1;
+   else if ( !strcasecmp(tokname,"agrif_init_grids")     ) agrifintheword = 1;
+   else if ( !strcasecmp(tokname,"agrif_step")           ) agrifintheword = 1;
+
+   return agrifintheword;
+}
+
+/******************************************************************************/
+/*                              Agrif_in_Tok_NAME                             */
+/******************************************************************************/
+/* This subroutine is used to know if Agrif_ is locate in the char            */
+/* tokname                                                                    */
+/******************************************************************************/
+/*                                                                            */
+/*                 Agrif_name --------------> Agrif_in_Tok_NAME = 1           */
+/*                       name --------------> Agrif_in_Tok_NAME = 0           */
+/*                                                                            */
+/******************************************************************************/
+int Agrif_in_Tok_NAME(char *tokname)
+{
+   int agrifintheword;
+
+   if ( strncasecmp(tokname,"Agrif_",6) == 0 )  agrifintheword = 1;
+   else agrifintheword = 0;
+
+   return agrifintheword;
+}
+
+/******************************************************************************/
+/*                     ModifyTheVariableName_0                                */
+/******************************************************************************/
+/* Firstpass 0                                                                */
+/******************************************************************************/
+/*                                                                            */
+/*               Agrif_<toto>(variable) ====>     Agrif_<toto>(variable)      */
+/*                                                                            */
+/******************************************************************************/
+void ModifyTheVariableName_0(char *ident, int lengthname)
+{
+   listvar *newvar;
+   int out;
+   
+   printf("ICI ident = %s\n",ident);
+   
+   if ( firstpass == 0 )
+   {
+      newvar = List_Global_Var;
+      out=0;
+      while ( newvar && out == 0 )
+      {
+         if ( !strcasecmp(newvar->var->v_nomvar,ident) ) out = 1;
+         else newvar=newvar->suiv;
+      }
+       printf("out1 = %d\n",out);
+      if ( out == 0 )
+      {
+         newvar = List_ModuleUsed_Var;
+         while ( newvar && out == 0 )
+         {
+            if ( !strcasecmp(newvar->var->v_nomvar,ident) ) out = 1;
+            else newvar=newvar->suiv;
+         }
+      }
+      if (out == 1 && !strcasecmp(newvar->var->v_typevar,"type")) return;
+
+      if ( out == 0 )
+      {
+         newvar = List_Common_Var;
+         while ( newvar && out == 0 )
+         {
+            if ( !strcasecmp(newvar->var->v_nomvar,ident) ) out = 1;
+            else newvar=newvar->suiv;
+         }
+      }
+
+      if ( out == 0 )
+      {
+         newvar = List_ModuleUsedInModuleUsed_Var;
+         while ( newvar && out == 0 )
+         {
+            if ( !strcasecmp(newvar->var->v_nomvar,ident) ) out = 1;
+            else newvar=newvar->suiv;
+         }
+      }
+
+      if ( out == 1 && strcasecmp(newvar->var->v_typevar,"type"))
+      {
+      printf("ICIC3\n");
+         /* remove the variable                                               */
+         RemoveWordCUR_0(fortranout,(long)(-lengthname),
+                               lengthname);
+         fseek(fortranout,(long)(-lengthname),SEEK_CUR);
+         /* then write the new name                                           */
+         if ( inagrifcallargument == 1 && agrif_parentcall == 0 )
+            fprintf(fortranout,"%d",newvar->var->v_indicetabvars);
+         else
+         {
+            if ( retour77 == 0 )
+            {
+               fprintf(fortranout," Agrif_tabvars & \n      ");
+            }
+            else
+            {
+               fprintf(fortranout,"Agrif_tabvars");
+               fprintf(fortranout," \n     & ");
+            }
+            fprintf(fortranout,"%s",
+                             vargridcurgridtabvarswithoutAgrif_Gr(newvar->var));
+            colnum = strlen(vargridcurgridtabvarswithoutAgrif_Gr(newvar->var));
+         }
+      }
+      else
+      {
+         /* we should look in the List_ModuleUsed_Var                         */
+         if ( inagrifcallargument != 1 )
+         {
+            newvar = List_ModuleUsed_Var;
+            while ( newvar && out == 0 )
+            {
+               if ( !strcasecmp(newvar->var->v_nomvar,ident) ) out = 1;
+               else newvar=newvar->suiv;
+            }
+            if ( out == 1 && strcasecmp(newvar->var->v_typevar,"type"))
+            {
+            printf("ICICIC4 %s\n",newvar->var->v_typevar);
+               /* remove the variable                                         */
+               RemoveWordCUR_0(fortranout,(long)(-lengthname),
+                                     lengthname);
+               fseek(fortranout,(long)(-lengthname),SEEK_CUR);
+               /* then write the new name                                     */
+               if ( retour77 == 0 )
+               {
+                  fprintf(fortranout," Agrif_tabvars & \n      ");
+               }
+               else
+               {
+                  fprintf(fortranout," \n     & Agrif_tabvars");
+               }
+               fprintf(fortranout,"%s",
+                             vargridcurgridtabvarswithoutAgrif_Gr(newvar->var));
+               colnum = strlen(
+                             vargridcurgridtabvarswithoutAgrif_Gr(newvar->var));
+            }
+         }
+      }
+   }
+}
+
+/******************************************************************************/
+/*                     ModifyTheVariableName_0                                */
+/******************************************************************************/
+/* Firstpass 0                                                                */
+/******************************************************************************/
+/*                                                                            */
+/*               Agrif_<toto>(variable) ====>     Agrif_<toto>(variable)      */
+/*                                                                            */
+/******************************************************************************/
+void ModifyTheVariableNamecoupled_0(char *ident, char* coupledident)
+{
+   listvar *newvar;
+   int out;
+   
+   if ( firstpass == 0 )
+   {
+      newvar = List_Global_Var;
+      out=0;
+      while ( newvar && out == 0 )
+      {
+         if ( !strcasecmp(newvar->var->v_nomvar,coupledident) ) out = 1;
+         else newvar=newvar->suiv;
+      }
+
+      if ( out == 0 )
+      {
+         newvar = List_ModuleUsed_Var;
+         while ( newvar && out == 0 )
+         {
+            if ( !strcasecmp(newvar->var->v_nomvar,coupledident) ) out = 1;
+            else newvar=newvar->suiv;
+         }
+      }
+      if ( out == 0 )
+      {
+         newvar = List_Common_Var;
+         while ( newvar && out == 0 )
+         {
+            if ( !strcasecmp(newvar->var->v_nomvar,coupledident) ) out = 1;
+            else newvar=newvar->suiv;
+         }
+      }
+
+      if ( out == 0 )
+      {
+         newvar = List_ModuleUsedInModuleUsed_Var;
+         while ( newvar && out == 0 )
+         {
+            if ( !strcasecmp(newvar->var->v_nomvar,coupledident) ) out = 1;
+            else newvar=newvar->suiv;
+         }
+      }
+
+      if ( out == 1 )
+      {
+         /* remove the variable                                               */
+         RemoveWordCUR_0(fortranout,(long)(-strlen(ident)),
+                               strlen(ident));
+         fseek(fortranout,(long)(-strlen(ident)),SEEK_CUR);
+         /* then write the new name                                           */
+         if ( inagrifcallargument == 1 && agrif_parentcall == 0 )
+            fprintf(fortranout,"%d",newvar->var->v_indicetabvars);
+         else
+         {
+            if ( retour77 == 0 )
+            {
+               fprintf(fortranout," Agrif_tabvars & \n      ");
+            }
+            else
+            {
+               fprintf(fortranout,"Agrif_tabvars");
+               fprintf(fortranout," \n     & ");
+            }
+            fprintf(fortranout,"%s",
+                             vargridcurgridtabvarswithoutAgrif_Gr(newvar->var));
+            colnum = strlen(vargridcurgridtabvarswithoutAgrif_Gr(newvar->var));
+         }
+      }
+      else
+      {
+         /* we should look in the List_ModuleUsed_Var                         */
+         if ( inagrifcallargument != 1 )
+         {
+            newvar = List_ModuleUsed_Var;
+            while ( newvar && out == 0 )
+            {
+               if ( !strcasecmp(newvar->var->v_nomvar,coupledident) ) out = 1;
+               else newvar=newvar->suiv;
+            }
+            if ( out == 1 )
+            {
+               /* remove the variable                                         */
+               RemoveWordCUR_0(fortranout,(long)(-strlen(ident)),
+                                     strlen(ident));
+               fseek(fortranout,(long)(-strlen(ident)),SEEK_CUR);
+               /* then write the new name                                     */
+               if ( retour77 == 0 )
+               {
+                  fprintf(fortranout," Agrif_tabvars & \n      ");
+               }
+               else
+               {
+                  fprintf(fortranout," \n     & Agrif_tabvars");
+               }
+               fprintf(fortranout,"%s",
+                             vargridcurgridtabvarswithoutAgrif_Gr(newvar->var));
+               colnum = strlen(
+                             vargridcurgridtabvarswithoutAgrif_Gr(newvar->var));
+            }
+         }
+      }
+   }
+}
+
+
+
+/******************************************************************************/
+/*                         Add_SubroutineWhereAgrifUsed_1                     */
+/******************************************************************************/
+/* This subroutine is used to add a record to                                 */
+/* List_SubroutineWhereAgrifUsed                                              */
+/******************************************************************************/
+/*                                                                            */
+/*       subroutine sub ... Agrif_<something>                                 */
+/*                                                                            */
+/*        _______     _______     _______     _______     _______             */
+/*       +      +    +      +    +      +    +      +    +      +             */
+/*       + list +--->+ list +--->+ list +--->+ list +--->+ sub  +             */
+/*       +______+    +______+    +______+    +______+    +______+             */
+/*                                                                            */
+/*       list = List_SubroutineWhereAgrifUsed                                 */
+/*                                                                            */
+/******************************************************************************/
+void Add_SubroutineWhereAgrifUsed_1(char *sub,char *mod)
+{
+  listnom *listnomtmp;
+  listnom *parcours;
+
+  if ( firstpass == 1 )
+  {
+  if ( !List_SubroutineWhereAgrifUsed )
+  {
+     listnomtmp=(listnom *)malloc(sizeof(listnom));
+     strcpy(listnomtmp->o_nom,sub);
+     Save_Length(sub,23);
+     strcpy(listnomtmp->o_module,mod);
+     Save_Length(mod,24);
+     listnomtmp->suiv = NULL;
+     List_SubroutineWhereAgrifUsed  =  listnomtmp;
+  }
+  else
+  {
+    parcours = List_SubroutineWhereAgrifUsed;
+    while ( parcours && strcasecmp(parcours->o_nom,sub) )
+    {
+       parcours = parcours->suiv;
+    }
+    if ( !parcours )
+    {
+       listnomtmp=(listnom *)malloc(sizeof(listnom));
+       strcpy(listnomtmp->o_nom,sub);
+       Save_Length(sub,23);
+       strcpy(listnomtmp->o_module,mod);
+       Save_Length(mod,24);
+       listnomtmp->suiv = List_SubroutineWhereAgrifUsed;
+       List_SubroutineWhereAgrifUsed  =  listnomtmp;
+    }
+  }
+  }
+}
+
+/******************************************************************************/
+/*                                AddUseAgrifUtil_0                           */
+/******************************************************************************/
+/* Add use Agrif_Util at the beginning of the subroutine definition           */
+/* if it is necessary                                                         */
+/******************************************************************************/
+/*                                                                            */
+/*       subroutine sub            |  subroutine sub                          */
+/*                                 |  USE Agrif_Util                          */
+/*       implicit none             |  implicit none                           */
+/*       ...                       |  ...                                     */
+/*       ... Agrif_<something>     |  ... Agrif_<something>                   */
+/*       ...                       |  ...                                     */
+/*       end                       |  end                                     */
+/*                                                                            */
+/*                                                                            */
+/******************************************************************************/
+void  AddUseAgrifUtil_0(FILE *fileout)
+{
+  listnom *parcours;
+
+  if ( firstpass == 0 )
+  {
+     parcours = List_SubroutineWhereAgrifUsed;
+     while ( parcours && strcasecmp(parcours->o_nom,subroutinename) )
+                                                    parcours = parcours -> suiv;
+     if ( parcours && parcours->o_val != 0 )
+                                   fprintf(fileout,"\n      USE Agrif_Util \n");
+  }
+}
+
+void  AddUseAgrifUtilBeforeCall_0(FILE *fileout)
+{
+  listusemodule *parcours;
+
+  int out;
+
+  if ( firstpass == 0 )
+  {
+     parcours = List_NameOfModuleUsed;
+     out = 0 ;
+     while ( parcours && out == 0 )
+     {
+        if ( !strcasecmp(parcours->u_usemodule,"Agrif_Util")     &&
+             !strcasecmp(parcours->u_modulename,curmodulename)   &&
+             !strcasecmp(parcours->u_cursubroutine,subroutinename)
+            ) out = 1;
+        else parcours = parcours->suiv;
+     }
+     if ( out == 0 )
+     {
+        fprintf(fileout,"\n      USE Agrif_Util \n");
+     }
+  }
+}
+
+/******************************************************************************/
+/*                         NotifyAgrifFunction_0                              */
+/******************************************************************************/
+/* Firstpass 0                                                                */
+/******************************************************************************/
+/*                                                                            */
+/*               Agrif_<toto>(variable) ====>     Agrif_<toto>(variable)      */
+/*                                                                            */
+/******************************************************************************/
+void NotifyAgrifFunction_0(char *ident)
+{
+   if ( firstpass == 0 )
+   {
+      if ( !strcasecmp(ident,"Agrif_parent") )
+      {
+         InAgrifParentDef = 1;
+         pos_curagrifparent = setposcur()-12;
+      }
+      else if ( !strcasecmp(ident,"Agrif_Get_Coarse_grid") )
+      {
+         InAgrifParentDef = 2;
+         pos_curagrifparent = setposcur()-21;
+      }
+      else if ( !strcasecmp(ident,"Agrif_Rhox") )
+      {
+         InAgrifParentDef = 3;
+         pos_curagrifparent = setposcur()-10;
+      }
+      else if ( !strcasecmp(ident,"Agrif_Parent_Rhox") )
+      {
+         InAgrifParentDef = 4;
+         pos_curagrifparent = setposcur()-17;
+      }
+      else if ( !strcasecmp(ident,"Agrif_IRhox") )
+      {
+         InAgrifParentDef = 5;
+         pos_curagrifparent = setposcur()-11;
+      }
+      else if ( !strcasecmp(ident,"Agrif_Parent_IRhox") )
+      {
+         InAgrifParentDef = 6;
+         pos_curagrifparent = setposcur()-18;
+      }
+      else if ( !strcasecmp(ident,"Agrif_Rhoy") )
+      {
+         InAgrifParentDef = 7;
+         pos_curagrifparent = setposcur()-10;
+      }
+      else if ( !strcasecmp(ident,"Agrif_Parent_Rhoy") )
+      {
+         InAgrifParentDef = 8;
+         pos_curagrifparent = setposcur()-17;
+      }
+      else if ( !strcasecmp(ident,"Agrif_IRhoy") )
+      {
+         InAgrifParentDef = 9;
+         pos_curagrifparent = setposcur()-11;
+      }
+      else if ( !strcasecmp(ident,"Agrif_Parent_IRhoy") )
+      {
+         InAgrifParentDef = 10;
+         pos_curagrifparent = setposcur()-18;
+      }
+      else if ( !strcasecmp(ident,"Agrif_Rhoz") )
+      {
+         InAgrifParentDef = 11;
+         pos_curagrifparent = setposcur()-10;
+      }
+      else if ( !strcasecmp(ident,"Agrif_Parent_Rhoz") )
+      {
+         InAgrifParentDef = 12;
+         pos_curagrifparent = setposcur()-17;
+      }
+      else if ( !strcasecmp(ident,"Agrif_IRhoz") )
+      {
+         InAgrifParentDef = 13;
+         pos_curagrifparent = setposcur()-11;
+      }
+      else if ( !strcasecmp(ident,"Agrif_Parent_IRhoz") )
+      {
+         InAgrifParentDef = 14;
+         pos_curagrifparent = setposcur()-18;
+      }
+      else if ( !strcasecmp(ident,"Agrif_NearCommonBorderX") )
+      {
+         InAgrifParentDef = 15;
+         pos_curagrifparent = setposcur()-23;
+      }
+      else if ( !strcasecmp(ident,"Agrif_NearCommonBorderY") )
+      {
+         InAgrifParentDef = 16;
+         pos_curagrifparent = setposcur()-23;
+      }
+      else if ( !strcasecmp(ident,"Agrif_NearCommonBorderZ") )
+      {
+         InAgrifParentDef = 17;
+         pos_curagrifparent = setposcur()-23;
+      }
+      else if ( !strcasecmp(ident,"Agrif_DistantCommonBorderX") )
+      {
+         InAgrifParentDef = 18;
+         pos_curagrifparent = setposcur()-26;
+      }
+      else if ( !strcasecmp(ident,"Agrif_DistantCommonBorderY") )
+      {
+         InAgrifParentDef = 19;
+         pos_curagrifparent = setposcur()-26;
+      }
+      else if ( !strcasecmp(ident,"Agrif_DistantCommonBorderZ") )
+      {
+         InAgrifParentDef = 20;
+         pos_curagrifparent = setposcur()-26;
+      }
+      else if ( !strcasecmp(ident,"Agrif_Get_parent_id") )
+      {
+         InAgrifParentDef = 21;
+         pos_curagrifparent = setposcur()-19;
+      }
+      else if ( !strcasecmp(ident,"Agrif_Get_grid_id") )
+      {
+         InAgrifParentDef = 22;
+         pos_curagrifparent = setposcur()-17;
+      }
+      else if ( !strcasecmp(ident,"Agrif_Parent_Iz") )
+      {
+         InAgrifParentDef = 23;
+         pos_curagrifparent = setposcur()-15;
+      }
+      else if ( !strcasecmp(ident,"Agrif_Parent_Iy") )
+      {
+         InAgrifParentDef = 24;
+         pos_curagrifparent = setposcur()-15;
+      }
+      else if ( !strcasecmp(ident,"Agrif_Parent_Ix") )
+      {
+         InAgrifParentDef = 25;
+         pos_curagrifparent = setposcur()-15;
+      }
+      else if ( !strcasecmp(ident,"Agrif_Iz") )
+      {
+         InAgrifParentDef = 26;
+         pos_curagrifparent = setposcur()-8;
+      }
+      else if ( !strcasecmp(ident,"Agrif_Iy") )
+      {
+         InAgrifParentDef = 27;
+         pos_curagrifparent = setposcur()-8;
+      }
+      else if ( !strcasecmp(ident,"Agrif_Ix") )
+      {
+         InAgrifParentDef = 28;
+         pos_curagrifparent = setposcur()-8;
+      }
+      else if ( !strcasecmp(ident,"Agrif_Nb_Fixed_Grids") )
+      {
+         InAgrifParentDef = 29;
+         pos_curagrifparent = setposcur()-20;
+      }
+      else if ( !strcasecmp(ident,"Agrif_Nb_Fine_Grids") )
+      {
+         InAgrifParentDef = 29;
+         pos_curagrifparent = setposcur()-19;
+      }
+      else if ( !strcasecmp(ident,"AGRIF_Nb_Step") )
+      {
+         InAgrifParentDef = 30;
+         pos_curagrifparent = setposcur()-13;
+      }
+   }
+}
+
+/******************************************************************************/
+/*                       ModifyTheAgrifFunction_0                             */
+/******************************************************************************/
+/* Firstpass 0                                                                */
+/******************************************************************************/
+/*                                                                            */
+/*               Agrif_<toto>(variable) ====>     Agrif_<toto>(variable)      */
+/*                                                                            */
+/******************************************************************************/
+void ModifyTheAgrifFunction_0(char *ident)
+{
+   if ( InAgrifParentDef != 0 )
+          AgriffunctionModify_0(ident,InAgrifParentDef);
+   /*                                                                         */
+   InAgrifParentDef = 0;
+}
+
+
+/******************************************************************************/
+/*                         AgriffunctionModify_0                              */
+/******************************************************************************/
+/* Firstpass 0                                                                */
+/******************************************************************************/
+/* if whichone = 1 Agrif_parent ===>                                          */
+/*                                                                            */
+/* if whichone = 2 Agrif_Get_coarse_grid ===>                                 */
+/*                                                                            */
+/* if whichone = 3 Agrif_Rhox ===>                                            */
+/*                                                                            */
+/* if whichone = 4 Agrif_Parent_Rhox ===>                                     */
+/*                                                                            */
+/* if whichone = 5 Agrif_IRhox ===>                                           */
+/*                                                                            */
+/* if whichone = 6 Agrif_Parent_IRhox ===>                                    */
+/*                                                                            */
+/* if whichone = 7 Agrif_Rhoy ===>                                            */
+/*                                                                            */
+/* if whichone = 8 Agrif_Parent_Rhoy ===>                                     */
+/*                                                                            */
+/* if whichone = 9 Agrif_IRhoy ===>                                           */
+/*                                                                            */
+/* if whichone = 10 Agrif_Parent_IRhoy ===>                                   */
+/*                                                                            */
+/* if whichone = 11 Agrif_Rhoz ===>                                           */
+/*                                                                            */
+/* if whichone = 12 Agrif_Parent_Rhoz ===>                                    */
+/*                                                                            */
+/* if whichone = 13 Agrif_IRhoz ===>                                          */
+/*                                                                            */
+/* if whichone = 14 Agrif_Parent_IRhoz ===>                                   */
+/*                                                                            */
+/* if whichone = 15 Agrif_NearCommonBorderX ===>                              */
+/*                                                                            */
+/* if whichone = 16 Agrif_NearCommonBorderX ===>                              */
+/*                                                                            */
+/* if whichone = 17 Agrif_NearCommonBorderX ===>                              */
+/*                                                                            */
+/* if whichone = 18 Agrif_DistantCommonBorderX ===>                           */
+/*                                                                            */
+/* if whichone = 19 Agrif_DistantCommonBorderY ===>                           */
+/*                                                                            */
+/* if whichone = 20 Agrif_DistantCommonBorderZ ===>                           */
+/*                                                                            */
+/* if whichone = 21 Agrif_Get_parent_id ===>                                  */
+/*                                                                            */
+/* if whichone = 22 Agrif_Get_grid_id ===>                                    */
+/*                                                                            */
+/* if whichone = 23 Agrif_Parent_Iz ===>                                      */
+/*                                                                            */
+/* if whichone = 24 Agrif_Parent_Iy ===>                                      */
+/*                                                                            */
+/* if whichone = 25 Agrif_Parent_Ix ===>                                      */
+/*                                                                            */
+/* if whichone = 26 Agrif_Iz ===>                                             */
+/*                                                                            */
+/* if whichone = 27 Agrif_Iy ===>                                             */
+/*                                                                            */
+/* if whichone = 28 Agrif_Ix ===>                                             */
+/*                                                                            */
+/* if whichone = 29 Agrif_Nb_Fixed_Grids ===>                                 */
+/*                                                                            */
+/* if whichone = 29 Agrif_Nb_Fine_Grids ===>                                  */
+/*                                                                            */
+/* if whichone = 30 AGRIF_Nb_Step ===>                                        */
+/*                                                                            */
+/*                                                                            */
+/******************************************************************************/
+void AgriffunctionModify_0(char *ident,int whichone)
+{
+   char toprint[LONG_C];
+   if ( firstpass == 0 )
+   {
+      strcpy(toprint,"");
+      pos_end = setposcur();
+      fseek(fortranout,pos_curagrifparent,SEEK_SET);
+      if ( whichone == 1 || whichone == 2 )
+      {
+         /*                                                                   */
+         FindAndChangeNameToTabvars(ident,toprint,List_Global_Var,1);
+         if ( !strcasecmp(ident,toprint) )
+         {
+            /* la liste des use de cette subroutine                           */
+            strcpy(toprint,"");
+            FindAndChangeNameToTabvars(ident,
+                                          toprint,List_Common_Var,whichone);
+         }
+         if ( !strcasecmp(ident,toprint) )
+         {
+            /* la liste des use de cette subroutine                           */
+            strcpy(toprint,"");
+            FindAndChangeNameToTabvars(ident,
+                                          toprint,List_ModuleUsed_Var,whichone);
+         }
+      }
+      else if ( whichone == 3 ) /* Agrif_Rhox                                 */
+      {
+         sprintf(toprint,"REAL(");
+         if( retour77 == 0 ) strcat(toprint," & \n");
+         else strcat(toprint,"\n     & ");
+         strcat(toprint,"Agrif_Curgrid % spaceref(1))");
+      }
+      else if ( whichone == 4 ) /* Agrif_Parent_Rhox                          */
+      {
+         sprintf(toprint,"REAL(");
+         if( retour77 == 0 ) strcat(toprint," & \n");
+         else strcat(toprint,"\n     & ");
+         strcat(toprint,"Agrif_Curgrid % parent % spaceref(1))");
+      }
+      else if ( whichone == 5 ) /* Agrif_Rhox                                 */
+      {
+         sprintf(toprint,"Agrif_Curgrid");
+         if( retour77 == 0 ) strcat(toprint," & \n");
+         else strcat(toprint,"\n     & ");
+         strcat(toprint,"% spaceref(1)");
+      }
+      else if ( whichone == 6 ) /* Agrif_Parent_Rhox                          */
+      {
+         sprintf(toprint,"Agrif_Curgrid");
+         if( retour77 == 0 ) strcat(toprint," & \n");
+         else strcat(toprint,"\n     & ");
+         strcat(toprint,"% parent % spaceref(1)");
+      }
+      else if ( whichone == 7 ) /* Agrif_Rhoy                                 */
+      {
+         sprintf(toprint,"REAL(Agrif_Curgrid");
+         if( retour77 == 0 ) strcat(toprint," & \n");
+         else strcat(toprint,"\n     & ");
+         strcat(toprint,"% spaceref(2))");
+      }
+      else if ( whichone == 8 ) /* Agrif_Parent_Rhoy                          */
+      {
+         sprintf(toprint,"REAL(Agrif_Curgrid");
+         if( retour77 == 0 ) strcat(toprint," & \n");
+         else strcat(toprint,"\n     & ");
+         strcat(toprint,"% parent % spaceref(2))");
+      }
+      else if ( whichone == 9 ) /* Agrif_Rhoy                                 */
+      {
+         sprintf(toprint,"Agrif_Curgrid");
+         if( retour77 == 0 ) strcat(toprint," & \n");
+         else strcat(toprint,"\n     & ");
+         strcat(toprint,"% spaceref(2)");
+      }
+      else if ( whichone == 10 ) /* Agrif_Parent_Rhoy                         */
+      {
+         sprintf(toprint,"Agrif_Curgrid");
+         if( retour77 == 0 ) strcat(toprint," & \n");
+         else strcat(toprint,"\n     & ");
+         strcat(toprint,"% parent % spaceref(2)");
+      }
+      else if ( whichone == 11 ) /* Agrif_Rhoz                                */
+      {
+         sprintf(toprint,"REAL(Agrif_Curgrid");
+         if( retour77 == 0 ) strcat(toprint," & \n");
+         else strcat(toprint,"\n     & ");
+         strcat(toprint,"% spaceref(3))");
+      }
+      else if ( whichone == 12 ) /* Agrif_Parent_Rhoz                         */
+      {
+         sprintf(toprint,"REAL(Agrif_Curgrid");
+         if( retour77 == 0 ) strcat(toprint," & \n");
+         else strcat(toprint,"\n     & ");
+         strcat(toprint,"% parent % spaceref(3))");
+      }
+      else if ( whichone == 13 ) /* Agrif_Rhoz                                */
+      {
+         sprintf(toprint,"Agrif_Curgrid");
+         if( retour77 == 0 ) strcat(toprint," & \n");
+         else strcat(toprint,"\n     & ");
+         strcat(toprint,"% spaceref(3)");
+      }
+      else if ( whichone == 14 ) /* Agrif_Parent_Rhoz                         */
+      {
+         sprintf(toprint,"Agrif_Curgrid");
+         if( retour77 == 0 ) strcat(toprint," & \n");
+         else strcat(toprint,"\n     & ");
+         strcat(toprint,"% parent % spaceref(3)");
+      }
+      else if ( whichone == 15 ) /* Agrif_NearCommonBorderX                   */
+      {
+         sprintf(toprint,"Agrif_Curgrid");
+         if( retour77 == 0 ) strcat(toprint," & \n");
+         else strcat(toprint,"\n     & ");
+         strcat(toprint,"% NearRootBorder(1)");
+      }
+      else if ( whichone == 16 ) /* Agrif_NearCommonBorderY                   */
+      {
+         sprintf(toprint,"Agrif_Curgrid");
+         if( retour77 == 0 ) strcat(toprint," & \n");
+         else strcat(toprint,"\n     & ");
+         strcat(toprint,"% NearRootBorder(2)");
+      }
+      else if ( whichone == 17 ) /* Agrif_NearCommonBorderZ                   */
+      {
+         sprintf(toprint,"Agrif_Curgrid");
+         if( retour77 == 0 ) strcat(toprint," & \n");
+         else strcat(toprint,"\n     & ");
+         strcat(toprint,"% NearRootBorder(3)");
+      }
+      else if ( whichone == 18 ) /* Agrif_NearCommonBorderX                   */
+      {
+         sprintf(toprint,"Agrif_Curgrid");
+         if( retour77 == 0 ) strcat(toprint," & \n");
+         else strcat(toprint,"\n     & ");
+         strcat(toprint,"% DistantRootBorder(1)");
+      }
+      else if ( whichone == 19 ) /* Agrif_NearCommonBorderY                   */
+      {
+         sprintf(toprint,"Agrif_Curgrid");
+         if( retour77 == 0 ) strcat(toprint," & \n");
+         else strcat(toprint,"\n     & ");
+         strcat(toprint,"% DistantRootBorder(2)");
+      }
+      else if ( whichone == 20 ) /* Agrif_NearCommonBorderZ                   */
+      {
+         sprintf(toprint,"Agrif_Curgrid");
+         if( retour77 == 0 ) strcat(toprint," & \n");
+         else strcat(toprint,"\n     & ");
+         strcat(toprint,"% DistantRootBorder(3)");
+      }
+      else if ( whichone == 21 ) /* Agrif_Get_parent_id                       */
+      {
+         sprintf(toprint,"Agrif_Curgrid");
+         if( retour77 == 0 ) strcat(toprint," & \n");
+         else strcat(toprint,"\n     & ");
+         strcat(toprint,"% parent % grid_id");
+      }
+      else if ( whichone == 22 ) /*  Agrif_Get_grid_id                        */
+      {
+         sprintf(toprint,"Agrif_Curgrid");
+         if( retour77 == 0 ) strcat(toprint," & \n");
+         else strcat(toprint,"\n     & ");
+         strcat(toprint,"% grid_id");
+      }
+      else if ( whichone == 23 ) /*  Agrif_Parent_Iz                          */
+      {
+         sprintf(toprint,"Agrif_Curgrid");
+         if( retour77 == 0 ) strcat(toprint," & \n");
+         else strcat(toprint,"\n     & ");
+         strcat(toprint,"% parent % ix(3)");
+      }
+      else if ( whichone == 24 ) /*  Agrif_Parent_Iy                          */
+      {
+         sprintf(toprint,"Agrif_Curgrid");
+         if( retour77 == 0 ) strcat(toprint," & \n");
+         else strcat(toprint,"\n     & ");
+         strcat(toprint,"% parent % ix(2)");
+      }
+      else if ( whichone == 25 ) /*  Agrif_Parent_Ix                          */
+      {
+         sprintf(toprint,"Agrif_Curgrid");
+         if( retour77 == 0 ) strcat(toprint," & \n");
+         else strcat(toprint,"\n     & ");
+         strcat(toprint,"% parent % ix(1)");
+      }
+      else if ( whichone == 26 ) /* Agrif_Iz                                  */
+      {
+         sprintf(toprint,"Agrif_Curgrid");
+         if( retour77 == 0 ) strcat(toprint," & \n");
+         else strcat(toprint,"\n     & ");
+         strcat(toprint," % ix(3)");
+      }
+      else if ( whichone == 27 ) /* Agrif_Iy                                  */
+      {
+         sprintf(toprint,"Agrif_Curgrid");
+         if( retour77 == 0 ) strcat(toprint," & \n");
+         else strcat(toprint,"\n     & ");
+         strcat(toprint,"% ix(2)");
+      }
+      else if ( whichone == 28 ) /* Agrif_Ix                                  */
+      {
+         sprintf(toprint,"Agrif_Curgrid");
+         if( retour77 == 0 ) strcat(toprint," & \n");
+         else strcat(toprint,"\n     & ");
+         strcat(toprint,"% ix(1)");
+      }
+      else if ( whichone == 29 ) /* Agrif_Nb_Fixed_Grids                      */
+      {
+         sprintf(toprint,"Agrif_nbfixedgrids");
+      }
+      else if ( whichone == 30 ) /* AGRIF_Nb_Step                             */
+      {
+         sprintf(toprint,"Agrif_Curgrid");
+         if( retour77 == 0 ) strcat(toprint," & \n");
+         else strcat(toprint,"\n     & ");
+         strcat(toprint,"% ngridstep");
+      }
+      /*                                                                      */
+      if ( whichone == 1 || whichone == 2 )
+      {
+         Save_Length(toprint,43);
+         tofich(fortranout,toprint,2);
+      }
+      else
+      {
+/*         if( retour77 == 0 ) fprintf(fortranout," & \n");
+         else fprintf(fortranout,"\n     & ");*/
+         Save_Length(toprint,43);
+         fprintf(fortranout,"%s",toprint);
+      }
+   }
+}
+
+
+/******************************************************************************/
+/*                             Instanciation_0                                */
+/******************************************************************************/
+/* Firstpass 0                                                                */
+/******************************************************************************/
+/*                                                                            */
+/*               Agrif_<toto>(variable) ====>     Agrif_<toto>(variable)      */
+/*                                                                            */
+/******************************************************************************/
+void Instanciation_0(char *ident)
+{
+   listvar *newvar;
+   int out;
+
+   if ( firstpass == 0 && sameagrifargument == 1 )
+   {
+      newvar = List_Global_Var;
+
+      out=0;
+      while ( newvar && out == 0 )
+      {
+         if ( !strcasecmp(newvar->var->v_nomvar,ident) ) out = 1;
+         else newvar=newvar->suiv;
+      }
+
+      if ( out == 0 )
+      {
+         newvar = List_Common_Var;
+
+         out=0;
+         while ( newvar && out == 0 )
+         {
+            if ( !strcasecmp(newvar->var->v_nomvar,ident) ) out = 1;
+            else newvar=newvar->suiv;
+         }
+      }
+      if ( out == 0 )
+      {
+         newvar = List_ModuleUsed_Var;
+
+         out=0;
+         while ( newvar && out == 0 )
+         {
+            if ( !strcasecmp(newvar->var->v_nomvar,ident) ) out = 1;
+            else newvar=newvar->suiv;
+         }
+      }
+
+      if ( out == 1 )
+      {
+         /* then write the instanciation                                      */
+         fprintf(fortranout,"\n      %s = %s",ident,
+                                          vargridcurgridtabvars(newvar->var,3));
+         colnum = 0;
+      }
+   }
+   sameagrifargument = 0;
+}
Index: vendors/AGRIF/r_01/LIB/UtilCharacter.c
===================================================================
--- vendors/AGRIF/r_01/LIB/UtilCharacter.c	(revision 2672)
+++ vendors/AGRIF/r_01/LIB/UtilCharacter.c	(revision 2672)
@@ -0,0 +1,447 @@
+/******************************************************************************/
+/*                                                                            */
+/*     CONV (converter) for Agrif (Adaptive Grid Refinement In Fortran)       */
+/*                                                                            */
+/* Copyright or   or Copr. Laurent Debreu (Laurent.Debreu@imag.fr)            */
+/*                        Cyril Mazauric (Cyril_Mazauric@yahoo.fr)            */
+/* This software is governed by the CeCILL-C license under French law and     */
+/* abiding by the rules of distribution of free software.  You can  use,      */
+/* modify and/ or redistribute the software under the terms of the CeCILL-C   */
+/* license as circulated by CEA, CNRS and INRIA at the following URL          */
+/* "http://www.cecill.info".                                                  */
+/*                                                                            */
+/* As a counterpart to the access to the source code and  rights to copy,     */
+/* modify and redistribute granted by the license, users are provided only    */
+/* with a limited warranty  and the software's author,  the holder of the     */
+/* economic rights,  and the successive licensors  have only  limited         */
+/* liability.                                                                 */
+/*                                                                            */
+/* In this respect, the user's attention is drawn to the risks associated     */
+/* with loading,  using,  modifying and/or developing or reproducing the      */
+/* software by the user in light of its specific status of free software,     */
+/* that may mean  that it is complicated to manipulate,  and  that  also      */
+/* therefore means  that it is reserved for developers  and  experienced      */
+/* professionals having in-depth computer knowledge. Users are therefore      */
+/* encouraged to load and test the software's suitability as regards their    */
+/* requirements in conditions enabling the security of their systems and/or   */
+/* data to be ensured and,  more generally, to use and operate it in the      */
+/* same conditions as regards security.                                       */
+/*                                                                            */
+/* The fact that you are presently reading this means that you have had       */
+/* knowledge of the CeCILL-C license and that you accept its terms.           */
+/******************************************************************************/
+/* version 1.7                                                                */
+/******************************************************************************/
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "decl.h"
+
+
+
+
+/******************************************************************************/
+/*                         FindAndChangeNameToTabvars                         */
+/******************************************************************************/
+/*                                                                            */
+/******************************************************************************/
+/* if  whichone = 0 ----> Agrif_tabvars(i) % var % array2                     */
+/*                                                                            */
+/* if  whichone = 1 ----> Agrif_tabvars(i) % parentvar % var % array2         */
+/*                                                                            */
+/******************************************************************************/
+void FindAndChangeNameToTabvars(char name[LONG_C],char toprint[LONG_4C],
+                                              listvar * listtosee, int whichone)
+{
+   listvar *newvar;
+   int out;
+   
+
+   if ( strcasecmp(name,"") )
+   {
+      newvar=listtosee;
+      out=0;
+      while( newvar && out == 0 )
+      {
+         if ( !strcasecmp(newvar->var->v_nomvar,name) )
+         {
+
+            if ( LookingForVariableInListName(
+                             List_SubroutineArgument_Var,name) == 0 )
+            {
+               out = 1;
+               strcat(toprint,vargridcurgridtabvars(newvar->var,whichone));
+            }
+            else newvar=newvar->suiv;
+         }
+         else newvar=newvar->suiv;
+      }
+      if ( out == 0 ) strcat(toprint,name);
+   }
+   Save_Length(toprint,44);
+}
+
+
+/******************************************************************************/
+/*                     ChangeTheInitalvaluebyTabvarsName                      */
+/******************************************************************************/
+/*                                                                            */
+/******************************************************************************/
+/*                                                                            */
+/*                                                                            */
+/*                                                                            */
+/******************************************************************************/
+char *ChangeTheInitalvaluebyTabvarsName(char *nom,listvar *listtoread,
+                                                                   int whichone)
+{
+   char toprinttmp[LONG_4C];
+   int i;
+   char chartmp[2];
+
+   i=0;
+   strcpy(toprintglob,"");
+   strcpy(toprinttmp,"");
+
+   /*                                                                         */
+   while ( i < strlen(nom) )
+   {
+      if ( nom[i] == '+' )
+      {
+        FindAndChangeNameToTabvars(toprinttmp,toprintglob,listtoread,whichone);
+         strcpy(toprinttmp,"");
+         strcat(toprintglob,"+");
+      }
+      else if ( nom[i] == '-' )
+      {
+         FindAndChangeNameToTabvars(toprinttmp,toprintglob,listtoread,whichone);
+         strcpy(toprinttmp,"");
+         strcat(toprintglob,"-");
+      }
+      else if ( nom[i] == '*' )
+      {
+         FindAndChangeNameToTabvars(toprinttmp,toprintglob,listtoread,whichone);
+         strcpy(toprinttmp,"");
+         strcat(toprintglob,"*");
+      }
+      else if ( nom[i] == '/' )
+      {
+         FindAndChangeNameToTabvars(toprinttmp,toprintglob,listtoread,whichone);
+         strcpy(toprinttmp,"");
+         strcat(toprintglob,"/");
+      }
+      else if ( nom[i] == '(' )
+      {
+         FindAndChangeNameToTabvars(toprinttmp,toprintglob,listtoread,whichone);
+         strcpy(toprinttmp,"");
+         strcat(toprintglob,"(");
+      }
+      else if ( nom[i] == ')' )
+      {
+         FindAndChangeNameToTabvars(toprinttmp,toprintglob,listtoread,whichone);
+         strcpy(toprinttmp,"");
+         strcat(toprintglob,")");
+      }
+      else if ( nom[i] == ':' )
+      {
+         FindAndChangeNameToTabvars(toprinttmp,toprintglob,listtoread,whichone);
+         strcpy(toprinttmp,"");
+         strcat(toprintglob,":");
+      }
+      else if ( nom[i] == ',' )
+      {
+         FindAndChangeNameToTabvars(toprinttmp,toprintglob,listtoread,whichone);
+         strcpy(toprinttmp,"");
+         strcat(toprintglob,",");
+      }
+      else
+      {
+         sprintf(chartmp,"%c",nom[i]);
+         strcat(toprinttmp,chartmp);
+      }
+      /*                                                                      */
+      i=i+1;
+   }
+   FindAndChangeNameToTabvars(toprinttmp,toprintglob,listtoread,whichone);
+   strcpy(toprinttmp,"");
+
+   Save_Length(toprinttmp,44);
+   Save_Length(toprintglob,39);
+
+   /*                                                                         */
+   return toprintglob;
+}
+
+/******************************************************************************/
+/*                            IsVariableReal                                  */
+/******************************************************************************/
+/*                                                                            */
+/******************************************************************************/
+/*                                                                            */
+/*                                                                            */
+/*                                                                            */
+/******************************************************************************/
+int IsVariableReal(char *nom)
+{
+   int Real;
+
+   Real = 0;
+   if ( ( nom[0] >= 'a' && nom[0] <= 'h' ) ||
+        ( nom[0] >= 'A' && nom[0] <= 'H' ) ||
+        ( nom[0] >= 'o' && nom[0] <= 'z' ) ||
+        ( nom[0] >= 'O' && nom[0] <= 'Z' )
+       )
+       {
+          Real = 1;
+       }
+   /*                                                                         */
+   return Real;
+}
+/******************************************************************************/
+/*                         IsVarInUseFile                                     */
+/******************************************************************************/
+/*                                                                            */
+/******************************************************************************/
+/*                                                                            */
+/*                                                                            */
+/*                                                                            */
+/******************************************************************************/
+void IsVarInUseFile(char *nom)
+{
+   listvar *parcours;
+   listparameter *parcoursparam;
+   int out;
+
+   out = 0;
+
+   parcours = List_Global_Var;
+   while( parcours && out == 0 )
+   {
+      if ( !strcasecmp(nom,parcours->var->v_nomvar) ) out =1 ;
+     else parcours=parcours->suiv;
+   }
+   if ( out == 0 )
+   {
+      parcours = List_Common_Var;
+      while( parcours && out == 0 )
+      {
+         if ( !strcasecmp(nom,parcours->var->v_nomvar) ) out =1 ;
+        else parcours=parcours->suiv;
+      }
+   }
+   if ( out == 0 )
+   {
+      parcours = List_GlobalParameter_Var;
+      while( parcours && out == 0 )
+      {
+         if ( !strcasecmp(nom,parcours->var->v_nomvar) ) out =1 ;
+        else parcours=parcours->suiv;
+      }
+   }
+   if ( out == 0 )
+   {
+      parcours = List_Parameter_Var;
+      while( parcours && out == 0 )
+      {
+         if ( !strcasecmp(nom,parcours->var->v_nomvar) ) out =1 ;
+        else parcours=parcours->suiv;
+      }
+   }
+   if ( out == 0 )
+   {
+      parcoursparam = List_GlobParamModuleUsed_Var;
+      while( parcoursparam && out == 0 )
+      {
+         if ( !strcasecmp(nom,parcoursparam->p_name) ) out =2 ;
+         else parcoursparam=parcoursparam->suiv;
+      }
+   }
+   if ( out == 0 )
+   {
+      parcours = List_ModuleUsed_Var;
+      while( parcours && out == 0 )
+      {
+         if ( !strcasecmp(nom,parcours->var->v_nomvar) ) out =2 ;
+        else parcours=parcours->suiv;
+      }
+   }
+   if ( out == 0 || out == 2 )
+   {
+      parcoursparam = List_GlobParamModuleUsedInModuleUsed_Var;
+      while( parcoursparam && out != 1 )
+      {
+         if ( !strcasecmp(nom,parcoursparam->p_name) ) out =1 ;
+         else parcoursparam=parcoursparam->suiv;
+      }
+      if ( out == 1 )
+      {
+         strcpy(charusemodule,parcoursparam->p_modulename);
+         Addmoduletothelist(parcoursparam->p_modulename);
+      }
+   }
+   if ( out == 0 &&
+        strcasecmp(nom,"MAX")             &&
+        strcasecmp(nom,"mpi_status_size")
+      )
+   {
+   /*   printf("--- in UtilCharacter we do not found the \n");
+      printf("---  variable %s, the module where this \n",nom);
+      printf("---  variable has been defined has not been\n");
+      printf("---  found.\n");*/
+   }
+}
+
+/******************************************************************************/
+/*                      DecomposeTheNameinlistnom                             */
+/******************************************************************************/
+/* Firstpass 0                                                                */
+/******************************************************************************/
+/*                                                                            */
+/*                                                                            */
+/******************************************************************************/
+listnom *DecomposeTheNameinlistnom(char *nom, listnom * listout)
+{
+   char toprinttmp[LONG_4C];
+   int i;
+   char chartmp[2];
+
+   i=0;
+   strcpy(toprinttmp,"");
+   /*                                                                         */
+   while ( i < strlen(nom) )
+   {
+      if ( nom[i] == '+' ||
+           nom[i] == '-' ||
+           nom[i] == '*' ||
+           nom[i] == '/' ||
+           nom[i] == ')' ||
+           nom[i] == '(' ||
+           nom[i] == ',' ||
+           nom[i] == ':'
+         )
+      {
+
+         if (strcasecmp(toprinttmp,"") && ( toprinttmp[0] >= 'A' ) )
+         {
+             listout = Addtolistnom(toprinttmp,listout,0);
+         }
+         strcpy(toprinttmp,"");
+      }
+      else
+      {
+         sprintf(chartmp,"%c",nom[i]);
+         strcat(toprinttmp,chartmp);
+
+      }
+      /*                                                                      */
+      i=i+1;
+   }
+   if (strcasecmp(toprinttmp,"") && ( toprinttmp[0] >= 'A' ) )
+   {
+      listout = Addtolistnom(toprinttmp,listout,0);
+   }
+   strcpy(toprinttmp,"");
+   Save_Length(toprinttmp,44);
+
+   return listout;
+}
+
+
+/******************************************************************************/
+/*                      DecomposeTheName                                      */
+/******************************************************************************/
+/* Firstpass 0                                                                */
+/******************************************************************************/
+/*                                                                            */
+/*               Agrif_<toto>(variable) ====>     Agrif_<toto>(variable)      */
+/*                                                                            */
+/******************************************************************************/
+void DecomposeTheName(char *nom)
+{
+   char toprinttmp[LONG_4C];
+   int i;
+   char chartmp[2];
+
+   i=0;
+   strcpy(toprinttmp,"");
+   /*                                                                         */
+   while ( i < strlen(nom) )
+   {
+      if ( nom[i] == '+' ||
+           nom[i] == '-' ||
+           nom[i] == '*' ||
+           nom[i] == '/' ||
+           nom[i] == ')' ||
+           nom[i] == '(' ||
+           nom[i] == ',' ||
+           nom[i] == ':'
+         )
+      {
+         if (strcasecmp(toprinttmp,"") && ( toprinttmp[0] >= 'A' ) )
+         {
+            ajoutevarindoloop_definedimension (toprinttmp);
+            /* Is this variable present in globvarofusefile                   */
+            IsVarInUseFile(toprinttmp);
+         }
+         strcpy(toprinttmp,"");
+      }
+      else
+      {
+         sprintf(chartmp,"%c",nom[i]);
+         strcat(toprinttmp,chartmp);
+      }
+      /*                                                                      */
+      i=i+1;
+   }
+   Save_Length(toprinttmp,44);
+   if (strcasecmp(toprinttmp,"") && ( toprinttmp[0] >= 'A' ) )
+   {
+      ajoutevarindoloop_definedimension (toprinttmp);
+      /* Is this variable present in globvarofusefile                         */
+      IsVarInUseFile(toprinttmp);
+   }
+   strcpy(toprinttmp,"");
+
+}
+
+void convert2lower(char *name)
+{
+   int l;
+   int i;
+   int caractere;
+
+   l=strlen(name)-1;
+   for (i=0;i<=l;i++)
+   {
+      caractere=name[i];
+      if ((caractere>=65 && caractere<=90)||(caractere>=192 && caractere<=221))
+      {
+         name[i]+=32;
+      }
+   }
+}
+
+int convert2int(char *name)
+{
+   int i;
+   int caractere;
+   int value;
+   int value_tmp;
+   int longueur;
+
+   value = 0;
+
+   longueur = strlen(name) - 1;
+   for (i=0;i<=longueur;i++)
+   {
+      caractere=name[i];
+      value_tmp = caractere -'0';
+      if ( value_tmp > 9 ) return 0;
+           if ( longueur+1-i == 6 ) value = value + value_tmp *100000;
+      else if ( longueur+1-i == 5 ) value = value + value_tmp *10000;
+      else if ( longueur+1-i == 4 ) value = value + value_tmp *1000;
+      else if ( longueur+1-i == 3 ) value = value + value_tmp *100;
+      else if ( longueur+1-i == 2 ) value = value + value_tmp *10;
+      else if ( longueur+1-i == 1 ) value = value + value_tmp *1;
+   }
+   return value;
+}
Index: vendors/AGRIF/r_01/LIB/UtilFile.c
===================================================================
--- vendors/AGRIF/r_01/LIB/UtilFile.c	(revision 2672)
+++ vendors/AGRIF/r_01/LIB/UtilFile.c	(revision 2672)
@@ -0,0 +1,146 @@
+/******************************************************************************/
+/*                                                                            */
+/*     CONV (converter) for Agrif (Adaptive Grid Refinement In Fortran)       */
+/*                                                                            */
+/* Copyright or   or Copr. Laurent Debreu (Laurent.Debreu@imag.fr)            */
+/*                        Cyril Mazauric (Cyril_Mazauric@yahoo.fr)            */
+/* This software is governed by the CeCILL-C license under French law and     */
+/* abiding by the rules of distribution of free software.  You can  use,      */
+/* modify and/ or redistribute the software under the terms of the CeCILL-C   */
+/* license as circulated by CEA, CNRS and INRIA at the following URL          */
+/* "http://www.cecill.info".                                                  */
+/*                                                                            */
+/* As a counterpart to the access to the source code and  rights to copy,     */
+/* modify and redistribute granted by the license, users are provided only    */
+/* with a limited warranty  and the software's author,  the holder of the     */
+/* economic rights,  and the successive licensors  have only  limited         */
+/* liability.                                                                 */
+/*                                                                            */
+/* In this respect, the user's attention is drawn to the risks associated     */
+/* with loading,  using,  modifying and/or developing or reproducing the      */
+/* software by the user in light of its specific status of free software,     */
+/* that may mean  that it is complicated to manipulate,  and  that  also      */
+/* therefore means  that it is reserved for developers  and  experienced      */
+/* professionals having in-depth computer knowledge. Users are therefore      */
+/* encouraged to load and test the software's suitability as regards their    */
+/* requirements in conditions enabling the security of their systems and/or   */
+/* data to be ensured and,  more generally, to use and operate it in the      */
+/* same conditions as regards security.                                       */
+/*                                                                            */
+/* The fact that you are presently reading this means that you have had       */
+/* knowledge of the CeCILL-C license and that you accept its terms.           */
+/******************************************************************************/
+/* version 1.7                                                                */
+/******************************************************************************/
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "decl.h"
+
+
+/******************************************************************************/
+/*                            associate                                       */
+/******************************************************************************/
+/* This subroutine is used to open a file                                     */
+/******************************************************************************/
+FILE * associate (char *filename)
+{
+  char filefich[LONG_C];
+  sprintf(filefich,"%s/%s",nomdir,filename);
+  return fopen (filefich, "w");
+}
+
+
+/******************************************************************************/
+/*                          associateaplus                                    */
+/******************************************************************************/
+/* This subroutine is used to open a file with option a+                      */
+/******************************************************************************/
+FILE * associateaplus (char *filename)
+{
+  char filefich[LONG_C];
+  sprintf(filefich,"%s/%s",nomdir,filename);
+  return fopen (filefich, "a+");
+}
+
+
+/******************************************************************************/
+/*                           setposcurname                                       */
+/******************************************************************************/
+/* This subroutine is used to know the current position in the file in argument    */
+/******************************************************************************/
+/*                                                                            */
+/*                      setposcur ---------> position in file                 */
+/*                                                                            */
+/******************************************************************************/
+long int setposcurname(FILE *fileout)
+{
+   fflush(fileout);
+   return ftell(fileout);
+}
+
+/******************************************************************************/
+/*                           setposcur                                        */
+/******************************************************************************/
+/* This subroutine is used to know the current position in the file           */
+/******************************************************************************/
+/*                                                                            */
+/*                      setposcur ---------> position in file                 */
+/*                                                                            */
+/******************************************************************************/
+long int setposcur()
+{
+   fflush(fortranout);
+   return ftell(fortranout);
+}
+
+/******************************************************************************/
+/*                      setposcurinoldfortranout                              */
+/******************************************************************************/
+/* This subroutine is used to know the position in the oldfortranout         */
+/******************************************************************************/
+/*                                                                            */
+/*             setposcurinoldfortranout ---------> position in file           */
+/*                                                                            */
+/******************************************************************************/
+long int setposcurinoldfortranout()
+{
+   fflush(oldfortranout);
+   return ftell(oldfortranout);
+}
+
+/******************************************************************************/
+/*                         copyuse_0                                          */
+/******************************************************************************/
+/* Firstpass 0                                                                */
+/* We should write in the fortranout the USE tok_name                         */
+/* read in the original file                                                  */
+/******************************************************************************/
+/*                                                                            */
+/******************************************************************************/
+void copyuse_0(char *namemodule)
+{
+   if (firstpass == 0 && IsTabvarsUseInArgument_0() == 1 )
+   {
+      /* We should write this declaration into the original subroutine too    */
+      fprintf(oldfortranout,"      USE %s \n",namemodule);
+   }
+}
+
+/******************************************************************************/
+/*                         copyuseonly_0                                      */
+/******************************************************************************/
+/* Firstpass 0                                                                */
+/* We should write in the fortranout the USE tok_name, only                   */
+/* read in the original file                                                  */
+/******************************************************************************/
+/*                                                                            */
+/******************************************************************************/
+void copyuseonly_0(char *namemodule)
+{
+   if (firstpass == 0 && IsTabvarsUseInArgument_0() == 1 )
+   {
+      /* We should write this declaration into the original subroutine too    */
+      fprintf(oldfortranout,"      USE %s , ONLY : \n",namemodule);
+   }
+}
Index: vendors/AGRIF/r_01/LIB/UtilFortran.c
===================================================================
--- vendors/AGRIF/r_01/LIB/UtilFortran.c	(revision 2672)
+++ vendors/AGRIF/r_01/LIB/UtilFortran.c	(revision 2672)
@@ -0,0 +1,791 @@
+/******************************************************************************/
+/*                                                                            */
+/*     CONV (converter) for Agrif (Adaptive Grid Refinement In Fortran)       */
+/*                                                                            */
+/* Copyright or   or Copr. Laurent Debreu (Laurent.Debreu@imag.fr)            */
+/*                        Cyril Mazauric (Cyril_Mazauric@yahoo.fr)            */
+/* This software is governed by the CeCILL-C license under French law and     */
+/* abiding by the rules of distribution of free software.  You can  use,      */
+/* modify and/ or redistribute the software under the terms of the CeCILL-C   */
+/* license as circulated by CEA, CNRS and INRIA at the following URL          */
+/* "http://www.cecill.info".                                                  */
+/*                                                                            */
+/* As a counterpart to the access to the source code and  rights to copy,     */
+/* modify and redistribute granted by the license, users are provided only    */
+/* with a limited warranty  and the software's author,  the holder of the     */
+/* economic rights,  and the successive licensors  have only  limited         */
+/* liability.                                                                 */
+/*                                                                            */
+/* In this respect, the user's attention is drawn to the risks associated     */
+/* with loading,  using,  modifying and/or developing or reproducing the      */
+/* software by the user in light of its specific status of free software,     */
+/* that may mean  that it is complicated to manipulate,  and  that  also      */
+/* therefore means  that it is reserved for developers  and  experienced      */
+/* professionals having in-depth computer knowledge. Users are therefore      */
+/* encouraged to load and test the software's suitability as regards their    */
+/* requirements in conditions enabling the security of their systems and/or   */
+/* data to be ensured and,  more generally, to use and operate it in the      */
+/* same conditions as regards security.                                       */
+/*                                                                            */
+/* The fact that you are presently reading this means that you have had       */
+/* knowledge of the CeCILL-C license and that you accept its terms.           */
+/******************************************************************************/
+/* version 1.7                                                                */
+/******************************************************************************/
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "decl.h"
+
+/******************************************************************************/
+/*                            initdimprob                                     */
+/******************************************************************************/
+/* This subroutine is used to initialized grid dimension variable             */
+/******************************************************************************/
+/*                                                                            */
+/*                                                                            */
+/*                                                                            */
+/******************************************************************************/
+void initdimprob(int dimprobmod, char * nx, char * ny,char* nz)
+{
+  dimprob = dimprobmod;
+
+  strcpy(nbmaillesX,nx);
+  strcpy(nbmaillesY,ny);
+  strcpy(nbmaillesZ,nz);
+}
+
+/******************************************************************************/
+/*                      Variableshouldberemove                                */
+/******************************************************************************/
+/* Firstpass 0                                                                */
+/******************************************************************************/
+/*                                                                            */
+/*               Agrif_<toto>(variable) ====>     Agrif_<toto>(variable)      */
+/*                                                                            */
+/******************************************************************************/
+int Variableshouldberemove(char *nom)
+{
+
+   int remove;
+
+   remove = 0 ;
+
+   if ( remove == 0 && Agrif_in_Tok_NAME(nom) == 1 ) remove = 1 ;
+
+   return remove;
+}
+
+/******************************************************************************/
+/*                          variableisglobal                                  */
+/******************************************************************************/
+/* This subroutine is to know if a variable is global                         */
+/******************************************************************************/
+int variableisglobal(listvar *curvar, listvar *listin)
+{
+  int Globalite;
+  listvar *newvar;
+
+
+  Globalite = 0;
+  newvar = listin;
+  while ( newvar && Globalite == 0 )
+  {
+     if ( !strcasecmp(newvar->var->v_nomvar,curvar->var->v_nomvar) )
+     {
+        Globalite = 1;
+        /* Now we should give the definition of the variable in the           */
+        /* table List_UsedInSubroutine_Var                                    */
+        printf("QDKFLSDFKSLDF\n");
+        strcpy(curvar->var->v_typevar,newvar->var->v_typevar);
+        strcpy(curvar->var->v_dimchar,newvar->var->v_dimchar);
+        curvar->var->v_nbdim = newvar->var->v_nbdim;
+        curvar->var->v_dimensiongiven = newvar->var->v_dimensiongiven;
+        curvar->var->v_allocatable = newvar->var->v_allocatable;
+        curvar->var->v_target = newvar->var->v_target;
+        curvar->var->v_pointerdeclare = newvar->var->v_pointerdeclare;
+        curvar->var->v_indicetabvars = newvar->var->v_indicetabvars;
+        strcpy(curvar->var->v_nameinttypename,newvar->var->v_nameinttypename);
+        strcpy(curvar->var->v_precision,newvar->var->v_precision);
+        strcpy(curvar->var->v_readedlistdimension,
+                                            newvar->var->v_readedlistdimension);
+        strcpy(curvar->var->v_commoninfile,newvar->var->v_commoninfile);
+     }
+     else
+     {
+         newvar = newvar->suiv;
+     }
+  }
+
+  return Globalite ;
+}
+
+int VariableIsInListCommon(listvar *curvar,listvar *listin)
+{
+  int present;
+  listvar *newvar;
+
+  present = 0;
+  newvar = listin;
+  while ( newvar && present == 0 )
+  {
+     if ( !strcasecmp(newvar->var->v_nomvar,curvar->var->v_nomvar) &&
+          !strcasecmp(newvar->var->v_subroutinename,
+                                    curvar->var->v_subroutinename)
+        )
+     {
+        strcpy(curvar->var->v_commoninfile,newvar->var->v_commoninfile);
+        CopyRecord(curvar->var,newvar->var);
+        present = 1;
+     }
+     else newvar = newvar->suiv;
+  }
+
+  return present;
+}
+
+int VariableIsInList(listvar *curvar,listvar *listin)
+{
+  int present;
+  listvar *newvar;
+
+  present = 0;
+  newvar = listin;
+  while ( newvar && present == 0 )
+  {
+     if ( !strcasecmp(newvar->var->v_nomvar,curvar->var->v_nomvar) )
+     {
+        CopyRecord(curvar->var,newvar->var);
+        present = 1;
+     }
+     else newvar = newvar->suiv;
+  }
+
+  return present;
+}
+
+/******************************************************************************/
+/*                      variableisglobalinmodule                              */
+/******************************************************************************/
+/* This subroutine is to know if a variable is global                         */
+/******************************************************************************/
+void variableisglobalinmodule(listcouple *listin, char *module, FILE *fileout, long int oldposcuruse)
+{
+  int Globalite;
+  listcouple *newvar;
+  listcouple *newvarprec;
+  listvar *tempo;
+  listvar *newvar2;
+  int out;
+  char truename[LONG_C];  
+
+  Globalite = 1;
+  newvarprec = (listcouple *)NULL;
+  tempo = (listvar *)NULL;
+  tempo = Readthedependfile(module,tempo);
+  newvar = listin;
+
+  while ( newvar )
+  {
+     if (!strcmp(newvar->c_namepointedvar,"")) {
+       strcpy(truename,newvar->c_namevar);
+     }
+     else
+     {
+       strcpy(truename,newvar->c_namepointedvar);
+     }
+     
+     out = 0;
+     newvar2 = tempo;
+     while ( newvar2 && out == 0 )
+     {
+        if ( !strcasecmp(newvar2->var->v_nomvar,truename) ) out = 1;
+        else newvar2 = newvar2 ->suiv;
+     }
+     if ( out == 1 )
+     {
+        /* remove from the listin                                             */
+        if ( newvar == listin )
+        {
+           listin = listin->suiv;
+           newvar = listin;
+        }
+        else
+        {
+           newvarprec->suiv = newvar->suiv;
+           newvar = newvar->suiv;
+        }
+     }
+     else
+     {
+         newvarprec = newvar;
+         newvar = newvar->suiv;
+         Globalite = 0;
+     }
+  }
+  if ( Globalite == 0 || !newvar)
+  {
+     pos_end = setposcurname(fileout);
+     RemoveWordSET_0(fileout,oldposcuruse,
+                                pos_end-oldposcuruse);
+                                  
+     newvar = listin;
+     while ( newvar )
+     {
+        fprintf(fileout,"      USE %s, ONLY : %s \n",module,newvar->c_namevar);
+        newvar = newvar->suiv;
+     }
+  }
+}
+
+
+void Remove_Word_Contains_0()
+{
+   if ( firstpass == 0 )
+   {
+      RemoveWordCUR_0(fortranout,(long)(-9),9);
+   }
+}
+
+void Remove_Word_end_module_0(int modulenamelength)
+{
+   if ( firstpass == 0 )
+   {
+      RemoveWordCUR_0(fortranout,(long)(-modulenamelength-12),
+                                         modulenamelength+11);
+   }
+}
+
+void Write_Word_Contains_0()
+{
+   if ( firstpass == 0 )
+   {
+      fprintf(fortranout,"\n      contains\n");
+   }
+}
+
+
+void Write_Word_end_module_0()
+{
+   if ( firstpass == 0 )
+   {
+      fprintf(fortranout,"\n      end module %s",curmodulename);
+   }
+}
+
+void Add_Subroutine_For_Alloc(char *nom)
+{
+   listnom *parcours;
+   listnom *newvar;
+   int out;
+
+   newvar = (listnom *)malloc(sizeof(listnom));
+   strcpy(newvar->o_nom,nom);
+   Save_Length(nom,23);
+   newvar->suiv = NULL;
+
+   if ( !List_Subroutine_For_Alloc )
+   {
+      List_Subroutine_For_Alloc = newvar;
+   }
+   else
+   {
+      parcours = List_Subroutine_For_Alloc;
+      out = 0 ;
+      while ( parcours->suiv && out == 0 )
+      {
+         if ( !strcasecmp(parcours->o_nom,nom) ) out = 1 ;
+         else parcours = parcours ->suiv;
+      }
+      /*                                                                      */
+      if ( out == 0 )
+      {
+         if ( strcasecmp(parcours->o_nom,nom) ) parcours->suiv = newvar;
+      }
+   }
+}
+
+
+void Write_Alloc_Subroutine_0()
+{
+   listnom *parcours_nom;
+   listnom *parcours_nomprec;
+   int out;
+   char ligne[LONG_C];
+
+   if ( firstpass == 0 )
+   {
+      parcours_nomprec = (listnom *)NULL;
+      parcours_nom = List_NameOfModule;
+      out = 0 ;
+      while ( parcours_nom && out == 0 )
+      {
+         /*                                                                   */
+         if ( !strcasecmp(curmodulename,parcours_nom->o_nom) ) out = 1;
+         else parcours_nom = parcours_nom -> suiv;
+      }
+      if ( out == 1 )
+      {
+         if ( parcours_nom->o_val == 1 )
+         {
+            strcpy (ligne, "\n      PUBLIC Alloc_agrif_");
+            strcat (ligne, curmodulename);
+            strcat (ligne, "\n");
+            convert2lower(ligne);
+            fprintf(fortranout,ligne);
+         }
+      }
+      Write_Word_Contains_0();
+      if ( out == 1 )
+      {
+         if ( parcours_nom->o_val == 1 )
+         {
+            sprintf (ligne, "Subroutine Alloc_agrif_%s(Agrif_Gr)",
+                                                                 curmodulename);
+            tofich(fortranout,ligne,1);
+            strcpy(ligne,"Use Agrif_Util");
+            tofich(fortranout,ligne,1);
+            strcpy (ligne, "Type(Agrif_grid), Pointer :: Agrif_Gr");
+            tofich(fortranout,ligne,1);
+            strcpy(ligne, "INTEGER :: i");
+            tofich (fortranout, ligne,1);
+            strcpy (ligne, "\n#include \"alloc_agrif_");
+            strcat (ligne, curmodulename);
+            strcat (ligne, ".h\"\n");
+            convert2lower(ligne);
+            fprintf(fortranout,ligne);
+            strcpy (ligne, "Return");
+            tofich(fortranout,ligne,1);
+            sprintf (ligne, "End Subroutine Alloc_agrif_%s",curmodulename);
+            tofich(fortranout,ligne,1);
+            /* List all Call Alloc_agrif_                                     */
+            Add_Subroutine_For_Alloc(curmodulename);
+         }
+         else
+         {
+            parcours_nom = List_Subroutine_For_Alloc;
+            out = 0;
+            while ( parcours_nom && out == 0 )
+            {
+               if ( !strcasecmp(parcours_nom->o_nom,curmodulename) ) out = 1;
+               else
+               {
+                  parcours_nomprec = parcours_nom;
+                  parcours_nom = parcours_nom->suiv;
+               }
+            }
+            if ( out == 1 )
+            {
+               if ( parcours_nom == List_Subroutine_For_Alloc)
+               {
+                  List_Subroutine_For_Alloc = List_Subroutine_For_Alloc->suiv;
+               }
+               else
+               {
+                  parcours_nomprec->suiv = parcours_nom->suiv;
+                  parcours_nom = parcours_nomprec->suiv ;
+               }
+            }
+         }
+      }
+   }
+}
+
+
+void Write_Alloc_Subroutine_For_End_0()
+{
+   listnom *parcours_nom;
+   listnom *parcours_nomprec;
+   int out;
+   char ligne[LONG_C];
+
+   if ( firstpass == 0 )
+   {
+      parcours_nomprec = (listnom *)NULL;
+      parcours_nom = List_NameOfModule;
+      out = 0 ;
+      while ( parcours_nom && out == 0 )
+      {
+         /*                                                                   */
+         if ( !strcasecmp(curmodulename,parcours_nom->o_nom) ) out = 1;
+         else parcours_nom = parcours_nom -> suiv;
+      }
+      if ( out == 1 )
+      {
+         if ( parcours_nom->o_val == 1 )
+         {
+            strcpy (ligne, "\n      PUBLIC Alloc_agrif_");
+            strcat (ligne, curmodulename);
+            strcat (ligne, "\n");
+            convert2lower(ligne);
+            fprintf(fortranout,ligne);
+            strcpy (ligne, "\n      contains\n");
+            fprintf(fortranout,ligne);
+            sprintf (ligne, "Subroutine Alloc_agrif_%s(Agrif_Gr)",
+                                                                 curmodulename);
+            tofich(fortranout,ligne,1);
+            strcpy(ligne,"Use Agrif_Util");
+            tofich(fortranout,ligne,1);
+            strcpy (ligne, "Type(Agrif_grid), Pointer :: Agrif_Gr");
+            tofich(fortranout,ligne,1);
+            strcpy(ligne, "INTEGER :: i");
+            tofich (fortranout, ligne,1);
+            strcpy (ligne, "\n#include \"alloc_agrif_");
+            strcat (ligne, curmodulename);
+            strcat (ligne, ".h\"\n");
+            convert2lower(ligne);
+            fprintf(fortranout,ligne);
+            strcpy (ligne, "Return");
+            tofich(fortranout,ligne,1);
+            sprintf (ligne, "End Subroutine Alloc_agrif_%s",curmodulename);
+            tofich(fortranout,ligne,1);
+            /* List all Call Alloc_agrif                                      */
+            Add_Subroutine_For_Alloc(parcours_nom->o_nom);
+         }
+         else
+         {
+            parcours_nom = List_Subroutine_For_Alloc;
+            out = 0;
+            while ( parcours_nom && out == 0 )
+            {
+               if ( !strcasecmp(parcours_nom->o_nom,curmodulename) ) out = 1;
+               else
+               {
+                  parcours_nomprec = parcours_nom;
+                  parcours_nom = parcours_nom->suiv;
+               }
+            }
+            if ( out == 1 )
+            {
+               if ( parcours_nom == List_Subroutine_For_Alloc)
+               {
+                  List_Subroutine_For_Alloc = List_Subroutine_For_Alloc->suiv;
+               }
+               else
+               {
+                  parcours_nomprec->suiv = parcours_nom->suiv;
+                  parcours_nom = parcours_nomprec->suiv ;
+               }
+            }
+         }
+      }
+   }
+}
+
+void Write_GlobalParameter_Declaration_0()
+{
+   listvar *parcours;
+
+   if ( firstpass == 0 )
+   {
+      parcours = List_GlobalParameter_Var;
+      while( parcours )
+      {
+         if ( !strcasecmp(parcours->var->v_modulename,curmodulename) )
+         {
+            writevardeclaration(parcours,module_declar,0,1);
+         }
+         parcours = parcours -> suiv;
+      }
+   }
+}
+
+void Write_GlobalType_Declaration_0()
+{
+   listvar *parcours;
+   int out = 0;
+   int headtypewritten = 0;
+   char ligne[LONGNOM];
+   int changeval;
+
+   if ( firstpass == 0 )
+   {
+      parcours = List_Global_Var;
+      while( parcours )
+      {
+         if ( !strcasecmp(parcours->var->v_modulename,curmodulename) )
+         {
+           if (!strcasecmp(parcours->var->v_typevar,"type"))
+           {
+            out = 1;
+            if (headtypewritten == 0)
+              {
+                sprintf(ligne,"TYPE :: Agrif_%s",curmodulename);
+                tofich(module_declar,ligne,1);
+                headtypewritten = 1;
+              }
+            changeval = 0;
+            if (parcours->var->v_allocatable == 1)
+             {
+               changeval = 1;
+               parcours->var->v_allocatable = 0;
+               parcours->var->v_pointerdeclare = 1;
+             }
+            writevardeclaration(parcours,module_declar,0,0);
+            if (changeval == 1)
+              {
+               parcours->var->v_allocatable = 1;
+               parcours->var->v_pointerdeclare = 0;
+              }
+            }
+         }
+         parcours = parcours -> suiv;
+      }
+      if (out == 1)
+        {
+                sprintf(ligne,"END TYPE Agrif_%s",curmodulename);
+                tofich(module_declar,ligne,1);
+                sprintf(ligne,"TYPE(Agrif_%s), DIMENSION(:), ALLOCATABLE :: Agrif_%s_var",curmodulename,curmodulename); 
+                tofich(module_declar,ligne,1);
+                sprintf(ligne,"PUBLIC :: Agrif_%s",curmodulename); 
+                tofich(module_declar,ligne,1);
+                sprintf(ligne,"PUBLIC :: Agrif_%s_var",curmodulename); 
+                tofich(module_declar,ligne,1);
+        }
+   }
+}
+
+void Write_NotGridDepend_Declaration_0()
+{
+   listvar *parcours;
+
+   if ( firstpass == 0 )
+   {
+      parcours = List_NotGridDepend_Var;
+      while( parcours )
+      {
+         if ( !strcasecmp(parcours->var->v_modulename,curmodulename) )
+         {
+            writevardeclaration(parcours,fortranout,0,1);
+         }
+         parcours = parcours -> suiv;
+      }
+   }
+}
+
+/******************************************************************************/
+/*                          IsTabvarsUseInArgument_0                          */
+/******************************************************************************/
+/* Firstpass 1                                                                */
+/******************************************************************************/
+/*                                                                            */
+/******************************************************************************/
+int IsTabvarsUseInArgument_0()
+{
+   int out;
+   int doloopout;
+   listvar *parcours;
+
+   out=1;
+
+   if ( List_UsedInSubroutine_Var )
+   {
+      doloopout = 0;
+      parcours = List_UsedInSubroutine_Var;
+      while ( parcours && doloopout == 0 )
+      {
+         if ( !strcasecmp(parcours->var->v_subroutinename,subroutinename) )
+                                                                  doloopout = 1;
+         else parcours = parcours->suiv;
+      }
+      if (  doloopout == 0 ) out = 0;
+      else out = 1 ;
+   }
+   else out = 0;
+
+   return out;
+}
+
+
+/******************************************************************************/
+/*                        ImplicitNoneInSubroutine                            */
+/******************************************************************************/
+/* Firstpass 0                                                                */
+/******************************************************************************/
+/*                                                                            */
+/******************************************************************************/
+int ImplicitNoneInSubroutine()
+{
+  listname *parcours;
+  int out;
+
+  parcours= List_ImplicitNoneSubroutine;
+  out = 0 ;
+  while ( parcours && out == 0 )
+  {
+     if ( !strcasecmp(parcours->n_name,subroutinename) ) out = 1;
+     else parcours = parcours->suiv;
+  }
+  return out;
+}
+
+/******************************************************************************/
+/*                            Add_Pointer_Var_From_List_1                     */
+/******************************************************************************/
+/* Firstpass 1                                                                */
+/******************************************************************************/
+/*                                                                            */
+/******************************************************************************/
+void Add_Pointer_Var_From_List_1(listvar *listin)
+{
+   listvar *parcours;
+
+   if ( firstpass == 1 )
+   {
+       parcours = listin;
+       while ( parcours )
+       {
+          Add_Pointer_Var_1(parcours->var->v_nomvar);
+          parcours = parcours -> suiv ;
+       }
+   }
+}
+
+/******************************************************************************/
+/*                            Add_Pointer_Var_1                               */
+/******************************************************************************/
+/* Firstpass 1                                                                */
+/******************************************************************************/
+/*                                                                            */
+/******************************************************************************/
+void Add_Pointer_Var_1(char *nom)
+{
+   listname *newvar;
+   listname *parcours;
+   int out;
+
+   if ( firstpass == 1 )
+   {
+      if ( !List_Pointer_Var )
+      {
+         newvar = (listname *)malloc(sizeof(listname));
+         strcpy(newvar->n_name,nom);
+         Save_Length(nom,20);
+         newvar->suiv = NULL;
+         List_Pointer_Var = newvar;
+      }
+      else
+      {
+         parcours = List_Pointer_Var;
+         out = 0 ;
+         while ( parcours->suiv && out == 0 )
+         {
+            if (  !strcasecmp(parcours->n_name,nom) ) out = 1;
+            else
+               parcours=parcours->suiv;
+         }
+         if ( out == 0 )
+         {
+            if (  !strcasecmp(parcours->n_name,nom) ) out = 1;
+            else
+            {
+               /* add the record                                              */
+              newvar = (listname *)malloc(sizeof(listname));
+              strcpy(newvar->n_name,nom);
+              Save_Length(nom,20);
+              newvar->suiv = NULL;
+              parcours->suiv = newvar;
+            }
+         }
+      }
+   }
+}
+
+/******************************************************************************/
+/*                          varispointer_0                                    */
+/******************************************************************************/
+/* Firstpass 0                                                                */
+/******************************************************************************/
+/*                                                                            */
+/******************************************************************************/
+int varispointer_0(char *ident)
+{
+   listname *newname;
+   int out;
+
+   out =0;
+   if ( firstpass == 0 )
+   {
+      newname = List_Pointer_Var;
+      while( newname && out == 0 )
+      {
+         if ( !strcasecmp(ident,newname->n_name) ) out = 1 ;
+         else newname = newname->suiv;
+      }
+   }
+   return out;
+}
+
+/******************************************************************************/
+/*                          varistyped_0                                    */
+/******************************************************************************/
+/* Firstpass 0                                                                */
+/******************************************************************************/
+/*                                                                            */
+/******************************************************************************/
+int varistyped_0(char *ident)
+{
+   listvar *parcours;
+   int out;
+
+   out =0;
+   if ( firstpass == 0 )
+   {
+      parcours = List_Global_Var;
+      while( parcours && out == 0 )
+      {
+         if ( !strcasecmp(ident,parcours->var->v_nomvar) ) 
+             {
+             if (!strcasecmp(parcours->var->v_typevar,"type")) out = 1;
+             }
+         parcours = parcours->suiv;
+      }
+   }
+   return out;
+}
+
+
+/******************************************************************************/
+/*                          VariableIsNotFunction                             */
+/******************************************************************************/
+/*                                                                            */
+/******************************************************************************/
+int VariableIsNotFunction(char *ident)
+{
+   int out;
+   listvar *newvar;
+
+   out =0;
+
+   if ( !strcasecmp(ident,"size") ||
+        !strcasecmp(ident,"if")   ||
+        !strcasecmp(ident,"max")  ||
+        !strcasecmp(ident,"min")
+      )
+   {
+      newvar = List_SubroutineDeclaration_Var;
+      while ( newvar && out == 0 )
+      {
+         if ( !strcasecmp(subroutinename, newvar->var->v_subroutinename) &&
+              !strcasecmp(ident, newvar->var->v_nomvar) ) out = 1;
+         newvar = newvar -> suiv ;
+      }
+      if ( out == 1 ) out = 0;
+      else out = 1;
+      /* if it has not been found                                             */
+      if ( out == 1 )
+      {
+         out = 0;
+         newvar = List_Global_Var;
+         while ( newvar && out == 0 )
+         {
+            if ( !strcasecmp(ident, newvar->var->v_nomvar) ) out = 1;
+            newvar = newvar -> suiv ;
+         }
+         if ( out == 1 ) out = 0;
+         else out = 1;
+      }
+   }
+   /*                                                                         */
+   return out;
+}
Index: vendors/AGRIF/r_01/LIB/UtilListe.c
===================================================================
--- vendors/AGRIF/r_01/LIB/UtilListe.c	(revision 2672)
+++ vendors/AGRIF/r_01/LIB/UtilListe.c	(revision 2672)
@@ -0,0 +1,685 @@
+/******************************************************************************/
+/*                                                                            */
+/*     CONV (converter) for Agrif (Adaptive Grid Refinement In Fortran)       */
+/*                                                                            */
+/* Copyright or   or Copr. Laurent Debreu (Laurent.Debreu@imag.fr)            */
+/*                        Cyril Mazauric (Cyril_Mazauric@yahoo.fr)            */
+/* This software is governed by the CeCILL-C license under French law and     */
+/* abiding by the rules of distribution of free software.  You can  use,      */
+/* modify and/ or redistribute the software under the terms of the CeCILL-C   */
+/* license as circulated by CEA, CNRS and INRIA at the following URL          */
+/* "http://www.cecill.info".                                                  */
+/*                                                                            */
+/* As a counterpart to the access to the source code and  rights to copy,     */
+/* modify and redistribute granted by the license, users are provided only    */
+/* with a limited warranty  and the software's author,  the holder of the     */
+/* economic rights,  and the successive licensors  have only  limited         */
+/* liability.                                                                 */
+/*                                                                            */
+/* In this respect, the user's attention is drawn to the risks associated     */
+/* with loading,  using,  modifying and/or developing or reproducing the      */
+/* software by the user in light of its specific status of free software,     */
+/* that may mean  that it is complicated to manipulate,  and  that  also      */
+/* therefore means  that it is reserved for developers  and  experienced      */
+/* professionals having in-depth computer knowledge. Users are therefore      */
+/* encouraged to load and test the software's suitability as regards their    */
+/* requirements in conditions enabling the security of their systems and/or   */
+/* data to be ensured and,  more generally, to use and operate it in the      */
+/* same conditions as regards security.                                       */
+/*                                                                            */
+/* The fact that you are presently reading this means that you have had       */
+/* knowledge of the CeCILL-C license and that you accept its terms.           */
+/******************************************************************************/
+/* version 1.7                                                                */
+/******************************************************************************/
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "decl.h"
+
+
+void Init_Variable(variable *var)
+{
+   strcpy(var->v_typevar            ,"");
+   strcpy(var->v_nomvar             ,"");
+   strcpy(var->v_oldname            ,"");
+   strcpy(var->v_dimchar            ,"");
+   strcpy(var->v_modulename         ,"");
+   strcpy(var->v_commonname         ,"");
+   strcpy(var->v_vallengspec        ,"");
+   strcpy(var->v_nameinttypename    ,"");
+   strcpy(var->v_commoninfile       ,"");
+   strcpy(var->v_subroutinename     ,"");
+   strcpy(var->v_precision          ,"");
+   strcpy(var->v_initialvalue       ,"");
+   strcpy(var->v_IntentSpec         ,"");
+   strcpy(var->v_readedlistdimension,"");
+   var->v_nbdim               = 0 ;
+   var->v_common              = 0 ;
+   var->v_positioninblock     = 0 ;
+   var->v_module              = 0 ;
+   var->v_save                = 0 ;
+   var->v_VariableIsParameter = 0 ;
+   var->v_PublicDeclare       = 0 ;
+   var->v_PrivateDeclare      = 0 ;
+   var->v_ExternalDeclare     = 0 ;
+   var->v_pointedvar          = 0 ;
+   var->v_notgrid             = 0 ;
+   var->v_dimensiongiven      = 0 ;
+   var->v_c_star              = 0 ;
+   var->v_indicetabvars       = 0 ;
+   var->v_pointerdeclare      = 0 ;
+   var->v_optionaldeclare     = 0 ;
+   var->v_allocatable         = 0 ;
+   var->v_target              = 0 ;
+   var->v_dimsempty           = 0 ;
+   var->v_dimension = (listdim *)NULL;
+}
+/******************************************************************************/
+/*                            AddListvartolistvar                             */
+/******************************************************************************/
+/* This subroutine is used to add a listvar l at the end of a listvar         */
+/* glob.                                                                      */
+/*                                                                            */
+/******************************************************************************/
+/*        _______     _______     _______     _______     _______             */
+/*       +      +    +      +    +      +    +      +    +      +             */
+/*       + glob +--->+ glob +--->+ glob +--->+ glob +--->+  l   +             */
+/*       +______+    +______+    +______+    +______+    +______+             */
+/*                                                                            */
+/******************************************************************************/
+listvar * AddListvarToListvar(listvar *l,listvar *glob,int ValueFirstpass)
+{
+   listvar *newvar;
+   if ( firstpass == ValueFirstpass )
+   {
+      if ( !glob) glob = l ;
+      else
+      {
+         newvar=glob;
+         while (newvar->suiv) newvar = newvar->suiv;
+         newvar->suiv = l;
+      }
+   }
+   return glob;
+}
+
+/******************************************************************************/
+/*                       CreateAndFillin_Curvar                               */
+/******************************************************************************/
+/* This subroutine is used to create the record corresponding to the          */
+/* list of declaration                                                        */
+/******************************************************************************/
+/*                                                                            */
+/******************************************************************************/
+void CreateAndFillin_Curvar(char *type,variable *curvar)
+{
+   if (!strcasecmp(type,"character") && strcasecmp(CharacterSize,"") )
+   {
+      strcpy(curvar->v_dimchar,CharacterSize);
+      Save_Length(CharacterSize,5);
+   }
+
+  /* On donne la precision de la variable si elle a ete donnee                */
+  curvar->v_c_star = 0;
+  if ( c_star == 1 ) curvar->v_c_star = 1;
+  /*                                                                          */
+  strcpy(curvar->v_vallengspec,"");
+  if ( strcasecmp(vallengspec,"") )
+  {
+     strcpy(curvar->v_vallengspec,vallengspec);
+     Save_Length(vallengspec,8);
+  }
+
+  strcpy(curvar->v_precision,"");
+  if ( strcasecmp(NamePrecision,"") )
+  {
+     strcpy(curvar->v_precision,NamePrecision);
+     Save_Length(NamePrecision,12);
+  }
+  /* Si cette variable a ete declaree dans un module on met curvar->module=1  */
+  if ( inmoduledeclare == 1 || SaveDeclare == 1)
+  {
+      curvar->v_module = 1;
+   }
+   /* Puis on donne le nom du module dans curvar->v_modulename                */
+   strcpy(curvar->v_modulename,curmodulename);
+   Save_Length(curmodulename,6);
+   /* Si cette variable a ete initialisee                                     */
+   if (InitialValueGiven == 1 )
+   {
+      strcpy(curvar->v_initialvalue,InitValue);
+      Save_Length(InitValue,14);
+   }
+   /* Si cette variable est declaree en save                                  */
+   if (SaveDeclare == 1 ) {
+   curvar->v_save = 1;
+   }
+
+   /* Si cette variable est v_allocatable                                     */
+   if (Allocatabledeclare == 1 ) curvar->v_allocatable=1;
+   
+   /* Si cette variable est v_targer                                     */
+   if (Targetdeclare == 1 ) curvar->v_target=1;
+   /* if INTENT spec has been given                                           */
+   if ( strcasecmp(IntentSpec,"") )
+   {
+      strcpy(curvar->v_IntentSpec,IntentSpec);
+      Save_Length(IntentSpec,13);
+   }
+}
+
+
+/******************************************************************************/
+/*                        duplicatelistvar                                    */
+/******************************************************************************/
+/*                                                                            */
+/******************************************************************************/
+void duplicatelistvar(listvar *orig)
+{
+   listvar *parcours;
+   listvar *tmplistvar;
+   listvar *tmplistvarprec;
+   listdim *tmplistdim;
+   variable *tmpvar;
+
+   tmplistvarprec = (listvar *)NULL;
+   parcours = orig;
+   while ( parcours )
+   {
+      tmplistvar = (listvar *)malloc(sizeof(listvar));
+      tmpvar = (variable *)malloc(sizeof(variable));
+      /*                                                                      */
+      Init_Variable(tmpvar);
+      /*                                                                      */
+      strcpy(tmpvar->v_typevar,parcours->var->v_typevar);
+      strcpy(tmpvar->v_nomvar,parcours->var->v_nomvar);
+      strcpy(tmpvar->v_oldname,parcours->var->v_oldname);
+      strcpy(tmpvar->v_dimchar,parcours->var->v_dimchar);
+      if ( parcours->var->v_dimension )
+      {
+         tmplistdim = (listdim *)malloc(sizeof(listdim));
+         tmplistdim = parcours->var->v_dimension;
+         tmpvar->v_dimension = tmplistdim;
+      }
+      tmpvar->v_nbdim=parcours->var->v_nbdim;
+      tmpvar->v_common=parcours->var->v_common;
+      tmpvar->v_positioninblock=parcours->var->v_positioninblock;
+      tmpvar->v_module=parcours->var->v_module;
+      tmpvar->v_save=parcours->var->v_save;
+      tmpvar->v_VariableIsParameter=parcours->var->v_VariableIsParameter;
+      printf("QLKDF\n");
+      tmpvar->v_indicetabvars=parcours->var->v_indicetabvars;
+      strcpy(tmpvar->v_modulename,parcours->var->v_modulename);
+      strcpy(tmpvar->v_commonname,parcours->var->v_commonname);
+      strcpy(tmpvar->v_vallengspec,parcours->var->v_vallengspec);
+
+      strcpy(tmpvar->v_nameinttypename,parcours->var->v_nameinttypename);
+            
+      tmpvar->v_pointedvar=parcours->var->v_pointedvar;
+      strcpy(tmpvar->v_commoninfile,mainfile);
+      Save_Length(mainfile,10);
+      strcpy(tmpvar->v_subroutinename,parcours->var->v_subroutinename);
+      tmpvar->v_dimensiongiven=parcours->var->v_dimensiongiven;
+      tmpvar->v_c_star=parcours->var->v_c_star;
+      strcpy(tmpvar->v_precision,parcours->var->v_precision);
+      strcpy(tmpvar->v_initialvalue,parcours->var->v_initialvalue);
+      tmpvar->v_pointerdeclare=parcours->var->v_pointerdeclare;
+      tmpvar->v_optionaldeclare=parcours->var->v_optionaldeclare;
+      tmpvar->v_allocatable=parcours->var->v_allocatable;
+      tmpvar->v_target=parcours->var->v_target;
+      strcpy(tmpvar->v_IntentSpec,parcours->var->v_IntentSpec);
+      tmpvar->v_dimsempty=parcours->var->v_dimsempty;
+      strcpy(tmpvar->v_readedlistdimension,
+                                          parcours->var->v_readedlistdimension);
+      /*                                                                      */
+      tmplistvar->var = tmpvar;
+      tmplistvar->suiv = NULL;
+      /*                                                                      */
+      if ( !listduplicated )
+      {
+         listduplicated = tmplistvar;
+         tmplistvarprec = listduplicated;
+      }
+      else
+      {
+         tmplistvarprec->suiv = tmplistvar;
+         tmplistvarprec = tmplistvar;
+      }
+      /*                                                                      */
+      parcours = parcours->suiv;
+   }
+}
+
+/******************************************************************************/
+/*                           insertdim                                        */
+/******************************************************************************/
+/* This subroutine is used to insert a record in a list of                    */
+/* struct : listdim                                                           */
+/******************************************************************************/
+/*        _______     _______     _______     _______     _______             */
+/*       +      +    +      +    +      +    +      +    +      +             */
+/*       + NEW  +--->+ lin  +--->+ lin  +--->+ lin  +--->+  lin +             */
+/*       +______+    +______+    +______+    +______+    +______+             */
+/*                                                                            */
+/******************************************************************************/
+listdim * insertdim(listdim *lin,typedim nom)
+{
+   listdim *newdim ;
+   listdim *parcours ;
+
+   newdim=(listdim *) malloc (sizeof (listdim));
+   newdim->dim=nom;
+   newdim->suiv=NULL;
+
+   if ( ! lin )
+   {
+      lin = newdim;
+   }
+   else
+   {
+      parcours = lin;
+      while ( parcours->suiv ) parcours=parcours->suiv;
+      parcours->suiv = newdim;
+   }
+
+   return lin;
+}
+
+/******************************************************************************/
+/*                            change_dim_char                                 */
+/******************************************************************************/
+/* This subroutine is used to change the dimension in the list lin            */
+/******************************************************************************/
+/*        _______     _______                 _______     _______             */
+/*       +  l   +    +  l   +                +  l   +    +   l  +             */
+/*       + old  +--->+ old  +--------------->+ lin  +--->+  lin +             */
+/*       +______+    +______+                +______+    +______+             */
+/*                                                                            */
+/******************************************************************************/
+void change_dim_char(listdim *lin,listvar * l)
+{
+   listvar *parcours_var;
+   variable *v;
+
+   parcours_var=l;
+   while(parcours_var)
+   {
+      v=parcours_var->var;
+      strcpy(v->v_dimchar,(lin->dim).last);
+      Save_Length((lin->dim).last,5);
+      parcours_var=parcours_var->suiv;
+   }
+}
+
+
+/******************************************************************************/
+/*                                num_dims                                    */
+/******************************************************************************/
+/* This subroutine is used to know the dimension of a table                   */
+/******************************************************************************/
+/*                                                                            */
+/*             Dimension(jpi,jpj,jpk) ----------> num_dims = 3                */
+/*                                                                            */
+/******************************************************************************/
+int num_dims(listdim *d)
+{
+   listdim *parcours;
+   int compteur = 0;
+
+   parcours = d;
+   while(parcours)
+   {
+     compteur++;
+     parcours=parcours->suiv;
+   }
+   return compteur;
+}
+
+
+/******************************************************************************/
+/*                          CREATEVAR                                         */
+/******************************************************************************/
+/* This subroutine is used to create and initialized a record of the          */
+/*      struct : variable                                                     */
+/******************************************************************************/
+variable * createvar(char *nom,listdim *d)
+{
+  variable *var;
+  listdim *dims;
+  char ligne[LONG_C];
+  char listdimension[LONG_C];
+
+   var=(variable *) malloc(sizeof(variable));
+   /*                                                                         */
+   Init_Variable(var);
+   /*                                                                         */
+   strcpy(var->v_nomvar,nom);
+   Save_Length(nom,4);
+   /*                                                                         */
+   strcpy(listdimension,"");
+   strcpy(var->v_modulename,curmodulename);
+   Save_Length(curmodulename,6);
+   strcpy(var->v_commoninfile,mainfile);
+   Save_Length(mainfile,10);
+   strcpy(var->v_subroutinename,subroutinename);
+   Save_Length(subroutinename,11);
+   /*                                                                         */
+   if ( strcasecmp(nameinttypename,"") )
+   {
+      strcpy(var->v_nameinttypename,nameinttypename);
+      Save_Length(nameinttypename,9);
+   }
+         
+   if ( optionaldeclare     == 1 ) var->v_optionaldeclare = 1;
+   if ( pointerdeclare      == 1 ) var->v_pointerdeclare = 1;
+   if ( VariableIsParameter == 1 ) var->v_VariableIsParameter = 1 ;
+   if ( PublicDeclare       == 1 ) var->v_PublicDeclare = 1 ;
+   if ( PrivateDeclare      == 1 ) var->v_PrivateDeclare = 1;
+   if ( ExternalDeclare     == 1 ) var->v_ExternalDeclare = 1;
+   /*                                                                         */
+   var->v_dimension=d;
+
+   /* Creation of the string for the dimension of this variable               */
+   dimsempty = 1;
+   if ( d )
+   {
+      var->v_dimensiongiven=1;
+      dims = d;
+      while (dims)
+      {
+         if ( strcasecmp(dims->dim.first,"") || strcasecmp(dims->dim.last,""))
+                                                                  dimsempty = 0;
+         sprintf(ligne,"%s:%s",dims->dim.first,dims->dim.last);
+         strcat(listdimension,ligne);
+         if ( dims->suiv )
+         {
+            strcat(listdimension,",");
+         }
+         dims = dims->suiv;
+      }
+      if ( dimsempty == 1 ) var->v_dimsempty=1;
+   }
+   strcpy(var->v_readedlistdimension,listdimension);
+   Save_Length(listdimension,15);
+   /*                                                                         */
+   var->v_nbdim=num_dims(d);
+   /*                                                                         */
+   return var;
+}
+
+/******************************************************************************/
+/*                            INSERTVAR                                       */
+/******************************************************************************/
+/* This subroutine is used to insert a record in a list of the                */
+/*      struct : listvar                                                      */
+/******************************************************************************/
+/*        _______     _______     _______     _______     _______             */
+/*       +      +    +      +    +      +    +      +    +      +             */
+/*       +  lin +--->+  lin +--->+ lin  +--->+ lin  +--->+ NEW  +             */
+/*       +______+    +______+    +______+    +______+    +______+             */
+/*                                                                            */
+/*                                                                            */
+/******************************************************************************/
+listvar * insertvar(listvar *lin,variable *v)
+{
+   listvar *newvar ;
+   listvar *tmpvar ;
+
+   newvar=(listvar *) malloc (sizeof (listvar));
+   newvar->var=v;
+   newvar->suiv = NULL;
+   if (!lin)
+   {
+      newvar->suiv=NULL;
+      lin = newvar;
+   }
+   else
+   {
+      tmpvar = lin ;
+      while (tmpvar->suiv)
+      {
+         tmpvar = tmpvar ->suiv ;
+      }
+      tmpvar -> suiv = newvar;
+   }
+   return lin;
+}
+
+/******************************************************************************/
+/*                             SETTYPE                                        */
+/******************************************************************************/
+/* This subroutine is used to give the same variable type at each             */
+/*      record of the list of the struct : listvar                            */
+/******************************************************************************/
+/*        _______     _______     _______     _______     _______             */
+/*       + REAL +    + REAL +    + REAL +    + REAL +    + REAL +             */
+/*       +  lin +--->+  lin +--->+ lin  +--->+ lin  +--->+ lin  +             */
+/*       +______+    +______+    +______+    +______+    +______+             */
+/*                                                                            */
+/*                                                                            */
+/******************************************************************************/
+listvar *settype(char *nom,listvar *lin)
+{
+   listvar *newvar;
+   variable *v;
+
+   newvar=lin;
+   while (newvar)
+   {
+      v=newvar->var;
+      strcpy(v->v_typevar,nom);
+      Save_Length(nom,3);
+      newvar=newvar->suiv;
+   }
+   newvar=lin;
+   return newvar ;
+}
+
+/******************************************************************/
+/* printliste  */
+/* print the list given in argulent */
+/******************************************************************/
+
+void printliste(listvar * lin)
+{
+   listvar *newvar;
+   variable *v;
+
+   newvar=lin;
+   while (newvar)
+   {
+      v=newvar->var;
+      printf("nom = %s, allocatable = %d dim = %s\n",v->v_nomvar,v->v_allocatable,(v->v_dimension)->dim.last);
+      newvar=newvar->suiv;
+   }
+}
+
+/******************************************************************************/
+/*   IsinListe : return 1 if name nom is in list lin                          */
+/*                                                                            */
+/******************************************************************************/
+ int IsinListe(listvar *lin,char *nom)
+{
+   listvar *newvar;
+   variable *v;
+   int out ;
+   
+   newvar=lin;
+   out = 0;
+   while (newvar && (out == 0))
+   {
+      v=newvar->var;
+      if (!strcasecmp(v->v_nomvar,nom) && !strcasecmp(v->v_subroutinename,subroutinename)) {
+      out = 1;
+      }
+      newvar=newvar->suiv;
+   }
+
+   return out ;
+}
+
+listname *Insertname(listname *lin,char *nom, int sens)
+{
+   listname *newvar ;
+   listname *tmpvar;
+
+   newvar=(listname *) malloc (sizeof (listname));
+   strcpy(newvar->n_name,nom);
+   newvar->suiv = NULL;
+   if (!lin)
+   {
+      newvar->suiv=NULL;
+      lin = newvar;
+   }
+   else
+   {
+      if (sens == 0)
+      {
+      tmpvar = lin ;
+      while (tmpvar->suiv)
+      {
+         tmpvar = tmpvar ->suiv ;
+      }
+      tmpvar -> suiv = newvar;
+      }
+      else
+      {
+      newvar->suiv = lin;
+      lin = newvar;
+      }
+   }
+   return lin;
+}
+
+listname *concat_listname(listname *l1, listname *l2)
+{
+   listname *tmpvar;
+
+   tmpvar = l1;
+   while (tmpvar->suiv)
+   {
+    tmpvar = tmpvar->suiv;
+   }
+   
+   tmpvar->suiv = l2;
+   
+   return l1;
+}
+
+void *createstringfromlistname(char *ligne, listname *lin)
+{
+listname *tmpvar;
+
+strcpy(ligne,"");
+tmpvar = lin;
+while(tmpvar)
+{
+  strcat(ligne,tmpvar->n_name);
+  if (tmpvar->suiv) strcat(ligne,",");
+  tmpvar=tmpvar->suiv;
+}
+}
+
+/******************************************************************/
+/* printname  */
+/* print the list given in argulent */
+/******************************************************************/
+
+void printname(listname * lin)
+{
+   listname *newvar;
+
+   newvar=lin;
+   while (newvar)
+   {
+      printf("nom = %s \n",newvar->n_name);
+      newvar=newvar->suiv;
+   }
+}
+
+void removeglobfromlist(listname **lin)
+{
+  listname *listemp;
+  listname *parcours1;
+  listvar *parcours2;
+  listname * parcourspres;
+  int out;
+  
+  parcours1 = *lin;
+  parcourspres = (listname *)NULL;
+  
+  while (parcours1)
+  {
+  parcours2 = List_Global_Var;
+  out = 0;
+  while (parcours2 && out == 0)
+  {
+    if (!strcasecmp(parcours2->var->v_nomvar,parcours1->n_name))
+    {
+    out = 1;
+    }
+    parcours2 = parcours2->suiv;
+  }
+  if (out == 1)
+  {
+  if (parcours1 == *lin)
+   {
+   *lin = (*lin)->suiv;
+   parcours1 = *lin;
+   }
+   else
+   {
+   parcourspres->suiv = parcours1->suiv;
+   parcours1 = parcourspres->suiv;
+   }
+   }
+   else
+   {
+   parcourspres = parcours1;
+    parcours1 = parcours1->suiv;  
+    }
+  }
+}
+
+void writelistpublic(listname *lin)
+{
+  listname *parcours1;
+  char ligne[LONG_40M];
+  char tempname[LONG_4M];
+  
+  if (lin)
+  {
+  sprintf(ligne,"public :: ");
+  parcours1 = lin;
+  
+  while (parcours1)
+  {
+    strcat(ligne,parcours1->n_name);
+    if (parcours1->suiv) strcat(ligne,", ");
+    parcours1 = parcours1->suiv;  
+  }
+  tofich(fortranout,ligne,1);
+  }
+
+}
+
+void Init_List_Data_Var()
+{
+listvar *parcours;
+
+parcours = List_Data_Var_Cur;
+
+if (List_Data_Var_Cur)
+{
+while (parcours)
+{
+ List_Data_Var_Cur = List_Data_Var_Cur->suiv;
+ free(parcours);
+ parcours = List_Data_Var_Cur;
+}
+}
+
+List_Data_Var_Cur = NULL;
+
+}
Index: vendors/AGRIF/r_01/LIB/UtilNotGridDep.c
===================================================================
--- vendors/AGRIF/r_01/LIB/UtilNotGridDep.c	(revision 2672)
+++ vendors/AGRIF/r_01/LIB/UtilNotGridDep.c	(revision 2672)
@@ -0,0 +1,110 @@
+/******************************************************************************/
+/*                                                                            */
+/*     CONV (converter) for Agrif (Adaptive Grid Refinement In Fortran)       */
+/*                                                                            */
+/* Copyright or   or Copr. Laurent Debreu (Laurent.Debreu@imag.fr)            */
+/*                        Cyril Mazauric (Cyril_Mazauric@yahoo.fr)            */
+/* This software is governed by the CeCILL-C license under French law and     */
+/* abiding by the rules of distribution of free software.  You can  use,      */
+/* modify and/ or redistribute the software under the terms of the CeCILL-C   */
+/* license as circulated by CEA, CNRS and INRIA at the following URL          */
+/* "http://www.cecill.info".                                                  */
+/*                                                                            */
+/* As a counterpart to the access to the source code and  rights to copy,     */
+/* modify and redistribute granted by the license, users are provided only    */
+/* with a limited warranty  and the software's author,  the holder of the     */
+/* economic rights,  and the successive licensors  have only  limited         */
+/* liability.                                                                 */
+/*                                                                            */
+/* In this respect, the user's attention is drawn to the risks associated     */
+/* with loading,  using,  modifying and/or developing or reproducing the      */
+/* software by the user in light of its specific status of free software,     */
+/* that may mean  that it is complicated to manipulate,  and  that  also      */
+/* therefore means  that it is reserved for developers  and  experienced      */
+/* professionals having in-depth computer knowledge. Users are therefore      */
+/* encouraged to load and test the software's suitability as regards their    */
+/* requirements in conditions enabling the security of their systems and/or   */
+/* data to be ensured and,  more generally, to use and operate it in the      */
+/* same conditions as regards security.                                       */
+/*                                                                            */
+/* The fact that you are presently reading this means that you have had       */
+/* knowledge of the CeCILL-C license and that you accept its terms.           */
+/******************************************************************************/
+/* version 1.7                                                                */
+/******************************************************************************/
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "decl.h"
+
+/******************************************************************************/
+/*                     Add_NotGridDepend_Var_1                                */
+/******************************************************************************/
+/* This subroutine is used to add a record into List_NotGridDepend_Var        */
+/*    This variable is add only if it is not present in the list              */
+/*    This variable is add at the end of the list                             */
+/******************************************************************************/
+/*        _______     _______     _______     _______     _______             */
+/*       + not  +    + not  +    +  not +    +  not +    +      +             */
+/*       + grid +--->+ grid +--->+ grid +--->+ grid +--->+ NEW  +             */
+/*       +______+    +______+    +______+    +______+    +______+             */
+/*                                                                            */
+/******************************************************************************/
+void Add_NotGridDepend_Var_1 (char *name)
+{
+   listvar *parcours;
+   listvar *newvar;
+   /*                                                                         */
+   /* look in the List_NotGridDepend_Var if this variable exist               */
+   parcours = List_NotGridDepend_Var;
+   while (parcours)
+   {
+     if (!strcasecmp(parcours->var->v_nomvar,name))
+     {
+        /* if this variable exist -> exit of the program                      */
+        printf(" The variable %s\n",name);
+        printf(" has been declared twice \n");
+        printf(" as a non grid dependent variable \n");
+        exit(1);
+     }
+     parcours= parcours->suiv;
+   }
+   /* if variable does not exist, we add it                                   */
+   newvar=(listvar *)malloc(sizeof(listvar));
+   newvar->var=(variable *)malloc(sizeof(variable));
+   strcpy(newvar->var->v_nomvar,name);
+   Save_Length(name,4);
+   strcpy(newvar->var->v_commoninfile,mainfile);
+   Save_Length(mainfile,10);
+   strcpy(newvar->var->v_subroutinename,subroutinename);
+   Save_Length(subroutinename,11);
+   newvar->var->v_notgrid = 1 ;
+   newvar->suiv = List_NotGridDepend_Var;
+   List_NotGridDepend_Var = newvar;
+}
+
+/******************************************************************************/
+/*                      VarIsNonGridDepend                                    */
+/******************************************************************************/
+/* This subroutine is used to know if a variable has been declared as non     */
+/* grid dependent                                                             */
+/******************************************************************************/
+/*                                                                            */
+/*  notgriddepend variable;    ----------->  VarIsNonGridDepend = 1           */
+/*                                                                            */
+/*                                                                            */
+/******************************************************************************/
+int VarIsNonGridDepend(char *name)
+{
+   listvar *newvar;
+   int out;
+
+   newvar = List_NotGridDepend_Var;
+   out=0;
+   while (newvar && out == 0 )
+   {
+      if ( !strcasecmp(newvar->var->v_nomvar,name) ) out = 1;
+      else newvar = newvar->suiv;
+   }
+   return out;
+}
Index: vendors/AGRIF/r_01/LIB/WorkWithAllocatelist.c
===================================================================
--- vendors/AGRIF/r_01/LIB/WorkWithAllocatelist.c	(revision 2672)
+++ vendors/AGRIF/r_01/LIB/WorkWithAllocatelist.c	(revision 2672)
@@ -0,0 +1,152 @@
+/******************************************************************************/
+/*                                                                            */
+/*     CONV (converter) for Agrif (Adaptive Grid Refinement In Fortran)       */
+/*                                                                            */
+/* Copyright or   or Copr. Laurent Debreu (Laurent.Debreu@imag.fr)            */
+/*                        Cyril Mazauric (Cyril_Mazauric@yahoo.fr)            */
+/* This software is governed by the CeCILL-C license under French law and     */
+/* abiding by the rules of distribution of free software.  You can  use,      */
+/* modify and/ or redistribute the software under the terms of the CeCILL-C   */
+/* license as circulated by CEA, CNRS and INRIA at the following URL          */
+/* "http://www.cecill.info".                                                  */
+/*                                                                            */
+/* As a counterpart to the access to the source code and  rights to copy,     */
+/* modify and redistribute granted by the license, users are provided only    */
+/* with a limited warranty  and the software's author,  the holder of the     */
+/* economic rights,  and the successive licensors  have only  limited         */
+/* liability.                                                                 */
+/*                                                                            */
+/* In this respect, the user's attention is drawn to the risks associated     */
+/* with loading,  using,  modifying and/or developing or reproducing the      */
+/* software by the user in light of its specific status of free software,     */
+/* that may mean  that it is complicated to manipulate,  and  that  also      */
+/* therefore means  that it is reserved for developers  and  experienced      */
+/* professionals having in-depth computer knowledge. Users are therefore      */
+/* encouraged to load and test the software's suitability as regards their    */
+/* requirements in conditions enabling the security of their systems and/or   */
+/* data to be ensured and,  more generally, to use and operate it in the      */
+/* same conditions as regards security.                                       */
+/*                                                                            */
+/* The fact that you are presently reading this means that you have had       */
+/* knowledge of the CeCILL-C license and that you accept its terms.           */
+/******************************************************************************/
+/* version 1.7                                                                */
+/******************************************************************************/
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "decl.h"
+
+/******************************************************************************/
+/*                               Add_Allocate_Var_1                           */
+/******************************************************************************/
+/* Firstpass 1                                                                */
+/******************************************************************************/
+/*                                                                            */
+/******************************************************************************/
+void Add_Allocate_Var_1(char *nom,char *nommodule)
+{
+   listallocate *newvar;
+   listallocate *parcours;
+   int out;
+
+   if ( firstpass == 1 )
+   {
+      if ( !List_Allocate_Var )
+      {
+         newvar = (listallocate *)malloc(sizeof(listallocate));
+         strcpy(newvar->a_nomvar,nom);
+         Save_Length(nom,25);
+         strcpy(newvar->a_subroutine,subroutinename);
+         Save_Length(subroutinename,26);
+         strcpy(newvar->a_module,nommodule);
+         Save_Length(nommodule,27);
+         newvar->suiv = NULL;
+         List_Allocate_Var = newvar;
+      }
+      else
+      {
+         parcours = List_Allocate_Var;
+         out = 0 ;
+         while ( parcours->suiv && out == 0 )
+         {
+            if (  !strcasecmp(parcours->a_nomvar,nom) &&
+                  !strcasecmp(parcours->a_subroutine,subroutinename) &&
+                  !strcasecmp(parcours->a_module,nommodule) ) out = 1;
+            else
+               parcours=parcours->suiv;
+         }
+         if ( out == 0 )
+         {
+            if (  !strcasecmp(parcours->a_nomvar,nom) &&
+                  !strcasecmp(parcours->a_subroutine,subroutinename) &&
+                  !strcasecmp(parcours->a_module,nommodule) ) out = 1;
+            else
+            {
+               /* add the record                                              */
+              newvar = (listallocate *)malloc(sizeof(listallocate));
+              strcpy(newvar->a_nomvar,nom);
+              Save_Length(nom,25);
+              strcpy(newvar->a_subroutine,subroutinename);
+              Save_Length(subroutinename,26);
+              strcpy(newvar->a_module,nommodule);
+              Save_Length(nommodule,27);
+              newvar->suiv = NULL;
+              parcours->suiv = newvar;
+            }
+         }
+      }
+   }
+}
+
+
+/******************************************************************************/
+/*                            IsVarAllocatable_0                              */
+/******************************************************************************/
+/* Firstpass 0                                                                */
+/******************************************************************************/
+/*                                                                            */
+/******************************************************************************/
+int IsVarAllocatable_0(char *ident)
+{
+   listallocate *parcours;
+   int out;
+
+   out = 0 ;
+   if ( firstpass == 0 )
+   {
+      parcours = List_Allocate_Var;
+      while ( parcours && out == 0 )
+      {
+         if ( !strcasecmp(parcours->a_nomvar,ident)  ) out = 1 ;
+         else parcours=parcours->suiv;
+      }
+   }
+   return out;
+}
+
+
+/******************************************************************************/
+/*                          varisallocatable_0                                */
+/******************************************************************************/
+/* Firstpass 0                                                                */
+/******************************************************************************/
+/*                                                                            */
+/******************************************************************************/
+int varisallocatable_0(char *ident)
+{
+   listallocate *newvaralloc;
+   int out;
+
+   out =0;
+   if (firstpass == 0 )
+   {
+         newvaralloc = List_Allocate_Var;
+         while ( newvaralloc && out == 0 )
+         {
+            if ( !strcasecmp(ident,newvaralloc->a_nomvar) )  out = 1;
+            else newvaralloc = newvaralloc->suiv;
+         }
+   }
+   return out;
+}
Index: vendors/AGRIF/r_01/LIB/WorkWithParameterlist.c
===================================================================
--- vendors/AGRIF/r_01/LIB/WorkWithParameterlist.c	(revision 2672)
+++ vendors/AGRIF/r_01/LIB/WorkWithParameterlist.c	(revision 2672)
@@ -0,0 +1,107 @@
+/******************************************************************************/
+/*                                                                            */
+/*     CONV (converter) for Agrif (Adaptive Grid Refinement In Fortran)       */
+/*                                                                            */
+/* Copyright or   or Copr. Laurent Debreu (Laurent.Debreu@imag.fr)            */
+/*                        Cyril Mazauric (Cyril_Mazauric@yahoo.fr)            */
+/* This software is governed by the CeCILL-C license under French law and     */
+/* abiding by the rules of distribution of free software.  You can  use,      */
+/* modify and/ or redistribute the software under the terms of the CeCILL-C   */
+/* license as circulated by CEA, CNRS and INRIA at the following URL          */
+/* "http://www.cecill.info".                                                  */
+/*                                                                            */
+/* As a counterpart to the access to the source code and  rights to copy,     */
+/* modify and redistribute granted by the license, users are provided only    */
+/* with a limited warranty  and the software's author,  the holder of the     */
+/* economic rights,  and the successive licensors  have only  limited         */
+/* liability.                                                                 */
+/*                                                                            */
+/* In this respect, the user's attention is drawn to the risks associated     */
+/* with loading,  using,  modifying and/or developing or reproducing the      */
+/* software by the user in light of its specific status of free software,     */
+/* that may mean  that it is complicated to manipulate,  and  that  also      */
+/* therefore means  that it is reserved for developers  and  experienced      */
+/* professionals having in-depth computer knowledge. Users are therefore      */
+/* encouraged to load and test the software's suitability as regards their    */
+/* requirements in conditions enabling the security of their systems and/or   */
+/* data to be ensured and,  more generally, to use and operate it in the      */
+/* same conditions as regards security.                                       */
+/*                                                                            */
+/* The fact that you are presently reading this means that you have had       */
+/* knowledge of the CeCILL-C license and that you accept its terms.           */
+/******************************************************************************/
+/* version 1.7                                                                */
+/******************************************************************************/
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "decl.h"
+
+/******************************************************************************/
+/*                       Add_GlobalParameter_Var_1                            */
+/******************************************************************************/
+/*  This subroutines is used to add the variable defined in common in the     */
+/******************************************************************************/
+/*                                                                            */
+/******************************************************************************/
+void Add_GlobalParameter_Var_1(listvar *listin)
+{
+   if ( firstpass == 1 )
+   {
+      if ( VariableIsParameter == 1 ) {
+      List_GlobalParameter_Var =  AddListvarToListvar(listin,List_GlobalParameter_Var,1);
+      }
+   }
+}
+
+/******************************************************************************/
+/*                       Add_Parameter_Var_1                                  */
+/******************************************************************************/
+/*  This subroutines is used to add the variable defined in common in the     */
+/******************************************************************************/
+/*                                                                            */
+/******************************************************************************/
+void Add_Parameter_Var_1(listvar *listin)
+{
+   listvar *parcours;
+
+   if ( firstpass == 1 && VariableIsParameter == 1 )
+   {
+      if ( !List_Parameter_Var )
+      {
+         List_Parameter_Var = listin;
+      }
+      else
+      {
+         parcours = List_Parameter_Var;
+         while (parcours->suiv) parcours=parcours->suiv;
+         parcours->suiv = listin;
+      }
+   }
+}
+
+/******************************************************************************/
+/*                       Add_Dimension_Var_1                                  */
+/******************************************************************************/
+/*  This subroutines is used to add the variable defined in common in the     */
+/******************************************************************************/
+/*                                                                            */
+/******************************************************************************/
+void Add_Dimension_Var_1(listvar *listin)
+{
+   listvar *parcours;
+
+   if ( firstpass == 1 )
+   {
+      if ( !List_Dimension_Var )
+      {
+         List_Dimension_Var = listin;
+      }
+      else
+      {
+         parcours = List_Dimension_Var;
+         while (parcours->suiv) parcours=parcours->suiv;
+         parcours->suiv = listin;
+      }
+   }
+}
Index: vendors/AGRIF/r_01/LIB/WorkWithglobliste.c
===================================================================
--- vendors/AGRIF/r_01/LIB/WorkWithglobliste.c	(revision 2672)
+++ vendors/AGRIF/r_01/LIB/WorkWithglobliste.c	(revision 2672)
@@ -0,0 +1,111 @@
+/******************************************************************************/
+/*                                                                            */
+/*     CONV (converter) for Agrif (Adaptive Grid Refinement In Fortran)       */
+/*                                                                            */
+/* Copyright or   or Copr. Laurent Debreu (Laurent.Debreu@imag.fr)            */
+/*                        Cyril Mazauric (Cyril_Mazauric@yahoo.fr)            */
+/* This software is governed by the CeCILL-C license under French law and     */
+/* abiding by the rules of distribution of free software.  You can  use,      */
+/* modify and/ or redistribute the software under the terms of the CeCILL-C   */
+/* license as circulated by CEA, CNRS and INRIA at the following URL          */
+/* "http://www.cecill.info".                                                  */
+/*                                                                            */
+/* As a counterpart to the access to the source code and  rights to copy,     */
+/* modify and redistribute granted by the license, users are provided only    */
+/* with a limited warranty  and the software's author,  the holder of the     */
+/* economic rights,  and the successive licensors  have only  limited         */
+/* liability.                                                                 */
+/*                                                                            */
+/* In this respect, the user's attention is drawn to the risks associated     */
+/* with loading,  using,  modifying and/or developing or reproducing the      */
+/* software by the user in light of its specific status of free software,     */
+/* that may mean  that it is complicated to manipulate,  and  that  also      */
+/* therefore means  that it is reserved for developers  and  experienced      */
+/* professionals having in-depth computer knowledge. Users are therefore      */
+/* encouraged to load and test the software's suitability as regards their    */
+/* requirements in conditions enabling the security of their systems and/or   */
+/* data to be ensured and,  more generally, to use and operate it in the      */
+/* same conditions as regards security.                                       */
+/*                                                                            */
+/* The fact that you are presently reading this means that you have had       */
+/* knowledge of the CeCILL-C license and that you accept its terms.           */
+/******************************************************************************/
+/* version 1.7                                                                */
+/******************************************************************************/
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "decl.h"
+
+/******************************************************************************/
+/*                          Add_Globliste_1                                   */
+/******************************************************************************/
+/* Firstpass 1                                                                */
+/* We should add this declaration to the List_Global_Var                      */
+/******************************************************************************/
+void Add_Globliste_1(listvar *listtoadd)
+{
+   if ( firstpass == 1 )
+   {
+      if ( aftercontainsdeclare == 0 &&
+           VariableIsParameter  == 0 )
+      {
+         List_Global_Var = AddListvarToListvar(listtoadd,List_Global_Var,1);
+      }
+   }
+}
+
+/******************************************************************************/
+/*                  Add_SubroutineDeclarationSave_Var_1                       */
+/******************************************************************************/
+/* Firstpass 1                                                                */
+/* We should add this declaration to the List_Global_Var. case SAVE           */
+/******************************************************************************/
+void Add_SubroutineDeclarationSave_Var_1(listvar *listtoadd)
+{
+   if ( firstpass == 1 )
+   {
+      if ( VariableIsParameter == 0 &&
+           SaveDeclare         == 1 )
+      {
+         List_Global_Var = AddListvarToListvar(listtoadd,List_Global_Var,1);
+      }
+   }
+}
+
+void checkandchangedims(listvar *listsecondpass)
+{
+listvar *parcours;
+listvar *parcours1;
+variable * newvar;
+variable * oldvar;
+
+int out ;
+
+printliste(List_Global_Var);
+printliste(List_SubroutineDeclaration_Var);
+
+parcours = listsecondpass;
+while (parcours)
+{
+newvar = parcours->var;
+parcours1 = List_SubroutineDeclaration_Var;
+out = 0;
+while (parcours1 && out == 0)
+{
+  oldvar = parcours1->var;
+  if (!strcasecmp(newvar->v_nomvar,oldvar->v_nomvar) && !strcasecmp(newvar->v_subroutinename,subroutinename))
+   {
+   if (newvar->v_dimensiongiven == 1)
+   {
+    strcpy(oldvar->v_dimension->dim.last,newvar->v_dimension->dim.last);
+    strcpy(oldvar->v_dimension->dim.first,newvar->v_dimension->dim.first);    
+   }
+   out = 1;
+   }
+  parcours1 = parcours1->suiv;
+}
+parcours = parcours->suiv;
+}
+printliste(List_SubroutineDeclaration_Var);
+}
Index: vendors/AGRIF/r_01/LIB/WorkWithlistdatavariable.c
===================================================================
--- vendors/AGRIF/r_01/LIB/WorkWithlistdatavariable.c	(revision 2672)
+++ vendors/AGRIF/r_01/LIB/WorkWithlistdatavariable.c	(revision 2672)
@@ -0,0 +1,143 @@
+/******************************************************************************/
+/*                                                                            */
+/*     CONV (converter) for Agrif (Adaptive Grid Refinement In Fortran)       */
+/*                                                                            */
+/* Copyright or   or Copr. Laurent Debreu (Laurent.Debreu@imag.fr)            */
+/*                        Cyril Mazauric (Cyril_Mazauric@yahoo.fr)            */
+/* This software is governed by the CeCILL-C license under French law and     */
+/* abiding by the rules of distribution of free software.  You can  use,      */
+/* modify and/ or redistribute the software under the terms of the CeCILL-C   */
+/* license as circulated by CEA, CNRS and INRIA at the following URL          */
+/* "http://www.cecill.info".                                                  */
+/*                                                                            */
+/* As a counterpart to the access to the source code and  rights to copy,     */
+/* modify and redistribute granted by the license, users are provided only    */
+/* with a limited warranty  and the software's author,  the holder of the     */
+/* economic rights,  and the successive licensors  have only  limited         */
+/* liability.                                                                 */
+/*                                                                            */
+/* In this respect, the user's attention is drawn to the risks associated     */
+/* with loading,  using,  modifying and/or developing or reproducing the      */
+/* software by the user in light of its specific status of free software,     */
+/* that may mean  that it is complicated to manipulate,  and  that  also      */
+/* therefore means  that it is reserved for developers  and  experienced      */
+/* professionals having in-depth computer knowledge. Users are therefore      */
+/* encouraged to load and test the software's suitability as regards their    */
+/* requirements in conditions enabling the security of their systems and/or   */
+/* data to be ensured and,  more generally, to use and operate it in the      */
+/* same conditions as regards security.                                       */
+/*                                                                            */
+/* The fact that you are presently reading this means that you have had       */
+/* knowledge of the CeCILL-C license and that you accept its terms.           */
+/******************************************************************************/
+/* version 1.7                                                                */
+/******************************************************************************/
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "decl.h"
+/******************************************************************************/
+/*                          Add_Data_Var_1                                    */
+/******************************************************************************/
+/* This subroutine is used to add a record to List_Data_Var                   */
+/******************************************************************************/
+/*        _______     _______     _______     _______     _______             */
+/*       +      +    +      +    +      +    +      +    +      +             */
+/*       + NEW  +--->+ data +--->+ data +--->+ data +--->+  data+             */
+/*       +______+    +______+    +______+    +______+    +______+             */
+/*                                                                            */
+/******************************************************************************/
+void Add_Data_Var_1 (listvar **curlist,char *name,char *values)
+{
+  listvar *newvar;
+  char ligne[LONG_C];
+
+//  if ( firstpass == 1 )
+//  {
+     newvar=(listvar *)malloc(sizeof(listvar));
+     newvar->var=(variable *)malloc(sizeof(variable));
+     /*                                                                       */
+     Init_Variable(newvar->var);
+     /*                                                                       */
+     if ( inmoduledeclare == 1 ) newvar->var->v_module=1;
+     strcpy(newvar->var->v_nomvar,name);
+     Save_Length(name,4);
+     strcpy(newvar->var->v_subroutinename,subroutinename);
+     Save_Length(subroutinename,11);
+     strcpy(newvar->var->v_modulename,curmodulename);
+     Save_Length(curmodulename,6);
+     strcpy(newvar->var->v_commoninfile,mainfile);
+     Save_Length(mainfile,10);
+     if (strchr(values,',') && strncasecmp(values,"'",1))
+            {
+            sprintf(ligne,"(/%s/)",values);
+            }
+     else
+       strcpy(ligne,values);
+       
+     strcpy(newvar->var->v_initialvalue,ligne);
+     Save_Length(ligne,14);
+     newvar->suiv = NULL;
+     if ( ! (*curlist) )
+     {
+        *curlist  = newvar ;
+     }
+     else
+     {
+        newvar->suiv = *curlist;
+        *curlist = newvar;
+     }
+//  }
+}
+
+void Add_Data_Var_Names_01 (listvar **curlist,listname *l1,listname *l2)
+{
+  listvar *newvar;
+  listvar *tmpvar;
+  listname *tmpvar1;
+  listname *tmpvar2;  
+  char ligne[LONG_C];
+  
+  tmpvar1 = l1;
+  tmpvar2 = l2;
+  
+  while (tmpvar1)
+  {
+     newvar=(listvar *)malloc(sizeof(listvar));
+     newvar->var=(variable *)malloc(sizeof(variable));
+     /*                                                                       */
+     Init_Variable(newvar->var);
+     /*                                                                       */
+     if ( inmoduledeclare == 1 ) newvar->var->v_module=1;
+     strcpy(newvar->var->v_nomvar,tmpvar1->n_name);
+     Save_Length(tmpvar1->n_name,4);
+     strcpy(newvar->var->v_subroutinename,subroutinename);
+     Save_Length(subroutinename,11);
+     strcpy(newvar->var->v_modulename,curmodulename);
+     Save_Length(curmodulename,6);
+     strcpy(newvar->var->v_commoninfile,mainfile);
+     Save_Length(mainfile,10);
+       
+     strcpy(newvar->var->v_initialvalue,tmpvar2->n_name);
+     Save_Length(tmpvar2->n_name,14);
+     newvar->suiv = NULL;
+     
+     if ( ! (*curlist) )
+     {
+        *curlist  = newvar ;
+     }
+     else
+     {
+        tmpvar = *curlist;
+        while (tmpvar->suiv)
+          tmpvar=tmpvar->suiv;
+        tmpvar->suiv = newvar;
+     }
+     
+  tmpvar1 = tmpvar1->suiv;
+  tmpvar2 = tmpvar2->suiv;  
+  }
+  return;
+
+
+}
Index: vendors/AGRIF/r_01/LIB/WorkWithlistmoduleinfile.c
===================================================================
--- vendors/AGRIF/r_01/LIB/WorkWithlistmoduleinfile.c	(revision 2672)
+++ vendors/AGRIF/r_01/LIB/WorkWithlistmoduleinfile.c	(revision 2672)
@@ -0,0 +1,530 @@
+/******************************************************************************/
+/*                                                                            */
+/*     CONV (converter) for Agrif (Adaptive Grid Refinement In Fortran)       */
+/*                                                                            */
+/* Copyright or   or Copr. Laurent Debreu (Laurent.Debreu@imag.fr)            */
+/*                        Cyril Mazauric (Cyril_Mazauric@yahoo.fr)            */
+/* This software is governed by the CeCILL-C license under French law and     */
+/* abiding by the rules of distribution of free software.  You can  use,      */
+/* modify and/ or redistribute the software under the terms of the CeCILL-C   */
+/* license as circulated by CEA, CNRS and INRIA at the following URL          */
+/* "http://www.cecill.info".                                                  */
+/*                                                                            */
+/* As a counterpart to the access to the source code and  rights to copy,     */
+/* modify and redistribute granted by the license, users are provided only    */
+/* with a limited warranty  and the software's author,  the holder of the     */
+/* economic rights,  and the successive licensors  have only  limited         */
+/* liability.                                                                 */
+/*                                                                            */
+/* In this respect, the user's attention is drawn to the risks associated     */
+/* with loading,  using,  modifying and/or developing or reproducing the      */
+/* software by the user in light of its specific status of free software,     */
+/* that may mean  that it is complicated to manipulate,  and  that  also      */
+/* therefore means  that it is reserved for developers  and  experienced      */
+/* professionals having in-depth computer knowledge. Users are therefore      */
+/* encouraged to load and test the software's suitability as regards their    */
+/* requirements in conditions enabling the security of their systems and/or   */
+/* data to be ensured and,  more generally, to use and operate it in the      */
+/* same conditions as regards security.                                       */
+/*                                                                            */
+/* The fact that you are presently reading this means that you have had       */
+/* knowledge of the CeCILL-C license and that you accept its terms.           */
+/******************************************************************************/
+/* version 1.7                                                                */
+/******************************************************************************/
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "decl.h"
+
+void Save_Length(char *nom, int whichone)
+{
+   if ( whichone == 1  && strlen(nom) > length_last )
+   {
+      length_last               = strlen(nom);
+      if ( length_last > LONG_C )
+      {
+         printf("WARNING 1 : The value of LONG_C - define in decl.h -\n");
+         printf("             should be upgrated to %d\n",length_last+100);
+      }
+   }
+   if ( whichone == 2  && strlen(nom) > length_first )
+   {
+      length_first              = strlen(nom);
+      if ( length_first > LONG_C )
+      {
+         printf("WARNING 2 : The value of LONG_C - define in decl.h -\n");
+         printf("             should be upgrated to %d\n",length_first+100);
+      }
+   }
+   if ( whichone == 3  && strlen(nom) > length_v_typevar )
+   {
+      length_v_typevar          = strlen(nom);
+      if ( length_v_typevar > LONG_C )
+      {
+         printf("WARNING 3 : The value of LONG_C - define in decl.h -\n");
+         printf("             should be upgrated to %d\n",length_v_typevar+100);
+      }
+   }
+   if ( whichone == 4  && strlen(nom) > length_v_nomvar )
+   {
+      length_v_nomvar           = strlen(nom);
+      if ( length_v_nomvar > LONG_C )
+      {
+         printf("WARNING 4 : The value of LONG_C - define in decl.h -\n");
+         printf("             should be upgrated to %d\n",length_v_nomvar+100);
+      }
+   }
+   if ( whichone == 5  && strlen(nom) > length_v_dimchar )
+   {
+      length_v_dimchar          = strlen(nom);
+      if ( length_v_dimchar > LONG_C )
+      {
+         printf("WARNING 5 : The value of LONG_C - define in decl.h -\n");
+         printf("             should be upgrated to %d\n",
+                                                          length_v_dimchar+100);
+      }
+   }
+   if ( whichone == 6  && strlen(nom) > length_v_modulename )
+   {
+      length_v_modulename       = strlen(nom);
+      if ( length_v_modulename > LONG_C )
+      {
+         printf("WARNING 6 : The value of LONG_C - define in decl.h -\n");
+         printf("             should be upgrated to %d\n",
+                                                       length_v_modulename+100);
+      }
+   }
+   if ( whichone == 7  && strlen(nom) > length_v_commonname )
+   {
+      length_v_commonname       = strlen(nom);
+      if ( length_v_commonname > LONG_C )
+      {
+         printf("WARNING 7 : The value of LONG_C - define in decl.h -\n");
+         printf("             should be upgrated to %d\n",
+                                                       length_v_commonname+100);
+      }
+   }
+   if ( whichone == 8  && strlen(nom) > length_v_vallengspec )
+   {
+      length_v_vallengspec      = strlen(nom);
+      if ( length_v_vallengspec > LONG_C )
+      {
+         printf("WARNING 8 : The value of LONG_C - define in decl.h -\n");
+         printf("             should be upgrated to %d\n",
+                                                      length_v_vallengspec+100);
+      }
+   }
+   if ( whichone == 9  && strlen(nom) > length_v_nameinttypename )
+   {
+      length_v_nameinttypename  = strlen(nom);
+      if ( length_v_nameinttypename > LONG_C )
+      {
+         printf("WARNING 9 : The value of LONG_C - define in decl.h -\n");
+         printf("             should be upgrated to %d\n",
+                                                  length_v_nameinttypename+100);
+      }
+   }
+   if ( whichone == 10 && strlen(nom) > length_v_commoninfile )
+   {
+      length_v_commoninfile     = strlen(nom);
+      if ( length_v_commoninfile > LONG_C )
+      {
+         printf("WARNING 10 : The value of LONG_C - define in decl.h -\n");
+         printf("             should be upgrated to %d\n",
+                                                     length_v_commoninfile+100);
+      }
+   }
+   if ( whichone == 11 && strlen(nom) > length_v_subroutinename )
+   {
+      length_v_subroutinename   = strlen(nom);
+      if ( length_v_subroutinename > LONG_C )
+      {
+         printf("WARNING 11 : The value of LONG_C - define in decl.h -\n");
+         printf("             should be upgrated to %d\n",
+                                                   length_v_subroutinename+100);
+      }
+   }
+   if ( whichone == 12 && strlen(nom) > length_v_precision )
+   {
+      length_v_precision        = strlen(nom);
+      if ( length_v_precision > LONG_C )
+      {
+         printf("WARNING 12 : The value of LONG_C - define in decl.h -\n");
+         printf("             should be upgrated to %d\n",
+                                                        length_v_precision+100);
+      }
+   }
+   if ( whichone == 13 && strlen(nom) > length_v_IntentSpec )
+   {
+      length_v_IntentSpec       = strlen(nom);
+      if ( length_v_IntentSpec > LONG_C )
+      {
+         printf("WARNING 13 : The value of LONG_C - define in decl.h -\n");
+         printf("             should be upgrated to %d\n",
+                                                       length_v_IntentSpec+100);
+      }
+   }
+   if ( whichone == 14 && strlen(nom) > length_v_initialvalue )
+   {
+      length_v_initialvalue     = strlen(nom);
+      if ( length_v_initialvalue > LONG_4C )
+      {
+         printf("WARNING 14 : The value of LONG_4C - define in decl.h -\n");
+         printf("             should be upgrated to %d\n",
+                                                     length_v_initialvalue+100);
+      }
+   }
+   if ( whichone == 15 && strlen(nom) > length_v_readedlistdimension )
+   {
+      length_v_readedlistdimension = strlen(nom);
+      if ( length_v_readedlistdimension > LONG_C )
+      {
+         printf("WARNING 15 : The value of LONG_C - define in decl.h -\n");
+         printf("             should be upgrated to %d\n",
+                                              length_v_readedlistdimension+100);
+      }
+   }
+   if ( whichone == 16 && strlen(nom) > length_u_usemodule )
+   {
+      length_u_usemodule        = strlen(nom);
+      if ( length_u_usemodule > LONG_C )
+      {
+         printf("WARNING 16 : The value of LONG_C - define in decl.h -\n");
+         printf("             should be upgrated to %d\n",
+                                                        length_u_usemodule+100);
+      }
+   }
+   if ( whichone == 17 && strlen(nom) > length_u_charusemodule )
+   {
+      length_u_charusemodule    = strlen(nom);
+      if ( length_u_charusemodule > LONG_C )
+      {
+         printf("WARNING 17 : The value of LONG_C - define in decl.h -\n");
+         printf("             should be upgrated to %d\n",
+                                                    length_u_charusemodule+100);
+      }
+   }
+   if ( whichone == 18 && strlen(nom) > length_u_cursubroutine )
+   {
+      length_u_cursubroutine    = strlen(nom);
+      if ( length_u_cursubroutine > LONG_C )
+      {
+         printf("WARNING 18 : The value of LONG_C - define in decl.h -\n");
+         printf("             should be upgrated to %d\n",
+                                                    length_u_cursubroutine+100);
+      }
+   }
+   if ( whichone == 19 && strlen(nom) > length_u_modulename )
+   {
+      length_u_modulename       = strlen(nom);
+      if ( length_u_modulename > LONG_C )
+      {
+         printf("WARNING 19 : The value of LONG_C - define in decl.h -\n");
+         printf("             should be upgrated to %d\n",
+                                                       length_u_modulename+100);
+      }
+   }
+   if ( whichone == 20 && strlen(nom) > length_n_name )
+   {
+      length_n_name             = strlen(nom);
+      if ( length_n_name > LONG_C )
+      {
+         printf("WARNING 20 : The value of LONG_C - define in decl.h -\n");
+         printf("             should be upgrated to %d\n",length_n_name+100);
+      }
+   }
+   if ( whichone == 21 && strlen(nom) > length_c_namevar )
+   {
+      length_c_namevar          = strlen(nom);
+      if ( length_c_namevar > LONG_C )
+      {
+         printf("WARNING 21 : The value of LONG_C - define in decl.h -\n");
+         printf("             should be upgrated to %d\n",length_c_namevar+100);
+      }
+   }
+   if ( whichone == 22 && strlen(nom) > length_c_namepointedvar )
+   {
+      length_c_namepointedvar   = strlen(nom);
+      if ( length_c_namepointedvar > LONG_C )
+      {
+         printf("WARNING 22 : The value of LONG_C - define in decl.h -\n");
+         printf("             should be upgrated to %d\n",
+                                                   length_c_namepointedvar+100);
+      }
+   }
+   if ( whichone == 23 && strlen(nom) > length_o_nom )
+   {
+      length_o_nom              = strlen(nom);
+      if ( length_o_nom > LONG_C )
+      {
+         printf("WARNING 23 : The value of LONG_C - define in decl.h -\n");
+         printf("             should be upgrated to %d\n",length_o_nom+100);
+      }
+   }
+   if ( whichone == 24 && strlen(nom) > length_o_module )
+   {
+      length_o_module           = strlen(nom);
+      if ( length_o_module > LONG_C )
+      {
+         printf("WARNING 24 : The value of LONG_C - define in decl.h -\n");
+         printf("             should be upgrated to %d\n",length_o_module+100);
+      }
+   }
+   if ( whichone == 25 && strlen(nom) > length_a_nomvar )
+   {
+      length_a_nomvar           = strlen(nom);
+      if ( length_a_nomvar > LONG_C )
+      {
+         printf("WARNING 25 : The value of LONG_C - define in decl.h -\n");
+         printf("             should be upgrated to %d\n",length_a_nomvar+100);
+      }
+   }
+   if ( whichone == 26 && strlen(nom) > length_a_subroutine )
+   {
+      length_a_subroutine       = strlen(nom);
+      if ( length_a_subroutine > LONG_C )
+      {
+         printf("WARNING 26 : The value of LONG_C - define in decl.h -\n");
+         printf("             should be upgrated to %d\n",
+                                                       length_a_subroutine+100);
+      }
+   }
+   if ( whichone == 27 && strlen(nom) > length_a_module )
+   {
+      length_a_module           = strlen(nom);
+      if ( length_a_module > LONG_C )
+      {
+         printf("WARNING 27 : The value of LONG_C - define in decl.h -\n");
+         printf("             should be upgrated to %d\n",length_a_module+100);
+      }
+   }
+   if ( whichone == 28 && strlen(nom) > length_t_usemodule )
+   {
+      length_t_usemodule        = strlen(nom);
+      if ( length_t_usemodule > LONG_C )
+      {
+         printf("WARNING 28 : The value of LONG_C - define in decl.h -\n");
+         printf("             should be upgrated to %d\n",
+                                                        length_t_usemodule+100);
+      }
+   }
+   if ( whichone == 29 && strlen(nom) > length_t_cursubroutine )
+   {
+      length_t_cursubroutine    = strlen(nom);
+      if ( length_t_cursubroutine > LONG_C )
+      {
+         printf("WARNING 29 : The value of LONG_C - define in decl.h -\n");
+         printf("             should be upgrated to %d\n",
+                                                    length_t_cursubroutine+100);
+      }
+   }
+   if ( whichone == 30 && strlen(nom) > length_curfilename )
+   {
+      length_curfilename        = strlen(nom);
+      if (length_curfilename  > LONG_C )
+      {
+         printf("WARNING 30 : The value of LONG_C - define in decl.h -\n");
+         printf("             should be upgrated to %d\n",
+                                                        length_curfilename+100);
+      }
+   }
+   if ( whichone == 31 && strlen(nom) > length_nomfileoutput )
+   {
+      length_nomfileoutput      = strlen(nom);
+      if ( length_nomfileoutput > LONG_C )
+      {
+         printf("WARNING 31 : The value of LONG_C - define in decl.h -\n");
+         printf("             should be upgrated to %d\n",
+                                                      length_nomfileoutput+100);
+      }
+   }
+   if ( whichone == 32 && strlen(nom) > length_motparse )
+   {
+      length_motparse           = strlen(nom);
+      if ( length_motparse > LONG_4C )
+      {
+         printf("WARNING 32 : The value of LONG_4C - define in decl.h -\n");
+         printf("             should be upgrated to %d\n",length_motparse+100);
+      }
+   }
+   if ( whichone == 33 && strlen(nom) > length_mainfile )
+   {
+      length_mainfile           = strlen(nom);
+      if ( length_mainfile > LONG_C )
+      {
+         printf("WARNING 33 : The value of LONG_C - define in decl.h -\n");
+         printf("             should be upgrated to %d\n",length_mainfile+100);
+      }
+   }
+   if ( whichone == 34 && strlen(nom) > length_nomdir )
+   {
+      length_nomdir             = strlen(nom);
+      if ( length_nomdir > LONG_C )
+      {
+         printf("WARNING 34 : The value of LONG_C - define in decl.h -\n");
+         printf("             should be upgrated to %d\n",length_nomdir+100);
+      }
+   }
+   if ( whichone == 35 && strlen(nom) > length_commondirout )
+   {
+      length_commondirout       = strlen(nom);
+      if ( length_commondirout > LONG_C )
+      {
+         printf("WARNING 35 : The value of LONG_C - define in decl.h -\n");
+         printf("             should be upgrated to %d\n",
+                                                       length_commondirout+100);
+      }
+   }
+   if ( whichone == 36 && strlen(nom) > length_commondirin )
+   {
+      length_commondirin        = strlen(nom);
+      if ( length_commondirin > LONG_C )
+      {
+         printf("WARNING 36 : The value of LONG_C - define in decl.h -\n");
+         printf("             should be upgrated to %d\n",
+                                                        length_commondirin+100);
+      }
+   }
+   if ( whichone == 37 && strlen(nom) > length_filetoparse )
+   {
+      length_filetoparse        = strlen(nom);
+      if ( length_filetoparse > LONG_C )
+      {
+         printf("WARNING 37 : The value of LONG_C - define in decl.h -\n");
+         printf("             should be upgrated to %d\n",
+                                                        length_filetoparse+100);
+      }
+   }
+   if ( whichone == 38 && strlen(nom) > length_curbuf )
+   {
+      length_curbuf             = strlen(nom);
+      if ( length_curbuf > LONG_40M )
+      {
+         printf("WARNING 38 : The value of LONG_40M - define in decl.h -\n");
+         printf("             should be upgrated to %d\n",length_curbuf+100);
+      }
+   }
+   if ( whichone == 39 && strlen(nom) > length_toprintglob )
+   {
+      length_toprintglob        = strlen(nom);
+      if ( length_toprintglob > LONG_4C )
+      {
+         printf("WARNING 39 : The value of LONG_4C - define in decl.h -\n");
+         printf("             should be upgrated to %d\n",
+                                                        length_toprintglob+100);
+      }
+   }
+   if ( whichone == 40 && strlen(nom) > length_tmpvargridname )
+   {
+      length_tmpvargridname     = strlen(nom);
+      if ( length_tmpvargridname > LONG_4C )
+      {
+         printf("WARNING 40 : The value of LONG_4C - define in decl.h -\n");
+         printf("             should be upgrated to %d\n",
+                                                     length_tmpvargridname+100);
+      }
+   }
+   if ( whichone == 41 && strlen(nom) > length_ligne_Subloop )
+   {
+       length_ligne_Subloop    = strlen(nom);
+      if ( length_ligne_Subloop > LONG_40M )
+      {
+         printf("WARNING 41 : The value of LONG_40M - define in decl.h -\n");
+         printf("             should be upgrated to %d\n",
+                                                      length_ligne_Subloop+100);
+      }
+   }
+   if ( whichone == 42 && strlen(nom) > length_lvargridname_toamr )
+   {
+      length_lvargridname_toamr     = strlen(nom);
+      if ( length_lvargridname_toamr > LONG_4C )
+      {
+         printf("WARNING 42 : The value of LONG_4C - define in decl.h -\n");
+         printf("             should be upgrated to %d\n",
+                                                 length_lvargridname_toamr+100);
+      }
+   }
+   if ( whichone == 43 && strlen(nom) > length_toprint_utilagrif )
+   {
+      length_toprint_utilagrif     = strlen(nom);
+      if ( length_toprint_utilagrif > LONG_C )
+      {
+         printf("WARNING 43 : The value of LONG_C - define in decl.h -\n");
+         printf("             should be upgrated to %d\n",
+                                                  length_toprint_utilagrif+100);
+      }
+   }
+   if ( whichone == 44 && strlen(nom) > length_toprinttmp_utilchar )
+   {
+      length_toprinttmp_utilchar     = strlen(nom);
+      if ( length_toprinttmp_utilchar > LONG_4C)
+      {
+         printf("WARNING 44 : The value of LONG_4C - define in decl.h -\n");
+         printf("             should be upgrated to %d\n",
+                                                length_toprinttmp_utilchar+100);
+      }
+   }
+   if ( whichone == 45 && strlen(nom) > length_ligne_writedecl )
+   {
+      length_ligne_writedecl     = strlen(nom);
+      if ( length_ligne_writedecl > LONG_4C )
+      {
+         printf("WARNING 45 : The value of LONG_4C - define in decl.h -\n");
+         printf("             should be upgrated to %d\n",
+                                                    length_ligne_writedecl+100);
+      }
+   }
+   if ( whichone == 46 && strlen(nom) > length_newname_toamr )
+   {
+      length_newname_toamr    = strlen(nom);
+      if ( length_newname_toamr > LONG_4C )
+      {
+         printf("WARNING 46 : The value of LONG_4C - define in decl.h -\n");
+         printf("             should be upgrated to %d\n",
+                                                      length_newname_toamr+100);
+      }
+   }
+   if ( whichone == 47 && strlen(nom) > length_newname_writedecl )
+   {
+      length_newname_writedecl    = strlen(nom);
+      if ( length_newname_writedecl > LONG_4C )
+      {
+         printf("WARNING 47 : The value of LONG_4C - define in decl.h -\n");
+         printf("             should be upgrated to %d\n",
+                                                 length_newname_writedecl +100);
+      }
+   }
+   if ( whichone == 48 && strlen(nom) > length_ligne_toamr )
+   {
+      length_ligne_toamr    = strlen(nom);
+      if ( length_ligne_toamr > LONGNOM )
+      {
+         printf("WARNING 48 : The value of LONGNOM - define in decl.h -\n");
+         printf("             should be upgrated to %d\n",
+                                                       length_ligne_toamr +100);
+      }
+   }
+   if ( whichone == 49 && strlen(nom) > length_tmpligne_writedecl )
+   {
+      length_tmpligne_writedecl     = strlen(nom);
+      if ( length_tmpligne_writedecl > LONG_4C )
+      {
+         printf("WARNING 49 : The value of LONG_4C - define in decl.h -\n");
+         printf("             should be upgrated to %d\n",
+                                                 length_tmpligne_writedecl+100);
+      }
+   }
+}
+
+void Save_Length_int(int val, int whichone)
+{
+   if ( whichone == 1 && val > value_char_size )
+                               value_char_size                            = val;
+   if ( whichone == 2 && val > value_char_size1 )
+                               value_char_size1                           = val;
+   if ( whichone == 3 && val > value_char_size2 )
+                               value_char_size2                           = val;
+   if ( whichone == 4 && val > value_char_size3 )
+                               value_char_size3                           = val;
+}
Index: vendors/AGRIF/r_01/LIB/WorkWithlistofcoupled.c
===================================================================
--- vendors/AGRIF/r_01/LIB/WorkWithlistofcoupled.c	(revision 2672)
+++ vendors/AGRIF/r_01/LIB/WorkWithlistofcoupled.c	(revision 2672)
@@ -0,0 +1,111 @@
+/******************************************************************************/
+/*                                                                            */
+/*     CONV (converter) for Agrif (Adaptive Grid Refinement In Fortran)       */
+/*                                                                            */
+/* Copyright or    or Copr. Laurent Debreu (Laurent.Debreu@imag.fr)           */
+/*                        Cyril Mazauric (Cyril_Mazauric@yahoo.fr)            */
+/* This software is governed by the CeCILL-C license under French law and     */
+/* abiding by the rules of distribution of free software.  You can  use,      */
+/* modify and/ or redistribute the software under the terms of the CeCILL-C   */
+/* license as circulated by CEA, CNRS and INRIA at the following URL          */
+/* "http://www.cecill.info".                                                  */
+/*                                                                            */
+/* As a counterpart to the access to the source code and  rights to copy,     */
+/* modify and redistribute granted by the license, users are provided only    */
+/* with a limited warranty  and the software's author,  the holder of the     */
+/* economic rights,  and the successive licensors  have only  limited         */
+/* liability.                                                                 */
+/*                                                                            */
+/* In this respect, the user's attention is drawn to the risks associated     */
+/* with loading,  using,  modifying and/or developing or reproducing the      */
+/* software by the user in light of its specific status of free software,     */
+/* that may mean  that it is complicated to manipulate,  and  that  also      */
+/* therefore means  that it is reserved for developers  and  experienced      */
+/* professionals having in-depth computer knowledge. Users are therefore      */
+/* encouraged to load and test the software's suitability as regards their    */
+/* requirements in conditions enabling the security of their systems and/or   */
+/* data to be ensured and,  more generally, to use and operate it in the      */
+/* same conditions as regards security.                                       */
+/*                                                                            */
+/* The fact that you are presently reading this means that you have had       */
+/* knowledge of the CeCILL-C license and that you accept its terms.           */
+/******************************************************************************/
+/* version 1.7                                                                */
+/******************************************************************************/
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "decl.h"
+
+/******************************************************************************/
+/*                          varisallocatable_0                                */
+/******************************************************************************/
+/* Firstpass 0                                                                */
+/******************************************************************************/
+/*                                                                            */
+/******************************************************************************/
+int variscoupled_0(char *ident)
+{
+   listallocate *newvaralloc;
+  listvarpointtovar *pointtmplist; 
+  listcouple *coupletmp;   
+  int out;
+
+   out =0;
+   if (firstpass == 0 )
+   {
+  pointtmplist = List_CouplePointed_Var;
+  while ( pointtmplist && out == 0)
+  {
+      coupletmp = pointtmplist->t_couple;
+      while ( coupletmp && out == 0)
+      {
+           /* we should find the same variable name in the same subroutine    */
+           if ( !strcasecmp(ident,coupletmp->c_namevar) &&
+                !strcasecmp(subroutinename,
+                                       pointtmplist->t_cursubroutine) &&
+                 strcasecmp(coupletmp->c_namepointedvar,"")
+              )
+           {
+              out = 1;
+           }
+         coupletmp = coupletmp->suiv;
+     }
+     pointtmplist = pointtmplist->suiv;
+   }
+   }
+   return out;
+}
+
+char * getcoupledname_0(char *ident)
+{
+   listallocate *newvaralloc;
+  listvarpointtovar *pointtmplist; 
+  listcouple *coupletmp;   
+  int out;
+
+   out =0;
+   if (firstpass == 0 )
+   {
+  pointtmplist = List_CouplePointed_Var;
+  while ( pointtmplist && out == 0)
+  {
+      coupletmp = pointtmplist->t_couple;
+      while ( coupletmp && out == 0)
+      {
+           /* we should find the same variable name in the same subroutine    */
+           if ( !strcasecmp(ident,coupletmp->c_namevar) &&
+                !strcasecmp(subroutinename,
+                                       pointtmplist->t_cursubroutine) &&
+                 strcasecmp(coupletmp->c_namepointedvar,"")
+              )
+           {
+              return(coupletmp->c_namepointedvar);
+           }
+         coupletmp = coupletmp->suiv;
+     }
+     pointtmplist = pointtmplist->suiv;
+   }
+   }
+}
Index: vendors/AGRIF/r_01/LIB/WorkWithlistofmodulebysubroutine.c
===================================================================
--- vendors/AGRIF/r_01/LIB/WorkWithlistofmodulebysubroutine.c	(revision 2672)
+++ vendors/AGRIF/r_01/LIB/WorkWithlistofmodulebysubroutine.c	(revision 2672)
@@ -0,0 +1,303 @@
+/******************************************************************************/
+/*                                                                            */
+/*     CONV (converter) for Agrif (Adaptive Grid Refinement In Fortran)       */
+/*                                                                            */
+/* Copyright or   or Copr. Laurent Debreu (Laurent.Debreu@imag.fr)            */
+/*                        Cyril Mazauric (Cyril_Mazauric@yahoo.fr)            */
+/* This software is governed by the CeCILL-C license under French law and     */
+/* abiding by the rules of distribution of free software.  You can  use,      */
+/* modify and/ or redistribute the software under the terms of the CeCILL-C   */
+/* license as circulated by CEA, CNRS and INRIA at the following URL          */
+/* "http://www.cecill.info".                                                  */
+/*                                                                            */
+/* As a counterpart to the access to the source code and  rights to copy,     */
+/* modify and redistribute granted by the license, users are provided only    */
+/* with a limited warranty  and the software's author,  the holder of the     */
+/* economic rights,  and the successive licensors  have only  limited         */
+/* liability.                                                                 */
+/*                                                                            */
+/* In this respect, the user's attention is drawn to the risks associated     */
+/* with loading,  using,  modifying and/or developing or reproducing the      */
+/* software by the user in light of its specific status of free software,     */
+/* that may mean  that it is complicated to manipulate,  and  that  also      */
+/* therefore means  that it is reserved for developers  and  experienced      */
+/* professionals having in-depth computer knowledge. Users are therefore      */
+/* encouraged to load and test the software's suitability as regards their    */
+/* requirements in conditions enabling the security of their systems and/or   */
+/* data to be ensured and,  more generally, to use and operate it in the      */
+/* same conditions as regards security.                                       */
+/*                                                                            */
+/* The fact that you are presently reading this means that you have had       */
+/* knowledge of the CeCILL-C license and that you accept its terms.           */
+/******************************************************************************/
+/* version 1.7                                                                */
+/******************************************************************************/
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "decl.h"
+
+
+
+/******************************************************************************/
+/*                    RecordUseModulesVariables                               */
+/******************************************************************************/
+/*                                                                            */
+/******************************************************************************/
+void RecordUseModulesVariables()
+{
+  listusemodule *tmplistmodule;
+
+  /* we should record all variables defined in modules used in this file      */
+  if ( List_NameOfModuleUsed )
+  {
+     tmplistmodule = List_NameOfModuleUsed;
+     while ( tmplistmodule )
+     {
+        if ( tmplistmodule->u_firstuse == 1 )
+        {
+           /* check if the file .depend<u_usemodule> exist                    */
+           List_ModuleUsed_Var = Readthedependfile
+                               (tmplistmodule->u_usemodule,List_ModuleUsed_Var);
+         printf("PPPPPPPPPPPPPP\n");
+           List_GlobParamModuleUsed_Var = ReaddependParameterList
+                      (tmplistmodule->u_usemodule,List_GlobParamModuleUsed_Var);
+
+        }
+
+        tmplistmodule = tmplistmodule->suiv;
+     }
+  }
+}
+
+/******************************************************************************/
+/*                RecordUseModulesUseModulesVariables                         */
+/******************************************************************************/
+/******************************************************************************/
+void  RecordUseModulesUseModulesVariables()
+{
+  listusemodule *tmplistmodule;
+  listusemodule *tmplistmodule1;
+
+  /* we should record all variables defined in modules used in this file      */
+  if ( List_NameOfModuleUsed )
+  {
+     /* and we should read the .depend of the module used by the module used  */
+     tmplistmodule = List_NameOfModuleUsed;
+     while ( tmplistmodule )
+     {
+        Readthedependlistofmoduleused(tmplistmodule->u_usemodule);
+        while( tmpuselocallist )
+        {
+           Addmoduletothelisttmp(tmpuselocallist->u_usemodule);
+           tmplistmodule1 = tmpuselocallist->suiv;
+           free(tmpuselocallist);
+           tmpuselocallist = tmplistmodule1;
+        }
+        tmplistmodule = tmplistmodule->suiv;
+     }
+
+     tmplistmodule = listofmoduletmp;
+     while ( tmplistmodule )
+     {
+        Readthedependlistofmoduleused(tmplistmodule->u_usemodule);
+        while( tmpuselocallist )
+        {
+           Addmoduletothelisttmp(tmpuselocallist->u_usemodule);
+           tmplistmodule1 = tmpuselocallist->suiv;
+           free(tmpuselocallist);
+           tmpuselocallist = tmplistmodule1;
+        }
+        tmplistmodule = tmplistmodule->suiv;
+     }
+
+
+
+     tmplistmodule = listofmoduletmp;
+     while ( tmplistmodule )
+     {
+        /* check if the file .depend<u_usemodule> exist                       */
+        List_ModuleUsedInModuleUsed_Var = Readthedependfile
+                   (tmplistmodule->u_usemodule,List_ModuleUsedInModuleUsed_Var);
+
+        List_GlobParamModuleUsedInModuleUsed_Var = ReaddependParameterList
+          (tmplistmodule->u_usemodule,List_GlobParamModuleUsedInModuleUsed_Var);
+        tmplistmodule = tmplistmodule->suiv;
+     }
+  }
+}
+
+/******************************************************************************/
+/*                      Add_NameOfModuleUsed_1                                */
+/******************************************************************************/
+/* This subroutine is used to add a record to a list of struct                */
+/* listusemodule                                                              */
+/******************************************************************************/
+/*                                                                            */
+/*       subroutine sub ... USE mod1 ===> insert in list                      */
+/*        _______     _______     _______     _______     _______             */
+/*       +      +    +      +    +      +    +      +    +      +             */
+/*       + NEW  +--->+ list +--->+ list +--->+ list +--->+ list +             */
+/*       +______+    +______+    +______+    +______+    +______+             */
+/*                                                                            */
+/*       list =  List_NameOfModuleUsed                                        */
+/*                                                                            */
+/******************************************************************************/
+void Add_NameOfModuleUsed_1(char *name)
+{
+  listusemodule *newmodule;
+  listusemodule *parcours;
+  int out;
+
+  if ( firstpass == 1 )
+  {
+     newmodule =(listusemodule *)malloc(sizeof(listusemodule));
+     strcpy(newmodule->u_usemodule,name);
+     Save_Length(name,16);
+     strcpy(newmodule->u_charusemodule,charusemodule);
+     Save_Length(charusemodule,17);
+     strcpy(newmodule->u_modulename,curmodulename);
+     Save_Length(curmodulename,19);
+     strcpy(newmodule->u_cursubroutine,subroutinename);
+     Save_Length(subroutinename,18);
+     newmodule->u_firstuse = 1 ;
+     newmodule->suiv = NULL;
+
+     if ( !List_NameOfModuleUsed)
+     {
+         List_NameOfModuleUsed = newmodule ;
+     }
+     else
+     {
+    parcours = List_NameOfModuleUsed;
+    while ( parcours && newmodule->u_firstuse == 1 )
+    {
+       if ( !strcasecmp(name,parcours->u_usemodule) )
+       {
+          newmodule->u_firstuse = 0 ;
+       }
+       parcours=parcours->suiv;
+    }
+    /* we can not add the same module twice for the same subroutine           */
+    parcours = List_NameOfModuleUsed;
+    out = 0 ;
+    while ( parcours && out == 0 )
+    {
+       if ( !strcasecmp(name,parcours->u_usemodule) &&
+            !strcasecmp(subroutinename,parcours->u_cursubroutine)
+           )
+       {
+          out = 1 ;
+          free(newmodule);
+       }
+       else parcours=parcours->suiv;
+    }
+    if ( out == 0 )
+    {
+       newmodule->suiv = List_NameOfModuleUsed;
+       List_NameOfModuleUsed = newmodule;
+    }
+  }
+  }
+}
+
+
+/******************************************************************************/
+/*                        Addmoduletothelist                                  */
+/******************************************************************************/
+/* This subroutine is used to add a record to a list of struct                */
+/* listusemodule                                                              */
+/******************************************************************************/
+/*                                                                            */
+/*       subroutine sub ... USE mod1 ===> insert in list                      */
+/*        _______     _______     _______     _______     _______             */
+/*       +      +    +      +    +      +    +      +    +      +             */
+/*       + NEW  +--->+ list +--->+ list +--->+ list +--->+ list +             */
+/*       +______+    +______+    +______+    +______+    +______+             */
+/*                                                                            */
+/*       list =  List_NameOfModuleUsed                                     */
+/*                                                                            */
+/******************************************************************************/
+void Addmoduletothelist(char *name)
+{
+  listusemodule *newmodule;
+  listusemodule *parcours;
+  int out;
+
+     newmodule =(listusemodule *)malloc(sizeof(listusemodule));
+     strcpy(newmodule->u_usemodule,name);
+     Save_Length(name,16);
+     strcpy(newmodule->u_charusemodule,charusemodule);
+     Save_Length(charusemodule,17);
+     strcpy(newmodule->u_cursubroutine,subroutinename);
+     Save_Length(subroutinename,18);
+     newmodule->u_firstuse = 1 ;
+     newmodule->suiv = NULL;
+
+     if ( !List_NameOfModuleUsed)
+     {
+         List_NameOfModuleUsed = newmodule ;
+     }
+     else
+     {
+    parcours = List_NameOfModuleUsed;
+    while ( parcours && newmodule->u_firstuse == 1 )
+    {
+       if ( !strcasecmp(name,parcours->u_usemodule) )
+       {
+          newmodule->u_firstuse = 0 ;
+       }
+       parcours=parcours->suiv;
+    }
+    /* we can not add the same module twice for the same subroutine           */
+    parcours = List_NameOfModuleUsed;
+    out = 0 ;
+    while ( parcours && out == 0 )
+    {
+       if ( !strcasecmp(name,parcours->u_usemodule) &&
+            !strcasecmp(subroutinename,parcours->u_cursubroutine)
+           )
+       {
+          out = 1 ;
+          free(newmodule);
+       }
+       else parcours=parcours->suiv;
+    }
+    if ( out == 0 )
+    {
+       newmodule->suiv = List_NameOfModuleUsed;
+       List_NameOfModuleUsed = newmodule;
+    }
+  }
+}
+
+
+/******************************************************************************/
+/*                        WriteUsemoduleDeclaration                           */
+/******************************************************************************/
+/* Firstpass 0                                                                */
+/******************************************************************************/
+/*                                                                            */
+/******************************************************************************/
+void WriteUsemoduleDeclaration(char *cursubroutinename)
+{
+  listusemodule *newmodule;
+  
+
+  newmodule = List_NameOfModuleUsed;
+  fprintf(fortranout,"\n");
+
+  while ( newmodule )
+  {
+     if ( !strcasecmp(newmodule->u_cursubroutine,cursubroutinename) )
+     {
+     if (strcmp(newmodule->u_charusemodule,""))
+     {
+             fprintf(fortranout,"      USE %s \n"
+                                                   ,newmodule->u_charusemodule);
+      }
+     }
+        newmodule = newmodule ->suiv;
+  }
+}
Index: vendors/AGRIF/r_01/LIB/WorkWithlistvarindoloop.c
===================================================================
--- vendors/AGRIF/r_01/LIB/WorkWithlistvarindoloop.c	(revision 2672)
+++ vendors/AGRIF/r_01/LIB/WorkWithlistvarindoloop.c	(revision 2672)
@@ -0,0 +1,1940 @@
+/******************************************************************************/
+/*                                                                            */
+/*     CONV (converter) for Agrif (Adaptive Grid Refinement In Fortran)       */
+/*                                                                            */
+/* Copyright or    or Copr. Laurent Debreu (Laurent.Debreu@imag.fr)           */
+/*                        Cyril Mazauric (Cyril_Mazauric@yahoo.fr)            */
+/* This software is governed by the CeCILL-C license under French law and     */
+/* abiding by the rules of distribution of free software.  You can  use,      */
+/* modify and/ or redistribute the software under the terms of the CeCILL-C   */
+/* license as circulated by CEA, CNRS and INRIA at the following URL          */
+/* "http://www.cecill.info".                                                  */
+/*                                                                            */
+/* As a counterpart to the access to the source code and  rights to copy,     */
+/* modify and redistribute granted by the license, users are provided only    */
+/* with a limited warranty  and the software's author,  the holder of the     */
+/* economic rights,  and the successive licensors  have only  limited         */
+/* liability.                                                                 */
+/*                                                                            */
+/* In this respect, the user's attention is drawn to the risks associated     */
+/* with loading,  using,  modifying and/or developing or reproducing the      */
+/* software by the user in light of its specific status of free software,     */
+/* that may mean  that it is complicated to manipulate,  and  that  also      */
+/* therefore means  that it is reserved for developers  and  experienced      */
+/* professionals having in-depth computer knowledge. Users are therefore      */
+/* encouraged to load and test the software's suitability as regards their    */
+/* requirements in conditions enabling the security of their systems and/or   */
+/* data to be ensured and,  more generally, to use and operate it in the      */
+/* same conditions as regards security.                                       */
+/*                                                                            */
+/* The fact that you are presently reading this means that you have had       */
+/* knowledge of the CeCILL-C license and that you accept its terms.           */
+/******************************************************************************/
+/* version 1.7                                                                */
+/******************************************************************************/
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "decl.h"
+
+/******************************************************************************/
+/*                         Add_UsedInSubroutine_Var_1                         */
+/******************************************************************************/
+/* Firstpass 1                                                                */
+/* We should complete the List_UsedInSubroutine_Var                           */
+/******************************************************************************/
+/*                                                                            */
+/******************************************************************************/
+void Add_UsedInSubroutine_Var_1 (char *ident)
+{
+  listvar *newvar;
+  listvar *tmpvar;
+  int out;
+
+   /* In the first pass we record all variables presents in the do loop       */
+   if (firstpass == 1 && insubroutinedeclare == 1 )
+   {
+
+  if ( !List_UsedInSubroutine_Var )
+  {
+      newvar=(listvar *)malloc(sizeof(listvar));
+      newvar->var=(variable *)malloc(sizeof(variable));
+      /*                                                                      */
+      Init_Variable(newvar->var);
+      /*                                                                      */
+      newvar->suiv = NULL;
+      strcpy(newvar->var->v_nomvar,ident);
+
+      Save_Length(ident,4);
+      strcpy(newvar->var->v_modulename,curmodulename);
+      Save_Length(curmodulename,6);
+     printf("ICI %d\n",newvar->var->v_module);
+
+      strcpy(newvar->var->v_commoninfile,mainfile);
+      Save_Length(mainfile,10);
+      strcpy(newvar->var->v_subroutinename,subroutinename);
+      Save_Length(subroutinename,11);
+      newvar->var->v_pointedvar=pointedvar;
+      List_UsedInSubroutine_Var = newvar ;
+       printf("jaoute %s\n",newvar->var->v_nomvar);
+  }
+  else
+  {
+      /* We should verify that this variable did not added                    */
+      tmpvar = List_UsedInSubroutine_Var;
+      out = 0 ;
+      while (tmpvar && out == 0 )
+      {
+         if ( !strcasecmp(tmpvar->var->v_nomvar,ident) &&
+              !strcasecmp(tmpvar->var->v_subroutinename,subroutinename))
+                                                                      out  = 1 ;
+         else tmpvar = tmpvar->suiv;
+      }
+      if ( out == 0 )
+      {
+         newvar=(listvar *)malloc(sizeof(listvar));
+         newvar->var=(variable *)malloc(sizeof(variable));
+         /*                                                                   */
+         Init_Variable(newvar->var);
+         /*                                                                   */
+         strcpy(newvar->var->v_nomvar,ident);
+
+         Save_Length(ident,4);
+         strcpy(newvar->var->v_commoninfile,mainfile);
+         Save_Length(mainfile,10);
+        strcpy(newvar->var->v_modulename,curmodulename);
+         Save_Length(curmodulename,6);
+       printf("ICI %d\n",newvar->var->v_module);
+         strcpy(newvar->var->v_subroutinename,subroutinename);
+         Save_Length(subroutinename,11);
+         newvar->var->v_pointedvar=pointedvar;
+         newvar->suiv = List_UsedInSubroutine_Var;
+         printf("jaoute %s\n",newvar->var->v_nomvar);
+         List_UsedInSubroutine_Var = newvar;        
+      }
+  }
+
+   }
+}
+
+/******************************************************************************/
+/*                        AJOUTEVARINDOLOOP_DEFINEDIMENSION                   */
+/******************************************************************************/
+/* This subroutine is used to add a listvar to  List_UsedInSubroutine_Var     */
+/******************************************************************************/
+void ajoutevarindoloop_definedimension (char *name)
+{
+  listvar *newvar;
+  listvar *tmpvar;
+  listvar *tmpvarprec;
+  int out;
+  int tablemeet;
+
+  if ( !List_UsedInSubroutine_Var )
+  {
+      newvar=(listvar *)malloc(sizeof(listvar));
+      newvar->var=(variable *)malloc(sizeof(variable));
+      /*                                                                      */
+      Init_Variable(newvar->var);
+      /*                                                                      */
+      newvar->suiv = NULL;
+      strcpy(newvar->var->v_nomvar,name);
+
+      Save_Length(name,4);
+      strcpy(newvar->var->v_modulename,curmodulename);
+      Save_Length(curmodulename,6);
+      strcpy(newvar->var->v_commoninfile,mainfile);
+      Save_Length(mainfile,10);
+      strcpy(newvar->var->v_subroutinename,subroutinename);
+      Save_Length(subroutinename,11);
+      newvar->var->v_pointedvar=pointedvar;
+      List_UsedInSubroutine_Var = newvar ;
+  }
+  else
+  {
+      /* We should verify that this variable did not added                    */
+      tmpvarprec = (listvar *)NULL;
+      tmpvar = List_UsedInSubroutine_Var;
+      out = 0 ;
+      tablemeet = 0 ;
+      while (tmpvar && out == 0 )
+      {
+         if ( tablemeet == 0 && tmpvar->var->v_nbdim != 0 ) tablemeet = 1 ;
+         /*                                                                   */
+         if ( !strcasecmp(tmpvar->var->v_nomvar,name) &&
+              !strcasecmp(tmpvar->var->v_subroutinename,subroutinename))
+         {
+            out  = 1 ;
+            /* if this variable has been define before a table we do nothing  */
+            /*    else we should remove it                                    */
+            if ( tablemeet == 1 )
+            {
+               tmpvarprec->suiv = tmpvar -> suiv;
+               out = 2;
+            }
+         }
+         else
+         {
+            tmpvarprec = tmpvar;
+            tmpvar = tmpvar->suiv;
+         }
+      }
+      if ( out == 2 || out == 0 )
+      {
+         newvar=(listvar *)malloc(sizeof(listvar));
+         newvar->var=(variable *)malloc(sizeof(variable));
+         /*                                                                   */
+         Init_Variable(newvar->var);
+         /*                                                                   */
+         strcpy(newvar->var->v_nomvar,name);
+
+         Save_Length(name,4);
+         strcpy(newvar->var->v_modulename,curmodulename);
+         Save_Length(curmodulename,6);
+         strcpy(newvar->var->v_commoninfile,mainfile);
+         Save_Length(mainfile,10);
+         strcpy(newvar->var->v_subroutinename,subroutinename);
+         Save_Length(subroutinename,11);
+         newvar->var->v_pointedvar=pointedvar;
+
+         /* we should find this new variable to know the tabvars indice       */
+         if ( variableisglobal(newvar, List_Global_Var) == 1 )
+         {
+            newvar->suiv = List_UsedInSubroutine_Var;
+            List_UsedInSubroutine_Var = newvar;
+         }
+         else if ( variableisglobal(newvar, List_ModuleUsed_Var) == 1 )
+         {
+            newvar->suiv = List_UsedInSubroutine_Var;
+            List_UsedInSubroutine_Var = newvar;
+         }
+         else if ( variableisglobal(newvar, List_Common_Var) == 1 )
+         {
+            newvar->suiv = List_UsedInSubroutine_Var;
+            List_UsedInSubroutine_Var = newvar;
+         }
+         else
+         {
+            free(newvar);
+         }
+     }
+  }
+}
+
+/******************************************************************************/
+/*                        ModifyThelistvarindoloop                            */
+/******************************************************************************/
+/* This subroutine is to give the old name to the which has been              */
+/* declared as USE MOD, U => V in this case we should replace in the          */
+/* name V by the old name U in the List_UsedInSubroutine_Var                  */
+/******************************************************************************/
+void  ModifyThelistvarindoloop()
+{
+  listvar *newvar;
+
+  newvar = List_UsedInSubroutine_Var;
+  while ( newvar )
+  {
+     if ( strcasecmp(newvar->var->v_oldname,"") )
+     {
+        strcpy(newvar->var->v_nomvar,newvar->var->v_oldname);
+     }
+     newvar = newvar->suiv;
+  }
+}
+
+/******************************************************************************/
+/*                          CompleteThelistvarindoloop                        */
+/******************************************************************************/
+/* This subroutine is to add to the List_UsedInSubroutine_Var all variables   */
+/* which has been declared as USE MOD, U => V in this case we should replace  */
+/* in the List_UsedInSubroutine_Var the word U by the word V                  */
+/******************************************************************************/
+void  CompleteThelistvarindoloop()
+{
+  listvar *newvar;
+  listvarpointtovar *pointtmplist;
+  listcouple *coupletmp;
+  int outvar;
+
+  pointtmplist = List_CouplePointed_Var;
+  while ( pointtmplist )
+  {
+      coupletmp = pointtmplist->t_couple;
+      while ( coupletmp )
+      {
+         newvar = List_UsedInSubroutine_Var;
+         outvar = 0 ;
+         while ( newvar && outvar == 0)
+         {
+           /* we should find the same variable name in the same subroutine    */
+           if ( !strcasecmp(newvar->var->v_nomvar,coupletmp->c_namevar) &&
+                !strcasecmp(newvar->var->v_subroutinename,
+                                       pointtmplist->t_cursubroutine) &&
+                 strcasecmp(coupletmp->c_namepointedvar,"")
+              )
+           {
+              outvar = 1;
+              strcpy(newvar->var->v_oldname,newvar->var->v_nomvar);
+              strcpy(newvar->var->v_nomvar,coupletmp->c_namepointedvar);
+           }
+           else
+           {
+              newvar = newvar->suiv;
+           }
+         }
+         coupletmp = coupletmp->suiv;
+     }
+     pointtmplist = pointtmplist->suiv;
+  }
+}
+
+/******************************************************************************/
+/*                             CopyRecord                                     */
+/******************************************************************************/
+/*                                                                            */
+/******************************************************************************/
+void CopyRecord(variable *var1,variable *var2)
+{
+   if ( !strcasecmp(var1->v_typevar,"") )
+                                        strcpy(var1->v_typevar,var2->v_typevar);
+   else strcpy(var2->v_typevar,var1->v_typevar);
+
+   if ( !strcasecmp(var1->v_oldname,"") )
+                                        strcpy(var1->v_oldname,var2->v_oldname);
+   else strcpy(var2->v_oldname,var1->v_oldname);
+
+   if ( !strcasecmp(var1->v_dimchar,"") )
+                                        strcpy(var1->v_dimchar,var2->v_dimchar);
+   else strcpy(var2->v_dimchar,var1->v_dimchar);
+
+   if ( !strcasecmp(var1->v_commonname,"") )
+                                  strcpy(var1->v_commonname,var2->v_commonname);
+   else strcpy(var2->v_commonname,var1->v_commonname);
+   
+   printf("modulenameII = %s %s %d %s\n",var1->v_modulename,var2->v_modulename,var1->v_module,var1->v_nomvar);
+
+   if ( !strcasecmp(var1->v_modulename,"") || (var1->v_module ==0))
+                                  strcpy(var1->v_modulename,var2->v_modulename);
+   else strcpy(var2->v_modulename,var1->v_modulename);
+
+   if ( !strcasecmp(var1->v_vallengspec,"") )
+                                strcpy(var1->v_vallengspec,var2->v_vallengspec);
+   else strcpy(var2->v_vallengspec,var1->v_vallengspec);
+
+   if ( !strcasecmp(var1->v_nameinttypename,"") )
+                        strcpy(var1->v_nameinttypename,var2->v_nameinttypename);
+   else strcpy(var2->v_nameinttypename,var1->v_nameinttypename);
+          
+   if ( !strcasecmp(var1->v_commoninfile,"") )
+                              strcpy(var1->v_commoninfile,var2->v_commoninfile);
+   else strcpy(var2->v_commoninfile,var1->v_commoninfile);
+
+   if ( !strcasecmp(var1->v_precision,"") )
+                                    strcpy(var1->v_precision,var2->v_precision);
+   else strcpy(var2->v_precision,var1->v_precision);
+
+   if ( !strcasecmp(var1->v_initialvalue,"") )
+                              strcpy(var1->v_initialvalue,var2->v_initialvalue);
+   else strcpy(var2->v_initialvalue,var1->v_initialvalue);
+
+   if ( !strcasecmp(var1->v_IntentSpec,"") )
+                                  strcpy(var1->v_IntentSpec,var2->v_IntentSpec);
+   else strcpy(var2->v_IntentSpec,var1->v_IntentSpec);
+
+   if ( !strcasecmp(var1->v_readedlistdimension,"") )
+                strcpy(var1->v_readedlistdimension,var2->v_readedlistdimension);
+   else strcpy(var2->v_readedlistdimension,var1->v_readedlistdimension);
+
+   if ( var1->v_dimension ) var2->v_dimension = var1->v_dimension ;
+   else var1->v_dimension = var2->v_dimension ;
+
+   if ( var1->v_nbdim == 0 ) var1->v_nbdim = var2->v_nbdim ;
+   else var2->v_nbdim = var1->v_nbdim ;
+
+   if ( var1->v_common == 0 ) var1->v_common = var2->v_common ;
+   else var2->v_common = var1->v_common ;
+
+   if ( var1->v_positioninblock == 0 ) var1->v_positioninblock =
+                                                       var2->v_positioninblock ;
+   else var2->v_positioninblock = var1->v_positioninblock ;
+
+   if ( var1->v_module == 0 ) var1->v_module = var2->v_module ;
+   else var2->v_module = var1->v_module ;
+
+   if ( var1->v_save == 0 ) var1->v_save = var2->v_save ;
+   else var2->v_save = var1->v_save ;
+   
+   if ( var1->v_VariableIsParameter == 0 )
+                     var1->v_VariableIsParameter = var2->v_VariableIsParameter ;
+                    
+   else var2->v_VariableIsParameter = var1->v_VariableIsParameter ;
+   if ( var1->v_indicetabvars == 0 )
+   {
+   
+                                 var1->v_indicetabvars = var2->v_indicetabvars ;
+       printf("HERHEHR %s mm %s mm %d\n",var1->v_nomvar,var2->v_modulename,var2->v_indicetabvars);
+                                 }
+   else var2->v_indicetabvars = var1->v_indicetabvars ;
+
+   if ( var1->v_ExternalDeclare == 0 )
+                             var1->v_ExternalDeclare = var2->v_ExternalDeclare ;
+   else var2->v_ExternalDeclare = var1->v_ExternalDeclare ;
+
+   if ( var1->v_pointedvar == 0 ) var1->v_pointedvar = var2->v_pointedvar ;
+   else var2->v_pointedvar = var1->v_pointedvar ;
+
+   if ( var1->v_dimensiongiven == 0 )
+                                var1->v_dimensiongiven = var2->v_dimensiongiven;
+   else var2->v_dimensiongiven = var1->v_dimensiongiven ;
+
+   if ( var1->v_c_star == 0 ) var1->v_c_star = var2->v_c_star;
+   else var2->v_c_star = var1->v_c_star ;
+
+   if ( var1->v_pointerdeclare == 0 )
+                               var1->v_pointerdeclare = var2->v_pointerdeclare ;
+   else var2->v_pointerdeclare = var1->v_pointerdeclare ;
+
+
+   if ( var1->v_notgrid == 0 ) var1->v_notgrid = var2->v_notgrid ;
+   else var2->v_notgrid = var1->v_notgrid;
+
+   if ( var1->v_optionaldeclare == 0 )
+                              var1->v_optionaldeclare = var2->v_optionaldeclare;
+   else var2->v_optionaldeclare = var1->v_optionaldeclare ;
+
+   if ( var1->v_allocatable == 0 ) var1->v_allocatable = var2->v_allocatable ;
+   else var2->v_allocatable = var1->v_allocatable ;
+   
+   if ( var1->v_target == 0 ) var1->v_target = var2->v_target ;
+   else var2->v_target = var1->v_target ;
+
+   if ( var1->v_dimsempty == 0 ) var1->v_dimsempty = var2->v_dimsempty ;
+   else var2->v_dimsempty = var1->v_dimsempty ;
+}
+
+
+/******************************************************************************/
+/*                      Update_List_Subroutine_Var                            */
+/******************************************************************************/
+/*                                                                            */
+/******************************************************************************/
+void Update_List_Subroutine_Var(listvar *list_to_modify)
+{
+   listvar *parcours;
+   listvar *parcoursprec;
+   listvar *parcours1;
+   int out;
+
+   parcoursprec = (listvar *)NULL;
+   parcours = list_to_modify;
+   while( parcours )
+   {
+      /* looking in List_SubroutineDeclaration_Var                            */
+      parcours1 = List_SubroutineDeclaration_Var;
+      out = 0;
+      while ( parcours1 && out == 0 )
+      {
+         if ( !strcasecmp(parcours->var->v_nomvar,
+                          parcours1->var->v_nomvar)         &&
+              !strcasecmp(parcours->var->v_subroutinename,
+                          parcours1->var->v_subroutinename) &&
+              !strcasecmp(parcours->var->v_modulename,
+                          parcours1->var->v_modulename)
+            ) out = 1;
+         else parcours1 = parcours1->suiv;
+      }
+      /* if variable has been found                                           */
+
+      if ( out == 1 ) CopyRecord(parcours->var,parcours1->var);
+      
+      /* looking in List_Dimension_Var                                        */
+      if (out == 0 )
+      {
+        parcours1 = List_Dimension_Var;
+        out = 0;
+        while ( parcours1 && out == 0 )
+        {
+           if ( !strcasecmp(parcours->var->v_nomvar,
+                            parcours1->var->v_nomvar)         &&
+                !strcasecmp(parcours->var->v_subroutinename,
+                            parcours1->var->v_subroutinename) &&
+                !strcasecmp(parcours->var->v_modulename,
+                            parcours1->var->v_modulename)
+              ) out = 1;
+           else
+           {
+              parcoursprec = parcours1;
+              parcours1 = parcours1->suiv;
+           }
+        }
+        /* if variable has been found                                         */
+        
+        if ( out == 1 )
+        {
+           CopyRecord(parcours->var,parcours1->var);
+           /* we should remove this record from the List_Dimension_Var        */
+           if ( parcours1 == List_Dimension_Var )
+           {
+              List_Dimension_Var = List_Dimension_Var -> suiv;
+           }
+           else
+           {
+              parcoursprec->suiv = parcours1 -> suiv;
+           }
+        }
+      }
+      /*                                                                      */
+      parcours = parcours->suiv;
+   }
+}
+
+void Update_List_Global_Var_From_List_Save_Var()
+{
+   listvar *parcours;
+   listvar *newvar;
+   char ligne[LONG_C];
+
+   parcours = List_Save_Var;
+   while( parcours )
+   {
+      if ( !strcasecmp(parcours->var->v_modulename,"") )
+      /* Save in subroutine which is not defined in a module                  */
+      {
+         newvar = (listvar *)malloc(sizeof(listvar));
+         newvar->var = (variable *)malloc(sizeof(variable));
+         /*                                                                   */
+         Init_Variable(newvar->var);
+         /*                                                                   */
+         newvar->suiv = NULL;
+         CopyRecord(parcours->var,newvar->var);
+         strcpy(newvar->var->v_subroutinename,parcours->var->v_subroutinename);
+         strcpy(newvar->var->v_nomvar,parcours->var->v_nomvar);
+
+         sprintf(ligne,"save_%s",parcours->var->v_subroutinename);
+         Add_NameOfCommon_1(ligne,parcours->var->v_subroutinename);
+         strcpy(newvar->var->v_commonname,ligne);
+         Save_Length(ligne,7);
+         List_Common_Var = AddListvarToListvar(newvar,List_Common_Var,1);
+      }
+      else
+      /* Save in subroutine which is defined in a module                      */
+      {
+         newvar = (listvar *)malloc(sizeof(listvar));
+         newvar->var = (variable *)malloc(sizeof(variable));
+         /*                                                                   */
+         Init_Variable(newvar->var);
+         /*                                                                   */
+         newvar->suiv = NULL;
+
+         CopyRecord(parcours->var,newvar->var);
+         strcpy(newvar->var->v_subroutinename,parcours->var->v_subroutinename);
+
+         strcpy(newvar->var->v_nomvar,parcours->var->v_nomvar);
+
+         strcpy(newvar->var->v_modulename,parcours->var->v_modulename);
+         List_Global_Var = AddListvarToListvar(newvar,List_Global_Var,1);
+      }
+      parcours = parcours->suiv;
+   }
+}
+
+/******************************************************************************/
+/*                      Update_List_From_Common_Var                           */
+/******************************************************************************/
+/*                                                                            */
+/******************************************************************************/
+void Update_List_From_Common_Var(listvar *list_to_modify)
+{
+   listvar *parcours;
+   listvar *parcours1;
+   int out;
+   parcours = list_to_modify;
+   while( parcours )
+   {
+      /* looking in List_Global_Var                                           */
+      parcours1 = List_Common_Var;
+      out = 0;
+      while ( parcours1 && out == 0 )
+      {
+
+         if ( !strcasecmp(parcours->var->v_nomvar,
+                          parcours1->var->v_nomvar)         &&
+              !strcasecmp(parcours->var->v_subroutinename,
+                          parcours1->var->v_subroutinename)
+            ) {
+            out = 1;     
+            }
+         else parcours1 = parcours1->suiv;
+      }
+      /* if variable has been found                                           */
+      if ( out == 1 )
+      {
+         strcpy(parcours->var->v_commoninfile,parcours1->var->v_commoninfile);
+             
+         CopyRecord(parcours->var,parcours1->var);
+      }
+      parcours = parcours->suiv;
+   }
+}
+
+/******************************************************************************/
+/*                          Update_List_Var                                   */
+/******************************************************************************/
+/*                                                                            */
+/******************************************************************************/
+void Update_List_Var(listvar *list_to_modify)
+{
+   listvar *parcours;
+   listvar *parcours1;
+   int out;
+   int out2;
+   
+   parcours = list_to_modify;
+
+   while( parcours )
+   {
+     printf("LE NOM EST %s\n",parcours->var->v_nomvar);
+      /* looking in List_Global_Var                                           */
+      
+      out = 0;
+      
+//       if (list_to_modify != List_SubroutineDeclaration_Var && list_to_modify != List_UsedInSubroutine_Var) {
+//       parcours1 = List_Global_Var;
+//       while ( parcours1 && out == 0 )
+//       {
+//          if ( !strcasecmp(parcours->var->v_nomvar,
+//                           parcours1->var->v_nomvar)         &&
+//               !strcasecmp(parcours->var->v_modulename,
+//                           parcours1->var->v_modulename)
+//             ) out = 1;
+//          else parcours1 = parcours1->suiv;
+//       }
+//       }
+      
+  //    if (list_to_modify == List_UsedInSubroutine_Var) {
+      parcours1 = List_Global_Var;
+      while ( parcours1 && out == 0 )
+      {
+      printf("lenombis est %s\n",parcours1->var->v_nomvar);
+         if ( !strcasecmp(parcours->var->v_nomvar,
+                             parcours1->var->v_nomvar)         &&
+                 !strcasecmp(parcours->var->v_subroutinename,
+                             parcours1->var->v_subroutinename) &&
+                 !strcasecmp(parcours->var->v_modulename,
+                             parcours1->var->v_modulename)
+            ) {
+            out = 1;
+            }
+         else parcours1 = parcours1->suiv;
+      }
+//      }      
+
+      /* if variable has been found                                           */
+      if ( out == 1 ) {
+      CopyRecord(parcours->var,parcours1->var);
+      }
+      /* looking in List_SubroutineDeclaration_Var                            */
+      else
+      {
+         parcours1 = List_SubroutineDeclaration_Var ;
+         out = 0;
+         while ( parcours1)
+         {
+            if ( !strcasecmp(parcours->var->v_nomvar,
+                             parcours1->var->v_nomvar)         &&
+                 !strcasecmp(parcours->var->v_subroutinename,
+                             parcours1->var->v_subroutinename) &&
+                 !strcasecmp(parcours->var->v_modulename,
+                             parcours1->var->v_modulename)
+               ) {
+
+               out = 1;
+               break;
+               }
+            else parcours1 = parcours1->suiv;
+         }
+             
+         /* if variable has been found                                        */
+         if ( out == 1 ) {
+         CopyRecord(parcours->var,parcours1->var);
+        
+         }
+         else
+         {
+            parcours1 = List_Common_Var ;
+            out = 0;
+            while ( parcours1 && out == 0 )
+            {
+               if ( !strcasecmp(parcours->var->v_nomvar,
+                                parcours1->var->v_nomvar)         &&
+                    !strcasecmp(parcours->var->v_subroutinename,
+                                parcours1->var->v_subroutinename) &&
+                    !strcasecmp(parcours->var->v_modulename,
+                                parcours1->var->v_modulename)
+                  ) out = 1;
+               else parcours1 = parcours1->suiv;
+            }
+            /* if variable has been found                                     */
+            if ( out == 1 ) {
+            CopyRecord(parcours->var,parcours1->var);       
+            }
+         }
+      }
+      parcours = parcours->suiv;
+   }
+   
+}
+
+
+void List_UsedInSubroutine_Var_Update_From_Module_Used()
+{
+   listvar *parcours;
+   listvar *parcours3;
+   listusemodule *parcours2;
+   int out;
+
+   
+   parcours = List_UsedInSubroutine_Var;
+   while( parcours )
+   {
+      out = 0 ;
+      printf("OIEROZEIR %s %s\n",parcours->var->v_nomvar,parcours->var->v_modulename);
+      if ( parcours->var->v_indicetabvars == 0 )
+      {
+       printf("OIEROZEIR %s\n",parcours->var->v_nomvar);
+         parcours2 = List_NameOfModuleUsed;
+         while( parcours2 )
+         {
+            if ( !strcasecmp(parcours2->u_cursubroutine,"") &&
+                 !strcasecmp(parcours2->u_modulename,
+                             parcours->var->v_modulename)
+               )
+            {
+               parcours3 = List_Global_Var;
+               out = 0 ;
+               while ( parcours3 && out == 0 )
+               {
+                  if ( !strcasecmp(parcours->var->v_nomvar,
+                                   parcours3->var->v_nomvar)
+                     ) out = 1 ;
+                  else parcours3 = parcours3->suiv;
+               }
+               if ( out == 1 ) CopyRecord(parcours->var,parcours3->var);
+            }
+            else if ( !strcasecmp(parcours2->u_cursubroutine,
+                             parcours->var->v_subroutinename) &&
+                 !strcasecmp(parcours2->u_modulename,
+                             parcours->var->v_modulename)
+               )
+            {
+               parcours3 = List_Global_Var;
+               out = 0 ;
+               while ( parcours3 && out == 0 )
+               {
+                  if ( !strcasecmp(parcours->var->v_nomvar,
+                                   parcours3->var->v_nomvar)
+                     ) out = 1 ;
+                  else parcours3 = parcours3->suiv;
+               }
+               if ( out == 1 ) CopyRecord(parcours->var,parcours3->var);
+            }
+            parcours2 = parcours2->suiv;
+         }
+         /*                                                                   */
+         if ( out == 0 )
+         {
+            parcours3 = List_ModuleUsed_Var;
+            out = 0 ;
+            while ( parcours3 && out == 0 )
+            {
+               if ( !strcasecmp(parcours->var->v_nomvar,
+                                parcours3->var->v_nomvar)
+                  ) out = 1 ;
+               else parcours3 = parcours3->suiv;
+            }
+            if ( out == 1 ) CopyRecord(parcours->var,parcours3->var);
+         }
+         /*                                                                   */
+      }
+      parcours = parcours->suiv;
+   }
+}
+
+
+
+/******************************************************************************/
+/*                       Update_NotGridDepend_Var                             */
+/******************************************************************************/
+/*                                                                            */
+/******************************************************************************/
+void Update_NotGridDepend_Var(listvar *list_to_modify)
+{
+   listvar *parcours;
+   listvar *parcours1;
+   int out;
+
+   parcours = list_to_modify;
+   while( parcours )
+   {
+      /* looking in List_Global_Var                                           */
+      parcours1 = List_Global_Var;
+      out = 0;
+      while ( parcours1 && out == 0 )
+      {
+         if ( !strcasecmp(parcours->var->v_nomvar,
+                          parcours1->var->v_nomvar)
+            ) out = 1;
+         else parcours1 = parcours1->suiv;
+      }
+      /* if variable has been found                                           */
+      if ( out == 1 )
+      {
+         CopyRecord(parcours->var,parcours1->var);
+         strcpy(parcours->var->v_subroutinename,
+                parcours1->var->v_subroutinename);
+         strcpy(parcours->var->v_modulename,parcours1->var->v_modulename);
+      }
+      parcours = parcours->suiv;
+   }
+}
+
+int LookingForVariableInList(listvar *listin,variable *var)
+{
+   listvar *parcours1;
+   int out;
+
+   parcours1 = listin;
+   out = 0 ;
+   while ( parcours1 && out == 0 )
+   {
+      if ( !strcasecmp(var->v_nomvar,parcours1->var->v_nomvar)                &&
+           !strcasecmp(var->v_subroutinename,parcours1->var->v_subroutinename)&&
+           !strcasecmp(var->v_modulename,parcours1->var->v_modulename)        &&
+                       var->v_save == 0                                       &&
+                       var->v_common == 0
+         ) out = 1 ;
+      else parcours1 = parcours1 -> suiv;
+   }
+
+   return out;
+}
+
+int LookingForVariableInListGlobal(listvar *listin,variable *var)
+{
+   listvar *parcours1;
+   int out;
+
+   parcours1 = listin;
+   out = 0 ;
+   while ( parcours1 && out == 0 )
+   {
+      if ( !strcasecmp(var->v_nomvar,parcours1->var->v_nomvar)                &&
+           !strcasecmp(var->v_subroutinename,parcours1->var->v_subroutinename)&&
+           !strcasecmp(var->v_modulename,parcours1->var->v_modulename)
+         ) out = 1 ;
+      else parcours1 = parcours1 -> suiv;
+   }
+
+   return out;
+}
+
+int LookingForVariableInListName(listvar *listin,char *name)
+{
+   listvar *parcours1;
+   int out;
+
+   parcours1 = listin;
+   out = 0 ;
+   while ( parcours1 && out == 0 )
+   {
+      if ( !strcasecmp(name,parcours1->var->v_nomvar) &&
+           ( !strcasecmp(subroutinename,parcours1->var->v_subroutinename) ||
+             !strcasecmp(subroutinename,"") )
+         ) out = 1 ;
+      else parcours1 = parcours1 -> suiv;
+   }
+
+   return out;
+}
+
+int LookingForVariableInListGlob(listvar *listin,variable *var)
+{
+   listvar *parcours1;
+   int out;
+
+   parcours1 = listin;
+   out = 0 ;
+   while ( parcours1 && out == 0 )
+   {
+      if ( !strcasecmp(var->v_nomvar,parcours1->var->v_nomvar)                &&
+           !strcasecmp(var->v_modulename,parcours1->var->v_modulename)
+         ) out = 1 ;
+      else parcours1 = parcours1 -> suiv;
+   }
+
+   return out;
+}
+
+int LookingForVariableInListParamGlob(listparameter *listin,variable *var)
+{
+   listparameter *parcours1;
+   int out;
+
+   parcours1 = listin;
+   out = 0 ;
+   while ( parcours1 && out == 0 )
+   {
+      if ( !strcasecmp(var->v_nomvar,parcours1->p_name)
+         ) out = 1 ;
+      else parcours1 = parcours1 -> suiv;
+   }
+
+   return out;
+}
+
+void UpdateListDeclarationWithDimensionList()
+{
+   List_SubroutineDeclaration_Var = AddListvarToListvar(List_Dimension_Var,
+                                              List_SubroutineDeclaration_Var,1);
+}
+
+
+/* Remove from List_UsedInSubroutine_Var all variables comming from :         */
+/*       - List_SubroutineArgument_Var                                        */
+/*       - List_SubroutineDeclaration_Var                                     */
+/*       - List_Parameter_Var                                                 */
+/*       - List_FunctionType_Var                                              */
+/*       - List_GlobalParameter_Var                                           */
+/*       -                                                                    */
+/*       -                                                                    */
+void Clean_List_UsedInSubroutine_Var()
+{
+   listvar *parcours;
+   listvar *parcoursprec;
+   int remove;
+    
+        
+   parcoursprec = (listvar *)NULL;
+   parcours = List_UsedInSubroutine_Var;
+   while ( parcours )
+   {
+      /*                                                                      */
+      remove = LookingForVariableInListGlobal(List_SubroutineArgument_Var,
+                                                                 parcours->var);
+      if ( remove == 0 )
+           remove = LookingForVariableInList(List_SubroutineDeclaration_Var,
+                                                                 parcours->var);
+
+      if ( remove == 0 )
+           remove = LookingForVariableInList(List_Parameter_Var,
+                                                                 parcours->var);
+      if ( remove == 0 )
+           remove = LookingForVariableInList(List_FunctionType_Var,
+                                                                 parcours->var);
+      if ( remove == 0 )
+           remove = LookingForVariableInListGlob(List_GlobalParameter_Var,
+                                                                 parcours->var);
+      
+      if ( remove == 0 )
+           remove = LookingForVariableInListParamGlob(
+                                    List_GlobParamModuleUsed_Var,parcours->var);
+
+  
+      if ( remove == 0 )
+      {
+         if ( VariableIsInList(parcours,List_Global_Var)                 == 1 ||
+              VariableIsInListCommon(parcours,List_Common_Var)           == 1 ||
+              VariableIsInList(parcours,List_ModuleUsed_Var)             == 1 ||
+              VariableIsInList(parcours,List_ModuleUsedInModuleUsed_Var) == 1
+            ) remove = 0;
+         else remove = 1;
+      }
+
+      /************************************************************************/
+      /*                         Remove                                       */
+      /************************************************************************/
+
+      if ( remove == 1 )
+      {
+         if ( parcours == List_UsedInSubroutine_Var )
+         {
+           List_UsedInSubroutine_Var = List_UsedInSubroutine_Var -> suiv;
+           parcours = List_UsedInSubroutine_Var;
+         }
+         else
+         {
+            parcoursprec->suiv = parcours->suiv;
+            parcours = parcoursprec -> suiv ;
+         }
+      }
+      else
+      {
+         parcoursprec = parcours;
+         parcours = parcours -> suiv ;
+      }
+   }
+   
+
+}
+
+
+void Clean_List_ModuleUsed_Var()
+{
+   listvar *parcours;
+   listvar *parcours1;
+   listvar *parcoursprec;
+   int remove;
+
+   parcoursprec = (listvar *)NULL;
+   parcours = List_ModuleUsed_Var;
+   while ( parcours )
+   {
+      /*                                                                      */
+      parcours1 = List_GlobalParameter_Var;
+      remove = 0 ;
+      while ( parcours1 && remove == 0 )
+      {
+         if ( !strcasecmp(parcours->var->v_nomvar,parcours1->var->v_nomvar)
+            ) remove = 1 ;
+         else parcours1 = parcours1 -> suiv;
+      }
+      /************************************************************************/
+      /*                         Remove                                       */
+      /************************************************************************/
+      if ( remove == 1 )
+      {
+         if ( parcours == List_ModuleUsed_Var )
+         {
+           List_ModuleUsed_Var = List_ModuleUsed_Var -> suiv;
+           parcours = List_ModuleUsed_Var;
+         }
+         else
+         {
+            parcoursprec->suiv = parcours->suiv;
+            parcours = parcoursprec -> suiv ;
+         }
+      }
+      else
+      {
+         parcoursprec = parcours;
+         parcours = parcours -> suiv ;
+      }
+   }
+
+}
+
+void Clean_List_SubroutineDeclaration_Var()
+{
+   listvar *parcours;
+   listvar *parcours1;
+   listvar *parcoursprec;
+   int out ;
+           
+   parcoursprec = (listvar *)NULL;
+   parcours = List_SubroutineDeclaration_Var;
+   while ( parcours )
+   {
+      parcours1 = List_FunctionType_Var;
+      out = 0 ;
+      while ( parcours1 && out == 0 )
+      {
+         if ( !strcasecmp(parcours->var->v_subroutinename,
+                          parcours1->var->v_subroutinename) &&
+              !strcasecmp(parcours->var->v_nomvar,
+                          parcours1->var->v_nomvar)
+            ) out = 1;
+         else parcours1 = parcours1->suiv;
+      }
+      if ( out == 0 )
+      {
+         parcours1 = List_SubroutineArgument_Var;
+         out = 0 ;
+         while ( parcours1 && out == 0 )
+         {
+            if ( !strcasecmp(parcours->var->v_subroutinename,
+                             parcours1->var->v_subroutinename) &&
+                 !strcasecmp(parcours->var->v_nomvar,
+                             parcours1->var->v_nomvar)
+               ) out = 1;
+            else parcours1 = parcours1->suiv;
+         }
+      }
+
+      if ( out == 1 )
+      {
+          if ( parcours == List_SubroutineDeclaration_Var )
+          {
+             List_SubroutineDeclaration_Var =
+                                         List_SubroutineDeclaration_Var -> suiv;
+             parcours = List_SubroutineDeclaration_Var;
+          }
+          else
+          {
+             parcoursprec->suiv = parcours->suiv;
+             parcours = parcoursprec->suiv;
+          }
+      }
+      else
+      {
+         parcoursprec = parcours;
+         parcours = parcours -> suiv;
+      }
+   }
+       
+}
+
+void Clean_List_Global_Var()
+{
+   listvar *parcours;
+   listvar *parcours2;
+   listvar *parcoursprec;
+   listvar *parcours2prec;
+
+   parcoursprec = (listvar *)NULL;
+   parcours2prec = (listvar *)NULL;
+   parcours = List_Global_Var;
+   while ( parcours )
+   {
+      if ( parcours->var->v_VariableIsParameter == 1 )
+      {
+         /* remove                                                            */
+         if ( parcours == List_Global_Var )
+         {
+            List_Global_Var = List_Global_Var->suiv;
+            free(parcours);
+            parcours = List_Global_Var;
+         }
+         else
+         {
+            parcoursprec->suiv = parcours->suiv;
+            free(parcours);
+            parcours = parcoursprec->suiv;
+         }
+      }
+      else
+      {
+         parcoursprec = parcours;
+         parcours = parcours->suiv;
+      }
+   }
+   /* looking for sevral declaration of the same variable                     */
+   parcours = List_Global_Var;
+   while ( parcours )
+   {
+      parcours2prec = parcours;
+      parcours2 = parcours->suiv;
+      while ( parcours2 )
+      {
+         if ( !strcasecmp(parcours->var->v_nomvar,
+                         parcours2->var->v_nomvar)     &&
+              !strcasecmp(parcours->var->v_modulename,
+                         parcours2->var->v_modulename) )
+         {
+            CopyRecord(parcours->var,parcours2->var);
+            /* remove var from the parcours2                                  */
+            parcours2prec ->suiv = parcours2->suiv;
+            free(parcours2);
+            parcours2 = parcours2prec ->suiv;
+         }
+         else
+         {
+            parcours2prec = parcours2;
+            parcours2 = parcours2->suiv;
+         }
+      }
+      parcours = parcours->suiv;
+   }
+}
+/******************************************************************************/
+/*                             ListClean                                      */
+/******************************************************************************/
+/*                                                                            */
+/******************************************************************************/
+void ListClean()
+{
+   listvar *newvar;
+
+   Clean_List_ModuleUsed_Var();
+   Clean_List_UsedInSubroutine_Var();
+   Clean_List_SubroutineDeclaration_Var();
+   
+   newvar = (listvar *)NULL;
+/*   newvar = List_Common_Var;*/
+   while(newvar)
+   {
+      printf("----- %s --- %s ---%s---%s---\n",newvar->var->v_nomvar,
+         newvar->var->v_commonname,
+         newvar->var->v_readedlistdimension,
+         newvar->var->v_subroutinename
+      );
+      newvar = newvar -> suiv;
+      printf("+++++++++++++++++++++++++\n");
+   }
+
+}
+
+
+/******************************************************************************/
+/*                             ListUpdate                                     */
+/******************************************************************************/
+/*                                                                            */
+/******************************************************************************/
+void ListUpdate()
+{
+   listvar *newvar;
+        
+   Update_List_Subroutine_Var(List_SubroutineArgument_Var);
+
+
+       
+   Update_List_Subroutine_Var(List_FunctionType_Var);
+   Update_List_Var(List_Parameter_Var);
+   Update_List_Var(List_Dimension_Var);
+   Update_List_Var(List_Data_Var);
+   Update_List_Var(List_Save_Var);
+   Update_List_Var(List_GlobalParameter_Var);
+   Update_List_Var(List_Common_Var);
+   Update_List_Var(List_SubroutineDeclaration_Var);
+   Update_List_Var(List_UsedInSubroutine_Var);
+   Update_List_From_Common_Var(List_UsedInSubroutine_Var);
+   Update_List_From_Common_Var(List_SubroutineDeclaration_Var);
+   Update_NotGridDepend_Var(List_NotGridDepend_Var);
+    
+   newvar =(listvar * )NULL;
+/*   newvar = List_Common_Var;*/
+/*   newvar = List_UsedInSubroutine_Var;*/
+/*   newvar = List_Data_Var;*/
+   while ( newvar )
+   {
+      printf("++++ %s - %d - %s - %s - %s - %s\n",
+      newvar->var->v_nomvar,
+      newvar->var->v_VariableIsParameter,
+      newvar->var->v_subroutinename,
+      newvar->var->v_modulename,
+      newvar->var->v_typevar,
+      newvar->var->v_initialvalue      
+            );
+      newvar = newvar->suiv;
+   }
+}
+
+void GiveTypeOfVariables()
+{
+   listvar *parcours;
+
+   /*                                                                         */
+   parcours = List_Common_Var;
+   while ( parcours )
+   {
+      if ( !strcasecmp(parcours->var->v_typevar,"") )
+      {
+         if ( IsVariableReal(parcours->var->v_nomvar) == 1 )
+                                        strcpy(parcours->var->v_typevar,"REAL");
+         else strcpy(parcours->var->v_typevar,"INTEGER");
+      }
+      parcours = parcours -> suiv ;
+   }
+   /*                                                                         */
+   parcours = List_UsedInSubroutine_Var;
+   while ( parcours )
+   {
+      if ( !strcasecmp(parcours->var->v_typevar,"") )
+      {
+         if ( IsVariableReal(parcours->var->v_nomvar) == 1 )
+                                        strcpy(parcours->var->v_typevar,"REAL");
+         else strcpy(parcours->var->v_typevar,"INTEGER");
+      }
+      parcours = parcours -> suiv ;
+   }
+   /*                                                                         */
+   parcours = List_SubroutineArgument_Var;
+   while ( parcours )
+   {
+      if ( !strcasecmp(parcours->var->v_typevar,"") )
+      {
+         if ( IsVariableReal(parcours->var->v_nomvar) == 1 )
+                                        strcpy(parcours->var->v_typevar,"REAL");
+         else strcpy(parcours->var->v_typevar,"INTEGER");
+      }
+      parcours = parcours -> suiv ;
+   }
+   /*                                                                         */
+   parcours = List_SubroutineDeclaration_Var;
+   while ( parcours )
+   {
+      if ( !strcasecmp(parcours->var->v_typevar,"") )
+      {
+         if ( IsVariableReal(parcours->var->v_nomvar) == 1 )
+                                        strcpy(parcours->var->v_typevar,"REAL");
+         else strcpy(parcours->var->v_typevar,"INTEGER");
+      }
+      parcours = parcours -> suiv ;
+   }
+       
+}
+
+
+
+void Sort_List_SubroutineArgument_Var()
+{
+   listvar *parcours;
+   listvar *parcours1;
+   int position;
+   int out;
+   char name_sub[LONG_C];
+
+   parcours = List_SubroutineArgument_Var;
+   position = 1;
+   while ( parcours )
+   {
+      parcours1 = List_SubroutineDeclaration_Var;
+      out = 0;
+      while ( parcours1 && out == 0 )
+      {
+         if ( !strcasecmp(parcours->var->v_nomvar,
+                         parcours1->var->v_nomvar)  &&
+              !strcasecmp(parcours->var->v_subroutinename,
+                         parcours1->var->v_subroutinename)
+             )
+         {
+            parcours1->var->v_positioninblock = position;
+            position = position +1 ;
+            out = 1;
+         }
+         else parcours1 = parcours1->suiv;
+      }
+      parcours = parcours->suiv;
+   }
+   /*                                                                         */
+   parcours = List_SubroutineDeclaration_Var;
+   strcpy(name_sub,"");
+   while ( parcours )
+   {
+      if ( !strcasecmp(name_sub,"") )
+      {
+         strcpy(name_sub,parcours->var->v_subroutinename);
+         position = 1;
+      }
+
+      if ( parcours->var->v_positioninblock != 0 )
+      {
+         parcours1 = List_SubroutineArgument_Var;
+         out = 0;
+         while ( parcours1 && out == 0 )
+         {
+            if ( !strcasecmp(parcours->var->v_nomvar,
+                            parcours1->var->v_nomvar)  &&
+                 !strcasecmp(parcours->var->v_subroutinename,
+                            parcours1->var->v_subroutinename)
+                )
+            {
+               parcours1->var->v_positioninblock = position;
+               position = position +1 ;
+               out = 1;
+            }
+            else parcours1 = parcours1->suiv;
+         }
+      }
+      if ( parcours->suiv )
+         if ( strcasecmp(name_sub,parcours->suiv->var->v_subroutinename) )
+            strcpy(name_sub,"");
+      parcours = parcours->suiv;
+   }
+       
+}
+
+
+
+/******************************************************************************/
+/*                      IndiceTabvars_Global_Var_Treated                      */
+/******************************************************************************/
+/*                                                                            */
+/******************************************************************************/
+void IndiceTabvars_Global_Var_Treated(char *nom)
+{
+   listvar *parcours;
+   listvar *parcoursprec;
+   listvar *parcours1;
+   listvar *List_ModuleUsed_Var;
+   listindice *newindice;
+   int out;
+
+   parcoursprec = (listvar *)NULL;
+
+   if ( mark == 1 ) printf("MODULE Treated %s \n",nom);
+
+   List_ModuleUsed_Var = (listvar *)NULL;
+   List_ModuleUsed_Var = Readthedependfile(nom,List_ModuleUsed_Var);
+
+   parcours = List_Global_Var;
+   while( parcours )
+   {
+      if ( !strcasecmp(parcours->var->v_modulename,nom) )
+      {
+         parcours1 = List_ModuleUsed_Var;
+         out = 0 ;
+         while ( parcours1 && out == 0 )
+         {
+            if ( !strcasecmp(parcours->var->v_nomvar,parcours1->var->v_nomvar)
+               ) out = 1;
+            else
+            {
+               parcoursprec = parcours1 ;
+               parcours1 = parcours1->suiv;
+            }
+         }
+         /* if we found the var Module name in the old list                   */
+         if ( out == 1 )
+         {
+            CopyRecord(parcours->var,parcours1->var);
+            /* Remove this variable from the List_ModuleUsed_Var              */
+            if ( parcours1 == List_ModuleUsed_Var )
+            {
+               List_ModuleUsed_Var = List_ModuleUsed_Var->suiv ;
+            }
+            else
+            {
+               parcoursprec->suiv = parcours1->suiv;
+               free(parcours1);
+               parcours1 = parcoursprec->suiv;
+            }
+         }
+         else
+         /* if we do not found the var Module name in the old list            */
+         {
+            if ( Listofavailableindices )
+            {
+               parcours->var->v_indicetabvars = Listofavailableindices ->
+                                                                       i_indice;
+               if ( Listofavailableindices->suiv )
+                          Listofavailableindices = Listofavailableindices->suiv;
+               else
+                          Listofavailableindices = (listindice *)NULL;
+            }
+            else
+            {
+               indicemaxtabvars = indicemaxtabvars + 1 ;
+               parcours->var->v_indicetabvars = indicemaxtabvars;
+            }
+         }
+      }
+      parcours = parcours->suiv;
+   }
+   /* if List_ModuleUsed_Var is not empty, some var have been removed from    */
+   /*    the last treatement                                                  */
+  parcours1 = List_ModuleUsed_Var;
+  while ( parcours1 )
+  {
+     newindice=(listindice *) malloc (sizeof (listindice));
+     newindice -> i_indice = parcours1 -> var -> v_indicetabvars;
+     newindice -> suiv = Listofavailableindices;
+     Listofavailableindices = newindice;
+     parcours1 = parcours1->suiv;
+  }
+}
+/******************************************************************************/
+/*                       IndiceTabvars_Global_Var_No_Treated                  */
+/******************************************************************************/
+/*                                                                            */
+/******************************************************************************/
+void IndiceTabvars_Global_Var_No_Treated(char *nom)
+{
+   listvar *parcours;
+
+   if ( mark == 1 ) printf("MODULE No Treated %s \n",nom);
+
+   parcours = List_Global_Var;
+   while( parcours )
+   {
+      if ( !strcasecmp(parcours->var->v_modulename,nom) &&
+           parcours->var->v_VariableIsParameter == 0    &&
+           parcours->var->v_notgrid == 0
+          )
+      {
+         indicemaxtabvars = indicemaxtabvars + 1 ;
+         parcours->var->v_indicetabvars = indicemaxtabvars;
+      }
+      parcours = parcours->suiv;
+   }
+}
+
+
+void UpdateTheRemainingList(listvar *record)
+{
+   listvar *parcours;
+
+   parcours = record;
+   while ( parcours )
+   {
+      if ( !strcasecmp(parcours->var->v_nomvar,record->var->v_nomvar) &&
+           !strcasecmp(parcours->var->v_commonname,record->var->v_commonname)
+         )
+      {
+         strcpy(parcours->var->v_commoninfile,record->var->v_commoninfile);
+         CopyRecord(parcours->var,record->var);
+      }
+      parcours = parcours -> suiv;
+   }
+}
+
+
+
+/******************************************************************************/
+/*                      IndiceTabvars_Common_Var_Treated                      */
+/******************************************************************************/
+/*                                                                            */
+/******************************************************************************/
+void IndiceTabvars_Common_Var_Treated(char *nom)
+{
+   listvar *parcours;
+   listvar *parcoursprec;
+   listvar *parcours1;
+   listvar *List_CommonUsed_Var;
+   listindice *newindice;
+   int out;
+
+   parcoursprec = (listvar *)NULL;
+
+   if ( mark == 1 ) printf("COMMON Treated %s \n",nom);
+
+   List_CommonUsed_Var = (listvar *)NULL;
+   List_CommonUsed_Var = Readthedependfile(nom,List_CommonUsed_Var);
+
+   parcours = List_Common_Var;
+   while( parcours )
+   {
+      if ( !strcasecmp(parcours->var->v_commonname,nom) )
+      {
+         parcours1 = List_CommonUsed_Var;
+         out = 0 ;
+         while ( parcours1 && out == 0 )
+         {
+
+            if ( !strcasecmp(parcours1->var->v_commonname,nom) &&
+                 !strcasecmp(parcours->var->v_nomvar,parcours1->var->v_nomvar)
+               ) out = 1;
+            else
+            {
+               parcoursprec = parcours1 ;
+               parcours1 = parcours1->suiv;
+            }
+         }
+         /* if we found the var common name in the old list                   */
+         if ( out == 1 )
+         {
+            strcpy(parcours->var->v_commoninfile,
+                   parcours1->var->v_commoninfile);
+            CopyRecord(parcours->var,parcours1->var);
+         }
+         else
+         /* if we do not found the var common name in the old list            */
+         {
+            if ( Listofavailableindices )
+            {
+               parcours->var->v_indicetabvars = Listofavailableindices ->
+                                                                       i_indice;
+               if ( Listofavailableindices->suiv )
+                          Listofavailableindices = Listofavailableindices->suiv;
+               else
+                          Listofavailableindices = (listindice *)NULL;
+            }
+            else
+            {
+               indicemaxtabvars = indicemaxtabvars + 1 ;
+               parcours->var->v_indicetabvars = indicemaxtabvars;
+            }
+         }
+         /* Look in the remaining list in the variable is define              */
+         UpdateTheRemainingList(parcours);
+      }
+      parcours = parcours->suiv;
+   }
+   /* if List_CommonUsed_Var is not empty, some var have been removed from    */
+   /*    the last treatement                                                  */
+  parcours1 = List_CommonUsed_Var;
+  while ( parcours1 )
+  {
+     if ( parcours1 -> var -> v_indicetabvars == 0 )
+     {
+        newindice=(listindice *) malloc (sizeof (listindice));
+        newindice -> i_indice = parcours1 -> var -> v_indicetabvars;
+        newindice -> suiv = Listofavailableindices;
+        Listofavailableindices = newindice;
+     }
+     parcours1 = parcours1->suiv;
+  }
+}
+/******************************************************************************/
+/*                     IndiceTabvars_Common_Var_No_Treated                    */
+/******************************************************************************/
+/*                                                                            */
+/******************************************************************************/
+void IndiceTabvars_Common_Var_No_Treated(char *nom)
+{
+   listvar *parcours;
+   listvar *parcours2;
+
+   if ( mark == 1 ) printf("COMMON No Treated %s \n",nom);
+
+   parcours = List_Common_Var;
+   while( parcours )
+   {
+      if ( !strcasecmp(parcours->var->v_commonname,nom) &&
+           strcasecmp(parcours->var->v_subroutinename,"") &&
+           parcours->var->v_indicetabvars == 0
+          )
+      {
+         indicemaxtabvars = indicemaxtabvars + 1 ;
+         parcours->var->v_indicetabvars = indicemaxtabvars;
+         parcours2 = parcours;
+         while ( parcours2 )
+         {
+            if ( !strcasecmp(parcours->var->v_nomvar,
+                             parcours2->var->v_nomvar) &&
+                 !strcasecmp(parcours->var->v_commonname,
+                             parcours2->var->v_commonname)
+               )
+               parcours2->var->v_indicetabvars = parcours->var->v_indicetabvars;
+            parcours2 = parcours2->suiv;
+         }
+      }
+      parcours = parcours->suiv;
+   }
+}
+
+
+/******************************************************************************/
+/*                       IndiceTabvarsIdentification                          */
+/******************************************************************************/
+/*                                                                            */
+/******************************************************************************/
+void IndiceTabvarsIdentification()
+{
+   listnom *parcours_nom;
+
+   /* Identification of tabvars indices in List_Global_Var                    */
+   parcours_nom = List_NameOfModule;
+   while ( parcours_nom )
+   {
+      if ( Did_module_common_treaded(parcours_nom->o_nom) == 1 )
+      {
+         IndiceTabvars_Global_Var_Treated(parcours_nom->o_nom);
+      }
+      else
+      {
+         IndiceTabvars_Global_Var_No_Treated(parcours_nom->o_nom);
+      }
+      parcours_nom = parcours_nom -> suiv;
+   }
+   /* Identification of tabvars indices in List_Common_Var                    */
+   parcours_nom = List_NameOfCommon;
+   while ( parcours_nom )
+   {
+      if ( Did_module_common_treaded(parcours_nom->o_nom) == 1 )
+      {
+         IndiceTabvars_Common_Var_Treated(parcours_nom->o_nom);
+      }
+      else
+      {
+         IndiceTabvars_Common_Var_No_Treated(parcours_nom->o_nom);
+      }
+      parcours_nom = parcours_nom -> suiv;
+   }
+
+}
+
+void New_Allocate_Subroutine_Is_Necessary()
+{
+   listnom *parcours_nom;
+   listvar *parcours;
+   int out;
+
+   parcours_nom = List_NameOfModule;
+   while ( parcours_nom )
+   {
+      /*                                                                      */
+      parcours = List_Global_Var;
+      out = 0 ;
+      while( parcours && out == 0 )
+      {
+         if ( !strcasecmp(parcours->var->v_modulename,parcours_nom->o_nom) &&
+              !strcasecmp(parcours->var->v_subroutinename,"")            &&
+              parcours->var->v_VariableIsParameter == 0                  &&
+              (parcours->var->v_allocatable == 0  || !strcasecmp(parcours->var->v_typevar,"type"))      &&
+              parcours->var->v_notgrid == 0                              &&
+              ( parcours->var->v_nbdim != 0 ||
+                strcasecmp(parcours->var->v_initialvalue,"")
+              ) ) out = 1;
+         else parcours = parcours -> suiv;
+      }
+      if ( out == 1 )
+      {
+         parcours_nom->o_val = 1 ;
+      }
+      /*                                                                      */
+      parcours_nom = parcours_nom -> suiv;
+   }
+}
+
+void New_Allocate_Subroutine_For_Common_Is_Necessary()
+{
+   listnom *parcours_nom;
+   listvar *parcours;
+   int out;
+
+   parcours_nom = List_NameOfCommon;
+   while ( parcours_nom )
+   {
+      /*                                                                      */
+      parcours = List_Common_Var;
+      out = 0 ;
+      while( parcours && out == 0 )
+      {
+         if ( !strcasecmp(parcours->var->v_commonname,parcours_nom->o_nom)  &&
+              strcasecmp(parcours->var->v_subroutinename,"")                &&
+              !strcasecmp(parcours->var->v_commoninfile,mainfile)           &&
+              ( parcours->var->v_nbdim != 0 ||
+                strcasecmp(parcours->var->v_initialvalue,"")
+              ) ) out = 1;
+         else parcours = parcours -> suiv;
+      }
+      if ( out == 1 )
+      {
+         parcours_nom->o_val = 1 ;
+      }
+      /*                                                                      */
+      parcours_nom = parcours_nom -> suiv;
+   }
+}
+
+void NewModule_Creation_0()
+{
+   listnom *parcours_nom;
+   char ligne[LONG_C];
+   if ( firstpass == 0 )
+   {
+      parcours_nom = List_NameOfCommon;
+      while ( parcours_nom )
+      {
+         if ( parcours_nom->o_val == 1 )
+         {
+            strcpy(ligne,"");
+            tofich(fortranout,ligne,1);
+            sprintf (ligne, "module %s",parcours_nom->o_nom);
+            tofich(fortranout,ligne,1);
+            WriteUsemoduleDeclaration(parcours_nom->o_subroutinename);
+            strcpy(ligne,"implicit none");
+            tofich(fortranout,ligne,1);
+            sprintf (ligne, "public Alloc_agrif_%s",parcours_nom->o_nom);
+            tofich(fortranout,ligne,1);
+            strcpy (ligne, "contains");
+            tofich(fortranout,ligne,1);
+            sprintf (ligne, "subroutine Alloc_agrif_%s(Agrif_Gr)",
+                                                           parcours_nom->o_nom);
+            tofich(fortranout,ligne,1);
+            strcpy(ligne,"Use Agrif_Util");
+            tofich(fortranout,ligne,1);
+            strcpy (ligne, "Type(Agrif_grid), Pointer :: Agrif_Gr");
+            tofich(fortranout,ligne,1);
+            strcpy(ligne, "INTEGER :: i");
+            tofich (fortranout, ligne,1);
+            strcpy (ligne, "\n#include \"alloc_agrif_");
+            strcat (ligne, parcours_nom->o_nom);
+            strcat (ligne, ".h\"\n");
+            fprintf(fortranout,ligne);
+            strcpy (ligne, "Return");
+            tofich(fortranout,ligne,1);
+            sprintf (ligne, "end subroutine Alloc_agrif_%s",
+                                                           parcours_nom->o_nom);
+            tofich(fortranout,ligne,1);
+            sprintf (ligne, "end module %s",parcours_nom->o_nom);
+            tofich(fortranout,ligne,1);
+            /* List all Call Alloc_agrif                                      */
+            Add_Subroutine_For_Alloc(parcours_nom->o_nom);
+         }
+         parcours_nom = parcours_nom->suiv;
+      }
+   }
+}
+
+void UpdateList_SubroutineWhereAgrifUsed()
+{
+   listnom *parcours;
+   listusemodule *parcours1;
+   listallocate *parcours2;
+   listname *parcours3;
+   listvar *parcours4;
+   int out;
+   char name_module[LONG_C];
+
+   /* We should integrate allocate and pointer variables                      */
+   parcours2 = List_Allocate_Var;
+   while ( parcours2 )
+   {
+      parcours4 = List_UsedInSubroutine_Var;
+      out = 0 ;
+      while ( parcours4 && out == 0 )
+      {
+         if ( !strcasecmp(parcours2->a_nomvar,parcours4->var->v_nomvar) )
+         {
+            Add_SubroutineWhereAgrifUsed_1(parcours4->var->v_subroutinename,
+                                           parcours4->var->v_modulename);
+            out = 1;
+         }
+         else parcours4 = parcours4 -> suiv ;
+      }
+      parcours2 = parcours2->suiv;
+   }
+   /*                                                                         */
+   parcours3 = List_Pointer_Var;
+   while ( parcours3 )
+   {
+      parcours4 = List_UsedInSubroutine_Var;
+      out = 0 ;
+      while ( parcours4 && out == 0 )
+      {
+         if ( !strcasecmp(parcours3->n_name,parcours4->var->v_nomvar) )
+         {
+            Add_SubroutineWhereAgrifUsed_1(parcours4->var->v_subroutinename,
+                                           parcours4->var->v_modulename);
+            out = 1;
+         }
+         else parcours4 = parcours4 -> suiv ;
+      }
+      parcours3 = parcours3 -> suiv;
+   }
+   /*                                                                         */
+   parcours4 = List_UsedInSubroutine_Var;
+   while ( parcours4 )
+   {
+      if ( parcours4->var->v_allocatable == 1 && strcasecmp(parcours4->var->v_typevar,"type"))
+      {
+         Add_SubroutineWhereAgrifUsed_1(parcours4->var->v_subroutinename,
+                                        parcours4->var->v_modulename);
+      }
+      parcours4 = parcours4 -> suiv ;
+   }
+   /*                                                                         */
+   parcours = List_SubroutineWhereAgrifUsed;
+   while ( parcours )
+   {
+      parcours1 = List_NameOfModuleUsed;
+      out = 0 ;
+      strcpy(name_module,"");
+      while ( parcours1 && out == 0 )
+      {
+         if ( !strcasecmp(parcours->o_nom,parcours1->u_cursubroutine) &&
+              !strcasecmp(parcours1->u_usemodule,"Agrif_Util")
+            ) out = 1;
+         else
+         {
+            if ( !strcasecmp(parcours->o_nom,parcours1->u_cursubroutine) )
+            {
+               strcpy(name_module,parcours->o_module);
+            }
+            parcours1 = parcours1->suiv;
+         }
+      }
+      /* if out == 0 we should look in the module declaration                 */
+      if ( out == 0 )
+      {
+         parcours1 = List_NameOfModuleUsed;
+         out = 0 ;
+         while ( parcours1 && out == 0 )
+         {
+            if ( !strcasecmp(name_module,parcours1->u_modulename) &&
+                 !strcasecmp(parcours1->u_cursubroutine,"")&&
+                 !strcasecmp(parcours1->u_usemodule,"Agrif_Util")
+               ) out = 1;
+            else parcours1 = parcours1->suiv;
+         }
+      }
+      if ( out == 0 ) parcours->o_val = 1;
+      /*                                                                      */
+      parcours = parcours->suiv;
+   }
+}
+
+
+void UpdateList_UsedInSubroutine_With_dimension()
+{
+   listvar *parcours;
+
+   parcours = List_UsedInSubroutine_Var;
+   while ( parcours )
+   {
+      if ( parcours->var->v_nbdim != 0 )
+      {
+         strcpy(subroutinename,parcours->var->v_subroutinename);
+         DecomposeTheName(parcours->var->v_readedlistdimension);
+         strcpy(subroutinename,"");
+      }
+      parcours = parcours -> suiv;
+   }
+}
+
+void Affiche()
+{
+   listvar *parcours;
+
+   parcours = (listvar *)NULL;
+/*   parcours = List_Global_Var;                  */
+/*   parcours = List_SubroutineDeclaration_Var;   */
+
+/*   parcours = List_SubroutineArgument_Var;      */
+/*   parcours = List_FunctionType_Var;            */
+
+/*   parcours = List_Data_Var;                    */
+/*   parcours = List_Save_Var;                    */
+/*   parcours = List_UsedInSubroutine_Var;        */
+/*   parcours = List_Parameter_Var;               */
+/*   parcours = List_GlobalParameter_Var;         */
+/*   parcours = List_NotGridDepend_Var;           */
+
+/*   parcours = List_Common_Var;                  */
+
+   while( parcours )
+   {
+      printf("module- %s \n",parcours->var->v_modulename);
+      printf("subroutine- %s  \n",parcours->var->v_subroutinename);
+      printf("nom- %s  \n",parcours->var->v_nomvar);
+      printf("common- %s  \n",parcours->var->v_commonname);
+      printf("type- %s  \n",parcours->var->v_typevar);
+      printf("indice- %d  \n",parcours->var->v_indicetabvars);
+      printf("variableisparameter- %d \n",parcours->var->v_VariableIsParameter);
+      printf("module1- %d  \n",parcours->var->v_module);
+      printf("save- %d  \n",parcours->var->v_save);
+      printf("notgrid- %d  \n",parcours->var->v_notgrid);
+      printf("nbdim- %d  \n",parcours->var->v_nbdim);
+      printf("common1- %d  \n",parcours->var->v_common);
+      printf("v_dimensiongiven- %d  \n",parcours->var->v_dimensiongiven);
+      printf("v_dimsempty- %d  \n",parcours->var->v_dimsempty);
+      printf("initialvalue- %s\n \n",parcours->var->v_initialvalue);
+      printf("dim- %s\n \n",parcours->var->v_readedlistdimension);
+
+      parcours = parcours -> suiv ;
+   }
+   if ( mark == 1 ) printf("Indicemaxtabvars = %d \n",indicemaxtabvars);
+   
+}
+
+
+
+
+int SubInList_ContainsSubroutine()
+{
+   int out;
+   listnom *parcours;
+
+   out = 0 ;
+   parcours = List_ContainsSubroutine;
+   while ( parcours && out == 0 )
+   {
+      if ( !strcasecmp(parcours->o_nom,subroutinename) ) out = 1 ;
+      else parcours = parcours -> suiv;
+   }
+
+   return out;
+}
Index: vendors/AGRIF/r_01/LIB/WorkWithvarofsubroutineliste.c
===================================================================
--- vendors/AGRIF/r_01/LIB/WorkWithvarofsubroutineliste.c	(revision 2672)
+++ vendors/AGRIF/r_01/LIB/WorkWithvarofsubroutineliste.c	(revision 2672)
@@ -0,0 +1,105 @@
+/******************************************************************************/
+/*                                                                            */
+/*     CONV (converter) for Agrif (Adaptive Grid Refinement In Fortran)       */
+/*                                                                            */
+/* Copyright or   or Copr. Laurent Debreu (Laurent.Debreu@imag.fr)            */
+/*                        Cyril Mazauric (Cyril_Mazauric@yahoo.fr)            */
+/* This software is governed by the CeCILL-C license under French law and     */
+/* abiding by the rules of distribution of free software.  You can  use,      */
+/* modify and/ or redistribute the software under the terms of the CeCILL-C   */
+/* license as circulated by CEA, CNRS and INRIA at the following URL          */
+/* "http://www.cecill.info".                                                  */
+/*                                                                            */
+/* As a counterpart to the access to the source code and  rights to copy,     */
+/* modify and redistribute granted by the license, users are provided only    */
+/* with a limited warranty  and the software's author,  the holder of the     */
+/* economic rights,  and the successive licensors  have only  limited         */
+/* liability.                                                                 */
+/*                                                                            */
+/* In this respect, the user's attention is drawn to the risks associated     */
+/* with loading,  using,  modifying and/or developing or reproducing the      */
+/* software by the user in light of its specific status of free software,     */
+/* that may mean  that it is complicated to manipulate,  and  that  also      */
+/* therefore means  that it is reserved for developers  and  experienced      */
+/* professionals having in-depth computer knowledge. Users are therefore      */
+/* encouraged to load and test the software's suitability as regards their    */
+/* requirements in conditions enabling the security of their systems and/or   */
+/* data to be ensured and,  more generally, to use and operate it in the      */
+/* same conditions as regards security.                                       */
+/*                                                                            */
+/* The fact that you are presently reading this means that you have had       */
+/* knowledge of the CeCILL-C license and that you accept its terms.           */
+/******************************************************************************/
+/* version 1.7                                                                */
+/******************************************************************************/
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "decl.h"
+
+/******************************************************************************/
+/*                      Add_SubroutineArgument_Var_1                          */
+/******************************************************************************/
+/* Firstpass 1                                                                */
+/* We should complete the                                                     */
+/******************************************************************************/
+/*                                                                            */
+/*                                                                            */
+/******************************************************************************/
+void Add_SubroutineArgument_Var_1(listvar *listtoadd)
+{
+
+   if ( firstpass == 1 )
+   {
+       List_SubroutineArgument_Var = AddListvarToListvar
+                              (listtoadd,List_SubroutineArgument_Var,1);
+   }
+}
+
+/******************************************************************************/
+/*                             Add_FunctionType_Var_1                         */
+/******************************************************************************/
+/* Firstpass 1                                                                */
+/* We should complete the                                                     */
+/******************************************************************************/
+/*                                                                            */
+/*                                                                            */
+/******************************************************************************/
+void Add_FunctionType_Var_1(char *nom)
+{
+   listvar *newvar;
+
+   if ( firstpass == 1 )
+   {
+      curvar=createvar(nom,NULL);
+      strcpy(curvar->v_typevar,DeclType);
+      newvar = insertvar(NULL,curvar);
+      List_FunctionType_Var = AddListvarToListvar
+                              (newvar,List_FunctionType_Var,1);
+   }
+}
+
+
+/******************************************************************************/
+/*                      Add_SubroutineDeclaration_Var_1                       */
+/******************************************************************************/
+/* Firstpass 1                                                                */
+/* We should complete the listvarofsubroutine                                 */
+/******************************************************************************/
+/*                                                                            */
+/*                                                                            */
+/******************************************************************************/
+void Add_SubroutineDeclaration_Var_1 (listvar *listtoadd)
+{
+   if ( firstpass == 1 )
+   {
+      if ( VariableIsParameter == 0 &&
+           SaveDeclare         == 0 )
+      {
+         listduplicated = (listvar *)NULL;
+         duplicatelistvar(listtoadd);
+         List_SubroutineDeclaration_Var = AddListvarToListvar
+                              (listduplicated,List_SubroutineDeclaration_Var,1);
+      }
+   }
+}
Index: vendors/AGRIF/r_01/LIB/WriteInFile.c
===================================================================
--- vendors/AGRIF/r_01/LIB/WriteInFile.c	(revision 2672)
+++ vendors/AGRIF/r_01/LIB/WriteInFile.c	(revision 2672)
@@ -0,0 +1,250 @@
+/******************************************************************************/
+/*                                                                            */
+/*     CONV (converter) for Agrif (Adaptive Grid Refinement In Fortran)       */
+/*                                                                            */
+/* Copyright or   or Copr. Laurent Debreu (Laurent.Debreu@imag.fr)            */
+/*                        Cyril Mazauric (Cyril_Mazauric@yahoo.fr)            */
+/* This software is governed by the CeCILL-C license under French law and     */
+/* abiding by the rules of distribution of free software.  You can  use,      */
+/* modify and/ or redistribute the software under the terms of the CeCILL-C   */
+/* license as circulated by CEA, CNRS and INRIA at the following URL          */
+/* "http://www.cecill.info".                                                  */
+/*                                                                            */
+/* As a counterpart to the access to the source code and  rights to copy,     */
+/* modify and redistribute granted by the license, users are provided only    */
+/* with a limited warranty  and the software's author,  the holder of the     */
+/* economic rights,  and the successive licensors  have only  limited         */
+/* liability.                                                                 */
+/*                                                                            */
+/* In this respect, the user's attention is drawn to the risks associated     */
+/* with loading,  using,  modifying and/or developing or reproducing the      */
+/* software by the user in light of its specific status of free software,     */
+/* that may mean  that it is complicated to manipulate,  and  that  also      */
+/* therefore means  that it is reserved for developers  and  experienced      */
+/* professionals having in-depth computer knowledge. Users are therefore      */
+/* encouraged to load and test the software's suitability as regards their    */
+/* requirements in conditions enabling the security of their systems and/or   */
+/* data to be ensured and,  more generally, to use and operate it in the      */
+/* same conditions as regards security.                                       */
+/*                                                                            */
+/* The fact that you are presently reading this means that you have had       */
+/* knowledge of the CeCILL-C license and that you accept its terms.           */
+/******************************************************************************/
+/* version 1.7                                                                */
+/******************************************************************************/
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "decl.h"
+
+/******************************************************************************/
+/*                            tofich_reste                                    */
+/******************************************************************************/
+/* This subroutine is used to write the string s into the fileout             */
+/******************************************************************************/
+void tofich_reste (FILE * filout, char *s,int returnlineornot)
+{
+  char temp[61];
+  char *tmp;
+  int size;
+  int val_min;
+
+  if (strlen (s) <= 60)
+    {
+      if ( returnlineornot == 0 ) fprintf (filout, "     &%s", s);
+      else if ( returnlineornot == 2 ) fprintf (filout, "&%s", s);
+      else if ( returnlineornot == 3 ) fprintf (filout, "&%s\n", s);
+      else                             fprintf (filout, "     &%s\n", s);
+      if ( returnlineornot == 0 ||
+           returnlineornot == 2 ) colnum=colnum+strlen(s)+6;
+      else colnum=0;
+    }
+  else
+    {
+      val_min = 60;
+      strncpy (temp, s, 60);
+      strcpy (&temp[60], "\0");
+
+      tmp = strrchr(temp, '+');
+      if ( tmp )
+      if ( strlen(tmp) < val_min ) val_min = strlen(tmp);
+      tmp = strrchr(temp, '-');
+      if ( tmp )
+      if ( strlen(tmp) < val_min ) val_min = strlen(tmp);
+      tmp = strrchr(temp, '/');
+      if ( tmp )
+      if ( strlen(tmp) < val_min ) val_min = strlen(tmp);
+      tmp = strrchr(temp, '*');
+      if ( tmp )
+      if ( strlen(tmp) < val_min ) val_min = strlen(tmp);
+      tmp = strrchr(temp, '%');
+      if ( tmp )
+      if ( strlen(tmp) < val_min ) val_min = strlen(tmp);
+      tmp = strrchr(temp, ',');
+      if ( tmp )
+      if ( strlen(tmp) < val_min ) val_min = strlen(tmp);
+      tmp = strrchr(temp, ')');
+      if ( tmp )
+      if ( strlen(tmp) < val_min ) val_min = strlen(tmp);
+      tmp = strrchr(temp, '(');
+      if ( tmp )
+      if ( strlen(tmp) < val_min ) val_min = strlen(tmp);
+
+      size = val_min;
+
+      strcpy (&temp[60-size], "\0");
+
+      if ( retour77 == 0 ) fprintf (filout, "     &%s&\n", temp);
+      else fprintf (filout, "     &%s\n", temp);
+      colnum=0;
+      tofich_reste (filout, (char *) &s[60-size],returnlineornot);
+    }
+}
+
+/******************************************************************************/
+/*                            tofich                                          */
+/******************************************************************************/
+/* This subroutine is used to write the string s into the fileout             */
+/******************************************************************************/
+void tofich (FILE * filout, char *s, int returnlineornot)
+{
+  char temp[61];
+  char *tmp;
+  int size;
+  int val_min;
+
+  if (strlen (s) <= 60)
+    {
+      if ( returnlineornot == 0 ) fprintf (filout, "      %s", s);
+      else if ( returnlineornot == 2 ) fprintf (filout, "%s", s);
+      else if ( returnlineornot == 3 ) fprintf (filout, "%s\n", s);
+      else                             fprintf (filout, "      %s\n", s);
+      if ( returnlineornot == 0 || returnlineornot == 2 )
+                                                      colnum=colnum+strlen(s)+6;
+      else colnum=0;
+    }
+  else
+    {
+      val_min = 60;
+      strncpy (temp, s, 60);
+      strcpy (&temp[60], "\0");
+
+      tmp = strrchr(temp, '+');
+      if ( tmp )
+      if ( strlen(tmp) < val_min ) val_min = strlen(tmp);
+      tmp = strrchr(temp, '-');
+      if ( tmp )
+      if ( strlen(tmp) < val_min ) val_min = strlen(tmp);
+      tmp = strrchr(temp, '/');
+      if ( tmp )
+      if ( strlen(tmp) < val_min ) val_min = strlen(tmp);
+      tmp = strrchr(temp, '*');
+      if ( tmp )
+      if ( strlen(tmp) < val_min ) val_min = strlen(tmp);
+      tmp = strrchr(temp, '%');
+      if ( tmp )
+      if ( strlen(tmp) < val_min ) val_min = strlen(tmp);
+      tmp = strrchr(temp, ',');
+      if ( tmp )
+      if ( strlen(tmp) < val_min ) val_min = strlen(tmp);
+      tmp = strrchr(temp, ')');
+      if ( tmp )
+      if ( strlen(tmp) < val_min ) val_min = strlen(tmp);
+      tmp = strrchr(temp, '(');
+      if ( tmp )
+      if ( strlen(tmp) < val_min ) val_min = strlen(tmp);
+
+      size = val_min;
+
+      strcpy (&temp[60-size], "\0");
+
+      if ( retour77 == 0 ) fprintf (filout, "      %s&\n", temp);
+      else fprintf (filout, "      %s\n", temp);
+      colnum=0;
+      tofich_reste (filout, (char *) &s[60-size], returnlineornot);
+    }
+}
+
+/******************************************************************************/
+/*                       tofich_blanc                                         */
+/******************************************************************************/
+/* This subroutine is used to write size blank into the fileout               */
+/******************************************************************************/
+void tofich_blanc (FILE * filout, int size)
+{
+  int i;
+
+  if (size <= 65) fprintf (filout, "%*s\n",size,EmptyChar);
+  else
+  {
+      i=0;
+      do
+      {
+         fprintf (filout, "%*s\n",65,EmptyChar);
+         i = i+1;
+      } while ( i <= size / 65 );
+         fprintf (filout, "%*s\n",size%65,EmptyChar);
+  }
+
+}
+/******************************************************************************/
+/*                       tofich_line                                          */
+/******************************************************************************/
+/* This subroutine is used to write size blank into the fileout               */
+/******************************************************************************/
+void tofich_line (FILE * filout, int size, int long position)
+{
+  int i;
+  int retour;
+
+  if (size <= 65) fprintf (filout, "%*s",size,EmptyChar);
+  else
+  {
+      i=0;
+      do
+      {
+         fprintf (filout, "%*s",65,EmptyChar);
+         i = i+1;
+      } while ( i <= size / 65 );
+         fprintf (filout, "%*s",size%65,EmptyChar);
+  }
+
+   if ( !strstr(motparse1,"\n") ) retour=0;
+   else retour=1;
+
+   fseek(filout,position,SEEK_SET);
+   if (retour == 1 ) fprintf (filout, "\n");
+
+}
+
+
+/******************************************************************************/
+/*                           RemoveWordSET_0                                  */
+/******************************************************************************/
+/* This subroutine is used to remove a sentence in the file filout            */
+/******************************************************************************/
+void RemoveWordSET_0(FILE * filout, long int position, long int sizetoremove)
+{
+   if ( firstpass == 0 && couldaddvariable == 1 )
+   {
+      fseek(filout,position,SEEK_SET);
+      tofich_line(filout,sizetoremove,position);
+
+   }
+}
+
+
+/******************************************************************************/
+/*                         RemoveWordCUR_0                                    */
+/******************************************************************************/
+/* This subroutine is used to remove a sentence in the file filout            */
+/******************************************************************************/
+void RemoveWordCUR_0(FILE * filout, long int position, long int sizetoremove)
+{
+   if ( firstpass == 0  && couldaddvariable == 1 )
+   {
+      fseek(filout,position,SEEK_CUR);
+      tofich_blanc(filout,sizetoremove);
+
+   }
+}
Index: vendors/AGRIF/r_01/LIB/Writedeclarations.c
===================================================================
--- vendors/AGRIF/r_01/LIB/Writedeclarations.c	(revision 2672)
+++ vendors/AGRIF/r_01/LIB/Writedeclarations.c	(revision 2672)
@@ -0,0 +1,702 @@
+/******************************************************************************/
+/*                                                                            */
+/*     CONV (converter) for Agrif (Adaptive Grid Refinement In Fortran)       */
+/*                                                                            */
+/* Copyright or   or Copr. Laurent Debreu (Laurent.Debreu@imag.fr)            */
+/*                        Cyril Mazauric (Cyril_Mazauric@yahoo.fr)            */
+/* This software is governed by the CeCILL-C license under French law and     */
+/* abiding by the rules of distribution of free software.  You can  use,      */
+/* modify and/ or redistribute the software under the terms of the CeCILL-C   */
+/* license as circulated by CEA, CNRS and INRIA at the following URL          */
+/* "http://www.cecill.info".                                                  */
+/*                                                                            */
+/* As a counterpart to the access to the source code and  rights to copy,     */
+/* modify and redistribute granted by the license, users are provided only    */
+/* with a limited warranty  and the software's author,  the holder of the     */
+/* economic rights,  and the successive licensors  have only  limited         */
+/* liability.                                                                 */
+/*                                                                            */
+/* In this respect, the user's attention is drawn to the risks associated     */
+/* with loading,  using,  modifying and/or developing or reproducing the      */
+/* software by the user in light of its specific status of free software,     */
+/* that may mean  that it is complicated to manipulate,  and  that  also      */
+/* therefore means  that it is reserved for developers  and  experienced      */
+/* professionals having in-depth computer knowledge. Users are therefore      */
+/* encouraged to load and test the software's suitability as regards their    */
+/* requirements in conditions enabling the security of their systems and/or   */
+/* data to be ensured and,  more generally, to use and operate it in the      */
+/* same conditions as regards security.                                       */
+/*                                                                            */
+/* The fact that you are presently reading this means that you have had       */
+/* knowledge of the CeCILL-C license and that you accept its terms.           */
+/******************************************************************************/
+/* version 1.7                                                                */
+/******************************************************************************/
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "decl.h"
+
+/******************************************************************************/
+/*                         WriteBeginDeclaration                              */
+/******************************************************************************/
+/* This subroutine is used to write the begin of a declaration                */
+/* taken in a variable record                                                 */
+/*                                                                            */
+/******************************************************************************/
+/*                                                                            */
+/*       integer variable ----------->   INTEGER                              */
+/*                                                                            */
+/******************************************************************************/
+void WriteBeginDeclaration(variable *v,char ligne[LONG_4C], int visibility)
+{
+  char tmpligne[LONG_4C];
+
+  if ( !strcasecmp(v->v_typevar,"") )
+  {
+     printf("WARNING : The type of the variable %s \n",v->v_nomvar);
+     printf("          is unknown. CONV should define a type\n");
+  }
+  
+  sprintf (ligne, "%s", v->v_typevar);
+  if ( v->v_c_star == 1 ) strcat(ligne,"*");
+  
+  /* We should give the precision of the variable if it has been given        */
+  if ( strcasecmp(v->v_precision,"") )
+  {
+     sprintf(tmpligne,"(%s)",v->v_precision);
+     Save_Length(tmpligne,49);
+     strcat(ligne,tmpligne);
+  }
+  
+  if (strcasecmp(v->v_dimchar,""))
+  {
+     sprintf(tmpligne,"(%s)",v->v_dimchar);
+     Save_Length(tmpligne,49);
+     strcat(ligne,tmpligne);
+  }
+  
+  if ( strcasecmp(v->v_nameinttypename,"") )
+  {
+     sprintf(tmpligne,"*%s",v->v_nameinttypename);
+     Save_Length(tmpligne,49);
+     strcat(ligne,tmpligne);
+  }
+  if (strcasecmp (v->v_IntentSpec, ""))
+  {
+     sprintf(tmpligne,",INTENT(%s) ",v->v_IntentSpec);
+     Save_Length(tmpligne,49);
+     strcat(ligne,tmpligne);
+  }
+  if ( v->v_VariableIsParameter == 1 ) strcat(ligne, ", PARAMETER");
+  if (visibility == 1)
+  {
+  if ( v->v_PublicDeclare       == 1 ) strcat(ligne, ", PUBLIC");
+  if ( v->v_PrivateDeclare      == 1 ) strcat(ligne, ", PRIVATE");
+  }
+  if ( v->v_ExternalDeclare     == 1 ) strcat(ligne, ", EXTERNAL");
+  if ( v->v_allocatable         == 1)
+       {strcat(ligne,", ALLOCATABLE");
+       }
+  if ( v->v_target         == 1)
+       {strcat(ligne,", TARGET");
+       }
+  if ( v->v_optionaldeclare     == 1 ) strcat(ligne,", OPTIONAL");
+  if ( v->v_pointerdeclare      == 1 ) strcat(ligne,", POINTER");
+  Save_Length(ligne,45);
+}
+
+
+/******************************************************************************/
+/*                         WriteScalarDeclaration                             */
+/******************************************************************************/
+/* This subroutine is used to write a scalar declaration                      */
+/* taken in a variable record                                                 */
+/*                                                                            */
+/******************************************************************************/
+/*                                                                            */
+/*       integer variable ----------->   INTEGER :: VARIABLE                  */
+/*                                                                            */
+/******************************************************************************/
+void WriteScalarDeclaration(variable *v,char ligne[LONG_4C])
+{
+
+  strcat (ligne, " :: ");
+  strcat (ligne, v->v_nomvar);
+  if ( strcasecmp(v->v_vallengspec,"") ) strcat(ligne,v->v_vallengspec);
+  if ( v->v_VariableIsParameter == 1 )
+  {
+     strcat(ligne," = ");
+     strcat(ligne,v->v_initialvalue);
+  }
+  Save_Length(ligne,45);
+}
+
+
+/******************************************************************************/
+/*                         WriteTableDeclaration                              */
+/******************************************************************************/
+/* This subroutine is used to write a Table declaration                       */
+/* taken in a variable record                                                 */
+/*                                                                            */
+/******************************************************************************/
+/*                                                                            */
+/*  integer variable(nb) ----------->                                         */
+/*                      INTEGER, DIMENSION(1:nb) :: variable                  */
+/*                                                                            */
+/******************************************************************************/
+void WriteTableDeclaration(variable * v,char ligne[LONG_4C],int tmpok)
+{
+  char newname[LONG_4C];
+
+  strcat (ligne, ", Dimension(");
+
+  if ( v->v_dimensiongiven == 1 && tmpok == 1 )
+  {
+                                         strcat(ligne,v->v_readedlistdimension);
+                                         }
+  if ( v->v_dimensiongiven == 1 && tmpok == 0 )
+  {
+     strcpy(newname,ChangeTheInitalvaluebyTabvarsName
+                                  (v->v_readedlistdimension,List_Global_Var,0));
+
+     if ( !strcasecmp(newname,"") ) strcat(newname,v->v_readedlistdimension);
+
+        strcpy(newname,ChangeTheInitalvaluebyTabvarsName
+                                 (newname,List_Common_Var,0));
+
+     if ( !strcasecmp(newname,"") ) strcat(newname,v->v_readedlistdimension); 
+     
+        strcpy(newname,ChangeTheInitalvaluebyTabvarsName
+                              (newname,List_ModuleUsed_Var,0));
+        if ( !strcasecmp(newname,"") ) strcat(newname,v->v_readedlistdimension);
+
+     Save_Length(newname,47);
+     strcat(ligne,newname);
+  }
+  strcat (ligne, ")");
+  strcat (ligne, " :: ");
+  strcat (ligne, v->v_nomvar);
+  if ( strcasecmp(vallengspec,"") ) strcat(ligne,v->v_vallengspec);
+
+  if ( v->v_VariableIsParameter == 1 )
+  {
+     strcat(ligne," = ");
+     strcat(ligne,v->v_initialvalue);
+  }
+  Save_Length(ligne,45);
+}
+
+/******************************************************************************/
+/*                        writevardeclaration                                 */
+/******************************************************************************/
+/* This subroutine is used to write the initial declaration in the file       */
+/* fileout of a variable                                                      */
+/*                                                                            */
+/******************************************************************************/
+/*                                                                            */
+/*  integer variable(nb) ----------->                                         */
+/*                      INTEGER, DIMENSION(1:nb),Pointer :: variable          */
+/*                                                                            */
+/******************************************************************************/
+void writevardeclaration (listvar * var_record, FILE *fileout, int value, int visibility)
+{
+  FILE *filecommon;
+  listvar *newvar;
+  variable *v;
+  char ligne[LONG_4C];
+
+  filecommon=fileout;
+  newvar = var_record;
+  
+  if ( newvar->var->v_save == 0 || inmodulemeet == 0 )
+  {
+     v = newvar->var;
+     if (mark == 1) fprintf(fileout,"222222233333333\n");
+     WriteBeginDeclaration(v,ligne,visibility);
+
+     if ( v->v_nbdim == 0 ) WriteScalarDeclaration(v,ligne);
+     else WriteTableDeclaration(v,ligne,value);
+
+     if ( v->v_VariableIsParameter != 1 && strcasecmp(v->v_initialvalue,"") )
+     {
+        strcat(ligne," = ");
+        strcat(ligne,v->v_initialvalue);
+     }
+     
+     tofich (filecommon, ligne,1);
+     if (mark == 1) fprintf(fileout,"44444433333333\n");     
+  }
+  Save_Length(ligne,45);
+  
+}
+
+
+void WriteLocalParamDeclaration()
+{
+   listvar *parcours;
+
+   parcours = List_Parameter_Var;
+   while ( parcours )
+   {
+      if ( !strcasecmp(parcours->var->v_subroutinename,subroutinename) )
+      {
+         writevardeclaration(parcours,fortranout,0,1);
+      }
+      parcours = parcours -> suiv;
+   }
+}
+
+void WriteFunctionDeclaration(int value)
+{
+   listvar *parcours;
+
+   parcours = List_FunctionType_Var;
+   while ( parcours )
+   {
+      if ( !strcasecmp(parcours->var->v_subroutinename,subroutinename) &&
+            strcasecmp(parcours->var->v_typevar,"")
+         )
+      {
+         writevardeclaration(parcours,fortranout,value,1);
+      }
+      parcours = parcours -> suiv;
+   }
+}
+
+void WriteSubroutineDeclaration(int value)
+{
+   listvar *parcours;
+
+   parcours = List_SubroutineDeclaration_Var;
+   while ( parcours )
+   {
+      if ( !strcasecmp(parcours->var->v_subroutinename,subroutinename) &&
+           parcours->var->v_save == 0                                  &&
+           parcours->var->v_pointerdeclare == 0                        &&
+           parcours->var->v_VariableIsParameter == 0                   &&
+           parcours->var->v_common == 0
+         )
+      {
+         writevardeclaration(parcours,fortranout,value,1);
+
+      }
+      else if ( !strcasecmp(parcours->var->v_subroutinename,subroutinename) &&
+           parcours->var->v_save == 0                                  &&
+           parcours->var->v_VariableIsParameter == 0                   &&
+           parcours->var->v_common == 0
+              )
+      {
+         writevardeclaration(parcours,fortranout,value,1);
+
+      }
+      parcours = parcours -> suiv;
+   }
+}
+
+void WriteArgumentDeclaration_beforecall()
+{
+   int position;
+   listnom *neededparameter;
+   FILE *paramtoamr;
+   listvar *newvar;
+   char ligne[LONG_4C];
+
+   fprintf(fortranout,"#include \"Param_BeforeCall_%s.h\" \n",subroutinename);
+   /*                                                                         */
+   sprintf(ligne,"Param_BeforeCall_%s.h",subroutinename);
+   paramtoamr = associate (ligne);
+   /*                                                                         */
+   neededparameter = (listnom * )NULL;
+   /*                                                                         */
+   position = 1;
+   newvar = List_SubroutineArgument_Var;
+   while ( newvar )
+   {
+      if ( !strcasecmp(newvar->var->v_subroutinename,subroutinename) &&
+                       newvar->var->v_positioninblock == position
+         )
+      {
+         position = position + 1;
+
+         writevardeclaration(newvar,fortranout,0,1);
+         neededparameter = writedeclarationintoamr(List_Parameter_Var,
+                   paramtoamr,newvar->var,newvar->var->v_subroutinename,
+                   neededparameter,subroutinename);
+
+         newvar = List_SubroutineArgument_Var;
+      }
+      else newvar = newvar -> suiv;
+   }
+   Save_Length(ligne,45);
+   fclose(paramtoamr);
+}
+
+void WriteArgumentDeclaration_Sort()
+{
+   int position;
+   listvar *newvar;
+
+   /*                                                                         */
+   position = 1;
+   newvar = List_SubroutineArgument_Var;
+   while ( newvar )
+   {
+      if ( !strcasecmp(newvar->var->v_subroutinename,subroutinename) &&
+                       newvar->var->v_positioninblock == position
+         )
+      {
+         position = position + 1;
+
+         writevardeclaration(newvar,fortranout,1,1);
+         /*                                                                   */
+         newvar = List_SubroutineArgument_Var;
+      }
+      else newvar = newvar -> suiv;
+   }
+   /*                                                                         */
+   newvar = List_SubroutineArgument_Var;
+   while ( newvar )
+   {
+      if ( !strcasecmp(newvar->var->v_subroutinename,subroutinename) &&
+                       newvar->var->v_positioninblock == 0           &&
+                       newvar->var->v_nbdim == 0
+         )
+      {
+
+         writevardeclaration(newvar,fortranout,1,1);
+      }
+      newvar = newvar -> suiv;
+   }
+   /*                                                                         */
+   newvar = List_SubroutineArgument_Var;
+   while ( newvar )
+   {
+      if ( !strcasecmp(newvar->var->v_subroutinename,subroutinename) &&
+                       newvar->var->v_positioninblock == 0           &&
+                       newvar->var->v_nbdim != 0
+         )
+      {
+         writevardeclaration(newvar,fortranout,1,1);
+      }
+      newvar = newvar -> suiv;
+   }
+}
+
+/******************************************************************************/
+/*                      writedeclarationintoamr                               */
+/******************************************************************************/
+/* This subroutine is used to write the declaration of parameters needed in   */
+/*    allocation subroutines creates in toamr.c                               */
+/******************************************************************************/
+/*                                                                            */
+/*                                                                            */
+/******************************************************************************/
+listnom *writedeclarationintoamr (listvar * deb_common, FILE *fileout,
+                              variable *var , char commonname[LONG_C],
+                           listnom *neededparameter, char name_common[LONG_C])
+{
+  listvar *newvar;
+  variable *v;
+  char ligne[LONG_4C];
+  int changeval;
+  int out;
+  int writeit;
+  listnom *parcours;
+  listnom *parcoursprec;
+
+  parcoursprec = (listnom * )NULL;
+
+  /* we should list the needed parameter                                      */
+  if ( !strcasecmp(name_common,commonname) )
+     neededparameter = DecomposeTheNameinlistnom(var->v_readedlistdimension,
+                                                               neededparameter);
+  /*                                                                          */
+  parcours = neededparameter;
+  while (parcours)
+  {
+     newvar = deb_common;
+
+     out = 0 ;
+     while ( newvar && out == 0 )
+     {
+     
+        if ( !strcasecmp(parcours->o_nom,newvar->var->v_nomvar) && !strcasecmp(var->v_subroutinename,newvar->var->v_subroutinename))
+        {
+           out=1;
+        /* add the name to the list of needed parameter                       */
+           neededparameter = DecomposeTheNameinlistnom(
+                 newvar->var->v_initialvalue,
+                 neededparameter );
+        }
+        else newvar=newvar->suiv;
+     }
+     parcours=parcours->suiv;
+   }
+  /*                                                                          */
+  parcours = neededparameter;
+  while (parcours)
+  {
+     newvar = deb_common;
+     out = 0 ;
+     while ( newvar && out == 0 )
+     {
+        if ( !strcasecmp(parcours->o_nom,newvar->var->v_nomvar) && !strcasecmp(var->v_subroutinename,newvar->var->v_subroutinename))        
+        {
+           out=1;
+        /* add the name to the list of needed parameter                       */
+           neededparameter = DecomposeTheNameinlistnom(
+                 newvar->var->v_initialvalue,
+                 neededparameter );
+        }
+        else newvar=newvar->suiv;
+     }
+     parcours=parcours->suiv;
+   }
+  /*                                                                          */
+  tofich (fileout, "",1);
+  parcours = neededparameter;
+  while (parcours)
+  {
+     writeit = 0;
+     newvar = deb_common;
+     while ( newvar && writeit == 0 )
+     {
+        if ( !strcasecmp(parcours->o_nom,newvar->var->v_nomvar) &&
+            !strcasecmp(var->v_subroutinename,newvar->var->v_subroutinename) && parcours->o_val == 0 )
+        {
+           writeit=1;
+           parcours->o_val = 1;
+        }
+        else newvar = newvar->suiv;
+     }
+
+     if ( writeit == 1  )
+     {
+        changeval = 0;
+        v = newvar->var;
+//        if ( v->v_allocatable == 1 && strcasecmp(v->v_typevar,"type") )
+//        {
+//           changeval = 1;
+//           v->v_allocatable = 0;
+//        }
+        WriteBeginDeclaration(v,ligne,1);
+        if ( v->v_nbdim == 0 ) WriteScalarDeclaration(v,ligne);
+        else WriteTableDeclaration(v,ligne,1);
+
+        tofich (fileout, ligne,1);
+        if ( changeval == 1 )
+        {
+           v->v_allocatable = 1;
+        }
+     }
+     else
+     {
+        if (  strncasecmp(parcours->o_nom,"mpi_",4) == 0 &&
+              shouldincludempif                     == 1 )
+        {
+           shouldincludempif = 0;
+           fprintf(fileout,"      include \'mpif.h\' \n");
+        }
+     }
+     parcours=parcours->suiv;
+  }
+  Save_Length(ligne,45);
+  return neededparameter;
+}
+
+
+/******************************************************************************/
+/*                       writesub_loopdeclaration_scalar                      */
+/******************************************************************************/
+/* This subroutine is used to write the declaration part of subloop           */
+/*    subroutines                                                             */
+/******************************************************************************/
+/*                                                                            */
+/*  integer variable(nb) ----------->                                         */
+/*                                                                            */
+/*          INTEGER, DIMENSION(1:nb)         :: variable                      */
+/*                                                                            */
+/******************************************************************************/
+void writesub_loopdeclaration_scalar (listvar * deb_common, FILE *fileout)
+{
+  listvar *newvar;
+  variable *v;
+  char ligne[LONG_4C];
+
+  tofich (fileout, "",1);
+  newvar = deb_common;
+
+  while (newvar)
+  {
+     if ( newvar->var->v_nbdim == 0 &&
+          !strcasecmp(newvar->var->v_subroutinename,subroutinename)  &&
+           newvar->var->v_pointerdeclare == 0
+         )
+     {
+        v = newvar->var;
+
+        WriteBeginDeclaration(v,ligne,1);
+        WriteScalarDeclaration(v,ligne);
+        tofich (fileout, ligne,1);
+     }
+     newvar = newvar->suiv;
+  }
+  Save_Length(ligne,45);
+}
+
+/******************************************************************************/
+/*                       writesub_loopdeclaration_tab                         */
+/******************************************************************************/
+/* This subroutine is used to write the declaration part of subloop           */
+/*    subroutines                                                             */
+/******************************************************************************/
+/*                                                                            */
+/*  integer variable(nb) ----------->                                         */
+/*                                                                            */
+/*          INTEGER, DIMENSION(1:nb)         :: variable                      */
+/*                                                                            */
+/******************************************************************************/
+void writesub_loopdeclaration_tab (listvar * deb_common, FILE *fileout)
+{
+  listvar *newvar;
+  variable *v;
+  char ligne[LONG_4C];
+  int changeval;
+
+  tofich (fileout, "",1);
+  newvar = deb_common;
+  while (newvar)
+  {
+  printf("newvar = %s %d %s\n",newvar->var->v_nomvar,newvar->var->v_pointerdeclare,newvar->var->v_typevar);
+     if ( newvar->var->v_nbdim != 0                                 &&
+          !strcasecmp(newvar->var->v_subroutinename,subroutinename) &&
+          (newvar->var->v_pointerdeclare == 0 || !strcasecmp(newvar->var->v_typevar,"type"))
+        )
+     {
+        changeval = 0;
+        v = newvar->var;
+        if ( v->v_allocatable == 1)
+        {
+          if (strcasecmp(v->v_typevar,"type"))
+           {
+      //     changeval = 1;
+      //     v->v_allocatable = 0;
+           }
+          else
+           {
+           changeval = 2;
+           v->v_allocatable = 0;
+           v->v_pointerdeclare = 1;
+           }
+        }
+
+        WriteBeginDeclaration(v,ligne,1);
+        WriteTableDeclaration(v,ligne,1);
+        tofich (fileout, ligne,1);
+        if ( changeval >= 1 ) v->v_allocatable = 1;
+        if ( changeval == 2 ) v->v_pointerdeclare = 0;
+     }
+     newvar = newvar->suiv;
+  }
+  Save_Length(ligne,45);
+}
+
+
+void ReWriteDeclarationAndAddTosubroutine_01(listvar *listdecl)
+{
+listvar *parcours;
+listvar *parcours2;
+listvar *parcours3;
+int out;
+
+if (insubroutinedeclare == 1)
+{
+parcours = listdecl;
+while (parcours)
+{
+/*
+parcours2 = List_SubroutineArgument_Var;
+out = 0;
+while (parcours2 && out == 0)
+{
+if (!strcasecmp(parcours2->var->v_subroutinename,subroutinename) && !strcasecmp(parcours2->var->v_nomvar,parcours->var->v_nomvar))
+ {
+ out = 1;
+ }
+parcours2 = parcours2->suiv;
+}
+*/
+out = LookingForVariableInList(List_SubroutineArgument_Var,parcours->var);
+if (out == 0) out = VariableIsInListCommon(parcours,List_Common_Var);
+
+
+
+if (out == 0) out = LookingForVariableInList(List_Parameter_Var,parcours->var);
+if (out == 0) out = LookingForVariableInList(List_FunctionType_Var,parcours->var);
+if (out == 0) out = LookingForVariableInListGlobal(List_Global_Var,parcours->var);
+
+/*
+parcours2 = List_Common_Var;
+while (parcours2 && out == 0)
+{
+if (!strcasecmp(parcours2->var->v_commoninfile,mainfile) && !strcasecmp(parcours2->var->v_nomvar,parcours->var->v_nomvar))
+ {
+ out = 1;
+ }
+parcours2 = parcours2->suiv;
+}
+*/
+//printf("nom = %s %d %d %d\n",parcours->var->v_nomvar,out,VariableIsParameter,SaveDeclare);
+if (firstpass == 0 && out == 0 && VariableIsParameter == 0 && SaveDeclare == 0) 
+
+{
+writevardeclaration(parcours,fortranout,1,1);
+}
+//if (firstpass == 1 && out == 1)
+if (firstpass == 1)
+  {
+  if (VariableIsParameter == 0 && SaveDeclare == 0)
+    {
+    List_SubroutineDeclaration_Var = insertvar(List_SubroutineDeclaration_Var,parcours->var);
+    }
+  }
+parcours = parcours->suiv;
+}
+}
+}
+
+void ReWriteDataStatement_0(FILE * filout)
+{
+listvar *parcours;
+int out;
+char ligne[LONG_C];
+char initialvalue[LONG_C];
+
+if (insubroutinedeclare == 1)
+{
+parcours = List_Data_Var_Cur ;
+while (parcours)
+{
+out = VariableIsInListCommon(parcours,List_Common_Var);
+if (out == 0) out = LookingForVariableInListGlobal(List_Global_Var,parcours->var);
+
+if (out == 0)
+{
+if (strncasecmp(parcours->var->v_initialvalue,"(/",2))
+{
+strcpy(initialvalue,parcours->var->v_initialvalue);
+}
+else
+{
+strncpy(initialvalue,&parcours->var->v_initialvalue[2],strlen(parcours->var->v_initialvalue)-4);
+strcpy(&initialvalue[strlen(parcours->var->v_initialvalue)-4],"\0");
+}
+sprintf(ligne,"data %s/%s/",parcours->var->v_nomvar,initialvalue);
+tofich(filout,ligne,1);
+}
+parcours = parcours->suiv;
+}
+}
+}
Index: vendors/AGRIF/r_01/LIB/convert.lex
===================================================================
--- vendors/AGRIF/r_01/LIB/convert.lex	(revision 2672)
+++ vendors/AGRIF/r_01/LIB/convert.lex	(revision 2672)
@@ -0,0 +1,87 @@
+/******************************************************************************/
+/*                                                                            */
+/*     CONV (converter) for Agrif (Adaptive Grid Refinement In Fortran)       */
+/*                                                                            */
+/* Copyright or   or Copr. Laurent Debreu (Laurent.Debreu@imag.fr)            */
+/*                        Cyril Mazauric (Cyril_Mazauric@yahoo.fr)            */
+/* This software is governed by the CeCILL-C license under French law and     */
+/* abiding by the rules of distribution of free software.  You can  use,      */
+/* modify and/ or redistribute the software under the terms of the CeCILL-C   */
+/* license as circulated by CEA, CNRS and INRIA at the following URL          */
+/* "http://www.cecill.info".                                                  */
+/*                                                                            */
+/* As a counterpart to the access to the source code and  rights to copy,     */
+/* modify and redistribute granted by the license, users are provided only    */
+/* with a limited warranty  and the software's author,  the holder of the     */
+/* economic rights,  and the successive licensors  have only  limited         */
+/* liability.                                                                 */
+/*                                                                            */
+/* In this respect, the user's attention is drawn to the risks associated     */
+/* with loading,  using,  modifying and/or developing or reproducing the      */
+/* software by the user in light of its specific status of free software,     */
+/* that may mean  that it is complicated to manipulate,  and  that  also      */
+/* therefore means  that it is reserved for developers  and  experienced      */
+/* professionals having in-depth computer knowledge. Users are therefore      */
+/* encouraged to load and test the software's suitability as regards their    */
+/* requirements in conditions enabling the security of their systems and/or   */
+/* data to be ensured and,  more generally, to use and operate it in the      */
+/* same conditions as regards security.                                       */
+/*                                                                            */
+/* The fact that you are presently reading this means that you have had       */
+/* knowledge of the CeCILL-C license and that you accept its terms.           */
+/******************************************************************************/
+/* version 1.7                                                                */
+/******************************************************************************/
+%s character
+%{
+#include <math.h>
+#include <stdlib.h>
+#include <string.h>
+int line_num=1;
+extern FILE * yyin;
+#define MAX_INCLUDE_DEPTH 30
+YY_BUFFER_STATE include_stack[MAX_INCLUDE_DEPTH];
+%}
+
+COMMENT "%"
+SEPARATEUR "::"
+NIMPORTEQUOI .
+COMMENTAIRES1 {COMMENT}{NIMPORTEQUOI}*{COMMENT}
+PROBTYPE "1D"|"2D"|"3D"
+USEITEM "FIXED_GRIDS"|"ONLY_FIXED_GRIDS"|"F77"
+NAME [a-zA-Z\_][a-zA-Z0-9\_]*
+DIGIT [0-9]+
+NEXTLINE \n+[ \t]+"$"|\n+[ \t]+"&"
+%%
+parammodule return TOK_MODULEMAIN; /* name of the module                      */
+notgriddep  return TOK_NOTGRIDDEP; /* variable which are not grid dependent   */
+use         return TOK_USE;
+{COMMENTAIRES1}    {}
+{SEPARATEUR}        return TOK_SEP;
+{USEITEM}          {strcpy(yylval.na,yytext); return TOK_USEITEM;}
+{PROBTYPE}         {strcpy(yylval.na,yytext); return TOK_PROBTYPE;}
+                                   /* dimension of the problem                */
+{NAME}             {strcpy(yylval.na,yytext); return TOK_NAME;}
+;|\,|\(|\)|:|\[|\] {return (int) *yytext;}
+\n                 {line_num++;return (int) *yytext;}
+[ \t]+ ;
+%%
+
+
+int yywrap()
+{
+}
+
+
+yyerror(char *s)
+{
+if (!strcasecmp(curfile,mainfile))
+{
+   printf("Dans convert %s line %d, fichier %s\n",s,line_num,curfile);
+}
+else
+{
+   printf("Dans convert %s line %d, fichier %s\n",s,line_num,curfile);
+}
+exit(0);
+}
Index: vendors/AGRIF/r_01/LIB/convert.y
===================================================================
--- vendors/AGRIF/r_01/LIB/convert.y	(revision 2672)
+++ vendors/AGRIF/r_01/LIB/convert.y	(revision 2672)
@@ -0,0 +1,450 @@
+/******************************************************************************/
+/*                                                                            */
+/*     CONV (converter) for Agrif (Adaptive Grid Refinement In Fortran)       */
+/*                                                                            */
+/* Copyright or   or Copr. Laurent Debreu (Laurent.Debreu@imag.fr)            */
+/*                        Cyril Mazauric (Cyril_Mazauric@yahoo.fr)            */
+/* This software is governed by the CeCILL-C license under French law and     */
+/* abiding by the rules of distribution of free software.  You can  use,      */
+/* modify and/ or redistribute the software under the terms of the CeCILL-C   */
+/* license as circulated by CEA, CNRS and INRIA at the following URL          */
+/* "http://www.cecill.info".                                                  */
+/*                                                                            */
+/* As a counterpart to the access to the source code and  rights to copy,     */
+/* modify and redistribute granted by the license, users are provided only    */
+/* with a limited warranty  and the software's author,  the holder of the     */
+/* economic rights,  and the successive licensors  have only  limited         */
+/* liability.                                                                 */
+/*                                                                            */
+/* In this respect, the user's attention is drawn to the risks associated     */
+/* with loading,  using,  modifying and/or developing or reproducing the      */
+/* software by the user in light of its specific status of free software,     */
+/* that may mean  that it is complicated to manipulate,  and  that  also      */
+/* therefore means  that it is reserved for developers  and  experienced      */
+/* professionals having in-depth computer knowledge. Users are therefore      */
+/* encouraged to load and test the software's suitability as regards their    */
+/* requirements in conditions enabling the security of their systems and/or   */
+/* data to be ensured and,  more generally, to use and operate it in the      */
+/* same conditions as regards security.                                       */
+/*                                                                            */
+/* The fact that you are presently reading this means that you have had       */
+/* knowledge of the CeCILL-C license and that you accept its terms.           */
+/******************************************************************************/
+/* version 1.7                                                                */
+/******************************************************************************/
+%{
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include "decl.h"
+%}
+
+%union {
+       int ival;
+       char na[LONG_C];
+       listnom * ln;
+       }
+
+%token TOK_SEP
+%token TOK_USE
+%token TOK_MODULEMAIN      /* name of the module                              */
+%token TOK_NOTGRIDDEP      /* Variable which are not grid dependent           */
+%token <na> TOK_USEITEM
+%token <na> TOK_NAME
+%token <na> TOK_PROBTYPE   /* dimension of the problem                        */
+%token ','
+%token ';'
+%token ':'
+%token '('
+%token ')'
+%token '['
+%token ']'
+%%
+input :
+      | input line
+;
+line :'\n'
+      | TOK_PROBTYPE TOK_NAME ';'                   {initdimprob(1,$2,"0","0");}
+      | TOK_PROBTYPE TOK_NAME ',' TOK_NAME ';'      {initdimprob(2,$2, $4,"0");}
+      | TOK_PROBTYPE TOK_NAME ',' TOK_NAME ',' TOK_NAME ';'
+                                                    {initdimprob(3,$2, $4, $6);}
+      | TOK_MODULEMAIN TOK_NAME ';'
+                             {listofmodules = Addtolistnom($2,listofmodules,0);
+                                                        Addmoduletothelist($2);}
+      | TOK_NOTGRIDDEP TOK_SEP TOK_NAME ';'       {Add_NotGridDepend_Var_1($3);}
+      | TOK_USE TOK_USEITEM ';'  {
+                                    if (!strcasecmp($2,"FIXED_GRIDS"))
+                                                                 fixedgrids=1;
+                                    if (!strcasecmp($2,"ONLY_FIXED_GRIDS"))
+                                                             onlyfixedgrids=1;
+                                 }
+      ;
+%%
+
+int main(int argc,char *argv[])
+{
+   extern FILE * yyin ;
+   FILE *dependglobaloutput;
+   int i;
+   listnom *parcours;
+   listvar *newvar;
+   int stylegiven = 0;
+   int infreegiven ;
+   int infixedgiven ;
+   int lengthmainfile;
+
+   if (argc < 2)
+   {
+       printf("usage : conv <file> [-rm] [-incdir <directory>] \n");
+       printf(" [-comdirin   <directory>] [-comdirout <directory>]\n");
+       printf(" [-convfile  <FILENAME >] -SubloopScalar -SubloopScalar1 \n");
+       printf(" [-free|-fixed]\n");
+       exit(0);
+   }
+/******************************************************************************/
+/*  1-  Variables initialization                                              */
+/******************************************************************************/
+   List_Global_Var=(listvar *)NULL;
+   List_GlobalParameter_Var=(listvar *)NULL;
+   List_Allocate_Var=(listallocate *)NULL;
+   List_Common_Var=(listvar *)NULL;
+   List_SubroutineWhereAgrifUsed=(listnom *)NULL;
+   List_Subroutine_For_Alloc=(listnom *)NULL;
+   List_Include=(listusemodule *)NULL;
+   List_NameOfModuleUsed=(listusemodule *)NULL;
+   listofmoduletmp=(listusemodule *)NULL;
+   List_SubroutineDeclaration_Var=(listvar *)NULL;
+   List_UsedInSubroutine_Var=(listvar *)NULL;
+   List_NotGridDepend_Var=(listvar *)NULL;
+   Listofavailableindices=(listindice *)NULL;
+   List_CouplePointed_Var=(listvarpointtovar *)NULL;
+   List_ModuleUsed_Var = (listvar *)NULL;
+   List_ModuleUsedInModuleUsed_Var = (listvar *)NULL;
+   List_GlobParamModuleUsed_Var = (listparameter *)NULL;
+   List_GlobParamModuleUsedInModuleUsed_Var = (listparameter *)NULL;
+   List_SubroutineArgument_Var = (listvar *)NULL;
+   List_FunctionType_Var = (listvar *)NULL;
+   tmpuselocallist = (listusemodule *)NULL;
+   List_ContainsSubroutine = (listnom *)NULL;
+   oldfortranout = (FILE *)NULL;
+
+   strcpy(mainfile,argv[1]);
+   strcpy(nomdir,"AGRIF_INC");
+   strcpy(commondirin,".");
+   strcpy(commondirout,".");
+   strcpy(filetoparse," ");
+   strcpy(subofagrifinitgrids,"");
+   strcpy(meetagrifinitgrids,"");
+   strcpy(mpiinitvar,"");
+
+   length_last = 0 ;
+   length_first = 0 ;
+   length_v_typevar = 0 ;
+   length_v_nomvar = 0 ;
+   length_v_dimchar = 0 ;
+   length_v_modulename = 0 ;
+   length_v_commonname = 0 ;
+   length_v_vallengspec = 0 ;
+   length_v_nameinttypename = 0 ;
+   length_v_commoninfile = 0 ;
+   length_v_subroutinename = 0 ;
+   length_v_precision = 0 ;
+   length_v_IntentSpec = 0 ;
+   length_v_initialvalue = 0 ;
+   length_v_readedlistdimension = 0 ;
+   length_u_usemodule = 0 ;
+   length_u_charusemodule = 0 ;
+   length_u_cursubroutine = 0 ;
+   length_u_modulename = 0 ;
+   length_n_name = 0 ;
+   length_c_namevar = 0 ;
+   length_c_namepointedvar = 0 ;
+   length_o_nom = 0 ;
+   length_o_module = 0 ;
+   length_a_nomvar = 0 ;
+   length_a_subroutine = 0 ;
+   length_a_module = 0 ;
+   length_t_usemodule = 0 ;
+   length_t_cursubroutine = 0 ;
+   length_curfilename = 0 ;
+   length_nomfileoutput = 0 ;
+   length_motparse = 0 ;
+   length_mainfile = 0 ;
+   length_nomdir = 0 ;
+   length_commondirout = 0 ;
+   length_commondirin = 0 ;
+   length_filetoparse = 0 ;
+   length_curbuf = 0 ;
+   length_toprintglob = 0 ;
+   length_tmpvargridname = 0 ;
+   length_ligne_Subloop = 0 ;
+   length_lvargridname_toamr = 0 ;
+   length_toprint_utilagrif = 0 ;
+   length_toprinttmp_utilchar = 0 ;
+   length_ligne_writedecl = 0 ;
+   length_newname_toamr = 0 ;
+   length_newname_writedecl = 0 ;
+   length_ligne_toamr = 0 ;
+   length_tmpligne_writedecl = 0 ;
+   value_char_size = 0 ;
+   value_char_size1 = 0 ;
+   value_char_size2 = 0 ;
+   value_char_size3 = 0 ;
+   inallocate = 0;
+   infixed = 1;
+   infree  = 0;
+
+   checkexistcommon=1;
+   todebug=0;
+   onlyfixedgrids=0;
+   fixedgrids=0;
+   InAgrifParentDef = 0;
+   IndicenbmaillesX=0;
+   IndicenbmaillesY=0;
+   IndicenbmaillesZ=0;
+   created_dimensionlist = 1;
+   indicemaxtabvars = 0;   /* current indice in the table tabvars             */
+   SubloopScalar = 0;
+   todebug = 0;
+   todebugfree = 0;
+   retour77 = 1 ;
+   mark = 0 ;
+   shouldincludempif = 0 ;
+   Read_val_max();
+/******************************************************************************/
+/*  2-  Program arguments                                                     */
+/******************************************************************************/
+
+   if ((yyin=fopen(argv[1],"r"))==NULL)
+   {
+      printf("the file %s doesn't exist \n",argv[1]);
+      exit(0);
+   }
+
+   i=2;
+   while (i<argc)
+   {
+      if (!strcasecmp(argv[i],"-incdir"))
+      {
+         strcpy(nomdir,argv[i+1]);
+         i++;
+      }
+      else if (!strcasecmp(argv[i],"-comdirin")) /* input directory           */
+      {
+         strcpy(commondirin,argv[i+1]);
+         i++;
+      }
+      else if (!strcasecmp(argv[i],"-comdirout")) /* output directory         */
+      {
+         strcpy(commondirout,argv[i+1]);
+         i++;
+      }
+      else if (!strcasecmp(argv[i],"-convfile")) /* file to parse             */
+      {
+         strcpy(filetoparse,argv[i+1]);
+         i++;
+         lengthmainfile = strlen(filetoparse);
+         if (!strcasecmp(&filetoparse[lengthmainfile-4],".f90"))
+         {
+         infixed = 0;
+         infree = 1;
+         }
+         else
+         {
+         infixed = 1;
+         infree = 0;
+         }
+      }
+      else if (!strcasecmp(argv[i],"-free")) /* file to parse        */
+      {
+         stylegiven = 1;
+         infreegiven  = 1 ;
+         infixedgiven = 0;
+      }   
+      else if (!strcasecmp(argv[i],"-fixed")) /* file to parse        */
+      {
+         stylegiven = 1;
+         infreegiven  = 0;
+         infixedgiven = 1;
+      }         
+      else if (!strcasecmp(argv[i],"-SubloopScalar")) /* file to parse        */
+      {
+         SubloopScalar = 1 ;
+      }
+      else if (!strcasecmp(argv[i],"-SubloopScalar1")) /* file to parse       */
+      {
+         SubloopScalar = 2 ;
+      }
+      else if (!strcasecmp(argv[i],"-todebug")) /* file to parse       */
+      {
+         todebug = 1 ;
+      }
+      else if (!strcasecmp(argv[i],"-mark")) /* file to parse       */
+      {
+         mark = 1 ;
+      }
+      else if (!strcasecmp(argv[i],"-todebugfree")) /* file to parse       */
+      {
+         todebugfree = 1 ;
+      }
+      else if (!strcasecmp(argv[i],"-rm"))
+      {
+         checkexistcommon=0;
+      }
+      else
+      {
+         printf("Unkwon option : %s\n",argv[i]);
+         exit(0);
+      }
+      i++;
+   }
+
+   if (stylegiven == 1) 
+   {
+   infree = infreegiven;
+   infixed = infixedgiven;   
+   }
+   Save_Length(nomdir,34);
+   Save_Length(commondirout,35);
+   Save_Length(commondirin,36);
+   Save_Length(filetoparse,37);
+
+/******************************************************************************/
+/*  3-  Parsing of the  conv file <name>.in                                   */
+/******************************************************************************/
+
+   if ((yyin=fopen(argv[1],"r"))==NULL)
+   {
+       printf("the file %s doesn't exist \n",argv[1]);
+       exit(0);
+   }
+   strcpy(mainfile,argv[1]);
+   Save_Length(mainfile,33);
+
+   if ( strstr(filetoparse,".f90") ||
+        strstr(filetoparse,".F90") ) retour77 = 0;
+
+   yyparse();
+
+/******************************************************************************/
+/*  4-  Preparation of the file parsing                                       */
+/******************************************************************************/
+   if ((yyin=fopen(filetoparse,"r"))==NULL) /* Is the file to parse exist ?   */
+   {
+      printf("the file %s doesn't exist \n",filetoparse);
+      exit(0);
+   }
+   /* mainfile : the name of the file to parse                                */
+   strcpy(mainfile,filetoparse);
+   /*                                                                         */
+   if ((dependglobaloutput=fopen(".dependglobal_agrif","r"))!=NULL)
+   {
+      fscanf(dependglobaloutput,"%d\n",&indicemaxtabvars);
+      fclose(dependglobaloutput);
+   }
+   Readthedependavailablefile();
+   /* Read the .dependnbxnby file which contains indices of nbmaillsX,        */
+   /*    nbmailleY and nbmailleZ                                              */
+   Readthedependnbxnbyfile();
+   Read_Subroutine_For_Alloc();
+/******************************************************************************/
+/*  5-  Parsing of the input file (2 times)                                   */
+/******************************************************************************/
+   /* Record all variable in list                                             */
+   firstpass = 1;
+   processfortran(filetoparse);
+   /*                                                                         */
+   CompleteThelistvarindoloop();
+   /* Read list of module used                                                */
+   RecordUseModulesVariables();
+   /* Read list of module used in module used                                 */
+   RecordUseModulesUseModulesVariables();
+   /* Save variables are considered as globals ones                           */
+   Update_List_Global_Var_From_List_Save_Var();
+   /* Update all lists                                                        */
+   ListUpdate();
+   /*                                                                         */
+   Clean_List_Global_Var();
+   /* Indice tabvars identification                                           */
+   IndiceTabvarsIdentification();
+   /* Update all lists                                                        */
+   ListUpdate();
+   /* The allocation subroutine is necessary ????                             */
+   New_Allocate_Subroutine_Is_Necessary();
+   /* The allocation subroutine is necessary for common list                  */
+   New_Allocate_Subroutine_For_Common_Is_Necessary();
+   /* Sort List_SubroutineArgument_Var                                        */
+   Sort_List_SubroutineArgument_Var();
+   /* Clean all lists                                                         */
+   ListClean();
+   /* Update Indice of List_UsedInSubroutine_Var from module used             */
+   List_UsedInSubroutine_Var_Update_From_Module_Used();
+   /* Update List_SubroutineWhereAgrifUsed                                    */
+   UpdateList_SubroutineWhereAgrifUsed();
+   /* Update List_UsedInSubroutine_Var with v_readedlistdimension             */
+   UpdateList_UsedInSubroutine_With_dimension();;
+   /*                                                                         */
+   ModifyThelistvarindoloop();
+   /*                                                                         */
+   UpdateListDeclarationWithDimensionList();
+   /*                                                                         */
+   GiveTypeOfVariables();
+   Affiche();
+   /* Build new subroutines                                                   */
+   firstpass = 0;
+   processfortran(filetoparse);
+
+   newvar = (listvar *)NULL;
+/*newvar = List_Global_Var; */
+   while ( newvar )
+   {
+      printf("++++ %s %d %s %s %s\n",
+      newvar->var->v_nomvar,
+      newvar->var->v_nbdim,
+      newvar->var->v_subroutinename,
+      newvar->var->v_modulename,
+      newvar->var->v_typevar
+             );
+      newvar = newvar->suiv;
+   }
+/******************************************************************************/
+/*  6-  Write informations in output files                                    */
+/******************************************************************************/
+
+   /* Write the .dependglobal_agrif file which contain the max indice         */
+   /*    of the tabvars table                                                 */
+   dependglobaloutput = fopen(".dependglobal_agrif","w");
+   fprintf(dependglobaloutput,"%d\n",indicemaxtabvars);
+   fclose(dependglobaloutput);
+   /* Write the list of available indice                                      */
+   Writethedependavailablefile();
+   /* Write the .dependnbxnby file which contains indices of nbmaillsX,       */
+   /*    nbmailleY and nbmailleZ                                              */
+   Writethedependnbxnbyfile();
+   /* Write the .depend<namefile> file which contain general informations     */
+   /*    about variable of this file                                          */
+   parcours = List_NameOfModule;
+   while( parcours )
+   {
+      Writethedependlistofmoduleused(parcours->o_nom);
+      WritedependParameterList(parcours->o_nom);
+      Writethedependfile(parcours->o_nom,List_Global_Var);
+      parcours=parcours->suiv;
+   }
+   parcours = List_NameOfCommon;
+   while( parcours )
+   {
+      Writethedependfile(parcours->o_nom,List_Common_Var);
+      parcours=parcours->suiv;
+   }
+   Write_Subroutine_For_Alloc();
+/******************************************************************************/
+/*  7-  Create files in AGRIF_INC directory                                   */
+/******************************************************************************/
+   creefichieramr(NameTamponfile);
+
+   Write_val_max();
+
+   if ( todebug == 1 ) printf("Out of CONV \n");
+   return 0;
+}
Index: vendors/AGRIF/r_01/LIB/decl.h
===================================================================
--- vendors/AGRIF/r_01/LIB/decl.h	(revision 2672)
+++ vendors/AGRIF/r_01/LIB/decl.h	(revision 2672)
@@ -0,0 +1,744 @@
+/******************************************************************************/
+/*                                                                            */
+/*     CONV (converter) for Agrif (Adaptive Grid Refinement In Fortran)       */
+/*                                                                            */
+/* Copyright or   or Copr. Laurent Debreu (Laurent.Debreu@imag.fr)            */
+/*                        Cyril Mazauric (Cyril_Mazauric@yahoo.fr)            */
+/* This software is governed by the CeCILL-C license under French law and     */
+/* abiding by the rules of distribution of free software.  You can  use,      */
+/* modify and/ or redistribute the software under the terms of the CeCILL-C   */
+/* license as circulated by CEA, CNRS and INRIA at the following URL          */
+/* "http://www.cecill.info".                                                  */
+/*                                                                            */
+/* As a counterpart to the access to the source code and  rights to copy,     */
+/* modify and redistribute granted by the license, users are provided only    */
+/* with a limited warranty  and the software's author,  the holder of the     */
+/* economic rights,  and the successive licensors  have only  limited         */
+/* liability.                                                                 */
+/*                                                                            */
+/* In this respect, the user's attention is drawn to the risks associated     */
+/* with loading,  using,  modifying and/or developing or reproducing the      */
+/* software by the user in light of its specific status of free software,     */
+/* that may mean  that it is complicated to manipulate,  and  that  also      */
+/* therefore means  that it is reserved for developers  and  experienced      */
+/* professionals having in-depth computer knowledge. Users are therefore      */
+/* encouraged to load and test the software's suitability as regards their    */
+/* requirements in conditions enabling the security of their systems and/or   */
+/* data to be ensured and,  more generally, to use and operate it in the      */
+/* same conditions as regards security.                                       */
+/*                                                                            */
+/* The fact that you are presently reading this means that you have had       */
+/* knowledge of the CeCILL-C license and that you accept its terms.           */
+/******************************************************************************/
+/* version 1.7                                                                */
+/******************************************************************************/
+#define LONGNOM 8000
+
+#define LONG_C 3000
+#define LONG_4C 4000
+#define LONG_4M 4000
+#define LONG_40M 4000000
+
+/******************************************************************************/
+/*********** Declaration of structures used in conv ***************************/
+/******************************************************************************/
+
+typedef struct
+{
+   char first[LONG_C];
+   char last[LONG_C];
+} typedim ;                /* fortran dimension as 'ndeb:nfin'                */
+
+typedef struct listdim
+{
+   typedim dim;
+   struct listdim *suiv;
+} listdim;                 /* list of the dimensions of a variable            */
+
+typedef struct variable
+{
+   char v_typevar[LONG_C];
+   char v_nomvar[LONG_C] ;
+   char v_oldname[LONG_C] ;
+   char v_dimchar[LONG_C];
+   char v_modulename[LONG_C];
+   char v_commonname[LONG_C];
+   char v_vallengspec[LONG_C];
+   char v_nameinttypename[LONG_C];
+   char v_commoninfile[LONG_C];
+   char v_subroutinename[LONG_C];
+   char v_precision[LONG_C];
+   char v_initialvalue[LONG_4C];
+   char v_IntentSpec[LONG_C];
+   char v_readedlistdimension[LONG_C];
+   int  v_nbdim;
+   int  v_common;
+   int  v_positioninblock;
+   int  v_module;
+   int  v_save;
+   int  v_VariableIsParameter;
+   int  v_PublicDeclare;
+   int  v_PrivateDeclare;
+   int  v_ExternalDeclare;
+   int  v_pointedvar;
+   int  v_notgrid;
+   int  v_dimensiongiven;
+   int  v_c_star;
+   int  v_indicetabvars;
+   int  v_pointerdeclare;
+   int  v_optionaldeclare;
+   int  v_allocatable;
+   int  v_target;
+   int  v_dimsempty;
+   listdim *v_dimension;
+} variable ;               /* type of a variable                              */
+                           /* v_typevar : type (integer, real, ...)           */
+                           /* v_nomvar : name of the variable                 */
+                           /* v_dimension : list of dimensions of the variable*/
+                           /* v_nbdim: 1 if the variable is 1d, etc ...       */
+                           /* precision : Name of the variable which          */
+                           /* determine the precision. example : wp in the    */
+                           /* case where REAL(wp)                             */
+
+typedef struct listvar
+{
+   variable *var ;
+   struct listvar * suiv;
+} listvar ;                /* list of variables                               */
+
+
+typedef struct listusemodule
+{
+   char u_usemodule[LONG_C];
+   char u_charusemodule[LONG_C];
+   char u_cursubroutine[LONG_C];
+   char u_modulename[LONG_C];
+   int  u_firstuse;
+   struct listusemodule * suiv;
+} listusemodule;           /* list of names                                   */
+
+typedef struct listparameter
+{
+   char p_name[LONG_C];
+   char p_modulename[LONG_C];
+   struct listparameter * suiv;
+} listparameter ;           /* list of names                                  */
+
+typedef struct listname
+{
+   char n_name[LONG_C];
+   struct  listname* suiv;
+} listname ;            /* list of names                                  */
+
+typedef struct listcouple
+{
+   char c_namevar[LONG_C];
+   char c_namepointedvar[LONG_C];
+   struct listcouple * suiv;
+} listcouple;              /* list of names                                   */
+
+
+typedef struct listnom
+{
+   char o_nom[LONG_C];
+   char o_module[LONG_C];
+   char o_subroutinename[LONG_C];
+   int  o_val;
+   listcouple *couple;
+   struct listnom * suiv;
+} listnom;                 /* list of names                                   */
+
+
+typedef struct listallocate
+{
+   char a_nomvar[LONG_C];
+   char a_subroutine[LONG_C];
+   char a_module[LONG_C];
+   struct listallocate * suiv;
+} listallocate ;
+
+
+typedef struct listvarpointtovar
+{
+   char t_usemodule[LONG_C];
+   char t_cursubroutine[LONG_C];
+   listcouple *t_couple;
+   struct  listvarpointtovar* suiv;
+}listvarpointtovar ;       /* list of names                                   */
+
+
+typedef struct listindice
+{
+   int i_indice;
+   struct  listindice * suiv;
+} listindice;              /* list of indiced                                 */
+
+ variable *curvar;
+
+ listvar *List_ModuleUsedInModuleUsed_Var;
+ listvar *List_ModuleUsed_Var;
+ listvar *listduplicated;
+
+ listvar *List_GlobalParameter_Var;
+ listvar *List_Global_Var;
+ listvar *List_Data_Var;
+ listvar *List_Data_Var_Cur;
+ listvar *List_Save_Var;
+ listvar *List_SubroutineArgument_Var;
+ listvar *List_SubroutineDeclaration_Var;
+ listvar *List_UsedInSubroutine_Var;
+ listvar *List_Parameter_Var;
+ listvar *List_Dimension_Var;
+ listvar *List_FunctionType_Var;
+ listvar *List_NotGridDepend_Var;
+ listvar *List_Common_Var;
+
+
+ listname *List_Pointer_Var;
+ listname *List_ImplicitNoneSubroutine;
+
+ listusemodule *List_NameOfModuleUsed;
+ listusemodule *List_Include;
+ listusemodule *listofmoduletmp;
+ listusemodule *tmpuselocallist;
+
+ listparameter *List_GlobParamModuleUsedInModuleUsed_Var;
+ listparameter *List_GlobParamModuleUsed_Var;
+
+ listnom *List_ContainsSubroutine;
+ listnom *List_Subroutine_For_Alloc;
+ listnom *listofmodules;
+ listnom *List_NameOfModule;
+ listnom *List_NameOfCommon;
+ listnom *List_SubroutineWhereAgrifUsed;
+
+ listallocate *List_Allocate_Var;
+
+ listvarpointtovar *List_CouplePointed_Var;
+                           /*  variables which are pointed to an other one    */
+
+ listindice *Listofavailableindices;
+                           /* List of available indices in the tabvars table  */
+
+ listdim *curdim;
+ listdim *commondim;
+
+/******************************************************************************/
+/****************   *** COMMON Variables ***  *********************************/
+/******************************************************************************/
+
+ int positioninblock;
+ char commonvar[LONG_C];
+ char commonblockname[LONG_C];
+
+/******************************************************************************/
+/****************   *** AGRIF Variables ***   *********************************/
+/******************************************************************************/
+ int inagrifcallargument;
+ int afterpercent;
+ int sameagrifargument;
+ int InAgrifParentDef;
+ char sameagrifname[LONG_C];
+/******************************************************************************/
+/****************   *** VAR DEF Variables ***   *******************************/
+/******************************************************************************/
+ int indicemaxtabvars;     /* Number of variables in the model i.e. last      */
+                           /*    indice used in  the tabvars table            */
+ int PublicDeclare;        /* Variable has been declared as PUBLIC */
+ int PrivateDeclare;       /* Variable has been declared as PRIVATE */
+ int ExternalDeclare;      /* Variable has been declared as EXTERNAL */
+ int InitialValueGiven;    /* An initial value has been given */
+ int Allocatabledeclare;
+ int Targetdeclare;
+ int SaveDeclare;
+ int functiondeclarationisdone;
+ int pointerdeclare;
+ int optionaldeclare;
+ int VarType;
+ int VarTypepar;
+ int VariableIsParameter;
+ int dimsgiven;
+ int shouldincludempif;
+ int c_star;
+ char DeclType[LONG_C];
+ char nameinttypename[LONG_C];
+ char nameinttypenameback[LONG_C]; 
+ int GlobalDeclaration;
+ char InitValue[LONG_4C];
+ char IntentSpec[LONG_C];
+ char NamePrecision[LONG_C];
+ char CharacterSize[LONG_C];
+ char curmodulename[LONG_C];
+ char vallengspec[LONG_C];
+ char subroutinename[LONG_C];
+ int isrecursive;
+ char previoussubroutinename[LONG_C];
+
+/******************************************************************************/
+/****************   *** CONV Variables ***   **********************************/
+/******************************************************************************/
+ int dimprob ;             /* dimension of the problem : 1 for 1D,2 for 2D,   */
+                           /*    3 for 3D                                     */
+ int onlyfixedgrids;       /* = 1 if onlyfixedgrids is true                   */
+ int todebug;
+ int mark;
+ int todebugfree;
+ int fixedgrids;           /* = 1 if fixedgrids is true                       */
+ char nbmaillesX[LONG_C]; /* number of cells in the x direction              */
+ char nbmaillesY[LONG_C]; /* number of cells in the y direction              */
+ char nbmaillesZ[LONG_C]; /* number of cells in the z direction              */
+ int IndicenbmaillesX;
+ int IndicenbmaillesY;
+ int IndicenbmaillesZ;
+
+ int inmodulemeet;
+ int incalldeclare;
+ int aftercontainsdeclare; /* Signale si l'on vient d'un contains ou non */
+ int retour77;
+ int colnum;
+ int callagrifinitgrids;
+ int callmpiinit;
+ int firstpass;
+ int couldaddvariable;
+ int pointedvar;
+ int NbMailleXDefined;
+ int agrif_parentcall;
+ int didvariableadded;
+ int SubloopScalar;        /* = 1 we should put in argument of sub_loop       */
+                           /*    only                                         */
+                           /*    scalar and not table u(1,1,1) in place of u  */
+ int checkexistcommon;
+ int insubroutinedeclare;
+ int ininterfacedeclare;
+ int inmoduledeclare;
+ int dimsempty;
+ int created_dimensionlist;
+ int incontainssubroutine;
+
+ char meetagrifinitgrids[LONG_C];
+ char mpiinitvar[LONG_C];
+ char *NameTamponfile;
+ char toprintglob[LONG_4C];
+ char tmpvargridname[LONG_4C];
+ char EmptyChar[2];        /* An empty char */
+ char curfilename[LONG_C];
+ char nomfileoutput[LONG_C];
+ char curbuf[LONG_40M];
+ char motparse[LONG_4C];
+ char motparse1[LONG_4C];
+ char charusemodule[LONG_C];
+ char subofagrifinitgrids[LONG_C];
+ char curfile[LONG_C];
+ char mainfile[LONG_C];
+ char nomdir[LONG_C];
+ char commondirout[LONG_C];
+ char commondirin[LONG_C];
+ char filetoparse[LONG_C];
+
+ FILE *fortranout;          /* Output File                                    */
+ FILE *fortranin;           /* Input File                                     */
+ FILE *oldfortranout;
+ FILE *subloop;
+ FILE *module_declar;
+ FILE *allocationagrif;
+ FILE *paramout;
+
+ long int pos_cur;         /* current position in the output file             */
+ long int pos_curagrifparent;
+                           /* current position in the output file             */
+ long int pos_curcall;     /* current position in the output file             */
+ long int pos_curuse;      /* current position in the output file             */
+ long int pos_curuseold;   /* current position in the output file             */
+ long int pos_curfunction; /* current position in the output file             */
+ long int pos_cur_decl;    /* current position in the output file             */
+ long int pos_curdata;     /* current position in the output file             */
+ long int pos_curparameter;/* current position in the output file             */
+ long int pos_curcommon;   /* current position in the output file             */
+ long int pos_cursave;     /* current position in the output file             */
+ long int pos_curdimension;/* current position in the output file             */
+ long int pos_curinit;     /* current position in the output file             */
+ long int pos_curinclude;  /* final position of a line in file                */
+ long int pos_end;         /* final position of a line in file                */
+ long int pos_endsubroutine;
+                           /* final position of a line in file                */
+
+/* v_oldname = v_nomvar; */
+/* commonvar = v_nomvar; */
+/* commonblockname = v_commonname;*/
+/* sameagrifname = v_nomvar ; */
+/* DeclType = v_typevar; */
+/* nameinttypename = v_nameinttypename; */
+/* IntentSpec = v_IntentSpec; */
+/* NamePrecision = v_precision; */
+/* CharacterSize = v_dimchar; */
+/* curmodulename = v_modulename; */
+/* vallengspec = v_vallengspec; */
+/* subroutinename = v_subroutinename; */
+/* meetagrifinitgrids = v_subroutinename; */
+/* nbmaillesX = v_nomvar; */
+/* nbmaillesY = v_nomvar; */
+/* nbmaillesZ = v_nomvar; */
+/* mpiinitvar = v_nomvar; */
+/* EmptyChar = 2; */
+/* motparse1 = motparse;*/
+/* charusemodule = p_modulename; */
+/* subofagrifinitgrids = v_subroutinename; */
+/* curfile = mainfile; */
+/* InitValue = v_initialvalue; */
+
+/* p_name;???????? */
+/* p_modulename; ?????????????*/
+
+ int length_last;
+ int length_first;
+ int length_v_typevar;
+ int length_v_nomvar;
+ int length_v_dimchar;
+ int length_v_modulename;
+ int length_v_commonname;
+ int length_v_vallengspec;
+ int length_v_nameinttypename;
+ int length_v_commoninfile;
+ int length_v_subroutinename;
+ int length_v_precision;
+ int length_v_IntentSpec;
+ int length_v_initialvalue;
+ int length_v_readedlistdimension;
+ int length_u_usemodule;
+ int length_u_charusemodule;
+ int length_u_cursubroutine;
+ int length_u_modulename;
+ int length_n_name;
+ int length_c_namevar;
+ int length_c_namepointedvar;
+ int length_o_nom;
+ int length_o_module;
+ int length_a_nomvar;
+ int length_a_subroutine;
+ int length_a_module;
+ int length_t_usemodule;
+ int length_t_cursubroutine;
+ int length_curfilename;
+ int length_nomfileoutput;
+ int length_motparse;
+ int length_mainfile;
+ int length_nomdir;
+ int length_commondirout;
+ int length_commondirin;
+ int length_filetoparse;
+ int length_curbuf;
+ int length_toprintglob;
+ int length_tmpvargridname;
+ int length_ligne_Subloop;
+ int length_lvargridname_toamr;
+ int length_toprint_utilagrif;
+ int length_toprinttmp_utilchar;
+ int length_ligne_writedecl;
+ int length_newname_toamr;
+ int length_newname_writedecl;
+ int length_ligne_toamr;
+ int length_tmpligne_writedecl;
+ int value_char_size;
+ int value_char_size1;
+ int value_char_size2;
+ int value_char_size3;
+
+ 
+ int inallocate;
+ int infixed;
+ int infree;
+/******************************************************************************/
+/*********** Declaration of externals subroutines *****************************/
+/***************************************************** ************************/
+/******************************************************************************/
+/*********** convert.y ********************************************************/
+/******************************************************************************/
+extern int main(int argc,char *argv[]);
+/******************************************************************************/
+/*********** fortran.y ********************************************************/
+/******************************************************************************/
+extern void processfortran(char *fichier_entree);
+/******************************************************************************/
+/*********** dependfile.c *****************************************************/
+/******************************************************************************/
+extern void Writethedependnbxnbyfile();
+extern void Readthedependnbxnbyfile();
+extern void Writethedependlistofmoduleused(char *NameTampon );
+extern void Readthedependlistofmoduleused(char *NameTampon);
+extern void WritedependParameterList(char *NameTampon );
+extern listparameter *ReaddependParameterList(char *NameTampon,
+                                                        listparameter *listout);
+extern void Writethedependfile(char *NameTampon, listvar *input );
+extern listvar *Readthedependfile( char *NameTampon , listvar *listout);
+extern void Write_Subroutine_For_Alloc();
+extern void Read_Subroutine_For_Alloc();
+extern void Writethedependavailablefile();
+extern void Readthedependavailablefile();
+extern int Did_filetoparse_readed(char *NameTampon);
+extern int Did_module_common_treaded(char *NameTampon);
+extern void Write_val_max();
+extern void Read_val_max();
+/******************************************************************************/
+/*********** DiversListe.c ****************************************************/
+/******************************************************************************/
+extern void Add_Common_var_1();
+extern listnom *Addtolistnom(char *nom, listnom *listin,int value);
+extern listname *Addtolistname(char *nom,listname *input);
+extern int ModuleIsDefineInInputFile(char *name);
+extern void Addmoduletothelisttmp(char *name);
+extern void Add_NameOfModule_1(char *nom);
+extern void Add_NameOfCommon_1(char *nom,char *cursubroutinename);
+extern void Add_CouplePointed_Var_1(char *namemodule,listcouple *couple);
+extern void Add_Include_1(char *name);
+extern void Add_ImplicitNoneSubroutine_1();
+extern void WriteIncludeDeclaration();
+extern void Add_Save_Var_1 (char *name,listdim *d);
+extern void Add_Save_Var_dcl_1 (listvar *var);
+/******************************************************************************/
+/*********** SubLoopCreation.c ************************************************/
+/******************************************************************************/
+extern void writeheadnewsub_0();
+extern void WriteVariablelist_subloop(FILE *outputfile,char *ligne);
+extern void WriteVariablelist_subloop_Call(FILE *outputfile,char *ligne);
+extern void WriteVariablelist_subloop_Def(FILE *outputfile,char *ligne);
+extern void WriteHeadofSubroutineLoop();
+extern void closeandcallsubloopandincludeit_0(int suborfun);
+extern void closeandcallsubloop_contains_0();
+/******************************************************************************/
+/*********** toamr.c **********************************************************/
+/******************************************************************************/
+extern char *variablenameroottabvars (variable * var);
+extern char *variablenametabvars (variable * var, int iorindice);
+extern char *variablecurgridtabvars (variable * var,int ParentOrCurgrid);
+extern void WARNING_CharSize(variable *var);
+extern char *vargridnametabvars (variable * var,int iorindice);
+extern char *vargridcurgridtabvars (variable * var,int ParentOrCurgrid);
+extern char *vargridcurgridtabvarswithoutAgrif_Gr (variable * var);
+extern char *vargridparam (variable * v, int whichone);
+extern void write_probdimagrif_file();
+extern void write_keysagrif_file();
+extern void write_modtypeagrif_file();
+extern void write_createvarnameagrif_file(variable *v,FILE *createvarname,
+                                                                int *InitEmpty);
+extern void write_Setnumberofcells_file();
+extern void write_Getnumberofcells_file();
+extern void write_initialisationsagrif_file(variable *v,FILE *initproc,
+                                                             int *VarnameEmpty);
+extern void Write_Alloc_Agrif_Files();
+extern int IndiceInlist(int indic, listindice *listin);
+extern void write_allocation_Common_0();
+extern void write_allocation_Global_0();
+extern void creefichieramr (char *NameTampon);
+/******************************************************************************/
+/*********** UtilAgrif.c ******************************************************/
+/******************************************************************************/
+extern int Vartonumber(char *tokname);
+extern int Agrif_in_Tok_NAME(char *tokname);
+extern void ModifyTheVariableName_0(char *ident,int lengthname);
+extern void Add_SubroutineWhereAgrifUsed_1(char *sub,char *mod);
+extern void AddUseAgrifUtil_0(FILE *fileout);
+extern void AddUseAgrifUtilBeforeCall_0(FILE *fileout);
+extern void NotifyAgrifFunction_0(char *ident);
+extern void ModifyTheAgrifFunction_0(char *ident);
+extern void AgriffunctionModify_0(char *ident,int whichone);
+extern void Instanciation_0(char *ident);
+/******************************************************************************/
+/*********** UtilCharacter.c **************************************************/
+/******************************************************************************/
+extern void FindAndChangeNameToTabvars(char name[LONG_C],char toprint[LONG_4C],
+                                             listvar * listtosee, int whichone);
+extern char *ChangeTheInitalvaluebyTabvarsName(char *nom,listvar *listtoread,
+                                                                  int whichone);
+extern int IsVariableReal(char *nom);
+extern void IsVarInUseFile(char *nom);
+extern listnom *DecomposeTheNameinlistnom(char *nom, listnom * listout);
+extern void DecomposeTheName(char *nom);
+extern void convert2lower(char *name);
+extern int convert2int(char *name);
+/******************************************************************************/
+/*********** UtilFile.c *******************************************************/
+/******************************************************************************/
+extern FILE * associate (char *filename);
+extern FILE * associateaplus (char *filename);
+extern long int setposcur();
+extern long int setposcurname(FILE *fileout);
+extern long int setposcurinoldfortranout();
+extern void copyuse_0(char *namemodule);
+extern void copyuseonly_0(char *namemodule);
+/******************************************************************************/
+/*********** UtilFortran.c ****************************************************/
+/******************************************************************************/
+extern void initdimprob(int dimprobmod, char * nx, char * ny,char* nz);
+extern int Variableshouldberemove(char *nom);
+extern int variableisglobal(listvar *curvar, listvar *listin);
+extern int VariableIsInListCommon(listvar *curvar,listvar *listin);
+extern int VariableIsInList(listvar *curvar,listvar *listin);
+extern void variableisglobalinmodule(listcouple *listin, char *module,
+                                                                 FILE *fileout,long int oldposcuruse);
+extern void Remove_Word_Contains_0();
+extern void Remove_Word_end_module_0(int modulenamelength);
+extern void Write_Word_Contains_0();
+extern void Write_Word_end_module_0();
+extern void Add_Subroutine_For_Alloc(char *nom);
+extern void Write_Alloc_Subroutine_0();
+extern void Write_Alloc_Subroutine_For_End_0();
+extern void Write_GlobalParameter_Declaration_0();
+extern void Write_GlobalType_Declaration_0();
+extern void Write_NotGridDepend_Declaration_0();
+extern int IsTabvarsUseInArgument_0();
+extern int ImplicitNoneInSubroutine();
+extern void Add_Pointer_Var_From_List_1(listvar *listin);
+extern void Add_Pointer_Var_1(char *nom);
+extern int varispointer_0(char *ident);
+extern int VariableIsNotFunction(char *ident);
+extern int varistyped_0(char *ident);
+/******************************************************************************/
+/*********** UtilListe.c ******************************************************/
+/******************************************************************************/
+extern void Init_Variable(variable *var);
+extern listvar * AddListvarToListvar(listvar *l,listvar *glob,
+                                                            int ValueFirstpass);
+extern void CreateAndFillin_Curvar(char *type,variable *curvar);
+extern void duplicatelistvar(listvar *orig);
+extern listdim * insertdim(listdim *lin,typedim nom);
+extern void change_dim_char(listdim *lin,listvar * l);
+extern int num_dims(listdim *d);
+extern variable * createvar(char *nom,listdim *d);
+extern listvar * insertvar(listvar *lin,variable *v);
+extern listvar *settype(char *nom,listvar *lin);
+extern void printliste(listvar * lin);
+extern int IsinListe(listvar *lin,char *nom);
+extern listname *Insertname(listname *lin,char *nom,int sens);
+extern listname *concat_listname(listname *l1, listname *l2);
+extern void *createstringfromlistname(char *ligne, listname *lin);
+extern void printname(listname * lin);
+extern void removeglobfromlist(listname **lin);
+extern void writelistpublic(listname *lin);
+extern void Init_List_Data_Var();
+/******************************************************************************/
+/*********** UtilNotGridDep.c *************************************************/
+/******************************************************************************/
+extern void Add_NotGridDepend_Var_1 (char *name);
+extern int VarIsNonGridDepend(char *name);
+/******************************************************************************/
+/*********** WorkWithAllocatelist.c *******************************************/
+/******************************************************************************/
+extern void Add_Allocate_Var_1(char *nom,char *nommodule);
+extern int IsVarAllocatable_0(char *ident);
+extern int varisallocatable_0(char *ident);
+/******************************************************************************/
+/*********** WorkWithglobliste.c **********************************************/
+/******************************************************************************/
+extern void Add_Globliste_1(listvar *listtoadd);
+extern void Add_SubroutineDeclarationSave_Var_1(listvar *listtoadd);
+extern void checkandchangedims(listvar *listsecondpass);
+/******************************************************************************/
+/*********** WorkWithlistdatavariable.c ***************************************/
+/******************************************************************************/
+extern void Add_Data_Var_1 (listvar **curlist,char *name,char *values);
+extern void Add_Data_Var_Names_01 (listvar **curlist,listname *l1, listname *l2);
+/******************************************************************************/
+/*********** WorkWithlistmoduleinfile.c ***************************************/
+/******************************************************************************/
+extern void Save_Length(char *nom, int whichone);
+extern void Save_Length_int(int val, int whichone);
+/******************************************************************************/
+/*********** WorkWithlistofmodulebysubroutine.c *******************************/
+/******************************************************************************/
+extern void RecordUseModulesVariables();
+extern void  RecordUseModulesUseModulesVariables();
+extern void Add_NameOfModuleUsed_1(char *name);
+extern void Addmoduletothelist(char *name);
+extern void WriteUsemoduleDeclaration(char *cursubroutinename);
+/******************************************************************************/
+/*********** WorkWithlistvarindoloop.c ****************************************/
+/******************************************************************************/
+extern void Add_UsedInSubroutine_Var_1 (char *ident);
+extern void ajoutevarindoloop_definedimension (char *name);
+extern void  ModifyThelistvarindoloop();
+extern void  CompleteThelistvarindoloop();
+extern void CopyRecord(variable *var1,variable *var2);
+extern void Update_List_Subroutine_Var(listvar *list_to_modify);
+extern void Update_List_Global_Var_From_List_Save_Var();
+extern void Update_List_From_Common_Var(listvar *list_to_modify);
+extern void Update_List_Var(listvar *list_to_modify);
+extern void List_UsedInSubroutine_Var_Update_From_Module_Used();
+extern void Update_NotGridDepend_Var(listvar *list_to_modify);
+extern int LookingForVariableInList(listvar *listin,variable *var);
+extern int LookingForVariableInListGlobal(listvar *listin,variable *var);
+extern int LookingForVariableInListName(listvar *listin,char *var);
+extern int LookingForVariableInListGlob(listvar *listin,variable *var);
+extern int LookingForVariableInListParamGlob(listparameter *listin,
+                                                                 variable *var);
+extern void UpdateListDeclarationWithDimensionList();
+extern void Clean_List_UsedInSubroutine_Var();
+extern void Clean_List_SubroutineDeclaration_Var();
+extern void Clean_List_Global_Var();
+extern void ListClean();
+extern void ListUpdate();
+extern void GiveTypeOfVariables();
+extern void Sort_List_SubroutineArgument_Var();
+extern void IndiceTabvars_Global_Var_Treated(char *nom);
+extern void IndiceTabvars_Global_Var_No_Treated(char *nom);
+extern void UpdateTheRemainingList(listvar *record);
+extern void IndiceTabvars_Common_Var_Treated(char *nom);
+extern void IndiceTabvars_Common_Var_No_Treated(char *nom);
+extern void IndiceTabvarsIdentification();
+extern void New_Allocate_Subroutine_Is_Necessary();
+extern void New_Allocate_Subroutine_For_Common_Is_Necessary();
+extern void NewModule_Creation_0();
+extern void UpdateList_SubroutineWhereAgrifUsed();
+extern void UpdateList_UsedInSubroutine_With_dimension();
+extern void Affiche();
+extern int SubInList_ContainsSubroutine();
+/******************************************************************************/
+/*********** WorkWithParameterlist.c ******************************************/
+/******************************************************************************/
+extern void Add_GlobalParameter_Var_1(listvar *listin);
+extern void Add_Parameter_Var_1(listvar *listin);
+extern void Add_Dimension_Var_1(listvar *listin);
+/******************************************************************************/
+/*********** WorkWithvarofsubroutineliste.c ***********************************/
+/******************************************************************************/
+extern void Add_SubroutineArgument_Var_1(listvar *listtoadd);
+extern void Add_FunctionType_Var_1(char *nom);
+extern void Add_SubroutineDeclaration_Var_1 (listvar *listtoadd);
+/******************************************************************************/
+/*********** Writedeclarations.c **********************************************/
+/******************************************************************************/
+extern void WriteBeginDeclaration(variable *v,char ligne[LONG_4C],int visibility);
+extern void WriteScalarDeclaration(variable *v,char ligne[LONG_4C]);
+extern void WriteTableDeclaration(variable * v,char ligne[LONG_4C],int tmpok);
+extern void writevardeclaration (listvar * var_record, FILE *fileout,
+                                                                     int value,int visibility);
+extern void WriteLocalParamDeclaration();
+extern void WriteFunctionDeclaration(int value);
+extern void WriteSubroutineDeclaration(int value);
+extern void WriteArgumentDeclaration_beforecall();
+extern void WriteArgumentDeclaration_Sort();
+extern listnom *writedeclarationintoamr (listvar * deb_common, FILE *fileout,
+                                       variable *var , char commonname[LONG_C],
+                           listnom *neededparameter, char name_common[LONG_C]);
+extern void writesub_loopdeclaration_scalar (listvar * deb_common,
+                                                                 FILE *fileout);
+extern void writesub_loopdeclaration_tab (listvar * deb_common, FILE *fileout);
+extern void ReWriteDeclarationAndAddTosubroutine_01(listvar *listdecl);
+extern void ReWriteDataStatement_0(FILE * filout);
+/******************************************************************************/
+/*********** WriteInFile.c ****************************************************/
+/******************************************************************************/
+extern void tofich_reste (FILE * filout, char *s,int returnlineornot);
+extern void tofich (FILE * filout, char *s, int returnlineornot);
+extern void tofich_blanc (FILE * filout, int size);
+extern void tofich_line (FILE * filout, int size, int long position);
+extern void RemoveWordSET_0(FILE * filout, long int position,
+                                                         long int sizetoremove);
+extern void RemoveWordCUR_0(FILE * filout, long int position,
+                                                         long int sizetoremove);
+
+/******************************************************************************/
+/*********** WorkWithlistofcoupled.c **********************************************/
+/******************************************************************************/                                                        
+extern int variscoupled_0(char *ident) ;
+extern char * getcoupledname_0(char *ident);
+extern void ModifyTheVariableNamecoupled_0(char *ident, char* coupledident);
Index: vendors/AGRIF/r_01/LIB/dependfile.c
===================================================================
--- vendors/AGRIF/r_01/LIB/dependfile.c	(revision 2672)
+++ vendors/AGRIF/r_01/LIB/dependfile.c	(revision 2672)
@@ -0,0 +1,1150 @@
+/******************************************************************************/
+/*                                                                            */
+/*     CONV (converter) for Agrif (Adaptive Grid Refinement In Fortran)       */
+/*                                                                            */
+/* Copyright or   or Copr. Laurent Debreu (Laurent.Debreu@imag.fr)            */
+/*                        Cyril Mazauric (Cyril_Mazauric@yahoo.fr)            */
+/* This software is governed by the CeCILL-C license under French law and     */
+/* abiding by the rules of distribution of free software.  You can  use,      */
+/* modify and/ or redistribute the software under the terms of the CeCILL-C   */
+/* license as circulated by CEA, CNRS and INRIA at the following URL          */
+/* "http://www.cecill.info".                                                  */
+/*                                                                            */
+/* As a counterpart to the access to the source code and  rights to copy,     */
+/* modify and redistribute granted by the license, users are provided only    */
+/* with a limited warranty  and the software's author,  the holder of the     */
+/* economic rights,  and the successive licensors  have only  limited         */
+/* liability.                                                                 */
+/*                                                                            */
+/* In this respect, the user's attention is drawn to the risks associated     */
+/* with loading,  using,  modifying and/or developing or reproducing the      */
+/* software by the user in light of its specific status of free software,     */
+/* that may mean  that it is complicated to manipulate,  and  that  also      */
+/* therefore means  that it is reserved for developers  and  experienced      */
+/* professionals having in-depth computer knowledge. Users are therefore      */
+/* encouraged to load and test the software's suitability as regards their    */
+/* requirements in conditions enabling the security of their systems and/or   */
+/* data to be ensured and,  more generally, to use and operate it in the      */
+/* same conditions as regards security.                                       */
+/*                                                                            */
+/* The fact that you are presently reading this means that you have had       */
+/* knowledge of the CeCILL-C license and that you accept its terms.           */
+/******************************************************************************/
+/* version 1.7                                                                */
+/******************************************************************************/
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "decl.h"
+
+
+/******************************************************************************/
+/*            Creation and modification of .dependfile                        */
+/******************************************************************************/
+/*  .dependnbxnby            : this file contains tabvars indices of variables*/
+/*                                given in agrif.in as number of cells        */
+/*  .dependuse<module>       : this file contains all modules used in the     */
+/*                                current file                                */
+/*  .dependparameter<module> : this file contains all parmeters defined in    */
+/*                                the current file                            */
+/*  .depend<module name>     : this file contains all globals variables       */
+/*                                informations (name, dim, etc ...)           */
+/*  .dependavailable         : this file contains all tabvars indices which   */
+/*                                are not used.                               */
+/******************************************************************************/
+
+
+/******************************************************************************/
+/*                 Writethedependnbxnbyfile                                   */
+/******************************************************************************/
+/* This subroutine is used to create the .dependnbxnby                        */
+/******************************************************************************/
+/*                                                                            */
+/*                     .dependnbxnby                                          */
+/*                                                                            */
+/*                     nbmaillesX                                             */
+/*                     nbmaillesY                                             */
+/*                     nbmaillesZ                                             */
+/*                                                                            */
+/******************************************************************************/
+void Writethedependnbxnbyfile()
+{
+  FILE *dependfileoutput;
+  listvar *parcours;
+  int out;
+
+  /* We are looking for all the variable of the current filetoparse file      */
+  /*    in the List_Global_Var                                                */
+  parcours =List_Global_Var;
+  out = 0;
+  while (parcours && out == 0 )
+  {
+     if ( !strcasecmp(parcours->var->v_nomvar,nbmaillesX) ) out = 1;
+     else parcours = parcours->suiv;
+  }
+  if ( out == 0 )
+  {
+     parcours =List_Common_Var;
+     while (parcours && out == 0 )
+     {
+        if ( !strcasecmp(parcours->var->v_nomvar,nbmaillesX) ) out = 1;
+        else parcours = parcours->suiv;
+     }
+  }
+  NbMailleXDefined = 0;
+  if ( out == 1 )
+  {
+     NbMailleXDefined = 1;
+     dependfileoutput = fopen(".dependnbxnby","w");
+     fprintf(dependfileoutput,"%d\n",parcours->var->v_indicetabvars);
+     IndicenbmaillesX = parcours->var->v_indicetabvars;
+
+     if ( dimprob > 1 )
+     {
+        parcours =List_Global_Var;
+        out = 0;
+        while (parcours && out == 0 )
+        {
+           if ( !strcasecmp(parcours->var->v_nomvar,nbmaillesY) ) out = 1;
+           else parcours = parcours->suiv;
+        }
+        if ( out == 0 )
+        {
+           parcours =List_Common_Var;
+           while (parcours && out == 0 )
+           {
+              if ( !strcasecmp(parcours->var->v_nomvar,nbmaillesY) ) out = 1;
+              else parcours = parcours->suiv;
+           }
+        }
+        if ( out == 1 )
+        {
+           fprintf(dependfileoutput,"%d\n",parcours->var->v_indicetabvars);
+           IndicenbmaillesY = parcours->var->v_indicetabvars;
+        }
+     }
+
+     if ( dimprob > 2 )
+     {
+        parcours =List_Global_Var;
+        out = 0;
+        while (parcours && out == 0 )
+        {
+           if ( !strcasecmp(parcours->var->v_nomvar,nbmaillesZ) ) out = 1;
+           else parcours = parcours->suiv;
+        }
+        if ( out == 0 )
+        {
+           parcours =List_Common_Var;
+           while (parcours && out == 0 )
+           {
+              if ( !strcasecmp(parcours->var->v_nomvar,nbmaillesZ) ) out = 1;
+              else parcours = parcours->suiv;
+           }
+        }
+        if ( out == 1 )
+        {
+           fprintf(dependfileoutput,"%d\n",parcours->var->v_indicetabvars);
+           IndicenbmaillesZ = parcours->var->v_indicetabvars;
+        }
+     }
+
+     if ( out == 1 ) fclose(dependfileoutput);
+   }
+}
+
+/******************************************************************************/
+/*                 Readthedependnbxnbyfile                                    */
+/******************************************************************************/
+/* This subroutine is used to create the .dependnbxnby                        */
+/******************************************************************************/
+/*                                                                            */
+/*                     .dependnbxnby                                          */
+/*                                                                            */
+/*                     nbmaillesX                                             */
+/*                     nbmaillesY                                             */
+/*                     nbmaillesZ                                             */
+/*                                                                            */
+/******************************************************************************/
+void Readthedependnbxnbyfile()
+{
+  FILE *dependfileoutput;
+
+  if ((dependfileoutput = fopen(".dependnbxnby","r"))!=NULL)
+  {
+     fscanf(dependfileoutput,"%d\n",&IndicenbmaillesX);
+     if ( dimprob > 1 ) fscanf(dependfileoutput,"%d\n",&IndicenbmaillesY);
+     if ( dimprob > 2 ) fscanf(dependfileoutput,"%d\n",&IndicenbmaillesZ);
+     fclose(dependfileoutput);
+  }
+}
+
+/******************************************************************************/
+/*                     Writethedependlistofmoduleused                         */
+/******************************************************************************/
+/* This subroutine is used to create the .dependuse<module>                   */
+/******************************************************************************/
+/*                                                                            */
+/*               .dependuse<name>                                             */
+/*                                                                            */
+/*               mod1                                                         */
+/*               mod2                                                         */
+/*                                                                            */
+/******************************************************************************/
+void Writethedependlistofmoduleused(char *NameTampon )
+{
+  FILE *dependfileoutput;
+  listusemodule *parcours;
+  char ligne[LONG_C];
+
+
+  if ( List_NameOfModuleUsed )
+  {
+     convert2lower(NameTampon);
+     sprintf(ligne,".dependuse%s",NameTampon);
+     dependfileoutput = fopen(ligne,"w");
+     /*                                                                       */
+     parcours = List_NameOfModuleUsed;
+     while (parcours)
+     {
+        if ( !strcasecmp(NameTampon,parcours->u_modulename) &&
+             !strcasecmp(parcours->u_cursubroutine,"")
+           )
+        {
+           /* We are looking for all the variable of the current              */
+           /*    filetoparse file in the List_Global_Var                      */
+           fprintf(dependfileoutput,"%s\n",parcours->u_usemodule);
+        }
+        parcours = parcours->suiv;
+     }
+     fclose(dependfileoutput);
+  }
+}
+
+/******************************************************************************/
+/*                    Readthedependlistofmoduleused                           */
+/******************************************************************************/
+/* This subroutine is used to create the .dependuse<module>                   */
+/******************************************************************************/
+/*                                                                            */
+/*               .dependuse<name>                                             */
+/*                                                                            */
+/*               mod1                                                         */
+/*               mod2                                                         */
+/*                                                                            */
+/******************************************************************************/
+void Readthedependlistofmoduleused(char *NameTampon)
+{
+  FILE *dependfileoutput;
+  listusemodule *parcours;
+  char ligne[LONG_C];
+
+  convert2lower(NameTampon);
+  sprintf(ligne,".dependuse%s",NameTampon);
+
+  tmpuselocallist = (listusemodule *)NULL;
+  if ((dependfileoutput = fopen(ligne,"r"))==NULL)
+  {
+  }
+  else
+  {
+    /* if the file exist we should verify that this file has changed          */
+      while (!feof(dependfileoutput))
+      {
+         parcours=(listusemodule *)malloc(sizeof(listusemodule));
+         fscanf(dependfileoutput,"%s\n",parcours->u_usemodule);
+
+         parcours->suiv = tmpuselocallist;
+         tmpuselocallist = parcours;
+
+         parcours = NULL;
+      }
+      fclose(dependfileoutput);
+  }
+}
+
+
+/******************************************************************************/
+/*                        WritedependParameterList                            */
+/******************************************************************************/
+/* This subroutine is used to create the .dependparameter<name>               */
+/******************************************************************************/
+/*                                                                            */
+/*               .dependparameter<name>                                       */
+/*                                                                            */
+/*               mod1                                                         */
+/*               mod2                                                         */
+/*                                                                            */
+/******************************************************************************/
+void WritedependParameterList(char *NameTampon )
+{
+  FILE *dependfileoutput;
+  listvar *parcours;
+  char ligne[LONG_C];
+
+  if ( List_GlobalParameter_Var )
+  {
+     convert2lower(NameTampon);
+     sprintf(ligne,".dependparameter%s",NameTampon);
+     dependfileoutput = fopen(ligne,"w");
+     /*                                                                       */
+     parcours = List_GlobalParameter_Var;
+     while (parcours)
+     {
+        if ( !strcasecmp(NameTampon,parcours->var->v_modulename) )
+        {
+           fprintf(dependfileoutput,"%s\n",parcours->var->v_nomvar);
+           fprintf(dependfileoutput,"%s\n",parcours->var->v_modulename);
+        }
+        parcours = parcours->suiv;
+     }
+     fclose(dependfileoutput);
+  }
+}
+
+
+/******************************************************************************/
+/*                         ReaddependParameterList                            */
+/******************************************************************************/
+/* This subroutine is used to create the .dependparameter<name>               */
+/******************************************************************************/
+/*                                                                            */
+/*               .dependparameter<name>                                       */
+/*                                                                            */
+/*               mod1                                                         */
+/*               mod2                                                         */
+/*                                                                            */
+/******************************************************************************/
+listparameter *ReaddependParameterList(char *NameTampon,listparameter *listout)
+{
+  FILE *dependfileoutput;
+  listparameter *parcours;
+  char ligne[LONG_C];
+
+  convert2lower(NameTampon);
+  sprintf(ligne,".dependparameter%s",NameTampon);
+
+  if ((dependfileoutput = fopen(ligne,"r"))==NULL)
+  {
+  }
+  else
+  {
+    /* if the file exist we should verify that this file has changed          */
+      while (!feof(dependfileoutput))
+      {
+         parcours=(listparameter *)malloc(sizeof(listparameter));
+         fscanf(dependfileoutput,"%s\n",parcours->p_name);
+         fscanf(dependfileoutput,"%s\n",parcours->p_modulename);
+
+         parcours->suiv = listout;
+         listout = parcours;
+
+         parcours = NULL;
+      }
+      fclose(dependfileoutput);
+  }
+  return listout;
+}
+
+/******************************************************************************/
+/*                   Writethedependfile                                       */
+/******************************************************************************/
+/* This subroutine is used to create the .depend<name>                        */
+/******************************************************************************/
+/*                                                                            */
+/*                     .depend<name>                                          */
+/*                                                                            */
+/*                      REAL                                                  */
+/*                      Variable                                              */
+/*                      char dimension or T                                   */
+/*                      table dimension                                       */
+/*                      is type given                                         */
+/*                      precision or T                                        */
+/*                      initial value or T                                    */
+/*                      indice in the tabvars                                 */
+/*                      listdimension or T                                    */
+/*                      -------------------------                             */
+/*                                                                            */
+/******************************************************************************/
+void Writethedependfile(char *NameTampon, listvar *input )
+{
+  FILE *dependfileoutput;
+  listvar *parcours;
+  listdim *dims;
+  char ligne[LONG_C];
+  char listdimension[LONG_C];
+  char curname[LONG_C];
+  int out;
+
+  if ( input )
+  {
+  convert2lower(NameTampon);
+
+  sprintf(ligne,".depend%s",NameTampon);
+  dependfileoutput = fopen(ligne,"w");
+  /* We are looking for all the variable of the current filetoparse file      */
+  /*    in the input                                                          */
+  parcours =input;
+  out = 0;
+  strcpy(curname,"");
+  while (parcours && out == 0 )
+  {
+     if ( !strcasecmp(parcours->var->v_modulename,NameTampon) ||
+          !strcasecmp(parcours->var->v_commonname,NameTampon) )
+     {
+        /*                                                                    */
+        if (  strcasecmp(curname,"") &&
+             !strcasecmp(curname,parcours->var->v_nomvar) ) out = 1 ;
+        if ( !strcasecmp(curname,"") ) strcpy(curname,parcours->var->v_nomvar);
+        /*                                                                    */
+        if ( out == 0 )
+        {
+           /********** TYPEVAR ************************************************/
+           fprintf(dependfileoutput,"%s\n",parcours->var->v_typevar);
+           /********** NOMVAR *************************************************/
+           fprintf(dependfileoutput,"%s\n",parcours->var->v_nomvar);
+           /********** DIMCHAR ************************************************/
+           if ( strcasecmp(parcours->var->v_dimchar,"") )
+           {
+              fprintf(dependfileoutput,"%s\n",parcours->var->v_dimchar);
+           }
+           else
+           {
+              fprintf(dependfileoutput,"T\n");
+           }
+           /********** COMMONINFILE *******************************************/
+           if ( strcasecmp(parcours->var->v_commoninfile,"") )
+           {
+              fprintf(dependfileoutput,"%s\n",parcours->var->v_commoninfile);
+           }
+           else
+           {
+              fprintf(dependfileoutput,"T\n");
+           }
+           /********** COMMONNAME *********************************************/
+           if ( strcasecmp(parcours->var->v_commonname,"") )
+           {
+              fprintf(dependfileoutput,"%s\n",parcours->var->v_commonname);
+           }
+           else
+           {
+              fprintf(dependfileoutput,"T\n");
+           }
+           /********** MODULENAME *********************************************/
+           if ( strcasecmp(parcours->var->v_modulename,"") )
+           {
+              fprintf(dependfileoutput,"%s\n",parcours->var->v_modulename);
+           }
+           else
+           {
+              fprintf(dependfileoutput,"T\n");
+           }
+           /********** NBDIM **************************************************/
+/*           fprintf(dependfileoutput,"%d\n",parcours->var->v_nbdim);*/
+           /********** DIMENSIONGIVEN *****************************************/
+/*           fprintf(dependfileoutput,"%d\n",parcours->var->v_dimensiongiven);*/
+           /********** ALLOCATABLE ********************************************/
+           fprintf(dependfileoutput,"%d\n",parcours->var->v_allocatable);
+           /********** TARGET ********************************************/
+           fprintf(dependfileoutput,"%d\n",parcours->var->v_target);
+           /********** POINTERDECLARE *****************************************/
+           fprintf(dependfileoutput,"%d\n",parcours->var->v_pointerdeclare);
+           /********** PRECISION **********************************************/
+           if ( strcasecmp(parcours->var->v_precision,"") )
+           {
+              fprintf(dependfileoutput,"%s\n",parcours->var->v_precision);
+           }
+           else
+           {
+              fprintf(dependfileoutput,"T\n");
+           }
+           /********** INITIALVALUE *******************************************/
+/*           if ( strcasecmp(parcours->var->v_initialvalue,"") )
+           {
+              fprintf(dependfileoutput,"%s\n",parcours->var->v_initialvalue);
+           }
+           else
+           {
+              fprintf(dependfileoutput,"T\n");
+           }*/
+           /********** NAMEINTYPENAME *****************************************/
+           if ( strcasecmp(parcours->var->v_nameinttypename,"") )
+           {
+              fprintf(dependfileoutput,"%s\n",parcours->var->v_nameinttypename);
+           }
+           else
+           {
+              fprintf(dependfileoutput,"T\n");
+           }
+           /********** PRIVATE *****************************************/
+           fprintf(dependfileoutput,"%d\n",parcours->var->v_PrivateDeclare);
+              
+           /********** INDICETABVARS ******************************************/
+           fprintf(dependfileoutput,"%d\n",parcours->var->v_indicetabvars);
+           /********** READEDLISTDIMENSION ************************************/
+           if ( parcours->var->v_dimensiongiven == 1 )
+           {
+              dims = parcours->var->v_dimension;
+              strcpy(listdimension,"");
+              while (dims)
+              {
+                 sprintf(ligne,"%s:%s",dims->dim.first,dims->dim.last);
+                 strcat(listdimension,ligne);
+                 if ( dims->suiv )
+                 {
+                    strcat(listdimension,",");
+                 }
+                 dims = dims->suiv;
+              }
+              fprintf(dependfileoutput,"%s\n",listdimension);
+           }
+           else
+           {
+              fprintf(dependfileoutput,"T\n");
+           }
+           /*******************************************************************/
+           fprintf(dependfileoutput,"------------------------\n");
+        }
+     }
+     parcours = parcours->suiv;
+  }
+  fclose(dependfileoutput);
+  }
+}
+
+/******************************************************************************/
+/*                         Readthedependfile                                  */
+/******************************************************************************/
+/* This subroutine is used to read the .dependfile<name> and to insert new    */
+/*    information in the listout list.                                        */
+/******************************************************************************/
+/*                                                                            */
+/*           .dependmodule -------->                      = list of var       */
+/*                                                                            */
+/*        not.dependmodule -------->                                          */
+/*                                                                            */
+/******************************************************************************/
+listvar *Readthedependfile( char *NameTampon , listvar *listout)
+{
+  char ligne[LONG_C];
+  FILE *dependfileoutput;
+  listvar *parcours0;
+  listvar *parcours;
+  listvar *parcoursprec;
+  char nothing[LONG_C];
+  int i;
+
+  parcoursprec = (listvar *)NULL;
+
+  convert2lower(NameTampon);
+  sprintf(ligne,".depend%s",NameTampon);
+  if ((dependfileoutput = fopen(ligne,"r"))==NULL)
+  {
+    /* if the file doesn't exist it means that it is the first time           */
+    /*    we tried to parse this file                                         */
+  }
+  else
+  {
+    /* if the file exist we should verify that this file has changed          */
+      while (!feof(dependfileoutput))
+      {
+         parcours=(listvar *)malloc(sizeof(listvar));
+         parcours->var=(variable *)malloc(sizeof(variable));
+         /*                                                                   */
+         Init_Variable(parcours->var);
+         /*                                                                   */
+           /********** TYPEVAR ************************************************/
+         fscanf(dependfileoutput,"%s\n",parcours->var->v_typevar);
+           /********** NOMVAR *************************************************/
+         fscanf(dependfileoutput,"%s\n",parcours->var->v_nomvar);
+           /********** DIMCHAR ************************************************/
+         fscanf(dependfileoutput,"%s\n",parcours->var->v_dimchar);
+         if ( !strcasecmp(parcours->var->v_dimchar,"T") )
+         {
+            strcpy(parcours->var->v_dimchar,"");
+         }
+           /********** COMMONINFILE *******************************************/
+         fscanf(dependfileoutput,"%s\n",parcours->var->v_commoninfile);
+         if ( !strcasecmp(parcours->var->v_commoninfile,"T") )
+         {
+            strcpy(parcours->var->v_commoninfile,"");
+         }
+           /********** COMMONNAME *********************************************/
+         fscanf(dependfileoutput,"%s\n",parcours->var->v_commonname);
+         if ( !strcasecmp(parcours->var->v_commonname,"T") )
+         {
+            strcpy(parcours->var->v_commonname,"");
+         }
+           /********** MODULENAME *********************************************/
+         fscanf(dependfileoutput,"%s\n",parcours->var->v_modulename);
+         
+         printf("MODULENAME = %s %s\n",parcours->var->v_nomvar,parcours->var->v_modulename);
+         
+         if ( !strcasecmp(parcours->var->v_modulename,"T") )
+         {
+            strcpy(parcours->var->v_modulename,"");
+         }
+         
+
+           /********** NBDIM **************************************************/
+/*         fscanf(dependfileoutput,"%d\n",&parcours->var->v_nbdim);*/
+           /********** DIMENSIONGIVEN *****************************************/
+/*         fscanf(dependfileoutput,"%d\n",&parcours->var->v_dimensiongiven);*/
+           /********** ALLOCATABLE ********************************************/
+         fscanf(dependfileoutput,"%d\n",&parcours->var->v_allocatable);
+         if ( parcours->var->v_allocatable == 1 )
+         {
+            Add_Allocate_Var_1(parcours->var->v_nomvar,
+                               parcours->var->v_commonname);
+         }
+           /********** TARGET ********************************************/
+         fscanf(dependfileoutput,"%d\n",&parcours->var->v_target);
+         
+           /********** POINTERDECLARE *****************************************/
+         fscanf(dependfileoutput,"%d\n",&parcours->var->v_pointerdeclare);
+         if ( parcours->var->v_pointerdeclare == 1 )
+         {
+            Add_Pointer_Var_1(parcours->var->v_nomvar);
+         }
+           /********** PRECISION **********************************************/
+         fscanf(dependfileoutput,"%[^\n] \n",parcours->var->v_precision);
+         if ( !strcasecmp(parcours->var->v_precision,"T") )
+         {
+            strcpy(parcours->var->v_precision,"");
+         }
+           /********** INITIALVALUE *******************************************/
+/*         fscanf(dependfileoutput,"%[^\n] \n",parcours->var->v_initialvalue);
+         if ( !strcasecmp(parcours->var->v_initialvalue,"T") )
+         {
+            strcpy(parcours->var->v_initialvalue,"");
+         }*/
+           /********** NAMEINTYPENAME *****************************************/
+         fscanf(dependfileoutput,"%[^\n] \n",parcours->var->v_nameinttypename);
+         if ( !strcasecmp(parcours->var->v_nameinttypename,"T") )
+         {
+            strcpy(parcours->var->v_nameinttypename,"");
+         }
+           /********** PRIVATE *****************************************/
+         fscanf(dependfileoutput,"%d\n",&parcours->var->v_PrivateDeclare);
+         
+           /********** INDICETABVARS ******************************************/
+         fscanf(dependfileoutput,"%d\n",&parcours->var->v_indicetabvars);
+           /********** READEDLISTDIMENSION ************************************/
+         fscanf(dependfileoutput,"%s\n",parcours->var->v_readedlistdimension);
+         if ( !strcasecmp(parcours->var->v_readedlistdimension,"T") )
+         {
+            strcpy(parcours->var->v_readedlistdimension,"");
+         }
+         else
+         {
+            parcours->var->v_dimensiongiven = 1;
+            parcours->var->v_nbdim = 1;
+            i = 1;
+            /*                                                                */
+            while ( i < strlen(parcours->var->v_readedlistdimension) )
+            {
+               if ( parcours->var->v_readedlistdimension[i] == ',' )
+               {
+                  parcours->var->v_nbdim = parcours->var->v_nbdim + 1 ;
+               }
+               /*                                                             */
+               i=i+1;
+            }
+         }
+           /*******************************************************************/
+         fscanf(dependfileoutput,"%s\n",nothing);
+         parcours->suiv = NULL;
+         if (parcours->var->v_PrivateDeclare == 0)
+         {
+         if ( !listout )
+         {
+            listout = parcours;
+            parcoursprec = parcours;
+         }
+         else
+         {
+            if ( parcoursprec )
+            {
+               parcoursprec->suiv = parcours;
+               parcoursprec = parcours;
+            }
+            else
+            {
+               parcours0 = listout;
+               while ( parcours0->suiv ) parcours0=parcours0->suiv;
+               parcours0->suiv = parcours;
+               parcoursprec = parcours0->suiv;
+            }
+         }
+         }
+         parcours = NULL;
+      }
+      fclose(dependfileoutput);
+  }
+  return listout;
+}
+
+void Write_Subroutine_For_Alloc()
+{
+   FILE *dependfileoutput;
+   listnom *parcours;
+
+   if ( List_Subroutine_For_Alloc )
+   {
+      if ((dependfileoutput=fopen(".dependAllocAgrif","w"))!=NULL)
+      {
+         parcours = List_Subroutine_For_Alloc;
+         while (parcours)
+         {
+            fprintf(dependfileoutput,"%s\n",parcours->o_nom);
+            parcours = parcours->suiv;
+         }
+         fclose(dependfileoutput);
+      }
+   }
+}
+
+void Read_Subroutine_For_Alloc()
+{
+  FILE *dependfileoutput;
+  listnom *parcours;
+  listnom *ref;
+
+  ref = (listnom *)NULL;
+  if ((dependfileoutput=fopen(".dependAllocAgrif","r"))!=NULL)
+  {
+     List_Subroutine_For_Alloc = (listnom *)NULL;
+     while (!feof(dependfileoutput))
+     {
+        parcours=(listnom *)malloc(sizeof(listnom));
+        strcpy(parcours->o_nom,"");
+
+        fscanf(dependfileoutput,"%s\n",&parcours->o_nom);
+        parcours->suiv = NULL;
+
+        if ( !List_Subroutine_For_Alloc )
+        {
+           List_Subroutine_For_Alloc = parcours;
+           ref = parcours;
+        }
+        else
+        {
+            ref->suiv = parcours;
+            ref = parcours;
+        }
+     }
+     fclose(dependfileoutput);
+  }
+}
+
+/******************************************************************************/
+/*                        Writethedependavailablefile                         */
+/******************************************************************************/
+/* This subroutine is used to write the .dependfileavailable file             */
+/******************************************************************************/
+/*                                                                            */
+/*                                  .dependavailable                          */
+/*     tabvars(1) = var1                                                      */
+/*     tabvars(3) = var1                  2                                   */
+/*     tabvars(4) = var1         =====>   5                                   */
+/*     tabvars(6) = var1                                                      */
+/*     tabvars(7) = var1                                                      */
+/*                                                                            */
+/*                                                                            */
+/*                                                                            */
+/******************************************************************************/
+void Writethedependavailablefile()
+{
+  FILE *dependfileoutput;
+  listindice *parcours;
+
+  if ((dependfileoutput=fopen(".dependavailable","w"))!=NULL)
+  {
+     /* We are looking for all the indices of the Listofavailableindices      */
+     parcours = Listofavailableindices;
+     while (parcours)
+     {
+        if ( parcours->i_indice != 0 )
+        {
+           fprintf(dependfileoutput,"%d\n",parcours->i_indice);
+        }
+        parcours = parcours->suiv;
+     }
+     fclose(dependfileoutput);
+  }
+}
+
+/******************************************************************************/
+/*                        Readthedependavailablefile                          */
+/******************************************************************************/
+/* This subroutine is used to read the .dependfileavailable file              */
+/******************************************************************************/
+/*                                                                            */
+/*                                  .dependavailable                          */
+/*     tabvars(1) = var1                                                      */
+/*     tabvars(3) = var1                  2                                   */
+/*     tabvars(4) = var1         =====>   5  ==> Listofavailableindices       */
+/*     tabvars(6) = var1                                                      */
+/*     tabvars(7) = var1                                                      */
+/*                                                                            */
+/*                                                                            */
+/*                                                                            */
+/******************************************************************************/
+void Readthedependavailablefile()
+{
+  FILE *dependfileoutput;
+  listindice *parcours;
+
+  if ((dependfileoutput=fopen(".dependavailable","r"))!=NULL)
+  {
+     /* We are looking for all the indices of the Listofavailableindices      */
+     Listofavailableindices = (listindice *)NULL;
+     while (!feof(dependfileoutput))
+     {
+        parcours=(listindice *)malloc(sizeof(listindice));
+        fscanf(dependfileoutput,"%d\n",&parcours->i_indice);
+        if ( parcours->i_indice != 0 && parcours->i_indice < 10000000 )
+        {
+           parcours -> suiv = Listofavailableindices;
+           Listofavailableindices = parcours;
+        }
+        else
+        {
+           free(parcours);
+        }
+     }
+     fclose(dependfileoutput);
+  }
+}
+
+
+/******************************************************************************/
+/*                      Did_filetoparse_readed                                */
+/******************************************************************************/
+/* This subroutine is used to know if the .depend<NameTampon> exist           */
+/*    it means if the file has been ever parsed                               */
+/******************************************************************************/
+/*                                                                            */
+/******************************************************************************/
+int Did_filetoparse_readed(char *NameTampon)
+{
+  FILE *dependfileoutput;
+  char ligne[LONG_C];
+  int out;
+
+  convert2lower(NameTampon);
+  sprintf(ligne,".depend%s",NameTampon);
+  if ((dependfileoutput = fopen(ligne,"r"))==NULL)
+  {
+      out = 0;
+  }
+  else
+  {
+      out = 1;
+      fclose(dependfileoutput);
+  }
+  return out;
+}
+
+
+/******************************************************************************/
+/*                      Did_module_common_treaded                             */
+/******************************************************************************/
+/* This subroutine is used to know if the .depend<NameTampon> exist           */
+/*    it means if the file has been ever parsed                               */
+/******************************************************************************/
+/*                                                                            */
+/******************************************************************************/
+int Did_module_common_treaded(char *NameTampon)
+{
+  FILE *dependfileoutput;
+  char ligne[LONG_C];
+  int out;
+
+  convert2lower(NameTampon);
+  sprintf(ligne,".depend%s",NameTampon);
+  if ((dependfileoutput = fopen(ligne,"r"))==NULL)
+  {
+      out = 0;
+  }
+  else
+  {
+      out = 1;
+      fclose(dependfileoutput);
+  }
+  return out;
+}
+
+
+
+void Write_val_max()
+{
+  FILE *dependfileoutput;
+
+  if ((dependfileoutput=fopen(".dependvalmax","w"))!=NULL)
+  {
+     fprintf(dependfileoutput,"length_last\n");
+     fprintf(dependfileoutput,"%d\n",length_last);
+     fprintf(dependfileoutput,"length_first\n");
+     fprintf(dependfileoutput,"%d\n",length_first);
+     fprintf(dependfileoutput,"length_v_typevar\n");
+     fprintf(dependfileoutput,"%d\n",length_v_typevar);
+     fprintf(dependfileoutput,"length_v_nomvar\n");
+     fprintf(dependfileoutput,"%d\n",length_v_nomvar);
+     fprintf(dependfileoutput,"length_v_dimchar\n");
+     fprintf(dependfileoutput,"%d\n",length_v_dimchar);
+     fprintf(dependfileoutput,"length_v_modulename\n");
+     fprintf(dependfileoutput,"%d\n",length_v_modulename);
+     fprintf(dependfileoutput,"length_v_commonname\n");
+     fprintf(dependfileoutput,"%d\n",length_v_commonname);
+     fprintf(dependfileoutput,"length_v_vallengspec\n");
+     fprintf(dependfileoutput,"%d\n",length_v_vallengspec);
+     fprintf(dependfileoutput,"length_v_nameinttypename\n");
+     fprintf(dependfileoutput,"%d\n",length_v_nameinttypename);
+     fprintf(dependfileoutput,"length_v_commoninfile\n");
+     fprintf(dependfileoutput,"%d\n",length_v_commoninfile);
+     fprintf(dependfileoutput,"length_v_subroutinename\n");
+     fprintf(dependfileoutput,"%d\n",length_v_subroutinename);
+     fprintf(dependfileoutput,"length_v_precision\n");
+     fprintf(dependfileoutput,"%d\n",length_v_precision);
+     fprintf(dependfileoutput,"length_v_IntentSpec\n");
+     fprintf(dependfileoutput,"%d\n",length_v_IntentSpec);
+     fprintf(dependfileoutput,"length_v_initialvalue\n");
+     fprintf(dependfileoutput,"%d\n",length_v_initialvalue);
+     fprintf(dependfileoutput,"length_v_readedlistdimension\n");
+     fprintf(dependfileoutput,"%d\n",length_v_readedlistdimension);
+     fprintf(dependfileoutput,"length_u_usemodule\n");
+     fprintf(dependfileoutput,"%d\n",length_u_usemodule);
+     fprintf(dependfileoutput,"length_u_charusemodule\n");
+     fprintf(dependfileoutput,"%d\n",length_u_charusemodule);
+     fprintf(dependfileoutput,"length_u_cursubroutine\n");
+     fprintf(dependfileoutput,"%d\n",length_u_cursubroutine);
+     fprintf(dependfileoutput,"length_u_modulename\n");
+     fprintf(dependfileoutput,"%d\n",length_u_modulename);
+     fprintf(dependfileoutput,"length_n_name\n");
+     fprintf(dependfileoutput,"%d\n",length_n_name);
+     fprintf(dependfileoutput,"length_c_namevar\n");
+     fprintf(dependfileoutput,"%d\n",length_c_namevar);
+     fprintf(dependfileoutput,"length_c_namepointedvar\n");
+     fprintf(dependfileoutput,"%d\n",length_c_namepointedvar);
+     fprintf(dependfileoutput,"length_o_nom\n");
+     fprintf(dependfileoutput,"%d\n",length_o_nom);
+     fprintf(dependfileoutput,"length_o_module\n");
+     fprintf(dependfileoutput,"%d\n",length_o_module);
+     fprintf(dependfileoutput,"length_a_nomvar\n");
+     fprintf(dependfileoutput,"%d\n",length_a_nomvar);
+     fprintf(dependfileoutput,"length_a_subroutine\n");
+     fprintf(dependfileoutput,"%d\n",length_a_subroutine);
+     fprintf(dependfileoutput,"length_a_module\n");
+     fprintf(dependfileoutput,"%d\n",length_a_module);
+     fprintf(dependfileoutput,"length_usemodule\n");
+     fprintf(dependfileoutput,"%d\n",length_t_usemodule);
+     fprintf(dependfileoutput,"length_cursubroutine\n");
+     fprintf(dependfileoutput,"%d\n",length_t_cursubroutine);
+     fprintf(dependfileoutput,"length_curfilename\n");
+     fprintf(dependfileoutput,"%d\n",length_curfilename);
+     fprintf(dependfileoutput,"length_nomfileoutput\n");
+     fprintf(dependfileoutput,"%d\n",length_nomfileoutput);
+     fprintf(dependfileoutput,"length_motparse\n");
+     fprintf(dependfileoutput,"%d\n",length_motparse);
+     fprintf(dependfileoutput,"length_mainfile\n");
+     fprintf(dependfileoutput,"%d\n",length_mainfile);
+     fprintf(dependfileoutput,"length_nomdir\n");
+     fprintf(dependfileoutput,"%d\n",length_nomdir);
+     fprintf(dependfileoutput,"length_commondirout\n");
+     fprintf(dependfileoutput,"%d\n",length_commondirout);
+     fprintf(dependfileoutput,"length_commondirin\n");
+     fprintf(dependfileoutput,"%d\n",length_commondirin);
+     fprintf(dependfileoutput,"length_filetoparse\n");
+     fprintf(dependfileoutput,"%d\n",length_filetoparse);
+     fprintf(dependfileoutput,"length_curbuf\n");
+     fprintf(dependfileoutput,"%d\n",length_curbuf);
+     fprintf(dependfileoutput,"length_toprintglob\n");
+     fprintf(dependfileoutput,"%d\n",length_toprintglob);
+     fprintf(dependfileoutput,"Size_char0d\n");
+     fprintf(dependfileoutput,"%d\n",value_char_size);
+     fprintf(dependfileoutput,"Size_char1d\n");
+     fprintf(dependfileoutput,"%d\n",value_char_size1);
+     fprintf(dependfileoutput,"Size_char2d\n");
+     fprintf(dependfileoutput,"%d\n",value_char_size2);
+     fprintf(dependfileoutput,"Size_char3d\n");
+     fprintf(dependfileoutput,"%d\n",value_char_size3);
+     fprintf(dependfileoutput,"length_tmpvargridname\n");
+     fprintf(dependfileoutput,"%d\n",length_tmpvargridname);
+     fprintf(dependfileoutput,"length_ligne_Subloop\n");
+     fprintf(dependfileoutput,"%d\n",length_ligne_Subloop);
+     fprintf(dependfileoutput,"length_lvargridname_toamr\n");
+     fprintf(dependfileoutput,"%d\n",length_lvargridname_toamr);
+     fprintf(dependfileoutput,"length_toprint_toamr\n");
+     fprintf(dependfileoutput,"%d\n",length_toprint_utilagrif);
+     fprintf(dependfileoutput,"length_toprinttmp_utilchar\n");
+     fprintf(dependfileoutput,"%d\n",length_toprinttmp_utilchar);
+     fprintf(dependfileoutput,"length_ligne_writedecl\n");
+     fprintf(dependfileoutput,"%d\n",length_ligne_writedecl);
+     fprintf(dependfileoutput,"length_newname_toamr\n");
+     fprintf(dependfileoutput,"%d\n",length_newname_toamr);
+     fprintf(dependfileoutput,"length_newname_writedecl\n");
+     fprintf(dependfileoutput,"%d\n",length_newname_writedecl);
+     fprintf(dependfileoutput,"length_ligne_toamr\n");
+     fprintf(dependfileoutput,"%d\n",length_ligne_toamr);
+     fprintf(dependfileoutput,"length_tmpligne_writedecl\n");
+     fprintf(dependfileoutput,"%d\n",length_tmpligne_writedecl);
+/*     fprintf(dependfileoutput,"\n");
+     fprintf(dependfileoutput,"%d\n",);
+     fprintf(dependfileoutput,"\n");
+     fprintf(dependfileoutput,"%d\n",);
+     fprintf(dependfileoutput,"\n");
+     fprintf(dependfileoutput,"%d\n",);
+     fprintf(dependfileoutput,"\n");
+     fprintf(dependfileoutput,"%d\n",);
+     fprintf(dependfileoutput,"\n");
+     fprintf(dependfileoutput,"%d\n",);
+     fprintf(dependfileoutput,"\n");
+     fprintf(dependfileoutput,"%d\n",);
+     fprintf(dependfileoutput,"\n");
+     fprintf(dependfileoutput,"%d\n",);
+     fprintf(dependfileoutput,"\n");
+     fprintf(dependfileoutput,"%d\n",);
+     fprintf(dependfileoutput,"\n");
+     fprintf(dependfileoutput,"%d\n",);*/
+
+     fclose(dependfileoutput);
+  }
+}
+
+
+void Read_val_max()
+{
+  char nothing[LONG_C];
+  FILE *dependfileoutput;
+
+  if ((dependfileoutput=fopen(".dependvalmax","r"))!=NULL)
+  {
+     fscanf(dependfileoutput,"%s\n",nothing);
+     fscanf(dependfileoutput,"%d\n",&length_last);
+     fscanf(dependfileoutput,"%s\n",nothing);
+     fscanf(dependfileoutput,"%d\n",&length_first);
+     fscanf(dependfileoutput,"%s\n",nothing);
+     fscanf(dependfileoutput,"%d\n",&length_v_typevar);
+     fscanf(dependfileoutput,"%s\n",nothing);
+     fscanf(dependfileoutput,"%d\n",&length_v_nomvar);
+     fscanf(dependfileoutput,"%s\n",nothing);
+     fscanf(dependfileoutput,"%d\n",&length_v_dimchar);
+     fscanf(dependfileoutput,"%s\n",nothing);
+     fscanf(dependfileoutput,"%d\n",&length_v_modulename);
+     fscanf(dependfileoutput,"%s\n",nothing);
+     fscanf(dependfileoutput,"%d\n",&length_v_commonname);
+     fscanf(dependfileoutput,"%s\n",nothing);
+     fscanf(dependfileoutput,"%d\n",&length_v_vallengspec);
+     fscanf(dependfileoutput,"%s\n",nothing);
+     fscanf(dependfileoutput,"%d\n",&length_v_nameinttypename);
+     fscanf(dependfileoutput,"%s\n",nothing);
+     fscanf(dependfileoutput,"%d\n",&length_v_commoninfile);
+     fscanf(dependfileoutput,"%s\n",nothing);
+     fscanf(dependfileoutput,"%d\n",&length_v_subroutinename);
+     fscanf(dependfileoutput,"%s\n",nothing);
+     fscanf(dependfileoutput,"%d\n",&length_v_precision);
+     fscanf(dependfileoutput,"%s\n",nothing);
+     fscanf(dependfileoutput,"%d\n",&length_v_IntentSpec);
+     fscanf(dependfileoutput,"%s\n",nothing);
+     fscanf(dependfileoutput,"%d\n",&length_v_initialvalue);
+     fscanf(dependfileoutput,"%s\n",nothing);
+     fscanf(dependfileoutput,"%d\n",&length_v_readedlistdimension);
+     fscanf(dependfileoutput,"%s\n",nothing);
+     fscanf(dependfileoutput,"%d\n",&length_u_usemodule);
+     fscanf(dependfileoutput,"%s\n",nothing);
+     fscanf(dependfileoutput,"%d\n",&length_u_charusemodule);
+     fscanf(dependfileoutput,"%s\n",nothing);
+     fscanf(dependfileoutput,"%d\n",&length_u_cursubroutine);
+     fscanf(dependfileoutput,"%s\n",nothing);
+     fscanf(dependfileoutput,"%d\n",&length_u_modulename);
+     fscanf(dependfileoutput,"%s\n",nothing);
+     fscanf(dependfileoutput,"%d\n",&length_n_name);
+     fscanf(dependfileoutput,"%s\n",nothing);
+     fscanf(dependfileoutput,"%d\n",&length_c_namevar);
+     fscanf(dependfileoutput,"%s\n",nothing);
+     fscanf(dependfileoutput,"%d\n",&length_c_namepointedvar);
+     fscanf(dependfileoutput,"%s\n",nothing);
+     fscanf(dependfileoutput,"%d\n",&length_o_nom);
+     fscanf(dependfileoutput,"%s\n",nothing);
+     fscanf(dependfileoutput,"%d\n",&length_o_module);
+     fscanf(dependfileoutput,"%s\n",nothing);
+     fscanf(dependfileoutput,"%d\n",&length_a_nomvar);
+     fscanf(dependfileoutput,"%s\n",nothing);
+     fscanf(dependfileoutput,"%d\n",&length_a_subroutine);
+     fscanf(dependfileoutput,"%s\n",nothing);
+     fscanf(dependfileoutput,"%d\n",&length_a_module);
+     fscanf(dependfileoutput,"%s\n",nothing);
+     fscanf(dependfileoutput,"%d\n",&length_t_usemodule);
+     fscanf(dependfileoutput,"%s\n",nothing);
+     fscanf(dependfileoutput,"%d\n",&length_t_cursubroutine);
+     fscanf(dependfileoutput,"%s\n",nothing);
+     fscanf(dependfileoutput,"%d\n",&length_curfilename);
+     fscanf(dependfileoutput,"%s\n",nothing);
+     fscanf(dependfileoutput,"%d\n",&length_nomfileoutput);
+     fscanf(dependfileoutput,"%s\n",nothing);
+     fscanf(dependfileoutput,"%d\n",&length_motparse);
+     fscanf(dependfileoutput,"%s\n",nothing);
+     fscanf(dependfileoutput,"%d\n",&length_mainfile);
+     fscanf(dependfileoutput,"%s\n",nothing);
+     fscanf(dependfileoutput,"%d\n",&length_nomdir);
+     fscanf(dependfileoutput,"%s\n",nothing);
+     fscanf(dependfileoutput,"%d\n",&length_commondirout);
+     fscanf(dependfileoutput,"%s\n",nothing);
+     fscanf(dependfileoutput,"%d\n",&length_commondirin);
+     fscanf(dependfileoutput,"%s\n",nothing);
+     fscanf(dependfileoutput,"%d\n",&length_filetoparse);
+     fscanf(dependfileoutput,"%s\n",nothing);
+     fscanf(dependfileoutput,"%d\n",&length_curbuf);
+     fscanf(dependfileoutput,"%s\n",nothing);
+     fscanf(dependfileoutput,"%d\n",&length_toprintglob);
+     fscanf(dependfileoutput,"%s\n",nothing);
+     fscanf(dependfileoutput,"%d\n",&value_char_size);
+     fscanf(dependfileoutput,"%s\n",nothing);
+     fscanf(dependfileoutput,"%d\n",&value_char_size1);
+     fscanf(dependfileoutput,"%s\n",nothing);
+     fscanf(dependfileoutput,"%d\n",&value_char_size2);
+     fscanf(dependfileoutput,"%s\n",nothing);
+     fscanf(dependfileoutput,"%d\n",&value_char_size3);
+     fscanf(dependfileoutput,"%s\n",nothing);
+     fscanf(dependfileoutput,"%d\n",&length_tmpvargridname);
+     fscanf(dependfileoutput,"%s\n",nothing);
+     fscanf(dependfileoutput,"%d\n",&length_ligne_Subloop);
+     fscanf(dependfileoutput,"%s\n",nothing);
+     fscanf(dependfileoutput,"%d\n",&length_lvargridname_toamr);
+     fscanf(dependfileoutput,"%s\n",nothing);
+     fscanf(dependfileoutput,"%d\n",&length_toprint_utilagrif);
+     fscanf(dependfileoutput,"%s\n",nothing);
+     fscanf(dependfileoutput,"%d\n",&length_toprinttmp_utilchar);
+     fscanf(dependfileoutput,"%s\n",nothing);
+     fscanf(dependfileoutput,"%d\n",&length_ligne_writedecl);
+     fscanf(dependfileoutput,"%s\n",nothing);
+     fscanf(dependfileoutput,"%d\n",&length_newname_toamr);
+     fscanf(dependfileoutput,"%s\n",nothing);
+     fscanf(dependfileoutput,"%d\n",&length_newname_writedecl);
+     fscanf(dependfileoutput,"%s\n",nothing);
+     fscanf(dependfileoutput,"%d\n",&length_ligne_toamr);
+     fscanf(dependfileoutput,"%s\n",nothing);
+     fscanf(dependfileoutput,"%d\n",&length_tmpligne_writedecl);
+/*     fscanf(dependfileoutput,"%s\n",nothing);
+     fscanf(dependfileoutput,"%d\n",&);
+     fscanf(dependfileoutput,"%s\n",nothing);
+     fscanf(dependfileoutput,"%d\n",&);
+     fscanf(dependfileoutput,"%s\n",nothing);
+     fscanf(dependfileoutput,"%d\n",&);
+     fscanf(dependfileoutput,"%s\n",nothing);
+     fscanf(dependfileoutput,"%d\n",&);
+     fscanf(dependfileoutput,"%s\n",nothing);
+     fscanf(dependfileoutput,"%d\n",&);
+     fscanf(dependfileoutput,"%s\n",nothing);
+     fscanf(dependfileoutput,"%d\n",&);
+     fscanf(dependfileoutput,"%s\n",nothing);
+     fscanf(dependfileoutput,"%d\n",&);
+     fscanf(dependfileoutput,"%s\n",nothing);
+     fscanf(dependfileoutput,"%d\n",&);
+     fscanf(dependfileoutput,"%s\n",nothing);
+     fscanf(dependfileoutput,"%d\n",&);*/
+
+     fclose(dependfileoutput);
+  }
+}
Index: vendors/AGRIF/r_01/LIB/fortran.c
===================================================================
--- vendors/AGRIF/r_01/LIB/fortran.c	(revision 2672)
+++ vendors/AGRIF/r_01/LIB/fortran.c	(revision 2672)
@@ -0,0 +1,12032 @@
+/* A Bison parser, made by GNU Bison 2.3.  */
+
+/* Skeleton implementation for Bison's Yacc-like parsers in C
+
+   Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+   Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 51 Franklin Street, Fifth Floor,
+   Boston, MA 02110-1301, USA.  */
+
+/* As a special exception, you may create a larger work that contains
+   part or all of the Bison parser skeleton and distribute that work
+   under terms of your choice, so long as that work isn't itself a
+   parser generator using the skeleton or a modified version thereof
+   as a parser skeleton.  Alternatively, if you modify or redistribute
+   the parser skeleton itself, you may (at your option) remove this
+   special exception, which will cause the skeleton and the resulting
+   Bison output files to be licensed under the GNU General Public
+   License without this special exception.
+
+   This special exception was added by the Free Software Foundation in
+   version 2.2 of Bison.  */
+
+/* C LALR(1) parser skeleton written by Richard Stallman, by
+   simplifying the original so-called "semantic" parser.  */
+
+/* All symbols defined below should begin with yy or YY, to avoid
+   infringing on user name space.  This should be done even for local
+   variables, as they might otherwise be expanded by user macros.
+   There are some unavoidable exceptions within include files to
+   define necessary library symbols; they are noted "INFRINGES ON
+   USER NAME SPACE" below.  */
+
+/* Identify Bison output.  */
+#define YYBISON 1
+
+/* Bison version.  */
+#define YYBISON_VERSION "2.3"
+
+/* Skeleton name.  */
+#define YYSKELETON_NAME "yacc.c"
+
+/* Pure parsers.  */
+#define YYPURE 0
+
+/* Using locations.  */
+#define YYLSP_NEEDED 0
+
+/* Substitute the variable and function names.  */
+#define yyparse fortranparse
+#define yylex   fortranlex
+#define yyerror fortranerror
+#define yylval  fortranlval
+#define yychar  fortranchar
+#define yydebug fortrandebug
+#define yynerrs fortrannerrs
+
+
+/* Tokens.  */
+#ifndef YYTOKENTYPE
+# define YYTOKENTYPE
+   /* Put the tokens into the symbol table, so that GDB and other debuggers
+      know about them.  */
+   enum yytokentype {
+     TOK_BINARY_OP = 258,
+     TOK_NEQV = 259,
+     TOK_EQV = 260,
+     TOK_XOR = 261,
+     TOK_OR = 262,
+     TOK_AND = 263,
+     TOK_NOT = 264,
+     TOK_NE = 265,
+     TOK_EQ = 266,
+     TOK_GE = 267,
+     TOK_LE = 268,
+     TOK_GT = 269,
+     TOK_LT = 270,
+     TOK_UNARY_OP = 271,
+     TOK_DSLASH = 272,
+     TOK_SLASH = 273,
+     TOK_DASTER = 274,
+     TOK_SEP = 275,
+     TOK_SEMICOLON = 276,
+     TOK_NEXTLINE = 277,
+     TOK_PARAMETER = 278,
+     TOK_RESULT = 279,
+     TOK_ONLY = 280,
+     TOK_INCLUDE = 281,
+     TOK_SUBROUTINE = 282,
+     TOK_PROGRAM = 283,
+     TOK_FUNCTION = 284,
+     TOK_OMP = 285,
+     TOK_DOLLAR = 286,
+     TOK_FORMAT = 287,
+     TOK_MAX = 288,
+     TOK_TANH = 289,
+     TOK_WHERE = 290,
+     TOK_ELSEWHERE = 291,
+     TOK_ENDWHERE = 292,
+     TOK_MAXVAL = 293,
+     TOK_TRIM = 294,
+     TOK_SUM = 295,
+     TOK_SQRT = 296,
+     TOK_CASE = 297,
+     TOK_SELECTCASE = 298,
+     TOK_FILE = 299,
+     TOK_END = 300,
+     TOK_ERR = 301,
+     TOK_DONOTTREAT = 302,
+     TOK_ENDDONOTTREAT = 303,
+     TOK_EXIST = 304,
+     TOK_MIN = 305,
+     TOK_FLOAT = 306,
+     TOK_EXP = 307,
+     TOK_COS = 308,
+     TOK_COSH = 309,
+     TOK_ACOS = 310,
+     TOK_NINT = 311,
+     TOK_CYCLE = 312,
+     TOK_SIN = 313,
+     TOK_SINH = 314,
+     TOK_ASIN = 315,
+     TOK_EQUIVALENCE = 316,
+     TOK_BACKSPACE = 317,
+     TOK_LOG = 318,
+     TOK_TAN = 319,
+     TOK_ATAN = 320,
+     TOK_RECURSIVE = 321,
+     TOK_ABS = 322,
+     TOK_MOD = 323,
+     TOK_SIGN = 324,
+     TOK_MINLOC = 325,
+     TOK_MAXLOC = 326,
+     TOK_EXIT = 327,
+     TOK_MINVAL = 328,
+     TOK_PUBLIC = 329,
+     TOK_PRIVATE = 330,
+     TOK_ALLOCATABLE = 331,
+     TOK_RETURN = 332,
+     TOK_THEN = 333,
+     TOK_ELSEIF = 334,
+     TOK_ELSE = 335,
+     TOK_ENDIF = 336,
+     TOK_PRINT = 337,
+     TOK_PLAINGOTO = 338,
+     TOK_CONSTRUCTID = 339,
+     TOK_LOGICALIF = 340,
+     TOK_PLAINDO = 341,
+     TOK_CONTAINS = 342,
+     TOK_ENDDO = 343,
+     TOK_MODULE = 344,
+     TOK_ENDMODULE = 345,
+     TOK_DOWHILE = 346,
+     TOK_ALLOCATE = 347,
+     TOK_OPEN = 348,
+     TOK_CLOSE = 349,
+     TOK_INQUIRE = 350,
+     TOK_WRITE = 351,
+     TOK_READ = 352,
+     TOK_REWIND = 353,
+     TOK_DEALLOCATE = 354,
+     TOK_NULLIFY = 355,
+     TOK_FIN = 356,
+     TOK_DEBUT = 357,
+     TOK_DIMENSION = 358,
+     TOK_ENDSELECT = 359,
+     TOK_EXTERNAL = 360,
+     TOK_INTENT = 361,
+     TOK_INTRINSIC = 362,
+     TOK_NAMELIST = 363,
+     TOK_CASEDEFAULT = 364,
+     TOK_OPTIONAL = 365,
+     TOK_POINTER = 366,
+     TOK_CONTINUE = 367,
+     TOK_SAVE = 368,
+     TOK_TARGET = 369,
+     TOK_QUOTE = 370,
+     TOK_IMPLICIT = 371,
+     TOK_NONE = 372,
+     TOK_CALL = 373,
+     TOK_STAT = 374,
+     TOK_POINT_TO = 375,
+     TOK_COMMON = 376,
+     TOK_GLOBAL = 377,
+     TOK_INTERFACE = 378,
+     TOK_ENDINTERFACE = 379,
+     TOK_LEFTAB = 380,
+     TOK_RIGHTAB = 381,
+     TOK_PAUSE = 382,
+     TOK_PROCEDURE = 383,
+     TOK_STOP = 384,
+     TOK_NAMEEQ = 385,
+     TOK_REAL8 = 386,
+     TOK_OUT = 387,
+     TOK_INOUT = 388,
+     TOK_IN = 389,
+     TOK_USE = 390,
+     TOK_TRUE = 391,
+     TOK_FALSE = 392,
+     TOK_LABEL = 393,
+     TOK_TYPE = 394,
+     TOK_TYPEPAR = 395,
+     TOK_ENDTYPE = 396,
+     TOK_REAL = 397,
+     TOK_INTEGER = 398,
+     TOK_LOGICAL = 399,
+     TOK_DOUBLEPRECISION = 400,
+     TOK_DOUBLEREAL = 401,
+     TOK_ENDSUBROUTINE = 402,
+     TOK_ENDFUNCTION = 403,
+     TOK_ENDPROGRAM = 404,
+     TOK_ENDUNIT = 405,
+     TOK_CHARACTER = 406,
+     TOK_CHAR_CONSTANT = 407,
+     TOK_CHAR_CUT = 408,
+     TOK_DATA = 409,
+     TOK_CHAR_INT = 410,
+     TOK_CHAR_MESSAGE = 411,
+     TOK_CSTREAL = 412,
+     TOK_CSTREALDP = 413,
+     TOK_CSTREALQP = 414,
+     TOK_SFREAL = 415,
+     TOK_COMPLEX = 416,
+     TOK_DOUBLECOMPLEX = 417,
+     TOK_NAME = 418,
+     TOK_NAME_CHAR = 419,
+     TOK_PROBTYPE = 420,
+     TOK_INTERPTYPE = 421,
+     TOK_VARTYPE = 422,
+     TOK_BC = 423,
+     TOK_OP = 424,
+     TOK_CSTINT = 425,
+     TOK_COMMENT = 426,
+     TOK_FILENAME = 427
+   };
+#endif
+/* Tokens.  */
+#define TOK_BINARY_OP 258
+#define TOK_NEQV 259
+#define TOK_EQV 260
+#define TOK_XOR 261
+#define TOK_OR 262
+#define TOK_AND 263
+#define TOK_NOT 264
+#define TOK_NE 265
+#define TOK_EQ 266
+#define TOK_GE 267
+#define TOK_LE 268
+#define TOK_GT 269
+#define TOK_LT 270
+#define TOK_UNARY_OP 271
+#define TOK_DSLASH 272
+#define TOK_SLASH 273
+#define TOK_DASTER 274
+#define TOK_SEP 275
+#define TOK_SEMICOLON 276
+#define TOK_NEXTLINE 277
+#define TOK_PARAMETER 278
+#define TOK_RESULT 279
+#define TOK_ONLY 280
+#define TOK_INCLUDE 281
+#define TOK_SUBROUTINE 282
+#define TOK_PROGRAM 283
+#define TOK_FUNCTION 284
+#define TOK_OMP 285
+#define TOK_DOLLAR 286
+#define TOK_FORMAT 287
+#define TOK_MAX 288
+#define TOK_TANH 289
+#define TOK_WHERE 290
+#define TOK_ELSEWHERE 291
+#define TOK_ENDWHERE 292
+#define TOK_MAXVAL 293
+#define TOK_TRIM 294
+#define TOK_SUM 295
+#define TOK_SQRT 296
+#define TOK_CASE 297
+#define TOK_SELECTCASE 298
+#define TOK_FILE 299
+#define TOK_END 300
+#define TOK_ERR 301
+#define TOK_DONOTTREAT 302
+#define TOK_ENDDONOTTREAT 303
+#define TOK_EXIST 304
+#define TOK_MIN 305
+#define TOK_FLOAT 306
+#define TOK_EXP 307
+#define TOK_COS 308
+#define TOK_COSH 309
+#define TOK_ACOS 310
+#define TOK_NINT 311
+#define TOK_CYCLE 312
+#define TOK_SIN 313
+#define TOK_SINH 314
+#define TOK_ASIN 315
+#define TOK_EQUIVALENCE 316
+#define TOK_BACKSPACE 317
+#define TOK_LOG 318
+#define TOK_TAN 319
+#define TOK_ATAN 320
+#define TOK_RECURSIVE 321
+#define TOK_ABS 322
+#define TOK_MOD 323
+#define TOK_SIGN 324
+#define TOK_MINLOC 325
+#define TOK_MAXLOC 326
+#define TOK_EXIT 327
+#define TOK_MINVAL 328
+#define TOK_PUBLIC 329
+#define TOK_PRIVATE 330
+#define TOK_ALLOCATABLE 331
+#define TOK_RETURN 332
+#define TOK_THEN 333
+#define TOK_ELSEIF 334
+#define TOK_ELSE 335
+#define TOK_ENDIF 336
+#define TOK_PRINT 337
+#define TOK_PLAINGOTO 338
+#define TOK_CONSTRUCTID 339
+#define TOK_LOGICALIF 340
+#define TOK_PLAINDO 341
+#define TOK_CONTAINS 342
+#define TOK_ENDDO 343
+#define TOK_MODULE 344
+#define TOK_ENDMODULE 345
+#define TOK_DOWHILE 346
+#define TOK_ALLOCATE 347
+#define TOK_OPEN 348
+#define TOK_CLOSE 349
+#define TOK_INQUIRE 350
+#define TOK_WRITE 351
+#define TOK_READ 352
+#define TOK_REWIND 353
+#define TOK_DEALLOCATE 354
+#define TOK_NULLIFY 355
+#define TOK_FIN 356
+#define TOK_DEBUT 357
+#define TOK_DIMENSION 358
+#define TOK_ENDSELECT 359
+#define TOK_EXTERNAL 360
+#define TOK_INTENT 361
+#define TOK_INTRINSIC 362
+#define TOK_NAMELIST 363
+#define TOK_CASEDEFAULT 364
+#define TOK_OPTIONAL 365
+#define TOK_POINTER 366
+#define TOK_CONTINUE 367
+#define TOK_SAVE 368
+#define TOK_TARGET 369
+#define TOK_QUOTE 370
+#define TOK_IMPLICIT 371
+#define TOK_NONE 372
+#define TOK_CALL 373
+#define TOK_STAT 374
+#define TOK_POINT_TO 375
+#define TOK_COMMON 376
+#define TOK_GLOBAL 377
+#define TOK_INTERFACE 378
+#define TOK_ENDINTERFACE 379
+#define TOK_LEFTAB 380
+#define TOK_RIGHTAB 381
+#define TOK_PAUSE 382
+#define TOK_PROCEDURE 383
+#define TOK_STOP 384
+#define TOK_NAMEEQ 385
+#define TOK_REAL8 386
+#define TOK_OUT 387
+#define TOK_INOUT 388
+#define TOK_IN 389
+#define TOK_USE 390
+#define TOK_TRUE 391
+#define TOK_FALSE 392
+#define TOK_LABEL 393
+#define TOK_TYPE 394
+#define TOK_TYPEPAR 395
+#define TOK_ENDTYPE 396
+#define TOK_REAL 397
+#define TOK_INTEGER 398
+#define TOK_LOGICAL 399
+#define TOK_DOUBLEPRECISION 400
+#define TOK_DOUBLEREAL 401
+#define TOK_ENDSUBROUTINE 402
+#define TOK_ENDFUNCTION 403
+#define TOK_ENDPROGRAM 404
+#define TOK_ENDUNIT 405
+#define TOK_CHARACTER 406
+#define TOK_CHAR_CONSTANT 407
+#define TOK_CHAR_CUT 408
+#define TOK_DATA 409
+#define TOK_CHAR_INT 410
+#define TOK_CHAR_MESSAGE 411
+#define TOK_CSTREAL 412
+#define TOK_CSTREALDP 413
+#define TOK_CSTREALQP 414
+#define TOK_SFREAL 415
+#define TOK_COMPLEX 416
+#define TOK_DOUBLECOMPLEX 417
+#define TOK_NAME 418
+#define TOK_NAME_CHAR 419
+#define TOK_PROBTYPE 420
+#define TOK_INTERPTYPE 421
+#define TOK_VARTYPE 422
+#define TOK_BC 423
+#define TOK_OP 424
+#define TOK_CSTINT 425
+#define TOK_COMMENT 426
+#define TOK_FILENAME 427
+
+
+
+
+/* Copy the first part of user declarations.  */
+#line 36 "fortran.y"
+
+#define YYMAXDEPTH 1000
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include "decl.h"
+extern int line_num_fortran;
+extern int line_num_fortran_common;
+char *tmp;
+char c_selectorname[LONG_C];
+char ligne[LONG_C];
+char truename[LONGNOM];
+char identcopy[LONG_C];
+int c_selectorgiven=0;
+int incom;
+listvar *curlistvar;
+typedim c_selectordim;
+listcouple *coupletmp;
+listdim *parcoursdim;
+int removeline=0;
+listvar *test;
+
+
+/* Enabling traces.  */
+#ifndef YYDEBUG
+# define YYDEBUG 1
+#endif
+
+/* Enabling verbose error messages.  */
+#ifdef YYERROR_VERBOSE
+# undef YYERROR_VERBOSE
+# define YYERROR_VERBOSE 1
+#else
+# define YYERROR_VERBOSE 0
+#endif
+
+/* Enabling the token table.  */
+#ifndef YYTOKEN_TABLE
+# define YYTOKEN_TABLE 0
+#endif
+
+#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
+typedef union YYSTYPE
+#line 59 "fortran.y"
+{
+       char      nac[LONG_C];
+       char      na[LONGNOM];
+       listdim  *d;
+       listvar  *l;
+       listnom  *ln;
+       listcouple  *lc;
+       listname *lnn;
+       typedim   dim1;
+       variable *v;
+       }
+/* Line 193 of yacc.c.  */
+#line 483 "fortran.tab.c"
+	YYSTYPE;
+# define yystype YYSTYPE /* obsolescent; will be withdrawn */
+# define YYSTYPE_IS_DECLARED 1
+# define YYSTYPE_IS_TRIVIAL 1
+#endif
+
+
+
+/* Copy the second part of user declarations.  */
+
+
+/* Line 216 of yacc.c.  */
+#line 496 "fortran.tab.c"
+
+#ifdef short
+# undef short
+#endif
+
+#ifdef YYTYPE_UINT8
+typedef YYTYPE_UINT8 yytype_uint8;
+#else
+typedef unsigned char yytype_uint8;
+#endif
+
+#ifdef YYTYPE_INT8
+typedef YYTYPE_INT8 yytype_int8;
+#elif (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+typedef signed char yytype_int8;
+#else
+typedef short int yytype_int8;
+#endif
+
+#ifdef YYTYPE_UINT16
+typedef YYTYPE_UINT16 yytype_uint16;
+#else
+typedef unsigned short int yytype_uint16;
+#endif
+
+#ifdef YYTYPE_INT16
+typedef YYTYPE_INT16 yytype_int16;
+#else
+typedef short int yytype_int16;
+#endif
+
+#ifndef YYSIZE_T
+# ifdef __SIZE_TYPE__
+#  define YYSIZE_T __SIZE_TYPE__
+# elif defined size_t
+#  define YYSIZE_T size_t
+# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+#  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
+#  define YYSIZE_T size_t
+# else
+#  define YYSIZE_T unsigned int
+# endif
+#endif
+
+#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
+
+#ifndef YY_
+# if defined YYENABLE_NLS && YYENABLE_NLS
+#  if ENABLE_NLS
+#   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
+#   define YY_(msgid) dgettext ("bison-runtime", msgid)
+#  endif
+# endif
+# ifndef YY_
+#  define YY_(msgid) msgid
+# endif
+#endif
+
+/* Suppress unused-variable warnings by "using" E.  */
+#if ! defined lint || defined __GNUC__
+# define YYUSE(e) ((void) (e))
+#else
+# define YYUSE(e) /* empty */
+#endif
+
+/* Identity function, used to suppress warnings about constant conditions.  */
+#ifndef lint
+# define YYID(n) (n)
+#else
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+static int
+YYID (int i)
+#else
+static int
+YYID (i)
+    int i;
+#endif
+{
+  return i;
+}
+#endif
+
+#if ! defined yyoverflow || YYERROR_VERBOSE
+
+/* The parser invokes alloca or malloc; define the necessary symbols.  */
+
+# ifdef YYSTACK_USE_ALLOCA
+#  if YYSTACK_USE_ALLOCA
+#   ifdef __GNUC__
+#    define YYSTACK_ALLOC __builtin_alloca
+#   elif defined __BUILTIN_VA_ARG_INCR
+#    include <alloca.h> /* INFRINGES ON USER NAME SPACE */
+#   elif defined _AIX
+#    define YYSTACK_ALLOC __alloca
+#   elif defined _MSC_VER
+#    include <malloc.h> /* INFRINGES ON USER NAME SPACE */
+#    define alloca _alloca
+#   else
+#    define YYSTACK_ALLOC alloca
+#    if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+#     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
+#     ifndef _STDLIB_H
+#      define _STDLIB_H 1
+#     endif
+#    endif
+#   endif
+#  endif
+# endif
+
+# ifdef YYSTACK_ALLOC
+   /* Pacify GCC's `empty if-body' warning.  */
+#  define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
+#  ifndef YYSTACK_ALLOC_MAXIMUM
+    /* The OS might guarantee only one guard page at the bottom of the stack,
+       and a page size can be as small as 4096 bytes.  So we cannot safely
+       invoke alloca (N) if N exceeds 4096.  Use a slightly smaller number
+       to allow for a few compiler-allocated temporary stack slots.  */
+#   define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
+#  endif
+# else
+#  define YYSTACK_ALLOC YYMALLOC
+#  define YYSTACK_FREE YYFREE
+#  ifndef YYSTACK_ALLOC_MAXIMUM
+#   define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
+#  endif
+#  if (defined __cplusplus && ! defined _STDLIB_H \
+       && ! ((defined YYMALLOC || defined malloc) \
+	     && (defined YYFREE || defined free)))
+#   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
+#   ifndef _STDLIB_H
+#    define _STDLIB_H 1
+#   endif
+#  endif
+#  ifndef YYMALLOC
+#   define YYMALLOC malloc
+#   if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
+#   endif
+#  endif
+#  ifndef YYFREE
+#   define YYFREE free
+#   if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+void free (void *); /* INFRINGES ON USER NAME SPACE */
+#   endif
+#  endif
+# endif
+#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
+
+
+#if (! defined yyoverflow \
+     && (! defined __cplusplus \
+	 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
+
+/* A type that is properly aligned for any stack member.  */
+union yyalloc
+{
+  yytype_int16 yyss;
+  YYSTYPE yyvs;
+  };
+
+/* The size of the maximum gap between one aligned stack and the next.  */
+# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
+
+/* The size of an array large to enough to hold all stacks, each with
+   N elements.  */
+# define YYSTACK_BYTES(N) \
+     ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
+      + YYSTACK_GAP_MAXIMUM)
+
+/* Copy COUNT objects from FROM to TO.  The source and destination do
+   not overlap.  */
+# ifndef YYCOPY
+#  if defined __GNUC__ && 1 < __GNUC__
+#   define YYCOPY(To, From, Count) \
+      __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
+#  else
+#   define YYCOPY(To, From, Count)		\
+      do					\
+	{					\
+	  YYSIZE_T yyi;				\
+	  for (yyi = 0; yyi < (Count); yyi++)	\
+	    (To)[yyi] = (From)[yyi];		\
+	}					\
+      while (YYID (0))
+#  endif
+# endif
+
+/* Relocate STACK from its old location to the new one.  The
+   local variables YYSIZE and YYSTACKSIZE give the old and new number of
+   elements in the stack, and YYPTR gives the new location of the
+   stack.  Advance YYPTR to a properly aligned location for the next
+   stack.  */
+# define YYSTACK_RELOCATE(Stack)					\
+    do									\
+      {									\
+	YYSIZE_T yynewbytes;						\
+	YYCOPY (&yyptr->Stack, Stack, yysize);				\
+	Stack = &yyptr->Stack;						\
+	yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
+	yyptr += yynewbytes / sizeof (*yyptr);				\
+      }									\
+    while (YYID (0))
+
+#endif
+
+/* YYFINAL -- State number of the termination state.  */
+#define YYFINAL  2
+/* YYLAST -- Last index in YYTABLE.  */
+#define YYLAST   5878
+
+/* YYNTOKENS -- Number of terminals.  */
+#define YYNTOKENS  190
+/* YYNNTS -- Number of nonterminals.  */
+#define YYNNTS  184
+/* YYNRULES -- Number of rules.  */
+#define YYNRULES  552
+/* YYNRULES -- Number of states.  */
+#define YYNSTATES  978
+
+/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
+#define YYUNDEFTOK  2
+#define YYMAXUTOK   427
+
+#define YYTRANSLATE(YYX)						\
+  ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
+
+/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX.  */
+static const yytype_uint8 yytranslate[] =
+{
+       0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+     187,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,   183,     2,     2,     2,   189,     2,     2,
+     179,   180,    23,    21,     3,    22,     2,   188,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     4,     2,
+     185,     5,   186,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,   181,     2,   182,     2,   184,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     1,     2,     6,     7,
+       8,     9,    10,    11,    12,    13,    14,    15,    16,    17,
+      18,    19,    20,    24,    25,    26,    27,    28,    29,    30,
+      31,    32,    33,    34,    35,    36,    37,    38,    39,    40,
+      41,    42,    43,    44,    45,    46,    47,    48,    49,    50,
+      51,    52,    53,    54,    55,    56,    57,    58,    59,    60,
+      61,    62,    63,    64,    65,    66,    67,    68,    69,    70,
+      71,    72,    73,    74,    75,    76,    77,    78,    79,    80,
+      81,    82,    83,    84,    85,    86,    87,    88,    89,    90,
+      91,    92,    93,    94,    95,    96,    97,    98,    99,   100,
+     101,   102,   103,   104,   105,   106,   107,   108,   109,   110,
+     111,   112,   113,   114,   115,   116,   117,   118,   119,   120,
+     121,   122,   123,   124,   125,   126,   127,   128,   129,   130,
+     131,   132,   133,   134,   135,   136,   137,   138,   139,   140,
+     141,   142,   143,   144,   145,   146,   147,   148,   149,   150,
+     151,   152,   153,   154,   155,   156,   157,   158,   159,   160,
+     161,   162,   163,   164,   165,   166,   167,   168,   169,   170,
+     171,   172,   173,   174,   175,   176,   177,   178
+};
+
+#if YYDEBUG
+/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
+   YYRHS.  */
+static const yytype_uint16 yyprhs[] =
+{
+       0,     0,     3,     4,     7,    10,    13,    15,    19,    23,
+      25,    29,    32,    35,    39,    43,    46,    49,    52,    54,
+      56,    58,    60,    61,    62,    65,    66,    68,    69,    70,
+      72,    73,    78,    81,    87,    91,    94,    96,    97,    99,
+     101,   102,   105,   109,   110,   113,   117,   119,   123,   125,
+     127,   130,   135,   138,   141,   146,   149,   151,   153,   155,
+     157,   159,   161,   163,   165,   167,   169,   174,   178,   182,
+     185,   189,   190,   192,   194,   196,   198,   200,   202,   204,
+     206,   208,   210,   212,   214,   216,   218,   220,   222,   224,
+     226,   228,   230,   232,   234,   236,   238,   240,   242,   246,
+     250,   256,   258,   262,   266,   269,   274,   276,   280,   281,
+     284,   287,   291,   293,   295,   297,   302,   309,   314,   316,
+     320,   323,   327,   333,   337,   339,   340,   343,   345,   350,
+     354,   357,   361,   365,   369,   373,   374,   376,   379,   382,
+     386,   392,   396,   397,   400,   403,   405,   411,   417,   420,
+     424,   427,   431,   433,   437,   440,   444,   450,   452,   455,
+     457,   461,   464,   466,   470,   471,   473,   475,   479,   483,
+     486,   488,   492,   495,   498,   499,   506,   514,   515,   518,
+     521,   525,   529,   531,   532,   535,   540,   544,   548,   553,
+     556,   558,   560,   562,   564,   566,   568,   570,   572,   573,
+     576,   578,   582,   583,   586,   590,   592,   596,   599,   603,
+     605,   607,   609,   611,   612,   616,   617,   620,   625,   627,
+     631,   633,   635,   637,   640,   642,   647,   649,   651,   653,
+     655,   657,   659,   661,   663,   665,   667,   668,   672,   674,
+     678,   680,   682,   685,   688,   692,   694,   696,   698,   702,
+     704,   706,   710,   714,   719,   724,   728,   733,   738,   742,
+     747,   752,   757,   762,   767,   772,   777,   782,   787,   792,
+     797,   802,   807,   811,   816,   821,   826,   831,   833,   837,
+     839,   841,   843,   846,   849,   852,   854,   856,   859,   862,
+     865,   868,   871,   874,   877,   880,   883,   886,   889,   893,
+     896,   900,   903,   906,   909,   912,   915,   918,   921,   922,
+     924,   927,   930,   933,   935,   937,   939,   941,   942,   944,
+     947,   952,   958,   963,   967,   971,   973,   976,   978,   982,
+     984,   986,   990,   996,  1001,  1005,  1008,  1011,  1013,  1015,
+    1017,  1019,  1021,  1023,  1025,  1027,  1030,  1033,  1035,  1038,
+    1040,  1042,  1043,  1045,  1051,  1052,  1054,  1056,  1058,  1059,
+    1063,  1064,  1070,  1073,  1078,  1085,  1092,  1094,  1096,  1098,
+    1102,  1106,  1108,  1112,  1116,  1118,  1120,  1126,  1132,  1137,
+    1139,  1142,  1145,  1148,  1151,  1153,  1156,  1162,  1164,  1166,
+    1169,  1175,  1177,  1180,  1184,  1189,  1191,  1193,  1195,  1197,
+    1199,  1201,  1203,  1205,  1209,  1213,  1217,  1220,  1223,  1224,
+    1230,  1238,  1239,  1242,  1244,  1246,  1247,  1249,  1251,  1253,
+    1255,  1258,  1260,  1262,  1264,  1270,  1276,  1279,  1282,  1285,
+    1288,  1290,  1291,  1296,  1303,  1305,  1309,  1312,  1315,  1318,
+    1319,  1323,  1324,  1326,  1329,  1331,  1333,  1337,  1339,  1342,
+    1344,  1346,  1349,  1352,  1355,  1359,  1362,  1364,  1365,  1367,
+    1370,  1373,  1374,  1377,  1381,  1385,  1389,  1393,  1395,  1399,
+    1401,  1403,  1407,  1409,  1411,  1413,  1416,  1421,  1426,  1429,
+    1432,  1434,  1436,  1438,  1440,  1442,  1444,  1446,  1448,  1450,
+    1454,  1456,  1458,  1462,  1466,  1470,  1474,  1477,  1481,  1484,
+    1487,  1490,  1493,  1497,  1499,  1501,  1503,  1507,  1508,  1510,
+    1513,  1518,  1521,  1524,  1530,  1531,  1533,  1536,  1538,  1540,
+    1542,  1546,  1550,  1554,  1558,  1562,  1566,  1568,  1570,  1572,
+    1576,  1582,  1588,  1594,  1600,  1608,  1610,  1619,  1622,  1624,
+    1626,  1630,  1632,  1634,  1636,  1641,  1643,  1647,  1648,  1653,
+    1655,  1659,  1663
+};
+
+/* YYRHS -- A `-1'-separated list of the rules' RHS.  */
+static const yytype_int16 yyrhs[] =
+{
+     191,     0,    -1,    -1,   191,   192,    -1,   187,   198,    -1,
+     199,   193,    -1,   177,    -1,   197,   200,   205,    -1,     1,
+     205,   201,    -1,   194,    -1,   193,    27,   194,    -1,   203,
+     196,    -1,   212,   196,    -1,   206,   207,   196,    -1,   315,
+     200,   205,    -1,   195,   196,    -1,   298,     4,    -1,   198,
+     200,    -1,    53,    -1,    54,    -1,    36,    -1,    37,    -1,
+      -1,    -1,   144,   201,    -1,    -1,   177,    -1,    -1,    -1,
+      72,    -1,    -1,   202,    33,   204,   208,    -1,    34,   204,
+      -1,    35,   204,   208,    30,   209,    -1,    35,   204,   208,
+      -1,    95,   169,    -1,   169,    -1,    -1,    32,    -1,   158,
+      -1,    -1,   179,   180,    -1,   179,   210,   180,    -1,    -1,
+     179,   180,    -1,   179,   210,   180,    -1,   211,    -1,   210,
+       3,   211,    -1,   169,    -1,    23,    -1,   257,   222,    -1,
+     145,   213,   221,   324,    -1,   147,   324,    -1,   117,   216,
+      -1,   224,   179,   249,   180,    -1,   224,   249,    -1,   243,
+      -1,   228,    -1,   253,    -1,   239,    -1,   241,    -1,   240,
+      -1,   308,    -1,   251,    -1,   237,    -1,   234,    -1,    68,
+     179,   280,   180,    -1,   111,   221,   242,    -1,   113,   221,
+     215,    -1,    67,   217,    -1,   225,   226,   187,    -1,    -1,
+     275,    -1,    46,    -1,    40,    -1,    44,    -1,    56,    -1,
+      79,    -1,    45,    -1,    47,    -1,    62,    -1,    57,    -1,
+      58,    -1,    59,    -1,    60,    -1,    61,    -1,    64,    -1,
+      65,    -1,    66,    -1,    69,    -1,    70,    -1,    71,    -1,
+      74,    -1,    75,    -1,    76,    -1,    77,    -1,   169,    -1,
+     214,    -1,   215,     3,   214,    -1,   179,   220,   180,    -1,
+     216,     3,   179,   220,   180,    -1,   218,    -1,   217,     3,
+     218,    -1,   179,   219,   180,    -1,   298,   276,    -1,   219,
+       3,   298,   276,    -1,   280,    -1,   220,     3,   280,    -1,
+      -1,     4,     4,    -1,   255,   256,    -1,   223,   204,   208,
+      -1,    35,    -1,    29,    -1,   160,    -1,   169,    24,   227,
+      24,    -1,   226,   248,   169,    24,   227,    24,    -1,   231,
+      24,   227,    24,    -1,   232,    -1,   232,     3,   227,    -1,
+     229,   230,    -1,   229,   247,   230,    -1,   228,   248,   247,
+     248,   230,    -1,   228,     3,   230,    -1,   119,    -1,    -1,
+     169,   276,    -1,   169,    -1,   169,   179,   280,   180,    -1,
+     231,     3,   231,    -1,   233,   299,    -1,   232,    21,   232,
+      -1,   232,    22,   232,    -1,   232,    23,   232,    -1,   232,
+     188,   232,    -1,    -1,   284,    -1,   235,   236,    -1,   114,
+     298,    -1,   114,   247,   298,    -1,   235,   248,   247,   248,
+     298,    -1,   235,     3,   298,    -1,    -1,   129,   324,    -1,
+     130,   324,    -1,   109,    -1,   238,   248,   169,   276,   264,
+      -1,   239,     3,   169,   276,   264,    -1,    81,   187,    -1,
+      81,   221,   242,    -1,    80,   187,    -1,    80,   221,   242,
+      -1,   169,    -1,   242,     3,   169,    -1,   244,   245,    -1,
+     244,   247,   245,    -1,   243,   248,   247,   248,   245,    -1,
+     127,    -1,   128,   127,    -1,   246,    -1,   245,     3,   246,
+      -1,   169,   276,    -1,    20,    -1,    24,   169,    24,    -1,
+      -1,     3,    -1,   250,    -1,   249,     3,   250,    -1,   169,
+       5,   280,    -1,   134,   252,    -1,   169,    -1,   252,     3,
+     169,    -1,   122,   123,    -1,   122,   137,    -1,    -1,   271,
+     254,   169,   276,   264,   305,    -1,   255,     3,   254,   169,
+     276,   264,   305,    -1,    -1,   262,   266,    -1,   261,   259,
+      -1,   263,    23,   176,    -1,   258,   268,   180,    -1,   146,
+      -1,    -1,    23,   176,    -1,    23,   179,   260,   180,    -1,
+     179,   260,   180,    -1,   169,   269,   270,    -1,   169,     5,
+     269,   270,    -1,   269,   270,    -1,   157,    -1,   263,    -1,
+     149,    -1,   148,    -1,   167,    -1,   151,    -1,   168,    -1,
+     150,    -1,    -1,    23,   265,    -1,   280,    -1,   179,    23,
+     180,    -1,    -1,    23,   267,    -1,   179,   268,   180,    -1,
+     280,    -1,   179,    23,   180,    -1,   169,   269,    -1,   169,
+       5,   269,    -1,   169,    -1,   176,    -1,   280,    -1,    23,
+      -1,    -1,     3,   169,   269,    -1,    -1,     4,     4,    -1,
+       3,   272,     4,     4,    -1,   273,    -1,   272,     3,   273,
+      -1,    29,    -1,   275,    -1,    82,    -1,   109,   276,    -1,
+     111,    -1,   112,   179,   274,   180,    -1,   113,    -1,   116,
+      -1,   117,    -1,   119,    -1,   120,    -1,   140,    -1,   138,
+      -1,   139,    -1,    80,    -1,    81,    -1,    -1,   179,   277,
+     180,    -1,   278,    -1,   277,     3,   278,    -1,   279,    -1,
+       4,    -1,   280,     4,    -1,     4,   280,    -1,   280,     4,
+     279,    -1,    23,    -1,   280,    -1,   283,    -1,   179,   280,
+     180,    -1,   307,    -1,   281,    -1,    46,   282,   180,    -1,
+      39,   282,   180,    -1,    40,   179,   282,   180,    -1,    44,
+     179,   282,   180,    -1,    56,   282,   180,    -1,    79,   179,
+     282,   180,    -1,    45,   179,   280,   180,    -1,    47,   280,
+     180,    -1,   148,   179,   282,   180,    -1,    62,   179,   280,
+     180,    -1,    57,   179,   280,   180,    -1,    58,   179,   280,
+     180,    -1,    59,   179,   280,   180,    -1,    60,   179,   280,
+     180,    -1,    61,   179,   280,   180,    -1,    64,   179,   280,
+     180,    -1,    65,   179,   280,   180,    -1,    66,   179,   280,
+     180,    -1,    69,   179,   280,   180,    -1,    70,   179,   280,
+     180,    -1,    71,   179,   280,   180,    -1,    73,   280,   180,
+      -1,    74,   179,   282,   180,    -1,    75,   179,   282,   180,
+      -1,    76,   179,   282,   180,    -1,    77,   179,   282,   180,
+      -1,   280,    -1,   282,     3,   280,    -1,   288,    -1,   299,
+      -1,   293,    -1,   280,   285,    -1,   284,   280,    -1,    12,
+     280,    -1,    21,    -1,    22,    -1,    21,   280,    -1,    22,
+     280,    -1,    23,   280,    -1,    25,   280,    -1,    14,   280,
+      -1,     8,   280,    -1,    17,   280,    -1,   186,   280,    -1,
+      18,   280,    -1,   185,   280,    -1,    15,   280,    -1,   186,
+       5,   280,    -1,    16,   280,    -1,   185,     5,   280,    -1,
+      13,   280,    -1,     7,   280,    -1,     9,   280,    -1,    10,
+     280,    -1,    11,   280,    -1,    24,   286,    -1,     5,   287,
+      -1,    -1,   280,    -1,     5,   280,    -1,    24,   280,    -1,
+       5,   280,    -1,   280,    -1,   298,    -1,   292,    -1,   290,
+      -1,    -1,   291,    -1,   291,   302,    -1,   292,   179,   294,
+     180,    -1,   292,   179,   294,   180,   302,    -1,   298,   179,
+     294,   180,    -1,   288,   189,   288,    -1,   131,   360,   132,
+      -1,   289,    -1,   289,   295,    -1,   296,    -1,   295,     3,
+     296,    -1,   280,    -1,   297,    -1,   280,     4,   280,    -1,
+     280,     4,   280,     4,   280,    -1,     4,   280,     4,   280,
+      -1,     4,     4,   280,    -1,     4,   280,    -1,   280,     4,
+      -1,     4,    -1,   169,    -1,   142,    -1,   143,    -1,   176,
+      -1,   163,    -1,   164,    -1,   165,    -1,   299,   169,    -1,
+     300,   301,    -1,   158,    -1,   300,   158,    -1,   162,    -1,
+     159,    -1,    -1,   302,    -1,   179,   303,     4,   303,   180,
+      -1,    -1,   280,    -1,   187,    -1,   280,    -1,    -1,   306,
+       5,   280,    -1,    -1,   179,   283,     3,   283,   180,    -1,
+     309,   310,    -1,   309,   310,     3,   311,    -1,   309,   310,
+       3,    31,     4,   187,    -1,   309,   310,     3,    31,     4,
+     313,    -1,   141,    -1,   169,    -1,   312,    -1,   311,     3,
+     312,    -1,   169,   126,   169,    -1,   314,    -1,   313,     3,
+     314,    -1,   169,   126,   169,    -1,   169,    -1,   328,    -1,
+      98,   179,   366,   370,   180,    -1,   105,   179,   369,   370,
+     180,    -1,   106,   179,   371,   180,    -1,   317,    -1,   318,
+     324,    -1,   316,   324,    -1,   319,   324,    -1,    96,   324,
+      -1,   321,    -1,   372,   328,    -1,    41,   179,   280,   180,
+     304,    -1,    42,    -1,    43,    -1,   372,    84,    -1,    85,
+     179,   280,   180,    84,    -1,    86,    -1,    87,   324,    -1,
+      48,   320,   180,    -1,    49,   179,   280,   180,    -1,   115,
+      -1,   110,    -1,    93,    -1,   153,    -1,   156,    -1,   155,
+      -1,   154,    -1,   280,    -1,   320,     3,   280,    -1,   320,
+       4,   280,    -1,   326,   323,   322,    -1,   327,   280,    -1,
+      94,   325,    -1,    -1,   373,     5,   280,     3,   280,    -1,
+     373,     5,   280,     3,   280,     3,   280,    -1,    -1,   176,
+     248,    -1,   187,    -1,   169,    -1,    -1,   169,    -1,    92,
+      -1,    97,    -1,   118,    -1,   330,   332,    -1,   365,    -1,
+     341,    -1,   333,    -1,    98,   179,   366,   370,   180,    -1,
+     105,   179,   369,   370,   180,    -1,    78,   303,    -1,    83,
+     304,    -1,    63,   304,    -1,   340,   304,    -1,   331,    -1,
+      -1,   298,   329,   276,   276,    -1,   330,   189,   298,   329,
+     276,   276,    -1,   176,    -1,   331,     3,   176,    -1,     5,
+     280,    -1,   126,   280,    -1,   336,   334,    -1,    -1,   179,
+     335,   180,    -1,    -1,   338,    -1,   337,   169,    -1,   124,
+      -1,   339,    -1,   338,     3,   339,    -1,   280,    -1,    23,
+     364,    -1,   133,    -1,   135,    -1,   349,   345,    -1,   351,
+     343,    -1,   352,   345,    -1,   352,   345,   360,    -1,   104,
+     346,    -1,    38,    -1,    -1,   356,    -1,   345,   342,    -1,
+     350,   344,    -1,    -1,     3,   356,    -1,   179,   347,   180,
+      -1,   179,   353,   180,    -1,   179,   298,   180,    -1,   179,
+     176,   180,    -1,   176,    -1,   179,   283,   180,    -1,   169,
+      -1,   348,    -1,   347,     3,   348,    -1,   353,    -1,    23,
+      -1,    25,    -1,   298,   280,    -1,   298,   280,   189,   330,
+      -1,   298,   179,   297,   180,    -1,   298,    23,    -1,   298,
+      25,    -1,    99,    -1,   100,    -1,   354,    -1,    23,    -1,
+     103,    -1,   101,    -1,    88,    -1,   102,    -1,   354,    -1,
+     179,   353,   180,    -1,   288,    -1,   299,    -1,   353,   355,
+     353,    -1,   353,    23,   353,    -1,   353,    24,   353,    -1,
+     353,    25,   353,    -1,   355,   353,    -1,   353,    20,   353,
+      -1,    50,   280,    -1,    55,   280,    -1,    52,   280,    -1,
+      51,   280,    -1,   169,     5,   280,    -1,    21,    -1,    22,
+      -1,   358,    -1,   356,     3,   358,    -1,    -1,   288,    -1,
+     357,   359,    -1,   179,   356,   180,   359,    -1,   281,   359,
+      -1,   299,   359,    -1,   179,   356,     3,   363,   180,    -1,
+      -1,   285,    -1,   359,   285,    -1,   283,    -1,   362,    -1,
+     361,    -1,   283,     3,   280,    -1,   283,     3,   362,    -1,
+     362,     3,   280,    -1,   362,     3,   362,    -1,   361,     3,
+     280,    -1,   361,     3,   362,    -1,   283,    -1,   281,    -1,
+     307,    -1,   179,   280,   180,    -1,   179,   283,     3,   363,
+     180,    -1,   179,   362,     3,   363,   180,    -1,   179,   361,
+       3,   363,   180,    -1,   169,     5,   280,     3,   280,    -1,
+     169,     5,   280,     3,   280,     3,   280,    -1,   176,    -1,
+      89,   179,   280,     3,   280,   180,     3,   280,    -1,    89,
+     364,    -1,   367,    -1,   330,    -1,   366,     3,   367,    -1,
+     298,    -1,   292,    -1,   368,    -1,   298,   179,   295,   180,
+      -1,   367,    -1,   369,     3,   367,    -1,    -1,     3,   125,
+       5,   298,    -1,   298,    -1,   371,     3,   298,    -1,    91,
+     280,   180,    -1,   298,    -1
+};
+
+/* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
+static const yytype_uint16 yyrline[] =
+{
+       0,   336,   336,   337,   339,   340,   341,   342,   343,   346,
+     347,   349,   350,   351,   360,   361,   363,   365,   367,   374,
+     379,   380,   382,   384,   385,   387,   388,   394,   397,   398,
+     401,   402,   430,   448,   481,   515,   532,   539,   541,   545,
+     550,   553,   556,   561,   562,   563,   571,   582,   594,   595,
+     597,   605,   613,   619,   620,   635,   648,   649,   655,   656,
+     693,   706,   707,   708,   709,   710,   711,   712,   713,   714,
+     715,   734,   735,   741,   742,   743,   744,   745,   746,   747,
+     748,   749,   750,   751,   752,   753,   754,   755,   756,   757,
+     758,   759,   760,   761,   762,   763,   764,   766,   767,   769,
+     770,   772,   773,   775,   777,   778,   780,   781,   783,   784,
+     786,   869,   906,   912,   917,   922,   936,   950,   965,   972,
+     981,   982,   983,   984,   986,   991,   992,   997,  1001,  1006,
+    1011,  1013,  1015,  1017,  1019,  1023,  1024,  1027,  1029,  1030,
+    1031,  1032,  1034,  1036,  1041,  1046,  1052,  1068,  1085,  1086,
+    1088,  1092,  1097,  1101,  1106,  1112,  1123,  1135,  1140,  1146,
+    1151,  1155,  1165,  1174,  1184,  1185,  1187,  1191,  1196,  1219,
+    1221,  1222,  1224,  1234,  1236,  1238,  1270,  1305,  1307,  1309,
+    1313,  1318,  1323,  1331,  1332,  1334,  1335,  1337,  1338,  1339,
+    1341,  1346,  1348,  1353,  1357,  1360,  1366,  1368,  1374,  1375,
+    1377,  1378,  1380,  1381,  1382,  1384,  1385,  1387,  1388,  1397,
+    1401,  1406,  1408,  1411,  1412,  1414,  1415,  1416,  1418,  1419,
+    1421,  1425,  1426,  1428,  1433,  1435,  1437,  1438,  1439,  1440,
+    1446,  1449,  1450,  1451,  1453,  1455,  1458,  1463,  1467,  1469,
+    1473,  1478,  1482,  1487,  1492,  1500,  1501,  1503,  1504,  1506,
+    1508,  1512,  1514,  1516,  1518,  1520,  1522,  1524,  1526,  1528,
+    1530,  1532,  1534,  1536,  1538,  1540,  1542,  1544,  1546,  1548,
+    1550,  1552,  1554,  1556,  1558,  1560,  1562,  1565,  1566,  1570,
+    1571,  1573,  1575,  1577,  1579,  1582,  1583,  1585,  1587,  1589,
+    1591,  1593,  1595,  1597,  1599,  1601,  1603,  1605,  1607,  1609,
+    1611,  1613,  1615,  1617,  1619,  1621,  1623,  1625,  1628,  1629,
+    1631,  1633,  1636,  1638,  1642,  1647,  1652,  1658,  1670,  1675,
+    1677,  1680,  1684,  1694,  1700,  1703,  1704,  1707,  1708,  1711,
+    1712,  1714,  1716,  1719,  1721,  1722,  1723,  1724,  1726,  1784,
+    1786,  1787,  1788,  1789,  1790,  1791,  1793,  1795,  1797,  1798,
+    1800,  1803,  1804,  1806,  1809,  1810,  1812,  1813,  1815,  1816,
+    1825,  1827,  1830,  1850,  1884,  1904,  1955,  1963,  1966,  1970,
+    1980,  1991,  1995,  2005,  2017,  2026,  2027,  2033,  2039,  2040,
+    2090,  2108,  2128,  2147,  2180,  2181,  2182,  2183,  2184,  2185,
+    2186,  2187,  2188,  2189,  2190,  2191,  2192,  2193,  2230,  2240,
+    2249,  2258,  2267,  2268,  2269,  2271,  2272,  2273,  2275,  2276,
+    2277,  2278,  2279,  2281,  2282,  2284,  2285,  2287,  2289,  2296,
+    2297,  2298,  2299,  2300,  2301,  2307,  2313,  2314,  2315,  2316,
+    2317,  2319,  2320,  2330,  2332,  2333,  2335,  2336,  2338,  2366,
+    2367,  2369,  2370,  2372,  2402,  2404,  2405,  2408,  2422,  2425,
+    2426,  2429,  2430,  2431,  2432,  2433,  2434,  2446,  2447,  2449,
+    2450,  2455,  2456,  2458,  2459,  2461,  2462,  2463,  2464,  2465,
+    2467,  2468,  2470,  2471,  2472,  2473,  2474,  2475,  2476,  2477,
+    2479,  2480,  2482,  2483,  2486,  2487,  2488,  2491,  2494,  2495,
+    2497,  2498,  2499,  2500,  2501,  2502,  2503,  2504,  2505,  2506,
+    2507,  2508,  2509,  2511,  2512,  2514,  2515,  2517,  2518,  2520,
+    2521,  2522,  2523,  2524,  2526,  2527,  2528,  2530,  2531,  2532,
+    2534,  2536,  2538,  2540,  2542,  2544,  2546,  2547,  2549,  2551,
+    2553,  2555,  2557,  2561,  2564,  2571,  2573,  2574,  2576,  2577,
+    2578,  2580,  2582,  2583,  2585,  2592,  2593,  2595,  2596,  2598,
+    2599,  2607,  2609
+};
+#endif
+
+#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
+/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
+   First, the terminals, then, starting at YYNTOKENS, nonterminals.  */
+static const char *const yytname[] =
+{
+  "$end", "error", "$undefined", "','", "':'", "'='", "TOK_BINARY_OP",
+  "TOK_NEQV", "TOK_EQV", "TOK_XOR", "TOK_OR", "TOK_AND", "TOK_NOT",
+  "TOK_NE", "TOK_EQ", "TOK_GE", "TOK_LE", "TOK_GT", "TOK_LT",
+  "TOK_UNARY_OP", "TOK_DSLASH", "'+'", "'-'", "'*'", "TOK_SLASH",
+  "TOK_DASTER", "TOK_SEP", "TOK_SEMICOLON", "TOK_NEXTLINE",
+  "TOK_PARAMETER", "TOK_RESULT", "TOK_ONLY", "TOK_INCLUDE",
+  "TOK_SUBROUTINE", "TOK_PROGRAM", "TOK_FUNCTION", "TOK_OMP", "TOK_DOLLAR",
+  "TOK_FORMAT", "TOK_MAX", "TOK_TANH", "TOK_WHERE", "TOK_ELSEWHERE",
+  "TOK_ENDWHERE", "TOK_MAXVAL", "TOK_TRIM", "TOK_SUM", "TOK_SQRT",
+  "TOK_CASE", "TOK_SELECTCASE", "TOK_FILE", "TOK_END", "TOK_ERR",
+  "TOK_DONOTTREAT", "TOK_ENDDONOTTREAT", "TOK_EXIST", "TOK_MIN",
+  "TOK_FLOAT", "TOK_EXP", "TOK_COS", "TOK_COSH", "TOK_ACOS", "TOK_NINT",
+  "TOK_CYCLE", "TOK_SIN", "TOK_SINH", "TOK_ASIN", "TOK_EQUIVALENCE",
+  "TOK_BACKSPACE", "TOK_LOG", "TOK_TAN", "TOK_ATAN", "TOK_RECURSIVE",
+  "TOK_ABS", "TOK_MOD", "TOK_SIGN", "TOK_MINLOC", "TOK_MAXLOC", "TOK_EXIT",
+  "TOK_MINVAL", "TOK_PUBLIC", "TOK_PRIVATE", "TOK_ALLOCATABLE",
+  "TOK_RETURN", "TOK_THEN", "TOK_ELSEIF", "TOK_ELSE", "TOK_ENDIF",
+  "TOK_PRINT", "TOK_PLAINGOTO", "TOK_CONSTRUCTID", "TOK_LOGICALIF",
+  "TOK_PLAINDO", "TOK_CONTAINS", "TOK_ENDDO", "TOK_MODULE",
+  "TOK_ENDMODULE", "TOK_DOWHILE", "TOK_ALLOCATE", "TOK_OPEN", "TOK_CLOSE",
+  "TOK_INQUIRE", "TOK_WRITE", "TOK_READ", "TOK_REWIND", "TOK_DEALLOCATE",
+  "TOK_NULLIFY", "TOK_FIN", "TOK_DEBUT", "TOK_DIMENSION", "TOK_ENDSELECT",
+  "TOK_EXTERNAL", "TOK_INTENT", "TOK_INTRINSIC", "TOK_NAMELIST",
+  "TOK_CASEDEFAULT", "TOK_OPTIONAL", "TOK_POINTER", "TOK_CONTINUE",
+  "TOK_SAVE", "TOK_TARGET", "TOK_QUOTE", "TOK_IMPLICIT", "TOK_NONE",
+  "TOK_CALL", "TOK_STAT", "TOK_POINT_TO", "TOK_COMMON", "TOK_GLOBAL",
+  "TOK_INTERFACE", "TOK_ENDINTERFACE", "TOK_LEFTAB", "TOK_RIGHTAB",
+  "TOK_PAUSE", "TOK_PROCEDURE", "TOK_STOP", "TOK_NAMEEQ", "TOK_REAL8",
+  "TOK_OUT", "TOK_INOUT", "TOK_IN", "TOK_USE", "TOK_TRUE", "TOK_FALSE",
+  "TOK_LABEL", "TOK_TYPE", "TOK_TYPEPAR", "TOK_ENDTYPE", "TOK_REAL",
+  "TOK_INTEGER", "TOK_LOGICAL", "TOK_DOUBLEPRECISION", "TOK_DOUBLEREAL",
+  "TOK_ENDSUBROUTINE", "TOK_ENDFUNCTION", "TOK_ENDPROGRAM", "TOK_ENDUNIT",
+  "TOK_CHARACTER", "TOK_CHAR_CONSTANT", "TOK_CHAR_CUT", "TOK_DATA",
+  "TOK_CHAR_INT", "TOK_CHAR_MESSAGE", "TOK_CSTREAL", "TOK_CSTREALDP",
+  "TOK_CSTREALQP", "TOK_SFREAL", "TOK_COMPLEX", "TOK_DOUBLECOMPLEX",
+  "TOK_NAME", "TOK_NAME_CHAR", "TOK_PROBTYPE", "TOK_INTERPTYPE",
+  "TOK_VARTYPE", "TOK_BC", "TOK_OP", "TOK_CSTINT", "TOK_COMMENT",
+  "TOK_FILENAME", "'('", "')'", "'['", "']'", "'!'", "'_'", "'<'", "'>'",
+  "'\\n'", "'/'", "'%'", "$accept", "input", "line", "suite_line_list",
+  "suite_line", "instr", "fin_line", "keyword", "position", "thislabel",
+  "cmnt", "nulcurbuf", "opt_recursive", "entry", "name_routine",
+  "writedeclar", "before_include", "filename", "arglist", "arglist1",
+  "args", "arg", "spec", "opt_spec", "name_intrinsic",
+  "use_intrinsic_list", "list_couple", "list_expr_equi", "expr_equi",
+  "list_expr_equi1", "list_expr", "opt_sep", "after_type",
+  "before_function", "before_parameter", "before_data", "data",
+  "datavallist", "save", "before_save", "varsave", "datanamelist",
+  "expr_data", "opt_signe", "namelist", "namelist_action",
+  "after_namelist", "interface", "before_dimension", "dimension",
+  "private", "public", "use_name_list", "common", "before_common",
+  "var_common_list", "var_common", "comblock", "opt_comma", "paramlist",
+  "paramitem", "module_proc_stmt", "proc_name_list", "implicit",
+  "opt_retour", "dcl", "nodimsgiven", "type", "before_typepar",
+  "c_selector", "c_attribute", "before_character", "typespec", "typename",
+  "lengspec", "proper_lengspec", "selector", "proper_selector",
+  "attribute", "clause", "opt_clause", "options", "attr_spec_list",
+  "attr_spec", "intent_spec", "access_spec", "dims", "dimlist", "dim",
+  "ubound", "expr", "predefinedfunction", "minmaxlist", "uexpr", "signe",
+  "operation", "after_slash", "after_equal", "lhs", "beforefunctionuse",
+  "array_ele_substring_func_ref", "begin_array", "structure_component",
+  "vec", "funarglist", "funargs", "funarg", "triplet", "ident",
+  "simple_const", "string_constant", "opt_substring", "substring",
+  "optexpr", "opt_expr", "initial_value", "before_initial",
+  "complex_const", "use_stat", "word_use", "module_name", "rename_list",
+  "rename_name", "only_list", "only_name", "exec", "word_endsubroutine",
+  "word_endunit", "word_endprogram", "word_endfunction", "caselist",
+  "boucledo", "do_arg", "opt_int", "opt_name", "optname", "worddo",
+  "wordwhile", "iffable", "before_dims", "ident_dims", "int_list",
+  "after_ident_dims", "call", "opt_call", "opt_callarglist", "keywordcall",
+  "before_call", "callarglist", "callarg", "stop", "io", "option_inlist",
+  "option_read", "opt_inlist", "ioctl", "after_rewind", "ctllist",
+  "ioclause", "iofctl", "infmt", "read", "write", "fexpr", "unpar_fexpr",
+  "addop", "inlist", "opt_lhs", "inelt", "opt_operation", "outlist",
+  "out2", "other", "dospec", "label", "goto", "allocation_list",
+  "allocate_object", "array_element", "allocate_object_list",
+  "opt_stat_spec", "pointer_name_list", "logif", "do_var", 0
+};
+#endif
+
+# ifdef YYPRINT
+/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
+   token YYLEX-NUM.  */
+static const yytype_uint16 yytoknum[] =
+{
+       0,   256,   257,    44,    58,    61,   258,   259,   260,   261,
+     262,   263,   264,   265,   266,   267,   268,   269,   270,   271,
+     272,    43,    45,    42,   273,   274,   275,   276,   277,   278,
+     279,   280,   281,   282,   283,   284,   285,   286,   287,   288,
+     289,   290,   291,   292,   293,   294,   295,   296,   297,   298,
+     299,   300,   301,   302,   303,   304,   305,   306,   307,   308,
+     309,   310,   311,   312,   313,   314,   315,   316,   317,   318,
+     319,   320,   321,   322,   323,   324,   325,   326,   327,   328,
+     329,   330,   331,   332,   333,   334,   335,   336,   337,   338,
+     339,   340,   341,   342,   343,   344,   345,   346,   347,   348,
+     349,   350,   351,   352,   353,   354,   355,   356,   357,   358,
+     359,   360,   361,   362,   363,   364,   365,   366,   367,   368,
+     369,   370,   371,   372,   373,   374,   375,   376,   377,   378,
+     379,   380,   381,   382,   383,   384,   385,   386,   387,   388,
+     389,   390,   391,   392,   393,   394,   395,   396,   397,   398,
+     399,   400,   401,   402,   403,   404,   405,   406,   407,   408,
+     409,   410,   411,   412,   413,   414,   415,   416,   417,   418,
+     419,   420,   421,   422,   423,   424,   425,   426,   427,    40,
+      41,    91,    93,    33,    95,    60,    62,    10,    47,    37
+};
+# endif
+
+/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
+static const yytype_uint16 yyr1[] =
+{
+       0,   190,   191,   191,   192,   192,   192,   192,   192,   193,
+     193,   194,   194,   194,   194,   194,   195,   196,   197,   197,
+     197,   197,   198,   199,   199,   200,   200,   201,   202,   202,
+     203,   203,   203,   203,   203,   203,   204,   205,   206,   207,
+     208,   208,   208,   209,   209,   209,   210,   210,   211,   211,
+     212,   212,   212,   212,   212,   212,   212,   212,   212,   212,
+     212,   212,   212,   212,   212,   212,   212,   212,   212,   212,
+     212,   213,   213,   214,   214,   214,   214,   214,   214,   214,
+     214,   214,   214,   214,   214,   214,   214,   214,   214,   214,
+     214,   214,   214,   214,   214,   214,   214,   215,   215,   216,
+     216,   217,   217,   218,   219,   219,   220,   220,   221,   221,
+     222,   222,   223,   224,   225,   226,   226,   226,   227,   227,
+     228,   228,   228,   228,   229,   230,   230,   231,   231,   231,
+     232,   232,   232,   232,   232,   233,   233,   234,   235,   235,
+     235,   235,   236,   237,   237,   238,   239,   239,   240,   240,
+     241,   241,   242,   242,   243,   243,   243,   244,   244,   245,
+     245,   246,   247,   247,   248,   248,   249,   249,   250,   251,
+     252,   252,   253,   253,   254,   255,   255,   256,   257,   257,
+     257,   257,   258,   259,   259,   259,   259,   260,   260,   260,
+     261,   262,   263,   263,   263,   263,   263,   263,   264,   264,
+     265,   265,   266,   266,   266,   267,   267,   268,   268,   268,
+     268,   269,   269,   270,   270,   271,   271,   271,   272,   272,
+     273,   273,   273,   273,   273,   273,   273,   273,   273,   273,
+     273,   274,   274,   274,   275,   275,   276,   276,   277,   277,
+     278,   278,   278,   278,   278,   279,   279,   280,   280,   280,
+     280,   281,   281,   281,   281,   281,   281,   281,   281,   281,
+     281,   281,   281,   281,   281,   281,   281,   281,   281,   281,
+     281,   281,   281,   281,   281,   281,   281,   282,   282,   283,
+     283,   283,   283,   283,   283,   284,   284,   285,   285,   285,
+     285,   285,   285,   285,   285,   285,   285,   285,   285,   285,
+     285,   285,   285,   285,   285,   285,   285,   285,   286,   286,
+     286,   286,   287,   287,   288,   288,   288,   289,   290,   290,
+     290,   290,   291,   292,   293,   294,   294,   295,   295,   296,
+     296,   297,   297,   297,   297,   297,   297,   297,   298,   299,
+     299,   299,   299,   299,   299,   299,   299,   300,   300,   300,
+     300,   301,   301,   302,   303,   303,   304,   304,   305,   305,
+     306,   307,   308,   308,   308,   308,   309,   310,   311,   311,
+     312,   313,   313,   314,   314,   315,   315,   315,   315,   315,
+     315,   315,   315,   315,   315,   315,   315,   315,   315,   315,
+     315,   315,   315,   315,   315,   315,   315,   315,   316,   317,
+     318,   319,   320,   320,   320,   321,   321,   321,   322,   322,
+     322,   323,   323,   324,   324,   325,   325,   326,   327,   328,
+     328,   328,   328,   328,   328,   328,   328,   328,   328,   328,
+     328,   329,   330,   330,   331,   331,   332,   332,   333,   334,
+     334,   335,   335,   336,   337,   338,   338,   339,   339,   340,
+     340,   341,   341,   341,   341,   341,   341,   342,   342,   343,
+     343,   344,   344,   345,   345,   346,   346,   346,   346,   346,
+     347,   347,   348,   348,   348,   348,   348,   348,   348,   348,
+     349,   349,   350,   350,   351,   351,   351,   352,   353,   353,
+     354,   354,   354,   354,   354,   354,   354,   354,   354,   354,
+     354,   354,   354,   355,   355,   356,   356,   357,   357,   358,
+     358,   358,   358,   358,   359,   359,   359,   360,   360,   360,
+     361,   361,   361,   361,   361,   361,   361,   361,   362,   362,
+     362,   362,   362,   363,   363,   364,   365,   365,   366,   366,
+     366,   367,   367,   367,   368,   369,   369,   370,   370,   371,
+     371,   372,   373
+};
+
+/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
+static const yytype_uint8 yyr2[] =
+{
+       0,     2,     0,     2,     2,     2,     1,     3,     3,     1,
+       3,     2,     2,     3,     3,     2,     2,     2,     1,     1,
+       1,     1,     0,     0,     2,     0,     1,     0,     0,     1,
+       0,     4,     2,     5,     3,     2,     1,     0,     1,     1,
+       0,     2,     3,     0,     2,     3,     1,     3,     1,     1,
+       2,     4,     2,     2,     4,     2,     1,     1,     1,     1,
+       1,     1,     1,     1,     1,     1,     4,     3,     3,     2,
+       3,     0,     1,     1,     1,     1,     1,     1,     1,     1,
+       1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
+       1,     1,     1,     1,     1,     1,     1,     1,     3,     3,
+       5,     1,     3,     3,     2,     4,     1,     3,     0,     2,
+       2,     3,     1,     1,     1,     4,     6,     4,     1,     3,
+       2,     3,     5,     3,     1,     0,     2,     1,     4,     3,
+       2,     3,     3,     3,     3,     0,     1,     2,     2,     3,
+       5,     3,     0,     2,     2,     1,     5,     5,     2,     3,
+       2,     3,     1,     3,     2,     3,     5,     1,     2,     1,
+       3,     2,     1,     3,     0,     1,     1,     3,     3,     2,
+       1,     3,     2,     2,     0,     6,     7,     0,     2,     2,
+       3,     3,     1,     0,     2,     4,     3,     3,     4,     2,
+       1,     1,     1,     1,     1,     1,     1,     1,     0,     2,
+       1,     3,     0,     2,     3,     1,     3,     2,     3,     1,
+       1,     1,     1,     0,     3,     0,     2,     4,     1,     3,
+       1,     1,     1,     2,     1,     4,     1,     1,     1,     1,
+       1,     1,     1,     1,     1,     1,     0,     3,     1,     3,
+       1,     1,     2,     2,     3,     1,     1,     1,     3,     1,
+       1,     3,     3,     4,     4,     3,     4,     4,     3,     4,
+       4,     4,     4,     4,     4,     4,     4,     4,     4,     4,
+       4,     4,     3,     4,     4,     4,     4,     1,     3,     1,
+       1,     1,     2,     2,     2,     1,     1,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     3,     2,
+       3,     2,     2,     2,     2,     2,     2,     2,     0,     1,
+       2,     2,     2,     1,     1,     1,     1,     0,     1,     2,
+       4,     5,     4,     3,     3,     1,     2,     1,     3,     1,
+       1,     3,     5,     4,     3,     2,     2,     1,     1,     1,
+       1,     1,     1,     1,     1,     2,     2,     1,     2,     1,
+       1,     0,     1,     5,     0,     1,     1,     1,     0,     3,
+       0,     5,     2,     4,     6,     6,     1,     1,     1,     3,
+       3,     1,     3,     3,     1,     1,     5,     5,     4,     1,
+       2,     2,     2,     2,     1,     2,     5,     1,     1,     2,
+       5,     1,     2,     3,     4,     1,     1,     1,     1,     1,
+       1,     1,     1,     3,     3,     3,     2,     2,     0,     5,
+       7,     0,     2,     1,     1,     0,     1,     1,     1,     1,
+       2,     1,     1,     1,     5,     5,     2,     2,     2,     2,
+       1,     0,     4,     6,     1,     3,     2,     2,     2,     0,
+       3,     0,     1,     2,     1,     1,     3,     1,     2,     1,
+       1,     2,     2,     2,     3,     2,     1,     0,     1,     2,
+       2,     0,     2,     3,     3,     3,     3,     1,     3,     1,
+       1,     3,     1,     1,     1,     2,     4,     4,     2,     2,
+       1,     1,     1,     1,     1,     1,     1,     1,     1,     3,
+       1,     1,     3,     3,     3,     3,     2,     3,     2,     2,
+       2,     2,     3,     1,     1,     1,     3,     0,     1,     2,
+       4,     2,     2,     5,     0,     1,     2,     1,     1,     1,
+       3,     3,     3,     3,     3,     3,     1,     1,     1,     3,
+       5,     5,     5,     5,     7,     1,     8,     2,     1,     1,
+       3,     1,     1,     1,     4,     1,     3,     0,     4,     1,
+       3,     3,     1
+};
+
+/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
+   STATE-NUM when YYTABLE doesn't specify something else to do.  Zero
+   means the default is an error.  */
+static const yytype_uint16 yydefact[] =
+{
+       2,     0,     1,    37,    20,    21,    18,    19,    27,     6,
+      22,     3,    25,    30,    27,    24,     4,    26,    37,   113,
+      38,     0,     0,   456,     0,   387,   388,     0,     0,     0,
+       0,     0,    29,   354,   108,   108,     0,     0,   391,     0,
+     486,     0,     0,   417,   397,   415,     0,     0,   418,     0,
+     480,   481,   485,   487,   484,     0,     0,     0,   145,   396,
+     108,   108,     0,   395,     0,   419,   124,     0,   444,   157,
+       0,     0,     0,   449,     0,   450,   366,    71,   182,     0,
+     193,   192,   197,   195,   398,   401,   400,   399,   190,   114,
+     194,   196,   338,   434,     5,     9,    22,     0,    22,     0,
+      22,     0,     0,    57,   125,    65,   142,    64,   164,    59,
+      61,    60,    56,     0,    63,    58,   215,     0,   183,   202,
+     191,   431,    62,     0,    25,     0,   379,     0,     0,   384,
+     411,     0,   375,     0,   430,   423,   439,     0,     0,   422,
+       0,     0,     0,   421,     0,     8,     7,    36,    32,    40,
+       0,     0,   285,   286,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+     339,   340,     0,   347,   350,   349,   342,   343,   344,   341,
+       0,   402,   250,   247,     0,   279,   316,   318,   315,   281,
+     314,   280,   351,   249,     0,     0,   356,   357,   428,     0,
+      69,   101,     0,   355,   426,     0,   150,     0,   148,     0,
+     427,     0,   414,   413,   392,   535,     0,   537,     0,   416,
+     407,    35,   383,     0,   469,   467,     0,   455,     0,     0,
+       0,     0,   162,     0,     0,   138,     0,    53,   172,   173,
+     158,   143,   144,   170,   169,   234,   235,   108,    72,    52,
+      30,    15,    25,     0,    11,    39,    22,    12,     0,     0,
+      55,   166,   127,   164,     0,   125,     0,   236,   120,   125,
+     165,   137,     0,   165,     0,     0,     0,   236,   154,   159,
+       0,     0,     0,   112,    50,     0,   177,   174,   209,   210,
+       0,     0,     0,   179,     0,     0,   178,     0,    16,   236,
+     367,   362,    37,   381,   380,   382,   164,   408,   406,     0,
+       0,     0,   420,     0,   441,   438,   443,   429,     0,   451,
+     503,   504,   483,     0,     0,     0,     0,   338,     0,   490,
+     491,   452,   457,   461,     0,   482,     0,   453,   389,     0,
+       0,   431,   385,     0,    34,     0,   284,   277,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,   527,   517,   249,     0,   519,
+     518,     0,     0,   247,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,   308,
+       0,     0,     0,   282,   283,     0,   354,   319,   317,   317,
+     345,   348,   346,   352,     0,     0,   393,     0,     0,   236,
+       0,     0,   109,   152,   151,   149,     0,     0,   551,     0,
+     542,   431,   539,   547,   538,   543,   341,   247,   314,   541,
+     545,   547,   549,     0,    67,    74,    75,    78,    73,    79,
+      76,    81,    82,    83,    84,    85,    80,    86,    87,    88,
+      89,    90,    91,    92,    93,    94,    95,    77,    96,    97,
+      68,     0,   139,     0,   106,     0,     0,     0,    10,    17,
+      40,    13,     0,     0,     0,   135,     0,    70,     0,     0,
+     135,   123,   164,     0,   126,   121,   141,   164,   236,   236,
+     164,   161,     0,   155,   220,   222,   236,   224,     0,   226,
+     227,   228,   229,   230,     0,   218,   221,   216,    40,   174,
+     110,     0,     0,   212,   207,   211,   181,   184,     0,   338,
+       0,   213,     0,   203,   205,     0,   180,   236,     0,    14,
+     412,   552,   405,     0,   436,   437,   431,   435,     0,   447,
+       0,   442,   445,   473,   474,     0,   314,     0,   470,   472,
+     488,   498,   501,   500,   499,     0,   472,   507,   514,   508,
+     514,   459,   458,   514,   505,   507,   460,     0,     0,     0,
+       0,     0,   496,   454,     0,     0,    49,    48,    41,     0,
+      46,    43,     0,     0,   252,     0,     0,     0,   251,   258,
+     255,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,   272,     0,     0,     0,     0,     0,     0,
+     247,     0,     0,     0,   324,     0,     0,     0,   248,     0,
+       0,   313,   307,   302,   292,   303,   304,   305,   301,   291,
+     297,   299,   293,   295,   287,   288,   289,     0,     0,   309,
+     306,   290,     0,   296,     0,   294,   323,     0,   325,     0,
+       0,   403,   404,   394,     0,   103,   104,   102,    66,     0,
+       0,     0,   317,     0,     0,   466,   468,   465,     0,     0,
+       0,   378,     0,   163,     0,    99,     0,   171,    51,    31,
+     168,    54,   167,     0,   118,     0,   136,     0,     0,   127,
+     129,     0,   125,   241,   245,     0,   238,   240,   246,     0,
+     198,   198,     0,   160,   223,     0,     0,     0,   111,     0,
+     236,   208,     0,     0,   213,   186,     0,   189,     0,   204,
+     432,     0,     0,   363,   368,     0,   236,   448,   440,     0,
+       0,   478,   479,   317,   475,     0,   463,   464,   502,   464,
+       0,   515,   511,   512,   507,   509,   462,   497,   493,   494,
+     495,   492,   547,   547,     0,    42,     0,    33,   386,   278,
+     253,   254,   257,   261,   262,   263,   264,   265,   260,   266,
+     267,   268,   269,   270,   271,   273,   274,   275,   276,   256,
+     248,     0,     0,     0,   520,   521,   524,   525,   522,   523,
+     259,   247,   312,   310,   311,   300,   298,   354,   337,   329,
+     326,   327,   330,   320,   322,   236,   153,   390,     0,     0,
+       0,   540,   376,   546,   377,   550,    98,   107,     0,   115,
+     135,   135,   135,   135,   135,   130,   128,   135,   117,   122,
+     243,     0,   237,   242,   140,     0,   146,   147,   156,   232,
+     233,   231,     0,   219,   217,   236,   198,   185,   213,   187,
+       0,   206,     0,     0,     0,     0,   236,   446,   489,     0,
+       0,     0,   471,   472,   507,   514,   516,   506,     0,     0,
+      47,    44,     0,   338,     0,     0,     0,   361,     0,     0,
+     335,   336,     0,   321,   105,     0,   544,     0,   100,   119,
+     131,   132,   133,   134,     0,   239,   244,   246,     0,   199,
+     200,   225,   198,   358,   188,   214,   374,   364,   365,   371,
+     370,   369,     0,   433,   477,   476,     0,   510,   424,   425,
+      45,     0,   530,   532,   531,   353,   334,     0,   331,   328,
+       0,   548,   116,     0,   358,   175,     0,     0,     0,   409,
+     513,     0,   333,     0,   536,   201,   176,     0,   373,   372,
+       0,     0,   332,   359,   410,   533,     0,   534
+};
+
+/* YYDEFGOTO[NTERM-NUM].  */
+static const yytype_int16 yydefgoto[] =
+{
+      -1,     1,    11,    94,    95,    96,   261,    12,   262,    13,
+      18,    15,    97,    98,   148,    14,    99,   266,   354,   777,
+     599,   600,   100,   257,   479,   480,   247,   210,   211,   428,
+     483,   217,   294,   295,   101,   102,   273,   703,   103,   104,
+     278,   274,   704,   705,   105,   106,   281,   107,   108,   109,
+     110,   111,   434,   112,   113,   288,   289,   244,   276,   270,
+     271,   114,   254,   115,   531,   296,   530,   116,   117,   303,
+     540,   118,   119,   120,   856,   919,   306,   543,   300,   541,
+     737,   297,   524,   525,   862,   526,   504,   715,   716,   717,
+     357,   192,   358,   193,   194,   413,   660,   642,   195,   668,
+     196,   197,   198,   199,   670,   820,   821,   822,   200,   201,
+     202,   422,   417,   214,   208,   955,   956,   203,   122,   123,
+     311,   743,   744,   928,   929,   124,   125,   126,   127,   128,
+     204,   129,   552,   317,   224,   230,   130,   131,   132,   309,
+     133,   134,   322,   135,   325,   560,   136,   137,   561,   562,
+     138,   139,   581,   341,   586,   329,   237,   567,   568,   140,
+     343,   141,   142,   344,   570,   346,   582,   583,   584,   762,
+     388,   389,   390,   894,   227,   143,   443,   444,   445,   451,
+     684,   453,   144,   553
+};
+
+/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
+   STATE-NUM.  */
+#define YYPACT_NINF -702
+static const yytype_int16 yypact[] =
+{
+    -702,   921,  -702,  -702,  -702,  -702,  -702,  -702,  -702,  -702,
+    -702,  -702,   -59,  5446,  -702,  -702,  -702,  -702,  -702,  -702,
+    -702,   -24,   -24,  -702,    -3,  -702,  -702,  4703,     3,  2638,
+      49,    56,  -702,  4703,    37,    38,  2638,   146,  -702,   -93,
+    -702,  -110,  4703,  -702,  -702,    43,    48,   -93,  -702,   148,
+    -702,  -702,  -702,  -702,  -702,   185,   156,   158,  -702,  -702,
+     164,   164,    79,  -702,   171,  -702,  -702,   -51,  -702,  -702,
+      -7,   -93,   -93,  -702,    75,  -702,  -702,    53,  -702,   -93,
+    -702,  -702,  -702,  -702,  -702,  -702,  -702,  -702,  -702,  -702,
+    -702,  -702,  -702,  -702,   179,  -702,  -702,   224,  -702,   130,
+    -702,   -81,   186,   136,   149,  -702,   138,  -702,   360,   363,
+    -702,  -702,   172,   150,  -702,  -702,   145,   -19,    16,    29,
+     370,   395,  -702,   231,   -59,   -93,  -702,   -93,   -93,  -702,
+     230,  4703,  -702,    27,   405,  -702,   233,   241,  2638,  -702,
+     236,  2722,   236,  -702,  5702,  -702,  -702,  -702,  -702,   253,
+    4703,  4703,  -702,  -702,  4703,   256,   257,   266,  4703,  4703,
+    4703,   267,   271,   277,   289,   292,   298,   304,   312,   313,
+     314,   315,   317,  4703,   318,   328,   329,   330,   331,  4831,
+    -702,  -702,   334,  -702,  -702,  -702,  -702,  -702,  -702,  -702,
+    4703,  2443,  -702,  -702,  4703,   244,  -702,   335,   343,  -702,
+     344,   359,   228,  -702,    58,  4703,  -702,  2443,  -702,   362,
+     529,  -702,  4703,  2443,  -702,   536,  -702,   372,  -702,   372,
+    -702,  4703,  -702,  -702,  -702,  -702,  4703,  -702,  1425,  -702,
+    -702,  -702,  -702,   362,  -702,  -702,  4959,  -702,   362,   362,
+     372,  3079,  -702,   373,   362,  -702,  4703,   541,  -702,  -702,
+    -702,  -702,  -702,  -702,   544,  -702,  -702,   164,  -702,  -702,
+    5446,  -702,   -59,   -24,  -702,  -702,  -702,  -702,   548,   390,
+     563,  -702,    60,    28,   333,   408,   159,   399,  -702,   408,
+     362,  -702,   159,  -702,   410,   412,   159,   399,   571,  -702,
+     413,   445,   581,  -702,  -702,   -24,   583,  -702,  3039,  -702,
+     404,   147,  3935,  -702,  5087,   -19,  -702,   411,  -702,   399,
+    -702,   586,  -702,  -702,  -702,  -702,   360,   362,  2443,  4703,
+    4703,   362,  -702,   414,  4063,  -702,  -702,  -702,  2588,  -702,
+    -702,  -702,  -702,  4703,  4703,  4703,  4703,   587,  2588,   244,
+     359,  -702,  1096,   588,   403,   580,  2852,  4831,  -702,   416,
+     417,  -702,  -702,    17,   567,  1446,  2556,  2443,    23,  4703,
+    4703,  4703,    42,  1469,    52,  4703,  4703,  4703,  4703,  4703,
+    4703,  4703,  4703,  4703,  4703,  4703,  4703,  1491,  4703,  4703,
+    4703,  4703,  4703,  4831,  2443,  1512,   722,  -702,   461,   595,
+     604,  4703,  1548,   607,  3423,  4703,  4703,  4703,  4703,  4703,
+    4703,  4703,  4703,  4703,  4703,  4703,  4703,  4703,  4703,  3167,
+    4703,  3551,  3679,  -702,    19,   362,  4703,  -702,  -702,  -702,
+    -702,  -702,  -702,  -702,  4703,  4703,  -702,  1570,    65,   399,
+      49,  1694,  -702,  -702,   608,   608,  1752,   791,  -702,   244,
+     -54,    22,   425,   612,  -702,  -702,   436,   437,     8,    22,
+    -702,   616,  -702,    70,   608,  -702,  -702,  -702,  -702,  -702,
+    -702,  -702,  -702,  -702,  -702,  -702,  -702,  -702,  -702,  -702,
+    -702,  -702,  -702,  -702,  -702,  -702,  -702,  -702,  -702,  -702,
+     617,   597,  -702,    74,  2443,   443,   454,   -93,  -702,  -702,
+     253,  -702,  4703,    76,   390,   260,  4703,  -702,   455,   457,
+     260,  -702,   360,  2489,  -702,  -702,  -702,   360,   399,   399,
+     360,  -702,   413,   571,  -702,  -702,   399,  -702,   449,  -702,
+    -702,  -702,  -702,  -702,   356,  -702,  -702,  -702,   253,  -702,
+    -702,   460,  4191,  -702,  -702,  2443,  -702,  -702,  3935,  3295,
+     452,   630,  4319,  -702,  2443,   462,  -702,   399,    33,  -702,
+    -702,  -702,  -702,   629,  2443,  2443,  -702,  -702,   467,  2443,
+     464,   642,  -702,  -702,  -702,  2852,  3807,    78,  -702,   106,
+    -702,  2443,  2443,  2443,  2443,  4703,   308,  5572,  2443,   244,
+    1773,  -702,   643,  2443,  -702,  5572,  -702,  2852,  2852,  2852,
+    2852,  2852,   623,  -702,   362,   362,  -702,  -702,  -702,    86,
+    -702,   471,  2638,  4703,  -702,    87,    89,  1794,  -702,  -702,
+    -702,  1815,  1836,  1876,  1897,  1939,  2018,  2079,  2121,  2142,
+    2163,  2200,  2221,  -702,    90,    92,    93,    94,    98,  2261,
+     648,   649,   650,  4831,  -702,  4831,  4831,   103,  -702,  4703,
+    4703,  2443,  -702,  2460,  2460,  2481,  2481,  2556,  2577,  2577,
+    2577,  2577,  2577,  2577,   119,   119,    19,  4703,  4703,  2443,
+    -702,    19,  4703,  2577,  4703,  2577,   244,   652,  2783,   477,
+     478,  2443,  2443,  -702,   362,  -702,  -702,  -702,  -702,   490,
+     576,  4703,  2783,    -8,   481,  -702,  -702,  -702,    -8,   482,
+     362,  -702,  3079,  -702,  4703,  -702,  4703,  -702,  -702,  -702,
+    2443,  -702,  -702,   639,    35,   387,  -702,  2345,   640,   486,
+    -702,   646,   408,  4703,  -702,   104,  -702,  -702,  1325,   362,
+     651,   651,   413,  -702,  -702,   264,   445,   662,  -702,   502,
+     399,  -702,   492,  4191,   630,  -702,   504,  -702,   495,  -702,
+    -702,   672,   552,   677,  -702,  4703,   399,  -702,  -702,  4063,
+     513,  -702,  -702,  2783,   674,  2588,  -702,  -702,  2443,   680,
+     105,  -702,  2443,  2443,  5572,  2443,   643,   547,   623,   623,
+     623,   396,   612,   616,    20,  -702,   141,  -702,  -702,  2443,
+    -702,  -702,  -702,  -702,  -702,  -702,  -702,  -702,  -702,  -702,
+    -702,  -702,  -702,  -702,  -702,  -702,  -702,  -702,  -702,  -702,
+    -702,  5215,  5215,  5215,  2443,  -702,  2443,  -702,  2443,  -702,
+    -702,   514,  2577,  2577,    19,  2577,  2577,  4703,  2911,  1360,
+     698,  -702,  -702,   335,  -702,   399,  -702,  -702,  2403,   109,
+     697,  -702,  -702,  -702,  -702,  -702,  -702,  2443,   111,  -702,
+     260,   260,   260,   260,   260,   359,  -702,   260,  -702,  -702,
+    2443,  2489,  -702,  4447,  -702,  5343,  -702,  -702,   571,  -702,
+    -702,  -702,   523,  -702,  -702,   399,   651,  -702,   630,  -702,
+    4191,  -702,   -47,   535,   538,  1171,   399,  -702,  -702,   744,
+     525,   362,  -702,   403,  5613,  2443,  -702,  -702,   530,   531,
+    -702,  -702,   116,   704,   532,   533,   534,  -702,   537,  4703,
+    1382,  4703,  2783,  -702,  -702,   712,  -702,   362,  -702,  -702,
+      10,    10,   528,   115,   695,  -702,  -702,  2443,  4575,  -702,
+    2443,  -702,   651,   715,  -702,  -702,   598,  -702,   718,  -702,
+    -702,  -702,  4703,  -702,  -702,   425,   543,  2443,  -702,  -702,
+    -702,  4703,  -702,  -702,  -702,  -702,  2443,  4703,  1404,  -702,
+    4703,  -702,  -702,   554,   715,  -702,   723,   572,   573,  1194,
+    -702,  1280,  2443,  4703,  2443,  -702,  -702,  4703,  -702,  -702,
+    4703,  4703,  2443,  2443,  2443,  1303,  4703,  2443
+};
+
+/* YYPGOTO[NTERM-NUM].  */
+static const yytype_int16 yypgoto[] =
+{
+    -702,  -702,  -702,  -702,   503,  -702,     2,  -702,   740,  -702,
+     -49,   756,  -702,  -702,    -1,     5,  -702,  -702,  -407,  -702,
+      -5,     4,  -702,  -702,    85,  -702,  -702,  -702,   349,  -702,
+      84,   -11,  -702,  -702,  -702,  -702,  -702,  -482,  -702,  -702,
+    -265,   282,  -402,  -702,  -702,  -702,  -702,  -702,  -702,  -702,
+    -702,  -702,   173,  -702,  -702,  -278,   270,   -39,   -21,   515,
+     291,  -702,  -702,  -702,   258,  -702,  -702,  -702,  -702,  -702,
+     245,  -702,  -702,  -702,  -701,  -702,  -702,  -702,   483,  -290,
+    -687,  -702,  -702,    63,  -702,   709,  -282,  -702,   -58,   -61,
+     -27,  -176,   -80,  -154,  -323,  -532,  -702,  -702,  -128,  -702,
+    -702,  -702,  -204,  -702,   377,   121,   -92,    64,   178,   -87,
+    -702,  -702,  -198,  -399,   -29,  -143,  -702,  -163,  -702,  -702,
+    -702,  -702,   -56,  -702,  -139,  -702,  -702,  -702,  -702,  -702,
+    -702,  -702,  -702,  -702,   -12,  -702,  -702,  -702,   676,   265,
+    -232,  -702,  -702,  -702,  -702,  -702,  -702,  -702,  -702,    73,
+    -702,  -702,  -702,  -702,  -702,   254,  -702,  -702,    68,  -702,
+    -702,  -702,  -702,  -275,   684,  -316,  -426,  -702,  -694,  -561,
+     480,   446,  -372,  -648,   272,  -702,   237,  -201,  -702,   238,
+    -421,  -702,  -702,  -702
+};
+
+/* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
+   positive, shift that token.  If negative, reduce the rule which
+   number is the opposite.  If zero, do what YYDEFACT says.
+   If YYTABLE_NINF, syntax error.  */
+#define YYTABLE_NINF -508
+static const yytype_int16 yytable[] =
+{
+     191,   442,   207,   385,   423,   511,   213,   220,   534,   207,
+     501,   632,   513,   339,   505,   228,   387,   667,   711,   763,
+     857,   149,   765,   146,   219,   386,   603,   547,   591,   440,
+     689,   283,   319,   843,   440,   232,   393,   450,   840,   301,
+     596,   215,   215,   596,   410,   603,   761,   869,   761,   240,
+     241,   761,   304,   569,   340,   603,   841,   842,   843,   251,
+     252,   424,   425,   576,   741,   279,   225,   259,   674,   226,
+     887,   592,   248,   690,   290,   312,   222,   694,   362,   494,
+     364,   755,   447,   699,   495,   282,   249,   284,   268,   774,
+     603,   286,   603,   603,   223,   603,   603,   603,   269,   242,
+     264,   603,   267,   243,   318,   439,   603,   851,   884,   327,
+     439,   207,   902,   313,   694,   314,   315,   830,    17,   774,
+     250,   728,   926,   355,   356,   418,   587,   330,   331,   588,
+     589,   590,   363,   255,   256,  -315,   841,   842,   843,   275,
+     927,   280,   408,   409,   410,   147,   377,   676,   291,   292,
+     298,   760,   384,   320,   895,   896,  -164,   299,  -164,   766,
+    -164,    92,  -164,   392,   596,   923,   578,   414,   215,   242,
+     242,   385,   706,   243,   243,   283,   150,   706,   427,   242,
+     293,   924,   205,   243,   387,   431,   597,   419,   687,   597,
+     887,   121,  -164,   386,   436,   302,  -164,   598,   844,   437,
+     339,   682,   742,   604,   411,   412,   260,   385,   305,   384,
+     339,  -314,   229,   489,   579,   497,   321,   231,   339,   484,
+     387,   954,   608,   844,   216,   218,   720,   721,   209,   630,
+     886,   886,   610,   886,   724,   212,   936,   502,   426,   496,
+     245,   340,   731,   507,   253,   675,   487,   510,    92,   734,
+     691,   340,   498,   591,   695,   580,   701,   263,   756,   340,
+     591,   805,   490,   807,   809,   740,   775,   780,   491,   781,
+     795,   535,   796,   797,   798,   535,   591,   544,   799,   605,
+     606,   152,   153,   810,   852,   885,   757,   666,   265,   906,
+     750,   908,   554,   555,   528,   550,   940,   559,   624,   625,
+     626,   627,   628,   844,   411,   412,   571,   572,   573,   574,
+     597,   637,   767,   768,   769,   770,   771,   549,   277,   287,
+     384,   891,   351,   537,   937,   221,   538,   233,   587,   330,
+     331,   588,   589,   590,   607,   238,   499,   239,   611,   612,
+     613,   614,   615,   616,   617,   618,   619,   620,   621,   622,
+     246,   888,   889,   761,   234,   272,   629,   500,   909,   726,
+     727,   235,   442,   283,   236,   914,   285,   641,   643,   644,
+     645,   646,   647,   648,   649,   650,   651,   652,   653,   654,
+     655,   656,   659,   661,   663,   665,   421,   429,   393,   213,
+     440,   440,   435,   307,   450,   342,   347,   671,   672,   308,
+     310,   578,   859,   860,   861,   886,   316,   416,   323,   578,
+     326,   441,   324,   454,   448,   328,   449,   452,   898,   588,
+     589,   590,   482,   587,   330,   331,   588,   589,   590,   805,
+     807,   809,   353,   415,   591,   359,   360,   339,   121,   910,
+     911,   912,   913,   868,   858,   361,   365,   849,   866,   579,
+     366,   591,   591,   591,   591,   591,   367,   579,   506,   339,
+     339,   339,   339,   339,   876,   700,   439,   439,   368,   707,
+     387,   369,   387,   387,   514,   698,   718,   370,   340,   440,
+     883,   712,   831,   371,   440,   811,   719,   833,   759,   722,
+     580,   372,   373,   374,   375,   551,   376,   378,   580,   556,
+     340,   340,   340,   340,   340,   535,   566,   379,   380,   381,
+     382,   535,   535,   391,   416,   392,   566,   706,   706,   706,
+     706,   706,   418,   419,   706,   255,   256,   515,   420,   180,
+     181,    92,   430,   587,   330,   331,   588,   589,   590,   754,
+     432,   433,   481,   904,   485,   183,   184,   486,   758,   185,
+     186,   187,   188,   492,   516,   439,   517,   518,   519,   268,
+     439,   520,   521,   189,   522,   523,   494,   591,   330,   331,
+     588,   589,   590,   778,   512,   207,   779,   277,   503,   508,
+     925,   509,   287,   922,   536,   527,   529,   546,   578,   548,
+     557,   585,   575,   634,   933,   594,   595,   601,   635,   393,
+    -488,  -488,  -488,  -488,  -488,  -488,   804,   636,   806,   808,
+     639,   679,   384,   812,   321,   683,   685,   686,   845,   688,
+     692,   693,   696,   697,   708,   903,   709,   339,   725,   730,
+     813,   814,   735,   736,   745,   815,   579,   816,   387,   387,
+     387,   819,   739,   225,   748,   749,   764,   811,   590,   935,
+     776,   801,   802,   803,   828,   819,   817,   823,   824,   826,
+     827,   832,   834,   839,   847,   496,   864,   837,   340,   484,
+     848,   865,   867,   870,   855,   871,   872,   580,   873,   394,
+     874,   395,   396,   397,   398,   399,   850,   400,   401,   402,
+     403,   404,   405,   878,   897,   406,   407,   408,   409,   410,
+    -489,   902,   907,   921,   930,   934,   535,   742,   578,   941,
+     938,   939,   942,   943,   944,   950,   844,   945,   875,   952,
+    -360,   958,   559,   960,   957,   633,   879,  -247,   967,  -247,
+    -247,  -247,  -247,  -247,   965,  -247,  -247,  -247,  -247,  -247,
+    -247,   968,   926,  -247,  -247,  -247,  -247,  -247,   901,   394,
+      16,   395,   396,   397,   398,   399,   579,   400,   401,   402,
+     403,   404,   405,   488,   393,   406,   407,   408,   409,   410,
+     145,   892,   441,   449,   804,   806,   808,   836,   890,   677,
+     838,   710,   723,   732,   493,   702,   258,   729,   545,   863,
+     213,   900,   916,   915,   681,   669,   394,   580,   395,   396,
+     397,   398,   399,   829,   400,   401,   402,   403,   404,   405,
+     949,   966,   406,   407,   408,   409,   410,   880,   931,   969,
+     352,   746,   877,   882,   718,   345,   917,   593,   920,   631,
+     747,   772,     0,   773,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,   535,     0,     0,     0,     0,     0,     0,
+       0,     0,   825,     0,     0,     0,     0,     0,     0,   411,
+     412,   449,     0,   881,     0,     0,   449,     0,   835,     0,
+       0,     0,   946,     0,   948,   819,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,   392,     0,     0,     0,     0,     0,   854,     0,     0,
+       0,     0,     0,     0,     0,   959,     0,  -247,  -247,     0,
+       0,     0,     0,     0,   961,     0,     0,     0,     0,     0,
+     962,     2,     3,   964,   638,     0,     0,     0,     0,   411,
+     412,     0,     0,   566,     0,     0,   972,     0,     0,     0,
+     973,     0,     0,   974,   975,     0,     0,     0,   -23,   977,
+     -23,     0,     0,   -23,   -23,   -23,   -23,     4,     5,   -23,
+       0,     0,   -23,   -23,   -23,     0,     0,     0,     0,   -23,
+     -23,     0,     0,     0,     6,     7,   411,   412,     0,     0,
+       0,     0,     0,     0,   -23,     0,     0,     0,   -23,   -23,
+       0,     0,     0,   -23,     0,     0,     0,     0,     0,   -23,
+       0,   -23,   -23,     0,   -23,     0,   -23,   -23,   -23,   -23,
+     -23,     0,   -23,   -23,   -23,   -23,   -23,   -23,   -23,   -23,
+     -23,   -23,   -23,   -23,   -23,   -23,   -23,   -23,     0,     0,
+     -23,   -23,   -23,     0,   -23,   -23,   -23,     0,   -23,   -23,
+     -23,     0,     0,   -23,     0,   -23,     0,     0,   -23,   -23,
+     -23,   -23,     0,     0,   -23,   -23,   -23,     0,     0,   351,
+       0,     0,   -23,     0,     0,     8,   -23,   -23,   -23,   -23,
+     -23,   -23,   -23,     0,   -23,   -23,   -23,   -23,   -23,     0,
+       0,   -23,     0,     0,     0,   951,     0,     0,   -23,   -23,
+     -23,     0,     0,     0,     0,     0,     0,   -23,     9,  -507,
+       0,  -507,     0,  -507,  -507,  -507,  -507,  -507,    10,  -507,
+    -507,  -507,  -507,  -507,  -507,     0,     0,  -507,  -507,  -507,
+    -507,  -507,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,   154,   155,     0,     0,     0,
+     156,   157,   158,   159,     0,     0,     0,     0,     0,     0,
+       0,     0,   160,   161,   162,   163,   164,   165,   166,     0,
+     167,   168,   169,     0,     0,   170,   171,   172,     0,   173,
+     174,   175,   176,   177,   932,   178,   394,     0,   395,   396,
+     397,   398,   399,     0,   400,   401,   402,   403,   404,   405,
+       0,     0,   406,   407,   408,   409,   410,   970,     0,   394,
+       0,   395,   396,   397,   398,   399,     0,   400,   401,   402,
+     403,   404,   405,     0,     0,   406,   407,   408,   409,   410,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,   180,   181,
+       0,     0,     0,     0,   182,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,   183,   184,     0,     0,   185,   186,
+     187,   188,     0,     0,     0,    92,     0,     0,     0,     0,
+       0,     0,   189,     0,     0,   577,     0,     0,     0,     0,
+       0,  -507,  -507,   971,     0,   394,     0,   395,   396,   397,
+     398,   399,     0,   400,   401,   402,   403,   404,   405,     0,
+       0,   406,   407,   408,   409,   410,   976,     0,   394,     0,
+     395,   396,   397,   398,   399,     0,   400,   401,   402,   403,
+     404,   405,     0,     0,   406,   407,   408,   409,   410,   853,
+     394,     0,   395,   396,   397,   398,   399,     0,   400,   401,
+     402,   403,   404,   405,     0,     0,   406,   407,   408,   409,
+     410,     0,     0,     0,     0,     0,   411,   412,     0,     0,
+       0,     0,     0,     0,   901,   394,     0,   395,   396,   397,
+     398,   399,     0,   400,   401,   402,   403,   404,   405,   411,
+     412,   406,   407,   408,   409,   410,   947,   394,     0,   395,
+     396,   397,   398,   399,     0,   400,   401,   402,   403,   404,
+     405,     0,     0,   406,   407,   408,   409,   410,   963,   394,
+       0,   395,   396,   397,   398,   399,     0,   400,   401,   402,
+     403,   404,   405,     0,     0,   406,   407,   408,   409,   410,
+     394,     0,   395,   396,   397,   398,   399,     0,   400,   401,
+     402,   403,   404,   405,     0,     0,   406,   407,   408,   409,
+     410,   394,     0,   395,   396,   397,   398,   399,     0,   400,
+     401,   402,   403,   404,   405,   411,   412,   406,   407,   408,
+     409,   410,     0,     0,   394,     0,   395,   396,   397,   398,
+     399,     0,   400,   401,   402,   403,   404,   405,   411,   412,
+     406,   407,   408,   409,   410,     0,   394,     0,   395,   396,
+     397,   398,   399,     0,   400,   401,   402,   403,   404,   405,
+     411,   412,   406,   407,   408,   409,   410,  -250,     0,  -250,
+    -250,  -250,  -250,  -250,     0,  -250,  -250,  -250,  -250,  -250,
+    -250,     0,     0,  -250,  -250,  -250,  -250,  -250,     0,     0,
+       0,     0,     0,     0,     0,   411,   412,     0,     0,     0,
+       0,     0,     0,   394,     0,   395,   396,   397,   398,   399,
+       0,   400,   401,   402,   403,   404,   405,   411,   412,   406,
+     407,   408,   409,   410,     0,   394,     0,   395,   396,   397,
+     398,   399,     0,   400,   401,   402,   403,   404,   405,   411,
+     412,   406,   407,   408,   409,   410,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,   438,     0,     0,     0,     0,
+     411,   412,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,   602,     0,     0,     0,
+       0,   411,   412,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,   609,
+       0,     0,     0,     0,   411,   412,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,   623,     0,     0,     0,     0,   411,   412,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,  -250,     0,     0,     0,     0,  -250,  -250,   394,
+       0,   395,   396,   397,   398,   399,     0,   400,   401,   402,
+     403,   404,   405,     0,     0,   406,   407,   408,   409,   410,
+       0,     0,     0,     0,     0,     0,     0,     0,   638,     0,
+       0,     0,     0,   411,   412,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+     673,     0,     0,     0,     0,   411,   412,   394,     0,   395,
+     396,   397,   398,   399,     0,   400,   401,   402,   403,   404,
+     405,     0,     0,   406,   407,   408,   409,   410,   394,     0,
+     395,   396,   397,   398,   399,     0,   400,   401,   402,   403,
+     404,   405,     0,     0,   406,   407,   408,   409,   410,   394,
+       0,   395,   396,   397,   398,   399,     0,   400,   401,   402,
+     403,   404,   405,     0,     0,   406,   407,   408,   409,   410,
+     394,     0,   395,   396,   397,   398,   399,     0,   400,   401,
+     402,   403,   404,   405,     0,     0,   406,   407,   408,   409,
+     410,   394,     0,   395,   396,   397,   398,   399,     0,   400,
+     401,   402,   403,   404,   405,     0,     0,   406,   407,   408,
+     409,   410,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,   678,     0,     0,     0,     0,   411,
+     412,   394,     0,   395,   396,   397,   398,   399,     0,   400,
+     401,   402,   403,   404,   405,     0,     0,   406,   407,   408,
+     409,   410,   394,     0,   395,   396,   397,   398,   399,     0,
+     400,   401,   402,   403,   404,   405,     0,     0,   406,   407,
+     408,   409,   410,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,   680,     0,     0,     0,     0,   411,   412,     0,
+       0,     0,   420,     0,   394,     0,   395,   396,   397,   398,
+     399,     0,   400,   401,   402,   403,   404,   405,   411,   412,
+     406,   407,   408,   409,   410,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,   782,     0,     0,     0,     0,   411,
+     412,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,   783,     0,     0,     0,     0,
+     411,   412,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,   784,     0,     0,     0,
+       0,   411,   412,   394,     0,   395,   396,   397,   398,   399,
+       0,   400,   401,   402,   403,   404,   405,     0,     0,   406,
+     407,   408,   409,   410,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,   785,     0,     0,     0,
+       0,   411,   412,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,   786,     0,     0,
+       0,     0,   411,   412,   394,     0,   395,   396,   397,   398,
+     399,     0,   400,   401,   402,   403,   404,   405,     0,     0,
+     406,   407,   408,   409,   410,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,   787,
+       0,     0,     0,     0,   411,   412,   394,     0,   395,   396,
+     397,   398,   399,     0,   400,   401,   402,   403,   404,   405,
+       0,     0,   406,   407,   408,   409,   410,   394,     0,   395,
+     396,   397,   398,   399,     0,   400,   401,   402,   403,   404,
+     405,     0,     0,   406,   407,   408,   409,   410,   394,     0,
+     395,   396,   397,   398,   399,     0,   400,   401,   402,   403,
+     404,   405,     0,     0,   406,   407,   408,   409,   410,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,   788,     0,
+       0,     0,     0,   411,   412,   394,     0,   395,   396,   397,
+     398,   399,     0,   400,   401,   402,   403,   404,   405,     0,
+       0,   406,   407,   408,   409,   410,   394,     0,   395,   396,
+     397,   398,   399,     0,   400,   401,   402,   403,   404,   405,
+       0,     0,   406,   407,   408,   409,   410,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,   789,
+       0,     0,     0,     0,   411,   412,   394,     0,   395,   396,
+     397,   398,   399,     0,   400,   401,   402,   403,   404,   405,
+       0,     0,   406,   407,   408,   409,   410,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,   790,     0,     0,     0,     0,   411,   412,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,   791,     0,     0,     0,     0,   411,   412,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,   792,     0,     0,     0,     0,   411,   412,
+     394,     0,   395,   396,   397,   398,   399,     0,   400,   401,
+     402,   403,   404,   405,     0,     0,   406,   407,   408,   409,
+     410,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+     793,     0,     0,     0,     0,   411,   412,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,   794,     0,     0,     0,     0,   411,   412,   394,     0,
+     395,   396,   397,   398,   399,     0,   400,   401,   402,   403,
+     404,   405,     0,     0,   406,   407,   408,   409,   410,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,   800,     0,     0,     0,     0,   411,   412,   394,     0,
+     395,   396,   397,   398,   399,     0,   400,   401,   402,   403,
+     404,   405,     0,     0,   406,   407,   408,   409,   410,   397,
+     398,   399,     0,   400,   401,   402,   403,   404,   405,     0,
+       0,   406,   407,   408,   409,   410,     0,     0,     0,     0,
+       0,     0,   399,   713,   400,   401,   402,   403,   404,   405,
+       0,   151,   406,   407,   408,   409,   410,     0,     0,     0,
+     152,   153,   714,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,   846,     0,     0,   154,   155,
+     411,   412,     0,   156,   157,   158,   159,     0,     0,     0,
+       0,     0,     0,     0,     0,   160,   161,   162,   163,   164,
+     165,   166,     0,   167,   168,   169,     0,     0,   170,   171,
+     172,     0,   173,   174,   175,   176,   177,     0,   178,   400,
+     401,   402,   403,   404,   405,     0,     0,   406,   407,   408,
+     409,   410,     0,   905,     0,     0,     0,     0,   411,   412,
+    -508,  -508,  -508,  -508,  -508,  -508,     0,     0,   406,   407,
+     408,   409,   410,     0,     0,     0,     0,     0,     0,   330,
+     331,   563,     0,   564,     0,     0,     0,     0,     0,     0,
+     179,     0,     0,     0,     0,     0,     0,     0,   411,   412,
+       0,   180,   181,     0,     0,     0,     0,   182,   333,   334,
+     335,     0,     0,   336,     0,   411,   412,   183,   184,     0,
+     151,   185,   186,   187,   188,     0,     0,     0,    92,   152,
+     153,     0,     0,     0,     0,   189,   411,   412,   190,     0,
+       0,     0,     0,     0,     0,     0,     0,   154,   155,     0,
+       0,     0,   156,   157,   158,   159,     0,     0,     0,     0,
+       0,     0,     0,     0,   160,   161,   162,   163,   164,   165,
+     166,     0,   167,   168,   169,     0,     0,   170,   171,   172,
+       0,   173,   174,   175,   176,   177,     0,   178,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+     180,   181,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,   411,   412,   330,   331,   332,   183,   184,     0,     0,
+     185,   186,   187,   188,     0,     0,     0,   337,     0,     0,
+       0,     0,   411,   412,   189,     0,     0,   565,     0,   179,
+       0,     0,   333,   334,   335,     0,     0,   336,     0,     0,
+     180,   181,     0,     0,     0,     0,   182,   818,     0,     0,
+       0,     0,     0,     0,     0,   151,   183,   184,     0,     0,
+     185,   186,   187,   188,   152,   153,     0,    92,     0,     0,
+       0,     0,     0,     0,   189,     0,     0,   190,     0,     0,
+       0,     0,   154,   155,     0,   206,     0,   156,   157,   158,
+     159,     0,     0,     0,     0,     0,     0,     0,     0,   160,
+     161,   162,   163,   164,   165,   166,     0,   167,   168,   169,
+       0,     0,   170,   171,   172,     0,   173,   174,   175,   176,
+     177,     0,   178,     0,   180,   181,     0,     0,     0,     0,
+       0,     0,     0,   330,   331,     0,     0,     0,     0,     0,
+     183,   184,     0,     0,   185,   186,   187,   188,     0,     0,
+       0,   337,     0,     0,     0,     0,     0,     0,   189,     0,
+       0,   338,   333,   334,   335,     0,     0,   336,     0,     0,
+       0,     0,     0,     0,   179,   899,     0,     0,     0,     0,
+       0,     0,     0,   151,     0,   180,   181,     0,     0,     0,
+       0,   182,   152,   153,     0,     0,     0,     0,     0,     0,
+       0,   183,   184,     0,     0,   185,   186,   187,   188,     0,
+     154,   155,    92,     0,     0,   156,   157,   158,   159,   189,
+       0,     0,   190,     0,     0,     0,     0,   160,   161,   162,
+     163,   164,   165,   166,     0,   167,   168,   169,     0,     0,
+     170,   171,   172,     0,   173,   174,   175,   176,   177,     0,
+     178,     0,     0,     0,   180,   181,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+     183,   184,     0,     0,   185,   186,   187,   188,     0,     0,
+       0,   337,     0,     0,     0,     0,     0,     0,   189,     0,
+       0,   565,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,   179,     0,   532,     0,     0,     0,     0,     0,
+       0,   151,     0,   180,   181,     0,     0,     0,     0,   182,
+     152,   153,   533,     0,     0,     0,     0,     0,     0,   183,
+     184,     0,     0,   185,   186,   187,   188,     0,   154,   155,
+      92,     0,     0,   156,   157,   158,   159,   189,     0,     0,
+     190,     0,     0,     0,     0,   160,   161,   162,   163,   164,
+     165,   166,     0,   167,   168,   169,     0,     0,   170,   171,
+     172,     0,   173,   174,   175,   176,   177,     0,   178,   455,
+       0,     0,     0,   456,   457,   458,   459,     0,     0,     0,
+       0,     0,     0,     0,     0,   460,   461,   462,   463,   464,
+     465,   466,     0,   467,   468,   469,     0,     0,   470,   471,
+     472,     0,     0,   473,   474,   475,   476,     0,   477,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+     179,     0,   657,     0,     0,     0,     0,     0,     0,   151,
+       0,   180,   181,     0,     0,     0,     0,   182,   152,   153,
+       0,   658,     0,     0,     0,     0,     0,   183,   184,     0,
+       0,   185,   186,   187,   188,     0,   154,   155,    92,     0,
+       0,   156,   157,   158,   159,   189,     0,     0,   190,     0,
+       0,     0,     0,   160,   161,   162,   163,   164,   165,   166,
+       0,   167,   168,   169,     0,     0,   170,   171,   172,     0,
+     173,   174,   175,   176,   177,     0,   178,     0,   478,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,   179,     0,
+     733,     0,     0,     0,     0,     0,     0,   151,     0,   180,
+     181,     0,     0,     0,     0,   182,   152,   153,   533,     0,
+       0,     0,     0,     0,     0,   183,   184,     0,     0,   185,
+     186,   187,   188,     0,   154,   155,    92,     0,     0,   156,
+     157,   158,   159,   189,     0,     0,   190,     0,     0,     0,
+       0,   160,   161,   162,   163,   164,   165,   166,     0,   167,
+     168,   169,     0,     0,   170,   171,   172,     0,   173,   174,
+     175,   176,   177,     0,   178,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,   179,     0,   640,     0,
+       0,     0,     0,     0,     0,   151,     0,   180,   181,     0,
+       0,     0,     0,   182,   152,   153,     0,     0,     0,     0,
+       0,     0,     0,   183,   184,     0,     0,   185,   186,   187,
+     188,     0,   154,   155,    92,     0,     0,   156,   157,   158,
+     159,   189,     0,     0,   190,     0,     0,     0,     0,   160,
+     161,   162,   163,   164,   165,   166,     0,   167,   168,   169,
+       0,     0,   170,   171,   172,     0,   173,   174,   175,   176,
+     177,     0,   178,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,   179,     0,   662,     0,     0,     0,
+       0,     0,     0,   151,     0,   180,   181,     0,     0,     0,
+       0,   182,   152,   153,     0,     0,     0,     0,     0,     0,
+       0,   183,   184,     0,     0,   185,   186,   187,   188,     0,
+     154,   155,    92,     0,     0,   156,   157,   158,   159,   189,
+       0,     0,   190,     0,     0,     0,     0,   160,   161,   162,
+     163,   164,   165,   166,     0,   167,   168,   169,     0,     0,
+     170,   171,   172,     0,   173,   174,   175,   176,   177,     0,
+     178,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,   179,     0,   664,     0,     0,     0,     0,     0,
+       0,   151,     0,   180,   181,     0,     0,     0,     0,   182,
+     152,   153,     0,     0,     0,     0,     0,     0,     0,   183,
+     184,     0,     0,   185,   186,   187,   188,     0,   154,   155,
+      92,     0,     0,   156,   157,   158,   159,   189,     0,     0,
+     190,     0,     0,     0,     0,   160,   161,   162,   163,   164,
+     165,   166,     0,   167,   168,   169,     0,     0,   170,   171,
+     172,     0,   173,   174,   175,   176,   177,     0,   178,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+     179,     0,     0,     0,     0,     0,     0,     0,     0,   151,
+       0,   180,   181,     0,     0,     0,     0,   182,   152,   153,
+     751,     0,   752,     0,     0,     0,     0,   183,   184,     0,
+       0,   185,   186,   187,   188,     0,   154,   155,    92,     0,
+       0,   156,   157,   158,   159,   189,     0,     0,   190,     0,
+       0,     0,     0,   160,   161,   162,   163,   164,   165,   166,
+       0,   167,   168,   169,     0,     0,   170,   171,   172,     0,
+     173,   174,   175,   176,   177,     0,   178,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,   179,     0,
+       0,     0,     0,     0,     0,     0,     0,   151,     0,   180,
+     181,     0,     0,     0,     0,   182,   152,   153,   533,     0,
+       0,     0,     0,     0,     0,   183,   184,     0,     0,   185,
+     186,   187,   188,     0,   154,   155,    92,     0,     0,   156,
+     157,   158,   159,   189,     0,     0,   753,     0,     0,     0,
+       0,   160,   161,   162,   163,   164,   165,   166,     0,   167,
+     168,   169,     0,     0,   170,   171,   172,     0,   173,   174,
+     175,   176,   177,     0,   178,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,   179,     0,     0,     0,
+       0,     0,     0,     0,     0,   151,     0,   180,   181,     0,
+       0,     0,     0,   182,   152,   153,   558,     0,     0,     0,
+       0,     0,     0,   183,   184,     0,     0,   185,   186,   187,
+     188,     0,   154,   155,   539,     0,     0,   156,   157,   158,
+     159,   189,     0,     0,   190,     0,     0,     0,     0,   160,
+     161,   162,   163,   164,   165,   166,     0,   167,   168,   169,
+       0,     0,   170,   171,   172,     0,   173,   174,   175,   176,
+     177,     0,   178,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,   179,     0,     0,     0,     0,     0,
+       0,     0,     0,   151,     0,   180,   181,     0,     0,     0,
+       0,   182,   152,   153,   533,     0,     0,     0,     0,     0,
+       0,   183,   184,     0,     0,   185,   186,   187,   188,     0,
+     154,   155,    92,     0,     0,   156,   157,   158,   159,   189,
+       0,     0,   190,     0,     0,     0,     0,   160,   161,   162,
+     163,   164,   165,   166,     0,   167,   168,   169,     0,     0,
+     170,   171,   172,     0,   173,   174,   175,   176,   177,     0,
+     178,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,   179,     0,     0,     0,     0,     0,     0,     0,
+       0,   151,     0,   180,   181,     0,     0,     0,     0,   182,
+     152,   153,   738,     0,     0,     0,     0,     0,     0,   183,
+     184,     0,     0,   185,   186,   187,   188,     0,   154,   155,
+      92,     0,     0,   156,   157,   158,   159,   189,     0,     0,
+     190,     0,     0,     0,     0,   160,   161,   162,   163,   164,
+     165,   166,     0,   167,   168,   169,     0,     0,   170,   171,
+     172,     0,   173,   174,   175,   176,   177,     0,   178,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+     179,     0,     0,     0,     0,     0,     0,     0,     0,   151,
+       0,   180,   181,     0,     0,     0,     0,   182,   152,   153,
+     714,     0,     0,     0,     0,     0,     0,   183,   184,     0,
+       0,   185,   186,   187,   188,     0,   154,   155,    92,     0,
+       0,   156,   157,   158,   159,   189,     0,     0,   190,     0,
+       0,     0,     0,   160,   161,   162,   163,   164,   165,   166,
+       0,   167,   168,   169,     0,     0,   170,   171,   172,     0,
+     173,   174,   175,   176,   177,     0,   178,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,   179,     0,
+       0,     0,     0,     0,     0,     0,     0,   151,     0,   180,
+     181,     0,     0,     0,     0,   182,   152,   153,   953,     0,
+       0,     0,     0,     0,     0,   183,   184,     0,     0,   185,
+     186,   187,   188,     0,   154,   155,    92,     0,     0,   156,
+     157,   158,   159,   189,     0,     0,   190,     0,     0,     0,
+       0,   160,   161,   162,   163,   164,   165,   166,     0,   167,
+     168,   169,     0,     0,   170,   171,   172,     0,   173,   174,
+     175,   176,   177,     0,   178,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,   179,     0,     0,     0,
+       0,     0,     0,     0,     0,   151,     0,   180,   181,     0,
+       0,     0,     0,   182,   152,   153,     0,     0,     0,     0,
+       0,     0,     0,   183,   184,     0,     0,   185,   186,   187,
+     188,     0,   154,   155,    92,     0,     0,   156,   157,   158,
+     159,   189,     0,     0,   190,     0,     0,     0,     0,   160,
+     161,   162,   163,   164,   165,   166,     0,   167,   168,   169,
+       0,     0,   170,   171,   172,     0,   173,   174,   175,   176,
+     177,     0,   178,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,   179,     0,     0,     0,     0,     0,
+       0,     0,     0,   151,     0,   180,   181,     0,     0,     0,
+       0,   182,   152,   153,     0,     0,     0,     0,     0,     0,
+       0,   183,   184,     0,     0,   185,   186,   187,   188,     0,
+     154,   155,    92,     0,     0,   156,   157,   158,   159,   189,
+       0,     0,   190,     0,     0,     0,     0,   160,   161,   162,
+     163,   164,   165,   166,     0,   167,   168,   169,     0,     0,
+     170,   171,   172,     0,   173,   174,   175,   176,   177,     0,
+     178,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,   179,     0,     0,     0,     0,     0,     0,     0,
+       0,   151,     0,   180,   181,     0,     0,     0,     0,   182,
+     152,   153,     0,     0,     0,     0,     0,     0,     0,   183,
+     184,     0,     0,   185,   186,   187,   188,     0,   154,   155,
+      92,     0,     0,   156,   157,   158,   159,   189,     0,     0,
+     383,     0,     0,     0,     0,   160,   161,   162,   163,   164,
+     165,   166,     0,   167,   168,   169,     0,     0,   170,   171,
+     172,     0,   173,   174,   175,   176,   177,     0,   178,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+     179,     0,     0,     0,     0,     0,     0,     0,     0,   151,
+       0,   180,   181,     0,     0,     0,     0,   182,   152,   153,
+       0,     0,     0,     0,     0,     0,     0,   183,   184,     0,
+       0,   185,   186,   187,   188,     0,   154,   155,    92,     0,
+       0,   156,   157,   158,   159,   446,     0,     0,   190,     0,
+       0,     0,     0,   160,   161,   162,   163,   164,   165,   166,
+       0,   167,   168,   169,     0,     0,   170,   171,   172,     0,
+     173,   174,   175,   176,   177,     0,   178,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,   179,     0,
+       0,     0,     0,     0,     0,     0,     0,   151,     0,   180,
+     181,     0,     0,     0,     0,   182,   152,   153,     0,     0,
+       0,     0,     0,     0,     0,   183,   184,     0,     0,   185,
+     186,   187,   188,     0,   154,   155,    92,     0,     0,   156,
+     157,   158,   159,   189,     0,     0,   542,     0,     0,     0,
+       0,   160,   161,   162,   163,   164,   165,   166,     0,   167,
+     168,   169,     0,     0,   170,   171,   172,     0,   173,   174,
+     175,   176,   177,     0,   178,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,   179,     0,     0,     0,
+       0,     0,     0,     0,     0,   151,     0,   180,   181,     0,
+       0,     0,     0,   182,   152,   153,     0,     0,     0,     0,
+       0,     0,     0,   183,   184,     0,     0,   185,   186,   187,
+     188,     0,   154,   155,   893,     0,     0,   156,   157,   158,
+     159,   189,     0,     0,   383,     0,     0,     0,     0,   160,
+     161,   162,   163,   164,   165,   166,     0,   167,   168,   169,
+       0,     0,   170,   171,   172,     0,   173,   174,   175,   176,
+     177,     0,   178,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,   179,    19,     0,     0,    20,   -28,
+      21,    22,     0,     0,    23,   180,   181,    24,    25,    26,
+       0,   182,     0,     0,    27,    28,     0,     0,     0,     0,
+       0,   183,   184,     0,     0,   185,   186,   187,   188,    29,
+       0,     0,    92,    30,    31,     0,     0,     0,    32,   189,
+       0,     0,   918,     0,    33,     0,    34,    35,     0,    36,
+       0,    37,    38,    39,    40,    41,     0,    42,    43,    44,
+      45,    46,    47,    48,    49,    50,    51,    52,    53,    54,
+      55,    56,    57,     0,     0,    58,    59,    60,     0,    61,
+      62,    63,     0,    64,    65,    66,     0,     0,    67,     0,
+      68,     0,     0,    69,    70,    71,    72,     0,     0,    73,
+      74,    75,     0,     0,     0,     0,     0,    76,     0,     0,
+       0,    77,    78,    79,    80,    81,    82,    83,     0,    84,
+      85,    86,    87,    88,     0,     0,    89,     0,     0,     0,
+       0,   154,   155,    90,    91,    92,   156,   157,   158,   159,
+       0,     0,    93,     0,     0,     0,     0,     0,   160,   161,
+     162,   163,   164,   165,   166,     0,   167,   168,   169,     0,
+       0,   170,   171,   172,     0,   173,   174,   175,   176,   177,
+       0,   178,   154,   155,     0,     0,     0,   156,   157,   158,
+     159,     0,     0,     0,     0,     0,     0,     0,     0,   160,
+     161,   162,   163,   164,   165,   166,     0,   167,   168,   169,
+       0,     0,   170,   171,   172,     0,   173,   174,   175,   176,
+     177,     0,   178,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,   180,   181,     0,     0,     0,     0,
+     182,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+     183,   184,     0,     0,   185,   186,   187,   188,     0,     0,
+      23,    92,     0,     0,     0,     0,     0,     0,   189,     0,
+       0,   577,     0,     0,     0,   180,   181,     0,     0,     0,
+       0,   182,     0,     0,     0,    29,     0,     0,     0,     0,
+       0,   183,   184,     0,     0,   185,   186,   187,   188,     0,
+      33,     0,   893,     0,     0,    36,   348,     0,     0,   189,
+      40,    41,   577,     0,     0,     0,     0,     0,     0,     0,
+     349,    50,    51,    52,    53,    54,    55,   350,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+      65,     0,     0,     0,     0,     0,    68,     0,     0,     0,
+       0,     0,     0,     0,     0,    73,     0,    75,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,    92,     0,     0,     0,     0,     0,     0,    93
+};
+
+static const yytype_int16 yycheck[] =
+{
+      27,   233,    29,   179,   202,   287,    33,    36,   298,    36,
+     275,   383,   290,   141,   279,    42,   179,   416,   500,   580,
+     721,    22,   583,    18,    35,   179,     3,   309,   344,   233,
+     451,     3,     5,    23,   238,    47,   190,   238,     3,    23,
+      23,     4,     4,    23,    25,     3,   578,   734,   580,    60,
+      61,   583,    23,   328,   141,     3,    21,    22,    23,    71,
+      72,     3,     4,   338,    31,   104,   176,    79,     3,   179,
+     764,   346,   123,     3,   113,   124,   169,     3,   158,     3,
+     160,     3,   236,   490,    24,   106,   137,   108,   169,     3,
+       3,   112,     3,     3,   187,     3,     3,     3,   179,    20,
+      98,     3,   100,    24,   131,   233,     3,     3,     3,   138,
+     238,   138,     3,   125,     3,   127,   128,   125,   177,     3,
+     127,   528,   169,   150,   151,   179,    20,    21,    22,    23,
+      24,    25,   159,    80,    81,   189,    21,    22,    23,     3,
+     187,     3,    23,    24,    25,   169,   173,   429,     3,     4,
+     169,   577,   179,   126,   802,   803,    20,   176,    20,   585,
+      24,   169,    24,   190,    23,   866,   342,   194,     4,    20,
+      20,   347,   495,    24,    24,     3,   179,   500,   205,    20,
+      35,   868,   179,    24,   347,   212,   169,   179,   180,   169,
+     884,    13,    20,   347,   221,   179,    24,   180,   188,   226,
+     328,   179,   169,   180,   185,   186,    27,   383,   179,   236,
+     338,   189,   169,   262,   342,   187,   189,   169,   346,   246,
+     383,   922,   180,   188,   187,   187,   508,   509,   179,   383,
+     762,   763,   180,   765,   516,   179,   884,   276,   180,   179,
+      62,   328,   532,   282,   169,   180,   257,   286,   169,   539,
+     180,   338,   273,   569,   180,   342,   180,    33,   180,   346,
+     576,   633,   263,   635,   636,   547,   180,   180,   266,   180,
+     180,   298,   180,   180,   180,   302,   592,   304,   180,   359,
+     360,    21,    22,   180,   180,   180,   180,   415,   158,   180,
+     565,   180,   319,   320,   295,   316,   180,   324,   378,   379,
+     380,   381,   382,   188,   185,   186,   333,   334,   335,   336,
+     169,   391,   587,   588,   589,   590,   591,   312,   169,   169,
+     347,   180,   144,   176,   885,   179,   179,   179,    20,    21,
+      22,    23,    24,    25,   361,   179,     3,   179,   365,   366,
+     367,   368,   369,   370,   371,   372,   373,   374,   375,   376,
+     179,   772,   773,   885,   169,   169,   383,    24,   840,     3,
+       4,   176,   594,     3,   179,   847,     3,   394,   395,   396,
+     397,   398,   399,   400,   401,   402,   403,   404,   405,   406,
+     407,   408,   409,   410,   411,   412,   158,   209,   542,   416,
+     594,   595,   219,    23,   595,   141,   142,   424,   425,     4,
+     169,   577,   138,   139,   140,   937,   176,   179,     3,   585,
+     169,   233,   179,   240,   236,   179,   238,   239,   817,    23,
+      24,    25,   244,    20,    21,    22,    23,    24,    25,   801,
+     802,   803,   179,   189,   750,   179,   179,   565,   260,   841,
+     842,   843,   844,   733,   722,   179,   179,   712,   730,   577,
+     179,   767,   768,   769,   770,   771,   179,   585,   280,   587,
+     588,   589,   590,   591,   746,   492,   594,   595,   179,   496,
+     633,   179,   635,   636,    29,   487,   503,   179,   565,   683,
+     755,   502,   683,   179,   688,   639,   507,   688,   180,   510,
+     577,   179,   179,   179,   179,   317,   179,   179,   585,   321,
+     587,   588,   589,   590,   591,   532,   328,   179,   179,   179,
+     179,   538,   539,   179,   179,   542,   338,   840,   841,   842,
+     843,   844,   179,   179,   847,    80,    81,    82,   169,   142,
+     143,   169,     3,    20,    21,    22,    23,    24,    25,   566,
+       4,   169,   169,   825,     3,   158,   159,     3,   575,   162,
+     163,   164,   165,     5,   109,   683,   111,   112,   113,   169,
+     688,   116,   117,   176,   119,   120,     3,   883,    21,    22,
+      23,    24,    25,   602,     3,   602,   603,   169,   179,   169,
+     870,   169,   169,   865,   180,     4,     3,   176,   764,     3,
+     176,     3,     5,   132,   876,   179,   179,    30,     3,   753,
+      20,    21,    22,    23,    24,    25,   633,     3,   635,   636,
+       3,     3,   639,   640,   189,     3,   180,   180,   705,     3,
+       3,    24,   179,   169,   169,   823,   169,   755,   179,   169,
+     657,   658,   180,     3,     5,   662,   764,   664,   801,   802,
+     803,   668,   180,   176,   180,     3,     3,   801,    25,   881,
+     179,     3,     3,     3,   681,   682,     4,   180,   180,   169,
+      84,   180,   180,    24,    24,   179,     4,   694,   755,   696,
+      24,   169,   180,   169,    23,   180,     4,   764,   126,     5,
+       3,     7,     8,     9,    10,    11,   713,    13,    14,    15,
+      16,    17,    18,   180,   180,    21,    22,    23,    24,    25,
+      20,     3,     5,   180,   169,   180,   733,   169,   884,     5,
+     180,   180,   180,   180,   180,     3,   188,   180,   745,    24,
+       5,     3,   749,   180,   126,     3,   753,     5,     5,     7,
+       8,     9,    10,    11,   180,    13,    14,    15,    16,    17,
+      18,   169,   169,    21,    22,    23,    24,    25,     4,     5,
+      10,     7,     8,     9,    10,    11,   884,    13,    14,    15,
+      16,    17,    18,   260,   918,    21,    22,    23,    24,    25,
+      14,   776,   594,   595,   801,   802,   803,   692,   774,   430,
+     696,   499,   512,   538,   269,   494,    77,   529,   305,   726,
+     817,   818,   853,   851,     3,   418,     5,   884,     7,     8,
+       9,    10,    11,   682,    13,    14,    15,    16,    17,    18,
+     902,   954,    21,    22,    23,    24,    25,   753,   874,   958,
+     144,   556,   749,   755,   851,   141,   853,   347,   855,   383,
+     558,   594,    -1,   595,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,   870,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,   674,    -1,    -1,    -1,    -1,    -1,    -1,   185,
+     186,   683,    -1,   189,    -1,    -1,   688,    -1,   690,    -1,
+      -1,    -1,   899,    -1,   901,   902,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,   918,    -1,    -1,    -1,    -1,    -1,   719,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,   932,    -1,   185,   186,    -1,
+      -1,    -1,    -1,    -1,   941,    -1,    -1,    -1,    -1,    -1,
+     947,     0,     1,   950,   180,    -1,    -1,    -1,    -1,   185,
+     186,    -1,    -1,   755,    -1,    -1,   963,    -1,    -1,    -1,
+     967,    -1,    -1,   970,   971,    -1,    -1,    -1,    27,   976,
+      29,    -1,    -1,    32,    33,    34,    35,    36,    37,    38,
+      -1,    -1,    41,    42,    43,    -1,    -1,    -1,    -1,    48,
+      49,    -1,    -1,    -1,    53,    54,   185,   186,    -1,    -1,
+      -1,    -1,    -1,    -1,    63,    -1,    -1,    -1,    67,    68,
+      -1,    -1,    -1,    72,    -1,    -1,    -1,    -1,    -1,    78,
+      -1,    80,    81,    -1,    83,    -1,    85,    86,    87,    88,
+      89,    -1,    91,    92,    93,    94,    95,    96,    97,    98,
+      99,   100,   101,   102,   103,   104,   105,   106,    -1,    -1,
+     109,   110,   111,    -1,   113,   114,   115,    -1,   117,   118,
+     119,    -1,    -1,   122,    -1,   124,    -1,    -1,   127,   128,
+     129,   130,    -1,    -1,   133,   134,   135,    -1,    -1,   881,
+      -1,    -1,   141,    -1,    -1,   144,   145,   146,   147,   148,
+     149,   150,   151,    -1,   153,   154,   155,   156,   157,    -1,
+      -1,   160,    -1,    -1,    -1,   907,    -1,    -1,   167,   168,
+     169,    -1,    -1,    -1,    -1,    -1,    -1,   176,   177,     3,
+      -1,     5,    -1,     7,     8,     9,    10,    11,   187,    13,
+      14,    15,    16,    17,    18,    -1,    -1,    21,    22,    23,
+      24,    25,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    39,    40,    -1,    -1,    -1,
+      44,    45,    46,    47,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    56,    57,    58,    59,    60,    61,    62,    -1,
+      64,    65,    66,    -1,    -1,    69,    70,    71,    -1,    73,
+      74,    75,    76,    77,     3,    79,     5,    -1,     7,     8,
+       9,    10,    11,    -1,    13,    14,    15,    16,    17,    18,
+      -1,    -1,    21,    22,    23,    24,    25,     3,    -1,     5,
+      -1,     7,     8,     9,    10,    11,    -1,    13,    14,    15,
+      16,    17,    18,    -1,    -1,    21,    22,    23,    24,    25,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   142,   143,
+      -1,    -1,    -1,    -1,   148,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,   158,   159,    -1,    -1,   162,   163,
+     164,   165,    -1,    -1,    -1,   169,    -1,    -1,    -1,    -1,
+      -1,    -1,   176,    -1,    -1,   179,    -1,    -1,    -1,    -1,
+      -1,   185,   186,     3,    -1,     5,    -1,     7,     8,     9,
+      10,    11,    -1,    13,    14,    15,    16,    17,    18,    -1,
+      -1,    21,    22,    23,    24,    25,     3,    -1,     5,    -1,
+       7,     8,     9,    10,    11,    -1,    13,    14,    15,    16,
+      17,    18,    -1,    -1,    21,    22,    23,    24,    25,     4,
+       5,    -1,     7,     8,     9,    10,    11,    -1,    13,    14,
+      15,    16,    17,    18,    -1,    -1,    21,    22,    23,    24,
+      25,    -1,    -1,    -1,    -1,    -1,   185,   186,    -1,    -1,
+      -1,    -1,    -1,    -1,     4,     5,    -1,     7,     8,     9,
+      10,    11,    -1,    13,    14,    15,    16,    17,    18,   185,
+     186,    21,    22,    23,    24,    25,     4,     5,    -1,     7,
+       8,     9,    10,    11,    -1,    13,    14,    15,    16,    17,
+      18,    -1,    -1,    21,    22,    23,    24,    25,     4,     5,
+      -1,     7,     8,     9,    10,    11,    -1,    13,    14,    15,
+      16,    17,    18,    -1,    -1,    21,    22,    23,    24,    25,
+       5,    -1,     7,     8,     9,    10,    11,    -1,    13,    14,
+      15,    16,    17,    18,    -1,    -1,    21,    22,    23,    24,
+      25,     5,    -1,     7,     8,     9,    10,    11,    -1,    13,
+      14,    15,    16,    17,    18,   185,   186,    21,    22,    23,
+      24,    25,    -1,    -1,     5,    -1,     7,     8,     9,    10,
+      11,    -1,    13,    14,    15,    16,    17,    18,   185,   186,
+      21,    22,    23,    24,    25,    -1,     5,    -1,     7,     8,
+       9,    10,    11,    -1,    13,    14,    15,    16,    17,    18,
+     185,   186,    21,    22,    23,    24,    25,     5,    -1,     7,
+       8,     9,    10,    11,    -1,    13,    14,    15,    16,    17,
+      18,    -1,    -1,    21,    22,    23,    24,    25,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,   185,   186,    -1,    -1,    -1,
+      -1,    -1,    -1,     5,    -1,     7,     8,     9,    10,    11,
+      -1,    13,    14,    15,    16,    17,    18,   185,   186,    21,
+      22,    23,    24,    25,    -1,     5,    -1,     7,     8,     9,
+      10,    11,    -1,    13,    14,    15,    16,    17,    18,   185,
+     186,    21,    22,    23,    24,    25,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,   180,    -1,    -1,    -1,    -1,
+     185,   186,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,   180,    -1,    -1,    -1,
+      -1,   185,   186,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   180,
+      -1,    -1,    -1,    -1,   185,   186,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,   180,    -1,    -1,    -1,    -1,   185,   186,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,   180,    -1,    -1,    -1,    -1,   185,   186,     5,
+      -1,     7,     8,     9,    10,    11,    -1,    13,    14,    15,
+      16,    17,    18,    -1,    -1,    21,    22,    23,    24,    25,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   180,    -1,
+      -1,    -1,    -1,   185,   186,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+     180,    -1,    -1,    -1,    -1,   185,   186,     5,    -1,     7,
+       8,     9,    10,    11,    -1,    13,    14,    15,    16,    17,
+      18,    -1,    -1,    21,    22,    23,    24,    25,     5,    -1,
+       7,     8,     9,    10,    11,    -1,    13,    14,    15,    16,
+      17,    18,    -1,    -1,    21,    22,    23,    24,    25,     5,
+      -1,     7,     8,     9,    10,    11,    -1,    13,    14,    15,
+      16,    17,    18,    -1,    -1,    21,    22,    23,    24,    25,
+       5,    -1,     7,     8,     9,    10,    11,    -1,    13,    14,
+      15,    16,    17,    18,    -1,    -1,    21,    22,    23,    24,
+      25,     5,    -1,     7,     8,     9,    10,    11,    -1,    13,
+      14,    15,    16,    17,    18,    -1,    -1,    21,    22,    23,
+      24,    25,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,   180,    -1,    -1,    -1,    -1,   185,
+     186,     5,    -1,     7,     8,     9,    10,    11,    -1,    13,
+      14,    15,    16,    17,    18,    -1,    -1,    21,    22,    23,
+      24,    25,     5,    -1,     7,     8,     9,    10,    11,    -1,
+      13,    14,    15,    16,    17,    18,    -1,    -1,    21,    22,
+      23,    24,    25,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,   180,    -1,    -1,    -1,    -1,   185,   186,    -1,
+      -1,    -1,   169,    -1,     5,    -1,     7,     8,     9,    10,
+      11,    -1,    13,    14,    15,    16,    17,    18,   185,   186,
+      21,    22,    23,    24,    25,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,   180,    -1,    -1,    -1,    -1,   185,
+     186,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,   180,    -1,    -1,    -1,    -1,
+     185,   186,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,   180,    -1,    -1,    -1,
+      -1,   185,   186,     5,    -1,     7,     8,     9,    10,    11,
+      -1,    13,    14,    15,    16,    17,    18,    -1,    -1,    21,
+      22,    23,    24,    25,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,   180,    -1,    -1,    -1,
+      -1,   185,   186,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,   180,    -1,    -1,
+      -1,    -1,   185,   186,     5,    -1,     7,     8,     9,    10,
+      11,    -1,    13,    14,    15,    16,    17,    18,    -1,    -1,
+      21,    22,    23,    24,    25,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   180,
+      -1,    -1,    -1,    -1,   185,   186,     5,    -1,     7,     8,
+       9,    10,    11,    -1,    13,    14,    15,    16,    17,    18,
+      -1,    -1,    21,    22,    23,    24,    25,     5,    -1,     7,
+       8,     9,    10,    11,    -1,    13,    14,    15,    16,    17,
+      18,    -1,    -1,    21,    22,    23,    24,    25,     5,    -1,
+       7,     8,     9,    10,    11,    -1,    13,    14,    15,    16,
+      17,    18,    -1,    -1,    21,    22,    23,    24,    25,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   180,    -1,
+      -1,    -1,    -1,   185,   186,     5,    -1,     7,     8,     9,
+      10,    11,    -1,    13,    14,    15,    16,    17,    18,    -1,
+      -1,    21,    22,    23,    24,    25,     5,    -1,     7,     8,
+       9,    10,    11,    -1,    13,    14,    15,    16,    17,    18,
+      -1,    -1,    21,    22,    23,    24,    25,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   180,
+      -1,    -1,    -1,    -1,   185,   186,     5,    -1,     7,     8,
+       9,    10,    11,    -1,    13,    14,    15,    16,    17,    18,
+      -1,    -1,    21,    22,    23,    24,    25,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,   180,    -1,    -1,    -1,    -1,   185,   186,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,   180,    -1,    -1,    -1,    -1,   185,   186,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,   180,    -1,    -1,    -1,    -1,   185,   186,
+       5,    -1,     7,     8,     9,    10,    11,    -1,    13,    14,
+      15,    16,    17,    18,    -1,    -1,    21,    22,    23,    24,
+      25,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+     180,    -1,    -1,    -1,    -1,   185,   186,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,   180,    -1,    -1,    -1,    -1,   185,   186,     5,    -1,
+       7,     8,     9,    10,    11,    -1,    13,    14,    15,    16,
+      17,    18,    -1,    -1,    21,    22,    23,    24,    25,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,   180,    -1,    -1,    -1,    -1,   185,   186,     5,    -1,
+       7,     8,     9,    10,    11,    -1,    13,    14,    15,    16,
+      17,    18,    -1,    -1,    21,    22,    23,    24,    25,     9,
+      10,    11,    -1,    13,    14,    15,    16,    17,    18,    -1,
+      -1,    21,    22,    23,    24,    25,    -1,    -1,    -1,    -1,
+      -1,    -1,    11,     4,    13,    14,    15,    16,    17,    18,
+      -1,    12,    21,    22,    23,    24,    25,    -1,    -1,    -1,
+      21,    22,    23,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,   180,    -1,    -1,    39,    40,
+     185,   186,    -1,    44,    45,    46,    47,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    56,    57,    58,    59,    60,
+      61,    62,    -1,    64,    65,    66,    -1,    -1,    69,    70,
+      71,    -1,    73,    74,    75,    76,    77,    -1,    79,    13,
+      14,    15,    16,    17,    18,    -1,    -1,    21,    22,    23,
+      24,    25,    -1,   180,    -1,    -1,    -1,    -1,   185,   186,
+      13,    14,    15,    16,    17,    18,    -1,    -1,    21,    22,
+      23,    24,    25,    -1,    -1,    -1,    -1,    -1,    -1,    21,
+      22,    23,    -1,    25,    -1,    -1,    -1,    -1,    -1,    -1,
+     131,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   185,   186,
+      -1,   142,   143,    -1,    -1,    -1,    -1,   148,    50,    51,
+      52,    -1,    -1,    55,    -1,   185,   186,   158,   159,    -1,
+      12,   162,   163,   164,   165,    -1,    -1,    -1,   169,    21,
+      22,    -1,    -1,    -1,    -1,   176,   185,   186,   179,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    39,    40,    -1,
+      -1,    -1,    44,    45,    46,    47,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    56,    57,    58,    59,    60,    61,
+      62,    -1,    64,    65,    66,    -1,    -1,    69,    70,    71,
+      -1,    73,    74,    75,    76,    77,    -1,    79,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+     142,   143,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,   185,   186,    21,    22,    23,   158,   159,    -1,    -1,
+     162,   163,   164,   165,    -1,    -1,    -1,   169,    -1,    -1,
+      -1,    -1,   185,   186,   176,    -1,    -1,   179,    -1,   131,
+      -1,    -1,    50,    51,    52,    -1,    -1,    55,    -1,    -1,
+     142,   143,    -1,    -1,    -1,    -1,   148,     4,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    12,   158,   159,    -1,    -1,
+     162,   163,   164,   165,    21,    22,    -1,   169,    -1,    -1,
+      -1,    -1,    -1,    -1,   176,    -1,    -1,   179,    -1,    -1,
+      -1,    -1,    39,    40,    -1,   187,    -1,    44,    45,    46,
+      47,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    56,
+      57,    58,    59,    60,    61,    62,    -1,    64,    65,    66,
+      -1,    -1,    69,    70,    71,    -1,    73,    74,    75,    76,
+      77,    -1,    79,    -1,   142,   143,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    21,    22,    -1,    -1,    -1,    -1,    -1,
+     158,   159,    -1,    -1,   162,   163,   164,   165,    -1,    -1,
+      -1,   169,    -1,    -1,    -1,    -1,    -1,    -1,   176,    -1,
+      -1,   179,    50,    51,    52,    -1,    -1,    55,    -1,    -1,
+      -1,    -1,    -1,    -1,   131,     4,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    12,    -1,   142,   143,    -1,    -1,    -1,
+      -1,   148,    21,    22,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,   158,   159,    -1,    -1,   162,   163,   164,   165,    -1,
+      39,    40,   169,    -1,    -1,    44,    45,    46,    47,   176,
+      -1,    -1,   179,    -1,    -1,    -1,    -1,    56,    57,    58,
+      59,    60,    61,    62,    -1,    64,    65,    66,    -1,    -1,
+      69,    70,    71,    -1,    73,    74,    75,    76,    77,    -1,
+      79,    -1,    -1,    -1,   142,   143,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+     158,   159,    -1,    -1,   162,   163,   164,   165,    -1,    -1,
+      -1,   169,    -1,    -1,    -1,    -1,    -1,    -1,   176,    -1,
+      -1,   179,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,   131,    -1,     5,    -1,    -1,    -1,    -1,    -1,
+      -1,    12,    -1,   142,   143,    -1,    -1,    -1,    -1,   148,
+      21,    22,    23,    -1,    -1,    -1,    -1,    -1,    -1,   158,
+     159,    -1,    -1,   162,   163,   164,   165,    -1,    39,    40,
+     169,    -1,    -1,    44,    45,    46,    47,   176,    -1,    -1,
+     179,    -1,    -1,    -1,    -1,    56,    57,    58,    59,    60,
+      61,    62,    -1,    64,    65,    66,    -1,    -1,    69,    70,
+      71,    -1,    73,    74,    75,    76,    77,    -1,    79,    40,
+      -1,    -1,    -1,    44,    45,    46,    47,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    56,    57,    58,    59,    60,
+      61,    62,    -1,    64,    65,    66,    -1,    -1,    69,    70,
+      71,    -1,    -1,    74,    75,    76,    77,    -1,    79,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+     131,    -1,     5,    -1,    -1,    -1,    -1,    -1,    -1,    12,
+      -1,   142,   143,    -1,    -1,    -1,    -1,   148,    21,    22,
+      -1,    24,    -1,    -1,    -1,    -1,    -1,   158,   159,    -1,
+      -1,   162,   163,   164,   165,    -1,    39,    40,   169,    -1,
+      -1,    44,    45,    46,    47,   176,    -1,    -1,   179,    -1,
+      -1,    -1,    -1,    56,    57,    58,    59,    60,    61,    62,
+      -1,    64,    65,    66,    -1,    -1,    69,    70,    71,    -1,
+      73,    74,    75,    76,    77,    -1,    79,    -1,   169,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   131,    -1,
+       5,    -1,    -1,    -1,    -1,    -1,    -1,    12,    -1,   142,
+     143,    -1,    -1,    -1,    -1,   148,    21,    22,    23,    -1,
+      -1,    -1,    -1,    -1,    -1,   158,   159,    -1,    -1,   162,
+     163,   164,   165,    -1,    39,    40,   169,    -1,    -1,    44,
+      45,    46,    47,   176,    -1,    -1,   179,    -1,    -1,    -1,
+      -1,    56,    57,    58,    59,    60,    61,    62,    -1,    64,
+      65,    66,    -1,    -1,    69,    70,    71,    -1,    73,    74,
+      75,    76,    77,    -1,    79,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,   131,    -1,     5,    -1,
+      -1,    -1,    -1,    -1,    -1,    12,    -1,   142,   143,    -1,
+      -1,    -1,    -1,   148,    21,    22,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,   158,   159,    -1,    -1,   162,   163,   164,
+     165,    -1,    39,    40,   169,    -1,    -1,    44,    45,    46,
+      47,   176,    -1,    -1,   179,    -1,    -1,    -1,    -1,    56,
+      57,    58,    59,    60,    61,    62,    -1,    64,    65,    66,
+      -1,    -1,    69,    70,    71,    -1,    73,    74,    75,    76,
+      77,    -1,    79,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,   131,    -1,     5,    -1,    -1,    -1,
+      -1,    -1,    -1,    12,    -1,   142,   143,    -1,    -1,    -1,
+      -1,   148,    21,    22,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,   158,   159,    -1,    -1,   162,   163,   164,   165,    -1,
+      39,    40,   169,    -1,    -1,    44,    45,    46,    47,   176,
+      -1,    -1,   179,    -1,    -1,    -1,    -1,    56,    57,    58,
+      59,    60,    61,    62,    -1,    64,    65,    66,    -1,    -1,
+      69,    70,    71,    -1,    73,    74,    75,    76,    77,    -1,
+      79,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,   131,    -1,     5,    -1,    -1,    -1,    -1,    -1,
+      -1,    12,    -1,   142,   143,    -1,    -1,    -1,    -1,   148,
+      21,    22,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   158,
+     159,    -1,    -1,   162,   163,   164,   165,    -1,    39,    40,
+     169,    -1,    -1,    44,    45,    46,    47,   176,    -1,    -1,
+     179,    -1,    -1,    -1,    -1,    56,    57,    58,    59,    60,
+      61,    62,    -1,    64,    65,    66,    -1,    -1,    69,    70,
+      71,    -1,    73,    74,    75,    76,    77,    -1,    79,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+     131,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    12,
+      -1,   142,   143,    -1,    -1,    -1,    -1,   148,    21,    22,
+      23,    -1,    25,    -1,    -1,    -1,    -1,   158,   159,    -1,
+      -1,   162,   163,   164,   165,    -1,    39,    40,   169,    -1,
+      -1,    44,    45,    46,    47,   176,    -1,    -1,   179,    -1,
+      -1,    -1,    -1,    56,    57,    58,    59,    60,    61,    62,
+      -1,    64,    65,    66,    -1,    -1,    69,    70,    71,    -1,
+      73,    74,    75,    76,    77,    -1,    79,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   131,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    12,    -1,   142,
+     143,    -1,    -1,    -1,    -1,   148,    21,    22,    23,    -1,
+      -1,    -1,    -1,    -1,    -1,   158,   159,    -1,    -1,   162,
+     163,   164,   165,    -1,    39,    40,   169,    -1,    -1,    44,
+      45,    46,    47,   176,    -1,    -1,   179,    -1,    -1,    -1,
+      -1,    56,    57,    58,    59,    60,    61,    62,    -1,    64,
+      65,    66,    -1,    -1,    69,    70,    71,    -1,    73,    74,
+      75,    76,    77,    -1,    79,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,   131,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    12,    -1,   142,   143,    -1,
+      -1,    -1,    -1,   148,    21,    22,    23,    -1,    -1,    -1,
+      -1,    -1,    -1,   158,   159,    -1,    -1,   162,   163,   164,
+     165,    -1,    39,    40,   169,    -1,    -1,    44,    45,    46,
+      47,   176,    -1,    -1,   179,    -1,    -1,    -1,    -1,    56,
+      57,    58,    59,    60,    61,    62,    -1,    64,    65,    66,
+      -1,    -1,    69,    70,    71,    -1,    73,    74,    75,    76,
+      77,    -1,    79,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,   131,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    12,    -1,   142,   143,    -1,    -1,    -1,
+      -1,   148,    21,    22,    23,    -1,    -1,    -1,    -1,    -1,
+      -1,   158,   159,    -1,    -1,   162,   163,   164,   165,    -1,
+      39,    40,   169,    -1,    -1,    44,    45,    46,    47,   176,
+      -1,    -1,   179,    -1,    -1,    -1,    -1,    56,    57,    58,
+      59,    60,    61,    62,    -1,    64,    65,    66,    -1,    -1,
+      69,    70,    71,    -1,    73,    74,    75,    76,    77,    -1,
+      79,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,   131,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    12,    -1,   142,   143,    -1,    -1,    -1,    -1,   148,
+      21,    22,    23,    -1,    -1,    -1,    -1,    -1,    -1,   158,
+     159,    -1,    -1,   162,   163,   164,   165,    -1,    39,    40,
+     169,    -1,    -1,    44,    45,    46,    47,   176,    -1,    -1,
+     179,    -1,    -1,    -1,    -1,    56,    57,    58,    59,    60,
+      61,    62,    -1,    64,    65,    66,    -1,    -1,    69,    70,
+      71,    -1,    73,    74,    75,    76,    77,    -1,    79,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+     131,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    12,
+      -1,   142,   143,    -1,    -1,    -1,    -1,   148,    21,    22,
+      23,    -1,    -1,    -1,    -1,    -1,    -1,   158,   159,    -1,
+      -1,   162,   163,   164,   165,    -1,    39,    40,   169,    -1,
+      -1,    44,    45,    46,    47,   176,    -1,    -1,   179,    -1,
+      -1,    -1,    -1,    56,    57,    58,    59,    60,    61,    62,
+      -1,    64,    65,    66,    -1,    -1,    69,    70,    71,    -1,
+      73,    74,    75,    76,    77,    -1,    79,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   131,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    12,    -1,   142,
+     143,    -1,    -1,    -1,    -1,   148,    21,    22,    23,    -1,
+      -1,    -1,    -1,    -1,    -1,   158,   159,    -1,    -1,   162,
+     163,   164,   165,    -1,    39,    40,   169,    -1,    -1,    44,
+      45,    46,    47,   176,    -1,    -1,   179,    -1,    -1,    -1,
+      -1,    56,    57,    58,    59,    60,    61,    62,    -1,    64,
+      65,    66,    -1,    -1,    69,    70,    71,    -1,    73,    74,
+      75,    76,    77,    -1,    79,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,   131,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    12,    -1,   142,   143,    -1,
+      -1,    -1,    -1,   148,    21,    22,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,   158,   159,    -1,    -1,   162,   163,   164,
+     165,    -1,    39,    40,   169,    -1,    -1,    44,    45,    46,
+      47,   176,    -1,    -1,   179,    -1,    -1,    -1,    -1,    56,
+      57,    58,    59,    60,    61,    62,    -1,    64,    65,    66,
+      -1,    -1,    69,    70,    71,    -1,    73,    74,    75,    76,
+      77,    -1,    79,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,   131,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    12,    -1,   142,   143,    -1,    -1,    -1,
+      -1,   148,    21,    22,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,   158,   159,    -1,    -1,   162,   163,   164,   165,    -1,
+      39,    40,   169,    -1,    -1,    44,    45,    46,    47,   176,
+      -1,    -1,   179,    -1,    -1,    -1,    -1,    56,    57,    58,
+      59,    60,    61,    62,    -1,    64,    65,    66,    -1,    -1,
+      69,    70,    71,    -1,    73,    74,    75,    76,    77,    -1,
+      79,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,   131,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    12,    -1,   142,   143,    -1,    -1,    -1,    -1,   148,
+      21,    22,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   158,
+     159,    -1,    -1,   162,   163,   164,   165,    -1,    39,    40,
+     169,    -1,    -1,    44,    45,    46,    47,   176,    -1,    -1,
+     179,    -1,    -1,    -1,    -1,    56,    57,    58,    59,    60,
+      61,    62,    -1,    64,    65,    66,    -1,    -1,    69,    70,
+      71,    -1,    73,    74,    75,    76,    77,    -1,    79,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+     131,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    12,
+      -1,   142,   143,    -1,    -1,    -1,    -1,   148,    21,    22,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,   158,   159,    -1,
+      -1,   162,   163,   164,   165,    -1,    39,    40,   169,    -1,
+      -1,    44,    45,    46,    47,   176,    -1,    -1,   179,    -1,
+      -1,    -1,    -1,    56,    57,    58,    59,    60,    61,    62,
+      -1,    64,    65,    66,    -1,    -1,    69,    70,    71,    -1,
+      73,    74,    75,    76,    77,    -1,    79,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   131,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    12,    -1,   142,
+     143,    -1,    -1,    -1,    -1,   148,    21,    22,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,   158,   159,    -1,    -1,   162,
+     163,   164,   165,    -1,    39,    40,   169,    -1,    -1,    44,
+      45,    46,    47,   176,    -1,    -1,   179,    -1,    -1,    -1,
+      -1,    56,    57,    58,    59,    60,    61,    62,    -1,    64,
+      65,    66,    -1,    -1,    69,    70,    71,    -1,    73,    74,
+      75,    76,    77,    -1,    79,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,   131,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    12,    -1,   142,   143,    -1,
+      -1,    -1,    -1,   148,    21,    22,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,   158,   159,    -1,    -1,   162,   163,   164,
+     165,    -1,    39,    40,   169,    -1,    -1,    44,    45,    46,
+      47,   176,    -1,    -1,   179,    -1,    -1,    -1,    -1,    56,
+      57,    58,    59,    60,    61,    62,    -1,    64,    65,    66,
+      -1,    -1,    69,    70,    71,    -1,    73,    74,    75,    76,
+      77,    -1,    79,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,   131,    29,    -1,    -1,    32,    33,
+      34,    35,    -1,    -1,    38,   142,   143,    41,    42,    43,
+      -1,   148,    -1,    -1,    48,    49,    -1,    -1,    -1,    -1,
+      -1,   158,   159,    -1,    -1,   162,   163,   164,   165,    63,
+      -1,    -1,   169,    67,    68,    -1,    -1,    -1,    72,   176,
+      -1,    -1,   179,    -1,    78,    -1,    80,    81,    -1,    83,
+      -1,    85,    86,    87,    88,    89,    -1,    91,    92,    93,
+      94,    95,    96,    97,    98,    99,   100,   101,   102,   103,
+     104,   105,   106,    -1,    -1,   109,   110,   111,    -1,   113,
+     114,   115,    -1,   117,   118,   119,    -1,    -1,   122,    -1,
+     124,    -1,    -1,   127,   128,   129,   130,    -1,    -1,   133,
+     134,   135,    -1,    -1,    -1,    -1,    -1,   141,    -1,    -1,
+      -1,   145,   146,   147,   148,   149,   150,   151,    -1,   153,
+     154,   155,   156,   157,    -1,    -1,   160,    -1,    -1,    -1,
+      -1,    39,    40,   167,   168,   169,    44,    45,    46,    47,
+      -1,    -1,   176,    -1,    -1,    -1,    -1,    -1,    56,    57,
+      58,    59,    60,    61,    62,    -1,    64,    65,    66,    -1,
+      -1,    69,    70,    71,    -1,    73,    74,    75,    76,    77,
+      -1,    79,    39,    40,    -1,    -1,    -1,    44,    45,    46,
+      47,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    56,
+      57,    58,    59,    60,    61,    62,    -1,    64,    65,    66,
+      -1,    -1,    69,    70,    71,    -1,    73,    74,    75,    76,
+      77,    -1,    79,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,   142,   143,    -1,    -1,    -1,    -1,
+     148,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+     158,   159,    -1,    -1,   162,   163,   164,   165,    -1,    -1,
+      38,   169,    -1,    -1,    -1,    -1,    -1,    -1,   176,    -1,
+      -1,   179,    -1,    -1,    -1,   142,   143,    -1,    -1,    -1,
+      -1,   148,    -1,    -1,    -1,    63,    -1,    -1,    -1,    -1,
+      -1,   158,   159,    -1,    -1,   162,   163,   164,   165,    -1,
+      78,    -1,   169,    -1,    -1,    83,    84,    -1,    -1,   176,
+      88,    89,   179,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      98,    99,   100,   101,   102,   103,   104,   105,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+     118,    -1,    -1,    -1,    -1,    -1,   124,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,   133,    -1,   135,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,   169,    -1,    -1,    -1,    -1,    -1,    -1,   176
+};
+
+/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
+   symbol of state STATE-NUM.  */
+static const yytype_uint16 yystos[] =
+{
+       0,   191,     0,     1,    36,    37,    53,    54,   144,   177,
+     187,   192,   197,   199,   205,   201,   198,   177,   200,    29,
+      32,    34,    35,    38,    41,    42,    43,    48,    49,    63,
+      67,    68,    72,    78,    80,    81,    83,    85,    86,    87,
+      88,    89,    91,    92,    93,    94,    95,    96,    97,    98,
+      99,   100,   101,   102,   103,   104,   105,   106,   109,   110,
+     111,   113,   114,   115,   117,   118,   119,   122,   124,   127,
+     128,   129,   130,   133,   134,   135,   141,   145,   146,   147,
+     148,   149,   150,   151,   153,   154,   155,   156,   157,   160,
+     167,   168,   169,   176,   193,   194,   195,   202,   203,   206,
+     212,   224,   225,   228,   229,   234,   235,   237,   238,   239,
+     240,   241,   243,   244,   251,   253,   257,   258,   261,   262,
+     263,   298,   308,   309,   315,   316,   317,   318,   319,   321,
+     326,   327,   328,   330,   331,   333,   336,   337,   340,   341,
+     349,   351,   352,   365,   372,   201,   205,   169,   204,   204,
+     179,    12,    21,    22,    39,    40,    44,    45,    46,    47,
+      56,    57,    58,    59,    60,    61,    62,    64,    65,    66,
+      69,    70,    71,    73,    74,    75,    76,    77,    79,   131,
+     142,   143,   148,   158,   159,   162,   163,   164,   165,   176,
+     179,   280,   281,   283,   284,   288,   290,   291,   292,   293,
+     298,   299,   300,   307,   320,   179,   187,   280,   304,   179,
+     217,   218,   179,   280,   303,     4,   187,   221,   187,   221,
+     304,   179,   169,   187,   324,   176,   179,   364,   280,   169,
+     325,   169,   324,   179,   169,   176,   179,   346,   179,   179,
+     221,   221,    20,    24,   247,   298,   179,   216,   123,   137,
+     127,   324,   324,   169,   252,    80,    81,   213,   275,   324,
+      27,   196,   198,    33,   196,   158,   207,   196,   169,   179,
+     249,   250,   169,   226,   231,     3,   248,   169,   230,   247,
+       3,   236,   248,     3,   248,     3,   248,   169,   245,   246,
+     247,     3,     4,    35,   222,   223,   255,   271,   169,   176,
+     268,    23,   179,   259,    23,   179,   266,    23,     4,   329,
+     169,   310,   200,   324,   324,   324,   176,   323,   280,     5,
+     126,   189,   332,     3,   179,   334,   169,   304,   179,   345,
+      21,    22,    23,    50,    51,    52,    55,   169,   179,   288,
+     299,   343,   345,   350,   353,   354,   355,   345,    84,    98,
+     105,   298,   328,   179,   208,   280,   280,   280,   282,   179,
+     179,   179,   282,   280,   282,   179,   179,   179,   179,   179,
+     179,   179,   179,   179,   179,   179,   179,   280,   179,   179,
+     179,   179,   179,   179,   280,   281,   283,   307,   360,   361,
+     362,   179,   280,   283,     5,     7,     8,     9,    10,    11,
+      13,    14,    15,    16,    17,    18,    21,    22,    23,    24,
+      25,   185,   186,   285,   280,   189,   179,   302,   179,   179,
+     169,   158,   301,   302,     3,     4,   180,   280,   219,   298,
+       3,   280,     4,   169,   242,   242,   280,   280,   180,   288,
+     292,   298,   330,   366,   367,   368,   176,   283,   298,   298,
+     367,   369,   298,   371,   242,    40,    44,    45,    46,    47,
+      56,    57,    58,    59,    60,    61,    62,    64,    65,    66,
+      69,    70,    71,    74,    75,    76,    77,    79,   169,   214,
+     215,   169,   298,   220,   280,     3,     3,   221,   194,   200,
+     204,   196,     5,   249,     3,    24,   179,   187,   248,     3,
+      24,   230,   247,   179,   276,   230,   298,   247,   169,   169,
+     247,   276,     3,   245,    29,    82,   109,   111,   112,   113,
+     116,   117,   119,   120,   272,   273,   275,     4,   204,     3,
+     256,   254,     5,    23,   269,   280,   180,   176,   179,   169,
+     260,   269,   179,   267,   280,   268,   176,   276,     3,   205,
+     248,   298,   322,   373,   280,   280,   298,   176,    23,   280,
+     335,   338,   339,    23,    25,   179,   298,   347,   348,   353,
+     354,   280,   280,   280,   280,     5,   353,   179,   281,   288,
+     299,   342,   356,   357,   358,     3,   344,    20,    23,    24,
+      25,   355,   353,   360,   179,   179,    23,   169,   180,   210,
+     211,    30,   180,     3,   180,   282,   282,   280,   180,   180,
+     180,   280,   280,   280,   280,   280,   280,   280,   280,   280,
+     280,   280,   280,   180,   282,   282,   282,   282,   282,   280,
+     283,   361,   362,     3,   132,     3,     3,   282,   180,     3,
+       5,   280,   287,   280,   280,   280,   280,   280,   280,   280,
+     280,   280,   280,   280,   280,   280,   280,     5,    24,   280,
+     286,   280,     5,   280,     5,   280,   288,   303,   289,   294,
+     294,   280,   280,   180,     3,   180,   276,   218,   180,     3,
+     180,     3,   179,     3,   370,   180,   180,   180,     3,   370,
+       3,   180,     3,    24,     3,   180,   179,   169,   324,   208,
+     280,   180,   250,   227,   232,   233,   284,   280,   169,   169,
+     231,   227,   248,     4,    23,   277,   278,   279,   280,   248,
+     276,   276,   248,   246,   276,   179,     3,     4,   208,   254,
+     169,   269,   260,     5,   269,   180,     3,   270,    23,   180,
+     276,    31,   169,   311,   312,     5,   329,   364,   180,     3,
+     353,    23,    25,   179,   280,     3,   180,   180,   280,   180,
+     356,   285,   359,   359,     3,   359,   356,   353,   353,   353,
+     353,   353,   366,   369,     3,   180,   179,   209,   304,   280,
+     180,   180,   180,   180,   180,   180,   180,   180,   180,   180,
+     180,   180,   180,   180,   180,   180,   180,   180,   180,   180,
+     180,     3,     3,     3,   280,   362,   280,   362,   280,   362,
+     180,   283,   280,   280,   280,   280,   280,     4,     4,   280,
+     295,   296,   297,   180,   180,   298,   169,    84,   280,   295,
+     125,   367,   180,   367,   180,   298,   214,   280,   220,    24,
+       3,    21,    22,    23,   188,   299,   180,    24,    24,   230,
+     280,     3,   180,     4,   298,    23,   264,   264,   245,   138,
+     139,   140,   274,   273,     4,   169,   276,   180,   269,   270,
+     169,   180,     4,   126,     3,   280,   276,   339,   180,   280,
+     297,   189,   348,   353,     3,   180,   285,   358,   370,   370,
+     211,   180,   210,   169,   363,   363,   363,   180,   303,     4,
+     280,     4,     3,   302,   276,   180,   180,     5,   180,   227,
+     232,   232,   232,   232,   227,   278,   279,   280,   179,   265,
+     280,   180,   276,   264,   270,   269,   169,   187,   313,   314,
+     169,   312,     3,   276,   180,   330,   363,   359,   180,   180,
+     180,     5,   180,   180,   180,   180,   280,     4,   280,   296,
+       3,   298,    24,    23,   264,   305,   306,   126,     3,   280,
+     180,   280,   280,     4,   280,   180,   305,     5,   169,   314,
+       3,     3,   280,   280,   280,   280,     3,   280
+};
+
+#define yyerrok		(yyerrstatus = 0)
+#define yyclearin	(yychar = YYEMPTY)
+#define YYEMPTY		(-2)
+#define YYEOF		0
+
+#define YYACCEPT	goto yyacceptlab
+#define YYABORT		goto yyabortlab
+#define YYERROR		goto yyerrorlab
+
+
+/* Like YYERROR except do call yyerror.  This remains here temporarily
+   to ease the transition to the new meaning of YYERROR, for GCC.
+   Once GCC version 2 has supplanted version 1, this can go.  */
+
+#define YYFAIL		goto yyerrlab
+
+#define YYRECOVERING()  (!!yyerrstatus)
+
+#define YYBACKUP(Token, Value)					\
+do								\
+  if (yychar == YYEMPTY && yylen == 1)				\
+    {								\
+      yychar = (Token);						\
+      yylval = (Value);						\
+      yytoken = YYTRANSLATE (yychar);				\
+      YYPOPSTACK (1);						\
+      goto yybackup;						\
+    }								\
+  else								\
+    {								\
+      yyerror (YY_("syntax error: cannot back up")); \
+      YYERROR;							\
+    }								\
+while (YYID (0))
+
+
+#define YYTERROR	1
+#define YYERRCODE	256
+
+
+/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
+   If N is 0, then set CURRENT to the empty location which ends
+   the previous symbol: RHS[0] (always defined).  */
+
+#define YYRHSLOC(Rhs, K) ((Rhs)[K])
+#ifndef YYLLOC_DEFAULT
+# define YYLLOC_DEFAULT(Current, Rhs, N)				\
+    do									\
+      if (YYID (N))                                                    \
+	{								\
+	  (Current).first_line   = YYRHSLOC (Rhs, 1).first_line;	\
+	  (Current).first_column = YYRHSLOC (Rhs, 1).first_column;	\
+	  (Current).last_line    = YYRHSLOC (Rhs, N).last_line;		\
+	  (Current).last_column  = YYRHSLOC (Rhs, N).last_column;	\
+	}								\
+      else								\
+	{								\
+	  (Current).first_line   = (Current).last_line   =		\
+	    YYRHSLOC (Rhs, 0).last_line;				\
+	  (Current).first_column = (Current).last_column =		\
+	    YYRHSLOC (Rhs, 0).last_column;				\
+	}								\
+    while (YYID (0))
+#endif
+
+
+/* YY_LOCATION_PRINT -- Print the location on the stream.
+   This macro was not mandated originally: define only if we know
+   we won't break user code: when these are the locations we know.  */
+
+#ifndef YY_LOCATION_PRINT
+# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
+#  define YY_LOCATION_PRINT(File, Loc)			\
+     fprintf (File, "%d.%d-%d.%d",			\
+	      (Loc).first_line, (Loc).first_column,	\
+	      (Loc).last_line,  (Loc).last_column)
+# else
+#  define YY_LOCATION_PRINT(File, Loc) ((void) 0)
+# endif
+#endif
+
+
+/* YYLEX -- calling `yylex' with the right arguments.  */
+
+#ifdef YYLEX_PARAM
+# define YYLEX yylex (YYLEX_PARAM)
+#else
+# define YYLEX yylex ()
+#endif
+
+/* Enable debugging if requested.  */
+#if YYDEBUG
+
+# ifndef YYFPRINTF
+#  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
+#  define YYFPRINTF fprintf
+# endif
+
+# define YYDPRINTF(Args)			\
+do {						\
+  if (yydebug)					\
+    YYFPRINTF Args;				\
+} while (YYID (0))
+
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location)			  \
+do {									  \
+  if (yydebug)								  \
+    {									  \
+      YYFPRINTF (stderr, "%s ", Title);					  \
+      yy_symbol_print (stderr,						  \
+		  Type, Value); \
+      YYFPRINTF (stderr, "\n");						  \
+    }									  \
+} while (YYID (0))
+
+
+/*--------------------------------.
+| Print this symbol on YYOUTPUT.  |
+`--------------------------------*/
+
+/*ARGSUSED*/
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+static void
+yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
+#else
+static void
+yy_symbol_value_print (yyoutput, yytype, yyvaluep)
+    FILE *yyoutput;
+    int yytype;
+    YYSTYPE const * const yyvaluep;
+#endif
+{
+  if (!yyvaluep)
+    return;
+# ifdef YYPRINT
+  if (yytype < YYNTOKENS)
+    YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
+# else
+  YYUSE (yyoutput);
+# endif
+  switch (yytype)
+    {
+      default:
+	break;
+    }
+}
+
+
+/*--------------------------------.
+| Print this symbol on YYOUTPUT.  |
+`--------------------------------*/
+
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+static void
+yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
+#else
+static void
+yy_symbol_print (yyoutput, yytype, yyvaluep)
+    FILE *yyoutput;
+    int yytype;
+    YYSTYPE const * const yyvaluep;
+#endif
+{
+  if (yytype < YYNTOKENS)
+    YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
+  else
+    YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
+
+  yy_symbol_value_print (yyoutput, yytype, yyvaluep);
+  YYFPRINTF (yyoutput, ")");
+}
+
+/*------------------------------------------------------------------.
+| yy_stack_print -- Print the state stack from its BOTTOM up to its |
+| TOP (included).                                                   |
+`------------------------------------------------------------------*/
+
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+static void
+yy_stack_print (yytype_int16 *bottom, yytype_int16 *top)
+#else
+static void
+yy_stack_print (bottom, top)
+    yytype_int16 *bottom;
+    yytype_int16 *top;
+#endif
+{
+  YYFPRINTF (stderr, "Stack now");
+  for (; bottom <= top; ++bottom)
+    YYFPRINTF (stderr, " %d", *bottom);
+  YYFPRINTF (stderr, "\n");
+}
+
+# define YY_STACK_PRINT(Bottom, Top)				\
+do {								\
+  if (yydebug)							\
+    yy_stack_print ((Bottom), (Top));				\
+} while (YYID (0))
+
+
+/*------------------------------------------------.
+| Report that the YYRULE is going to be reduced.  |
+`------------------------------------------------*/
+
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+static void
+yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
+#else
+static void
+yy_reduce_print (yyvsp, yyrule)
+    YYSTYPE *yyvsp;
+    int yyrule;
+#endif
+{
+  int yynrhs = yyr2[yyrule];
+  int yyi;
+  unsigned long int yylno = yyrline[yyrule];
+  YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
+	     yyrule - 1, yylno);
+  /* The symbols being reduced.  */
+  for (yyi = 0; yyi < yynrhs; yyi++)
+    {
+      fprintf (stderr, "   $%d = ", yyi + 1);
+      yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
+		       &(yyvsp[(yyi + 1) - (yynrhs)])
+		       		       );
+      fprintf (stderr, "\n");
+    }
+}
+
+# define YY_REDUCE_PRINT(Rule)		\
+do {					\
+  if (yydebug)				\
+    yy_reduce_print (yyvsp, Rule); \
+} while (YYID (0))
+
+/* Nonzero means print parse trace.  It is left uninitialized so that
+   multiple parsers can coexist.  */
+int yydebug;
+#else /* !YYDEBUG */
+# define YYDPRINTF(Args)
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
+# define YY_STACK_PRINT(Bottom, Top)
+# define YY_REDUCE_PRINT(Rule)
+#endif /* !YYDEBUG */
+
+
+/* YYINITDEPTH -- initial size of the parser's stacks.  */
+#ifndef	YYINITDEPTH
+# define YYINITDEPTH 200
+#endif
+
+/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
+   if the built-in stack extension method is used).
+
+   Do not make this value too large; the results are undefined if
+   YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
+   evaluated with infinite-precision integer arithmetic.  */
+
+#ifndef YYMAXDEPTH
+# define YYMAXDEPTH 10000
+#endif
+
+
+
+
+#if YYERROR_VERBOSE
+
+# ifndef yystrlen
+#  if defined __GLIBC__ && defined _STRING_H
+#   define yystrlen strlen
+#  else
+/* Return the length of YYSTR.  */
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+static YYSIZE_T
+yystrlen (const char *yystr)
+#else
+static YYSIZE_T
+yystrlen (yystr)
+    const char *yystr;
+#endif
+{
+  YYSIZE_T yylen;
+  for (yylen = 0; yystr[yylen]; yylen++)
+    continue;
+  return yylen;
+}
+#  endif
+# endif
+
+# ifndef yystpcpy
+#  if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
+#   define yystpcpy stpcpy
+#  else
+/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
+   YYDEST.  */
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+static char *
+yystpcpy (char *yydest, const char *yysrc)
+#else
+static char *
+yystpcpy (yydest, yysrc)
+    char *yydest;
+    const char *yysrc;
+#endif
+{
+  char *yyd = yydest;
+  const char *yys = yysrc;
+
+  while ((*yyd++ = *yys++) != '\0')
+    continue;
+
+  return yyd - 1;
+}
+#  endif
+# endif
+
+# ifndef yytnamerr
+/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
+   quotes and backslashes, so that it's suitable for yyerror.  The
+   heuristic is that double-quoting is unnecessary unless the string
+   contains an apostrophe, a comma, or backslash (other than
+   backslash-backslash).  YYSTR is taken from yytname.  If YYRES is
+   null, do not copy; instead, return the length of what the result
+   would have been.  */
+static YYSIZE_T
+yytnamerr (char *yyres, const char *yystr)
+{
+  if (*yystr == '"')
+    {
+      YYSIZE_T yyn = 0;
+      char const *yyp = yystr;
+
+      for (;;)
+	switch (*++yyp)
+	  {
+	  case '\'':
+	  case ',':
+	    goto do_not_strip_quotes;
+
+	  case '\\':
+	    if (*++yyp != '\\')
+	      goto do_not_strip_quotes;
+	    /* Fall through.  */
+	  default:
+	    if (yyres)
+	      yyres[yyn] = *yyp;
+	    yyn++;
+	    break;
+
+	  case '"':
+	    if (yyres)
+	      yyres[yyn] = '\0';
+	    return yyn;
+	  }
+    do_not_strip_quotes: ;
+    }
+
+  if (! yyres)
+    return yystrlen (yystr);
+
+  return yystpcpy (yyres, yystr) - yyres;
+}
+# endif
+
+/* Copy into YYRESULT an error message about the unexpected token
+   YYCHAR while in state YYSTATE.  Return the number of bytes copied,
+   including the terminating null byte.  If YYRESULT is null, do not
+   copy anything; just return the number of bytes that would be
+   copied.  As a special case, return 0 if an ordinary "syntax error"
+   message will do.  Return YYSIZE_MAXIMUM if overflow occurs during
+   size calculation.  */
+static YYSIZE_T
+yysyntax_error (char *yyresult, int yystate, int yychar)
+{
+  int yyn = yypact[yystate];
+
+  if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
+    return 0;
+  else
+    {
+      int yytype = YYTRANSLATE (yychar);
+      YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
+      YYSIZE_T yysize = yysize0;
+      YYSIZE_T yysize1;
+      int yysize_overflow = 0;
+      enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
+      char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
+      int yyx;
+
+# if 0
+      /* This is so xgettext sees the translatable formats that are
+	 constructed on the fly.  */
+      YY_("syntax error, unexpected %s");
+      YY_("syntax error, unexpected %s, expecting %s");
+      YY_("syntax error, unexpected %s, expecting %s or %s");
+      YY_("syntax error, unexpected %s, expecting %s or %s or %s");
+      YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
+# endif
+      char *yyfmt;
+      char const *yyf;
+      static char const yyunexpected[] = "syntax error, unexpected %s";
+      static char const yyexpecting[] = ", expecting %s";
+      static char const yyor[] = " or %s";
+      char yyformat[sizeof yyunexpected
+		    + sizeof yyexpecting - 1
+		    + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
+		       * (sizeof yyor - 1))];
+      char const *yyprefix = yyexpecting;
+
+      /* Start YYX at -YYN if negative to avoid negative indexes in
+	 YYCHECK.  */
+      int yyxbegin = yyn < 0 ? -yyn : 0;
+
+      /* Stay within bounds of both yycheck and yytname.  */
+      int yychecklim = YYLAST - yyn + 1;
+      int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
+      int yycount = 1;
+
+      yyarg[0] = yytname[yytype];
+      yyfmt = yystpcpy (yyformat, yyunexpected);
+
+      for (yyx = yyxbegin; yyx < yyxend; ++yyx)
+	if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
+	  {
+	    if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
+	      {
+		yycount = 1;
+		yysize = yysize0;
+		yyformat[sizeof yyunexpected - 1] = '\0';
+		break;
+	      }
+	    yyarg[yycount++] = yytname[yyx];
+	    yysize1 = yysize + yytnamerr (0, yytname[yyx]);
+	    yysize_overflow |= (yysize1 < yysize);
+	    yysize = yysize1;
+	    yyfmt = yystpcpy (yyfmt, yyprefix);
+	    yyprefix = yyor;
+	  }
+
+      yyf = YY_(yyformat);
+      yysize1 = yysize + yystrlen (yyf);
+      yysize_overflow |= (yysize1 < yysize);
+      yysize = yysize1;
+
+      if (yysize_overflow)
+	return YYSIZE_MAXIMUM;
+
+      if (yyresult)
+	{
+	  /* Avoid sprintf, as that infringes on the user's name space.
+	     Don't have undefined behavior even if the translation
+	     produced a string with the wrong number of "%s"s.  */
+	  char *yyp = yyresult;
+	  int yyi = 0;
+	  while ((*yyp = *yyf) != '\0')
+	    {
+	      if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
+		{
+		  yyp += yytnamerr (yyp, yyarg[yyi++]);
+		  yyf += 2;
+		}
+	      else
+		{
+		  yyp++;
+		  yyf++;
+		}
+	    }
+	}
+      return yysize;
+    }
+}
+#endif /* YYERROR_VERBOSE */
+
+
+
+/*-----------------------------------------------.
+| Release the memory associated to this symbol.  |
+`-----------------------------------------------*/
+
+/*ARGSUSED*/
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+static void
+yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
+#else
+static void
+yydestruct (yymsg, yytype, yyvaluep)
+    const char *yymsg;
+    int yytype;
+    YYSTYPE *yyvaluep;
+#endif
+{
+  YYUSE (yyvaluep);
+
+  if (!yymsg)
+    yymsg = "Deleting";
+  YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
+
+  switch (yytype)
+    {
+
+      default:
+	break;
+    }
+}
+
+
+
+/* Prevent warnings from -Wmissing-prototypes.  */
+
+#ifdef YYPARSE_PARAM
+#if defined __STDC__ || defined __cplusplus
+int yyparse (void *YYPARSE_PARAM);
+#else
+int yyparse ();
+#endif
+#else /* ! YYPARSE_PARAM */
+#if defined __STDC__ || defined __cplusplus
+int yyparse (void);
+#else
+int yyparse ();
+#endif
+#endif /* ! YYPARSE_PARAM */
+
+
+
+/* The look-ahead symbol.  */
+int yychar;
+
+/* The semantic value of the look-ahead symbol.  */
+YYSTYPE yylval;
+
+/* Number of syntax errors so far.  */
+int yynerrs;
+
+
+
+/*----------.
+| yyparse.  |
+`----------*/
+
+#ifdef YYPARSE_PARAM
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+int
+yyparse (void *YYPARSE_PARAM)
+#else
+int
+yyparse (YYPARSE_PARAM)
+    void *YYPARSE_PARAM;
+#endif
+#else /* ! YYPARSE_PARAM */
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+int
+yyparse (void)
+#else
+int
+yyparse ()
+
+#endif
+#endif
+{
+  
+  int yystate;
+  int yyn;
+  int yyresult;
+  /* Number of tokens to shift before error messages enabled.  */
+  int yyerrstatus;
+  /* Look-ahead token as an internal (translated) token number.  */
+  int yytoken = 0;
+#if YYERROR_VERBOSE
+  /* Buffer for error messages, and its allocated size.  */
+  char yymsgbuf[128];
+  char *yymsg = yymsgbuf;
+  YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
+#endif
+
+  /* Three stacks and their tools:
+     `yyss': related to states,
+     `yyvs': related to semantic values,
+     `yyls': related to locations.
+
+     Refer to the stacks thru separate pointers, to allow yyoverflow
+     to reallocate them elsewhere.  */
+
+  /* The state stack.  */
+  yytype_int16 yyssa[YYINITDEPTH];
+  yytype_int16 *yyss = yyssa;
+  yytype_int16 *yyssp;
+
+  /* The semantic value stack.  */
+  YYSTYPE yyvsa[YYINITDEPTH];
+  YYSTYPE *yyvs = yyvsa;
+  YYSTYPE *yyvsp;
+
+
+
+#define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N))
+
+  YYSIZE_T yystacksize = YYINITDEPTH;
+
+  /* The variables used to return semantic value and location from the
+     action routines.  */
+  YYSTYPE yyval;
+
+
+  /* The number of symbols on the RHS of the reduced rule.
+     Keep to zero when no symbol should be popped.  */
+  int yylen = 0;
+
+  YYDPRINTF ((stderr, "Starting parse\n"));
+
+  yystate = 0;
+  yyerrstatus = 0;
+  yynerrs = 0;
+  yychar = YYEMPTY;		/* Cause a token to be read.  */
+
+  /* Initialize stack pointers.
+     Waste one element of value and location stack
+     so that they stay on the same level as the state stack.
+     The wasted elements are never initialized.  */
+
+  yyssp = yyss;
+  yyvsp = yyvs;
+
+  goto yysetstate;
+
+/*------------------------------------------------------------.
+| yynewstate -- Push a new state, which is found in yystate.  |
+`------------------------------------------------------------*/
+ yynewstate:
+  /* In all cases, when you get here, the value and location stacks
+     have just been pushed.  So pushing a state here evens the stacks.  */
+  yyssp++;
+
+ yysetstate:
+  *yyssp = yystate;
+
+  if (yyss + yystacksize - 1 <= yyssp)
+    {
+      /* Get the current used size of the three stacks, in elements.  */
+      YYSIZE_T yysize = yyssp - yyss + 1;
+
+#ifdef yyoverflow
+      {
+	/* Give user a chance to reallocate the stack.  Use copies of
+	   these so that the &'s don't force the real ones into
+	   memory.  */
+	YYSTYPE *yyvs1 = yyvs;
+	yytype_int16 *yyss1 = yyss;
+
+
+	/* Each stack pointer address is followed by the size of the
+	   data in use in that stack, in bytes.  This used to be a
+	   conditional around just the two extra args, but that might
+	   be undefined if yyoverflow is a macro.  */
+	yyoverflow (YY_("memory exhausted"),
+		    &yyss1, yysize * sizeof (*yyssp),
+		    &yyvs1, yysize * sizeof (*yyvsp),
+
+		    &yystacksize);
+
+	yyss = yyss1;
+	yyvs = yyvs1;
+      }
+#else /* no yyoverflow */
+# ifndef YYSTACK_RELOCATE
+      goto yyexhaustedlab;
+# else
+      /* Extend the stack our own way.  */
+      if (YYMAXDEPTH <= yystacksize)
+	goto yyexhaustedlab;
+      yystacksize *= 2;
+      if (YYMAXDEPTH < yystacksize)
+	yystacksize = YYMAXDEPTH;
+
+      {
+	yytype_int16 *yyss1 = yyss;
+	union yyalloc *yyptr =
+	  (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
+	if (! yyptr)
+	  goto yyexhaustedlab;
+	YYSTACK_RELOCATE (yyss);
+	YYSTACK_RELOCATE (yyvs);
+
+#  undef YYSTACK_RELOCATE
+	if (yyss1 != yyssa)
+	  YYSTACK_FREE (yyss1);
+      }
+# endif
+#endif /* no yyoverflow */
+
+      yyssp = yyss + yysize - 1;
+      yyvsp = yyvs + yysize - 1;
+
+
+      YYDPRINTF ((stderr, "Stack size increased to %lu\n",
+		  (unsigned long int) yystacksize));
+
+      if (yyss + yystacksize - 1 <= yyssp)
+	YYABORT;
+    }
+
+  YYDPRINTF ((stderr, "Entering state %d\n", yystate));
+
+  goto yybackup;
+
+/*-----------.
+| yybackup.  |
+`-----------*/
+yybackup:
+
+  /* Do appropriate processing given the current state.  Read a
+     look-ahead token if we need one and don't already have one.  */
+
+  /* First try to decide what to do without reference to look-ahead token.  */
+  yyn = yypact[yystate];
+  if (yyn == YYPACT_NINF)
+    goto yydefault;
+
+  /* Not known => get a look-ahead token if don't already have one.  */
+
+  /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol.  */
+  if (yychar == YYEMPTY)
+    {
+      YYDPRINTF ((stderr, "Reading a token: "));
+      yychar = YYLEX;
+    }
+
+  if (yychar <= YYEOF)
+    {
+      yychar = yytoken = YYEOF;
+      YYDPRINTF ((stderr, "Now at end of input.\n"));
+    }
+  else
+    {
+      yytoken = YYTRANSLATE (yychar);
+      YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
+    }
+
+  /* If the proper action on seeing token YYTOKEN is to reduce or to
+     detect an error, take that action.  */
+  yyn += yytoken;
+  if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
+    goto yydefault;
+  yyn = yytable[yyn];
+  if (yyn <= 0)
+    {
+      if (yyn == 0 || yyn == YYTABLE_NINF)
+	goto yyerrlab;
+      yyn = -yyn;
+      goto yyreduce;
+    }
+
+  if (yyn == YYFINAL)
+    YYACCEPT;
+
+  /* Count tokens shifted since error; after three, turn off error
+     status.  */
+  if (yyerrstatus)
+    yyerrstatus--;
+
+  /* Shift the look-ahead token.  */
+  YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
+
+  /* Discard the shifted token unless it is eof.  */
+  if (yychar != YYEOF)
+    yychar = YYEMPTY;
+
+  yystate = yyn;
+  *++yyvsp = yylval;
+
+  goto yynewstate;
+
+
+/*-----------------------------------------------------------.
+| yydefault -- do the default action for the current state.  |
+`-----------------------------------------------------------*/
+yydefault:
+  yyn = yydefact[yystate];
+  if (yyn == 0)
+    goto yyerrlab;
+  goto yyreduce;
+
+
+/*-----------------------------.
+| yyreduce -- Do a reduction.  |
+`-----------------------------*/
+yyreduce:
+  /* yyn is the number of a rule to reduce with.  */
+  yylen = yyr2[yyn];
+
+  /* If YYLEN is nonzero, implement the default value of the action:
+     `$$ = $1'.
+
+     Otherwise, the following line sets YYVAL to garbage.
+     This behavior is undocumented and Bison
+     users should not rely upon it.  Assigning to YYVAL
+     unconditionally makes the parser a bit smaller, and it avoids a
+     GCC warning that YYVAL may be used uninitialized.  */
+  yyval = yyvsp[1-yylen];
+
+
+  YY_REDUCE_PRINT (yyn);
+  switch (yyn)
+    {
+        case 8:
+#line 344 "fortran.y"
+    {yyerrok;yyclearin;;}
+    break;
+
+  case 13:
+#line 352 "fortran.y"
+    {
+                     if (inmoduledeclare == 0 )
+                     {
+                        pos_end = setposcur();
+                        RemoveWordSET_0(fortranout,pos_curinclude,
+                                              pos_end-pos_curinclude);
+                     }
+                  ;}
+    break;
+
+  case 18:
+#line 368 "fortran.y"
+    {
+            /* we should ignore the declaration until the keyword             */
+            /*    TOK_ENDDONOTTREAT                                           */
+            couldaddvariable = 0 ;
+            RemoveWordCUR_0(fortranout,-20,20);
+         ;}
+    break;
+
+  case 19:
+#line 375 "fortran.y"
+    {
+             couldaddvariable = 1 ;
+             RemoveWordCUR_0(fortranout,-24,24);
+          ;}
+    break;
+
+  case 22:
+#line 382 "fortran.y"
+    {pos_cur = setposcur();;}
+    break;
+
+  case 27:
+#line 394 "fortran.y"
+    {if (incom !=1) {strcpy(curbuf,"");incom=0;};}
+    break;
+
+  case 28:
+#line 397 "fortran.y"
+    {isrecursive = 0;;}
+    break;
+
+  case 29:
+#line 399 "fortran.y"
+    {isrecursive = 1;;}
+    break;
+
+  case 31:
+#line 403 "fortran.y"
+    {
+                      if ( couldaddvariable == 1)
+                      {
+                      /* open param file                                      */
+                      if ( firstpass == 0 )
+                      {
+                         sprintf(ligne,"%s/ParamFile%s.h",nomdir,(yyvsp[(3) - (4)].nac));
+                         paramout=fopen(ligne,"w");
+                         if ( retour77 == 0 ) fprintf(paramout,"!\n");
+                         else fprintf(paramout,"C\n");
+
+                      }
+                      Add_SubroutineArgument_Var_1((yyvsp[(4) - (4)].l));
+                      if ( inmodulemeet == 1 )
+                      {
+                         insubroutinedeclare = 1;
+                         /* in the second step we should write the head of    */
+                         /*    the subroutine sub_loop_<subroutinename>       */
+                         writeheadnewsub_0(1);
+                      }
+                      else
+                      {
+                            insubroutinedeclare = 1;
+                            writeheadnewsub_0(1);
+                      }
+                      }
+                   ;}
+    break;
+
+  case 32:
+#line 431 "fortran.y"
+    {
+                      /* open param file                                      */
+                      if ( firstpass == 0 )
+                      {
+                         sprintf(ligne,"%s/ParamFile%s.h",nomdir,(yyvsp[(2) - (2)].nac));
+                         paramout=fopen(ligne,"w");
+                         if ( retour77 == 0 ) fprintf(paramout,"!\n");
+                         else fprintf(paramout,"C\n");
+
+                      }
+                      strcpy(subroutinename,(yyvsp[(2) - (2)].nac));
+                      /* Common case                                          */
+                      insubroutinedeclare = 1;
+                      /* in the second step we should write the head of       */
+                      /*    the subroutine sub_loop_<subroutinename>          */
+                      writeheadnewsub_0(1);
+                   ;}
+    break;
+
+  case 33:
+#line 449 "fortran.y"
+    {
+                      /* open param file                                      */
+                      if ( firstpass == 0 )
+                      {
+                         sprintf(ligne,"%s/ParamFile%s.h",nomdir,(yyvsp[(2) - (5)].nac));
+                         paramout=fopen(ligne,"w");
+                         if ( retour77 == 0 ) fprintf(paramout,"!\n");
+                         else fprintf(paramout,"C\n");
+                      }
+                      strcpy(subroutinename,(yyvsp[(2) - (5)].nac));
+                      if ( inmodulemeet == 1 )
+                      {
+                         insubroutinedeclare = 1;
+                         /* we should to list of the subroutine argument the  */
+                         /*    name of the function which has to be defined   */
+                         Add_SubroutineArgument_Var_1((yyvsp[(3) - (5)].l));
+                         strcpy(DeclType,"");
+                         /* in the second step we should write the head of    */
+                         /*    the subroutine sub_loop_<subroutinename>       */
+                         writeheadnewsub_0(2);
+                      }
+                      else
+                      {
+                            insubroutinedeclare = 1;
+                            /* we should to list of the subroutine argument   */
+                            /* name of the function which has to be defined   */
+                            Add_SubroutineArgument_Var_1((yyvsp[(3) - (5)].l));
+                            strcpy(DeclType,"");
+                            Add_FunctionType_Var_1((yyvsp[(2) - (5)].nac));
+                            writeheadnewsub_0(2);
+                      }
+                   ;}
+    break;
+
+  case 34:
+#line 482 "fortran.y"
+    {
+                      /* open param file                                      */
+                      if ( firstpass == 0 )
+                      {
+                         sprintf(ligne,"%s/ParamFile%s.h",nomdir,(yyvsp[(2) - (3)].nac));
+                         paramout=fopen(ligne,"w");
+                         if ( retour77 == 0 ) fprintf(paramout,"!\n");
+                         else fprintf(paramout,"C\n");
+                      }
+                      strcpy(subroutinename,(yyvsp[(2) - (3)].nac));
+                      if ( inmodulemeet == 1 )
+                      {
+                         insubroutinedeclare = 1;
+                         /* we should to list of the subroutine argument the  */
+                         /*    name of the function which has to be defined   */
+                         Add_SubroutineArgument_Var_1((yyvsp[(3) - (3)].l));
+                         strcpy(DeclType,"");
+                         Add_FunctionType_Var_1((yyvsp[(2) - (3)].nac));
+                         /* in the second step we should write the head of    */
+                         /*    the subroutine sub_loop_<subroutinename>       */
+                         writeheadnewsub_0(2);
+                      }
+                      else
+                      {
+                            insubroutinedeclare = 1;
+                            /* we should to list of the subroutine argument   */
+                            /* name of the function which has to be defined   */
+                            Add_SubroutineArgument_Var_1((yyvsp[(3) - (3)].l));
+                            strcpy(DeclType,"");
+                            Add_FunctionType_Var_1((yyvsp[(2) - (3)].nac));
+                            writeheadnewsub_0(2);
+                      }
+                   ;}
+    break;
+
+  case 35:
+#line 516 "fortran.y"
+    {
+                      GlobalDeclaration = 0;
+                      strcpy(curmodulename,(yyvsp[(2) - (2)].nac));
+                      strcpy(subroutinename,"");
+                      Add_NameOfModule_1((yyvsp[(2) - (2)].nac));
+                      if ( inmoduledeclare == 0 )
+                      {
+                         /* To know if there are in the module declaration    */
+                         inmoduledeclare = 1;
+                         /* to know if a module has been met                  */
+                         inmodulemeet = 1;
+                         /* to know if we are after the keyword contains      */
+                         aftercontainsdeclare = 0 ;
+                      }
+                   ;}
+    break;
+
+  case 36:
+#line 533 "fortran.y"
+    {
+                      if ( couldaddvariable == 1 )
+                      {
+                         strcpy((yyval.nac),(yyvsp[(1) - (1)].nac));strcpy(subroutinename,(yyvsp[(1) - (1)].nac));
+                      }
+                   ;}
+    break;
+
+  case 38:
+#line 542 "fortran.y"
+    {
+                      pos_curinclude = setposcur()-9;
+                   ;}
+    break;
+
+  case 39:
+#line 546 "fortran.y"
+    {
+                      if ( couldaddvariable == 1 ) Add_Include_1((yyvsp[(1) - (1)].nac));
+                   ;}
+    break;
+
+  case 40:
+#line 550 "fortran.y"
+    {
+                      if ( firstpass == 1 && couldaddvariable == 1) (yyval.l)=NULL;
+                   ;}
+    break;
+
+  case 41:
+#line 553 "fortran.y"
+    {
+                      if ( firstpass == 1 && couldaddvariable == 1 ) (yyval.l)=NULL;
+                   ;}
+    break;
+
+  case 42:
+#line 557 "fortran.y"
+    {
+                       if ( firstpass == 1 && couldaddvariable == 1 ) (yyval.l)=(yyvsp[(2) - (3)].l);
+                   ;}
+    break;
+
+  case 45:
+#line 564 "fortran.y"
+    {
+                      if ( couldaddvariable == 1 )
+                      {
+                         Add_SubroutineArgument_Var_1((yyvsp[(2) - (3)].l));
+                      }
+                   ;}
+    break;
+
+  case 46:
+#line 571 "fortran.y"
+    {
+                      if ( firstpass == 1  && couldaddvariable == 1)
+                      {
+                         strcpy(nameinttypenameback,nameinttypename);
+                         strcpy(nameinttypename,"");
+                         curvar=createvar((yyvsp[(1) - (1)].na),NULL);
+                        strcpy(nameinttypename,nameinttypenameback);
+                         curlistvar=insertvar(NULL,curvar);
+                         (yyval.l)=settype("",curlistvar);
+                      }
+                   ;}
+    break;
+
+  case 47:
+#line 583 "fortran.y"
+    {
+                      if ( firstpass == 1  && couldaddvariable == 1)
+                      {
+                         strcpy(nameinttypenameback,nameinttypename);
+                         strcpy(nameinttypename,"");                      
+                         curvar=createvar((yyvsp[(3) - (3)].na),NULL);
+                         strcpy(nameinttypename,nameinttypenameback);                         
+                         (yyval.l)=insertvar((yyvsp[(1) - (3)].l),curvar);
+                      }
+                   ;}
+    break;
+
+  case 48:
+#line 594 "fortran.y"
+    {if ( couldaddvariable == 1 ) strcpy((yyval.na),(yyvsp[(1) - (1)].nac));;}
+    break;
+
+  case 49:
+#line 595 "fortran.y"
+    {if ( couldaddvariable == 1 ) strcpy((yyval.na),"*");;}
+    break;
+
+  case 50:
+#line 598 "fortran.y"
+    {
+                      if ( VarTypepar == 1 )
+                      {
+                         couldaddvariable = 1 ;
+                         VarTypepar = 0;
+                      }
+                   ;}
+    break;
+
+  case 51:
+#line 606 "fortran.y"
+    {
+                      if ( couldaddvariable == 1 )
+                      {
+                         VarType = 1;
+                         couldaddvariable = 0 ;
+                      }
+                   ;}
+    break;
+
+  case 52:
+#line 614 "fortran.y"
+    {
+                      if ( VarType == 1 ) couldaddvariable = 1 ;
+                      VarType = 0;
+                      VarTypepar = 0;
+                   ;}
+    break;
+
+  case 54:
+#line 621 "fortran.y"
+    {
+                      if ( couldaddvariable == 1 )
+                      {
+                         if ( insubroutinedeclare == 0 )
+                         {
+                                                  Add_GlobalParameter_Var_1((yyvsp[(3) - (4)].l));
+                                                  }
+                         else Add_Parameter_Var_1((yyvsp[(3) - (4)].l));
+                         pos_end = setposcur();
+                        RemoveWordSET_0(fortranout,pos_cur_decl,
+                                                    pos_end-pos_cur_decl);
+                      }
+                      VariableIsParameter =  0 ;
+                   ;}
+    break;
+
+  case 55:
+#line 636 "fortran.y"
+    {
+                     if ( couldaddvariable == 1 )
+                     {
+                        if ( insubroutinedeclare == 0 )
+                                                  Add_GlobalParameter_Var_1((yyvsp[(2) - (2)].l));
+                         else Add_Parameter_Var_1((yyvsp[(2) - (2)].l));
+                         pos_end = setposcur();
+                         RemoveWordSET_0(fortranout,pos_cur_decl,
+                                                    pos_end-pos_cur_decl);
+                      }
+                      VariableIsParameter =  0 ;
+                   ;}
+    break;
+
+  case 57:
+#line 650 "fortran.y"
+    {
+                     pos_end = setposcur();
+                     RemoveWordSET_0(fortranout,pos_cursave,
+                                                pos_end-pos_cursave);
+                  ;}
+    break;
+
+  case 59:
+#line 657 "fortran.y"
+    {
+                   /* if the variable is a parameter we can suppose that is   */
+                   /*    value is the same on each grid. It is not useless to */
+                   /*    create a copy of it on each grid                     */
+                      if ( couldaddvariable == 1 )
+                      {
+                         Add_Globliste_1((yyvsp[(1) - (1)].l));
+                         /* if variableparamlists has been declared in a      */
+                         /*    subroutine                                     */
+                         if ( insubroutinedeclare == 1 )
+                         {
+                            Add_Dimension_Var_1((yyvsp[(1) - (1)].l));
+                         }
+                         pos_end = setposcur();
+                         RemoveWordSET_0(fortranout,pos_curdimension,
+                                                pos_end-pos_curdimension);
+                      }
+                      /*                                                      */
+                      PublicDeclare = 0;
+                      PrivateDeclare = 0;
+                      ExternalDeclare = 0;
+                      strcpy(NamePrecision,"");
+                      c_star = 0;
+                      InitialValueGiven = 0 ;
+                      strcpy(IntentSpec,"");
+                      VariableIsParameter =  0 ;
+                      Allocatabledeclare = 0 ;
+                      Targetdeclare = 0 ;
+                      SaveDeclare = 0;
+                      pointerdeclare = 0;
+                      optionaldeclare = 0 ;
+                      dimsgiven=0;
+                      c_selectorgiven=0;
+                      strcpy(nameinttypename,"");
+                      strcpy(c_selectorname,"");
+                   ;}
+    break;
+
+  case 60:
+#line 694 "fortran.y"
+    {
+      if (firstpass == 0)
+      {
+      if ((yyvsp[(1) - (1)].lnn))
+      {
+      removeglobfromlist(&((yyvsp[(1) - (1)].lnn)));
+      pos_end = setposcur();
+      RemoveWordSET_0(fortranout,pos_cur,pos_end-pos_cur);
+      writelistpublic((yyvsp[(1) - (1)].lnn));
+      }
+      }
+      ;}
+    break;
+
+  case 70:
+#line 716 "fortran.y"
+    {
+                      /* we should remove the data declaration                */
+                      if ( couldaddvariable == 1 && aftercontainsdeclare != 2 )
+                      {
+                        pos_end = setposcur();
+                        RemoveWordSET_0(fortranout,pos_curdata,
+                                              pos_end-pos_curdata);
+                      }
+                      if ( couldaddvariable == 1 && aftercontainsdeclare == 1 )
+                      {
+                      if (firstpass == 0)
+                      {
+                        ReWriteDataStatement_0(fortranout);
+                        pos_end = setposcur();
+                        }
+                      }
+                  ;}
+    break;
+
+  case 72:
+#line 736 "fortran.y"
+    {
+         PublicDeclare = 0 ;
+         PrivateDeclare = 0 ;
+      ;}
+    break;
+
+  case 110:
+#line 787 "fortran.y"
+    {
+                      /* if the variable is a parameter we can suppose that is*/
+                      /*    value is the same on each grid. It is not useless */
+                      /*    to create a copy of it on each grid               */
+                      if ( couldaddvariable == 1 )
+                      {
+                      pos_end = setposcur();
+                      /*if (insubroutinedeclare == 0)
+                        {   */
+                         RemoveWordSET_0(fortranout,pos_cur_decl,
+                                                 pos_end-pos_cur_decl);
+                                         
+                       /* }
+                      else
+                       {*/
+                        ReWriteDeclarationAndAddTosubroutine_01((yyvsp[(1) - (2)].l));
+                        pos_cur_decl = setposcur();
+                        
+                       /*}*/
+                      if ( firstpass == 0 &&
+                           GlobalDeclaration == 0 &&
+                           insubroutinedeclare == 0 )
+                      {
+
+                         sprintf(ligne,"\n#include \"Module_Declar_%s.h\"\n"
+                                                                ,curmodulename);
+                         tofich(fortranout,ligne,1);
+                         sprintf (ligne, "Module_Declar_%s.h",curmodulename);
+                         module_declar = associate(ligne);
+                         sprintf (ligne, " ");
+                         tofich (module_declar, ligne,1);
+                         GlobalDeclaration = 1 ;
+                         pos_cur_decl = setposcur();
+
+                      }
+                         (yyval.l) = (yyvsp[(1) - (2)].l);
+                         Add_Globliste_1((yyvsp[(1) - (2)].l));
+                                                  
+                         if ( insubroutinedeclare == 0 )
+                                                  Add_GlobalParameter_Var_1((yyvsp[(1) - (2)].l));
+                         else
+                         {
+                            if ( pointerdeclare == 1 )
+                                                Add_Pointer_Var_From_List_1((yyvsp[(1) - (2)].l));
+                            Add_Parameter_Var_1((yyvsp[(1) - (2)].l));
+                         }
+
+                         /* if variables has been declared in a subroutine    */
+                         if ( insubroutinedeclare == 1 )
+                         { 
+                       /*    Add_SubroutineDeclaration_Var_1($1);*/
+                         }
+                         /* If there are a SAVE declarations in module's      */
+                         /*    subroutines we should remove it from the       */
+                         /*    subroutines declaration and add it in the      */
+                         /*    global declarations                            */
+                         if ( aftercontainsdeclare == 1 &&
+                              SaveDeclare == 1 && firstpass == 1 )
+                         {
+                              if ( inmodulemeet == 0 ) Add_Save_Var_dcl_1((yyvsp[(1) - (2)].l));
+                              else  Add_SubroutineDeclarationSave_Var_1((yyvsp[(1) - (2)].l));
+                         }
+                      }
+                      /*                                                      */
+                      PublicDeclare = 0;
+                      PrivateDeclare = 0;
+                      ExternalDeclare = 0;
+                      strcpy(NamePrecision,"");
+                      c_star = 0;
+                      InitialValueGiven = 0 ;
+                      strcpy(IntentSpec,"");
+                      VariableIsParameter =  0 ;
+                      Allocatabledeclare = 0 ;
+                      Targetdeclare = 0 ;
+                      SaveDeclare = 0;
+                      pointerdeclare = 0;
+                      optionaldeclare = 0 ;
+                      dimsgiven=0;
+                      c_selectorgiven=0;
+                      strcpy(nameinttypename,"");
+                      strcpy(c_selectorname,"");
+                   ;}
+    break;
+
+  case 111:
+#line 870 "fortran.y"
+    {
+                      /* open param file                                      */
+                      if ( firstpass == 0 )
+                      {
+                         sprintf(ligne,"%s/ParamFile%s.h",nomdir,(yyvsp[(2) - (3)].nac));
+                         paramout=fopen(ligne,"w");
+                         if ( retour77 == 0 ) fprintf(paramout,"!\n");
+                         else fprintf(paramout,"C\n");
+                      }
+                      strcpy(subroutinename,(yyvsp[(2) - (3)].nac));
+                      if ( inmodulemeet == 1 )
+                      {
+                         insubroutinedeclare = 1;
+                         /* we should to list of the subroutine argument the  */
+                         /*    name of the function which has to be defined   */
+                         Add_SubroutineArgument_Var_1((yyvsp[(3) - (3)].l));
+                         Add_FunctionType_Var_1((yyvsp[(2) - (3)].nac));
+                         /* in the second step we should write the head of    */
+                         /*    the subroutine sub_loop_<subroutinename>       */
+                         writeheadnewsub_0(2);
+                      }
+                      else
+                      {
+                         insubroutinedeclare = 1;
+                         /* we should to list of the subroutine argument the  */
+                         /*    name of the function which has to be defined   */
+                         Add_SubroutineArgument_Var_1((yyvsp[(3) - (3)].l));
+                         Add_FunctionType_Var_1((yyvsp[(2) - (3)].nac));
+                         /* in the second step we should write the head of    */
+                         /*    the subroutine sub_loop_<subroutinename>       */
+                         writeheadnewsub_0(2);
+                      }
+                      strcpy(nameinttypename,"");
+
+                   ;}
+    break;
+
+  case 112:
+#line 907 "fortran.y"
+    {
+                       functiondeclarationisdone = 1;
+                   ;}
+    break;
+
+  case 113:
+#line 913 "fortran.y"
+    {
+                      VariableIsParameter = 1;
+                      pos_curparameter = setposcur()-9;
+                   ;}
+    break;
+
+  case 114:
+#line 918 "fortran.y"
+    {
+                      pos_curdata = setposcur()-strlen((yyvsp[(1) - (1)].nac));
+                      Init_List_Data_Var();
+                   ;}
+    break;
+
+  case 115:
+#line 923 "fortran.y"
+    {
+                      if ( couldaddvariable == 1 )
+                      {
+/*                      if ( aftercontainsdeclare == 1 ) strcpy(ligne,"");
+                      else */
+/*                      sprintf(ligne,"%s",$3);*/
+                      createstringfromlistname(ligne,(yyvsp[(3) - (4)].lnn));
+                      if (firstpass == 1)
+                      Add_Data_Var_1(&List_Data_Var,(yyvsp[(1) - (4)].nac),ligne);
+                      else
+                      Add_Data_Var_1(&List_Data_Var_Cur,(yyvsp[(1) - (4)].nac),ligne);
+                      }
+                   ;}
+    break;
+
+  case 116:
+#line 937 "fortran.y"
+    {
+                      if ( couldaddvariable == 1 )
+                      {
+                      /*if ( aftercontainsdeclare == 1 ) strcpy(ligne,"");
+                      else */
+                      /*sprintf(ligne,"%s",$5);   */
+                      createstringfromlistname(ligne,(yyvsp[(5) - (6)].lnn));                      
+                      if (firstpass == 1)                      
+                      Add_Data_Var_1(&List_Data_Var,(yyvsp[(3) - (6)].nac),ligne);
+                      else
+                      Add_Data_Var_1(&List_Data_Var_Cur,(yyvsp[(3) - (6)].nac),ligne);                      
+                      }
+                   ;}
+    break;
+
+  case 117:
+#line 951 "fortran.y"
+    {
+                       /*******************************************************/
+                       /*******************************************************/
+                       /*******************************************************/
+                       /*******************************************************/
+                       /*******************************************************/
+                       /*******************************************************/
+                       /*******************************************************/
+                       if (firstpass == 1)
+                       Add_Data_Var_Names_01(&List_Data_Var,(yyvsp[(1) - (4)].lnn),(yyvsp[(3) - (4)].lnn));
+                       else
+                       Add_Data_Var_Names_01(&List_Data_Var_Cur,(yyvsp[(1) - (4)].lnn),(yyvsp[(3) - (4)].lnn));
+                   ;}
+    break;
+
+  case 118:
+#line 966 "fortran.y"
+    {
+                      if ( couldaddvariable == 1 )
+                      {
+                         (yyval.lnn) = Insertname(NULL,(yyvsp[(1) - (1)].na),0);
+                      }
+                   ;}
+    break;
+
+  case 119:
+#line 973 "fortran.y"
+    {
+                      if ( couldaddvariable == 1 )
+                      {
+                         (yyval.lnn) = Insertname((yyvsp[(3) - (3)].lnn),(yyvsp[(1) - (3)].na),1);
+                      }
+                   ;}
+    break;
+
+  case 124:
+#line 987 "fortran.y"
+    {
+                     pos_cursave = setposcur()-4;
+                  ;}
+    break;
+
+  case 126:
+#line 993 "fortran.y"
+    {
+                     if ( couldaddvariable == 1 ) Add_Save_Var_1((yyvsp[(1) - (2)].nac),(yyvsp[(2) - (2)].d));
+                  ;}
+    break;
+
+  case 127:
+#line 998 "fortran.y"
+    {
+		(yyval.lnn)=Insertname(NULL,(yyvsp[(1) - (1)].nac),0);
+		;}
+    break;
+
+  case 128:
+#line 1002 "fortran.y"
+    {
+      printf("INSTRUCTION NON TRAITEE : INITIALISATION DE DATA AVEC EXPRESSION\n");
+      exit(0);
+      ;}
+    break;
+
+  case 129:
+#line 1007 "fortran.y"
+    {
+      (yyval.lnn) = concat_listname((yyvsp[(1) - (3)].lnn),(yyvsp[(3) - (3)].lnn));
+      ;}
+    break;
+
+  case 130:
+#line 1012 "fortran.y"
+    {if ( couldaddvariable == 1 ) sprintf((yyval.na),"%s%s",(yyvsp[(1) - (2)].nac),(yyvsp[(2) - (2)].nac));;}
+    break;
+
+  case 131:
+#line 1014 "fortran.y"
+    {if ( couldaddvariable == 1 ) sprintf((yyval.na),"%s+%s",(yyvsp[(1) - (3)].na),(yyvsp[(3) - (3)].na));;}
+    break;
+
+  case 132:
+#line 1016 "fortran.y"
+    {if ( couldaddvariable == 1 ) sprintf((yyval.na),"%s-%s",(yyvsp[(1) - (3)].na),(yyvsp[(3) - (3)].na));;}
+    break;
+
+  case 133:
+#line 1018 "fortran.y"
+    {if ( couldaddvariable == 1 ) sprintf((yyval.na),"%s*%s",(yyvsp[(1) - (3)].na),(yyvsp[(3) - (3)].na));;}
+    break;
+
+  case 134:
+#line 1020 "fortran.y"
+    {if ( couldaddvariable == 1 ) sprintf((yyval.na),"%s/%s",(yyvsp[(1) - (3)].na),(yyvsp[(3) - (3)].na));;}
+    break;
+
+  case 135:
+#line 1023 "fortran.y"
+    {if ( couldaddvariable == 1 ) strcpy((yyval.nac),"");;}
+    break;
+
+  case 136:
+#line 1025 "fortran.y"
+    {if ( couldaddvariable == 1 ) strcpy((yyval.nac),(yyvsp[(1) - (1)].nac));;}
+    break;
+
+  case 143:
+#line 1037 "fortran.y"
+    {
+	ininterfacedeclare = 1 ;
+	printf("INTEFACE entree\n");
+	;}
+    break;
+
+  case 144:
+#line 1042 "fortran.y"
+    {
+      ininterfacedeclare = 0;
+      ;}
+    break;
+
+  case 145:
+#line 1047 "fortran.y"
+    {
+                      positioninblock=0;
+                      pos_curdimension = setposcur()-9;
+                   ;}
+    break;
+
+  case 146:
+#line 1053 "fortran.y"
+    {
+         if ( couldaddvariable == 1 )
+         {
+            /*                                                                */
+            curvar=createvar((yyvsp[(3) - (5)].nac),(yyvsp[(4) - (5)].d));
+            /*                                                                */
+            CreateAndFillin_Curvar("",curvar);
+            /*                                                                */
+            curlistvar=insertvar(NULL,curvar);
+            /*                                                                */
+            (yyval.l)=settype("",curlistvar);
+            /*                                                                */
+            strcpy(vallengspec,"");
+         }
+      ;}
+    break;
+
+  case 147:
+#line 1069 "fortran.y"
+    {
+         if ( couldaddvariable == 1 )
+         {
+            /*                                                                */
+            curvar=createvar((yyvsp[(3) - (5)].nac),(yyvsp[(4) - (5)].d));
+            /*                                                                */
+            CreateAndFillin_Curvar("",curvar);
+            /*                                                                */
+            curlistvar=insertvar((yyvsp[(1) - (5)].l),curvar);
+            /*                                                                */
+            (yyval.l)=curlistvar;
+            /*                                                                */
+            strcpy(vallengspec,"");
+         }
+      ;}
+    break;
+
+  case 150:
+#line 1089 "fortran.y"
+    {
+        (yyval.lnn)=(listname *)NULL;
+        ;}
+    break;
+
+  case 151:
+#line 1093 "fortran.y"
+    {
+          (yyval.lnn)=(yyvsp[(3) - (3)].lnn);
+         ;}
+    break;
+
+  case 152:
+#line 1098 "fortran.y"
+    {
+           (yyval.lnn) = Insertname(NULL,(yyvsp[(1) - (1)].nac),0);
+           ;}
+    break;
+
+  case 153:
+#line 1102 "fortran.y"
+    {
+          (yyval.lnn) = Insertname((yyvsp[(1) - (3)].lnn),(yyvsp[(3) - (3)].nac),0);
+          ;}
+    break;
+
+  case 154:
+#line 1107 "fortran.y"
+    {
+                         pos_end = setposcur();
+                         RemoveWordSET_0(fortranout,pos_curcommon,
+                                                  pos_end-pos_curcommon);
+                   ;}
+    break;
+
+  case 155:
+#line 1113 "fortran.y"
+    {
+                         if ( couldaddvariable == 1 )
+                         {
+                            sprintf(charusemodule,"%s",(yyvsp[(2) - (3)].nac));
+                            Add_NameOfCommon_1((yyvsp[(2) - (3)].nac),subroutinename);
+                            pos_end = setposcur();
+                            RemoveWordSET_0(fortranout,pos_curcommon,
+                                                       pos_end-pos_curcommon);
+                         }
+                   ;}
+    break;
+
+  case 156:
+#line 1124 "fortran.y"
+    {
+                         if ( couldaddvariable == 1 )
+                         {
+                            sprintf(charusemodule,"%s",(yyvsp[(3) - (5)].nac));
+                            Add_NameOfCommon_1((yyvsp[(3) - (5)].nac),subroutinename);
+                            pos_end = setposcur();
+                            RemoveWordSET_0(fortranout,pos_curcommon,
+                                                       pos_end-pos_curcommon);
+                         }
+                   ;}
+    break;
+
+  case 157:
+#line 1136 "fortran.y"
+    {
+                      positioninblock=0;
+                      pos_curcommon = setposcur()-6;
+                   ;}
+    break;
+
+  case 158:
+#line 1141 "fortran.y"
+    {
+                      positioninblock=0;
+                      pos_curcommon = setposcur()-6-7;
+                   ;}
+    break;
+
+  case 159:
+#line 1147 "fortran.y"
+    {
+                      if ( couldaddvariable == 1 ) Add_Common_var_1();
+                   ;}
+    break;
+
+  case 160:
+#line 1152 "fortran.y"
+    {
+                      if ( couldaddvariable == 1 ) Add_Common_var_1();
+                   ;}
+    break;
+
+  case 161:
+#line 1156 "fortran.y"
+    {
+                      if ( couldaddvariable == 1 )
+                      {
+                         positioninblock = positioninblock + 1 ;
+                         strcpy(commonvar,(yyvsp[(1) - (2)].nac));
+                         commondim = (yyvsp[(2) - (2)].d);
+                      }
+                   ;}
+    break;
+
+  case 162:
+#line 1166 "fortran.y"
+    {
+                      if ( couldaddvariable == 1 )
+                      {
+                         strcpy((yyval.nac),"");
+                         positioninblock=0;
+                         strcpy(commonblockname,"");
+                      }
+                   ;}
+    break;
+
+  case 163:
+#line 1175 "fortran.y"
+    {
+                      if ( couldaddvariable == 1 )
+                      {
+                         strcpy((yyval.nac),(yyvsp[(2) - (3)].nac));
+                         positioninblock=0;
+                         strcpy(commonblockname,(yyvsp[(2) - (3)].nac));
+                      }
+                   ;}
+    break;
+
+  case 166:
+#line 1188 "fortran.y"
+    {
+                      if ( couldaddvariable == 1 ) (yyval.l)=insertvar(NULL,(yyvsp[(1) - (1)].v));
+                   ;}
+    break;
+
+  case 167:
+#line 1192 "fortran.y"
+    {
+                      if ( couldaddvariable == 1 ) (yyval.l)=insertvar((yyvsp[(1) - (3)].l),(yyvsp[(3) - (3)].v));
+                   ;}
+    break;
+
+  case 168:
+#line 1197 "fortran.y"
+    {
+                     if ( couldaddvariable == 1 )
+                     {
+                         curvar=(variable *) malloc(sizeof(variable));
+                         /*                                                   */
+                         Init_Variable(curvar);
+                         /*                                                   */
+                         curvar->v_VariableIsParameter=1;
+                         strcpy(curvar->v_nomvar,(yyvsp[(1) - (3)].nac));
+                         Save_Length((yyvsp[(1) - (3)].nac),4);
+                         strcpy(curvar->v_subroutinename,subroutinename);
+                         Save_Length(subroutinename,11);
+                         strcpy(curvar->v_modulename,curmodulename);
+                         Save_Length(curmodulename,6);
+                         strcpy(curvar->v_initialvalue,(yyvsp[(3) - (3)].na));
+                         Save_Length((yyvsp[(3) - (3)].na),14);
+                         strcpy(curvar->v_commoninfile,mainfile);
+                         Save_Length(mainfile,10);
+                         (yyval.v)=curvar;
+                      }
+                   ;}
+    break;
+
+  case 172:
+#line 1225 "fortran.y"
+    {
+                       if ( insubroutinedeclare == 1 )
+                       {
+                          Add_ImplicitNoneSubroutine_1();
+                          pos_end = setposcur();
+                          RemoveWordSET_0(fortranout,pos_end-13,
+                                                             13);
+                       }
+                    ;}
+    break;
+
+  case 175:
+#line 1239 "fortran.y"
+    {
+                      if ( couldaddvariable == 1 )
+                      {
+                         /*                                                   */
+                         if (dimsgiven == 1)
+                         {
+                            curvar=createvar((yyvsp[(3) - (6)].nac),curdim);
+                         }
+                         else
+                         {
+                            curvar=createvar((yyvsp[(3) - (6)].nac),(yyvsp[(4) - (6)].d));
+                         }
+                         /*                                                   */
+                         CreateAndFillin_Curvar(DeclType,curvar);
+                         /*                                                   */
+                         curlistvar=insertvar(NULL,curvar);
+                         if (!strcasecmp(DeclType,"character"))
+                         {
+                            if (c_selectorgiven == 1)
+                            {
+                               strcpy(c_selectordim.first,"1");
+                               strcpy(c_selectordim.last,c_selectorname);
+                               Save_Length(c_selectorname,1);
+                               change_dim_char
+                                     (insertdim(NULL,c_selectordim),curlistvar);
+                            }
+                         }
+                         (yyval.l)=settype(DeclType,curlistvar);
+                      }
+                      strcpy(vallengspec,"");
+                   ;}
+    break;
+
+  case 176:
+#line 1271 "fortran.y"
+    {
+                      if ( couldaddvariable == 1 )
+                      {
+                         if (dimsgiven == 1)
+                         {
+                            curvar=createvar((yyvsp[(4) - (7)].nac),curdim);
+                         }
+                         else
+                         {
+                            curvar=createvar((yyvsp[(4) - (7)].nac),(yyvsp[(5) - (7)].d));
+                         }
+                         /*                                                   */
+                         CreateAndFillin_Curvar((yyvsp[(1) - (7)].l)->var->v_typevar,curvar);
+                         /*                                                   */
+                         strcpy(curvar->v_typevar,((yyvsp[(1) - (7)].l)->var->v_typevar));
+                         Save_Length((yyvsp[(1) - (7)].l)->var->v_typevar,3);
+                         /*                                                   */
+                         curlistvar=insertvar((yyvsp[(1) - (7)].l),curvar);
+                         if (!strcasecmp(DeclType,"character"))
+                         {
+                            if (c_selectorgiven == 1)
+                            {
+                               strcpy(c_selectordim.first,"1");
+                               strcpy(c_selectordim.last,c_selectorname);
+                               Save_Length(c_selectorname,1);
+                               change_dim_char
+                                     (insertdim(NULL,c_selectordim),curlistvar);
+                            }
+                         }
+                         (yyval.l)=curlistvar;
+                      }
+                      strcpy(vallengspec,"");
+                   ;}
+    break;
+
+  case 177:
+#line 1305 "fortran.y"
+    {dimsgiven=0;;}
+    break;
+
+  case 178:
+#line 1308 "fortran.y"
+    {strcpy(DeclType,(yyvsp[(1) - (2)].nac));;}
+    break;
+
+  case 179:
+#line 1310 "fortran.y"
+    {
+                      strcpy(DeclType,"CHARACTER");
+                   ;}
+    break;
+
+  case 180:
+#line 1314 "fortran.y"
+    {
+                      strcpy(DeclType,(yyvsp[(1) - (3)].nac));
+                      strcpy(nameinttypename,(yyvsp[(3) - (3)].nac));
+                   ;}
+    break;
+
+  case 181:
+#line 1319 "fortran.y"
+    {
+                      strcpy(DeclType,"TYPE");
+                   ;}
+    break;
+
+  case 182:
+#line 1324 "fortran.y"
+    {
+                 /*     if ( couldaddvariable == 1 ) VarTypepar = 1 ;
+                      couldaddvariable = 0 ;
+                      pos_cur_decl = setposcur()-5;*/
+                   pos_cur_decl = setposcur()-5;
+                   ;}
+    break;
+
+  case 184:
+#line 1333 "fortran.y"
+    {c_selectorgiven=1;strcpy(c_selectorname,(yyvsp[(2) - (2)].nac));;}
+    break;
+
+  case 185:
+#line 1334 "fortran.y"
+    {c_star = 1;;}
+    break;
+
+  case 190:
+#line 1342 "fortran.y"
+    {
+                      pos_cur_decl = setposcur()-9;
+                   ;}
+    break;
+
+  case 191:
+#line 1346 "fortran.y"
+    {strcpy((yyval.nac),(yyvsp[(1) - (1)].nac));;}
+    break;
+
+  case 192:
+#line 1349 "fortran.y"
+    {
+                      strcpy((yyval.nac),"INTEGER");
+                      pos_cur_decl = setposcur()-7;
+                   ;}
+    break;
+
+  case 193:
+#line 1353 "fortran.y"
+    {
+                      strcpy((yyval.nac),"REAL");
+                      pos_cur_decl = setposcur()-4;
+                   ;}
+    break;
+
+  case 194:
+#line 1358 "fortran.y"
+    {strcpy((yyval.nac),"COMPLEX");
+                   pos_cur_decl = setposcur()-7;;}
+    break;
+
+  case 195:
+#line 1361 "fortran.y"
+    {
+                      pos_cur_decl = setposcur()-16;
+                      strcpy((yyval.nac),"REAL");
+                      strcpy(nameinttypename,"8");
+                   ;}
+    break;
+
+  case 196:
+#line 1367 "fortran.y"
+    {strcpy((yyval.nac),"DOUBLE COMPLEX");;}
+    break;
+
+  case 197:
+#line 1369 "fortran.y"
+    {
+                      strcpy((yyval.nac),"LOGICAL");
+                      pos_cur_decl = setposcur()-7;
+                   ;}
+    break;
+
+  case 199:
+#line 1375 "fortran.y"
+    {strcpy(vallengspec,(yyvsp[(2) - (2)].na));;}
+    break;
+
+  case 200:
+#line 1377 "fortran.y"
+    {sprintf((yyval.na),"*%s",(yyvsp[(1) - (1)].na));;}
+    break;
+
+  case 201:
+#line 1378 "fortran.y"
+    {strcpy((yyval.na),"*(*)");;}
+    break;
+
+  case 208:
+#line 1389 "fortran.y"
+    {
+                      if ( strstr((yyvsp[(3) - (3)].na),"0.d0") )
+                      {
+                         strcpy(nameinttypename,"8");
+                         sprintf(NamePrecision,"");
+                      }
+                      else sprintf(NamePrecision,"%s = %s",(yyvsp[(1) - (3)].nac),(yyvsp[(3) - (3)].na));
+                   ;}
+    break;
+
+  case 209:
+#line 1398 "fortran.y"
+    {
+                      strcpy(NamePrecision,(yyvsp[(1) - (1)].nac));
+                   ;}
+    break;
+
+  case 210:
+#line 1402 "fortran.y"
+    {
+                      strcpy(NamePrecision,(yyvsp[(1) - (1)].nac));
+                   ;}
+    break;
+
+  case 211:
+#line 1406 "fortran.y"
+    {strcpy(CharacterSize,(yyvsp[(1) - (1)].na));
+                    strcpy((yyval.na),(yyvsp[(1) - (1)].na));;}
+    break;
+
+  case 212:
+#line 1408 "fortran.y"
+    {strcpy(CharacterSize,"*");
+                    strcpy((yyval.na),"*");;}
+    break;
+
+  case 220:
+#line 1422 "fortran.y"
+    {
+                      VariableIsParameter = 1;
+                   ;}
+    break;
+
+  case 222:
+#line 1427 "fortran.y"
+    {Allocatabledeclare = 1;;}
+    break;
+
+  case 223:
+#line 1429 "fortran.y"
+    {
+                      dimsgiven=1;
+                      curdim=(yyvsp[(2) - (2)].d);
+                   ;}
+    break;
+
+  case 224:
+#line 1434 "fortran.y"
+    {ExternalDeclare = 1;;}
+    break;
+
+  case 225:
+#line 1436 "fortran.y"
+    {strcpy(IntentSpec,(yyvsp[(3) - (4)].nac));;}
+    break;
+
+  case 227:
+#line 1438 "fortran.y"
+    {optionaldeclare = 1 ;;}
+    break;
+
+  case 228:
+#line 1439 "fortran.y"
+    {pointerdeclare = 1 ;;}
+    break;
+
+  case 229:
+#line 1440 "fortran.y"
+    {
+/*                       if ( inmodulemeet == 1 )
+                       {*/
+                          SaveDeclare = 1 ;
+                     /*  }*/
+                    ;}
+    break;
+
+  case 230:
+#line 1447 "fortran.y"
+    {Targetdeclare = 1;;}
+    break;
+
+  case 231:
+#line 1449 "fortran.y"
+    {strcpy((yyval.nac),(yyvsp[(1) - (1)].nac));;}
+    break;
+
+  case 232:
+#line 1450 "fortran.y"
+    {strcpy((yyval.nac),(yyvsp[(1) - (1)].nac));;}
+    break;
+
+  case 233:
+#line 1451 "fortran.y"
+    {strcpy((yyval.nac),(yyvsp[(1) - (1)].nac)); ;}
+    break;
+
+  case 234:
+#line 1454 "fortran.y"
+    {PublicDeclare = 1;;}
+    break;
+
+  case 235:
+#line 1456 "fortran.y"
+    {PrivateDeclare = 1;;}
+    break;
+
+  case 236:
+#line 1458 "fortran.y"
+    {if ( created_dimensionlist == 1 )
+                       {
+                           (yyval.d)=(listdim *)NULL;
+                       }
+                   ;}
+    break;
+
+  case 237:
+#line 1464 "fortran.y"
+    {if ( created_dimensionlist == 1 ||
+                         agrif_parentcall      == 1 ) (yyval.d)=(yyvsp[(2) - (3)].d);;}
+    break;
+
+  case 238:
+#line 1467 "fortran.y"
+    {if ( created_dimensionlist == 1 ||
+                         agrif_parentcall      == 1 ) (yyval.d)=insertdim(NULL,(yyvsp[(1) - (1)].dim1));;}
+    break;
+
+  case 239:
+#line 1470 "fortran.y"
+    {if ( couldaddvariable == 1 )
+                         if ( created_dimensionlist == 1 ) (yyval.d)=insertdim((yyvsp[(1) - (3)].d),(yyvsp[(3) - (3)].dim1));;}
+    break;
+
+  case 240:
+#line 1473 "fortran.y"
+    {
+                      strcpy((yyval.dim1).first,"1");
+                      strcpy((yyval.dim1).last,(yyvsp[(1) - (1)].na));
+                      Save_Length((yyvsp[(1) - (1)].na),1);
+                   ;}
+    break;
+
+  case 241:
+#line 1478 "fortran.y"
+    {
+                      strcpy((yyval.dim1).first,"");
+                      strcpy((yyval.dim1).last,"");
+                   ;}
+    break;
+
+  case 242:
+#line 1482 "fortran.y"
+    {
+                      strcpy((yyval.dim1).first,(yyvsp[(1) - (2)].na));
+                      Save_Length((yyvsp[(1) - (2)].na),2);
+                      strcpy((yyval.dim1).last,"");
+                   ;}
+    break;
+
+  case 243:
+#line 1487 "fortran.y"
+    {
+                      strcpy((yyval.dim1).first,"");
+                      strcpy((yyval.dim1).last,(yyvsp[(2) - (2)].na));
+                      Save_Length((yyvsp[(2) - (2)].na),1);
+                   ;}
+    break;
+
+  case 244:
+#line 1493 "fortran.y"
+    {
+                      strcpy((yyval.dim1).first,(yyvsp[(1) - (3)].na));
+                      Save_Length((yyvsp[(1) - (3)].na),2);
+                      strcpy((yyval.dim1).last,(yyvsp[(3) - (3)].na));
+                      Save_Length((yyvsp[(3) - (3)].na),1);
+                   ;}
+    break;
+
+  case 245:
+#line 1500 "fortran.y"
+    {strcpy((yyval.na),"*");;}
+    break;
+
+  case 246:
+#line 1501 "fortran.y"
+    {strcpy((yyval.na),(yyvsp[(1) - (1)].na));;}
+    break;
+
+  case 247:
+#line 1503 "fortran.y"
+    {if ( couldaddvariable == 1 ) strcpy((yyval.na),(yyvsp[(1) - (1)].na));;}
+    break;
+
+  case 248:
+#line 1505 "fortran.y"
+    {if ( couldaddvariable == 1 ) sprintf((yyval.na),"(%s)",(yyvsp[(2) - (3)].na));;}
+    break;
+
+  case 249:
+#line 1507 "fortran.y"
+    {if ( couldaddvariable == 1 ) strcpy((yyval.na),(yyvsp[(1) - (1)].na));;}
+    break;
+
+  case 250:
+#line 1509 "fortran.y"
+    {if ( couldaddvariable == 1 ) strcpy((yyval.na),(yyvsp[(1) - (1)].na));;}
+    break;
+
+  case 251:
+#line 1513 "fortran.y"
+    {sprintf((yyval.na),"SUM(%s)",(yyvsp[(2) - (3)].na));;}
+    break;
+
+  case 252:
+#line 1515 "fortran.y"
+    {sprintf((yyval.na),"MAX(%s)",(yyvsp[(2) - (3)].na));;}
+    break;
+
+  case 253:
+#line 1517 "fortran.y"
+    {sprintf((yyval.na),"TANH(%s)",(yyvsp[(3) - (4)].na));;}
+    break;
+
+  case 254:
+#line 1519 "fortran.y"
+    {sprintf((yyval.na),"MAXVAL(%s)",(yyvsp[(3) - (4)].na));;}
+    break;
+
+  case 255:
+#line 1521 "fortran.y"
+    {sprintf((yyval.na),"MIN(%s)",(yyvsp[(2) - (3)].na));;}
+    break;
+
+  case 256:
+#line 1523 "fortran.y"
+    {sprintf((yyval.na),"MINVAL(%s)",(yyvsp[(3) - (4)].na));;}
+    break;
+
+  case 257:
+#line 1525 "fortran.y"
+    {sprintf((yyval.na),"TRIM(%s)",(yyvsp[(3) - (4)].na));;}
+    break;
+
+  case 258:
+#line 1527 "fortran.y"
+    {sprintf((yyval.na),"SQRT(%s)",(yyvsp[(2) - (3)].na));;}
+    break;
+
+  case 259:
+#line 1529 "fortran.y"
+    {sprintf((yyval.na),"REAL(%s)",(yyvsp[(3) - (4)].na));;}
+    break;
+
+  case 260:
+#line 1531 "fortran.y"
+    {sprintf((yyval.na),"NINT(%s)",(yyvsp[(3) - (4)].na));;}
+    break;
+
+  case 261:
+#line 1533 "fortran.y"
+    {sprintf((yyval.na),"FLOAT(%s)",(yyvsp[(3) - (4)].na));;}
+    break;
+
+  case 262:
+#line 1535 "fortran.y"
+    {sprintf((yyval.na),"EXP(%s)",(yyvsp[(3) - (4)].na));;}
+    break;
+
+  case 263:
+#line 1537 "fortran.y"
+    {sprintf((yyval.na),"COS(%s)",(yyvsp[(3) - (4)].na));;}
+    break;
+
+  case 264:
+#line 1539 "fortran.y"
+    {sprintf((yyval.na),"COSH(%s)",(yyvsp[(3) - (4)].na));;}
+    break;
+
+  case 265:
+#line 1541 "fortran.y"
+    {sprintf((yyval.na),"ACOS(%s)",(yyvsp[(3) - (4)].na));;}
+    break;
+
+  case 266:
+#line 1543 "fortran.y"
+    {sprintf((yyval.na),"SIN(%s)",(yyvsp[(3) - (4)].na));;}
+    break;
+
+  case 267:
+#line 1545 "fortran.y"
+    {sprintf((yyval.na),"SINH(%s)",(yyvsp[(3) - (4)].na));;}
+    break;
+
+  case 268:
+#line 1547 "fortran.y"
+    {sprintf((yyval.na),"ASIN(%s)",(yyvsp[(3) - (4)].na));;}
+    break;
+
+  case 269:
+#line 1549 "fortran.y"
+    {sprintf((yyval.na),"LOG(%s)",(yyvsp[(3) - (4)].na));;}
+    break;
+
+  case 270:
+#line 1551 "fortran.y"
+    {sprintf((yyval.na),"TAN(%s)",(yyvsp[(3) - (4)].na));;}
+    break;
+
+  case 271:
+#line 1553 "fortran.y"
+    {sprintf((yyval.na),"ATAN(%s)",(yyvsp[(3) - (4)].na));;}
+    break;
+
+  case 272:
+#line 1555 "fortran.y"
+    {sprintf((yyval.na),"ABS(%s)",(yyvsp[(2) - (3)].na));;}
+    break;
+
+  case 273:
+#line 1557 "fortran.y"
+    {sprintf((yyval.na),"MOD(%s)",(yyvsp[(3) - (4)].na));;}
+    break;
+
+  case 274:
+#line 1559 "fortran.y"
+    {sprintf((yyval.na),"SIGN(%s)",(yyvsp[(3) - (4)].na));;}
+    break;
+
+  case 275:
+#line 1561 "fortran.y"
+    {sprintf((yyval.na),"MINLOC(%s)",(yyvsp[(3) - (4)].na));;}
+    break;
+
+  case 276:
+#line 1563 "fortran.y"
+    {sprintf((yyval.na),"MAXLOC(%s)",(yyvsp[(3) - (4)].na));;}
+    break;
+
+  case 277:
+#line 1565 "fortran.y"
+    {strcpy((yyval.na),(yyvsp[(1) - (1)].na));;}
+    break;
+
+  case 278:
+#line 1567 "fortran.y"
+    {if ( couldaddvariable == 1 )
+                   { strcpy((yyval.na),(yyvsp[(1) - (3)].na));strcat((yyval.na),",");strcat((yyval.na),(yyvsp[(3) - (3)].na));};}
+    break;
+
+  case 279:
+#line 1570 "fortran.y"
+    {if ( couldaddvariable == 1 ) strcpy((yyval.na),(yyvsp[(1) - (1)].na));;}
+    break;
+
+  case 280:
+#line 1572 "fortran.y"
+    {if ( couldaddvariable == 1 ) strcpy((yyval.na),(yyvsp[(1) - (1)].nac));;}
+    break;
+
+  case 281:
+#line 1574 "fortran.y"
+    {if ( couldaddvariable == 1 ) strcpy((yyval.na),(yyvsp[(1) - (1)].na));;}
+    break;
+
+  case 282:
+#line 1576 "fortran.y"
+    {if ( couldaddvariable == 1 ) sprintf((yyval.na),"%s%s",(yyvsp[(1) - (2)].na),(yyvsp[(2) - (2)].na));;}
+    break;
+
+  case 283:
+#line 1578 "fortran.y"
+    {if ( couldaddvariable == 1 ) sprintf((yyval.na),"%s%s",(yyvsp[(1) - (2)].nac),(yyvsp[(2) - (2)].na));;}
+    break;
+
+  case 284:
+#line 1580 "fortran.y"
+    {if ( couldaddvariable == 1 ) sprintf((yyval.na),"%s%s",(yyvsp[(1) - (2)].nac),(yyvsp[(2) - (2)].na));;}
+    break;
+
+  case 285:
+#line 1582 "fortran.y"
+    {if ( couldaddvariable == 1 ) strcpy((yyval.nac),"+");;}
+    break;
+
+  case 286:
+#line 1583 "fortran.y"
+    {if ( couldaddvariable == 1 ) strcpy((yyval.nac),"-");;}
+    break;
+
+  case 287:
+#line 1586 "fortran.y"
+    {if ( couldaddvariable == 1 ) sprintf((yyval.na),"+%s",(yyvsp[(2) - (2)].na));;}
+    break;
+
+  case 288:
+#line 1588 "fortran.y"
+    {if ( couldaddvariable == 1 ) sprintf((yyval.na),"-%s",(yyvsp[(2) - (2)].na));;}
+    break;
+
+  case 289:
+#line 1590 "fortran.y"
+    {if ( couldaddvariable == 1 ) sprintf((yyval.na),"*%s",(yyvsp[(2) - (2)].na));;}
+    break;
+
+  case 290:
+#line 1592 "fortran.y"
+    {if ( couldaddvariable == 1 ) sprintf((yyval.na),"%s%s",(yyvsp[(1) - (2)].nac),(yyvsp[(2) - (2)].na));;}
+    break;
+
+  case 291:
+#line 1594 "fortran.y"
+    {if ( couldaddvariable == 1 ) sprintf((yyval.na),"%s%s",(yyvsp[(1) - (2)].nac),(yyvsp[(2) - (2)].na));;}
+    break;
+
+  case 292:
+#line 1596 "fortran.y"
+    {if ( couldaddvariable == 1 ) sprintf((yyval.na),"%s%s",(yyvsp[(1) - (2)].nac),(yyvsp[(2) - (2)].na));;}
+    break;
+
+  case 293:
+#line 1598 "fortran.y"
+    {if ( couldaddvariable == 1 ) sprintf((yyval.na),"%s%s",(yyvsp[(1) - (2)].nac),(yyvsp[(2) - (2)].na));;}
+    break;
+
+  case 294:
+#line 1600 "fortran.y"
+    {if ( couldaddvariable == 1 ) sprintf((yyval.na)," > %s",(yyvsp[(2) - (2)].na));;}
+    break;
+
+  case 295:
+#line 1602 "fortran.y"
+    {if ( couldaddvariable == 1 ) sprintf((yyval.na),"%s%s",(yyvsp[(1) - (2)].nac),(yyvsp[(2) - (2)].na));;}
+    break;
+
+  case 296:
+#line 1604 "fortran.y"
+    {if ( couldaddvariable == 1 ) sprintf((yyval.na)," < %s",(yyvsp[(2) - (2)].na));;}
+    break;
+
+  case 297:
+#line 1606 "fortran.y"
+    {if ( couldaddvariable == 1 ) sprintf((yyval.na),"%s%s",(yyvsp[(1) - (2)].nac),(yyvsp[(2) - (2)].na));;}
+    break;
+
+  case 298:
+#line 1608 "fortran.y"
+    {if ( couldaddvariable == 1 ) sprintf((yyval.na)," >= %s",(yyvsp[(3) - (3)].na));;}
+    break;
+
+  case 299:
+#line 1610 "fortran.y"
+    {if ( couldaddvariable == 1 ) sprintf((yyval.na),"%s%s",(yyvsp[(1) - (2)].nac),(yyvsp[(2) - (2)].na));;}
+    break;
+
+  case 300:
+#line 1612 "fortran.y"
+    {if ( couldaddvariable == 1 ) sprintf((yyval.na)," <= %s",(yyvsp[(3) - (3)].na));;}
+    break;
+
+  case 301:
+#line 1614 "fortran.y"
+    {if ( couldaddvariable == 1 ) sprintf((yyval.na),"%s%s",(yyvsp[(1) - (2)].nac),(yyvsp[(2) - (2)].na));;}
+    break;
+
+  case 302:
+#line 1616 "fortran.y"
+    {if ( couldaddvariable == 1 ) sprintf((yyval.na),"%s%s",(yyvsp[(1) - (2)].nac),(yyvsp[(2) - (2)].na));;}
+    break;
+
+  case 303:
+#line 1618 "fortran.y"
+    {if ( couldaddvariable == 1 ) sprintf((yyval.na),"%s%s",(yyvsp[(1) - (2)].nac),(yyvsp[(2) - (2)].na));;}
+    break;
+
+  case 304:
+#line 1620 "fortran.y"
+    {if ( couldaddvariable == 1 ) sprintf((yyval.na),"%s%s",(yyvsp[(1) - (2)].nac),(yyvsp[(2) - (2)].na));;}
+    break;
+
+  case 305:
+#line 1622 "fortran.y"
+    {if ( couldaddvariable == 1 ) sprintf((yyval.na),"%s%s",(yyvsp[(1) - (2)].nac),(yyvsp[(2) - (2)].na));;}
+    break;
+
+  case 306:
+#line 1624 "fortran.y"
+    {if ( couldaddvariable == 1 ) sprintf((yyval.na),"%s",(yyvsp[(2) - (2)].na));;}
+    break;
+
+  case 307:
+#line 1626 "fortran.y"
+    {if ( couldaddvariable == 1 ) sprintf((yyval.na),"%s",(yyvsp[(2) - (2)].na));;}
+    break;
+
+  case 308:
+#line 1628 "fortran.y"
+    {strcpy((yyval.na),"");;}
+    break;
+
+  case 309:
+#line 1630 "fortran.y"
+    {sprintf((yyval.na),"/%s",(yyvsp[(1) - (1)].na));;}
+    break;
+
+  case 310:
+#line 1632 "fortran.y"
+    {sprintf((yyval.na),"/= %s",(yyvsp[(2) - (2)].na));;}
+    break;
+
+  case 311:
+#line 1634 "fortran.y"
+    {sprintf((yyval.na),"//%s",(yyvsp[(2) - (2)].na));;}
+    break;
+
+  case 312:
+#line 1637 "fortran.y"
+    {if ( couldaddvariable == 1 ) sprintf((yyval.na),"==%s",(yyvsp[(2) - (2)].na));;}
+    break;
+
+  case 313:
+#line 1639 "fortran.y"
+    {if ( couldaddvariable == 1 ) sprintf((yyval.na),"= %s",(yyvsp[(1) - (1)].na));;}
+    break;
+
+  case 314:
+#line 1642 "fortran.y"
+    {if ( couldaddvariable == 1 )
+						{
+						printf("ident = %s\n",(yyvsp[(1) - (1)].nac));
+						strcpy((yyval.na),(yyvsp[(1) - (1)].nac));}
+						;}
+    break;
+
+  case 315:
+#line 1648 "fortran.y"
+    {if ( couldaddvariable == 1 ) {
+                   printf("struct = %s\n",(yyvsp[(1) - (1)].na));
+                   strcpy((yyval.na),(yyvsp[(1) - (1)].na));}
+                   ;}
+    break;
+
+  case 316:
+#line 1653 "fortran.y"
+    {if ( couldaddvariable == 1 ) {
+                   printf("arrayref = %s\n",(yyvsp[(1) - (1)].na));
+                   strcpy((yyval.na),(yyvsp[(1) - (1)].na));
+                   };}
+    break;
+
+  case 317:
+#line 1658 "fortran.y"
+    {
+                      agrif_parentcall =0;
+                      if (!strcasecmp(identcopy,"Agrif_Parent") )
+                                                            agrif_parentcall =1;
+                      if ( Agrif_in_Tok_NAME(identcopy) == 1 )
+                      {
+                         inagrifcallargument = 1;
+                         Add_SubroutineWhereAgrifUsed_1(subroutinename,
+                                                        curmodulename);
+                      }
+                   ;}
+    break;
+
+  case 318:
+#line 1671 "fortran.y"
+    {
+                     strcpy((yyval.na),(yyvsp[(1) - (1)].na));
+                     if ( incalldeclare == 0 ) inagrifcallargument = 0;
+                   ;}
+    break;
+
+  case 319:
+#line 1676 "fortran.y"
+    {if ( couldaddvariable == 1 ) sprintf((yyval.na)," %s %s ",(yyvsp[(1) - (2)].na),(yyvsp[(2) - (2)].na));;}
+    break;
+
+  case 320:
+#line 1678 "fortran.y"
+    {if ( couldaddvariable == 1 )
+                                                sprintf((yyval.na)," %s ( %s )",(yyvsp[(1) - (4)].na),(yyvsp[(3) - (4)].na));;}
+    break;
+
+  case 321:
+#line 1681 "fortran.y"
+    {if ( couldaddvariable == 1 )
+                                         sprintf((yyval.na)," %s ( %s ) %s ",(yyvsp[(1) - (5)].na),(yyvsp[(3) - (5)].na),(yyvsp[(5) - (5)].na));;}
+    break;
+
+  case 322:
+#line 1685 "fortran.y"
+    {
+                      if ( couldaddvariable == 1 )
+                      {
+                         sprintf((yyval.na)," %s ( %s )",(yyvsp[(1) - (4)].nac),(yyvsp[(3) - (4)].na));
+                         ModifyTheAgrifFunction_0((yyvsp[(3) - (4)].na));
+                         agrif_parentcall =0;
+                      }
+                   ;}
+    break;
+
+  case 323:
+#line 1695 "fortran.y"
+    {
+                      sprintf((yyval.na)," %s %% %s ",(yyvsp[(1) - (3)].na),(yyvsp[(3) - (3)].na));
+                      if ( incalldeclare == 0 ) inagrifcallargument = 0;
+                   ;}
+    break;
+
+  case 324:
+#line 1701 "fortran.y"
+    {sprintf((yyval.na),"(/%s/)",(yyvsp[(2) - (3)].na));;}
+    break;
+
+  case 325:
+#line 1703 "fortran.y"
+    {strcpy((yyval.na)," ");;}
+    break;
+
+  case 326:
+#line 1705 "fortran.y"
+    {strcpy((yyval.na),(yyvsp[(2) - (2)].na));;}
+    break;
+
+  case 327:
+#line 1707 "fortran.y"
+    {if ( couldaddvariable == 1 ) strcpy((yyval.na),(yyvsp[(1) - (1)].na));;}
+    break;
+
+  case 328:
+#line 1709 "fortran.y"
+    {if ( couldaddvariable == 1 ) sprintf((yyval.na),"%s,%s",(yyvsp[(1) - (3)].na),(yyvsp[(3) - (3)].na));;}
+    break;
+
+  case 329:
+#line 1711 "fortran.y"
+    {strcpy((yyval.na),(yyvsp[(1) - (1)].na));;}
+    break;
+
+  case 330:
+#line 1712 "fortran.y"
+    {strcpy((yyval.na),(yyvsp[(1) - (1)].na));;}
+    break;
+
+  case 331:
+#line 1715 "fortran.y"
+    {if ( couldaddvariable == 1 ) sprintf((yyval.na),"%s :%s",(yyvsp[(1) - (3)].na),(yyvsp[(3) - (3)].na));;}
+    break;
+
+  case 332:
+#line 1717 "fortran.y"
+    {if ( couldaddvariable == 1 )
+                                               sprintf((yyval.na),"%s :%s :%s",(yyvsp[(1) - (5)].na),(yyvsp[(3) - (5)].na),(yyvsp[(5) - (5)].na));;}
+    break;
+
+  case 333:
+#line 1720 "fortran.y"
+    {if ( couldaddvariable == 1 ) sprintf((yyval.na),":%s :%s",(yyvsp[(2) - (4)].na),(yyvsp[(4) - (4)].na));;}
+    break;
+
+  case 334:
+#line 1721 "fortran.y"
+    {if ( couldaddvariable == 1 ) sprintf((yyval.na),": : %s",(yyvsp[(3) - (3)].na));;}
+    break;
+
+  case 335:
+#line 1722 "fortran.y"
+    {if ( couldaddvariable == 1 ) sprintf((yyval.na),":%s",(yyvsp[(2) - (2)].na));;}
+    break;
+
+  case 336:
+#line 1723 "fortran.y"
+    {if ( couldaddvariable == 1 ) sprintf((yyval.na),"%s :",(yyvsp[(1) - (2)].na));;}
+    break;
+
+  case 337:
+#line 1724 "fortran.y"
+    {if ( couldaddvariable == 1 ) sprintf((yyval.na),":");;}
+    break;
+
+  case 338:
+#line 1726 "fortran.y"
+    {
+                       if ( couldaddvariable == 1 && afterpercent == 0)
+                       {
+                       if ( Vartonumber((yyvsp[(1) - (1)].nac)) == 1 )
+                       {
+                          Add_SubroutineWhereAgrifUsed_1(subroutinename,
+                                                        curmodulename);
+                       }
+                       if (!strcasecmp((yyvsp[(1) - (1)].nac),"Agrif_Parent") )
+                                                            agrif_parentcall =1;
+                       if ( VariableIsNotFunction((yyvsp[(1) - (1)].nac)) == 0 )
+                       {
+                       printf("var = %s\n",(yyvsp[(1) - (1)].nac));
+                          if ( inagrifcallargument == 1 )
+                          {
+                             if ( !strcasecmp((yyvsp[(1) - (1)].nac),identcopy) )
+                             {
+                                strcpy(sameagrifname,identcopy);
+                                sameagrifargument = 1;
+                             }
+                          }
+                          strcpy(identcopy,(yyvsp[(1) - (1)].nac));
+                          pointedvar=0;
+                          strcpy(truename,(yyvsp[(1) - (1)].nac));
+                          if (variscoupled_0((yyvsp[(1) - (1)].nac))) strcpy(truename,getcoupledname_0((yyvsp[(1) - (1)].nac)));
+
+                          if ( VarIsNonGridDepend(truename) == 0 &&
+                               Variableshouldberemove(truename) == 0 )
+                          {                      
+                             if ( inagrifcallargument == 1 ||
+                                  varispointer_0(truename) == 1 )
+                             {
+                             printf("var2 = %s\n",(yyvsp[(1) - (1)].nac));
+                            if ((IsinListe(List_UsedInSubroutine_Var,(yyvsp[(1) - (1)].nac)) == 1) || (inagrifcallargument == 1))
+                             {
+                              if (varistyped_0(truename) == 0)
+                                 {
+                                 ModifyTheVariableName_0(truename,strlen((yyvsp[(1) - (1)].nac)));
+                                 }
+                                 }
+                             }
+                             printf("ici3\n");
+                             if ( inagrifcallargument != 1 ||
+                                  sameagrifargument ==1 )
+                                  {
+                                  printf("ici5 %s\n",truename);
+                                  Add_UsedInSubroutine_Var_1(truename);
+                                  }
+                          }
+                          NotifyAgrifFunction_0(truename);
+                       }
+                       }
+                       else
+                       {
+                       afterpercent = 0;
+                       }
+                    ;}
+    break;
+
+  case 339:
+#line 1785 "fortran.y"
+    {if ( couldaddvariable == 1 ) strcpy((yyval.nac),".TRUE.");;}
+    break;
+
+  case 340:
+#line 1786 "fortran.y"
+    {if ( couldaddvariable == 1 ) strcpy((yyval.nac),".FALSE.");;}
+    break;
+
+  case 341:
+#line 1787 "fortran.y"
+    {if ( couldaddvariable == 1 ) strcpy((yyval.nac),(yyvsp[(1) - (1)].nac));;}
+    break;
+
+  case 342:
+#line 1788 "fortran.y"
+    {if ( couldaddvariable == 1 ) strcpy((yyval.nac),(yyvsp[(1) - (1)].nac));;}
+    break;
+
+  case 343:
+#line 1789 "fortran.y"
+    {if ( couldaddvariable == 1 ) strcpy((yyval.nac),(yyvsp[(1) - (1)].nac));;}
+    break;
+
+  case 344:
+#line 1790 "fortran.y"
+    {if ( couldaddvariable == 1 ) strcpy((yyval.nac),(yyvsp[(1) - (1)].nac));;}
+    break;
+
+  case 345:
+#line 1792 "fortran.y"
+    {if ( couldaddvariable == 1 ) sprintf((yyval.nac),"%s%s",(yyvsp[(1) - (2)].nac),(yyvsp[(2) - (2)].nac));;}
+    break;
+
+  case 347:
+#line 1796 "fortran.y"
+    {if ( couldaddvariable == 1 ) strcpy((yyval.nac),(yyvsp[(1) - (1)].nac));;}
+    break;
+
+  case 349:
+#line 1799 "fortran.y"
+    {if ( couldaddvariable == 1 ) strcpy((yyval.nac),(yyvsp[(1) - (1)].nac));;}
+    break;
+
+  case 350:
+#line 1801 "fortran.y"
+    {if ( couldaddvariable == 1 ) strcpy((yyval.nac),(yyvsp[(1) - (1)].nac));;}
+    break;
+
+  case 351:
+#line 1803 "fortran.y"
+    {if ( couldaddvariable == 1 ) strcpy((yyval.na)," ");;}
+    break;
+
+  case 352:
+#line 1804 "fortran.y"
+    {if ( couldaddvariable == 1 ) strcpy((yyval.na),(yyvsp[(1) - (1)].na));;}
+    break;
+
+  case 353:
+#line 1807 "fortran.y"
+    {if ( couldaddvariable == 1 ) sprintf((yyval.na),"(%s :%s)",(yyvsp[(2) - (5)].na),(yyvsp[(4) - (5)].na));;}
+    break;
+
+  case 354:
+#line 1809 "fortran.y"
+    {if ( couldaddvariable == 1 ) strcpy((yyval.na)," ");;}
+    break;
+
+  case 355:
+#line 1810 "fortran.y"
+    {if ( couldaddvariable == 1 ) strcpy((yyval.na),(yyvsp[(1) - (1)].na));;}
+    break;
+
+  case 356:
+#line 1812 "fortran.y"
+    {if ( couldaddvariable == 1 ) strcpy((yyval.na)," ");;}
+    break;
+
+  case 357:
+#line 1813 "fortran.y"
+    {if ( couldaddvariable == 1 ) strcpy((yyval.na),(yyvsp[(1) - (1)].na));;}
+    break;
+
+  case 358:
+#line 1815 "fortran.y"
+    {InitialValueGiven = 0;;}
+    break;
+
+  case 359:
+#line 1817 "fortran.y"
+    {
+                       if ( couldaddvariable == 1 )
+                       {
+                          strcpy(InitValue,(yyvsp[(3) - (3)].na));
+                          InitialValueGiven = 1;
+                       }
+                    ;}
+    break;
+
+  case 360:
+#line 1825 "fortran.y"
+    {pos_curinit = setposcur();;}
+    break;
+
+  case 361:
+#line 1828 "fortran.y"
+    {sprintf((yyval.na),"(%s,%s)",(yyvsp[(2) - (5)].na),(yyvsp[(4) - (5)].na));;}
+    break;
+
+  case 362:
+#line 1831 "fortran.y"
+    {
+                      if ( couldaddvariable == 1 )
+                      {
+                      /* if variables has been declared in a subroutine       */
+                      if (insubroutinedeclare == 1)
+                      {
+                         copyuse_0((yyvsp[(2) - (2)].nac));
+                      }
+                      sprintf(charusemodule,"%s",(yyvsp[(2) - (2)].nac));
+                      Add_NameOfModuleUsed_1((yyvsp[(2) - (2)].nac));
+
+                      if ( inmoduledeclare == 0 )
+                      {
+                         pos_end = setposcur();
+                         RemoveWordSET_0(fortranout,pos_curuse,
+                                               pos_end-pos_curuse);
+                      }
+                      }
+                    ;}
+    break;
+
+  case 363:
+#line 1851 "fortran.y"
+    {
+                       if ( couldaddvariable == 1 )
+                       {
+                      if (insubroutinedeclare == 1)
+                      {
+                         Add_CouplePointed_Var_1((yyvsp[(2) - (4)].nac),(yyvsp[(4) - (4)].lc));
+                      }
+                      if ( firstpass == 1 )
+                      {
+                         if ( insubroutinedeclare == 1 )
+                         {
+                            coupletmp = (yyvsp[(4) - (4)].lc);
+                            strcpy(ligne,"");
+                            while ( coupletmp )
+                            {
+                               strcat(ligne,coupletmp->c_namevar);
+                               strcat(ligne," => ");
+                               strcat(ligne,coupletmp->c_namepointedvar);
+                               coupletmp = coupletmp->suiv;
+                               if ( coupletmp ) strcat(ligne,",");
+                            }
+                            sprintf(charusemodule,"%s",(yyvsp[(2) - (4)].nac));
+                         }
+                         Add_NameOfModuleUsed_1((yyvsp[(2) - (4)].nac));
+                      }
+                      if ( inmoduledeclare == 0 )
+                      {
+                         pos_end = setposcur();
+                         RemoveWordSET_0(fortranout,pos_curuse,
+                                               pos_end-pos_curuse);
+                      }
+                      }
+                    ;}
+    break;
+
+  case 364:
+#line 1885 "fortran.y"
+    {
+                       if ( couldaddvariable == 1 )
+                       {
+                      /* if variables has been declared in a subroutine       */
+                      if (insubroutinedeclare == 1)
+                      {
+                         copyuseonly_0((yyvsp[(2) - (6)].nac));
+                      }
+                      sprintf(charusemodule,"%s",(yyvsp[(2) - (6)].nac));
+                      Add_NameOfModuleUsed_1((yyvsp[(2) - (6)].nac));
+
+                       if ( inmoduledeclare == 0 )
+                       {
+                          pos_end = setposcur();
+                          RemoveWordSET_0(fortranout,pos_curuse,
+                                                pos_end-pos_curuse);
+                       }
+                       }
+                    ;}
+    break;
+
+  case 365:
+#line 1905 "fortran.y"
+    {
+                       if ( couldaddvariable == 1 )
+                       {
+                       /* if variables has been declared in a subroutine      */
+                       if (insubroutinedeclare == 1)
+                       {
+                          Add_CouplePointed_Var_1((yyvsp[(2) - (6)].nac),(yyvsp[(6) - (6)].lc));
+                       }
+                       if ( firstpass == 1 )
+                       {
+                         if ( insubroutinedeclare == 1 )
+                         {
+                             coupletmp = (yyvsp[(6) - (6)].lc);
+                             strcpy(ligne,"");
+                             while ( coupletmp )
+                             {
+                                strcat(ligne,coupletmp->c_namevar);
+                               if ( strcasecmp(coupletmp->c_namepointedvar,"") )
+                                                           strcat(ligne," => ");
+                                strcat(ligne,coupletmp->c_namepointedvar);
+                                coupletmp = coupletmp->suiv;
+                                if ( coupletmp ) strcat(ligne,",");
+                             }
+                             sprintf(charusemodule,"%s",(yyvsp[(2) - (6)].nac));
+                          }
+                          Add_NameOfModuleUsed_1((yyvsp[(2) - (6)].nac));
+                       }
+                       if ( firstpass == 0 )
+                       {
+                          if ( inmoduledeclare == 0 )
+                          {
+
+                            pos_end = setposcur();
+                             RemoveWordSET_0(fortranout,pos_curuse,
+                                                   pos_end-pos_curuse);
+                       if (oldfortranout) 
+                         variableisglobalinmodule((yyvsp[(6) - (6)].lc),(yyvsp[(2) - (6)].nac),oldfortranout,pos_curuseold);
+                        
+                          }
+                          else
+                          {
+
+                             /* if we are in the module declare and if the    */
+                             /* onlylist is a list of global variable         */
+                             variableisglobalinmodule((yyvsp[(6) - (6)].lc), (yyvsp[(2) - (6)].nac), fortranout,pos_curuse);
+                          }
+                       }
+                       }
+                    ;}
+    break;
+
+  case 366:
+#line 1956 "fortran.y"
+    {
+                      pos_curuse = setposcur()-strlen((yyvsp[(1) - (1)].nac));
+                     if (firstpass == 0 && oldfortranout) {
+                     pos_curuseold = setposcurname(oldfortranout);
+                     }
+                   ;}
+    break;
+
+  case 367:
+#line 1964 "fortran.y"
+    {strcpy((yyval.nac),(yyvsp[(1) - (1)].nac));;}
+    break;
+
+  case 368:
+#line 1967 "fortran.y"
+    {
+                       if ( couldaddvariable == 1 ) (yyval.lc) = (yyvsp[(1) - (1)].lc);
+                    ;}
+    break;
+
+  case 369:
+#line 1971 "fortran.y"
+    {
+                        if ( couldaddvariable == 1 )
+                        {
+                        /* insert the variable in the list $1                 */
+                        (yyvsp[(3) - (3)].lc)->suiv = (yyvsp[(1) - (3)].lc);
+                        (yyval.lc) = (yyvsp[(3) - (3)].lc);
+                        }
+                    ;}
+    break;
+
+  case 370:
+#line 1981 "fortran.y"
+    {
+                       coupletmp =(listcouple *)malloc(sizeof(listcouple));
+                       strcpy(coupletmp->c_namevar,(yyvsp[(1) - (3)].nac));
+                       Save_Length((yyvsp[(1) - (3)].nac),21);
+                       strcpy(coupletmp->c_namepointedvar,(yyvsp[(3) - (3)].nac));
+                       Save_Length((yyvsp[(3) - (3)].nac),22);
+                       coupletmp->suiv = NULL;
+                       (yyval.lc) = coupletmp;
+                     ;}
+    break;
+
+  case 371:
+#line 1992 "fortran.y"
+    {
+                       if ( couldaddvariable == 1 ) (yyval.lc) = (yyvsp[(1) - (1)].lc);
+                    ;}
+    break;
+
+  case 372:
+#line 1996 "fortran.y"
+    {
+                        if ( couldaddvariable == 1 )
+                        {
+                        /* insert the variable in the list $1                 */
+                        (yyvsp[(3) - (3)].lc)->suiv = (yyvsp[(1) - (3)].lc);
+                        (yyval.lc) = (yyvsp[(3) - (3)].lc);
+                        }
+                    ;}
+    break;
+
+  case 373:
+#line 2006 "fortran.y"
+    {
+                       coupletmp =(listcouple *)malloc(sizeof(listcouple));
+                       strcpy(coupletmp->c_namevar,(yyvsp[(1) - (3)].nac));
+                       Save_Length((yyvsp[(1) - (3)].nac),21);
+                       strcpy(coupletmp->c_namepointedvar,(yyvsp[(3) - (3)].nac));
+                       Save_Length((yyvsp[(3) - (3)].nac),22);
+                       coupletmp->suiv = NULL;
+                       (yyval.lc) = coupletmp;
+                       pointedvar=1;
+                       Add_UsedInSubroutine_Var_1((yyvsp[(1) - (3)].nac));
+                    ;}
+    break;
+
+  case 374:
+#line 2017 "fortran.y"
+    {
+                       coupletmp =(listcouple *)malloc(sizeof(listcouple));
+                       strcpy(coupletmp->c_namevar,(yyvsp[(1) - (1)].nac));
+                       Save_Length((yyvsp[(1) - (1)].nac),21);
+                       strcpy(coupletmp->c_namepointedvar,"");
+                       coupletmp->suiv = NULL;
+                       (yyval.lc) = coupletmp;
+                     ;}
+    break;
+
+  case 376:
+#line 2028 "fortran.y"
+    {
+                         Add_SubroutineWhereAgrifUsed_1(subroutinename,
+                                                        curmodulename);
+                                                        inallocate = 0;
+                     ;}
+    break;
+
+  case 377:
+#line 2034 "fortran.y"
+    {
+                          Add_SubroutineWhereAgrifUsed_1(subroutinename,
+                                                         curmodulename);
+                                                         inallocate = 0;
+                     ;}
+    break;
+
+  case 379:
+#line 2041 "fortran.y"
+    {
+                       GlobalDeclaration = 0 ;
+                       if ( firstpass == 0 &&
+                            strcasecmp(subroutinename,"") )
+                       {
+                          if ( module_declar && insubroutinedeclare == 0 )
+                          {
+                              fclose(module_declar);
+                          }
+                       }
+                       if ( couldaddvariable == 1 &&
+                            strcasecmp(subroutinename,"") )
+                       {
+                       if ( inmodulemeet == 1 )
+                       {
+                         /* we are in a module                                */
+                         if ( insubroutinedeclare == 1 )
+                         {
+                            /* it is like an end subroutine <name>            */
+                            insubroutinedeclare = 0 ;
+                            /*                                                */
+                            pos_cur = setposcur();
+                            closeandcallsubloopandincludeit_0(1);
+                            functiondeclarationisdone = 0;
+                         }
+                         else
+                         {
+                            /* it is like an end module <name>                */
+                            inmoduledeclare = 0 ;
+                            inmodulemeet = 0 ;
+                         }
+                       }
+                       else
+                       {
+                          insubroutinedeclare = 0;
+                          /*                                                  */
+                          pos_cur = setposcur();   
+                          closeandcallsubloopandincludeit_0(2);
+                            functiondeclarationisdone = 0;
+                          if ( firstpass == 0 )
+                          {
+                             if ( retour77 == 0 ) fprintf(paramout,"!\n");
+                             else fprintf(paramout,"C\n");
+                             fclose(paramout);
+                           }
+                        }
+                      }
+                      strcpy(subroutinename,"");
+                    ;}
+    break;
+
+  case 380:
+#line 2091 "fortran.y"
+    {
+                       if ( couldaddvariable == 1 )
+                       {
+                       insubroutinedeclare = 0;
+                       /*                                                     */
+                       pos_cur = setposcur();                      
+                       closeandcallsubloopandincludeit_0(3);
+                            functiondeclarationisdone = 0;
+                      if ( firstpass == 0 )
+                      {
+                         if ( retour77 == 0 ) fprintf(paramout,"!\n");
+                         else fprintf(paramout,"C\n");
+                         fclose(paramout);
+                      }
+                      strcpy(subroutinename,"");
+                      }
+                    ;}
+    break;
+
+  case 381:
+#line 2109 "fortran.y"
+    {
+                       if ( couldaddvariable == 1 &&
+                            strcasecmp(subroutinename,"") )
+                       {
+                       insubroutinedeclare = 0;
+                       /*                                                     */
+                       pos_cur = setposcur();
+                                             
+                       closeandcallsubloopandincludeit_0(1);
+                            functiondeclarationisdone = 0;
+                      if ( firstpass == 0 )
+                      {
+                         if ( retour77 == 0 ) fprintf(paramout,"!\n");
+                         else fprintf(paramout,"C\n");
+                         fclose(paramout);
+                      }
+                      strcpy(subroutinename,"");
+                      }
+                    ;}
+    break;
+
+  case 382:
+#line 2129 "fortran.y"
+    {
+                       if ( couldaddvariable == 1 )
+                       {
+                       insubroutinedeclare = 0;
+                       /*                                                     */
+                       pos_cur = setposcur();
+
+                       closeandcallsubloopandincludeit_0(0);
+                            functiondeclarationisdone = 0;
+                      if ( firstpass == 0 )
+                      {
+                         if ( retour77 == 0 ) fprintf(paramout,"!\n");
+                         else fprintf(paramout,"C\n");
+                         fclose(paramout);
+                      }
+                      strcpy(subroutinename,"");
+                      }
+                    ;}
+    break;
+
+  case 383:
+#line 2148 "fortran.y"
+    {
+                       if ( couldaddvariable == 1 )
+                       {
+                       /* if we never meet the contains keyword               */
+                      Remove_Word_end_module_0(strlen((yyvsp[(2) - (2)].nac)));
+                       if ( inmoduledeclare == 1 )
+                       {
+                          if ( aftercontainsdeclare == 0 )
+                          {
+                             Write_GlobalParameter_Declaration_0();
+                             Write_NotGridDepend_Declaration_0();
+                             Write_GlobalType_Declaration_0();
+                             Write_Alloc_Subroutine_For_End_0();
+                          }
+                       }
+                                           
+                       inmoduledeclare = 0 ;
+                       inmodulemeet = 0 ;
+
+                      Write_Word_end_module_0();
+                      strcpy(curmodulename,"");
+                      aftercontainsdeclare = 1;
+                      if ( firstpass == 0 )
+                      {
+                         if ( module_declar && insubroutinedeclare == 0)
+                         {
+                           fclose(module_declar);
+                         }
+                      }
+                      GlobalDeclaration = 0 ;
+                      }
+                  ;}
+    break;
+
+  case 397:
+#line 2194 "fortran.y"
+    {
+                      if (inmoduledeclare == 1 )
+                      {
+                         Remove_Word_Contains_0();
+                         Write_GlobalParameter_Declaration_0();
+                         Write_GlobalType_Declaration_0();
+                         Write_NotGridDepend_Declaration_0();
+                         Write_Alloc_Subroutine_0();
+                         inmoduledeclare = 0 ;
+                         aftercontainsdeclare = 1;
+                      }
+                      else
+                      {
+                      incontainssubroutine = 1;
+                      strcpy(previoussubroutinename,subroutinename);
+                       if ( couldaddvariable == 1 )
+                       {
+                          if ( firstpass == 1 ) List_ContainsSubroutine =
+                                                Addtolistnom(subroutinename,
+                                                     List_ContainsSubroutine,0);
+                          insubroutinedeclare = 0;
+                          /*                                                  */
+
+                          closeandcallsubloop_contains_0();
+                            functiondeclarationisdone = 0;
+                         if ( firstpass == 0 )
+                         {
+                            if ( retour77 == 0 ) fprintf(paramout,"!\n");
+                            else fprintf(paramout,"C\n");
+                            fclose(paramout);
+                         }
+                         }
+                         strcpy(subroutinename,"");
+                      }
+                   ;}
+    break;
+
+  case 398:
+#line 2231 "fortran.y"
+    {
+                      if ( couldaddvariable == 1 )
+                      {
+                       strcpy((yyval.nac),(yyvsp[(1) - (1)].nac));
+                       pos_endsubroutine = setposcur()-strlen((yyvsp[(1) - (1)].nac));
+                       functiondeclarationisdone = 0;
+                       }
+                    ;}
+    break;
+
+  case 399:
+#line 2241 "fortran.y"
+    {
+                      if ( couldaddvariable == 1 )
+                      {
+                       strcpy((yyval.nac),(yyvsp[(1) - (1)].nac));
+                       pos_endsubroutine = setposcur()-strlen((yyvsp[(1) - (1)].nac));
+                       }
+                    ;}
+    break;
+
+  case 400:
+#line 2250 "fortran.y"
+    {
+                      if ( couldaddvariable == 1 )
+                      {
+                       strcpy((yyval.nac),(yyvsp[(1) - (1)].nac));
+                       pos_endsubroutine = setposcur()-strlen((yyvsp[(1) - (1)].nac));
+                       }
+                    ;}
+    break;
+
+  case 401:
+#line 2259 "fortran.y"
+    {
+                      if ( couldaddvariable == 1 )
+                      {
+                       strcpy((yyval.nac),(yyvsp[(1) - (1)].nac));
+                       pos_endsubroutine = setposcur()-strlen((yyvsp[(1) - (1)].nac));
+                       }
+                    ;}
+    break;
+
+  case 413:
+#line 2281 "fortran.y"
+    {strcpy((yyval.nac),"");;}
+    break;
+
+  case 414:
+#line 2282 "fortran.y"
+    {strcpy((yyval.nac),(yyvsp[(1) - (1)].nac));;}
+    break;
+
+  case 424:
+#line 2302 "fortran.y"
+    {
+                          Add_SubroutineWhereAgrifUsed_1(subroutinename,
+                                                        curmodulename);
+                                                        inallocate = 0;
+                     ;}
+    break;
+
+  case 425:
+#line 2308 "fortran.y"
+    {
+                          Add_SubroutineWhereAgrifUsed_1(subroutinename,
+                                                        curmodulename);
+                                                        inallocate = 0;
+                     ;}
+    break;
+
+  case 431:
+#line 2319 "fortran.y"
+    {if ( couldaddvariable == 1 ) created_dimensionlist = 0;;}
+    break;
+
+  case 432:
+#line 2321 "fortran.y"
+    {
+                  created_dimensionlist = 1;
+                  if  ( agrif_parentcall == 1 )
+                  {
+                      ModifyTheAgrifFunction_0((yyvsp[(3) - (4)].d)->dim.last);
+                      agrif_parentcall =0;
+                      fprintf(fortranout," = ");
+                  }
+              ;}
+    break;
+
+  case 433:
+#line 2331 "fortran.y"
+    {created_dimensionlist = 1;;}
+    break;
+
+  case 438:
+#line 2339 "fortran.y"
+    {
+                      inagrifcallargument = 0 ;
+                      incalldeclare=0;
+                      if ( oldfortranout &&
+                           !strcasecmp(meetagrifinitgrids,subroutinename) &&
+                           firstpass == 0 &&
+                           callmpiinit == 1)
+                      {
+                      /*   pos_end = setposcur();
+                         RemoveWordSET_0(fortranout,pos_curcall,
+                                               pos_end-pos_curcall);
+                         fprintf(oldfortranout,"      Call MPI_Init (%s) \n"
+                                                                   ,mpiinitvar);*/
+                      }
+                      if ( oldfortranout           &&
+                           callagrifinitgrids == 1 &&
+                           firstpass == 0 )
+                      {
+                         pos_end = setposcur();
+                         RemoveWordSET_0(fortranout,pos_curcall,
+                                               pos_end-pos_curcall);
+
+                         strcpy(subofagrifinitgrids,subroutinename);
+                      }
+                      Instanciation_0(sameagrifname);
+                   ;}
+    break;
+
+  case 443:
+#line 2373 "fortran.y"
+    {
+                       if (!strcasecmp((yyvsp[(2) - (2)].nac),"MPI_Init") )
+                       {
+                          callmpiinit = 1;
+                       }
+                       else
+                       {
+                          callmpiinit = 0;
+                       }
+                       if (!strcasecmp((yyvsp[(2) - (2)].nac),"Agrif_Init_Grids") )
+                       {
+                          callagrifinitgrids = 1;
+                          strcpy(meetagrifinitgrids,subroutinename);
+                       }
+                       else callagrifinitgrids = 0;
+                       if ( !strcasecmp((yyvsp[(2) - (2)].nac),"Agrif_Open_File") )
+                       {
+                          Add_SubroutineWhereAgrifUsed_1(subroutinename,
+                                                        curmodulename);
+                       }
+                       if ( Vartonumber((yyvsp[(2) - (2)].nac)) == 1 )
+                       {
+                          incalldeclare=1;
+                          inagrifcallargument = 1 ;
+                          Add_SubroutineWhereAgrifUsed_1(subroutinename,
+                                                        curmodulename);
+                       }
+                    ;}
+    break;
+
+  case 444:
+#line 2403 "fortran.y"
+    {pos_curcall=setposcur()-4;;}
+    break;
+
+  case 447:
+#line 2408 "fortran.y"
+    {
+                  if ( callmpiinit == 1 )
+                  {
+                     strcpy(mpiinitvar,(yyvsp[(1) - (1)].na));
+                     if ( firstpass == 1 )
+                     {
+                        Add_UsedInSubroutine_Var_1 (mpiinitvar);
+/*                        curvar=createvar($1,NULL);
+                        curlistvar=insertvar(NULL,curvar);
+                        List_Subr outineArgument_Var = AddListvarToListvar
+                         (curlistvar,List_SubroutineAr gument_Var,1);*/
+                     }
+                  }
+               ;}
+    break;
+
+  case 517:
+#line 2530 "fortran.y"
+    {if ( couldaddvariable == 1 ) strcpy((yyval.na),(yyvsp[(1) - (1)].na));;}
+    break;
+
+  case 518:
+#line 2531 "fortran.y"
+    {if ( couldaddvariable == 1 ) strcpy((yyval.na),(yyvsp[(1) - (1)].na));;}
+    break;
+
+  case 519:
+#line 2532 "fortran.y"
+    {if ( couldaddvariable == 1 ) strcpy((yyval.na),(yyvsp[(1) - (1)].na));;}
+    break;
+
+  case 520:
+#line 2535 "fortran.y"
+    {if ( couldaddvariable == 1 ) sprintf((yyval.na),"%s,%s",(yyvsp[(1) - (3)].na),(yyvsp[(3) - (3)].na));;}
+    break;
+
+  case 521:
+#line 2537 "fortran.y"
+    {if ( couldaddvariable == 1 ) sprintf((yyval.na),"%s,%s",(yyvsp[(1) - (3)].na),(yyvsp[(3) - (3)].na));;}
+    break;
+
+  case 522:
+#line 2539 "fortran.y"
+    {if ( couldaddvariable == 1 ) sprintf((yyval.na),"%s,%s",(yyvsp[(1) - (3)].na),(yyvsp[(3) - (3)].na));;}
+    break;
+
+  case 523:
+#line 2541 "fortran.y"
+    {if ( couldaddvariable == 1 ) sprintf((yyval.na),"%s,%s",(yyvsp[(1) - (3)].na),(yyvsp[(3) - (3)].na));;}
+    break;
+
+  case 524:
+#line 2543 "fortran.y"
+    {if ( couldaddvariable == 1 ) sprintf((yyval.na),"%s,%s",(yyvsp[(1) - (3)].na),(yyvsp[(3) - (3)].na));;}
+    break;
+
+  case 525:
+#line 2545 "fortran.y"
+    {if ( couldaddvariable == 1 ) sprintf((yyval.na),"%s,%s",(yyvsp[(1) - (3)].na),(yyvsp[(3) - (3)].na));;}
+    break;
+
+  case 526:
+#line 2546 "fortran.y"
+    {if ( couldaddvariable == 1 ) strcpy((yyval.na),(yyvsp[(1) - (1)].na));;}
+    break;
+
+  case 527:
+#line 2547 "fortran.y"
+    {if ( couldaddvariable == 1 ) strcpy((yyval.na),(yyvsp[(1) - (1)].na));;}
+    break;
+
+  case 528:
+#line 2550 "fortran.y"
+    {if ( couldaddvariable == 1 ) strcpy((yyval.na),(yyvsp[(1) - (1)].na));;}
+    break;
+
+  case 529:
+#line 2552 "fortran.y"
+    {if ( couldaddvariable == 1 ) sprintf((yyval.na)," (%s)",(yyvsp[(2) - (3)].na));;}
+    break;
+
+  case 530:
+#line 2554 "fortran.y"
+    {if ( couldaddvariable == 1 ) sprintf((yyval.na),"(%s,%s)",(yyvsp[(2) - (5)].na),(yyvsp[(4) - (5)].na));;}
+    break;
+
+  case 531:
+#line 2556 "fortran.y"
+    {if ( couldaddvariable == 1 ) sprintf((yyval.na),"(%s,%s)",(yyvsp[(2) - (5)].na),(yyvsp[(4) - (5)].na));;}
+    break;
+
+  case 532:
+#line 2558 "fortran.y"
+    {if ( couldaddvariable == 1 ) sprintf((yyval.na),"(%s,%s)",(yyvsp[(2) - (5)].na),(yyvsp[(4) - (5)].na));;}
+    break;
+
+  case 533:
+#line 2562 "fortran.y"
+    {if ( couldaddvariable == 1 )
+                                              sprintf((yyval.na),"%s=%s,%s)",(yyvsp[(1) - (5)].nac),(yyvsp[(3) - (5)].na),(yyvsp[(5) - (5)].na));;}
+    break;
+
+  case 534:
+#line 2565 "fortran.y"
+    {if ( couldaddvariable == 1 )
+                                        sprintf((yyval.na),"%s=%s,%s,%s)",(yyvsp[(1) - (7)].nac),(yyvsp[(3) - (7)].na),(yyvsp[(5) - (7)].na),(yyvsp[(7) - (7)].na));;}
+    break;
+
+  case 541:
+#line 2581 "fortran.y"
+    {Add_Allocate_Var_1((yyvsp[(1) - (1)].nac),curmodulename);;}
+    break;
+
+  case 544:
+#line 2586 "fortran.y"
+    {Add_Allocate_Var_1((yyvsp[(1) - (4)].nac),curmodulename);;}
+    break;
+
+  case 552:
+#line 2609 "fortran.y"
+    {strcpy((yyval.nac),(yyvsp[(1) - (1)].nac));;}
+    break;
+
+
+/* Line 1267 of yacc.c.  */
+#line 6445 "fortran.tab.c"
+      default: break;
+    }
+  YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
+
+  YYPOPSTACK (yylen);
+  yylen = 0;
+  YY_STACK_PRINT (yyss, yyssp);
+
+  *++yyvsp = yyval;
+
+
+  /* Now `shift' the result of the reduction.  Determine what state
+     that goes to, based on the state we popped back to and the rule
+     number reduced by.  */
+
+  yyn = yyr1[yyn];
+
+  yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
+  if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
+    yystate = yytable[yystate];
+  else
+    yystate = yydefgoto[yyn - YYNTOKENS];
+
+  goto yynewstate;
+
+
+/*------------------------------------.
+| yyerrlab -- here on detecting error |
+`------------------------------------*/
+yyerrlab:
+  /* If not already recovering from an error, report this error.  */
+  if (!yyerrstatus)
+    {
+      ++yynerrs;
+#if ! YYERROR_VERBOSE
+      yyerror (YY_("syntax error"));
+#else
+      {
+	YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
+	if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
+	  {
+	    YYSIZE_T yyalloc = 2 * yysize;
+	    if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
+	      yyalloc = YYSTACK_ALLOC_MAXIMUM;
+	    if (yymsg != yymsgbuf)
+	      YYSTACK_FREE (yymsg);
+	    yymsg = (char *) YYSTACK_ALLOC (yyalloc);
+	    if (yymsg)
+	      yymsg_alloc = yyalloc;
+	    else
+	      {
+		yymsg = yymsgbuf;
+		yymsg_alloc = sizeof yymsgbuf;
+	      }
+	  }
+
+	if (0 < yysize && yysize <= yymsg_alloc)
+	  {
+	    (void) yysyntax_error (yymsg, yystate, yychar);
+	    yyerror (yymsg);
+	  }
+	else
+	  {
+	    yyerror (YY_("syntax error"));
+	    if (yysize != 0)
+	      goto yyexhaustedlab;
+	  }
+      }
+#endif
+    }
+
+
+
+  if (yyerrstatus == 3)
+    {
+      /* If just tried and failed to reuse look-ahead token after an
+	 error, discard it.  */
+
+      if (yychar <= YYEOF)
+	{
+	  /* Return failure if at end of input.  */
+	  if (yychar == YYEOF)
+	    YYABORT;
+	}
+      else
+	{
+	  yydestruct ("Error: discarding",
+		      yytoken, &yylval);
+	  yychar = YYEMPTY;
+	}
+    }
+
+  /* Else will try to reuse look-ahead token after shifting the error
+     token.  */
+  goto yyerrlab1;
+
+
+/*---------------------------------------------------.
+| yyerrorlab -- error raised explicitly by YYERROR.  |
+`---------------------------------------------------*/
+yyerrorlab:
+
+  /* Pacify compilers like GCC when the user code never invokes
+     YYERROR and the label yyerrorlab therefore never appears in user
+     code.  */
+  if (/*CONSTCOND*/ 0)
+     goto yyerrorlab;
+
+  /* Do not reclaim the symbols of the rule which action triggered
+     this YYERROR.  */
+  YYPOPSTACK (yylen);
+  yylen = 0;
+  YY_STACK_PRINT (yyss, yyssp);
+  yystate = *yyssp;
+  goto yyerrlab1;
+
+
+/*-------------------------------------------------------------.
+| yyerrlab1 -- common code for both syntax error and YYERROR.  |
+`-------------------------------------------------------------*/
+yyerrlab1:
+  yyerrstatus = 3;	/* Each real token shifted decrements this.  */
+
+  for (;;)
+    {
+      yyn = yypact[yystate];
+      if (yyn != YYPACT_NINF)
+	{
+	  yyn += YYTERROR;
+	  if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
+	    {
+	      yyn = yytable[yyn];
+	      if (0 < yyn)
+		break;
+	    }
+	}
+
+      /* Pop the current state because it cannot handle the error token.  */
+      if (yyssp == yyss)
+	YYABORT;
+
+
+      yydestruct ("Error: popping",
+		  yystos[yystate], yyvsp);
+      YYPOPSTACK (1);
+      yystate = *yyssp;
+      YY_STACK_PRINT (yyss, yyssp);
+    }
+
+  if (yyn == YYFINAL)
+    YYACCEPT;
+
+  *++yyvsp = yylval;
+
+
+  /* Shift the error token.  */
+  YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
+
+  yystate = yyn;
+  goto yynewstate;
+
+
+/*-------------------------------------.
+| yyacceptlab -- YYACCEPT comes here.  |
+`-------------------------------------*/
+yyacceptlab:
+  yyresult = 0;
+  goto yyreturn;
+
+/*-----------------------------------.
+| yyabortlab -- YYABORT comes here.  |
+`-----------------------------------*/
+yyabortlab:
+  yyresult = 1;
+  goto yyreturn;
+
+#ifndef yyoverflow
+/*-------------------------------------------------.
+| yyexhaustedlab -- memory exhaustion comes here.  |
+`-------------------------------------------------*/
+yyexhaustedlab:
+  yyerror (YY_("memory exhausted"));
+  yyresult = 2;
+  /* Fall through.  */
+#endif
+
+yyreturn:
+  if (yychar != YYEOF && yychar != YYEMPTY)
+     yydestruct ("Cleanup: discarding lookahead",
+		 yytoken, &yylval);
+  /* Do not reclaim the symbols of the rule which action triggered
+     this YYABORT or YYACCEPT.  */
+  YYPOPSTACK (yylen);
+  YY_STACK_PRINT (yyss, yyssp);
+  while (yyssp != yyss)
+    {
+      yydestruct ("Cleanup: popping",
+		  yystos[*yyssp], yyvsp);
+      YYPOPSTACK (1);
+    }
+#ifndef yyoverflow
+  if (yyss != yyssa)
+    YYSTACK_FREE (yyss);
+#endif
+#if YYERROR_VERBOSE
+  if (yymsg != yymsgbuf)
+    YYSTACK_FREE (yymsg);
+#endif
+  /* Make sure YYID is used.  */
+  return YYID (yyresult);
+}
+
+
+#line 2611 "fortran.y"
+
+
+void processfortran(char *fichier_entree)
+{
+   extern FILE *fortranin;
+   extern FILE *fortranout;
+   char nomfile[LONG_C];
+   int c;
+   int confirmyes;
+
+/*   fortrandebug = 1;*/
+   if ( mark == 1 ) printf("Firstpass == %d \n",firstpass);
+/******************************************************************************/
+/*  1-  Open input and output files                                           */
+/******************************************************************************/
+   strcpy(nomfile,commondirin);
+   strcat(nomfile,"/");
+   strcat(nomfile,fichier_entree);
+   fortranin=fopen( nomfile,"r");
+   if (! fortranin)
+   {
+      printf("Error : File %s does not exist\n",nomfile);
+      exit(1);
+   }
+
+   strcpy(curfile,nomfile);
+   strcpy(nomfile,commondirout);
+   strcat(nomfile,"/");
+   strcat(nomfile,fichier_entree);
+   strcpy(nomfileoutput,nomfile);
+   Save_Length(nomfileoutput,31);
+   if (firstpass == 1)
+   {
+      if (checkexistcommon == 1)
+      {
+         if (fopen(nomfile,"r"))
+         {
+            printf("Warning : file %s already exist\n",nomfile);
+            confirmyes = 0;
+            while (confirmyes==0)
+            {
+               printf("Override file %s ? [Y/N]\n",nomfile);
+               c=getchar();
+               getchar();
+               if (c==79 || c==110)
+               {
+                  printf("We stop\n");
+                  exit(1);
+               }
+               if (c==89 || c==121)
+               {
+                  confirmyes=1;
+               }
+            }
+         }
+      }
+   }
+
+/******************************************************************************/
+/*  2-  Variables initialization                                              */
+/******************************************************************************/
+
+   line_num_fortran_common=1;
+   line_num_fortran=1;
+   PublicDeclare = 0;
+   PrivateDeclare = 0;
+   ExternalDeclare = 0;
+   SaveDeclare = 0;
+   pointerdeclare = 0;
+   optionaldeclare = 0;
+   incalldeclare = 0;
+   VarType = 0;
+   VarTypepar = 0;
+   Allocatabledeclare = 0 ;
+   Targetdeclare = 0 ;
+   strcpy(NamePrecision," ");
+   VariableIsParameter =  0 ;
+   strcpy(NamePrecision,"");
+   c_star = 0 ;
+   functiondeclarationisdone = 0;
+   insubroutinedeclare = 0 ;
+   ininterfacedeclare = 0 ;   
+   strcpy(subroutinename," ");
+   isrecursive = 0;
+   InitialValueGiven = 0 ;
+   strcpy(EmptyChar," ");
+   inmoduledeclare = 0;
+   incontainssubroutine = 0;
+   colnum=0;
+   incom=0;
+   couldaddvariable=1;
+   afterpercent = 0;
+   aftercontainsdeclare = 1;
+   strcpy(nameinttypename,"");
+   /* Name of the file without format                                         */
+   tmp = strchr(fichier_entree, '.');
+   strncpy(curfilename,fichier_entree,strlen(fichier_entree)-strlen(tmp));
+   Save_Length(curfilename,30);
+/******************************************************************************/
+/*  3-  Parsing of the input file (1 time)                                    */
+/******************************************************************************/
+   if (firstpass == 0 )
+   {
+      fortranout=fopen(nomfileoutput,"w");
+
+/*      NewModule_Creation_0();*/
+   }
+
+   fortranparse();
+
+   if (firstpass == 0 )
+   {
+   NewModule_Creation_0();
+   }
+   
+   strcpy(curfile,mainfile);
+
+   if (firstpass == 0 )
+   {
+   fclose(fortranout);
+   }
+}
+
+#line 2 "fortran.yy.c"
+
+#line 4 "fortran.yy.c"
+
+#define  YY_INT_ALIGNED short int
+
+/* A lexical scanner generated by flex */
+
+#define yy_create_buffer fortran_create_buffer
+#define yy_delete_buffer fortran_delete_buffer
+#define yy_flex_debug fortran_flex_debug
+#define yy_init_buffer fortran_init_buffer
+#define yy_flush_buffer fortran_flush_buffer
+#define yy_load_buffer_state fortran_load_buffer_state
+#define yy_switch_to_buffer fortran_switch_to_buffer
+#define yyin fortranin
+#define yyleng fortranleng
+#define yylex fortranlex
+#define yylineno fortranlineno
+#define yyout fortranout
+#define yyrestart fortranrestart
+#define yytext fortrantext
+#define yywrap fortranwrap
+#define yyalloc fortranalloc
+#define yyrealloc fortranrealloc
+#define yyfree fortranfree
+
+#define FLEX_SCANNER
+#define YY_FLEX_MAJOR_VERSION 2
+#define YY_FLEX_MINOR_VERSION 5
+#define YY_FLEX_SUBMINOR_VERSION 35
+#if YY_FLEX_SUBMINOR_VERSION > 0
+#define FLEX_BETA
+#endif
+
+/* First, we deal with  platform-specific or compiler-specific issues. */
+
+/* begin standard C headers. */
+#include <stdio.h>
+#include <string.h>
+#include <errno.h>
+#include <stdlib.h>
+
+/* end standard C headers. */
+
+/* flex integer type definitions */
+
+#ifndef FLEXINT_H
+#define FLEXINT_H
+
+/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
+
+#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+
+/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
+ * if you want the limit (max/min) macros for int types. 
+ */
+#ifndef __STDC_LIMIT_MACROS
+#define __STDC_LIMIT_MACROS 1
+#endif
+
+#include <inttypes.h>
+typedef int8_t flex_int8_t;
+typedef uint8_t flex_uint8_t;
+typedef int16_t flex_int16_t;
+typedef uint16_t flex_uint16_t;
+typedef int32_t flex_int32_t;
+typedef uint32_t flex_uint32_t;
+#else
+typedef signed char flex_int8_t;
+typedef short int flex_int16_t;
+typedef int flex_int32_t;
+typedef unsigned char flex_uint8_t; 
+typedef unsigned short int flex_uint16_t;
+typedef unsigned int flex_uint32_t;
+#endif /* ! C99 */
+
+/* Limits of integral types. */
+#ifndef INT8_MIN
+#define INT8_MIN               (-128)
+#endif
+#ifndef INT16_MIN
+#define INT16_MIN              (-32767-1)
+#endif
+#ifndef INT32_MIN
+#define INT32_MIN              (-2147483647-1)
+#endif
+#ifndef INT8_MAX
+#define INT8_MAX               (127)
+#endif
+#ifndef INT16_MAX
+#define INT16_MAX              (32767)
+#endif
+#ifndef INT32_MAX
+#define INT32_MAX              (2147483647)
+#endif
+#ifndef UINT8_MAX
+#define UINT8_MAX              (255U)
+#endif
+#ifndef UINT16_MAX
+#define UINT16_MAX             (65535U)
+#endif
+#ifndef UINT32_MAX
+#define UINT32_MAX             (4294967295U)
+#endif
+
+#endif /* ! FLEXINT_H */
+
+#ifdef __cplusplus
+
+/* The "const" storage-class-modifier is valid. */
+#define YY_USE_CONST
+
+#else	/* ! __cplusplus */
+
+/* C99 requires __STDC__ to be defined as 1. */
+#if defined (__STDC__)
+
+#define YY_USE_CONST
+
+#endif	/* defined (__STDC__) */
+#endif	/* ! __cplusplus */
+
+#ifdef YY_USE_CONST
+#define yyconst const
+#else
+#define yyconst
+#endif
+
+/* Returned upon end-of-file. */
+#define YY_NULL 0
+
+/* Promotes a possibly negative, possibly signed char to an unsigned
+ * integer for use as an array index.  If the signed char is negative,
+ * we want to instead treat it as an 8-bit unsigned char, hence the
+ * double cast.
+ */
+#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
+
+/* Enter a start condition.  This macro really ought to take a parameter,
+ * but we do it the disgusting crufty way forced on us by the ()-less
+ * definition of BEGIN.
+ */
+#define BEGIN (yy_start) = 1 + 2 *
+
+/* Translate the current start state into a value that can be later handed
+ * to BEGIN to return to the state.  The YYSTATE alias is for lex
+ * compatibility.
+ */
+#define YY_START (((yy_start) - 1) / 2)
+#define YYSTATE YY_START
+
+/* Action number for EOF rule of a given start state. */
+#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
+
+/* Special action meaning "start processing a new file". */
+#define YY_NEW_FILE fortranrestart(fortranin  )
+
+#define YY_END_OF_BUFFER_CHAR 0
+
+/* Size of default input buffer. */
+#ifndef YY_BUF_SIZE
+#define YY_BUF_SIZE 16384
+#endif
+
+/* The state buf must be large enough to hold one state per character in the main buffer.
+ */
+#define YY_STATE_BUF_SIZE   ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
+
+#ifndef YY_TYPEDEF_YY_BUFFER_STATE
+#define YY_TYPEDEF_YY_BUFFER_STATE
+typedef struct yy_buffer_state *YY_BUFFER_STATE;
+#endif
+
+#ifndef YY_TYPEDEF_YY_SIZE_T
+#define YY_TYPEDEF_YY_SIZE_T
+typedef size_t yy_size_t;
+#endif
+
+extern yy_size_t fortranleng;
+
+extern FILE *fortranin, *fortranout;
+
+#define EOB_ACT_CONTINUE_SCAN 0
+#define EOB_ACT_END_OF_FILE 1
+#define EOB_ACT_LAST_MATCH 2
+
+    #define YY_LESS_LINENO(n)
+    
+/* Return all but the first "n" matched characters back to the input stream. */
+#define yyless(n) \
+	do \
+		{ \
+		/* Undo effects of setting up fortrantext. */ \
+        int yyless_macro_arg = (n); \
+        YY_LESS_LINENO(yyless_macro_arg);\
+		*yy_cp = (yy_hold_char); \
+		YY_RESTORE_YY_MORE_OFFSET \
+		(yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
+		YY_DO_BEFORE_ACTION; /* set up fortrantext again */ \
+		} \
+	while ( 0 )
+
+#define unput(c) yyunput( c, (yytext_ptr)  )
+
+#ifndef YY_STRUCT_YY_BUFFER_STATE
+#define YY_STRUCT_YY_BUFFER_STATE
+struct yy_buffer_state
+	{
+	FILE *yy_input_file;
+
+	char *yy_ch_buf;		/* input buffer */
+	char *yy_buf_pos;		/* current position in input buffer */
+
+	/* Size of input buffer in bytes, not including room for EOB
+	 * characters.
+	 */
+	yy_size_t yy_buf_size;
+
+	/* Number of characters read into yy_ch_buf, not including EOB
+	 * characters.
+	 */
+	yy_size_t yy_n_chars;
+
+	/* Whether we "own" the buffer - i.e., we know we created it,
+	 * and can realloc() it to grow it, and should free() it to
+	 * delete it.
+	 */
+	int yy_is_our_buffer;
+
+	/* Whether this is an "interactive" input source; if so, and
+	 * if we're using stdio for input, then we want to use getc()
+	 * instead of fread(), to make sure we stop fetching input after
+	 * each newline.
+	 */
+	int yy_is_interactive;
+
+	/* Whether we're considered to be at the beginning of a line.
+	 * If so, '^' rules will be active on the next match, otherwise
+	 * not.
+	 */
+	int yy_at_bol;
+
+    int yy_bs_lineno; /**< The line count. */
+    int yy_bs_column; /**< The column count. */
+    
+	/* Whether to try to fill the input buffer when we reach the
+	 * end of it.
+	 */
+	int yy_fill_buffer;
+
+	int yy_buffer_status;
+
+#define YY_BUFFER_NEW 0
+#define YY_BUFFER_NORMAL 1
+	/* When an EOF's been seen but there's still some text to process
+	 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
+	 * shouldn't try reading from the input source any more.  We might
+	 * still have a bunch of tokens to match, though, because of
+	 * possible backing-up.
+	 *
+	 * When we actually see the EOF, we change the status to "new"
+	 * (via fortranrestart()), so that the user can continue scanning by
+	 * just pointing fortranin at a new input file.
+	 */
+#define YY_BUFFER_EOF_PENDING 2
+
+	};
+#endif /* !YY_STRUCT_YY_BUFFER_STATE */
+
+/* Stack of input buffers. */
+static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
+static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
+static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
+
+/* We provide macros for accessing buffer states in case in the
+ * future we want to put the buffer states in a more general
+ * "scanner state".
+ *
+ * Returns the top of the stack, or NULL.
+ */
+#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
+                          ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
+                          : NULL)
+
+/* Same as previous macro, but useful when we know that the buffer stack is not
+ * NULL or when we need an lvalue. For internal use only.
+ */
+#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
+
+/* yy_hold_char holds the character lost when fortrantext is formed. */
+static char yy_hold_char;
+static yy_size_t yy_n_chars;		/* number of characters read into yy_ch_buf */
+yy_size_t fortranleng;
+
+/* Points to current character in buffer. */
+static char *yy_c_buf_p = (char *) 0;
+static int yy_init = 0;		/* whether we need to initialize */
+static int yy_start = 0;	/* start state number */
+
+/* Flag which is used to allow fortranwrap()'s to do buffer switches
+ * instead of setting up a fresh fortranin.  A bit of a hack ...
+ */
+static int yy_did_buffer_switch_on_eof;
+
+void fortranrestart (FILE *input_file  );
+void fortran_switch_to_buffer (YY_BUFFER_STATE new_buffer  );
+YY_BUFFER_STATE fortran_create_buffer (FILE *file,int size  );
+void fortran_delete_buffer (YY_BUFFER_STATE b  );
+void fortran_flush_buffer (YY_BUFFER_STATE b  );
+void fortranpush_buffer_state (YY_BUFFER_STATE new_buffer  );
+void fortranpop_buffer_state (void );
+
+static void fortranensure_buffer_stack (void );
+static void fortran_load_buffer_state (void );
+static void fortran_init_buffer (YY_BUFFER_STATE b,FILE *file  );
+
+#define YY_FLUSH_BUFFER fortran_flush_buffer(YY_CURRENT_BUFFER )
+
+YY_BUFFER_STATE fortran_scan_buffer (char *base,yy_size_t size  );
+YY_BUFFER_STATE fortran_scan_string (yyconst char *yy_str  );
+YY_BUFFER_STATE fortran_scan_bytes (yyconst char *bytes,yy_size_t len  );
+
+void *fortranalloc (yy_size_t  );
+void *fortranrealloc (void *,yy_size_t  );
+void fortranfree (void *  );
+
+#define yy_new_buffer fortran_create_buffer
+
+#define yy_set_interactive(is_interactive) \
+	{ \
+	if ( ! YY_CURRENT_BUFFER ){ \
+        fortranensure_buffer_stack (); \
+		YY_CURRENT_BUFFER_LVALUE =    \
+            fortran_create_buffer(fortranin,YY_BUF_SIZE ); \
+	} \
+	YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
+	}
+
+#define yy_set_bol(at_bol) \
+	{ \
+	if ( ! YY_CURRENT_BUFFER ){\
+        fortranensure_buffer_stack (); \
+		YY_CURRENT_BUFFER_LVALUE =    \
+            fortran_create_buffer(fortranin,YY_BUF_SIZE ); \
+	} \
+	YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
+	}
+
+#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
+
+/* Begin user sect3 */
+
+typedef unsigned char YY_CHAR;
+
+FILE *fortranin = (FILE *) 0, *fortranout = (FILE *) 0;
+
+typedef int yy_state_type;
+
+extern int fortranlineno;
+
+int fortranlineno = 1;
+
+extern char *fortrantext;
+#define yytext_ptr fortrantext
+
+static yy_state_type yy_get_previous_state (void );
+static yy_state_type yy_try_NUL_trans (yy_state_type current_state  );
+static int yy_get_next_buffer (void );
+static void yy_fatal_error (yyconst char msg[]  );
+
+/* Done after the current pattern has been matched and before the
+ * corresponding action - sets up fortrantext.
+ */
+#define YY_DO_BEFORE_ACTION \
+	(yytext_ptr) = yy_bp; \
+	fortranleng = (size_t) (yy_cp - yy_bp); \
+	(yy_hold_char) = *yy_cp; \
+	*yy_cp = '\0'; \
+	(yy_c_buf_p) = yy_cp;
+
+#define YY_NUM_RULES 176
+#define YY_END_OF_BUFFER 177
+/* This struct is not used in this scanner,
+   but its presence is necessary. */
+struct yy_trans_info
+	{
+	flex_int32_t yy_verify;
+	flex_int32_t yy_nxt;
+	};
+static yyconst flex_int16_t yy_accept[1162] =
+    {   0,
+        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+        0,    0,  177,  176,  165,  161,  164,  175,  152,  151,
+      155,  167,  152,  154,  154,  154,  157,  153,  137,  150,
+      156,  159,  158,  160,  145,  145,  145,  145,  145,  145,
+      145,  145,  145,  145,  145,  145,  145,  145,  145,  145,
+      145,  145,  165,  161,  164,  175,  150,  145,  145,  145,
+      145,  145,  145,  176,  176,  173,  176,  176,  176,  161,
+      161,  154,  145,    0,    0,  165,    0,  166,    0,  164,
+      175,  175,  175,    0,  141,    0,    0,  167,  167,  167,
+      167,    0,    0,    0,  140,    0,    0,  132,   26,    0,
+
+      146,    0,    0,    0,    0,    0,    0,    0,  133,    0,
+      150,   25,    0,  145,  145,  145,  145,  145,  145,  145,
+      145,  145,  145,  145,  145,  145,  145,  145,  145,  145,
+       43,  145,  145,  145,  145,  145,  145,  145,  145,  145,
+      145,  145,  145,  145,   85,  145,  145,  145,  145,  145,
+      145,  145,  145,  145,  145,  145,  145,  145,  145,  145,
+      145,  145,  145,  145,  145,  145,  145,  145,  145,  145,
+      145,  145,  165,  163,    0,  163,    0,    0,    0,    0,
+        0,    0,  166,  162,  163,    0,  175,  174,  175,  175,
+      175,  163,  150,    4,  145,  145,  145,  145,   85,  145,
+
+      145,    0,  173,    0,    0,    0,    0,    0,    0,    0,
+      169,   26,    0,    0,    4,    0,  145,  145,  145,  145,
+      145,  145,    0,    0,    0,  175,  175,    0,    0,  167,
+      167,    0,    0,    0,    0,  139,    0,    0,    0,    0,
+        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+        0,  149,  146,    0,    0,    0,  142,    0,  145,  145,
+      145,  145,  145,  145,  145,  145,  145,  145,  145,  145,
+      145,  115,  145,  145,  145,    0,  145,  145,  145,  145,
+      145,   16,  145,  145,  145,  114,  145,  145,  145,  145,
+      145,    0,  145,    0,   96,  145,  145,  145,  145,  145,
+
+      121,  145,  145,  126,  145,  145,  145,  145,  145,  145,
+      145,   89,  145,  145,  145,  145,  145,  145,  145,  145,
+      145,  145,  145,  145,  145,  145,  118,  145,  145,  145,
+      145,  145,  122,  145,  145,  145,  145,  145,  165,  163,
+        0,  166,    0,    0,    0,    0,    0,    0,    0,    0,
+      163,    0,  163,  175,  175,  175,  150,    4,    4,    4,
+        4,  145,  145,  145,  145,  145,  145,  145,    0,    0,
+        0,    0,  170,    0,    0,  169,    0,    0,    4,    4,
+        4,    4,  142,    0,  145,  145,    0,  145,  145,  145,
+      145,    0,    0,    0,  175,  175,    0,    0,  167,  167,
+
+        0,    0,    0,    0,  147,    0,  146,    0,  148,    0,
+       28,    0,   30,   29,   32,   31,   34,    0,    0,   36,
+        0,  146,    0,  147,    0,  146,    0,  148,    0,  142,
+        0,  125,  117,  145,  145,  120,  123,  145,  145,   22,
+      145,  145,  145,  145,  145,  116,  145,  145,  145,    0,
+      145,  145,  145,   94,    0,  108,  145,  145,  145,  145,
+      145,  145,  145,  145,  145,    0,  109,  145,  145,  145,
+      145,  145,  145,  145,    0,   88,  145,  145,  145,  145,
+      145,  145,  145,    0,   98,  145,  145,    0,  111,  145,
+      145,  145,  145,  112,   21,  145,   60,   74,  145,  145,
+
+      145,  145,  145,  145,  145,  145,   79,   44,  145,  145,
+      145,  145,   69,  145,  127,  119,  145,   72,   54,  145,
+        0,   97,   99,  145,   92,  101,  145,  145,  165,  163,
+      166,    0,    0,    0,    0,    0,    0,    0,  163,    0,
+      163,  175,  175,  175,  150,    4,    4,  145,  145,  145,
+      145,  145,  145,   18,    0,    0,    0,    0,    0,  170,
+        0,    0,    4,    4,    0,  142,    0,  145,  145,  145,
+      145,    0,    0,    0,  175,  175,    0,    0,  167,  167,
+        0,    0,   38,   27,    0,   35,   37,    0,  142,    0,
+      142,  145,  145,  145,  145,  145,   49,  145,  145,  145,
+
+      124,  145,  145,    0,  145,  145,  145,    0,  145,  145,
+        0,    0,    0,    0,    0,    0,    0,    0,   42,  145,
+       95,  145,  145,  145,  145,  145,  145,  145,  145,   76,
+       76,   76,   76,  145,    0,  107,  113,  145,  145,   88,
+      145,  145,   90,  145,  145,  145,  145,  145,  145,  145,
+      145,  145,  145,  145,  145,  145,  145,   52,  145,   77,
+      145,  145,  145,    0,  145,  145,  145,  145,  145,  102,
+      145,  145,   55,   81,  165,  163,  166,    0,    0,    0,
+        0,    0,    0,  163,    0,  163,  175,  175,  175,  150,
+        4,    3,    0,  104,  145,  145,   86,  145,  145,   70,
+
+       71,   70,    0,    0,    0,    0,    4,    3,    0,  142,
+        0,  142,  145,   49,  145,  124,    0,   23,    0,  175,
+       23,    0,   23,   23,  167,   23,    0,   23,   23,   23,
+       33,  145,  145,   23,   23,   23,  145,  145,   63,  145,
+      145,  145,  145,    0,  145,  145,  138,    0,    0,   93,
+      145,   42,    0,   95,    0,    0,    0,    0,    0,    0,
+      145,  145,  145,  145,  145,  145,  145,  145,    0,  110,
+      145,  145,  145,  145,  145,  145,  145,   66,  145,  145,
+      129,  100,  128,  130,   39,  145,  145,  145,  145,  145,
+      145,  145,   83,    0,  145,   11,   75,   19,  145,  145,
+
+       82,  165,  163,  166,    0,    0,    0,    0,  163,  175,
+      175,   23,    4,    3,    3,  145,  145,  145,  145,    0,
+        0,    0,   23,    4,    3,    3,  145,   23,   23,   23,
+       24,    0,  168,   24,   24,   24,   24,   24,   24,   24,
+       24,   24,   24,  145,  145,  145,   58,  145,  145,  145,
+        0,    0,  145,  145,   40,   93,    0,  145,    0,    0,
+        0,    0,    0,    0,    0,  145,  145,  145,  145,  145,
+       73,  145,  145,  145,    0,    0,  145,  145,   17,   50,
+       45,  145,   46,    0,  145,  145,    9,  145,  145,   67,
+       84,    7,    0,    0,  145,    0,  145,  145,    0,    0,
+
+        0,    0,  175,   24,    4,  145,  145,   64,  145,    0,
+        0,   24,    4,   24,   24,   24,  145,    8,  145,  145,
+       87,  145,  145,   40,    0,    0,  145,  145,    0,  145,
+        0,    0,    0,    0,    0,   73,    0,  145,  145,  145,
+      145,  145,   56,  145,   65,    0,    0,    0,    0,  134,
+       12,   20,  145,    0,  145,   80,   68,  145,    0,  145,
+        0,  145,  145,    0,    0,    0,  175,    4,  145,   59,
+      145,    0,    0,    4,  145,  131,   47,  145,   51,    0,
+        0,  145,  145,    0,   57,    0,    0,    0,    0,    0,
+       56,  145,   41,  145,  106,  145,  145,    0,    0,    0,
+
+        0,    0,  134,   91,    0,  145,   61,    0,   62,    0,
+      145,  145,    0,   59,    0,  175,    4,    4,  145,  143,
+        0,    0,    4,    4,  145,   10,    0,    0,  145,  145,
+       57,    0,   41,    0,  106,    0,  145,   14,  145,  145,
+        0,    0,    0,  145,    0,    0,  103,    6,    0,  143,
+      175,    4,    4,  145,    0,    0,    4,    4,   48,    0,
+        0,  145,  145,    0,   14,    0,   15,  145,   53,    0,
+        0,    0,  145,    0,  103,    0,  175,    4,    2,  105,
+        0,    0,    4,    2,    0,    0,  145,  145,   15,    0,
+      145,    0,    0,    0,  145,    0,  105,  175,    4,    0,
+
+        0,    4,    0,    0,  136,  145,    0,   13,    0,    0,
+        0,  145,    0,  175,    1,    0,    0,  144,    1,  136,
+        0,  145,   13,    0,    0,    0,    0,  145,    0,  175,
+        0,    0,  135,    0,    0,    0,   78,    5,  175,    0,
+      135,   78,  175,    0,  175,    0,  175,    0,  175,    0,
+      175,    0,  175,  171,    0,    0,    0,    0,    0,  172,
+        0
+    } ;
+
+static yyconst flex_int32_t yy_ec[256] =
+    {   0,
+        1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    4,    5,    6,    7,    8,    9,   10,   11,   12,
+       13,   14,   15,   16,   17,   18,   19,   20,   21,   22,
+       23,   24,   25,   26,   27,   28,   29,   30,   31,   32,
+       33,   34,    1,    1,   35,   36,   37,   38,   39,   40,
+       41,   42,   43,   44,   45,   46,   47,   48,   49,   50,
+       51,   52,   53,   54,   55,   56,   57,   58,   59,   60,
+       61,    1,   62,    1,   63,    1,   64,   65,   66,   67,
+
+       68,   69,   70,   71,   72,   44,   73,   74,   75,   76,
+       77,   78,   79,   80,   81,   82,   83,   84,   85,   86,
+       87,   88,   89,   89,   89,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1
+    } ;
+
+static yyconst flex_int32_t yy_meta[90] =
+    {   0,
+        1,    2,    3,    2,    1,    4,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    5,    1,    6,
+        6,    6,    6,    6,    6,    6,    6,    6,    6,    1,
+        1,    1,    1,    1,    7,    8,    8,    9,    9,    5,
+       10,   11,    8,    8,    8,   10,   10,   10,    7,    8,
+        9,   10,   10,    5,   10,    8,   12,    8,    8,    8,
+        1,    1,    8,    7,    8,    8,    9,    9,    5,   10,
+       11,    8,    8,   10,   10,   10,    7,    8,    9,   10,
+       10,    5,   10,    8,   12,    8,    8,    8,    4
+    } ;
+
+static yyconst flex_int16_t yy_base[1215] =
+    {   0,
+        0,   88,    0,    0,    0,    0, 1215,   93, 1196,   91,
+        0,    0, 1179,   64,   97,  117,  132,   87,  124,   98,
+       99,  142,  173,  154,  108,  135,  134,  254,  172,  179,
+      175,  178,  219,  180,  323,  388,  384,  318,  386,  319,
+      186,  128,  250,  256,  392,  404,  438,  428,  204,  455,
+      432,  465,  544,  120,  537,  548,  627,  624,  622,  544,
+      644,  658,  251, 9159, 1175, 9159,  267,   99,  162,  569,
+      572,  620,  745,  164,  107,  262,  307,  335,  376,  522,
+        0,  167,  157, 1162, 9159,  278,  321, 1160, 1118,  372,
+      304,  532,  593,  567, 9159,  633,  832, 9159, 9159,  911,
+
+      798,  318,  319,  450,  799,  552,  320,  354, 9159,  978,
+      834, 9159,  865,  860,  862,  866,  914,  863,  973,  980,
+      974, 1013, 1024, 1045,  869, 1049, 1075, 1095, 1098, 1101,
+     1182, 1177, 1161, 1181, 1214, 1212, 1237, 1239, 1235, 1270,
+     1290, 1316, 1325, 1293, 1346, 1323, 1366, 1368, 1391, 1399,
+     1403, 1429, 1430, 1455, 1452, 1478, 1498, 1482, 1523, 1521,
+     1554, 1548, 1579, 1586, 1606, 1629, 1649, 1675, 1681, 1698,
+     1707, 1729,  871, 1114, 1109,  140, 1023,  187,  372,  403,
+      553,  401, 1095,  565, 1792, 1818, 1083, 9159,  643,  669,
+      589, 1844, 1870, 1580, 1865, 1867, 1868, 1905, 1926, 1922,
+
+     1925, 1078, 9159,  837,  437,  677,  249,  660, 1072,  712,
+     9159, 1062,  844,  625, 1874, 1993, 2022, 1042,  864,  473,
+      904,  621,  506,  651,  721,  798,  791,  890,  912,  936,
+      907,  725, 1029, 1143,  729, 9159, 1114, 1179, 2097, 2112,
+     2127,  229,  937, 1033, 1012, 1006,  994,  943,  883,  974,
+      891, 9159, 1476, 2142, 2157, 2172, 2182, 2202, 2178, 2180,
+     2200, 2203, 2223, 2243, 2246, 2244, 2276, 2269, 2299, 2307,
+     2301, 2324, 2344, 2351, 2377,  901, 1018, 2374, 2394, 2397,
+     2414, 2495, 2434, 2440, 2465, 2472, 2518, 2521, 2515, 2548,
+     2556, 1138, 2564,  968, 9159, 2581, 2597, 2604, 2627, 2649,
+
+     2650, 2690, 2693, 2686, 2726, 2738, 2746, 2747, 2763, 2783,
+     2799, 2800, 2803, 2820, 2840, 2843, 2870, 2891, 2895, 2903,
+     2926, 2928, 2935, 2961, 2981, 2958, 2984, 2978, 3004, 3011,
+     3027, 3052, 3048, 3059, 3085, 3068, 3105, 3111,  196,  203,
+      976,  383,  974,  988, 1018, 1014, 1025, 1029, 1042,  253,
+     3174, 3200, 3226, 1067, 1182, 1172, 3252,    0,  418,  288,
+     1096, 3228, 3229, 3231, 3251, 3267, 3287, 3290, 1188, 1566,
+      973,  740, 9159,  938,  866, 9159, 1268, 1178,  931, 1170,
+     1241, 1299, 3354, 3381,    0,  903, 3408, 1148, 1116, 1177,
+     1322, 1145,  410, 1415, 1235,  460, 1292, 1218, 1323, 1022,
+
+      963, 1520, 1662, 3418, 3430, 3440, 3450, 3460, 3470,  889,
+     9159,  865, 9159, 9159, 9159, 9159, 9159, 1239,  853, 9159,
+      846, 2472, 3480, 3490, 3500, 3510, 3520, 3530, 3545, 3555,
+     3575, 9159, 3289, 3553, 3573, 3551, 3574, 3590, 3596, 3612,
+     3628, 3634, 3635, 3655, 3671, 3651, 3687, 3688, 3696,  459,
+     3728, 3736, 3740, 3784, 3868, 9159, 3780, 3776, 3807, 3811,
+     3850, 3912, 3872, 3920, 3921, 1351, 9159, 3828, 4005, 4060,
+     4095, 3904, 4063, 4069, 1258, 4096, 4104, 4126, 4134, 4156,
+     4165, 4196, 4205, 1409, 9159, 4208, 4197, 1476, 9159, 4235,
+     4241, 4257, 4261, 4273, 4284, 4293, 4305, 4309, 4332, 4336,
+
+     4353, 4316, 4359, 4362, 4384, 4407, 4385, 4416, 4423, 4448,
+     4455, 4456, 4486, 4494, 4488, 4511, 4527, 4519, 4531, 4554,
+     1498, 9159, 4552, 4575, 4584, 4587, 4607, 4610,  493,  529,
+      551,  476, 1287,  816,  953, 1119, 1293,  841, 4678, 4704,
+     4730, 1607, 1346, 1458, 4756, 1362, 1397, 4733, 4732, 4759,
+     4627, 4768, 4817,  733, 1619, 1594, 1406,  728, 1537, 9159,
+     1571, 1651, 1625, 1613, 4839, 4867, 4894, 1627, 1658, 1686,
+     1714, 1394,    0, 1756, 1574,    0, 1668,  724, 1709,  724,
+     1763, 1775, 9159, 9159,  708, 9159, 9159, 4904, 4916, 4926,
+     4936, 4771, 4931, 5013, 4934, 5068, 5069, 5071, 5075, 5072,
+
+     5120, 5121, 5123, 1725, 5127, 5153, 5176, 1832, 5175, 5179,
+     1458, 1493, 1739, 1516, 1519, 1873, 1592, 1739, 5201, 5224,
+     5202, 5241, 5240, 5257, 5278, 5280, 5301, 5284, 5352, 9159,
+     5351, 5346, 5349, 5353, 1802, 9159, 5355, 5385, 5401, 9159,
+     5405, 5408, 5412, 5428, 5449, 5451, 5458, 5460, 5495, 5501,
+     5531, 5527, 5539, 5571, 5564, 5575, 5591, 5602, 5623, 5614,
+     5634, 5635, 5660,  693, 5666, 5667, 5692, 5703, 5715, 9159,
+     5723, 5719, 5740, 5746,  846, 1103, 1234, 1788, 1768, 1386,
+     1788, 1615, 1847, 1854,  236,  590, 1781, 1913,  715, 5809,
+     1790, 1645, 2264, 9159, 5785, 5805, 1690, 5806, 5807, 2344,
+
+     9159, 1951, 1858, 1924, 2256,  679, 1930, 1879, 5870, 5880,
+     5907, 5917, 1811,  658, 5946,  624,    0, 9159, 6034,    0,
+        0,  613,  609, 9159,  604,  586, 2245, 2364, 2389, 9159,
+     9159, 6063, 6118, 6139, 6138, 6134, 6135, 6141, 6161, 6173,
+     6184, 6209, 6217, 1654, 6260, 6248, 6216, 1844, 1864, 6239,
+     6280, 9159, 1689, 9159, 1930, 1750, 1763, 1934, 1933, 2077,
+     6300, 6292, 6317, 6337, 6338, 6344, 6369, 6376, 2212, 9159,
+     6360, 6413, 6392, 6412, 6424, 6433, 6456, 6435, 6465, 6476,
+     6488, 6497, 6508, 6509, 6552, 6529, 6540, 6549, 6560, 6585,
+     6593, 6605, 6628, 2392, 6636, 6637, 6648, 6659, 6694, 6685,
+
+     6686, 6775, 2286,  518, 2092, 2103, 1938, 2148, 2420, 2303,
+      472,  442, 2196,    0, 1803, 6692, 6717, 6768, 6756, 2424,
+     2334,  426,  422, 2432,  378, 1883, 6858, 6945, 6974,  337,
+     9159, 1922, 9159,    0,  328, 9159,  314, 2481, 2510, 9159,
+     6929, 6757, 7029, 7031, 7037, 7040, 7033, 7077, 7070, 7086,
+     2264, 2842, 7093, 7097, 7118, 9159, 2372, 7129, 2384, 2060,
+     2411, 2418, 2078, 2421, 2139, 7138, 7149, 7170, 7179, 7195,
+     7201, 7227, 7234, 7236, 2483, 3160, 7259, 7257, 7279, 7280,
+     7282, 7302, 7318, 2564, 7325, 7319, 7345, 7356, 7377, 7357,
+     7368, 7388, 2513, 2467, 7400, 2603, 7389, 7425, 2468, 2371,
+
+     2235, 2479,  361,  296,  182, 7409, 7432, 2249, 7455,  622,
+     2529,  227, 1008, 7505,    0,  207, 7482, 7503, 7505, 7514,
+     7535, 7536, 7544, 9159, 2413, 2526, 7567, 7571, 2546, 7593,
+     2547, 2562, 2567, 2526, 2575, 9159, 2526, 7587, 7625, 7594,
+     7631, 7632, 7648, 7657, 7668, 3179, 3203, 2672, 3229, 3335,
+     7684, 7688, 7709, 2597, 7705, 7725, 7732, 7736,  178, 7758,
+     2596, 7775, 7769, 2619, 2617, 2641, 2696, 2668, 7795, 7801,
+     7807, 2677, 2720, 3150, 7827, 7818, 7834, 7867, 7850, 2625,
+     2685, 7870, 7890, 2688, 7859, 2699, 2731, 2741, 2661, 2665,
+     9159, 7911, 7907, 7910, 7927, 7933, 7963, 2822, 3360, 3384,
+
+     3411, 4103, 4220, 7959, 2702, 7970, 7966, 2741, 7986, 2738,
+     8003, 8019, 2758, 9159, 2765, 2781, 2809, 2818, 8030, 8026,
+     2900, 2883, 2903, 2951, 8042, 8051, 2820, 2829, 8063, 8086,
+     9159, 2838, 9159, 2846, 9159, 2846, 8088, 8090, 8113, 8134,
+     3067, 4430, 2880, 8136,  175, 2911, 8125, 8156, 2877, 9159,
+     1190, 2938, 2908, 8157, 3034, 3081, 3049, 3028, 8173, 2959,
+     2985, 8189, 8182, 3029, 9159, 3039, 8205, 8212, 8214, 3241,
+     4684, 3056, 8235, 3049, 9159, 3056, 3212, 3072,    0, 8237,
+     1210, 3169, 3157,  144, 3103, 3103, 8257, 8260, 9159, 3110,
+     8283, 3255, 4708, 3110, 8290,  123, 9159, 3235, 3207, 3329,
+
+     3387, 3558, 3232, 3256, 8306, 8313, 3278, 8315, 8396, 4870,
+     3259, 8391, 3280, 3664,    0, 3349, 3414, 9159,  103, 9159,
+     3346, 8392, 9159, 3745, 4900, 8473, 3347, 8450,   90, 1237,
+     1328, 3570, 8470, 4973, 4977, 3380, 8471, 9159, 3676, 3645,
+     9159, 9159, 3693, 3608, 3764, 3684, 3616, 1433, 3705, 3782,
+     3810, 3774, 3875, 9159, 3852, 3697, 3910, 3892, 3896, 9159,
+     9159, 8553, 8565, 8577, 8589, 8601, 8613, 8621, 8623, 8635,
+     8647, 8659, 8671, 8678, 8687, 8699, 8711, 8723, 8735, 8747,
+     8754, 8762, 8774, 8786, 8798, 8810, 8822, 8834, 8846, 8858,
+     8870, 8882, 8894, 8906, 8918, 8930, 8942, 8954, 8966, 8978,
+
+     8990, 9002, 9014, 9026, 9038, 9050, 9062, 9074, 9086, 9098,
+     9110, 9122, 9134, 9146
+    } ;
+
+static yyconst flex_int16_t yy_def[1215] =
+    {   0,
+     1161,    1, 1162, 1162,    1,    2, 1163, 1163,    1,    2,
+        1,    2, 1161, 1161, 1161, 1161, 1161, 1164, 1165, 1161,
+     1161, 1166, 1167, 1161, 1161, 1161, 1161, 1161, 1161, 1168,
+     1161, 1161, 1161, 1161, 1169, 1169,   36,   36,   36,   36,
+       36,   36,   36,   36,   36,   36,   36,   36,   36,   36,
+       36,   36, 1161, 1161,   53, 1170, 1161,   36,   36,   36,
+       36,   36,   36, 1161, 1171, 1161, 1171, 1171, 1171, 1161,
+     1161, 1172, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161,
+     1164, 1164, 1164, 1165, 1161, 1165, 1165, 1166, 1161, 1166,
+     1166, 1167, 1173, 1167, 1161, 1167, 1167, 1161, 1161, 1161,
+
+     1174, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1175,
+     1161, 1161, 1161,   36,   36,   36,   36,   36,   36,   36,
+       36,   36,   36,   36,   36,   36,   36,   36,   36,   36,
+     1169,   36,   36,   36,   36,   36,   36,   36,   36,   36,
+       36,   36,   36,   36,   36,   36,   36,   36,   36,   36,
+       36,   36,   36,   36,   36,   36,   36,   36,   36,   36,
+       36,   36,   36,   36,   36,   36,   36,   36,   36,   36,
+       36,   36,   53,  173, 1176, 1161, 1161, 1161, 1161, 1161,
+     1161, 1161,  173, 1161,  173, 1161, 1170, 1161, 1170, 1170,
+     1170, 1161, 1161, 1177,   36,   36,   36,   36,   36,   36,
+
+       36, 1171, 1161, 1171, 1171, 1171, 1171, 1178, 1179, 1179,
+     1161, 1179, 1179, 1179, 1180, 1179, 1161,  217,  217,  217,
+      217,  217, 1161, 1161, 1161, 1164, 1164, 1165, 1165, 1166,
+     1166, 1173, 1173, 1173, 1173, 1161, 1167, 1167, 1161, 1161,
+     1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161,
+     1161, 1161, 1181, 1161, 1161, 1161, 1161, 1161,   36,   36,
+       36,   36,   36,   36,   36,   36,   36,   36,   36,   36,
+       36,   36,   36,   36,   36, 1182,  131,   36,   36,   36,
+       36,   36,   36,   36,   36,   36,   36,   36,   36,   36,
+       36, 1161,   36, 1161, 1161,   36,   36,   36,   36,   36,
+
+       36,   36,   36,   36,   36,   36,   36,   36,   36,   36,
+       36,   36,   36,   36,   36,   36,   36,   36,   36,   36,
+       36,   36,   36,   36,   36,   36,   36,   36,   36,   36,
+       36,   36,   36,   36,   36,   36,   36,   36,  173,  173,
+     1161,  173, 1176, 1161, 1161, 1161, 1161, 1161, 1161, 1161,
+      185, 1161, 1161, 1170, 1170, 1170, 1161, 1177, 1177, 1177,
+     1177,   36,   36,   36,   36,   36,   36,   36, 1171, 1171,
+     1183, 1183, 1161, 1179, 1179, 1161, 1179, 1179, 1180, 1180,
+     1180, 1180, 1179, 1179,  217,  217, 1179,  217,  217,  217,
+      217, 1161, 1161, 1161, 1164, 1164, 1165, 1165, 1166, 1166,
+
+     1173, 1167, 1167, 1161, 1161, 1161, 1161, 1161, 1161, 1161,
+     1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161,
+     1161, 1181, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161,
+     1161, 1161,   36,   36,   36,   36,   36,   36,   36,   36,
+       36,   36,   36,   36,   36,   36,   36,   36,   36, 1161,
+       36,   36,   36,   36, 1161, 1161,   36,   36,   36,   36,
+       36,   36,   36,   36,   36, 1161, 1161,   36, 1161,   36,
+       36,   36,   36,   36, 1161,   36,   36,   36,   36,   36,
+       36,   36,   36, 1161, 1161,   36,   36, 1161, 1161,   36,
+       36,   36,   36,   36,   36,   36,   36,   36,   36,   36,
+
+       36,   36,   36,   36,   36,   36,   36,   36,   36,   36,
+       36,   36,   36,   36,   36,   36,   36,   36,   36,   36,
+     1161, 1161,   36,   36,   36,   36,   36,   36,  173,  173,
+      173, 1161, 1161, 1161, 1161, 1161, 1161, 1161,  185, 1161,
+     1161, 1170, 1170, 1170, 1161, 1177, 1177,   36,   36,   36,
+       36,   36,   36, 1161, 1171, 1171, 1171, 1183, 1183, 1161,
+     1179, 1179, 1180, 1180, 1179, 1179, 1179,  217,  217,  217,
+      217, 1161, 1184, 1161, 1164, 1185, 1165, 1186, 1187, 1188,
+     1189, 1190, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161,
+     1161,   36,   36, 1161,   36,   36,   36,   36,   36,   36,
+
+       36,   36,   36, 1161,   36,   36,   36, 1161,   36,   36,
+     1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161,   36,   36,
+       36,   36,   36,   36,   36,   36,   36,   36,   36, 1161,
+     1161,   36,   36,   36, 1161, 1161,   36,   36,   36, 1161,
+       36,   36,   36,   36,   36,   36,   36,   36,   36,   36,
+       36,   36,   36,   36,   36,   36,   36,   36,   36,   36,
+       36,   36,   36, 1161,   36,   36,   36,   36,   36, 1161,
+       36,   36,   36,   36,  173,  173,  173, 1161, 1161, 1161,
+     1161, 1161, 1161,  173, 1161, 1161, 1170, 1170, 1191, 1161,
+     1177, 1192, 1161, 1161,   36,   36, 1161,   36,   36, 1161,
+
+     1161, 1161, 1171, 1171, 1179, 1193, 1180, 1194, 1179, 1179,
+     1179, 1179,  217,  217, 1161,  217, 1195, 1161, 1161, 1196,
+     1197, 1198, 1199, 1161, 1200, 1201, 1202, 1203, 1203, 1161,
+     1161, 1161,   36, 1161,   36,   36,   36,   36,   36,   36,
+       36,   36,   36, 1161,   36,   36,   36, 1161, 1161,   36,
+       36, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161,
+       36,   36,   36,   36,   36,   36,   36,   36, 1161, 1161,
+       36,   36,   36,   36,   36,   36,   36,   36,   36,   36,
+       36,   36,   36,   36,   36,   36,   36,   36,   36,   36,
+       36,   36,   36, 1161,   36,   36,   36,   36,   36,   36,
+
+       36, 1161,  802,  802, 1161, 1161, 1161, 1161,  802, 1204,
+     1205, 1204, 1206, 1207, 1207,   36,   36,   36,   36, 1208,
+     1208, 1209, 1210, 1211, 1212, 1212, 1161, 1210, 1161,  829,
+     1161, 1161, 1161, 1197, 1199, 1161, 1201, 1203, 1203, 1161,
+     1161,   36,   36,   36,   36,   36,   36,   36,   36,   36,
+     1161, 1161,   36,   36,   36, 1161, 1161,   36, 1161, 1161,
+     1161, 1161, 1161, 1161, 1161,   36,   36,   36,   36,   36,
+       36,   36,   36,   36, 1161, 1213,   36,   36,   36,   36,
+       36,   36,   36, 1161,   36,   36,   36,   36,   36,   36,
+       36,   36, 1161, 1161,   36, 1161,   36,   36, 1161, 1161,
+
+     1161, 1161, 1204, 1204, 1206,   36,   36, 1161,   36, 1208,
+     1208, 1210, 1211, 1210,  829,  829,   36,   36,   36,   36,
+       36,   36,   36, 1161, 1161, 1161,   36,   36, 1161,   36,
+     1161, 1161, 1161, 1161, 1161, 1161, 1161,   36,   36,   36,
+       36,   36,   36,   36,   36, 1213, 1213, 1161, 1214, 1213,
+       36,   36,   36, 1161,   36,   36,   36,   36, 1161,   36,
+     1161,   36,   36, 1161, 1161, 1161, 1204, 1206,   36,   36,
+       36, 1208, 1208, 1211,   36,   36,   36,   36,   36, 1161,
+     1161,   36,   36, 1161,   36, 1161, 1161, 1161, 1161, 1161,
+     1161,   36,   36,   36,   36,   36,   36, 1161, 1214, 1214,
+
+     1213, 1214, 1214,   36, 1161,   36,   36, 1161,   36, 1161,
+       36,   36, 1161, 1161, 1161, 1204, 1206, 1206,   36,   36,
+     1208, 1208, 1211, 1211,   36,   36, 1161, 1161,   36,   36,
+     1161, 1161, 1161, 1161, 1161, 1161,   36,   36,   36,   36,
+     1161, 1213, 1161,   36, 1161, 1161,   36,   36, 1161, 1161,
+     1204, 1206, 1206,   36, 1208, 1208, 1211, 1211,   36, 1161,
+     1161,   36,   36, 1161, 1161, 1161,   36,   36,   36, 1161,
+     1213, 1161,   36, 1161, 1161, 1161, 1204, 1206, 1206,   36,
+     1208, 1208, 1211, 1211, 1161, 1161,   36,   36, 1161, 1161,
+       36, 1161, 1213, 1161,   36, 1161, 1161, 1204, 1206, 1208,
+
+     1208, 1211, 1161, 1161,   36,   36, 1161,   36, 1161, 1213,
+     1161,   36, 1161, 1204, 1206, 1208, 1208, 1161, 1211, 1161,
+     1161,   36, 1161, 1161, 1213, 1213, 1161,   36, 1161, 1204,
+     1208, 1161,   36, 1213, 1214, 1161,   36, 1161, 1204, 1208,
+     1161, 1161, 1204, 1208, 1204, 1208, 1204, 1208, 1204, 1208,
+     1204, 1208, 1204, 1161, 1208, 1208, 1208, 1208, 1208, 1161,
+        0, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161,
+     1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161,
+     1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161,
+     1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161,
+
+     1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161,
+     1161, 1161, 1161, 1161
+    } ;
+
+static yyconst flex_int16_t yy_nxt[9249] =
+    {   0,
+       14,   15,   16,   17,   18,   19,   14,   20,   21,   22,
+       23,   24,   25,   26,   25,   27,   25,   28,   29,   30,
+       30,   30,   30,   30,   30,   30,   30,   30,   30,   25,
+       31,   32,   33,   34,   35,   36,   37,   38,   39,   40,
+       41,   42,   43,   42,   42,   44,   45,   46,   47,   48,
+       42,   49,   50,   51,   42,   42,   52,   42,   42,   42,
+       25,   25,   42,   35,   36,   37,   38,   39,   40,   41,
+       42,   43,   42,   44,   45,   46,   47,   48,   42,   49,
+       50,   51,   42,   42,   52,   42,   42,   42,   14,   53,
+       54,   55,   56,   71,   67,   66,   67,   68,   76,   77,
+
+       78,  203, 1138,   74,   72,  211,  206,   57,   57,   57,
+       57,   57,   57,   57,   57,   57,   57,   75,   79,   77,
+       79,   79,   77,   79,   58,   59,   82,   73,   60,   85,
+       61,   69,   74,   78,   77,   80,   74,   74,   74, 1113,
+       83,   62,   63,  176,   89,   75,  211,   74,   99,  176,
+       75,   75,   75,   58,   59,   82,   73,   60,  224,   61,
+       69,   75,  115,   86,  203,   74,   74,   74,   83,   62,
+       63,   74,   98,   74,   74,   93,   74,   87,   75,   75,
+       75,   90,   94,   95,  109,   75,  224,   75,   75,   75,
+     1074,  115,   86,   74, 1008,   91,  110,  529,  223,  530,
+
+       74,  226,   74,   74,  531,   87,  530,   75,  227,  207,
+       90,   74,   96,   75,   74,   75,   75,   74,   74,   74,
+      115,  346,   74,   91,  387,   75,   97,  223,   75,  211,
+      226,   75,   75,   75,  142,   75,  227,  207,  115,  176,
+       74,   96,  161,   74,  968,  176,   74,   74,   74,  115,
+      346,  203,  112,   75,   97,  100,   75,  100,   74,   75,
+       75,   75,  142,   76,   77,   78,  410,  115,  204,  203,
+      204,  161,   75,  101,  101,  101,  101,  101,  101,  101,
+      101,  101,  101,   85,  115,  115,  370,   74,  102,  143,
+      115,  538,  103,   74,  104,  410,  144,  145,  188,  105,
+
+       75,  106,  107,  201,  146,  205,   89,   75,   79,   77,
+       79,  108,  228,  115,  115,  370,   89,  102,  143,  115,
+      538,  103,   74,  104,  144,  145,   85,  105,  546,  106,
+      107,  201,  146,   85,  205,   75,   78,   77,   78,  108,
+      113,  228,  114,  114,  114,  114,  114,  114,  114,  114,
+      114,  114,  115,  115,  387,  231,  129,  546,  116,  117,
+      130,  138,  118,  188,  139,  242,  131,  140,  119,  243,
+      132,  250,  229,  141,   89,  120,  121,  225,   77,  225,
+      211,  115,  115,  231,  531,  129,  530,  116,  117,  130,
+      138,  118,  139,  242,  131,  140,  119,  243,  132,  250,
+
+      229,  141,  251,  120,  121,  113,  230,  114,  114,  114,
+      114,  114,  114,  114,  114,  114,  114,  347,  124,  359,
+      115,  359,  122,  967,  211,  125,  147,  118,  211,  126,
+      251,  133,  127,  134,  148,  230,  135,  136,  150,  203,
+      149,  123,  128,  137,  188,  347,  151,  124,  573,  115,
+      348,  122,  152,  350,  125,  147,  118,  126,  153,  133,
+      127,  134,  157,  148,  135,  136,  168,  150,  149,  123,
+      128,  137,  115,  169,  188,  151,  158,  573,  348,  159,
+      152,  350,  160,  170,  207,  154,  153,  155,  244,  162,
+      387,  157,  156,  163,  675,  168,  676,  164,  576,  115,
+
+      604,  115,  169,  245,  158,  165,  171,  159,  166,  167,
+      160,  170,  207,  154,  678,  155,  172,  244,  162,  804,
+      156,  389,  163,   78,   77,   80,  164,  576,  115,  604,
+      677,  245,  676,  165,   93,  171,  166,  167,  183,  184,
+      185,   94,   95,  678,  172,  173,   77,  174,  175,  389,
+      188,  392,  677,  176,  676,  189,  186,  186,  186,  186,
+      186,  186,  186,  186,  186,  186,   79,   77,   79,   93,
+       79,   77,   79,   79,   77,   79,   94,   95,  115,  392,
+      177,  178,  208,   74,  179,  208,  180,  190,   89,  198,
+      248,  188,  142,  176,  233,  234,  233,  181,  182,  176,
+
+      249,  191,  235,  236,  224,  208,   89,  115,  208,  177,
+      178,  349,   74,  179,   85,  180,  190,  198,  836,  248,
+      142,  210,  211,  210,  203,  181,  182,  211,  249,  191,
+      192,  194,  224,  212,  208,   93,  176,  208,  387,  349,
+      356,  387,   94,   95,  110,  188,  193,  193,  193,  193,
+      193,  193,  193,  193,  193,  193,  197,  391,  195,  213,
+      129,  372,  373,  372,  130,  125,   74,  237,  356,  126,
+      131,  188,  196,  214,  132,  387,  378,  354,  115,  203,
+       75,  211,  128,  143,  972,  197,  391,  195,  213,  129,
+      144,  199,  168,  130,  125,   74,  237,  126,  131,  169,
+
+      196,  214,  132,  355,  378,  393,  354,  115,   75,  170,
+      128,  369,  143,  375,  376,  375,  200,  188,  144,  199,
+      794,  168,  394,   77,  394,  731,   89,  234,  169,  724,
+      373,  234,  355,  393,  401,  236,  554,  170,  401,  236,
+      369,  559,  560,  559,  200,  209,  210,  211,  210,  209,
+      209,  209,  215,  209,  209,  209,  209,  209,  209,  209,
+      209,  209,  216,  209,  217,  217,  217,  217,  217,  217,
+      217,  217,  217,  217,  209,  209,  209,  209,  209,  195,
+      218,  218,  218,  218,  219,  218,  125,  218,  218,  218,
+      220,  218,  218,  196,  218,  218,  218,  218,  221,  218,
+
+      218,  218,  218,  222,  218,  209,  209,  218,  195,  218,
+      218,  218,  218,  219,  218,  125,  218,  218,  220,  218,
+      218,  196,  218,  218,  218,  218,  221,  218,  218,  218,
+      218,  222,  218,  209,   93,  239,  240,  246,  204,  203,
+      204,   94,   95,  395,  554,  396,  211,  802,  241,  803,
+      680,  110,  247,  111,  111,  111,  111,  111,  111,  111,
+      111,  111,  111,  587,  239,  240,  246,  375,  376,  375,
+      586,  395,  339,  396,  340,  205,  241,  258,  377,  680,
+      247,  387,  584,  238,  257,  257,  257,  257,  257,  257,
+      257,  257,  257,  257,  115,   85,  115,  261,  388,  115,
+
+      115,  115,  115,  268,  205,  115,  583,  377,  115,   89,
+     1161,  238,  100,  115,  100,  115,  115,   85,  259,  115,
+      387,  387,  115,  115,  341,  115,  261,  388,  115,  115,
+      115,  115,  268,  211,  115,  397,  419,  115,   89, 1161,
+      211,  115,  421,  115,  115,  102,  259,  115,  115,  103,
+      115,  104,  341,  115,  411,  390,  105,  450,  106,  107,
+      417,  400,  260,  397,  419,  234,  398,  115,  108,  294,
+      421,  294,  401,  236,  102,  373,  188,  115,  103,  295,
+      104,  399,  115,  390,  105,  450,  106,  107,  681,  400,
+      260,  420,  412,  418,  398,  115,  108,  253,  253,  253,
+
+      253,  253,  253,  253,  253,  253,  253,  115,  264,  399,
+      211,  416,  115,  115,  115,  254,  255,  681,  262,  115,
+      412,  418,  263,  415,   89,  265,  115,  115,  256,  414,
+      233,  234,  233,  115,  349,  258,  115,  264,  235,  236,
+      532,  115,  115,  115,  254,  255,  262,  115,  115,  266,
+      413,  263,  115,  265,  115,  115,  256,  344,  115,  387,
+      580,  115,  349,  115,  211,  533,  115,  534,  532,  188,
+      974,  345,  115,  535,  211,  265,  115,  115,  266,  115,
+      203,  115,  536,  115,  115,  188,  344,  115,  115,  580,
+      267,  537,  115,  533,  115,  534,  342,  269,  115,  345,
+
+      115,  535,  115,  265,  804,  115,  803,  542,  115,  115,
+      536,  188,  115,  115,  115,  342,   93,  115,  267,  537,
+       89,  270,  271,   94,   95,  269,  115,  272,  115,  115,
+      115,  273,  274,  387,  115,  115,  542,  115,  115,  292,
+      115,  292,  547,  115,  233,  234,  233,  275,  115,  270,
+      271,  115,  235,  236,  115,  272,  115,  682,  115,  402,
+      273,  274,   89,  115,  115,  387,  115,   85,  569,  115,
+      547,  380,  211,  380,  188,  275,  115,  203, 1161,  115,
+      211,   93,  115,  276,  188,  276,  682,  402,   94,   95,
+      203,  475,  188,  568,  387,  115,  569,  572,   70,  113,
+
+      115,  277,  277,  277,  277,  277,  277,  277,  277,  277,
+      277,  115,  203,  281,  115,  115,  115,   66,  282,  475,
+      115,  568,  280,   85,  115,  572,  544,  543,  555,  115,
+      115,  570,  562,  403,  115,  804,  278,  803,  279,  188,
+      115,  281,  115,  211,  115,  115,  115,  282,  115,  115,
+      280,  115, 1077,  115,  544,  543,  578,  555,  115,  570,
+      562,  403,  115,  284,  278,  115,  279,  115,  283,  115,
+      211,  115, 1100,  115,  115,  115,  115,  115,  115,  285,
+      115,  563,  115,  289,  288,  578,  286,  575,  115, 1161,
+      287,  284,  115,  115,  585,  115,  283,   85,  115, 1139,
+
+      115,  211,  115,  115,  115,  115,  640,  115,  285,  115,
+      563,  289,  288,  561,  286,  575,  115,  292,  287,  292,
+      115,  290,  585,  115,  115,   89,  294,  115,  294,  115,
+      203,  683,  115,  115,  640, 1161,  295,  291,  115,  387,
+      679,  561,  296,  115,  577,  564,  115, 1161,  188,  290,
+      115,  115,  466,  115,  466,  115,  115,  115,  115,  261,
+      683,  115,  115,  301,  115,  291, 1161,  571,  679,  293,
+      296,  115,  577,  564,  115,  579,  115, 1161,  115,  115,
+      115, 1161,  297,  467,  115,  115,  115,  697,  261,  697,
+     1140,  115,  301,  115,  298,  571,  299,  293,  688,  300,
+
+      115, 1161,  115,  579,  115,  115,  115,  115,  203,  115,
+      484,  297,  484,  691,  115,  303,  574,   77,  574,  115,
+      485,  115,  298,  302,  299,  115,  688,  300,  304,  115,
+      115,  115,  717,  115,  115,  203,  115,  115,  115, 1161,
+     1161,  691,  115,  303,  115,  305,  692,  115, 1161,  115,
+      306,  302,  115,  704,  115, 1161,  115,  304, 1161,  115,
+      188,  717,  115,  115,  115, 1161,  115,  115,  115,  115,
+     1161,  115,  115,  305,  692,  308,  307,  488,  306,  488,
+      115,  704,  115,  115,  115, 1161,  115,  489, 1161,  115,
+      310,  115,  115,  115,  115, 1150,  689,  115,  115,  521,
+
+      309,  521, 1161,  308,  307,  311,  752, 1161,  115,  522,
+      115,  115,  115,  239,  240,  115,  115,  115,  115,  310,
+      115,  115,   93,  115,  315,  689,  241, 1161,  309,   94,
+       95,  312,  115,  311,  752,  115,  115,  115,  559,  560,
+      559,  115,  239,  240, 1161,  115,  115,  753, 1161,  313,
+      115,  115,  314,  315,  241,  115,  318,  115, 1161,  312,
+      115,  115,  115,  115,  755,  316,  115,  556,  203,  556,
+      756,  317,  581,  211,  115,  753,  115,  313, 1161,  115,
+      314,  359,  115,  359,  115,  318,  115,  115,  319,  115,
+      320,  115,  755,  115,  316,  556,  203,  556,  756,  317,
+
+      581,  115,  115,  324,  115, 1161,  321,  322,  557,  188,
+      323,  115,  720,  115,  360,  211,  115,  319,  115,  320,
+      115,  203,  115,  705,  325,  115,  326,  211,  361,  115,
+     1161,  324,  115,  327,  321,  322,  557,  557,  323,  115,
+      115,  720,  115,  360,  387,  115,  815,  115,  815,  115,
+      759,  705,  325,  211,  115,  326,  361,  328,  687,  115,
+      115,  327,  708,  329,   93,  557,  808,  115,  115,  115,
+      703,   94,   95,   85,  115,  387,  707,  330,  759,  713,
+      265, 1161,  115,  115,  331,  328,  687,  115,  115,  706,
+      708,  697,  329,  697,  808,  332,  714,  115,  703,  851,
+
+      582, 1161,  115,  387,  707,  330,  722,  713,  265,  115,
+      115,   89,  115,  331,  115,  115, 1161,  115,  706,  335,
+      115, 1161,  333,  332,  715,  714,  334,  851,  115,  582,
+      115,  387,  115, 1161,  115,  722,  859,  115,  115, 1161,
+      336,  115, 1161,  115,  115,  337,  115,  725,  335,  115,
+      333,  115,  716,  715,  334, 1161,  115,  719,   77,  719,
+      115,  115,  115,  115,  859,   93,  115,  744,  115,  336,
+      115,  338,   94,   95,  337,  115,  725,   93,  754,  115,
+      760,  716,  115,  188,  729,  730, 1161, 1161,  115,  693,
+     1161,  693,  115,  342,  184,  351,  744,  115,  861,  694,
+
+      338,  727,  806,  635,  815,  635,  815,  754,  862,  760,
+      115,  352,  352,  352,  352,  352,  352,  352,  352,  352,
+      352,  353,  807,  810, 1161,  805,  861,  176,  387, 1161,
+      727,  806,  813,  608,  636,  608,  862,  352,  352,  352,
+      352,  352,  352,  352,  352,  352,  352,  353,  700,  827,
+      700,  807,  810,  176,  805,  804,  184,  809,  701, 1161,
+      203,  813,  702,  352,  352,  352,  352,  352,  352,  352,
+      352,  352,  352,  353,  748,  380,  211,  380,  827,  176,
+      826,  211,  826,  856,  826,  211,  826,  110,  749,  357,
+      357,  357,  357,  357,  357,  357,  357,  357,  357,  115,
+
+      820,  115,  115,  748,  115,  857,  115,  115,  381, 1161,
+      267,  757,  856,  270,  363,  188,  749,  362,  115,  272,
+      115,  364,  382,  832,   77,  832,  203,  758,  115,  820,
+      115,  115,  211,  115,  857,  115,  115,  381,  267,  115,
+      757,  270,  363, 1161,  115,  362,  115,  272,  115,  364,
+      382,  811,  702,  365,  702,  758,  115, 1161,  115,  115,
+      115,  115,  297,  368,  115,  115,  702,  860,  115,  863,
+     1161,  367,  824,  115,  298,  115,  299,  821,  115,  366,
+      811,  365,  864,  901, 1161,  115,  115, 1161,  115,  115,
+      115,  297,  368,  115,  115,  211,  860, 1161,  863,  367,
+
+     1161,  824,  298,  115,  299,  821,  115,  366, 1161, 1161,
+      864,  901,  383,  383,  383,  383,  383,  383,  383,  383,
+      383,  383,  374,  374,  211,  374,  374,  374,  374,  374,
+      374,  374,  374,  374,  374,  374,  374,  374,  374,  384,
+      374,  385,  385,  385,  385,  385,  385,  385,  385,  385,
+      385,  374,  374,  374,  374,  374,  386,  386,  386,  386,
+      386,  386,  386,  386,  386,  386,  386,  386,  386,  386,
+      386,  386,  386,  386,  386,  386,  386,  386,  386,  386,
+      386,  386,  374,  374,  386,  386,  386,  386,  386,  386,
+      386,  386,  386,  386,  386,  386,  386,  386,  386,  386,
+
+      386,  386,  386,  386,  386,  386,  386,  386,  386,  386,
+      374,  404, 1161,  404,  932,  865,  405,  405,  405,  405,
+      405,  405,  405,  405,  405,  405,  406, 1161,  406,  935,
+      899,  407,  407,  407,  407,  407,  407,  407,  407,  407,
+      407,  408,  932,  408,  865,  900,  409,  409,  409,  409,
+      409,  409,  409,  409,  409,  409,  423,  935,  423,  899,
+     1161,  424,  424,  424,  424,  424,  424,  424,  424,  424,
+      424,  425, 1161,  425,  900, 1161,  426,  426,  426,  426,
+      426,  426,  426,  426,  426,  426,  427,  902,  427,  432,
+      937,  428,  428,  428,  428,  428,  428,  428,  428,  428,
+
+      428,  257,  257,  257,  257,  257,  257,  257,  257,  257,
+      257, 1161,  115,  769,  115,  769,  902,  115,  937,  115,
+      429,  430,  430,  430,  430,  430,  430,  430,  430,  430,
+      430,  115,  433,  115,  115,  905,  908,  115,  908,  115,
+      431,  115,  115,  115,  770,  434,  115,   93,  115,  429,
+      908,  435,  908,  115,  839,  840,  115,  115,  211,  115,
+      433,  115,  115,  115,  905,  693,  115,  693,  115,  431,
+      436,  115, 1161,  434, 1161,  694,  115,  115,  115,  435,
+      115,  115,  115,  115,  115,  115,  115,  804,  439,  803,
+      437,  115, 1161, 1161,  822,  176,  115,  115,  436,  115,
+
+      438,  805,  924,  115,  115,  188,  115,  115,  115,  115,
+      115,  115,  115, 1161,  115,  115,  439, 1161,  437, 1161,
+      441,  440,  115,  822,  115,  115, 1161,  115,  438,  115,
+      805,  924,  115,  115, 1161,  115,  203,  115,  115,  115,
+      115,  115,  903, 1161,  115,  700,  115,  700,  441,  440,
+      115,  442,  115,  443,  445,  701,  444,  115,  115,  702,
+      115, 1161,  115,  115,  115,  446,   93,  115, 1161,  115,
+      115,  903,  911,   94,   95,  115, 1161,  115,  115,  442,
+      115,  443,  445,  115,  444,  115, 1161,  115,  115,  447,
+      115,   93,  115,  893,  446,  893,  448,  115,   94,   95,
+
+     1161,  911, 1161,  894,  115,  115, 1161,  115,  115,  451,
+      929,  115,  115,  115,  115,  449,  115,  447,  965,  115,
+      931,  804,  184,  809,  448,  115,  203,  115,  115,  176,
+      115,  453,  115,  115,  211,  452,  115,  115,  451,  929,
+      115,  466,  115,  466,  449,  115,  965,  115,  115,  931,
+      115,  933,  454,  115, 1161,  115,  934,  115,  115,  936,
+      453,  980,  115,  910,  452,  115, 1161,  115,  115, 1161,
+     1161,  913,  467,  115,  115,  115,  465,  115,  115,  115,
+      933,  454,  115,   93,  875,  934,  875,  115,  936,  980,
+       94,   95,  910,  115,  876,  115,  455,  115,  455,  115,
+
+      913,  959,  115,  115,  115,  465,  115,  964,  115,  239,
+      240,  115,   93,  966,  893,  115,  893,  468,  469,   94,
+       95,  115,  241, 1161,  894,  115, 1161,  456,  115,  115,
+      959,  203,  457,  115,  458,  115,  964,  459,  239,  240,
+      115,  460,  966, 1161,  461,  468,  469,  462,  463,  472,
+      241,  464,  115,  115,  115,  115,  470,  115,  115,  471,
+      115,  457,  989,  458,  991,  884,  459,  884,  115,  460,
+     1161,  115,  461, 1161,  115,  462,  463,  981,  472,  464,
+      973,  115,  115,  115,  115,  470,  115,  115,  471,  115,
+      115,  989,  474,  991,  473,  115,  115,  984,  115,  115,
+
+      986,  115,  115,  115,  896,  981,  896,  987,  973,  115,
+     1161,  115,  476,  954, 1161,  115,  115,  115,  988,  115,
+      115,  474,  473,  990,  115,  984,  477,  115,  986,  115,
+     1010,  115,  115, 1161,  115,  987,  115,  115,  115,  961,
+      476,  954,  478,  115,  115,  115,  988, 1161, 1005,  115,
+      115,  990, 1161, 1013,  477, 1161, 1161,  115,  479, 1010,
+      115,  115,  115, 1161, 1161,  115,  115,  115,  961, 1014,
+      478, 1027,  115,  998,  948,  998, 1005, 1015,  115,  203,
+      115,  480, 1013,  115,  115,  115,  479,  481,  115,  115,
+      115,  484,  483,  484,  488,  115,  488, 1014,  188, 1027,
+
+      482,  485,  115,  115,  489, 1017, 1015, 1018,  115,  480,
+     1161, 1161,  115,  115, 1035, 1021,  481,  115,  115, 1036,
+      115,  483,  203, 1028,  115,  115, 1031,  115,  482,  115,
+      115,  115,  115, 1016, 1017,  486, 1018, 1161,  490,  115,
+      492, 1032, 1035,  115, 1021,  487,  115, 1036,  491,  115,
+     1043, 1161, 1028,  115,  115, 1031,  115, 1161,  115, 1022,
+      115,  115, 1016,  486,  493,  115,  490,  115,  492, 1033,
+     1032,  115,  115,  487,  115, 1034,  491,  115, 1043,  115,
+      115,  115, 1045,  188,  495,  115,  115, 1161, 1022,  115,
+     1046,  494,  496,  493,  115, 1161, 1161,  115, 1033,  115,
+
+      115,  115,  115, 1050, 1034, 1161,  115,  115, 1161,  115,
+      115, 1045, 1049,  495,  115,  115,  115,  115, 1046,  494,
+      496,  497,  115, 1041,  948, 1041,  115,  115,  115, 1051,
+      498,  115, 1050,  115,  115, 1161,  115,  500,  115,  115,
+     1049,  499,  115,  852,  115,  852,  115, 1052, 1161,  497,
+     1161,  115,  115,  115,  115, 1161,  115, 1051,  498,  115,
+     1053, 1161,  115,  115,  115, 1061,  500,  115,  115, 1060,
+      499,  115,  501,  115,  115, 1161, 1052,  115,  925,  115,
+      115,  115,  115,  115,  115,  203, 1064,  502,  115, 1053,
+      503,  926, 1065,  115, 1061, 1161,  115, 1060,  504, 1066,
+
+      501,  115,  203,  115,  115,  211,  115,  925,  115,  115,
+      505,  115, 1161, 1161, 1064,  502, 1072, 1056,  503,  926,
+     1065,  115, 1076,  115,  115,  115,  504, 1066, 1161,  115,
+      115, 1161,  507,  115,  115, 1161,  506,  115,  115,  505,
+      508, 1057,  115, 1161,  115, 1072, 1056, 1055,  115, 1075,
+     1076,  115, 1161,  211,  115, 1079,  115,  509,  115,  115,
+      115,  507,  115,  115,  506,  115,  115,  115,  508,  115,
+     1057,  115,  115, 1078,  115, 1055,  115,  512, 1075,  115,
+      510,  115,  511, 1079,  115,  509, 1161, 1161,  115,  115,
+     1161,  115,  115, 1058,  115,  115,  115,  115,  115,  513,
+
+      115, 1161, 1078,  115, 1085,  515,  512,  115,  510,  115,
+      511,  115,  115, 1161,  115,  115,  115,  115,  115,  514,
+      115,  115, 1058,  115,  115,  516,  115, 1086,  513,  115,
+      211,  517, 1085,  515,  115, 1161,  203,  115,  115,  115,
+     1161,  115,  115,  115,  115,  115,  115,  115,  514,  115,
+      115,  211,  115,  521,  516,  521, 1086,  518, 1161,  517,
+      519,  115,  115,  522,  115,  115,  115,  115, 1070,  948,
+     1070, 1081,  115, 1161,  115, 1084, 1089, 1161,  520,  115,
+      115, 1090,  115,  203, 1083,  518,  115,  115,  519,  523,
+      115,  115,  115,  115, 1094,  115, 1161, 1096,  115,  524,
+
+     1081,  115,  115, 1084, 1089,  115,  520,  115,  115, 1097,
+     1090,  115,  115, 1083,  526,  115,  115, 1082,  523,  115,
+      115,  115,  115, 1094,  115, 1096, 1099,  115,  524,  115,
+     1161,  115,  525,  115, 1161, 1161,  115, 1097,  115,  115,
+      115, 1103,  526, 1161,  115,  115, 1082, 1111,  115,  115,
+      115, 1161,  211,  115, 1099, 1104,  527, 1107,  115,  211,
+      525,  947,  948,  947,  528, 1161,  115, 1161,  115,  949,
+     1103,  203,  950,  115,  115,  531, 1111,  539, 1161,  115,
+      947,  948,  947, 1104,  527, 1107,  115, 1023,  949, 1024,
+     1161,  950,  528,  540,  540,  540,  540,  540,  540,  540,
+
+      540,  540,  540,  541,  947,  948,  947, 1101, 1161,  176,
+     1161, 1102,  949, 1161,  188,  950, 1023, 1161, 1024,  540,
+      540,  540,  540,  540,  540,  540,  540,  540,  540,  541,
+     1000, 1001, 1000, 1161, 1161,  176, 1101,  188, 1002, 1102,
+     1161, 1003, 1092,  948, 1092,  540,  540,  540,  540,  540,
+      540,  540,  540,  540,  540,  541, 1109,  948, 1109, 1098,
+     1115,  176,  115,  115, 1161,  550,  548,  115,  115,  110,
+      115,  545,  545,  545,  545,  545,  545,  545,  545,  545,
+      545,  115,  549, 1114,  115,  115,  551, 1098, 1115, 1120,
+      115,  115,  115,  554,  550,  548,  115,  115, 1121,  115,
+
+     1161,  115, 1161, 1161,  115,  552,  115, 1161, 1161,  115,
+      549, 1114,  115, 1127,  115,  551, 1123, 1120,  482,  115,
+      115,  115, 1161,  115,  115,  553,  115, 1121,  115,  115,
+      115,  203,  115, 1161,  552,  115,  947,  948,  947, 1129,
+      115, 1127,  115,  115,  949, 1123,  482,  950,  115, 1161,
+      115,  203,  115,  115,  553,  115,  211,  115,  115, 1161,
+     1161, 1000, 1001, 1000, 1161, 1161, 1116, 1129,  115, 1002,
+      115,  115, 1003,  383,  383,  383,  383,  383,  383,  383,
+      383,  383,  383,  211, 1161, 1000, 1001, 1000, 1117, 1118,
+     1117, 1161,  565, 1002, 1132, 1116, 1003, 1131, 1136, 1161,
+
+      566,  566,  566,  566,  566,  566,  566,  566,  566,  566,
+      211, 1161, 1042, 1001, 1042, 1117, 1118, 1117, 1142,  567,
+      949,  565, 1132,  950, 1161, 1131, 1136,  383,  383,  383,
+      383,  383,  383,  383,  383,  383,  383,  405,  405,  405,
+      405,  405,  405,  405,  405,  405,  405, 1142,  567,  405,
+      405,  405,  405,  405,  405,  405,  405,  405,  405,  407,
+      407,  407,  407,  407,  407,  407,  407,  407,  407,  407,
+      407,  407,  407,  407,  407,  407,  407,  407,  407,  409,
+      409,  409,  409,  409,  409,  409,  409,  409,  409,  409,
+      409,  409,  409,  409,  409,  409,  409,  409,  409,  424,
+
+      424,  424,  424,  424,  424,  424,  424,  424,  424,  424,
+      424,  424,  424,  424,  424,  424,  424,  424,  424,  426,
+      426,  426,  426,  426,  426,  426,  426,  426,  426,  426,
+      426,  426,  426,  426,  426,  426,  426,  426,  426,  428,
+      428,  428,  428,  428,  428,  428,  428,  428,  428,  428,
+      428,  428,  428,  428,  428,  428,  428,  428,  428,  588,
+      211,  588, 1161, 1161,  589,  589,  589,  589,  589,  589,
+      589,  589,  589,  589,  430,  430,  430,  430,  430,  430,
+      430,  430,  430,  430, 1161,  115, 1161,  115, 1161,  590,
+      115,  590,  115,  429,  591,  591,  591,  591,  591,  591,
+
+      591,  591,  591,  591,  115,  592,  115,  115,  115,  593,
+      203, 1119,  115,  115,  115, 1161,  115, 1141,  188,  115,
+     1161,  115,  429, 1161,  115, 1161,  115,  115,  594,  115,
+      115, 1161,  115,  592,  115,  115,  115,  115,  593, 1119,
+     1161,  115,  115,  115, 1161, 1141,  115,  203,  595,  115,
+     1149,  115, 1161,  115,  115,  115, 1146,  594,  115,  115,
+     1161, 1161,  596, 1161,  115,  115,  188,  115,  115,  115,
+     1161,  115,  597,  115,  115,  115,  595,  115,  188, 1149,
+      115,  115, 1161,  598, 1146,  115,  203,  115,  115,  115,
+      115,  596, 1144,  115,  115,  188,  115,  115,  115,  203,
+
+      599,  597,  115,  115,  115,  115, 1161,  188,  115,  115,
+      115,  598, 1161,  600,  115,  115,  115, 1130,  115,  115,
+     1144,  115,  115,  115,  115,  601,  115,  115,  599, 1143,
+      115, 1157,  115,  602,  115,  115,  115, 1148, 1161,  115,
+      115,  115,  600,  603, 1145, 1130, 1124,  948, 1124,  115,
+      115,  115,  115, 1161,  601,  115,  115, 1143, 1151,  115,
+     1157,  602,  115, 1161,  115, 1148,  188,  115,  115,  115,
+      115,  603, 1145,  605,  115,  115,  203,  115,  606,  115,
+     1161,  115, 1161, 1161,  203,  608, 1151,  608, 1161,  115,
+     1161,  115,  607,  115, 1161, 1161,  115, 1161, 1161,  115,
+
+     1161,  605, 1147,  115,  115, 1161, 1161,  606,  115,  115,
+      115, 1153, 1154, 1153,  115,  115, 1161,  115,  115,  115,
+      607,  115, 1161,  115, 1161, 1155,  609, 1161,  619,  115,
+      620, 1147, 1161,  115, 1161, 1152, 1161,  115, 1161,  115,
+      610,  115, 1161,  115,  115,  115,  621,  115,  115, 1161,
+      115, 1161,  115, 1155,  203,  609,  619,  115,  620,  622,
+      115,  115,  115, 1152,  115,  115, 1161,  115,  610,  455,
+      115,  455, 1161, 1161,  115,  621, 1153, 1154, 1153,  115,
+     1161,  629, 1161, 1161,  115, 1161, 1161,  622,  115,  115,
+     1156,  115,  115, 1159, 1160, 1159,  115, 1159, 1160, 1159,
+
+      456,  623, 1161,  115, 1161,  611,  115,  612, 1161,  629,
+      613,  115,  203,  115,  614, 1161, 1161,  615,  115, 1156,
+      616,  617, 1161, 1161,  618,  115, 1161, 1161, 1161,  623,
+      626,  115, 1161, 1161,  611,  115,  612, 1161,  115,  613,
+      115, 1161,  614,  115, 1161,  615,  115, 1161,  616,  617,
+      624,  115,  618,  115,  115,  115, 1161,  637,  626,  115,
+      115,  627, 1161, 1158, 1161,  115,  625,  115, 1161, 1161,
+     1161, 1161,  115,  115,  115,  115,  628, 1161, 1161,  624,
+      115, 1161, 1161,  115,  115,  637, 1161, 1161,  115,  115,
+      627, 1158, 1161,  115,  625, 1161, 1161, 1161, 1161, 1161,
+
+     1161,  115,  115, 1161,  628,  630,  630,  630,  630,  630,
+      630,  630,  630,  630,  630,  630, 1161,  630,  630,  630,
+      630,  630,  631,  630,  632,  632,  632,  632,  632,  632,
+      632,  632,  632,  632,  630,  630,  630,  630,  630,  633,
+      633,  633,  633,  633,  633,  633,  633,  633,  633,  633,
+      633,  633,  633,  633,  633,  633,  633,  633,  633,  633,
+      633,  633,  633,  633,  633,  630,  630,  633,  633,  633,
+      633,  633,  633,  633,  633,  633,  633,  633,  633,  633,
+      633,  633,  633,  633,  633,  633,  633,  633,  633,  633,
+      633,  633,  633,  630,  115, 1161,  635,  638,  635,  115,
+
+     1161, 1161,  115,  115, 1000, 1001, 1000, 1161,  115, 1161,
+     1161,  634, 1002,  115, 1161, 1003,  115, 1161, 1161, 1161,
+     1161, 1161,  639,  115, 1161, 1161,  638,  636,  115,  115,
+      115,  115,  115, 1161,  115,  115, 1161,  115,  115,  634,
+     1161,  115, 1161,  115,  115, 1161,  641, 1161,  115,  115,
+      639, 1161, 1161, 1161, 1161, 1161, 1161,  115,  115,  115,
+      115, 1161, 1161,  115,  115,  115, 1161,  115,  115, 1161,
+     1161, 1161,  115,  115, 1161,  641,  115,  115, 1161,  115,
+      642, 1161, 1161, 1161, 1161,  115, 1161,  643, 1161,  115,
+      115, 1161, 1161, 1161,  115,  115, 1161,  115,  644,  115,
+
+     1161, 1161,  115, 1161,  115,  645, 1161,  115,  642,  115,
+     1161, 1161,  646, 1161, 1161,  643, 1161, 1161,  115,  115,
+     1161, 1000, 1001, 1000,  115, 1161, 1161,  644,  115, 1002,
+      115,  650, 1003,  115,  645,  115,  115,  115,  647,  115,
+      646,  648,  115, 1161,  115, 1161,  115,  115, 1161,  115,
+      115, 1161, 1161, 1161, 1161, 1161,  649, 1161,  115,  115,
+      650,  115, 1161, 1161,  115,  115, 1161,  647,  115,  115,
+      648,  115, 1161,  115,  115,  652,  115,  115,  115, 1161,
+      115, 1161, 1161,  651,  649, 1161,  115, 1161,  115,  115,
+     1161,  115, 1161, 1161,  115,  115,  115, 1161,  115, 1161,
+
+      115, 1161,  653,  115,  652, 1161,  654,  115, 1161,  115,
+      115,  651,  115, 1161,  115, 1161,  115, 1161,  115, 1161,
+      115, 1161,  115,  115,  115,  115,  115,  115, 1161,  115,
+      653, 1161,  115, 1161,  654,  655,  115,  115,  115,  115,
+     1161,  115,  115,  115,  115, 1161,  115,  115,  115, 1161,
+      115, 1161,  115, 1161,  115,  115,  115, 1161,  115, 1161,
+     1161,  115,  115, 1161,  655,  115,  115, 1161,  115,  659,
+      115,  115,  115,  115,  115,  115, 1161,  115, 1161,  115,
+      656, 1161,  657, 1161,  115,  115,  115,  115, 1161,  115,
+      115,  658,  115,  115, 1161,  115,  661,  659,  115,  115,
+
+      115,  115, 1161, 1161,  115, 1161,  115, 1161,  656, 1161,
+      657, 1161,  660,  115, 1161,  115,  115,  115,  115,  115,
+      658,  115,  115,  115,  115,  661, 1161,  115, 1161,  664,
+      115, 1071,  948, 1071,  115,  662, 1161,  115,  115,  949,
+      660,  115,  950,  115, 1161, 1161,  115,  115,  115,  663,
+      115, 1161,  115,  115, 1161,  115, 1161,  115, 1161, 1161,
+      115, 1161,  115,  662, 1161,  115,  115, 1161, 1161,  115,
+      115, 1161, 1161, 1161,  665,  115,  115, 1161,  663,  115,
+     1161, 1161,  115, 1161,  115, 1161,  115,  115,  115,  115,
+      115,  115, 1161,  666,  115,  115, 1161,  115, 1161, 1161,
+
+     1161,  115,  665,  668,  115, 1161,  667, 1161,  115,  115,
+     1161,  115, 1161, 1161, 1161, 1161,  115, 1161,  115,  115,
+      115,  666,  115,  115,  115,  115, 1161,  115,  115,  115,
+      669,  668, 1161,  115,  667, 1161,  115,  115,  670,  115,
+     1161,  115, 1161, 1161, 1161,  115, 1161,  115, 1161,  115,
+      115,  115, 1161,  115,  115, 1161,  115,  115,  115,  669,
+     1161,  115,  115, 1161,  115,  115,  115,  115, 1161,  115,
+      115, 1161,  115, 1161,  115,  115, 1161, 1161, 1161,  115,
+      115, 1161,  115, 1161,  115, 1161,  115,  115,  115, 1161,
+      115,  115,  115,  115,  115,  115, 1161, 1161, 1161,  115,
+
+      115, 1161,  671, 1161, 1161,  115, 1161,  115,  115,  115,
+     1161, 1161,  115,  672,  115,  115, 1161,  115,  115, 1161,
+      115,  115,  115,  115, 1161, 1161,  115, 1161,  115, 1161,
+      671, 1161, 1161,  115, 1161,  115, 1161,  115,  115, 1161,
+      115,  115,  672,  115,  115,  673,  115,  115,  674,  115,
+      115, 1161,  115, 1161, 1161,  115,  115, 1161, 1161, 1161,
+      115,  698, 1161,  115, 1161,  115,  115, 1161,  115, 1161,
+      115, 1161, 1161,  115,  673,  115, 1161,  674,  115,  677,
+      115,  684, 1161, 1161, 1161, 1093,  948, 1093,  115, 1161,
+      698,  115, 1161,  949, 1161,  115,  950,  685,  685,  685,
+
+      685,  685,  685,  685,  685,  685,  685,  686,  115, 1110,
+      948, 1110, 1161,  176, 1161, 1161, 1161,  949, 1161, 1161,
+      950, 1161, 1161,  685,  685,  685,  685,  685,  685,  685,
+      685,  685,  685,  686,  693, 1161,  693, 1161, 1161,  176,
+     1161, 1161, 1161, 1161,  694, 1161, 1161, 1161, 1161,  685,
+      685,  685,  685,  685,  685,  685,  685,  685,  685,  686,
+      697, 1161,  697, 1161, 1161,  176,  696,  115, 1161, 1161,
+      695,  115,  115,  110,  600,  690,  690,  690,  690,  690,
+      690,  690,  690,  690,  690,  115,  115, 1161, 1161, 1161,
+     1161, 1161, 1161,  115, 1161,  696,  115, 1161,  115,  695,
+
+      115,  115,  115,  600, 1161,  115, 1161,  115,  645,  732,
+      115, 1161,  115,  115,  115,  646, 1161, 1161,  700,  699,
+      700,  115,  115, 1161,  115, 1161, 1161,  115,  701, 1161,
+     1161,  115,  702, 1161,  115, 1161,  115,  645,  732,  115,
+      115,  211, 1161,  646, 1161, 1161, 1161,  699, 1161,  115,
+     1161,  115,  115,  709, 1161,  709,  115, 1161,  710,  710,
+      710,  710,  710,  710,  710,  710,  710,  710, 1161,  211,
+      115, 1126,  948, 1126, 1161, 1161, 1161, 1161, 1161,  949,
+      115, 1161,  950, 1161, 1161,  115,  566,  566,  566,  566,
+      566,  566,  566,  566,  566,  566,  211, 1161,  115, 1161,
+
+     1161,  947,  948,  947, 1161,  565, 1161, 1161,  711,  949,
+      711, 1161,  950,  712,  712,  712,  712,  712,  712,  712,
+      712,  712,  712,  589,  589,  589,  589,  589,  589,  589,
+      589,  589,  589, 1161,  565,  589,  589,  589,  589,  589,
+      589,  589,  589,  589,  589,  591,  591,  591,  591,  591,
+      591,  591,  591,  591,  591,  591,  591,  591,  591,  591,
+      591,  591,  591,  591,  591,  733, 1161, 1161,  115, 1161,
+      115, 1161, 1161,  115,  947,  948,  947, 1161, 1000, 1001,
+     1000, 1161,  949,  737,  115,  950, 1002,  115, 1161, 1003,
+     1161, 1161, 1161, 1161,  733, 1161, 1161,  115, 1161,  115,
+
+     1161, 1161,  115, 1161, 1161, 1161, 1161, 1161, 1161, 1161,
+     1161,  737,  115,  718,  718,  115,  718,  718,  718,  718,
+      718,  718,  718,  718,  718,  718,  718,  718,  718,  718,
+      734,  718,  735,  735,  735,  735,  735,  735,  735,  735,
+      735,  735,  718,  718,  718,  718,  718,  736,  736,  736,
+      736,  736,  736,  736,  736,  736,  736,  736,  736,  736,
+      736,  736,  736,  736,  736,  736,  736,  736,  736,  736,
+      736,  736,  736,  718,  718,  736,  736,  736,  736,  736,
+      736,  736,  736,  736,  736,  736,  736,  736,  736,  736,
+      736,  736,  736,  736,  736,  736,  736,  736,  736,  736,
+
+      736,  718,  115,  115,  738,  115,  115,  115,  115,  115,
+      115,  115, 1161,  740,  115, 1161, 1161, 1161,  739,  741,
+     1161,  115,  115, 1161,  115,  115, 1161, 1161,  115, 1161,
+     1161,  115,  115,  738,  115,  115,  115,  115,  115,  115,
+      115, 1161,  740,  115, 1161, 1161,  739,  741, 1161,  115,
+      115, 1161,  115,  115,  115,  115,  115,  115, 1161,  115,
+      115,  115,  115, 1161, 1161,  745,  115, 1161, 1161,  742,
+     1161, 1161, 1161,  115,  115,  743,  115, 1161, 1161, 1161,
+      115, 1161, 1161,  115,  115, 1161,  115,  115,  115,  115,
+      115,  115,  115, 1161,  745,  115, 1161,  742,  746, 1161,
+
+     1161,  115,  115,  743,  115, 1161,  115, 1161,  115,  115,
+      115, 1161, 1161,  115,  750,  115,  115,  747,  115, 1161,
+      751,  115, 1161, 1161, 1161, 1161,  746, 1161,  115,  115,
+     1161, 1161,  115, 1161,  115,  115,  115, 1161,  115,  115,
+      115,  115,  115,  750,  115, 1161,  747,  115, 1161,  751,
+     1161, 1161, 1161, 1161,  115,  115,  115,  115,  115, 1161,
+      115, 1161, 1161,  115,  115,  115, 1161, 1161, 1161,  115,
+      115,  761, 1161, 1161,  115,  115, 1161,  115,  762,  115,
+      115, 1161,  115,  115, 1161, 1161, 1161,  115,  763, 1161,
+     1161,  115,  115,  115,  115, 1161,  115, 1161, 1161,  761,
+
+     1161, 1161,  764,  115,  115,  115, 1161,  762,  115,  115,
+      115, 1161,  115,  765,  115, 1161,  763,  115,  768,  115,
+      115,  115,  115,  115, 1161,  115, 1161, 1161, 1161,  766,
+      764,  115, 1161,  115, 1161,  115, 1161,  115,  115,  767,
+      115,  115,  765,  115, 1161, 1161,  115,  768,  115, 1161,
+     1161, 1161,  115,  769,  115,  769, 1161,  766, 1161,  115,
+     1161,  115, 1161,  258,  115,  115, 1161, 1161,  767,  115,
+      257,  257,  257,  257,  257,  257,  257,  257,  257,  257,
+      115, 1161,  115,  115,  770,  115,  115,  115,  115,  115,
+     1161,  115,  115, 1161,  115, 1161, 1161, 1161, 1161,  115,
+
+      771, 1161,  115, 1161, 1161,  115,  115, 1161,  115,  115,
+     1161, 1161,  115, 1161,  115,  115,  115,  115,  115,  115,
+      115,  115, 1161,  115,  115, 1161, 1161,  115,  771, 1161,
+      115, 1161, 1161,  115,  115,  115,  115, 1161,  772,  115,
+      115,  774,  115,  773,  115,  775,  115,  115,  115, 1161,
+     1161,  115, 1161,  115,  115, 1161, 1161, 1161,  115, 1161,
+     1161,  115,  115, 1161,  115,  115,  772,  115,  115,  115,
+      774,  115,  773,  115,  775,  115,  115, 1161, 1161,  776,
+      115,  115,  115,  115, 1161,  115,  115,  777,  115,  115,
+      115,  115,  115,  115,  780, 1161,  115,  115, 1161,  115,
+
+     1161, 1161,  115, 1161,  778,  779, 1161,  776, 1161,  115,
+     1161,  115,  115,  115,  115, 1161,  777,  115, 1161,  115,
+     1161,  115, 1161,  780, 1161, 1161,  115, 1161,  115,  115,
+      115,  781,  778,  779,  115,  115, 1161, 1161, 1161,  115,
+      115,  115, 1161, 1161, 1161, 1161,  782, 1161,  115, 1161,
+     1161, 1161, 1161, 1161,  115, 1161, 1161, 1161,  115, 1161,
+      781,  115, 1161,  115,  115,  115,  115,  783, 1161,  115,
+      115, 1161,  784,  115,  782, 1161,  115,  785,  115, 1161,
+      115, 1161,  115, 1161,  115, 1161, 1161, 1161, 1161, 1161,
+      115, 1161,  115, 1161,  115,  115,  783, 1161,  115,  115,
+
+      784, 1161,  115,  787, 1161,  115,  785,  115,  115,  115,
+      115, 1161,  115,  786,  115, 1161, 1161,  115, 1161, 1161,
+      115, 1161,  788, 1161,  115,  115, 1161,  115,  115,  789,
+      115, 1161,  787, 1161,  115, 1161,  115, 1161,  115,  115,
+     1161,  115,  786,  115,  115,  115, 1161, 1161,  115, 1161,
+      788, 1161,  115,  115,  115,  115,  115,  115,  789,  115,
+     1161,  790,  115, 1161, 1161,  115, 1161,  115,  115,  792,
+      115, 1161,  115,  115,  115, 1161,  115,  115, 1161, 1161,
+     1161, 1161,  115,  115, 1161, 1161,  115,  791,  115, 1161,
+      790,  115, 1161, 1161,  115,  115,  793,  115,  792,  115,
+
+      115,  115,  115,  115,  115,  115,  115, 1161, 1161, 1161,
+     1161, 1161, 1161,  115, 1161,  791,  115, 1161,  795,  115,
+      796, 1161, 1161,  115, 1161,  793,  115, 1161,  115,  115,
+      115,  115, 1161, 1161,  115,  115, 1161,  115, 1161,  797,
+      798,  115,  115, 1161, 1161,  115,  795,  115,  796,  115,
+     1161, 1161, 1161,  115,  115,  115,  115,  115,  115, 1161,
+      115, 1161,  115, 1161, 1161, 1161,  115,  797,  799,  798,
+     1161,  115,  801,  115,  115, 1161,  115,  800,  115,  115,
+      115, 1161,  115,  115,  115,  115,  115,  115, 1161, 1161,
+     1161,  115, 1161,  115, 1161, 1161,  799, 1161, 1161,  115,
+
+      801, 1161, 1161,  115,  115,  800, 1161, 1161,  115,  115,
+     1161, 1161,  176, 1161,  115, 1161, 1161, 1161,  176,  115,
+     1161,  115, 1161,  816,  115, 1161,  110,  115,  111,  111,
+      111,  111,  111,  111,  111,  111,  111,  111,  115,  115,
+      115,  115, 1161, 1161,  115,  115,  819,  817,  115, 1161,
+     1161,  818,  816,  115, 1161, 1161, 1161, 1161,  115,  115,
+      115, 1161, 1161, 1161, 1161, 1161,  115, 1161,  115,  115,
+      115, 1161,  211,  115,  115,  819,  817, 1161, 1161,  818,
+     1161, 1161,  211, 1161, 1161, 1161,  115,  115,  115,  710,
+      710,  710,  710,  710,  710,  710,  710,  710,  710,  710,
+
+      710,  710,  710,  710,  710,  710,  710,  710,  710,  211,
+     1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161,  211,
+     1161, 1161, 1161, 1161, 1161, 1161,  712,  712,  712,  712,
+      712,  712,  712,  712,  712,  712,  712,  712,  712,  712,
+      712,  712,  712,  712,  712,  712,  823,  823,  211,  823,
+      823,  823,  823,  823,  823,  823,  823,  823,  823,  823,
+      823,  823,  823,  828,  823,  829,  829,  829,  829,  829,
+      829,  829,  829,  829,  829,  823,  823,  823,  823,  823,
+      830,  830,  830,  830,  830,  830,  830,  830,  830,  830,
+      830,  830,  830,  830,  830,  830,  830,  830,  830,  830,
+
+      830,  830,  830,  830,  830,  830,  823,  823,  830,  830,
+      830,  830,  830,  830,  830,  830,  830,  830,  830,  830,
+      830,  830,  830,  830,  830,  830,  830,  830,  830,  830,
+      830,  830,  830,  830,  823,  832,   77,  832, 1161, 1161,
+      833,  833, 1161,  833, 1161, 1161, 1161,  833,  833, 1161,
+     1161,  833, 1161, 1161,  833,  833,  833,  833,  833,  833,
+      833,  833,  833,  831,  831, 1161,  831,  831,  831,  831,
+      831,  831,  831,  831,  831,  831,  831,  831,  831,  831,
+      841,  831,  842,  842,  842,  842,  842,  842,  842,  842,
+      842,  842,  831,  831,  831,  831,  831,  843,  843,  843,
+
+      843,  843,  843,  843,  843,  843,  843,  843,  843,  843,
+      843,  843,  843,  843,  843,  843,  843,  843,  843,  843,
+      843,  843,  843,  831,  831,  843,  843,  843,  843,  843,
+      843,  843,  843,  843,  843,  843,  843,  843,  843,  843,
+      843,  843,  843,  843,  843,  843,  843,  843,  843,  843,
+      843,  831,  115, 1161, 1161,  258, 1161,  115,  257,  257,
+      257,  257,  257,  257,  257,  257,  257,  257,  115,  845,
+     1161,  844,  115,  115,  115,  115, 1161,  115, 1161, 1161,
+      115,  115, 1161, 1161, 1161, 1161,  115,  115,  115, 1161,
+     1161,  115, 1161, 1161,  846,  115, 1161,  115,  845,  844,
+
+      115,  115,  115,  115,  115, 1161,  115,  115, 1161,  115,
+     1161, 1161,  115, 1161,  115,  115,  115, 1161,  115,  115,
+     1161, 1161,  846,  115,  115, 1161,  115, 1161, 1161,  115,
+      847, 1161, 1161, 1161, 1161, 1161,  115,  115,  848, 1161,
+     1161,  115,  115,  115, 1161,  849, 1161,  115,  115, 1161,
+      115,  115,  115, 1161,  115,  115,  115, 1161,  847,  850,
+     1161,  852,  115,  852, 1161,  115,  848, 1161, 1161,  115,
+      115, 1161,  115,  115,  849, 1161, 1161,  115,  115,  115,
+      115, 1161,  115, 1161,  115,  115,  855,  115,  850, 1161,
+      115, 1161,  115, 1161,  115, 1161,  853,  115,  115,  115,
+
+     1161,  115,  115, 1161, 1161, 1161, 1161,  115, 1161,  854,
+     1161,  115, 1161,  115,  115,  855,  115, 1161,  858,  115,
+      115, 1161, 1161,  115, 1161,  853,  115, 1161,  115,  115,
+     1161,  115, 1161,  115,  115, 1161,  866,  854, 1161,  115,
+     1161,  115, 1161,  115, 1161,  115,  867,  858,  115, 1161,
+     1161,  115, 1161,  115, 1161,  115,  115,  868, 1161, 1161,
+      115,  115, 1161,  115, 1161,  866, 1161, 1161,  115, 1161,
+      115,  115,  115,  115,  867,  869,  115,  115,  115, 1161,
+      115,  115,  871,  115, 1161,  115,  868, 1161, 1161,  870,
+      115,  115, 1161, 1161,  874, 1161, 1161,  115,  115,  115,
+
+      115,  115, 1161,  115,  869,  115,  115,  115,  115, 1161,
+      115,  871,  115,  115,  875,  115,  875,  870,  115,  115,
+      872,  873,  115,  874,  876,  115,  115, 1161,  115,  115,
+     1161,  115,  115, 1161, 1161, 1161, 1161,  115, 1161,  115,
+      877,  115, 1161, 1161,  115,  115,  115,  115,  872,  873,
+      115,  115,  115, 1161,  878,  115, 1161,  115,  115, 1161,
+      115, 1161,  879,  115, 1161,  115,  115,  115,  877,  115,
+     1161,  880,  115,  115,  115,  115,  115,  115, 1161, 1161,
+      115,  115, 1161,  878, 1161, 1161,  115,  115,  115, 1161,
+      115,  879,  115,  115,  115,  115,  115, 1161,  115,  115,
+
+      880,  115, 1161,  115,  115,  115, 1161,  881, 1161,  115,
+      115, 1161, 1161, 1161,  115,  115,  115,  882,  115,  115,
+     1161,  883,  115, 1161,  115, 1161, 1161,  115,  115,  115,
+     1161,  115, 1161,  115, 1161,  881,  115,  115, 1161,  115,
+     1161,  115,  115,  115,  115,  882,  115,  115,  115,  883,
+      115,  115, 1161,  884, 1161,  884,  115,  115, 1161, 1161,
+      115,  115,  115,  115, 1161,  115, 1161, 1161,  115,  115,
+     1161,  115,  115, 1161,  115, 1161,  115,  115,  115,  115,
+     1161,  886,  115,  888, 1161, 1161,  115, 1161,  115,  115,
+      115,  115,  115,  115,  115, 1161, 1161,  115,  887,  115,
+
+     1161,  885,  115,  115, 1161,  115, 1161, 1161,  115,  886,
+      115, 1161,  888,  889, 1161,  115, 1161,  115, 1161,  115,
+      115,  115, 1161,  115,  115, 1161,  887,  115,  115,  885,
+      115,  891,  115,  115, 1161, 1161,  890, 1161,  115,  115,
+     1161,  889, 1161, 1161,  115, 1161,  115, 1161,  115, 1161,
+     1161,  892, 1161,  115, 1161, 1161,  115, 1161,  115, 1161,
+      891,  115,  115, 1161,  890, 1161,  115,  115,  115, 1161,
+      115,  115, 1161,  115,  115,  115,  115, 1161,  895,  892,
+     1161,  115,  115, 1161, 1161, 1161,  115,  115, 1161,  115,
+      115,  115, 1161,  115, 1161,  896,  115,  896,  115,  115,
+
+      115,  115, 1161, 1161,  115,  115, 1161,  895, 1161,  115,
+     1161,  115,  115, 1161, 1161, 1161,  115,  115,  115,  115,
+      115, 1161,  115, 1161,  115,  115,  115,  115,  115,  115,
+      897,  906, 1161,  115, 1161, 1161, 1161, 1161,  898,  115,
+      115, 1161, 1161, 1161, 1161,  115, 1161,  115,  115,  115,
+     1161,  115, 1161,  115,  115,  115,  115,  115, 1161,  897,
+      906, 1161,  115, 1161,  907, 1161,  898,  115, 1161,  908,
+      115,  908, 1161,  115,  258,  115,  802,   77,  804,  175,
+      115, 1161, 1161, 1161, 1161,  115, 1161, 1161, 1161, 1161,
+      909,  115,  907, 1161, 1161,  115,  115, 1161,  115, 1161,
+
+     1161, 1161,  115, 1161, 1161, 1161, 1161,  115, 1161,  115,
+      115,  177,  178, 1161, 1161,  179, 1161,  180, 1161,  909,
+      115,  115, 1161, 1161,  115,  115, 1161, 1161,  341,  182,
+     1161,  115, 1161, 1161, 1161, 1161,  115,  115,  115, 1161,
+      177,  178, 1161, 1161,  179, 1161,  180, 1161, 1161,  115,
+     1161, 1161, 1161, 1161, 1161, 1161,  341,  182,  912,  912,
+      211,  912,  912,  912,  912,  912,  912,  912,  912,  912,
+      912,  912,  912,  912,  912,  914,  912,  915,  915,  915,
+      915,  915,  915,  915,  915,  915,  915,  912,  912,  912,
+      912,  912,  916,  916,  916,  916,  916,  916,  916,  916,
+
+      916,  916,  916,  916,  916,  916,  916,  916,  916,  916,
+      916,  916,  916,  916,  916,  916,  916,  916,  912,  912,
+      916,  916,  916,  916,  916,  916,  916,  916,  916,  916,
+      916,  916,  916,  916,  916,  916,  916,  916,  916,  916,
+      916,  916,  916,  916,  916,  916,  912,  211,  257,  257,
+      257,  257,  257,  257,  257,  257,  257,  257, 1161, 1161,
+     1161, 1161, 1161, 1161,  383,  383,  383,  383,  383,  383,
+      383,  383,  383,  383,  374,  374,  211,  374,  374,  374,
+      374,  374,  374,  374,  374,  374,  374,  374,  374,  374,
+      374,  384,  374,  385,  385,  385,  385,  385,  385,  385,
+
+      385,  385,  385,  374,  374,  374,  374,  374,  386,  386,
+      386,  386,  386,  386,  386,  386,  386,  386,  386,  386,
+      386,  386,  386,  386,  386,  386,  386,  386,  386,  386,
+      386,  386,  386,  386,  374,  374,  386,  386,  386,  386,
+      386,  386,  386,  386,  386,  386,  386,  386,  386,  386,
+      386,  386,  386,  386,  386,  386,  386,  386,  386,  386,
+      386,  386,  374,  115, 1161,  917, 1161,  115,  115,  918,
+      115,  115,  115,  919,  115, 1161,  115, 1161,  920,  115,
+     1161, 1161,  115, 1161,  115, 1161,  115, 1161, 1161, 1161,
+      115, 1161,  115,  115,  917, 1161,  115,  115,  918,  115,
+
+      115,  115,  919,  115,  922,  115, 1161,  920,  115,  115,
+      115,  115,  115, 1161,  115,  921,  115, 1161,  115, 1161,
+      115,  115, 1161,  115, 1161,  115, 1161,  115, 1161, 1161,
+      115,  115,  115,  922,  923, 1161,  115, 1161,  115,  115,
+      115,  927, 1161, 1161,  921,  115,  115, 1161,  928,  115,
+      115,  115,  115, 1161,  115, 1161,  115,  115,  115, 1161,
+      115,  115,  923,  115, 1161,  115, 1161,  115,  115,  927,
+     1161,  115,  115, 1161,  115, 1161,  928,  115,  115, 1161,
+      930,  115,  115,  115, 1161, 1161,  115, 1161,  115, 1161,
+     1161,  938,  115, 1161,  939, 1161, 1161,  115, 1161,  115,
+
+     1161,  115,  115, 1161,  115, 1161,  115, 1161,  930,  115,
+      115, 1161,  115,  115, 1161,  941, 1161,  115,  115,  938,
+     1161,  940,  939,  115, 1161, 1161, 1161, 1161, 1161,  115,
+      115, 1161,  115,  115,  115,  115, 1161, 1161,  115, 1161,
+      115, 1161,  115,  942,  941, 1161, 1161,  115,  115,  940,
+     1161,  115, 1161, 1161,  115, 1161, 1161, 1161,  115, 1161,
+      115,  115, 1161,  115,  115,  943,  115, 1161,  115,  115,
+      115,  942,  944,  115, 1161,  115,  115, 1161, 1161, 1161,
+      115,  945,  115, 1161, 1161, 1161, 1161,  115, 1161,  115,
+      115,  115, 1161,  115,  943,  115,  115,  115,  115,  115,
+
+     1161,  944,  115, 1161,  115, 1161,  951, 1161,  115,  945,
+      952, 1161,  115,  115,  115,  115,  115,  115,  115,  115,
+      115,  115,  115, 1161, 1161,  115, 1161,  115, 1161, 1161,
+     1161, 1161,  115,  115,  951,  115,  115, 1161,  952, 1161,
+      115,  115,  115,  115,  953,  115, 1161,  115,  115, 1161,
+      115, 1161,  115,  115, 1161,  115, 1161,  115,  115,  115,
+      115,  115, 1161,  115,  115,  115, 1161, 1161, 1161, 1161,
+      115,  115,  956,  953, 1161, 1161,  955, 1161,  115,  115,
+     1161,  115,  115,  115,  115, 1161,  115,  115,  115, 1161,
+      115,  115, 1161,  115, 1161,  115,  115, 1161,  115,  115,
+
+      956,  957,  115, 1161,  955, 1161,  115,  115,  115,  115,
+      115,  115, 1161,  115, 1161,  958,  115, 1161, 1161,  115,
+      115,  115,  115,  962,  115,  115,  115,  115,  115,  957,
+      115,  115, 1161, 1161,  115, 1161,  115,  115,  115,  115,
+      115,  115,  115,  969,  958,  115, 1161, 1161,  115,  115,
+     1161,  115,  962,  115, 1161,  960,  115,  115,  115,  115,
+     1161, 1161,  115,  115,  115, 1161,  115,  963,  115,  115,
+      115,  115,  969, 1161, 1161, 1161, 1161,  115,  115, 1161,
+     1161,  115, 1161,  960,  970,  115, 1161, 1161,  115,  115,
+      115,  971, 1161,  115,  115,  115,  963, 1161, 1161, 1161,
+
+      115, 1161, 1161, 1161, 1161, 1161,  115,  211,  115, 1161,
+     1161, 1161,  970,  115, 1161, 1161,  115,  975,  115, 1161,
+      971,  115, 1161,  115,  383,  383,  383,  383,  383,  383,
+      383,  383,  383,  383, 1161,  115,  115,  115, 1161,  115,
+     1161, 1161,  115,  976,  115,  115,  975, 1161,  115, 1161,
+      115, 1161, 1161,  115, 1161, 1161,  115, 1161,  115, 1161,
+     1161, 1161, 1161,  115, 1161,  977,  115,  115,  115,  115,
+      115,  115,  976,  115,  115,  115, 1161,  115,  115, 1161,
+     1161, 1161,  115,  115,  115, 1161,  115, 1161,  115,  978,
+     1161,  979, 1161,  977, 1161,  115, 1161,  115,  115,  115,
+
+     1161,  115, 1161,  115,  115,  115,  115,  115, 1161,  983,
+      115, 1161,  115,  982, 1161, 1161,  115,  978, 1161,  979,
+      115,  115, 1161, 1161,  115,  115,  115,  115,  994,  992,
+      115,  985,  115,  115,  115,  115, 1161, 1161,  983,  115,
+      115,  982, 1161, 1161, 1161, 1161,  115,  115,  115, 1161,
+      115, 1161,  115, 1161, 1161,  115,  115,  994,  992,  115,
+      985,  115,  115,  993,  115,  115,  115, 1161,  115, 1161,
+      115,  115, 1161, 1161,  115,  115, 1161, 1161,  115, 1161,
+     1161, 1161,  115, 1161,  995,  115,  996,  115,  115, 1161,
+     1161,  115,  993,  115,  115,  115,  115, 1161, 1161,  115,
+
+      115,  115,  115, 1161,  997, 1161,  115,  115, 1161, 1161,
+      115,  115,  995,  115,  996, 1161,  115, 1161,  115, 1161,
+      115,  115,  115,  115, 1161,  115, 1161,  115, 1161,  115,
+     1161,  115,  997, 1161, 1161, 1161,  115,  115,  115,  115,
+     1161,  115, 1161,  115,  115, 1004, 1161,  115,  115,  115,
+     1161,  115,  115, 1006, 1161, 1161,  115, 1161,  115,  115,
+     1161, 1161,  115, 1161,  115,  115,  115, 1161,  115,  115,
+      115,  115,  115,  115, 1004,  115, 1161,  115,  115, 1161,
+     1161, 1006, 1161, 1161, 1161,  115,  115, 1007,  115,  115,
+      115, 1161,  115,  115, 1161,  115, 1009,  115, 1161,  115,
+
+      115, 1161, 1161,  115,  115, 1161,  115, 1161,  115,  115,
+     1161,  115, 1161,  115,  115, 1007, 1012,  115, 1161, 1161,
+     1161,  115,  115, 1161, 1161, 1009,  115, 1011,  115,  115,
+     1161, 1161,  115, 1161,  115,  115, 1161,  115,  115,  115,
+      115,  115, 1161,  115, 1012, 1020,  115, 1161,  115, 1019,
+      115, 1161,  115, 1161,  115, 1011,  115,  115,  115, 1161,
+      115,  115, 1161,  115,  115, 1161,  115, 1161,  115,  115,
+      115,  115, 1025,  115, 1020,  115,  115, 1019, 1161, 1161,
+      115,  115,  115, 1161,  115, 1161,  115,  115,  115,  115,
+      115, 1161, 1161,  115, 1161,  115, 1161,  115,  115,  115,
+
+     1025,  115,  115,  115,  115, 1026,  115, 1161,  115,  115,
+     1161, 1161,  115,  115, 1161,  115, 1161, 1161,  115, 1029,
+      115, 1161,  115,  115,  115, 1161, 1030,  115, 1161,  115,
+      115,  115, 1161,  115, 1026,  115, 1161, 1161,  115, 1161,
+      115,  115, 1161,  115,  115,  115,  115, 1029,  115,  115,
+      115,  115, 1161,  115, 1161, 1030, 1038, 1161,  115, 1037,
+      115,  115, 1161,  115,  115, 1161,  115,  115, 1161, 1161,
+      115,  115,  115,  115,  115,  115, 1161, 1161,  115,  115,
+      115, 1161, 1161, 1161, 1038, 1161, 1039, 1037,  115, 1161,
+      115,  115,  115,  115, 1161,  115,  115,  115,  115, 1040,
+
+      115,  115,  115, 1161,  115,  115, 1044, 1161,  115,  115,
+     1161, 1161,  115, 1161, 1039, 1161,  115, 1161, 1161,  115,
+      115, 1161,  115,  115, 1161,  115,  115,  115, 1040,  115,
+     1161,  115, 1161,  115,  115, 1044, 1161,  115,  115,  115,
+      115, 1047,  115, 1161,  115, 1161, 1161,  115, 1161,  115,
+     1161,  115, 1161,  115,  115, 1161,  115, 1048,  115, 1161,
+      115, 1161, 1161, 1161,  115,  115,  115,  115, 1161,  115,
+     1047,  115,  115, 1161, 1161, 1054,  115, 1161, 1161,  115,
+     1059,  115,  115,  115,  115,  115, 1048,  115, 1161,  115,
+      115, 1161, 1161,  115,  115,  115, 1161,  115,  115, 1161,
+
+      115, 1161,  115, 1054,  115,  115, 1161,  115, 1062, 1059,
+      115,  115, 1161, 1161,  115, 1161,  115, 1161, 1161,  115,
+      115, 1161,  115,  115,  115,  115,  115,  115, 1063,  115,
+     1161,  115,  115, 1161, 1161, 1067, 1062, 1161, 1161,  115,
+     1161,  115, 1161,  115,  115, 1161, 1161,  115, 1161,  115,
+     1161,  115,  115,  115,  115, 1068,  115, 1063,  115,  115,
+     1161, 1161, 1161, 1067,  115, 1161,  115,  115,  115,  115,
+      115,  115, 1069,  115, 1073,  115,  115, 1161,  115, 1161,
+     1161,  115, 1161, 1161, 1068, 1161, 1161,  115,  115,  115,
+      115,  115, 1161,  115,  115,  115,  115,  115, 1161,  115,
+
+     1161, 1069,  115, 1073,  115, 1161,  115,  115, 1161,  115,
+     1080, 1161,  115, 1161, 1161,  115,  115,  115, 1161,  115,
+      115,  115, 1161,  115,  115,  115,  115, 1087,  115, 1161,
+     1161, 1161, 1161, 1161, 1088,  115,  115,  115, 1080,  115,
+     1161,  115,  115, 1161,  115,  115,  115, 1161,  115, 1161,
+      115,  115,  115,  115,  115, 1161, 1087,  115,  115, 1091,
+     1161, 1161, 1088,  115, 1161,  115, 1161,  115,  115,  115,
+      115,  115, 1095,  115,  115,  115,  115,  115, 1161, 1161,
+      115, 1161,  115, 1161, 1161, 1161,  115, 1091,  115, 1161,
+      115,  115, 1161,  115,  115,  115,  115, 1161,  115,  115,
+
+      115, 1095, 1106,  115, 1161,  115, 1161, 1161, 1161, 1161,
+      115, 1161, 1161,  115, 1105, 1161,  115,  115,  115, 1161,
+      115, 1108,  115,  115,  115,  115, 1161, 1161,  115,  115,
+     1161, 1106, 1161, 1161, 1161, 1161,  115, 1161,  115, 1161,
+      115,  115, 1105,  115, 1112,  115,  115,  115, 1161,  115,
+     1108,  115,  115,  115,  115, 1161, 1161, 1161,  115,  115,
+     1161, 1122, 1161, 1161,  115, 1161,  115, 1161,  115,  115,
+     1161,  115, 1112, 1161,  115, 1161,  115, 1161,  115, 1161,
+     1161,  115, 1161,  115, 1161, 1161, 1161,  115, 1161, 1122,
+     1161, 1161, 1161, 1161,  115, 1161,  115, 1124,  948, 1124,
+
+     1161, 1161, 1125, 1125, 1161, 1125, 1161, 1161, 1161, 1125,
+     1125, 1161, 1161, 1125, 1161, 1161, 1125, 1125, 1125, 1125,
+     1125, 1125, 1125, 1125, 1125,  115,  115, 1161, 1161, 1161,
+      115,  115, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1133,
+     1161, 1161, 1128, 1161,  115,  115, 1161, 1161, 1161, 1161,
+     1161, 1161, 1161, 1161,  115,  115, 1161, 1161, 1161,  115,
+      115, 1161, 1161, 1161, 1161, 1161, 1161, 1133, 1161, 1161,
+     1128, 1161,  115,  115,  947,  948,  947, 1161, 1161, 1134,
+     1134, 1161, 1135, 1161,  115,  950, 1134, 1134, 1137,  115,
+     1134, 1161, 1161, 1134, 1134, 1134, 1134, 1134, 1134, 1134,
+
+     1134, 1134, 1161,  115,  115,  115, 1161, 1161, 1161,  115,
+      115, 1161, 1161,  115, 1161, 1161, 1161, 1137,  115, 1161,
+     1161, 1161, 1161,  115,  115, 1161, 1161, 1161, 1161, 1161,
+     1161,  115, 1161,  115,  115, 1161, 1161, 1161,  115,  115,
+     1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161,
+     1161,  115,  115,   64,   64,   64,   64,   64,   64,   64,
+       64,   64,   64,   64,   64,   65,   65,   65,   65,   65,
+       65,   65,   65,   65,   65,   65,   65,   81,   81, 1161,
+       81,   81,   81,   81,   81,   81,   81,   81,   81,   84,
+       84, 1161,   84,   84,   84,   84,   84,   84,   84,   84,
+
+       84,   88,   88,   88,   88,   88,   88,   88,   88,   88,
+       88,   88,   88,   92,   92,   92,   92,   92,   92,   92,
+       92,   92,   92,   92,   92,  111,  111,  115,  115,  115,
+      115,  115,  115,  115,  115,  187,  187,  187,  187,  187,
+      187,  187,  187,  187,  187,  187,  187,  202,  202,  202,
+      202,  202,  202,  202,  202,  202,  202,  202,  202,  209,
+      209,  209,  209,  209,  209, 1161,  209,  209,  209, 1161,
+      209,  232,  232,  232,  232,  232,  232,  232,  232,  232,
+      232,  232,  232,  101, 1161, 1161,  101,  252,  252,  252,
+     1161, 1161,  252, 1161,  252,  252, 1161,  252,  252,  343,
+
+      343,  343,  343,  343,  343,  343,  343,  343,  343,  343,
+      343,  358,  358, 1161,  358,  358,  358,  358,  358,  358,
+      358,  358,  358,  371,  371,  371,  371,  371,  371, 1161,
+      371,  371,  371, 1161,  371,  374,  374,  374,  374,  374,
+      374,  374,  374,  374,  374,  374,  374,  379,  379,  379,
+      379,  379,  379,  379,  379,  379,  379,  379,  379,  422,
+     1161, 1161,  422,  276, 1161, 1161, 1161,  276, 1161, 1161,
+     1161, 1161, 1161,  276,  558,  558,  558,  558,  558,  558,
+      558,  558,  558,  558,  558,  558,  718,  718, 1161,  718,
+      718,  718,  718,  718,  718,  718,  718,  718,  721,  721,
+
+     1161,  721,  721,  721,  721,  721,  721,  721,  721,  721,
+      723,  723, 1161,  723,  723,  723,  723,  723,  723,  723,
+      723,  723,   88,   88,   88,   88,   88,   88,   88,   88,
+       88,   88,   88,   88,  726,  726,  726,  726,  726,  726,
+      726,  726,  726,  726,  726,  726,   92,   92,   92,   92,
+       92,   92,   92,   92,   92,   92,   92,   92,  728,  728,
+      728,  728,  728,  728,  728,  728,  728,  728,  728,  728,
+      812,  812,  812,  812,  812,  812,  812,  812,  812,  812,
+      812,  812,  814,  814, 1161,  814,  814,  814,  814,  814,
+      814,  814,  814,  814,  823,  823,  823,  823,  823,  823,
+
+      823,  823,  823,  823,  823,  823,  825,  825,  825,  825,
+      825,  825,  825,  825,  825,  825,  825,  825,  831,  831,
+     1161,  831,  831,  831,  831,  831,  831,  831,  831,  831,
+      834,  834, 1161,  834,  834,  834,  834,  834,  834,  834,
+      834,  834,   81,   81, 1161,   81,   81,   81,   81,   81,
+       81,   81,   81,   81,  835,  835, 1161,  835,  835,  835,
+      835,  835,  835,  835,  835,  835,   84,   84, 1161,   84,
+       84,   84,   84,   84,   84,   84,   84,   84,  837,  837,
+      837,  837,  837,  837,  837,  837,  837,  837,  837,  837,
+       88,   88,   88,   88,   88,   88,   88,   88,   88,   88,
+
+       88,   88,  838,  838,  838,  838,  838,  838,  838,  838,
+      838,  838,  838,  838,   92,   92,   92,   92,   92,   92,
+       92,   92,   92,   92,   92,   92,  187,  187,  187,  187,
+      187,  187,  187,  187,  187,  187,  187,  187,  904,  904,
+      904,  904,  904,  904,  904,  904,  904,  904,  904,  904,
+      358,  358, 1161,  358,  358,  358,  358,  358,  358,  358,
+      358,  358,  814,  814, 1161,  814,  814,  814,  814,  814,
+      814,  814,  814,  814,  202,  202,  202,  202,  202,  202,
+      202,  202,  202,  202,  202,  202,  912,  912,  912,  912,
+      912,  912,  912,  912,  912,  912,  912,  912,  374,  374,
+
+      374,  374,  374,  374,  374,  374,  374,  374,  374,  374,
+      379,  379,  379,  379,  379,  379,  379,  379,  379,  379,
+      379,  379,  825,  825,  825,  825,  825,  825,  825,  825,
+      825,  825,  825,  825,  946,  946,  946,  946,  946,  946,
+      946,  946,  946,  946,  946,  946,  999,  999,  999,  999,
+      999,  999,  999,  999,  999,  999,  999,  999,   13, 1161,
+     1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161,
+     1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161,
+     1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161,
+     1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161,
+
+     1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161,
+     1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161,
+     1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161,
+     1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161,
+     1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161
+    } ;
+
+static yyconst flex_int16_t yy_chk[9249] =
+    {   0,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    2,
+        2,    2,    2,   10,    8,    8,    8,    8,   15,   15,
+
+       15,   68, 1129,   14,   10, 1119,   68,    2,    2,    2,
+        2,    2,    2,    2,    2,    2,    2,   14,   16,   16,
+       16,   54,   54,   54,    2,    2,   18,   10,    2,   19,
+        2,    8,   14,   17,   17,   17,   15,   20,   21, 1096,
+       18,    2,    2,  176,   22,   14, 1084,   25,   26,  176,
+       15,   20,   21,    2,    2,   18,   10,    2,   75,    2,
+        8,   25,   42,   19,   69,   15,   20,   21,   18,    2,
+        2,   17,   24,   27,   26,   23,   25,   19,   15,   20,
+       21,   22,   23,   23,   29,   17,   75,   27,   26,   25,
+     1045,   42,   19,   24,  959,   22,   30,  339,   74,  339,
+
+       17,   82,   27,   26,  340,   19,  340,   24,   83,   69,
+       22,   29,   23,   17,   31,   27,   26,   32,   30,   34,
+       41,  178,   24,   22,  916,   29,   23,   74,   31,  912,
+       82,   32,   30,   34,   41,   24,   83,   69,   49,  685,
+       29,   23,   49,   31,  905,  685,   32,   30,   34,   41,
+      178,  207,   33,   29,   23,   28,   31,   28,   33,   32,
+       30,   34,   41,   76,   76,   76,  242,   49,   67,   67,
+       67,   49,   33,   28,   28,   28,   28,   28,   28,   28,
+       28,   28,   28,   86,   43,   63,  207,   33,   28,   43,
+       44,  350,   28,   28,   28,  242,   43,   43,  904,   28,
+
+       33,   28,   28,   63,   44,   67,   91,   28,   77,   77,
+       77,   28,   86,   43,   63,  207,  837,   28,   43,   44,
+      350,   28,   28,   28,   43,   43,   87,   28,  360,   28,
+       28,   63,   44,  835,   67,   28,   78,   78,   78,   28,
+       35,   86,   35,   35,   35,   35,   35,   35,   35,   35,
+       35,   35,   38,   40,  830,   91,   38,  360,   35,   35,
+       38,   40,   35,  903,   40,  102,   38,   40,   35,  103,
+       38,  107,   87,   40,   90,   35,   35,   79,   79,   79,
+      825,   38,   40,   91,  342,   38,  342,   35,   35,   38,
+       40,   35,   40,  102,   38,   40,   35,  103,   38,  107,
+
+       87,   40,  108,   35,   35,   36,   90,   36,   36,   36,
+       36,   36,   36,   36,   36,   36,   36,  179,   37,  359,
+       39,  359,   36,  903,  823,   37,   45,   36,  822,   37,
+      108,   39,   37,   39,   45,   90,   39,   39,   46,  205,
+       45,   36,   37,   39,  812,  179,   46,   37,  393,   39,
+      180,   36,   46,  182,   37,   45,   36,   37,   46,   39,
+       37,   39,   48,   45,   39,   39,   51,   46,   45,   36,
+       37,   39,   47,   51,  811,   46,   48,  393,  180,   48,
+       46,  182,   48,   51,  205,   47,   46,   47,  104,   50,
+      220,   48,   47,   50,  529,   51,  529,   50,  396,   52,
+
+      450,   47,   51,  104,   48,   50,   52,   48,   50,   50,
+       48,   51,  205,   47,  532,   47,   52,  104,   50,  804,
+       47,  220,   50,   80,   80,   80,   50,  396,   52,  450,
+      530,  104,  530,   50,   92,   52,   50,   50,   55,   55,
+       55,   92,   92,  532,   52,   53,   53,   53,   53,  220,
+       56,  223,  531,   53,  531,   56,   55,   55,   55,   55,
+       55,   55,   55,   55,   55,   55,  184,  184,  184,   94,
+       70,   70,   70,   71,   71,   71,   94,   94,   60,  223,
+       53,   53,   70,   53,   53,   71,   53,   56,  726,   60,
+      106,  191,   60,  686,   93,   93,   93,   53,   53,  686,
+
+      106,   56,   93,   93,  181,   70,  725,   60,   71,   53,
+       53,  181,   53,   53,  723,   53,   56,   60,  722,  106,
+       60,   72,   72,   72,  910,   53,   53,  214,  106,   56,
+       57,   58,  181,   72,   70,   96,   57,   71,  222,  181,
+      191,  716,   96,   96,   57,  189,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57,   59,  222,   58,   72,
+       59,  208,  208,  208,   59,   58,   57,   96,  191,   58,
+       59,  190,   58,   72,   59,  714,  214,  189,   61,  206,
+       57,  706,   58,   61,  910,   59,  222,   58,   72,   59,
+       61,   61,   62,   59,   58,   57,   96,   58,   59,   62,
+
+       58,   72,   59,  190,  214,  224,  189,   61,   57,   62,
+       58,  206,   61,  210,  210,  210,   62,  689,   61,   61,
+      664,   62,  225,  225,  225,  585,  580,  232,   62,  578,
+      558,  235,  190,  224,  232,  232,  554,   62,  235,  235,
+      206,  372,  372,  372,   62,   73,   73,   73,   73,   73,
+       73,   73,   73,   73,   73,   73,   73,   73,   73,   73,
+       73,   73,   73,   73,   73,   73,   73,   73,   73,   73,
+       73,   73,   73,   73,   73,   73,   73,   73,   73,   73,
+       73,   73,   73,   73,   73,   73,   73,   73,   73,   73,
+       73,   73,   73,   73,   73,   73,   73,   73,   73,   73,
+
+       73,   73,   73,   73,   73,   73,   73,   73,   73,   73,
+       73,   73,   73,   73,   73,   73,   73,   73,   73,   73,
+       73,   73,   73,   73,   73,   73,   73,   73,   73,   73,
+       73,   73,   73,   73,   97,  101,  101,  105,  204,  204,
+      204,   97,   97,  226,  538,  227,  213,  675,  101,  675,
+      534,  111,  105,  111,  111,  111,  111,  111,  111,  111,
+      111,  111,  111,  421,  101,  101,  105,  375,  375,  375,
+      419,  226,  173,  227,  173,  204,  101,  114,  213,  534,
+      105,  219,  412,   97,  113,  113,  113,  113,  113,  113,
+      113,  113,  113,  113,  114,  228,  115,  118,  219,  114,
+
+      116,  115,  118,  125,  204,  116,  410,  213,  125,  231,
+      173,   97,  100,  114,  100,  115,  118,  229,  116,  116,
+      386,  221,  125,  114,  173,  115,  118,  219,  114,  116,
+      115,  118,  125,  379,  116,  228,  249,  125,  230,  173,
+      374,  114,  251,  115,  118,  100,  116,  116,  117,  100,
+      125,  100,  173,  117,  243,  221,  100,  276,  100,  100,
+      248,  231,  117,  228,  249,  401,  229,  117,  100,  294,
+      251,  294,  401,  401,  100,  371,  343,  117,  100,  294,
+      100,  230,  117,  221,  100,  276,  100,  100,  535,  231,
+      117,  250,  243,  248,  229,  117,  100,  110,  110,  110,
+
+      110,  110,  110,  110,  110,  110,  110,  119,  121,  230,
+      913,  247,  119,  121,  120,  110,  110,  535,  119,  120,
+      243,  248,  120,  246,  400,  121,  119,  121,  110,  245,
+      233,  233,  233,  120,  341,  277,  119,  121,  233,  233,
+      344,  119,  121,  120,  110,  110,  119,  122,  120,  122,
+      244,  120,  122,  121,  119,  121,  110,  177,  123,  218,
+      400,  120,  341,  123,  212,  345,  122,  346,  344,  354,
+      913,  177,  277,  347,  209,  123,  122,  123,  122,  124,
+      202,  122,  348,  126,  124,  187,  177,  123,  126,  400,
+      124,  349,  123,  345,  122,  346,  183,  126,  124,  177,
+
+      277,  347,  126,  123,  676,  123,  676,  354,  124,  127,
+      348,  175,  126,  124,  127,  174,  237,  126,  124,  349,
+       89,  127,  127,  237,  237,  126,  124,  127,  127,  128,
+      126,  128,  129,  389,  128,  130,  354,  129,  127,  292,
+      130,  292,  361,  127,  234,  234,  234,  130,  128,  127,
+      127,  129,  234,  234,  130,  127,  127,  536,  128,  237,
+      128,  129,   88,  128,  130,  388,  129,   84,  389,  130,
+      361,  380,  380,  380,  356,  130,  128,   65,   13,  129,
+      378,  238,  130,  131,  355,  131,  536,  237,  238,  238,
+      369,  292, 1051,  388,  390,  133,  389,  392,    9,  131,
+
+      133,  131,  131,  131,  131,  131,  131,  131,  131,  131,
+      131,  132, 1081,  133,  133,  134,  132,    7,  134,  292,
+      134,  388,  132,  398,  133,  392,  356,  355,  369,  133,
+      132,  390,  378,  238,  134,  677,  131,  677,  131, 1130,
+      132,  133,  133,  381,  134,  132,  136,  134,  135,  134,
+      132,  136, 1051,  135,  356,  355,  398,  369,  132,  390,
+      378,  238,  134,  136,  131,  136,  131,  135,  135,  139,
+      377,  137, 1081,  138,  139,  136,  137,  135,  138,  137,
+      136,  381,  135,  139,  138,  398,  137,  395,  139,    0,
+      137,  136,  138,  136,  418,  135,  135,  397,  139, 1130,
+
+      137,  382,  138,  139,  140,  137,  475,  138,  137,  140,
+      381,  139,  138,  377,  137,  395,  139,  142,  137,  142,
+      138,  140,  418,  140,  141,  399,  143,  144,  143,  141,
+     1131,  537,  144,  140,  475,    0,  143,  141,  140,  391,
+      533,  377,  144,  141,  397,  382,  144,    0,  543,  140,
+      142,  140,  466,  141,  466,  142,  144,  146,  141,  143,
+      537,  144,  146,  146,  143,  141,    0,  391,  533,  142,
+      144,  141,  397,  382,  144,  399,  146,    0,  143,  142,
+      145,    0,  145,  466,  142,  145,  146,  680,  143,  680,
+     1131,  146,  146,  143,  145,  391,  145,  142,  543,  145,
+
+      147,    0,  148,  399,  146,  147,  143,  148,  557,  145,
+      484,  145,  484,  546,  145,  148,  394,  394,  394,  147,
+      484,  148,  145,  147,  145,  149,  543,  145,  149,  147,
+      149,  148,  572,  150,  147, 1148,  148,  151,  150,    0,
+        0,  546,  151,  148,  149,  150,  547,  147,    0,  148,
+      151,  147,  150,  557,  149,    0,  151,  149,    0,  149,
+      544,  572,  150,  152,  153,    0,  151,  150,  152,  153,
+        0,  151,  149,  150,  547,  153,  152,  488,  151,  488,
+      150,  557,  152,  153,  151,    0,  155,  488,    0,  154,
+      155,  155,  152,  153,  154, 1148,  544,  152,  153,  521,
+
+      154,  521,    0,  153,  152,  155,  611,    0,  154,  521,
+      152,  153,  156,  253,  253,  155,  158,  156,  154,  155,
+      155,  158,  402,  154,  158,  544,  253,    0,  154,  402,
+      402,  156,  157,  155,  611,  158,  154,  157,  559,  559,
+      559,  156,  253,  253,    0,  158,  156,  612,    0,  157,
+      158,  157,  157,  158,  253,  160,  160,  159,    0,  156,
+      160,  157,  159,  158,  614,  159,  157,  370,  370,  370,
+      615,  159,  402,  561,  160,  612,  159,  157,    0,  157,
+      157,  194,  162,  194,  160,  160,  159,  162,  161,  160,
+      161,  159,  614,  161,  159,  556,  556,  556,  615,  159,
+
+      402,  162,  160,  162,  159,    0,  161,  161,  370,  542,
+      161,  162,  575,  163,  194,  564,  162,  161,  163,  161,
+      164,  555,  161,  561,  163,  164,  164,  563,  194,  162,
+        0,  162,  163,  164,  161,  161,  556,  370,  161,  164,
+      165,  575,  163,  194,  568,  165,  692,  163,  692,  164,
+      617,  561,  163,  562,  164,  164,  194,  165,  542,  165,
+      163,  164,  564,  166,  403,  556,  682,  164,  166,  165,
+      555,  403,  403,  577,  165,  569,  563,  166,  617,  568,
+      166,    0,  166,  167,  167,  165,  542,  165,  167,  562,
+      564,  697,  166,  697,  682,  167,  569,  166,  555,  744,
+
+      403,    0,  167,  570,  563,  166,  577,  568,  166,  168,
+      166,  579,  167,  167,  168,  169,    0,  167,  562,  169,
+      169,    0,  168,  167,  570,  569,  168,  744,  168,  403,
+      167,  571,  170,    0,  169,  577,  753,  170,  168,    0,
+      170,  171,    0,  168,  169,  171,  171,  579,  169,  169,
+      168,  170,  571,  570,  168,    0,  168,  574,  574,  574,
+      171,  170,  169,  172,  753,  581,  170,  604,  172,  170,
+      171,  172,  581,  581,  171,  171,  579,  582,  613,  170,
+      618,  571,  172,  687,  582,  582,    0,    0,  171,  678,
+        0,  678,  172,  185,  185,  185,  604,  172,  756,  678,
+
+      172,  581,  679,  635,  815,  635,  815,  613,  757,  618,
+      172,  185,  185,  185,  185,  185,  185,  185,  185,  185,
+      185,  186,  681,  687,    0,  678,  756,  186,  713,    0,
+      581,  679,  691,  608,  635,  608,  757,  186,  186,  186,
+      186,  186,  186,  186,  186,  186,  186,  192,  683,  713,
+      683,  681,  687,  192,  678,  684,  684,  684,  683,    0,
+      703,  691,  683,  192,  192,  192,  192,  192,  192,  192,
+      192,  192,  192,  193,  608,  215,  215,  215,  713,  193,
+      708,  708,  708,  748,  826,  826,  826,  193,  608,  193,
+      193,  193,  193,  193,  193,  193,  193,  193,  193,  195,
+
+      703,  196,  197,  608,  195,  749,  196,  197,  215,    0,
+      195,  616,  748,  196,  196,  688,  608,  195,  195,  196,
+      196,  197,  215,  832,  832,  832,  704,  616,  195,  703,
+      196,  197,  707,  195,  749,  196,  197,  215,  195,  198,
+      616,  196,  196,    0,  198,  195,  195,  196,  196,  197,
+      215,  688,  702,  198,  702,  616,  200,    0,  198,  201,
+      199,  200,  199,  201,  201,  199,  702,  755,  198,  758,
+        0,  200,  707,  198,  199,  200,  199,  704,  201,  199,
+      688,  198,  759,  807,    0,  200,  198,    0,  201,  199,
+      200,  199,  201,  201,  199,  216,  755,    0,  758,  200,
+
+        0,  707,  199,  200,  199,  704,  201,  199,    0,    0,
+      759,  807,  216,  216,  216,  216,  216,  216,  216,  216,
+      216,  216,  217,  217,  217,  217,  217,  217,  217,  217,
+      217,  217,  217,  217,  217,  217,  217,  217,  217,  217,
+      217,  217,  217,  217,  217,  217,  217,  217,  217,  217,
+      217,  217,  217,  217,  217,  217,  217,  217,  217,  217,
+      217,  217,  217,  217,  217,  217,  217,  217,  217,  217,
+      217,  217,  217,  217,  217,  217,  217,  217,  217,  217,
+      217,  217,  217,  217,  217,  217,  217,  217,  217,  217,
+      217,  217,  217,  217,  217,  217,  217,  217,  217,  217,
+
+      217,  217,  217,  217,  217,  217,  217,  217,  217,  217,
+      217,  239,    0,  239,  860,  760,  239,  239,  239,  239,
+      239,  239,  239,  239,  239,  239,  240,    0,  240,  863,
+      805,  240,  240,  240,  240,  240,  240,  240,  240,  240,
+      240,  241,  860,  241,  760,  806,  241,  241,  241,  241,
+      241,  241,  241,  241,  241,  241,  254,  863,  254,  805,
+        0,  254,  254,  254,  254,  254,  254,  254,  254,  254,
+      254,  255,    0,  255,  806,    0,  255,  255,  255,  255,
+      255,  255,  255,  255,  255,  255,  256,  808,  256,  259,
+      865,  256,  256,  256,  256,  256,  256,  256,  256,  256,
+
+      256,  257,  257,  257,  257,  257,  257,  257,  257,  257,
+      257,    0,  259,  769,  260,  769,  808,  259,  865,  260,
+      257,  258,  258,  258,  258,  258,  258,  258,  258,  258,
+      258,  259,  260,  260,  261,  813,  901,  262,  901,  261,
+      258,  259,  262,  260,  769,  261,  259,  727,  260,  257,
+      908,  262,  908,  261,  727,  727,  262,  263,  705,  259,
+      260,  260,  263,  261,  813,  693,  262,  693,  261,  258,
+      263,  262,    0,  261,    0,  693,  263,  264,  266,  262,
+      265,  261,  264,  266,  262,  265,  263,  803,  266,  803,
+      264,  263,    0,    0,  705,  803,  264,  266,  263,  265,
+
+      265,  693,  851,  268,  263,  810,  264,  266,  268,  265,
+      267,  264,  266,    0,  265,  267,  266,    0,  264,    0,
+      268,  267,  268,  705,  264,  266,    0,  265,  265,  267,
+      693,  851,  268,  269,    0,  271,  821,  268,  269,  267,
+      271,  270,  810,    0,  267,  700,  270,  700,  268,  267,
+      268,  269,  269,  270,  271,  700,  270,  267,  272,  700,
+      270,    0,  269,  272,  271,  272,  728,  269,    0,  271,
+      270,  810,  821,  728,  728,  270,    0,  272,  273,  269,
+      269,  270,  271,  273,  270,  274,    0,  272,  270,  273,
+      274,  729,  272,  794,  272,  794,  274,  273,  729,  729,
+
+        0,  821,    0,  794,  274,  272,    0,  273,  278,  278,
+      857,  275,  273,  278,  274,  275,  275,  273,  900,  274,
+      859,  809,  809,  809,  274,  273,  820,  278,  279,  809,
+      275,  280,  274,  279,  824,  279,  280,  278,  278,  857,
+      275,  284,  278,  284,  275,  275,  900,  279,  281,  859,
+      280,  861,  281,  281,    0,  278,  862,  279,  275,  864,
+      280,  925,  279,  820,  279,  280,    0,  281,  283,    0,
+        0,  824,  284,  283,  284,  279,  283,  281,  280,  284,
+      861,  281,  281,  838,  875,  862,  875,  283,  864,  925,
+      838,  838,  820,  284,  875,  281,  282,  283,  282,  285,
+
+      824,  894,  283,  284,  285,  283,  286,  899,  284,  422,
+      422,  286,  839,  902,  893,  283,  893,  285,  285,  839,
+      839,  284,  422,    0,  893,  286,    0,  282,  285,  282,
+      894,  911,  282,  285,  282,  286,  899,  282,  422,  422,
+      286,  282,  902,    0,  282,  285,  285,  282,  282,  289,
+      422,  282,  287,  286,  289,  288,  287,  287,  282,  288,
+      288,  282,  934,  282,  937,  884,  282,  884,  289,  282,
+        0,  287,  282,    0,  288,  282,  282,  926,  289,  282,
+      911,  287,  290,  289,  288,  287,  287,  290,  288,  288,
+      291,  934,  291,  937,  290,  291,  289,  929,  293,  287,
+
+      931,  290,  288,  293,  896,  926,  896,  932,  911,  291,
+        0,  290,  293,  884,    0,  296,  290,  293,  933,  291,
+      296,  291,  290,  935,  291,  929,  296,  293,  931,  290,
+      961,  297,  293,    0,  296,  932,  297,  291,  298,  896,
+      293,  884,  297,  298,  296,  293,  933,    0,  954,  296,
+      297,  935,    0,  964,  296,    0,    0,  298,  298,  961,
+      297,  299,  296,    0,    0,  297,  299,  298,  896,  965,
+      297,  980,  298,  948,  948,  948,  954,  966,  297,  972,
+      299,  299,  964,  300,  301,  298,  298,  300,  300,  301,
+      299,  302,  301,  302,  303,  299,  303,  965,  967,  980,
+
+      300,  302,  300,  301,  303,  968,  966,  968,  299,  299,
+        0,    0,  300,  301,  989,  972,  300,  300,  301,  990,
+      304,  301,  973,  981,  302,  304,  984,  303,  300,  302,
+      300,  301,  303,  967,  968,  302,  968,    0,  303,  304,
+      304,  986,  989,  302,  972,  302,  303,  990,  303,  304,
+     1005,    0,  981,  302,  304,  984,  303,    0,  302,  973,
+      305,  303,  967,  302,  305,  305,  303,  304,  304,  987,
+      986,  302,  306,  302,  303,  988,  303,  306, 1005,  305,
+      307,  308, 1008, 1016,  307,  307,  308,    0,  973,  305,
+     1010,  306,  308,  305,  305,    0,    0,  309,  987,  307,
+
+      308,  306,  309, 1015,  988,    0,  306,  305,    0,  307,
+      308, 1008, 1013,  307,  307,  308,  309,  310, 1010,  306,
+      308,  309,  310,  998,  998,  998,  309,  307,  308, 1016,
+      310,  309, 1015,  311,  312,    0,  310,  313,  311,  312,
+     1013,  311,  313,  852,  309,  852,  310, 1017,    0,  309,
+        0,  310,  311,  312,  314,    0,  313, 1016,  310,  314,
+     1018,    0,  311,  312,  310, 1028,  313,  311,  312, 1027,
+      311,  313,  314,  314,  315,    0, 1017,  316,  852,  315,
+      311,  312,  316,  314,  313, 1022, 1032,  315,  314, 1018,
+      316,  852, 1034,  315, 1028,    0,  316, 1027,  316, 1036,
+
+      314,  314, 1021,  315,  317, 1023,  316,  852,  315,  317,
+      317,  316,    0,    0, 1032,  315, 1043, 1022,  316,  852,
+     1034,  315, 1049,  317,  316,  318,  316, 1036,    0,  319,
+      318,    0,  319,  317,  319,    0,  318,  320,  317,  317,
+      319, 1023,  320,    0,  318, 1043, 1022, 1021,  319, 1046,
+     1049,  317,    0, 1024,  318, 1053,  320,  320,  319,  318,
+      321,  319,  322,  319,  318,  321,  320,  322,  319,  323,
+     1023,  320,  318, 1052,  323, 1021,  319,  323, 1046,  321,
+      321,  322,  322, 1053,  320,  320,    0,    0,  323,  321,
+        0,  322,  326, 1024,  321,  324,  322,  326,  323,  324,
+
+      324,    0, 1052,  323, 1060,  326,  323,  321,  321,  322,
+      322,  326,  328,    0,  324,  325,  323,  328,  327,  325,
+      325,  326, 1024,  327,  324,  327,  326, 1061,  324,  324,
+     1058,  328, 1060,  326,  325,    0, 1055,  327,  329,  326,
+        0,  328,  324,  329,  325,  330,  328,  327,  325,  325,
+      330, 1057,  327,  332,  327,  332, 1061,  329,    0,  328,
+      330,  331,  325,  332,  330,  327,  331,  329, 1041, 1041,
+     1041, 1055,  329,    0,  330, 1058, 1064,    0,  331,  330,
+      331, 1066,  333, 1056, 1057,  329,  332,  333,  330,  333,
+      331,  332,  330,  334, 1072,  331,    0, 1074,  334,  334,
+
+     1055,  333,  336, 1058, 1064,  332,  331,  336,  331, 1076,
+     1066,  333,  334, 1057,  336,  332,  333, 1056,  333,  335,
+      332,  336,  334, 1072,  335, 1074, 1078,  334,  334,  333,
+        0,  336,  335,  332,    0,    0,  336, 1076,  335,  337,
+      334, 1085,  336,    0,  337,  338, 1056, 1094,  335,  336,
+      338,    0,  974,  335, 1078, 1086,  337, 1090,  337, 1083,
+      335,  876,  876,  876,  338,    0,  335,    0,  337,  876,
+     1085, 1082,  876,  337,  338,  351, 1094,  351,    0,  338,
+      946,  946,  946, 1086,  337, 1090,  337,  974,  946,  974,
+        0,  946,  338,  351,  351,  351,  351,  351,  351,  351,
+
+      351,  351,  351,  352,  947,  947,  947, 1082,    0,  352,
+        0, 1083,  947,    0, 1077,  947,  974,    0,  974,  352,
+      352,  352,  352,  352,  352,  352,  352,  352,  352,  353,
+      949,  949,  949,    0,    0,  353, 1082, 1098,  949, 1083,
+        0,  949, 1070, 1070, 1070,  353,  353,  353,  353,  353,
+      353,  353,  353,  353,  353,  357, 1092, 1092, 1092, 1077,
+     1099,  357,  362,  363,    0,  364,  362,  362,  363,  357,
+      364,  357,  357,  357,  357,  357,  357,  357,  357,  357,
+      357,  362,  363, 1098,  364,  365,  365, 1077, 1099, 1103,
+      365,  362,  363,  368,  364,  362,  362,  363, 1104,  364,
+
+        0,  366,    0,    0,  365,  366,  366,    0,    0,  362,
+      363, 1098,  364, 1111,  365,  365, 1107, 1103,  366,  365,
+      366,  367,    0,  433,  368,  367,  367, 1104,  433,  368,
+      366, 1100,  365,    0,  366,  366,  950,  950,  950, 1113,
+      367, 1111,  433,  368,  950, 1107,  366,  950,  366,    0,
+      367, 1116,  433,  368,  367,  367,  383,  433,  368,    0,
+        0,  999,  999,  999,    0,    0, 1100, 1113,  367,  999,
+      433,  368,  999,  383,  383,  383,  383,  383,  383,  383,
+      383,  383,  383,  384,    0, 1000, 1000, 1000, 1101, 1101,
+     1101,    0,  383, 1000, 1121, 1100, 1000, 1116, 1127,    0,
+
+      384,  384,  384,  384,  384,  384,  384,  384,  384,  384,
+      387,    0, 1001, 1001, 1001, 1117, 1117, 1117, 1136,  384,
+     1001,  383, 1121, 1001,    0, 1116, 1127,  387,  387,  387,
+      387,  387,  387,  387,  387,  387,  387,  404,  404,  404,
+      404,  404,  404,  404,  404,  404,  404, 1136,  384,  405,
+      405,  405,  405,  405,  405,  405,  405,  405,  405,  406,
+      406,  406,  406,  406,  406,  406,  406,  406,  406,  407,
+      407,  407,  407,  407,  407,  407,  407,  407,  407,  408,
+      408,  408,  408,  408,  408,  408,  408,  408,  408,  409,
+      409,  409,  409,  409,  409,  409,  409,  409,  409,  423,
+
+      423,  423,  423,  423,  423,  423,  423,  423,  423,  424,
+      424,  424,  424,  424,  424,  424,  424,  424,  424,  425,
+      425,  425,  425,  425,  425,  425,  425,  425,  425,  426,
+      426,  426,  426,  426,  426,  426,  426,  426,  426,  427,
+      427,  427,  427,  427,  427,  427,  427,  427,  427,  428,
+      428,  428,  428,  428,  428,  428,  428,  428,  428,  429,
+     1102,  429,    0,    0,  429,  429,  429,  429,  429,  429,
+      429,  429,  429,  429,  430,  430,  430,  430,  430,  430,
+      430,  430,  430,  430,    0,  436,    0,  434,    0,  431,
+      436,  431,  434,  430,  431,  431,  431,  431,  431,  431,
+
+      431,  431,  431,  431,  436,  434,  434,  435,  437,  435,
+     1144, 1102,  435,  437,  436,    0,  434, 1132, 1147,  436,
+        0,  434,  430,    0,  438,    0,  435,  437,  438,  438,
+      439,    0,  436,  434,  434,  439,  435,  437,  435, 1102,
+        0,  435,  437,  438,    0, 1132,  440, 1140,  439,  439,
+     1147,  440,    0,  438,  435,  437, 1144,  438,  438,  439,
+        0,    0,  441,    0,  439,  440, 1114,  441,  442,  443,
+        0,  438,  442,  442,  443,  440,  439,  439, 1139, 1147,
+      440,  441,    0,  443, 1144,  446, 1146,  442,  443,  444,
+      446,  441, 1140,  440,  444, 1143,  441,  442,  443, 1156,
+
+      444,  442,  442,  443,  446,  445,    0, 1149,  444,  441,
+      445,  443,    0,  445,  446,  442,  443, 1114,  444,  446,
+     1140,  447,  448,  444,  445,  447,  447,  448,  444, 1139,
+      449, 1156,  446,  448,  445,  449,  444, 1146,    0,  445,
+      447,  448,  445,  449, 1143, 1114, 1124, 1124, 1124,  449,
+      447,  448,  445,    0,  447,  447,  448, 1139, 1149,  449,
+     1156,  448,  451,    0,  449, 1146, 1145,  451,  447,  448,
+      452,  449, 1143,  451,  453,  452, 1152,  449,  452,  453,
+        0,  451,    0,    0, 1150,  454, 1149,  454,    0,  452,
+        0,  451,  453,  453,    0,    0,  451,    0,    0,  452,
+
+        0,  451, 1145,  453,  452,    0,    0,  452,  453,  451,
+      458, 1151, 1151, 1151,  457,  458,    0,  452,  454,  457,
+      453,  453,    0,  454,    0, 1152,  454,    0,  457,  458,
+      458, 1145,    0,  457,    0, 1150,    0,  454,    0,  458,
+      454,  459,    0,  457,  458,  460,  459,  454,  457,    0,
+      460,    0,  454, 1152, 1155,  454,  457,  458,  458,  460,
+      459,  457,  468, 1150,  460,  454,    0,  468,  454,  455,
+      459,  455,    0,    0,  460,  459, 1153, 1153, 1153,  460,
+        0,  468,    0,    0,  461,    0,    0,  460,  459,  461,
+     1155,  468,  460, 1158, 1158, 1158,  468, 1159, 1159, 1159,
+
+      455,  461,    0,  461,    0,  455,  463,  455,    0,  468,
+      455,  463, 1157,  461,  455,    0,    0,  455,  461, 1155,
+      455,  455,    0,    0,  455,  463,    0,    0,    0,  461,
+      463,  461,    0,    0,  455,  463,  455,    0,  472,  455,
+      463,    0,  455,  472,    0,  455,  462,    0,  455,  455,
+      462,  462,  455,  463,  464,  465,    0,  472,  463,  464,
+      465,  464,    0, 1157,    0,  462,  462,  472,    0,    0,
+        0,    0,  472,  464,  465,  462,  465,    0,    0,  462,
+      462,    0,    0,  464,  465,  472,    0,    0,  464,  465,
+      464, 1157,    0,  462,  462,    0,    0,    0,    0,    0,
+
+        0,  464,  465,    0,  465,  469,  469,  469,  469,  469,
+      469,  469,  469,  469,  469,  469,    0,  469,  469,  469,
+      469,  469,  469,  469,  469,  469,  469,  469,  469,  469,
+      469,  469,  469,  469,  469,  469,  469,  469,  469,  469,
+      469,  469,  469,  469,  469,  469,  469,  469,  469,  469,
+      469,  469,  469,  469,  469,  469,  469,  469,  469,  469,
+      469,  469,  469,  469,  469,  469,  469,  469,  469,  469,
+      469,  469,  469,  469,  469,  469,  469,  469,  469,  469,
+      469,  469,  469,  469,  469,  469,  469,  469,  469,  469,
+      469,  469,  469,  469,  470,    0,  471,  473,  471,  470,
+
+        0,    0,  473,  474, 1002, 1002, 1002,    0,  474,    0,
+        0,  470, 1002,  470,    0, 1002,  473,    0,    0,    0,
+        0,    0,  474,  470,    0,    0,  473,  471,  470,  471,
+      476,  473,  474,    0,  471,  476,    0,  474,  477,  470,
+        0,  470,    0,  477,  473,    0,  477,    0,  471,  476,
+      474,    0,    0,    0,    0,    0,    0,  477,  471,  476,
+      478,    0,    0,  471,  476,  478,    0,  477,  479,    0,
+        0,    0,  477,  479,    0,  477,  471,  476,    0,  478,
+      478,    0,    0,    0,    0,  477,    0,  479,    0,  478,
+      480,    0,    0,    0,  478,  480,    0,  479,  480,  481,
+
+        0,    0,  479,    0,  481,  481,    0,  478,  478,  480,
+        0,    0,  481,    0,    0,  479,    0,    0,  481,  480,
+        0, 1003, 1003, 1003,  480,    0,    0,  480,  481, 1003,
+      482,  487, 1003,  481,  481,  482,  487,  480,  482,  483,
+      481,  483,  486,    0,  483,    0,  481,  486,    0,  482,
+      487,    0,    0,    0,    0,    0,  486,    0,  483,  482,
+      487,  486,    0,    0,  482,  487,    0,  482,  483,  490,
+      483,  486,    0,  483,  490,  491,  486,  482,  487,    0,
+      491,    0,    0,  490,  486,    0,  483,    0,  490,  486,
+        0,  492,    0,    0,  491,  493,  492,    0,  490,    0,
+
+      493,    0,  492,  490,  491,    0,  493,  494,    0,  491,
+      492,  490,  494,    0,  493,    0,  490,    0,  495,    0,
+      492,    0,  491,  495,  493,  492,  494,  496,    0,  493,
+      492,    0,  496,    0,  493,  496,  494,  495,  492,  497,
+        0,  494,  493,  498,  497,    0,  496,  495,  498,    0,
+      502,    0,  495,    0,  494,  502,  496,    0,  497,    0,
+        0,  496,  498,    0,  496,  495,  499,    0,  497,  502,
+      500,  499,  498,  497,  496,  500,    0,  498,    0,  502,
+      499,    0,  500,    0,  502,  499,  497,  501,    0,  500,
+      498,  501,  501,  503,    0,  499,  504,  502,  503,  500,
+
+      499,  504,    0,    0,  500,    0,  501,    0,  499,    0,
+      500,    0,  503,  499,    0,  504,  501,  500,  505,  507,
+      501,  501,  503,  505,  507,  504,    0,  503,    0,  508,
+      504, 1042, 1042, 1042,  501,  505,    0,  505,  507, 1042,
+      503,  506, 1042,  504,    0,    0,  506,  505,  507,  506,
+      508,    0,  505,  507,    0,  508,    0,  509,    0,    0,
+      506,    0,  509,  505,    0,  505,  507,    0,    0,  508,
+      506,    0,    0,    0,  509,  506,  509,    0,  506,  508,
+        0,    0,  510,    0,  508,    0,  509,  510,  506,  511,
+      512,  509,    0,  510,  511,  512,    0,  508,    0,    0,
+
+        0,  510,  509,  512,  509,    0,  511,    0,  511,  512,
+        0,  510,    0,    0,    0,    0,  510,    0,  511,  512,
+      513,  510,  515,  511,  512,  513,    0,  515,  514,  510,
+      514,  512,    0,  514,  511,    0,  511,  512,  517,  513,
+        0,  515,    0,    0,    0,  516,    0,  514,    0,  513,
+      516,  515,    0,  518,  513,    0,  515,  514,  518,  514,
+        0,  517,  514,    0,  516,  519,  517,  513,    0,  515,
+      519,    0,  518,    0,  516,  514,    0,    0,    0,  516,
+      517,    0,  518,    0,  519,    0,  523,  518,  520,    0,
+      517,  523,  516,  520,  519,  517,    0,    0,    0,  519,
+
+      518,    0,  520,    0,    0,  523,    0,  520,  517,  524,
+        0,    0,  519,  524,  524,  523,    0,  520,  525,    0,
+      523,  526,  520,  525,    0,    0,  526,    0,  524,    0,
+      520,    0,    0,  523,    0,  520,    0,  525,  524,    0,
+      526,  527,  524,  524,  528,  527,  527,  525,  528,  528,
+      526,    0,  525,    0,    0,  526,  524,    0,    0,    0,
+      527,  551,    0,  528,    0,  525,  551,    0,  526,    0,
+      527,    0,    0,  528,  527,  527,    0,  528,  528,  539,
+      551,  539,    0,    0,    0, 1071, 1071, 1071,  527,    0,
+      551,  528,    0, 1071,    0,  551, 1071,  539,  539,  539,
+
+      539,  539,  539,  539,  539,  539,  539,  540,  551, 1093,
+     1093, 1093,    0,  540,    0,    0,    0, 1093,    0,    0,
+     1093,    0,    0,  540,  540,  540,  540,  540,  540,  540,
+      540,  540,  540,  541,  548,    0,  548,    0,    0,  541,
+        0,    0,    0,    0,  548,    0,    0,    0,    0,  541,
+      541,  541,  541,  541,  541,  541,  541,  541,  541,  545,
+      550,    0,  550,    0,    0,  545,  549,  548,    0,    0,
+      548,  549,  548,  545,  549,  545,  545,  545,  545,  545,
+      545,  545,  545,  545,  545,  549,  548,    0,    0,    0,
+        0,    0,    0,  550,    0,  549,  548,    0,  550,  548,
+
+      549,  548,  552,  549,    0,  592,    0,  552,  552,  592,
+      592,    0,  550,  549,  548,  552,    0,    0,  553,  552,
+      553,  552,  550,    0,  592,    0,    0,  550,  553,    0,
+        0,  552,  553,    0,  592,    0,  552,  552,  592,  592,
+      550,  565,    0,  552,    0,    0,    0,  552,    0,  552,
+        0,  553,  592,  565,    0,  565,  553,    0,  565,  565,
+      565,  565,  565,  565,  565,  565,  565,  565,    0,  566,
+      553, 1110, 1110, 1110,    0,    0,    0,    0,    0, 1110,
+      553,    0, 1110,    0,    0,  553,  566,  566,  566,  566,
+      566,  566,  566,  566,  566,  566,  567,    0,  553,    0,
+
+        0, 1125, 1125, 1125,    0,  566,    0,    0,  567, 1125,
+      567,    0, 1125,  567,  567,  567,  567,  567,  567,  567,
+      567,  567,  567,  588,  588,  588,  588,  588,  588,  588,
+      588,  588,  588,    0,  566,  589,  589,  589,  589,  589,
+      589,  589,  589,  589,  589,  590,  590,  590,  590,  590,
+      590,  590,  590,  590,  590,  591,  591,  591,  591,  591,
+      591,  591,  591,  591,  591,  593,    0,    0,  595,    0,
+      593,    0,    0,  595, 1134, 1134, 1134,    0, 1135, 1135,
+     1135,    0, 1134,  595,  593, 1134, 1135,  595,    0, 1135,
+        0,    0,    0,    0,  593,    0,    0,  595,    0,  593,
+
+        0,    0,  595,    0,    0,    0,    0,    0,    0,    0,
+        0,  595,  593,  594,  594,  595,  594,  594,  594,  594,
+      594,  594,  594,  594,  594,  594,  594,  594,  594,  594,
+      594,  594,  594,  594,  594,  594,  594,  594,  594,  594,
+      594,  594,  594,  594,  594,  594,  594,  594,  594,  594,
+      594,  594,  594,  594,  594,  594,  594,  594,  594,  594,
+      594,  594,  594,  594,  594,  594,  594,  594,  594,  594,
+      594,  594,  594,  594,  594,  594,  594,  594,  594,  594,
+      594,  594,  594,  594,  594,  594,  594,  594,  594,  594,
+      594,  594,  594,  594,  594,  594,  594,  594,  594,  594,
+
+      594,  594,  596,  597,  596,  598,  600,  596,  597,  599,
+      598,  600,    0,  599,  599,    0,    0,    0,  598,  600,
+        0,  596,  597,    0,  598,  600,    0,    0,  599,    0,
+        0,  596,  597,  596,  598,  600,  596,  597,  599,  598,
+      600,    0,  599,  599,    0,    0,  598,  600,    0,  596,
+      597,    0,  598,  600,  601,  602,  599,  603,    0,  601,
+      602,  605,  603,    0,    0,  605,  605,    0,    0,  602,
+        0,    0,    0,  601,  602,  603,  603,    0,    0,    0,
+      605,    0,    0,  601,  602,    0,  603,  606,  601,  602,
+      605,  603,  606,    0,  605,  605,    0,  602,  606,    0,
+
+        0,  601,  602,  603,  603,    0,  606,    0,  605,  609,
+      607,    0,    0,  610,  609,  607,  606,  607,  610,    0,
+      610,  606,    0,    0,    0,    0,  606,    0,  609,  607,
+        0,    0,  610,    0,  606,  619,  621,    0,  609,  607,
+      619,  621,  610,  609,  607,    0,  607,  610,    0,  610,
+        0,    0,    0,    0,  619,  621,  609,  607,  620,    0,
+      610,    0,    0,  620,  619,  621,    0,    0,    0,  619,
+      621,  620,    0,    0,  623,  622,    0,  620,  622,  623,
+      622,    0,  619,  621,    0,    0,    0,  620,  623,    0,
+        0,  624,  620,  623,  622,    0,  624,    0,    0,  620,
+
+        0,    0,  624,  623,  622,  620,    0,  622,  623,  622,
+      624,    0,  625,  625,  626,    0,  623,  625,  628,  626,
+      624,  623,  622,  628,    0,  624,    0,    0,    0,  626,
+      624,  625,    0,  626,    0,  627,    0,  628,  624,  627,
+      627,  625,  625,  626,    0,    0,  625,  628,  626,    0,
+        0,    0,  628,  629,  627,  629,    0,  626,    0,  625,
+        0,  626,    0,  632,  627,  628,    0,    0,  627,  627,
+      631,  631,  631,  631,  631,  631,  631,  631,  631,  631,
+      632,    0,  627,  633,  629,  632,  629,  634,  633,  637,
+        0,  629,  634,    0,  637,    0,    0,    0,    0,  632,
+
+      634,    0,  633,    0,    0,  629,  634,    0,  637,  632,
+        0,    0,  633,    0,  632,  629,  634,  633,  637,  638,
+      629,  634,    0,  637,  638,    0,    0,  632,  634,    0,
+      633,    0,    0,  629,  634,  639,  637,    0,  638,  641,
+      639,  641,  642,  639,  641,  642,  643,  642,  638,    0,
+        0,  643,    0,  638,  639,    0,    0,    0,  641,    0,
+        0,  642,  644,    0,  639,  643,  638,  644,  641,  639,
+      641,  642,  639,  641,  642,  643,  642,    0,    0,  644,
+      643,  644,  639,  645,    0,  646,  641,  645,  645,  642,
+      646,  644,  647,  643,  648,    0,  644,  647,    0,  648,
+
+        0,    0,  645,    0,  646,  647,    0,  644,    0,  644,
+        0,  647,  645,  648,  646,    0,  645,  645,    0,  646,
+        0,  647,    0,  648,    0,    0,  647,    0,  648,  649,
+      645,  649,  646,  647,  649,  650,    0,    0,    0,  647,
+      650,  648,    0,    0,    0,    0,  650,    0,  649,    0,
+        0,    0,    0,    0,  650,    0,    0,    0,  649,    0,
+      649,  652,    0,  649,  650,  651,  652,  651,    0,  650,
+      651,    0,  652,  653,  650,    0,  649,  653,  653,    0,
+      652,    0,  650,    0,  651,    0,    0,    0,    0,    0,
+      652,    0,  653,    0,  651,  652,  651,    0,  655,  651,
+
+      652,    0,  653,  655,    0,  654,  653,  653,  652,  656,
+      654,    0,  651,  654,  656,    0,    0,  655,    0,    0,
+      653,    0,  656,    0,  654,  657,    0,  655,  656,  657,
+      657,    0,  655,    0,  654,    0,  658,    0,  656,  654,
+        0,  658,  654,  656,  657,  655,    0,    0,  660,    0,
+      656,    0,  654,  660,  657,  658,  656,  659,  657,  657,
+        0,  659,  659,    0,    0,  658,    0,  660,  661,  662,
+      658,    0,  657,  661,  662,    0,  659,  660,    0,    0,
+        0,    0,  660,  658,    0,    0,  659,  661,  662,    0,
+      659,  659,    0,    0,  663,  660,  663,  661,  662,  663,
+
+      665,  666,  661,  662,  659,  665,  666,    0,    0,    0,
+        0,    0,    0,  663,    0,  661,  662,    0,  665,  665,
+      666,    0,    0,  663,    0,  663,  667,    0,  663,  665,
+      666,  667,    0,    0,  665,  666,    0,  668,    0,  667,
+      668,  663,  668,    0,    0,  667,  665,  665,  666,  669,
+        0,    0,    0,  672,  669,  667,  668,  671,  672,    0,
+      667,    0,  671,    0,    0,    0,  668,  667,  669,  668,
+        0,  668,  672,  667,  673,    0,  671,  671,  669,  673,
+      674,    0,  672,  669,  668,  674,  671,  672,    0,    0,
+        0,  671,    0,  673,    0,    0,  669,    0,    0,  674,
+
+      672,    0,    0,  673,  671,  671,    0,    0,  673,  674,
+        0,    0,  690,    0,  674,    0,    0,    0,  690,  695,
+        0,  673,    0,  695,  695,    0,  690,  674,  690,  690,
+      690,  690,  690,  690,  690,  690,  690,  690,  695,  696,
+      698,  699,    0,    0,  696,  698,  699,  696,  695,    0,
+        0,  698,  695,  695,    0,    0,    0,    0,  696,  698,
+      699,    0,    0,    0,    0,    0,  695,    0,  696,  698,
+      699,    0,  709,  696,  698,  699,  696,    0,    0,  698,
+        0,    0,  710,    0,    0,    0,  696,  698,  699,  709,
+      709,  709,  709,  709,  709,  709,  709,  709,  709,  710,
+
+      710,  710,  710,  710,  710,  710,  710,  710,  710,  711,
+        0,    0,    0,    0,    0,    0,    0,    0,    0,  712,
+        0,    0,    0,    0,    0,    0,  711,  711,  711,  711,
+      711,  711,  711,  711,  711,  711,  712,  712,  712,  712,
+      712,  712,  712,  712,  712,  712,  715,  715,  715,  715,
+      715,  715,  715,  715,  715,  715,  715,  715,  715,  715,
+      715,  715,  715,  715,  715,  715,  715,  715,  715,  715,
+      715,  715,  715,  715,  715,  715,  715,  715,  715,  715,
+      715,  715,  715,  715,  715,  715,  715,  715,  715,  715,
+      715,  715,  715,  715,  715,  715,  715,  715,  715,  715,
+
+      715,  715,  715,  715,  715,  715,  715,  715,  715,  715,
+      715,  715,  715,  715,  715,  715,  715,  715,  715,  715,
+      715,  715,  715,  715,  715,  715,  715,  715,  715,  715,
+      715,  715,  715,  715,  715,  719,  719,  719,    0,    0,
+      719,  719,    0,  719,    0,    0,    0,  719,  719,    0,
+        0,  719,    0,    0,  719,  719,  719,  719,  719,  719,
+      719,  719,  719,  732,  732,    0,  732,  732,  732,  732,
+      732,  732,  732,  732,  732,  732,  732,  732,  732,  732,
+      732,  732,  732,  732,  732,  732,  732,  732,  732,  732,
+      732,  732,  732,  732,  732,  732,  732,  732,  732,  732,
+
+      732,  732,  732,  732,  732,  732,  732,  732,  732,  732,
+      732,  732,  732,  732,  732,  732,  732,  732,  732,  732,
+      732,  732,  732,  732,  732,  732,  732,  732,  732,  732,
+      732,  732,  732,  732,  732,  732,  732,  732,  732,  732,
+      732,  732,  732,  732,  732,  732,  732,  732,  732,  732,
+      732,  732,  733,    0,    0,  735,    0,  733,  734,  734,
+      734,  734,  734,  734,  734,  734,  734,  734,  736,  737,
+        0,  733,  735,  736,  737,  738,    0,  735,    0,    0,
+      738,  733,    0,    0,    0,    0,  733,  736,  737,    0,
+        0,  735,    0,    0,  738,  739,    0,  736,  737,  733,
+
+      739,  735,  736,  737,  738,    0,  735,  740,    0,  738,
+        0,    0,  740,    0,  739,  736,  737,    0,  741,  735,
+        0,    0,  738,  741,  739,    0,  740,    0,    0,  739,
+      740,    0,    0,    0,    0,    0,  740,  741,  741,    0,
+        0,  740,  739,  742,    0,  742,    0,  741,  742,    0,
+      747,  743,  741,    0,  740,  747,  743,    0,  740,  743,
+        0,  745,  742,  745,    0,  741,  741,    0,    0,  747,
+      743,    0,  742,  750,  742,    0,    0,  742,  750,  747,
+      743,    0,  746,    0,  747,  743,  746,  746,  743,    0,
+      742,    0,  750,    0,  745,    0,  745,  747,  743,  745,
+
+        0,  746,  750,    0,    0,    0,    0,  750,    0,  745,
+        0,  746,    0,  745,  751,  746,  746,    0,  751,  751,
+      750,    0,    0,  745,    0,  745,  762,    0,  745,  746,
+        0,  762,    0,  751,  761,    0,  761,  745,    0,  761,
+        0,  745,    0,  751,    0,  762,  762,  751,  751,    0,
+        0,  763,    0,  761,    0,  762,  763,  763,    0,    0,
+      762,  751,    0,  761,    0,  761,    0,    0,  761,    0,
+      763,  764,  765,  762,  762,  764,  764,  765,  766,    0,
+      763,  761,  766,  766,    0,  763,  763,    0,    0,  765,
+      764,  765,    0,    0,  771,    0,    0,  766,  763,  771,
+
+      764,  765,    0,  767,  764,  764,  765,  766,  767,    0,
+      768,  766,  766,  771,  772,  768,  772,  765,  764,  765,
+      767,  768,  767,  771,  772,  766,  773,    0,  771,  768,
+        0,  773,  767,    0,    0,    0,    0,  767,    0,  768,
+      773,  771,    0,    0,  768,  773,  774,  772,  767,  768,
+      767,  774,  772,    0,  774,  773,    0,  768,  775,    0,
+      773,    0,  775,  775,    0,  774,  772,  776,  773,  778,
+        0,  776,  776,  773,  778,  774,  772,  775,    0,    0,
+      774,  772,    0,  774,    0,    0,  776,  775,  778,    0,
+      777,  775,  775,  774,  772,  777,  776,    0,  778,  779,
+
+      776,  776,    0,  778,  779,  775,    0,  777,    0,  777,
+      780,    0,    0,    0,  776,  780,  778,  779,  779,  777,
+        0,  780,  781,    0,  777,    0,    0,  781,  779,  780,
+        0,  782,    0,  779,    0,  777,  782,  777,    0,  780,
+        0,  781,  783,  784,  780,  779,  779,  783,  784,  780,
+      782,  781,    0,  785,    0,  785,  781,  780,    0,    0,
+      782,  783,  784,  786,    0,  782,    0,    0,  786,  781,
+        0,  783,  784,    0,  787,    0,  783,  784,  782,  787,
+        0,  786,  786,  788,    0,    0,  785,    0,  788,  783,
+      784,  785,  786,  787,  789,    0,    0,  786,  787,  789,
+
+        0,  785,  788,  787,    0,  785,    0,    0,  787,  786,
+      786,    0,  788,  789,    0,  785,    0,  788,    0,  790,
+      785,  787,    0,  789,  790,    0,  787,  791,  789,  785,
+      788,  791,  791,  785,    0,    0,  790,    0,  790,  792,
+        0,  789,    0,    0,  792,    0,  791,    0,  790,    0,
+        0,  792,    0,  790,    0,    0,  791,    0,  792,    0,
+      791,  791,  793,    0,  790,    0,  790,  793,  792,    0,
+      795,  796,    0,  792,  791,  795,  796,    0,  795,  792,
+        0,  793,  797,    0,    0,    0,  792,  797,    0,  795,
+      796,  793,    0,  798,    0,  799,  793,  799,  798,  795,
+
+      796,  797,    0,    0,  795,  796,    0,  795,    0,  793,
+        0,  797,  798,    0,    0,    0,  797,  795,  796,  800,
+      801,    0,  798,    0,  800,  801,  816,  798,  799,  797,
+      799,  816,    0,  799,    0,    0,    0,    0,  800,  801,
+      798,    0,    0,    0,    0,  816,    0,  799,  800,  801,
+        0,  817,    0,  800,  801,  816,  817,  799,    0,  799,
+      816,    0,  799,    0,  817,    0,  800,  801,    0,  818,
+      817,  818,    0,  816,  842,  799,  802,  802,  802,  802,
+      817,    0,    0,    0,    0,  817,    0,    0,    0,    0,
+      819,  842,  817,    0,    0,  819,  842,    0,  817,    0,
+
+        0,    0,  818,    0,    0,    0,    0,  818,    0,  819,
+      842,  802,  802,    0,    0,  802,    0,  802,    0,  819,
+      842,  818,    0,    0,  819,  842,    0,    0,  802,  802,
+        0,  818,    0,    0,    0,    0,  818,  819,  842,    0,
+      802,  802,    0,    0,  802,    0,  802,    0,    0,  818,
+        0,    0,    0,    0,    0,    0,  802,  802,  827,  827,
+      827,  827,  827,  827,  827,  827,  827,  827,  827,  827,
+      827,  827,  827,  827,  827,  827,  827,  827,  827,  827,
+      827,  827,  827,  827,  827,  827,  827,  827,  827,  827,
+      827,  827,  827,  827,  827,  827,  827,  827,  827,  827,
+
+      827,  827,  827,  827,  827,  827,  827,  827,  827,  827,
+      827,  827,  827,  827,  827,  827,  827,  827,  827,  827,
+      827,  827,  827,  827,  827,  827,  827,  827,  827,  827,
+      827,  827,  827,  827,  827,  827,  827,  827,  827,  827,
+      827,  827,  827,  827,  827,  827,  827,  828,  841,  841,
+      841,  841,  841,  841,  841,  841,  841,  841,    0,    0,
+        0,    0,    0,    0,  828,  828,  828,  828,  828,  828,
+      828,  828,  828,  828,  829,  829,  829,  829,  829,  829,
+      829,  829,  829,  829,  829,  829,  829,  829,  829,  829,
+      829,  829,  829,  829,  829,  829,  829,  829,  829,  829,
+
+      829,  829,  829,  829,  829,  829,  829,  829,  829,  829,
+      829,  829,  829,  829,  829,  829,  829,  829,  829,  829,
+      829,  829,  829,  829,  829,  829,  829,  829,  829,  829,
+      829,  829,  829,  829,  829,  829,  829,  829,  829,  829,
+      829,  829,  829,  829,  829,  829,  829,  829,  829,  829,
+      829,  829,  829,  829,  829,  829,  829,  829,  829,  829,
+      829,  829,  829,  843,    0,  844,    0,  847,  843,  844,
+      844,  845,  847,  845,  846,    0,  845,    0,  846,  846,
+        0,    0,  843,    0,  844,    0,  847,    0,    0,    0,
+      845,    0,  843,  846,  844,    0,  847,  843,  844,  844,
+
+      845,  847,  845,  846,  849,  845,    0,  846,  846,  849,
+      843,  848,  844,    0,  847,  848,  848,    0,  845,    0,
+      850,  846,    0,  849,    0,  850,    0,  853,    0,    0,
+      848,  854,  853,  849,  850,    0,  854,    0,  849,  850,
+      848,  853,    0,    0,  848,  848,  853,    0,  854,  850,
+      854,  849,  855,    0,  850,    0,  853,  855,  848,    0,
+      854,  853,  850,  858,    0,  854,    0,  850,  858,  853,
+        0,  855,  866,    0,  853,    0,  854,  866,  854,    0,
+      858,  855,  858,  867,    0,    0,  855,    0,  867,    0,
+        0,  866,  858,    0,  867,    0,    0,  858,    0,  855,
+
+        0,  866,  867,    0,  868,    0,  866,    0,  858,  868,
+      858,    0,  867,  869,    0,  869,    0,  867,  869,  866,
+        0,  868,  867,  868,    0,    0,    0,    0,    0,  870,
+      867,    0,  869,  868,  870,  871,    0,    0,  868,    0,
+      871,    0,  869,  870,  869,    0,    0,  869,  870,  868,
+        0,  868,    0,    0,  871,    0,    0,    0,  870,    0,
+      869,  872,    0,  870,  871,  872,  872,    0,  873,  871,
+      874,  870,  873,  873,    0,  874,  870,    0,    0,    0,
+      872,  874,  871,    0,    0,    0,    0,  873,    0,  874,
+      872,  878,    0,  877,  872,  872,  878,  873,  877,  874,
+
+        0,  873,  873,    0,  874,    0,  877,    0,  872,  874,
+      878,    0,  877,  879,  880,  873,  881,  874,  879,  880,
+      878,  881,  877,    0,    0,  878,    0,  877,    0,    0,
+        0,    0,  879,  880,  877,  881,  882,    0,  878,    0,
+      877,  882,  879,  880,  882,  881,    0,  879,  880,    0,
+      881,    0,  883,  886,    0,  882,    0,  883,  886,  885,
+      879,  880,    0,  881,  885,  882,    0,    0,    0,    0,
+      882,  883,  886,  882,    0,    0,  885,    0,  885,  887,
+        0,  883,  886,  882,  887,    0,  883,  886,  885,    0,
+      888,  890,    0,  885,    0,  888,  890,    0,  887,  883,
+
+      886,  888,  891,    0,  885,    0,  885,  891,  887,  888,
+      890,  889,    0,  887,    0,  889,  889,    0,    0,  888,
+      890,  891,  892,  897,  888,  890,  887,  892,  897,  888,
+      889,  891,    0,    0,  895,    0,  891,  888,  890,  895,
+      889,  892,  897,  906,  889,  889,    0,    0,  906,  891,
+        0,  892,  897,  895,    0,  895,  892,  897,  889,  898,
+        0,    0,  906,  895,  898,    0,  907,  898,  895,  892,
+      897,  907,  906,    0,    0,    0,    0,  906,  898,    0,
+        0,  895,    0,  895,  907,  907,    0,    0,  898,  909,
+      906,  909,    0,  898,  909,  907,  898,    0,    0,    0,
+
+      907,    0,    0,    0,    0,    0,  898,  914,  909,    0,
+        0,    0,  907,  907,    0,    0,  917,  917,  909,    0,
+      909,  917,    0,  909,  914,  914,  914,  914,  914,  914,
+      914,  914,  914,  914,    0,  917,  909,  918,    0,  919,
+        0,    0,  918,  919,  919,  917,  917,    0,  920,    0,
+      917,    0,    0,  920,    0,    0,  918,    0,  919,    0,
+        0,    0,    0,  917,    0,  920,  918,  920,  919,  921,
+      922,  918,  919,  919,  921,  922,    0,  920,  923,    0,
+        0,    0,  920,  923,  918,    0,  919,    0,  921,  922,
+        0,  923,    0,  920,    0,  920,    0,  923,  921,  922,
+
+        0,  927,    0,  921,  922,  928,  927,  923,    0,  928,
+      928,    0,  923,  927,    0,    0,  921,  922,    0,  923,
+      927,  938,    0,    0,  928,  923,  938,  930,  940,  938,
+      927,  930,  930,  940,  928,  927,    0,    0,  928,  928,
+      938,  927,    0,    0,    0,    0,  930,  940,  927,    0,
+      938,    0,  928,    0,    0,  938,  930,  940,  938,  939,
+      930,  930,  940,  939,  939,  941,  942,    0,  938,    0,
+      941,  942,    0,    0,  930,  940,    0,    0,  939,    0,
+        0,    0,  943,    0,  941,  942,  942,  943,  939,    0,
+        0,  944,  939,  939,  941,  942,  944,    0,    0,  941,
+
+      942,  943,  945,    0,  944,    0,  939,  945,    0,    0,
+      944,  943,  941,  942,  942,    0,  943,    0,  951,    0,
+      944,  945,  952,  951,    0,  944,    0,  952,    0,  943,
+        0,  945,  944,    0,    0,    0,  945,  951,  944,  955,
+        0,  952,    0,  953,  955,  953,    0,  951,  953,  945,
+        0,  952,  951,  955,    0,    0,  952,    0,  955,  956,
+        0,    0,  953,    0,  956,  951,  957,    0,  955,  952,
+      958,  957,  953,  955,  953,  958,    0,  953,  956,    0,
+        0,  955,    0,    0,    0,  957,  955,  958,  956,  958,
+      953,    0,  960,  956,    0,  957,  960,  960,    0,  958,
+
+      957,    0,    0,  963,  958,    0,  956,    0,  963,  962,
+        0,  960,    0,  957,  962,  958,  963,  958,    0,    0,
+        0,  960,  963,    0,    0,  960,  960,  962,  962,  969,
+        0,    0,  963,    0,  969,  970,    0,  963,  962,  960,
+      970,  971,    0,  962,  963,  971,  971,    0,  969,  969,
+      963,    0,  976,    0,  970,  962,  962,  976,  969,    0,
+      971,  975,    0,  969,  970,    0,  975,    0,  977,  970,
+      971,  976,  975,  977,  971,  971,  969,  969,    0,    0,
+      975,  976,  970,    0,  979,    0,  976,  977,  971,  979,
+      975,    0,    0,  985,    0,  975,    0,  977,  985,  976,
+
+      975,  978,  977,  979,  982,  978,  978,    0,  975,  982,
+        0,    0,  985,  979,    0,  977,    0,    0,  979,  982,
+      978,    0,  985,  982,  983,    0,  983,  985,    0,  983,
+      978,  979,    0,  982,  978,  978,    0,    0,  982,    0,
+      985,  993,    0,  983,  994,  992,  993,  982,  978,  994,
+      992,  982,    0,  983,    0,  983,  994,    0,  983,  992,
+      993,  995,    0,  994,  992,    0,  995,  996,    0,    0,
+      993,  983,  996,  994,  992,  993,    0,    0,  994,  992,
+      995,    0,    0,    0,  994,    0,  996,  992,  993,    0,
+      995,  994,  992, 1004,    0,  995,  996,  997, 1004,  997,
+
+     1007,  996,  997,    0, 1006, 1007, 1006,    0,  995, 1006,
+        0,    0, 1004,    0,  996,    0,  997,    0,    0, 1007,
+     1009,    0, 1004, 1006,    0, 1009,  997, 1004,  997, 1007,
+        0,  997,    0, 1006, 1007, 1006,    0, 1011, 1006, 1009,
+     1004, 1011, 1011,    0,  997,    0,    0, 1007,    0, 1009,
+        0, 1006,    0, 1012, 1009,    0, 1011, 1012, 1012,    0,
+     1020,    0,    0,    0, 1019, 1020, 1011, 1009,    0, 1019,
+     1011, 1011, 1012,    0,    0, 1019, 1025,    0,    0, 1020,
+     1025, 1025, 1012, 1019, 1011, 1026, 1012, 1012,    0, 1020,
+     1026,    0,    0, 1019, 1020, 1025,    0, 1029, 1019,    0,
+
+     1012,    0, 1029, 1019, 1026, 1025,    0, 1020, 1029, 1025,
+     1025, 1019,    0,    0, 1026,    0, 1029,    0,    0, 1026,
+     1030,    0, 1037, 1025, 1038, 1030, 1029, 1037, 1030, 1038,
+        0, 1029, 1026,    0,    0, 1037, 1029,    0,    0, 1030,
+        0, 1037,    0, 1038, 1029,    0,    0, 1039,    0, 1030,
+        0, 1037, 1039, 1038, 1030, 1039, 1037, 1030, 1038, 1047,
+        0,    0,    0, 1037, 1047,    0, 1039, 1030, 1040, 1037,
+     1044, 1038, 1040, 1040, 1044, 1044, 1039,    0, 1047,    0,
+        0, 1039,    0,    0, 1039,    0,    0, 1040, 1047, 1044,
+     1048, 1054,    0, 1047, 1039, 1048, 1054, 1040,    0, 1044,
+
+        0, 1040, 1040, 1044, 1044,    0, 1047, 1059,    0, 1048,
+     1054,    0, 1059,    0,    0, 1040, 1063, 1044,    0, 1048,
+     1054, 1063,    0, 1062, 1048, 1054, 1059, 1062, 1062,    0,
+        0,    0,    0,    0, 1063, 1063, 1059, 1048, 1054, 1067,
+        0, 1059, 1062,    0, 1067, 1063, 1068,    0, 1069,    0,
+     1063, 1068, 1062, 1069, 1059,    0, 1062, 1062, 1067, 1068,
+        0,    0, 1063, 1063,    0, 1068,    0, 1069, 1067, 1073,
+     1062, 1080, 1073, 1067, 1073, 1068, 1080, 1069,    0,    0,
+     1068,    0, 1069,    0,    0,    0, 1067, 1068, 1073,    0,
+     1080, 1087,    0, 1068, 1088, 1069, 1087,    0, 1073, 1088,
+
+     1080, 1073, 1088, 1073,    0, 1080,    0,    0,    0,    0,
+     1087,    0,    0, 1088, 1087,    0, 1073, 1091, 1080,    0,
+     1087, 1091, 1091, 1088, 1095, 1087,    0,    0, 1088, 1095,
+        0, 1088,    0,    0,    0,    0, 1091,    0, 1087,    0,
+     1105, 1088, 1087, 1095, 1095, 1105, 1091, 1106,    0, 1108,
+     1091, 1091, 1106, 1095, 1108,    0,    0,    0, 1095, 1105,
+        0, 1106,    0,    0, 1091,    0, 1106,    0, 1108, 1105,
+        0, 1095, 1095,    0, 1105,    0, 1106,    0, 1108,    0,
+        0, 1106,    0, 1108,    0,    0,    0, 1105,    0, 1106,
+        0,    0,    0,    0, 1106,    0, 1108, 1109, 1109, 1109,
+
+        0,    0, 1109, 1109,    0, 1109,    0,    0,    0, 1109,
+     1109,    0,    0, 1109,    0,    0, 1109, 1109, 1109, 1109,
+     1109, 1109, 1109, 1109, 1109, 1112, 1122,    0,    0,    0,
+     1112, 1122,    0,    0,    0,    0,    0,    0,    0, 1122,
+        0,    0, 1112,    0, 1112, 1122,    0,    0,    0,    0,
+        0,    0,    0,    0, 1112, 1122,    0,    0,    0, 1112,
+     1122,    0,    0,    0,    0,    0,    0, 1122,    0,    0,
+     1112,    0, 1112, 1122, 1126, 1126, 1126,    0,    0, 1126,
+     1126,    0, 1126,    0, 1128, 1126, 1126, 1126, 1128, 1128,
+     1126,    0,    0, 1126, 1126, 1126, 1126, 1126, 1126, 1126,
+
+     1126, 1126,    0, 1128, 1133, 1137,    0,    0,    0, 1133,
+     1137,    0,    0, 1128,    0,    0,    0, 1128, 1128,    0,
+        0,    0,    0, 1133, 1137,    0,    0,    0,    0,    0,
+        0, 1128,    0, 1133, 1137,    0,    0,    0, 1133, 1137,
+        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+        0, 1133, 1137, 1162, 1162, 1162, 1162, 1162, 1162, 1162,
+     1162, 1162, 1162, 1162, 1162, 1163, 1163, 1163, 1163, 1163,
+     1163, 1163, 1163, 1163, 1163, 1163, 1163, 1164, 1164,    0,
+     1164, 1164, 1164, 1164, 1164, 1164, 1164, 1164, 1164, 1165,
+     1165,    0, 1165, 1165, 1165, 1165, 1165, 1165, 1165, 1165,
+
+     1165, 1166, 1166, 1166, 1166, 1166, 1166, 1166, 1166, 1166,
+     1166, 1166, 1166, 1167, 1167, 1167, 1167, 1167, 1167, 1167,
+     1167, 1167, 1167, 1167, 1167, 1168, 1168, 1169, 1169, 1169,
+     1169, 1169, 1169, 1169, 1169, 1170, 1170, 1170, 1170, 1170,
+     1170, 1170, 1170, 1170, 1170, 1170, 1170, 1171, 1171, 1171,
+     1171, 1171, 1171, 1171, 1171, 1171, 1171, 1171, 1171, 1172,
+     1172, 1172, 1172, 1172, 1172,    0, 1172, 1172, 1172,    0,
+     1172, 1173, 1173, 1173, 1173, 1173, 1173, 1173, 1173, 1173,
+     1173, 1173, 1173, 1174,    0,    0, 1174, 1175, 1175, 1175,
+        0,    0, 1175,    0, 1175, 1175,    0, 1175, 1175, 1176,
+
+     1176, 1176, 1176, 1176, 1176, 1176, 1176, 1176, 1176, 1176,
+     1176, 1177, 1177,    0, 1177, 1177, 1177, 1177, 1177, 1177,
+     1177, 1177, 1177, 1178, 1178, 1178, 1178, 1178, 1178,    0,
+     1178, 1178, 1178,    0, 1178, 1179, 1179, 1179, 1179, 1179,
+     1179, 1179, 1179, 1179, 1179, 1179, 1179, 1180, 1180, 1180,
+     1180, 1180, 1180, 1180, 1180, 1180, 1180, 1180, 1180, 1181,
+        0,    0, 1181, 1182,    0,    0,    0, 1182,    0,    0,
+        0,    0,    0, 1182, 1183, 1183, 1183, 1183, 1183, 1183,
+     1183, 1183, 1183, 1183, 1183, 1183, 1184, 1184,    0, 1184,
+     1184, 1184, 1184, 1184, 1184, 1184, 1184, 1184, 1185, 1185,
+
+        0, 1185, 1185, 1185, 1185, 1185, 1185, 1185, 1185, 1185,
+     1186, 1186,    0, 1186, 1186, 1186, 1186, 1186, 1186, 1186,
+     1186, 1186, 1187, 1187, 1187, 1187, 1187, 1187, 1187, 1187,
+     1187, 1187, 1187, 1187, 1188, 1188, 1188, 1188, 1188, 1188,
+     1188, 1188, 1188, 1188, 1188, 1188, 1189, 1189, 1189, 1189,
+     1189, 1189, 1189, 1189, 1189, 1189, 1189, 1189, 1190, 1190,
+     1190, 1190, 1190, 1190, 1190, 1190, 1190, 1190, 1190, 1190,
+     1191, 1191, 1191, 1191, 1191, 1191, 1191, 1191, 1191, 1191,
+     1191, 1191, 1192, 1192,    0, 1192, 1192, 1192, 1192, 1192,
+     1192, 1192, 1192, 1192, 1193, 1193, 1193, 1193, 1193, 1193,
+
+     1193, 1193, 1193, 1193, 1193, 1193, 1194, 1194, 1194, 1194,
+     1194, 1194, 1194, 1194, 1194, 1194, 1194, 1194, 1195, 1195,
+        0, 1195, 1195, 1195, 1195, 1195, 1195, 1195, 1195, 1195,
+     1196, 1196,    0, 1196, 1196, 1196, 1196, 1196, 1196, 1196,
+     1196, 1196, 1197, 1197,    0, 1197, 1197, 1197, 1197, 1197,
+     1197, 1197, 1197, 1197, 1198, 1198,    0, 1198, 1198, 1198,
+     1198, 1198, 1198, 1198, 1198, 1198, 1199, 1199,    0, 1199,
+     1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1200, 1200,
+     1200, 1200, 1200, 1200, 1200, 1200, 1200, 1200, 1200, 1200,
+     1201, 1201, 1201, 1201, 1201, 1201, 1201, 1201, 1201, 1201,
+
+     1201, 1201, 1202, 1202, 1202, 1202, 1202, 1202, 1202, 1202,
+     1202, 1202, 1202, 1202, 1203, 1203, 1203, 1203, 1203, 1203,
+     1203, 1203, 1203, 1203, 1203, 1203, 1204, 1204, 1204, 1204,
+     1204, 1204, 1204, 1204, 1204, 1204, 1204, 1204, 1205, 1205,
+     1205, 1205, 1205, 1205, 1205, 1205, 1205, 1205, 1205, 1205,
+     1206, 1206,    0, 1206, 1206, 1206, 1206, 1206, 1206, 1206,
+     1206, 1206, 1207, 1207,    0, 1207, 1207, 1207, 1207, 1207,
+     1207, 1207, 1207, 1207, 1208, 1208, 1208, 1208, 1208, 1208,
+     1208, 1208, 1208, 1208, 1208, 1208, 1209, 1209, 1209, 1209,
+     1209, 1209, 1209, 1209, 1209, 1209, 1209, 1209, 1210, 1210,
+
+     1210, 1210, 1210, 1210, 1210, 1210, 1210, 1210, 1210, 1210,
+     1211, 1211, 1211, 1211, 1211, 1211, 1211, 1211, 1211, 1211,
+     1211, 1211, 1212, 1212, 1212, 1212, 1212, 1212, 1212, 1212,
+     1212, 1212, 1212, 1212, 1213, 1213, 1213, 1213, 1213, 1213,
+     1213, 1213, 1213, 1213, 1213, 1213, 1214, 1214, 1214, 1214,
+     1214, 1214, 1214, 1214, 1214, 1214, 1214, 1214, 1161, 1161,
+     1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161,
+     1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161,
+     1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161,
+     1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161,
+
+     1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161,
+     1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161,
+     1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161,
+     1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161,
+     1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161
+    } ;
+
+static yy_state_type yy_last_accepting_state;
+static char *yy_last_accepting_cpos;
+
+extern int fortran_flex_debug;
+int fortran_flex_debug = 0;
+
+/* The intent behind this definition is that it'll catch
+ * any uses of REJECT which flex missed.
+ */
+#define REJECT reject_used_but_not_detected
+#define yymore() yymore_used_but_not_detected
+#define YY_MORE_ADJ 0
+#define YY_RESTORE_YY_MORE_OFFSET
+char *fortrantext;
+#line 1 "fortran.lex"
+/******************************************************************************/
+/*                                                                            */
+/*     CONV (converter) for Agrif (Adaptive Grid Refinement In Fortran)       */
+/*                                                                            */
+/* Copyright or   or Copr. Laurent Debreu (Laurent.Debreu@imag.fr)            */
+/*                        Cyril Mazauric (Cyril_Mazauric@yahoo.fr)            */
+/* This software is governed by the CeCILL-C license under French law and     */
+/* abiding by the rules of distribution of free software.  You can  use,      */
+/* modify and/ or redistribute the software under the terms of the CeCILL-C   */
+/* license as circulated by CEA, CNRS and INRIA at the following URL          */
+/* "http://www.cecill.info".                                                  */
+/*                                                                            */
+/* As a counterpart to the access to the source code and  rights to copy,     */
+/* modify and redistribute granted by the license, users are provided only    */
+/* with a limited warranty  and the software's author,  the holder of the     */
+/* economic rights,  and the successive licensors  have only  limited         */
+/* liability.                                                                 */
+/*                                                                            */
+/* In this respect, the user's attention is drawn to the risks associated     */
+/* with loading,  using,  modifying and/or developing or reproducing the      */
+/* software by the user in light of its specific status of free software,     */
+/* that may mean  that it is complicated to manipulate,  and  that  also      */
+/* therefore means  that it is reserved for developers  and  experienced      */
+/* professionals having in-depth computer knowledge. Users are therefore      */
+/* encouraged to load and test the software's suitability as regards their    */
+/* requirements in conditions enabling the security of their systems and/or   */
+/* data to be ensured and,  more generally, to use and operate it in the      */
+/* same conditions as regards security.                                       */
+/*                                                                            */
+/* The fact that you are presently reading this means that you have had       */
+/* knowledge of the CeCILL-C license and that you accept its terms.           */
+/******************************************************************************/
+/* version 1.7                                                                */
+/******************************************************************************/
+
+
+
+
+
+#line 41 "fortran.lex"
+#include <math.h>
+#include <stdlib.h>
+#include <string.h>
+extern FILE * fortranin;
+#define MAX_INCLUDE_DEPTH 30
+#define tabsize 6
+YY_BUFFER_STATE include_stack[MAX_INCLUDE_DEPTH];
+int line_num_fortran=1;
+int line_num_fortran_common=1;
+int newlinef90 = 0;
+char *tmp;
+char tmpc;
+/******************************************************************************/
+/**************PETITS PB NON PREVUS *******************************************/
+/******************************************************************************/
+/* NEXTLINF77 un ligne fortran 77 peut commencer par -      &a=b or on        */
+/*            a prevu seulement       & a=b avec l'espace entre le symbole    */
+/*            de la 7eme et le debut de la ligne de commande                  */
+/*            le ! est aussi interdit comme symbole de la 7 eme colonne       */
+/*            Normalement NEXTLINEF77 \n+[ ]{5}[^ ]                           */
+/******************************************************************************/
+#define YY_USER_ACTION \
+        {\
+           if (firstpass == 0) \
+           {\
+              strcat(curbuf,fortrantext); \
+              Save_Length(curbuf,38); \
+              strcpy(motparse,fortrantext);\
+              Save_Length(motparse,32); \
+              colnum = colnum + strlen(motparse);\
+              ECHO; \
+           }\
+           strcpy(motparse1,fortrantext);\
+/*           printf("fortrantext = %s\n",fortrantext);*/\
+        /*if ( firstpass == 1 ) 
+                      printf("fortrantext = %s %d\n",fortrantext,strlen(fortrantext));*/\
+        }
+#line 2979 "fortran.yy.c"
+
+#define INITIAL 0
+#define parameter 1
+#define character 2
+#define donottreat 3
+#define fortran77style 4
+#define fortran90style 5
+
+#ifndef YY_NO_UNISTD_H
+/* Special case for "unistd.h", since it is non-ANSI. We include it way
+ * down here because we want the user's section 1 to have been scanned first.
+ * The user has a chance to override it with an option.
+ */
+#include <unistd.h>
+#endif
+
+#ifndef YY_EXTRA_TYPE
+#define YY_EXTRA_TYPE void *
+#endif
+
+static int yy_init_globals (void );
+
+/* Accessor methods to globals.
+   These are made visible to non-reentrant scanners for convenience. */
+
+int fortranlex_destroy (void );
+
+int fortranget_debug (void );
+
+void fortranset_debug (int debug_flag  );
+
+YY_EXTRA_TYPE fortranget_extra (void );
+
+void fortranset_extra (YY_EXTRA_TYPE user_defined  );
+
+FILE *fortranget_in (void );
+
+void fortranset_in  (FILE * in_str  );
+
+FILE *fortranget_out (void );
+
+void fortranset_out  (FILE * out_str  );
+
+yy_size_t fortranget_leng (void );
+
+char *fortranget_text (void );
+
+int fortranget_lineno (void );
+
+void fortranset_lineno (int line_number  );
+
+/* Macros after this point can all be overridden by user definitions in
+ * section 1.
+ */
+
+#ifndef YY_SKIP_YYWRAP
+#ifdef __cplusplus
+extern "C" int fortranwrap (void );
+#else
+extern int fortranwrap (void );
+#endif
+#endif
+
+    static void yyunput (int c,char *buf_ptr  );
+    
+#ifndef yytext_ptr
+static void yy_flex_strncpy (char *,yyconst char *,int );
+#endif
+
+#ifdef YY_NEED_STRLEN
+static int yy_flex_strlen (yyconst char * );
+#endif
+
+#ifndef YY_NO_INPUT
+
+#ifdef __cplusplus
+static int yyinput (void );
+#else
+static int input (void );
+#endif
+
+#endif
+
+/* Amount of stuff to slurp up with each read. */
+#ifndef YY_READ_BUF_SIZE
+#define YY_READ_BUF_SIZE 8192
+#endif
+
+/* Copy whatever the last rule matched to the standard output. */
+#ifndef ECHO
+/* This used to be an fputs(), but since the string might contain NUL's,
+ * we now use fwrite().
+ */
+#define ECHO fwrite( fortrantext, fortranleng, 1, fortranout )
+#endif
+
+/* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
+ * is returned in "result".
+ */
+#ifndef YY_INPUT
+#define YY_INPUT(buf,result,max_size) \
+	if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
+		{ \
+		int c = '*'; \
+		yy_size_t n; \
+		for ( n = 0; n < max_size && \
+			     (c = getc( fortranin )) != EOF && c != '\n'; ++n ) \
+			buf[n] = (char) c; \
+		if ( c == '\n' ) \
+			buf[n++] = (char) c; \
+		if ( c == EOF && ferror( fortranin ) ) \
+			YY_FATAL_ERROR( "input in flex scanner failed" ); \
+		result = n; \
+		} \
+	else \
+		{ \
+		errno=0; \
+		while ( (result = fread(buf, 1, max_size, fortranin))==0 && ferror(fortranin)) \
+			{ \
+			if( errno != EINTR) \
+				{ \
+				YY_FATAL_ERROR( "input in flex scanner failed" ); \
+				break; \
+				} \
+			errno=0; \
+			clearerr(fortranin); \
+			} \
+		}\
+\
+
+#endif
+
+/* No semi-colon after return; correct usage is to write "yyterminate();" -
+ * we don't want an extra ';' after the "return" because that will cause
+ * some compilers to complain about unreachable statements.
+ */
+#ifndef yyterminate
+#define yyterminate() return YY_NULL
+#endif
+
+/* Number of entries by which start-condition stack grows. */
+#ifndef YY_START_STACK_INCR
+#define YY_START_STACK_INCR 25
+#endif
+
+/* Report a fatal error. */
+#ifndef YY_FATAL_ERROR
+#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
+#endif
+
+/* end tables serialization structures and prototypes */
+
+/* Default declaration of generated scanner - a define so the user can
+ * easily add parameters.
+ */
+#ifndef YY_DECL
+#define YY_DECL_IS_OURS 1
+
+extern int fortranlex (void);
+
+#define YY_DECL int fortranlex (void)
+#endif /* !YY_DECL */
+
+/* Code executed at the beginning of each rule, after fortrantext and fortranleng
+ * have been set up.
+ */
+#ifndef YY_USER_ACTION
+#define YY_USER_ACTION
+#endif
+
+/* Code executed at the end of each rule. */
+#ifndef YY_BREAK
+#define YY_BREAK break;
+#endif
+
+#define YY_RULE_SETUP \
+	if ( fortranleng > 0 ) \
+		YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \
+				(fortrantext[fortranleng - 1] == '\n'); \
+	YY_USER_ACTION
+
+/** The main scanner function which does all the work.
+ */
+YY_DECL
+{
+	register yy_state_type yy_current_state;
+	register char *yy_cp, *yy_bp;
+	register int yy_act;
+    
+#line 107 "fortran.lex"
+
+  if (infixed) BEGIN(fortran77style) ;
+  if (infree) BEGIN(fortran90style)  ;
+
+#line 3174 "fortran.yy.c"
+
+	if ( !(yy_init) )
+		{
+		(yy_init) = 1;
+
+#ifdef YY_USER_INIT
+		YY_USER_INIT;
+#endif
+
+		if ( ! (yy_start) )
+			(yy_start) = 1;	/* first start state */
+
+		if ( ! fortranin )
+			fortranin = stdin;
+
+		if ( ! fortranout )
+			fortranout = stdout;
+
+		if ( ! YY_CURRENT_BUFFER ) {
+			fortranensure_buffer_stack ();
+			YY_CURRENT_BUFFER_LVALUE =
+				fortran_create_buffer(fortranin,YY_BUF_SIZE );
+		}
+
+		fortran_load_buffer_state( );
+		}
+
+	while ( 1 )		/* loops until end-of-file is reached */
+		{
+		yy_cp = (yy_c_buf_p);
+
+		/* Support of fortrantext. */
+		*yy_cp = (yy_hold_char);
+
+		/* yy_bp points to the position in yy_ch_buf of the start of
+		 * the current run.
+		 */
+		yy_bp = yy_cp;
+
+		yy_current_state = (yy_start);
+		yy_current_state += YY_AT_BOL();
+yy_match:
+		do
+			{
+			register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
+			if ( yy_accept[yy_current_state] )
+				{
+				(yy_last_accepting_state) = yy_current_state;
+				(yy_last_accepting_cpos) = yy_cp;
+				}
+			while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
+				{
+				yy_current_state = (int) yy_def[yy_current_state];
+				if ( yy_current_state >= 1162 )
+					yy_c = yy_meta[(unsigned int) yy_c];
+				}
+			yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
+			++yy_cp;
+			}
+		while ( yy_base[yy_current_state] != 9159 );
+
+yy_find_action:
+		yy_act = yy_accept[yy_current_state];
+		if ( yy_act == 0 )
+			{ /* have to back up */
+			yy_cp = (yy_last_accepting_cpos);
+			yy_current_state = (yy_last_accepting_state);
+			yy_act = yy_accept[yy_current_state];
+			}
+
+		YY_DO_BEFORE_ACTION;
+
+do_action:	/* This label is used only to access EOF actions. */
+
+		switch ( yy_act )
+	{ /* beginning of action switch */
+			case 0: /* must back up */
+			/* undo the effects of YY_DO_BEFORE_ACTION */
+			*yy_cp = (yy_hold_char);
+			yy_cp = (yy_last_accepting_cpos);
+			yy_current_state = (yy_last_accepting_state);
+			goto yy_find_action;
+
+case 1:
+YY_RULE_SETUP
+#line 111 "fortran.lex"
+return TOK_DEBUT;
+	YY_BREAK
+case 2:
+YY_RULE_SETUP
+#line 112 "fortran.lex"
+return TOK_FIN;
+	YY_BREAK
+case 3:
+YY_RULE_SETUP
+#line 113 "fortran.lex"
+return TOK_OMP;
+	YY_BREAK
+case 4:
+YY_RULE_SETUP
+#line 114 "fortran.lex"
+return TOK_DOLLAR;
+	YY_BREAK
+case 5:
+YY_RULE_SETUP
+#line 116 "fortran.lex"
+{return TOK_REAL8;}
+	YY_BREAK
+case 6:
+YY_RULE_SETUP
+#line 117 "fortran.lex"
+{return TOK_SUBROUTINE;}
+	YY_BREAK
+case 7:
+YY_RULE_SETUP
+#line 118 "fortran.lex"
+{return TOK_PROGRAM;}
+	YY_BREAK
+case 8:
+YY_RULE_SETUP
+#line 119 "fortran.lex"
+{inallocate = 1; return TOK_ALLOCATE;}
+	YY_BREAK
+case 9:
+YY_RULE_SETUP
+#line 120 "fortran.lex"
+{return TOK_NULLIFY;}
+	YY_BREAK
+case 10:
+YY_RULE_SETUP
+#line 121 "fortran.lex"
+{inallocate = 1; return TOK_DEALLOCATE;}
+	YY_BREAK
+case 11:
+YY_RULE_SETUP
+#line 122 "fortran.lex"
+{return TOK_RESULT;}
+	YY_BREAK
+case 12:
+YY_RULE_SETUP
+#line 123 "fortran.lex"
+{return TOK_FUNCTION;}
+	YY_BREAK
+case 13:
+YY_RULE_SETUP
+#line 124 "fortran.lex"
+{strcpy(yylval.na,fortrantext);return TOK_ENDSUBROUTINE;}
+	YY_BREAK
+case 14:
+YY_RULE_SETUP
+#line 125 "fortran.lex"
+{strcpy(yylval.na,fortrantext);return TOK_ENDPROGRAM;}
+	YY_BREAK
+case 15:
+YY_RULE_SETUP
+#line 126 "fortran.lex"
+{strcpy(yylval.na,fortrantext);return TOK_ENDFUNCTION;}
+	YY_BREAK
+case 16:
+YY_RULE_SETUP
+#line 127 "fortran.lex"
+{strcpy(yylval.na,fortrantext);return TOK_ENDUNIT;}
+	YY_BREAK
+case 17:
+YY_RULE_SETUP
+#line 128 "fortran.lex"
+return TOK_INCLUDE;
+	YY_BREAK
+case 18:
+YY_RULE_SETUP
+#line 129 "fortran.lex"
+{
+                            strcpy(yylval.na,fortrantext);
+                            tmpc = input();
+                            unput(tmpc);
+                            if ( (
+                               tmpc >= 'a' && tmpc <= 'z'
+                                  ) || (
+                               tmpc >= 'A' && tmpc <= 'Z'
+                               )  )
+                               {
+                                  return TOK_USE;
+                               }
+                               else
+                               {
+                                  return TOK_NAME;
+                               }
+                         }
+	YY_BREAK
+case 19:
+YY_RULE_SETUP
+#line 146 "fortran.lex"
+{return TOK_REWIND;}
+	YY_BREAK
+case 20:
+YY_RULE_SETUP
+#line 147 "fortran.lex"
+return TOK_IMPLICIT;
+	YY_BREAK
+case 21:
+YY_RULE_SETUP
+#line 148 "fortran.lex"
+return TOK_NONE;
+	YY_BREAK
+case 22:
+YY_RULE_SETUP
+#line 149 "fortran.lex"
+return TOK_CALL;
+	YY_BREAK
+case 23:
+YY_RULE_SETUP
+#line 150 "fortran.lex"
+return TOK_TRUE;
+	YY_BREAK
+case 24:
+YY_RULE_SETUP
+#line 151 "fortran.lex"
+return TOK_FALSE;
+	YY_BREAK
+case 25:
+YY_RULE_SETUP
+#line 152 "fortran.lex"
+{return TOK_POINT_TO;}
+	YY_BREAK
+case 26:
+YY_RULE_SETUP
+#line 153 "fortran.lex"
+{strcpy(yylval.na,fortrantext);return TOK_DASTER;}
+	YY_BREAK
+case 27:
+YY_RULE_SETUP
+#line 154 "fortran.lex"
+{strcpy(yylval.na,fortrantext);return TOK_EQV;}
+	YY_BREAK
+case 28:
+YY_RULE_SETUP
+#line 155 "fortran.lex"
+{strcpy(yylval.na,fortrantext);return TOK_EQ;}
+	YY_BREAK
+case 29:
+YY_RULE_SETUP
+#line 156 "fortran.lex"
+{strcpy(yylval.na,fortrantext);return TOK_GT;}
+	YY_BREAK
+case 30:
+YY_RULE_SETUP
+#line 157 "fortran.lex"
+{strcpy(yylval.na,fortrantext);return TOK_GE;}
+	YY_BREAK
+case 31:
+YY_RULE_SETUP
+#line 158 "fortran.lex"
+{strcpy(yylval.na,fortrantext);return TOK_LT;}
+	YY_BREAK
+case 32:
+YY_RULE_SETUP
+#line 159 "fortran.lex"
+{strcpy(yylval.na,fortrantext);return TOK_LE;}
+	YY_BREAK
+case 33:
+YY_RULE_SETUP
+#line 160 "fortran.lex"
+{strcpy(yylval.na,fortrantext);return TOK_NEQV;}
+	YY_BREAK
+case 34:
+YY_RULE_SETUP
+#line 161 "fortran.lex"
+{strcpy(yylval.na,fortrantext);return TOK_NE;}
+	YY_BREAK
+case 35:
+YY_RULE_SETUP
+#line 162 "fortran.lex"
+{strcpy(yylval.na,fortrantext);return TOK_NOT;}
+	YY_BREAK
+case 36:
+YY_RULE_SETUP
+#line 163 "fortran.lex"
+{strcpy(yylval.na,fortrantext);return TOK_OR;}
+	YY_BREAK
+case 37:
+YY_RULE_SETUP
+#line 164 "fortran.lex"
+{strcpy(yylval.na,fortrantext);return TOK_XOR;}
+	YY_BREAK
+case 38:
+YY_RULE_SETUP
+#line 165 "fortran.lex"
+{strcpy(yylval.na,fortrantext);return TOK_AND;}
+	YY_BREAK
+case 39:
+YY_RULE_SETUP
+#line 166 "fortran.lex"
+{return TOK_MODULE;}
+	YY_BREAK
+case 40:
+YY_RULE_SETUP
+#line 167 "fortran.lex"
+{return TOK_DOWHILE;}
+	YY_BREAK
+case 41:
+YY_RULE_SETUP
+#line 168 "fortran.lex"
+return TOK_ENDMODULE;
+	YY_BREAK
+case 42:
+YY_RULE_SETUP
+#line 169 "fortran.lex"
+return TOK_ENDDO;
+	YY_BREAK
+case 43:
+YY_RULE_SETUP
+#line 170 "fortran.lex"
+{return TOK_PLAINDO;}
+	YY_BREAK
+case 44:
+YY_RULE_SETUP
+#line 171 "fortran.lex"
+{strcpy(yylval.na,fortrantext);return TOK_REAL;}
+	YY_BREAK
+case 45:
+YY_RULE_SETUP
+#line 172 "fortran.lex"
+{strcpy(yylval.na,fortrantext);return TOK_INTEGER;}
+	YY_BREAK
+case 46:
+YY_RULE_SETUP
+#line 173 "fortran.lex"
+{strcpy(yylval.na,fortrantext);return TOK_LOGICAL;}
+	YY_BREAK
+case 47:
+YY_RULE_SETUP
+#line 174 "fortran.lex"
+{strcpy(yylval.na,fortrantext);return TOK_CHARACTER;}
+	YY_BREAK
+case 48:
+YY_RULE_SETUP
+#line 175 "fortran.lex"
+{return TOK_ALLOCATABLE;}
+	YY_BREAK
+case 49:
+YY_RULE_SETUP
+#line 176 "fortran.lex"
+return TOK_CLOSE;
+	YY_BREAK
+case 50:
+YY_RULE_SETUP
+#line 177 "fortran.lex"
+return TOK_INQUIRE;
+	YY_BREAK
+case 51:
+YY_RULE_SETUP
+#line 178 "fortran.lex"
+{return TOK_DIMENSION;}
+	YY_BREAK
+case 52:
+YY_RULE_SETUP
+#line 179 "fortran.lex"
+return TOK_PAUSE;
+	YY_BREAK
+case 53:
+YY_RULE_SETUP
+#line 180 "fortran.lex"
+return TOK_EQUIVALENCE;
+	YY_BREAK
+case 54:
+YY_RULE_SETUP
+#line 181 "fortran.lex"
+return TOK_STOP;
+	YY_BREAK
+case 55:
+YY_RULE_SETUP
+#line 182 "fortran.lex"
+return TOK_WHERE;
+	YY_BREAK
+case 56:
+YY_RULE_SETUP
+#line 183 "fortran.lex"
+return TOK_ENDWHERE;
+	YY_BREAK
+case 57:
+YY_RULE_SETUP
+#line 184 "fortran.lex"
+return TOK_ELSEWHERE;
+	YY_BREAK
+case 58:
+YY_RULE_SETUP
+#line 185 "fortran.lex"
+{return TOK_COMPLEX;}
+	YY_BREAK
+case 59:
+YY_RULE_SETUP
+#line 186 "fortran.lex"
+{return TOK_CONTAINS;}
+	YY_BREAK
+case 60:
+YY_RULE_SETUP
+#line 187 "fortran.lex"
+{return TOK_ONLY;}
+	YY_BREAK
+case 61:
+YY_RULE_SETUP
+#line 188 "fortran.lex"
+{return TOK_PARAMETER;}
+	YY_BREAK
+case 62:
+YY_RULE_SETUP
+#line 189 "fortran.lex"
+{return TOK_RECURSIVE;}
+	YY_BREAK
+case 63:
+YY_RULE_SETUP
+#line 190 "fortran.lex"
+{return TOK_COMMON;}
+	YY_BREAK
+case 64:
+YY_RULE_SETUP
+#line 191 "fortran.lex"
+{return TOK_GLOBAL;}
+	YY_BREAK
+case 65:
+YY_RULE_SETUP
+#line 192 "fortran.lex"
+{return TOK_EXTERNAL;}
+	YY_BREAK
+case 66:
+YY_RULE_SETUP
+#line 193 "fortran.lex"
+{return TOK_INTENT;}
+	YY_BREAK
+case 67:
+YY_RULE_SETUP
+#line 194 "fortran.lex"
+{return TOK_POINTER;}
+	YY_BREAK
+case 68:
+YY_RULE_SETUP
+#line 195 "fortran.lex"
+{return TOK_OPTIONAL;}
+	YY_BREAK
+case 69:
+YY_RULE_SETUP
+#line 196 "fortran.lex"
+{return TOK_SAVE;}
+	YY_BREAK
+case 70:
+YY_RULE_SETUP
+#line 197 "fortran.lex"
+{return TOK_TYPE;}
+	YY_BREAK
+case 71:
+YY_RULE_SETUP
+#line 198 "fortran.lex"
+{return TOK_TYPEPAR;}
+	YY_BREAK
+case 72:
+YY_RULE_SETUP
+#line 199 "fortran.lex"
+{if (inallocate == 1) return TOK_STAT; else {strcpy(yylval.na,fortrantext);return TOK_NAME;}}
+	YY_BREAK
+case 73:
+YY_RULE_SETUP
+#line 200 "fortran.lex"
+{return TOK_ENDTYPE;}
+	YY_BREAK
+case 74:
+YY_RULE_SETUP
+#line 201 "fortran.lex"
+return TOK_OPEN;
+	YY_BREAK
+case 75:
+YY_RULE_SETUP
+#line 202 "fortran.lex"
+return TOK_RETURN;
+	YY_BREAK
+case 76:
+/* rule 76 can match eol */
+YY_RULE_SETUP
+#line 203 "fortran.lex"
+return TOK_EXIT;
+	YY_BREAK
+case 77:
+YY_RULE_SETUP
+#line 204 "fortran.lex"
+return TOK_PRINT;
+	YY_BREAK
+case 78:
+YY_RULE_SETUP
+#line 205 "fortran.lex"
+{return TOK_PROCEDURE;}
+	YY_BREAK
+case 79:
+YY_RULE_SETUP
+#line 206 "fortran.lex"
+{return TOK_READ;}
+	YY_BREAK
+case 80:
+YY_RULE_SETUP
+#line 207 "fortran.lex"
+{return TOK_NAMELIST;}
+	YY_BREAK
+case 81:
+YY_RULE_SETUP
+#line 208 "fortran.lex"
+{return TOK_WRITE;}
+	YY_BREAK
+case 82:
+YY_RULE_SETUP
+#line 209 "fortran.lex"
+{return TOK_TARGET;}
+	YY_BREAK
+case 83:
+YY_RULE_SETUP
+#line 210 "fortran.lex"
+{return TOK_PUBLIC;}
+	YY_BREAK
+case 84:
+YY_RULE_SETUP
+#line 211 "fortran.lex"
+{return TOK_PRIVATE;}
+	YY_BREAK
+case 85:
+YY_RULE_SETUP
+#line 212 "fortran.lex"
+{strcpy(yylval.nac,fortrantext);return TOK_IN;}
+	YY_BREAK
+case 86:
+YY_RULE_SETUP
+#line 213 "fortran.lex"
+{strcpy(yylval.na,fortrantext);return TOK_DATA;}
+	YY_BREAK
+case 87:
+YY_RULE_SETUP
+#line 214 "fortran.lex"
+return TOK_CONTINUE;
+	YY_BREAK
+case 88:
+YY_RULE_SETUP
+#line 215 "fortran.lex"
+{return TOK_PLAINGOTO;}
+	YY_BREAK
+case 89:
+YY_RULE_SETUP
+#line 216 "fortran.lex"
+{strcpy(yylval.nac,fortrantext);return TOK_OUT;}
+	YY_BREAK
+case 90:
+YY_RULE_SETUP
+#line 217 "fortran.lex"
+{strcpy(yylval.nac,fortrantext);return TOK_INOUT;}
+	YY_BREAK
+case 91:
+YY_RULE_SETUP
+#line 218 "fortran.lex"
+{return TOK_INTRINSIC;}
+	YY_BREAK
+case 92:
+YY_RULE_SETUP
+#line 219 "fortran.lex"
+{return TOK_THEN;}
+	YY_BREAK
+case 93:
+YY_RULE_SETUP
+#line 220 "fortran.lex"
+{return TOK_ELSEIF;}
+	YY_BREAK
+case 94:
+YY_RULE_SETUP
+#line 221 "fortran.lex"
+{return TOK_ELSE;}
+	YY_BREAK
+case 95:
+YY_RULE_SETUP
+#line 222 "fortran.lex"
+{return TOK_ENDIF;}
+	YY_BREAK
+case 96:
+YY_RULE_SETUP
+#line 223 "fortran.lex"
+{return TOK_LOGICALIF;}
+	YY_BREAK
+case 97:
+YY_RULE_SETUP
+#line 224 "fortran.lex"
+{return TOK_SUM;}
+	YY_BREAK
+case 98:
+YY_RULE_SETUP
+#line 225 "fortran.lex"
+{return TOK_MAX;}
+	YY_BREAK
+case 99:
+YY_RULE_SETUP
+#line 226 "fortran.lex"
+{return TOK_TANH;}
+	YY_BREAK
+case 100:
+YY_RULE_SETUP
+#line 227 "fortran.lex"
+{return TOK_MAXVAL;}
+	YY_BREAK
+case 101:
+YY_RULE_SETUP
+#line 228 "fortran.lex"
+{return TOK_TRIM;}
+	YY_BREAK
+case 102:
+YY_RULE_SETUP
+#line 229 "fortran.lex"
+{return TOK_SQRT;}
+	YY_BREAK
+case 103:
+YY_RULE_SETUP
+#line 230 "fortran.lex"
+{return TOK_SELECTCASE;}
+	YY_BREAK
+case 104:
+YY_RULE_SETUP
+#line 231 "fortran.lex"
+{return TOK_CASE;}
+	YY_BREAK
+case 105:
+YY_RULE_SETUP
+#line 232 "fortran.lex"
+{return TOK_CASEDEFAULT;}
+	YY_BREAK
+case 106:
+YY_RULE_SETUP
+#line 233 "fortran.lex"
+{return TOK_ENDSELECT;}
+	YY_BREAK
+case 107:
+YY_RULE_SETUP
+#line 234 "fortran.lex"
+{return TOK_FILE;}
+	YY_BREAK
+case 108:
+YY_RULE_SETUP
+#line 235 "fortran.lex"
+{return TOK_END;}
+	YY_BREAK
+case 109:
+YY_RULE_SETUP
+#line 236 "fortran.lex"
+{return TOK_ERR;}
+	YY_BREAK
+case 110:
+YY_RULE_SETUP
+#line 237 "fortran.lex"
+{return TOK_EXIST;}
+	YY_BREAK
+case 111:
+YY_RULE_SETUP
+#line 238 "fortran.lex"
+{return TOK_MIN;}
+	YY_BREAK
+case 112:
+YY_RULE_SETUP
+#line 239 "fortran.lex"
+{return TOK_NINT;}
+	YY_BREAK
+case 113:
+YY_RULE_SETUP
+#line 240 "fortran.lex"
+{return TOK_FLOAT;}
+	YY_BREAK
+case 114:
+YY_RULE_SETUP
+#line 241 "fortran.lex"
+{return TOK_EXP;}
+	YY_BREAK
+case 115:
+YY_RULE_SETUP
+#line 242 "fortran.lex"
+{return TOK_COS;}
+	YY_BREAK
+case 116:
+YY_RULE_SETUP
+#line 243 "fortran.lex"
+{return TOK_COSH;}
+	YY_BREAK
+case 117:
+YY_RULE_SETUP
+#line 244 "fortran.lex"
+{return TOK_ACOS;}
+	YY_BREAK
+case 118:
+YY_RULE_SETUP
+#line 245 "fortran.lex"
+{return TOK_SIN;}
+	YY_BREAK
+case 119:
+YY_RULE_SETUP
+#line 246 "fortran.lex"
+{return TOK_SINH;}
+	YY_BREAK
+case 120:
+YY_RULE_SETUP
+#line 247 "fortran.lex"
+{return TOK_ASIN;}
+	YY_BREAK
+case 121:
+YY_RULE_SETUP
+#line 248 "fortran.lex"
+{return TOK_LOG;}
+	YY_BREAK
+case 122:
+YY_RULE_SETUP
+#line 249 "fortran.lex"
+{return TOK_TAN;}
+	YY_BREAK
+case 123:
+YY_RULE_SETUP
+#line 250 "fortran.lex"
+{return TOK_ATAN;}
+	YY_BREAK
+case 124:
+YY_RULE_SETUP
+#line 251 "fortran.lex"
+{return TOK_CYCLE;}
+	YY_BREAK
+case 125:
+YY_RULE_SETUP
+#line 252 "fortran.lex"
+{return TOK_ABS;}
+	YY_BREAK
+case 126:
+YY_RULE_SETUP
+#line 253 "fortran.lex"
+{return TOK_MOD;}
+	YY_BREAK
+case 127:
+YY_RULE_SETUP
+#line 254 "fortran.lex"
+{return TOK_SIGN;}
+	YY_BREAK
+case 128:
+YY_RULE_SETUP
+#line 255 "fortran.lex"
+{return TOK_MINLOC;}
+	YY_BREAK
+case 129:
+YY_RULE_SETUP
+#line 256 "fortran.lex"
+{return TOK_MAXLOC;}
+	YY_BREAK
+case 130:
+YY_RULE_SETUP
+#line 257 "fortran.lex"
+{return TOK_MINVAL;}
+	YY_BREAK
+case 131:
+YY_RULE_SETUP
+#line 258 "fortran.lex"
+{return TOK_BACKSPACE;}
+	YY_BREAK
+case 132:
+YY_RULE_SETUP
+#line 259 "fortran.lex"
+{return TOK_LEFTAB;}
+	YY_BREAK
+case 133:
+YY_RULE_SETUP
+#line 260 "fortran.lex"
+{return TOK_RIGHTAB;}
+	YY_BREAK
+case 134:
+/* rule 134 can match eol */
+YY_RULE_SETUP
+#line 261 "fortran.lex"
+{return TOK_FORMAT;}
+	YY_BREAK
+case 135:
+YY_RULE_SETUP
+#line 262 "fortran.lex"
+{strcpy(yylval.na,fortrantext);return TOK_DOUBLEPRECISION;}
+	YY_BREAK
+case 136:
+YY_RULE_SETUP
+#line 263 "fortran.lex"
+{strcpy(yylval.na,fortrantext);return TOK_DOUBLECOMPLEX;}
+	YY_BREAK
+case 137:
+YY_RULE_SETUP
+#line 264 "fortran.lex"
+{strcpy(yylval.na,fortrantext);return TOK_SLASH;}
+	YY_BREAK
+case 138:
+YY_RULE_SETUP
+#line 265 "fortran.lex"
+{strcpy(yylval.na,fortrantext);return TOK_DSLASH;}
+	YY_BREAK
+case 139:
+/* rule 139 can match eol */
+YY_RULE_SETUP
+#line 266 "fortran.lex"
+{strcpy(yylval.na,fortrantext);return TOK_CHAR_CUT;}
+	YY_BREAK
+case 140:
+YY_RULE_SETUP
+#line 267 "fortran.lex"
+{strcpy(yylval.na,fortrantext);return TOK_CHAR_CONSTANT;}
+	YY_BREAK
+case 141:
+YY_RULE_SETUP
+#line 268 "fortran.lex"
+{strcpy(yylval.na,fortrantext);return TOK_CHAR_MESSAGE;}
+	YY_BREAK
+case 142:
+YY_RULE_SETUP
+#line 269 "fortran.lex"
+{strcpy(yylval.na,fortrantext);return TOK_CHAR_INT;}
+	YY_BREAK
+case 143:
+YY_RULE_SETUP
+#line 270 "fortran.lex"
+{printf("debug interfacer\n");BEGIN(donottreat);}
+	YY_BREAK
+case 144:
+/* rule 144 can match eol */
+YY_RULE_SETUP
+#line 271 "fortran.lex"
+{
+						BEGIN(INITIAL);
+                        if (infixed) BEGIN(fortran77style) ;
+                        if (infree) BEGIN(fortran90style)  ;
+                        line_num_fortran++;line_num_fortran_common++;
+                        return '\n';
+						}
+	YY_BREAK
+case 145:
+YY_RULE_SETUP
+#line 278 "fortran.lex"
+{strcpy(yylval.na,fortrantext);return TOK_NAME;}
+	YY_BREAK
+case 146:
+YY_RULE_SETUP
+#line 279 "fortran.lex"
+{strcpy(yylval.na,fortrantext);return TOK_CSTREAL;}
+	YY_BREAK
+case 147:
+YY_RULE_SETUP
+#line 280 "fortran.lex"
+{strcpy(yylval.na,fortrantext);return TOK_CSTREALDP;}
+	YY_BREAK
+case 148:
+YY_RULE_SETUP
+#line 281 "fortran.lex"
+{strcpy(yylval.na,fortrantext);return TOK_CSTREALQP;}
+	YY_BREAK
+case 149:
+/* rule 149 can match eol */
+*yy_cp = (yy_hold_char); /* undo effects of setting up fortrantext */
+(yy_c_buf_p) = yy_cp -= 1;
+YY_DO_BEFORE_ACTION; /* set up fortrantext again */
+YY_RULE_SETUP
+#line 282 "fortran.lex"
+{strcpy(yylval.na,fortrantext);return TOK_CSTREAL;}
+	YY_BREAK
+case 150:
+YY_RULE_SETUP
+#line 283 "fortran.lex"
+{strcpy(yylval.na,fortrantext);return TOK_CSTINT;}
+	YY_BREAK
+case 151:
+YY_RULE_SETUP
+#line 284 "fortran.lex"
+{}
+	YY_BREAK
+case 152:
+YY_RULE_SETUP
+#line 285 "fortran.lex"
+{return TOK_QUOTE;}
+	YY_BREAK
+case 153:
+YY_RULE_SETUP
+#line 286 "fortran.lex"
+{}
+	YY_BREAK
+case 154:
+YY_RULE_SETUP
+#line 287 "fortran.lex"
+{strcpy(yylval.na,fortrantext);return (int) *fortrantext;}
+	YY_BREAK
+case 155:
+YY_RULE_SETUP
+#line 288 "fortran.lex"
+{afterpercent = 1; strcpy(yylval.na,fortrantext);return (int) *fortrantext;}
+	YY_BREAK
+case 156:
+YY_RULE_SETUP
+#line 289 "fortran.lex"
+{return TOK_SEMICOLON;}
+	YY_BREAK
+case 157:
+YY_RULE_SETUP
+#line 290 "fortran.lex"
+{return (int) *fortrantext;}
+	YY_BREAK
+case 158:
+YY_RULE_SETUP
+#line 291 "fortran.lex"
+{return (int) *fortrantext;}
+	YY_BREAK
+case 159:
+YY_RULE_SETUP
+#line 292 "fortran.lex"
+{return (int) *fortrantext;}
+	YY_BREAK
+case 160:
+YY_RULE_SETUP
+#line 293 "fortran.lex"
+{return (int) *fortrantext;}
+	YY_BREAK
+case 161:
+/* rule 161 can match eol */
+YY_RULE_SETUP
+#line 294 "fortran.lex"
+{colnum=0;line_num_fortran++;line_num_fortran_common++; return (int) *fortrantext;}
+	YY_BREAK
+case 162:
+*yy_cp = (yy_hold_char); /* undo effects of setting up fortrantext */
+(yy_c_buf_p) = yy_cp -= 1;
+YY_DO_BEFORE_ACTION; /* set up fortrantext again */
+YY_RULE_SETUP
+#line 295 "fortran.lex"
+
+	YY_BREAK
+case 163:
+YY_RULE_SETUP
+#line 296 "fortran.lex"
+{if (newlinef90 == 0) return TOK_LABEL; else newlinef90 = 0;}
+	YY_BREAK
+case 164:
+YY_RULE_SETUP
+#line 297 "fortran.lex"
+
+	YY_BREAK
+case 165:
+YY_RULE_SETUP
+#line 298 "fortran.lex"
+{colnum=colnum-1+tabsize;}
+	YY_BREAK
+case 166:
+YY_RULE_SETUP
+#line 299 "fortran.lex"
+;
+	YY_BREAK
+case 167:
+/* rule 167 can match eol */
+YY_RULE_SETUP
+#line 300 "fortran.lex"
+{line_num_fortran++;line_num_fortran_common++;newlinef90=1;colnum=0;}
+	YY_BREAK
+case 168:
+/* rule 168 can match eol */
+YY_RULE_SETUP
+#line 301 "fortran.lex"
+{line_num_fortran++;line_num_fortran_common++;colnum=0;}
+	YY_BREAK
+case 169:
+/* rule 169 can match eol */
+YY_RULE_SETUP
+#line 302 "fortran.lex"
+{
+                           convert2lower(motparse1);
+                           if ( strncasecmp(motparse1,"contains",8) == 0 )
+                           {
+                              return TOK_CONTAINS;
+                           }
+                           else
+                           {
+                            /*  colnum=0;line_num_fortran++;line_num_fortran_common++;*/
+                             if ( !strcasecmp(motparse1,"C$AGRIF_DO_NOT_TREAT\n")) 
+                             return TOK_DONOTTREAT;
+                             if ( !strcasecmp(motparse1,"C$AGRIF_END_DO_NOT_TREAT\n")) return TOK_ENDDONOTTREAT;
+                             unput('\n');
+                           }
+                         }
+	YY_BREAK
+case 170:
+/* rule 170 can match eol */
+YY_RULE_SETUP
+#line 317 "fortran.lex"
+{
+                           convert2lower(&motparse1[1]);
+                           if ( strncasecmp(&motparse1[1],"contains",8) == 0 )
+                           {
+                              return TOK_CONTAINS;
+                           }
+                           else
+                           {
+                             /* colnum=0;line_num_fortran++;line_num_fortran_common++;*/
+                             if ( !strcasecmp(&motparse1[1],"C$AGRIF_DO_NOT_TREAT\n")) 
+                             return TOK_DONOTTREAT;
+                             if ( !strcasecmp(&motparse1[1],"C$AGRIF_END_DO_NOT_TREAT\n")) return TOK_ENDDONOTTREAT;
+                             unput('\n');
+                           }
+                         }                            
+	YY_BREAK
+case 171:
+/* rule 171 can match eol */
+YY_RULE_SETUP
+#line 332 "fortran.lex"
+{
+						BEGIN(donottreat);
+						}
+	YY_BREAK
+case 172:
+/* rule 172 can match eol */
+YY_RULE_SETUP
+#line 335 "fortran.lex"
+{
+						BEGIN(INITIAL);
+                        if (infixed) BEGIN(fortran77style) ;
+                        if (infree) BEGIN(fortran90style)  ;
+                        line_num_fortran++;line_num_fortran_common++;
+                        return '\n';
+						}
+	YY_BREAK
+case 173:
+/* rule 173 can match eol */
+YY_RULE_SETUP
+#line 342 "fortran.lex"
+{line_num_fortran++;line_num_fortran_common++;}
+	YY_BREAK
+case 174:
+/* rule 174 can match eol */
+YY_RULE_SETUP
+#line 343 "fortran.lex"
+{
+                             colnum = 0;
+                             if ( !strcasecmp(motparse1,"!$AGRIF_DO_NOT_TREAT\n")) return TOK_DONOTTREAT;
+                             if ( !strcasecmp(motparse1,"!$AGRIF_END_DO_NOT_TREAT\n")) return TOK_ENDDONOTTREAT;
+                          }
+	YY_BREAK
+case 175:
+YY_RULE_SETUP
+#line 348 "fortran.lex"
+{
+                             colnum = 0;
+                             if ( !strcasecmp(motparse1,"!$AGRIF_DO_NOT_TREAT\n")) return TOK_DONOTTREAT;
+                             if ( !strcasecmp(motparse1,"!$AGRIF_END_DO_NOT_TREAT\n")) return TOK_ENDDONOTTREAT;
+                          }
+	YY_BREAK
+case 176:
+YY_RULE_SETUP
+#line 353 "fortran.lex"
+ECHO;
+	YY_BREAK
+#line 4224 "fortran.yy.c"
+case YY_STATE_EOF(INITIAL):
+case YY_STATE_EOF(parameter):
+case YY_STATE_EOF(character):
+case YY_STATE_EOF(donottreat):
+case YY_STATE_EOF(fortran77style):
+case YY_STATE_EOF(fortran90style):
+	yyterminate();
+
+	case YY_END_OF_BUFFER:
+		{
+		/* Amount of text matched not including the EOB char. */
+		int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
+
+		/* Undo the effects of YY_DO_BEFORE_ACTION. */
+		*yy_cp = (yy_hold_char);
+		YY_RESTORE_YY_MORE_OFFSET
+
+		if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
+			{
+			/* We're scanning a new file or input source.  It's
+			 * possible that this happened because the user
+			 * just pointed fortranin at a new source and called
+			 * fortranlex().  If so, then we have to assure
+			 * consistency between YY_CURRENT_BUFFER and our
+			 * globals.  Here is the right place to do so, because
+			 * this is the first action (other than possibly a
+			 * back-up) that will match for the new input source.
+			 */
+			(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
+			YY_CURRENT_BUFFER_LVALUE->yy_input_file = fortranin;
+			YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
+			}
+
+		/* Note that here we test for yy_c_buf_p "<=" to the position
+		 * of the first EOB in the buffer, since yy_c_buf_p will
+		 * already have been incremented past the NUL character
+		 * (since all states make transitions on EOB to the
+		 * end-of-buffer state).  Contrast this with the test
+		 * in input().
+		 */
+		if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
+			{ /* This was really a NUL. */
+			yy_state_type yy_next_state;
+
+			(yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
+
+			yy_current_state = yy_get_previous_state(  );
+
+			/* Okay, we're now positioned to make the NUL
+			 * transition.  We couldn't have
+			 * yy_get_previous_state() go ahead and do it
+			 * for us because it doesn't know how to deal
+			 * with the possibility of jamming (and we don't
+			 * want to build jamming into it because then it
+			 * will run more slowly).
+			 */
+
+			yy_next_state = yy_try_NUL_trans( yy_current_state );
+
+			yy_bp = (yytext_ptr) + YY_MORE_ADJ;
+
+			if ( yy_next_state )
+				{
+				/* Consume the NUL. */
+				yy_cp = ++(yy_c_buf_p);
+				yy_current_state = yy_next_state;
+				goto yy_match;
+				}
+
+			else
+				{
+				yy_cp = (yy_c_buf_p);
+				goto yy_find_action;
+				}
+			}
+
+		else switch ( yy_get_next_buffer(  ) )
+			{
+			case EOB_ACT_END_OF_FILE:
+				{
+				(yy_did_buffer_switch_on_eof) = 0;
+
+				if ( fortranwrap( ) )
+					{
+					/* Note: because we've taken care in
+					 * yy_get_next_buffer() to have set up
+					 * fortrantext, we can now set up
+					 * yy_c_buf_p so that if some total
+					 * hoser (like flex itself) wants to
+					 * call the scanner after we return the
+					 * YY_NULL, it'll still work - another
+					 * YY_NULL will get returned.
+					 */
+					(yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
+
+					yy_act = YY_STATE_EOF(YY_START);
+					goto do_action;
+					}
+
+				else
+					{
+					if ( ! (yy_did_buffer_switch_on_eof) )
+						YY_NEW_FILE;
+					}
+				break;
+				}
+
+			case EOB_ACT_CONTINUE_SCAN:
+				(yy_c_buf_p) =
+					(yytext_ptr) + yy_amount_of_matched_text;
+
+				yy_current_state = yy_get_previous_state(  );
+
+				yy_cp = (yy_c_buf_p);
+				yy_bp = (yytext_ptr) + YY_MORE_ADJ;
+				goto yy_match;
+
+			case EOB_ACT_LAST_MATCH:
+				(yy_c_buf_p) =
+				&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
+
+				yy_current_state = yy_get_previous_state(  );
+
+				yy_cp = (yy_c_buf_p);
+				yy_bp = (yytext_ptr) + YY_MORE_ADJ;
+				goto yy_find_action;
+			}
+		break;
+		}
+
+	default:
+		YY_FATAL_ERROR(
+			"fatal flex scanner internal error--no action found" );
+	} /* end of action switch */
+		} /* end of scanning one token */
+} /* end of fortranlex */
+
+/* yy_get_next_buffer - try to read in a new buffer
+ *
+ * Returns a code representing an action:
+ *	EOB_ACT_LAST_MATCH -
+ *	EOB_ACT_CONTINUE_SCAN - continue scanning from current position
+ *	EOB_ACT_END_OF_FILE - end of file
+ */
+static int yy_get_next_buffer (void)
+{
+    	register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
+	register char *source = (yytext_ptr);
+	register int number_to_move, i;
+	int ret_val;
+
+	if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
+		YY_FATAL_ERROR(
+		"fatal flex scanner internal error--end of buffer missed" );
+
+	if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
+		{ /* Don't try to fill the buffer, so this is an EOF. */
+		if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
+			{
+			/* We matched a single character, the EOB, so
+			 * treat this as a final EOF.
+			 */
+			return EOB_ACT_END_OF_FILE;
+			}
+
+		else
+			{
+			/* We matched some text prior to the EOB, first
+			 * process it.
+			 */
+			return EOB_ACT_LAST_MATCH;
+			}
+		}
+
+	/* Try to read more data. */
+
+	/* First move last chars to start of buffer. */
+	number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
+
+	for ( i = 0; i < number_to_move; ++i )
+		*(dest++) = *(source++);
+
+	if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
+		/* don't do the read, it's not guaranteed to return an EOF,
+		 * just force an EOF
+		 */
+		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
+
+	else
+		{
+			yy_size_t num_to_read =
+			YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
+
+		while ( num_to_read <= 0 )
+			{ /* Not enough room in the buffer - grow it. */
+
+			/* just a shorter name for the current buffer */
+			YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
+
+			int yy_c_buf_p_offset =
+				(int) ((yy_c_buf_p) - b->yy_ch_buf);
+
+			if ( b->yy_is_our_buffer )
+				{
+				yy_size_t new_size = b->yy_buf_size * 2;
+
+				if ( new_size <= 0 )
+					b->yy_buf_size += b->yy_buf_size / 8;
+				else
+					b->yy_buf_size *= 2;
+
+				b->yy_ch_buf = (char *)
+					/* Include room in for 2 EOB chars. */
+					fortranrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2  );
+				}
+			else
+				/* Can't grow it, we don't own it. */
+				b->yy_ch_buf = 0;
+
+			if ( ! b->yy_ch_buf )
+				YY_FATAL_ERROR(
+				"fatal error - scanner input buffer overflow" );
+
+			(yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
+
+			num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
+						number_to_move - 1;
+
+			}
+
+		if ( num_to_read > YY_READ_BUF_SIZE )
+			num_to_read = YY_READ_BUF_SIZE;
+
+		/* Read in more data. */
+		YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
+			(yy_n_chars), num_to_read );
+
+		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
+		}
+
+	if ( (yy_n_chars) == 0 )
+		{
+		if ( number_to_move == YY_MORE_ADJ )
+			{
+			ret_val = EOB_ACT_END_OF_FILE;
+			fortranrestart(fortranin  );
+			}
+
+		else
+			{
+			ret_val = EOB_ACT_LAST_MATCH;
+			YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
+				YY_BUFFER_EOF_PENDING;
+			}
+		}
+
+	else
+		ret_val = EOB_ACT_CONTINUE_SCAN;
+
+	if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
+		/* Extend the array by 50%, plus the number we really need. */
+		yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
+		YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) fortranrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size  );
+		if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
+			YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
+	}
+
+	(yy_n_chars) += number_to_move;
+	YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
+	YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
+
+	(yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
+
+	return ret_val;
+}
+
+/* yy_get_previous_state - get the state just before the EOB char was reached */
+
+    static yy_state_type yy_get_previous_state (void)
+{
+	register yy_state_type yy_current_state;
+	register char *yy_cp;
+    
+	yy_current_state = (yy_start);
+	yy_current_state += YY_AT_BOL();
+
+	for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
+		{
+		register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
+		if ( yy_accept[yy_current_state] )
+			{
+			(yy_last_accepting_state) = yy_current_state;
+			(yy_last_accepting_cpos) = yy_cp;
+			}
+		while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
+			{
+			yy_current_state = (int) yy_def[yy_current_state];
+			if ( yy_current_state >= 1162 )
+				yy_c = yy_meta[(unsigned int) yy_c];
+			}
+		yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
+		}
+
+	return yy_current_state;
+}
+
+/* yy_try_NUL_trans - try to make a transition on the NUL character
+ *
+ * synopsis
+ *	next_state = yy_try_NUL_trans( current_state );
+ */
+    static yy_state_type yy_try_NUL_trans  (yy_state_type yy_current_state )
+{
+	register int yy_is_jam;
+    	register char *yy_cp = (yy_c_buf_p);
+
+	register YY_CHAR yy_c = 1;
+	if ( yy_accept[yy_current_state] )
+		{
+		(yy_last_accepting_state) = yy_current_state;
+		(yy_last_accepting_cpos) = yy_cp;
+		}
+	while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
+		{
+		yy_current_state = (int) yy_def[yy_current_state];
+		if ( yy_current_state >= 1162 )
+			yy_c = yy_meta[(unsigned int) yy_c];
+		}
+	yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
+	yy_is_jam = (yy_current_state == 1161);
+
+	return yy_is_jam ? 0 : yy_current_state;
+}
+
+    static void yyunput (int c, register char * yy_bp )
+{
+	register char *yy_cp;
+    
+    yy_cp = (yy_c_buf_p);
+
+	/* undo effects of setting up fortrantext */
+	*yy_cp = (yy_hold_char);
+
+	if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
+		{ /* need to shift things up to make room */
+		/* +2 for EOB chars. */
+		register yy_size_t number_to_move = (yy_n_chars) + 2;
+		register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
+					YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
+		register char *source =
+				&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
+
+		while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
+			*--dest = *--source;
+
+		yy_cp += (int) (dest - source);
+		yy_bp += (int) (dest - source);
+		YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
+			(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
+
+		if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
+			YY_FATAL_ERROR( "flex scanner push-back overflow" );
+		}
+
+	*--yy_cp = (char) c;
+
+	(yytext_ptr) = yy_bp;
+	(yy_hold_char) = *yy_cp;
+	(yy_c_buf_p) = yy_cp;
+}
+
+#ifndef YY_NO_INPUT
+#ifdef __cplusplus
+    static int yyinput (void)
+#else
+    static int input  (void)
+#endif
+
+{
+	int c;
+    
+	*(yy_c_buf_p) = (yy_hold_char);
+
+	if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
+		{
+		/* yy_c_buf_p now points to the character we want to return.
+		 * If this occurs *before* the EOB characters, then it's a
+		 * valid NUL; if not, then we've hit the end of the buffer.
+		 */
+		if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
+			/* This was really a NUL. */
+			*(yy_c_buf_p) = '\0';
+
+		else
+			{ /* need more input */
+			yy_size_t offset = (yy_c_buf_p) - (yytext_ptr);
+			++(yy_c_buf_p);
+
+			switch ( yy_get_next_buffer(  ) )
+				{
+				case EOB_ACT_LAST_MATCH:
+					/* This happens because yy_g_n_b()
+					 * sees that we've accumulated a
+					 * token and flags that we need to
+					 * try matching the token before
+					 * proceeding.  But for input(),
+					 * there's no matching to consider.
+					 * So convert the EOB_ACT_LAST_MATCH
+					 * to EOB_ACT_END_OF_FILE.
+					 */
+
+					/* Reset buffer status. */
+					fortranrestart(fortranin );
+
+					/*FALLTHROUGH*/
+
+				case EOB_ACT_END_OF_FILE:
+					{
+					if ( fortranwrap( ) )
+						return 0;
+
+					if ( ! (yy_did_buffer_switch_on_eof) )
+						YY_NEW_FILE;
+#ifdef __cplusplus
+					return yyinput();
+#else
+					return input();
+#endif
+					}
+
+				case EOB_ACT_CONTINUE_SCAN:
+					(yy_c_buf_p) = (yytext_ptr) + offset;
+					break;
+				}
+			}
+		}
+
+	c = *(unsigned char *) (yy_c_buf_p);	/* cast for 8-bit char's */
+	*(yy_c_buf_p) = '\0';	/* preserve fortrantext */
+	(yy_hold_char) = *++(yy_c_buf_p);
+
+	YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n');
+
+	return c;
+}
+#endif	/* ifndef YY_NO_INPUT */
+
+/** Immediately switch to a different input stream.
+ * @param input_file A readable stream.
+ * 
+ * @note This function does not reset the start condition to @c INITIAL .
+ */
+    void fortranrestart  (FILE * input_file )
+{
+    
+	if ( ! YY_CURRENT_BUFFER ){
+        fortranensure_buffer_stack ();
+		YY_CURRENT_BUFFER_LVALUE =
+            fortran_create_buffer(fortranin,YY_BUF_SIZE );
+	}
+
+	fortran_init_buffer(YY_CURRENT_BUFFER,input_file );
+	fortran_load_buffer_state( );
+}
+
+/** Switch to a different input buffer.
+ * @param new_buffer The new input buffer.
+ * 
+ */
+    void fortran_switch_to_buffer  (YY_BUFFER_STATE  new_buffer )
+{
+    
+	/* TODO. We should be able to replace this entire function body
+	 * with
+	 *		fortranpop_buffer_state();
+	 *		fortranpush_buffer_state(new_buffer);
+     */
+	fortranensure_buffer_stack ();
+	if ( YY_CURRENT_BUFFER == new_buffer )
+		return;
+
+	if ( YY_CURRENT_BUFFER )
+		{
+		/* Flush out information for old buffer. */
+		*(yy_c_buf_p) = (yy_hold_char);
+		YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
+		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
+		}
+
+	YY_CURRENT_BUFFER_LVALUE = new_buffer;
+	fortran_load_buffer_state( );
+
+	/* We don't actually know whether we did this switch during
+	 * EOF (fortranwrap()) processing, but the only time this flag
+	 * is looked at is after fortranwrap() is called, so it's safe
+	 * to go ahead and always set it.
+	 */
+	(yy_did_buffer_switch_on_eof) = 1;
+}
+
+static void fortran_load_buffer_state  (void)
+{
+    	(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
+	(yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
+	fortranin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
+	(yy_hold_char) = *(yy_c_buf_p);
+}
+
+/** Allocate and initialize an input buffer state.
+ * @param file A readable stream.
+ * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
+ * 
+ * @return the allocated buffer state.
+ */
+    YY_BUFFER_STATE fortran_create_buffer  (FILE * file, int  size )
+{
+	YY_BUFFER_STATE b;
+    
+	b = (YY_BUFFER_STATE) fortranalloc(sizeof( struct yy_buffer_state )  );
+	if ( ! b )
+		YY_FATAL_ERROR( "out of dynamic memory in fortran_create_buffer()" );
+
+	b->yy_buf_size = size;
+
+	/* yy_ch_buf has to be 2 characters longer than the size given because
+	 * we need to put in 2 end-of-buffer characters.
+	 */
+	b->yy_ch_buf = (char *) fortranalloc(b->yy_buf_size + 2  );
+	if ( ! b->yy_ch_buf )
+		YY_FATAL_ERROR( "out of dynamic memory in fortran_create_buffer()" );
+
+	b->yy_is_our_buffer = 1;
+
+	fortran_init_buffer(b,file );
+
+	return b;
+}
+
+/** Destroy the buffer.
+ * @param b a buffer created with fortran_create_buffer()
+ * 
+ */
+    void fortran_delete_buffer (YY_BUFFER_STATE  b )
+{
+    
+	if ( ! b )
+		return;
+
+	if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
+		YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
+
+	if ( b->yy_is_our_buffer )
+		fortranfree((void *) b->yy_ch_buf  );
+
+	fortranfree((void *) b  );
+}
+
+#ifndef __cplusplus
+extern int isatty (int );
+#endif /* __cplusplus */
+    
+/* Initializes or reinitializes a buffer.
+ * This function is sometimes called more than once on the same buffer,
+ * such as during a fortranrestart() or at EOF.
+ */
+    static void fortran_init_buffer  (YY_BUFFER_STATE  b, FILE * file )
+
+{
+	int oerrno = errno;
+    
+	fortran_flush_buffer(b );
+
+	b->yy_input_file = file;
+	b->yy_fill_buffer = 1;
+
+    /* If b is the current buffer, then fortran_init_buffer was _probably_
+     * called from fortranrestart() or through yy_get_next_buffer.
+     * In that case, we don't want to reset the lineno or column.
+     */
+    if (b != YY_CURRENT_BUFFER){
+        b->yy_bs_lineno = 1;
+        b->yy_bs_column = 0;
+    }
+
+        b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
+    
+	errno = oerrno;
+}
+
+/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
+ * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
+ * 
+ */
+    void fortran_flush_buffer (YY_BUFFER_STATE  b )
+{
+    	if ( ! b )
+		return;
+
+	b->yy_n_chars = 0;
+
+	/* We always need two end-of-buffer characters.  The first causes
+	 * a transition to the end-of-buffer state.  The second causes
+	 * a jam in that state.
+	 */
+	b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
+	b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
+
+	b->yy_buf_pos = &b->yy_ch_buf[0];
+
+	b->yy_at_bol = 1;
+	b->yy_buffer_status = YY_BUFFER_NEW;
+
+	if ( b == YY_CURRENT_BUFFER )
+		fortran_load_buffer_state( );
+}
+
+/** Pushes the new state onto the stack. The new state becomes
+ *  the current state. This function will allocate the stack
+ *  if necessary.
+ *  @param new_buffer The new state.
+ *  
+ */
+void fortranpush_buffer_state (YY_BUFFER_STATE new_buffer )
+{
+    	if (new_buffer == NULL)
+		return;
+
+	fortranensure_buffer_stack();
+
+	/* This block is copied from fortran_switch_to_buffer. */
+	if ( YY_CURRENT_BUFFER )
+		{
+		/* Flush out information for old buffer. */
+		*(yy_c_buf_p) = (yy_hold_char);
+		YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
+		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
+		}
+
+	/* Only push if top exists. Otherwise, replace top. */
+	if (YY_CURRENT_BUFFER)
+		(yy_buffer_stack_top)++;
+	YY_CURRENT_BUFFER_LVALUE = new_buffer;
+
+	/* copied from fortran_switch_to_buffer. */
+	fortran_load_buffer_state( );
+	(yy_did_buffer_switch_on_eof) = 1;
+}
+
+/** Removes and deletes the top of the stack, if present.
+ *  The next element becomes the new top.
+ *  
+ */
+void fortranpop_buffer_state (void)
+{
+    	if (!YY_CURRENT_BUFFER)
+		return;
+
+	fortran_delete_buffer(YY_CURRENT_BUFFER );
+	YY_CURRENT_BUFFER_LVALUE = NULL;
+	if ((yy_buffer_stack_top) > 0)
+		--(yy_buffer_stack_top);
+
+	if (YY_CURRENT_BUFFER) {
+		fortran_load_buffer_state( );
+		(yy_did_buffer_switch_on_eof) = 1;
+	}
+}
+
+/* Allocates the stack if it does not exist.
+ *  Guarantees space for at least one push.
+ */
+static void fortranensure_buffer_stack (void)
+{
+	yy_size_t num_to_alloc;
+    
+	if (!(yy_buffer_stack)) {
+
+		/* First allocation is just for 2 elements, since we don't know if this
+		 * scanner will even need a stack. We use 2 instead of 1 to avoid an
+		 * immediate realloc on the next call.
+         */
+		num_to_alloc = 1;
+		(yy_buffer_stack) = (struct yy_buffer_state**)fortranalloc
+								(num_to_alloc * sizeof(struct yy_buffer_state*)
+								);
+		if ( ! (yy_buffer_stack) )
+			YY_FATAL_ERROR( "out of dynamic memory in fortranensure_buffer_stack()" );
+								  
+		memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
+				
+		(yy_buffer_stack_max) = num_to_alloc;
+		(yy_buffer_stack_top) = 0;
+		return;
+	}
+
+	if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
+
+		/* Increase the buffer to prepare for a possible push. */
+		int grow_size = 8 /* arbitrary grow size */;
+
+		num_to_alloc = (yy_buffer_stack_max) + grow_size;
+		(yy_buffer_stack) = (struct yy_buffer_state**)fortranrealloc
+								((yy_buffer_stack),
+								num_to_alloc * sizeof(struct yy_buffer_state*)
+								);
+		if ( ! (yy_buffer_stack) )
+			YY_FATAL_ERROR( "out of dynamic memory in fortranensure_buffer_stack()" );
+
+		/* zero only the new slots.*/
+		memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
+		(yy_buffer_stack_max) = num_to_alloc;
+	}
+}
+
+/** Setup the input buffer state to scan directly from a user-specified character buffer.
+ * @param base the character buffer
+ * @param size the size in bytes of the character buffer
+ * 
+ * @return the newly allocated buffer state object. 
+ */
+YY_BUFFER_STATE fortran_scan_buffer  (char * base, yy_size_t  size )
+{
+	YY_BUFFER_STATE b;
+    
+	if ( size < 2 ||
+	     base[size-2] != YY_END_OF_BUFFER_CHAR ||
+	     base[size-1] != YY_END_OF_BUFFER_CHAR )
+		/* They forgot to leave room for the EOB's. */
+		return 0;
+
+	b = (YY_BUFFER_STATE) fortranalloc(sizeof( struct yy_buffer_state )  );
+	if ( ! b )
+		YY_FATAL_ERROR( "out of dynamic memory in fortran_scan_buffer()" );
+
+	b->yy_buf_size = size - 2;	/* "- 2" to take care of EOB's */
+	b->yy_buf_pos = b->yy_ch_buf = base;
+	b->yy_is_our_buffer = 0;
+	b->yy_input_file = 0;
+	b->yy_n_chars = b->yy_buf_size;
+	b->yy_is_interactive = 0;
+	b->yy_at_bol = 1;
+	b->yy_fill_buffer = 0;
+	b->yy_buffer_status = YY_BUFFER_NEW;
+
+	fortran_switch_to_buffer(b  );
+
+	return b;
+}
+
+/** Setup the input buffer state to scan a string. The next call to fortranlex() will
+ * scan from a @e copy of @a str.
+ * @param yystr a NUL-terminated string to scan
+ * 
+ * @return the newly allocated buffer state object.
+ * @note If you want to scan bytes that may contain NUL values, then use
+ *       fortran_scan_bytes() instead.
+ */
+YY_BUFFER_STATE fortran_scan_string (yyconst char * yystr )
+{
+    
+	return fortran_scan_bytes(yystr,strlen(yystr) );
+}
+
+/** Setup the input buffer state to scan the given bytes. The next call to fortranlex() will
+ * scan from a @e copy of @a bytes.
+ * @param bytes the byte buffer to scan
+ * @param len the number of bytes in the buffer pointed to by @a bytes.
+ * 
+ * @return the newly allocated buffer state object.
+ */
+YY_BUFFER_STATE fortran_scan_bytes  (yyconst char * yybytes, yy_size_t  _yybytes_len )
+{
+	YY_BUFFER_STATE b;
+	char *buf;
+	yy_size_t n, i;
+    
+	/* Get memory for full buffer, including space for trailing EOB's. */
+	n = _yybytes_len + 2;
+	buf = (char *) fortranalloc(n  );
+	if ( ! buf )
+		YY_FATAL_ERROR( "out of dynamic memory in fortran_scan_bytes()" );
+
+	for ( i = 0; i < _yybytes_len; ++i )
+		buf[i] = yybytes[i];
+
+	buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
+
+	b = fortran_scan_buffer(buf,n );
+	if ( ! b )
+		YY_FATAL_ERROR( "bad buffer in fortran_scan_bytes()" );
+
+	/* It's okay to grow etc. this buffer, and we should throw it
+	 * away when we're done.
+	 */
+	b->yy_is_our_buffer = 1;
+
+	return b;
+}
+
+#ifndef YY_EXIT_FAILURE
+#define YY_EXIT_FAILURE 2
+#endif
+
+static void yy_fatal_error (yyconst char* msg )
+{
+    	(void) fprintf( stderr, "%s\n", msg );
+	exit( YY_EXIT_FAILURE );
+}
+
+/* Redefine yyless() so it works in section 3 code. */
+
+#undef yyless
+#define yyless(n) \
+	do \
+		{ \
+		/* Undo effects of setting up fortrantext. */ \
+        int yyless_macro_arg = (n); \
+        YY_LESS_LINENO(yyless_macro_arg);\
+		fortrantext[fortranleng] = (yy_hold_char); \
+		(yy_c_buf_p) = fortrantext + yyless_macro_arg; \
+		(yy_hold_char) = *(yy_c_buf_p); \
+		*(yy_c_buf_p) = '\0'; \
+		fortranleng = yyless_macro_arg; \
+		} \
+	while ( 0 )
+
+/* Accessor  methods (get/set functions) to struct members. */
+
+/** Get the current line number.
+ * 
+ */
+int fortranget_lineno  (void)
+{
+        
+    return fortranlineno;
+}
+
+/** Get the input stream.
+ * 
+ */
+FILE *fortranget_in  (void)
+{
+        return fortranin;
+}
+
+/** Get the output stream.
+ * 
+ */
+FILE *fortranget_out  (void)
+{
+        return fortranout;
+}
+
+/** Get the length of the current token.
+ * 
+ */
+yy_size_t fortranget_leng  (void)
+{
+        return fortranleng;
+}
+
+/** Get the current token.
+ * 
+ */
+
+char *fortranget_text  (void)
+{
+        return fortrantext;
+}
+
+/** Set the current line number.
+ * @param line_number
+ * 
+ */
+void fortranset_lineno (int  line_number )
+{
+    
+    fortranlineno = line_number;
+}
+
+/** Set the input stream. This does not discard the current
+ * input buffer.
+ * @param in_str A readable stream.
+ * 
+ * @see fortran_switch_to_buffer
+ */
+void fortranset_in (FILE *  in_str )
+{
+        fortranin = in_str ;
+}
+
+void fortranset_out (FILE *  out_str )
+{
+        fortranout = out_str ;
+}
+
+int fortranget_debug  (void)
+{
+        return fortran_flex_debug;
+}
+
+void fortranset_debug (int  bdebug )
+{
+        fortran_flex_debug = bdebug ;
+}
+
+static int yy_init_globals (void)
+{
+        /* Initialization is the same as for the non-reentrant scanner.
+     * This function is called from fortranlex_destroy(), so don't allocate here.
+     */
+
+    (yy_buffer_stack) = 0;
+    (yy_buffer_stack_top) = 0;
+    (yy_buffer_stack_max) = 0;
+    (yy_c_buf_p) = (char *) 0;
+    (yy_init) = 0;
+    (yy_start) = 0;
+
+/* Defined in main.c */
+#ifdef YY_STDINIT
+    fortranin = stdin;
+    fortranout = stdout;
+#else
+    fortranin = (FILE *) 0;
+    fortranout = (FILE *) 0;
+#endif
+
+    /* For future reference: Set errno on error, since we are called by
+     * fortranlex_init()
+     */
+    return 0;
+}
+
+/* fortranlex_destroy is for both reentrant and non-reentrant scanners. */
+int fortranlex_destroy  (void)
+{
+    
+    /* Pop the buffer stack, destroying each element. */
+	while(YY_CURRENT_BUFFER){
+		fortran_delete_buffer(YY_CURRENT_BUFFER  );
+		YY_CURRENT_BUFFER_LVALUE = NULL;
+		fortranpop_buffer_state();
+	}
+
+	/* Destroy the stack itself. */
+	fortranfree((yy_buffer_stack) );
+	(yy_buffer_stack) = NULL;
+
+    /* Reset the globals. This is important in a non-reentrant scanner so the next time
+     * fortranlex() is called, initialization will occur. */
+    yy_init_globals( );
+
+    return 0;
+}
+
+/*
+ * Internal utility routines.
+ */
+
+#ifndef yytext_ptr
+static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
+{
+	register int i;
+	for ( i = 0; i < n; ++i )
+		s1[i] = s2[i];
+}
+#endif
+
+#ifdef YY_NEED_STRLEN
+static int yy_flex_strlen (yyconst char * s )
+{
+	register int n;
+	for ( n = 0; s[n]; ++n )
+		;
+
+	return n;
+}
+#endif
+
+void *fortranalloc (yy_size_t  size )
+{
+	return (void *) malloc( size );
+}
+
+void *fortranrealloc  (void * ptr, yy_size_t  size )
+{
+	/* The cast to (char *) in the following accommodates both
+	 * implementations that use char* generic pointers, and those
+	 * that use void* generic pointers.  It works with the latter
+	 * because both ANSI C and C++ allow castless assignment from
+	 * any pointer type to void*, and deal with argument conversions
+	 * as though doing an assignment.
+	 */
+	return (void *) realloc( (char *) ptr, size );
+}
+
+void fortranfree (void * ptr )
+{
+	free( (char *) ptr );	/* see fortranrealloc() for (char *) cast */
+}
+
+#define YYTABLES_NAME "yytables"
+
+#line 353 "fortran.lex"
+
+
+
+fortranerror(char *s)
+{
+   if (!strcasecmp(curfile,mainfile))
+   {
+      printf("%s line %d, file %s motclef = %s\n",s,line_num_fortran,curfile,fortrantext);
+   }
+   else
+   {
+      printf("%s line %d, file %s motclef = %s curbuf = %s\n",s,line_num_fortran_common,curfile,fortrantext,curbuf);
+   }
+/*   exit(0);*/
+}
+
+int fortranwrap()
+{
+}
+
Index: vendors/AGRIF/r_01/LIB/fortran.lex
===================================================================
--- vendors/AGRIF/r_01/LIB/fortran.lex	(revision 2672)
+++ vendors/AGRIF/r_01/LIB/fortran.lex	(revision 2672)
@@ -0,0 +1,370 @@
+/******************************************************************************/
+/*                                                                            */
+/*     CONV (converter) for Agrif (Adaptive Grid Refinement In Fortran)       */
+/*                                                                            */
+/* Copyright or   or Copr. Laurent Debreu (Laurent.Debreu@imag.fr)            */
+/*                        Cyril Mazauric (Cyril_Mazauric@yahoo.fr)            */
+/* This software is governed by the CeCILL-C license under French law and     */
+/* abiding by the rules of distribution of free software.  You can  use,      */
+/* modify and/ or redistribute the software under the terms of the CeCILL-C   */
+/* license as circulated by CEA, CNRS and INRIA at the following URL          */
+/* "http://www.cecill.info".                                                  */
+/*                                                                            */
+/* As a counterpart to the access to the source code and  rights to copy,     */
+/* modify and redistribute granted by the license, users are provided only    */
+/* with a limited warranty  and the software's author,  the holder of the     */
+/* economic rights,  and the successive licensors  have only  limited         */
+/* liability.                                                                 */
+/*                                                                            */
+/* In this respect, the user's attention is drawn to the risks associated     */
+/* with loading,  using,  modifying and/or developing or reproducing the      */
+/* software by the user in light of its specific status of free software,     */
+/* that may mean  that it is complicated to manipulate,  and  that  also      */
+/* therefore means  that it is reserved for developers  and  experienced      */
+/* professionals having in-depth computer knowledge. Users are therefore      */
+/* encouraged to load and test the software's suitability as regards their    */
+/* requirements in conditions enabling the security of their systems and/or   */
+/* data to be ensured and,  more generally, to use and operate it in the      */
+/* same conditions as regards security.                                       */
+/*                                                                            */
+/* The fact that you are presently reading this means that you have had       */
+/* knowledge of the CeCILL-C license and that you accept its terms.           */
+/******************************************************************************/
+/* version 1.7                                                                */
+/******************************************************************************/
+%x parameter
+%s character
+%x donottreat
+%s fortran77style
+%s fortran90style
+%{
+#include <math.h>
+#include <stdlib.h>
+#include <string.h>
+extern FILE * yyin;
+#define MAX_INCLUDE_DEPTH 30
+#define tabsize 6
+YY_BUFFER_STATE include_stack[MAX_INCLUDE_DEPTH];
+int line_num_fortran=1;
+int line_num_fortran_common=1;
+int newlinef90 = 0;
+char *tmp;
+char tmpc;
+/******************************************************************************/
+/**************PETITS PB NON PREVUS *******************************************/
+/******************************************************************************/
+/* NEXTLINF77 un ligne fortran 77 peut commencer par -      &a=b or on        */
+/*            a prevu seulement       & a=b avec l'espace entre le symbole    */
+/*            de la 7eme et le debut de la ligne de commande                  */
+/*            le ! est aussi interdit comme symbole de la 7 eme colonne       */
+/*            Normalement NEXTLINEF77 \n+[ ]{5}[^ ]                           */
+/******************************************************************************/
+#define YY_USER_ACTION \
+        {\
+           if (firstpass == 0) \
+           {\
+              strcat(curbuf,yytext); \
+              Save_Length(curbuf,38); \
+              strcpy(motparse,yytext);\
+              Save_Length(motparse,32); \
+              colnum = colnum + strlen(motparse);\
+              ECHO; \
+           }\
+           strcpy(motparse1,yytext);\
+/*           printf("yytext = %s\n",yytext);*/\
+        /*if ( firstpass == 1 ) 
+                      printf("yytext = %s %d\n",yytext,strlen(yytext));*/\
+        }
+%}
+AGRIFDEB "Agrif_debut"
+AGRIFFIN "Agrif_fin"
+REAL8 "real*8"[ \t]*"(a-h,o-z)"
+NOTTREAT Agrif_do_not_treat
+ENDNOTTREAT Agrif_end_do_not_treat
+
+NIMPORTEQUOI .
+SLASH "/"
+DSLASH "/"[ \t]*"/"
+NAME [a-zA-Z\_][a-zA-Z0-9\_]*
+DIGIT [0-9]+
+INT {DIGIT}
+EXPONENT e[-+]?{DIGIT}
+DEXPONENT d[-+]?{DIGIT}
+QEXPONENT q[-+]?{DIGIT}
+REAL (({DIGIT}\.[0-9]+|[0-9]*\.{DIGIT}){EXPONENT}?)|{DIGIT}\.{EXPONENT}
+REALDP (({DIGIT}\.[0-9]+|[0-9]*\.{DIGIT}){DEXPONENT}?)|{DIGIT}\.{DEXPONENT}
+REALQP (({DIGIT}\.[0-9]+|[0-9]*\.{DIGIT}){QEXPONENT}?)|{DIGIT}\.{QEXPONENT}
+ENDFUNCTION end[ \t]*function
+DOUBLEPRECISION double[ \t]*precision
+DOUBLECOMPLEX double[ \t]*complex
+
+COMMENTAIRESFORTRAN77 ^([Cc*](([ \t]*\n)|([^AaHhOo\n]{NIMPORTEQUOI}*\n)))
+COMMENTAIRESFORTRAN77_2 \n([Cc*](([ \t]*\n)|([^AaHhOo\n]{NIMPORTEQUOI}*\n)))
+COMMENTAIRESFORTRAN90 ^([ \t]*!{NIMPORTEQUOI}*\n)
+COMMENTAIRESFORTRAN90_2 (!{NIMPORTEQUOI}*)
+NEXTLINEF90 "&"{NIMPORTEQUOI}*[\n]*
+NEXTLINEF77 [\n \t]*\n[ \t]{5}("&"|"+"|"$"|"*"|"1"|"2"|"3"|"4"|"5"|"6"|"7"|"8"|"9"|"."|"#")
+%%
+  if (infixed) BEGIN(fortran77style) ;
+  if (infree) BEGIN(fortran90style)  ;
+
+^C${AGRIFDEB}            return TOK_DEBUT;
+^C${AGRIFFIN}            return TOK_FIN;
+^C$OMP[ \t]*{NIMPORTEQUOI}* return TOK_OMP;
+^C$[ \t]*{NIMPORTEQUOI}* return TOK_DOLLAR;
+
+{REAL8}                 {return TOK_REAL8;}
+subroutine              {return TOK_SUBROUTINE;}
+program                 {return TOK_PROGRAM;}
+allocate                {inallocate = 1; return TOK_ALLOCATE;}
+nullify			{return TOK_NULLIFY;}
+deallocate              {inallocate = 1; return TOK_DEALLOCATE;}
+result                  {return TOK_RESULT;}
+function                {return TOK_FUNCTION;}
+end[ \t]*subroutine     {strcpy(yylval.na,yytext);return TOK_ENDSUBROUTINE;}
+end[ \t]*program        {strcpy(yylval.na,yytext);return TOK_ENDPROGRAM;}
+end[ \t]*function       {strcpy(yylval.na,yytext);return TOK_ENDFUNCTION;}
+end                     {strcpy(yylval.na,yytext);return TOK_ENDUNIT;}
+include                  return TOK_INCLUDE;
+^[ \t]*use[ ]+           {
+                            strcpy(yylval.na,yytext);
+                            tmpc = input();
+                            unput(tmpc);
+                            if ( (
+                               tmpc >= 'a' && tmpc <= 'z'
+                                  ) || (
+                               tmpc >= 'A' && tmpc <= 'Z'
+                               )  )
+                               {
+                                  return TOK_USE;
+                               }
+                               else
+                               {
+                                  return TOK_NAME;
+                               }
+                         }
+rewind                  {return TOK_REWIND;}
+implicit                 return TOK_IMPLICIT;
+none                     return TOK_NONE;
+call                     return TOK_CALL;
+.true.                   return TOK_TRUE;
+.false.                  return TOK_FALSE;
+\=\>                    {return TOK_POINT_TO;}
+\*\*                    {strcpy(yylval.na,yytext);return TOK_DASTER;}
+\.[ \t]*eqv\.            {strcpy(yylval.na,yytext);return TOK_EQV;}
+\.[ \t]*eq\.            {strcpy(yylval.na,yytext);return TOK_EQ;}
+\.[ \t]*gt\.            {strcpy(yylval.na,yytext);return TOK_GT;}
+\.[ \t]*ge\.            {strcpy(yylval.na,yytext);return TOK_GE;}
+\.[ \t]*lt\.            {strcpy(yylval.na,yytext);return TOK_LT;}
+\.[ \t]*le\.            {strcpy(yylval.na,yytext);return TOK_LE;}
+\.[ \t]*neqv\.          {strcpy(yylval.na,yytext);return TOK_NEQV;}
+\.[ \t]*ne\.            {strcpy(yylval.na,yytext);return TOK_NE;}
+\.[ \t]*not\.           {strcpy(yylval.na,yytext);return TOK_NOT;}
+\.[ \t]*or\.            {strcpy(yylval.na,yytext);return TOK_OR;}
+\.[ \t]*xor\.           {strcpy(yylval.na,yytext);return TOK_XOR;}
+\.[ \t]*and\.           {strcpy(yylval.na,yytext);return TOK_AND;}
+module                  {return TOK_MODULE;}
+do[ 0-9\t]*while           {return TOK_DOWHILE;}
+end[ \t]*module          return TOK_ENDMODULE;
+end[ \t]*do              return TOK_ENDDO;
+do                      {return TOK_PLAINDO;}
+real                    {strcpy(yylval.na,yytext);return TOK_REAL;}
+integer                 {strcpy(yylval.na,yytext);return TOK_INTEGER;}
+logical                 {strcpy(yylval.na,yytext);return TOK_LOGICAL;}
+character               {strcpy(yylval.na,yytext);return TOK_CHARACTER;}
+allocatable             {return TOK_ALLOCATABLE;}
+close                    return TOK_CLOSE;
+inquire                  return TOK_INQUIRE;
+dimension               {return TOK_DIMENSION;}
+pause                    return TOK_PAUSE;
+equivalence              return TOK_EQUIVALENCE;
+stop                     return TOK_STOP;
+where                    return TOK_WHERE;
+end[ \t]*where           return TOK_ENDWHERE;
+else[ \t]*where          return TOK_ELSEWHERE;
+complex                 {return TOK_COMPLEX;}
+^[ \t]*contains         {return TOK_CONTAINS;}
+only                    {return TOK_ONLY;}
+parameter               {return TOK_PARAMETER;}
+recursive               {return TOK_RECURSIVE;}
+common                  {return TOK_COMMON;}
+^[ \t]*global[ \t]+     {return TOK_GLOBAL;}
+external                {return TOK_EXTERNAL;}
+intent                  {return TOK_INTENT;}
+pointer                 {return TOK_POINTER;}
+optional                {return TOK_OPTIONAL;}
+save                    {return TOK_SAVE;}
+^[ \t]*type[ \t\,]+       {return TOK_TYPE;}
+^[ \t]*type[ \t]*\(     {return TOK_TYPEPAR;}
+stat                    {if (inallocate == 1) return TOK_STAT; else {strcpy(yylval.na,yytext);return TOK_NAME;}}
+end[ \t]*type           {return TOK_ENDTYPE;}
+open                     return TOK_OPEN;
+return                   return TOK_RETURN;
+exit[^(]                 return TOK_EXIT;
+print                    return TOK_PRINT;
+module[ \t]*procedure   {return TOK_PROCEDURE;}
+read                    {return TOK_READ;}
+namelist                {return TOK_NAMELIST;}
+write                   {return TOK_WRITE;}
+target                  {return TOK_TARGET;}
+public                  {return TOK_PUBLIC;}
+private                 {return TOK_PRIVATE;}
+in                      {strcpy(yylval.nac,yytext);return TOK_IN;}
+^[ \t]*data[ \t]+       {strcpy(yylval.na,yytext);return TOK_DATA;}
+continue                 return TOK_CONTINUE;
+go[ \t]*to              {return TOK_PLAINGOTO;}
+out                     {strcpy(yylval.nac,yytext);return TOK_OUT;}
+inout                   {strcpy(yylval.nac,yytext);return TOK_INOUT;}
+intrinsic               {return TOK_INTRINSIC;}
+then                    {return TOK_THEN;}
+else[ \t]*if            {return TOK_ELSEIF;}
+else                    {return TOK_ELSE;}
+end[ \t]*if             {return TOK_ENDIF;}
+if[ \t]*\(              {return TOK_LOGICALIF;}
+sum[ \t]*\(             {return TOK_SUM;}
+max[ \t]*\(             {return TOK_MAX;}
+tanh                    {return TOK_TANH;}
+maxval                  {return TOK_MAXVAL;}
+trim                    {return TOK_TRIM;}
+sqrt\(                  {return TOK_SQRT;}
+select[ \t]*case        {return TOK_SELECTCASE;}
+^[ \t]*case[ \t]*\(     {return TOK_CASE;}
+^[ \t]*case[ \t]*default       {return TOK_CASEDEFAULT;}
+end[ \t]*select         {return TOK_ENDSELECT;}
+file[ \t]*\=            {return TOK_FILE;}
+end[ \t]*\=             {return TOK_END;}
+err[ \t]*\=             {return TOK_ERR;}
+exist[ \t]*\=           {return TOK_EXIST;}
+min[ \t]*\(             {return TOK_MIN;}
+nint                    {return TOK_NINT;}
+float                   {return TOK_FLOAT;}
+exp                     {return TOK_EXP;}
+cos                     {return TOK_COS;}
+cosh                    {return TOK_COSH;}
+acos                    {return TOK_ACOS;}
+sin                     {return TOK_SIN;}
+sinh                    {return TOK_SINH;}
+asin                    {return TOK_ASIN;}
+log                     {return TOK_LOG;}
+tan                     {return TOK_TAN;}
+atan                    {return TOK_ATAN;}
+cycle                   {return TOK_CYCLE;}
+abs\(                   {return TOK_ABS;}
+mod                     {return TOK_MOD;}
+sign                    {return TOK_SIGN;}
+minloc                  {return TOK_MINLOC;}
+maxloc                  {return TOK_MAXLOC;}
+minval                  {return TOK_MINVAL;}
+backspace               {return TOK_BACKSPACE;}
+\({SLASH}               {return TOK_LEFTAB;}
+{SLASH}\)               {return TOK_RIGHTAB;}
+format[ \t]*\(({NIMPORTEQUOI}|{NEXTLINEF90}|{NEXTLINEF77})*\)  {return TOK_FORMAT;}
+{DOUBLEPRECISION}       {strcpy(yylval.na,yytext);return TOK_DOUBLEPRECISION;}
+{DOUBLECOMPLEX}         {strcpy(yylval.na,yytext);return TOK_DOUBLECOMPLEX;}
+{SLASH}                 {strcpy(yylval.na,yytext);return TOK_SLASH;}
+DSLASH                  {strcpy(yylval.na,yytext);return TOK_DSLASH;}
+(\')[^']*&{0,1}\n[ \t]*&{0,1}[^']*(\')         {strcpy(yylval.na,yytext);return TOK_CHAR_CUT;}
+(\')[^\n']*(\')         {strcpy(yylval.na,yytext);return TOK_CHAR_CONSTANT;}
+(\")[^\n"]*(\")          {strcpy(yylval.na,yytext);return TOK_CHAR_MESSAGE;}
+({NAME}{REAL})          {strcpy(yylval.na,yytext);return TOK_CHAR_INT;}
+^[ \t]*interface        {printf("debug interfacer\n");BEGIN(donottreat);}
+<donottreat>^[ \t]*end[ \t]*interface[ \t]*\n {
+						BEGIN(INITIAL);
+                        if (infixed) BEGIN(fortran77style) ;
+                        if (infree) BEGIN(fortran90style)  ;
+                        line_num_fortran++;line_num_fortran_common++;
+                        return '\n';
+						}
+{NAME}                  {strcpy(yylval.na,yytext);return TOK_NAME;}
+{REAL}                  {strcpy(yylval.na,yytext);return TOK_CSTREAL;}
+{REALDP}                {strcpy(yylval.na,yytext);return TOK_CSTREALDP;}
+{REALQP}                {strcpy(yylval.na,yytext);return TOK_CSTREALQP;}
+({DIGIT}\.)/[^{NAME}|"and."|"false."|"true."|"eq."|"or."|"gt."|"ge."|"lt."|"le."|"not."|"ne."] {strcpy(yylval.na,yytext);return TOK_CSTREAL;}
+{INT}                   {strcpy(yylval.na,yytext);return TOK_CSTINT;}
+\$ {}
+\'|\"                   {return TOK_QUOTE;}
+\.                      {}
+\(|\)|:|\[|\]|\+|\-|\* {strcpy(yylval.na,yytext);return (int) *yytext;}
+\%                     {afterpercent = 1; strcpy(yylval.na,yytext);return (int) *yytext;}
+\;                      {return TOK_SEMICOLON;}
+\,                      {return (int) *yytext;}
+\=                      {return (int) *yytext;}
+\<                      {return (int) *yytext;}
+\>                      {return (int) *yytext;}
+\n                      {colnum=0;line_num_fortran++;line_num_fortran_common++; return (int) *yytext;}
+^[ ]*$
+^(((" "|[0-9]){1,5})|([ \t]{1,5}))[ &]+ {if (newlinef90 == 0) return TOK_LABEL; else newlinef90 = 0;}
+[ ]+
+[\t]+                   {colnum=colnum-1+tabsize;}
+[ \t]+ ;
+{NEXTLINEF90}           {line_num_fortran++;line_num_fortran_common++;newlinef90=1;colnum=0;}
+{NEXTLINEF77}           {line_num_fortran++;line_num_fortran_common++;colnum=0;}
+<fortran77style>{COMMENTAIRESFORTRAN77} {
+                           convert2lower(motparse1);
+                           if ( strncasecmp(motparse1,"contains",8) == 0 )
+                           {
+                              return TOK_CONTAINS;
+                           }
+                           else
+                           {
+                            /*  colnum=0;line_num_fortran++;line_num_fortran_common++;*/
+                             if ( !strcasecmp(motparse1,"C$AGRIF_DO_NOT_TREAT\n")) 
+                             return TOK_DONOTTREAT;
+                             if ( !strcasecmp(motparse1,"C$AGRIF_END_DO_NOT_TREAT\n")) return TOK_ENDDONOTTREAT;
+                             unput('\n');
+                           }
+                         }
+<fortran77style>{COMMENTAIRESFORTRAN77_2} {
+                           convert2lower(&motparse1[1]);
+                           if ( strncasecmp(&motparse1[1],"contains",8) == 0 )
+                           {
+                              return TOK_CONTAINS;
+                           }
+                           else
+                           {
+                             /* colnum=0;line_num_fortran++;line_num_fortran_common++;*/
+                             if ( !strcasecmp(&motparse1[1],"C$AGRIF_DO_NOT_TREAT\n")) 
+                             return TOK_DONOTTREAT;
+                             if ( !strcasecmp(&motparse1[1],"C$AGRIF_END_DO_NOT_TREAT\n")) return TOK_ENDDONOTTREAT;
+                             unput('\n');
+                           }
+                         }                            
+^"!$AGRIF_DO_NOT_TREAT"[ \t]*\n {
+						BEGIN(donottreat);
+						}
+<donottreat>^"!$AGRIF_END_DO_NOT_TREAT"[ \t]*\n {
+						BEGIN(INITIAL);
+                        if (infixed) BEGIN(fortran77style) ;
+                        if (infree) BEGIN(fortran90style)  ;
+                        line_num_fortran++;line_num_fortran_common++;
+                        return '\n';
+						}
+<donottreat>.*\n        {line_num_fortran++;line_num_fortran_common++;}
+{COMMENTAIRESFORTRAN90}   {
+                             colnum = 0;
+                             if ( !strcasecmp(motparse1,"!$AGRIF_DO_NOT_TREAT\n")) return TOK_DONOTTREAT;
+                             if ( !strcasecmp(motparse1,"!$AGRIF_END_DO_NOT_TREAT\n")) return TOK_ENDDONOTTREAT;
+                          }
+{COMMENTAIRESFORTRAN90_2} {
+                             colnum = 0;
+                             if ( !strcasecmp(motparse1,"!$AGRIF_DO_NOT_TREAT\n")) return TOK_DONOTTREAT;
+                             if ( !strcasecmp(motparse1,"!$AGRIF_END_DO_NOT_TREAT\n")) return TOK_ENDDONOTTREAT;
+                          }
+%%
+
+fortranerror(char *s)
+{
+   if (!strcasecmp(curfile,mainfile))
+   {
+      printf("%s line %d, file %s motclef = %s\n",s,line_num_fortran,curfile,yytext);
+   }
+   else
+   {
+      printf("%s line %d, file %s motclef = %s curbuf = %s\n",s,line_num_fortran_common,curfile,yytext,curbuf);
+   }
+/*   exit(0);*/
+}
+
+int fortranwrap()
+{
+}
Index: vendors/AGRIF/r_01/LIB/fortran.tab.c
===================================================================
--- vendors/AGRIF/r_01/LIB/fortran.tab.c	(revision 2672)
+++ vendors/AGRIF/r_01/LIB/fortran.tab.c	(revision 2672)
@@ -0,0 +1,6784 @@
+/* A Bison parser, made by GNU Bison 2.3.  */
+
+/* Skeleton implementation for Bison's Yacc-like parsers in C
+
+   Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+   Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 51 Franklin Street, Fifth Floor,
+   Boston, MA 02110-1301, USA.  */
+
+/* As a special exception, you may create a larger work that contains
+   part or all of the Bison parser skeleton and distribute that work
+   under terms of your choice, so long as that work isn't itself a
+   parser generator using the skeleton or a modified version thereof
+   as a parser skeleton.  Alternatively, if you modify or redistribute
+   the parser skeleton itself, you may (at your option) remove this
+   special exception, which will cause the skeleton and the resulting
+   Bison output files to be licensed under the GNU General Public
+   License without this special exception.
+
+   This special exception was added by the Free Software Foundation in
+   version 2.2 of Bison.  */
+
+/* C LALR(1) parser skeleton written by Richard Stallman, by
+   simplifying the original so-called "semantic" parser.  */
+
+/* All symbols defined below should begin with yy or YY, to avoid
+   infringing on user name space.  This should be done even for local
+   variables, as they might otherwise be expanded by user macros.
+   There are some unavoidable exceptions within include files to
+   define necessary library symbols; they are noted "INFRINGES ON
+   USER NAME SPACE" below.  */
+
+/* Identify Bison output.  */
+#define YYBISON 1
+
+/* Bison version.  */
+#define YYBISON_VERSION "2.3"
+
+/* Skeleton name.  */
+#define YYSKELETON_NAME "yacc.c"
+
+/* Pure parsers.  */
+#define YYPURE 0
+
+/* Using locations.  */
+#define YYLSP_NEEDED 0
+
+/* Substitute the variable and function names.  */
+#define yyparse fortranparse
+#define yylex   fortranlex
+#define yyerror fortranerror
+#define yylval  fortranlval
+#define yychar  fortranchar
+#define yydebug fortrandebug
+#define yynerrs fortrannerrs
+
+
+/* Tokens.  */
+#ifndef YYTOKENTYPE
+# define YYTOKENTYPE
+   /* Put the tokens into the symbol table, so that GDB and other debuggers
+      know about them.  */
+   enum yytokentype {
+     TOK_BINARY_OP = 258,
+     TOK_NEQV = 259,
+     TOK_EQV = 260,
+     TOK_XOR = 261,
+     TOK_OR = 262,
+     TOK_AND = 263,
+     TOK_NOT = 264,
+     TOK_NE = 265,
+     TOK_EQ = 266,
+     TOK_GE = 267,
+     TOK_LE = 268,
+     TOK_GT = 269,
+     TOK_LT = 270,
+     TOK_UNARY_OP = 271,
+     TOK_DSLASH = 272,
+     TOK_SLASH = 273,
+     TOK_DASTER = 274,
+     TOK_SEP = 275,
+     TOK_SEMICOLON = 276,
+     TOK_NEXTLINE = 277,
+     TOK_PARAMETER = 278,
+     TOK_RESULT = 279,
+     TOK_ONLY = 280,
+     TOK_INCLUDE = 281,
+     TOK_SUBROUTINE = 282,
+     TOK_PROGRAM = 283,
+     TOK_FUNCTION = 284,
+     TOK_OMP = 285,
+     TOK_DOLLAR = 286,
+     TOK_FORMAT = 287,
+     TOK_MAX = 288,
+     TOK_TANH = 289,
+     TOK_WHERE = 290,
+     TOK_ELSEWHERE = 291,
+     TOK_ENDWHERE = 292,
+     TOK_MAXVAL = 293,
+     TOK_TRIM = 294,
+     TOK_SUM = 295,
+     TOK_SQRT = 296,
+     TOK_CASE = 297,
+     TOK_SELECTCASE = 298,
+     TOK_FILE = 299,
+     TOK_END = 300,
+     TOK_ERR = 301,
+     TOK_DONOTTREAT = 302,
+     TOK_ENDDONOTTREAT = 303,
+     TOK_EXIST = 304,
+     TOK_MIN = 305,
+     TOK_FLOAT = 306,
+     TOK_EXP = 307,
+     TOK_COS = 308,
+     TOK_COSH = 309,
+     TOK_ACOS = 310,
+     TOK_NINT = 311,
+     TOK_CYCLE = 312,
+     TOK_SIN = 313,
+     TOK_SINH = 314,
+     TOK_ASIN = 315,
+     TOK_EQUIVALENCE = 316,
+     TOK_BACKSPACE = 317,
+     TOK_LOG = 318,
+     TOK_TAN = 319,
+     TOK_ATAN = 320,
+     TOK_RECURSIVE = 321,
+     TOK_ABS = 322,
+     TOK_MOD = 323,
+     TOK_SIGN = 324,
+     TOK_MINLOC = 325,
+     TOK_MAXLOC = 326,
+     TOK_EXIT = 327,
+     TOK_MINVAL = 328,
+     TOK_PUBLIC = 329,
+     TOK_PRIVATE = 330,
+     TOK_ALLOCATABLE = 331,
+     TOK_RETURN = 332,
+     TOK_THEN = 333,
+     TOK_ELSEIF = 334,
+     TOK_ELSE = 335,
+     TOK_ENDIF = 336,
+     TOK_PRINT = 337,
+     TOK_PLAINGOTO = 338,
+     TOK_CONSTRUCTID = 339,
+     TOK_LOGICALIF = 340,
+     TOK_PLAINDO = 341,
+     TOK_CONTAINS = 342,
+     TOK_ENDDO = 343,
+     TOK_MODULE = 344,
+     TOK_ENDMODULE = 345,
+     TOK_DOWHILE = 346,
+     TOK_ALLOCATE = 347,
+     TOK_OPEN = 348,
+     TOK_CLOSE = 349,
+     TOK_INQUIRE = 350,
+     TOK_WRITE = 351,
+     TOK_READ = 352,
+     TOK_REWIND = 353,
+     TOK_DEALLOCATE = 354,
+     TOK_NULLIFY = 355,
+     TOK_FIN = 356,
+     TOK_DEBUT = 357,
+     TOK_DIMENSION = 358,
+     TOK_ENDSELECT = 359,
+     TOK_EXTERNAL = 360,
+     TOK_INTENT = 361,
+     TOK_INTRINSIC = 362,
+     TOK_NAMELIST = 363,
+     TOK_CASEDEFAULT = 364,
+     TOK_OPTIONAL = 365,
+     TOK_POINTER = 366,
+     TOK_CONTINUE = 367,
+     TOK_SAVE = 368,
+     TOK_TARGET = 369,
+     TOK_QUOTE = 370,
+     TOK_IMPLICIT = 371,
+     TOK_NONE = 372,
+     TOK_CALL = 373,
+     TOK_STAT = 374,
+     TOK_POINT_TO = 375,
+     TOK_COMMON = 376,
+     TOK_GLOBAL = 377,
+     TOK_INTERFACE = 378,
+     TOK_ENDINTERFACE = 379,
+     TOK_LEFTAB = 380,
+     TOK_RIGHTAB = 381,
+     TOK_PAUSE = 382,
+     TOK_PROCEDURE = 383,
+     TOK_STOP = 384,
+     TOK_NAMEEQ = 385,
+     TOK_REAL8 = 386,
+     TOK_OUT = 387,
+     TOK_INOUT = 388,
+     TOK_IN = 389,
+     TOK_USE = 390,
+     TOK_TRUE = 391,
+     TOK_FALSE = 392,
+     TOK_LABEL = 393,
+     TOK_TYPE = 394,
+     TOK_TYPEPAR = 395,
+     TOK_ENDTYPE = 396,
+     TOK_REAL = 397,
+     TOK_INTEGER = 398,
+     TOK_LOGICAL = 399,
+     TOK_DOUBLEPRECISION = 400,
+     TOK_DOUBLEREAL = 401,
+     TOK_ENDSUBROUTINE = 402,
+     TOK_ENDFUNCTION = 403,
+     TOK_ENDPROGRAM = 404,
+     TOK_ENDUNIT = 405,
+     TOK_CHARACTER = 406,
+     TOK_CHAR_CONSTANT = 407,
+     TOK_CHAR_CUT = 408,
+     TOK_DATA = 409,
+     TOK_CHAR_INT = 410,
+     TOK_CHAR_MESSAGE = 411,
+     TOK_CSTREAL = 412,
+     TOK_CSTREALDP = 413,
+     TOK_CSTREALQP = 414,
+     TOK_SFREAL = 415,
+     TOK_COMPLEX = 416,
+     TOK_DOUBLECOMPLEX = 417,
+     TOK_NAME = 418,
+     TOK_NAME_CHAR = 419,
+     TOK_PROBTYPE = 420,
+     TOK_INTERPTYPE = 421,
+     TOK_VARTYPE = 422,
+     TOK_BC = 423,
+     TOK_OP = 424,
+     TOK_CSTINT = 425,
+     TOK_COMMENT = 426,
+     TOK_FILENAME = 427
+   };
+#endif
+/* Tokens.  */
+#define TOK_BINARY_OP 258
+#define TOK_NEQV 259
+#define TOK_EQV 260
+#define TOK_XOR 261
+#define TOK_OR 262
+#define TOK_AND 263
+#define TOK_NOT 264
+#define TOK_NE 265
+#define TOK_EQ 266
+#define TOK_GE 267
+#define TOK_LE 268
+#define TOK_GT 269
+#define TOK_LT 270
+#define TOK_UNARY_OP 271
+#define TOK_DSLASH 272
+#define TOK_SLASH 273
+#define TOK_DASTER 274
+#define TOK_SEP 275
+#define TOK_SEMICOLON 276
+#define TOK_NEXTLINE 277
+#define TOK_PARAMETER 278
+#define TOK_RESULT 279
+#define TOK_ONLY 280
+#define TOK_INCLUDE 281
+#define TOK_SUBROUTINE 282
+#define TOK_PROGRAM 283
+#define TOK_FUNCTION 284
+#define TOK_OMP 285
+#define TOK_DOLLAR 286
+#define TOK_FORMAT 287
+#define TOK_MAX 288
+#define TOK_TANH 289
+#define TOK_WHERE 290
+#define TOK_ELSEWHERE 291
+#define TOK_ENDWHERE 292
+#define TOK_MAXVAL 293
+#define TOK_TRIM 294
+#define TOK_SUM 295
+#define TOK_SQRT 296
+#define TOK_CASE 297
+#define TOK_SELECTCASE 298
+#define TOK_FILE 299
+#define TOK_END 300
+#define TOK_ERR 301
+#define TOK_DONOTTREAT 302
+#define TOK_ENDDONOTTREAT 303
+#define TOK_EXIST 304
+#define TOK_MIN 305
+#define TOK_FLOAT 306
+#define TOK_EXP 307
+#define TOK_COS 308
+#define TOK_COSH 309
+#define TOK_ACOS 310
+#define TOK_NINT 311
+#define TOK_CYCLE 312
+#define TOK_SIN 313
+#define TOK_SINH 314
+#define TOK_ASIN 315
+#define TOK_EQUIVALENCE 316
+#define TOK_BACKSPACE 317
+#define TOK_LOG 318
+#define TOK_TAN 319
+#define TOK_ATAN 320
+#define TOK_RECURSIVE 321
+#define TOK_ABS 322
+#define TOK_MOD 323
+#define TOK_SIGN 324
+#define TOK_MINLOC 325
+#define TOK_MAXLOC 326
+#define TOK_EXIT 327
+#define TOK_MINVAL 328
+#define TOK_PUBLIC 329
+#define TOK_PRIVATE 330
+#define TOK_ALLOCATABLE 331
+#define TOK_RETURN 332
+#define TOK_THEN 333
+#define TOK_ELSEIF 334
+#define TOK_ELSE 335
+#define TOK_ENDIF 336
+#define TOK_PRINT 337
+#define TOK_PLAINGOTO 338
+#define TOK_CONSTRUCTID 339
+#define TOK_LOGICALIF 340
+#define TOK_PLAINDO 341
+#define TOK_CONTAINS 342
+#define TOK_ENDDO 343
+#define TOK_MODULE 344
+#define TOK_ENDMODULE 345
+#define TOK_DOWHILE 346
+#define TOK_ALLOCATE 347
+#define TOK_OPEN 348
+#define TOK_CLOSE 349
+#define TOK_INQUIRE 350
+#define TOK_WRITE 351
+#define TOK_READ 352
+#define TOK_REWIND 353
+#define TOK_DEALLOCATE 354
+#define TOK_NULLIFY 355
+#define TOK_FIN 356
+#define TOK_DEBUT 357
+#define TOK_DIMENSION 358
+#define TOK_ENDSELECT 359
+#define TOK_EXTERNAL 360
+#define TOK_INTENT 361
+#define TOK_INTRINSIC 362
+#define TOK_NAMELIST 363
+#define TOK_CASEDEFAULT 364
+#define TOK_OPTIONAL 365
+#define TOK_POINTER 366
+#define TOK_CONTINUE 367
+#define TOK_SAVE 368
+#define TOK_TARGET 369
+#define TOK_QUOTE 370
+#define TOK_IMPLICIT 371
+#define TOK_NONE 372
+#define TOK_CALL 373
+#define TOK_STAT 374
+#define TOK_POINT_TO 375
+#define TOK_COMMON 376
+#define TOK_GLOBAL 377
+#define TOK_INTERFACE 378
+#define TOK_ENDINTERFACE 379
+#define TOK_LEFTAB 380
+#define TOK_RIGHTAB 381
+#define TOK_PAUSE 382
+#define TOK_PROCEDURE 383
+#define TOK_STOP 384
+#define TOK_NAMEEQ 385
+#define TOK_REAL8 386
+#define TOK_OUT 387
+#define TOK_INOUT 388
+#define TOK_IN 389
+#define TOK_USE 390
+#define TOK_TRUE 391
+#define TOK_FALSE 392
+#define TOK_LABEL 393
+#define TOK_TYPE 394
+#define TOK_TYPEPAR 395
+#define TOK_ENDTYPE 396
+#define TOK_REAL 397
+#define TOK_INTEGER 398
+#define TOK_LOGICAL 399
+#define TOK_DOUBLEPRECISION 400
+#define TOK_DOUBLEREAL 401
+#define TOK_ENDSUBROUTINE 402
+#define TOK_ENDFUNCTION 403
+#define TOK_ENDPROGRAM 404
+#define TOK_ENDUNIT 405
+#define TOK_CHARACTER 406
+#define TOK_CHAR_CONSTANT 407
+#define TOK_CHAR_CUT 408
+#define TOK_DATA 409
+#define TOK_CHAR_INT 410
+#define TOK_CHAR_MESSAGE 411
+#define TOK_CSTREAL 412
+#define TOK_CSTREALDP 413
+#define TOK_CSTREALQP 414
+#define TOK_SFREAL 415
+#define TOK_COMPLEX 416
+#define TOK_DOUBLECOMPLEX 417
+#define TOK_NAME 418
+#define TOK_NAME_CHAR 419
+#define TOK_PROBTYPE 420
+#define TOK_INTERPTYPE 421
+#define TOK_VARTYPE 422
+#define TOK_BC 423
+#define TOK_OP 424
+#define TOK_CSTINT 425
+#define TOK_COMMENT 426
+#define TOK_FILENAME 427
+
+
+
+
+/* Copy the first part of user declarations.  */
+#line 36 "fortran.y"
+
+#define YYMAXDEPTH 1000
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include "decl.h"
+extern int line_num_fortran;
+extern int line_num_fortran_common;
+char *tmp;
+char c_selectorname[LONG_C];
+char ligne[LONG_C];
+char truename[LONGNOM];
+char identcopy[LONG_C];
+int c_selectorgiven=0;
+int incom;
+listvar *curlistvar;
+typedim c_selectordim;
+listcouple *coupletmp;
+listdim *parcoursdim;
+int removeline=0;
+listvar *test;
+
+
+/* Enabling traces.  */
+#ifndef YYDEBUG
+# define YYDEBUG 1
+#endif
+
+/* Enabling verbose error messages.  */
+#ifdef YYERROR_VERBOSE
+# undef YYERROR_VERBOSE
+# define YYERROR_VERBOSE 1
+#else
+# define YYERROR_VERBOSE 0
+#endif
+
+/* Enabling the token table.  */
+#ifndef YYTOKEN_TABLE
+# define YYTOKEN_TABLE 0
+#endif
+
+#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
+typedef union YYSTYPE
+#line 59 "fortran.y"
+{
+       char      nac[LONG_C];
+       char      na[LONGNOM];
+       listdim  *d;
+       listvar  *l;
+       listnom  *ln;
+       listcouple  *lc;
+       listname *lnn;
+       typedim   dim1;
+       variable *v;
+       }
+/* Line 193 of yacc.c.  */
+#line 483 "fortran.tab.c"
+	YYSTYPE;
+# define yystype YYSTYPE /* obsolescent; will be withdrawn */
+# define YYSTYPE_IS_DECLARED 1
+# define YYSTYPE_IS_TRIVIAL 1
+#endif
+
+
+
+/* Copy the second part of user declarations.  */
+
+
+/* Line 216 of yacc.c.  */
+#line 496 "fortran.tab.c"
+
+#ifdef short
+# undef short
+#endif
+
+#ifdef YYTYPE_UINT8
+typedef YYTYPE_UINT8 yytype_uint8;
+#else
+typedef unsigned char yytype_uint8;
+#endif
+
+#ifdef YYTYPE_INT8
+typedef YYTYPE_INT8 yytype_int8;
+#elif (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+typedef signed char yytype_int8;
+#else
+typedef short int yytype_int8;
+#endif
+
+#ifdef YYTYPE_UINT16
+typedef YYTYPE_UINT16 yytype_uint16;
+#else
+typedef unsigned short int yytype_uint16;
+#endif
+
+#ifdef YYTYPE_INT16
+typedef YYTYPE_INT16 yytype_int16;
+#else
+typedef short int yytype_int16;
+#endif
+
+#ifndef YYSIZE_T
+# ifdef __SIZE_TYPE__
+#  define YYSIZE_T __SIZE_TYPE__
+# elif defined size_t
+#  define YYSIZE_T size_t
+# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+#  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
+#  define YYSIZE_T size_t
+# else
+#  define YYSIZE_T unsigned int
+# endif
+#endif
+
+#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
+
+#ifndef YY_
+# if defined YYENABLE_NLS && YYENABLE_NLS
+#  if ENABLE_NLS
+#   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
+#   define YY_(msgid) dgettext ("bison-runtime", msgid)
+#  endif
+# endif
+# ifndef YY_
+#  define YY_(msgid) msgid
+# endif
+#endif
+
+/* Suppress unused-variable warnings by "using" E.  */
+#if ! defined lint || defined __GNUC__
+# define YYUSE(e) ((void) (e))
+#else
+# define YYUSE(e) /* empty */
+#endif
+
+/* Identity function, used to suppress warnings about constant conditions.  */
+#ifndef lint
+# define YYID(n) (n)
+#else
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+static int
+YYID (int i)
+#else
+static int
+YYID (i)
+    int i;
+#endif
+{
+  return i;
+}
+#endif
+
+#if ! defined yyoverflow || YYERROR_VERBOSE
+
+/* The parser invokes alloca or malloc; define the necessary symbols.  */
+
+# ifdef YYSTACK_USE_ALLOCA
+#  if YYSTACK_USE_ALLOCA
+#   ifdef __GNUC__
+#    define YYSTACK_ALLOC __builtin_alloca
+#   elif defined __BUILTIN_VA_ARG_INCR
+#    include <alloca.h> /* INFRINGES ON USER NAME SPACE */
+#   elif defined _AIX
+#    define YYSTACK_ALLOC __alloca
+#   elif defined _MSC_VER
+#    include <malloc.h> /* INFRINGES ON USER NAME SPACE */
+#    define alloca _alloca
+#   else
+#    define YYSTACK_ALLOC alloca
+#    if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+#     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
+#     ifndef _STDLIB_H
+#      define _STDLIB_H 1
+#     endif
+#    endif
+#   endif
+#  endif
+# endif
+
+# ifdef YYSTACK_ALLOC
+   /* Pacify GCC's `empty if-body' warning.  */
+#  define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
+#  ifndef YYSTACK_ALLOC_MAXIMUM
+    /* The OS might guarantee only one guard page at the bottom of the stack,
+       and a page size can be as small as 4096 bytes.  So we cannot safely
+       invoke alloca (N) if N exceeds 4096.  Use a slightly smaller number
+       to allow for a few compiler-allocated temporary stack slots.  */
+#   define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
+#  endif
+# else
+#  define YYSTACK_ALLOC YYMALLOC
+#  define YYSTACK_FREE YYFREE
+#  ifndef YYSTACK_ALLOC_MAXIMUM
+#   define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
+#  endif
+#  if (defined __cplusplus && ! defined _STDLIB_H \
+       && ! ((defined YYMALLOC || defined malloc) \
+	     && (defined YYFREE || defined free)))
+#   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
+#   ifndef _STDLIB_H
+#    define _STDLIB_H 1
+#   endif
+#  endif
+#  ifndef YYMALLOC
+#   define YYMALLOC malloc
+#   if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
+#   endif
+#  endif
+#  ifndef YYFREE
+#   define YYFREE free
+#   if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+void free (void *); /* INFRINGES ON USER NAME SPACE */
+#   endif
+#  endif
+# endif
+#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
+
+
+#if (! defined yyoverflow \
+     && (! defined __cplusplus \
+	 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
+
+/* A type that is properly aligned for any stack member.  */
+union yyalloc
+{
+  yytype_int16 yyss;
+  YYSTYPE yyvs;
+  };
+
+/* The size of the maximum gap between one aligned stack and the next.  */
+# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
+
+/* The size of an array large to enough to hold all stacks, each with
+   N elements.  */
+# define YYSTACK_BYTES(N) \
+     ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
+      + YYSTACK_GAP_MAXIMUM)
+
+/* Copy COUNT objects from FROM to TO.  The source and destination do
+   not overlap.  */
+# ifndef YYCOPY
+#  if defined __GNUC__ && 1 < __GNUC__
+#   define YYCOPY(To, From, Count) \
+      __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
+#  else
+#   define YYCOPY(To, From, Count)		\
+      do					\
+	{					\
+	  YYSIZE_T yyi;				\
+	  for (yyi = 0; yyi < (Count); yyi++)	\
+	    (To)[yyi] = (From)[yyi];		\
+	}					\
+      while (YYID (0))
+#  endif
+# endif
+
+/* Relocate STACK from its old location to the new one.  The
+   local variables YYSIZE and YYSTACKSIZE give the old and new number of
+   elements in the stack, and YYPTR gives the new location of the
+   stack.  Advance YYPTR to a properly aligned location for the next
+   stack.  */
+# define YYSTACK_RELOCATE(Stack)					\
+    do									\
+      {									\
+	YYSIZE_T yynewbytes;						\
+	YYCOPY (&yyptr->Stack, Stack, yysize);				\
+	Stack = &yyptr->Stack;						\
+	yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
+	yyptr += yynewbytes / sizeof (*yyptr);				\
+      }									\
+    while (YYID (0))
+
+#endif
+
+/* YYFINAL -- State number of the termination state.  */
+#define YYFINAL  2
+/* YYLAST -- Last index in YYTABLE.  */
+#define YYLAST   5878
+
+/* YYNTOKENS -- Number of terminals.  */
+#define YYNTOKENS  190
+/* YYNNTS -- Number of nonterminals.  */
+#define YYNNTS  184
+/* YYNRULES -- Number of rules.  */
+#define YYNRULES  552
+/* YYNRULES -- Number of states.  */
+#define YYNSTATES  978
+
+/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
+#define YYUNDEFTOK  2
+#define YYMAXUTOK   427
+
+#define YYTRANSLATE(YYX)						\
+  ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
+
+/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX.  */
+static const yytype_uint8 yytranslate[] =
+{
+       0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+     187,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,   183,     2,     2,     2,   189,     2,     2,
+     179,   180,    23,    21,     3,    22,     2,   188,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     4,     2,
+     185,     5,   186,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,   181,     2,   182,     2,   184,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     1,     2,     6,     7,
+       8,     9,    10,    11,    12,    13,    14,    15,    16,    17,
+      18,    19,    20,    24,    25,    26,    27,    28,    29,    30,
+      31,    32,    33,    34,    35,    36,    37,    38,    39,    40,
+      41,    42,    43,    44,    45,    46,    47,    48,    49,    50,
+      51,    52,    53,    54,    55,    56,    57,    58,    59,    60,
+      61,    62,    63,    64,    65,    66,    67,    68,    69,    70,
+      71,    72,    73,    74,    75,    76,    77,    78,    79,    80,
+      81,    82,    83,    84,    85,    86,    87,    88,    89,    90,
+      91,    92,    93,    94,    95,    96,    97,    98,    99,   100,
+     101,   102,   103,   104,   105,   106,   107,   108,   109,   110,
+     111,   112,   113,   114,   115,   116,   117,   118,   119,   120,
+     121,   122,   123,   124,   125,   126,   127,   128,   129,   130,
+     131,   132,   133,   134,   135,   136,   137,   138,   139,   140,
+     141,   142,   143,   144,   145,   146,   147,   148,   149,   150,
+     151,   152,   153,   154,   155,   156,   157,   158,   159,   160,
+     161,   162,   163,   164,   165,   166,   167,   168,   169,   170,
+     171,   172,   173,   174,   175,   176,   177,   178
+};
+
+#if YYDEBUG
+/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
+   YYRHS.  */
+static const yytype_uint16 yyprhs[] =
+{
+       0,     0,     3,     4,     7,    10,    13,    15,    19,    23,
+      25,    29,    32,    35,    39,    43,    46,    49,    52,    54,
+      56,    58,    60,    61,    62,    65,    66,    68,    69,    70,
+      72,    73,    78,    81,    87,    91,    94,    96,    97,    99,
+     101,   102,   105,   109,   110,   113,   117,   119,   123,   125,
+     127,   130,   135,   138,   141,   146,   149,   151,   153,   155,
+     157,   159,   161,   163,   165,   167,   169,   174,   178,   182,
+     185,   189,   190,   192,   194,   196,   198,   200,   202,   204,
+     206,   208,   210,   212,   214,   216,   218,   220,   222,   224,
+     226,   228,   230,   232,   234,   236,   238,   240,   242,   246,
+     250,   256,   258,   262,   266,   269,   274,   276,   280,   281,
+     284,   287,   291,   293,   295,   297,   302,   309,   314,   316,
+     320,   323,   327,   333,   337,   339,   340,   343,   345,   350,
+     354,   357,   361,   365,   369,   373,   374,   376,   379,   382,
+     386,   392,   396,   397,   400,   403,   405,   411,   417,   420,
+     424,   427,   431,   433,   437,   440,   444,   450,   452,   455,
+     457,   461,   464,   466,   470,   471,   473,   475,   479,   483,
+     486,   488,   492,   495,   498,   499,   506,   514,   515,   518,
+     521,   525,   529,   531,   532,   535,   540,   544,   548,   553,
+     556,   558,   560,   562,   564,   566,   568,   570,   572,   573,
+     576,   578,   582,   583,   586,   590,   592,   596,   599,   603,
+     605,   607,   609,   611,   612,   616,   617,   620,   625,   627,
+     631,   633,   635,   637,   640,   642,   647,   649,   651,   653,
+     655,   657,   659,   661,   663,   665,   667,   668,   672,   674,
+     678,   680,   682,   685,   688,   692,   694,   696,   698,   702,
+     704,   706,   710,   714,   719,   724,   728,   733,   738,   742,
+     747,   752,   757,   762,   767,   772,   777,   782,   787,   792,
+     797,   802,   807,   811,   816,   821,   826,   831,   833,   837,
+     839,   841,   843,   846,   849,   852,   854,   856,   859,   862,
+     865,   868,   871,   874,   877,   880,   883,   886,   889,   893,
+     896,   900,   903,   906,   909,   912,   915,   918,   921,   922,
+     924,   927,   930,   933,   935,   937,   939,   941,   942,   944,
+     947,   952,   958,   963,   967,   971,   973,   976,   978,   982,
+     984,   986,   990,   996,  1001,  1005,  1008,  1011,  1013,  1015,
+    1017,  1019,  1021,  1023,  1025,  1027,  1030,  1033,  1035,  1038,
+    1040,  1042,  1043,  1045,  1051,  1052,  1054,  1056,  1058,  1059,
+    1063,  1064,  1070,  1073,  1078,  1085,  1092,  1094,  1096,  1098,
+    1102,  1106,  1108,  1112,  1116,  1118,  1120,  1126,  1132,  1137,
+    1139,  1142,  1145,  1148,  1151,  1153,  1156,  1162,  1164,  1166,
+    1169,  1175,  1177,  1180,  1184,  1189,  1191,  1193,  1195,  1197,
+    1199,  1201,  1203,  1205,  1209,  1213,  1217,  1220,  1223,  1224,
+    1230,  1238,  1239,  1242,  1244,  1246,  1247,  1249,  1251,  1253,
+    1255,  1258,  1260,  1262,  1264,  1270,  1276,  1279,  1282,  1285,
+    1288,  1290,  1291,  1296,  1303,  1305,  1309,  1312,  1315,  1318,
+    1319,  1323,  1324,  1326,  1329,  1331,  1333,  1337,  1339,  1342,
+    1344,  1346,  1349,  1352,  1355,  1359,  1362,  1364,  1365,  1367,
+    1370,  1373,  1374,  1377,  1381,  1385,  1389,  1393,  1395,  1399,
+    1401,  1403,  1407,  1409,  1411,  1413,  1416,  1421,  1426,  1429,
+    1432,  1434,  1436,  1438,  1440,  1442,  1444,  1446,  1448,  1450,
+    1454,  1456,  1458,  1462,  1466,  1470,  1474,  1477,  1481,  1484,
+    1487,  1490,  1493,  1497,  1499,  1501,  1503,  1507,  1508,  1510,
+    1513,  1518,  1521,  1524,  1530,  1531,  1533,  1536,  1538,  1540,
+    1542,  1546,  1550,  1554,  1558,  1562,  1566,  1568,  1570,  1572,
+    1576,  1582,  1588,  1594,  1600,  1608,  1610,  1619,  1622,  1624,
+    1626,  1630,  1632,  1634,  1636,  1641,  1643,  1647,  1648,  1653,
+    1655,  1659,  1663
+};
+
+/* YYRHS -- A `-1'-separated list of the rules' RHS.  */
+static const yytype_int16 yyrhs[] =
+{
+     191,     0,    -1,    -1,   191,   192,    -1,   187,   198,    -1,
+     199,   193,    -1,   177,    -1,   197,   200,   205,    -1,     1,
+     205,   201,    -1,   194,    -1,   193,    27,   194,    -1,   203,
+     196,    -1,   212,   196,    -1,   206,   207,   196,    -1,   315,
+     200,   205,    -1,   195,   196,    -1,   298,     4,    -1,   198,
+     200,    -1,    53,    -1,    54,    -1,    36,    -1,    37,    -1,
+      -1,    -1,   144,   201,    -1,    -1,   177,    -1,    -1,    -1,
+      72,    -1,    -1,   202,    33,   204,   208,    -1,    34,   204,
+      -1,    35,   204,   208,    30,   209,    -1,    35,   204,   208,
+      -1,    95,   169,    -1,   169,    -1,    -1,    32,    -1,   158,
+      -1,    -1,   179,   180,    -1,   179,   210,   180,    -1,    -1,
+     179,   180,    -1,   179,   210,   180,    -1,   211,    -1,   210,
+       3,   211,    -1,   169,    -1,    23,    -1,   257,   222,    -1,
+     145,   213,   221,   324,    -1,   147,   324,    -1,   117,   216,
+      -1,   224,   179,   249,   180,    -1,   224,   249,    -1,   243,
+      -1,   228,    -1,   253,    -1,   239,    -1,   241,    -1,   240,
+      -1,   308,    -1,   251,    -1,   237,    -1,   234,    -1,    68,
+     179,   280,   180,    -1,   111,   221,   242,    -1,   113,   221,
+     215,    -1,    67,   217,    -1,   225,   226,   187,    -1,    -1,
+     275,    -1,    46,    -1,    40,    -1,    44,    -1,    56,    -1,
+      79,    -1,    45,    -1,    47,    -1,    62,    -1,    57,    -1,
+      58,    -1,    59,    -1,    60,    -1,    61,    -1,    64,    -1,
+      65,    -1,    66,    -1,    69,    -1,    70,    -1,    71,    -1,
+      74,    -1,    75,    -1,    76,    -1,    77,    -1,   169,    -1,
+     214,    -1,   215,     3,   214,    -1,   179,   220,   180,    -1,
+     216,     3,   179,   220,   180,    -1,   218,    -1,   217,     3,
+     218,    -1,   179,   219,   180,    -1,   298,   276,    -1,   219,
+       3,   298,   276,    -1,   280,    -1,   220,     3,   280,    -1,
+      -1,     4,     4,    -1,   255,   256,    -1,   223,   204,   208,
+      -1,    35,    -1,    29,    -1,   160,    -1,   169,    24,   227,
+      24,    -1,   226,   248,   169,    24,   227,    24,    -1,   231,
+      24,   227,    24,    -1,   232,    -1,   232,     3,   227,    -1,
+     229,   230,    -1,   229,   247,   230,    -1,   228,   248,   247,
+     248,   230,    -1,   228,     3,   230,    -1,   119,    -1,    -1,
+     169,   276,    -1,   169,    -1,   169,   179,   280,   180,    -1,
+     231,     3,   231,    -1,   233,   299,    -1,   232,    21,   232,
+      -1,   232,    22,   232,    -1,   232,    23,   232,    -1,   232,
+     188,   232,    -1,    -1,   284,    -1,   235,   236,    -1,   114,
+     298,    -1,   114,   247,   298,    -1,   235,   248,   247,   248,
+     298,    -1,   235,     3,   298,    -1,    -1,   129,   324,    -1,
+     130,   324,    -1,   109,    -1,   238,   248,   169,   276,   264,
+      -1,   239,     3,   169,   276,   264,    -1,    81,   187,    -1,
+      81,   221,   242,    -1,    80,   187,    -1,    80,   221,   242,
+      -1,   169,    -1,   242,     3,   169,    -1,   244,   245,    -1,
+     244,   247,   245,    -1,   243,   248,   247,   248,   245,    -1,
+     127,    -1,   128,   127,    -1,   246,    -1,   245,     3,   246,
+      -1,   169,   276,    -1,    20,    -1,    24,   169,    24,    -1,
+      -1,     3,    -1,   250,    -1,   249,     3,   250,    -1,   169,
+       5,   280,    -1,   134,   252,    -1,   169,    -1,   252,     3,
+     169,    -1,   122,   123,    -1,   122,   137,    -1,    -1,   271,
+     254,   169,   276,   264,   305,    -1,   255,     3,   254,   169,
+     276,   264,   305,    -1,    -1,   262,   266,    -1,   261,   259,
+      -1,   263,    23,   176,    -1,   258,   268,   180,    -1,   146,
+      -1,    -1,    23,   176,    -1,    23,   179,   260,   180,    -1,
+     179,   260,   180,    -1,   169,   269,   270,    -1,   169,     5,
+     269,   270,    -1,   269,   270,    -1,   157,    -1,   263,    -1,
+     149,    -1,   148,    -1,   167,    -1,   151,    -1,   168,    -1,
+     150,    -1,    -1,    23,   265,    -1,   280,    -1,   179,    23,
+     180,    -1,    -1,    23,   267,    -1,   179,   268,   180,    -1,
+     280,    -1,   179,    23,   180,    -1,   169,   269,    -1,   169,
+       5,   269,    -1,   169,    -1,   176,    -1,   280,    -1,    23,
+      -1,    -1,     3,   169,   269,    -1,    -1,     4,     4,    -1,
+       3,   272,     4,     4,    -1,   273,    -1,   272,     3,   273,
+      -1,    29,    -1,   275,    -1,    82,    -1,   109,   276,    -1,
+     111,    -1,   112,   179,   274,   180,    -1,   113,    -1,   116,
+      -1,   117,    -1,   119,    -1,   120,    -1,   140,    -1,   138,
+      -1,   139,    -1,    80,    -1,    81,    -1,    -1,   179,   277,
+     180,    -1,   278,    -1,   277,     3,   278,    -1,   279,    -1,
+       4,    -1,   280,     4,    -1,     4,   280,    -1,   280,     4,
+     279,    -1,    23,    -1,   280,    -1,   283,    -1,   179,   280,
+     180,    -1,   307,    -1,   281,    -1,    46,   282,   180,    -1,
+      39,   282,   180,    -1,    40,   179,   282,   180,    -1,    44,
+     179,   282,   180,    -1,    56,   282,   180,    -1,    79,   179,
+     282,   180,    -1,    45,   179,   280,   180,    -1,    47,   280,
+     180,    -1,   148,   179,   282,   180,    -1,    62,   179,   280,
+     180,    -1,    57,   179,   280,   180,    -1,    58,   179,   280,
+     180,    -1,    59,   179,   280,   180,    -1,    60,   179,   280,
+     180,    -1,    61,   179,   280,   180,    -1,    64,   179,   280,
+     180,    -1,    65,   179,   280,   180,    -1,    66,   179,   280,
+     180,    -1,    69,   179,   280,   180,    -1,    70,   179,   280,
+     180,    -1,    71,   179,   280,   180,    -1,    73,   280,   180,
+      -1,    74,   179,   282,   180,    -1,    75,   179,   282,   180,
+      -1,    76,   179,   282,   180,    -1,    77,   179,   282,   180,
+      -1,   280,    -1,   282,     3,   280,    -1,   288,    -1,   299,
+      -1,   293,    -1,   280,   285,    -1,   284,   280,    -1,    12,
+     280,    -1,    21,    -1,    22,    -1,    21,   280,    -1,    22,
+     280,    -1,    23,   280,    -1,    25,   280,    -1,    14,   280,
+      -1,     8,   280,    -1,    17,   280,    -1,   186,   280,    -1,
+      18,   280,    -1,   185,   280,    -1,    15,   280,    -1,   186,
+       5,   280,    -1,    16,   280,    -1,   185,     5,   280,    -1,
+      13,   280,    -1,     7,   280,    -1,     9,   280,    -1,    10,
+     280,    -1,    11,   280,    -1,    24,   286,    -1,     5,   287,
+      -1,    -1,   280,    -1,     5,   280,    -1,    24,   280,    -1,
+       5,   280,    -1,   280,    -1,   298,    -1,   292,    -1,   290,
+      -1,    -1,   291,    -1,   291,   302,    -1,   292,   179,   294,
+     180,    -1,   292,   179,   294,   180,   302,    -1,   298,   179,
+     294,   180,    -1,   288,   189,   288,    -1,   131,   360,   132,
+      -1,   289,    -1,   289,   295,    -1,   296,    -1,   295,     3,
+     296,    -1,   280,    -1,   297,    -1,   280,     4,   280,    -1,
+     280,     4,   280,     4,   280,    -1,     4,   280,     4,   280,
+      -1,     4,     4,   280,    -1,     4,   280,    -1,   280,     4,
+      -1,     4,    -1,   169,    -1,   142,    -1,   143,    -1,   176,
+      -1,   163,    -1,   164,    -1,   165,    -1,   299,   169,    -1,
+     300,   301,    -1,   158,    -1,   300,   158,    -1,   162,    -1,
+     159,    -1,    -1,   302,    -1,   179,   303,     4,   303,   180,
+      -1,    -1,   280,    -1,   187,    -1,   280,    -1,    -1,   306,
+       5,   280,    -1,    -1,   179,   283,     3,   283,   180,    -1,
+     309,   310,    -1,   309,   310,     3,   311,    -1,   309,   310,
+       3,    31,     4,   187,    -1,   309,   310,     3,    31,     4,
+     313,    -1,   141,    -1,   169,    -1,   312,    -1,   311,     3,
+     312,    -1,   169,   126,   169,    -1,   314,    -1,   313,     3,
+     314,    -1,   169,   126,   169,    -1,   169,    -1,   328,    -1,
+      98,   179,   366,   370,   180,    -1,   105,   179,   369,   370,
+     180,    -1,   106,   179,   371,   180,    -1,   317,    -1,   318,
+     324,    -1,   316,   324,    -1,   319,   324,    -1,    96,   324,
+      -1,   321,    -1,   372,   328,    -1,    41,   179,   280,   180,
+     304,    -1,    42,    -1,    43,    -1,   372,    84,    -1,    85,
+     179,   280,   180,    84,    -1,    86,    -1,    87,   324,    -1,
+      48,   320,   180,    -1,    49,   179,   280,   180,    -1,   115,
+      -1,   110,    -1,    93,    -1,   153,    -1,   156,    -1,   155,
+      -1,   154,    -1,   280,    -1,   320,     3,   280,    -1,   320,
+       4,   280,    -1,   326,   323,   322,    -1,   327,   280,    -1,
+      94,   325,    -1,    -1,   373,     5,   280,     3,   280,    -1,
+     373,     5,   280,     3,   280,     3,   280,    -1,    -1,   176,
+     248,    -1,   187,    -1,   169,    -1,    -1,   169,    -1,    92,
+      -1,    97,    -1,   118,    -1,   330,   332,    -1,   365,    -1,
+     341,    -1,   333,    -1,    98,   179,   366,   370,   180,    -1,
+     105,   179,   369,   370,   180,    -1,    78,   303,    -1,    83,
+     304,    -1,    63,   304,    -1,   340,   304,    -1,   331,    -1,
+      -1,   298,   329,   276,   276,    -1,   330,   189,   298,   329,
+     276,   276,    -1,   176,    -1,   331,     3,   176,    -1,     5,
+     280,    -1,   126,   280,    -1,   336,   334,    -1,    -1,   179,
+     335,   180,    -1,    -1,   338,    -1,   337,   169,    -1,   124,
+      -1,   339,    -1,   338,     3,   339,    -1,   280,    -1,    23,
+     364,    -1,   133,    -1,   135,    -1,   349,   345,    -1,   351,
+     343,    -1,   352,   345,    -1,   352,   345,   360,    -1,   104,
+     346,    -1,    38,    -1,    -1,   356,    -1,   345,   342,    -1,
+     350,   344,    -1,    -1,     3,   356,    -1,   179,   347,   180,
+      -1,   179,   353,   180,    -1,   179,   298,   180,    -1,   179,
+     176,   180,    -1,   176,    -1,   179,   283,   180,    -1,   169,
+      -1,   348,    -1,   347,     3,   348,    -1,   353,    -1,    23,
+      -1,    25,    -1,   298,   280,    -1,   298,   280,   189,   330,
+      -1,   298,   179,   297,   180,    -1,   298,    23,    -1,   298,
+      25,    -1,    99,    -1,   100,    -1,   354,    -1,    23,    -1,
+     103,    -1,   101,    -1,    88,    -1,   102,    -1,   354,    -1,
+     179,   353,   180,    -1,   288,    -1,   299,    -1,   353,   355,
+     353,    -1,   353,    23,   353,    -1,   353,    24,   353,    -1,
+     353,    25,   353,    -1,   355,   353,    -1,   353,    20,   353,
+      -1,    50,   280,    -1,    55,   280,    -1,    52,   280,    -1,
+      51,   280,    -1,   169,     5,   280,    -1,    21,    -1,    22,
+      -1,   358,    -1,   356,     3,   358,    -1,    -1,   288,    -1,
+     357,   359,    -1,   179,   356,   180,   359,    -1,   281,   359,
+      -1,   299,   359,    -1,   179,   356,     3,   363,   180,    -1,
+      -1,   285,    -1,   359,   285,    -1,   283,    -1,   362,    -1,
+     361,    -1,   283,     3,   280,    -1,   283,     3,   362,    -1,
+     362,     3,   280,    -1,   362,     3,   362,    -1,   361,     3,
+     280,    -1,   361,     3,   362,    -1,   283,    -1,   281,    -1,
+     307,    -1,   179,   280,   180,    -1,   179,   283,     3,   363,
+     180,    -1,   179,   362,     3,   363,   180,    -1,   179,   361,
+       3,   363,   180,    -1,   169,     5,   280,     3,   280,    -1,
+     169,     5,   280,     3,   280,     3,   280,    -1,   176,    -1,
+      89,   179,   280,     3,   280,   180,     3,   280,    -1,    89,
+     364,    -1,   367,    -1,   330,    -1,   366,     3,   367,    -1,
+     298,    -1,   292,    -1,   368,    -1,   298,   179,   295,   180,
+      -1,   367,    -1,   369,     3,   367,    -1,    -1,     3,   125,
+       5,   298,    -1,   298,    -1,   371,     3,   298,    -1,    91,
+     280,   180,    -1,   298,    -1
+};
+
+/* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
+static const yytype_uint16 yyrline[] =
+{
+       0,   336,   336,   337,   339,   340,   341,   342,   343,   346,
+     347,   349,   350,   351,   360,   361,   363,   365,   367,   374,
+     379,   380,   382,   384,   385,   387,   388,   394,   397,   398,
+     401,   402,   430,   448,   481,   515,   532,   539,   541,   545,
+     550,   553,   556,   561,   562,   563,   571,   582,   594,   595,
+     597,   605,   613,   619,   620,   635,   648,   649,   655,   656,
+     693,   706,   707,   708,   709,   710,   711,   712,   713,   714,
+     715,   734,   735,   741,   742,   743,   744,   745,   746,   747,
+     748,   749,   750,   751,   752,   753,   754,   755,   756,   757,
+     758,   759,   760,   761,   762,   763,   764,   766,   767,   769,
+     770,   772,   773,   775,   777,   778,   780,   781,   783,   784,
+     786,   869,   906,   912,   917,   922,   936,   950,   965,   972,
+     981,   982,   983,   984,   986,   991,   992,   997,  1001,  1006,
+    1011,  1013,  1015,  1017,  1019,  1023,  1024,  1027,  1029,  1030,
+    1031,  1032,  1034,  1036,  1041,  1046,  1052,  1068,  1085,  1086,
+    1088,  1092,  1097,  1101,  1106,  1112,  1123,  1135,  1140,  1146,
+    1151,  1155,  1165,  1174,  1184,  1185,  1187,  1191,  1196,  1219,
+    1221,  1222,  1224,  1234,  1236,  1238,  1270,  1305,  1307,  1309,
+    1313,  1318,  1323,  1331,  1332,  1334,  1335,  1337,  1338,  1339,
+    1341,  1346,  1348,  1353,  1357,  1360,  1366,  1368,  1374,  1375,
+    1377,  1378,  1380,  1381,  1382,  1384,  1385,  1387,  1388,  1397,
+    1401,  1406,  1408,  1411,  1412,  1414,  1415,  1416,  1418,  1419,
+    1421,  1425,  1426,  1428,  1433,  1435,  1437,  1438,  1439,  1440,
+    1446,  1449,  1450,  1451,  1453,  1455,  1458,  1463,  1467,  1469,
+    1473,  1478,  1482,  1487,  1492,  1500,  1501,  1503,  1504,  1506,
+    1508,  1512,  1514,  1516,  1518,  1520,  1522,  1524,  1526,  1528,
+    1530,  1532,  1534,  1536,  1538,  1540,  1542,  1544,  1546,  1548,
+    1550,  1552,  1554,  1556,  1558,  1560,  1562,  1565,  1566,  1570,
+    1571,  1573,  1575,  1577,  1579,  1582,  1583,  1585,  1587,  1589,
+    1591,  1593,  1595,  1597,  1599,  1601,  1603,  1605,  1607,  1609,
+    1611,  1613,  1615,  1617,  1619,  1621,  1623,  1625,  1628,  1629,
+    1631,  1633,  1636,  1638,  1642,  1647,  1652,  1658,  1670,  1675,
+    1677,  1680,  1684,  1694,  1700,  1703,  1704,  1707,  1708,  1711,
+    1712,  1714,  1716,  1719,  1721,  1722,  1723,  1724,  1726,  1784,
+    1786,  1787,  1788,  1789,  1790,  1791,  1793,  1795,  1797,  1798,
+    1800,  1803,  1804,  1806,  1809,  1810,  1812,  1813,  1815,  1816,
+    1825,  1827,  1830,  1850,  1884,  1904,  1955,  1963,  1966,  1970,
+    1980,  1991,  1995,  2005,  2017,  2026,  2027,  2033,  2039,  2040,
+    2090,  2108,  2128,  2147,  2180,  2181,  2182,  2183,  2184,  2185,
+    2186,  2187,  2188,  2189,  2190,  2191,  2192,  2193,  2230,  2240,
+    2249,  2258,  2267,  2268,  2269,  2271,  2272,  2273,  2275,  2276,
+    2277,  2278,  2279,  2281,  2282,  2284,  2285,  2287,  2289,  2296,
+    2297,  2298,  2299,  2300,  2301,  2307,  2313,  2314,  2315,  2316,
+    2317,  2319,  2320,  2330,  2332,  2333,  2335,  2336,  2338,  2366,
+    2367,  2369,  2370,  2372,  2402,  2404,  2405,  2408,  2422,  2425,
+    2426,  2429,  2430,  2431,  2432,  2433,  2434,  2446,  2447,  2449,
+    2450,  2455,  2456,  2458,  2459,  2461,  2462,  2463,  2464,  2465,
+    2467,  2468,  2470,  2471,  2472,  2473,  2474,  2475,  2476,  2477,
+    2479,  2480,  2482,  2483,  2486,  2487,  2488,  2491,  2494,  2495,
+    2497,  2498,  2499,  2500,  2501,  2502,  2503,  2504,  2505,  2506,
+    2507,  2508,  2509,  2511,  2512,  2514,  2515,  2517,  2518,  2520,
+    2521,  2522,  2523,  2524,  2526,  2527,  2528,  2530,  2531,  2532,
+    2534,  2536,  2538,  2540,  2542,  2544,  2546,  2547,  2549,  2551,
+    2553,  2555,  2557,  2561,  2564,  2571,  2573,  2574,  2576,  2577,
+    2578,  2580,  2582,  2583,  2585,  2592,  2593,  2595,  2596,  2598,
+    2599,  2607,  2609
+};
+#endif
+
+#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
+/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
+   First, the terminals, then, starting at YYNTOKENS, nonterminals.  */
+static const char *const yytname[] =
+{
+  "$end", "error", "$undefined", "','", "':'", "'='", "TOK_BINARY_OP",
+  "TOK_NEQV", "TOK_EQV", "TOK_XOR", "TOK_OR", "TOK_AND", "TOK_NOT",
+  "TOK_NE", "TOK_EQ", "TOK_GE", "TOK_LE", "TOK_GT", "TOK_LT",
+  "TOK_UNARY_OP", "TOK_DSLASH", "'+'", "'-'", "'*'", "TOK_SLASH",
+  "TOK_DASTER", "TOK_SEP", "TOK_SEMICOLON", "TOK_NEXTLINE",
+  "TOK_PARAMETER", "TOK_RESULT", "TOK_ONLY", "TOK_INCLUDE",
+  "TOK_SUBROUTINE", "TOK_PROGRAM", "TOK_FUNCTION", "TOK_OMP", "TOK_DOLLAR",
+  "TOK_FORMAT", "TOK_MAX", "TOK_TANH", "TOK_WHERE", "TOK_ELSEWHERE",
+  "TOK_ENDWHERE", "TOK_MAXVAL", "TOK_TRIM", "TOK_SUM", "TOK_SQRT",
+  "TOK_CASE", "TOK_SELECTCASE", "TOK_FILE", "TOK_END", "TOK_ERR",
+  "TOK_DONOTTREAT", "TOK_ENDDONOTTREAT", "TOK_EXIST", "TOK_MIN",
+  "TOK_FLOAT", "TOK_EXP", "TOK_COS", "TOK_COSH", "TOK_ACOS", "TOK_NINT",
+  "TOK_CYCLE", "TOK_SIN", "TOK_SINH", "TOK_ASIN", "TOK_EQUIVALENCE",
+  "TOK_BACKSPACE", "TOK_LOG", "TOK_TAN", "TOK_ATAN", "TOK_RECURSIVE",
+  "TOK_ABS", "TOK_MOD", "TOK_SIGN", "TOK_MINLOC", "TOK_MAXLOC", "TOK_EXIT",
+  "TOK_MINVAL", "TOK_PUBLIC", "TOK_PRIVATE", "TOK_ALLOCATABLE",
+  "TOK_RETURN", "TOK_THEN", "TOK_ELSEIF", "TOK_ELSE", "TOK_ENDIF",
+  "TOK_PRINT", "TOK_PLAINGOTO", "TOK_CONSTRUCTID", "TOK_LOGICALIF",
+  "TOK_PLAINDO", "TOK_CONTAINS", "TOK_ENDDO", "TOK_MODULE",
+  "TOK_ENDMODULE", "TOK_DOWHILE", "TOK_ALLOCATE", "TOK_OPEN", "TOK_CLOSE",
+  "TOK_INQUIRE", "TOK_WRITE", "TOK_READ", "TOK_REWIND", "TOK_DEALLOCATE",
+  "TOK_NULLIFY", "TOK_FIN", "TOK_DEBUT", "TOK_DIMENSION", "TOK_ENDSELECT",
+  "TOK_EXTERNAL", "TOK_INTENT", "TOK_INTRINSIC", "TOK_NAMELIST",
+  "TOK_CASEDEFAULT", "TOK_OPTIONAL", "TOK_POINTER", "TOK_CONTINUE",
+  "TOK_SAVE", "TOK_TARGET", "TOK_QUOTE", "TOK_IMPLICIT", "TOK_NONE",
+  "TOK_CALL", "TOK_STAT", "TOK_POINT_TO", "TOK_COMMON", "TOK_GLOBAL",
+  "TOK_INTERFACE", "TOK_ENDINTERFACE", "TOK_LEFTAB", "TOK_RIGHTAB",
+  "TOK_PAUSE", "TOK_PROCEDURE", "TOK_STOP", "TOK_NAMEEQ", "TOK_REAL8",
+  "TOK_OUT", "TOK_INOUT", "TOK_IN", "TOK_USE", "TOK_TRUE", "TOK_FALSE",
+  "TOK_LABEL", "TOK_TYPE", "TOK_TYPEPAR", "TOK_ENDTYPE", "TOK_REAL",
+  "TOK_INTEGER", "TOK_LOGICAL", "TOK_DOUBLEPRECISION", "TOK_DOUBLEREAL",
+  "TOK_ENDSUBROUTINE", "TOK_ENDFUNCTION", "TOK_ENDPROGRAM", "TOK_ENDUNIT",
+  "TOK_CHARACTER", "TOK_CHAR_CONSTANT", "TOK_CHAR_CUT", "TOK_DATA",
+  "TOK_CHAR_INT", "TOK_CHAR_MESSAGE", "TOK_CSTREAL", "TOK_CSTREALDP",
+  "TOK_CSTREALQP", "TOK_SFREAL", "TOK_COMPLEX", "TOK_DOUBLECOMPLEX",
+  "TOK_NAME", "TOK_NAME_CHAR", "TOK_PROBTYPE", "TOK_INTERPTYPE",
+  "TOK_VARTYPE", "TOK_BC", "TOK_OP", "TOK_CSTINT", "TOK_COMMENT",
+  "TOK_FILENAME", "'('", "')'", "'['", "']'", "'!'", "'_'", "'<'", "'>'",
+  "'\\n'", "'/'", "'%'", "$accept", "input", "line", "suite_line_list",
+  "suite_line", "instr", "fin_line", "keyword", "position", "thislabel",
+  "cmnt", "nulcurbuf", "opt_recursive", "entry", "name_routine",
+  "writedeclar", "before_include", "filename", "arglist", "arglist1",
+  "args", "arg", "spec", "opt_spec", "name_intrinsic",
+  "use_intrinsic_list", "list_couple", "list_expr_equi", "expr_equi",
+  "list_expr_equi1", "list_expr", "opt_sep", "after_type",
+  "before_function", "before_parameter", "before_data", "data",
+  "datavallist", "save", "before_save", "varsave", "datanamelist",
+  "expr_data", "opt_signe", "namelist", "namelist_action",
+  "after_namelist", "interface", "before_dimension", "dimension",
+  "private", "public", "use_name_list", "common", "before_common",
+  "var_common_list", "var_common", "comblock", "opt_comma", "paramlist",
+  "paramitem", "module_proc_stmt", "proc_name_list", "implicit",
+  "opt_retour", "dcl", "nodimsgiven", "type", "before_typepar",
+  "c_selector", "c_attribute", "before_character", "typespec", "typename",
+  "lengspec", "proper_lengspec", "selector", "proper_selector",
+  "attribute", "clause", "opt_clause", "options", "attr_spec_list",
+  "attr_spec", "intent_spec", "access_spec", "dims", "dimlist", "dim",
+  "ubound", "expr", "predefinedfunction", "minmaxlist", "uexpr", "signe",
+  "operation", "after_slash", "after_equal", "lhs", "beforefunctionuse",
+  "array_ele_substring_func_ref", "begin_array", "structure_component",
+  "vec", "funarglist", "funargs", "funarg", "triplet", "ident",
+  "simple_const", "string_constant", "opt_substring", "substring",
+  "optexpr", "opt_expr", "initial_value", "before_initial",
+  "complex_const", "use_stat", "word_use", "module_name", "rename_list",
+  "rename_name", "only_list", "only_name", "exec", "word_endsubroutine",
+  "word_endunit", "word_endprogram", "word_endfunction", "caselist",
+  "boucledo", "do_arg", "opt_int", "opt_name", "optname", "worddo",
+  "wordwhile", "iffable", "before_dims", "ident_dims", "int_list",
+  "after_ident_dims", "call", "opt_call", "opt_callarglist", "keywordcall",
+  "before_call", "callarglist", "callarg", "stop", "io", "option_inlist",
+  "option_read", "opt_inlist", "ioctl", "after_rewind", "ctllist",
+  "ioclause", "iofctl", "infmt", "read", "write", "fexpr", "unpar_fexpr",
+  "addop", "inlist", "opt_lhs", "inelt", "opt_operation", "outlist",
+  "out2", "other", "dospec", "label", "goto", "allocation_list",
+  "allocate_object", "array_element", "allocate_object_list",
+  "opt_stat_spec", "pointer_name_list", "logif", "do_var", 0
+};
+#endif
+
+# ifdef YYPRINT
+/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
+   token YYLEX-NUM.  */
+static const yytype_uint16 yytoknum[] =
+{
+       0,   256,   257,    44,    58,    61,   258,   259,   260,   261,
+     262,   263,   264,   265,   266,   267,   268,   269,   270,   271,
+     272,    43,    45,    42,   273,   274,   275,   276,   277,   278,
+     279,   280,   281,   282,   283,   284,   285,   286,   287,   288,
+     289,   290,   291,   292,   293,   294,   295,   296,   297,   298,
+     299,   300,   301,   302,   303,   304,   305,   306,   307,   308,
+     309,   310,   311,   312,   313,   314,   315,   316,   317,   318,
+     319,   320,   321,   322,   323,   324,   325,   326,   327,   328,
+     329,   330,   331,   332,   333,   334,   335,   336,   337,   338,
+     339,   340,   341,   342,   343,   344,   345,   346,   347,   348,
+     349,   350,   351,   352,   353,   354,   355,   356,   357,   358,
+     359,   360,   361,   362,   363,   364,   365,   366,   367,   368,
+     369,   370,   371,   372,   373,   374,   375,   376,   377,   378,
+     379,   380,   381,   382,   383,   384,   385,   386,   387,   388,
+     389,   390,   391,   392,   393,   394,   395,   396,   397,   398,
+     399,   400,   401,   402,   403,   404,   405,   406,   407,   408,
+     409,   410,   411,   412,   413,   414,   415,   416,   417,   418,
+     419,   420,   421,   422,   423,   424,   425,   426,   427,    40,
+      41,    91,    93,    33,    95,    60,    62,    10,    47,    37
+};
+# endif
+
+/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
+static const yytype_uint16 yyr1[] =
+{
+       0,   190,   191,   191,   192,   192,   192,   192,   192,   193,
+     193,   194,   194,   194,   194,   194,   195,   196,   197,   197,
+     197,   197,   198,   199,   199,   200,   200,   201,   202,   202,
+     203,   203,   203,   203,   203,   203,   204,   205,   206,   207,
+     208,   208,   208,   209,   209,   209,   210,   210,   211,   211,
+     212,   212,   212,   212,   212,   212,   212,   212,   212,   212,
+     212,   212,   212,   212,   212,   212,   212,   212,   212,   212,
+     212,   213,   213,   214,   214,   214,   214,   214,   214,   214,
+     214,   214,   214,   214,   214,   214,   214,   214,   214,   214,
+     214,   214,   214,   214,   214,   214,   214,   215,   215,   216,
+     216,   217,   217,   218,   219,   219,   220,   220,   221,   221,
+     222,   222,   223,   224,   225,   226,   226,   226,   227,   227,
+     228,   228,   228,   228,   229,   230,   230,   231,   231,   231,
+     232,   232,   232,   232,   232,   233,   233,   234,   235,   235,
+     235,   235,   236,   237,   237,   238,   239,   239,   240,   240,
+     241,   241,   242,   242,   243,   243,   243,   244,   244,   245,
+     245,   246,   247,   247,   248,   248,   249,   249,   250,   251,
+     252,   252,   253,   253,   254,   255,   255,   256,   257,   257,
+     257,   257,   258,   259,   259,   259,   259,   260,   260,   260,
+     261,   262,   263,   263,   263,   263,   263,   263,   264,   264,
+     265,   265,   266,   266,   266,   267,   267,   268,   268,   268,
+     268,   269,   269,   270,   270,   271,   271,   271,   272,   272,
+     273,   273,   273,   273,   273,   273,   273,   273,   273,   273,
+     273,   274,   274,   274,   275,   275,   276,   276,   277,   277,
+     278,   278,   278,   278,   278,   279,   279,   280,   280,   280,
+     280,   281,   281,   281,   281,   281,   281,   281,   281,   281,
+     281,   281,   281,   281,   281,   281,   281,   281,   281,   281,
+     281,   281,   281,   281,   281,   281,   281,   282,   282,   283,
+     283,   283,   283,   283,   283,   284,   284,   285,   285,   285,
+     285,   285,   285,   285,   285,   285,   285,   285,   285,   285,
+     285,   285,   285,   285,   285,   285,   285,   285,   286,   286,
+     286,   286,   287,   287,   288,   288,   288,   289,   290,   290,
+     290,   290,   291,   292,   293,   294,   294,   295,   295,   296,
+     296,   297,   297,   297,   297,   297,   297,   297,   298,   299,
+     299,   299,   299,   299,   299,   299,   299,   300,   300,   300,
+     300,   301,   301,   302,   303,   303,   304,   304,   305,   305,
+     306,   307,   308,   308,   308,   308,   309,   310,   311,   311,
+     312,   313,   313,   314,   314,   315,   315,   315,   315,   315,
+     315,   315,   315,   315,   315,   315,   315,   315,   315,   315,
+     315,   315,   315,   315,   315,   315,   315,   315,   316,   317,
+     318,   319,   320,   320,   320,   321,   321,   321,   322,   322,
+     322,   323,   323,   324,   324,   325,   325,   326,   327,   328,
+     328,   328,   328,   328,   328,   328,   328,   328,   328,   328,
+     328,   329,   330,   330,   331,   331,   332,   332,   333,   334,
+     334,   335,   335,   336,   337,   338,   338,   339,   339,   340,
+     340,   341,   341,   341,   341,   341,   341,   342,   342,   343,
+     343,   344,   344,   345,   345,   346,   346,   346,   346,   346,
+     347,   347,   348,   348,   348,   348,   348,   348,   348,   348,
+     349,   349,   350,   350,   351,   351,   351,   352,   353,   353,
+     354,   354,   354,   354,   354,   354,   354,   354,   354,   354,
+     354,   354,   354,   355,   355,   356,   356,   357,   357,   358,
+     358,   358,   358,   358,   359,   359,   359,   360,   360,   360,
+     361,   361,   361,   361,   361,   361,   361,   361,   362,   362,
+     362,   362,   362,   363,   363,   364,   365,   365,   366,   366,
+     366,   367,   367,   367,   368,   369,   369,   370,   370,   371,
+     371,   372,   373
+};
+
+/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
+static const yytype_uint8 yyr2[] =
+{
+       0,     2,     0,     2,     2,     2,     1,     3,     3,     1,
+       3,     2,     2,     3,     3,     2,     2,     2,     1,     1,
+       1,     1,     0,     0,     2,     0,     1,     0,     0,     1,
+       0,     4,     2,     5,     3,     2,     1,     0,     1,     1,
+       0,     2,     3,     0,     2,     3,     1,     3,     1,     1,
+       2,     4,     2,     2,     4,     2,     1,     1,     1,     1,
+       1,     1,     1,     1,     1,     1,     4,     3,     3,     2,
+       3,     0,     1,     1,     1,     1,     1,     1,     1,     1,
+       1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
+       1,     1,     1,     1,     1,     1,     1,     1,     3,     3,
+       5,     1,     3,     3,     2,     4,     1,     3,     0,     2,
+       2,     3,     1,     1,     1,     4,     6,     4,     1,     3,
+       2,     3,     5,     3,     1,     0,     2,     1,     4,     3,
+       2,     3,     3,     3,     3,     0,     1,     2,     2,     3,
+       5,     3,     0,     2,     2,     1,     5,     5,     2,     3,
+       2,     3,     1,     3,     2,     3,     5,     1,     2,     1,
+       3,     2,     1,     3,     0,     1,     1,     3,     3,     2,
+       1,     3,     2,     2,     0,     6,     7,     0,     2,     2,
+       3,     3,     1,     0,     2,     4,     3,     3,     4,     2,
+       1,     1,     1,     1,     1,     1,     1,     1,     0,     2,
+       1,     3,     0,     2,     3,     1,     3,     2,     3,     1,
+       1,     1,     1,     0,     3,     0,     2,     4,     1,     3,
+       1,     1,     1,     2,     1,     4,     1,     1,     1,     1,
+       1,     1,     1,     1,     1,     1,     0,     3,     1,     3,
+       1,     1,     2,     2,     3,     1,     1,     1,     3,     1,
+       1,     3,     3,     4,     4,     3,     4,     4,     3,     4,
+       4,     4,     4,     4,     4,     4,     4,     4,     4,     4,
+       4,     4,     3,     4,     4,     4,     4,     1,     3,     1,
+       1,     1,     2,     2,     2,     1,     1,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     3,     2,
+       3,     2,     2,     2,     2,     2,     2,     2,     0,     1,
+       2,     2,     2,     1,     1,     1,     1,     0,     1,     2,
+       4,     5,     4,     3,     3,     1,     2,     1,     3,     1,
+       1,     3,     5,     4,     3,     2,     2,     1,     1,     1,
+       1,     1,     1,     1,     1,     2,     2,     1,     2,     1,
+       1,     0,     1,     5,     0,     1,     1,     1,     0,     3,
+       0,     5,     2,     4,     6,     6,     1,     1,     1,     3,
+       3,     1,     3,     3,     1,     1,     5,     5,     4,     1,
+       2,     2,     2,     2,     1,     2,     5,     1,     1,     2,
+       5,     1,     2,     3,     4,     1,     1,     1,     1,     1,
+       1,     1,     1,     3,     3,     3,     2,     2,     0,     5,
+       7,     0,     2,     1,     1,     0,     1,     1,     1,     1,
+       2,     1,     1,     1,     5,     5,     2,     2,     2,     2,
+       1,     0,     4,     6,     1,     3,     2,     2,     2,     0,
+       3,     0,     1,     2,     1,     1,     3,     1,     2,     1,
+       1,     2,     2,     2,     3,     2,     1,     0,     1,     2,
+       2,     0,     2,     3,     3,     3,     3,     1,     3,     1,
+       1,     3,     1,     1,     1,     2,     4,     4,     2,     2,
+       1,     1,     1,     1,     1,     1,     1,     1,     1,     3,
+       1,     1,     3,     3,     3,     3,     2,     3,     2,     2,
+       2,     2,     3,     1,     1,     1,     3,     0,     1,     2,
+       4,     2,     2,     5,     0,     1,     2,     1,     1,     1,
+       3,     3,     3,     3,     3,     3,     1,     1,     1,     3,
+       5,     5,     5,     5,     7,     1,     8,     2,     1,     1,
+       3,     1,     1,     1,     4,     1,     3,     0,     4,     1,
+       3,     3,     1
+};
+
+/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
+   STATE-NUM when YYTABLE doesn't specify something else to do.  Zero
+   means the default is an error.  */
+static const yytype_uint16 yydefact[] =
+{
+       2,     0,     1,    37,    20,    21,    18,    19,    27,     6,
+      22,     3,    25,    30,    27,    24,     4,    26,    37,   113,
+      38,     0,     0,   456,     0,   387,   388,     0,     0,     0,
+       0,     0,    29,   354,   108,   108,     0,     0,   391,     0,
+     486,     0,     0,   417,   397,   415,     0,     0,   418,     0,
+     480,   481,   485,   487,   484,     0,     0,     0,   145,   396,
+     108,   108,     0,   395,     0,   419,   124,     0,   444,   157,
+       0,     0,     0,   449,     0,   450,   366,    71,   182,     0,
+     193,   192,   197,   195,   398,   401,   400,   399,   190,   114,
+     194,   196,   338,   434,     5,     9,    22,     0,    22,     0,
+      22,     0,     0,    57,   125,    65,   142,    64,   164,    59,
+      61,    60,    56,     0,    63,    58,   215,     0,   183,   202,
+     191,   431,    62,     0,    25,     0,   379,     0,     0,   384,
+     411,     0,   375,     0,   430,   423,   439,     0,     0,   422,
+       0,     0,     0,   421,     0,     8,     7,    36,    32,    40,
+       0,     0,   285,   286,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+     339,   340,     0,   347,   350,   349,   342,   343,   344,   341,
+       0,   402,   250,   247,     0,   279,   316,   318,   315,   281,
+     314,   280,   351,   249,     0,     0,   356,   357,   428,     0,
+      69,   101,     0,   355,   426,     0,   150,     0,   148,     0,
+     427,     0,   414,   413,   392,   535,     0,   537,     0,   416,
+     407,    35,   383,     0,   469,   467,     0,   455,     0,     0,
+       0,     0,   162,     0,     0,   138,     0,    53,   172,   173,
+     158,   143,   144,   170,   169,   234,   235,   108,    72,    52,
+      30,    15,    25,     0,    11,    39,    22,    12,     0,     0,
+      55,   166,   127,   164,     0,   125,     0,   236,   120,   125,
+     165,   137,     0,   165,     0,     0,     0,   236,   154,   159,
+       0,     0,     0,   112,    50,     0,   177,   174,   209,   210,
+       0,     0,     0,   179,     0,     0,   178,     0,    16,   236,
+     367,   362,    37,   381,   380,   382,   164,   408,   406,     0,
+       0,     0,   420,     0,   441,   438,   443,   429,     0,   451,
+     503,   504,   483,     0,     0,     0,     0,   338,     0,   490,
+     491,   452,   457,   461,     0,   482,     0,   453,   389,     0,
+       0,   431,   385,     0,    34,     0,   284,   277,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,   527,   517,   249,     0,   519,
+     518,     0,     0,   247,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,   308,
+       0,     0,     0,   282,   283,     0,   354,   319,   317,   317,
+     345,   348,   346,   352,     0,     0,   393,     0,     0,   236,
+       0,     0,   109,   152,   151,   149,     0,     0,   551,     0,
+     542,   431,   539,   547,   538,   543,   341,   247,   314,   541,
+     545,   547,   549,     0,    67,    74,    75,    78,    73,    79,
+      76,    81,    82,    83,    84,    85,    80,    86,    87,    88,
+      89,    90,    91,    92,    93,    94,    95,    77,    96,    97,
+      68,     0,   139,     0,   106,     0,     0,     0,    10,    17,
+      40,    13,     0,     0,     0,   135,     0,    70,     0,     0,
+     135,   123,   164,     0,   126,   121,   141,   164,   236,   236,
+     164,   161,     0,   155,   220,   222,   236,   224,     0,   226,
+     227,   228,   229,   230,     0,   218,   221,   216,    40,   174,
+     110,     0,     0,   212,   207,   211,   181,   184,     0,   338,
+       0,   213,     0,   203,   205,     0,   180,   236,     0,    14,
+     412,   552,   405,     0,   436,   437,   431,   435,     0,   447,
+       0,   442,   445,   473,   474,     0,   314,     0,   470,   472,
+     488,   498,   501,   500,   499,     0,   472,   507,   514,   508,
+     514,   459,   458,   514,   505,   507,   460,     0,     0,     0,
+       0,     0,   496,   454,     0,     0,    49,    48,    41,     0,
+      46,    43,     0,     0,   252,     0,     0,     0,   251,   258,
+     255,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,   272,     0,     0,     0,     0,     0,     0,
+     247,     0,     0,     0,   324,     0,     0,     0,   248,     0,
+       0,   313,   307,   302,   292,   303,   304,   305,   301,   291,
+     297,   299,   293,   295,   287,   288,   289,     0,     0,   309,
+     306,   290,     0,   296,     0,   294,   323,     0,   325,     0,
+       0,   403,   404,   394,     0,   103,   104,   102,    66,     0,
+       0,     0,   317,     0,     0,   466,   468,   465,     0,     0,
+       0,   378,     0,   163,     0,    99,     0,   171,    51,    31,
+     168,    54,   167,     0,   118,     0,   136,     0,     0,   127,
+     129,     0,   125,   241,   245,     0,   238,   240,   246,     0,
+     198,   198,     0,   160,   223,     0,     0,     0,   111,     0,
+     236,   208,     0,     0,   213,   186,     0,   189,     0,   204,
+     432,     0,     0,   363,   368,     0,   236,   448,   440,     0,
+       0,   478,   479,   317,   475,     0,   463,   464,   502,   464,
+       0,   515,   511,   512,   507,   509,   462,   497,   493,   494,
+     495,   492,   547,   547,     0,    42,     0,    33,   386,   278,
+     253,   254,   257,   261,   262,   263,   264,   265,   260,   266,
+     267,   268,   269,   270,   271,   273,   274,   275,   276,   256,
+     248,     0,     0,     0,   520,   521,   524,   525,   522,   523,
+     259,   247,   312,   310,   311,   300,   298,   354,   337,   329,
+     326,   327,   330,   320,   322,   236,   153,   390,     0,     0,
+       0,   540,   376,   546,   377,   550,    98,   107,     0,   115,
+     135,   135,   135,   135,   135,   130,   128,   135,   117,   122,
+     243,     0,   237,   242,   140,     0,   146,   147,   156,   232,
+     233,   231,     0,   219,   217,   236,   198,   185,   213,   187,
+       0,   206,     0,     0,     0,     0,   236,   446,   489,     0,
+       0,     0,   471,   472,   507,   514,   516,   506,     0,     0,
+      47,    44,     0,   338,     0,     0,     0,   361,     0,     0,
+     335,   336,     0,   321,   105,     0,   544,     0,   100,   119,
+     131,   132,   133,   134,     0,   239,   244,   246,     0,   199,
+     200,   225,   198,   358,   188,   214,   374,   364,   365,   371,
+     370,   369,     0,   433,   477,   476,     0,   510,   424,   425,
+      45,     0,   530,   532,   531,   353,   334,     0,   331,   328,
+       0,   548,   116,     0,   358,   175,     0,     0,     0,   409,
+     513,     0,   333,     0,   536,   201,   176,     0,   373,   372,
+       0,     0,   332,   359,   410,   533,     0,   534
+};
+
+/* YYDEFGOTO[NTERM-NUM].  */
+static const yytype_int16 yydefgoto[] =
+{
+      -1,     1,    11,    94,    95,    96,   261,    12,   262,    13,
+      18,    15,    97,    98,   148,    14,    99,   266,   354,   777,
+     599,   600,   100,   257,   479,   480,   247,   210,   211,   428,
+     483,   217,   294,   295,   101,   102,   273,   703,   103,   104,
+     278,   274,   704,   705,   105,   106,   281,   107,   108,   109,
+     110,   111,   434,   112,   113,   288,   289,   244,   276,   270,
+     271,   114,   254,   115,   531,   296,   530,   116,   117,   303,
+     540,   118,   119,   120,   856,   919,   306,   543,   300,   541,
+     737,   297,   524,   525,   862,   526,   504,   715,   716,   717,
+     357,   192,   358,   193,   194,   413,   660,   642,   195,   668,
+     196,   197,   198,   199,   670,   820,   821,   822,   200,   201,
+     202,   422,   417,   214,   208,   955,   956,   203,   122,   123,
+     311,   743,   744,   928,   929,   124,   125,   126,   127,   128,
+     204,   129,   552,   317,   224,   230,   130,   131,   132,   309,
+     133,   134,   322,   135,   325,   560,   136,   137,   561,   562,
+     138,   139,   581,   341,   586,   329,   237,   567,   568,   140,
+     343,   141,   142,   344,   570,   346,   582,   583,   584,   762,
+     388,   389,   390,   894,   227,   143,   443,   444,   445,   451,
+     684,   453,   144,   553
+};
+
+/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
+   STATE-NUM.  */
+#define YYPACT_NINF -702
+static const yytype_int16 yypact[] =
+{
+    -702,   921,  -702,  -702,  -702,  -702,  -702,  -702,  -702,  -702,
+    -702,  -702,   -59,  5446,  -702,  -702,  -702,  -702,  -702,  -702,
+    -702,   -24,   -24,  -702,    -3,  -702,  -702,  4703,     3,  2638,
+      49,    56,  -702,  4703,    37,    38,  2638,   146,  -702,   -93,
+    -702,  -110,  4703,  -702,  -702,    43,    48,   -93,  -702,   148,
+    -702,  -702,  -702,  -702,  -702,   185,   156,   158,  -702,  -702,
+     164,   164,    79,  -702,   171,  -702,  -702,   -51,  -702,  -702,
+      -7,   -93,   -93,  -702,    75,  -702,  -702,    53,  -702,   -93,
+    -702,  -702,  -702,  -702,  -702,  -702,  -702,  -702,  -702,  -702,
+    -702,  -702,  -702,  -702,   179,  -702,  -702,   224,  -702,   130,
+    -702,   -81,   186,   136,   149,  -702,   138,  -702,   360,   363,
+    -702,  -702,   172,   150,  -702,  -702,   145,   -19,    16,    29,
+     370,   395,  -702,   231,   -59,   -93,  -702,   -93,   -93,  -702,
+     230,  4703,  -702,    27,   405,  -702,   233,   241,  2638,  -702,
+     236,  2722,   236,  -702,  5702,  -702,  -702,  -702,  -702,   253,
+    4703,  4703,  -702,  -702,  4703,   256,   257,   266,  4703,  4703,
+    4703,   267,   271,   277,   289,   292,   298,   304,   312,   313,
+     314,   315,   317,  4703,   318,   328,   329,   330,   331,  4831,
+    -702,  -702,   334,  -702,  -702,  -702,  -702,  -702,  -702,  -702,
+    4703,  2443,  -702,  -702,  4703,   244,  -702,   335,   343,  -702,
+     344,   359,   228,  -702,    58,  4703,  -702,  2443,  -702,   362,
+     529,  -702,  4703,  2443,  -702,   536,  -702,   372,  -702,   372,
+    -702,  4703,  -702,  -702,  -702,  -702,  4703,  -702,  1425,  -702,
+    -702,  -702,  -702,   362,  -702,  -702,  4959,  -702,   362,   362,
+     372,  3079,  -702,   373,   362,  -702,  4703,   541,  -702,  -702,
+    -702,  -702,  -702,  -702,   544,  -702,  -702,   164,  -702,  -702,
+    5446,  -702,   -59,   -24,  -702,  -702,  -702,  -702,   548,   390,
+     563,  -702,    60,    28,   333,   408,   159,   399,  -702,   408,
+     362,  -702,   159,  -702,   410,   412,   159,   399,   571,  -702,
+     413,   445,   581,  -702,  -702,   -24,   583,  -702,  3039,  -702,
+     404,   147,  3935,  -702,  5087,   -19,  -702,   411,  -702,   399,
+    -702,   586,  -702,  -702,  -702,  -702,   360,   362,  2443,  4703,
+    4703,   362,  -702,   414,  4063,  -702,  -702,  -702,  2588,  -702,
+    -702,  -702,  -702,  4703,  4703,  4703,  4703,   587,  2588,   244,
+     359,  -702,  1096,   588,   403,   580,  2852,  4831,  -702,   416,
+     417,  -702,  -702,    17,   567,  1446,  2556,  2443,    23,  4703,
+    4703,  4703,    42,  1469,    52,  4703,  4703,  4703,  4703,  4703,
+    4703,  4703,  4703,  4703,  4703,  4703,  4703,  1491,  4703,  4703,
+    4703,  4703,  4703,  4831,  2443,  1512,   722,  -702,   461,   595,
+     604,  4703,  1548,   607,  3423,  4703,  4703,  4703,  4703,  4703,
+    4703,  4703,  4703,  4703,  4703,  4703,  4703,  4703,  4703,  3167,
+    4703,  3551,  3679,  -702,    19,   362,  4703,  -702,  -702,  -702,
+    -702,  -702,  -702,  -702,  4703,  4703,  -702,  1570,    65,   399,
+      49,  1694,  -702,  -702,   608,   608,  1752,   791,  -702,   244,
+     -54,    22,   425,   612,  -702,  -702,   436,   437,     8,    22,
+    -702,   616,  -702,    70,   608,  -702,  -702,  -702,  -702,  -702,
+    -702,  -702,  -702,  -702,  -702,  -702,  -702,  -702,  -702,  -702,
+    -702,  -702,  -702,  -702,  -702,  -702,  -702,  -702,  -702,  -702,
+     617,   597,  -702,    74,  2443,   443,   454,   -93,  -702,  -702,
+     253,  -702,  4703,    76,   390,   260,  4703,  -702,   455,   457,
+     260,  -702,   360,  2489,  -702,  -702,  -702,   360,   399,   399,
+     360,  -702,   413,   571,  -702,  -702,   399,  -702,   449,  -702,
+    -702,  -702,  -702,  -702,   356,  -702,  -702,  -702,   253,  -702,
+    -702,   460,  4191,  -702,  -702,  2443,  -702,  -702,  3935,  3295,
+     452,   630,  4319,  -702,  2443,   462,  -702,   399,    33,  -702,
+    -702,  -702,  -702,   629,  2443,  2443,  -702,  -702,   467,  2443,
+     464,   642,  -702,  -702,  -702,  2852,  3807,    78,  -702,   106,
+    -702,  2443,  2443,  2443,  2443,  4703,   308,  5572,  2443,   244,
+    1773,  -702,   643,  2443,  -702,  5572,  -702,  2852,  2852,  2852,
+    2852,  2852,   623,  -702,   362,   362,  -702,  -702,  -702,    86,
+    -702,   471,  2638,  4703,  -702,    87,    89,  1794,  -702,  -702,
+    -702,  1815,  1836,  1876,  1897,  1939,  2018,  2079,  2121,  2142,
+    2163,  2200,  2221,  -702,    90,    92,    93,    94,    98,  2261,
+     648,   649,   650,  4831,  -702,  4831,  4831,   103,  -702,  4703,
+    4703,  2443,  -702,  2460,  2460,  2481,  2481,  2556,  2577,  2577,
+    2577,  2577,  2577,  2577,   119,   119,    19,  4703,  4703,  2443,
+    -702,    19,  4703,  2577,  4703,  2577,   244,   652,  2783,   477,
+     478,  2443,  2443,  -702,   362,  -702,  -702,  -702,  -702,   490,
+     576,  4703,  2783,    -8,   481,  -702,  -702,  -702,    -8,   482,
+     362,  -702,  3079,  -702,  4703,  -702,  4703,  -702,  -702,  -702,
+    2443,  -702,  -702,   639,    35,   387,  -702,  2345,   640,   486,
+    -702,   646,   408,  4703,  -702,   104,  -702,  -702,  1325,   362,
+     651,   651,   413,  -702,  -702,   264,   445,   662,  -702,   502,
+     399,  -702,   492,  4191,   630,  -702,   504,  -702,   495,  -702,
+    -702,   672,   552,   677,  -702,  4703,   399,  -702,  -702,  4063,
+     513,  -702,  -702,  2783,   674,  2588,  -702,  -702,  2443,   680,
+     105,  -702,  2443,  2443,  5572,  2443,   643,   547,   623,   623,
+     623,   396,   612,   616,    20,  -702,   141,  -702,  -702,  2443,
+    -702,  -702,  -702,  -702,  -702,  -702,  -702,  -702,  -702,  -702,
+    -702,  -702,  -702,  -702,  -702,  -702,  -702,  -702,  -702,  -702,
+    -702,  5215,  5215,  5215,  2443,  -702,  2443,  -702,  2443,  -702,
+    -702,   514,  2577,  2577,    19,  2577,  2577,  4703,  2911,  1360,
+     698,  -702,  -702,   335,  -702,   399,  -702,  -702,  2403,   109,
+     697,  -702,  -702,  -702,  -702,  -702,  -702,  2443,   111,  -702,
+     260,   260,   260,   260,   260,   359,  -702,   260,  -702,  -702,
+    2443,  2489,  -702,  4447,  -702,  5343,  -702,  -702,   571,  -702,
+    -702,  -702,   523,  -702,  -702,   399,   651,  -702,   630,  -702,
+    4191,  -702,   -47,   535,   538,  1171,   399,  -702,  -702,   744,
+     525,   362,  -702,   403,  5613,  2443,  -702,  -702,   530,   531,
+    -702,  -702,   116,   704,   532,   533,   534,  -702,   537,  4703,
+    1382,  4703,  2783,  -702,  -702,   712,  -702,   362,  -702,  -702,
+      10,    10,   528,   115,   695,  -702,  -702,  2443,  4575,  -702,
+    2443,  -702,   651,   715,  -702,  -702,   598,  -702,   718,  -702,
+    -702,  -702,  4703,  -702,  -702,   425,   543,  2443,  -702,  -702,
+    -702,  4703,  -702,  -702,  -702,  -702,  2443,  4703,  1404,  -702,
+    4703,  -702,  -702,   554,   715,  -702,   723,   572,   573,  1194,
+    -702,  1280,  2443,  4703,  2443,  -702,  -702,  4703,  -702,  -702,
+    4703,  4703,  2443,  2443,  2443,  1303,  4703,  2443
+};
+
+/* YYPGOTO[NTERM-NUM].  */
+static const yytype_int16 yypgoto[] =
+{
+    -702,  -702,  -702,  -702,   503,  -702,     2,  -702,   740,  -702,
+     -49,   756,  -702,  -702,    -1,     5,  -702,  -702,  -407,  -702,
+      -5,     4,  -702,  -702,    85,  -702,  -702,  -702,   349,  -702,
+      84,   -11,  -702,  -702,  -702,  -702,  -702,  -482,  -702,  -702,
+    -265,   282,  -402,  -702,  -702,  -702,  -702,  -702,  -702,  -702,
+    -702,  -702,   173,  -702,  -702,  -278,   270,   -39,   -21,   515,
+     291,  -702,  -702,  -702,   258,  -702,  -702,  -702,  -702,  -702,
+     245,  -702,  -702,  -702,  -701,  -702,  -702,  -702,   483,  -290,
+    -687,  -702,  -702,    63,  -702,   709,  -282,  -702,   -58,   -61,
+     -27,  -176,   -80,  -154,  -323,  -532,  -702,  -702,  -128,  -702,
+    -702,  -702,  -204,  -702,   377,   121,   -92,    64,   178,   -87,
+    -702,  -702,  -198,  -399,   -29,  -143,  -702,  -163,  -702,  -702,
+    -702,  -702,   -56,  -702,  -139,  -702,  -702,  -702,  -702,  -702,
+    -702,  -702,  -702,  -702,   -12,  -702,  -702,  -702,   676,   265,
+    -232,  -702,  -702,  -702,  -702,  -702,  -702,  -702,  -702,    73,
+    -702,  -702,  -702,  -702,  -702,   254,  -702,  -702,    68,  -702,
+    -702,  -702,  -702,  -275,   684,  -316,  -426,  -702,  -694,  -561,
+     480,   446,  -372,  -648,   272,  -702,   237,  -201,  -702,   238,
+    -421,  -702,  -702,  -702
+};
+
+/* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
+   positive, shift that token.  If negative, reduce the rule which
+   number is the opposite.  If zero, do what YYDEFACT says.
+   If YYTABLE_NINF, syntax error.  */
+#define YYTABLE_NINF -508
+static const yytype_int16 yytable[] =
+{
+     191,   442,   207,   385,   423,   511,   213,   220,   534,   207,
+     501,   632,   513,   339,   505,   228,   387,   667,   711,   763,
+     857,   149,   765,   146,   219,   386,   603,   547,   591,   440,
+     689,   283,   319,   843,   440,   232,   393,   450,   840,   301,
+     596,   215,   215,   596,   410,   603,   761,   869,   761,   240,
+     241,   761,   304,   569,   340,   603,   841,   842,   843,   251,
+     252,   424,   425,   576,   741,   279,   225,   259,   674,   226,
+     887,   592,   248,   690,   290,   312,   222,   694,   362,   494,
+     364,   755,   447,   699,   495,   282,   249,   284,   268,   774,
+     603,   286,   603,   603,   223,   603,   603,   603,   269,   242,
+     264,   603,   267,   243,   318,   439,   603,   851,   884,   327,
+     439,   207,   902,   313,   694,   314,   315,   830,    17,   774,
+     250,   728,   926,   355,   356,   418,   587,   330,   331,   588,
+     589,   590,   363,   255,   256,  -315,   841,   842,   843,   275,
+     927,   280,   408,   409,   410,   147,   377,   676,   291,   292,
+     298,   760,   384,   320,   895,   896,  -164,   299,  -164,   766,
+    -164,    92,  -164,   392,   596,   923,   578,   414,   215,   242,
+     242,   385,   706,   243,   243,   283,   150,   706,   427,   242,
+     293,   924,   205,   243,   387,   431,   597,   419,   687,   597,
+     887,   121,  -164,   386,   436,   302,  -164,   598,   844,   437,
+     339,   682,   742,   604,   411,   412,   260,   385,   305,   384,
+     339,  -314,   229,   489,   579,   497,   321,   231,   339,   484,
+     387,   954,   608,   844,   216,   218,   720,   721,   209,   630,
+     886,   886,   610,   886,   724,   212,   936,   502,   426,   496,
+     245,   340,   731,   507,   253,   675,   487,   510,    92,   734,
+     691,   340,   498,   591,   695,   580,   701,   263,   756,   340,
+     591,   805,   490,   807,   809,   740,   775,   780,   491,   781,
+     795,   535,   796,   797,   798,   535,   591,   544,   799,   605,
+     606,   152,   153,   810,   852,   885,   757,   666,   265,   906,
+     750,   908,   554,   555,   528,   550,   940,   559,   624,   625,
+     626,   627,   628,   844,   411,   412,   571,   572,   573,   574,
+     597,   637,   767,   768,   769,   770,   771,   549,   277,   287,
+     384,   891,   351,   537,   937,   221,   538,   233,   587,   330,
+     331,   588,   589,   590,   607,   238,   499,   239,   611,   612,
+     613,   614,   615,   616,   617,   618,   619,   620,   621,   622,
+     246,   888,   889,   761,   234,   272,   629,   500,   909,   726,
+     727,   235,   442,   283,   236,   914,   285,   641,   643,   644,
+     645,   646,   647,   648,   649,   650,   651,   652,   653,   654,
+     655,   656,   659,   661,   663,   665,   421,   429,   393,   213,
+     440,   440,   435,   307,   450,   342,   347,   671,   672,   308,
+     310,   578,   859,   860,   861,   886,   316,   416,   323,   578,
+     326,   441,   324,   454,   448,   328,   449,   452,   898,   588,
+     589,   590,   482,   587,   330,   331,   588,   589,   590,   805,
+     807,   809,   353,   415,   591,   359,   360,   339,   121,   910,
+     911,   912,   913,   868,   858,   361,   365,   849,   866,   579,
+     366,   591,   591,   591,   591,   591,   367,   579,   506,   339,
+     339,   339,   339,   339,   876,   700,   439,   439,   368,   707,
+     387,   369,   387,   387,   514,   698,   718,   370,   340,   440,
+     883,   712,   831,   371,   440,   811,   719,   833,   759,   722,
+     580,   372,   373,   374,   375,   551,   376,   378,   580,   556,
+     340,   340,   340,   340,   340,   535,   566,   379,   380,   381,
+     382,   535,   535,   391,   416,   392,   566,   706,   706,   706,
+     706,   706,   418,   419,   706,   255,   256,   515,   420,   180,
+     181,    92,   430,   587,   330,   331,   588,   589,   590,   754,
+     432,   433,   481,   904,   485,   183,   184,   486,   758,   185,
+     186,   187,   188,   492,   516,   439,   517,   518,   519,   268,
+     439,   520,   521,   189,   522,   523,   494,   591,   330,   331,
+     588,   589,   590,   778,   512,   207,   779,   277,   503,   508,
+     925,   509,   287,   922,   536,   527,   529,   546,   578,   548,
+     557,   585,   575,   634,   933,   594,   595,   601,   635,   393,
+    -488,  -488,  -488,  -488,  -488,  -488,   804,   636,   806,   808,
+     639,   679,   384,   812,   321,   683,   685,   686,   845,   688,
+     692,   693,   696,   697,   708,   903,   709,   339,   725,   730,
+     813,   814,   735,   736,   745,   815,   579,   816,   387,   387,
+     387,   819,   739,   225,   748,   749,   764,   811,   590,   935,
+     776,   801,   802,   803,   828,   819,   817,   823,   824,   826,
+     827,   832,   834,   839,   847,   496,   864,   837,   340,   484,
+     848,   865,   867,   870,   855,   871,   872,   580,   873,   394,
+     874,   395,   396,   397,   398,   399,   850,   400,   401,   402,
+     403,   404,   405,   878,   897,   406,   407,   408,   409,   410,
+    -489,   902,   907,   921,   930,   934,   535,   742,   578,   941,
+     938,   939,   942,   943,   944,   950,   844,   945,   875,   952,
+    -360,   958,   559,   960,   957,   633,   879,  -247,   967,  -247,
+    -247,  -247,  -247,  -247,   965,  -247,  -247,  -247,  -247,  -247,
+    -247,   968,   926,  -247,  -247,  -247,  -247,  -247,   901,   394,
+      16,   395,   396,   397,   398,   399,   579,   400,   401,   402,
+     403,   404,   405,   488,   393,   406,   407,   408,   409,   410,
+     145,   892,   441,   449,   804,   806,   808,   836,   890,   677,
+     838,   710,   723,   732,   493,   702,   258,   729,   545,   863,
+     213,   900,   916,   915,   681,   669,   394,   580,   395,   396,
+     397,   398,   399,   829,   400,   401,   402,   403,   404,   405,
+     949,   966,   406,   407,   408,   409,   410,   880,   931,   969,
+     352,   746,   877,   882,   718,   345,   917,   593,   920,   631,
+     747,   772,     0,   773,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,   535,     0,     0,     0,     0,     0,     0,
+       0,     0,   825,     0,     0,     0,     0,     0,     0,   411,
+     412,   449,     0,   881,     0,     0,   449,     0,   835,     0,
+       0,     0,   946,     0,   948,   819,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,   392,     0,     0,     0,     0,     0,   854,     0,     0,
+       0,     0,     0,     0,     0,   959,     0,  -247,  -247,     0,
+       0,     0,     0,     0,   961,     0,     0,     0,     0,     0,
+     962,     2,     3,   964,   638,     0,     0,     0,     0,   411,
+     412,     0,     0,   566,     0,     0,   972,     0,     0,     0,
+     973,     0,     0,   974,   975,     0,     0,     0,   -23,   977,
+     -23,     0,     0,   -23,   -23,   -23,   -23,     4,     5,   -23,
+       0,     0,   -23,   -23,   -23,     0,     0,     0,     0,   -23,
+     -23,     0,     0,     0,     6,     7,   411,   412,     0,     0,
+       0,     0,     0,     0,   -23,     0,     0,     0,   -23,   -23,
+       0,     0,     0,   -23,     0,     0,     0,     0,     0,   -23,
+       0,   -23,   -23,     0,   -23,     0,   -23,   -23,   -23,   -23,
+     -23,     0,   -23,   -23,   -23,   -23,   -23,   -23,   -23,   -23,
+     -23,   -23,   -23,   -23,   -23,   -23,   -23,   -23,     0,     0,
+     -23,   -23,   -23,     0,   -23,   -23,   -23,     0,   -23,   -23,
+     -23,     0,     0,   -23,     0,   -23,     0,     0,   -23,   -23,
+     -23,   -23,     0,     0,   -23,   -23,   -23,     0,     0,   351,
+       0,     0,   -23,     0,     0,     8,   -23,   -23,   -23,   -23,
+     -23,   -23,   -23,     0,   -23,   -23,   -23,   -23,   -23,     0,
+       0,   -23,     0,     0,     0,   951,     0,     0,   -23,   -23,
+     -23,     0,     0,     0,     0,     0,     0,   -23,     9,  -507,
+       0,  -507,     0,  -507,  -507,  -507,  -507,  -507,    10,  -507,
+    -507,  -507,  -507,  -507,  -507,     0,     0,  -507,  -507,  -507,
+    -507,  -507,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,   154,   155,     0,     0,     0,
+     156,   157,   158,   159,     0,     0,     0,     0,     0,     0,
+       0,     0,   160,   161,   162,   163,   164,   165,   166,     0,
+     167,   168,   169,     0,     0,   170,   171,   172,     0,   173,
+     174,   175,   176,   177,   932,   178,   394,     0,   395,   396,
+     397,   398,   399,     0,   400,   401,   402,   403,   404,   405,
+       0,     0,   406,   407,   408,   409,   410,   970,     0,   394,
+       0,   395,   396,   397,   398,   399,     0,   400,   401,   402,
+     403,   404,   405,     0,     0,   406,   407,   408,   409,   410,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,   180,   181,
+       0,     0,     0,     0,   182,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,   183,   184,     0,     0,   185,   186,
+     187,   188,     0,     0,     0,    92,     0,     0,     0,     0,
+       0,     0,   189,     0,     0,   577,     0,     0,     0,     0,
+       0,  -507,  -507,   971,     0,   394,     0,   395,   396,   397,
+     398,   399,     0,   400,   401,   402,   403,   404,   405,     0,
+       0,   406,   407,   408,   409,   410,   976,     0,   394,     0,
+     395,   396,   397,   398,   399,     0,   400,   401,   402,   403,
+     404,   405,     0,     0,   406,   407,   408,   409,   410,   853,
+     394,     0,   395,   396,   397,   398,   399,     0,   400,   401,
+     402,   403,   404,   405,     0,     0,   406,   407,   408,   409,
+     410,     0,     0,     0,     0,     0,   411,   412,     0,     0,
+       0,     0,     0,     0,   901,   394,     0,   395,   396,   397,
+     398,   399,     0,   400,   401,   402,   403,   404,   405,   411,
+     412,   406,   407,   408,   409,   410,   947,   394,     0,   395,
+     396,   397,   398,   399,     0,   400,   401,   402,   403,   404,
+     405,     0,     0,   406,   407,   408,   409,   410,   963,   394,
+       0,   395,   396,   397,   398,   399,     0,   400,   401,   402,
+     403,   404,   405,     0,     0,   406,   407,   408,   409,   410,
+     394,     0,   395,   396,   397,   398,   399,     0,   400,   401,
+     402,   403,   404,   405,     0,     0,   406,   407,   408,   409,
+     410,   394,     0,   395,   396,   397,   398,   399,     0,   400,
+     401,   402,   403,   404,   405,   411,   412,   406,   407,   408,
+     409,   410,     0,     0,   394,     0,   395,   396,   397,   398,
+     399,     0,   400,   401,   402,   403,   404,   405,   411,   412,
+     406,   407,   408,   409,   410,     0,   394,     0,   395,   396,
+     397,   398,   399,     0,   400,   401,   402,   403,   404,   405,
+     411,   412,   406,   407,   408,   409,   410,  -250,     0,  -250,
+    -250,  -250,  -250,  -250,     0,  -250,  -250,  -250,  -250,  -250,
+    -250,     0,     0,  -250,  -250,  -250,  -250,  -250,     0,     0,
+       0,     0,     0,     0,     0,   411,   412,     0,     0,     0,
+       0,     0,     0,   394,     0,   395,   396,   397,   398,   399,
+       0,   400,   401,   402,   403,   404,   405,   411,   412,   406,
+     407,   408,   409,   410,     0,   394,     0,   395,   396,   397,
+     398,   399,     0,   400,   401,   402,   403,   404,   405,   411,
+     412,   406,   407,   408,   409,   410,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,   438,     0,     0,     0,     0,
+     411,   412,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,   602,     0,     0,     0,
+       0,   411,   412,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,   609,
+       0,     0,     0,     0,   411,   412,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,   623,     0,     0,     0,     0,   411,   412,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,  -250,     0,     0,     0,     0,  -250,  -250,   394,
+       0,   395,   396,   397,   398,   399,     0,   400,   401,   402,
+     403,   404,   405,     0,     0,   406,   407,   408,   409,   410,
+       0,     0,     0,     0,     0,     0,     0,     0,   638,     0,
+       0,     0,     0,   411,   412,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+     673,     0,     0,     0,     0,   411,   412,   394,     0,   395,
+     396,   397,   398,   399,     0,   400,   401,   402,   403,   404,
+     405,     0,     0,   406,   407,   408,   409,   410,   394,     0,
+     395,   396,   397,   398,   399,     0,   400,   401,   402,   403,
+     404,   405,     0,     0,   406,   407,   408,   409,   410,   394,
+       0,   395,   396,   397,   398,   399,     0,   400,   401,   402,
+     403,   404,   405,     0,     0,   406,   407,   408,   409,   410,
+     394,     0,   395,   396,   397,   398,   399,     0,   400,   401,
+     402,   403,   404,   405,     0,     0,   406,   407,   408,   409,
+     410,   394,     0,   395,   396,   397,   398,   399,     0,   400,
+     401,   402,   403,   404,   405,     0,     0,   406,   407,   408,
+     409,   410,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,   678,     0,     0,     0,     0,   411,
+     412,   394,     0,   395,   396,   397,   398,   399,     0,   400,
+     401,   402,   403,   404,   405,     0,     0,   406,   407,   408,
+     409,   410,   394,     0,   395,   396,   397,   398,   399,     0,
+     400,   401,   402,   403,   404,   405,     0,     0,   406,   407,
+     408,   409,   410,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,   680,     0,     0,     0,     0,   411,   412,     0,
+       0,     0,   420,     0,   394,     0,   395,   396,   397,   398,
+     399,     0,   400,   401,   402,   403,   404,   405,   411,   412,
+     406,   407,   408,   409,   410,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,   782,     0,     0,     0,     0,   411,
+     412,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,   783,     0,     0,     0,     0,
+     411,   412,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,   784,     0,     0,     0,
+       0,   411,   412,   394,     0,   395,   396,   397,   398,   399,
+       0,   400,   401,   402,   403,   404,   405,     0,     0,   406,
+     407,   408,   409,   410,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,   785,     0,     0,     0,
+       0,   411,   412,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,   786,     0,     0,
+       0,     0,   411,   412,   394,     0,   395,   396,   397,   398,
+     399,     0,   400,   401,   402,   403,   404,   405,     0,     0,
+     406,   407,   408,   409,   410,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,   787,
+       0,     0,     0,     0,   411,   412,   394,     0,   395,   396,
+     397,   398,   399,     0,   400,   401,   402,   403,   404,   405,
+       0,     0,   406,   407,   408,   409,   410,   394,     0,   395,
+     396,   397,   398,   399,     0,   400,   401,   402,   403,   404,
+     405,     0,     0,   406,   407,   408,   409,   410,   394,     0,
+     395,   396,   397,   398,   399,     0,   400,   401,   402,   403,
+     404,   405,     0,     0,   406,   407,   408,   409,   410,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,   788,     0,
+       0,     0,     0,   411,   412,   394,     0,   395,   396,   397,
+     398,   399,     0,   400,   401,   402,   403,   404,   405,     0,
+       0,   406,   407,   408,   409,   410,   394,     0,   395,   396,
+     397,   398,   399,     0,   400,   401,   402,   403,   404,   405,
+       0,     0,   406,   407,   408,   409,   410,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,   789,
+       0,     0,     0,     0,   411,   412,   394,     0,   395,   396,
+     397,   398,   399,     0,   400,   401,   402,   403,   404,   405,
+       0,     0,   406,   407,   408,   409,   410,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,   790,     0,     0,     0,     0,   411,   412,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,   791,     0,     0,     0,     0,   411,   412,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,   792,     0,     0,     0,     0,   411,   412,
+     394,     0,   395,   396,   397,   398,   399,     0,   400,   401,
+     402,   403,   404,   405,     0,     0,   406,   407,   408,   409,
+     410,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+     793,     0,     0,     0,     0,   411,   412,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,   794,     0,     0,     0,     0,   411,   412,   394,     0,
+     395,   396,   397,   398,   399,     0,   400,   401,   402,   403,
+     404,   405,     0,     0,   406,   407,   408,   409,   410,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,   800,     0,     0,     0,     0,   411,   412,   394,     0,
+     395,   396,   397,   398,   399,     0,   400,   401,   402,   403,
+     404,   405,     0,     0,   406,   407,   408,   409,   410,   397,
+     398,   399,     0,   400,   401,   402,   403,   404,   405,     0,
+       0,   406,   407,   408,   409,   410,     0,     0,     0,     0,
+       0,     0,   399,   713,   400,   401,   402,   403,   404,   405,
+       0,   151,   406,   407,   408,   409,   410,     0,     0,     0,
+     152,   153,   714,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,   846,     0,     0,   154,   155,
+     411,   412,     0,   156,   157,   158,   159,     0,     0,     0,
+       0,     0,     0,     0,     0,   160,   161,   162,   163,   164,
+     165,   166,     0,   167,   168,   169,     0,     0,   170,   171,
+     172,     0,   173,   174,   175,   176,   177,     0,   178,   400,
+     401,   402,   403,   404,   405,     0,     0,   406,   407,   408,
+     409,   410,     0,   905,     0,     0,     0,     0,   411,   412,
+    -508,  -508,  -508,  -508,  -508,  -508,     0,     0,   406,   407,
+     408,   409,   410,     0,     0,     0,     0,     0,     0,   330,
+     331,   563,     0,   564,     0,     0,     0,     0,     0,     0,
+     179,     0,     0,     0,     0,     0,     0,     0,   411,   412,
+       0,   180,   181,     0,     0,     0,     0,   182,   333,   334,
+     335,     0,     0,   336,     0,   411,   412,   183,   184,     0,
+     151,   185,   186,   187,   188,     0,     0,     0,    92,   152,
+     153,     0,     0,     0,     0,   189,   411,   412,   190,     0,
+       0,     0,     0,     0,     0,     0,     0,   154,   155,     0,
+       0,     0,   156,   157,   158,   159,     0,     0,     0,     0,
+       0,     0,     0,     0,   160,   161,   162,   163,   164,   165,
+     166,     0,   167,   168,   169,     0,     0,   170,   171,   172,
+       0,   173,   174,   175,   176,   177,     0,   178,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+     180,   181,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,   411,   412,   330,   331,   332,   183,   184,     0,     0,
+     185,   186,   187,   188,     0,     0,     0,   337,     0,     0,
+       0,     0,   411,   412,   189,     0,     0,   565,     0,   179,
+       0,     0,   333,   334,   335,     0,     0,   336,     0,     0,
+     180,   181,     0,     0,     0,     0,   182,   818,     0,     0,
+       0,     0,     0,     0,     0,   151,   183,   184,     0,     0,
+     185,   186,   187,   188,   152,   153,     0,    92,     0,     0,
+       0,     0,     0,     0,   189,     0,     0,   190,     0,     0,
+       0,     0,   154,   155,     0,   206,     0,   156,   157,   158,
+     159,     0,     0,     0,     0,     0,     0,     0,     0,   160,
+     161,   162,   163,   164,   165,   166,     0,   167,   168,   169,
+       0,     0,   170,   171,   172,     0,   173,   174,   175,   176,
+     177,     0,   178,     0,   180,   181,     0,     0,     0,     0,
+       0,     0,     0,   330,   331,     0,     0,     0,     0,     0,
+     183,   184,     0,     0,   185,   186,   187,   188,     0,     0,
+       0,   337,     0,     0,     0,     0,     0,     0,   189,     0,
+       0,   338,   333,   334,   335,     0,     0,   336,     0,     0,
+       0,     0,     0,     0,   179,   899,     0,     0,     0,     0,
+       0,     0,     0,   151,     0,   180,   181,     0,     0,     0,
+       0,   182,   152,   153,     0,     0,     0,     0,     0,     0,
+       0,   183,   184,     0,     0,   185,   186,   187,   188,     0,
+     154,   155,    92,     0,     0,   156,   157,   158,   159,   189,
+       0,     0,   190,     0,     0,     0,     0,   160,   161,   162,
+     163,   164,   165,   166,     0,   167,   168,   169,     0,     0,
+     170,   171,   172,     0,   173,   174,   175,   176,   177,     0,
+     178,     0,     0,     0,   180,   181,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+     183,   184,     0,     0,   185,   186,   187,   188,     0,     0,
+       0,   337,     0,     0,     0,     0,     0,     0,   189,     0,
+       0,   565,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,   179,     0,   532,     0,     0,     0,     0,     0,
+       0,   151,     0,   180,   181,     0,     0,     0,     0,   182,
+     152,   153,   533,     0,     0,     0,     0,     0,     0,   183,
+     184,     0,     0,   185,   186,   187,   188,     0,   154,   155,
+      92,     0,     0,   156,   157,   158,   159,   189,     0,     0,
+     190,     0,     0,     0,     0,   160,   161,   162,   163,   164,
+     165,   166,     0,   167,   168,   169,     0,     0,   170,   171,
+     172,     0,   173,   174,   175,   176,   177,     0,   178,   455,
+       0,     0,     0,   456,   457,   458,   459,     0,     0,     0,
+       0,     0,     0,     0,     0,   460,   461,   462,   463,   464,
+     465,   466,     0,   467,   468,   469,     0,     0,   470,   471,
+     472,     0,     0,   473,   474,   475,   476,     0,   477,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+     179,     0,   657,     0,     0,     0,     0,     0,     0,   151,
+       0,   180,   181,     0,     0,     0,     0,   182,   152,   153,
+       0,   658,     0,     0,     0,     0,     0,   183,   184,     0,
+       0,   185,   186,   187,   188,     0,   154,   155,    92,     0,
+       0,   156,   157,   158,   159,   189,     0,     0,   190,     0,
+       0,     0,     0,   160,   161,   162,   163,   164,   165,   166,
+       0,   167,   168,   169,     0,     0,   170,   171,   172,     0,
+     173,   174,   175,   176,   177,     0,   178,     0,   478,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,   179,     0,
+     733,     0,     0,     0,     0,     0,     0,   151,     0,   180,
+     181,     0,     0,     0,     0,   182,   152,   153,   533,     0,
+       0,     0,     0,     0,     0,   183,   184,     0,     0,   185,
+     186,   187,   188,     0,   154,   155,    92,     0,     0,   156,
+     157,   158,   159,   189,     0,     0,   190,     0,     0,     0,
+       0,   160,   161,   162,   163,   164,   165,   166,     0,   167,
+     168,   169,     0,     0,   170,   171,   172,     0,   173,   174,
+     175,   176,   177,     0,   178,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,   179,     0,   640,     0,
+       0,     0,     0,     0,     0,   151,     0,   180,   181,     0,
+       0,     0,     0,   182,   152,   153,     0,     0,     0,     0,
+       0,     0,     0,   183,   184,     0,     0,   185,   186,   187,
+     188,     0,   154,   155,    92,     0,     0,   156,   157,   158,
+     159,   189,     0,     0,   190,     0,     0,     0,     0,   160,
+     161,   162,   163,   164,   165,   166,     0,   167,   168,   169,
+       0,     0,   170,   171,   172,     0,   173,   174,   175,   176,
+     177,     0,   178,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,   179,     0,   662,     0,     0,     0,
+       0,     0,     0,   151,     0,   180,   181,     0,     0,     0,
+       0,   182,   152,   153,     0,     0,     0,     0,     0,     0,
+       0,   183,   184,     0,     0,   185,   186,   187,   188,     0,
+     154,   155,    92,     0,     0,   156,   157,   158,   159,   189,
+       0,     0,   190,     0,     0,     0,     0,   160,   161,   162,
+     163,   164,   165,   166,     0,   167,   168,   169,     0,     0,
+     170,   171,   172,     0,   173,   174,   175,   176,   177,     0,
+     178,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,   179,     0,   664,     0,     0,     0,     0,     0,
+       0,   151,     0,   180,   181,     0,     0,     0,     0,   182,
+     152,   153,     0,     0,     0,     0,     0,     0,     0,   183,
+     184,     0,     0,   185,   186,   187,   188,     0,   154,   155,
+      92,     0,     0,   156,   157,   158,   159,   189,     0,     0,
+     190,     0,     0,     0,     0,   160,   161,   162,   163,   164,
+     165,   166,     0,   167,   168,   169,     0,     0,   170,   171,
+     172,     0,   173,   174,   175,   176,   177,     0,   178,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+     179,     0,     0,     0,     0,     0,     0,     0,     0,   151,
+       0,   180,   181,     0,     0,     0,     0,   182,   152,   153,
+     751,     0,   752,     0,     0,     0,     0,   183,   184,     0,
+       0,   185,   186,   187,   188,     0,   154,   155,    92,     0,
+       0,   156,   157,   158,   159,   189,     0,     0,   190,     0,
+       0,     0,     0,   160,   161,   162,   163,   164,   165,   166,
+       0,   167,   168,   169,     0,     0,   170,   171,   172,     0,
+     173,   174,   175,   176,   177,     0,   178,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,   179,     0,
+       0,     0,     0,     0,     0,     0,     0,   151,     0,   180,
+     181,     0,     0,     0,     0,   182,   152,   153,   533,     0,
+       0,     0,     0,     0,     0,   183,   184,     0,     0,   185,
+     186,   187,   188,     0,   154,   155,    92,     0,     0,   156,
+     157,   158,   159,   189,     0,     0,   753,     0,     0,     0,
+       0,   160,   161,   162,   163,   164,   165,   166,     0,   167,
+     168,   169,     0,     0,   170,   171,   172,     0,   173,   174,
+     175,   176,   177,     0,   178,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,   179,     0,     0,     0,
+       0,     0,     0,     0,     0,   151,     0,   180,   181,     0,
+       0,     0,     0,   182,   152,   153,   558,     0,     0,     0,
+       0,     0,     0,   183,   184,     0,     0,   185,   186,   187,
+     188,     0,   154,   155,   539,     0,     0,   156,   157,   158,
+     159,   189,     0,     0,   190,     0,     0,     0,     0,   160,
+     161,   162,   163,   164,   165,   166,     0,   167,   168,   169,
+       0,     0,   170,   171,   172,     0,   173,   174,   175,   176,
+     177,     0,   178,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,   179,     0,     0,     0,     0,     0,
+       0,     0,     0,   151,     0,   180,   181,     0,     0,     0,
+       0,   182,   152,   153,   533,     0,     0,     0,     0,     0,
+       0,   183,   184,     0,     0,   185,   186,   187,   188,     0,
+     154,   155,    92,     0,     0,   156,   157,   158,   159,   189,
+       0,     0,   190,     0,     0,     0,     0,   160,   161,   162,
+     163,   164,   165,   166,     0,   167,   168,   169,     0,     0,
+     170,   171,   172,     0,   173,   174,   175,   176,   177,     0,
+     178,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,   179,     0,     0,     0,     0,     0,     0,     0,
+       0,   151,     0,   180,   181,     0,     0,     0,     0,   182,
+     152,   153,   738,     0,     0,     0,     0,     0,     0,   183,
+     184,     0,     0,   185,   186,   187,   188,     0,   154,   155,
+      92,     0,     0,   156,   157,   158,   159,   189,     0,     0,
+     190,     0,     0,     0,     0,   160,   161,   162,   163,   164,
+     165,   166,     0,   167,   168,   169,     0,     0,   170,   171,
+     172,     0,   173,   174,   175,   176,   177,     0,   178,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+     179,     0,     0,     0,     0,     0,     0,     0,     0,   151,
+       0,   180,   181,     0,     0,     0,     0,   182,   152,   153,
+     714,     0,     0,     0,     0,     0,     0,   183,   184,     0,
+       0,   185,   186,   187,   188,     0,   154,   155,    92,     0,
+       0,   156,   157,   158,   159,   189,     0,     0,   190,     0,
+       0,     0,     0,   160,   161,   162,   163,   164,   165,   166,
+       0,   167,   168,   169,     0,     0,   170,   171,   172,     0,
+     173,   174,   175,   176,   177,     0,   178,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,   179,     0,
+       0,     0,     0,     0,     0,     0,     0,   151,     0,   180,
+     181,     0,     0,     0,     0,   182,   152,   153,   953,     0,
+       0,     0,     0,     0,     0,   183,   184,     0,     0,   185,
+     186,   187,   188,     0,   154,   155,    92,     0,     0,   156,
+     157,   158,   159,   189,     0,     0,   190,     0,     0,     0,
+       0,   160,   161,   162,   163,   164,   165,   166,     0,   167,
+     168,   169,     0,     0,   170,   171,   172,     0,   173,   174,
+     175,   176,   177,     0,   178,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,   179,     0,     0,     0,
+       0,     0,     0,     0,     0,   151,     0,   180,   181,     0,
+       0,     0,     0,   182,   152,   153,     0,     0,     0,     0,
+       0,     0,     0,   183,   184,     0,     0,   185,   186,   187,
+     188,     0,   154,   155,    92,     0,     0,   156,   157,   158,
+     159,   189,     0,     0,   190,     0,     0,     0,     0,   160,
+     161,   162,   163,   164,   165,   166,     0,   167,   168,   169,
+       0,     0,   170,   171,   172,     0,   173,   174,   175,   176,
+     177,     0,   178,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,   179,     0,     0,     0,     0,     0,
+       0,     0,     0,   151,     0,   180,   181,     0,     0,     0,
+       0,   182,   152,   153,     0,     0,     0,     0,     0,     0,
+       0,   183,   184,     0,     0,   185,   186,   187,   188,     0,
+     154,   155,    92,     0,     0,   156,   157,   158,   159,   189,
+       0,     0,   190,     0,     0,     0,     0,   160,   161,   162,
+     163,   164,   165,   166,     0,   167,   168,   169,     0,     0,
+     170,   171,   172,     0,   173,   174,   175,   176,   177,     0,
+     178,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,   179,     0,     0,     0,     0,     0,     0,     0,
+       0,   151,     0,   180,   181,     0,     0,     0,     0,   182,
+     152,   153,     0,     0,     0,     0,     0,     0,     0,   183,
+     184,     0,     0,   185,   186,   187,   188,     0,   154,   155,
+      92,     0,     0,   156,   157,   158,   159,   189,     0,     0,
+     383,     0,     0,     0,     0,   160,   161,   162,   163,   164,
+     165,   166,     0,   167,   168,   169,     0,     0,   170,   171,
+     172,     0,   173,   174,   175,   176,   177,     0,   178,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+     179,     0,     0,     0,     0,     0,     0,     0,     0,   151,
+       0,   180,   181,     0,     0,     0,     0,   182,   152,   153,
+       0,     0,     0,     0,     0,     0,     0,   183,   184,     0,
+       0,   185,   186,   187,   188,     0,   154,   155,    92,     0,
+       0,   156,   157,   158,   159,   446,     0,     0,   190,     0,
+       0,     0,     0,   160,   161,   162,   163,   164,   165,   166,
+       0,   167,   168,   169,     0,     0,   170,   171,   172,     0,
+     173,   174,   175,   176,   177,     0,   178,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,   179,     0,
+       0,     0,     0,     0,     0,     0,     0,   151,     0,   180,
+     181,     0,     0,     0,     0,   182,   152,   153,     0,     0,
+       0,     0,     0,     0,     0,   183,   184,     0,     0,   185,
+     186,   187,   188,     0,   154,   155,    92,     0,     0,   156,
+     157,   158,   159,   189,     0,     0,   542,     0,     0,     0,
+       0,   160,   161,   162,   163,   164,   165,   166,     0,   167,
+     168,   169,     0,     0,   170,   171,   172,     0,   173,   174,
+     175,   176,   177,     0,   178,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,   179,     0,     0,     0,
+       0,     0,     0,     0,     0,   151,     0,   180,   181,     0,
+       0,     0,     0,   182,   152,   153,     0,     0,     0,     0,
+       0,     0,     0,   183,   184,     0,     0,   185,   186,   187,
+     188,     0,   154,   155,   893,     0,     0,   156,   157,   158,
+     159,   189,     0,     0,   383,     0,     0,     0,     0,   160,
+     161,   162,   163,   164,   165,   166,     0,   167,   168,   169,
+       0,     0,   170,   171,   172,     0,   173,   174,   175,   176,
+     177,     0,   178,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,   179,    19,     0,     0,    20,   -28,
+      21,    22,     0,     0,    23,   180,   181,    24,    25,    26,
+       0,   182,     0,     0,    27,    28,     0,     0,     0,     0,
+       0,   183,   184,     0,     0,   185,   186,   187,   188,    29,
+       0,     0,    92,    30,    31,     0,     0,     0,    32,   189,
+       0,     0,   918,     0,    33,     0,    34,    35,     0,    36,
+       0,    37,    38,    39,    40,    41,     0,    42,    43,    44,
+      45,    46,    47,    48,    49,    50,    51,    52,    53,    54,
+      55,    56,    57,     0,     0,    58,    59,    60,     0,    61,
+      62,    63,     0,    64,    65,    66,     0,     0,    67,     0,
+      68,     0,     0,    69,    70,    71,    72,     0,     0,    73,
+      74,    75,     0,     0,     0,     0,     0,    76,     0,     0,
+       0,    77,    78,    79,    80,    81,    82,    83,     0,    84,
+      85,    86,    87,    88,     0,     0,    89,     0,     0,     0,
+       0,   154,   155,    90,    91,    92,   156,   157,   158,   159,
+       0,     0,    93,     0,     0,     0,     0,     0,   160,   161,
+     162,   163,   164,   165,   166,     0,   167,   168,   169,     0,
+       0,   170,   171,   172,     0,   173,   174,   175,   176,   177,
+       0,   178,   154,   155,     0,     0,     0,   156,   157,   158,
+     159,     0,     0,     0,     0,     0,     0,     0,     0,   160,
+     161,   162,   163,   164,   165,   166,     0,   167,   168,   169,
+       0,     0,   170,   171,   172,     0,   173,   174,   175,   176,
+     177,     0,   178,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,   180,   181,     0,     0,     0,     0,
+     182,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+     183,   184,     0,     0,   185,   186,   187,   188,     0,     0,
+      23,    92,     0,     0,     0,     0,     0,     0,   189,     0,
+       0,   577,     0,     0,     0,   180,   181,     0,     0,     0,
+       0,   182,     0,     0,     0,    29,     0,     0,     0,     0,
+       0,   183,   184,     0,     0,   185,   186,   187,   188,     0,
+      33,     0,   893,     0,     0,    36,   348,     0,     0,   189,
+      40,    41,   577,     0,     0,     0,     0,     0,     0,     0,
+     349,    50,    51,    52,    53,    54,    55,   350,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+      65,     0,     0,     0,     0,     0,    68,     0,     0,     0,
+       0,     0,     0,     0,     0,    73,     0,    75,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,    92,     0,     0,     0,     0,     0,     0,    93
+};
+
+static const yytype_int16 yycheck[] =
+{
+      27,   233,    29,   179,   202,   287,    33,    36,   298,    36,
+     275,   383,   290,   141,   279,    42,   179,   416,   500,   580,
+     721,    22,   583,    18,    35,   179,     3,   309,   344,   233,
+     451,     3,     5,    23,   238,    47,   190,   238,     3,    23,
+      23,     4,     4,    23,    25,     3,   578,   734,   580,    60,
+      61,   583,    23,   328,   141,     3,    21,    22,    23,    71,
+      72,     3,     4,   338,    31,   104,   176,    79,     3,   179,
+     764,   346,   123,     3,   113,   124,   169,     3,   158,     3,
+     160,     3,   236,   490,    24,   106,   137,   108,   169,     3,
+       3,   112,     3,     3,   187,     3,     3,     3,   179,    20,
+      98,     3,   100,    24,   131,   233,     3,     3,     3,   138,
+     238,   138,     3,   125,     3,   127,   128,   125,   177,     3,
+     127,   528,   169,   150,   151,   179,    20,    21,    22,    23,
+      24,    25,   159,    80,    81,   189,    21,    22,    23,     3,
+     187,     3,    23,    24,    25,   169,   173,   429,     3,     4,
+     169,   577,   179,   126,   802,   803,    20,   176,    20,   585,
+      24,   169,    24,   190,    23,   866,   342,   194,     4,    20,
+      20,   347,   495,    24,    24,     3,   179,   500,   205,    20,
+      35,   868,   179,    24,   347,   212,   169,   179,   180,   169,
+     884,    13,    20,   347,   221,   179,    24,   180,   188,   226,
+     328,   179,   169,   180,   185,   186,    27,   383,   179,   236,
+     338,   189,   169,   262,   342,   187,   189,   169,   346,   246,
+     383,   922,   180,   188,   187,   187,   508,   509,   179,   383,
+     762,   763,   180,   765,   516,   179,   884,   276,   180,   179,
+      62,   328,   532,   282,   169,   180,   257,   286,   169,   539,
+     180,   338,   273,   569,   180,   342,   180,    33,   180,   346,
+     576,   633,   263,   635,   636,   547,   180,   180,   266,   180,
+     180,   298,   180,   180,   180,   302,   592,   304,   180,   359,
+     360,    21,    22,   180,   180,   180,   180,   415,   158,   180,
+     565,   180,   319,   320,   295,   316,   180,   324,   378,   379,
+     380,   381,   382,   188,   185,   186,   333,   334,   335,   336,
+     169,   391,   587,   588,   589,   590,   591,   312,   169,   169,
+     347,   180,   144,   176,   885,   179,   179,   179,    20,    21,
+      22,    23,    24,    25,   361,   179,     3,   179,   365,   366,
+     367,   368,   369,   370,   371,   372,   373,   374,   375,   376,
+     179,   772,   773,   885,   169,   169,   383,    24,   840,     3,
+       4,   176,   594,     3,   179,   847,     3,   394,   395,   396,
+     397,   398,   399,   400,   401,   402,   403,   404,   405,   406,
+     407,   408,   409,   410,   411,   412,   158,   209,   542,   416,
+     594,   595,   219,    23,   595,   141,   142,   424,   425,     4,
+     169,   577,   138,   139,   140,   937,   176,   179,     3,   585,
+     169,   233,   179,   240,   236,   179,   238,   239,   817,    23,
+      24,    25,   244,    20,    21,    22,    23,    24,    25,   801,
+     802,   803,   179,   189,   750,   179,   179,   565,   260,   841,
+     842,   843,   844,   733,   722,   179,   179,   712,   730,   577,
+     179,   767,   768,   769,   770,   771,   179,   585,   280,   587,
+     588,   589,   590,   591,   746,   492,   594,   595,   179,   496,
+     633,   179,   635,   636,    29,   487,   503,   179,   565,   683,
+     755,   502,   683,   179,   688,   639,   507,   688,   180,   510,
+     577,   179,   179,   179,   179,   317,   179,   179,   585,   321,
+     587,   588,   589,   590,   591,   532,   328,   179,   179,   179,
+     179,   538,   539,   179,   179,   542,   338,   840,   841,   842,
+     843,   844,   179,   179,   847,    80,    81,    82,   169,   142,
+     143,   169,     3,    20,    21,    22,    23,    24,    25,   566,
+       4,   169,   169,   825,     3,   158,   159,     3,   575,   162,
+     163,   164,   165,     5,   109,   683,   111,   112,   113,   169,
+     688,   116,   117,   176,   119,   120,     3,   883,    21,    22,
+      23,    24,    25,   602,     3,   602,   603,   169,   179,   169,
+     870,   169,   169,   865,   180,     4,     3,   176,   764,     3,
+     176,     3,     5,   132,   876,   179,   179,    30,     3,   753,
+      20,    21,    22,    23,    24,    25,   633,     3,   635,   636,
+       3,     3,   639,   640,   189,     3,   180,   180,   705,     3,
+       3,    24,   179,   169,   169,   823,   169,   755,   179,   169,
+     657,   658,   180,     3,     5,   662,   764,   664,   801,   802,
+     803,   668,   180,   176,   180,     3,     3,   801,    25,   881,
+     179,     3,     3,     3,   681,   682,     4,   180,   180,   169,
+      84,   180,   180,    24,    24,   179,     4,   694,   755,   696,
+      24,   169,   180,   169,    23,   180,     4,   764,   126,     5,
+       3,     7,     8,     9,    10,    11,   713,    13,    14,    15,
+      16,    17,    18,   180,   180,    21,    22,    23,    24,    25,
+      20,     3,     5,   180,   169,   180,   733,   169,   884,     5,
+     180,   180,   180,   180,   180,     3,   188,   180,   745,    24,
+       5,     3,   749,   180,   126,     3,   753,     5,     5,     7,
+       8,     9,    10,    11,   180,    13,    14,    15,    16,    17,
+      18,   169,   169,    21,    22,    23,    24,    25,     4,     5,
+      10,     7,     8,     9,    10,    11,   884,    13,    14,    15,
+      16,    17,    18,   260,   918,    21,    22,    23,    24,    25,
+      14,   776,   594,   595,   801,   802,   803,   692,   774,   430,
+     696,   499,   512,   538,   269,   494,    77,   529,   305,   726,
+     817,   818,   853,   851,     3,   418,     5,   884,     7,     8,
+       9,    10,    11,   682,    13,    14,    15,    16,    17,    18,
+     902,   954,    21,    22,    23,    24,    25,   753,   874,   958,
+     144,   556,   749,   755,   851,   141,   853,   347,   855,   383,
+     558,   594,    -1,   595,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,   870,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,   674,    -1,    -1,    -1,    -1,    -1,    -1,   185,
+     186,   683,    -1,   189,    -1,    -1,   688,    -1,   690,    -1,
+      -1,    -1,   899,    -1,   901,   902,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,   918,    -1,    -1,    -1,    -1,    -1,   719,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,   932,    -1,   185,   186,    -1,
+      -1,    -1,    -1,    -1,   941,    -1,    -1,    -1,    -1,    -1,
+     947,     0,     1,   950,   180,    -1,    -1,    -1,    -1,   185,
+     186,    -1,    -1,   755,    -1,    -1,   963,    -1,    -1,    -1,
+     967,    -1,    -1,   970,   971,    -1,    -1,    -1,    27,   976,
+      29,    -1,    -1,    32,    33,    34,    35,    36,    37,    38,
+      -1,    -1,    41,    42,    43,    -1,    -1,    -1,    -1,    48,
+      49,    -1,    -1,    -1,    53,    54,   185,   186,    -1,    -1,
+      -1,    -1,    -1,    -1,    63,    -1,    -1,    -1,    67,    68,
+      -1,    -1,    -1,    72,    -1,    -1,    -1,    -1,    -1,    78,
+      -1,    80,    81,    -1,    83,    -1,    85,    86,    87,    88,
+      89,    -1,    91,    92,    93,    94,    95,    96,    97,    98,
+      99,   100,   101,   102,   103,   104,   105,   106,    -1,    -1,
+     109,   110,   111,    -1,   113,   114,   115,    -1,   117,   118,
+     119,    -1,    -1,   122,    -1,   124,    -1,    -1,   127,   128,
+     129,   130,    -1,    -1,   133,   134,   135,    -1,    -1,   881,
+      -1,    -1,   141,    -1,    -1,   144,   145,   146,   147,   148,
+     149,   150,   151,    -1,   153,   154,   155,   156,   157,    -1,
+      -1,   160,    -1,    -1,    -1,   907,    -1,    -1,   167,   168,
+     169,    -1,    -1,    -1,    -1,    -1,    -1,   176,   177,     3,
+      -1,     5,    -1,     7,     8,     9,    10,    11,   187,    13,
+      14,    15,    16,    17,    18,    -1,    -1,    21,    22,    23,
+      24,    25,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    39,    40,    -1,    -1,    -1,
+      44,    45,    46,    47,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    56,    57,    58,    59,    60,    61,    62,    -1,
+      64,    65,    66,    -1,    -1,    69,    70,    71,    -1,    73,
+      74,    75,    76,    77,     3,    79,     5,    -1,     7,     8,
+       9,    10,    11,    -1,    13,    14,    15,    16,    17,    18,
+      -1,    -1,    21,    22,    23,    24,    25,     3,    -1,     5,
+      -1,     7,     8,     9,    10,    11,    -1,    13,    14,    15,
+      16,    17,    18,    -1,    -1,    21,    22,    23,    24,    25,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   142,   143,
+      -1,    -1,    -1,    -1,   148,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,   158,   159,    -1,    -1,   162,   163,
+     164,   165,    -1,    -1,    -1,   169,    -1,    -1,    -1,    -1,
+      -1,    -1,   176,    -1,    -1,   179,    -1,    -1,    -1,    -1,
+      -1,   185,   186,     3,    -1,     5,    -1,     7,     8,     9,
+      10,    11,    -1,    13,    14,    15,    16,    17,    18,    -1,
+      -1,    21,    22,    23,    24,    25,     3,    -1,     5,    -1,
+       7,     8,     9,    10,    11,    -1,    13,    14,    15,    16,
+      17,    18,    -1,    -1,    21,    22,    23,    24,    25,     4,
+       5,    -1,     7,     8,     9,    10,    11,    -1,    13,    14,
+      15,    16,    17,    18,    -1,    -1,    21,    22,    23,    24,
+      25,    -1,    -1,    -1,    -1,    -1,   185,   186,    -1,    -1,
+      -1,    -1,    -1,    -1,     4,     5,    -1,     7,     8,     9,
+      10,    11,    -1,    13,    14,    15,    16,    17,    18,   185,
+     186,    21,    22,    23,    24,    25,     4,     5,    -1,     7,
+       8,     9,    10,    11,    -1,    13,    14,    15,    16,    17,
+      18,    -1,    -1,    21,    22,    23,    24,    25,     4,     5,
+      -1,     7,     8,     9,    10,    11,    -1,    13,    14,    15,
+      16,    17,    18,    -1,    -1,    21,    22,    23,    24,    25,
+       5,    -1,     7,     8,     9,    10,    11,    -1,    13,    14,
+      15,    16,    17,    18,    -1,    -1,    21,    22,    23,    24,
+      25,     5,    -1,     7,     8,     9,    10,    11,    -1,    13,
+      14,    15,    16,    17,    18,   185,   186,    21,    22,    23,
+      24,    25,    -1,    -1,     5,    -1,     7,     8,     9,    10,
+      11,    -1,    13,    14,    15,    16,    17,    18,   185,   186,
+      21,    22,    23,    24,    25,    -1,     5,    -1,     7,     8,
+       9,    10,    11,    -1,    13,    14,    15,    16,    17,    18,
+     185,   186,    21,    22,    23,    24,    25,     5,    -1,     7,
+       8,     9,    10,    11,    -1,    13,    14,    15,    16,    17,
+      18,    -1,    -1,    21,    22,    23,    24,    25,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,   185,   186,    -1,    -1,    -1,
+      -1,    -1,    -1,     5,    -1,     7,     8,     9,    10,    11,
+      -1,    13,    14,    15,    16,    17,    18,   185,   186,    21,
+      22,    23,    24,    25,    -1,     5,    -1,     7,     8,     9,
+      10,    11,    -1,    13,    14,    15,    16,    17,    18,   185,
+     186,    21,    22,    23,    24,    25,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,   180,    -1,    -1,    -1,    -1,
+     185,   186,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,   180,    -1,    -1,    -1,
+      -1,   185,   186,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   180,
+      -1,    -1,    -1,    -1,   185,   186,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,   180,    -1,    -1,    -1,    -1,   185,   186,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,   180,    -1,    -1,    -1,    -1,   185,   186,     5,
+      -1,     7,     8,     9,    10,    11,    -1,    13,    14,    15,
+      16,    17,    18,    -1,    -1,    21,    22,    23,    24,    25,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   180,    -1,
+      -1,    -1,    -1,   185,   186,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+     180,    -1,    -1,    -1,    -1,   185,   186,     5,    -1,     7,
+       8,     9,    10,    11,    -1,    13,    14,    15,    16,    17,
+      18,    -1,    -1,    21,    22,    23,    24,    25,     5,    -1,
+       7,     8,     9,    10,    11,    -1,    13,    14,    15,    16,
+      17,    18,    -1,    -1,    21,    22,    23,    24,    25,     5,
+      -1,     7,     8,     9,    10,    11,    -1,    13,    14,    15,
+      16,    17,    18,    -1,    -1,    21,    22,    23,    24,    25,
+       5,    -1,     7,     8,     9,    10,    11,    -1,    13,    14,
+      15,    16,    17,    18,    -1,    -1,    21,    22,    23,    24,
+      25,     5,    -1,     7,     8,     9,    10,    11,    -1,    13,
+      14,    15,    16,    17,    18,    -1,    -1,    21,    22,    23,
+      24,    25,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,   180,    -1,    -1,    -1,    -1,   185,
+     186,     5,    -1,     7,     8,     9,    10,    11,    -1,    13,
+      14,    15,    16,    17,    18,    -1,    -1,    21,    22,    23,
+      24,    25,     5,    -1,     7,     8,     9,    10,    11,    -1,
+      13,    14,    15,    16,    17,    18,    -1,    -1,    21,    22,
+      23,    24,    25,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,   180,    -1,    -1,    -1,    -1,   185,   186,    -1,
+      -1,    -1,   169,    -1,     5,    -1,     7,     8,     9,    10,
+      11,    -1,    13,    14,    15,    16,    17,    18,   185,   186,
+      21,    22,    23,    24,    25,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,   180,    -1,    -1,    -1,    -1,   185,
+     186,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,   180,    -1,    -1,    -1,    -1,
+     185,   186,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,   180,    -1,    -1,    -1,
+      -1,   185,   186,     5,    -1,     7,     8,     9,    10,    11,
+      -1,    13,    14,    15,    16,    17,    18,    -1,    -1,    21,
+      22,    23,    24,    25,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,   180,    -1,    -1,    -1,
+      -1,   185,   186,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,   180,    -1,    -1,
+      -1,    -1,   185,   186,     5,    -1,     7,     8,     9,    10,
+      11,    -1,    13,    14,    15,    16,    17,    18,    -1,    -1,
+      21,    22,    23,    24,    25,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   180,
+      -1,    -1,    -1,    -1,   185,   186,     5,    -1,     7,     8,
+       9,    10,    11,    -1,    13,    14,    15,    16,    17,    18,
+      -1,    -1,    21,    22,    23,    24,    25,     5,    -1,     7,
+       8,     9,    10,    11,    -1,    13,    14,    15,    16,    17,
+      18,    -1,    -1,    21,    22,    23,    24,    25,     5,    -1,
+       7,     8,     9,    10,    11,    -1,    13,    14,    15,    16,
+      17,    18,    -1,    -1,    21,    22,    23,    24,    25,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   180,    -1,
+      -1,    -1,    -1,   185,   186,     5,    -1,     7,     8,     9,
+      10,    11,    -1,    13,    14,    15,    16,    17,    18,    -1,
+      -1,    21,    22,    23,    24,    25,     5,    -1,     7,     8,
+       9,    10,    11,    -1,    13,    14,    15,    16,    17,    18,
+      -1,    -1,    21,    22,    23,    24,    25,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   180,
+      -1,    -1,    -1,    -1,   185,   186,     5,    -1,     7,     8,
+       9,    10,    11,    -1,    13,    14,    15,    16,    17,    18,
+      -1,    -1,    21,    22,    23,    24,    25,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,   180,    -1,    -1,    -1,    -1,   185,   186,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,   180,    -1,    -1,    -1,    -1,   185,   186,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,   180,    -1,    -1,    -1,    -1,   185,   186,
+       5,    -1,     7,     8,     9,    10,    11,    -1,    13,    14,
+      15,    16,    17,    18,    -1,    -1,    21,    22,    23,    24,
+      25,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+     180,    -1,    -1,    -1,    -1,   185,   186,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,   180,    -1,    -1,    -1,    -1,   185,   186,     5,    -1,
+       7,     8,     9,    10,    11,    -1,    13,    14,    15,    16,
+      17,    18,    -1,    -1,    21,    22,    23,    24,    25,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,   180,    -1,    -1,    -1,    -1,   185,   186,     5,    -1,
+       7,     8,     9,    10,    11,    -1,    13,    14,    15,    16,
+      17,    18,    -1,    -1,    21,    22,    23,    24,    25,     9,
+      10,    11,    -1,    13,    14,    15,    16,    17,    18,    -1,
+      -1,    21,    22,    23,    24,    25,    -1,    -1,    -1,    -1,
+      -1,    -1,    11,     4,    13,    14,    15,    16,    17,    18,
+      -1,    12,    21,    22,    23,    24,    25,    -1,    -1,    -1,
+      21,    22,    23,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,   180,    -1,    -1,    39,    40,
+     185,   186,    -1,    44,    45,    46,    47,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    56,    57,    58,    59,    60,
+      61,    62,    -1,    64,    65,    66,    -1,    -1,    69,    70,
+      71,    -1,    73,    74,    75,    76,    77,    -1,    79,    13,
+      14,    15,    16,    17,    18,    -1,    -1,    21,    22,    23,
+      24,    25,    -1,   180,    -1,    -1,    -1,    -1,   185,   186,
+      13,    14,    15,    16,    17,    18,    -1,    -1,    21,    22,
+      23,    24,    25,    -1,    -1,    -1,    -1,    -1,    -1,    21,
+      22,    23,    -1,    25,    -1,    -1,    -1,    -1,    -1,    -1,
+     131,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   185,   186,
+      -1,   142,   143,    -1,    -1,    -1,    -1,   148,    50,    51,
+      52,    -1,    -1,    55,    -1,   185,   186,   158,   159,    -1,
+      12,   162,   163,   164,   165,    -1,    -1,    -1,   169,    21,
+      22,    -1,    -1,    -1,    -1,   176,   185,   186,   179,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    39,    40,    -1,
+      -1,    -1,    44,    45,    46,    47,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    56,    57,    58,    59,    60,    61,
+      62,    -1,    64,    65,    66,    -1,    -1,    69,    70,    71,
+      -1,    73,    74,    75,    76,    77,    -1,    79,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+     142,   143,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,   185,   186,    21,    22,    23,   158,   159,    -1,    -1,
+     162,   163,   164,   165,    -1,    -1,    -1,   169,    -1,    -1,
+      -1,    -1,   185,   186,   176,    -1,    -1,   179,    -1,   131,
+      -1,    -1,    50,    51,    52,    -1,    -1,    55,    -1,    -1,
+     142,   143,    -1,    -1,    -1,    -1,   148,     4,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    12,   158,   159,    -1,    -1,
+     162,   163,   164,   165,    21,    22,    -1,   169,    -1,    -1,
+      -1,    -1,    -1,    -1,   176,    -1,    -1,   179,    -1,    -1,
+      -1,    -1,    39,    40,    -1,   187,    -1,    44,    45,    46,
+      47,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    56,
+      57,    58,    59,    60,    61,    62,    -1,    64,    65,    66,
+      -1,    -1,    69,    70,    71,    -1,    73,    74,    75,    76,
+      77,    -1,    79,    -1,   142,   143,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    21,    22,    -1,    -1,    -1,    -1,    -1,
+     158,   159,    -1,    -1,   162,   163,   164,   165,    -1,    -1,
+      -1,   169,    -1,    -1,    -1,    -1,    -1,    -1,   176,    -1,
+      -1,   179,    50,    51,    52,    -1,    -1,    55,    -1,    -1,
+      -1,    -1,    -1,    -1,   131,     4,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    12,    -1,   142,   143,    -1,    -1,    -1,
+      -1,   148,    21,    22,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,   158,   159,    -1,    -1,   162,   163,   164,   165,    -1,
+      39,    40,   169,    -1,    -1,    44,    45,    46,    47,   176,
+      -1,    -1,   179,    -1,    -1,    -1,    -1,    56,    57,    58,
+      59,    60,    61,    62,    -1,    64,    65,    66,    -1,    -1,
+      69,    70,    71,    -1,    73,    74,    75,    76,    77,    -1,
+      79,    -1,    -1,    -1,   142,   143,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+     158,   159,    -1,    -1,   162,   163,   164,   165,    -1,    -1,
+      -1,   169,    -1,    -1,    -1,    -1,    -1,    -1,   176,    -1,
+      -1,   179,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,   131,    -1,     5,    -1,    -1,    -1,    -1,    -1,
+      -1,    12,    -1,   142,   143,    -1,    -1,    -1,    -1,   148,
+      21,    22,    23,    -1,    -1,    -1,    -1,    -1,    -1,   158,
+     159,    -1,    -1,   162,   163,   164,   165,    -1,    39,    40,
+     169,    -1,    -1,    44,    45,    46,    47,   176,    -1,    -1,
+     179,    -1,    -1,    -1,    -1,    56,    57,    58,    59,    60,
+      61,    62,    -1,    64,    65,    66,    -1,    -1,    69,    70,
+      71,    -1,    73,    74,    75,    76,    77,    -1,    79,    40,
+      -1,    -1,    -1,    44,    45,    46,    47,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    56,    57,    58,    59,    60,
+      61,    62,    -1,    64,    65,    66,    -1,    -1,    69,    70,
+      71,    -1,    -1,    74,    75,    76,    77,    -1,    79,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+     131,    -1,     5,    -1,    -1,    -1,    -1,    -1,    -1,    12,
+      -1,   142,   143,    -1,    -1,    -1,    -1,   148,    21,    22,
+      -1,    24,    -1,    -1,    -1,    -1,    -1,   158,   159,    -1,
+      -1,   162,   163,   164,   165,    -1,    39,    40,   169,    -1,
+      -1,    44,    45,    46,    47,   176,    -1,    -1,   179,    -1,
+      -1,    -1,    -1,    56,    57,    58,    59,    60,    61,    62,
+      -1,    64,    65,    66,    -1,    -1,    69,    70,    71,    -1,
+      73,    74,    75,    76,    77,    -1,    79,    -1,   169,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   131,    -1,
+       5,    -1,    -1,    -1,    -1,    -1,    -1,    12,    -1,   142,
+     143,    -1,    -1,    -1,    -1,   148,    21,    22,    23,    -1,
+      -1,    -1,    -1,    -1,    -1,   158,   159,    -1,    -1,   162,
+     163,   164,   165,    -1,    39,    40,   169,    -1,    -1,    44,
+      45,    46,    47,   176,    -1,    -1,   179,    -1,    -1,    -1,
+      -1,    56,    57,    58,    59,    60,    61,    62,    -1,    64,
+      65,    66,    -1,    -1,    69,    70,    71,    -1,    73,    74,
+      75,    76,    77,    -1,    79,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,   131,    -1,     5,    -1,
+      -1,    -1,    -1,    -1,    -1,    12,    -1,   142,   143,    -1,
+      -1,    -1,    -1,   148,    21,    22,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,   158,   159,    -1,    -1,   162,   163,   164,
+     165,    -1,    39,    40,   169,    -1,    -1,    44,    45,    46,
+      47,   176,    -1,    -1,   179,    -1,    -1,    -1,    -1,    56,
+      57,    58,    59,    60,    61,    62,    -1,    64,    65,    66,
+      -1,    -1,    69,    70,    71,    -1,    73,    74,    75,    76,
+      77,    -1,    79,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,   131,    -1,     5,    -1,    -1,    -1,
+      -1,    -1,    -1,    12,    -1,   142,   143,    -1,    -1,    -1,
+      -1,   148,    21,    22,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,   158,   159,    -1,    -1,   162,   163,   164,   165,    -1,
+      39,    40,   169,    -1,    -1,    44,    45,    46,    47,   176,
+      -1,    -1,   179,    -1,    -1,    -1,    -1,    56,    57,    58,
+      59,    60,    61,    62,    -1,    64,    65,    66,    -1,    -1,
+      69,    70,    71,    -1,    73,    74,    75,    76,    77,    -1,
+      79,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,   131,    -1,     5,    -1,    -1,    -1,    -1,    -1,
+      -1,    12,    -1,   142,   143,    -1,    -1,    -1,    -1,   148,
+      21,    22,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   158,
+     159,    -1,    -1,   162,   163,   164,   165,    -1,    39,    40,
+     169,    -1,    -1,    44,    45,    46,    47,   176,    -1,    -1,
+     179,    -1,    -1,    -1,    -1,    56,    57,    58,    59,    60,
+      61,    62,    -1,    64,    65,    66,    -1,    -1,    69,    70,
+      71,    -1,    73,    74,    75,    76,    77,    -1,    79,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+     131,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    12,
+      -1,   142,   143,    -1,    -1,    -1,    -1,   148,    21,    22,
+      23,    -1,    25,    -1,    -1,    -1,    -1,   158,   159,    -1,
+      -1,   162,   163,   164,   165,    -1,    39,    40,   169,    -1,
+      -1,    44,    45,    46,    47,   176,    -1,    -1,   179,    -1,
+      -1,    -1,    -1,    56,    57,    58,    59,    60,    61,    62,
+      -1,    64,    65,    66,    -1,    -1,    69,    70,    71,    -1,
+      73,    74,    75,    76,    77,    -1,    79,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   131,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    12,    -1,   142,
+     143,    -1,    -1,    -1,    -1,   148,    21,    22,    23,    -1,
+      -1,    -1,    -1,    -1,    -1,   158,   159,    -1,    -1,   162,
+     163,   164,   165,    -1,    39,    40,   169,    -1,    -1,    44,
+      45,    46,    47,   176,    -1,    -1,   179,    -1,    -1,    -1,
+      -1,    56,    57,    58,    59,    60,    61,    62,    -1,    64,
+      65,    66,    -1,    -1,    69,    70,    71,    -1,    73,    74,
+      75,    76,    77,    -1,    79,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,   131,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    12,    -1,   142,   143,    -1,
+      -1,    -1,    -1,   148,    21,    22,    23,    -1,    -1,    -1,
+      -1,    -1,    -1,   158,   159,    -1,    -1,   162,   163,   164,
+     165,    -1,    39,    40,   169,    -1,    -1,    44,    45,    46,
+      47,   176,    -1,    -1,   179,    -1,    -1,    -1,    -1,    56,
+      57,    58,    59,    60,    61,    62,    -1,    64,    65,    66,
+      -1,    -1,    69,    70,    71,    -1,    73,    74,    75,    76,
+      77,    -1,    79,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,   131,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    12,    -1,   142,   143,    -1,    -1,    -1,
+      -1,   148,    21,    22,    23,    -1,    -1,    -1,    -1,    -1,
+      -1,   158,   159,    -1,    -1,   162,   163,   164,   165,    -1,
+      39,    40,   169,    -1,    -1,    44,    45,    46,    47,   176,
+      -1,    -1,   179,    -1,    -1,    -1,    -1,    56,    57,    58,
+      59,    60,    61,    62,    -1,    64,    65,    66,    -1,    -1,
+      69,    70,    71,    -1,    73,    74,    75,    76,    77,    -1,
+      79,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,   131,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    12,    -1,   142,   143,    -1,    -1,    -1,    -1,   148,
+      21,    22,    23,    -1,    -1,    -1,    -1,    -1,    -1,   158,
+     159,    -1,    -1,   162,   163,   164,   165,    -1,    39,    40,
+     169,    -1,    -1,    44,    45,    46,    47,   176,    -1,    -1,
+     179,    -1,    -1,    -1,    -1,    56,    57,    58,    59,    60,
+      61,    62,    -1,    64,    65,    66,    -1,    -1,    69,    70,
+      71,    -1,    73,    74,    75,    76,    77,    -1,    79,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+     131,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    12,
+      -1,   142,   143,    -1,    -1,    -1,    -1,   148,    21,    22,
+      23,    -1,    -1,    -1,    -1,    -1,    -1,   158,   159,    -1,
+      -1,   162,   163,   164,   165,    -1,    39,    40,   169,    -1,
+      -1,    44,    45,    46,    47,   176,    -1,    -1,   179,    -1,
+      -1,    -1,    -1,    56,    57,    58,    59,    60,    61,    62,
+      -1,    64,    65,    66,    -1,    -1,    69,    70,    71,    -1,
+      73,    74,    75,    76,    77,    -1,    79,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   131,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    12,    -1,   142,
+     143,    -1,    -1,    -1,    -1,   148,    21,    22,    23,    -1,
+      -1,    -1,    -1,    -1,    -1,   158,   159,    -1,    -1,   162,
+     163,   164,   165,    -1,    39,    40,   169,    -1,    -1,    44,
+      45,    46,    47,   176,    -1,    -1,   179,    -1,    -1,    -1,
+      -1,    56,    57,    58,    59,    60,    61,    62,    -1,    64,
+      65,    66,    -1,    -1,    69,    70,    71,    -1,    73,    74,
+      75,    76,    77,    -1,    79,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,   131,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    12,    -1,   142,   143,    -1,
+      -1,    -1,    -1,   148,    21,    22,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,   158,   159,    -1,    -1,   162,   163,   164,
+     165,    -1,    39,    40,   169,    -1,    -1,    44,    45,    46,
+      47,   176,    -1,    -1,   179,    -1,    -1,    -1,    -1,    56,
+      57,    58,    59,    60,    61,    62,    -1,    64,    65,    66,
+      -1,    -1,    69,    70,    71,    -1,    73,    74,    75,    76,
+      77,    -1,    79,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,   131,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    12,    -1,   142,   143,    -1,    -1,    -1,
+      -1,   148,    21,    22,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,   158,   159,    -1,    -1,   162,   163,   164,   165,    -1,
+      39,    40,   169,    -1,    -1,    44,    45,    46,    47,   176,
+      -1,    -1,   179,    -1,    -1,    -1,    -1,    56,    57,    58,
+      59,    60,    61,    62,    -1,    64,    65,    66,    -1,    -1,
+      69,    70,    71,    -1,    73,    74,    75,    76,    77,    -1,
+      79,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,   131,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    12,    -1,   142,   143,    -1,    -1,    -1,    -1,   148,
+      21,    22,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   158,
+     159,    -1,    -1,   162,   163,   164,   165,    -1,    39,    40,
+     169,    -1,    -1,    44,    45,    46,    47,   176,    -1,    -1,
+     179,    -1,    -1,    -1,    -1,    56,    57,    58,    59,    60,
+      61,    62,    -1,    64,    65,    66,    -1,    -1,    69,    70,
+      71,    -1,    73,    74,    75,    76,    77,    -1,    79,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+     131,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    12,
+      -1,   142,   143,    -1,    -1,    -1,    -1,   148,    21,    22,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,   158,   159,    -1,
+      -1,   162,   163,   164,   165,    -1,    39,    40,   169,    -1,
+      -1,    44,    45,    46,    47,   176,    -1,    -1,   179,    -1,
+      -1,    -1,    -1,    56,    57,    58,    59,    60,    61,    62,
+      -1,    64,    65,    66,    -1,    -1,    69,    70,    71,    -1,
+      73,    74,    75,    76,    77,    -1,    79,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   131,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    12,    -1,   142,
+     143,    -1,    -1,    -1,    -1,   148,    21,    22,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,   158,   159,    -1,    -1,   162,
+     163,   164,   165,    -1,    39,    40,   169,    -1,    -1,    44,
+      45,    46,    47,   176,    -1,    -1,   179,    -1,    -1,    -1,
+      -1,    56,    57,    58,    59,    60,    61,    62,    -1,    64,
+      65,    66,    -1,    -1,    69,    70,    71,    -1,    73,    74,
+      75,    76,    77,    -1,    79,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,   131,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    12,    -1,   142,   143,    -1,
+      -1,    -1,    -1,   148,    21,    22,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,   158,   159,    -1,    -1,   162,   163,   164,
+     165,    -1,    39,    40,   169,    -1,    -1,    44,    45,    46,
+      47,   176,    -1,    -1,   179,    -1,    -1,    -1,    -1,    56,
+      57,    58,    59,    60,    61,    62,    -1,    64,    65,    66,
+      -1,    -1,    69,    70,    71,    -1,    73,    74,    75,    76,
+      77,    -1,    79,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,   131,    29,    -1,    -1,    32,    33,
+      34,    35,    -1,    -1,    38,   142,   143,    41,    42,    43,
+      -1,   148,    -1,    -1,    48,    49,    -1,    -1,    -1,    -1,
+      -1,   158,   159,    -1,    -1,   162,   163,   164,   165,    63,
+      -1,    -1,   169,    67,    68,    -1,    -1,    -1,    72,   176,
+      -1,    -1,   179,    -1,    78,    -1,    80,    81,    -1,    83,
+      -1,    85,    86,    87,    88,    89,    -1,    91,    92,    93,
+      94,    95,    96,    97,    98,    99,   100,   101,   102,   103,
+     104,   105,   106,    -1,    -1,   109,   110,   111,    -1,   113,
+     114,   115,    -1,   117,   118,   119,    -1,    -1,   122,    -1,
+     124,    -1,    -1,   127,   128,   129,   130,    -1,    -1,   133,
+     134,   135,    -1,    -1,    -1,    -1,    -1,   141,    -1,    -1,
+      -1,   145,   146,   147,   148,   149,   150,   151,    -1,   153,
+     154,   155,   156,   157,    -1,    -1,   160,    -1,    -1,    -1,
+      -1,    39,    40,   167,   168,   169,    44,    45,    46,    47,
+      -1,    -1,   176,    -1,    -1,    -1,    -1,    -1,    56,    57,
+      58,    59,    60,    61,    62,    -1,    64,    65,    66,    -1,
+      -1,    69,    70,    71,    -1,    73,    74,    75,    76,    77,
+      -1,    79,    39,    40,    -1,    -1,    -1,    44,    45,    46,
+      47,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    56,
+      57,    58,    59,    60,    61,    62,    -1,    64,    65,    66,
+      -1,    -1,    69,    70,    71,    -1,    73,    74,    75,    76,
+      77,    -1,    79,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,   142,   143,    -1,    -1,    -1,    -1,
+     148,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+     158,   159,    -1,    -1,   162,   163,   164,   165,    -1,    -1,
+      38,   169,    -1,    -1,    -1,    -1,    -1,    -1,   176,    -1,
+      -1,   179,    -1,    -1,    -1,   142,   143,    -1,    -1,    -1,
+      -1,   148,    -1,    -1,    -1,    63,    -1,    -1,    -1,    -1,
+      -1,   158,   159,    -1,    -1,   162,   163,   164,   165,    -1,
+      78,    -1,   169,    -1,    -1,    83,    84,    -1,    -1,   176,
+      88,    89,   179,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      98,    99,   100,   101,   102,   103,   104,   105,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+     118,    -1,    -1,    -1,    -1,    -1,   124,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,   133,    -1,   135,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,   169,    -1,    -1,    -1,    -1,    -1,    -1,   176
+};
+
+/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
+   symbol of state STATE-NUM.  */
+static const yytype_uint16 yystos[] =
+{
+       0,   191,     0,     1,    36,    37,    53,    54,   144,   177,
+     187,   192,   197,   199,   205,   201,   198,   177,   200,    29,
+      32,    34,    35,    38,    41,    42,    43,    48,    49,    63,
+      67,    68,    72,    78,    80,    81,    83,    85,    86,    87,
+      88,    89,    91,    92,    93,    94,    95,    96,    97,    98,
+      99,   100,   101,   102,   103,   104,   105,   106,   109,   110,
+     111,   113,   114,   115,   117,   118,   119,   122,   124,   127,
+     128,   129,   130,   133,   134,   135,   141,   145,   146,   147,
+     148,   149,   150,   151,   153,   154,   155,   156,   157,   160,
+     167,   168,   169,   176,   193,   194,   195,   202,   203,   206,
+     212,   224,   225,   228,   229,   234,   235,   237,   238,   239,
+     240,   241,   243,   244,   251,   253,   257,   258,   261,   262,
+     263,   298,   308,   309,   315,   316,   317,   318,   319,   321,
+     326,   327,   328,   330,   331,   333,   336,   337,   340,   341,
+     349,   351,   352,   365,   372,   201,   205,   169,   204,   204,
+     179,    12,    21,    22,    39,    40,    44,    45,    46,    47,
+      56,    57,    58,    59,    60,    61,    62,    64,    65,    66,
+      69,    70,    71,    73,    74,    75,    76,    77,    79,   131,
+     142,   143,   148,   158,   159,   162,   163,   164,   165,   176,
+     179,   280,   281,   283,   284,   288,   290,   291,   292,   293,
+     298,   299,   300,   307,   320,   179,   187,   280,   304,   179,
+     217,   218,   179,   280,   303,     4,   187,   221,   187,   221,
+     304,   179,   169,   187,   324,   176,   179,   364,   280,   169,
+     325,   169,   324,   179,   169,   176,   179,   346,   179,   179,
+     221,   221,    20,    24,   247,   298,   179,   216,   123,   137,
+     127,   324,   324,   169,   252,    80,    81,   213,   275,   324,
+      27,   196,   198,    33,   196,   158,   207,   196,   169,   179,
+     249,   250,   169,   226,   231,     3,   248,   169,   230,   247,
+       3,   236,   248,     3,   248,     3,   248,   169,   245,   246,
+     247,     3,     4,    35,   222,   223,   255,   271,   169,   176,
+     268,    23,   179,   259,    23,   179,   266,    23,     4,   329,
+     169,   310,   200,   324,   324,   324,   176,   323,   280,     5,
+     126,   189,   332,     3,   179,   334,   169,   304,   179,   345,
+      21,    22,    23,    50,    51,    52,    55,   169,   179,   288,
+     299,   343,   345,   350,   353,   354,   355,   345,    84,    98,
+     105,   298,   328,   179,   208,   280,   280,   280,   282,   179,
+     179,   179,   282,   280,   282,   179,   179,   179,   179,   179,
+     179,   179,   179,   179,   179,   179,   179,   280,   179,   179,
+     179,   179,   179,   179,   280,   281,   283,   307,   360,   361,
+     362,   179,   280,   283,     5,     7,     8,     9,    10,    11,
+      13,    14,    15,    16,    17,    18,    21,    22,    23,    24,
+      25,   185,   186,   285,   280,   189,   179,   302,   179,   179,
+     169,   158,   301,   302,     3,     4,   180,   280,   219,   298,
+       3,   280,     4,   169,   242,   242,   280,   280,   180,   288,
+     292,   298,   330,   366,   367,   368,   176,   283,   298,   298,
+     367,   369,   298,   371,   242,    40,    44,    45,    46,    47,
+      56,    57,    58,    59,    60,    61,    62,    64,    65,    66,
+      69,    70,    71,    74,    75,    76,    77,    79,   169,   214,
+     215,   169,   298,   220,   280,     3,     3,   221,   194,   200,
+     204,   196,     5,   249,     3,    24,   179,   187,   248,     3,
+      24,   230,   247,   179,   276,   230,   298,   247,   169,   169,
+     247,   276,     3,   245,    29,    82,   109,   111,   112,   113,
+     116,   117,   119,   120,   272,   273,   275,     4,   204,     3,
+     256,   254,     5,    23,   269,   280,   180,   176,   179,   169,
+     260,   269,   179,   267,   280,   268,   176,   276,     3,   205,
+     248,   298,   322,   373,   280,   280,   298,   176,    23,   280,
+     335,   338,   339,    23,    25,   179,   298,   347,   348,   353,
+     354,   280,   280,   280,   280,     5,   353,   179,   281,   288,
+     299,   342,   356,   357,   358,     3,   344,    20,    23,    24,
+      25,   355,   353,   360,   179,   179,    23,   169,   180,   210,
+     211,    30,   180,     3,   180,   282,   282,   280,   180,   180,
+     180,   280,   280,   280,   280,   280,   280,   280,   280,   280,
+     280,   280,   280,   180,   282,   282,   282,   282,   282,   280,
+     283,   361,   362,     3,   132,     3,     3,   282,   180,     3,
+       5,   280,   287,   280,   280,   280,   280,   280,   280,   280,
+     280,   280,   280,   280,   280,   280,   280,     5,    24,   280,
+     286,   280,     5,   280,     5,   280,   288,   303,   289,   294,
+     294,   280,   280,   180,     3,   180,   276,   218,   180,     3,
+     180,     3,   179,     3,   370,   180,   180,   180,     3,   370,
+       3,   180,     3,    24,     3,   180,   179,   169,   324,   208,
+     280,   180,   250,   227,   232,   233,   284,   280,   169,   169,
+     231,   227,   248,     4,    23,   277,   278,   279,   280,   248,
+     276,   276,   248,   246,   276,   179,     3,     4,   208,   254,
+     169,   269,   260,     5,   269,   180,     3,   270,    23,   180,
+     276,    31,   169,   311,   312,     5,   329,   364,   180,     3,
+     353,    23,    25,   179,   280,     3,   180,   180,   280,   180,
+     356,   285,   359,   359,     3,   359,   356,   353,   353,   353,
+     353,   353,   366,   369,     3,   180,   179,   209,   304,   280,
+     180,   180,   180,   180,   180,   180,   180,   180,   180,   180,
+     180,   180,   180,   180,   180,   180,   180,   180,   180,   180,
+     180,     3,     3,     3,   280,   362,   280,   362,   280,   362,
+     180,   283,   280,   280,   280,   280,   280,     4,     4,   280,
+     295,   296,   297,   180,   180,   298,   169,    84,   280,   295,
+     125,   367,   180,   367,   180,   298,   214,   280,   220,    24,
+       3,    21,    22,    23,   188,   299,   180,    24,    24,   230,
+     280,     3,   180,     4,   298,    23,   264,   264,   245,   138,
+     139,   140,   274,   273,     4,   169,   276,   180,   269,   270,
+     169,   180,     4,   126,     3,   280,   276,   339,   180,   280,
+     297,   189,   348,   353,     3,   180,   285,   358,   370,   370,
+     211,   180,   210,   169,   363,   363,   363,   180,   303,     4,
+     280,     4,     3,   302,   276,   180,   180,     5,   180,   227,
+     232,   232,   232,   232,   227,   278,   279,   280,   179,   265,
+     280,   180,   276,   264,   270,   269,   169,   187,   313,   314,
+     169,   312,     3,   276,   180,   330,   363,   359,   180,   180,
+     180,     5,   180,   180,   180,   180,   280,     4,   280,   296,
+       3,   298,    24,    23,   264,   305,   306,   126,     3,   280,
+     180,   280,   280,     4,   280,   180,   305,     5,   169,   314,
+       3,     3,   280,   280,   280,   280,     3,   280
+};
+
+#define yyerrok		(yyerrstatus = 0)
+#define yyclearin	(yychar = YYEMPTY)
+#define YYEMPTY		(-2)
+#define YYEOF		0
+
+#define YYACCEPT	goto yyacceptlab
+#define YYABORT		goto yyabortlab
+#define YYERROR		goto yyerrorlab
+
+
+/* Like YYERROR except do call yyerror.  This remains here temporarily
+   to ease the transition to the new meaning of YYERROR, for GCC.
+   Once GCC version 2 has supplanted version 1, this can go.  */
+
+#define YYFAIL		goto yyerrlab
+
+#define YYRECOVERING()  (!!yyerrstatus)
+
+#define YYBACKUP(Token, Value)					\
+do								\
+  if (yychar == YYEMPTY && yylen == 1)				\
+    {								\
+      yychar = (Token);						\
+      yylval = (Value);						\
+      yytoken = YYTRANSLATE (yychar);				\
+      YYPOPSTACK (1);						\
+      goto yybackup;						\
+    }								\
+  else								\
+    {								\
+      yyerror (YY_("syntax error: cannot back up")); \
+      YYERROR;							\
+    }								\
+while (YYID (0))
+
+
+#define YYTERROR	1
+#define YYERRCODE	256
+
+
+/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
+   If N is 0, then set CURRENT to the empty location which ends
+   the previous symbol: RHS[0] (always defined).  */
+
+#define YYRHSLOC(Rhs, K) ((Rhs)[K])
+#ifndef YYLLOC_DEFAULT
+# define YYLLOC_DEFAULT(Current, Rhs, N)				\
+    do									\
+      if (YYID (N))                                                    \
+	{								\
+	  (Current).first_line   = YYRHSLOC (Rhs, 1).first_line;	\
+	  (Current).first_column = YYRHSLOC (Rhs, 1).first_column;	\
+	  (Current).last_line    = YYRHSLOC (Rhs, N).last_line;		\
+	  (Current).last_column  = YYRHSLOC (Rhs, N).last_column;	\
+	}								\
+      else								\
+	{								\
+	  (Current).first_line   = (Current).last_line   =		\
+	    YYRHSLOC (Rhs, 0).last_line;				\
+	  (Current).first_column = (Current).last_column =		\
+	    YYRHSLOC (Rhs, 0).last_column;				\
+	}								\
+    while (YYID (0))
+#endif
+
+
+/* YY_LOCATION_PRINT -- Print the location on the stream.
+   This macro was not mandated originally: define only if we know
+   we won't break user code: when these are the locations we know.  */
+
+#ifndef YY_LOCATION_PRINT
+# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
+#  define YY_LOCATION_PRINT(File, Loc)			\
+     fprintf (File, "%d.%d-%d.%d",			\
+	      (Loc).first_line, (Loc).first_column,	\
+	      (Loc).last_line,  (Loc).last_column)
+# else
+#  define YY_LOCATION_PRINT(File, Loc) ((void) 0)
+# endif
+#endif
+
+
+/* YYLEX -- calling `yylex' with the right arguments.  */
+
+#ifdef YYLEX_PARAM
+# define YYLEX yylex (YYLEX_PARAM)
+#else
+# define YYLEX yylex ()
+#endif
+
+/* Enable debugging if requested.  */
+#if YYDEBUG
+
+# ifndef YYFPRINTF
+#  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
+#  define YYFPRINTF fprintf
+# endif
+
+# define YYDPRINTF(Args)			\
+do {						\
+  if (yydebug)					\
+    YYFPRINTF Args;				\
+} while (YYID (0))
+
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location)			  \
+do {									  \
+  if (yydebug)								  \
+    {									  \
+      YYFPRINTF (stderr, "%s ", Title);					  \
+      yy_symbol_print (stderr,						  \
+		  Type, Value); \
+      YYFPRINTF (stderr, "\n");						  \
+    }									  \
+} while (YYID (0))
+
+
+/*--------------------------------.
+| Print this symbol on YYOUTPUT.  |
+`--------------------------------*/
+
+/*ARGSUSED*/
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+static void
+yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
+#else
+static void
+yy_symbol_value_print (yyoutput, yytype, yyvaluep)
+    FILE *yyoutput;
+    int yytype;
+    YYSTYPE const * const yyvaluep;
+#endif
+{
+  if (!yyvaluep)
+    return;
+# ifdef YYPRINT
+  if (yytype < YYNTOKENS)
+    YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
+# else
+  YYUSE (yyoutput);
+# endif
+  switch (yytype)
+    {
+      default:
+	break;
+    }
+}
+
+
+/*--------------------------------.
+| Print this symbol on YYOUTPUT.  |
+`--------------------------------*/
+
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+static void
+yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
+#else
+static void
+yy_symbol_print (yyoutput, yytype, yyvaluep)
+    FILE *yyoutput;
+    int yytype;
+    YYSTYPE const * const yyvaluep;
+#endif
+{
+  if (yytype < YYNTOKENS)
+    YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
+  else
+    YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
+
+  yy_symbol_value_print (yyoutput, yytype, yyvaluep);
+  YYFPRINTF (yyoutput, ")");
+}
+
+/*------------------------------------------------------------------.
+| yy_stack_print -- Print the state stack from its BOTTOM up to its |
+| TOP (included).                                                   |
+`------------------------------------------------------------------*/
+
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+static void
+yy_stack_print (yytype_int16 *bottom, yytype_int16 *top)
+#else
+static void
+yy_stack_print (bottom, top)
+    yytype_int16 *bottom;
+    yytype_int16 *top;
+#endif
+{
+  YYFPRINTF (stderr, "Stack now");
+  for (; bottom <= top; ++bottom)
+    YYFPRINTF (stderr, " %d", *bottom);
+  YYFPRINTF (stderr, "\n");
+}
+
+# define YY_STACK_PRINT(Bottom, Top)				\
+do {								\
+  if (yydebug)							\
+    yy_stack_print ((Bottom), (Top));				\
+} while (YYID (0))
+
+
+/*------------------------------------------------.
+| Report that the YYRULE is going to be reduced.  |
+`------------------------------------------------*/
+
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+static void
+yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
+#else
+static void
+yy_reduce_print (yyvsp, yyrule)
+    YYSTYPE *yyvsp;
+    int yyrule;
+#endif
+{
+  int yynrhs = yyr2[yyrule];
+  int yyi;
+  unsigned long int yylno = yyrline[yyrule];
+  YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
+	     yyrule - 1, yylno);
+  /* The symbols being reduced.  */
+  for (yyi = 0; yyi < yynrhs; yyi++)
+    {
+      fprintf (stderr, "   $%d = ", yyi + 1);
+      yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
+		       &(yyvsp[(yyi + 1) - (yynrhs)])
+		       		       );
+      fprintf (stderr, "\n");
+    }
+}
+
+# define YY_REDUCE_PRINT(Rule)		\
+do {					\
+  if (yydebug)				\
+    yy_reduce_print (yyvsp, Rule); \
+} while (YYID (0))
+
+/* Nonzero means print parse trace.  It is left uninitialized so that
+   multiple parsers can coexist.  */
+int yydebug;
+#else /* !YYDEBUG */
+# define YYDPRINTF(Args)
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
+# define YY_STACK_PRINT(Bottom, Top)
+# define YY_REDUCE_PRINT(Rule)
+#endif /* !YYDEBUG */
+
+
+/* YYINITDEPTH -- initial size of the parser's stacks.  */
+#ifndef	YYINITDEPTH
+# define YYINITDEPTH 200
+#endif
+
+/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
+   if the built-in stack extension method is used).
+
+   Do not make this value too large; the results are undefined if
+   YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
+   evaluated with infinite-precision integer arithmetic.  */
+
+#ifndef YYMAXDEPTH
+# define YYMAXDEPTH 10000
+#endif
+
+
+
+
+#if YYERROR_VERBOSE
+
+# ifndef yystrlen
+#  if defined __GLIBC__ && defined _STRING_H
+#   define yystrlen strlen
+#  else
+/* Return the length of YYSTR.  */
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+static YYSIZE_T
+yystrlen (const char *yystr)
+#else
+static YYSIZE_T
+yystrlen (yystr)
+    const char *yystr;
+#endif
+{
+  YYSIZE_T yylen;
+  for (yylen = 0; yystr[yylen]; yylen++)
+    continue;
+  return yylen;
+}
+#  endif
+# endif
+
+# ifndef yystpcpy
+#  if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
+#   define yystpcpy stpcpy
+#  else
+/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
+   YYDEST.  */
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+static char *
+yystpcpy (char *yydest, const char *yysrc)
+#else
+static char *
+yystpcpy (yydest, yysrc)
+    char *yydest;
+    const char *yysrc;
+#endif
+{
+  char *yyd = yydest;
+  const char *yys = yysrc;
+
+  while ((*yyd++ = *yys++) != '\0')
+    continue;
+
+  return yyd - 1;
+}
+#  endif
+# endif
+
+# ifndef yytnamerr
+/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
+   quotes and backslashes, so that it's suitable for yyerror.  The
+   heuristic is that double-quoting is unnecessary unless the string
+   contains an apostrophe, a comma, or backslash (other than
+   backslash-backslash).  YYSTR is taken from yytname.  If YYRES is
+   null, do not copy; instead, return the length of what the result
+   would have been.  */
+static YYSIZE_T
+yytnamerr (char *yyres, const char *yystr)
+{
+  if (*yystr == '"')
+    {
+      YYSIZE_T yyn = 0;
+      char const *yyp = yystr;
+
+      for (;;)
+	switch (*++yyp)
+	  {
+	  case '\'':
+	  case ',':
+	    goto do_not_strip_quotes;
+
+	  case '\\':
+	    if (*++yyp != '\\')
+	      goto do_not_strip_quotes;
+	    /* Fall through.  */
+	  default:
+	    if (yyres)
+	      yyres[yyn] = *yyp;
+	    yyn++;
+	    break;
+
+	  case '"':
+	    if (yyres)
+	      yyres[yyn] = '\0';
+	    return yyn;
+	  }
+    do_not_strip_quotes: ;
+    }
+
+  if (! yyres)
+    return yystrlen (yystr);
+
+  return yystpcpy (yyres, yystr) - yyres;
+}
+# endif
+
+/* Copy into YYRESULT an error message about the unexpected token
+   YYCHAR while in state YYSTATE.  Return the number of bytes copied,
+   including the terminating null byte.  If YYRESULT is null, do not
+   copy anything; just return the number of bytes that would be
+   copied.  As a special case, return 0 if an ordinary "syntax error"
+   message will do.  Return YYSIZE_MAXIMUM if overflow occurs during
+   size calculation.  */
+static YYSIZE_T
+yysyntax_error (char *yyresult, int yystate, int yychar)
+{
+  int yyn = yypact[yystate];
+
+  if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
+    return 0;
+  else
+    {
+      int yytype = YYTRANSLATE (yychar);
+      YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
+      YYSIZE_T yysize = yysize0;
+      YYSIZE_T yysize1;
+      int yysize_overflow = 0;
+      enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
+      char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
+      int yyx;
+
+# if 0
+      /* This is so xgettext sees the translatable formats that are
+	 constructed on the fly.  */
+      YY_("syntax error, unexpected %s");
+      YY_("syntax error, unexpected %s, expecting %s");
+      YY_("syntax error, unexpected %s, expecting %s or %s");
+      YY_("syntax error, unexpected %s, expecting %s or %s or %s");
+      YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
+# endif
+      char *yyfmt;
+      char const *yyf;
+      static char const yyunexpected[] = "syntax error, unexpected %s";
+      static char const yyexpecting[] = ", expecting %s";
+      static char const yyor[] = " or %s";
+      char yyformat[sizeof yyunexpected
+		    + sizeof yyexpecting - 1
+		    + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
+		       * (sizeof yyor - 1))];
+      char const *yyprefix = yyexpecting;
+
+      /* Start YYX at -YYN if negative to avoid negative indexes in
+	 YYCHECK.  */
+      int yyxbegin = yyn < 0 ? -yyn : 0;
+
+      /* Stay within bounds of both yycheck and yytname.  */
+      int yychecklim = YYLAST - yyn + 1;
+      int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
+      int yycount = 1;
+
+      yyarg[0] = yytname[yytype];
+      yyfmt = yystpcpy (yyformat, yyunexpected);
+
+      for (yyx = yyxbegin; yyx < yyxend; ++yyx)
+	if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
+	  {
+	    if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
+	      {
+		yycount = 1;
+		yysize = yysize0;
+		yyformat[sizeof yyunexpected - 1] = '\0';
+		break;
+	      }
+	    yyarg[yycount++] = yytname[yyx];
+	    yysize1 = yysize + yytnamerr (0, yytname[yyx]);
+	    yysize_overflow |= (yysize1 < yysize);
+	    yysize = yysize1;
+	    yyfmt = yystpcpy (yyfmt, yyprefix);
+	    yyprefix = yyor;
+	  }
+
+      yyf = YY_(yyformat);
+      yysize1 = yysize + yystrlen (yyf);
+      yysize_overflow |= (yysize1 < yysize);
+      yysize = yysize1;
+
+      if (yysize_overflow)
+	return YYSIZE_MAXIMUM;
+
+      if (yyresult)
+	{
+	  /* Avoid sprintf, as that infringes on the user's name space.
+	     Don't have undefined behavior even if the translation
+	     produced a string with the wrong number of "%s"s.  */
+	  char *yyp = yyresult;
+	  int yyi = 0;
+	  while ((*yyp = *yyf) != '\0')
+	    {
+	      if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
+		{
+		  yyp += yytnamerr (yyp, yyarg[yyi++]);
+		  yyf += 2;
+		}
+	      else
+		{
+		  yyp++;
+		  yyf++;
+		}
+	    }
+	}
+      return yysize;
+    }
+}
+#endif /* YYERROR_VERBOSE */
+
+
+
+/*-----------------------------------------------.
+| Release the memory associated to this symbol.  |
+`-----------------------------------------------*/
+
+/*ARGSUSED*/
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+static void
+yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
+#else
+static void
+yydestruct (yymsg, yytype, yyvaluep)
+    const char *yymsg;
+    int yytype;
+    YYSTYPE *yyvaluep;
+#endif
+{
+  YYUSE (yyvaluep);
+
+  if (!yymsg)
+    yymsg = "Deleting";
+  YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
+
+  switch (yytype)
+    {
+
+      default:
+	break;
+    }
+}
+
+
+
+/* Prevent warnings from -Wmissing-prototypes.  */
+
+#ifdef YYPARSE_PARAM
+#if defined __STDC__ || defined __cplusplus
+int yyparse (void *YYPARSE_PARAM);
+#else
+int yyparse ();
+#endif
+#else /* ! YYPARSE_PARAM */
+#if defined __STDC__ || defined __cplusplus
+int yyparse (void);
+#else
+int yyparse ();
+#endif
+#endif /* ! YYPARSE_PARAM */
+
+
+
+/* The look-ahead symbol.  */
+int yychar;
+
+/* The semantic value of the look-ahead symbol.  */
+YYSTYPE yylval;
+
+/* Number of syntax errors so far.  */
+int yynerrs;
+
+
+
+/*----------.
+| yyparse.  |
+`----------*/
+
+#ifdef YYPARSE_PARAM
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+int
+yyparse (void *YYPARSE_PARAM)
+#else
+int
+yyparse (YYPARSE_PARAM)
+    void *YYPARSE_PARAM;
+#endif
+#else /* ! YYPARSE_PARAM */
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+int
+yyparse (void)
+#else
+int
+yyparse ()
+
+#endif
+#endif
+{
+  
+  int yystate;
+  int yyn;
+  int yyresult;
+  /* Number of tokens to shift before error messages enabled.  */
+  int yyerrstatus;
+  /* Look-ahead token as an internal (translated) token number.  */
+  int yytoken = 0;
+#if YYERROR_VERBOSE
+  /* Buffer for error messages, and its allocated size.  */
+  char yymsgbuf[128];
+  char *yymsg = yymsgbuf;
+  YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
+#endif
+
+  /* Three stacks and their tools:
+     `yyss': related to states,
+     `yyvs': related to semantic values,
+     `yyls': related to locations.
+
+     Refer to the stacks thru separate pointers, to allow yyoverflow
+     to reallocate them elsewhere.  */
+
+  /* The state stack.  */
+  yytype_int16 yyssa[YYINITDEPTH];
+  yytype_int16 *yyss = yyssa;
+  yytype_int16 *yyssp;
+
+  /* The semantic value stack.  */
+  YYSTYPE yyvsa[YYINITDEPTH];
+  YYSTYPE *yyvs = yyvsa;
+  YYSTYPE *yyvsp;
+
+
+
+#define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N))
+
+  YYSIZE_T yystacksize = YYINITDEPTH;
+
+  /* The variables used to return semantic value and location from the
+     action routines.  */
+  YYSTYPE yyval;
+
+
+  /* The number of symbols on the RHS of the reduced rule.
+     Keep to zero when no symbol should be popped.  */
+  int yylen = 0;
+
+  YYDPRINTF ((stderr, "Starting parse\n"));
+
+  yystate = 0;
+  yyerrstatus = 0;
+  yynerrs = 0;
+  yychar = YYEMPTY;		/* Cause a token to be read.  */
+
+  /* Initialize stack pointers.
+     Waste one element of value and location stack
+     so that they stay on the same level as the state stack.
+     The wasted elements are never initialized.  */
+
+  yyssp = yyss;
+  yyvsp = yyvs;
+
+  goto yysetstate;
+
+/*------------------------------------------------------------.
+| yynewstate -- Push a new state, which is found in yystate.  |
+`------------------------------------------------------------*/
+ yynewstate:
+  /* In all cases, when you get here, the value and location stacks
+     have just been pushed.  So pushing a state here evens the stacks.  */
+  yyssp++;
+
+ yysetstate:
+  *yyssp = yystate;
+
+  if (yyss + yystacksize - 1 <= yyssp)
+    {
+      /* Get the current used size of the three stacks, in elements.  */
+      YYSIZE_T yysize = yyssp - yyss + 1;
+
+#ifdef yyoverflow
+      {
+	/* Give user a chance to reallocate the stack.  Use copies of
+	   these so that the &'s don't force the real ones into
+	   memory.  */
+	YYSTYPE *yyvs1 = yyvs;
+	yytype_int16 *yyss1 = yyss;
+
+
+	/* Each stack pointer address is followed by the size of the
+	   data in use in that stack, in bytes.  This used to be a
+	   conditional around just the two extra args, but that might
+	   be undefined if yyoverflow is a macro.  */
+	yyoverflow (YY_("memory exhausted"),
+		    &yyss1, yysize * sizeof (*yyssp),
+		    &yyvs1, yysize * sizeof (*yyvsp),
+
+		    &yystacksize);
+
+	yyss = yyss1;
+	yyvs = yyvs1;
+      }
+#else /* no yyoverflow */
+# ifndef YYSTACK_RELOCATE
+      goto yyexhaustedlab;
+# else
+      /* Extend the stack our own way.  */
+      if (YYMAXDEPTH <= yystacksize)
+	goto yyexhaustedlab;
+      yystacksize *= 2;
+      if (YYMAXDEPTH < yystacksize)
+	yystacksize = YYMAXDEPTH;
+
+      {
+	yytype_int16 *yyss1 = yyss;
+	union yyalloc *yyptr =
+	  (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
+	if (! yyptr)
+	  goto yyexhaustedlab;
+	YYSTACK_RELOCATE (yyss);
+	YYSTACK_RELOCATE (yyvs);
+
+#  undef YYSTACK_RELOCATE
+	if (yyss1 != yyssa)
+	  YYSTACK_FREE (yyss1);
+      }
+# endif
+#endif /* no yyoverflow */
+
+      yyssp = yyss + yysize - 1;
+      yyvsp = yyvs + yysize - 1;
+
+
+      YYDPRINTF ((stderr, "Stack size increased to %lu\n",
+		  (unsigned long int) yystacksize));
+
+      if (yyss + yystacksize - 1 <= yyssp)
+	YYABORT;
+    }
+
+  YYDPRINTF ((stderr, "Entering state %d\n", yystate));
+
+  goto yybackup;
+
+/*-----------.
+| yybackup.  |
+`-----------*/
+yybackup:
+
+  /* Do appropriate processing given the current state.  Read a
+     look-ahead token if we need one and don't already have one.  */
+
+  /* First try to decide what to do without reference to look-ahead token.  */
+  yyn = yypact[yystate];
+  if (yyn == YYPACT_NINF)
+    goto yydefault;
+
+  /* Not known => get a look-ahead token if don't already have one.  */
+
+  /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol.  */
+  if (yychar == YYEMPTY)
+    {
+      YYDPRINTF ((stderr, "Reading a token: "));
+      yychar = YYLEX;
+    }
+
+  if (yychar <= YYEOF)
+    {
+      yychar = yytoken = YYEOF;
+      YYDPRINTF ((stderr, "Now at end of input.\n"));
+    }
+  else
+    {
+      yytoken = YYTRANSLATE (yychar);
+      YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
+    }
+
+  /* If the proper action on seeing token YYTOKEN is to reduce or to
+     detect an error, take that action.  */
+  yyn += yytoken;
+  if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
+    goto yydefault;
+  yyn = yytable[yyn];
+  if (yyn <= 0)
+    {
+      if (yyn == 0 || yyn == YYTABLE_NINF)
+	goto yyerrlab;
+      yyn = -yyn;
+      goto yyreduce;
+    }
+
+  if (yyn == YYFINAL)
+    YYACCEPT;
+
+  /* Count tokens shifted since error; after three, turn off error
+     status.  */
+  if (yyerrstatus)
+    yyerrstatus--;
+
+  /* Shift the look-ahead token.  */
+  YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
+
+  /* Discard the shifted token unless it is eof.  */
+  if (yychar != YYEOF)
+    yychar = YYEMPTY;
+
+  yystate = yyn;
+  *++yyvsp = yylval;
+
+  goto yynewstate;
+
+
+/*-----------------------------------------------------------.
+| yydefault -- do the default action for the current state.  |
+`-----------------------------------------------------------*/
+yydefault:
+  yyn = yydefact[yystate];
+  if (yyn == 0)
+    goto yyerrlab;
+  goto yyreduce;
+
+
+/*-----------------------------.
+| yyreduce -- Do a reduction.  |
+`-----------------------------*/
+yyreduce:
+  /* yyn is the number of a rule to reduce with.  */
+  yylen = yyr2[yyn];
+
+  /* If YYLEN is nonzero, implement the default value of the action:
+     `$$ = $1'.
+
+     Otherwise, the following line sets YYVAL to garbage.
+     This behavior is undocumented and Bison
+     users should not rely upon it.  Assigning to YYVAL
+     unconditionally makes the parser a bit smaller, and it avoids a
+     GCC warning that YYVAL may be used uninitialized.  */
+  yyval = yyvsp[1-yylen];
+
+
+  YY_REDUCE_PRINT (yyn);
+  switch (yyn)
+    {
+        case 8:
+#line 344 "fortran.y"
+    {yyerrok;yyclearin;;}
+    break;
+
+  case 13:
+#line 352 "fortran.y"
+    {
+                     if (inmoduledeclare == 0 )
+                     {
+                        pos_end = setposcur();
+                        RemoveWordSET_0(fortranout,pos_curinclude,
+                                              pos_end-pos_curinclude);
+                     }
+                  ;}
+    break;
+
+  case 18:
+#line 368 "fortran.y"
+    {
+            /* we should ignore the declaration until the keyword             */
+            /*    TOK_ENDDONOTTREAT                                           */
+            couldaddvariable = 0 ;
+            RemoveWordCUR_0(fortranout,-20,20);
+         ;}
+    break;
+
+  case 19:
+#line 375 "fortran.y"
+    {
+             couldaddvariable = 1 ;
+             RemoveWordCUR_0(fortranout,-24,24);
+          ;}
+    break;
+
+  case 22:
+#line 382 "fortran.y"
+    {pos_cur = setposcur();;}
+    break;
+
+  case 27:
+#line 394 "fortran.y"
+    {if (incom !=1) {strcpy(curbuf,"");incom=0;};}
+    break;
+
+  case 28:
+#line 397 "fortran.y"
+    {isrecursive = 0;;}
+    break;
+
+  case 29:
+#line 399 "fortran.y"
+    {isrecursive = 1;;}
+    break;
+
+  case 31:
+#line 403 "fortran.y"
+    {
+                      if ( couldaddvariable == 1)
+                      {
+                      /* open param file                                      */
+                      if ( firstpass == 0 )
+                      {
+                         sprintf(ligne,"%s/ParamFile%s.h",nomdir,(yyvsp[(3) - (4)].nac));
+                         paramout=fopen(ligne,"w");
+                         if ( retour77 == 0 ) fprintf(paramout,"!\n");
+                         else fprintf(paramout,"C\n");
+
+                      }
+                      Add_SubroutineArgument_Var_1((yyvsp[(4) - (4)].l));
+                      if ( inmodulemeet == 1 )
+                      {
+                         insubroutinedeclare = 1;
+                         /* in the second step we should write the head of    */
+                         /*    the subroutine sub_loop_<subroutinename>       */
+                         writeheadnewsub_0(1);
+                      }
+                      else
+                      {
+                            insubroutinedeclare = 1;
+                            writeheadnewsub_0(1);
+                      }
+                      }
+                   ;}
+    break;
+
+  case 32:
+#line 431 "fortran.y"
+    {
+                      /* open param file                                      */
+                      if ( firstpass == 0 )
+                      {
+                         sprintf(ligne,"%s/ParamFile%s.h",nomdir,(yyvsp[(2) - (2)].nac));
+                         paramout=fopen(ligne,"w");
+                         if ( retour77 == 0 ) fprintf(paramout,"!\n");
+                         else fprintf(paramout,"C\n");
+
+                      }
+                      strcpy(subroutinename,(yyvsp[(2) - (2)].nac));
+                      /* Common case                                          */
+                      insubroutinedeclare = 1;
+                      /* in the second step we should write the head of       */
+                      /*    the subroutine sub_loop_<subroutinename>          */
+                      writeheadnewsub_0(1);
+                   ;}
+    break;
+
+  case 33:
+#line 449 "fortran.y"
+    {
+                      /* open param file                                      */
+                      if ( firstpass == 0 )
+                      {
+                         sprintf(ligne,"%s/ParamFile%s.h",nomdir,(yyvsp[(2) - (5)].nac));
+                         paramout=fopen(ligne,"w");
+                         if ( retour77 == 0 ) fprintf(paramout,"!\n");
+                         else fprintf(paramout,"C\n");
+                      }
+                      strcpy(subroutinename,(yyvsp[(2) - (5)].nac));
+                      if ( inmodulemeet == 1 )
+                      {
+                         insubroutinedeclare = 1;
+                         /* we should to list of the subroutine argument the  */
+                         /*    name of the function which has to be defined   */
+                         Add_SubroutineArgument_Var_1((yyvsp[(3) - (5)].l));
+                         strcpy(DeclType,"");
+                         /* in the second step we should write the head of    */
+                         /*    the subroutine sub_loop_<subroutinename>       */
+                         writeheadnewsub_0(2);
+                      }
+                      else
+                      {
+                            insubroutinedeclare = 1;
+                            /* we should to list of the subroutine argument   */
+                            /* name of the function which has to be defined   */
+                            Add_SubroutineArgument_Var_1((yyvsp[(3) - (5)].l));
+                            strcpy(DeclType,"");
+                            Add_FunctionType_Var_1((yyvsp[(2) - (5)].nac));
+                            writeheadnewsub_0(2);
+                      }
+                   ;}
+    break;
+
+  case 34:
+#line 482 "fortran.y"
+    {
+                      /* open param file                                      */
+                      if ( firstpass == 0 )
+                      {
+                         sprintf(ligne,"%s/ParamFile%s.h",nomdir,(yyvsp[(2) - (3)].nac));
+                         paramout=fopen(ligne,"w");
+                         if ( retour77 == 0 ) fprintf(paramout,"!\n");
+                         else fprintf(paramout,"C\n");
+                      }
+                      strcpy(subroutinename,(yyvsp[(2) - (3)].nac));
+                      if ( inmodulemeet == 1 )
+                      {
+                         insubroutinedeclare = 1;
+                         /* we should to list of the subroutine argument the  */
+                         /*    name of the function which has to be defined   */
+                         Add_SubroutineArgument_Var_1((yyvsp[(3) - (3)].l));
+                         strcpy(DeclType,"");
+                         Add_FunctionType_Var_1((yyvsp[(2) - (3)].nac));
+                         /* in the second step we should write the head of    */
+                         /*    the subroutine sub_loop_<subroutinename>       */
+                         writeheadnewsub_0(2);
+                      }
+                      else
+                      {
+                            insubroutinedeclare = 1;
+                            /* we should to list of the subroutine argument   */
+                            /* name of the function which has to be defined   */
+                            Add_SubroutineArgument_Var_1((yyvsp[(3) - (3)].l));
+                            strcpy(DeclType,"");
+                            Add_FunctionType_Var_1((yyvsp[(2) - (3)].nac));
+                            writeheadnewsub_0(2);
+                      }
+                   ;}
+    break;
+
+  case 35:
+#line 516 "fortran.y"
+    {
+                      GlobalDeclaration = 0;
+                      strcpy(curmodulename,(yyvsp[(2) - (2)].nac));
+                      strcpy(subroutinename,"");
+                      Add_NameOfModule_1((yyvsp[(2) - (2)].nac));
+                      if ( inmoduledeclare == 0 )
+                      {
+                         /* To know if there are in the module declaration    */
+                         inmoduledeclare = 1;
+                         /* to know if a module has been met                  */
+                         inmodulemeet = 1;
+                         /* to know if we are after the keyword contains      */
+                         aftercontainsdeclare = 0 ;
+                      }
+                   ;}
+    break;
+
+  case 36:
+#line 533 "fortran.y"
+    {
+                      if ( couldaddvariable == 1 )
+                      {
+                         strcpy((yyval.nac),(yyvsp[(1) - (1)].nac));strcpy(subroutinename,(yyvsp[(1) - (1)].nac));
+                      }
+                   ;}
+    break;
+
+  case 38:
+#line 542 "fortran.y"
+    {
+                      pos_curinclude = setposcur()-9;
+                   ;}
+    break;
+
+  case 39:
+#line 546 "fortran.y"
+    {
+                      if ( couldaddvariable == 1 ) Add_Include_1((yyvsp[(1) - (1)].nac));
+                   ;}
+    break;
+
+  case 40:
+#line 550 "fortran.y"
+    {
+                      if ( firstpass == 1 && couldaddvariable == 1) (yyval.l)=NULL;
+                   ;}
+    break;
+
+  case 41:
+#line 553 "fortran.y"
+    {
+                      if ( firstpass == 1 && couldaddvariable == 1 ) (yyval.l)=NULL;
+                   ;}
+    break;
+
+  case 42:
+#line 557 "fortran.y"
+    {
+                       if ( firstpass == 1 && couldaddvariable == 1 ) (yyval.l)=(yyvsp[(2) - (3)].l);
+                   ;}
+    break;
+
+  case 45:
+#line 564 "fortran.y"
+    {
+                      if ( couldaddvariable == 1 )
+                      {
+                         Add_SubroutineArgument_Var_1((yyvsp[(2) - (3)].l));
+                      }
+                   ;}
+    break;
+
+  case 46:
+#line 571 "fortran.y"
+    {
+                      if ( firstpass == 1  && couldaddvariable == 1)
+                      {
+                         strcpy(nameinttypenameback,nameinttypename);
+                         strcpy(nameinttypename,"");
+                         curvar=createvar((yyvsp[(1) - (1)].na),NULL);
+                        strcpy(nameinttypename,nameinttypenameback);
+                         curlistvar=insertvar(NULL,curvar);
+                         (yyval.l)=settype("",curlistvar);
+                      }
+                   ;}
+    break;
+
+  case 47:
+#line 583 "fortran.y"
+    {
+                      if ( firstpass == 1  && couldaddvariable == 1)
+                      {
+                         strcpy(nameinttypenameback,nameinttypename);
+                         strcpy(nameinttypename,"");                      
+                         curvar=createvar((yyvsp[(3) - (3)].na),NULL);
+                         strcpy(nameinttypename,nameinttypenameback);                         
+                         (yyval.l)=insertvar((yyvsp[(1) - (3)].l),curvar);
+                      }
+                   ;}
+    break;
+
+  case 48:
+#line 594 "fortran.y"
+    {if ( couldaddvariable == 1 ) strcpy((yyval.na),(yyvsp[(1) - (1)].nac));;}
+    break;
+
+  case 49:
+#line 595 "fortran.y"
+    {if ( couldaddvariable == 1 ) strcpy((yyval.na),"*");;}
+    break;
+
+  case 50:
+#line 598 "fortran.y"
+    {
+                      if ( VarTypepar == 1 )
+                      {
+                         couldaddvariable = 1 ;
+                         VarTypepar = 0;
+                      }
+                   ;}
+    break;
+
+  case 51:
+#line 606 "fortran.y"
+    {
+                      if ( couldaddvariable == 1 )
+                      {
+                         VarType = 1;
+                         couldaddvariable = 0 ;
+                      }
+                   ;}
+    break;
+
+  case 52:
+#line 614 "fortran.y"
+    {
+                      if ( VarType == 1 ) couldaddvariable = 1 ;
+                      VarType = 0;
+                      VarTypepar = 0;
+                   ;}
+    break;
+
+  case 54:
+#line 621 "fortran.y"
+    {
+                      if ( couldaddvariable == 1 )
+                      {
+                         if ( insubroutinedeclare == 0 )
+                         {
+                                                  Add_GlobalParameter_Var_1((yyvsp[(3) - (4)].l));
+                                                  }
+                         else Add_Parameter_Var_1((yyvsp[(3) - (4)].l));
+                         pos_end = setposcur();
+                        RemoveWordSET_0(fortranout,pos_cur_decl,
+                                                    pos_end-pos_cur_decl);
+                      }
+                      VariableIsParameter =  0 ;
+                   ;}
+    break;
+
+  case 55:
+#line 636 "fortran.y"
+    {
+                     if ( couldaddvariable == 1 )
+                     {
+                        if ( insubroutinedeclare == 0 )
+                                                  Add_GlobalParameter_Var_1((yyvsp[(2) - (2)].l));
+                         else Add_Parameter_Var_1((yyvsp[(2) - (2)].l));
+                         pos_end = setposcur();
+                         RemoveWordSET_0(fortranout,pos_cur_decl,
+                                                    pos_end-pos_cur_decl);
+                      }
+                      VariableIsParameter =  0 ;
+                   ;}
+    break;
+
+  case 57:
+#line 650 "fortran.y"
+    {
+                     pos_end = setposcur();
+                     RemoveWordSET_0(fortranout,pos_cursave,
+                                                pos_end-pos_cursave);
+                  ;}
+    break;
+
+  case 59:
+#line 657 "fortran.y"
+    {
+                   /* if the variable is a parameter we can suppose that is   */
+                   /*    value is the same on each grid. It is not useless to */
+                   /*    create a copy of it on each grid                     */
+                      if ( couldaddvariable == 1 )
+                      {
+                         Add_Globliste_1((yyvsp[(1) - (1)].l));
+                         /* if variableparamlists has been declared in a      */
+                         /*    subroutine                                     */
+                         if ( insubroutinedeclare == 1 )
+                         {
+                            Add_Dimension_Var_1((yyvsp[(1) - (1)].l));
+                         }
+                         pos_end = setposcur();
+                         RemoveWordSET_0(fortranout,pos_curdimension,
+                                                pos_end-pos_curdimension);
+                      }
+                      /*                                                      */
+                      PublicDeclare = 0;
+                      PrivateDeclare = 0;
+                      ExternalDeclare = 0;
+                      strcpy(NamePrecision,"");
+                      c_star = 0;
+                      InitialValueGiven = 0 ;
+                      strcpy(IntentSpec,"");
+                      VariableIsParameter =  0 ;
+                      Allocatabledeclare = 0 ;
+                      Targetdeclare = 0 ;
+                      SaveDeclare = 0;
+                      pointerdeclare = 0;
+                      optionaldeclare = 0 ;
+                      dimsgiven=0;
+                      c_selectorgiven=0;
+                      strcpy(nameinttypename,"");
+                      strcpy(c_selectorname,"");
+                   ;}
+    break;
+
+  case 60:
+#line 694 "fortran.y"
+    {
+      if (firstpass == 0)
+      {
+      if ((yyvsp[(1) - (1)].lnn))
+      {
+      removeglobfromlist(&((yyvsp[(1) - (1)].lnn)));
+      pos_end = setposcur();
+      RemoveWordSET_0(fortranout,pos_cur,pos_end-pos_cur);
+      writelistpublic((yyvsp[(1) - (1)].lnn));
+      }
+      }
+      ;}
+    break;
+
+  case 70:
+#line 716 "fortran.y"
+    {
+                      /* we should remove the data declaration                */
+                      if ( couldaddvariable == 1 && aftercontainsdeclare != 2 )
+                      {
+                        pos_end = setposcur();
+                        RemoveWordSET_0(fortranout,pos_curdata,
+                                              pos_end-pos_curdata);
+                      }
+                      if ( couldaddvariable == 1 && aftercontainsdeclare == 1 )
+                      {
+                      if (firstpass == 0)
+                      {
+                        ReWriteDataStatement_0(fortranout);
+                        pos_end = setposcur();
+                        }
+                      }
+                  ;}
+    break;
+
+  case 72:
+#line 736 "fortran.y"
+    {
+         PublicDeclare = 0 ;
+         PrivateDeclare = 0 ;
+      ;}
+    break;
+
+  case 110:
+#line 787 "fortran.y"
+    {
+                      /* if the variable is a parameter we can suppose that is*/
+                      /*    value is the same on each grid. It is not useless */
+                      /*    to create a copy of it on each grid               */
+                      if ( couldaddvariable == 1 )
+                      {
+                      pos_end = setposcur();
+                      /*if (insubroutinedeclare == 0)
+                        {   */
+                         RemoveWordSET_0(fortranout,pos_cur_decl,
+                                                 pos_end-pos_cur_decl);
+                                         
+                       /* }
+                      else
+                       {*/
+                        ReWriteDeclarationAndAddTosubroutine_01((yyvsp[(1) - (2)].l));
+                        pos_cur_decl = setposcur();
+                        
+                       /*}*/
+                      if ( firstpass == 0 &&
+                           GlobalDeclaration == 0 &&
+                           insubroutinedeclare == 0 )
+                      {
+
+                         sprintf(ligne,"\n#include \"Module_Declar_%s.h\"\n"
+                                                                ,curmodulename);
+                         tofich(fortranout,ligne,1);
+                         sprintf (ligne, "Module_Declar_%s.h",curmodulename);
+                         module_declar = associate(ligne);
+                         sprintf (ligne, " ");
+                         tofich (module_declar, ligne,1);
+                         GlobalDeclaration = 1 ;
+                         pos_cur_decl = setposcur();
+
+                      }
+                         (yyval.l) = (yyvsp[(1) - (2)].l);
+                         Add_Globliste_1((yyvsp[(1) - (2)].l));
+                                                  
+                         if ( insubroutinedeclare == 0 )
+                                                  Add_GlobalParameter_Var_1((yyvsp[(1) - (2)].l));
+                         else
+                         {
+                            if ( pointerdeclare == 1 )
+                                                Add_Pointer_Var_From_List_1((yyvsp[(1) - (2)].l));
+                            Add_Parameter_Var_1((yyvsp[(1) - (2)].l));
+                         }
+
+                         /* if variables has been declared in a subroutine    */
+                         if ( insubroutinedeclare == 1 )
+                         { 
+                       /*    Add_SubroutineDeclaration_Var_1($1);*/
+                         }
+                         /* If there are a SAVE declarations in module's      */
+                         /*    subroutines we should remove it from the       */
+                         /*    subroutines declaration and add it in the      */
+                         /*    global declarations                            */
+                         if ( aftercontainsdeclare == 1 &&
+                              SaveDeclare == 1 && firstpass == 1 )
+                         {
+                              if ( inmodulemeet == 0 ) Add_Save_Var_dcl_1((yyvsp[(1) - (2)].l));
+                              else  Add_SubroutineDeclarationSave_Var_1((yyvsp[(1) - (2)].l));
+                         }
+                      }
+                      /*                                                      */
+                      PublicDeclare = 0;
+                      PrivateDeclare = 0;
+                      ExternalDeclare = 0;
+                      strcpy(NamePrecision,"");
+                      c_star = 0;
+                      InitialValueGiven = 0 ;
+                      strcpy(IntentSpec,"");
+                      VariableIsParameter =  0 ;
+                      Allocatabledeclare = 0 ;
+                      Targetdeclare = 0 ;
+                      SaveDeclare = 0;
+                      pointerdeclare = 0;
+                      optionaldeclare = 0 ;
+                      dimsgiven=0;
+                      c_selectorgiven=0;
+                      strcpy(nameinttypename,"");
+                      strcpy(c_selectorname,"");
+                   ;}
+    break;
+
+  case 111:
+#line 870 "fortran.y"
+    {
+                      /* open param file                                      */
+                      if ( firstpass == 0 )
+                      {
+                         sprintf(ligne,"%s/ParamFile%s.h",nomdir,(yyvsp[(2) - (3)].nac));
+                         paramout=fopen(ligne,"w");
+                         if ( retour77 == 0 ) fprintf(paramout,"!\n");
+                         else fprintf(paramout,"C\n");
+                      }
+                      strcpy(subroutinename,(yyvsp[(2) - (3)].nac));
+                      if ( inmodulemeet == 1 )
+                      {
+                         insubroutinedeclare = 1;
+                         /* we should to list of the subroutine argument the  */
+                         /*    name of the function which has to be defined   */
+                         Add_SubroutineArgument_Var_1((yyvsp[(3) - (3)].l));
+                         Add_FunctionType_Var_1((yyvsp[(2) - (3)].nac));
+                         /* in the second step we should write the head of    */
+                         /*    the subroutine sub_loop_<subroutinename>       */
+                         writeheadnewsub_0(2);
+                      }
+                      else
+                      {
+                         insubroutinedeclare = 1;
+                         /* we should to list of the subroutine argument the  */
+                         /*    name of the function which has to be defined   */
+                         Add_SubroutineArgument_Var_1((yyvsp[(3) - (3)].l));
+                         Add_FunctionType_Var_1((yyvsp[(2) - (3)].nac));
+                         /* in the second step we should write the head of    */
+                         /*    the subroutine sub_loop_<subroutinename>       */
+                         writeheadnewsub_0(2);
+                      }
+                      strcpy(nameinttypename,"");
+
+                   ;}
+    break;
+
+  case 112:
+#line 907 "fortran.y"
+    {
+                       functiondeclarationisdone = 1;
+                   ;}
+    break;
+
+  case 113:
+#line 913 "fortran.y"
+    {
+                      VariableIsParameter = 1;
+                      pos_curparameter = setposcur()-9;
+                   ;}
+    break;
+
+  case 114:
+#line 918 "fortran.y"
+    {
+                      pos_curdata = setposcur()-strlen((yyvsp[(1) - (1)].nac));
+                      Init_List_Data_Var();
+                   ;}
+    break;
+
+  case 115:
+#line 923 "fortran.y"
+    {
+                      if ( couldaddvariable == 1 )
+                      {
+/*                      if ( aftercontainsdeclare == 1 ) strcpy(ligne,"");
+                      else */
+/*                      sprintf(ligne,"%s",$3);*/
+                      createstringfromlistname(ligne,(yyvsp[(3) - (4)].lnn));
+                      if (firstpass == 1)
+                      Add_Data_Var_1(&List_Data_Var,(yyvsp[(1) - (4)].nac),ligne);
+                      else
+                      Add_Data_Var_1(&List_Data_Var_Cur,(yyvsp[(1) - (4)].nac),ligne);
+                      }
+                   ;}
+    break;
+
+  case 116:
+#line 937 "fortran.y"
+    {
+                      if ( couldaddvariable == 1 )
+                      {
+                      /*if ( aftercontainsdeclare == 1 ) strcpy(ligne,"");
+                      else */
+                      /*sprintf(ligne,"%s",$5);   */
+                      createstringfromlistname(ligne,(yyvsp[(5) - (6)].lnn));                      
+                      if (firstpass == 1)                      
+                      Add_Data_Var_1(&List_Data_Var,(yyvsp[(3) - (6)].nac),ligne);
+                      else
+                      Add_Data_Var_1(&List_Data_Var_Cur,(yyvsp[(3) - (6)].nac),ligne);                      
+                      }
+                   ;}
+    break;
+
+  case 117:
+#line 951 "fortran.y"
+    {
+                       /*******************************************************/
+                       /*******************************************************/
+                       /*******************************************************/
+                       /*******************************************************/
+                       /*******************************************************/
+                       /*******************************************************/
+                       /*******************************************************/
+                       if (firstpass == 1)
+                       Add_Data_Var_Names_01(&List_Data_Var,(yyvsp[(1) - (4)].lnn),(yyvsp[(3) - (4)].lnn));
+                       else
+                       Add_Data_Var_Names_01(&List_Data_Var_Cur,(yyvsp[(1) - (4)].lnn),(yyvsp[(3) - (4)].lnn));
+                   ;}
+    break;
+
+  case 118:
+#line 966 "fortran.y"
+    {
+                      if ( couldaddvariable == 1 )
+                      {
+                         (yyval.lnn) = Insertname(NULL,(yyvsp[(1) - (1)].na),0);
+                      }
+                   ;}
+    break;
+
+  case 119:
+#line 973 "fortran.y"
+    {
+                      if ( couldaddvariable == 1 )
+                      {
+                         (yyval.lnn) = Insertname((yyvsp[(3) - (3)].lnn),(yyvsp[(1) - (3)].na),1);
+                      }
+                   ;}
+    break;
+
+  case 124:
+#line 987 "fortran.y"
+    {
+                     pos_cursave = setposcur()-4;
+                  ;}
+    break;
+
+  case 126:
+#line 993 "fortran.y"
+    {
+                     if ( couldaddvariable == 1 ) Add_Save_Var_1((yyvsp[(1) - (2)].nac),(yyvsp[(2) - (2)].d));
+                  ;}
+    break;
+
+  case 127:
+#line 998 "fortran.y"
+    {
+		(yyval.lnn)=Insertname(NULL,(yyvsp[(1) - (1)].nac),0);
+		;}
+    break;
+
+  case 128:
+#line 1002 "fortran.y"
+    {
+      printf("INSTRUCTION NON TRAITEE : INITIALISATION DE DATA AVEC EXPRESSION\n");
+      exit(0);
+      ;}
+    break;
+
+  case 129:
+#line 1007 "fortran.y"
+    {
+      (yyval.lnn) = concat_listname((yyvsp[(1) - (3)].lnn),(yyvsp[(3) - (3)].lnn));
+      ;}
+    break;
+
+  case 130:
+#line 1012 "fortran.y"
+    {if ( couldaddvariable == 1 ) sprintf((yyval.na),"%s%s",(yyvsp[(1) - (2)].nac),(yyvsp[(2) - (2)].nac));;}
+    break;
+
+  case 131:
+#line 1014 "fortran.y"
+    {if ( couldaddvariable == 1 ) sprintf((yyval.na),"%s+%s",(yyvsp[(1) - (3)].na),(yyvsp[(3) - (3)].na));;}
+    break;
+
+  case 132:
+#line 1016 "fortran.y"
+    {if ( couldaddvariable == 1 ) sprintf((yyval.na),"%s-%s",(yyvsp[(1) - (3)].na),(yyvsp[(3) - (3)].na));;}
+    break;
+
+  case 133:
+#line 1018 "fortran.y"
+    {if ( couldaddvariable == 1 ) sprintf((yyval.na),"%s*%s",(yyvsp[(1) - (3)].na),(yyvsp[(3) - (3)].na));;}
+    break;
+
+  case 134:
+#line 1020 "fortran.y"
+    {if ( couldaddvariable == 1 ) sprintf((yyval.na),"%s/%s",(yyvsp[(1) - (3)].na),(yyvsp[(3) - (3)].na));;}
+    break;
+
+  case 135:
+#line 1023 "fortran.y"
+    {if ( couldaddvariable == 1 ) strcpy((yyval.nac),"");;}
+    break;
+
+  case 136:
+#line 1025 "fortran.y"
+    {if ( couldaddvariable == 1 ) strcpy((yyval.nac),(yyvsp[(1) - (1)].nac));;}
+    break;
+
+  case 143:
+#line 1037 "fortran.y"
+    {
+	ininterfacedeclare = 1 ;
+	printf("INTEFACE entree\n");
+	;}
+    break;
+
+  case 144:
+#line 1042 "fortran.y"
+    {
+      ininterfacedeclare = 0;
+      ;}
+    break;
+
+  case 145:
+#line 1047 "fortran.y"
+    {
+                      positioninblock=0;
+                      pos_curdimension = setposcur()-9;
+                   ;}
+    break;
+
+  case 146:
+#line 1053 "fortran.y"
+    {
+         if ( couldaddvariable == 1 )
+         {
+            /*                                                                */
+            curvar=createvar((yyvsp[(3) - (5)].nac),(yyvsp[(4) - (5)].d));
+            /*                                                                */
+            CreateAndFillin_Curvar("",curvar);
+            /*                                                                */
+            curlistvar=insertvar(NULL,curvar);
+            /*                                                                */
+            (yyval.l)=settype("",curlistvar);
+            /*                                                                */
+            strcpy(vallengspec,"");
+         }
+      ;}
+    break;
+
+  case 147:
+#line 1069 "fortran.y"
+    {
+         if ( couldaddvariable == 1 )
+         {
+            /*                                                                */
+            curvar=createvar((yyvsp[(3) - (5)].nac),(yyvsp[(4) - (5)].d));
+            /*                                                                */
+            CreateAndFillin_Curvar("",curvar);
+            /*                                                                */
+            curlistvar=insertvar((yyvsp[(1) - (5)].l),curvar);
+            /*                                                                */
+            (yyval.l)=curlistvar;
+            /*                                                                */
+            strcpy(vallengspec,"");
+         }
+      ;}
+    break;
+
+  case 150:
+#line 1089 "fortran.y"
+    {
+        (yyval.lnn)=(listname *)NULL;
+        ;}
+    break;
+
+  case 151:
+#line 1093 "fortran.y"
+    {
+          (yyval.lnn)=(yyvsp[(3) - (3)].lnn);
+         ;}
+    break;
+
+  case 152:
+#line 1098 "fortran.y"
+    {
+           (yyval.lnn) = Insertname(NULL,(yyvsp[(1) - (1)].nac),0);
+           ;}
+    break;
+
+  case 153:
+#line 1102 "fortran.y"
+    {
+          (yyval.lnn) = Insertname((yyvsp[(1) - (3)].lnn),(yyvsp[(3) - (3)].nac),0);
+          ;}
+    break;
+
+  case 154:
+#line 1107 "fortran.y"
+    {
+                         pos_end = setposcur();
+                         RemoveWordSET_0(fortranout,pos_curcommon,
+                                                  pos_end-pos_curcommon);
+                   ;}
+    break;
+
+  case 155:
+#line 1113 "fortran.y"
+    {
+                         if ( couldaddvariable == 1 )
+                         {
+                            sprintf(charusemodule,"%s",(yyvsp[(2) - (3)].nac));
+                            Add_NameOfCommon_1((yyvsp[(2) - (3)].nac),subroutinename);
+                            pos_end = setposcur();
+                            RemoveWordSET_0(fortranout,pos_curcommon,
+                                                       pos_end-pos_curcommon);
+                         }
+                   ;}
+    break;
+
+  case 156:
+#line 1124 "fortran.y"
+    {
+                         if ( couldaddvariable == 1 )
+                         {
+                            sprintf(charusemodule,"%s",(yyvsp[(3) - (5)].nac));
+                            Add_NameOfCommon_1((yyvsp[(3) - (5)].nac),subroutinename);
+                            pos_end = setposcur();
+                            RemoveWordSET_0(fortranout,pos_curcommon,
+                                                       pos_end-pos_curcommon);
+                         }
+                   ;}
+    break;
+
+  case 157:
+#line 1136 "fortran.y"
+    {
+                      positioninblock=0;
+                      pos_curcommon = setposcur()-6;
+                   ;}
+    break;
+
+  case 158:
+#line 1141 "fortran.y"
+    {
+                      positioninblock=0;
+                      pos_curcommon = setposcur()-6-7;
+                   ;}
+    break;
+
+  case 159:
+#line 1147 "fortran.y"
+    {
+                      if ( couldaddvariable == 1 ) Add_Common_var_1();
+                   ;}
+    break;
+
+  case 160:
+#line 1152 "fortran.y"
+    {
+                      if ( couldaddvariable == 1 ) Add_Common_var_1();
+                   ;}
+    break;
+
+  case 161:
+#line 1156 "fortran.y"
+    {
+                      if ( couldaddvariable == 1 )
+                      {
+                         positioninblock = positioninblock + 1 ;
+                         strcpy(commonvar,(yyvsp[(1) - (2)].nac));
+                         commondim = (yyvsp[(2) - (2)].d);
+                      }
+                   ;}
+    break;
+
+  case 162:
+#line 1166 "fortran.y"
+    {
+                      if ( couldaddvariable == 1 )
+                      {
+                         strcpy((yyval.nac),"");
+                         positioninblock=0;
+                         strcpy(commonblockname,"");
+                      }
+                   ;}
+    break;
+
+  case 163:
+#line 1175 "fortran.y"
+    {
+                      if ( couldaddvariable == 1 )
+                      {
+                         strcpy((yyval.nac),(yyvsp[(2) - (3)].nac));
+                         positioninblock=0;
+                         strcpy(commonblockname,(yyvsp[(2) - (3)].nac));
+                      }
+                   ;}
+    break;
+
+  case 166:
+#line 1188 "fortran.y"
+    {
+                      if ( couldaddvariable == 1 ) (yyval.l)=insertvar(NULL,(yyvsp[(1) - (1)].v));
+                   ;}
+    break;
+
+  case 167:
+#line 1192 "fortran.y"
+    {
+                      if ( couldaddvariable == 1 ) (yyval.l)=insertvar((yyvsp[(1) - (3)].l),(yyvsp[(3) - (3)].v));
+                   ;}
+    break;
+
+  case 168:
+#line 1197 "fortran.y"
+    {
+                     if ( couldaddvariable == 1 )
+                     {
+                         curvar=(variable *) malloc(sizeof(variable));
+                         /*                                                   */
+                         Init_Variable(curvar);
+                         /*                                                   */
+                         curvar->v_VariableIsParameter=1;
+                         strcpy(curvar->v_nomvar,(yyvsp[(1) - (3)].nac));
+                         Save_Length((yyvsp[(1) - (3)].nac),4);
+                         strcpy(curvar->v_subroutinename,subroutinename);
+                         Save_Length(subroutinename,11);
+                         strcpy(curvar->v_modulename,curmodulename);
+                         Save_Length(curmodulename,6);
+                         strcpy(curvar->v_initialvalue,(yyvsp[(3) - (3)].na));
+                         Save_Length((yyvsp[(3) - (3)].na),14);
+                         strcpy(curvar->v_commoninfile,mainfile);
+                         Save_Length(mainfile,10);
+                         (yyval.v)=curvar;
+                      }
+                   ;}
+    break;
+
+  case 172:
+#line 1225 "fortran.y"
+    {
+                       if ( insubroutinedeclare == 1 )
+                       {
+                          Add_ImplicitNoneSubroutine_1();
+                          pos_end = setposcur();
+                          RemoveWordSET_0(fortranout,pos_end-13,
+                                                             13);
+                       }
+                    ;}
+    break;
+
+  case 175:
+#line 1239 "fortran.y"
+    {
+                      if ( couldaddvariable == 1 )
+                      {
+                         /*                                                   */
+                         if (dimsgiven == 1)
+                         {
+                            curvar=createvar((yyvsp[(3) - (6)].nac),curdim);
+                         }
+                         else
+                         {
+                            curvar=createvar((yyvsp[(3) - (6)].nac),(yyvsp[(4) - (6)].d));
+                         }
+                         /*                                                   */
+                         CreateAndFillin_Curvar(DeclType,curvar);
+                         /*                                                   */
+                         curlistvar=insertvar(NULL,curvar);
+                         if (!strcasecmp(DeclType,"character"))
+                         {
+                            if (c_selectorgiven == 1)
+                            {
+                               strcpy(c_selectordim.first,"1");
+                               strcpy(c_selectordim.last,c_selectorname);
+                               Save_Length(c_selectorname,1);
+                               change_dim_char
+                                     (insertdim(NULL,c_selectordim),curlistvar);
+                            }
+                         }
+                         (yyval.l)=settype(DeclType,curlistvar);
+                      }
+                      strcpy(vallengspec,"");
+                   ;}
+    break;
+
+  case 176:
+#line 1271 "fortran.y"
+    {
+                      if ( couldaddvariable == 1 )
+                      {
+                         if (dimsgiven == 1)
+                         {
+                            curvar=createvar((yyvsp[(4) - (7)].nac),curdim);
+                         }
+                         else
+                         {
+                            curvar=createvar((yyvsp[(4) - (7)].nac),(yyvsp[(5) - (7)].d));
+                         }
+                         /*                                                   */
+                         CreateAndFillin_Curvar((yyvsp[(1) - (7)].l)->var->v_typevar,curvar);
+                         /*                                                   */
+                         strcpy(curvar->v_typevar,((yyvsp[(1) - (7)].l)->var->v_typevar));
+                         Save_Length((yyvsp[(1) - (7)].l)->var->v_typevar,3);
+                         /*                                                   */
+                         curlistvar=insertvar((yyvsp[(1) - (7)].l),curvar);
+                         if (!strcasecmp(DeclType,"character"))
+                         {
+                            if (c_selectorgiven == 1)
+                            {
+                               strcpy(c_selectordim.first,"1");
+                               strcpy(c_selectordim.last,c_selectorname);
+                               Save_Length(c_selectorname,1);
+                               change_dim_char
+                                     (insertdim(NULL,c_selectordim),curlistvar);
+                            }
+                         }
+                         (yyval.l)=curlistvar;
+                      }
+                      strcpy(vallengspec,"");
+                   ;}
+    break;
+
+  case 177:
+#line 1305 "fortran.y"
+    {dimsgiven=0;;}
+    break;
+
+  case 178:
+#line 1308 "fortran.y"
+    {strcpy(DeclType,(yyvsp[(1) - (2)].nac));;}
+    break;
+
+  case 179:
+#line 1310 "fortran.y"
+    {
+                      strcpy(DeclType,"CHARACTER");
+                   ;}
+    break;
+
+  case 180:
+#line 1314 "fortran.y"
+    {
+                      strcpy(DeclType,(yyvsp[(1) - (3)].nac));
+                      strcpy(nameinttypename,(yyvsp[(3) - (3)].nac));
+                   ;}
+    break;
+
+  case 181:
+#line 1319 "fortran.y"
+    {
+                      strcpy(DeclType,"TYPE");
+                   ;}
+    break;
+
+  case 182:
+#line 1324 "fortran.y"
+    {
+                 /*     if ( couldaddvariable == 1 ) VarTypepar = 1 ;
+                      couldaddvariable = 0 ;
+                      pos_cur_decl = setposcur()-5;*/
+                   pos_cur_decl = setposcur()-5;
+                   ;}
+    break;
+
+  case 184:
+#line 1333 "fortran.y"
+    {c_selectorgiven=1;strcpy(c_selectorname,(yyvsp[(2) - (2)].nac));;}
+    break;
+
+  case 185:
+#line 1334 "fortran.y"
+    {c_star = 1;;}
+    break;
+
+  case 190:
+#line 1342 "fortran.y"
+    {
+                      pos_cur_decl = setposcur()-9;
+                   ;}
+    break;
+
+  case 191:
+#line 1346 "fortran.y"
+    {strcpy((yyval.nac),(yyvsp[(1) - (1)].nac));;}
+    break;
+
+  case 192:
+#line 1349 "fortran.y"
+    {
+                      strcpy((yyval.nac),"INTEGER");
+                      pos_cur_decl = setposcur()-7;
+                   ;}
+    break;
+
+  case 193:
+#line 1353 "fortran.y"
+    {
+                      strcpy((yyval.nac),"REAL");
+                      pos_cur_decl = setposcur()-4;
+                   ;}
+    break;
+
+  case 194:
+#line 1358 "fortran.y"
+    {strcpy((yyval.nac),"COMPLEX");
+                   pos_cur_decl = setposcur()-7;;}
+    break;
+
+  case 195:
+#line 1361 "fortran.y"
+    {
+                      pos_cur_decl = setposcur()-16;
+                      strcpy((yyval.nac),"REAL");
+                      strcpy(nameinttypename,"8");
+                   ;}
+    break;
+
+  case 196:
+#line 1367 "fortran.y"
+    {strcpy((yyval.nac),"DOUBLE COMPLEX");;}
+    break;
+
+  case 197:
+#line 1369 "fortran.y"
+    {
+                      strcpy((yyval.nac),"LOGICAL");
+                      pos_cur_decl = setposcur()-7;
+                   ;}
+    break;
+
+  case 199:
+#line 1375 "fortran.y"
+    {strcpy(vallengspec,(yyvsp[(2) - (2)].na));;}
+    break;
+
+  case 200:
+#line 1377 "fortran.y"
+    {sprintf((yyval.na),"*%s",(yyvsp[(1) - (1)].na));;}
+    break;
+
+  case 201:
+#line 1378 "fortran.y"
+    {strcpy((yyval.na),"*(*)");;}
+    break;
+
+  case 208:
+#line 1389 "fortran.y"
+    {
+                      if ( strstr((yyvsp[(3) - (3)].na),"0.d0") )
+                      {
+                         strcpy(nameinttypename,"8");
+                         sprintf(NamePrecision,"");
+                      }
+                      else sprintf(NamePrecision,"%s = %s",(yyvsp[(1) - (3)].nac),(yyvsp[(3) - (3)].na));
+                   ;}
+    break;
+
+  case 209:
+#line 1398 "fortran.y"
+    {
+                      strcpy(NamePrecision,(yyvsp[(1) - (1)].nac));
+                   ;}
+    break;
+
+  case 210:
+#line 1402 "fortran.y"
+    {
+                      strcpy(NamePrecision,(yyvsp[(1) - (1)].nac));
+                   ;}
+    break;
+
+  case 211:
+#line 1406 "fortran.y"
+    {strcpy(CharacterSize,(yyvsp[(1) - (1)].na));
+                    strcpy((yyval.na),(yyvsp[(1) - (1)].na));;}
+    break;
+
+  case 212:
+#line 1408 "fortran.y"
+    {strcpy(CharacterSize,"*");
+                    strcpy((yyval.na),"*");;}
+    break;
+
+  case 220:
+#line 1422 "fortran.y"
+    {
+                      VariableIsParameter = 1;
+                   ;}
+    break;
+
+  case 222:
+#line 1427 "fortran.y"
+    {Allocatabledeclare = 1;;}
+    break;
+
+  case 223:
+#line 1429 "fortran.y"
+    {
+                      dimsgiven=1;
+                      curdim=(yyvsp[(2) - (2)].d);
+                   ;}
+    break;
+
+  case 224:
+#line 1434 "fortran.y"
+    {ExternalDeclare = 1;;}
+    break;
+
+  case 225:
+#line 1436 "fortran.y"
+    {strcpy(IntentSpec,(yyvsp[(3) - (4)].nac));;}
+    break;
+
+  case 227:
+#line 1438 "fortran.y"
+    {optionaldeclare = 1 ;;}
+    break;
+
+  case 228:
+#line 1439 "fortran.y"
+    {pointerdeclare = 1 ;;}
+    break;
+
+  case 229:
+#line 1440 "fortran.y"
+    {
+/*                       if ( inmodulemeet == 1 )
+                       {*/
+                          SaveDeclare = 1 ;
+                     /*  }*/
+                    ;}
+    break;
+
+  case 230:
+#line 1447 "fortran.y"
+    {Targetdeclare = 1;;}
+    break;
+
+  case 231:
+#line 1449 "fortran.y"
+    {strcpy((yyval.nac),(yyvsp[(1) - (1)].nac));;}
+    break;
+
+  case 232:
+#line 1450 "fortran.y"
+    {strcpy((yyval.nac),(yyvsp[(1) - (1)].nac));;}
+    break;
+
+  case 233:
+#line 1451 "fortran.y"
+    {strcpy((yyval.nac),(yyvsp[(1) - (1)].nac)); ;}
+    break;
+
+  case 234:
+#line 1454 "fortran.y"
+    {PublicDeclare = 1;;}
+    break;
+
+  case 235:
+#line 1456 "fortran.y"
+    {PrivateDeclare = 1;;}
+    break;
+
+  case 236:
+#line 1458 "fortran.y"
+    {if ( created_dimensionlist == 1 )
+                       {
+                           (yyval.d)=(listdim *)NULL;
+                       }
+                   ;}
+    break;
+
+  case 237:
+#line 1464 "fortran.y"
+    {if ( created_dimensionlist == 1 ||
+                         agrif_parentcall      == 1 ) (yyval.d)=(yyvsp[(2) - (3)].d);;}
+    break;
+
+  case 238:
+#line 1467 "fortran.y"
+    {if ( created_dimensionlist == 1 ||
+                         agrif_parentcall      == 1 ) (yyval.d)=insertdim(NULL,(yyvsp[(1) - (1)].dim1));;}
+    break;
+
+  case 239:
+#line 1470 "fortran.y"
+    {if ( couldaddvariable == 1 )
+                         if ( created_dimensionlist == 1 ) (yyval.d)=insertdim((yyvsp[(1) - (3)].d),(yyvsp[(3) - (3)].dim1));;}
+    break;
+
+  case 240:
+#line 1473 "fortran.y"
+    {
+                      strcpy((yyval.dim1).first,"1");
+                      strcpy((yyval.dim1).last,(yyvsp[(1) - (1)].na));
+                      Save_Length((yyvsp[(1) - (1)].na),1);
+                   ;}
+    break;
+
+  case 241:
+#line 1478 "fortran.y"
+    {
+                      strcpy((yyval.dim1).first,"");
+                      strcpy((yyval.dim1).last,"");
+                   ;}
+    break;
+
+  case 242:
+#line 1482 "fortran.y"
+    {
+                      strcpy((yyval.dim1).first,(yyvsp[(1) - (2)].na));
+                      Save_Length((yyvsp[(1) - (2)].na),2);
+                      strcpy((yyval.dim1).last,"");
+                   ;}
+    break;
+
+  case 243:
+#line 1487 "fortran.y"
+    {
+                      strcpy((yyval.dim1).first,"");
+                      strcpy((yyval.dim1).last,(yyvsp[(2) - (2)].na));
+                      Save_Length((yyvsp[(2) - (2)].na),1);
+                   ;}
+    break;
+
+  case 244:
+#line 1493 "fortran.y"
+    {
+                      strcpy((yyval.dim1).first,(yyvsp[(1) - (3)].na));
+                      Save_Length((yyvsp[(1) - (3)].na),2);
+                      strcpy((yyval.dim1).last,(yyvsp[(3) - (3)].na));
+                      Save_Length((yyvsp[(3) - (3)].na),1);
+                   ;}
+    break;
+
+  case 245:
+#line 1500 "fortran.y"
+    {strcpy((yyval.na),"*");;}
+    break;
+
+  case 246:
+#line 1501 "fortran.y"
+    {strcpy((yyval.na),(yyvsp[(1) - (1)].na));;}
+    break;
+
+  case 247:
+#line 1503 "fortran.y"
+    {if ( couldaddvariable == 1 ) strcpy((yyval.na),(yyvsp[(1) - (1)].na));;}
+    break;
+
+  case 248:
+#line 1505 "fortran.y"
+    {if ( couldaddvariable == 1 ) sprintf((yyval.na),"(%s)",(yyvsp[(2) - (3)].na));;}
+    break;
+
+  case 249:
+#line 1507 "fortran.y"
+    {if ( couldaddvariable == 1 ) strcpy((yyval.na),(yyvsp[(1) - (1)].na));;}
+    break;
+
+  case 250:
+#line 1509 "fortran.y"
+    {if ( couldaddvariable == 1 ) strcpy((yyval.na),(yyvsp[(1) - (1)].na));;}
+    break;
+
+  case 251:
+#line 1513 "fortran.y"
+    {sprintf((yyval.na),"SUM(%s)",(yyvsp[(2) - (3)].na));;}
+    break;
+
+  case 252:
+#line 1515 "fortran.y"
+    {sprintf((yyval.na),"MAX(%s)",(yyvsp[(2) - (3)].na));;}
+    break;
+
+  case 253:
+#line 1517 "fortran.y"
+    {sprintf((yyval.na),"TANH(%s)",(yyvsp[(3) - (4)].na));;}
+    break;
+
+  case 254:
+#line 1519 "fortran.y"
+    {sprintf((yyval.na),"MAXVAL(%s)",(yyvsp[(3) - (4)].na));;}
+    break;
+
+  case 255:
+#line 1521 "fortran.y"
+    {sprintf((yyval.na),"MIN(%s)",(yyvsp[(2) - (3)].na));;}
+    break;
+
+  case 256:
+#line 1523 "fortran.y"
+    {sprintf((yyval.na),"MINVAL(%s)",(yyvsp[(3) - (4)].na));;}
+    break;
+
+  case 257:
+#line 1525 "fortran.y"
+    {sprintf((yyval.na),"TRIM(%s)",(yyvsp[(3) - (4)].na));;}
+    break;
+
+  case 258:
+#line 1527 "fortran.y"
+    {sprintf((yyval.na),"SQRT(%s)",(yyvsp[(2) - (3)].na));;}
+    break;
+
+  case 259:
+#line 1529 "fortran.y"
+    {sprintf((yyval.na),"REAL(%s)",(yyvsp[(3) - (4)].na));;}
+    break;
+
+  case 260:
+#line 1531 "fortran.y"
+    {sprintf((yyval.na),"NINT(%s)",(yyvsp[(3) - (4)].na));;}
+    break;
+
+  case 261:
+#line 1533 "fortran.y"
+    {sprintf((yyval.na),"FLOAT(%s)",(yyvsp[(3) - (4)].na));;}
+    break;
+
+  case 262:
+#line 1535 "fortran.y"
+    {sprintf((yyval.na),"EXP(%s)",(yyvsp[(3) - (4)].na));;}
+    break;
+
+  case 263:
+#line 1537 "fortran.y"
+    {sprintf((yyval.na),"COS(%s)",(yyvsp[(3) - (4)].na));;}
+    break;
+
+  case 264:
+#line 1539 "fortran.y"
+    {sprintf((yyval.na),"COSH(%s)",(yyvsp[(3) - (4)].na));;}
+    break;
+
+  case 265:
+#line 1541 "fortran.y"
+    {sprintf((yyval.na),"ACOS(%s)",(yyvsp[(3) - (4)].na));;}
+    break;
+
+  case 266:
+#line 1543 "fortran.y"
+    {sprintf((yyval.na),"SIN(%s)",(yyvsp[(3) - (4)].na));;}
+    break;
+
+  case 267:
+#line 1545 "fortran.y"
+    {sprintf((yyval.na),"SINH(%s)",(yyvsp[(3) - (4)].na));;}
+    break;
+
+  case 268:
+#line 1547 "fortran.y"
+    {sprintf((yyval.na),"ASIN(%s)",(yyvsp[(3) - (4)].na));;}
+    break;
+
+  case 269:
+#line 1549 "fortran.y"
+    {sprintf((yyval.na),"LOG(%s)",(yyvsp[(3) - (4)].na));;}
+    break;
+
+  case 270:
+#line 1551 "fortran.y"
+    {sprintf((yyval.na),"TAN(%s)",(yyvsp[(3) - (4)].na));;}
+    break;
+
+  case 271:
+#line 1553 "fortran.y"
+    {sprintf((yyval.na),"ATAN(%s)",(yyvsp[(3) - (4)].na));;}
+    break;
+
+  case 272:
+#line 1555 "fortran.y"
+    {sprintf((yyval.na),"ABS(%s)",(yyvsp[(2) - (3)].na));;}
+    break;
+
+  case 273:
+#line 1557 "fortran.y"
+    {sprintf((yyval.na),"MOD(%s)",(yyvsp[(3) - (4)].na));;}
+    break;
+
+  case 274:
+#line 1559 "fortran.y"
+    {sprintf((yyval.na),"SIGN(%s)",(yyvsp[(3) - (4)].na));;}
+    break;
+
+  case 275:
+#line 1561 "fortran.y"
+    {sprintf((yyval.na),"MINLOC(%s)",(yyvsp[(3) - (4)].na));;}
+    break;
+
+  case 276:
+#line 1563 "fortran.y"
+    {sprintf((yyval.na),"MAXLOC(%s)",(yyvsp[(3) - (4)].na));;}
+    break;
+
+  case 277:
+#line 1565 "fortran.y"
+    {strcpy((yyval.na),(yyvsp[(1) - (1)].na));;}
+    break;
+
+  case 278:
+#line 1567 "fortran.y"
+    {if ( couldaddvariable == 1 )
+                   { strcpy((yyval.na),(yyvsp[(1) - (3)].na));strcat((yyval.na),",");strcat((yyval.na),(yyvsp[(3) - (3)].na));};}
+    break;
+
+  case 279:
+#line 1570 "fortran.y"
+    {if ( couldaddvariable == 1 ) strcpy((yyval.na),(yyvsp[(1) - (1)].na));;}
+    break;
+
+  case 280:
+#line 1572 "fortran.y"
+    {if ( couldaddvariable == 1 ) strcpy((yyval.na),(yyvsp[(1) - (1)].nac));;}
+    break;
+
+  case 281:
+#line 1574 "fortran.y"
+    {if ( couldaddvariable == 1 ) strcpy((yyval.na),(yyvsp[(1) - (1)].na));;}
+    break;
+
+  case 282:
+#line 1576 "fortran.y"
+    {if ( couldaddvariable == 1 ) sprintf((yyval.na),"%s%s",(yyvsp[(1) - (2)].na),(yyvsp[(2) - (2)].na));;}
+    break;
+
+  case 283:
+#line 1578 "fortran.y"
+    {if ( couldaddvariable == 1 ) sprintf((yyval.na),"%s%s",(yyvsp[(1) - (2)].nac),(yyvsp[(2) - (2)].na));;}
+    break;
+
+  case 284:
+#line 1580 "fortran.y"
+    {if ( couldaddvariable == 1 ) sprintf((yyval.na),"%s%s",(yyvsp[(1) - (2)].nac),(yyvsp[(2) - (2)].na));;}
+    break;
+
+  case 285:
+#line 1582 "fortran.y"
+    {if ( couldaddvariable == 1 ) strcpy((yyval.nac),"+");;}
+    break;
+
+  case 286:
+#line 1583 "fortran.y"
+    {if ( couldaddvariable == 1 ) strcpy((yyval.nac),"-");;}
+    break;
+
+  case 287:
+#line 1586 "fortran.y"
+    {if ( couldaddvariable == 1 ) sprintf((yyval.na),"+%s",(yyvsp[(2) - (2)].na));;}
+    break;
+
+  case 288:
+#line 1588 "fortran.y"
+    {if ( couldaddvariable == 1 ) sprintf((yyval.na),"-%s",(yyvsp[(2) - (2)].na));;}
+    break;
+
+  case 289:
+#line 1590 "fortran.y"
+    {if ( couldaddvariable == 1 ) sprintf((yyval.na),"*%s",(yyvsp[(2) - (2)].na));;}
+    break;
+
+  case 290:
+#line 1592 "fortran.y"
+    {if ( couldaddvariable == 1 ) sprintf((yyval.na),"%s%s",(yyvsp[(1) - (2)].nac),(yyvsp[(2) - (2)].na));;}
+    break;
+
+  case 291:
+#line 1594 "fortran.y"
+    {if ( couldaddvariable == 1 ) sprintf((yyval.na),"%s%s",(yyvsp[(1) - (2)].nac),(yyvsp[(2) - (2)].na));;}
+    break;
+
+  case 292:
+#line 1596 "fortran.y"
+    {if ( couldaddvariable == 1 ) sprintf((yyval.na),"%s%s",(yyvsp[(1) - (2)].nac),(yyvsp[(2) - (2)].na));;}
+    break;
+
+  case 293:
+#line 1598 "fortran.y"
+    {if ( couldaddvariable == 1 ) sprintf((yyval.na),"%s%s",(yyvsp[(1) - (2)].nac),(yyvsp[(2) - (2)].na));;}
+    break;
+
+  case 294:
+#line 1600 "fortran.y"
+    {if ( couldaddvariable == 1 ) sprintf((yyval.na)," > %s",(yyvsp[(2) - (2)].na));;}
+    break;
+
+  case 295:
+#line 1602 "fortran.y"
+    {if ( couldaddvariable == 1 ) sprintf((yyval.na),"%s%s",(yyvsp[(1) - (2)].nac),(yyvsp[(2) - (2)].na));;}
+    break;
+
+  case 296:
+#line 1604 "fortran.y"
+    {if ( couldaddvariable == 1 ) sprintf((yyval.na)," < %s",(yyvsp[(2) - (2)].na));;}
+    break;
+
+  case 297:
+#line 1606 "fortran.y"
+    {if ( couldaddvariable == 1 ) sprintf((yyval.na),"%s%s",(yyvsp[(1) - (2)].nac),(yyvsp[(2) - (2)].na));;}
+    break;
+
+  case 298:
+#line 1608 "fortran.y"
+    {if ( couldaddvariable == 1 ) sprintf((yyval.na)," >= %s",(yyvsp[(3) - (3)].na));;}
+    break;
+
+  case 299:
+#line 1610 "fortran.y"
+    {if ( couldaddvariable == 1 ) sprintf((yyval.na),"%s%s",(yyvsp[(1) - (2)].nac),(yyvsp[(2) - (2)].na));;}
+    break;
+
+  case 300:
+#line 1612 "fortran.y"
+    {if ( couldaddvariable == 1 ) sprintf((yyval.na)," <= %s",(yyvsp[(3) - (3)].na));;}
+    break;
+
+  case 301:
+#line 1614 "fortran.y"
+    {if ( couldaddvariable == 1 ) sprintf((yyval.na),"%s%s",(yyvsp[(1) - (2)].nac),(yyvsp[(2) - (2)].na));;}
+    break;
+
+  case 302:
+#line 1616 "fortran.y"
+    {if ( couldaddvariable == 1 ) sprintf((yyval.na),"%s%s",(yyvsp[(1) - (2)].nac),(yyvsp[(2) - (2)].na));;}
+    break;
+
+  case 303:
+#line 1618 "fortran.y"
+    {if ( couldaddvariable == 1 ) sprintf((yyval.na),"%s%s",(yyvsp[(1) - (2)].nac),(yyvsp[(2) - (2)].na));;}
+    break;
+
+  case 304:
+#line 1620 "fortran.y"
+    {if ( couldaddvariable == 1 ) sprintf((yyval.na),"%s%s",(yyvsp[(1) - (2)].nac),(yyvsp[(2) - (2)].na));;}
+    break;
+
+  case 305:
+#line 1622 "fortran.y"
+    {if ( couldaddvariable == 1 ) sprintf((yyval.na),"%s%s",(yyvsp[(1) - (2)].nac),(yyvsp[(2) - (2)].na));;}
+    break;
+
+  case 306:
+#line 1624 "fortran.y"
+    {if ( couldaddvariable == 1 ) sprintf((yyval.na),"%s",(yyvsp[(2) - (2)].na));;}
+    break;
+
+  case 307:
+#line 1626 "fortran.y"
+    {if ( couldaddvariable == 1 ) sprintf((yyval.na),"%s",(yyvsp[(2) - (2)].na));;}
+    break;
+
+  case 308:
+#line 1628 "fortran.y"
+    {strcpy((yyval.na),"");;}
+    break;
+
+  case 309:
+#line 1630 "fortran.y"
+    {sprintf((yyval.na),"/%s",(yyvsp[(1) - (1)].na));;}
+    break;
+
+  case 310:
+#line 1632 "fortran.y"
+    {sprintf((yyval.na),"/= %s",(yyvsp[(2) - (2)].na));;}
+    break;
+
+  case 311:
+#line 1634 "fortran.y"
+    {sprintf((yyval.na),"//%s",(yyvsp[(2) - (2)].na));;}
+    break;
+
+  case 312:
+#line 1637 "fortran.y"
+    {if ( couldaddvariable == 1 ) sprintf((yyval.na),"==%s",(yyvsp[(2) - (2)].na));;}
+    break;
+
+  case 313:
+#line 1639 "fortran.y"
+    {if ( couldaddvariable == 1 ) sprintf((yyval.na),"= %s",(yyvsp[(1) - (1)].na));;}
+    break;
+
+  case 314:
+#line 1642 "fortran.y"
+    {if ( couldaddvariable == 1 )
+						{
+						printf("ident = %s\n",(yyvsp[(1) - (1)].nac));
+						strcpy((yyval.na),(yyvsp[(1) - (1)].nac));}
+						;}
+    break;
+
+  case 315:
+#line 1648 "fortran.y"
+    {if ( couldaddvariable == 1 ) {
+                   printf("struct = %s\n",(yyvsp[(1) - (1)].na));
+                   strcpy((yyval.na),(yyvsp[(1) - (1)].na));}
+                   ;}
+    break;
+
+  case 316:
+#line 1653 "fortran.y"
+    {if ( couldaddvariable == 1 ) {
+                   printf("arrayref = %s\n",(yyvsp[(1) - (1)].na));
+                   strcpy((yyval.na),(yyvsp[(1) - (1)].na));
+                   };}
+    break;
+
+  case 317:
+#line 1658 "fortran.y"
+    {
+                      agrif_parentcall =0;
+                      if (!strcasecmp(identcopy,"Agrif_Parent") )
+                                                            agrif_parentcall =1;
+                      if ( Agrif_in_Tok_NAME(identcopy) == 1 )
+                      {
+                         inagrifcallargument = 1;
+                         Add_SubroutineWhereAgrifUsed_1(subroutinename,
+                                                        curmodulename);
+                      }
+                   ;}
+    break;
+
+  case 318:
+#line 1671 "fortran.y"
+    {
+                     strcpy((yyval.na),(yyvsp[(1) - (1)].na));
+                     if ( incalldeclare == 0 ) inagrifcallargument = 0;
+                   ;}
+    break;
+
+  case 319:
+#line 1676 "fortran.y"
+    {if ( couldaddvariable == 1 ) sprintf((yyval.na)," %s %s ",(yyvsp[(1) - (2)].na),(yyvsp[(2) - (2)].na));;}
+    break;
+
+  case 320:
+#line 1678 "fortran.y"
+    {if ( couldaddvariable == 1 )
+                                                sprintf((yyval.na)," %s ( %s )",(yyvsp[(1) - (4)].na),(yyvsp[(3) - (4)].na));;}
+    break;
+
+  case 321:
+#line 1681 "fortran.y"
+    {if ( couldaddvariable == 1 )
+                                         sprintf((yyval.na)," %s ( %s ) %s ",(yyvsp[(1) - (5)].na),(yyvsp[(3) - (5)].na),(yyvsp[(5) - (5)].na));;}
+    break;
+
+  case 322:
+#line 1685 "fortran.y"
+    {
+                      if ( couldaddvariable == 1 )
+                      {
+                         sprintf((yyval.na)," %s ( %s )",(yyvsp[(1) - (4)].nac),(yyvsp[(3) - (4)].na));
+                         ModifyTheAgrifFunction_0((yyvsp[(3) - (4)].na));
+                         agrif_parentcall =0;
+                      }
+                   ;}
+    break;
+
+  case 323:
+#line 1695 "fortran.y"
+    {
+                      sprintf((yyval.na)," %s %% %s ",(yyvsp[(1) - (3)].na),(yyvsp[(3) - (3)].na));
+                      if ( incalldeclare == 0 ) inagrifcallargument = 0;
+                   ;}
+    break;
+
+  case 324:
+#line 1701 "fortran.y"
+    {sprintf((yyval.na),"(/%s/)",(yyvsp[(2) - (3)].na));;}
+    break;
+
+  case 325:
+#line 1703 "fortran.y"
+    {strcpy((yyval.na)," ");;}
+    break;
+
+  case 326:
+#line 1705 "fortran.y"
+    {strcpy((yyval.na),(yyvsp[(2) - (2)].na));;}
+    break;
+
+  case 327:
+#line 1707 "fortran.y"
+    {if ( couldaddvariable == 1 ) strcpy((yyval.na),(yyvsp[(1) - (1)].na));;}
+    break;
+
+  case 328:
+#line 1709 "fortran.y"
+    {if ( couldaddvariable == 1 ) sprintf((yyval.na),"%s,%s",(yyvsp[(1) - (3)].na),(yyvsp[(3) - (3)].na));;}
+    break;
+
+  case 329:
+#line 1711 "fortran.y"
+    {strcpy((yyval.na),(yyvsp[(1) - (1)].na));;}
+    break;
+
+  case 330:
+#line 1712 "fortran.y"
+    {strcpy((yyval.na),(yyvsp[(1) - (1)].na));;}
+    break;
+
+  case 331:
+#line 1715 "fortran.y"
+    {if ( couldaddvariable == 1 ) sprintf((yyval.na),"%s :%s",(yyvsp[(1) - (3)].na),(yyvsp[(3) - (3)].na));;}
+    break;
+
+  case 332:
+#line 1717 "fortran.y"
+    {if ( couldaddvariable == 1 )
+                                               sprintf((yyval.na),"%s :%s :%s",(yyvsp[(1) - (5)].na),(yyvsp[(3) - (5)].na),(yyvsp[(5) - (5)].na));;}
+    break;
+
+  case 333:
+#line 1720 "fortran.y"
+    {if ( couldaddvariable == 1 ) sprintf((yyval.na),":%s :%s",(yyvsp[(2) - (4)].na),(yyvsp[(4) - (4)].na));;}
+    break;
+
+  case 334:
+#line 1721 "fortran.y"
+    {if ( couldaddvariable == 1 ) sprintf((yyval.na),": : %s",(yyvsp[(3) - (3)].na));;}
+    break;
+
+  case 335:
+#line 1722 "fortran.y"
+    {if ( couldaddvariable == 1 ) sprintf((yyval.na),":%s",(yyvsp[(2) - (2)].na));;}
+    break;
+
+  case 336:
+#line 1723 "fortran.y"
+    {if ( couldaddvariable == 1 ) sprintf((yyval.na),"%s :",(yyvsp[(1) - (2)].na));;}
+    break;
+
+  case 337:
+#line 1724 "fortran.y"
+    {if ( couldaddvariable == 1 ) sprintf((yyval.na),":");;}
+    break;
+
+  case 338:
+#line 1726 "fortran.y"
+    {
+                       if ( couldaddvariable == 1 && afterpercent == 0)
+                       {
+                       if ( Vartonumber((yyvsp[(1) - (1)].nac)) == 1 )
+                       {
+                          Add_SubroutineWhereAgrifUsed_1(subroutinename,
+                                                        curmodulename);
+                       }
+                       if (!strcasecmp((yyvsp[(1) - (1)].nac),"Agrif_Parent") )
+                                                            agrif_parentcall =1;
+                       if ( VariableIsNotFunction((yyvsp[(1) - (1)].nac)) == 0 )
+                       {
+                       printf("var = %s\n",(yyvsp[(1) - (1)].nac));
+                          if ( inagrifcallargument == 1 )
+                          {
+                             if ( !strcasecmp((yyvsp[(1) - (1)].nac),identcopy) )
+                             {
+                                strcpy(sameagrifname,identcopy);
+                                sameagrifargument = 1;
+                             }
+                          }
+                          strcpy(identcopy,(yyvsp[(1) - (1)].nac));
+                          pointedvar=0;
+                          strcpy(truename,(yyvsp[(1) - (1)].nac));
+                          if (variscoupled_0((yyvsp[(1) - (1)].nac))) strcpy(truename,getcoupledname_0((yyvsp[(1) - (1)].nac)));
+
+                          if ( VarIsNonGridDepend(truename) == 0 &&
+                               Variableshouldberemove(truename) == 0 )
+                          {                      
+                             if ( inagrifcallargument == 1 ||
+                                  varispointer_0(truename) == 1 )
+                             {
+                             printf("var2 = %s\n",(yyvsp[(1) - (1)].nac));
+                            if ((IsinListe(List_UsedInSubroutine_Var,(yyvsp[(1) - (1)].nac)) == 1) || (inagrifcallargument == 1))
+                             {
+                              if (varistyped_0(truename) == 0)
+                                 {
+                                 ModifyTheVariableName_0(truename,strlen((yyvsp[(1) - (1)].nac)));
+                                 }
+                                 }
+                             }
+                             printf("ici3\n");
+                             if ( inagrifcallargument != 1 ||
+                                  sameagrifargument ==1 )
+                                  {
+                                  printf("ici5 %s\n",truename);
+                                  Add_UsedInSubroutine_Var_1(truename);
+                                  }
+                          }
+                          NotifyAgrifFunction_0(truename);
+                       }
+                       }
+                       else
+                       {
+                       afterpercent = 0;
+                       }
+                    ;}
+    break;
+
+  case 339:
+#line 1785 "fortran.y"
+    {if ( couldaddvariable == 1 ) strcpy((yyval.nac),".TRUE.");;}
+    break;
+
+  case 340:
+#line 1786 "fortran.y"
+    {if ( couldaddvariable == 1 ) strcpy((yyval.nac),".FALSE.");;}
+    break;
+
+  case 341:
+#line 1787 "fortran.y"
+    {if ( couldaddvariable == 1 ) strcpy((yyval.nac),(yyvsp[(1) - (1)].nac));;}
+    break;
+
+  case 342:
+#line 1788 "fortran.y"
+    {if ( couldaddvariable == 1 ) strcpy((yyval.nac),(yyvsp[(1) - (1)].nac));;}
+    break;
+
+  case 343:
+#line 1789 "fortran.y"
+    {if ( couldaddvariable == 1 ) strcpy((yyval.nac),(yyvsp[(1) - (1)].nac));;}
+    break;
+
+  case 344:
+#line 1790 "fortran.y"
+    {if ( couldaddvariable == 1 ) strcpy((yyval.nac),(yyvsp[(1) - (1)].nac));;}
+    break;
+
+  case 345:
+#line 1792 "fortran.y"
+    {if ( couldaddvariable == 1 ) sprintf((yyval.nac),"%s%s",(yyvsp[(1) - (2)].nac),(yyvsp[(2) - (2)].nac));;}
+    break;
+
+  case 347:
+#line 1796 "fortran.y"
+    {if ( couldaddvariable == 1 ) strcpy((yyval.nac),(yyvsp[(1) - (1)].nac));;}
+    break;
+
+  case 349:
+#line 1799 "fortran.y"
+    {if ( couldaddvariable == 1 ) strcpy((yyval.nac),(yyvsp[(1) - (1)].nac));;}
+    break;
+
+  case 350:
+#line 1801 "fortran.y"
+    {if ( couldaddvariable == 1 ) strcpy((yyval.nac),(yyvsp[(1) - (1)].nac));;}
+    break;
+
+  case 351:
+#line 1803 "fortran.y"
+    {if ( couldaddvariable == 1 ) strcpy((yyval.na)," ");;}
+    break;
+
+  case 352:
+#line 1804 "fortran.y"
+    {if ( couldaddvariable == 1 ) strcpy((yyval.na),(yyvsp[(1) - (1)].na));;}
+    break;
+
+  case 353:
+#line 1807 "fortran.y"
+    {if ( couldaddvariable == 1 ) sprintf((yyval.na),"(%s :%s)",(yyvsp[(2) - (5)].na),(yyvsp[(4) - (5)].na));;}
+    break;
+
+  case 354:
+#line 1809 "fortran.y"
+    {if ( couldaddvariable == 1 ) strcpy((yyval.na)," ");;}
+    break;
+
+  case 355:
+#line 1810 "fortran.y"
+    {if ( couldaddvariable == 1 ) strcpy((yyval.na),(yyvsp[(1) - (1)].na));;}
+    break;
+
+  case 356:
+#line 1812 "fortran.y"
+    {if ( couldaddvariable == 1 ) strcpy((yyval.na)," ");;}
+    break;
+
+  case 357:
+#line 1813 "fortran.y"
+    {if ( couldaddvariable == 1 ) strcpy((yyval.na),(yyvsp[(1) - (1)].na));;}
+    break;
+
+  case 358:
+#line 1815 "fortran.y"
+    {InitialValueGiven = 0;;}
+    break;
+
+  case 359:
+#line 1817 "fortran.y"
+    {
+                       if ( couldaddvariable == 1 )
+                       {
+                          strcpy(InitValue,(yyvsp[(3) - (3)].na));
+                          InitialValueGiven = 1;
+                       }
+                    ;}
+    break;
+
+  case 360:
+#line 1825 "fortran.y"
+    {pos_curinit = setposcur();;}
+    break;
+
+  case 361:
+#line 1828 "fortran.y"
+    {sprintf((yyval.na),"(%s,%s)",(yyvsp[(2) - (5)].na),(yyvsp[(4) - (5)].na));;}
+    break;
+
+  case 362:
+#line 1831 "fortran.y"
+    {
+                      if ( couldaddvariable == 1 )
+                      {
+                      /* if variables has been declared in a subroutine       */
+                      if (insubroutinedeclare == 1)
+                      {
+                         copyuse_0((yyvsp[(2) - (2)].nac));
+                      }
+                      sprintf(charusemodule,"%s",(yyvsp[(2) - (2)].nac));
+                      Add_NameOfModuleUsed_1((yyvsp[(2) - (2)].nac));
+
+                      if ( inmoduledeclare == 0 )
+                      {
+                         pos_end = setposcur();
+                         RemoveWordSET_0(fortranout,pos_curuse,
+                                               pos_end-pos_curuse);
+                      }
+                      }
+                    ;}
+    break;
+
+  case 363:
+#line 1851 "fortran.y"
+    {
+                       if ( couldaddvariable == 1 )
+                       {
+                      if (insubroutinedeclare == 1)
+                      {
+                         Add_CouplePointed_Var_1((yyvsp[(2) - (4)].nac),(yyvsp[(4) - (4)].lc));
+                      }
+                      if ( firstpass == 1 )
+                      {
+                         if ( insubroutinedeclare == 1 )
+                         {
+                            coupletmp = (yyvsp[(4) - (4)].lc);
+                            strcpy(ligne,"");
+                            while ( coupletmp )
+                            {
+                               strcat(ligne,coupletmp->c_namevar);
+                               strcat(ligne," => ");
+                               strcat(ligne,coupletmp->c_namepointedvar);
+                               coupletmp = coupletmp->suiv;
+                               if ( coupletmp ) strcat(ligne,",");
+                            }
+                            sprintf(charusemodule,"%s",(yyvsp[(2) - (4)].nac));
+                         }
+                         Add_NameOfModuleUsed_1((yyvsp[(2) - (4)].nac));
+                      }
+                      if ( inmoduledeclare == 0 )
+                      {
+                         pos_end = setposcur();
+                         RemoveWordSET_0(fortranout,pos_curuse,
+                                               pos_end-pos_curuse);
+                      }
+                      }
+                    ;}
+    break;
+
+  case 364:
+#line 1885 "fortran.y"
+    {
+                       if ( couldaddvariable == 1 )
+                       {
+                      /* if variables has been declared in a subroutine       */
+                      if (insubroutinedeclare == 1)
+                      {
+                         copyuseonly_0((yyvsp[(2) - (6)].nac));
+                      }
+                      sprintf(charusemodule,"%s",(yyvsp[(2) - (6)].nac));
+                      Add_NameOfModuleUsed_1((yyvsp[(2) - (6)].nac));
+
+                       if ( inmoduledeclare == 0 )
+                       {
+                          pos_end = setposcur();
+                          RemoveWordSET_0(fortranout,pos_curuse,
+                                                pos_end-pos_curuse);
+                       }
+                       }
+                    ;}
+    break;
+
+  case 365:
+#line 1905 "fortran.y"
+    {
+                       if ( couldaddvariable == 1 )
+                       {
+                       /* if variables has been declared in a subroutine      */
+                       if (insubroutinedeclare == 1)
+                       {
+                          Add_CouplePointed_Var_1((yyvsp[(2) - (6)].nac),(yyvsp[(6) - (6)].lc));
+                       }
+                       if ( firstpass == 1 )
+                       {
+                         if ( insubroutinedeclare == 1 )
+                         {
+                             coupletmp = (yyvsp[(6) - (6)].lc);
+                             strcpy(ligne,"");
+                             while ( coupletmp )
+                             {
+                                strcat(ligne,coupletmp->c_namevar);
+                               if ( strcasecmp(coupletmp->c_namepointedvar,"") )
+                                                           strcat(ligne," => ");
+                                strcat(ligne,coupletmp->c_namepointedvar);
+                                coupletmp = coupletmp->suiv;
+                                if ( coupletmp ) strcat(ligne,",");
+                             }
+                             sprintf(charusemodule,"%s",(yyvsp[(2) - (6)].nac));
+                          }
+                          Add_NameOfModuleUsed_1((yyvsp[(2) - (6)].nac));
+                       }
+                       if ( firstpass == 0 )
+                       {
+                          if ( inmoduledeclare == 0 )
+                          {
+
+                            pos_end = setposcur();
+                             RemoveWordSET_0(fortranout,pos_curuse,
+                                                   pos_end-pos_curuse);
+                       if (oldfortranout) 
+                         variableisglobalinmodule((yyvsp[(6) - (6)].lc),(yyvsp[(2) - (6)].nac),oldfortranout,pos_curuseold);
+                        
+                          }
+                          else
+                          {
+
+                             /* if we are in the module declare and if the    */
+                             /* onlylist is a list of global variable         */
+                             variableisglobalinmodule((yyvsp[(6) - (6)].lc), (yyvsp[(2) - (6)].nac), fortranout,pos_curuse);
+                          }
+                       }
+                       }
+                    ;}
+    break;
+
+  case 366:
+#line 1956 "fortran.y"
+    {
+                      pos_curuse = setposcur()-strlen((yyvsp[(1) - (1)].nac));
+                     if (firstpass == 0 && oldfortranout) {
+                     pos_curuseold = setposcurname(oldfortranout);
+                     }
+                   ;}
+    break;
+
+  case 367:
+#line 1964 "fortran.y"
+    {strcpy((yyval.nac),(yyvsp[(1) - (1)].nac));;}
+    break;
+
+  case 368:
+#line 1967 "fortran.y"
+    {
+                       if ( couldaddvariable == 1 ) (yyval.lc) = (yyvsp[(1) - (1)].lc);
+                    ;}
+    break;
+
+  case 369:
+#line 1971 "fortran.y"
+    {
+                        if ( couldaddvariable == 1 )
+                        {
+                        /* insert the variable in the list $1                 */
+                        (yyvsp[(3) - (3)].lc)->suiv = (yyvsp[(1) - (3)].lc);
+                        (yyval.lc) = (yyvsp[(3) - (3)].lc);
+                        }
+                    ;}
+    break;
+
+  case 370:
+#line 1981 "fortran.y"
+    {
+                       coupletmp =(listcouple *)malloc(sizeof(listcouple));
+                       strcpy(coupletmp->c_namevar,(yyvsp[(1) - (3)].nac));
+                       Save_Length((yyvsp[(1) - (3)].nac),21);
+                       strcpy(coupletmp->c_namepointedvar,(yyvsp[(3) - (3)].nac));
+                       Save_Length((yyvsp[(3) - (3)].nac),22);
+                       coupletmp->suiv = NULL;
+                       (yyval.lc) = coupletmp;
+                     ;}
+    break;
+
+  case 371:
+#line 1992 "fortran.y"
+    {
+                       if ( couldaddvariable == 1 ) (yyval.lc) = (yyvsp[(1) - (1)].lc);
+                    ;}
+    break;
+
+  case 372:
+#line 1996 "fortran.y"
+    {
+                        if ( couldaddvariable == 1 )
+                        {
+                        /* insert the variable in the list $1                 */
+                        (yyvsp[(3) - (3)].lc)->suiv = (yyvsp[(1) - (3)].lc);
+                        (yyval.lc) = (yyvsp[(3) - (3)].lc);
+                        }
+                    ;}
+    break;
+
+  case 373:
+#line 2006 "fortran.y"
+    {
+                       coupletmp =(listcouple *)malloc(sizeof(listcouple));
+                       strcpy(coupletmp->c_namevar,(yyvsp[(1) - (3)].nac));
+                       Save_Length((yyvsp[(1) - (3)].nac),21);
+                       strcpy(coupletmp->c_namepointedvar,(yyvsp[(3) - (3)].nac));
+                       Save_Length((yyvsp[(3) - (3)].nac),22);
+                       coupletmp->suiv = NULL;
+                       (yyval.lc) = coupletmp;
+                       pointedvar=1;
+                       Add_UsedInSubroutine_Var_1((yyvsp[(1) - (3)].nac));
+                    ;}
+    break;
+
+  case 374:
+#line 2017 "fortran.y"
+    {
+                       coupletmp =(listcouple *)malloc(sizeof(listcouple));
+                       strcpy(coupletmp->c_namevar,(yyvsp[(1) - (1)].nac));
+                       Save_Length((yyvsp[(1) - (1)].nac),21);
+                       strcpy(coupletmp->c_namepointedvar,"");
+                       coupletmp->suiv = NULL;
+                       (yyval.lc) = coupletmp;
+                     ;}
+    break;
+
+  case 376:
+#line 2028 "fortran.y"
+    {
+                         Add_SubroutineWhereAgrifUsed_1(subroutinename,
+                                                        curmodulename);
+                                                        inallocate = 0;
+                     ;}
+    break;
+
+  case 377:
+#line 2034 "fortran.y"
+    {
+                          Add_SubroutineWhereAgrifUsed_1(subroutinename,
+                                                         curmodulename);
+                                                         inallocate = 0;
+                     ;}
+    break;
+
+  case 379:
+#line 2041 "fortran.y"
+    {
+                       GlobalDeclaration = 0 ;
+                       if ( firstpass == 0 &&
+                            strcasecmp(subroutinename,"") )
+                       {
+                          if ( module_declar && insubroutinedeclare == 0 )
+                          {
+                              fclose(module_declar);
+                          }
+                       }
+                       if ( couldaddvariable == 1 &&
+                            strcasecmp(subroutinename,"") )
+                       {
+                       if ( inmodulemeet == 1 )
+                       {
+                         /* we are in a module                                */
+                         if ( insubroutinedeclare == 1 )
+                         {
+                            /* it is like an end subroutine <name>            */
+                            insubroutinedeclare = 0 ;
+                            /*                                                */
+                            pos_cur = setposcur();
+                            closeandcallsubloopandincludeit_0(1);
+                            functiondeclarationisdone = 0;
+                         }
+                         else
+                         {
+                            /* it is like an end module <name>                */
+                            inmoduledeclare = 0 ;
+                            inmodulemeet = 0 ;
+                         }
+                       }
+                       else
+                       {
+                          insubroutinedeclare = 0;
+                          /*                                                  */
+                          pos_cur = setposcur();   
+                          closeandcallsubloopandincludeit_0(2);
+                            functiondeclarationisdone = 0;
+                          if ( firstpass == 0 )
+                          {
+                             if ( retour77 == 0 ) fprintf(paramout,"!\n");
+                             else fprintf(paramout,"C\n");
+                             fclose(paramout);
+                           }
+                        }
+                      }
+                      strcpy(subroutinename,"");
+                    ;}
+    break;
+
+  case 380:
+#line 2091 "fortran.y"
+    {
+                       if ( couldaddvariable == 1 )
+                       {
+                       insubroutinedeclare = 0;
+                       /*                                                     */
+                       pos_cur = setposcur();                      
+                       closeandcallsubloopandincludeit_0(3);
+                            functiondeclarationisdone = 0;
+                      if ( firstpass == 0 )
+                      {
+                         if ( retour77 == 0 ) fprintf(paramout,"!\n");
+                         else fprintf(paramout,"C\n");
+                         fclose(paramout);
+                      }
+                      strcpy(subroutinename,"");
+                      }
+                    ;}
+    break;
+
+  case 381:
+#line 2109 "fortran.y"
+    {
+                       if ( couldaddvariable == 1 &&
+                            strcasecmp(subroutinename,"") )
+                       {
+                       insubroutinedeclare = 0;
+                       /*                                                     */
+                       pos_cur = setposcur();
+                                             
+                       closeandcallsubloopandincludeit_0(1);
+                            functiondeclarationisdone = 0;
+                      if ( firstpass == 0 )
+                      {
+                         if ( retour77 == 0 ) fprintf(paramout,"!\n");
+                         else fprintf(paramout,"C\n");
+                         fclose(paramout);
+                      }
+                      strcpy(subroutinename,"");
+                      }
+                    ;}
+    break;
+
+  case 382:
+#line 2129 "fortran.y"
+    {
+                       if ( couldaddvariable == 1 )
+                       {
+                       insubroutinedeclare = 0;
+                       /*                                                     */
+                       pos_cur = setposcur();
+
+                       closeandcallsubloopandincludeit_0(0);
+                            functiondeclarationisdone = 0;
+                      if ( firstpass == 0 )
+                      {
+                         if ( retour77 == 0 ) fprintf(paramout,"!\n");
+                         else fprintf(paramout,"C\n");
+                         fclose(paramout);
+                      }
+                      strcpy(subroutinename,"");
+                      }
+                    ;}
+    break;
+
+  case 383:
+#line 2148 "fortran.y"
+    {
+                       if ( couldaddvariable == 1 )
+                       {
+                       /* if we never meet the contains keyword               */
+                      Remove_Word_end_module_0(strlen((yyvsp[(2) - (2)].nac)));
+                       if ( inmoduledeclare == 1 )
+                       {
+                          if ( aftercontainsdeclare == 0 )
+                          {
+                             Write_GlobalParameter_Declaration_0();
+                             Write_NotGridDepend_Declaration_0();
+                             Write_GlobalType_Declaration_0();
+                             Write_Alloc_Subroutine_For_End_0();
+                          }
+                       }
+                                           
+                       inmoduledeclare = 0 ;
+                       inmodulemeet = 0 ;
+
+                      Write_Word_end_module_0();
+                      strcpy(curmodulename,"");
+                      aftercontainsdeclare = 1;
+                      if ( firstpass == 0 )
+                      {
+                         if ( module_declar && insubroutinedeclare == 0)
+                         {
+                           fclose(module_declar);
+                         }
+                      }
+                      GlobalDeclaration = 0 ;
+                      }
+                  ;}
+    break;
+
+  case 397:
+#line 2194 "fortran.y"
+    {
+                      if (inmoduledeclare == 1 )
+                      {
+                         Remove_Word_Contains_0();
+                         Write_GlobalParameter_Declaration_0();
+                         Write_GlobalType_Declaration_0();
+                         Write_NotGridDepend_Declaration_0();
+                         Write_Alloc_Subroutine_0();
+                         inmoduledeclare = 0 ;
+                         aftercontainsdeclare = 1;
+                      }
+                      else
+                      {
+                      incontainssubroutine = 1;
+                      strcpy(previoussubroutinename,subroutinename);
+                       if ( couldaddvariable == 1 )
+                       {
+                          if ( firstpass == 1 ) List_ContainsSubroutine =
+                                                Addtolistnom(subroutinename,
+                                                     List_ContainsSubroutine,0);
+                          insubroutinedeclare = 0;
+                          /*                                                  */
+
+                          closeandcallsubloop_contains_0();
+                            functiondeclarationisdone = 0;
+                         if ( firstpass == 0 )
+                         {
+                            if ( retour77 == 0 ) fprintf(paramout,"!\n");
+                            else fprintf(paramout,"C\n");
+                            fclose(paramout);
+                         }
+                         }
+                         strcpy(subroutinename,"");
+                      }
+                   ;}
+    break;
+
+  case 398:
+#line 2231 "fortran.y"
+    {
+                      if ( couldaddvariable == 1 )
+                      {
+                       strcpy((yyval.nac),(yyvsp[(1) - (1)].nac));
+                       pos_endsubroutine = setposcur()-strlen((yyvsp[(1) - (1)].nac));
+                       functiondeclarationisdone = 0;
+                       }
+                    ;}
+    break;
+
+  case 399:
+#line 2241 "fortran.y"
+    {
+                      if ( couldaddvariable == 1 )
+                      {
+                       strcpy((yyval.nac),(yyvsp[(1) - (1)].nac));
+                       pos_endsubroutine = setposcur()-strlen((yyvsp[(1) - (1)].nac));
+                       }
+                    ;}
+    break;
+
+  case 400:
+#line 2250 "fortran.y"
+    {
+                      if ( couldaddvariable == 1 )
+                      {
+                       strcpy((yyval.nac),(yyvsp[(1) - (1)].nac));
+                       pos_endsubroutine = setposcur()-strlen((yyvsp[(1) - (1)].nac));
+                       }
+                    ;}
+    break;
+
+  case 401:
+#line 2259 "fortran.y"
+    {
+                      if ( couldaddvariable == 1 )
+                      {
+                       strcpy((yyval.nac),(yyvsp[(1) - (1)].nac));
+                       pos_endsubroutine = setposcur()-strlen((yyvsp[(1) - (1)].nac));
+                       }
+                    ;}
+    break;
+
+  case 413:
+#line 2281 "fortran.y"
+    {strcpy((yyval.nac),"");;}
+    break;
+
+  case 414:
+#line 2282 "fortran.y"
+    {strcpy((yyval.nac),(yyvsp[(1) - (1)].nac));;}
+    break;
+
+  case 424:
+#line 2302 "fortran.y"
+    {
+                          Add_SubroutineWhereAgrifUsed_1(subroutinename,
+                                                        curmodulename);
+                                                        inallocate = 0;
+                     ;}
+    break;
+
+  case 425:
+#line 2308 "fortran.y"
+    {
+                          Add_SubroutineWhereAgrifUsed_1(subroutinename,
+                                                        curmodulename);
+                                                        inallocate = 0;
+                     ;}
+    break;
+
+  case 431:
+#line 2319 "fortran.y"
+    {if ( couldaddvariable == 1 ) created_dimensionlist = 0;;}
+    break;
+
+  case 432:
+#line 2321 "fortran.y"
+    {
+                  created_dimensionlist = 1;
+                  if  ( agrif_parentcall == 1 )
+                  {
+                      ModifyTheAgrifFunction_0((yyvsp[(3) - (4)].d)->dim.last);
+                      agrif_parentcall =0;
+                      fprintf(fortranout," = ");
+                  }
+              ;}
+    break;
+
+  case 433:
+#line 2331 "fortran.y"
+    {created_dimensionlist = 1;;}
+    break;
+
+  case 438:
+#line 2339 "fortran.y"
+    {
+                      inagrifcallargument = 0 ;
+                      incalldeclare=0;
+                      if ( oldfortranout &&
+                           !strcasecmp(meetagrifinitgrids,subroutinename) &&
+                           firstpass == 0 &&
+                           callmpiinit == 1)
+                      {
+                      /*   pos_end = setposcur();
+                         RemoveWordSET_0(fortranout,pos_curcall,
+                                               pos_end-pos_curcall);
+                         fprintf(oldfortranout,"      Call MPI_Init (%s) \n"
+                                                                   ,mpiinitvar);*/
+                      }
+                      if ( oldfortranout           &&
+                           callagrifinitgrids == 1 &&
+                           firstpass == 0 )
+                      {
+                         pos_end = setposcur();
+                         RemoveWordSET_0(fortranout,pos_curcall,
+                                               pos_end-pos_curcall);
+
+                         strcpy(subofagrifinitgrids,subroutinename);
+                      }
+                      Instanciation_0(sameagrifname);
+                   ;}
+    break;
+
+  case 443:
+#line 2373 "fortran.y"
+    {
+                       if (!strcasecmp((yyvsp[(2) - (2)].nac),"MPI_Init") )
+                       {
+                          callmpiinit = 1;
+                       }
+                       else
+                       {
+                          callmpiinit = 0;
+                       }
+                       if (!strcasecmp((yyvsp[(2) - (2)].nac),"Agrif_Init_Grids") )
+                       {
+                          callagrifinitgrids = 1;
+                          strcpy(meetagrifinitgrids,subroutinename);
+                       }
+                       else callagrifinitgrids = 0;
+                       if ( !strcasecmp((yyvsp[(2) - (2)].nac),"Agrif_Open_File") )
+                       {
+                          Add_SubroutineWhereAgrifUsed_1(subroutinename,
+                                                        curmodulename);
+                       }
+                       if ( Vartonumber((yyvsp[(2) - (2)].nac)) == 1 )
+                       {
+                          incalldeclare=1;
+                          inagrifcallargument = 1 ;
+                          Add_SubroutineWhereAgrifUsed_1(subroutinename,
+                                                        curmodulename);
+                       }
+                    ;}
+    break;
+
+  case 444:
+#line 2403 "fortran.y"
+    {pos_curcall=setposcur()-4;;}
+    break;
+
+  case 447:
+#line 2408 "fortran.y"
+    {
+                  if ( callmpiinit == 1 )
+                  {
+                     strcpy(mpiinitvar,(yyvsp[(1) - (1)].na));
+                     if ( firstpass == 1 )
+                     {
+                        Add_UsedInSubroutine_Var_1 (mpiinitvar);
+/*                        curvar=createvar($1,NULL);
+                        curlistvar=insertvar(NULL,curvar);
+                        List_Subr outineArgument_Var = AddListvarToListvar
+                         (curlistvar,List_SubroutineAr gument_Var,1);*/
+                     }
+                  }
+               ;}
+    break;
+
+  case 517:
+#line 2530 "fortran.y"
+    {if ( couldaddvariable == 1 ) strcpy((yyval.na),(yyvsp[(1) - (1)].na));;}
+    break;
+
+  case 518:
+#line 2531 "fortran.y"
+    {if ( couldaddvariable == 1 ) strcpy((yyval.na),(yyvsp[(1) - (1)].na));;}
+    break;
+
+  case 519:
+#line 2532 "fortran.y"
+    {if ( couldaddvariable == 1 ) strcpy((yyval.na),(yyvsp[(1) - (1)].na));;}
+    break;
+
+  case 520:
+#line 2535 "fortran.y"
+    {if ( couldaddvariable == 1 ) sprintf((yyval.na),"%s,%s",(yyvsp[(1) - (3)].na),(yyvsp[(3) - (3)].na));;}
+    break;
+
+  case 521:
+#line 2537 "fortran.y"
+    {if ( couldaddvariable == 1 ) sprintf((yyval.na),"%s,%s",(yyvsp[(1) - (3)].na),(yyvsp[(3) - (3)].na));;}
+    break;
+
+  case 522:
+#line 2539 "fortran.y"
+    {if ( couldaddvariable == 1 ) sprintf((yyval.na),"%s,%s",(yyvsp[(1) - (3)].na),(yyvsp[(3) - (3)].na));;}
+    break;
+
+  case 523:
+#line 2541 "fortran.y"
+    {if ( couldaddvariable == 1 ) sprintf((yyval.na),"%s,%s",(yyvsp[(1) - (3)].na),(yyvsp[(3) - (3)].na));;}
+    break;
+
+  case 524:
+#line 2543 "fortran.y"
+    {if ( couldaddvariable == 1 ) sprintf((yyval.na),"%s,%s",(yyvsp[(1) - (3)].na),(yyvsp[(3) - (3)].na));;}
+    break;
+
+  case 525:
+#line 2545 "fortran.y"
+    {if ( couldaddvariable == 1 ) sprintf((yyval.na),"%s,%s",(yyvsp[(1) - (3)].na),(yyvsp[(3) - (3)].na));;}
+    break;
+
+  case 526:
+#line 2546 "fortran.y"
+    {if ( couldaddvariable == 1 ) strcpy((yyval.na),(yyvsp[(1) - (1)].na));;}
+    break;
+
+  case 527:
+#line 2547 "fortran.y"
+    {if ( couldaddvariable == 1 ) strcpy((yyval.na),(yyvsp[(1) - (1)].na));;}
+    break;
+
+  case 528:
+#line 2550 "fortran.y"
+    {if ( couldaddvariable == 1 ) strcpy((yyval.na),(yyvsp[(1) - (1)].na));;}
+    break;
+
+  case 529:
+#line 2552 "fortran.y"
+    {if ( couldaddvariable == 1 ) sprintf((yyval.na)," (%s)",(yyvsp[(2) - (3)].na));;}
+    break;
+
+  case 530:
+#line 2554 "fortran.y"
+    {if ( couldaddvariable == 1 ) sprintf((yyval.na),"(%s,%s)",(yyvsp[(2) - (5)].na),(yyvsp[(4) - (5)].na));;}
+    break;
+
+  case 531:
+#line 2556 "fortran.y"
+    {if ( couldaddvariable == 1 ) sprintf((yyval.na),"(%s,%s)",(yyvsp[(2) - (5)].na),(yyvsp[(4) - (5)].na));;}
+    break;
+
+  case 532:
+#line 2558 "fortran.y"
+    {if ( couldaddvariable == 1 ) sprintf((yyval.na),"(%s,%s)",(yyvsp[(2) - (5)].na),(yyvsp[(4) - (5)].na));;}
+    break;
+
+  case 533:
+#line 2562 "fortran.y"
+    {if ( couldaddvariable == 1 )
+                                              sprintf((yyval.na),"%s=%s,%s)",(yyvsp[(1) - (5)].nac),(yyvsp[(3) - (5)].na),(yyvsp[(5) - (5)].na));;}
+    break;
+
+  case 534:
+#line 2565 "fortran.y"
+    {if ( couldaddvariable == 1 )
+                                        sprintf((yyval.na),"%s=%s,%s,%s)",(yyvsp[(1) - (7)].nac),(yyvsp[(3) - (7)].na),(yyvsp[(5) - (7)].na),(yyvsp[(7) - (7)].na));;}
+    break;
+
+  case 541:
+#line 2581 "fortran.y"
+    {Add_Allocate_Var_1((yyvsp[(1) - (1)].nac),curmodulename);;}
+    break;
+
+  case 544:
+#line 2586 "fortran.y"
+    {Add_Allocate_Var_1((yyvsp[(1) - (4)].nac),curmodulename);;}
+    break;
+
+  case 552:
+#line 2609 "fortran.y"
+    {strcpy((yyval.nac),(yyvsp[(1) - (1)].nac));;}
+    break;
+
+
+/* Line 1267 of yacc.c.  */
+#line 6445 "fortran.tab.c"
+      default: break;
+    }
+  YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
+
+  YYPOPSTACK (yylen);
+  yylen = 0;
+  YY_STACK_PRINT (yyss, yyssp);
+
+  *++yyvsp = yyval;
+
+
+  /* Now `shift' the result of the reduction.  Determine what state
+     that goes to, based on the state we popped back to and the rule
+     number reduced by.  */
+
+  yyn = yyr1[yyn];
+
+  yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
+  if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
+    yystate = yytable[yystate];
+  else
+    yystate = yydefgoto[yyn - YYNTOKENS];
+
+  goto yynewstate;
+
+
+/*------------------------------------.
+| yyerrlab -- here on detecting error |
+`------------------------------------*/
+yyerrlab:
+  /* If not already recovering from an error, report this error.  */
+  if (!yyerrstatus)
+    {
+      ++yynerrs;
+#if ! YYERROR_VERBOSE
+      yyerror (YY_("syntax error"));
+#else
+      {
+	YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
+	if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
+	  {
+	    YYSIZE_T yyalloc = 2 * yysize;
+	    if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
+	      yyalloc = YYSTACK_ALLOC_MAXIMUM;
+	    if (yymsg != yymsgbuf)
+	      YYSTACK_FREE (yymsg);
+	    yymsg = (char *) YYSTACK_ALLOC (yyalloc);
+	    if (yymsg)
+	      yymsg_alloc = yyalloc;
+	    else
+	      {
+		yymsg = yymsgbuf;
+		yymsg_alloc = sizeof yymsgbuf;
+	      }
+	  }
+
+	if (0 < yysize && yysize <= yymsg_alloc)
+	  {
+	    (void) yysyntax_error (yymsg, yystate, yychar);
+	    yyerror (yymsg);
+	  }
+	else
+	  {
+	    yyerror (YY_("syntax error"));
+	    if (yysize != 0)
+	      goto yyexhaustedlab;
+	  }
+      }
+#endif
+    }
+
+
+
+  if (yyerrstatus == 3)
+    {
+      /* If just tried and failed to reuse look-ahead token after an
+	 error, discard it.  */
+
+      if (yychar <= YYEOF)
+	{
+	  /* Return failure if at end of input.  */
+	  if (yychar == YYEOF)
+	    YYABORT;
+	}
+      else
+	{
+	  yydestruct ("Error: discarding",
+		      yytoken, &yylval);
+	  yychar = YYEMPTY;
+	}
+    }
+
+  /* Else will try to reuse look-ahead token after shifting the error
+     token.  */
+  goto yyerrlab1;
+
+
+/*---------------------------------------------------.
+| yyerrorlab -- error raised explicitly by YYERROR.  |
+`---------------------------------------------------*/
+yyerrorlab:
+
+  /* Pacify compilers like GCC when the user code never invokes
+     YYERROR and the label yyerrorlab therefore never appears in user
+     code.  */
+  if (/*CONSTCOND*/ 0)
+     goto yyerrorlab;
+
+  /* Do not reclaim the symbols of the rule which action triggered
+     this YYERROR.  */
+  YYPOPSTACK (yylen);
+  yylen = 0;
+  YY_STACK_PRINT (yyss, yyssp);
+  yystate = *yyssp;
+  goto yyerrlab1;
+
+
+/*-------------------------------------------------------------.
+| yyerrlab1 -- common code for both syntax error and YYERROR.  |
+`-------------------------------------------------------------*/
+yyerrlab1:
+  yyerrstatus = 3;	/* Each real token shifted decrements this.  */
+
+  for (;;)
+    {
+      yyn = yypact[yystate];
+      if (yyn != YYPACT_NINF)
+	{
+	  yyn += YYTERROR;
+	  if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
+	    {
+	      yyn = yytable[yyn];
+	      if (0 < yyn)
+		break;
+	    }
+	}
+
+      /* Pop the current state because it cannot handle the error token.  */
+      if (yyssp == yyss)
+	YYABORT;
+
+
+      yydestruct ("Error: popping",
+		  yystos[yystate], yyvsp);
+      YYPOPSTACK (1);
+      yystate = *yyssp;
+      YY_STACK_PRINT (yyss, yyssp);
+    }
+
+  if (yyn == YYFINAL)
+    YYACCEPT;
+
+  *++yyvsp = yylval;
+
+
+  /* Shift the error token.  */
+  YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
+
+  yystate = yyn;
+  goto yynewstate;
+
+
+/*-------------------------------------.
+| yyacceptlab -- YYACCEPT comes here.  |
+`-------------------------------------*/
+yyacceptlab:
+  yyresult = 0;
+  goto yyreturn;
+
+/*-----------------------------------.
+| yyabortlab -- YYABORT comes here.  |
+`-----------------------------------*/
+yyabortlab:
+  yyresult = 1;
+  goto yyreturn;
+
+#ifndef yyoverflow
+/*-------------------------------------------------.
+| yyexhaustedlab -- memory exhaustion comes here.  |
+`-------------------------------------------------*/
+yyexhaustedlab:
+  yyerror (YY_("memory exhausted"));
+  yyresult = 2;
+  /* Fall through.  */
+#endif
+
+yyreturn:
+  if (yychar != YYEOF && yychar != YYEMPTY)
+     yydestruct ("Cleanup: discarding lookahead",
+		 yytoken, &yylval);
+  /* Do not reclaim the symbols of the rule which action triggered
+     this YYABORT or YYACCEPT.  */
+  YYPOPSTACK (yylen);
+  YY_STACK_PRINT (yyss, yyssp);
+  while (yyssp != yyss)
+    {
+      yydestruct ("Cleanup: popping",
+		  yystos[*yyssp], yyvsp);
+      YYPOPSTACK (1);
+    }
+#ifndef yyoverflow
+  if (yyss != yyssa)
+    YYSTACK_FREE (yyss);
+#endif
+#if YYERROR_VERBOSE
+  if (yymsg != yymsgbuf)
+    YYSTACK_FREE (yymsg);
+#endif
+  /* Make sure YYID is used.  */
+  return YYID (yyresult);
+}
+
+
+#line 2611 "fortran.y"
+
+
+void processfortran(char *fichier_entree)
+{
+   extern FILE *fortranin;
+   extern FILE *fortranout;
+   char nomfile[LONG_C];
+   int c;
+   int confirmyes;
+
+/*   fortrandebug = 1;*/
+   if ( mark == 1 ) printf("Firstpass == %d \n",firstpass);
+/******************************************************************************/
+/*  1-  Open input and output files                                           */
+/******************************************************************************/
+   strcpy(nomfile,commondirin);
+   strcat(nomfile,"/");
+   strcat(nomfile,fichier_entree);
+   fortranin=fopen( nomfile,"r");
+   if (! fortranin)
+   {
+      printf("Error : File %s does not exist\n",nomfile);
+      exit(1);
+   }
+
+   strcpy(curfile,nomfile);
+   strcpy(nomfile,commondirout);
+   strcat(nomfile,"/");
+   strcat(nomfile,fichier_entree);
+   strcpy(nomfileoutput,nomfile);
+   Save_Length(nomfileoutput,31);
+   if (firstpass == 1)
+   {
+      if (checkexistcommon == 1)
+      {
+         if (fopen(nomfile,"r"))
+         {
+            printf("Warning : file %s already exist\n",nomfile);
+            confirmyes = 0;
+            while (confirmyes==0)
+            {
+               printf("Override file %s ? [Y/N]\n",nomfile);
+               c=getchar();
+               getchar();
+               if (c==79 || c==110)
+               {
+                  printf("We stop\n");
+                  exit(1);
+               }
+               if (c==89 || c==121)
+               {
+                  confirmyes=1;
+               }
+            }
+         }
+      }
+   }
+
+/******************************************************************************/
+/*  2-  Variables initialization                                              */
+/******************************************************************************/
+
+   line_num_fortran_common=1;
+   line_num_fortran=1;
+   PublicDeclare = 0;
+   PrivateDeclare = 0;
+   ExternalDeclare = 0;
+   SaveDeclare = 0;
+   pointerdeclare = 0;
+   optionaldeclare = 0;
+   incalldeclare = 0;
+   VarType = 0;
+   VarTypepar = 0;
+   Allocatabledeclare = 0 ;
+   Targetdeclare = 0 ;
+   strcpy(NamePrecision," ");
+   VariableIsParameter =  0 ;
+   strcpy(NamePrecision,"");
+   c_star = 0 ;
+   functiondeclarationisdone = 0;
+   insubroutinedeclare = 0 ;
+   ininterfacedeclare = 0 ;   
+   strcpy(subroutinename," ");
+   isrecursive = 0;
+   InitialValueGiven = 0 ;
+   strcpy(EmptyChar," ");
+   inmoduledeclare = 0;
+   incontainssubroutine = 0;
+   colnum=0;
+   incom=0;
+   couldaddvariable=1;
+   afterpercent = 0;
+   aftercontainsdeclare = 1;
+   strcpy(nameinttypename,"");
+   /* Name of the file without format                                         */
+   tmp = strchr(fichier_entree, '.');
+   strncpy(curfilename,fichier_entree,strlen(fichier_entree)-strlen(tmp));
+   Save_Length(curfilename,30);
+/******************************************************************************/
+/*  3-  Parsing of the input file (1 time)                                    */
+/******************************************************************************/
+   if (firstpass == 0 )
+   {
+      fortranout=fopen(nomfileoutput,"w");
+
+/*      NewModule_Creation_0();*/
+   }
+
+   fortranparse();
+
+   if (firstpass == 0 )
+   {
+   NewModule_Creation_0();
+   }
+   
+   strcpy(curfile,mainfile);
+
+   if (firstpass == 0 )
+   {
+   fclose(fortranout);
+   }
+}
+
Index: vendors/AGRIF/r_01/LIB/fortran.y
===================================================================
--- vendors/AGRIF/r_01/LIB/fortran.y	(revision 2672)
+++ vendors/AGRIF/r_01/LIB/fortran.y	(revision 2672)
@@ -0,0 +1,2732 @@
+/******************************************************************************/
+/*                                                                            */
+/*     CONV (converter) for Agrif (Adaptive Grid Refinement In Fortran)       */
+/*                                                                            */
+/* Copyright or   or Copr. Laurent Debreu (Laurent.Debreu@imag.fr)            */
+/*                        Cyril Mazauric (Cyril_Mazauric@yahoo.fr)            */
+/* This software is governed by the CeCILL-C license under French law and     */
+/* abiding by the rules of distribution of free software.  You can  use,      */
+/* modify and/ or redistribute the software under the terms of the CeCILL-C   */
+/* license as circulated by CEA, CNRS and INRIA at the following URL          */
+/* "http ://www.cecill.info".                                                  */
+/*                                                                            */
+/* As a counterpart to the access to the source code and  rights to copy,     */
+/* modify and redistribute granted by the license, users are provided only    */
+/* with a limited warranty  and the software's author,  the holder of the     */
+/* economic rights,  and the successive licensors  have only  limited         */
+/* liability.                                                                 */
+/*                                                                            */
+/* In this respect, the user's attention is drawn to the risks associated     */
+/* with loading,  using,  modifying and/or developing or reproducing the      */
+/* software by the user in light of its specific status of free software,     */
+/* that may mean  that it is complicated to manipulate,  and  that  also      */
+/* therefore means  that it is reserved for developers  and  experienced      */
+/* professionals having in-depth computer knowledge. Users are therefore      */
+/* encouraged to load and test the software's suitability as regards their    */
+/* requirements in conditions enabling the security of their systems and/or   */
+/* data to be ensured and,  more generally, to use and operate it in the      */
+/* same conditions as regards security.                                       */
+/*                                                                            */
+/* The fact that you are presently reading this means that you have had       */
+/* knowledge of the CeCILL-C license and that you accept its terms.           */
+/******************************************************************************/
+/* version 1.7                                                                */
+/******************************************************************************/
+
+%{
+#define YYMAXDEPTH 1000
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include "decl.h"
+extern int line_num_fortran;
+extern int line_num_fortran_common;
+char *tmp;
+char c_selectorname[LONG_C];
+char ligne[LONG_C];
+char truename[LONGNOM];
+char identcopy[LONG_C];
+int c_selectorgiven=0;
+int incom;
+listvar *curlistvar;
+typedim c_selectordim;
+listcouple *coupletmp;
+listdim *parcoursdim;
+int removeline=0;
+listvar *test;
+%}
+
+%union {
+       char      nac[LONG_C];
+       char      na[LONGNOM];
+       listdim  *d;
+       listvar  *l;
+       listnom  *ln;
+       listcouple  *lc;
+       listname *lnn;
+       typedim   dim1;
+       variable *v;
+       }
+
+%left ','
+%nonassoc ':'
+%right '='
+%left TOK_BINARY_OP
+%left TOK_EQV TOK_NEQV
+%left TOK_OR TOK_XOR
+%left TOK_AND
+%left TOK_NOT
+%nonassoc TOK_LT TOK_GT TOK_LE TOK_GE TOK_EQ TOK_NE
+%nonassoc TOK_UNARY_OP
+%left TOK_DSLASH
+%left '+' '-'
+%left '*' TOK_SLASH
+%right TOK_DASTER
+
+%token TOK_SEP
+%token TOK_SEMICOLON
+%token TOK_NEXTLINE
+%token TOK_PARAMETER
+%token TOK_RESULT
+%token TOK_ONLY
+%token TOK_INCLUDE
+%token TOK_SUBROUTINE
+%token TOK_PROGRAM
+%token TOK_FUNCTION
+%token TOK_OMP
+%token TOK_DOLLAR
+%token TOK_FORMAT
+%token TOK_MAX
+%token TOK_TANH
+%token TOK_WHERE
+%token TOK_ELSEWHERE
+%token TOK_ENDWHERE
+%token TOK_MAXVAL
+%token TOK_TRIM
+%token TOK_SUM
+%token TOK_SQRT
+%token TOK_CASE
+%token TOK_SELECTCASE
+%token TOK_FILE
+%token TOK_END
+%token TOK_ERR
+%token TOK_DONOTTREAT
+%token TOK_ENDDONOTTREAT
+%token TOK_EXIST
+%token TOK_MIN
+%token TOK_FLOAT
+%token TOK_EXP
+%token TOK_COS
+%token TOK_COSH
+%token TOK_ACOS
+%token TOK_NINT
+%token TOK_CYCLE
+%token TOK_SIN
+%token TOK_SINH
+%token TOK_ASIN
+%token TOK_EQUIVALENCE
+%token TOK_BACKSPACE
+%token TOK_LOG
+%token TOK_TAN
+%token TOK_ATAN
+%token TOK_RECURSIVE
+%token TOK_ABS
+%token TOK_MOD
+%token TOK_SIGN
+%token TOK_MINLOC
+%token TOK_MAXLOC
+%token TOK_EXIT
+%token TOK_MINVAL
+%token TOK_PUBLIC
+%token TOK_PRIVATE
+%token TOK_ALLOCATABLE
+%token TOK_RETURN
+%token TOK_THEN
+%token TOK_ELSEIF
+%token TOK_ELSE
+%token TOK_ENDIF
+%token TOK_PRINT
+%token TOK_PLAINGOTO
+%token TOK_CONSTRUCTID
+%token TOK_LOGICALIF
+%token TOK_PLAINDO
+%token TOK_CONTAINS
+%token TOK_ENDDO
+%token TOK_MODULE
+%token TOK_ENDMODULE
+%token TOK_DOWHILE
+%token TOK_ALLOCATE
+%token TOK_OPEN
+%token TOK_CLOSE
+%token TOK_INQUIRE
+%token TOK_WRITE
+%token TOK_READ
+%token TOK_REWIND
+%token TOK_DEALLOCATE
+%token TOK_NULLIFY
+%token TOK_FIN
+%token TOK_DEBUT
+%token TOK_DIMENSION
+%token TOK_ENDSELECT
+%token TOK_EXTERNAL
+%token TOK_INTENT
+%token TOK_INTRINSIC
+%token TOK_NAMELIST
+%token TOK_CASEDEFAULT
+%token TOK_OPTIONAL
+%token TOK_POINTER
+%token TOK_CONTINUE
+%token TOK_SAVE
+%token TOK_TARGET
+%token TOK_QUOTE
+%token TOK_IMPLICIT
+%token TOK_NONE
+%token TOK_CALL
+%token TOK_STAT
+%token TOK_POINT_TO
+%token TOK_COMMON
+%token TOK_GLOBAL
+%token TOK_INTERFACE
+%token TOK_ENDINTERFACE
+%token TOK_LEFTAB
+%token TOK_RIGHTAB
+%token TOK_PAUSE
+%token TOK_PROCEDURE
+%token TOK_STOP
+%token TOK_NAMEEQ
+%token TOK_REAL8
+%token <nac> TOK_OUT
+%token <nac> TOK_INOUT
+%token <nac> TOK_IN
+%token <nac> TOK_USE
+%token <nac> TOK_DSLASH
+%token <nac> TOK_DASTER
+%token <nac> TOK_EQ
+%token <nac> TOK_EQV
+%token <nac> TOK_GT
+%token <nac> TOK_LT
+%token <nac> TOK_GE
+%token <nac> TOK_NE
+%token <nac> TOK_NEQV
+%token <nac> TOK_LE
+%token <nac> TOK_OR
+%token <nac> TOK_XOR
+%token <nac> TOK_NOT
+%token <nac> TOK_AND
+%token <nac> TOK_TRUE
+%token <nac> TOK_FALSE
+%token <nac> TOK_LABEL
+%token <nac> TOK_TYPE
+%token <nac> TOK_TYPEPAR
+%token <nac> TOK_ENDTYPE
+%token <nac> TOK_REAL
+%token <nac> TOK_INTEGER
+%token <nac> TOK_LOGICAL
+%token <nac> TOK_DOUBLEPRECISION
+%token <nac> TOK_DOUBLEREAL
+%token <nac> TOK_ENDSUBROUTINE
+%token <nac> TOK_ENDFUNCTION
+%token <nac> TOK_ENDPROGRAM
+%token <nac> TOK_ENDUNIT
+%token <nac> TOK_CHARACTER
+%token <nac> TOK_CHAR_CONSTANT
+%token <nac> TOK_CHAR_CUT
+%token <nac> TOK_DATA
+%token <nac> TOK_CHAR_INT
+%token <nac> TOK_CHAR_MESSAGE
+%token <nac> TOK_CSTREAL
+%token <nac> TOK_CSTREALDP
+%token <nac> TOK_CSTREALQP
+%token <nac> TOK_SFREAL
+%token <nac> TOK_COMPLEX
+%token <nac> TOK_DOUBLECOMPLEX
+%token <nac> TOK_NAME
+%token <nac> TOK_NAME_CHAR
+%token <nac> TOK_PROBTYPE  /* dimension of the problem                        */
+%token <nac> TOK_INTERPTYPE/* kind of interpolation                           */
+%token <nac> TOK_VARTYPE   /* posit ion of the grid variable on the cells of  */
+                          /*     the mesh                                     */
+%token <nac> TOK_SLASH
+%token <nac> TOK_BC        /* calculation of the boundary conditions           */
+%token <nac> TOK_OP
+%token <nac> TOK_CSTINT
+%token <nac> TOK_COMMENT
+%token <nac> TOK_FILENAME
+%token ','
+%token ':'
+%token '('
+%token ')'
+%token '['
+%token ']'
+%token '!'
+%token '_'
+%token '<'
+%token '>'
+%type <l> dcl
+%type <l> after_type
+%type <l> dimension
+%type <l> paramlist
+%type <l> args
+%type <l> arglist
+%type <lc> only_list
+%type <lc> only_name
+%type <lc> rename_list
+%type <lc> rename_name
+%type <d> dims
+%type <d> dimlist
+%type <dim1> dim
+%type <v> paramitem
+%type <nac> comblock
+%type <nac> name_routine
+%type <nac> module_name
+%type <nac> opt_name
+%type <nac> type
+%type <nac> word_endsubroutine
+%type <nac> word_endfunction
+%type <nac> word_endprogram
+%type <nac> word_endunit
+%type <nac> typename
+%type <nac> typespec
+%type <nac> string_constant
+%type <nac> simple_const
+%type <nac> ident
+%type <nac> do_var
+%type <nac> intent_spec
+%type <nac> signe
+%type <nac> opt_signe
+%type <nac> filename
+%type <na> attribute
+%type <na> complex_const
+%type <na> begin_array
+%type <na> clause
+%type <na> arg
+%type <na> uexpr
+%type <na> minmaxlist
+%type <na> lhs
+%type <na> vec
+%type <na> outlist
+%type <na> out2
+%type <na> other
+%type <na> dospec
+%type <na> expr_data
+%type <na> structure_component
+%type <na> array_ele_substring_func_ref
+%type <na> funarglist
+%type <na> funarg
+%type <na> funargs
+%type <na> triplet
+%type <na> substring
+%type <na> opt_substring
+%type <na> opt_expr
+%type <na> optexpr
+%type <lnn> datavallist
+%type <lnn> datanamelist
+%type <na> after_slash
+%type <na> after_equal
+%type <na> predefinedfunction
+%type <na> expr
+%type <na> ubound
+%type <na> operation
+%type <na> proper_lengspec
+%type <lnn> use_name_list
+%type <lnn> public
+
+%left TOK_OP
+%%
+input :
+      | input line
+      ;
+line :  '\n' position
+      | thislabel suite_line_list
+      | TOK_COMMENT
+      | keyword cmnt writedeclar
+      | error writedeclar nulcurbuf
+                   {yyerrok;yyclearin;}
+      ;
+suite_line_list : suite_line
+      |   suite_line_list TOK_SEMICOLON suite_line
+      ;
+suite_line : entry fin_line  /* subroutine, function, module                    */
+      | spec fin_line      /* declaration                                     */
+      | before_include filename fin_line
+                  {
+                     if (inmoduledeclare == 0 )
+                     {
+                        pos_end = setposcur();
+                        RemoveWordSET_0(fortranout,pos_curinclude,
+                                              pos_end-pos_curinclude);
+                     }
+                  }
+      | exec cmnt writedeclar /* if, do etc ...                               */
+      | instr fin_line    /* instruction ident  : do i = 1 ...                */
+      ;
+instr : ident ':'
+      ;
+fin_line : position cmnt
+      ;
+keyword : TOK_DONOTTREAT
+         {
+            /* we should ignore the declaration until the keyword             */
+            /*    TOK_ENDDONOTTREAT                                           */
+            couldaddvariable = 0 ;
+            RemoveWordCUR_0(fortranout,-20,20);
+         }
+      | TOK_ENDDONOTTREAT
+         {
+             couldaddvariable = 1 ;
+             RemoveWordCUR_0(fortranout,-24,24);
+          }
+      | TOK_OMP
+      | TOK_DOLLAR
+      ;
+position : {pos_cur = setposcur();}
+      ;
+thislabel :
+      | TOK_LABEL nulcurbuf
+      ;
+cmnt :
+      | TOK_COMMENT
+      ;
+incomment :
+                   {incom = 1;}
+      ;
+nulcurbuf :
+                   {if (incom !=1) {strcpy(curbuf,"");incom=0;}}
+      ;
+opt_recursive :
+		{isrecursive = 0;}
+      | TOK_RECURSIVE
+		{isrecursive = 1;}
+      ;
+entry :
+      | opt_recursive TOK_SUBROUTINE name_routine arglist
+                   {
+                      if ( couldaddvariable == 1)
+                      {
+                      /* open param file                                      */
+                      if ( firstpass == 0 )
+                      {
+                         sprintf(ligne,"%s/ParamFile%s.h",nomdir,$3);
+                         paramout=fopen(ligne,"w");
+                         if ( retour77 == 0 ) fprintf(paramout,"!\n");
+                         else fprintf(paramout,"C\n");
+
+                      }
+                      Add_SubroutineArgument_Var_1($4);
+                      if ( inmodulemeet == 1 )
+                      {
+                         insubroutinedeclare = 1;
+                         /* in the second step we should write the head of    */
+                         /*    the subroutine sub_loop_<subroutinename>       */
+                         writeheadnewsub_0(1);
+                      }
+                      else
+                      {
+                            insubroutinedeclare = 1;
+                            writeheadnewsub_0(1);
+                      }
+                      }
+                   }
+      | TOK_PROGRAM name_routine
+                   {
+                      /* open param file                                      */
+                      if ( firstpass == 0 )
+                      {
+                         sprintf(ligne,"%s/ParamFile%s.h",nomdir,$2);
+                         paramout=fopen(ligne,"w");
+                         if ( retour77 == 0 ) fprintf(paramout,"!\n");
+                         else fprintf(paramout,"C\n");
+
+                      }
+                      strcpy(subroutinename,$2);
+                      /* Common case                                          */
+                      insubroutinedeclare = 1;
+                      /* in the second step we should write the head of       */
+                      /*    the subroutine sub_loop_<subroutinename>          */
+                      writeheadnewsub_0(1);
+                   }
+      | TOK_FUNCTION name_routine arglist TOK_RESULT arglist1
+                   {
+                      /* open param file                                      */
+                      if ( firstpass == 0 )
+                      {
+                         sprintf(ligne,"%s/ParamFile%s.h",nomdir,$2);
+                         paramout=fopen(ligne,"w");
+                         if ( retour77 == 0 ) fprintf(paramout,"!\n");
+                         else fprintf(paramout,"C\n");
+                      }
+                      strcpy(subroutinename,$2);
+                      if ( inmodulemeet == 1 )
+                      {
+                         insubroutinedeclare = 1;
+                         /* we should to list of the subroutine argument the  */
+                         /*    name of the function which has to be defined   */
+                         Add_SubroutineArgument_Var_1($3);
+                         strcpy(DeclType,"");
+                         /* in the second step we should write the head of    */
+                         /*    the subroutine sub_loop_<subroutinename>       */
+                         writeheadnewsub_0(2);
+                      }
+                      else
+                      {
+                            insubroutinedeclare = 1;
+                            /* we should to list of the subroutine argument   */
+                            /* name of the function which has to be defined   */
+                            Add_SubroutineArgument_Var_1($3);
+                            strcpy(DeclType,"");
+                            Add_FunctionType_Var_1($2);
+                            writeheadnewsub_0(2);
+                      }
+                   }
+      | TOK_FUNCTION name_routine arglist
+                   {
+                      /* open param file                                      */
+                      if ( firstpass == 0 )
+                      {
+                         sprintf(ligne,"%s/ParamFile%s.h",nomdir,$2);
+                         paramout=fopen(ligne,"w");
+                         if ( retour77 == 0 ) fprintf(paramout,"!\n");
+                         else fprintf(paramout,"C\n");
+                      }
+                      strcpy(subroutinename,$2);
+                      if ( inmodulemeet == 1 )
+                      {
+                         insubroutinedeclare = 1;
+                         /* we should to list of the subroutine argument the  */
+                         /*    name of the function which has to be defined   */
+                         Add_SubroutineArgument_Var_1($3);
+                         strcpy(DeclType,"");
+                         Add_FunctionType_Var_1($2);
+                         /* in the second step we should write the head of    */
+                         /*    the subroutine sub_loop_<subroutinename>       */
+                         writeheadnewsub_0(2);
+                      }
+                      else
+                      {
+                            insubroutinedeclare = 1;
+                            /* we should to list of the subroutine argument   */
+                            /* name of the function which has to be defined   */
+                            Add_SubroutineArgument_Var_1($3);
+                            strcpy(DeclType,"");
+                            Add_FunctionType_Var_1($2);
+                            writeheadnewsub_0(2);
+                      }
+                   }
+      | TOK_MODULE TOK_NAME
+                   {
+                      GlobalDeclaration = 0;
+                      strcpy(curmodulename,$2);
+                      strcpy(subroutinename,"");
+                      Add_NameOfModule_1($2);
+                      if ( inmoduledeclare == 0 )
+                      {
+                         /* To know if there are in the module declaration    */
+                         inmoduledeclare = 1;
+                         /* to know if a module has been met                  */
+                         inmodulemeet = 1;
+                         /* to know if we are after the keyword contains      */
+                         aftercontainsdeclare = 0 ;
+                      }
+                   }
+      ;
+name_routine : TOK_NAME
+                   {
+                      if ( couldaddvariable == 1 )
+                      {
+                         strcpy($$,$1);strcpy(subroutinename,$1);
+                      }
+                   }
+writedeclar :
+      ;
+before_include : TOK_INCLUDE
+                   {
+                      pos_curinclude = setposcur()-9;
+                   }
+filename : TOK_CHAR_CONSTANT
+                   {
+                      if ( couldaddvariable == 1 ) Add_Include_1($1);
+                   }
+      ;
+arglist :           {
+                      if ( firstpass == 1 && couldaddvariable == 1) $$=NULL;
+                   }
+      | '(' ')'    {
+                      if ( firstpass == 1 && couldaddvariable == 1 ) $$=NULL;
+                   }
+      | '(' args ')'
+                   {
+                       if ( firstpass == 1 && couldaddvariable == 1 ) $$=$2;
+                   }
+      ;
+arglist1:
+      | '(' ')'
+      | '(' args ')'
+                   {
+                      if ( couldaddvariable == 1 )
+                      {
+                         Add_SubroutineArgument_Var_1($2);
+                      }
+                   }
+      ;
+args :arg           {
+                      if ( firstpass == 1  && couldaddvariable == 1)
+                      {
+                         strcpy(nameinttypenameback,nameinttypename);
+                         strcpy(nameinttypename,"");
+                         curvar=createvar($1,NULL);
+                        strcpy(nameinttypename,nameinttypenameback);
+                         curlistvar=insertvar(NULL,curvar);
+                         $$=settype("",curlistvar);
+                      }
+                   }
+      | args ',' arg
+                   {
+                      if ( firstpass == 1  && couldaddvariable == 1)
+                      {
+                         strcpy(nameinttypenameback,nameinttypename);
+                         strcpy(nameinttypename,"");                      
+                         curvar=createvar($3,NULL);
+                         strcpy(nameinttypename,nameinttypenameback);                         
+                         $$=insertvar($1,curvar);
+                      }
+                   }
+      ;
+arg : TOK_NAME      {if ( couldaddvariable == 1 ) strcpy($$,$1);}
+      | '*'        {if ( couldaddvariable == 1 ) strcpy($$,"*");}
+      ;
+spec : type after_type
+                   {
+                      if ( VarTypepar == 1 )
+                      {
+                         couldaddvariable = 1 ;
+                         VarTypepar = 0;
+                      }
+                   }
+      | TOK_TYPE opt_spec opt_sep opt_name
+                   {
+                      if ( couldaddvariable == 1 )
+                      {
+                         VarType = 1;
+                         couldaddvariable = 0 ;
+                      }
+                   }
+      | TOK_ENDTYPE opt_name
+                   {
+                      if ( VarType == 1 ) couldaddvariable = 1 ;
+                      VarType = 0;
+                      VarTypepar = 0;
+                   }
+      | TOK_POINTER list_couple
+      | before_parameter  '(' paramlist ')'
+                   {
+                      if ( couldaddvariable == 1 )
+                      {
+                         if ( insubroutinedeclare == 0 )
+                         {
+                                                  Add_GlobalParameter_Var_1($3);
+                                                  }
+                         else Add_Parameter_Var_1($3);
+                         pos_end = setposcur();
+                        RemoveWordSET_0(fortranout,pos_cur_decl,
+                                                    pos_end-pos_cur_decl);
+                      }
+                      VariableIsParameter =  0 ;
+                   }
+      | before_parameter  paramlist
+                   {
+                     if ( couldaddvariable == 1 )
+                     {
+                        if ( insubroutinedeclare == 0 )
+                                                  Add_GlobalParameter_Var_1($2);
+                         else Add_Parameter_Var_1($2);
+                         pos_end = setposcur();
+                         RemoveWordSET_0(fortranout,pos_cur_decl,
+                                                    pos_end-pos_cur_decl);
+                      }
+                      VariableIsParameter =  0 ;
+                   }
+      | common
+      | save
+                  {
+                     pos_end = setposcur();
+                     RemoveWordSET_0(fortranout,pos_cursave,
+                                                pos_end-pos_cursave);
+                  }
+      | implicit
+      | dimension
+                  {
+                   /* if the variable is a parameter we can suppose that is   */
+                   /*    value is the same on each grid. It is not useless to */
+                   /*    create a copy of it on each grid                     */
+                      if ( couldaddvariable == 1 )
+                      {
+                         Add_Globliste_1($1);
+                         /* if variableparamlists has been declared in a      */
+                         /*    subroutine                                     */
+                         if ( insubroutinedeclare == 1 )
+                         {
+                            Add_Dimension_Var_1($1);
+                         }
+                         pos_end = setposcur();
+                         RemoveWordSET_0(fortranout,pos_curdimension,
+                                                pos_end-pos_curdimension);
+                      }
+                      /*                                                      */
+                      PublicDeclare = 0;
+                      PrivateDeclare = 0;
+                      ExternalDeclare = 0;
+                      strcpy(NamePrecision,"");
+                      c_star = 0;
+                      InitialValueGiven = 0 ;
+                      strcpy(IntentSpec,"");
+                      VariableIsParameter =  0 ;
+                      Allocatabledeclare = 0 ;
+                      Targetdeclare = 0 ;
+                      SaveDeclare = 0;
+                      pointerdeclare = 0;
+                      optionaldeclare = 0 ;
+                      dimsgiven=0;
+                      c_selectorgiven=0;
+                      strcpy(nameinttypename,"");
+                      strcpy(c_selectorname,"");
+                   }
+      | public
+      {
+      if (firstpass == 0)
+      {
+      if ($1)
+      {
+      removeglobfromlist(&($1));
+      pos_end = setposcur();
+      RemoveWordSET_0(fortranout,pos_cur,pos_end-pos_cur);
+      writelistpublic($1);
+      }
+      }
+      }
+      | private
+      | use_stat
+      | module_proc_stmt
+      | interface
+      | namelist
+      | TOK_BACKSPACE '(' expr ')'
+      | TOK_EXTERNAL opt_sep use_name_list
+      | TOK_INTRINSIC opt_sep use_intrinsic_list
+      | TOK_EQUIVALENCE list_expr_equi
+      | before_data data '\n'
+                   {
+                      /* we should remove the data declaration                */
+                      if ( couldaddvariable == 1 && aftercontainsdeclare != 2 )
+                      {
+                        pos_end = setposcur();
+                        RemoveWordSET_0(fortranout,pos_curdata,
+                                              pos_end-pos_curdata);
+                      }
+                      if ( couldaddvariable == 1 && aftercontainsdeclare == 1 )
+                      {
+                      if (firstpass == 0)
+                      {
+                        ReWriteDataStatement_0(fortranout);
+                        pos_end = setposcur();
+                        }
+                      }
+                  }
+      ;
+opt_spec :
+      | access_spec
+      {
+         PublicDeclare = 0 ;
+         PrivateDeclare = 0 ;
+      }
+      ;
+name_intrinsic : TOK_SUM
+      | TOK_TANH
+      | TOK_MAXVAL
+      | TOK_MIN
+      | TOK_MINVAL
+      | TOK_TRIM
+      | TOK_SQRT
+      | TOK_NINT
+      | TOK_FLOAT
+      | TOK_EXP
+      | TOK_COS
+      | TOK_COSH
+      | TOK_ACOS
+      | TOK_SIN
+      | TOK_SINH
+      | TOK_ASIN
+      | TOK_LOG
+      | TOK_TAN
+      | TOK_ATAN
+      | TOK_MOD
+      | TOK_SIGN
+      | TOK_MINLOC
+      | TOK_MAXLOC
+      | TOK_NAME
+      ;
+use_intrinsic_list : name_intrinsic
+      | use_intrinsic_list ',' name_intrinsic
+      ;
+list_couple : '(' list_expr ')'
+      | list_couple ',' '(' list_expr ')'
+      ;
+list_expr_equi : expr_equi
+      | list_expr_equi ',' expr_equi
+      ;
+expr_equi : '(' list_expr_equi1 ')'
+      ;
+list_expr_equi1 : ident dims
+      | list_expr_equi1 ',' ident dims
+      ;
+list_expr : expr
+      | list_expr ',' expr
+      ;
+opt_sep :
+      | ':' ':'
+      ;
+after_type : dcl nodimsgiven
+                   {
+                      /* if the variable is a parameter we can suppose that is*/
+                      /*    value is the same on each grid. It is not useless */
+                      /*    to create a copy of it on each grid               */
+                      if ( couldaddvariable == 1 )
+                      {
+                      pos_end = setposcur();
+                      /*if (insubroutinedeclare == 0)
+                        {   */
+                         RemoveWordSET_0(fortranout,pos_cur_decl,
+                                                 pos_end-pos_cur_decl);
+                                         
+                       /* }
+                      else
+                       {*/
+                        ReWriteDeclarationAndAddTosubroutine_01($1);
+                        pos_cur_decl = setposcur();
+                        
+                       /*}*/
+                      if ( firstpass == 0 &&
+                           GlobalDeclaration == 0 &&
+                           insubroutinedeclare == 0 )
+                      {
+
+                         sprintf(ligne,"\n#include \"Module_Declar_%s.h\"\n"
+                                                                ,curmodulename);
+                         tofich(fortranout,ligne,1);
+                         sprintf (ligne, "Module_Declar_%s.h",curmodulename);
+                         module_declar = associate(ligne);
+                         sprintf (ligne, " ");
+                         tofich (module_declar, ligne,1);
+                         GlobalDeclaration = 1 ;
+                         pos_cur_decl = setposcur();
+
+                      }
+                         $$ = $1;
+                         Add_Globliste_1($1);
+                                                  
+                         if ( insubroutinedeclare == 0 )
+                                                  Add_GlobalParameter_Var_1($1);
+                         else
+                         {
+                            if ( pointerdeclare == 1 )
+                                                Add_Pointer_Var_From_List_1($1);
+                            Add_Parameter_Var_1($1);
+                         }
+
+                         /* if variables has been declared in a subroutine    */
+                         if ( insubroutinedeclare == 1 )
+                         { 
+                       /*    Add_SubroutineDeclaration_Var_1($1);*/
+                         }
+                         /* If there are a SAVE declarations in module's      */
+                         /*    subroutines we should remove it from the       */
+                         /*    subroutines declaration and add it in the      */
+                         /*    global declarations                            */
+                         if ( aftercontainsdeclare == 1 &&
+                              SaveDeclare == 1 && firstpass == 1 )
+                         {
+                              if ( inmodulemeet == 0 ) Add_Save_Var_dcl_1($1);
+                              else  Add_SubroutineDeclarationSave_Var_1($1);
+                         }
+                      }
+                      /*                                                      */
+                      PublicDeclare = 0;
+                      PrivateDeclare = 0;
+                      ExternalDeclare = 0;
+                      strcpy(NamePrecision,"");
+                      c_star = 0;
+                      InitialValueGiven = 0 ;
+                      strcpy(IntentSpec,"");
+                      VariableIsParameter =  0 ;
+                      Allocatabledeclare = 0 ;
+                      Targetdeclare = 0 ;
+                      SaveDeclare = 0;
+                      pointerdeclare = 0;
+                      optionaldeclare = 0 ;
+                      dimsgiven=0;
+                      c_selectorgiven=0;
+                      strcpy(nameinttypename,"");
+                      strcpy(c_selectorname,"");
+                   }
+      | before_function name_routine arglist
+                   {
+                      /* open param file                                      */
+                      if ( firstpass == 0 )
+                      {
+                         sprintf(ligne,"%s/ParamFile%s.h",nomdir,$2);
+                         paramout=fopen(ligne,"w");
+                         if ( retour77 == 0 ) fprintf(paramout,"!\n");
+                         else fprintf(paramout,"C\n");
+                      }
+                      strcpy(subroutinename,$2);
+                      if ( inmodulemeet == 1 )
+                      {
+                         insubroutinedeclare = 1;
+                         /* we should to list of the subroutine argument the  */
+                         /*    name of the function which has to be defined   */
+                         Add_SubroutineArgument_Var_1($3);
+                         Add_FunctionType_Var_1($2);
+                         /* in the second step we should write the head of    */
+                         /*    the subroutine sub_loop_<subroutinename>       */
+                         writeheadnewsub_0(2);
+                      }
+                      else
+                      {
+                         insubroutinedeclare = 1;
+                         /* we should to list of the subroutine argument the  */
+                         /*    name of the function which has to be defined   */
+                         Add_SubroutineArgument_Var_1($3);
+                         Add_FunctionType_Var_1($2);
+                         /* in the second step we should write the head of    */
+                         /*    the subroutine sub_loop_<subroutinename>       */
+                         writeheadnewsub_0(2);
+                      }
+                      strcpy(nameinttypename,"");
+
+                   }
+      ;
+before_function : TOK_FUNCTION
+                   {
+                       functiondeclarationisdone = 1;
+                   }
+                   ;
+
+before_parameter : TOK_PARAMETER
+                   {
+                      VariableIsParameter = 1;
+                      pos_curparameter = setposcur()-9;
+                   }
+before_data : TOK_DATA
+                   {
+                      pos_curdata = setposcur()-strlen($1);
+                      Init_List_Data_Var();
+                   }
+data : TOK_NAME TOK_SLASH datavallist TOK_SLASH
+                   {
+                      if ( couldaddvariable == 1 )
+                      {
+/*                      if ( aftercontainsdeclare == 1 ) strcpy(ligne,"");
+                      else */
+/*                      sprintf(ligne,"%s",$3);*/
+                      createstringfromlistname(ligne,$3);
+                      if (firstpass == 1)
+                      Add_Data_Var_1(&List_Data_Var,$1,ligne);
+                      else
+                      Add_Data_Var_1(&List_Data_Var_Cur,$1,ligne);
+                      }
+                   }
+      | data opt_comma TOK_NAME TOK_SLASH datavallist TOK_SLASH
+                   {
+                      if ( couldaddvariable == 1 )
+                      {
+                      /*if ( aftercontainsdeclare == 1 ) strcpy(ligne,"");
+                      else */
+                      /*sprintf(ligne,"%s",$5);   */
+                      createstringfromlistname(ligne,$5);                      
+                      if (firstpass == 1)                      
+                      Add_Data_Var_1(&List_Data_Var,$3,ligne);
+                      else
+                      Add_Data_Var_1(&List_Data_Var_Cur,$3,ligne);                      
+                      }
+                   }
+      | datanamelist TOK_SLASH datavallist TOK_SLASH
+                   {
+                       /*******************************************************/
+                       /*******************************************************/
+                       /*******************************************************/
+                       /*******************************************************/
+                       /*******************************************************/
+                       /*******************************************************/
+                       /*******************************************************/
+                       if (firstpass == 1)
+                       Add_Data_Var_Names_01(&List_Data_Var,$1,$3);
+                       else
+                       Add_Data_Var_Names_01(&List_Data_Var_Cur,$1,$3);
+                   }
+      ;
+datavallist : expr_data
+                   {
+                      if ( couldaddvariable == 1 )
+                      {
+                         $$ = Insertname(NULL,$1,0);
+                      }
+                   }
+      | expr_data ',' datavallist
+                   {
+                      if ( couldaddvariable == 1 )
+                      {
+                         $$ = Insertname($3,$1,1);
+                      }
+                   }
+      ;
+
+save :  before_save varsave
+      | before_save comblock varsave
+      | save opt_comma comblock opt_comma varsave
+      | save ',' varsave
+      ;
+before_save : TOK_SAVE
+                  {
+                     pos_cursave = setposcur()-4;
+                  }
+      ;
+varsave :
+      | TOK_NAME dims
+                  {
+                     if ( couldaddvariable == 1 ) Add_Save_Var_1($1,$2);
+                  }
+      ;
+datanamelist : TOK_NAME
+		{
+		$$=Insertname(NULL,$1,0);
+		}
+      | TOK_NAME '(' expr ')'
+      {
+      printf("INSTRUCTION NON TRAITEE : INITIALISATION DE DATA AVEC EXPRESSION\n");
+      exit(0);
+      }
+      | datanamelist ',' datanamelist
+      {
+      $$ = concat_listname($1,$3);
+      }
+      ;
+expr_data : opt_signe simple_const
+                   {if ( couldaddvariable == 1 ) sprintf($$,"%s%s",$1,$2);}
+      | expr_data '+' expr_data
+                   {if ( couldaddvariable == 1 ) sprintf($$,"%s+%s",$1,$3);}
+      | expr_data '-' expr_data
+                   {if ( couldaddvariable == 1 ) sprintf($$,"%s-%s",$1,$3);}
+      | expr_data '*' expr_data
+                   {if ( couldaddvariable == 1 ) sprintf($$,"%s*%s",$1,$3);}
+      | expr_data '/' expr_data
+                   {if ( couldaddvariable == 1 ) sprintf($$,"%s/%s",$1,$3);}
+      ;
+opt_signe :
+                   {if ( couldaddvariable == 1 ) strcpy($$,"");}
+      | signe
+                   {if ( couldaddvariable == 1 ) strcpy($$,$1);}
+      ;
+namelist :  namelist_action after_namelist
+      ;
+namelist_action : TOK_NAMELIST  ident
+      | TOK_NAMELIST  comblock ident
+      | namelist_action opt_comma comblock opt_comma ident
+      | namelist_action ',' ident
+      ;
+after_namelist :
+      ;
+interface : TOK_INTERFACE opt_name
+	{
+	ininterfacedeclare = 1 ;
+	printf("INTEFACE entree\n");
+	}
+      | TOK_ENDINTERFACE opt_name
+      {
+      ininterfacedeclare = 0;
+      }
+      ;
+before_dimension : TOK_DIMENSION
+                   {
+                      positioninblock=0;
+                      pos_curdimension = setposcur()-9;
+                   }
+
+dimension :  before_dimension opt_comma TOK_NAME dims lengspec
+      {
+         if ( couldaddvariable == 1 )
+         {
+            /*                                                                */
+            curvar=createvar($3,$4);
+            /*                                                                */
+            CreateAndFillin_Curvar("",curvar);
+            /*                                                                */
+            curlistvar=insertvar(NULL,curvar);
+            /*                                                                */
+            $$=settype("",curlistvar);
+            /*                                                                */
+            strcpy(vallengspec,"");
+         }
+      }
+      | dimension ',' TOK_NAME dims lengspec
+      {
+         if ( couldaddvariable == 1 )
+         {
+            /*                                                                */
+            curvar=createvar($3,$4);
+            /*                                                                */
+            CreateAndFillin_Curvar("",curvar);
+            /*                                                                */
+            curlistvar=insertvar($1,curvar);
+            /*                                                                */
+            $$=curlistvar;
+            /*                                                                */
+            strcpy(vallengspec,"");
+         }
+      }
+      ;
+private : TOK_PRIVATE '\n'
+      | TOK_PRIVATE opt_sep use_name_list
+      ;
+public : TOK_PUBLIC '\n'
+        {
+        $$=(listname *)NULL;
+        }
+      | TOK_PUBLIC opt_sep use_name_list
+         {
+          $$=$3;
+         }
+      ;
+use_name_list : TOK_NAME
+           {
+           $$ = Insertname(NULL,$1,0);
+           }
+      | use_name_list ',' TOK_NAME
+          {
+          $$ = Insertname($1,$3,0);
+          }
+      ;
+common : before_common var_common_list
+                   {
+                         pos_end = setposcur();
+                         RemoveWordSET_0(fortranout,pos_curcommon,
+                                                  pos_end-pos_curcommon);
+                   }
+      | before_common comblock var_common_list
+                   {
+                         if ( couldaddvariable == 1 )
+                         {
+                            sprintf(charusemodule,"%s",$2);
+                            Add_NameOfCommon_1($2,subroutinename);
+                            pos_end = setposcur();
+                            RemoveWordSET_0(fortranout,pos_curcommon,
+                                                       pos_end-pos_curcommon);
+                         }
+                   }
+      | common opt_comma comblock opt_comma var_common_list
+                   {
+                         if ( couldaddvariable == 1 )
+                         {
+                            sprintf(charusemodule,"%s",$3);
+                            Add_NameOfCommon_1($3,subroutinename);
+                            pos_end = setposcur();
+                            RemoveWordSET_0(fortranout,pos_curcommon,
+                                                       pos_end-pos_curcommon);
+                         }
+                   }
+      ;
+before_common : TOK_COMMON
+                   {
+                      positioninblock=0;
+                      pos_curcommon = setposcur()-6;
+                   }
+      | TOK_GLOBAL TOK_COMMON
+                   {
+                      positioninblock=0;
+                      pos_curcommon = setposcur()-6-7;
+                   }
+      ;
+var_common_list : var_common
+                   {
+                      if ( couldaddvariable == 1 ) Add_Common_var_1();
+                   }
+
+     | var_common_list ',' var_common
+                   {
+                      if ( couldaddvariable == 1 ) Add_Common_var_1();
+                   }
+var_common : TOK_NAME dims
+                   {
+                      if ( couldaddvariable == 1 )
+                      {
+                         positioninblock = positioninblock + 1 ;
+                         strcpy(commonvar,$1);
+                         commondim = $2;
+                      }
+                   }
+      ;
+comblock : TOK_DSLASH
+                   {
+                      if ( couldaddvariable == 1 )
+                      {
+                         strcpy($$,"");
+                         positioninblock=0;
+                         strcpy(commonblockname,"");
+                      }
+                   }
+      | TOK_SLASH TOK_NAME TOK_SLASH
+                   {
+                      if ( couldaddvariable == 1 )
+                      {
+                         strcpy($$,$2);
+                         positioninblock=0;
+                         strcpy(commonblockname,$2);
+                      }
+                   }
+      ;
+opt_comma :
+      | ','
+      ;
+paramlist : paramitem
+                   {
+                      if ( couldaddvariable == 1 ) $$=insertvar(NULL,$1);
+                   }
+      | paramlist ',' paramitem
+                   {
+                      if ( couldaddvariable == 1 ) $$=insertvar($1,$3);
+                   }
+      ;
+paramitem : TOK_NAME '=' expr
+                   {
+                     if ( couldaddvariable == 1 )
+                     {
+                         curvar=(variable *) malloc(sizeof(variable));
+                         /*                                                   */
+                         Init_Variable(curvar);
+                         /*                                                   */
+                         curvar->v_VariableIsParameter=1;
+                         strcpy(curvar->v_nomvar,$1);
+                         Save_Length($1,4);
+                         strcpy(curvar->v_subroutinename,subroutinename);
+                         Save_Length(subroutinename,11);
+                         strcpy(curvar->v_modulename,curmodulename);
+                         Save_Length(curmodulename,6);
+                         strcpy(curvar->v_initialvalue,$3);
+                         Save_Length($3,14);
+                         strcpy(curvar->v_commoninfile,mainfile);
+                         Save_Length(mainfile,10);
+                         $$=curvar;
+                      }
+                   }
+      ;
+module_proc_stmt : TOK_PROCEDURE proc_name_list
+      ;
+proc_name_list : TOK_NAME
+      | proc_name_list ',' TOK_NAME
+      ;
+implicit : TOK_IMPLICIT TOK_NONE
+                    {
+                       if ( insubroutinedeclare == 1 )
+                       {
+                          Add_ImplicitNoneSubroutine_1();
+                          pos_end = setposcur();
+                          RemoveWordSET_0(fortranout,pos_end-13,
+                                                             13);
+                       }
+                    }
+      | TOK_IMPLICIT TOK_REAL8
+      ;
+opt_retour :
+      ;
+dcl : options opt_retour TOK_NAME dims lengspec initial_value
+                   {
+                      if ( couldaddvariable == 1 )
+                      {
+                         /*                                                   */
+                         if (dimsgiven == 1)
+                         {
+                            curvar=createvar($3,curdim);
+                         }
+                         else
+                         {
+                            curvar=createvar($3,$4);
+                         }
+                         /*                                                   */
+                         CreateAndFillin_Curvar(DeclType,curvar);
+                         /*                                                   */
+                         curlistvar=insertvar(NULL,curvar);
+                         if (!strcasecmp(DeclType,"character"))
+                         {
+                            if (c_selectorgiven == 1)
+                            {
+                               strcpy(c_selectordim.first,"1");
+                               strcpy(c_selectordim.last,c_selectorname);
+                               Save_Length(c_selectorname,1);
+                               change_dim_char
+                                     (insertdim(NULL,c_selectordim),curlistvar);
+                            }
+                         }
+                         $$=settype(DeclType,curlistvar);
+                      }
+                      strcpy(vallengspec,"");
+                   }
+      | dcl ',' opt_retour TOK_NAME dims lengspec initial_value
+                   {
+                      if ( couldaddvariable == 1 )
+                      {
+                         if (dimsgiven == 1)
+                         {
+                            curvar=createvar($4,curdim);
+                         }
+                         else
+                         {
+                            curvar=createvar($4,$5);
+                         }
+                         /*                                                   */
+                         CreateAndFillin_Curvar($1->var->v_typevar,curvar);
+                         /*                                                   */
+                         strcpy(curvar->v_typevar,($1->var->v_typevar));
+                         Save_Length($1->var->v_typevar,3);
+                         /*                                                   */
+                         curlistvar=insertvar($1,curvar);
+                         if (!strcasecmp(DeclType,"character"))
+                         {
+                            if (c_selectorgiven == 1)
+                            {
+                               strcpy(c_selectordim.first,"1");
+                               strcpy(c_selectordim.last,c_selectorname);
+                               Save_Length(c_selectorname,1);
+                               change_dim_char
+                                     (insertdim(NULL,c_selectordim),curlistvar);
+                            }
+                         }
+                         $$=curlistvar;
+                      }
+                      strcpy(vallengspec,"");
+                   }
+      ;
+nodimsgiven :       {dimsgiven=0;}
+      ;
+type : typespec selector
+                   {strcpy(DeclType,$1);}
+      | before_character c_selector
+                   {
+                      strcpy(DeclType,"CHARACTER");
+                   }
+      | typename '*' TOK_CSTINT
+                   {
+                      strcpy(DeclType,$1);
+                      strcpy(nameinttypename,$3);
+                   }
+      | before_typepar attribute ')'
+                   {
+                      strcpy(DeclType,"TYPE");
+                   }
+      ;
+before_typepar : TOK_TYPEPAR
+                   {
+                 /*     if ( couldaddvariable == 1 ) VarTypepar = 1 ;
+                      couldaddvariable = 0 ;
+                      pos_cur_decl = setposcur()-5;*/
+                   pos_cur_decl = setposcur()-5;
+                   }
+      ;
+c_selector :
+      | '*' TOK_CSTINT
+                   {c_selectorgiven=1;strcpy(c_selectorname,$2);}
+      | '*' '(' c_attribute ')' {c_star = 1;}
+      | '(' c_attribute ')'
+      ;
+c_attribute : TOK_NAME clause opt_clause
+      | TOK_NAME '=' clause opt_clause
+      | clause opt_clause
+      ;
+before_character : TOK_CHARACTER
+                   {
+                      pos_cur_decl = setposcur()-9;
+                   }
+      ;
+typespec : typename {strcpy($$,$1);}
+      ;
+typename : TOK_INTEGER
+                   {
+                      strcpy($$,"INTEGER");
+                      pos_cur_decl = setposcur()-7;
+                   }
+      | TOK_REAL   {
+                      strcpy($$,"REAL");
+                      pos_cur_decl = setposcur()-4;
+                   }
+      | TOK_COMPLEX
+                   {strcpy($$,"COMPLEX");
+                   pos_cur_decl = setposcur()-7;}
+      | TOK_DOUBLEPRECISION
+                   {
+                      pos_cur_decl = setposcur()-16;
+                      strcpy($$,"REAL");
+                      strcpy(nameinttypename,"8");
+                   }
+      | TOK_DOUBLECOMPLEX
+                   {strcpy($$,"DOUBLE COMPLEX");}
+      | TOK_LOGICAL
+                   {
+                      strcpy($$,"LOGICAL");
+                      pos_cur_decl = setposcur()-7;
+                   }
+      ;
+lengspec :
+      | '*' proper_lengspec {strcpy(vallengspec,$2);}
+      ;
+proper_lengspec : expr {sprintf($$,"*%s",$1);}
+      | '(' '*' ')'{strcpy($$,"*(*)");}
+      ;
+selector :
+      | '*' proper_selector
+      | '(' attribute ')'
+      ;
+proper_selector : expr
+      | '(' '*' ')'
+      ;
+attribute : TOK_NAME clause
+      | TOK_NAME '=' clause
+                   {
+                      if ( strstr($3,"0.d0") )
+                      {
+                         strcpy(nameinttypename,"8");
+                         sprintf(NamePrecision,"");
+                      }
+                      else sprintf(NamePrecision,"%s = %s",$1,$3);
+                   }
+      | TOK_NAME
+                   {
+                      strcpy(NamePrecision,$1);
+                   }
+      | TOK_CSTINT
+                   {
+                      strcpy(NamePrecision,$1);
+                   }
+      ;
+clause : expr       {strcpy(CharacterSize,$1);
+                    strcpy($$,$1);}
+      | '*'        {strcpy(CharacterSize,"*");
+                    strcpy($$,"*");}
+      ;
+opt_clause :
+      | ',' TOK_NAME clause
+      ;
+options :
+      | ':' ':'
+      | ',' attr_spec_list ':' ':'
+      ;
+attr_spec_list : attr_spec
+      | attr_spec_list ',' attr_spec
+      ;
+attr_spec : TOK_PARAMETER
+                   {
+                      VariableIsParameter = 1;
+                   }
+      | access_spec
+      | TOK_ALLOCATABLE
+                   {Allocatabledeclare = 1;}
+      | TOK_DIMENSION dims
+                   {
+                      dimsgiven=1;
+                      curdim=$2;
+                   }
+      | TOK_EXTERNAL
+                   {ExternalDeclare = 1;}
+      | TOK_INTENT '(' intent_spec ')'
+                   {strcpy(IntentSpec,$3);}
+      | TOK_INTRINSIC
+      | TOK_OPTIONAL{optionaldeclare = 1 ;}
+      | TOK_POINTER {pointerdeclare = 1 ;}
+      | TOK_SAVE    {
+/*                       if ( inmodulemeet == 1 )
+                       {*/
+                          SaveDeclare = 1 ;
+                     /*  }*/
+                    }
+      | TOK_TARGET
+      				{Targetdeclare = 1;}
+      ;
+intent_spec : TOK_IN {strcpy($$,$1);}
+      | TOK_OUT     {strcpy($$,$1);}
+      | TOK_INOUT   {strcpy($$,$1); }
+      ;
+access_spec : TOK_PUBLIC
+                   {PublicDeclare = 1;}
+      | TOK_PRIVATE
+                   {PrivateDeclare = 1;}
+      ;
+dims :              {if ( created_dimensionlist == 1 )
+                       {
+                           $$=(listdim *)NULL;
+                       }
+                   }
+      | '(' dimlist ')'
+                   {if ( created_dimensionlist == 1 ||
+                         agrif_parentcall      == 1 ) $$=$2;}
+      ;
+dimlist :   dim     {if ( created_dimensionlist == 1 ||
+                         agrif_parentcall      == 1 ) $$=insertdim(NULL,$1);}
+      | dimlist ',' dim
+                   {if ( couldaddvariable == 1 )
+                         if ( created_dimensionlist == 1 ) $$=insertdim($1,$3);}
+      ;
+dim : ubound         {
+                      strcpy($$.first,"1");
+                      strcpy($$.last,$1);
+                      Save_Length($1,1);
+                   }
+      | ':'        {
+                      strcpy($$.first,"");
+                      strcpy($$.last,"");
+                   }
+      | expr ':'   {
+                      strcpy($$.first,$1);
+                      Save_Length($1,2);
+                      strcpy($$.last,"");
+                   }
+      | ':' expr   {
+                      strcpy($$.first,"");
+                      strcpy($$.last,$2);
+                      Save_Length($2,1);
+                   }
+      | expr ':' ubound
+                   {
+                      strcpy($$.first,$1);
+                      Save_Length($1,2);
+                      strcpy($$.last,$3);
+                      Save_Length($3,1);
+                   }
+      ;
+ubound :  '*'       {strcpy($$,"*");}
+      | expr       {strcpy($$,$1);}
+      ;
+expr :  uexpr       {if ( couldaddvariable == 1 ) strcpy($$,$1);}
+      | '(' expr ')'
+                   {if ( couldaddvariable == 1 ) sprintf($$,"(%s)",$2);}
+      | complex_const
+                   {if ( couldaddvariable == 1 ) strcpy($$,$1);}
+      | predefinedfunction
+                   {if ( couldaddvariable == 1 ) strcpy($$,$1);}
+      ;
+
+predefinedfunction : TOK_SUM minmaxlist ')'
+                   {sprintf($$,"SUM(%s)",$2);}
+      | TOK_MAX minmaxlist ')'
+                   {sprintf($$,"MAX(%s)",$2);}
+      | TOK_TANH '(' minmaxlist ')'
+                   {sprintf($$,"TANH(%s)",$3);}
+      | TOK_MAXVAL '(' minmaxlist ')'
+                   {sprintf($$,"MAXVAL(%s)",$3);}
+      | TOK_MIN minmaxlist ')'
+                   {sprintf($$,"MIN(%s)",$2);}
+      | TOK_MINVAL '(' minmaxlist ')'
+                   {sprintf($$,"MINVAL(%s)",$3);}
+      | TOK_TRIM '(' expr ')'
+                   {sprintf($$,"TRIM(%s)",$3);}
+      | TOK_SQRT expr ')'
+                   {sprintf($$,"SQRT(%s)",$2);}
+      | TOK_REAL '(' minmaxlist ')'
+                   {sprintf($$,"REAL(%s)",$3);}
+      | TOK_NINT '(' expr ')'
+                   {sprintf($$,"NINT(%s)",$3);}
+      | TOK_FLOAT '(' expr ')'
+                   {sprintf($$,"FLOAT(%s)",$3);}
+      | TOK_EXP '(' expr ')'
+                   {sprintf($$,"EXP(%s)",$3);}
+      | TOK_COS '(' expr ')'
+                   {sprintf($$,"COS(%s)",$3);}
+      | TOK_COSH '(' expr ')'
+                   {sprintf($$,"COSH(%s)",$3);}
+      | TOK_ACOS '(' expr ')'
+                   {sprintf($$,"ACOS(%s)",$3);}
+      | TOK_SIN '(' expr ')'
+                   {sprintf($$,"SIN(%s)",$3);}
+      | TOK_SINH '(' expr ')'
+                   {sprintf($$,"SINH(%s)",$3);}
+      | TOK_ASIN '(' expr ')'
+                   {sprintf($$,"ASIN(%s)",$3);}
+      | TOK_LOG '(' expr ')'
+                   {sprintf($$,"LOG(%s)",$3);}
+      | TOK_TAN '(' expr ')'
+                   {sprintf($$,"TAN(%s)",$3);}
+      | TOK_ATAN '(' expr ')'
+                   {sprintf($$,"ATAN(%s)",$3);}
+      | TOK_ABS expr ')'
+                   {sprintf($$,"ABS(%s)",$2);}
+      | TOK_MOD '(' minmaxlist ')'
+                   {sprintf($$,"MOD(%s)",$3);}
+      | TOK_SIGN '(' minmaxlist ')'
+                   {sprintf($$,"SIGN(%s)",$3);}
+      | TOK_MINLOC '(' minmaxlist ')'
+                   {sprintf($$,"MINLOC(%s)",$3);}
+      | TOK_MAXLOC '(' minmaxlist ')'
+                   {sprintf($$,"MAXLOC(%s)",$3);}
+      ;
+minmaxlist : expr {strcpy($$,$1);}
+      | minmaxlist ',' expr
+                   {if ( couldaddvariable == 1 )
+                   { strcpy($$,$1);strcat($$,",");strcat($$,$3);}}
+      ;
+uexpr :  lhs        {if ( couldaddvariable == 1 ) strcpy($$,$1);}
+      | simple_const
+                   {if ( couldaddvariable == 1 ) strcpy($$,$1);}
+      | vec
+                   {if ( couldaddvariable == 1 ) strcpy($$,$1);}
+      | expr operation
+                   {if ( couldaddvariable == 1 ) sprintf($$,"%s%s",$1,$2);}
+      | signe expr %prec '*' 
+                   {if ( couldaddvariable == 1 ) sprintf($$,"%s%s",$1,$2);}
+      | TOK_NOT expr
+                   {if ( couldaddvariable == 1 ) sprintf($$,"%s%s",$1,$2);}
+      ;
+signe : '+'        {if ( couldaddvariable == 1 ) strcpy($$,"+");}
+      | '-'        {if ( couldaddvariable == 1 ) strcpy($$,"-");}
+      ;
+operation : '+' expr %prec '+'
+                   {if ( couldaddvariable == 1 ) sprintf($$,"+%s",$2);}
+      |  '-' expr %prec '+'
+                   {if ( couldaddvariable == 1 ) sprintf($$,"-%s",$2);}
+      |  '*' expr
+                   {if ( couldaddvariable == 1 ) sprintf($$,"*%s",$2);}
+      |  TOK_DASTER expr
+                   {if ( couldaddvariable == 1 ) sprintf($$,"%s%s",$1,$2);}
+      |  TOK_EQ expr %prec TOK_EQ
+                   {if ( couldaddvariable == 1 ) sprintf($$,"%s%s",$1,$2);}
+      |  TOK_EQV expr %prec TOK_EQV
+                   {if ( couldaddvariable == 1 ) sprintf($$,"%s%s",$1,$2);}                   
+      |  TOK_GT expr %prec TOK_EQ
+                   {if ( couldaddvariable == 1 ) sprintf($$,"%s%s",$1,$2);}
+      |  '>' expr %prec TOK_EQ
+                   {if ( couldaddvariable == 1 ) sprintf($$," > %s",$2);}
+      |  TOK_LT expr %prec TOK_EQ
+                   {if ( couldaddvariable == 1 ) sprintf($$,"%s%s",$1,$2);}
+      |  '<' expr %prec TOK_EQ
+                   {if ( couldaddvariable == 1 ) sprintf($$," < %s",$2);}
+      |  TOK_GE expr %prec TOK_EQ
+                   {if ( couldaddvariable == 1 ) sprintf($$,"%s%s",$1,$2);}
+      |  '>''=' expr %prec TOK_EQ
+                   {if ( couldaddvariable == 1 ) sprintf($$," >= %s",$3);}
+      |  TOK_LE expr %prec TOK_EQ
+                   {if ( couldaddvariable == 1 ) sprintf($$,"%s%s",$1,$2);}
+      |  '<''=' expr %prec TOK_EQ
+                   {if ( couldaddvariable == 1 ) sprintf($$," <= %s",$3);}
+      |  TOK_NE expr %prec TOK_EQ
+                   {if ( couldaddvariable == 1 ) sprintf($$,"%s%s",$1,$2);}
+      |  TOK_NEQV expr %prec TOK_EQV
+                   {if ( couldaddvariable == 1 ) sprintf($$,"%s%s",$1,$2);}                   
+      |  TOK_XOR expr
+                   {if ( couldaddvariable == 1 ) sprintf($$,"%s%s",$1,$2);}
+      |  TOK_OR expr
+                   {if ( couldaddvariable == 1 ) sprintf($$,"%s%s",$1,$2);}
+      |  TOK_AND expr
+                   {if ( couldaddvariable == 1 ) sprintf($$,"%s%s",$1,$2);}
+      |  TOK_SLASH after_slash
+                   {if ( couldaddvariable == 1 ) sprintf($$,"%s",$2);}
+      |  '=' after_equal
+                   {if ( couldaddvariable == 1 ) sprintf($$,"%s",$2);}
+
+after_slash : {strcpy($$,"");}
+      | expr
+                   {sprintf($$,"/%s",$1);}
+      | '=' expr %prec TOK_EQ
+                   {sprintf($$,"/= %s",$2);}
+      | TOK_SLASH expr
+                   {sprintf($$,"//%s",$2);}
+      ;
+after_equal : '=' expr %prec TOK_EQ
+                   {if ( couldaddvariable == 1 ) sprintf($$,"==%s",$2);}
+      | expr
+                   {if ( couldaddvariable == 1 ) sprintf($$,"= %s",$1);}
+      ;
+
+lhs : ident         {if ( couldaddvariable == 1 )
+						{
+						printf("ident = %s\n",$1);
+						strcpy($$,$1);}
+						}
+      | structure_component
+                   {if ( couldaddvariable == 1 ) {
+                   printf("struct = %s\n",$1);
+                   strcpy($$,$1);}
+                   }
+      | array_ele_substring_func_ref
+                   {if ( couldaddvariable == 1 ) {
+                   printf("arrayref = %s\n",$1);
+                   strcpy($$,$1);
+                   }}
+      ;
+beforefunctionuse : {
+                      agrif_parentcall =0;
+                      if (!strcasecmp(identcopy,"Agrif_Parent") )
+                                                            agrif_parentcall =1;
+                      if ( Agrif_in_Tok_NAME(identcopy) == 1 )
+                      {
+                         inagrifcallargument = 1;
+                         Add_SubroutineWhereAgrifUsed_1(subroutinename,
+                                                        curmodulename);
+                      }
+                   }
+      ;
+array_ele_substring_func_ref : begin_array
+                   {
+                     strcpy($$,$1);
+                     if ( incalldeclare == 0 ) inagrifcallargument = 0;
+                   }
+      | begin_array substring
+                   {if ( couldaddvariable == 1 ) sprintf($$," %s %s ",$1,$2);}
+      | structure_component '(' funarglist ')'
+                   {if ( couldaddvariable == 1 )
+                                                sprintf($$," %s ( %s )",$1,$3);}
+      | structure_component '(' funarglist ')' substring
+                   {if ( couldaddvariable == 1 )
+                                         sprintf($$," %s ( %s ) %s ",$1,$3,$5);}
+      ;
+begin_array : ident '(' funarglist ')'
+                   {
+                      if ( couldaddvariable == 1 )
+                      {
+                         sprintf($$," %s ( %s )",$1,$3);
+                         ModifyTheAgrifFunction_0($3);
+                         agrif_parentcall =0;
+                      }
+                   }
+      ;
+structure_component : lhs '%' lhs
+                   {
+                      sprintf($$," %s %% %s ",$1,$3);
+                      if ( incalldeclare == 0 ) inagrifcallargument = 0;
+                   }
+      ;
+vec :  TOK_LEFTAB outlist TOK_RIGHTAB
+                   {sprintf($$,"(/%s/)",$2);}
+      ;
+funarglist : beforefunctionuse    {strcpy($$," ");}
+      | beforefunctionuse funargs
+                   {strcpy($$,$2);}
+      ;
+funargs : funarg     {if ( couldaddvariable == 1 ) strcpy($$,$1);}
+      | funargs ',' funarg
+                    {if ( couldaddvariable == 1 ) sprintf($$,"%s,%s",$1,$3);}
+      ;
+funarg : expr       {strcpy($$,$1);}
+      | triplet    {strcpy($$,$1);}
+      ;
+triplet : expr ':' expr
+                    {if ( couldaddvariable == 1 ) sprintf($$,"%s :%s",$1,$3);}
+      | expr ':' expr ':' expr
+                    {if ( couldaddvariable == 1 )
+                                               sprintf($$,"%s :%s :%s",$1,$3,$5);}
+      | ':' expr ':' expr
+                    {if ( couldaddvariable == 1 ) sprintf($$,":%s :%s",$2,$4);}
+      | ':' ':' expr{if ( couldaddvariable == 1 ) sprintf($$,": : %s",$3);}
+      | ':' expr    {if ( couldaddvariable == 1 ) sprintf($$,":%s",$2);}
+      | expr ':'    {if ( couldaddvariable == 1 ) sprintf($$,"%s :",$1);}
+      | ':'         {if ( couldaddvariable == 1 ) sprintf($$,":");}
+      ;
+ident : TOK_NAME    {
+                       if ( couldaddvariable == 1 && afterpercent == 0)
+                       {
+                       if ( Vartonumber($1) == 1 )
+                       {
+                          Add_SubroutineWhereAgrifUsed_1(subroutinename,
+                                                        curmodulename);
+                       }
+                       if (!strcasecmp($1,"Agrif_Parent") )
+                                                            agrif_parentcall =1;
+                       if ( VariableIsNotFunction($1) == 0 )
+                       {
+                       printf("var = %s\n",$1);
+                          if ( inagrifcallargument == 1 )
+                          {
+                             if ( !strcasecmp($1,identcopy) )
+                             {
+                                strcpy(sameagrifname,identcopy);
+                                sameagrifargument = 1;
+                             }
+                          }
+                          strcpy(identcopy,$1);
+                          pointedvar=0;
+                          strcpy(truename,$1);
+                          if (variscoupled_0($1)) strcpy(truename,getcoupledname_0($1));
+
+                          if ( VarIsNonGridDepend(truename) == 0 &&
+                               Variableshouldberemove(truename) == 0 )
+                          {                      
+                             if ( inagrifcallargument == 1 ||
+                                  varispointer_0(truename) == 1 )
+                             {
+                             printf("var2 = %s\n",$1);
+                            if ((IsinListe(List_UsedInSubroutine_Var,$1) == 1) || (inagrifcallargument == 1))
+                             {
+                              if (varistyped_0(truename) == 0)
+                                 {
+                                 ModifyTheVariableName_0(truename,strlen($1));
+                                 }
+                                 }
+                             }
+                             printf("ici3\n");
+                             if ( inagrifcallargument != 1 ||
+                                  sameagrifargument ==1 )
+                                  {
+                                  printf("ici5 %s\n",truename);
+                                  Add_UsedInSubroutine_Var_1(truename);
+                                  }
+                          }
+                          NotifyAgrifFunction_0(truename);
+                       }
+                       }
+                       else
+                       {
+                       afterpercent = 0;
+                       }
+                    }
+      ;
+simple_const : TOK_TRUE
+                     {if ( couldaddvariable == 1 ) strcpy($$,".TRUE.");}
+      | TOK_FALSE    {if ( couldaddvariable == 1 ) strcpy($$,".FALSE.");}
+      | TOK_CSTINT   {if ( couldaddvariable == 1 ) strcpy($$,$1);}
+      | TOK_CSTREAL  {if ( couldaddvariable == 1 ) strcpy($$,$1);}
+      | TOK_CSTREALDP{if ( couldaddvariable == 1 ) strcpy($$,$1);}
+      | TOK_CSTREALQP{if ( couldaddvariable == 1 ) strcpy($$,$1);}
+      | simple_const TOK_NAME
+                     {if ( couldaddvariable == 1 ) sprintf($$,"%s%s",$1,$2);}
+      | string_constant opt_substring
+      ;
+string_constant : TOK_CHAR_CONSTANT
+                     {if ( couldaddvariable == 1 ) strcpy($$,$1);}
+      | string_constant TOK_CHAR_CONSTANT
+      | TOK_CHAR_MESSAGE
+                     {if ( couldaddvariable == 1 ) strcpy($$,$1);}
+      | TOK_CHAR_CUT
+                     {if ( couldaddvariable == 1 ) strcpy($$,$1);}
+      ;
+opt_substring :      {if ( couldaddvariable == 1 ) strcpy($$," ");}
+      | substring   {if ( couldaddvariable == 1 ) strcpy($$,$1);}
+      ;
+substring : '(' optexpr ':' optexpr ')'
+                    {if ( couldaddvariable == 1 ) sprintf($$,"(%s :%s)",$2,$4);}
+      ;
+optexpr :           {if ( couldaddvariable == 1 ) strcpy($$," ");}
+      | expr        {if ( couldaddvariable == 1 ) strcpy($$,$1);}
+      ;
+opt_expr : '\n'          {if ( couldaddvariable == 1 ) strcpy($$," ");}
+      | expr        {if ( couldaddvariable == 1 ) strcpy($$,$1);}
+      ;
+initial_value :      {InitialValueGiven = 0;}
+      | before_initial '=' expr
+                    {
+                       if ( couldaddvariable == 1 )
+                       {
+                          strcpy(InitValue,$3);
+                          InitialValueGiven = 1;
+                       }
+                    }
+      ;
+before_initial : {pos_curinit = setposcur();}
+      ;
+complex_const : '(' uexpr ',' uexpr ')'
+                    {sprintf($$,"(%s,%s)",$2,$4);}
+      ;
+use_stat : word_use  module_name
+                    {
+                      if ( couldaddvariable == 1 )
+                      {
+                      /* if variables has been declared in a subroutine       */
+                      if (insubroutinedeclare == 1)
+                      {
+                         copyuse_0($2);
+                      }
+                      sprintf(charusemodule,"%s",$2);
+                      Add_NameOfModuleUsed_1($2);
+
+                      if ( inmoduledeclare == 0 )
+                      {
+                         pos_end = setposcur();
+                         RemoveWordSET_0(fortranout,pos_curuse,
+                                               pos_end-pos_curuse);
+                      }
+                      }
+                    }
+      | word_use  module_name ',' rename_list
+                    {
+                       if ( couldaddvariable == 1 )
+                       {
+                      if (insubroutinedeclare == 1)
+                      {
+                         Add_CouplePointed_Var_1($2,$4);
+                      }
+                      if ( firstpass == 1 )
+                      {
+                         if ( insubroutinedeclare == 1 )
+                         {
+                            coupletmp = $4;
+                            strcpy(ligne,"");
+                            while ( coupletmp )
+                            {
+                               strcat(ligne,coupletmp->c_namevar);
+                               strcat(ligne," => ");
+                               strcat(ligne,coupletmp->c_namepointedvar);
+                               coupletmp = coupletmp->suiv;
+                               if ( coupletmp ) strcat(ligne,",");
+                            }
+                            sprintf(charusemodule,"%s",$2);
+                         }
+                         Add_NameOfModuleUsed_1($2);
+                      }
+                      if ( inmoduledeclare == 0 )
+                      {
+                         pos_end = setposcur();
+                         RemoveWordSET_0(fortranout,pos_curuse,
+                                               pos_end-pos_curuse);
+                      }
+                      }
+                    }
+      | word_use  module_name ',' TOK_ONLY ':' '\n'
+                    {
+                       if ( couldaddvariable == 1 )
+                       {
+                      /* if variables has been declared in a subroutine       */
+                      if (insubroutinedeclare == 1)
+                      {
+                         copyuseonly_0($2);
+                      }
+                      sprintf(charusemodule,"%s",$2);
+                      Add_NameOfModuleUsed_1($2);
+
+                       if ( inmoduledeclare == 0 )
+                       {
+                          pos_end = setposcur();
+                          RemoveWordSET_0(fortranout,pos_curuse,
+                                                pos_end-pos_curuse);
+                       }
+                       }
+                    }
+      | word_use  module_name ',' TOK_ONLY ':' only_list
+                    {
+                       if ( couldaddvariable == 1 )
+                       {
+                       /* if variables has been declared in a subroutine      */
+                       if (insubroutinedeclare == 1)
+                       {
+                          Add_CouplePointed_Var_1($2,$6);
+                       }
+                       if ( firstpass == 1 )
+                       {
+                         if ( insubroutinedeclare == 1 )
+                         {
+                             coupletmp = $6;
+                             strcpy(ligne,"");
+                             while ( coupletmp )
+                             {
+                                strcat(ligne,coupletmp->c_namevar);
+                               if ( strcasecmp(coupletmp->c_namepointedvar,"") )
+                                                           strcat(ligne," => ");
+                                strcat(ligne,coupletmp->c_namepointedvar);
+                                coupletmp = coupletmp->suiv;
+                                if ( coupletmp ) strcat(ligne,",");
+                             }
+                             sprintf(charusemodule,"%s",$2);
+                          }
+                          Add_NameOfModuleUsed_1($2);
+                       }
+                       if ( firstpass == 0 )
+                       {
+                          if ( inmoduledeclare == 0 )
+                          {
+
+                            pos_end = setposcur();
+                             RemoveWordSET_0(fortranout,pos_curuse,
+                                                   pos_end-pos_curuse);
+                       if (oldfortranout) 
+                         variableisglobalinmodule($6,$2,oldfortranout,pos_curuseold);
+                        
+                          }
+                          else
+                          {
+
+                             /* if we are in the module declare and if the    */
+                             /* onlylist is a list of global variable         */
+                             variableisglobalinmodule($6, $2, fortranout,pos_curuse);
+                          }
+                       }
+                       }
+                    }
+      ;
+word_use : TOK_USE
+                   {
+                      pos_curuse = setposcur()-strlen($1);
+                     if (firstpass == 0 && oldfortranout) {
+                     pos_curuseold = setposcurname(oldfortranout);
+                     }
+                   }
+      ;
+module_name : TOK_NAME
+                    {strcpy($$,$1);}
+      ;
+rename_list : rename_name
+                    {
+                       if ( couldaddvariable == 1 ) $$ = $1;
+                    }
+      | rename_list ',' rename_name
+                    {
+                        if ( couldaddvariable == 1 )
+                        {
+                        /* insert the variable in the list $1                 */
+                        $3->suiv = $1;
+                        $$ = $3;
+                        }
+                    }
+      ;
+rename_name : TOK_NAME TOK_POINT_TO TOK_NAME
+                    {
+                       coupletmp =(listcouple *)malloc(sizeof(listcouple));
+                       strcpy(coupletmp->c_namevar,$1);
+                       Save_Length($1,21);
+                       strcpy(coupletmp->c_namepointedvar,$3);
+                       Save_Length($3,22);
+                       coupletmp->suiv = NULL;
+                       $$ = coupletmp;
+                     }
+      ;
+only_list : only_name
+                    {
+                       if ( couldaddvariable == 1 ) $$ = $1;
+                    }
+      | only_list ',' only_name
+                    {
+                        if ( couldaddvariable == 1 )
+                        {
+                        /* insert the variable in the list $1                 */
+                        $3->suiv = $1;
+                        $$ = $3;
+                        }
+                    }
+      ;
+only_name : TOK_NAME TOK_POINT_TO TOK_NAME
+                    {
+                       coupletmp =(listcouple *)malloc(sizeof(listcouple));
+                       strcpy(coupletmp->c_namevar,$1);
+                       Save_Length($1,21);
+                       strcpy(coupletmp->c_namepointedvar,$3);
+                       Save_Length($3,22);
+                       coupletmp->suiv = NULL;
+                       $$ = coupletmp;
+                       pointedvar=1;
+                       Add_UsedInSubroutine_Var_1($1);
+                    }
+      | TOK_NAME    {
+                       coupletmp =(listcouple *)malloc(sizeof(listcouple));
+                       strcpy(coupletmp->c_namevar,$1);
+                       Save_Length($1,21);
+                       strcpy(coupletmp->c_namepointedvar,"");
+                       coupletmp->suiv = NULL;
+                       $$ = coupletmp;
+                     }
+      ;
+exec : iffable
+      | TOK_ALLOCATE '(' allocation_list opt_stat_spec ')'
+                     {
+                         Add_SubroutineWhereAgrifUsed_1(subroutinename,
+                                                        curmodulename);
+                                                        inallocate = 0;
+                     }
+      | TOK_DEALLOCATE '(' allocate_object_list opt_stat_spec ')'
+                     {
+                          Add_SubroutineWhereAgrifUsed_1(subroutinename,
+                                                         curmodulename);
+                                                         inallocate = 0;
+                     }
+      | TOK_NULLIFY '(' pointer_name_list ')'
+      | word_endunit /* end                                                   */
+                    {
+                       GlobalDeclaration = 0 ;
+                       if ( firstpass == 0 &&
+                            strcasecmp(subroutinename,"") )
+                       {
+                          if ( module_declar && insubroutinedeclare == 0 )
+                          {
+                              fclose(module_declar);
+                          }
+                       }
+                       if ( couldaddvariable == 1 &&
+                            strcasecmp(subroutinename,"") )
+                       {
+                       if ( inmodulemeet == 1 )
+                       {
+                         /* we are in a module                                */
+                         if ( insubroutinedeclare == 1 )
+                         {
+                            /* it is like an end subroutine <name>            */
+                            insubroutinedeclare = 0 ;
+                            /*                                                */
+                            pos_cur = setposcur();
+                            closeandcallsubloopandincludeit_0(1);
+                            functiondeclarationisdone = 0;
+                         }
+                         else
+                         {
+                            /* it is like an end module <name>                */
+                            inmoduledeclare = 0 ;
+                            inmodulemeet = 0 ;
+                         }
+                       }
+                       else
+                       {
+                          insubroutinedeclare = 0;
+                          /*                                                  */
+                          pos_cur = setposcur();   
+                          closeandcallsubloopandincludeit_0(2);
+                            functiondeclarationisdone = 0;
+                          if ( firstpass == 0 )
+                          {
+                             if ( retour77 == 0 ) fprintf(paramout,"!\n");
+                             else fprintf(paramout,"C\n");
+                             fclose(paramout);
+                           }
+                        }
+                      }
+                      strcpy(subroutinename,"");
+                    }
+      | word_endprogram opt_name
+                    {
+                       if ( couldaddvariable == 1 )
+                       {
+                       insubroutinedeclare = 0;
+                       /*                                                     */
+                       pos_cur = setposcur();                      
+                       closeandcallsubloopandincludeit_0(3);
+                            functiondeclarationisdone = 0;
+                      if ( firstpass == 0 )
+                      {
+                         if ( retour77 == 0 ) fprintf(paramout,"!\n");
+                         else fprintf(paramout,"C\n");
+                         fclose(paramout);
+                      }
+                      strcpy(subroutinename,"");
+                      }
+                    }
+      | word_endsubroutine opt_name
+                    {
+                       if ( couldaddvariable == 1 &&
+                            strcasecmp(subroutinename,"") )
+                       {
+                       insubroutinedeclare = 0;
+                       /*                                                     */
+                       pos_cur = setposcur();
+                                             
+                       closeandcallsubloopandincludeit_0(1);
+                            functiondeclarationisdone = 0;
+                      if ( firstpass == 0 )
+                      {
+                         if ( retour77 == 0 ) fprintf(paramout,"!\n");
+                         else fprintf(paramout,"C\n");
+                         fclose(paramout);
+                      }
+                      strcpy(subroutinename,"");
+                      }
+                    }
+      | word_endfunction opt_name
+                    {
+                       if ( couldaddvariable == 1 )
+                       {
+                       insubroutinedeclare = 0;
+                       /*                                                     */
+                       pos_cur = setposcur();
+
+                       closeandcallsubloopandincludeit_0(0);
+                            functiondeclarationisdone = 0;
+                      if ( firstpass == 0 )
+                      {
+                         if ( retour77 == 0 ) fprintf(paramout,"!\n");
+                         else fprintf(paramout,"C\n");
+                         fclose(paramout);
+                      }
+                      strcpy(subroutinename,"");
+                      }
+                    }
+      | TOK_ENDMODULE opt_name
+                    {
+                       if ( couldaddvariable == 1 )
+                       {
+                       /* if we never meet the contains keyword               */
+                      Remove_Word_end_module_0(strlen($2));
+                       if ( inmoduledeclare == 1 )
+                       {
+                          if ( aftercontainsdeclare == 0 )
+                          {
+                             Write_GlobalParameter_Declaration_0();
+                             Write_NotGridDepend_Declaration_0();
+                             Write_GlobalType_Declaration_0();
+                             Write_Alloc_Subroutine_For_End_0();
+                          }
+                       }
+                                           
+                       inmoduledeclare = 0 ;
+                       inmodulemeet = 0 ;
+
+                      Write_Word_end_module_0();
+                      strcpy(curmodulename,"");
+                      aftercontainsdeclare = 1;
+                      if ( firstpass == 0 )
+                      {
+                         if ( module_declar && insubroutinedeclare == 0)
+                         {
+                           fclose(module_declar);
+                         }
+                      }
+                      GlobalDeclaration = 0 ;
+                      }
+                  }
+      | boucledo
+      | logif iffable
+      | TOK_WHERE '(' expr ')' opt_expr
+      | TOK_ELSEWHERE
+      | TOK_ENDWHERE
+      | logif TOK_THEN
+      | TOK_ELSEIF  '(' expr ')' TOK_THEN
+      | TOK_ELSE
+      | TOK_ENDIF opt_name
+      | TOK_CASE caselist ')'
+      | TOK_SELECTCASE '(' expr ')'
+      | TOK_CASEDEFAULT
+      | TOK_ENDSELECT
+      | TOK_CONTAINS
+                   {
+                      if (inmoduledeclare == 1 )
+                      {
+                         Remove_Word_Contains_0();
+                         Write_GlobalParameter_Declaration_0();
+                         Write_GlobalType_Declaration_0();
+                         Write_NotGridDepend_Declaration_0();
+                         Write_Alloc_Subroutine_0();
+                         inmoduledeclare = 0 ;
+                         aftercontainsdeclare = 1;
+                      }
+                      else
+                      {
+                      incontainssubroutine = 1;
+                      strcpy(previoussubroutinename,subroutinename);
+                       if ( couldaddvariable == 1 )
+                       {
+                          if ( firstpass == 1 ) List_ContainsSubroutine =
+                                                Addtolistnom(subroutinename,
+                                                     List_ContainsSubroutine,0);
+                          insubroutinedeclare = 0;
+                          /*                                                  */
+
+                          closeandcallsubloop_contains_0();
+                            functiondeclarationisdone = 0;
+                         if ( firstpass == 0 )
+                         {
+                            if ( retour77 == 0 ) fprintf(paramout,"!\n");
+                            else fprintf(paramout,"C\n");
+                            fclose(paramout);
+                         }
+                         }
+                         strcpy(subroutinename,"");
+                      }
+                   }
+      ;
+word_endsubroutine : TOK_ENDSUBROUTINE
+                    {
+                      if ( couldaddvariable == 1 )
+                      {
+                       strcpy($$,$1);
+                       pos_endsubroutine = setposcur()-strlen($1);
+                       functiondeclarationisdone = 0;
+                       }
+                    }
+      ;
+word_endunit : TOK_ENDUNIT
+                    {
+                      if ( couldaddvariable == 1 )
+                      {
+                       strcpy($$,$1);
+                       pos_endsubroutine = setposcur()-strlen($1);
+                       }
+                    }
+      ;
+word_endprogram :  TOK_ENDPROGRAM
+                    {
+                      if ( couldaddvariable == 1 )
+                      {
+                       strcpy($$,$1);
+                       pos_endsubroutine = setposcur()-strlen($1);
+                       }
+                    }
+      ;
+word_endfunction : TOK_ENDFUNCTION
+                    {
+                      if ( couldaddvariable == 1 )
+                      {
+                       strcpy($$,$1);
+                       pos_endsubroutine = setposcur()-strlen($1);
+                       }
+                    }
+      ;
+caselist : expr
+      | caselist ',' expr
+      | caselist ':' expr
+      ;
+boucledo : worddo opt_int do_arg
+      | wordwhile expr
+      | TOK_ENDDO optname
+      ;
+do_arg :
+      | do_var '=' expr ',' expr
+      | do_var '=' expr ',' expr ',' expr
+opt_int :
+      | TOK_CSTINT opt_comma
+      ;
+opt_name : '\n'  {strcpy($$,"");}
+      | TOK_NAME {strcpy($$,$1);}
+      ;
+optname :
+      | TOK_NAME
+      ;
+worddo :  TOK_PLAINDO
+      ;
+wordwhile :TOK_DOWHILE
+      ;
+
+dotarget :
+      | TOK_CSTINT
+      ;
+
+iffable : TOK_CONTINUE
+      | ident_dims after_ident_dims
+      | goto
+      | io
+      | call
+      | TOK_ALLOCATE '(' allocation_list opt_stat_spec ')'
+                     {
+                          Add_SubroutineWhereAgrifUsed_1(subroutinename,
+                                                        curmodulename);
+                                                        inallocate = 0;
+                     }
+      | TOK_DEALLOCATE '(' allocate_object_list opt_stat_spec ')'
+                     {
+                          Add_SubroutineWhereAgrifUsed_1(subroutinename,
+                                                        curmodulename);
+                                                        inallocate = 0;
+                     }
+      | TOK_EXIT optexpr
+      | TOK_RETURN opt_expr
+      | TOK_CYCLE opt_expr
+      | stop opt_expr
+      | int_list
+      ;
+before_dims : {if ( couldaddvariable == 1 ) created_dimensionlist = 0;}
+ident_dims : ident before_dims dims dims
+              {
+                  created_dimensionlist = 1;
+                  if  ( agrif_parentcall == 1 )
+                  {
+                      ModifyTheAgrifFunction_0($3->dim.last);
+                      agrif_parentcall =0;
+                      fprintf(fortranout," = ");
+                  }
+              }
+      | ident_dims '%' ident before_dims dims dims
+      {created_dimensionlist = 1;}
+int_list : TOK_CSTINT
+      | int_list ',' TOK_CSTINT
+      ;
+after_ident_dims : '=' expr
+      | TOK_POINT_TO expr
+      ;
+call : keywordcall opt_call
+                   {
+                      inagrifcallargument = 0 ;
+                      incalldeclare=0;
+                      if ( oldfortranout &&
+                           !strcasecmp(meetagrifinitgrids,subroutinename) &&
+                           firstpass == 0 &&
+                           callmpiinit == 1)
+                      {
+                      /*   pos_end = setposcur();
+                         RemoveWordSET_0(fortranout,pos_curcall,
+                                               pos_end-pos_curcall);
+                         fprintf(oldfortranout,"      Call MPI_Init (%s) \n"
+                                                                   ,mpiinitvar);*/
+                      }
+                      if ( oldfortranout           &&
+                           callagrifinitgrids == 1 &&
+                           firstpass == 0 )
+                      {
+                         pos_end = setposcur();
+                         RemoveWordSET_0(fortranout,pos_curcall,
+                                               pos_end-pos_curcall);
+
+                         strcpy(subofagrifinitgrids,subroutinename);
+                      }
+                      Instanciation_0(sameagrifname);
+                   }
+      ;
+opt_call :
+      | '(' opt_callarglist  ')'
+      ;
+opt_callarglist :
+      | callarglist
+      ;
+keywordcall : before_call TOK_NAME
+                    {
+                       if (!strcasecmp($2,"MPI_Init") )
+                       {
+                          callmpiinit = 1;
+                       }
+                       else
+                       {
+                          callmpiinit = 0;
+                       }
+                       if (!strcasecmp($2,"Agrif_Init_Grids") )
+                       {
+                          callagrifinitgrids = 1;
+                          strcpy(meetagrifinitgrids,subroutinename);
+                       }
+                       else callagrifinitgrids = 0;
+                       if ( !strcasecmp($2,"Agrif_Open_File") )
+                       {
+                          Add_SubroutineWhereAgrifUsed_1(subroutinename,
+                                                        curmodulename);
+                       }
+                       if ( Vartonumber($2) == 1 )
+                       {
+                          incalldeclare=1;
+                          inagrifcallargument = 1 ;
+                          Add_SubroutineWhereAgrifUsed_1(subroutinename,
+                                                        curmodulename);
+                       }
+                    }
+      ;
+before_call : TOK_CALL
+                    {pos_curcall=setposcur()-4;}
+callarglist :  callarg
+      | callarglist ',' callarg
+      ;
+
+callarg :  expr {
+                  if ( callmpiinit == 1 )
+                  {
+                     strcpy(mpiinitvar,$1);
+                     if ( firstpass == 1 )
+                     {
+                        Add_UsedInSubroutine_Var_1 (mpiinitvar);
+/*                        curvar=createvar($1,NULL);
+                        curlistvar=insertvar(NULL,curvar);
+                        List_Subr outineArgument_Var = AddListvarToListvar
+                         (curlistvar,List_SubroutineAr gument_Var,1);*/
+                     }
+                  }
+               }
+      | '*' label
+      ;
+
+stop : TOK_PAUSE
+      | TOK_STOP
+      ;
+
+io : iofctl ioctl
+      | read option_read
+      | write ioctl
+      | write ioctl outlist
+      | TOK_REWIND after_rewind
+      | TOK_FORMAT
+      ;
+opt_CHAR_INT :
+      | TOK_CSTINT TOK_NAME
+      ;
+idfile : '*'
+      | TOK_CSTINT
+      | ident
+      ;
+option_print :
+      | ',' outlist
+      ;
+option_inlist :
+      | inlist
+      ;
+option_read : ioctl option_inlist
+      | infmt opt_inlist
+      ;
+opt_outlist :
+      | outlist
+      ;
+opt_inlist :
+      | ',' inlist
+      ;
+ioctl :  '(' ctllist ')'
+      | '(' fexpr ')'
+      ;
+after_rewind :  '(' ident ')'
+      | '(' TOK_CSTINT ')'
+      | TOK_CSTINT
+      | '(' uexpr ')'
+      | TOK_NAME
+      ;
+ctllist : ioclause
+      | ctllist ',' ioclause
+      ;
+ioclause : fexpr
+      | '*'
+      | TOK_DASTER
+      | ident expr
+      | ident expr '%' ident_dims
+      | ident '(' triplet ')'
+      | ident '*'
+      | ident TOK_DASTER
+      ;
+iofctl : TOK_OPEN
+      | TOK_CLOSE
+      ;
+infmt :  unpar_fexpr
+      | '*'
+      ;
+
+read :TOK_READ
+      | TOK_INQUIRE
+      | TOK_PRINT
+      ;
+
+write : TOK_WRITE
+      ;
+
+fexpr : unpar_fexpr
+      | '(' fexpr ')'
+      ;
+unpar_fexpr : lhs
+      | simple_const
+      | fexpr addop fexpr %prec '+'
+      | fexpr '*' fexpr
+      | fexpr TOK_SLASH fexpr
+      | fexpr TOK_DASTER fexpr
+      | addop fexpr %prec '*'
+      | fexpr TOK_DSLASH fexpr
+      | TOK_FILE expr
+      | TOK_EXIST expr
+      | TOK_ERR expr
+      | TOK_END expr
+      | TOK_NAME '=' expr
+      ;
+addop : '+'
+      | '-'
+      ;
+inlist : inelt
+      | inlist ',' inelt
+      ;
+opt_lhs :
+      | lhs
+      ;
+inelt : opt_lhs opt_operation
+      | '(' inlist ')' opt_operation
+      | predefinedfunction opt_operation
+      | simple_const opt_operation
+      | '(' inlist ',' dospec ')'
+      ;
+opt_operation :
+      | operation
+      | opt_operation operation
+      ;
+outlist : uexpr    {if ( couldaddvariable == 1 ) strcpy($$,$1);}
+      | other      {if ( couldaddvariable == 1 ) strcpy($$,$1);}
+      | out2       {if ( couldaddvariable == 1 ) strcpy($$,$1);}
+      ;
+out2: uexpr ',' expr
+                   {if ( couldaddvariable == 1 ) sprintf($$,"%s,%s",$1,$3);}
+      | uexpr ',' other
+                   {if ( couldaddvariable == 1 ) sprintf($$,"%s,%s",$1,$3);}
+      | other ',' expr
+                   {if ( couldaddvariable == 1 ) sprintf($$,"%s,%s",$1,$3);}
+      | other ',' other
+                   {if ( couldaddvariable == 1 ) sprintf($$,"%s,%s",$1,$3);}
+      | out2 ',' expr
+                   {if ( couldaddvariable == 1 ) sprintf($$,"%s,%s",$1,$3);}
+      | out2 ',' other
+                   {if ( couldaddvariable == 1 ) sprintf($$,"%s,%s",$1,$3);}
+      | uexpr     {if ( couldaddvariable == 1 ) strcpy($$,$1);}
+      | predefinedfunction {if ( couldaddvariable == 1 ) strcpy($$,$1);}
+      ;
+other :  complex_const
+                   {if ( couldaddvariable == 1 ) strcpy($$,$1);}
+      | '(' expr ')'
+                   {if ( couldaddvariable == 1 ) sprintf($$," (%s)",$2);}
+      | '(' uexpr ',' dospec ')'
+                   {if ( couldaddvariable == 1 ) sprintf($$,"(%s,%s)",$2,$4);}
+      | '(' other ',' dospec ')'
+                   {if ( couldaddvariable == 1 ) sprintf($$,"(%s,%s)",$2,$4);}
+      | '(' out2 ',' dospec ')'
+                   {if ( couldaddvariable == 1 ) sprintf($$,"(%s,%s)",$2,$4);}
+      ;
+
+dospec : TOK_NAME '=' expr ',' expr
+                   {if ( couldaddvariable == 1 )
+                                              sprintf($$,"%s=%s,%s)",$1,$3,$5);}
+      | TOK_NAME '=' expr ',' expr ',' expr
+                   {if ( couldaddvariable == 1 )
+                                        sprintf($$,"%s=%s,%s,%s)",$1,$3,$5,$7);}
+      ;
+labellist : label
+      | labellist ',' label
+      ;
+label : TOK_CSTINT
+      ;
+goto : TOK_PLAINGOTO '(' expr ',' expr ')' ',' expr
+      | TOK_PLAINGOTO label
+      ;
+allocation_list : allocate_object
+      | ident_dims
+      | allocation_list ',' allocate_object
+      ;
+allocate_object : ident
+                   {Add_Allocate_Var_1($1,curmodulename);}
+      | structure_component
+      | array_element
+      ;
+array_element : ident '(' funargs ')'
+                   {Add_Allocate_Var_1($1,curmodulename);}
+      ;
+subscript_list : expr
+      | subscript_list ',' expr
+      ;
+
+allocate_object_list :allocate_object
+      | allocate_object_list ',' allocate_object
+      ;
+opt_stat_spec :
+      | ',' TOK_STAT '=' ident
+      ;
+pointer_name_list : ident
+      | pointer_name_list ',' ident
+      ;
+opt_construct_name :
+      | TOK_NAME
+      ;
+opt_construct_name_colon :
+      | TOK_CONSTRUCTID ':'
+      ;
+logif : TOK_LOGICALIF expr ')'
+      ;
+do_var : ident {strcpy($$,$1);}
+      ;
+%%
+
+void processfortran(char *fichier_entree)
+{
+   extern FILE *fortranin;
+   extern FILE *fortranout;
+   char nomfile[LONG_C];
+   int c;
+   int confirmyes;
+
+/*   fortrandebug = 1;*/
+   if ( mark == 1 ) printf("Firstpass == %d \n",firstpass);
+/******************************************************************************/
+/*  1-  Open input and output files                                           */
+/******************************************************************************/
+   strcpy(nomfile,commondirin);
+   strcat(nomfile,"/");
+   strcat(nomfile,fichier_entree);
+   fortranin=fopen( nomfile,"r");
+   if (! fortranin)
+   {
+      printf("Error : File %s does not exist\n",nomfile);
+      exit(1);
+   }
+
+   strcpy(curfile,nomfile);
+   strcpy(nomfile,commondirout);
+   strcat(nomfile,"/");
+   strcat(nomfile,fichier_entree);
+   strcpy(nomfileoutput,nomfile);
+   Save_Length(nomfileoutput,31);
+   if (firstpass == 1)
+   {
+      if (checkexistcommon == 1)
+      {
+         if (fopen(nomfile,"r"))
+         {
+            printf("Warning : file %s already exist\n",nomfile);
+            confirmyes = 0;
+            while (confirmyes==0)
+            {
+               printf("Override file %s ? [Y/N]\n",nomfile);
+               c=getchar();
+               getchar();
+               if (c==79 || c==110)
+               {
+                  printf("We stop\n");
+                  exit(1);
+               }
+               if (c==89 || c==121)
+               {
+                  confirmyes=1;
+               }
+            }
+         }
+      }
+   }
+
+/******************************************************************************/
+/*  2-  Variables initialization                                              */
+/******************************************************************************/
+
+   line_num_fortran_common=1;
+   line_num_fortran=1;
+   PublicDeclare = 0;
+   PrivateDeclare = 0;
+   ExternalDeclare = 0;
+   SaveDeclare = 0;
+   pointerdeclare = 0;
+   optionaldeclare = 0;
+   incalldeclare = 0;
+   VarType = 0;
+   VarTypepar = 0;
+   Allocatabledeclare = 0 ;
+   Targetdeclare = 0 ;
+   strcpy(NamePrecision," ");
+   VariableIsParameter =  0 ;
+   strcpy(NamePrecision,"");
+   c_star = 0 ;
+   functiondeclarationisdone = 0;
+   insubroutinedeclare = 0 ;
+   ininterfacedeclare = 0 ;   
+   strcpy(subroutinename," ");
+   isrecursive = 0;
+   InitialValueGiven = 0 ;
+   strcpy(EmptyChar," ");
+   inmoduledeclare = 0;
+   incontainssubroutine = 0;
+   colnum=0;
+   incom=0;
+   couldaddvariable=1;
+   afterpercent = 0;
+   aftercontainsdeclare = 1;
+   strcpy(nameinttypename,"");
+   /* Name of the file without format                                         */
+   tmp = strchr(fichier_entree, '.');
+   strncpy(curfilename,fichier_entree,strlen(fichier_entree)-strlen(tmp));
+   Save_Length(curfilename,30);
+/******************************************************************************/
+/*  3-  Parsing of the input file (1 time)                                    */
+/******************************************************************************/
+   if (firstpass == 0 )
+   {
+      fortranout=fopen(nomfileoutput,"w");
+
+/*      NewModule_Creation_0();*/
+   }
+
+   fortranparse();
+
+   if (firstpass == 0 )
+   {
+   NewModule_Creation_0();
+   }
+   
+   strcpy(curfile,mainfile);
+
+   if (firstpass == 0 )
+   {
+   fclose(fortranout);
+   }
+}
Index: vendors/AGRIF/r_01/LIB/fortran.yy.c
===================================================================
--- vendors/AGRIF/r_01/LIB/fortran.yy.c	(revision 2672)
+++ vendors/AGRIF/r_01/LIB/fortran.yy.c	(revision 2672)
@@ -0,0 +1,5248 @@
+#line 2 "fortran.yy.c"
+
+#line 4 "fortran.yy.c"
+
+#define  YY_INT_ALIGNED short int
+
+/* A lexical scanner generated by flex */
+
+#define yy_create_buffer fortran_create_buffer
+#define yy_delete_buffer fortran_delete_buffer
+#define yy_flex_debug fortran_flex_debug
+#define yy_init_buffer fortran_init_buffer
+#define yy_flush_buffer fortran_flush_buffer
+#define yy_load_buffer_state fortran_load_buffer_state
+#define yy_switch_to_buffer fortran_switch_to_buffer
+#define yyin fortranin
+#define yyleng fortranleng
+#define yylex fortranlex
+#define yylineno fortranlineno
+#define yyout fortranout
+#define yyrestart fortranrestart
+#define yytext fortrantext
+#define yywrap fortranwrap
+#define yyalloc fortranalloc
+#define yyrealloc fortranrealloc
+#define yyfree fortranfree
+
+#define FLEX_SCANNER
+#define YY_FLEX_MAJOR_VERSION 2
+#define YY_FLEX_MINOR_VERSION 5
+#define YY_FLEX_SUBMINOR_VERSION 35
+#if YY_FLEX_SUBMINOR_VERSION > 0
+#define FLEX_BETA
+#endif
+
+/* First, we deal with  platform-specific or compiler-specific issues. */
+
+/* begin standard C headers. */
+#include <stdio.h>
+#include <string.h>
+#include <errno.h>
+#include <stdlib.h>
+
+/* end standard C headers. */
+
+/* flex integer type definitions */
+
+#ifndef FLEXINT_H
+#define FLEXINT_H
+
+/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
+
+#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+
+/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
+ * if you want the limit (max/min) macros for int types. 
+ */
+#ifndef __STDC_LIMIT_MACROS
+#define __STDC_LIMIT_MACROS 1
+#endif
+
+#include <inttypes.h>
+typedef int8_t flex_int8_t;
+typedef uint8_t flex_uint8_t;
+typedef int16_t flex_int16_t;
+typedef uint16_t flex_uint16_t;
+typedef int32_t flex_int32_t;
+typedef uint32_t flex_uint32_t;
+#else
+typedef signed char flex_int8_t;
+typedef short int flex_int16_t;
+typedef int flex_int32_t;
+typedef unsigned char flex_uint8_t; 
+typedef unsigned short int flex_uint16_t;
+typedef unsigned int flex_uint32_t;
+#endif /* ! C99 */
+
+/* Limits of integral types. */
+#ifndef INT8_MIN
+#define INT8_MIN               (-128)
+#endif
+#ifndef INT16_MIN
+#define INT16_MIN              (-32767-1)
+#endif
+#ifndef INT32_MIN
+#define INT32_MIN              (-2147483647-1)
+#endif
+#ifndef INT8_MAX
+#define INT8_MAX               (127)
+#endif
+#ifndef INT16_MAX
+#define INT16_MAX              (32767)
+#endif
+#ifndef INT32_MAX
+#define INT32_MAX              (2147483647)
+#endif
+#ifndef UINT8_MAX
+#define UINT8_MAX              (255U)
+#endif
+#ifndef UINT16_MAX
+#define UINT16_MAX             (65535U)
+#endif
+#ifndef UINT32_MAX
+#define UINT32_MAX             (4294967295U)
+#endif
+
+#endif /* ! FLEXINT_H */
+
+#ifdef __cplusplus
+
+/* The "const" storage-class-modifier is valid. */
+#define YY_USE_CONST
+
+#else	/* ! __cplusplus */
+
+/* C99 requires __STDC__ to be defined as 1. */
+#if defined (__STDC__)
+
+#define YY_USE_CONST
+
+#endif	/* defined (__STDC__) */
+#endif	/* ! __cplusplus */
+
+#ifdef YY_USE_CONST
+#define yyconst const
+#else
+#define yyconst
+#endif
+
+/* Returned upon end-of-file. */
+#define YY_NULL 0
+
+/* Promotes a possibly negative, possibly signed char to an unsigned
+ * integer for use as an array index.  If the signed char is negative,
+ * we want to instead treat it as an 8-bit unsigned char, hence the
+ * double cast.
+ */
+#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
+
+/* Enter a start condition.  This macro really ought to take a parameter,
+ * but we do it the disgusting crufty way forced on us by the ()-less
+ * definition of BEGIN.
+ */
+#define BEGIN (yy_start) = 1 + 2 *
+
+/* Translate the current start state into a value that can be later handed
+ * to BEGIN to return to the state.  The YYSTATE alias is for lex
+ * compatibility.
+ */
+#define YY_START (((yy_start) - 1) / 2)
+#define YYSTATE YY_START
+
+/* Action number for EOF rule of a given start state. */
+#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
+
+/* Special action meaning "start processing a new file". */
+#define YY_NEW_FILE fortranrestart(fortranin  )
+
+#define YY_END_OF_BUFFER_CHAR 0
+
+/* Size of default input buffer. */
+#ifndef YY_BUF_SIZE
+#define YY_BUF_SIZE 16384
+#endif
+
+/* The state buf must be large enough to hold one state per character in the main buffer.
+ */
+#define YY_STATE_BUF_SIZE   ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
+
+#ifndef YY_TYPEDEF_YY_BUFFER_STATE
+#define YY_TYPEDEF_YY_BUFFER_STATE
+typedef struct yy_buffer_state *YY_BUFFER_STATE;
+#endif
+
+#ifndef YY_TYPEDEF_YY_SIZE_T
+#define YY_TYPEDEF_YY_SIZE_T
+typedef size_t yy_size_t;
+#endif
+
+extern yy_size_t fortranleng;
+
+extern FILE *fortranin, *fortranout;
+
+#define EOB_ACT_CONTINUE_SCAN 0
+#define EOB_ACT_END_OF_FILE 1
+#define EOB_ACT_LAST_MATCH 2
+
+    #define YY_LESS_LINENO(n)
+    
+/* Return all but the first "n" matched characters back to the input stream. */
+#define yyless(n) \
+	do \
+		{ \
+		/* Undo effects of setting up fortrantext. */ \
+        int yyless_macro_arg = (n); \
+        YY_LESS_LINENO(yyless_macro_arg);\
+		*yy_cp = (yy_hold_char); \
+		YY_RESTORE_YY_MORE_OFFSET \
+		(yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
+		YY_DO_BEFORE_ACTION; /* set up fortrantext again */ \
+		} \
+	while ( 0 )
+
+#define unput(c) yyunput( c, (yytext_ptr)  )
+
+#ifndef YY_STRUCT_YY_BUFFER_STATE
+#define YY_STRUCT_YY_BUFFER_STATE
+struct yy_buffer_state
+	{
+	FILE *yy_input_file;
+
+	char *yy_ch_buf;		/* input buffer */
+	char *yy_buf_pos;		/* current position in input buffer */
+
+	/* Size of input buffer in bytes, not including room for EOB
+	 * characters.
+	 */
+	yy_size_t yy_buf_size;
+
+	/* Number of characters read into yy_ch_buf, not including EOB
+	 * characters.
+	 */
+	yy_size_t yy_n_chars;
+
+	/* Whether we "own" the buffer - i.e., we know we created it,
+	 * and can realloc() it to grow it, and should free() it to
+	 * delete it.
+	 */
+	int yy_is_our_buffer;
+
+	/* Whether this is an "interactive" input source; if so, and
+	 * if we're using stdio for input, then we want to use getc()
+	 * instead of fread(), to make sure we stop fetching input after
+	 * each newline.
+	 */
+	int yy_is_interactive;
+
+	/* Whether we're considered to be at the beginning of a line.
+	 * If so, '^' rules will be active on the next match, otherwise
+	 * not.
+	 */
+	int yy_at_bol;
+
+    int yy_bs_lineno; /**< The line count. */
+    int yy_bs_column; /**< The column count. */
+    
+	/* Whether to try to fill the input buffer when we reach the
+	 * end of it.
+	 */
+	int yy_fill_buffer;
+
+	int yy_buffer_status;
+
+#define YY_BUFFER_NEW 0
+#define YY_BUFFER_NORMAL 1
+	/* When an EOF's been seen but there's still some text to process
+	 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
+	 * shouldn't try reading from the input source any more.  We might
+	 * still have a bunch of tokens to match, though, because of
+	 * possible backing-up.
+	 *
+	 * When we actually see the EOF, we change the status to "new"
+	 * (via fortranrestart()), so that the user can continue scanning by
+	 * just pointing fortranin at a new input file.
+	 */
+#define YY_BUFFER_EOF_PENDING 2
+
+	};
+#endif /* !YY_STRUCT_YY_BUFFER_STATE */
+
+/* Stack of input buffers. */
+static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
+static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
+static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
+
+/* We provide macros for accessing buffer states in case in the
+ * future we want to put the buffer states in a more general
+ * "scanner state".
+ *
+ * Returns the top of the stack, or NULL.
+ */
+#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
+                          ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
+                          : NULL)
+
+/* Same as previous macro, but useful when we know that the buffer stack is not
+ * NULL or when we need an lvalue. For internal use only.
+ */
+#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
+
+/* yy_hold_char holds the character lost when fortrantext is formed. */
+static char yy_hold_char;
+static yy_size_t yy_n_chars;		/* number of characters read into yy_ch_buf */
+yy_size_t fortranleng;
+
+/* Points to current character in buffer. */
+static char *yy_c_buf_p = (char *) 0;
+static int yy_init = 0;		/* whether we need to initialize */
+static int yy_start = 0;	/* start state number */
+
+/* Flag which is used to allow fortranwrap()'s to do buffer switches
+ * instead of setting up a fresh fortranin.  A bit of a hack ...
+ */
+static int yy_did_buffer_switch_on_eof;
+
+void fortranrestart (FILE *input_file  );
+void fortran_switch_to_buffer (YY_BUFFER_STATE new_buffer  );
+YY_BUFFER_STATE fortran_create_buffer (FILE *file,int size  );
+void fortran_delete_buffer (YY_BUFFER_STATE b  );
+void fortran_flush_buffer (YY_BUFFER_STATE b  );
+void fortranpush_buffer_state (YY_BUFFER_STATE new_buffer  );
+void fortranpop_buffer_state (void );
+
+static void fortranensure_buffer_stack (void );
+static void fortran_load_buffer_state (void );
+static void fortran_init_buffer (YY_BUFFER_STATE b,FILE *file  );
+
+#define YY_FLUSH_BUFFER fortran_flush_buffer(YY_CURRENT_BUFFER )
+
+YY_BUFFER_STATE fortran_scan_buffer (char *base,yy_size_t size  );
+YY_BUFFER_STATE fortran_scan_string (yyconst char *yy_str  );
+YY_BUFFER_STATE fortran_scan_bytes (yyconst char *bytes,yy_size_t len  );
+
+void *fortranalloc (yy_size_t  );
+void *fortranrealloc (void *,yy_size_t  );
+void fortranfree (void *  );
+
+#define yy_new_buffer fortran_create_buffer
+
+#define yy_set_interactive(is_interactive) \
+	{ \
+	if ( ! YY_CURRENT_BUFFER ){ \
+        fortranensure_buffer_stack (); \
+		YY_CURRENT_BUFFER_LVALUE =    \
+            fortran_create_buffer(fortranin,YY_BUF_SIZE ); \
+	} \
+	YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
+	}
+
+#define yy_set_bol(at_bol) \
+	{ \
+	if ( ! YY_CURRENT_BUFFER ){\
+        fortranensure_buffer_stack (); \
+		YY_CURRENT_BUFFER_LVALUE =    \
+            fortran_create_buffer(fortranin,YY_BUF_SIZE ); \
+	} \
+	YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
+	}
+
+#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
+
+/* Begin user sect3 */
+
+typedef unsigned char YY_CHAR;
+
+FILE *fortranin = (FILE *) 0, *fortranout = (FILE *) 0;
+
+typedef int yy_state_type;
+
+extern int fortranlineno;
+
+int fortranlineno = 1;
+
+extern char *fortrantext;
+#define yytext_ptr fortrantext
+
+static yy_state_type yy_get_previous_state (void );
+static yy_state_type yy_try_NUL_trans (yy_state_type current_state  );
+static int yy_get_next_buffer (void );
+static void yy_fatal_error (yyconst char msg[]  );
+
+/* Done after the current pattern has been matched and before the
+ * corresponding action - sets up fortrantext.
+ */
+#define YY_DO_BEFORE_ACTION \
+	(yytext_ptr) = yy_bp; \
+	fortranleng = (size_t) (yy_cp - yy_bp); \
+	(yy_hold_char) = *yy_cp; \
+	*yy_cp = '\0'; \
+	(yy_c_buf_p) = yy_cp;
+
+#define YY_NUM_RULES 176
+#define YY_END_OF_BUFFER 177
+/* This struct is not used in this scanner,
+   but its presence is necessary. */
+struct yy_trans_info
+	{
+	flex_int32_t yy_verify;
+	flex_int32_t yy_nxt;
+	};
+static yyconst flex_int16_t yy_accept[1162] =
+    {   0,
+        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+        0,    0,  177,  176,  165,  161,  164,  175,  152,  151,
+      155,  167,  152,  154,  154,  154,  157,  153,  137,  150,
+      156,  159,  158,  160,  145,  145,  145,  145,  145,  145,
+      145,  145,  145,  145,  145,  145,  145,  145,  145,  145,
+      145,  145,  165,  161,  164,  175,  150,  145,  145,  145,
+      145,  145,  145,  176,  176,  173,  176,  176,  176,  161,
+      161,  154,  145,    0,    0,  165,    0,  166,    0,  164,
+      175,  175,  175,    0,  141,    0,    0,  167,  167,  167,
+      167,    0,    0,    0,  140,    0,    0,  132,   26,    0,
+
+      146,    0,    0,    0,    0,    0,    0,    0,  133,    0,
+      150,   25,    0,  145,  145,  145,  145,  145,  145,  145,
+      145,  145,  145,  145,  145,  145,  145,  145,  145,  145,
+       43,  145,  145,  145,  145,  145,  145,  145,  145,  145,
+      145,  145,  145,  145,   85,  145,  145,  145,  145,  145,
+      145,  145,  145,  145,  145,  145,  145,  145,  145,  145,
+      145,  145,  145,  145,  145,  145,  145,  145,  145,  145,
+      145,  145,  165,  163,    0,  163,    0,    0,    0,    0,
+        0,    0,  166,  162,  163,    0,  175,  174,  175,  175,
+      175,  163,  150,    4,  145,  145,  145,  145,   85,  145,
+
+      145,    0,  173,    0,    0,    0,    0,    0,    0,    0,
+      169,   26,    0,    0,    4,    0,  145,  145,  145,  145,
+      145,  145,    0,    0,    0,  175,  175,    0,    0,  167,
+      167,    0,    0,    0,    0,  139,    0,    0,    0,    0,
+        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+        0,  149,  146,    0,    0,    0,  142,    0,  145,  145,
+      145,  145,  145,  145,  145,  145,  145,  145,  145,  145,
+      145,  115,  145,  145,  145,    0,  145,  145,  145,  145,
+      145,   16,  145,  145,  145,  114,  145,  145,  145,  145,
+      145,    0,  145,    0,   96,  145,  145,  145,  145,  145,
+
+      121,  145,  145,  126,  145,  145,  145,  145,  145,  145,
+      145,   89,  145,  145,  145,  145,  145,  145,  145,  145,
+      145,  145,  145,  145,  145,  145,  118,  145,  145,  145,
+      145,  145,  122,  145,  145,  145,  145,  145,  165,  163,
+        0,  166,    0,    0,    0,    0,    0,    0,    0,    0,
+      163,    0,  163,  175,  175,  175,  150,    4,    4,    4,
+        4,  145,  145,  145,  145,  145,  145,  145,    0,    0,
+        0,    0,  170,    0,    0,  169,    0,    0,    4,    4,
+        4,    4,  142,    0,  145,  145,    0,  145,  145,  145,
+      145,    0,    0,    0,  175,  175,    0,    0,  167,  167,
+
+        0,    0,    0,    0,  147,    0,  146,    0,  148,    0,
+       28,    0,   30,   29,   32,   31,   34,    0,    0,   36,
+        0,  146,    0,  147,    0,  146,    0,  148,    0,  142,
+        0,  125,  117,  145,  145,  120,  123,  145,  145,   22,
+      145,  145,  145,  145,  145,  116,  145,  145,  145,    0,
+      145,  145,  145,   94,    0,  108,  145,  145,  145,  145,
+      145,  145,  145,  145,  145,    0,  109,  145,  145,  145,
+      145,  145,  145,  145,    0,   88,  145,  145,  145,  145,
+      145,  145,  145,    0,   98,  145,  145,    0,  111,  145,
+      145,  145,  145,  112,   21,  145,   60,   74,  145,  145,
+
+      145,  145,  145,  145,  145,  145,   79,   44,  145,  145,
+      145,  145,   69,  145,  127,  119,  145,   72,   54,  145,
+        0,   97,   99,  145,   92,  101,  145,  145,  165,  163,
+      166,    0,    0,    0,    0,    0,    0,    0,  163,    0,
+      163,  175,  175,  175,  150,    4,    4,  145,  145,  145,
+      145,  145,  145,   18,    0,    0,    0,    0,    0,  170,
+        0,    0,    4,    4,    0,  142,    0,  145,  145,  145,
+      145,    0,    0,    0,  175,  175,    0,    0,  167,  167,
+        0,    0,   38,   27,    0,   35,   37,    0,  142,    0,
+      142,  145,  145,  145,  145,  145,   49,  145,  145,  145,
+
+      124,  145,  145,    0,  145,  145,  145,    0,  145,  145,
+        0,    0,    0,    0,    0,    0,    0,    0,   42,  145,
+       95,  145,  145,  145,  145,  145,  145,  145,  145,   76,
+       76,   76,   76,  145,    0,  107,  113,  145,  145,   88,
+      145,  145,   90,  145,  145,  145,  145,  145,  145,  145,
+      145,  145,  145,  145,  145,  145,  145,   52,  145,   77,
+      145,  145,  145,    0,  145,  145,  145,  145,  145,  102,
+      145,  145,   55,   81,  165,  163,  166,    0,    0,    0,
+        0,    0,    0,  163,    0,  163,  175,  175,  175,  150,
+        4,    3,    0,  104,  145,  145,   86,  145,  145,   70,
+
+       71,   70,    0,    0,    0,    0,    4,    3,    0,  142,
+        0,  142,  145,   49,  145,  124,    0,   23,    0,  175,
+       23,    0,   23,   23,  167,   23,    0,   23,   23,   23,
+       33,  145,  145,   23,   23,   23,  145,  145,   63,  145,
+      145,  145,  145,    0,  145,  145,  138,    0,    0,   93,
+      145,   42,    0,   95,    0,    0,    0,    0,    0,    0,
+      145,  145,  145,  145,  145,  145,  145,  145,    0,  110,
+      145,  145,  145,  145,  145,  145,  145,   66,  145,  145,
+      129,  100,  128,  130,   39,  145,  145,  145,  145,  145,
+      145,  145,   83,    0,  145,   11,   75,   19,  145,  145,
+
+       82,  165,  163,  166,    0,    0,    0,    0,  163,  175,
+      175,   23,    4,    3,    3,  145,  145,  145,  145,    0,
+        0,    0,   23,    4,    3,    3,  145,   23,   23,   23,
+       24,    0,  168,   24,   24,   24,   24,   24,   24,   24,
+       24,   24,   24,  145,  145,  145,   58,  145,  145,  145,
+        0,    0,  145,  145,   40,   93,    0,  145,    0,    0,
+        0,    0,    0,    0,    0,  145,  145,  145,  145,  145,
+       73,  145,  145,  145,    0,    0,  145,  145,   17,   50,
+       45,  145,   46,    0,  145,  145,    9,  145,  145,   67,
+       84,    7,    0,    0,  145,    0,  145,  145,    0,    0,
+
+        0,    0,  175,   24,    4,  145,  145,   64,  145,    0,
+        0,   24,    4,   24,   24,   24,  145,    8,  145,  145,
+       87,  145,  145,   40,    0,    0,  145,  145,    0,  145,
+        0,    0,    0,    0,    0,   73,    0,  145,  145,  145,
+      145,  145,   56,  145,   65,    0,    0,    0,    0,  134,
+       12,   20,  145,    0,  145,   80,   68,  145,    0,  145,
+        0,  145,  145,    0,    0,    0,  175,    4,  145,   59,
+      145,    0,    0,    4,  145,  131,   47,  145,   51,    0,
+        0,  145,  145,    0,   57,    0,    0,    0,    0,    0,
+       56,  145,   41,  145,  106,  145,  145,    0,    0,    0,
+
+        0,    0,  134,   91,    0,  145,   61,    0,   62,    0,
+      145,  145,    0,   59,    0,  175,    4,    4,  145,  143,
+        0,    0,    4,    4,  145,   10,    0,    0,  145,  145,
+       57,    0,   41,    0,  106,    0,  145,   14,  145,  145,
+        0,    0,    0,  145,    0,    0,  103,    6,    0,  143,
+      175,    4,    4,  145,    0,    0,    4,    4,   48,    0,
+        0,  145,  145,    0,   14,    0,   15,  145,   53,    0,
+        0,    0,  145,    0,  103,    0,  175,    4,    2,  105,
+        0,    0,    4,    2,    0,    0,  145,  145,   15,    0,
+      145,    0,    0,    0,  145,    0,  105,  175,    4,    0,
+
+        0,    4,    0,    0,  136,  145,    0,   13,    0,    0,
+        0,  145,    0,  175,    1,    0,    0,  144,    1,  136,
+        0,  145,   13,    0,    0,    0,    0,  145,    0,  175,
+        0,    0,  135,    0,    0,    0,   78,    5,  175,    0,
+      135,   78,  175,    0,  175,    0,  175,    0,  175,    0,
+      175,    0,  175,  171,    0,    0,    0,    0,    0,  172,
+        0
+    } ;
+
+static yyconst flex_int32_t yy_ec[256] =
+    {   0,
+        1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    4,    5,    6,    7,    8,    9,   10,   11,   12,
+       13,   14,   15,   16,   17,   18,   19,   20,   21,   22,
+       23,   24,   25,   26,   27,   28,   29,   30,   31,   32,
+       33,   34,    1,    1,   35,   36,   37,   38,   39,   40,
+       41,   42,   43,   44,   45,   46,   47,   48,   49,   50,
+       51,   52,   53,   54,   55,   56,   57,   58,   59,   60,
+       61,    1,   62,    1,   63,    1,   64,   65,   66,   67,
+
+       68,   69,   70,   71,   72,   44,   73,   74,   75,   76,
+       77,   78,   79,   80,   81,   82,   83,   84,   85,   86,
+       87,   88,   89,   89,   89,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1
+    } ;
+
+static yyconst flex_int32_t yy_meta[90] =
+    {   0,
+        1,    2,    3,    2,    1,    4,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    5,    1,    6,
+        6,    6,    6,    6,    6,    6,    6,    6,    6,    1,
+        1,    1,    1,    1,    7,    8,    8,    9,    9,    5,
+       10,   11,    8,    8,    8,   10,   10,   10,    7,    8,
+        9,   10,   10,    5,   10,    8,   12,    8,    8,    8,
+        1,    1,    8,    7,    8,    8,    9,    9,    5,   10,
+       11,    8,    8,   10,   10,   10,    7,    8,    9,   10,
+       10,    5,   10,    8,   12,    8,    8,    8,    4
+    } ;
+
+static yyconst flex_int16_t yy_base[1215] =
+    {   0,
+        0,   88,    0,    0,    0,    0, 1215,   93, 1196,   91,
+        0,    0, 1179,   64,   97,  117,  132,   87,  124,   98,
+       99,  142,  173,  154,  108,  135,  134,  254,  172,  179,
+      175,  178,  219,  180,  323,  388,  384,  318,  386,  319,
+      186,  128,  250,  256,  392,  404,  438,  428,  204,  455,
+      432,  465,  544,  120,  537,  548,  627,  624,  622,  544,
+      644,  658,  251, 9159, 1175, 9159,  267,   99,  162,  569,
+      572,  620,  745,  164,  107,  262,  307,  335,  376,  522,
+        0,  167,  157, 1162, 9159,  278,  321, 1160, 1118,  372,
+      304,  532,  593,  567, 9159,  633,  832, 9159, 9159,  911,
+
+      798,  318,  319,  450,  799,  552,  320,  354, 9159,  978,
+      834, 9159,  865,  860,  862,  866,  914,  863,  973,  980,
+      974, 1013, 1024, 1045,  869, 1049, 1075, 1095, 1098, 1101,
+     1182, 1177, 1161, 1181, 1214, 1212, 1237, 1239, 1235, 1270,
+     1290, 1316, 1325, 1293, 1346, 1323, 1366, 1368, 1391, 1399,
+     1403, 1429, 1430, 1455, 1452, 1478, 1498, 1482, 1523, 1521,
+     1554, 1548, 1579, 1586, 1606, 1629, 1649, 1675, 1681, 1698,
+     1707, 1729,  871, 1114, 1109,  140, 1023,  187,  372,  403,
+      553,  401, 1095,  565, 1792, 1818, 1083, 9159,  643,  669,
+      589, 1844, 1870, 1580, 1865, 1867, 1868, 1905, 1926, 1922,
+
+     1925, 1078, 9159,  837,  437,  677,  249,  660, 1072,  712,
+     9159, 1062,  844,  625, 1874, 1993, 2022, 1042,  864,  473,
+      904,  621,  506,  651,  721,  798,  791,  890,  912,  936,
+      907,  725, 1029, 1143,  729, 9159, 1114, 1179, 2097, 2112,
+     2127,  229,  937, 1033, 1012, 1006,  994,  943,  883,  974,
+      891, 9159, 1476, 2142, 2157, 2172, 2182, 2202, 2178, 2180,
+     2200, 2203, 2223, 2243, 2246, 2244, 2276, 2269, 2299, 2307,
+     2301, 2324, 2344, 2351, 2377,  901, 1018, 2374, 2394, 2397,
+     2414, 2495, 2434, 2440, 2465, 2472, 2518, 2521, 2515, 2548,
+     2556, 1138, 2564,  968, 9159, 2581, 2597, 2604, 2627, 2649,
+
+     2650, 2690, 2693, 2686, 2726, 2738, 2746, 2747, 2763, 2783,
+     2799, 2800, 2803, 2820, 2840, 2843, 2870, 2891, 2895, 2903,
+     2926, 2928, 2935, 2961, 2981, 2958, 2984, 2978, 3004, 3011,
+     3027, 3052, 3048, 3059, 3085, 3068, 3105, 3111,  196,  203,
+      976,  383,  974,  988, 1018, 1014, 1025, 1029, 1042,  253,
+     3174, 3200, 3226, 1067, 1182, 1172, 3252,    0,  418,  288,
+     1096, 3228, 3229, 3231, 3251, 3267, 3287, 3290, 1188, 1566,
+      973,  740, 9159,  938,  866, 9159, 1268, 1178,  931, 1170,
+     1241, 1299, 3354, 3381,    0,  903, 3408, 1148, 1116, 1177,
+     1322, 1145,  410, 1415, 1235,  460, 1292, 1218, 1323, 1022,
+
+      963, 1520, 1662, 3418, 3430, 3440, 3450, 3460, 3470,  889,
+     9159,  865, 9159, 9159, 9159, 9159, 9159, 1239,  853, 9159,
+      846, 2472, 3480, 3490, 3500, 3510, 3520, 3530, 3545, 3555,
+     3575, 9159, 3289, 3553, 3573, 3551, 3574, 3590, 3596, 3612,
+     3628, 3634, 3635, 3655, 3671, 3651, 3687, 3688, 3696,  459,
+     3728, 3736, 3740, 3784, 3868, 9159, 3780, 3776, 3807, 3811,
+     3850, 3912, 3872, 3920, 3921, 1351, 9159, 3828, 4005, 4060,
+     4095, 3904, 4063, 4069, 1258, 4096, 4104, 4126, 4134, 4156,
+     4165, 4196, 4205, 1409, 9159, 4208, 4197, 1476, 9159, 4235,
+     4241, 4257, 4261, 4273, 4284, 4293, 4305, 4309, 4332, 4336,
+
+     4353, 4316, 4359, 4362, 4384, 4407, 4385, 4416, 4423, 4448,
+     4455, 4456, 4486, 4494, 4488, 4511, 4527, 4519, 4531, 4554,
+     1498, 9159, 4552, 4575, 4584, 4587, 4607, 4610,  493,  529,
+      551,  476, 1287,  816,  953, 1119, 1293,  841, 4678, 4704,
+     4730, 1607, 1346, 1458, 4756, 1362, 1397, 4733, 4732, 4759,
+     4627, 4768, 4817,  733, 1619, 1594, 1406,  728, 1537, 9159,
+     1571, 1651, 1625, 1613, 4839, 4867, 4894, 1627, 1658, 1686,
+     1714, 1394,    0, 1756, 1574,    0, 1668,  724, 1709,  724,
+     1763, 1775, 9159, 9159,  708, 9159, 9159, 4904, 4916, 4926,
+     4936, 4771, 4931, 5013, 4934, 5068, 5069, 5071, 5075, 5072,
+
+     5120, 5121, 5123, 1725, 5127, 5153, 5176, 1832, 5175, 5179,
+     1458, 1493, 1739, 1516, 1519, 1873, 1592, 1739, 5201, 5224,
+     5202, 5241, 5240, 5257, 5278, 5280, 5301, 5284, 5352, 9159,
+     5351, 5346, 5349, 5353, 1802, 9159, 5355, 5385, 5401, 9159,
+     5405, 5408, 5412, 5428, 5449, 5451, 5458, 5460, 5495, 5501,
+     5531, 5527, 5539, 5571, 5564, 5575, 5591, 5602, 5623, 5614,
+     5634, 5635, 5660,  693, 5666, 5667, 5692, 5703, 5715, 9159,
+     5723, 5719, 5740, 5746,  846, 1103, 1234, 1788, 1768, 1386,
+     1788, 1615, 1847, 1854,  236,  590, 1781, 1913,  715, 5809,
+     1790, 1645, 2264, 9159, 5785, 5805, 1690, 5806, 5807, 2344,
+
+     9159, 1951, 1858, 1924, 2256,  679, 1930, 1879, 5870, 5880,
+     5907, 5917, 1811,  658, 5946,  624,    0, 9159, 6034,    0,
+        0,  613,  609, 9159,  604,  586, 2245, 2364, 2389, 9159,
+     9159, 6063, 6118, 6139, 6138, 6134, 6135, 6141, 6161, 6173,
+     6184, 6209, 6217, 1654, 6260, 6248, 6216, 1844, 1864, 6239,
+     6280, 9159, 1689, 9159, 1930, 1750, 1763, 1934, 1933, 2077,
+     6300, 6292, 6317, 6337, 6338, 6344, 6369, 6376, 2212, 9159,
+     6360, 6413, 6392, 6412, 6424, 6433, 6456, 6435, 6465, 6476,
+     6488, 6497, 6508, 6509, 6552, 6529, 6540, 6549, 6560, 6585,
+     6593, 6605, 6628, 2392, 6636, 6637, 6648, 6659, 6694, 6685,
+
+     6686, 6775, 2286,  518, 2092, 2103, 1938, 2148, 2420, 2303,
+      472,  442, 2196,    0, 1803, 6692, 6717, 6768, 6756, 2424,
+     2334,  426,  422, 2432,  378, 1883, 6858, 6945, 6974,  337,
+     9159, 1922, 9159,    0,  328, 9159,  314, 2481, 2510, 9159,
+     6929, 6757, 7029, 7031, 7037, 7040, 7033, 7077, 7070, 7086,
+     2264, 2842, 7093, 7097, 7118, 9159, 2372, 7129, 2384, 2060,
+     2411, 2418, 2078, 2421, 2139, 7138, 7149, 7170, 7179, 7195,
+     7201, 7227, 7234, 7236, 2483, 3160, 7259, 7257, 7279, 7280,
+     7282, 7302, 7318, 2564, 7325, 7319, 7345, 7356, 7377, 7357,
+     7368, 7388, 2513, 2467, 7400, 2603, 7389, 7425, 2468, 2371,
+
+     2235, 2479,  361,  296,  182, 7409, 7432, 2249, 7455,  622,
+     2529,  227, 1008, 7505,    0,  207, 7482, 7503, 7505, 7514,
+     7535, 7536, 7544, 9159, 2413, 2526, 7567, 7571, 2546, 7593,
+     2547, 2562, 2567, 2526, 2575, 9159, 2526, 7587, 7625, 7594,
+     7631, 7632, 7648, 7657, 7668, 3179, 3203, 2672, 3229, 3335,
+     7684, 7688, 7709, 2597, 7705, 7725, 7732, 7736,  178, 7758,
+     2596, 7775, 7769, 2619, 2617, 2641, 2696, 2668, 7795, 7801,
+     7807, 2677, 2720, 3150, 7827, 7818, 7834, 7867, 7850, 2625,
+     2685, 7870, 7890, 2688, 7859, 2699, 2731, 2741, 2661, 2665,
+     9159, 7911, 7907, 7910, 7927, 7933, 7963, 2822, 3360, 3384,
+
+     3411, 4103, 4220, 7959, 2702, 7970, 7966, 2741, 7986, 2738,
+     8003, 8019, 2758, 9159, 2765, 2781, 2809, 2818, 8030, 8026,
+     2900, 2883, 2903, 2951, 8042, 8051, 2820, 2829, 8063, 8086,
+     9159, 2838, 9159, 2846, 9159, 2846, 8088, 8090, 8113, 8134,
+     3067, 4430, 2880, 8136,  175, 2911, 8125, 8156, 2877, 9159,
+     1190, 2938, 2908, 8157, 3034, 3081, 3049, 3028, 8173, 2959,
+     2985, 8189, 8182, 3029, 9159, 3039, 8205, 8212, 8214, 3241,
+     4684, 3056, 8235, 3049, 9159, 3056, 3212, 3072,    0, 8237,
+     1210, 3169, 3157,  144, 3103, 3103, 8257, 8260, 9159, 3110,
+     8283, 3255, 4708, 3110, 8290,  123, 9159, 3235, 3207, 3329,
+
+     3387, 3558, 3232, 3256, 8306, 8313, 3278, 8315, 8396, 4870,
+     3259, 8391, 3280, 3664,    0, 3349, 3414, 9159,  103, 9159,
+     3346, 8392, 9159, 3745, 4900, 8473, 3347, 8450,   90, 1237,
+     1328, 3570, 8470, 4973, 4977, 3380, 8471, 9159, 3676, 3645,
+     9159, 9159, 3693, 3608, 3764, 3684, 3616, 1433, 3705, 3782,
+     3810, 3774, 3875, 9159, 3852, 3697, 3910, 3892, 3896, 9159,
+     9159, 8553, 8565, 8577, 8589, 8601, 8613, 8621, 8623, 8635,
+     8647, 8659, 8671, 8678, 8687, 8699, 8711, 8723, 8735, 8747,
+     8754, 8762, 8774, 8786, 8798, 8810, 8822, 8834, 8846, 8858,
+     8870, 8882, 8894, 8906, 8918, 8930, 8942, 8954, 8966, 8978,
+
+     8990, 9002, 9014, 9026, 9038, 9050, 9062, 9074, 9086, 9098,
+     9110, 9122, 9134, 9146
+    } ;
+
+static yyconst flex_int16_t yy_def[1215] =
+    {   0,
+     1161,    1, 1162, 1162,    1,    2, 1163, 1163,    1,    2,
+        1,    2, 1161, 1161, 1161, 1161, 1161, 1164, 1165, 1161,
+     1161, 1166, 1167, 1161, 1161, 1161, 1161, 1161, 1161, 1168,
+     1161, 1161, 1161, 1161, 1169, 1169,   36,   36,   36,   36,
+       36,   36,   36,   36,   36,   36,   36,   36,   36,   36,
+       36,   36, 1161, 1161,   53, 1170, 1161,   36,   36,   36,
+       36,   36,   36, 1161, 1171, 1161, 1171, 1171, 1171, 1161,
+     1161, 1172, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161,
+     1164, 1164, 1164, 1165, 1161, 1165, 1165, 1166, 1161, 1166,
+     1166, 1167, 1173, 1167, 1161, 1167, 1167, 1161, 1161, 1161,
+
+     1174, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1175,
+     1161, 1161, 1161,   36,   36,   36,   36,   36,   36,   36,
+       36,   36,   36,   36,   36,   36,   36,   36,   36,   36,
+     1169,   36,   36,   36,   36,   36,   36,   36,   36,   36,
+       36,   36,   36,   36,   36,   36,   36,   36,   36,   36,
+       36,   36,   36,   36,   36,   36,   36,   36,   36,   36,
+       36,   36,   36,   36,   36,   36,   36,   36,   36,   36,
+       36,   36,   53,  173, 1176, 1161, 1161, 1161, 1161, 1161,
+     1161, 1161,  173, 1161,  173, 1161, 1170, 1161, 1170, 1170,
+     1170, 1161, 1161, 1177,   36,   36,   36,   36,   36,   36,
+
+       36, 1171, 1161, 1171, 1171, 1171, 1171, 1178, 1179, 1179,
+     1161, 1179, 1179, 1179, 1180, 1179, 1161,  217,  217,  217,
+      217,  217, 1161, 1161, 1161, 1164, 1164, 1165, 1165, 1166,
+     1166, 1173, 1173, 1173, 1173, 1161, 1167, 1167, 1161, 1161,
+     1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161,
+     1161, 1161, 1181, 1161, 1161, 1161, 1161, 1161,   36,   36,
+       36,   36,   36,   36,   36,   36,   36,   36,   36,   36,
+       36,   36,   36,   36,   36, 1182,  131,   36,   36,   36,
+       36,   36,   36,   36,   36,   36,   36,   36,   36,   36,
+       36, 1161,   36, 1161, 1161,   36,   36,   36,   36,   36,
+
+       36,   36,   36,   36,   36,   36,   36,   36,   36,   36,
+       36,   36,   36,   36,   36,   36,   36,   36,   36,   36,
+       36,   36,   36,   36,   36,   36,   36,   36,   36,   36,
+       36,   36,   36,   36,   36,   36,   36,   36,  173,  173,
+     1161,  173, 1176, 1161, 1161, 1161, 1161, 1161, 1161, 1161,
+      185, 1161, 1161, 1170, 1170, 1170, 1161, 1177, 1177, 1177,
+     1177,   36,   36,   36,   36,   36,   36,   36, 1171, 1171,
+     1183, 1183, 1161, 1179, 1179, 1161, 1179, 1179, 1180, 1180,
+     1180, 1180, 1179, 1179,  217,  217, 1179,  217,  217,  217,
+      217, 1161, 1161, 1161, 1164, 1164, 1165, 1165, 1166, 1166,
+
+     1173, 1167, 1167, 1161, 1161, 1161, 1161, 1161, 1161, 1161,
+     1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161,
+     1161, 1181, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161,
+     1161, 1161,   36,   36,   36,   36,   36,   36,   36,   36,
+       36,   36,   36,   36,   36,   36,   36,   36,   36, 1161,
+       36,   36,   36,   36, 1161, 1161,   36,   36,   36,   36,
+       36,   36,   36,   36,   36, 1161, 1161,   36, 1161,   36,
+       36,   36,   36,   36, 1161,   36,   36,   36,   36,   36,
+       36,   36,   36, 1161, 1161,   36,   36, 1161, 1161,   36,
+       36,   36,   36,   36,   36,   36,   36,   36,   36,   36,
+
+       36,   36,   36,   36,   36,   36,   36,   36,   36,   36,
+       36,   36,   36,   36,   36,   36,   36,   36,   36,   36,
+     1161, 1161,   36,   36,   36,   36,   36,   36,  173,  173,
+      173, 1161, 1161, 1161, 1161, 1161, 1161, 1161,  185, 1161,
+     1161, 1170, 1170, 1170, 1161, 1177, 1177,   36,   36,   36,
+       36,   36,   36, 1161, 1171, 1171, 1171, 1183, 1183, 1161,
+     1179, 1179, 1180, 1180, 1179, 1179, 1179,  217,  217,  217,
+      217, 1161, 1184, 1161, 1164, 1185, 1165, 1186, 1187, 1188,
+     1189, 1190, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161,
+     1161,   36,   36, 1161,   36,   36,   36,   36,   36,   36,
+
+       36,   36,   36, 1161,   36,   36,   36, 1161,   36,   36,
+     1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161,   36,   36,
+       36,   36,   36,   36,   36,   36,   36,   36,   36, 1161,
+     1161,   36,   36,   36, 1161, 1161,   36,   36,   36, 1161,
+       36,   36,   36,   36,   36,   36,   36,   36,   36,   36,
+       36,   36,   36,   36,   36,   36,   36,   36,   36,   36,
+       36,   36,   36, 1161,   36,   36,   36,   36,   36, 1161,
+       36,   36,   36,   36,  173,  173,  173, 1161, 1161, 1161,
+     1161, 1161, 1161,  173, 1161, 1161, 1170, 1170, 1191, 1161,
+     1177, 1192, 1161, 1161,   36,   36, 1161,   36,   36, 1161,
+
+     1161, 1161, 1171, 1171, 1179, 1193, 1180, 1194, 1179, 1179,
+     1179, 1179,  217,  217, 1161,  217, 1195, 1161, 1161, 1196,
+     1197, 1198, 1199, 1161, 1200, 1201, 1202, 1203, 1203, 1161,
+     1161, 1161,   36, 1161,   36,   36,   36,   36,   36,   36,
+       36,   36,   36, 1161,   36,   36,   36, 1161, 1161,   36,
+       36, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161,
+       36,   36,   36,   36,   36,   36,   36,   36, 1161, 1161,
+       36,   36,   36,   36,   36,   36,   36,   36,   36,   36,
+       36,   36,   36,   36,   36,   36,   36,   36,   36,   36,
+       36,   36,   36, 1161,   36,   36,   36,   36,   36,   36,
+
+       36, 1161,  802,  802, 1161, 1161, 1161, 1161,  802, 1204,
+     1205, 1204, 1206, 1207, 1207,   36,   36,   36,   36, 1208,
+     1208, 1209, 1210, 1211, 1212, 1212, 1161, 1210, 1161,  829,
+     1161, 1161, 1161, 1197, 1199, 1161, 1201, 1203, 1203, 1161,
+     1161,   36,   36,   36,   36,   36,   36,   36,   36,   36,
+     1161, 1161,   36,   36,   36, 1161, 1161,   36, 1161, 1161,
+     1161, 1161, 1161, 1161, 1161,   36,   36,   36,   36,   36,
+       36,   36,   36,   36, 1161, 1213,   36,   36,   36,   36,
+       36,   36,   36, 1161,   36,   36,   36,   36,   36,   36,
+       36,   36, 1161, 1161,   36, 1161,   36,   36, 1161, 1161,
+
+     1161, 1161, 1204, 1204, 1206,   36,   36, 1161,   36, 1208,
+     1208, 1210, 1211, 1210,  829,  829,   36,   36,   36,   36,
+       36,   36,   36, 1161, 1161, 1161,   36,   36, 1161,   36,
+     1161, 1161, 1161, 1161, 1161, 1161, 1161,   36,   36,   36,
+       36,   36,   36,   36,   36, 1213, 1213, 1161, 1214, 1213,
+       36,   36,   36, 1161,   36,   36,   36,   36, 1161,   36,
+     1161,   36,   36, 1161, 1161, 1161, 1204, 1206,   36,   36,
+       36, 1208, 1208, 1211,   36,   36,   36,   36,   36, 1161,
+     1161,   36,   36, 1161,   36, 1161, 1161, 1161, 1161, 1161,
+     1161,   36,   36,   36,   36,   36,   36, 1161, 1214, 1214,
+
+     1213, 1214, 1214,   36, 1161,   36,   36, 1161,   36, 1161,
+       36,   36, 1161, 1161, 1161, 1204, 1206, 1206,   36,   36,
+     1208, 1208, 1211, 1211,   36,   36, 1161, 1161,   36,   36,
+     1161, 1161, 1161, 1161, 1161, 1161,   36,   36,   36,   36,
+     1161, 1213, 1161,   36, 1161, 1161,   36,   36, 1161, 1161,
+     1204, 1206, 1206,   36, 1208, 1208, 1211, 1211,   36, 1161,
+     1161,   36,   36, 1161, 1161, 1161,   36,   36,   36, 1161,
+     1213, 1161,   36, 1161, 1161, 1161, 1204, 1206, 1206,   36,
+     1208, 1208, 1211, 1211, 1161, 1161,   36,   36, 1161, 1161,
+       36, 1161, 1213, 1161,   36, 1161, 1161, 1204, 1206, 1208,
+
+     1208, 1211, 1161, 1161,   36,   36, 1161,   36, 1161, 1213,
+     1161,   36, 1161, 1204, 1206, 1208, 1208, 1161, 1211, 1161,
+     1161,   36, 1161, 1161, 1213, 1213, 1161,   36, 1161, 1204,
+     1208, 1161,   36, 1213, 1214, 1161,   36, 1161, 1204, 1208,
+     1161, 1161, 1204, 1208, 1204, 1208, 1204, 1208, 1204, 1208,
+     1204, 1208, 1204, 1161, 1208, 1208, 1208, 1208, 1208, 1161,
+        0, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161,
+     1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161,
+     1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161,
+     1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161,
+
+     1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161,
+     1161, 1161, 1161, 1161
+    } ;
+
+static yyconst flex_int16_t yy_nxt[9249] =
+    {   0,
+       14,   15,   16,   17,   18,   19,   14,   20,   21,   22,
+       23,   24,   25,   26,   25,   27,   25,   28,   29,   30,
+       30,   30,   30,   30,   30,   30,   30,   30,   30,   25,
+       31,   32,   33,   34,   35,   36,   37,   38,   39,   40,
+       41,   42,   43,   42,   42,   44,   45,   46,   47,   48,
+       42,   49,   50,   51,   42,   42,   52,   42,   42,   42,
+       25,   25,   42,   35,   36,   37,   38,   39,   40,   41,
+       42,   43,   42,   44,   45,   46,   47,   48,   42,   49,
+       50,   51,   42,   42,   52,   42,   42,   42,   14,   53,
+       54,   55,   56,   71,   67,   66,   67,   68,   76,   77,
+
+       78,  203, 1138,   74,   72,  211,  206,   57,   57,   57,
+       57,   57,   57,   57,   57,   57,   57,   75,   79,   77,
+       79,   79,   77,   79,   58,   59,   82,   73,   60,   85,
+       61,   69,   74,   78,   77,   80,   74,   74,   74, 1113,
+       83,   62,   63,  176,   89,   75,  211,   74,   99,  176,
+       75,   75,   75,   58,   59,   82,   73,   60,  224,   61,
+       69,   75,  115,   86,  203,   74,   74,   74,   83,   62,
+       63,   74,   98,   74,   74,   93,   74,   87,   75,   75,
+       75,   90,   94,   95,  109,   75,  224,   75,   75,   75,
+     1074,  115,   86,   74, 1008,   91,  110,  529,  223,  530,
+
+       74,  226,   74,   74,  531,   87,  530,   75,  227,  207,
+       90,   74,   96,   75,   74,   75,   75,   74,   74,   74,
+      115,  346,   74,   91,  387,   75,   97,  223,   75,  211,
+      226,   75,   75,   75,  142,   75,  227,  207,  115,  176,
+       74,   96,  161,   74,  968,  176,   74,   74,   74,  115,
+      346,  203,  112,   75,   97,  100,   75,  100,   74,   75,
+       75,   75,  142,   76,   77,   78,  410,  115,  204,  203,
+      204,  161,   75,  101,  101,  101,  101,  101,  101,  101,
+      101,  101,  101,   85,  115,  115,  370,   74,  102,  143,
+      115,  538,  103,   74,  104,  410,  144,  145,  188,  105,
+
+       75,  106,  107,  201,  146,  205,   89,   75,   79,   77,
+       79,  108,  228,  115,  115,  370,   89,  102,  143,  115,
+      538,  103,   74,  104,  144,  145,   85,  105,  546,  106,
+      107,  201,  146,   85,  205,   75,   78,   77,   78,  108,
+      113,  228,  114,  114,  114,  114,  114,  114,  114,  114,
+      114,  114,  115,  115,  387,  231,  129,  546,  116,  117,
+      130,  138,  118,  188,  139,  242,  131,  140,  119,  243,
+      132,  250,  229,  141,   89,  120,  121,  225,   77,  225,
+      211,  115,  115,  231,  531,  129,  530,  116,  117,  130,
+      138,  118,  139,  242,  131,  140,  119,  243,  132,  250,
+
+      229,  141,  251,  120,  121,  113,  230,  114,  114,  114,
+      114,  114,  114,  114,  114,  114,  114,  347,  124,  359,
+      115,  359,  122,  967,  211,  125,  147,  118,  211,  126,
+      251,  133,  127,  134,  148,  230,  135,  136,  150,  203,
+      149,  123,  128,  137,  188,  347,  151,  124,  573,  115,
+      348,  122,  152,  350,  125,  147,  118,  126,  153,  133,
+      127,  134,  157,  148,  135,  136,  168,  150,  149,  123,
+      128,  137,  115,  169,  188,  151,  158,  573,  348,  159,
+      152,  350,  160,  170,  207,  154,  153,  155,  244,  162,
+      387,  157,  156,  163,  675,  168,  676,  164,  576,  115,
+
+      604,  115,  169,  245,  158,  165,  171,  159,  166,  167,
+      160,  170,  207,  154,  678,  155,  172,  244,  162,  804,
+      156,  389,  163,   78,   77,   80,  164,  576,  115,  604,
+      677,  245,  676,  165,   93,  171,  166,  167,  183,  184,
+      185,   94,   95,  678,  172,  173,   77,  174,  175,  389,
+      188,  392,  677,  176,  676,  189,  186,  186,  186,  186,
+      186,  186,  186,  186,  186,  186,   79,   77,   79,   93,
+       79,   77,   79,   79,   77,   79,   94,   95,  115,  392,
+      177,  178,  208,   74,  179,  208,  180,  190,   89,  198,
+      248,  188,  142,  176,  233,  234,  233,  181,  182,  176,
+
+      249,  191,  235,  236,  224,  208,   89,  115,  208,  177,
+      178,  349,   74,  179,   85,  180,  190,  198,  836,  248,
+      142,  210,  211,  210,  203,  181,  182,  211,  249,  191,
+      192,  194,  224,  212,  208,   93,  176,  208,  387,  349,
+      356,  387,   94,   95,  110,  188,  193,  193,  193,  193,
+      193,  193,  193,  193,  193,  193,  197,  391,  195,  213,
+      129,  372,  373,  372,  130,  125,   74,  237,  356,  126,
+      131,  188,  196,  214,  132,  387,  378,  354,  115,  203,
+       75,  211,  128,  143,  972,  197,  391,  195,  213,  129,
+      144,  199,  168,  130,  125,   74,  237,  126,  131,  169,
+
+      196,  214,  132,  355,  378,  393,  354,  115,   75,  170,
+      128,  369,  143,  375,  376,  375,  200,  188,  144,  199,
+      794,  168,  394,   77,  394,  731,   89,  234,  169,  724,
+      373,  234,  355,  393,  401,  236,  554,  170,  401,  236,
+      369,  559,  560,  559,  200,  209,  210,  211,  210,  209,
+      209,  209,  215,  209,  209,  209,  209,  209,  209,  209,
+      209,  209,  216,  209,  217,  217,  217,  217,  217,  217,
+      217,  217,  217,  217,  209,  209,  209,  209,  209,  195,
+      218,  218,  218,  218,  219,  218,  125,  218,  218,  218,
+      220,  218,  218,  196,  218,  218,  218,  218,  221,  218,
+
+      218,  218,  218,  222,  218,  209,  209,  218,  195,  218,
+      218,  218,  218,  219,  218,  125,  218,  218,  220,  218,
+      218,  196,  218,  218,  218,  218,  221,  218,  218,  218,
+      218,  222,  218,  209,   93,  239,  240,  246,  204,  203,
+      204,   94,   95,  395,  554,  396,  211,  802,  241,  803,
+      680,  110,  247,  111,  111,  111,  111,  111,  111,  111,
+      111,  111,  111,  587,  239,  240,  246,  375,  376,  375,
+      586,  395,  339,  396,  340,  205,  241,  258,  377,  680,
+      247,  387,  584,  238,  257,  257,  257,  257,  257,  257,
+      257,  257,  257,  257,  115,   85,  115,  261,  388,  115,
+
+      115,  115,  115,  268,  205,  115,  583,  377,  115,   89,
+     1161,  238,  100,  115,  100,  115,  115,   85,  259,  115,
+      387,  387,  115,  115,  341,  115,  261,  388,  115,  115,
+      115,  115,  268,  211,  115,  397,  419,  115,   89, 1161,
+      211,  115,  421,  115,  115,  102,  259,  115,  115,  103,
+      115,  104,  341,  115,  411,  390,  105,  450,  106,  107,
+      417,  400,  260,  397,  419,  234,  398,  115,  108,  294,
+      421,  294,  401,  236,  102,  373,  188,  115,  103,  295,
+      104,  399,  115,  390,  105,  450,  106,  107,  681,  400,
+      260,  420,  412,  418,  398,  115,  108,  253,  253,  253,
+
+      253,  253,  253,  253,  253,  253,  253,  115,  264,  399,
+      211,  416,  115,  115,  115,  254,  255,  681,  262,  115,
+      412,  418,  263,  415,   89,  265,  115,  115,  256,  414,
+      233,  234,  233,  115,  349,  258,  115,  264,  235,  236,
+      532,  115,  115,  115,  254,  255,  262,  115,  115,  266,
+      413,  263,  115,  265,  115,  115,  256,  344,  115,  387,
+      580,  115,  349,  115,  211,  533,  115,  534,  532,  188,
+      974,  345,  115,  535,  211,  265,  115,  115,  266,  115,
+      203,  115,  536,  115,  115,  188,  344,  115,  115,  580,
+      267,  537,  115,  533,  115,  534,  342,  269,  115,  345,
+
+      115,  535,  115,  265,  804,  115,  803,  542,  115,  115,
+      536,  188,  115,  115,  115,  342,   93,  115,  267,  537,
+       89,  270,  271,   94,   95,  269,  115,  272,  115,  115,
+      115,  273,  274,  387,  115,  115,  542,  115,  115,  292,
+      115,  292,  547,  115,  233,  234,  233,  275,  115,  270,
+      271,  115,  235,  236,  115,  272,  115,  682,  115,  402,
+      273,  274,   89,  115,  115,  387,  115,   85,  569,  115,
+      547,  380,  211,  380,  188,  275,  115,  203, 1161,  115,
+      211,   93,  115,  276,  188,  276,  682,  402,   94,   95,
+      203,  475,  188,  568,  387,  115,  569,  572,   70,  113,
+
+      115,  277,  277,  277,  277,  277,  277,  277,  277,  277,
+      277,  115,  203,  281,  115,  115,  115,   66,  282,  475,
+      115,  568,  280,   85,  115,  572,  544,  543,  555,  115,
+      115,  570,  562,  403,  115,  804,  278,  803,  279,  188,
+      115,  281,  115,  211,  115,  115,  115,  282,  115,  115,
+      280,  115, 1077,  115,  544,  543,  578,  555,  115,  570,
+      562,  403,  115,  284,  278,  115,  279,  115,  283,  115,
+      211,  115, 1100,  115,  115,  115,  115,  115,  115,  285,
+      115,  563,  115,  289,  288,  578,  286,  575,  115, 1161,
+      287,  284,  115,  115,  585,  115,  283,   85,  115, 1139,
+
+      115,  211,  115,  115,  115,  115,  640,  115,  285,  115,
+      563,  289,  288,  561,  286,  575,  115,  292,  287,  292,
+      115,  290,  585,  115,  115,   89,  294,  115,  294,  115,
+      203,  683,  115,  115,  640, 1161,  295,  291,  115,  387,
+      679,  561,  296,  115,  577,  564,  115, 1161,  188,  290,
+      115,  115,  466,  115,  466,  115,  115,  115,  115,  261,
+      683,  115,  115,  301,  115,  291, 1161,  571,  679,  293,
+      296,  115,  577,  564,  115,  579,  115, 1161,  115,  115,
+      115, 1161,  297,  467,  115,  115,  115,  697,  261,  697,
+     1140,  115,  301,  115,  298,  571,  299,  293,  688,  300,
+
+      115, 1161,  115,  579,  115,  115,  115,  115,  203,  115,
+      484,  297,  484,  691,  115,  303,  574,   77,  574,  115,
+      485,  115,  298,  302,  299,  115,  688,  300,  304,  115,
+      115,  115,  717,  115,  115,  203,  115,  115,  115, 1161,
+     1161,  691,  115,  303,  115,  305,  692,  115, 1161,  115,
+      306,  302,  115,  704,  115, 1161,  115,  304, 1161,  115,
+      188,  717,  115,  115,  115, 1161,  115,  115,  115,  115,
+     1161,  115,  115,  305,  692,  308,  307,  488,  306,  488,
+      115,  704,  115,  115,  115, 1161,  115,  489, 1161,  115,
+      310,  115,  115,  115,  115, 1150,  689,  115,  115,  521,
+
+      309,  521, 1161,  308,  307,  311,  752, 1161,  115,  522,
+      115,  115,  115,  239,  240,  115,  115,  115,  115,  310,
+      115,  115,   93,  115,  315,  689,  241, 1161,  309,   94,
+       95,  312,  115,  311,  752,  115,  115,  115,  559,  560,
+      559,  115,  239,  240, 1161,  115,  115,  753, 1161,  313,
+      115,  115,  314,  315,  241,  115,  318,  115, 1161,  312,
+      115,  115,  115,  115,  755,  316,  115,  556,  203,  556,
+      756,  317,  581,  211,  115,  753,  115,  313, 1161,  115,
+      314,  359,  115,  359,  115,  318,  115,  115,  319,  115,
+      320,  115,  755,  115,  316,  556,  203,  556,  756,  317,
+
+      581,  115,  115,  324,  115, 1161,  321,  322,  557,  188,
+      323,  115,  720,  115,  360,  211,  115,  319,  115,  320,
+      115,  203,  115,  705,  325,  115,  326,  211,  361,  115,
+     1161,  324,  115,  327,  321,  322,  557,  557,  323,  115,
+      115,  720,  115,  360,  387,  115,  815,  115,  815,  115,
+      759,  705,  325,  211,  115,  326,  361,  328,  687,  115,
+      115,  327,  708,  329,   93,  557,  808,  115,  115,  115,
+      703,   94,   95,   85,  115,  387,  707,  330,  759,  713,
+      265, 1161,  115,  115,  331,  328,  687,  115,  115,  706,
+      708,  697,  329,  697,  808,  332,  714,  115,  703,  851,
+
+      582, 1161,  115,  387,  707,  330,  722,  713,  265,  115,
+      115,   89,  115,  331,  115,  115, 1161,  115,  706,  335,
+      115, 1161,  333,  332,  715,  714,  334,  851,  115,  582,
+      115,  387,  115, 1161,  115,  722,  859,  115,  115, 1161,
+      336,  115, 1161,  115,  115,  337,  115,  725,  335,  115,
+      333,  115,  716,  715,  334, 1161,  115,  719,   77,  719,
+      115,  115,  115,  115,  859,   93,  115,  744,  115,  336,
+      115,  338,   94,   95,  337,  115,  725,   93,  754,  115,
+      760,  716,  115,  188,  729,  730, 1161, 1161,  115,  693,
+     1161,  693,  115,  342,  184,  351,  744,  115,  861,  694,
+
+      338,  727,  806,  635,  815,  635,  815,  754,  862,  760,
+      115,  352,  352,  352,  352,  352,  352,  352,  352,  352,
+      352,  353,  807,  810, 1161,  805,  861,  176,  387, 1161,
+      727,  806,  813,  608,  636,  608,  862,  352,  352,  352,
+      352,  352,  352,  352,  352,  352,  352,  353,  700,  827,
+      700,  807,  810,  176,  805,  804,  184,  809,  701, 1161,
+      203,  813,  702,  352,  352,  352,  352,  352,  352,  352,
+      352,  352,  352,  353,  748,  380,  211,  380,  827,  176,
+      826,  211,  826,  856,  826,  211,  826,  110,  749,  357,
+      357,  357,  357,  357,  357,  357,  357,  357,  357,  115,
+
+      820,  115,  115,  748,  115,  857,  115,  115,  381, 1161,
+      267,  757,  856,  270,  363,  188,  749,  362,  115,  272,
+      115,  364,  382,  832,   77,  832,  203,  758,  115,  820,
+      115,  115,  211,  115,  857,  115,  115,  381,  267,  115,
+      757,  270,  363, 1161,  115,  362,  115,  272,  115,  364,
+      382,  811,  702,  365,  702,  758,  115, 1161,  115,  115,
+      115,  115,  297,  368,  115,  115,  702,  860,  115,  863,
+     1161,  367,  824,  115,  298,  115,  299,  821,  115,  366,
+      811,  365,  864,  901, 1161,  115,  115, 1161,  115,  115,
+      115,  297,  368,  115,  115,  211,  860, 1161,  863,  367,
+
+     1161,  824,  298,  115,  299,  821,  115,  366, 1161, 1161,
+      864,  901,  383,  383,  383,  383,  383,  383,  383,  383,
+      383,  383,  374,  374,  211,  374,  374,  374,  374,  374,
+      374,  374,  374,  374,  374,  374,  374,  374,  374,  384,
+      374,  385,  385,  385,  385,  385,  385,  385,  385,  385,
+      385,  374,  374,  374,  374,  374,  386,  386,  386,  386,
+      386,  386,  386,  386,  386,  386,  386,  386,  386,  386,
+      386,  386,  386,  386,  386,  386,  386,  386,  386,  386,
+      386,  386,  374,  374,  386,  386,  386,  386,  386,  386,
+      386,  386,  386,  386,  386,  386,  386,  386,  386,  386,
+
+      386,  386,  386,  386,  386,  386,  386,  386,  386,  386,
+      374,  404, 1161,  404,  932,  865,  405,  405,  405,  405,
+      405,  405,  405,  405,  405,  405,  406, 1161,  406,  935,
+      899,  407,  407,  407,  407,  407,  407,  407,  407,  407,
+      407,  408,  932,  408,  865,  900,  409,  409,  409,  409,
+      409,  409,  409,  409,  409,  409,  423,  935,  423,  899,
+     1161,  424,  424,  424,  424,  424,  424,  424,  424,  424,
+      424,  425, 1161,  425,  900, 1161,  426,  426,  426,  426,
+      426,  426,  426,  426,  426,  426,  427,  902,  427,  432,
+      937,  428,  428,  428,  428,  428,  428,  428,  428,  428,
+
+      428,  257,  257,  257,  257,  257,  257,  257,  257,  257,
+      257, 1161,  115,  769,  115,  769,  902,  115,  937,  115,
+      429,  430,  430,  430,  430,  430,  430,  430,  430,  430,
+      430,  115,  433,  115,  115,  905,  908,  115,  908,  115,
+      431,  115,  115,  115,  770,  434,  115,   93,  115,  429,
+      908,  435,  908,  115,  839,  840,  115,  115,  211,  115,
+      433,  115,  115,  115,  905,  693,  115,  693,  115,  431,
+      436,  115, 1161,  434, 1161,  694,  115,  115,  115,  435,
+      115,  115,  115,  115,  115,  115,  115,  804,  439,  803,
+      437,  115, 1161, 1161,  822,  176,  115,  115,  436,  115,
+
+      438,  805,  924,  115,  115,  188,  115,  115,  115,  115,
+      115,  115,  115, 1161,  115,  115,  439, 1161,  437, 1161,
+      441,  440,  115,  822,  115,  115, 1161,  115,  438,  115,
+      805,  924,  115,  115, 1161,  115,  203,  115,  115,  115,
+      115,  115,  903, 1161,  115,  700,  115,  700,  441,  440,
+      115,  442,  115,  443,  445,  701,  444,  115,  115,  702,
+      115, 1161,  115,  115,  115,  446,   93,  115, 1161,  115,
+      115,  903,  911,   94,   95,  115, 1161,  115,  115,  442,
+      115,  443,  445,  115,  444,  115, 1161,  115,  115,  447,
+      115,   93,  115,  893,  446,  893,  448,  115,   94,   95,
+
+     1161,  911, 1161,  894,  115,  115, 1161,  115,  115,  451,
+      929,  115,  115,  115,  115,  449,  115,  447,  965,  115,
+      931,  804,  184,  809,  448,  115,  203,  115,  115,  176,
+      115,  453,  115,  115,  211,  452,  115,  115,  451,  929,
+      115,  466,  115,  466,  449,  115,  965,  115,  115,  931,
+      115,  933,  454,  115, 1161,  115,  934,  115,  115,  936,
+      453,  980,  115,  910,  452,  115, 1161,  115,  115, 1161,
+     1161,  913,  467,  115,  115,  115,  465,  115,  115,  115,
+      933,  454,  115,   93,  875,  934,  875,  115,  936,  980,
+       94,   95,  910,  115,  876,  115,  455,  115,  455,  115,
+
+      913,  959,  115,  115,  115,  465,  115,  964,  115,  239,
+      240,  115,   93,  966,  893,  115,  893,  468,  469,   94,
+       95,  115,  241, 1161,  894,  115, 1161,  456,  115,  115,
+      959,  203,  457,  115,  458,  115,  964,  459,  239,  240,
+      115,  460,  966, 1161,  461,  468,  469,  462,  463,  472,
+      241,  464,  115,  115,  115,  115,  470,  115,  115,  471,
+      115,  457,  989,  458,  991,  884,  459,  884,  115,  460,
+     1161,  115,  461, 1161,  115,  462,  463,  981,  472,  464,
+      973,  115,  115,  115,  115,  470,  115,  115,  471,  115,
+      115,  989,  474,  991,  473,  115,  115,  984,  115,  115,
+
+      986,  115,  115,  115,  896,  981,  896,  987,  973,  115,
+     1161,  115,  476,  954, 1161,  115,  115,  115,  988,  115,
+      115,  474,  473,  990,  115,  984,  477,  115,  986,  115,
+     1010,  115,  115, 1161,  115,  987,  115,  115,  115,  961,
+      476,  954,  478,  115,  115,  115,  988, 1161, 1005,  115,
+      115,  990, 1161, 1013,  477, 1161, 1161,  115,  479, 1010,
+      115,  115,  115, 1161, 1161,  115,  115,  115,  961, 1014,
+      478, 1027,  115,  998,  948,  998, 1005, 1015,  115,  203,
+      115,  480, 1013,  115,  115,  115,  479,  481,  115,  115,
+      115,  484,  483,  484,  488,  115,  488, 1014,  188, 1027,
+
+      482,  485,  115,  115,  489, 1017, 1015, 1018,  115,  480,
+     1161, 1161,  115,  115, 1035, 1021,  481,  115,  115, 1036,
+      115,  483,  203, 1028,  115,  115, 1031,  115,  482,  115,
+      115,  115,  115, 1016, 1017,  486, 1018, 1161,  490,  115,
+      492, 1032, 1035,  115, 1021,  487,  115, 1036,  491,  115,
+     1043, 1161, 1028,  115,  115, 1031,  115, 1161,  115, 1022,
+      115,  115, 1016,  486,  493,  115,  490,  115,  492, 1033,
+     1032,  115,  115,  487,  115, 1034,  491,  115, 1043,  115,
+      115,  115, 1045,  188,  495,  115,  115, 1161, 1022,  115,
+     1046,  494,  496,  493,  115, 1161, 1161,  115, 1033,  115,
+
+      115,  115,  115, 1050, 1034, 1161,  115,  115, 1161,  115,
+      115, 1045, 1049,  495,  115,  115,  115,  115, 1046,  494,
+      496,  497,  115, 1041,  948, 1041,  115,  115,  115, 1051,
+      498,  115, 1050,  115,  115, 1161,  115,  500,  115,  115,
+     1049,  499,  115,  852,  115,  852,  115, 1052, 1161,  497,
+     1161,  115,  115,  115,  115, 1161,  115, 1051,  498,  115,
+     1053, 1161,  115,  115,  115, 1061,  500,  115,  115, 1060,
+      499,  115,  501,  115,  115, 1161, 1052,  115,  925,  115,
+      115,  115,  115,  115,  115,  203, 1064,  502,  115, 1053,
+      503,  926, 1065,  115, 1061, 1161,  115, 1060,  504, 1066,
+
+      501,  115,  203,  115,  115,  211,  115,  925,  115,  115,
+      505,  115, 1161, 1161, 1064,  502, 1072, 1056,  503,  926,
+     1065,  115, 1076,  115,  115,  115,  504, 1066, 1161,  115,
+      115, 1161,  507,  115,  115, 1161,  506,  115,  115,  505,
+      508, 1057,  115, 1161,  115, 1072, 1056, 1055,  115, 1075,
+     1076,  115, 1161,  211,  115, 1079,  115,  509,  115,  115,
+      115,  507,  115,  115,  506,  115,  115,  115,  508,  115,
+     1057,  115,  115, 1078,  115, 1055,  115,  512, 1075,  115,
+      510,  115,  511, 1079,  115,  509, 1161, 1161,  115,  115,
+     1161,  115,  115, 1058,  115,  115,  115,  115,  115,  513,
+
+      115, 1161, 1078,  115, 1085,  515,  512,  115,  510,  115,
+      511,  115,  115, 1161,  115,  115,  115,  115,  115,  514,
+      115,  115, 1058,  115,  115,  516,  115, 1086,  513,  115,
+      211,  517, 1085,  515,  115, 1161,  203,  115,  115,  115,
+     1161,  115,  115,  115,  115,  115,  115,  115,  514,  115,
+      115,  211,  115,  521,  516,  521, 1086,  518, 1161,  517,
+      519,  115,  115,  522,  115,  115,  115,  115, 1070,  948,
+     1070, 1081,  115, 1161,  115, 1084, 1089, 1161,  520,  115,
+      115, 1090,  115,  203, 1083,  518,  115,  115,  519,  523,
+      115,  115,  115,  115, 1094,  115, 1161, 1096,  115,  524,
+
+     1081,  115,  115, 1084, 1089,  115,  520,  115,  115, 1097,
+     1090,  115,  115, 1083,  526,  115,  115, 1082,  523,  115,
+      115,  115,  115, 1094,  115, 1096, 1099,  115,  524,  115,
+     1161,  115,  525,  115, 1161, 1161,  115, 1097,  115,  115,
+      115, 1103,  526, 1161,  115,  115, 1082, 1111,  115,  115,
+      115, 1161,  211,  115, 1099, 1104,  527, 1107,  115,  211,
+      525,  947,  948,  947,  528, 1161,  115, 1161,  115,  949,
+     1103,  203,  950,  115,  115,  531, 1111,  539, 1161,  115,
+      947,  948,  947, 1104,  527, 1107,  115, 1023,  949, 1024,
+     1161,  950,  528,  540,  540,  540,  540,  540,  540,  540,
+
+      540,  540,  540,  541,  947,  948,  947, 1101, 1161,  176,
+     1161, 1102,  949, 1161,  188,  950, 1023, 1161, 1024,  540,
+      540,  540,  540,  540,  540,  540,  540,  540,  540,  541,
+     1000, 1001, 1000, 1161, 1161,  176, 1101,  188, 1002, 1102,
+     1161, 1003, 1092,  948, 1092,  540,  540,  540,  540,  540,
+      540,  540,  540,  540,  540,  541, 1109,  948, 1109, 1098,
+     1115,  176,  115,  115, 1161,  550,  548,  115,  115,  110,
+      115,  545,  545,  545,  545,  545,  545,  545,  545,  545,
+      545,  115,  549, 1114,  115,  115,  551, 1098, 1115, 1120,
+      115,  115,  115,  554,  550,  548,  115,  115, 1121,  115,
+
+     1161,  115, 1161, 1161,  115,  552,  115, 1161, 1161,  115,
+      549, 1114,  115, 1127,  115,  551, 1123, 1120,  482,  115,
+      115,  115, 1161,  115,  115,  553,  115, 1121,  115,  115,
+      115,  203,  115, 1161,  552,  115,  947,  948,  947, 1129,
+      115, 1127,  115,  115,  949, 1123,  482,  950,  115, 1161,
+      115,  203,  115,  115,  553,  115,  211,  115,  115, 1161,
+     1161, 1000, 1001, 1000, 1161, 1161, 1116, 1129,  115, 1002,
+      115,  115, 1003,  383,  383,  383,  383,  383,  383,  383,
+      383,  383,  383,  211, 1161, 1000, 1001, 1000, 1117, 1118,
+     1117, 1161,  565, 1002, 1132, 1116, 1003, 1131, 1136, 1161,
+
+      566,  566,  566,  566,  566,  566,  566,  566,  566,  566,
+      211, 1161, 1042, 1001, 1042, 1117, 1118, 1117, 1142,  567,
+      949,  565, 1132,  950, 1161, 1131, 1136,  383,  383,  383,
+      383,  383,  383,  383,  383,  383,  383,  405,  405,  405,
+      405,  405,  405,  405,  405,  405,  405, 1142,  567,  405,
+      405,  405,  405,  405,  405,  405,  405,  405,  405,  407,
+      407,  407,  407,  407,  407,  407,  407,  407,  407,  407,
+      407,  407,  407,  407,  407,  407,  407,  407,  407,  409,
+      409,  409,  409,  409,  409,  409,  409,  409,  409,  409,
+      409,  409,  409,  409,  409,  409,  409,  409,  409,  424,
+
+      424,  424,  424,  424,  424,  424,  424,  424,  424,  424,
+      424,  424,  424,  424,  424,  424,  424,  424,  424,  426,
+      426,  426,  426,  426,  426,  426,  426,  426,  426,  426,
+      426,  426,  426,  426,  426,  426,  426,  426,  426,  428,
+      428,  428,  428,  428,  428,  428,  428,  428,  428,  428,
+      428,  428,  428,  428,  428,  428,  428,  428,  428,  588,
+      211,  588, 1161, 1161,  589,  589,  589,  589,  589,  589,
+      589,  589,  589,  589,  430,  430,  430,  430,  430,  430,
+      430,  430,  430,  430, 1161,  115, 1161,  115, 1161,  590,
+      115,  590,  115,  429,  591,  591,  591,  591,  591,  591,
+
+      591,  591,  591,  591,  115,  592,  115,  115,  115,  593,
+      203, 1119,  115,  115,  115, 1161,  115, 1141,  188,  115,
+     1161,  115,  429, 1161,  115, 1161,  115,  115,  594,  115,
+      115, 1161,  115,  592,  115,  115,  115,  115,  593, 1119,
+     1161,  115,  115,  115, 1161, 1141,  115,  203,  595,  115,
+     1149,  115, 1161,  115,  115,  115, 1146,  594,  115,  115,
+     1161, 1161,  596, 1161,  115,  115,  188,  115,  115,  115,
+     1161,  115,  597,  115,  115,  115,  595,  115,  188, 1149,
+      115,  115, 1161,  598, 1146,  115,  203,  115,  115,  115,
+      115,  596, 1144,  115,  115,  188,  115,  115,  115,  203,
+
+      599,  597,  115,  115,  115,  115, 1161,  188,  115,  115,
+      115,  598, 1161,  600,  115,  115,  115, 1130,  115,  115,
+     1144,  115,  115,  115,  115,  601,  115,  115,  599, 1143,
+      115, 1157,  115,  602,  115,  115,  115, 1148, 1161,  115,
+      115,  115,  600,  603, 1145, 1130, 1124,  948, 1124,  115,
+      115,  115,  115, 1161,  601,  115,  115, 1143, 1151,  115,
+     1157,  602,  115, 1161,  115, 1148,  188,  115,  115,  115,
+      115,  603, 1145,  605,  115,  115,  203,  115,  606,  115,
+     1161,  115, 1161, 1161,  203,  608, 1151,  608, 1161,  115,
+     1161,  115,  607,  115, 1161, 1161,  115, 1161, 1161,  115,
+
+     1161,  605, 1147,  115,  115, 1161, 1161,  606,  115,  115,
+      115, 1153, 1154, 1153,  115,  115, 1161,  115,  115,  115,
+      607,  115, 1161,  115, 1161, 1155,  609, 1161,  619,  115,
+      620, 1147, 1161,  115, 1161, 1152, 1161,  115, 1161,  115,
+      610,  115, 1161,  115,  115,  115,  621,  115,  115, 1161,
+      115, 1161,  115, 1155,  203,  609,  619,  115,  620,  622,
+      115,  115,  115, 1152,  115,  115, 1161,  115,  610,  455,
+      115,  455, 1161, 1161,  115,  621, 1153, 1154, 1153,  115,
+     1161,  629, 1161, 1161,  115, 1161, 1161,  622,  115,  115,
+     1156,  115,  115, 1159, 1160, 1159,  115, 1159, 1160, 1159,
+
+      456,  623, 1161,  115, 1161,  611,  115,  612, 1161,  629,
+      613,  115,  203,  115,  614, 1161, 1161,  615,  115, 1156,
+      616,  617, 1161, 1161,  618,  115, 1161, 1161, 1161,  623,
+      626,  115, 1161, 1161,  611,  115,  612, 1161,  115,  613,
+      115, 1161,  614,  115, 1161,  615,  115, 1161,  616,  617,
+      624,  115,  618,  115,  115,  115, 1161,  637,  626,  115,
+      115,  627, 1161, 1158, 1161,  115,  625,  115, 1161, 1161,
+     1161, 1161,  115,  115,  115,  115,  628, 1161, 1161,  624,
+      115, 1161, 1161,  115,  115,  637, 1161, 1161,  115,  115,
+      627, 1158, 1161,  115,  625, 1161, 1161, 1161, 1161, 1161,
+
+     1161,  115,  115, 1161,  628,  630,  630,  630,  630,  630,
+      630,  630,  630,  630,  630,  630, 1161,  630,  630,  630,
+      630,  630,  631,  630,  632,  632,  632,  632,  632,  632,
+      632,  632,  632,  632,  630,  630,  630,  630,  630,  633,
+      633,  633,  633,  633,  633,  633,  633,  633,  633,  633,
+      633,  633,  633,  633,  633,  633,  633,  633,  633,  633,
+      633,  633,  633,  633,  633,  630,  630,  633,  633,  633,
+      633,  633,  633,  633,  633,  633,  633,  633,  633,  633,
+      633,  633,  633,  633,  633,  633,  633,  633,  633,  633,
+      633,  633,  633,  630,  115, 1161,  635,  638,  635,  115,
+
+     1161, 1161,  115,  115, 1000, 1001, 1000, 1161,  115, 1161,
+     1161,  634, 1002,  115, 1161, 1003,  115, 1161, 1161, 1161,
+     1161, 1161,  639,  115, 1161, 1161,  638,  636,  115,  115,
+      115,  115,  115, 1161,  115,  115, 1161,  115,  115,  634,
+     1161,  115, 1161,  115,  115, 1161,  641, 1161,  115,  115,
+      639, 1161, 1161, 1161, 1161, 1161, 1161,  115,  115,  115,
+      115, 1161, 1161,  115,  115,  115, 1161,  115,  115, 1161,
+     1161, 1161,  115,  115, 1161,  641,  115,  115, 1161,  115,
+      642, 1161, 1161, 1161, 1161,  115, 1161,  643, 1161,  115,
+      115, 1161, 1161, 1161,  115,  115, 1161,  115,  644,  115,
+
+     1161, 1161,  115, 1161,  115,  645, 1161,  115,  642,  115,
+     1161, 1161,  646, 1161, 1161,  643, 1161, 1161,  115,  115,
+     1161, 1000, 1001, 1000,  115, 1161, 1161,  644,  115, 1002,
+      115,  650, 1003,  115,  645,  115,  115,  115,  647,  115,
+      646,  648,  115, 1161,  115, 1161,  115,  115, 1161,  115,
+      115, 1161, 1161, 1161, 1161, 1161,  649, 1161,  115,  115,
+      650,  115, 1161, 1161,  115,  115, 1161,  647,  115,  115,
+      648,  115, 1161,  115,  115,  652,  115,  115,  115, 1161,
+      115, 1161, 1161,  651,  649, 1161,  115, 1161,  115,  115,
+     1161,  115, 1161, 1161,  115,  115,  115, 1161,  115, 1161,
+
+      115, 1161,  653,  115,  652, 1161,  654,  115, 1161,  115,
+      115,  651,  115, 1161,  115, 1161,  115, 1161,  115, 1161,
+      115, 1161,  115,  115,  115,  115,  115,  115, 1161,  115,
+      653, 1161,  115, 1161,  654,  655,  115,  115,  115,  115,
+     1161,  115,  115,  115,  115, 1161,  115,  115,  115, 1161,
+      115, 1161,  115, 1161,  115,  115,  115, 1161,  115, 1161,
+     1161,  115,  115, 1161,  655,  115,  115, 1161,  115,  659,
+      115,  115,  115,  115,  115,  115, 1161,  115, 1161,  115,
+      656, 1161,  657, 1161,  115,  115,  115,  115, 1161,  115,
+      115,  658,  115,  115, 1161,  115,  661,  659,  115,  115,
+
+      115,  115, 1161, 1161,  115, 1161,  115, 1161,  656, 1161,
+      657, 1161,  660,  115, 1161,  115,  115,  115,  115,  115,
+      658,  115,  115,  115,  115,  661, 1161,  115, 1161,  664,
+      115, 1071,  948, 1071,  115,  662, 1161,  115,  115,  949,
+      660,  115,  950,  115, 1161, 1161,  115,  115,  115,  663,
+      115, 1161,  115,  115, 1161,  115, 1161,  115, 1161, 1161,
+      115, 1161,  115,  662, 1161,  115,  115, 1161, 1161,  115,
+      115, 1161, 1161, 1161,  665,  115,  115, 1161,  663,  115,
+     1161, 1161,  115, 1161,  115, 1161,  115,  115,  115,  115,
+      115,  115, 1161,  666,  115,  115, 1161,  115, 1161, 1161,
+
+     1161,  115,  665,  668,  115, 1161,  667, 1161,  115,  115,
+     1161,  115, 1161, 1161, 1161, 1161,  115, 1161,  115,  115,
+      115,  666,  115,  115,  115,  115, 1161,  115,  115,  115,
+      669,  668, 1161,  115,  667, 1161,  115,  115,  670,  115,
+     1161,  115, 1161, 1161, 1161,  115, 1161,  115, 1161,  115,
+      115,  115, 1161,  115,  115, 1161,  115,  115,  115,  669,
+     1161,  115,  115, 1161,  115,  115,  115,  115, 1161,  115,
+      115, 1161,  115, 1161,  115,  115, 1161, 1161, 1161,  115,
+      115, 1161,  115, 1161,  115, 1161,  115,  115,  115, 1161,
+      115,  115,  115,  115,  115,  115, 1161, 1161, 1161,  115,
+
+      115, 1161,  671, 1161, 1161,  115, 1161,  115,  115,  115,
+     1161, 1161,  115,  672,  115,  115, 1161,  115,  115, 1161,
+      115,  115,  115,  115, 1161, 1161,  115, 1161,  115, 1161,
+      671, 1161, 1161,  115, 1161,  115, 1161,  115,  115, 1161,
+      115,  115,  672,  115,  115,  673,  115,  115,  674,  115,
+      115, 1161,  115, 1161, 1161,  115,  115, 1161, 1161, 1161,
+      115,  698, 1161,  115, 1161,  115,  115, 1161,  115, 1161,
+      115, 1161, 1161,  115,  673,  115, 1161,  674,  115,  677,
+      115,  684, 1161, 1161, 1161, 1093,  948, 1093,  115, 1161,
+      698,  115, 1161,  949, 1161,  115,  950,  685,  685,  685,
+
+      685,  685,  685,  685,  685,  685,  685,  686,  115, 1110,
+      948, 1110, 1161,  176, 1161, 1161, 1161,  949, 1161, 1161,
+      950, 1161, 1161,  685,  685,  685,  685,  685,  685,  685,
+      685,  685,  685,  686,  693, 1161,  693, 1161, 1161,  176,
+     1161, 1161, 1161, 1161,  694, 1161, 1161, 1161, 1161,  685,
+      685,  685,  685,  685,  685,  685,  685,  685,  685,  686,
+      697, 1161,  697, 1161, 1161,  176,  696,  115, 1161, 1161,
+      695,  115,  115,  110,  600,  690,  690,  690,  690,  690,
+      690,  690,  690,  690,  690,  115,  115, 1161, 1161, 1161,
+     1161, 1161, 1161,  115, 1161,  696,  115, 1161,  115,  695,
+
+      115,  115,  115,  600, 1161,  115, 1161,  115,  645,  732,
+      115, 1161,  115,  115,  115,  646, 1161, 1161,  700,  699,
+      700,  115,  115, 1161,  115, 1161, 1161,  115,  701, 1161,
+     1161,  115,  702, 1161,  115, 1161,  115,  645,  732,  115,
+      115,  211, 1161,  646, 1161, 1161, 1161,  699, 1161,  115,
+     1161,  115,  115,  709, 1161,  709,  115, 1161,  710,  710,
+      710,  710,  710,  710,  710,  710,  710,  710, 1161,  211,
+      115, 1126,  948, 1126, 1161, 1161, 1161, 1161, 1161,  949,
+      115, 1161,  950, 1161, 1161,  115,  566,  566,  566,  566,
+      566,  566,  566,  566,  566,  566,  211, 1161,  115, 1161,
+
+     1161,  947,  948,  947, 1161,  565, 1161, 1161,  711,  949,
+      711, 1161,  950,  712,  712,  712,  712,  712,  712,  712,
+      712,  712,  712,  589,  589,  589,  589,  589,  589,  589,
+      589,  589,  589, 1161,  565,  589,  589,  589,  589,  589,
+      589,  589,  589,  589,  589,  591,  591,  591,  591,  591,
+      591,  591,  591,  591,  591,  591,  591,  591,  591,  591,
+      591,  591,  591,  591,  591,  733, 1161, 1161,  115, 1161,
+      115, 1161, 1161,  115,  947,  948,  947, 1161, 1000, 1001,
+     1000, 1161,  949,  737,  115,  950, 1002,  115, 1161, 1003,
+     1161, 1161, 1161, 1161,  733, 1161, 1161,  115, 1161,  115,
+
+     1161, 1161,  115, 1161, 1161, 1161, 1161, 1161, 1161, 1161,
+     1161,  737,  115,  718,  718,  115,  718,  718,  718,  718,
+      718,  718,  718,  718,  718,  718,  718,  718,  718,  718,
+      734,  718,  735,  735,  735,  735,  735,  735,  735,  735,
+      735,  735,  718,  718,  718,  718,  718,  736,  736,  736,
+      736,  736,  736,  736,  736,  736,  736,  736,  736,  736,
+      736,  736,  736,  736,  736,  736,  736,  736,  736,  736,
+      736,  736,  736,  718,  718,  736,  736,  736,  736,  736,
+      736,  736,  736,  736,  736,  736,  736,  736,  736,  736,
+      736,  736,  736,  736,  736,  736,  736,  736,  736,  736,
+
+      736,  718,  115,  115,  738,  115,  115,  115,  115,  115,
+      115,  115, 1161,  740,  115, 1161, 1161, 1161,  739,  741,
+     1161,  115,  115, 1161,  115,  115, 1161, 1161,  115, 1161,
+     1161,  115,  115,  738,  115,  115,  115,  115,  115,  115,
+      115, 1161,  740,  115, 1161, 1161,  739,  741, 1161,  115,
+      115, 1161,  115,  115,  115,  115,  115,  115, 1161,  115,
+      115,  115,  115, 1161, 1161,  745,  115, 1161, 1161,  742,
+     1161, 1161, 1161,  115,  115,  743,  115, 1161, 1161, 1161,
+      115, 1161, 1161,  115,  115, 1161,  115,  115,  115,  115,
+      115,  115,  115, 1161,  745,  115, 1161,  742,  746, 1161,
+
+     1161,  115,  115,  743,  115, 1161,  115, 1161,  115,  115,
+      115, 1161, 1161,  115,  750,  115,  115,  747,  115, 1161,
+      751,  115, 1161, 1161, 1161, 1161,  746, 1161,  115,  115,
+     1161, 1161,  115, 1161,  115,  115,  115, 1161,  115,  115,
+      115,  115,  115,  750,  115, 1161,  747,  115, 1161,  751,
+     1161, 1161, 1161, 1161,  115,  115,  115,  115,  115, 1161,
+      115, 1161, 1161,  115,  115,  115, 1161, 1161, 1161,  115,
+      115,  761, 1161, 1161,  115,  115, 1161,  115,  762,  115,
+      115, 1161,  115,  115, 1161, 1161, 1161,  115,  763, 1161,
+     1161,  115,  115,  115,  115, 1161,  115, 1161, 1161,  761,
+
+     1161, 1161,  764,  115,  115,  115, 1161,  762,  115,  115,
+      115, 1161,  115,  765,  115, 1161,  763,  115,  768,  115,
+      115,  115,  115,  115, 1161,  115, 1161, 1161, 1161,  766,
+      764,  115, 1161,  115, 1161,  115, 1161,  115,  115,  767,
+      115,  115,  765,  115, 1161, 1161,  115,  768,  115, 1161,
+     1161, 1161,  115,  769,  115,  769, 1161,  766, 1161,  115,
+     1161,  115, 1161,  258,  115,  115, 1161, 1161,  767,  115,
+      257,  257,  257,  257,  257,  257,  257,  257,  257,  257,
+      115, 1161,  115,  115,  770,  115,  115,  115,  115,  115,
+     1161,  115,  115, 1161,  115, 1161, 1161, 1161, 1161,  115,
+
+      771, 1161,  115, 1161, 1161,  115,  115, 1161,  115,  115,
+     1161, 1161,  115, 1161,  115,  115,  115,  115,  115,  115,
+      115,  115, 1161,  115,  115, 1161, 1161,  115,  771, 1161,
+      115, 1161, 1161,  115,  115,  115,  115, 1161,  772,  115,
+      115,  774,  115,  773,  115,  775,  115,  115,  115, 1161,
+     1161,  115, 1161,  115,  115, 1161, 1161, 1161,  115, 1161,
+     1161,  115,  115, 1161,  115,  115,  772,  115,  115,  115,
+      774,  115,  773,  115,  775,  115,  115, 1161, 1161,  776,
+      115,  115,  115,  115, 1161,  115,  115,  777,  115,  115,
+      115,  115,  115,  115,  780, 1161,  115,  115, 1161,  115,
+
+     1161, 1161,  115, 1161,  778,  779, 1161,  776, 1161,  115,
+     1161,  115,  115,  115,  115, 1161,  777,  115, 1161,  115,
+     1161,  115, 1161,  780, 1161, 1161,  115, 1161,  115,  115,
+      115,  781,  778,  779,  115,  115, 1161, 1161, 1161,  115,
+      115,  115, 1161, 1161, 1161, 1161,  782, 1161,  115, 1161,
+     1161, 1161, 1161, 1161,  115, 1161, 1161, 1161,  115, 1161,
+      781,  115, 1161,  115,  115,  115,  115,  783, 1161,  115,
+      115, 1161,  784,  115,  782, 1161,  115,  785,  115, 1161,
+      115, 1161,  115, 1161,  115, 1161, 1161, 1161, 1161, 1161,
+      115, 1161,  115, 1161,  115,  115,  783, 1161,  115,  115,
+
+      784, 1161,  115,  787, 1161,  115,  785,  115,  115,  115,
+      115, 1161,  115,  786,  115, 1161, 1161,  115, 1161, 1161,
+      115, 1161,  788, 1161,  115,  115, 1161,  115,  115,  789,
+      115, 1161,  787, 1161,  115, 1161,  115, 1161,  115,  115,
+     1161,  115,  786,  115,  115,  115, 1161, 1161,  115, 1161,
+      788, 1161,  115,  115,  115,  115,  115,  115,  789,  115,
+     1161,  790,  115, 1161, 1161,  115, 1161,  115,  115,  792,
+      115, 1161,  115,  115,  115, 1161,  115,  115, 1161, 1161,
+     1161, 1161,  115,  115, 1161, 1161,  115,  791,  115, 1161,
+      790,  115, 1161, 1161,  115,  115,  793,  115,  792,  115,
+
+      115,  115,  115,  115,  115,  115,  115, 1161, 1161, 1161,
+     1161, 1161, 1161,  115, 1161,  791,  115, 1161,  795,  115,
+      796, 1161, 1161,  115, 1161,  793,  115, 1161,  115,  115,
+      115,  115, 1161, 1161,  115,  115, 1161,  115, 1161,  797,
+      798,  115,  115, 1161, 1161,  115,  795,  115,  796,  115,
+     1161, 1161, 1161,  115,  115,  115,  115,  115,  115, 1161,
+      115, 1161,  115, 1161, 1161, 1161,  115,  797,  799,  798,
+     1161,  115,  801,  115,  115, 1161,  115,  800,  115,  115,
+      115, 1161,  115,  115,  115,  115,  115,  115, 1161, 1161,
+     1161,  115, 1161,  115, 1161, 1161,  799, 1161, 1161,  115,
+
+      801, 1161, 1161,  115,  115,  800, 1161, 1161,  115,  115,
+     1161, 1161,  176, 1161,  115, 1161, 1161, 1161,  176,  115,
+     1161,  115, 1161,  816,  115, 1161,  110,  115,  111,  111,
+      111,  111,  111,  111,  111,  111,  111,  111,  115,  115,
+      115,  115, 1161, 1161,  115,  115,  819,  817,  115, 1161,
+     1161,  818,  816,  115, 1161, 1161, 1161, 1161,  115,  115,
+      115, 1161, 1161, 1161, 1161, 1161,  115, 1161,  115,  115,
+      115, 1161,  211,  115,  115,  819,  817, 1161, 1161,  818,
+     1161, 1161,  211, 1161, 1161, 1161,  115,  115,  115,  710,
+      710,  710,  710,  710,  710,  710,  710,  710,  710,  710,
+
+      710,  710,  710,  710,  710,  710,  710,  710,  710,  211,
+     1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161,  211,
+     1161, 1161, 1161, 1161, 1161, 1161,  712,  712,  712,  712,
+      712,  712,  712,  712,  712,  712,  712,  712,  712,  712,
+      712,  712,  712,  712,  712,  712,  823,  823,  211,  823,
+      823,  823,  823,  823,  823,  823,  823,  823,  823,  823,
+      823,  823,  823,  828,  823,  829,  829,  829,  829,  829,
+      829,  829,  829,  829,  829,  823,  823,  823,  823,  823,
+      830,  830,  830,  830,  830,  830,  830,  830,  830,  830,
+      830,  830,  830,  830,  830,  830,  830,  830,  830,  830,
+
+      830,  830,  830,  830,  830,  830,  823,  823,  830,  830,
+      830,  830,  830,  830,  830,  830,  830,  830,  830,  830,
+      830,  830,  830,  830,  830,  830,  830,  830,  830,  830,
+      830,  830,  830,  830,  823,  832,   77,  832, 1161, 1161,
+      833,  833, 1161,  833, 1161, 1161, 1161,  833,  833, 1161,
+     1161,  833, 1161, 1161,  833,  833,  833,  833,  833,  833,
+      833,  833,  833,  831,  831, 1161,  831,  831,  831,  831,
+      831,  831,  831,  831,  831,  831,  831,  831,  831,  831,
+      841,  831,  842,  842,  842,  842,  842,  842,  842,  842,
+      842,  842,  831,  831,  831,  831,  831,  843,  843,  843,
+
+      843,  843,  843,  843,  843,  843,  843,  843,  843,  843,
+      843,  843,  843,  843,  843,  843,  843,  843,  843,  843,
+      843,  843,  843,  831,  831,  843,  843,  843,  843,  843,
+      843,  843,  843,  843,  843,  843,  843,  843,  843,  843,
+      843,  843,  843,  843,  843,  843,  843,  843,  843,  843,
+      843,  831,  115, 1161, 1161,  258, 1161,  115,  257,  257,
+      257,  257,  257,  257,  257,  257,  257,  257,  115,  845,
+     1161,  844,  115,  115,  115,  115, 1161,  115, 1161, 1161,
+      115,  115, 1161, 1161, 1161, 1161,  115,  115,  115, 1161,
+     1161,  115, 1161, 1161,  846,  115, 1161,  115,  845,  844,
+
+      115,  115,  115,  115,  115, 1161,  115,  115, 1161,  115,
+     1161, 1161,  115, 1161,  115,  115,  115, 1161,  115,  115,
+     1161, 1161,  846,  115,  115, 1161,  115, 1161, 1161,  115,
+      847, 1161, 1161, 1161, 1161, 1161,  115,  115,  848, 1161,
+     1161,  115,  115,  115, 1161,  849, 1161,  115,  115, 1161,
+      115,  115,  115, 1161,  115,  115,  115, 1161,  847,  850,
+     1161,  852,  115,  852, 1161,  115,  848, 1161, 1161,  115,
+      115, 1161,  115,  115,  849, 1161, 1161,  115,  115,  115,
+      115, 1161,  115, 1161,  115,  115,  855,  115,  850, 1161,
+      115, 1161,  115, 1161,  115, 1161,  853,  115,  115,  115,
+
+     1161,  115,  115, 1161, 1161, 1161, 1161,  115, 1161,  854,
+     1161,  115, 1161,  115,  115,  855,  115, 1161,  858,  115,
+      115, 1161, 1161,  115, 1161,  853,  115, 1161,  115,  115,
+     1161,  115, 1161,  115,  115, 1161,  866,  854, 1161,  115,
+     1161,  115, 1161,  115, 1161,  115,  867,  858,  115, 1161,
+     1161,  115, 1161,  115, 1161,  115,  115,  868, 1161, 1161,
+      115,  115, 1161,  115, 1161,  866, 1161, 1161,  115, 1161,
+      115,  115,  115,  115,  867,  869,  115,  115,  115, 1161,
+      115,  115,  871,  115, 1161,  115,  868, 1161, 1161,  870,
+      115,  115, 1161, 1161,  874, 1161, 1161,  115,  115,  115,
+
+      115,  115, 1161,  115,  869,  115,  115,  115,  115, 1161,
+      115,  871,  115,  115,  875,  115,  875,  870,  115,  115,
+      872,  873,  115,  874,  876,  115,  115, 1161,  115,  115,
+     1161,  115,  115, 1161, 1161, 1161, 1161,  115, 1161,  115,
+      877,  115, 1161, 1161,  115,  115,  115,  115,  872,  873,
+      115,  115,  115, 1161,  878,  115, 1161,  115,  115, 1161,
+      115, 1161,  879,  115, 1161,  115,  115,  115,  877,  115,
+     1161,  880,  115,  115,  115,  115,  115,  115, 1161, 1161,
+      115,  115, 1161,  878, 1161, 1161,  115,  115,  115, 1161,
+      115,  879,  115,  115,  115,  115,  115, 1161,  115,  115,
+
+      880,  115, 1161,  115,  115,  115, 1161,  881, 1161,  115,
+      115, 1161, 1161, 1161,  115,  115,  115,  882,  115,  115,
+     1161,  883,  115, 1161,  115, 1161, 1161,  115,  115,  115,
+     1161,  115, 1161,  115, 1161,  881,  115,  115, 1161,  115,
+     1161,  115,  115,  115,  115,  882,  115,  115,  115,  883,
+      115,  115, 1161,  884, 1161,  884,  115,  115, 1161, 1161,
+      115,  115,  115,  115, 1161,  115, 1161, 1161,  115,  115,
+     1161,  115,  115, 1161,  115, 1161,  115,  115,  115,  115,
+     1161,  886,  115,  888, 1161, 1161,  115, 1161,  115,  115,
+      115,  115,  115,  115,  115, 1161, 1161,  115,  887,  115,
+
+     1161,  885,  115,  115, 1161,  115, 1161, 1161,  115,  886,
+      115, 1161,  888,  889, 1161,  115, 1161,  115, 1161,  115,
+      115,  115, 1161,  115,  115, 1161,  887,  115,  115,  885,
+      115,  891,  115,  115, 1161, 1161,  890, 1161,  115,  115,
+     1161,  889, 1161, 1161,  115, 1161,  115, 1161,  115, 1161,
+     1161,  892, 1161,  115, 1161, 1161,  115, 1161,  115, 1161,
+      891,  115,  115, 1161,  890, 1161,  115,  115,  115, 1161,
+      115,  115, 1161,  115,  115,  115,  115, 1161,  895,  892,
+     1161,  115,  115, 1161, 1161, 1161,  115,  115, 1161,  115,
+      115,  115, 1161,  115, 1161,  896,  115,  896,  115,  115,
+
+      115,  115, 1161, 1161,  115,  115, 1161,  895, 1161,  115,
+     1161,  115,  115, 1161, 1161, 1161,  115,  115,  115,  115,
+      115, 1161,  115, 1161,  115,  115,  115,  115,  115,  115,
+      897,  906, 1161,  115, 1161, 1161, 1161, 1161,  898,  115,
+      115, 1161, 1161, 1161, 1161,  115, 1161,  115,  115,  115,
+     1161,  115, 1161,  115,  115,  115,  115,  115, 1161,  897,
+      906, 1161,  115, 1161,  907, 1161,  898,  115, 1161,  908,
+      115,  908, 1161,  115,  258,  115,  802,   77,  804,  175,
+      115, 1161, 1161, 1161, 1161,  115, 1161, 1161, 1161, 1161,
+      909,  115,  907, 1161, 1161,  115,  115, 1161,  115, 1161,
+
+     1161, 1161,  115, 1161, 1161, 1161, 1161,  115, 1161,  115,
+      115,  177,  178, 1161, 1161,  179, 1161,  180, 1161,  909,
+      115,  115, 1161, 1161,  115,  115, 1161, 1161,  341,  182,
+     1161,  115, 1161, 1161, 1161, 1161,  115,  115,  115, 1161,
+      177,  178, 1161, 1161,  179, 1161,  180, 1161, 1161,  115,
+     1161, 1161, 1161, 1161, 1161, 1161,  341,  182,  912,  912,
+      211,  912,  912,  912,  912,  912,  912,  912,  912,  912,
+      912,  912,  912,  912,  912,  914,  912,  915,  915,  915,
+      915,  915,  915,  915,  915,  915,  915,  912,  912,  912,
+      912,  912,  916,  916,  916,  916,  916,  916,  916,  916,
+
+      916,  916,  916,  916,  916,  916,  916,  916,  916,  916,
+      916,  916,  916,  916,  916,  916,  916,  916,  912,  912,
+      916,  916,  916,  916,  916,  916,  916,  916,  916,  916,
+      916,  916,  916,  916,  916,  916,  916,  916,  916,  916,
+      916,  916,  916,  916,  916,  916,  912,  211,  257,  257,
+      257,  257,  257,  257,  257,  257,  257,  257, 1161, 1161,
+     1161, 1161, 1161, 1161,  383,  383,  383,  383,  383,  383,
+      383,  383,  383,  383,  374,  374,  211,  374,  374,  374,
+      374,  374,  374,  374,  374,  374,  374,  374,  374,  374,
+      374,  384,  374,  385,  385,  385,  385,  385,  385,  385,
+
+      385,  385,  385,  374,  374,  374,  374,  374,  386,  386,
+      386,  386,  386,  386,  386,  386,  386,  386,  386,  386,
+      386,  386,  386,  386,  386,  386,  386,  386,  386,  386,
+      386,  386,  386,  386,  374,  374,  386,  386,  386,  386,
+      386,  386,  386,  386,  386,  386,  386,  386,  386,  386,
+      386,  386,  386,  386,  386,  386,  386,  386,  386,  386,
+      386,  386,  374,  115, 1161,  917, 1161,  115,  115,  918,
+      115,  115,  115,  919,  115, 1161,  115, 1161,  920,  115,
+     1161, 1161,  115, 1161,  115, 1161,  115, 1161, 1161, 1161,
+      115, 1161,  115,  115,  917, 1161,  115,  115,  918,  115,
+
+      115,  115,  919,  115,  922,  115, 1161,  920,  115,  115,
+      115,  115,  115, 1161,  115,  921,  115, 1161,  115, 1161,
+      115,  115, 1161,  115, 1161,  115, 1161,  115, 1161, 1161,
+      115,  115,  115,  922,  923, 1161,  115, 1161,  115,  115,
+      115,  927, 1161, 1161,  921,  115,  115, 1161,  928,  115,
+      115,  115,  115, 1161,  115, 1161,  115,  115,  115, 1161,
+      115,  115,  923,  115, 1161,  115, 1161,  115,  115,  927,
+     1161,  115,  115, 1161,  115, 1161,  928,  115,  115, 1161,
+      930,  115,  115,  115, 1161, 1161,  115, 1161,  115, 1161,
+     1161,  938,  115, 1161,  939, 1161, 1161,  115, 1161,  115,
+
+     1161,  115,  115, 1161,  115, 1161,  115, 1161,  930,  115,
+      115, 1161,  115,  115, 1161,  941, 1161,  115,  115,  938,
+     1161,  940,  939,  115, 1161, 1161, 1161, 1161, 1161,  115,
+      115, 1161,  115,  115,  115,  115, 1161, 1161,  115, 1161,
+      115, 1161,  115,  942,  941, 1161, 1161,  115,  115,  940,
+     1161,  115, 1161, 1161,  115, 1161, 1161, 1161,  115, 1161,
+      115,  115, 1161,  115,  115,  943,  115, 1161,  115,  115,
+      115,  942,  944,  115, 1161,  115,  115, 1161, 1161, 1161,
+      115,  945,  115, 1161, 1161, 1161, 1161,  115, 1161,  115,
+      115,  115, 1161,  115,  943,  115,  115,  115,  115,  115,
+
+     1161,  944,  115, 1161,  115, 1161,  951, 1161,  115,  945,
+      952, 1161,  115,  115,  115,  115,  115,  115,  115,  115,
+      115,  115,  115, 1161, 1161,  115, 1161,  115, 1161, 1161,
+     1161, 1161,  115,  115,  951,  115,  115, 1161,  952, 1161,
+      115,  115,  115,  115,  953,  115, 1161,  115,  115, 1161,
+      115, 1161,  115,  115, 1161,  115, 1161,  115,  115,  115,
+      115,  115, 1161,  115,  115,  115, 1161, 1161, 1161, 1161,
+      115,  115,  956,  953, 1161, 1161,  955, 1161,  115,  115,
+     1161,  115,  115,  115,  115, 1161,  115,  115,  115, 1161,
+      115,  115, 1161,  115, 1161,  115,  115, 1161,  115,  115,
+
+      956,  957,  115, 1161,  955, 1161,  115,  115,  115,  115,
+      115,  115, 1161,  115, 1161,  958,  115, 1161, 1161,  115,
+      115,  115,  115,  962,  115,  115,  115,  115,  115,  957,
+      115,  115, 1161, 1161,  115, 1161,  115,  115,  115,  115,
+      115,  115,  115,  969,  958,  115, 1161, 1161,  115,  115,
+     1161,  115,  962,  115, 1161,  960,  115,  115,  115,  115,
+     1161, 1161,  115,  115,  115, 1161,  115,  963,  115,  115,
+      115,  115,  969, 1161, 1161, 1161, 1161,  115,  115, 1161,
+     1161,  115, 1161,  960,  970,  115, 1161, 1161,  115,  115,
+      115,  971, 1161,  115,  115,  115,  963, 1161, 1161, 1161,
+
+      115, 1161, 1161, 1161, 1161, 1161,  115,  211,  115, 1161,
+     1161, 1161,  970,  115, 1161, 1161,  115,  975,  115, 1161,
+      971,  115, 1161,  115,  383,  383,  383,  383,  383,  383,
+      383,  383,  383,  383, 1161,  115,  115,  115, 1161,  115,
+     1161, 1161,  115,  976,  115,  115,  975, 1161,  115, 1161,
+      115, 1161, 1161,  115, 1161, 1161,  115, 1161,  115, 1161,
+     1161, 1161, 1161,  115, 1161,  977,  115,  115,  115,  115,
+      115,  115,  976,  115,  115,  115, 1161,  115,  115, 1161,
+     1161, 1161,  115,  115,  115, 1161,  115, 1161,  115,  978,
+     1161,  979, 1161,  977, 1161,  115, 1161,  115,  115,  115,
+
+     1161,  115, 1161,  115,  115,  115,  115,  115, 1161,  983,
+      115, 1161,  115,  982, 1161, 1161,  115,  978, 1161,  979,
+      115,  115, 1161, 1161,  115,  115,  115,  115,  994,  992,
+      115,  985,  115,  115,  115,  115, 1161, 1161,  983,  115,
+      115,  982, 1161, 1161, 1161, 1161,  115,  115,  115, 1161,
+      115, 1161,  115, 1161, 1161,  115,  115,  994,  992,  115,
+      985,  115,  115,  993,  115,  115,  115, 1161,  115, 1161,
+      115,  115, 1161, 1161,  115,  115, 1161, 1161,  115, 1161,
+     1161, 1161,  115, 1161,  995,  115,  996,  115,  115, 1161,
+     1161,  115,  993,  115,  115,  115,  115, 1161, 1161,  115,
+
+      115,  115,  115, 1161,  997, 1161,  115,  115, 1161, 1161,
+      115,  115,  995,  115,  996, 1161,  115, 1161,  115, 1161,
+      115,  115,  115,  115, 1161,  115, 1161,  115, 1161,  115,
+     1161,  115,  997, 1161, 1161, 1161,  115,  115,  115,  115,
+     1161,  115, 1161,  115,  115, 1004, 1161,  115,  115,  115,
+     1161,  115,  115, 1006, 1161, 1161,  115, 1161,  115,  115,
+     1161, 1161,  115, 1161,  115,  115,  115, 1161,  115,  115,
+      115,  115,  115,  115, 1004,  115, 1161,  115,  115, 1161,
+     1161, 1006, 1161, 1161, 1161,  115,  115, 1007,  115,  115,
+      115, 1161,  115,  115, 1161,  115, 1009,  115, 1161,  115,
+
+      115, 1161, 1161,  115,  115, 1161,  115, 1161,  115,  115,
+     1161,  115, 1161,  115,  115, 1007, 1012,  115, 1161, 1161,
+     1161,  115,  115, 1161, 1161, 1009,  115, 1011,  115,  115,
+     1161, 1161,  115, 1161,  115,  115, 1161,  115,  115,  115,
+      115,  115, 1161,  115, 1012, 1020,  115, 1161,  115, 1019,
+      115, 1161,  115, 1161,  115, 1011,  115,  115,  115, 1161,
+      115,  115, 1161,  115,  115, 1161,  115, 1161,  115,  115,
+      115,  115, 1025,  115, 1020,  115,  115, 1019, 1161, 1161,
+      115,  115,  115, 1161,  115, 1161,  115,  115,  115,  115,
+      115, 1161, 1161,  115, 1161,  115, 1161,  115,  115,  115,
+
+     1025,  115,  115,  115,  115, 1026,  115, 1161,  115,  115,
+     1161, 1161,  115,  115, 1161,  115, 1161, 1161,  115, 1029,
+      115, 1161,  115,  115,  115, 1161, 1030,  115, 1161,  115,
+      115,  115, 1161,  115, 1026,  115, 1161, 1161,  115, 1161,
+      115,  115, 1161,  115,  115,  115,  115, 1029,  115,  115,
+      115,  115, 1161,  115, 1161, 1030, 1038, 1161,  115, 1037,
+      115,  115, 1161,  115,  115, 1161,  115,  115, 1161, 1161,
+      115,  115,  115,  115,  115,  115, 1161, 1161,  115,  115,
+      115, 1161, 1161, 1161, 1038, 1161, 1039, 1037,  115, 1161,
+      115,  115,  115,  115, 1161,  115,  115,  115,  115, 1040,
+
+      115,  115,  115, 1161,  115,  115, 1044, 1161,  115,  115,
+     1161, 1161,  115, 1161, 1039, 1161,  115, 1161, 1161,  115,
+      115, 1161,  115,  115, 1161,  115,  115,  115, 1040,  115,
+     1161,  115, 1161,  115,  115, 1044, 1161,  115,  115,  115,
+      115, 1047,  115, 1161,  115, 1161, 1161,  115, 1161,  115,
+     1161,  115, 1161,  115,  115, 1161,  115, 1048,  115, 1161,
+      115, 1161, 1161, 1161,  115,  115,  115,  115, 1161,  115,
+     1047,  115,  115, 1161, 1161, 1054,  115, 1161, 1161,  115,
+     1059,  115,  115,  115,  115,  115, 1048,  115, 1161,  115,
+      115, 1161, 1161,  115,  115,  115, 1161,  115,  115, 1161,
+
+      115, 1161,  115, 1054,  115,  115, 1161,  115, 1062, 1059,
+      115,  115, 1161, 1161,  115, 1161,  115, 1161, 1161,  115,
+      115, 1161,  115,  115,  115,  115,  115,  115, 1063,  115,
+     1161,  115,  115, 1161, 1161, 1067, 1062, 1161, 1161,  115,
+     1161,  115, 1161,  115,  115, 1161, 1161,  115, 1161,  115,
+     1161,  115,  115,  115,  115, 1068,  115, 1063,  115,  115,
+     1161, 1161, 1161, 1067,  115, 1161,  115,  115,  115,  115,
+      115,  115, 1069,  115, 1073,  115,  115, 1161,  115, 1161,
+     1161,  115, 1161, 1161, 1068, 1161, 1161,  115,  115,  115,
+      115,  115, 1161,  115,  115,  115,  115,  115, 1161,  115,
+
+     1161, 1069,  115, 1073,  115, 1161,  115,  115, 1161,  115,
+     1080, 1161,  115, 1161, 1161,  115,  115,  115, 1161,  115,
+      115,  115, 1161,  115,  115,  115,  115, 1087,  115, 1161,
+     1161, 1161, 1161, 1161, 1088,  115,  115,  115, 1080,  115,
+     1161,  115,  115, 1161,  115,  115,  115, 1161,  115, 1161,
+      115,  115,  115,  115,  115, 1161, 1087,  115,  115, 1091,
+     1161, 1161, 1088,  115, 1161,  115, 1161,  115,  115,  115,
+      115,  115, 1095,  115,  115,  115,  115,  115, 1161, 1161,
+      115, 1161,  115, 1161, 1161, 1161,  115, 1091,  115, 1161,
+      115,  115, 1161,  115,  115,  115,  115, 1161,  115,  115,
+
+      115, 1095, 1106,  115, 1161,  115, 1161, 1161, 1161, 1161,
+      115, 1161, 1161,  115, 1105, 1161,  115,  115,  115, 1161,
+      115, 1108,  115,  115,  115,  115, 1161, 1161,  115,  115,
+     1161, 1106, 1161, 1161, 1161, 1161,  115, 1161,  115, 1161,
+      115,  115, 1105,  115, 1112,  115,  115,  115, 1161,  115,
+     1108,  115,  115,  115,  115, 1161, 1161, 1161,  115,  115,
+     1161, 1122, 1161, 1161,  115, 1161,  115, 1161,  115,  115,
+     1161,  115, 1112, 1161,  115, 1161,  115, 1161,  115, 1161,
+     1161,  115, 1161,  115, 1161, 1161, 1161,  115, 1161, 1122,
+     1161, 1161, 1161, 1161,  115, 1161,  115, 1124,  948, 1124,
+
+     1161, 1161, 1125, 1125, 1161, 1125, 1161, 1161, 1161, 1125,
+     1125, 1161, 1161, 1125, 1161, 1161, 1125, 1125, 1125, 1125,
+     1125, 1125, 1125, 1125, 1125,  115,  115, 1161, 1161, 1161,
+      115,  115, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1133,
+     1161, 1161, 1128, 1161,  115,  115, 1161, 1161, 1161, 1161,
+     1161, 1161, 1161, 1161,  115,  115, 1161, 1161, 1161,  115,
+      115, 1161, 1161, 1161, 1161, 1161, 1161, 1133, 1161, 1161,
+     1128, 1161,  115,  115,  947,  948,  947, 1161, 1161, 1134,
+     1134, 1161, 1135, 1161,  115,  950, 1134, 1134, 1137,  115,
+     1134, 1161, 1161, 1134, 1134, 1134, 1134, 1134, 1134, 1134,
+
+     1134, 1134, 1161,  115,  115,  115, 1161, 1161, 1161,  115,
+      115, 1161, 1161,  115, 1161, 1161, 1161, 1137,  115, 1161,
+     1161, 1161, 1161,  115,  115, 1161, 1161, 1161, 1161, 1161,
+     1161,  115, 1161,  115,  115, 1161, 1161, 1161,  115,  115,
+     1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161,
+     1161,  115,  115,   64,   64,   64,   64,   64,   64,   64,
+       64,   64,   64,   64,   64,   65,   65,   65,   65,   65,
+       65,   65,   65,   65,   65,   65,   65,   81,   81, 1161,
+       81,   81,   81,   81,   81,   81,   81,   81,   81,   84,
+       84, 1161,   84,   84,   84,   84,   84,   84,   84,   84,
+
+       84,   88,   88,   88,   88,   88,   88,   88,   88,   88,
+       88,   88,   88,   92,   92,   92,   92,   92,   92,   92,
+       92,   92,   92,   92,   92,  111,  111,  115,  115,  115,
+      115,  115,  115,  115,  115,  187,  187,  187,  187,  187,
+      187,  187,  187,  187,  187,  187,  187,  202,  202,  202,
+      202,  202,  202,  202,  202,  202,  202,  202,  202,  209,
+      209,  209,  209,  209,  209, 1161,  209,  209,  209, 1161,
+      209,  232,  232,  232,  232,  232,  232,  232,  232,  232,
+      232,  232,  232,  101, 1161, 1161,  101,  252,  252,  252,
+     1161, 1161,  252, 1161,  252,  252, 1161,  252,  252,  343,
+
+      343,  343,  343,  343,  343,  343,  343,  343,  343,  343,
+      343,  358,  358, 1161,  358,  358,  358,  358,  358,  358,
+      358,  358,  358,  371,  371,  371,  371,  371,  371, 1161,
+      371,  371,  371, 1161,  371,  374,  374,  374,  374,  374,
+      374,  374,  374,  374,  374,  374,  374,  379,  379,  379,
+      379,  379,  379,  379,  379,  379,  379,  379,  379,  422,
+     1161, 1161,  422,  276, 1161, 1161, 1161,  276, 1161, 1161,
+     1161, 1161, 1161,  276,  558,  558,  558,  558,  558,  558,
+      558,  558,  558,  558,  558,  558,  718,  718, 1161,  718,
+      718,  718,  718,  718,  718,  718,  718,  718,  721,  721,
+
+     1161,  721,  721,  721,  721,  721,  721,  721,  721,  721,
+      723,  723, 1161,  723,  723,  723,  723,  723,  723,  723,
+      723,  723,   88,   88,   88,   88,   88,   88,   88,   88,
+       88,   88,   88,   88,  726,  726,  726,  726,  726,  726,
+      726,  726,  726,  726,  726,  726,   92,   92,   92,   92,
+       92,   92,   92,   92,   92,   92,   92,   92,  728,  728,
+      728,  728,  728,  728,  728,  728,  728,  728,  728,  728,
+      812,  812,  812,  812,  812,  812,  812,  812,  812,  812,
+      812,  812,  814,  814, 1161,  814,  814,  814,  814,  814,
+      814,  814,  814,  814,  823,  823,  823,  823,  823,  823,
+
+      823,  823,  823,  823,  823,  823,  825,  825,  825,  825,
+      825,  825,  825,  825,  825,  825,  825,  825,  831,  831,
+     1161,  831,  831,  831,  831,  831,  831,  831,  831,  831,
+      834,  834, 1161,  834,  834,  834,  834,  834,  834,  834,
+      834,  834,   81,   81, 1161,   81,   81,   81,   81,   81,
+       81,   81,   81,   81,  835,  835, 1161,  835,  835,  835,
+      835,  835,  835,  835,  835,  835,   84,   84, 1161,   84,
+       84,   84,   84,   84,   84,   84,   84,   84,  837,  837,
+      837,  837,  837,  837,  837,  837,  837,  837,  837,  837,
+       88,   88,   88,   88,   88,   88,   88,   88,   88,   88,
+
+       88,   88,  838,  838,  838,  838,  838,  838,  838,  838,
+      838,  838,  838,  838,   92,   92,   92,   92,   92,   92,
+       92,   92,   92,   92,   92,   92,  187,  187,  187,  187,
+      187,  187,  187,  187,  187,  187,  187,  187,  904,  904,
+      904,  904,  904,  904,  904,  904,  904,  904,  904,  904,
+      358,  358, 1161,  358,  358,  358,  358,  358,  358,  358,
+      358,  358,  814,  814, 1161,  814,  814,  814,  814,  814,
+      814,  814,  814,  814,  202,  202,  202,  202,  202,  202,
+      202,  202,  202,  202,  202,  202,  912,  912,  912,  912,
+      912,  912,  912,  912,  912,  912,  912,  912,  374,  374,
+
+      374,  374,  374,  374,  374,  374,  374,  374,  374,  374,
+      379,  379,  379,  379,  379,  379,  379,  379,  379,  379,
+      379,  379,  825,  825,  825,  825,  825,  825,  825,  825,
+      825,  825,  825,  825,  946,  946,  946,  946,  946,  946,
+      946,  946,  946,  946,  946,  946,  999,  999,  999,  999,
+      999,  999,  999,  999,  999,  999,  999,  999,   13, 1161,
+     1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161,
+     1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161,
+     1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161,
+     1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161,
+
+     1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161,
+     1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161,
+     1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161,
+     1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161,
+     1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161
+    } ;
+
+static yyconst flex_int16_t yy_chk[9249] =
+    {   0,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    2,
+        2,    2,    2,   10,    8,    8,    8,    8,   15,   15,
+
+       15,   68, 1129,   14,   10, 1119,   68,    2,    2,    2,
+        2,    2,    2,    2,    2,    2,    2,   14,   16,   16,
+       16,   54,   54,   54,    2,    2,   18,   10,    2,   19,
+        2,    8,   14,   17,   17,   17,   15,   20,   21, 1096,
+       18,    2,    2,  176,   22,   14, 1084,   25,   26,  176,
+       15,   20,   21,    2,    2,   18,   10,    2,   75,    2,
+        8,   25,   42,   19,   69,   15,   20,   21,   18,    2,
+        2,   17,   24,   27,   26,   23,   25,   19,   15,   20,
+       21,   22,   23,   23,   29,   17,   75,   27,   26,   25,
+     1045,   42,   19,   24,  959,   22,   30,  339,   74,  339,
+
+       17,   82,   27,   26,  340,   19,  340,   24,   83,   69,
+       22,   29,   23,   17,   31,   27,   26,   32,   30,   34,
+       41,  178,   24,   22,  916,   29,   23,   74,   31,  912,
+       82,   32,   30,   34,   41,   24,   83,   69,   49,  685,
+       29,   23,   49,   31,  905,  685,   32,   30,   34,   41,
+      178,  207,   33,   29,   23,   28,   31,   28,   33,   32,
+       30,   34,   41,   76,   76,   76,  242,   49,   67,   67,
+       67,   49,   33,   28,   28,   28,   28,   28,   28,   28,
+       28,   28,   28,   86,   43,   63,  207,   33,   28,   43,
+       44,  350,   28,   28,   28,  242,   43,   43,  904,   28,
+
+       33,   28,   28,   63,   44,   67,   91,   28,   77,   77,
+       77,   28,   86,   43,   63,  207,  837,   28,   43,   44,
+      350,   28,   28,   28,   43,   43,   87,   28,  360,   28,
+       28,   63,   44,  835,   67,   28,   78,   78,   78,   28,
+       35,   86,   35,   35,   35,   35,   35,   35,   35,   35,
+       35,   35,   38,   40,  830,   91,   38,  360,   35,   35,
+       38,   40,   35,  903,   40,  102,   38,   40,   35,  103,
+       38,  107,   87,   40,   90,   35,   35,   79,   79,   79,
+      825,   38,   40,   91,  342,   38,  342,   35,   35,   38,
+       40,   35,   40,  102,   38,   40,   35,  103,   38,  107,
+
+       87,   40,  108,   35,   35,   36,   90,   36,   36,   36,
+       36,   36,   36,   36,   36,   36,   36,  179,   37,  359,
+       39,  359,   36,  903,  823,   37,   45,   36,  822,   37,
+      108,   39,   37,   39,   45,   90,   39,   39,   46,  205,
+       45,   36,   37,   39,  812,  179,   46,   37,  393,   39,
+      180,   36,   46,  182,   37,   45,   36,   37,   46,   39,
+       37,   39,   48,   45,   39,   39,   51,   46,   45,   36,
+       37,   39,   47,   51,  811,   46,   48,  393,  180,   48,
+       46,  182,   48,   51,  205,   47,   46,   47,  104,   50,
+      220,   48,   47,   50,  529,   51,  529,   50,  396,   52,
+
+      450,   47,   51,  104,   48,   50,   52,   48,   50,   50,
+       48,   51,  205,   47,  532,   47,   52,  104,   50,  804,
+       47,  220,   50,   80,   80,   80,   50,  396,   52,  450,
+      530,  104,  530,   50,   92,   52,   50,   50,   55,   55,
+       55,   92,   92,  532,   52,   53,   53,   53,   53,  220,
+       56,  223,  531,   53,  531,   56,   55,   55,   55,   55,
+       55,   55,   55,   55,   55,   55,  184,  184,  184,   94,
+       70,   70,   70,   71,   71,   71,   94,   94,   60,  223,
+       53,   53,   70,   53,   53,   71,   53,   56,  726,   60,
+      106,  191,   60,  686,   93,   93,   93,   53,   53,  686,
+
+      106,   56,   93,   93,  181,   70,  725,   60,   71,   53,
+       53,  181,   53,   53,  723,   53,   56,   60,  722,  106,
+       60,   72,   72,   72,  910,   53,   53,  214,  106,   56,
+       57,   58,  181,   72,   70,   96,   57,   71,  222,  181,
+      191,  716,   96,   96,   57,  189,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57,   59,  222,   58,   72,
+       59,  208,  208,  208,   59,   58,   57,   96,  191,   58,
+       59,  190,   58,   72,   59,  714,  214,  189,   61,  206,
+       57,  706,   58,   61,  910,   59,  222,   58,   72,   59,
+       61,   61,   62,   59,   58,   57,   96,   58,   59,   62,
+
+       58,   72,   59,  190,  214,  224,  189,   61,   57,   62,
+       58,  206,   61,  210,  210,  210,   62,  689,   61,   61,
+      664,   62,  225,  225,  225,  585,  580,  232,   62,  578,
+      558,  235,  190,  224,  232,  232,  554,   62,  235,  235,
+      206,  372,  372,  372,   62,   73,   73,   73,   73,   73,
+       73,   73,   73,   73,   73,   73,   73,   73,   73,   73,
+       73,   73,   73,   73,   73,   73,   73,   73,   73,   73,
+       73,   73,   73,   73,   73,   73,   73,   73,   73,   73,
+       73,   73,   73,   73,   73,   73,   73,   73,   73,   73,
+       73,   73,   73,   73,   73,   73,   73,   73,   73,   73,
+
+       73,   73,   73,   73,   73,   73,   73,   73,   73,   73,
+       73,   73,   73,   73,   73,   73,   73,   73,   73,   73,
+       73,   73,   73,   73,   73,   73,   73,   73,   73,   73,
+       73,   73,   73,   73,   97,  101,  101,  105,  204,  204,
+      204,   97,   97,  226,  538,  227,  213,  675,  101,  675,
+      534,  111,  105,  111,  111,  111,  111,  111,  111,  111,
+      111,  111,  111,  421,  101,  101,  105,  375,  375,  375,
+      419,  226,  173,  227,  173,  204,  101,  114,  213,  534,
+      105,  219,  412,   97,  113,  113,  113,  113,  113,  113,
+      113,  113,  113,  113,  114,  228,  115,  118,  219,  114,
+
+      116,  115,  118,  125,  204,  116,  410,  213,  125,  231,
+      173,   97,  100,  114,  100,  115,  118,  229,  116,  116,
+      386,  221,  125,  114,  173,  115,  118,  219,  114,  116,
+      115,  118,  125,  379,  116,  228,  249,  125,  230,  173,
+      374,  114,  251,  115,  118,  100,  116,  116,  117,  100,
+      125,  100,  173,  117,  243,  221,  100,  276,  100,  100,
+      248,  231,  117,  228,  249,  401,  229,  117,  100,  294,
+      251,  294,  401,  401,  100,  371,  343,  117,  100,  294,
+      100,  230,  117,  221,  100,  276,  100,  100,  535,  231,
+      117,  250,  243,  248,  229,  117,  100,  110,  110,  110,
+
+      110,  110,  110,  110,  110,  110,  110,  119,  121,  230,
+      913,  247,  119,  121,  120,  110,  110,  535,  119,  120,
+      243,  248,  120,  246,  400,  121,  119,  121,  110,  245,
+      233,  233,  233,  120,  341,  277,  119,  121,  233,  233,
+      344,  119,  121,  120,  110,  110,  119,  122,  120,  122,
+      244,  120,  122,  121,  119,  121,  110,  177,  123,  218,
+      400,  120,  341,  123,  212,  345,  122,  346,  344,  354,
+      913,  177,  277,  347,  209,  123,  122,  123,  122,  124,
+      202,  122,  348,  126,  124,  187,  177,  123,  126,  400,
+      124,  349,  123,  345,  122,  346,  183,  126,  124,  177,
+
+      277,  347,  126,  123,  676,  123,  676,  354,  124,  127,
+      348,  175,  126,  124,  127,  174,  237,  126,  124,  349,
+       89,  127,  127,  237,  237,  126,  124,  127,  127,  128,
+      126,  128,  129,  389,  128,  130,  354,  129,  127,  292,
+      130,  292,  361,  127,  234,  234,  234,  130,  128,  127,
+      127,  129,  234,  234,  130,  127,  127,  536,  128,  237,
+      128,  129,   88,  128,  130,  388,  129,   84,  389,  130,
+      361,  380,  380,  380,  356,  130,  128,   65,   13,  129,
+      378,  238,  130,  131,  355,  131,  536,  237,  238,  238,
+      369,  292, 1051,  388,  390,  133,  389,  392,    9,  131,
+
+      133,  131,  131,  131,  131,  131,  131,  131,  131,  131,
+      131,  132, 1081,  133,  133,  134,  132,    7,  134,  292,
+      134,  388,  132,  398,  133,  392,  356,  355,  369,  133,
+      132,  390,  378,  238,  134,  677,  131,  677,  131, 1130,
+      132,  133,  133,  381,  134,  132,  136,  134,  135,  134,
+      132,  136, 1051,  135,  356,  355,  398,  369,  132,  390,
+      378,  238,  134,  136,  131,  136,  131,  135,  135,  139,
+      377,  137, 1081,  138,  139,  136,  137,  135,  138,  137,
+      136,  381,  135,  139,  138,  398,  137,  395,  139,    0,
+      137,  136,  138,  136,  418,  135,  135,  397,  139, 1130,
+
+      137,  382,  138,  139,  140,  137,  475,  138,  137,  140,
+      381,  139,  138,  377,  137,  395,  139,  142,  137,  142,
+      138,  140,  418,  140,  141,  399,  143,  144,  143,  141,
+     1131,  537,  144,  140,  475,    0,  143,  141,  140,  391,
+      533,  377,  144,  141,  397,  382,  144,    0,  543,  140,
+      142,  140,  466,  141,  466,  142,  144,  146,  141,  143,
+      537,  144,  146,  146,  143,  141,    0,  391,  533,  142,
+      144,  141,  397,  382,  144,  399,  146,    0,  143,  142,
+      145,    0,  145,  466,  142,  145,  146,  680,  143,  680,
+     1131,  146,  146,  143,  145,  391,  145,  142,  543,  145,
+
+      147,    0,  148,  399,  146,  147,  143,  148,  557,  145,
+      484,  145,  484,  546,  145,  148,  394,  394,  394,  147,
+      484,  148,  145,  147,  145,  149,  543,  145,  149,  147,
+      149,  148,  572,  150,  147, 1148,  148,  151,  150,    0,
+        0,  546,  151,  148,  149,  150,  547,  147,    0,  148,
+      151,  147,  150,  557,  149,    0,  151,  149,    0,  149,
+      544,  572,  150,  152,  153,    0,  151,  150,  152,  153,
+        0,  151,  149,  150,  547,  153,  152,  488,  151,  488,
+      150,  557,  152,  153,  151,    0,  155,  488,    0,  154,
+      155,  155,  152,  153,  154, 1148,  544,  152,  153,  521,
+
+      154,  521,    0,  153,  152,  155,  611,    0,  154,  521,
+      152,  153,  156,  253,  253,  155,  158,  156,  154,  155,
+      155,  158,  402,  154,  158,  544,  253,    0,  154,  402,
+      402,  156,  157,  155,  611,  158,  154,  157,  559,  559,
+      559,  156,  253,  253,    0,  158,  156,  612,    0,  157,
+      158,  157,  157,  158,  253,  160,  160,  159,    0,  156,
+      160,  157,  159,  158,  614,  159,  157,  370,  370,  370,
+      615,  159,  402,  561,  160,  612,  159,  157,    0,  157,
+      157,  194,  162,  194,  160,  160,  159,  162,  161,  160,
+      161,  159,  614,  161,  159,  556,  556,  556,  615,  159,
+
+      402,  162,  160,  162,  159,    0,  161,  161,  370,  542,
+      161,  162,  575,  163,  194,  564,  162,  161,  163,  161,
+      164,  555,  161,  561,  163,  164,  164,  563,  194,  162,
+        0,  162,  163,  164,  161,  161,  556,  370,  161,  164,
+      165,  575,  163,  194,  568,  165,  692,  163,  692,  164,
+      617,  561,  163,  562,  164,  164,  194,  165,  542,  165,
+      163,  164,  564,  166,  403,  556,  682,  164,  166,  165,
+      555,  403,  403,  577,  165,  569,  563,  166,  617,  568,
+      166,    0,  166,  167,  167,  165,  542,  165,  167,  562,
+      564,  697,  166,  697,  682,  167,  569,  166,  555,  744,
+
+      403,    0,  167,  570,  563,  166,  577,  568,  166,  168,
+      166,  579,  167,  167,  168,  169,    0,  167,  562,  169,
+      169,    0,  168,  167,  570,  569,  168,  744,  168,  403,
+      167,  571,  170,    0,  169,  577,  753,  170,  168,    0,
+      170,  171,    0,  168,  169,  171,  171,  579,  169,  169,
+      168,  170,  571,  570,  168,    0,  168,  574,  574,  574,
+      171,  170,  169,  172,  753,  581,  170,  604,  172,  170,
+      171,  172,  581,  581,  171,  171,  579,  582,  613,  170,
+      618,  571,  172,  687,  582,  582,    0,    0,  171,  678,
+        0,  678,  172,  185,  185,  185,  604,  172,  756,  678,
+
+      172,  581,  679,  635,  815,  635,  815,  613,  757,  618,
+      172,  185,  185,  185,  185,  185,  185,  185,  185,  185,
+      185,  186,  681,  687,    0,  678,  756,  186,  713,    0,
+      581,  679,  691,  608,  635,  608,  757,  186,  186,  186,
+      186,  186,  186,  186,  186,  186,  186,  192,  683,  713,
+      683,  681,  687,  192,  678,  684,  684,  684,  683,    0,
+      703,  691,  683,  192,  192,  192,  192,  192,  192,  192,
+      192,  192,  192,  193,  608,  215,  215,  215,  713,  193,
+      708,  708,  708,  748,  826,  826,  826,  193,  608,  193,
+      193,  193,  193,  193,  193,  193,  193,  193,  193,  195,
+
+      703,  196,  197,  608,  195,  749,  196,  197,  215,    0,
+      195,  616,  748,  196,  196,  688,  608,  195,  195,  196,
+      196,  197,  215,  832,  832,  832,  704,  616,  195,  703,
+      196,  197,  707,  195,  749,  196,  197,  215,  195,  198,
+      616,  196,  196,    0,  198,  195,  195,  196,  196,  197,
+      215,  688,  702,  198,  702,  616,  200,    0,  198,  201,
+      199,  200,  199,  201,  201,  199,  702,  755,  198,  758,
+        0,  200,  707,  198,  199,  200,  199,  704,  201,  199,
+      688,  198,  759,  807,    0,  200,  198,    0,  201,  199,
+      200,  199,  201,  201,  199,  216,  755,    0,  758,  200,
+
+        0,  707,  199,  200,  199,  704,  201,  199,    0,    0,
+      759,  807,  216,  216,  216,  216,  216,  216,  216,  216,
+      216,  216,  217,  217,  217,  217,  217,  217,  217,  217,
+      217,  217,  217,  217,  217,  217,  217,  217,  217,  217,
+      217,  217,  217,  217,  217,  217,  217,  217,  217,  217,
+      217,  217,  217,  217,  217,  217,  217,  217,  217,  217,
+      217,  217,  217,  217,  217,  217,  217,  217,  217,  217,
+      217,  217,  217,  217,  217,  217,  217,  217,  217,  217,
+      217,  217,  217,  217,  217,  217,  217,  217,  217,  217,
+      217,  217,  217,  217,  217,  217,  217,  217,  217,  217,
+
+      217,  217,  217,  217,  217,  217,  217,  217,  217,  217,
+      217,  239,    0,  239,  860,  760,  239,  239,  239,  239,
+      239,  239,  239,  239,  239,  239,  240,    0,  240,  863,
+      805,  240,  240,  240,  240,  240,  240,  240,  240,  240,
+      240,  241,  860,  241,  760,  806,  241,  241,  241,  241,
+      241,  241,  241,  241,  241,  241,  254,  863,  254,  805,
+        0,  254,  254,  254,  254,  254,  254,  254,  254,  254,
+      254,  255,    0,  255,  806,    0,  255,  255,  255,  255,
+      255,  255,  255,  255,  255,  255,  256,  808,  256,  259,
+      865,  256,  256,  256,  256,  256,  256,  256,  256,  256,
+
+      256,  257,  257,  257,  257,  257,  257,  257,  257,  257,
+      257,    0,  259,  769,  260,  769,  808,  259,  865,  260,
+      257,  258,  258,  258,  258,  258,  258,  258,  258,  258,
+      258,  259,  260,  260,  261,  813,  901,  262,  901,  261,
+      258,  259,  262,  260,  769,  261,  259,  727,  260,  257,
+      908,  262,  908,  261,  727,  727,  262,  263,  705,  259,
+      260,  260,  263,  261,  813,  693,  262,  693,  261,  258,
+      263,  262,    0,  261,    0,  693,  263,  264,  266,  262,
+      265,  261,  264,  266,  262,  265,  263,  803,  266,  803,
+      264,  263,    0,    0,  705,  803,  264,  266,  263,  265,
+
+      265,  693,  851,  268,  263,  810,  264,  266,  268,  265,
+      267,  264,  266,    0,  265,  267,  266,    0,  264,    0,
+      268,  267,  268,  705,  264,  266,    0,  265,  265,  267,
+      693,  851,  268,  269,    0,  271,  821,  268,  269,  267,
+      271,  270,  810,    0,  267,  700,  270,  700,  268,  267,
+      268,  269,  269,  270,  271,  700,  270,  267,  272,  700,
+      270,    0,  269,  272,  271,  272,  728,  269,    0,  271,
+      270,  810,  821,  728,  728,  270,    0,  272,  273,  269,
+      269,  270,  271,  273,  270,  274,    0,  272,  270,  273,
+      274,  729,  272,  794,  272,  794,  274,  273,  729,  729,
+
+        0,  821,    0,  794,  274,  272,    0,  273,  278,  278,
+      857,  275,  273,  278,  274,  275,  275,  273,  900,  274,
+      859,  809,  809,  809,  274,  273,  820,  278,  279,  809,
+      275,  280,  274,  279,  824,  279,  280,  278,  278,  857,
+      275,  284,  278,  284,  275,  275,  900,  279,  281,  859,
+      280,  861,  281,  281,    0,  278,  862,  279,  275,  864,
+      280,  925,  279,  820,  279,  280,    0,  281,  283,    0,
+        0,  824,  284,  283,  284,  279,  283,  281,  280,  284,
+      861,  281,  281,  838,  875,  862,  875,  283,  864,  925,
+      838,  838,  820,  284,  875,  281,  282,  283,  282,  285,
+
+      824,  894,  283,  284,  285,  283,  286,  899,  284,  422,
+      422,  286,  839,  902,  893,  283,  893,  285,  285,  839,
+      839,  284,  422,    0,  893,  286,    0,  282,  285,  282,
+      894,  911,  282,  285,  282,  286,  899,  282,  422,  422,
+      286,  282,  902,    0,  282,  285,  285,  282,  282,  289,
+      422,  282,  287,  286,  289,  288,  287,  287,  282,  288,
+      288,  282,  934,  282,  937,  884,  282,  884,  289,  282,
+        0,  287,  282,    0,  288,  282,  282,  926,  289,  282,
+      911,  287,  290,  289,  288,  287,  287,  290,  288,  288,
+      291,  934,  291,  937,  290,  291,  289,  929,  293,  287,
+
+      931,  290,  288,  293,  896,  926,  896,  932,  911,  291,
+        0,  290,  293,  884,    0,  296,  290,  293,  933,  291,
+      296,  291,  290,  935,  291,  929,  296,  293,  931,  290,
+      961,  297,  293,    0,  296,  932,  297,  291,  298,  896,
+      293,  884,  297,  298,  296,  293,  933,    0,  954,  296,
+      297,  935,    0,  964,  296,    0,    0,  298,  298,  961,
+      297,  299,  296,    0,    0,  297,  299,  298,  896,  965,
+      297,  980,  298,  948,  948,  948,  954,  966,  297,  972,
+      299,  299,  964,  300,  301,  298,  298,  300,  300,  301,
+      299,  302,  301,  302,  303,  299,  303,  965,  967,  980,
+
+      300,  302,  300,  301,  303,  968,  966,  968,  299,  299,
+        0,    0,  300,  301,  989,  972,  300,  300,  301,  990,
+      304,  301,  973,  981,  302,  304,  984,  303,  300,  302,
+      300,  301,  303,  967,  968,  302,  968,    0,  303,  304,
+      304,  986,  989,  302,  972,  302,  303,  990,  303,  304,
+     1005,    0,  981,  302,  304,  984,  303,    0,  302,  973,
+      305,  303,  967,  302,  305,  305,  303,  304,  304,  987,
+      986,  302,  306,  302,  303,  988,  303,  306, 1005,  305,
+      307,  308, 1008, 1016,  307,  307,  308,    0,  973,  305,
+     1010,  306,  308,  305,  305,    0,    0,  309,  987,  307,
+
+      308,  306,  309, 1015,  988,    0,  306,  305,    0,  307,
+      308, 1008, 1013,  307,  307,  308,  309,  310, 1010,  306,
+      308,  309,  310,  998,  998,  998,  309,  307,  308, 1016,
+      310,  309, 1015,  311,  312,    0,  310,  313,  311,  312,
+     1013,  311,  313,  852,  309,  852,  310, 1017,    0,  309,
+        0,  310,  311,  312,  314,    0,  313, 1016,  310,  314,
+     1018,    0,  311,  312,  310, 1028,  313,  311,  312, 1027,
+      311,  313,  314,  314,  315,    0, 1017,  316,  852,  315,
+      311,  312,  316,  314,  313, 1022, 1032,  315,  314, 1018,
+      316,  852, 1034,  315, 1028,    0,  316, 1027,  316, 1036,
+
+      314,  314, 1021,  315,  317, 1023,  316,  852,  315,  317,
+      317,  316,    0,    0, 1032,  315, 1043, 1022,  316,  852,
+     1034,  315, 1049,  317,  316,  318,  316, 1036,    0,  319,
+      318,    0,  319,  317,  319,    0,  318,  320,  317,  317,
+      319, 1023,  320,    0,  318, 1043, 1022, 1021,  319, 1046,
+     1049,  317,    0, 1024,  318, 1053,  320,  320,  319,  318,
+      321,  319,  322,  319,  318,  321,  320,  322,  319,  323,
+     1023,  320,  318, 1052,  323, 1021,  319,  323, 1046,  321,
+      321,  322,  322, 1053,  320,  320,    0,    0,  323,  321,
+        0,  322,  326, 1024,  321,  324,  322,  326,  323,  324,
+
+      324,    0, 1052,  323, 1060,  326,  323,  321,  321,  322,
+      322,  326,  328,    0,  324,  325,  323,  328,  327,  325,
+      325,  326, 1024,  327,  324,  327,  326, 1061,  324,  324,
+     1058,  328, 1060,  326,  325,    0, 1055,  327,  329,  326,
+        0,  328,  324,  329,  325,  330,  328,  327,  325,  325,
+      330, 1057,  327,  332,  327,  332, 1061,  329,    0,  328,
+      330,  331,  325,  332,  330,  327,  331,  329, 1041, 1041,
+     1041, 1055,  329,    0,  330, 1058, 1064,    0,  331,  330,
+      331, 1066,  333, 1056, 1057,  329,  332,  333,  330,  333,
+      331,  332,  330,  334, 1072,  331,    0, 1074,  334,  334,
+
+     1055,  333,  336, 1058, 1064,  332,  331,  336,  331, 1076,
+     1066,  333,  334, 1057,  336,  332,  333, 1056,  333,  335,
+      332,  336,  334, 1072,  335, 1074, 1078,  334,  334,  333,
+        0,  336,  335,  332,    0,    0,  336, 1076,  335,  337,
+      334, 1085,  336,    0,  337,  338, 1056, 1094,  335,  336,
+      338,    0,  974,  335, 1078, 1086,  337, 1090,  337, 1083,
+      335,  876,  876,  876,  338,    0,  335,    0,  337,  876,
+     1085, 1082,  876,  337,  338,  351, 1094,  351,    0,  338,
+      946,  946,  946, 1086,  337, 1090,  337,  974,  946,  974,
+        0,  946,  338,  351,  351,  351,  351,  351,  351,  351,
+
+      351,  351,  351,  352,  947,  947,  947, 1082,    0,  352,
+        0, 1083,  947,    0, 1077,  947,  974,    0,  974,  352,
+      352,  352,  352,  352,  352,  352,  352,  352,  352,  353,
+      949,  949,  949,    0,    0,  353, 1082, 1098,  949, 1083,
+        0,  949, 1070, 1070, 1070,  353,  353,  353,  353,  353,
+      353,  353,  353,  353,  353,  357, 1092, 1092, 1092, 1077,
+     1099,  357,  362,  363,    0,  364,  362,  362,  363,  357,
+      364,  357,  357,  357,  357,  357,  357,  357,  357,  357,
+      357,  362,  363, 1098,  364,  365,  365, 1077, 1099, 1103,
+      365,  362,  363,  368,  364,  362,  362,  363, 1104,  364,
+
+        0,  366,    0,    0,  365,  366,  366,    0,    0,  362,
+      363, 1098,  364, 1111,  365,  365, 1107, 1103,  366,  365,
+      366,  367,    0,  433,  368,  367,  367, 1104,  433,  368,
+      366, 1100,  365,    0,  366,  366,  950,  950,  950, 1113,
+      367, 1111,  433,  368,  950, 1107,  366,  950,  366,    0,
+      367, 1116,  433,  368,  367,  367,  383,  433,  368,    0,
+        0,  999,  999,  999,    0,    0, 1100, 1113,  367,  999,
+      433,  368,  999,  383,  383,  383,  383,  383,  383,  383,
+      383,  383,  383,  384,    0, 1000, 1000, 1000, 1101, 1101,
+     1101,    0,  383, 1000, 1121, 1100, 1000, 1116, 1127,    0,
+
+      384,  384,  384,  384,  384,  384,  384,  384,  384,  384,
+      387,    0, 1001, 1001, 1001, 1117, 1117, 1117, 1136,  384,
+     1001,  383, 1121, 1001,    0, 1116, 1127,  387,  387,  387,
+      387,  387,  387,  387,  387,  387,  387,  404,  404,  404,
+      404,  404,  404,  404,  404,  404,  404, 1136,  384,  405,
+      405,  405,  405,  405,  405,  405,  405,  405,  405,  406,
+      406,  406,  406,  406,  406,  406,  406,  406,  406,  407,
+      407,  407,  407,  407,  407,  407,  407,  407,  407,  408,
+      408,  408,  408,  408,  408,  408,  408,  408,  408,  409,
+      409,  409,  409,  409,  409,  409,  409,  409,  409,  423,
+
+      423,  423,  423,  423,  423,  423,  423,  423,  423,  424,
+      424,  424,  424,  424,  424,  424,  424,  424,  424,  425,
+      425,  425,  425,  425,  425,  425,  425,  425,  425,  426,
+      426,  426,  426,  426,  426,  426,  426,  426,  426,  427,
+      427,  427,  427,  427,  427,  427,  427,  427,  427,  428,
+      428,  428,  428,  428,  428,  428,  428,  428,  428,  429,
+     1102,  429,    0,    0,  429,  429,  429,  429,  429,  429,
+      429,  429,  429,  429,  430,  430,  430,  430,  430,  430,
+      430,  430,  430,  430,    0,  436,    0,  434,    0,  431,
+      436,  431,  434,  430,  431,  431,  431,  431,  431,  431,
+
+      431,  431,  431,  431,  436,  434,  434,  435,  437,  435,
+     1144, 1102,  435,  437,  436,    0,  434, 1132, 1147,  436,
+        0,  434,  430,    0,  438,    0,  435,  437,  438,  438,
+      439,    0,  436,  434,  434,  439,  435,  437,  435, 1102,
+        0,  435,  437,  438,    0, 1132,  440, 1140,  439,  439,
+     1147,  440,    0,  438,  435,  437, 1144,  438,  438,  439,
+        0,    0,  441,    0,  439,  440, 1114,  441,  442,  443,
+        0,  438,  442,  442,  443,  440,  439,  439, 1139, 1147,
+      440,  441,    0,  443, 1144,  446, 1146,  442,  443,  444,
+      446,  441, 1140,  440,  444, 1143,  441,  442,  443, 1156,
+
+      444,  442,  442,  443,  446,  445,    0, 1149,  444,  441,
+      445,  443,    0,  445,  446,  442,  443, 1114,  444,  446,
+     1140,  447,  448,  444,  445,  447,  447,  448,  444, 1139,
+      449, 1156,  446,  448,  445,  449,  444, 1146,    0,  445,
+      447,  448,  445,  449, 1143, 1114, 1124, 1124, 1124,  449,
+      447,  448,  445,    0,  447,  447,  448, 1139, 1149,  449,
+     1156,  448,  451,    0,  449, 1146, 1145,  451,  447,  448,
+      452,  449, 1143,  451,  453,  452, 1152,  449,  452,  453,
+        0,  451,    0,    0, 1150,  454, 1149,  454,    0,  452,
+        0,  451,  453,  453,    0,    0,  451,    0,    0,  452,
+
+        0,  451, 1145,  453,  452,    0,    0,  452,  453,  451,
+      458, 1151, 1151, 1151,  457,  458,    0,  452,  454,  457,
+      453,  453,    0,  454,    0, 1152,  454,    0,  457,  458,
+      458, 1145,    0,  457,    0, 1150,    0,  454,    0,  458,
+      454,  459,    0,  457,  458,  460,  459,  454,  457,    0,
+      460,    0,  454, 1152, 1155,  454,  457,  458,  458,  460,
+      459,  457,  468, 1150,  460,  454,    0,  468,  454,  455,
+      459,  455,    0,    0,  460,  459, 1153, 1153, 1153,  460,
+        0,  468,    0,    0,  461,    0,    0,  460,  459,  461,
+     1155,  468,  460, 1158, 1158, 1158,  468, 1159, 1159, 1159,
+
+      455,  461,    0,  461,    0,  455,  463,  455,    0,  468,
+      455,  463, 1157,  461,  455,    0,    0,  455,  461, 1155,
+      455,  455,    0,    0,  455,  463,    0,    0,    0,  461,
+      463,  461,    0,    0,  455,  463,  455,    0,  472,  455,
+      463,    0,  455,  472,    0,  455,  462,    0,  455,  455,
+      462,  462,  455,  463,  464,  465,    0,  472,  463,  464,
+      465,  464,    0, 1157,    0,  462,  462,  472,    0,    0,
+        0,    0,  472,  464,  465,  462,  465,    0,    0,  462,
+      462,    0,    0,  464,  465,  472,    0,    0,  464,  465,
+      464, 1157,    0,  462,  462,    0,    0,    0,    0,    0,
+
+        0,  464,  465,    0,  465,  469,  469,  469,  469,  469,
+      469,  469,  469,  469,  469,  469,    0,  469,  469,  469,
+      469,  469,  469,  469,  469,  469,  469,  469,  469,  469,
+      469,  469,  469,  469,  469,  469,  469,  469,  469,  469,
+      469,  469,  469,  469,  469,  469,  469,  469,  469,  469,
+      469,  469,  469,  469,  469,  469,  469,  469,  469,  469,
+      469,  469,  469,  469,  469,  469,  469,  469,  469,  469,
+      469,  469,  469,  469,  469,  469,  469,  469,  469,  469,
+      469,  469,  469,  469,  469,  469,  469,  469,  469,  469,
+      469,  469,  469,  469,  470,    0,  471,  473,  471,  470,
+
+        0,    0,  473,  474, 1002, 1002, 1002,    0,  474,    0,
+        0,  470, 1002,  470,    0, 1002,  473,    0,    0,    0,
+        0,    0,  474,  470,    0,    0,  473,  471,  470,  471,
+      476,  473,  474,    0,  471,  476,    0,  474,  477,  470,
+        0,  470,    0,  477,  473,    0,  477,    0,  471,  476,
+      474,    0,    0,    0,    0,    0,    0,  477,  471,  476,
+      478,    0,    0,  471,  476,  478,    0,  477,  479,    0,
+        0,    0,  477,  479,    0,  477,  471,  476,    0,  478,
+      478,    0,    0,    0,    0,  477,    0,  479,    0,  478,
+      480,    0,    0,    0,  478,  480,    0,  479,  480,  481,
+
+        0,    0,  479,    0,  481,  481,    0,  478,  478,  480,
+        0,    0,  481,    0,    0,  479,    0,    0,  481,  480,
+        0, 1003, 1003, 1003,  480,    0,    0,  480,  481, 1003,
+      482,  487, 1003,  481,  481,  482,  487,  480,  482,  483,
+      481,  483,  486,    0,  483,    0,  481,  486,    0,  482,
+      487,    0,    0,    0,    0,    0,  486,    0,  483,  482,
+      487,  486,    0,    0,  482,  487,    0,  482,  483,  490,
+      483,  486,    0,  483,  490,  491,  486,  482,  487,    0,
+      491,    0,    0,  490,  486,    0,  483,    0,  490,  486,
+        0,  492,    0,    0,  491,  493,  492,    0,  490,    0,
+
+      493,    0,  492,  490,  491,    0,  493,  494,    0,  491,
+      492,  490,  494,    0,  493,    0,  490,    0,  495,    0,
+      492,    0,  491,  495,  493,  492,  494,  496,    0,  493,
+      492,    0,  496,    0,  493,  496,  494,  495,  492,  497,
+        0,  494,  493,  498,  497,    0,  496,  495,  498,    0,
+      502,    0,  495,    0,  494,  502,  496,    0,  497,    0,
+        0,  496,  498,    0,  496,  495,  499,    0,  497,  502,
+      500,  499,  498,  497,  496,  500,    0,  498,    0,  502,
+      499,    0,  500,    0,  502,  499,  497,  501,    0,  500,
+      498,  501,  501,  503,    0,  499,  504,  502,  503,  500,
+
+      499,  504,    0,    0,  500,    0,  501,    0,  499,    0,
+      500,    0,  503,  499,    0,  504,  501,  500,  505,  507,
+      501,  501,  503,  505,  507,  504,    0,  503,    0,  508,
+      504, 1042, 1042, 1042,  501,  505,    0,  505,  507, 1042,
+      503,  506, 1042,  504,    0,    0,  506,  505,  507,  506,
+      508,    0,  505,  507,    0,  508,    0,  509,    0,    0,
+      506,    0,  509,  505,    0,  505,  507,    0,    0,  508,
+      506,    0,    0,    0,  509,  506,  509,    0,  506,  508,
+        0,    0,  510,    0,  508,    0,  509,  510,  506,  511,
+      512,  509,    0,  510,  511,  512,    0,  508,    0,    0,
+
+        0,  510,  509,  512,  509,    0,  511,    0,  511,  512,
+        0,  510,    0,    0,    0,    0,  510,    0,  511,  512,
+      513,  510,  515,  511,  512,  513,    0,  515,  514,  510,
+      514,  512,    0,  514,  511,    0,  511,  512,  517,  513,
+        0,  515,    0,    0,    0,  516,    0,  514,    0,  513,
+      516,  515,    0,  518,  513,    0,  515,  514,  518,  514,
+        0,  517,  514,    0,  516,  519,  517,  513,    0,  515,
+      519,    0,  518,    0,  516,  514,    0,    0,    0,  516,
+      517,    0,  518,    0,  519,    0,  523,  518,  520,    0,
+      517,  523,  516,  520,  519,  517,    0,    0,    0,  519,
+
+      518,    0,  520,    0,    0,  523,    0,  520,  517,  524,
+        0,    0,  519,  524,  524,  523,    0,  520,  525,    0,
+      523,  526,  520,  525,    0,    0,  526,    0,  524,    0,
+      520,    0,    0,  523,    0,  520,    0,  525,  524,    0,
+      526,  527,  524,  524,  528,  527,  527,  525,  528,  528,
+      526,    0,  525,    0,    0,  526,  524,    0,    0,    0,
+      527,  551,    0,  528,    0,  525,  551,    0,  526,    0,
+      527,    0,    0,  528,  527,  527,    0,  528,  528,  539,
+      551,  539,    0,    0,    0, 1071, 1071, 1071,  527,    0,
+      551,  528,    0, 1071,    0,  551, 1071,  539,  539,  539,
+
+      539,  539,  539,  539,  539,  539,  539,  540,  551, 1093,
+     1093, 1093,    0,  540,    0,    0,    0, 1093,    0,    0,
+     1093,    0,    0,  540,  540,  540,  540,  540,  540,  540,
+      540,  540,  540,  541,  548,    0,  548,    0,    0,  541,
+        0,    0,    0,    0,  548,    0,    0,    0,    0,  541,
+      541,  541,  541,  541,  541,  541,  541,  541,  541,  545,
+      550,    0,  550,    0,    0,  545,  549,  548,    0,    0,
+      548,  549,  548,  545,  549,  545,  545,  545,  545,  545,
+      545,  545,  545,  545,  545,  549,  548,    0,    0,    0,
+        0,    0,    0,  550,    0,  549,  548,    0,  550,  548,
+
+      549,  548,  552,  549,    0,  592,    0,  552,  552,  592,
+      592,    0,  550,  549,  548,  552,    0,    0,  553,  552,
+      553,  552,  550,    0,  592,    0,    0,  550,  553,    0,
+        0,  552,  553,    0,  592,    0,  552,  552,  592,  592,
+      550,  565,    0,  552,    0,    0,    0,  552,    0,  552,
+        0,  553,  592,  565,    0,  565,  553,    0,  565,  565,
+      565,  565,  565,  565,  565,  565,  565,  565,    0,  566,
+      553, 1110, 1110, 1110,    0,    0,    0,    0,    0, 1110,
+      553,    0, 1110,    0,    0,  553,  566,  566,  566,  566,
+      566,  566,  566,  566,  566,  566,  567,    0,  553,    0,
+
+        0, 1125, 1125, 1125,    0,  566,    0,    0,  567, 1125,
+      567,    0, 1125,  567,  567,  567,  567,  567,  567,  567,
+      567,  567,  567,  588,  588,  588,  588,  588,  588,  588,
+      588,  588,  588,    0,  566,  589,  589,  589,  589,  589,
+      589,  589,  589,  589,  589,  590,  590,  590,  590,  590,
+      590,  590,  590,  590,  590,  591,  591,  591,  591,  591,
+      591,  591,  591,  591,  591,  593,    0,    0,  595,    0,
+      593,    0,    0,  595, 1134, 1134, 1134,    0, 1135, 1135,
+     1135,    0, 1134,  595,  593, 1134, 1135,  595,    0, 1135,
+        0,    0,    0,    0,  593,    0,    0,  595,    0,  593,
+
+        0,    0,  595,    0,    0,    0,    0,    0,    0,    0,
+        0,  595,  593,  594,  594,  595,  594,  594,  594,  594,
+      594,  594,  594,  594,  594,  594,  594,  594,  594,  594,
+      594,  594,  594,  594,  594,  594,  594,  594,  594,  594,
+      594,  594,  594,  594,  594,  594,  594,  594,  594,  594,
+      594,  594,  594,  594,  594,  594,  594,  594,  594,  594,
+      594,  594,  594,  594,  594,  594,  594,  594,  594,  594,
+      594,  594,  594,  594,  594,  594,  594,  594,  594,  594,
+      594,  594,  594,  594,  594,  594,  594,  594,  594,  594,
+      594,  594,  594,  594,  594,  594,  594,  594,  594,  594,
+
+      594,  594,  596,  597,  596,  598,  600,  596,  597,  599,
+      598,  600,    0,  599,  599,    0,    0,    0,  598,  600,
+        0,  596,  597,    0,  598,  600,    0,    0,  599,    0,
+        0,  596,  597,  596,  598,  600,  596,  597,  599,  598,
+      600,    0,  599,  599,    0,    0,  598,  600,    0,  596,
+      597,    0,  598,  600,  601,  602,  599,  603,    0,  601,
+      602,  605,  603,    0,    0,  605,  605,    0,    0,  602,
+        0,    0,    0,  601,  602,  603,  603,    0,    0,    0,
+      605,    0,    0,  601,  602,    0,  603,  606,  601,  602,
+      605,  603,  606,    0,  605,  605,    0,  602,  606,    0,
+
+        0,  601,  602,  603,  603,    0,  606,    0,  605,  609,
+      607,    0,    0,  610,  609,  607,  606,  607,  610,    0,
+      610,  606,    0,    0,    0,    0,  606,    0,  609,  607,
+        0,    0,  610,    0,  606,  619,  621,    0,  609,  607,
+      619,  621,  610,  609,  607,    0,  607,  610,    0,  610,
+        0,    0,    0,    0,  619,  621,  609,  607,  620,    0,
+      610,    0,    0,  620,  619,  621,    0,    0,    0,  619,
+      621,  620,    0,    0,  623,  622,    0,  620,  622,  623,
+      622,    0,  619,  621,    0,    0,    0,  620,  623,    0,
+        0,  624,  620,  623,  622,    0,  624,    0,    0,  620,
+
+        0,    0,  624,  623,  622,  620,    0,  622,  623,  622,
+      624,    0,  625,  625,  626,    0,  623,  625,  628,  626,
+      624,  623,  622,  628,    0,  624,    0,    0,    0,  626,
+      624,  625,    0,  626,    0,  627,    0,  628,  624,  627,
+      627,  625,  625,  626,    0,    0,  625,  628,  626,    0,
+        0,    0,  628,  629,  627,  629,    0,  626,    0,  625,
+        0,  626,    0,  632,  627,  628,    0,    0,  627,  627,
+      631,  631,  631,  631,  631,  631,  631,  631,  631,  631,
+      632,    0,  627,  633,  629,  632,  629,  634,  633,  637,
+        0,  629,  634,    0,  637,    0,    0,    0,    0,  632,
+
+      634,    0,  633,    0,    0,  629,  634,    0,  637,  632,
+        0,    0,  633,    0,  632,  629,  634,  633,  637,  638,
+      629,  634,    0,  637,  638,    0,    0,  632,  634,    0,
+      633,    0,    0,  629,  634,  639,  637,    0,  638,  641,
+      639,  641,  642,  639,  641,  642,  643,  642,  638,    0,
+        0,  643,    0,  638,  639,    0,    0,    0,  641,    0,
+        0,  642,  644,    0,  639,  643,  638,  644,  641,  639,
+      641,  642,  639,  641,  642,  643,  642,    0,    0,  644,
+      643,  644,  639,  645,    0,  646,  641,  645,  645,  642,
+      646,  644,  647,  643,  648,    0,  644,  647,    0,  648,
+
+        0,    0,  645,    0,  646,  647,    0,  644,    0,  644,
+        0,  647,  645,  648,  646,    0,  645,  645,    0,  646,
+        0,  647,    0,  648,    0,    0,  647,    0,  648,  649,
+      645,  649,  646,  647,  649,  650,    0,    0,    0,  647,
+      650,  648,    0,    0,    0,    0,  650,    0,  649,    0,
+        0,    0,    0,    0,  650,    0,    0,    0,  649,    0,
+      649,  652,    0,  649,  650,  651,  652,  651,    0,  650,
+      651,    0,  652,  653,  650,    0,  649,  653,  653,    0,
+      652,    0,  650,    0,  651,    0,    0,    0,    0,    0,
+      652,    0,  653,    0,  651,  652,  651,    0,  655,  651,
+
+      652,    0,  653,  655,    0,  654,  653,  653,  652,  656,
+      654,    0,  651,  654,  656,    0,    0,  655,    0,    0,
+      653,    0,  656,    0,  654,  657,    0,  655,  656,  657,
+      657,    0,  655,    0,  654,    0,  658,    0,  656,  654,
+        0,  658,  654,  656,  657,  655,    0,    0,  660,    0,
+      656,    0,  654,  660,  657,  658,  656,  659,  657,  657,
+        0,  659,  659,    0,    0,  658,    0,  660,  661,  662,
+      658,    0,  657,  661,  662,    0,  659,  660,    0,    0,
+        0,    0,  660,  658,    0,    0,  659,  661,  662,    0,
+      659,  659,    0,    0,  663,  660,  663,  661,  662,  663,
+
+      665,  666,  661,  662,  659,  665,  666,    0,    0,    0,
+        0,    0,    0,  663,    0,  661,  662,    0,  665,  665,
+      666,    0,    0,  663,    0,  663,  667,    0,  663,  665,
+      666,  667,    0,    0,  665,  666,    0,  668,    0,  667,
+      668,  663,  668,    0,    0,  667,  665,  665,  666,  669,
+        0,    0,    0,  672,  669,  667,  668,  671,  672,    0,
+      667,    0,  671,    0,    0,    0,  668,  667,  669,  668,
+        0,  668,  672,  667,  673,    0,  671,  671,  669,  673,
+      674,    0,  672,  669,  668,  674,  671,  672,    0,    0,
+        0,  671,    0,  673,    0,    0,  669,    0,    0,  674,
+
+      672,    0,    0,  673,  671,  671,    0,    0,  673,  674,
+        0,    0,  690,    0,  674,    0,    0,    0,  690,  695,
+        0,  673,    0,  695,  695,    0,  690,  674,  690,  690,
+      690,  690,  690,  690,  690,  690,  690,  690,  695,  696,
+      698,  699,    0,    0,  696,  698,  699,  696,  695,    0,
+        0,  698,  695,  695,    0,    0,    0,    0,  696,  698,
+      699,    0,    0,    0,    0,    0,  695,    0,  696,  698,
+      699,    0,  709,  696,  698,  699,  696,    0,    0,  698,
+        0,    0,  710,    0,    0,    0,  696,  698,  699,  709,
+      709,  709,  709,  709,  709,  709,  709,  709,  709,  710,
+
+      710,  710,  710,  710,  710,  710,  710,  710,  710,  711,
+        0,    0,    0,    0,    0,    0,    0,    0,    0,  712,
+        0,    0,    0,    0,    0,    0,  711,  711,  711,  711,
+      711,  711,  711,  711,  711,  711,  712,  712,  712,  712,
+      712,  712,  712,  712,  712,  712,  715,  715,  715,  715,
+      715,  715,  715,  715,  715,  715,  715,  715,  715,  715,
+      715,  715,  715,  715,  715,  715,  715,  715,  715,  715,
+      715,  715,  715,  715,  715,  715,  715,  715,  715,  715,
+      715,  715,  715,  715,  715,  715,  715,  715,  715,  715,
+      715,  715,  715,  715,  715,  715,  715,  715,  715,  715,
+
+      715,  715,  715,  715,  715,  715,  715,  715,  715,  715,
+      715,  715,  715,  715,  715,  715,  715,  715,  715,  715,
+      715,  715,  715,  715,  715,  715,  715,  715,  715,  715,
+      715,  715,  715,  715,  715,  719,  719,  719,    0,    0,
+      719,  719,    0,  719,    0,    0,    0,  719,  719,    0,
+        0,  719,    0,    0,  719,  719,  719,  719,  719,  719,
+      719,  719,  719,  732,  732,    0,  732,  732,  732,  732,
+      732,  732,  732,  732,  732,  732,  732,  732,  732,  732,
+      732,  732,  732,  732,  732,  732,  732,  732,  732,  732,
+      732,  732,  732,  732,  732,  732,  732,  732,  732,  732,
+
+      732,  732,  732,  732,  732,  732,  732,  732,  732,  732,
+      732,  732,  732,  732,  732,  732,  732,  732,  732,  732,
+      732,  732,  732,  732,  732,  732,  732,  732,  732,  732,
+      732,  732,  732,  732,  732,  732,  732,  732,  732,  732,
+      732,  732,  732,  732,  732,  732,  732,  732,  732,  732,
+      732,  732,  733,    0,    0,  735,    0,  733,  734,  734,
+      734,  734,  734,  734,  734,  734,  734,  734,  736,  737,
+        0,  733,  735,  736,  737,  738,    0,  735,    0,    0,
+      738,  733,    0,    0,    0,    0,  733,  736,  737,    0,
+        0,  735,    0,    0,  738,  739,    0,  736,  737,  733,
+
+      739,  735,  736,  737,  738,    0,  735,  740,    0,  738,
+        0,    0,  740,    0,  739,  736,  737,    0,  741,  735,
+        0,    0,  738,  741,  739,    0,  740,    0,    0,  739,
+      740,    0,    0,    0,    0,    0,  740,  741,  741,    0,
+        0,  740,  739,  742,    0,  742,    0,  741,  742,    0,
+      747,  743,  741,    0,  740,  747,  743,    0,  740,  743,
+        0,  745,  742,  745,    0,  741,  741,    0,    0,  747,
+      743,    0,  742,  750,  742,    0,    0,  742,  750,  747,
+      743,    0,  746,    0,  747,  743,  746,  746,  743,    0,
+      742,    0,  750,    0,  745,    0,  745,  747,  743,  745,
+
+        0,  746,  750,    0,    0,    0,    0,  750,    0,  745,
+        0,  746,    0,  745,  751,  746,  746,    0,  751,  751,
+      750,    0,    0,  745,    0,  745,  762,    0,  745,  746,
+        0,  762,    0,  751,  761,    0,  761,  745,    0,  761,
+        0,  745,    0,  751,    0,  762,  762,  751,  751,    0,
+        0,  763,    0,  761,    0,  762,  763,  763,    0,    0,
+      762,  751,    0,  761,    0,  761,    0,    0,  761,    0,
+      763,  764,  765,  762,  762,  764,  764,  765,  766,    0,
+      763,  761,  766,  766,    0,  763,  763,    0,    0,  765,
+      764,  765,    0,    0,  771,    0,    0,  766,  763,  771,
+
+      764,  765,    0,  767,  764,  764,  765,  766,  767,    0,
+      768,  766,  766,  771,  772,  768,  772,  765,  764,  765,
+      767,  768,  767,  771,  772,  766,  773,    0,  771,  768,
+        0,  773,  767,    0,    0,    0,    0,  767,    0,  768,
+      773,  771,    0,    0,  768,  773,  774,  772,  767,  768,
+      767,  774,  772,    0,  774,  773,    0,  768,  775,    0,
+      773,    0,  775,  775,    0,  774,  772,  776,  773,  778,
+        0,  776,  776,  773,  778,  774,  772,  775,    0,    0,
+      774,  772,    0,  774,    0,    0,  776,  775,  778,    0,
+      777,  775,  775,  774,  772,  777,  776,    0,  778,  779,
+
+      776,  776,    0,  778,  779,  775,    0,  777,    0,  777,
+      780,    0,    0,    0,  776,  780,  778,  779,  779,  777,
+        0,  780,  781,    0,  777,    0,    0,  781,  779,  780,
+        0,  782,    0,  779,    0,  777,  782,  777,    0,  780,
+        0,  781,  783,  784,  780,  779,  779,  783,  784,  780,
+      782,  781,    0,  785,    0,  785,  781,  780,    0,    0,
+      782,  783,  784,  786,    0,  782,    0,    0,  786,  781,
+        0,  783,  784,    0,  787,    0,  783,  784,  782,  787,
+        0,  786,  786,  788,    0,    0,  785,    0,  788,  783,
+      784,  785,  786,  787,  789,    0,    0,  786,  787,  789,
+
+        0,  785,  788,  787,    0,  785,    0,    0,  787,  786,
+      786,    0,  788,  789,    0,  785,    0,  788,    0,  790,
+      785,  787,    0,  789,  790,    0,  787,  791,  789,  785,
+      788,  791,  791,  785,    0,    0,  790,    0,  790,  792,
+        0,  789,    0,    0,  792,    0,  791,    0,  790,    0,
+        0,  792,    0,  790,    0,    0,  791,    0,  792,    0,
+      791,  791,  793,    0,  790,    0,  790,  793,  792,    0,
+      795,  796,    0,  792,  791,  795,  796,    0,  795,  792,
+        0,  793,  797,    0,    0,    0,  792,  797,    0,  795,
+      796,  793,    0,  798,    0,  799,  793,  799,  798,  795,
+
+      796,  797,    0,    0,  795,  796,    0,  795,    0,  793,
+        0,  797,  798,    0,    0,    0,  797,  795,  796,  800,
+      801,    0,  798,    0,  800,  801,  816,  798,  799,  797,
+      799,  816,    0,  799,    0,    0,    0,    0,  800,  801,
+      798,    0,    0,    0,    0,  816,    0,  799,  800,  801,
+        0,  817,    0,  800,  801,  816,  817,  799,    0,  799,
+      816,    0,  799,    0,  817,    0,  800,  801,    0,  818,
+      817,  818,    0,  816,  842,  799,  802,  802,  802,  802,
+      817,    0,    0,    0,    0,  817,    0,    0,    0,    0,
+      819,  842,  817,    0,    0,  819,  842,    0,  817,    0,
+
+        0,    0,  818,    0,    0,    0,    0,  818,    0,  819,
+      842,  802,  802,    0,    0,  802,    0,  802,    0,  819,
+      842,  818,    0,    0,  819,  842,    0,    0,  802,  802,
+        0,  818,    0,    0,    0,    0,  818,  819,  842,    0,
+      802,  802,    0,    0,  802,    0,  802,    0,    0,  818,
+        0,    0,    0,    0,    0,    0,  802,  802,  827,  827,
+      827,  827,  827,  827,  827,  827,  827,  827,  827,  827,
+      827,  827,  827,  827,  827,  827,  827,  827,  827,  827,
+      827,  827,  827,  827,  827,  827,  827,  827,  827,  827,
+      827,  827,  827,  827,  827,  827,  827,  827,  827,  827,
+
+      827,  827,  827,  827,  827,  827,  827,  827,  827,  827,
+      827,  827,  827,  827,  827,  827,  827,  827,  827,  827,
+      827,  827,  827,  827,  827,  827,  827,  827,  827,  827,
+      827,  827,  827,  827,  827,  827,  827,  827,  827,  827,
+      827,  827,  827,  827,  827,  827,  827,  828,  841,  841,
+      841,  841,  841,  841,  841,  841,  841,  841,    0,    0,
+        0,    0,    0,    0,  828,  828,  828,  828,  828,  828,
+      828,  828,  828,  828,  829,  829,  829,  829,  829,  829,
+      829,  829,  829,  829,  829,  829,  829,  829,  829,  829,
+      829,  829,  829,  829,  829,  829,  829,  829,  829,  829,
+
+      829,  829,  829,  829,  829,  829,  829,  829,  829,  829,
+      829,  829,  829,  829,  829,  829,  829,  829,  829,  829,
+      829,  829,  829,  829,  829,  829,  829,  829,  829,  829,
+      829,  829,  829,  829,  829,  829,  829,  829,  829,  829,
+      829,  829,  829,  829,  829,  829,  829,  829,  829,  829,
+      829,  829,  829,  829,  829,  829,  829,  829,  829,  829,
+      829,  829,  829,  843,    0,  844,    0,  847,  843,  844,
+      844,  845,  847,  845,  846,    0,  845,    0,  846,  846,
+        0,    0,  843,    0,  844,    0,  847,    0,    0,    0,
+      845,    0,  843,  846,  844,    0,  847,  843,  844,  844,
+
+      845,  847,  845,  846,  849,  845,    0,  846,  846,  849,
+      843,  848,  844,    0,  847,  848,  848,    0,  845,    0,
+      850,  846,    0,  849,    0,  850,    0,  853,    0,    0,
+      848,  854,  853,  849,  850,    0,  854,    0,  849,  850,
+      848,  853,    0,    0,  848,  848,  853,    0,  854,  850,
+      854,  849,  855,    0,  850,    0,  853,  855,  848,    0,
+      854,  853,  850,  858,    0,  854,    0,  850,  858,  853,
+        0,  855,  866,    0,  853,    0,  854,  866,  854,    0,
+      858,  855,  858,  867,    0,    0,  855,    0,  867,    0,
+        0,  866,  858,    0,  867,    0,    0,  858,    0,  855,
+
+        0,  866,  867,    0,  868,    0,  866,    0,  858,  868,
+      858,    0,  867,  869,    0,  869,    0,  867,  869,  866,
+        0,  868,  867,  868,    0,    0,    0,    0,    0,  870,
+      867,    0,  869,  868,  870,  871,    0,    0,  868,    0,
+      871,    0,  869,  870,  869,    0,    0,  869,  870,  868,
+        0,  868,    0,    0,  871,    0,    0,    0,  870,    0,
+      869,  872,    0,  870,  871,  872,  872,    0,  873,  871,
+      874,  870,  873,  873,    0,  874,  870,    0,    0,    0,
+      872,  874,  871,    0,    0,    0,    0,  873,    0,  874,
+      872,  878,    0,  877,  872,  872,  878,  873,  877,  874,
+
+        0,  873,  873,    0,  874,    0,  877,    0,  872,  874,
+      878,    0,  877,  879,  880,  873,  881,  874,  879,  880,
+      878,  881,  877,    0,    0,  878,    0,  877,    0,    0,
+        0,    0,  879,  880,  877,  881,  882,    0,  878,    0,
+      877,  882,  879,  880,  882,  881,    0,  879,  880,    0,
+      881,    0,  883,  886,    0,  882,    0,  883,  886,  885,
+      879,  880,    0,  881,  885,  882,    0,    0,    0,    0,
+      882,  883,  886,  882,    0,    0,  885,    0,  885,  887,
+        0,  883,  886,  882,  887,    0,  883,  886,  885,    0,
+      888,  890,    0,  885,    0,  888,  890,    0,  887,  883,
+
+      886,  888,  891,    0,  885,    0,  885,  891,  887,  888,
+      890,  889,    0,  887,    0,  889,  889,    0,    0,  888,
+      890,  891,  892,  897,  888,  890,  887,  892,  897,  888,
+      889,  891,    0,    0,  895,    0,  891,  888,  890,  895,
+      889,  892,  897,  906,  889,  889,    0,    0,  906,  891,
+        0,  892,  897,  895,    0,  895,  892,  897,  889,  898,
+        0,    0,  906,  895,  898,    0,  907,  898,  895,  892,
+      897,  907,  906,    0,    0,    0,    0,  906,  898,    0,
+        0,  895,    0,  895,  907,  907,    0,    0,  898,  909,
+      906,  909,    0,  898,  909,  907,  898,    0,    0,    0,
+
+      907,    0,    0,    0,    0,    0,  898,  914,  909,    0,
+        0,    0,  907,  907,    0,    0,  917,  917,  909,    0,
+      909,  917,    0,  909,  914,  914,  914,  914,  914,  914,
+      914,  914,  914,  914,    0,  917,  909,  918,    0,  919,
+        0,    0,  918,  919,  919,  917,  917,    0,  920,    0,
+      917,    0,    0,  920,    0,    0,  918,    0,  919,    0,
+        0,    0,    0,  917,    0,  920,  918,  920,  919,  921,
+      922,  918,  919,  919,  921,  922,    0,  920,  923,    0,
+        0,    0,  920,  923,  918,    0,  919,    0,  921,  922,
+        0,  923,    0,  920,    0,  920,    0,  923,  921,  922,
+
+        0,  927,    0,  921,  922,  928,  927,  923,    0,  928,
+      928,    0,  923,  927,    0,    0,  921,  922,    0,  923,
+      927,  938,    0,    0,  928,  923,  938,  930,  940,  938,
+      927,  930,  930,  940,  928,  927,    0,    0,  928,  928,
+      938,  927,    0,    0,    0,    0,  930,  940,  927,    0,
+      938,    0,  928,    0,    0,  938,  930,  940,  938,  939,
+      930,  930,  940,  939,  939,  941,  942,    0,  938,    0,
+      941,  942,    0,    0,  930,  940,    0,    0,  939,    0,
+        0,    0,  943,    0,  941,  942,  942,  943,  939,    0,
+        0,  944,  939,  939,  941,  942,  944,    0,    0,  941,
+
+      942,  943,  945,    0,  944,    0,  939,  945,    0,    0,
+      944,  943,  941,  942,  942,    0,  943,    0,  951,    0,
+      944,  945,  952,  951,    0,  944,    0,  952,    0,  943,
+        0,  945,  944,    0,    0,    0,  945,  951,  944,  955,
+        0,  952,    0,  953,  955,  953,    0,  951,  953,  945,
+        0,  952,  951,  955,    0,    0,  952,    0,  955,  956,
+        0,    0,  953,    0,  956,  951,  957,    0,  955,  952,
+      958,  957,  953,  955,  953,  958,    0,  953,  956,    0,
+        0,  955,    0,    0,    0,  957,  955,  958,  956,  958,
+      953,    0,  960,  956,    0,  957,  960,  960,    0,  958,
+
+      957,    0,    0,  963,  958,    0,  956,    0,  963,  962,
+        0,  960,    0,  957,  962,  958,  963,  958,    0,    0,
+        0,  960,  963,    0,    0,  960,  960,  962,  962,  969,
+        0,    0,  963,    0,  969,  970,    0,  963,  962,  960,
+      970,  971,    0,  962,  963,  971,  971,    0,  969,  969,
+      963,    0,  976,    0,  970,  962,  962,  976,  969,    0,
+      971,  975,    0,  969,  970,    0,  975,    0,  977,  970,
+      971,  976,  975,  977,  971,  971,  969,  969,    0,    0,
+      975,  976,  970,    0,  979,    0,  976,  977,  971,  979,
+      975,    0,    0,  985,    0,  975,    0,  977,  985,  976,
+
+      975,  978,  977,  979,  982,  978,  978,    0,  975,  982,
+        0,    0,  985,  979,    0,  977,    0,    0,  979,  982,
+      978,    0,  985,  982,  983,    0,  983,  985,    0,  983,
+      978,  979,    0,  982,  978,  978,    0,    0,  982,    0,
+      985,  993,    0,  983,  994,  992,  993,  982,  978,  994,
+      992,  982,    0,  983,    0,  983,  994,    0,  983,  992,
+      993,  995,    0,  994,  992,    0,  995,  996,    0,    0,
+      993,  983,  996,  994,  992,  993,    0,    0,  994,  992,
+      995,    0,    0,    0,  994,    0,  996,  992,  993,    0,
+      995,  994,  992, 1004,    0,  995,  996,  997, 1004,  997,
+
+     1007,  996,  997,    0, 1006, 1007, 1006,    0,  995, 1006,
+        0,    0, 1004,    0,  996,    0,  997,    0,    0, 1007,
+     1009,    0, 1004, 1006,    0, 1009,  997, 1004,  997, 1007,
+        0,  997,    0, 1006, 1007, 1006,    0, 1011, 1006, 1009,
+     1004, 1011, 1011,    0,  997,    0,    0, 1007,    0, 1009,
+        0, 1006,    0, 1012, 1009,    0, 1011, 1012, 1012,    0,
+     1020,    0,    0,    0, 1019, 1020, 1011, 1009,    0, 1019,
+     1011, 1011, 1012,    0,    0, 1019, 1025,    0,    0, 1020,
+     1025, 1025, 1012, 1019, 1011, 1026, 1012, 1012,    0, 1020,
+     1026,    0,    0, 1019, 1020, 1025,    0, 1029, 1019,    0,
+
+     1012,    0, 1029, 1019, 1026, 1025,    0, 1020, 1029, 1025,
+     1025, 1019,    0,    0, 1026,    0, 1029,    0,    0, 1026,
+     1030,    0, 1037, 1025, 1038, 1030, 1029, 1037, 1030, 1038,
+        0, 1029, 1026,    0,    0, 1037, 1029,    0,    0, 1030,
+        0, 1037,    0, 1038, 1029,    0,    0, 1039,    0, 1030,
+        0, 1037, 1039, 1038, 1030, 1039, 1037, 1030, 1038, 1047,
+        0,    0,    0, 1037, 1047,    0, 1039, 1030, 1040, 1037,
+     1044, 1038, 1040, 1040, 1044, 1044, 1039,    0, 1047,    0,
+        0, 1039,    0,    0, 1039,    0,    0, 1040, 1047, 1044,
+     1048, 1054,    0, 1047, 1039, 1048, 1054, 1040,    0, 1044,
+
+        0, 1040, 1040, 1044, 1044,    0, 1047, 1059,    0, 1048,
+     1054,    0, 1059,    0,    0, 1040, 1063, 1044,    0, 1048,
+     1054, 1063,    0, 1062, 1048, 1054, 1059, 1062, 1062,    0,
+        0,    0,    0,    0, 1063, 1063, 1059, 1048, 1054, 1067,
+        0, 1059, 1062,    0, 1067, 1063, 1068,    0, 1069,    0,
+     1063, 1068, 1062, 1069, 1059,    0, 1062, 1062, 1067, 1068,
+        0,    0, 1063, 1063,    0, 1068,    0, 1069, 1067, 1073,
+     1062, 1080, 1073, 1067, 1073, 1068, 1080, 1069,    0,    0,
+     1068,    0, 1069,    0,    0,    0, 1067, 1068, 1073,    0,
+     1080, 1087,    0, 1068, 1088, 1069, 1087,    0, 1073, 1088,
+
+     1080, 1073, 1088, 1073,    0, 1080,    0,    0,    0,    0,
+     1087,    0,    0, 1088, 1087,    0, 1073, 1091, 1080,    0,
+     1087, 1091, 1091, 1088, 1095, 1087,    0,    0, 1088, 1095,
+        0, 1088,    0,    0,    0,    0, 1091,    0, 1087,    0,
+     1105, 1088, 1087, 1095, 1095, 1105, 1091, 1106,    0, 1108,
+     1091, 1091, 1106, 1095, 1108,    0,    0,    0, 1095, 1105,
+        0, 1106,    0,    0, 1091,    0, 1106,    0, 1108, 1105,
+        0, 1095, 1095,    0, 1105,    0, 1106,    0, 1108,    0,
+        0, 1106,    0, 1108,    0,    0,    0, 1105,    0, 1106,
+        0,    0,    0,    0, 1106,    0, 1108, 1109, 1109, 1109,
+
+        0,    0, 1109, 1109,    0, 1109,    0,    0,    0, 1109,
+     1109,    0,    0, 1109,    0,    0, 1109, 1109, 1109, 1109,
+     1109, 1109, 1109, 1109, 1109, 1112, 1122,    0,    0,    0,
+     1112, 1122,    0,    0,    0,    0,    0,    0,    0, 1122,
+        0,    0, 1112,    0, 1112, 1122,    0,    0,    0,    0,
+        0,    0,    0,    0, 1112, 1122,    0,    0,    0, 1112,
+     1122,    0,    0,    0,    0,    0,    0, 1122,    0,    0,
+     1112,    0, 1112, 1122, 1126, 1126, 1126,    0,    0, 1126,
+     1126,    0, 1126,    0, 1128, 1126, 1126, 1126, 1128, 1128,
+     1126,    0,    0, 1126, 1126, 1126, 1126, 1126, 1126, 1126,
+
+     1126, 1126,    0, 1128, 1133, 1137,    0,    0,    0, 1133,
+     1137,    0,    0, 1128,    0,    0,    0, 1128, 1128,    0,
+        0,    0,    0, 1133, 1137,    0,    0,    0,    0,    0,
+        0, 1128,    0, 1133, 1137,    0,    0,    0, 1133, 1137,
+        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+        0, 1133, 1137, 1162, 1162, 1162, 1162, 1162, 1162, 1162,
+     1162, 1162, 1162, 1162, 1162, 1163, 1163, 1163, 1163, 1163,
+     1163, 1163, 1163, 1163, 1163, 1163, 1163, 1164, 1164,    0,
+     1164, 1164, 1164, 1164, 1164, 1164, 1164, 1164, 1164, 1165,
+     1165,    0, 1165, 1165, 1165, 1165, 1165, 1165, 1165, 1165,
+
+     1165, 1166, 1166, 1166, 1166, 1166, 1166, 1166, 1166, 1166,
+     1166, 1166, 1166, 1167, 1167, 1167, 1167, 1167, 1167, 1167,
+     1167, 1167, 1167, 1167, 1167, 1168, 1168, 1169, 1169, 1169,
+     1169, 1169, 1169, 1169, 1169, 1170, 1170, 1170, 1170, 1170,
+     1170, 1170, 1170, 1170, 1170, 1170, 1170, 1171, 1171, 1171,
+     1171, 1171, 1171, 1171, 1171, 1171, 1171, 1171, 1171, 1172,
+     1172, 1172, 1172, 1172, 1172,    0, 1172, 1172, 1172,    0,
+     1172, 1173, 1173, 1173, 1173, 1173, 1173, 1173, 1173, 1173,
+     1173, 1173, 1173, 1174,    0,    0, 1174, 1175, 1175, 1175,
+        0,    0, 1175,    0, 1175, 1175,    0, 1175, 1175, 1176,
+
+     1176, 1176, 1176, 1176, 1176, 1176, 1176, 1176, 1176, 1176,
+     1176, 1177, 1177,    0, 1177, 1177, 1177, 1177, 1177, 1177,
+     1177, 1177, 1177, 1178, 1178, 1178, 1178, 1178, 1178,    0,
+     1178, 1178, 1178,    0, 1178, 1179, 1179, 1179, 1179, 1179,
+     1179, 1179, 1179, 1179, 1179, 1179, 1179, 1180, 1180, 1180,
+     1180, 1180, 1180, 1180, 1180, 1180, 1180, 1180, 1180, 1181,
+        0,    0, 1181, 1182,    0,    0,    0, 1182,    0,    0,
+        0,    0,    0, 1182, 1183, 1183, 1183, 1183, 1183, 1183,
+     1183, 1183, 1183, 1183, 1183, 1183, 1184, 1184,    0, 1184,
+     1184, 1184, 1184, 1184, 1184, 1184, 1184, 1184, 1185, 1185,
+
+        0, 1185, 1185, 1185, 1185, 1185, 1185, 1185, 1185, 1185,
+     1186, 1186,    0, 1186, 1186, 1186, 1186, 1186, 1186, 1186,
+     1186, 1186, 1187, 1187, 1187, 1187, 1187, 1187, 1187, 1187,
+     1187, 1187, 1187, 1187, 1188, 1188, 1188, 1188, 1188, 1188,
+     1188, 1188, 1188, 1188, 1188, 1188, 1189, 1189, 1189, 1189,
+     1189, 1189, 1189, 1189, 1189, 1189, 1189, 1189, 1190, 1190,
+     1190, 1190, 1190, 1190, 1190, 1190, 1190, 1190, 1190, 1190,
+     1191, 1191, 1191, 1191, 1191, 1191, 1191, 1191, 1191, 1191,
+     1191, 1191, 1192, 1192,    0, 1192, 1192, 1192, 1192, 1192,
+     1192, 1192, 1192, 1192, 1193, 1193, 1193, 1193, 1193, 1193,
+
+     1193, 1193, 1193, 1193, 1193, 1193, 1194, 1194, 1194, 1194,
+     1194, 1194, 1194, 1194, 1194, 1194, 1194, 1194, 1195, 1195,
+        0, 1195, 1195, 1195, 1195, 1195, 1195, 1195, 1195, 1195,
+     1196, 1196,    0, 1196, 1196, 1196, 1196, 1196, 1196, 1196,
+     1196, 1196, 1197, 1197,    0, 1197, 1197, 1197, 1197, 1197,
+     1197, 1197, 1197, 1197, 1198, 1198,    0, 1198, 1198, 1198,
+     1198, 1198, 1198, 1198, 1198, 1198, 1199, 1199,    0, 1199,
+     1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1200, 1200,
+     1200, 1200, 1200, 1200, 1200, 1200, 1200, 1200, 1200, 1200,
+     1201, 1201, 1201, 1201, 1201, 1201, 1201, 1201, 1201, 1201,
+
+     1201, 1201, 1202, 1202, 1202, 1202, 1202, 1202, 1202, 1202,
+     1202, 1202, 1202, 1202, 1203, 1203, 1203, 1203, 1203, 1203,
+     1203, 1203, 1203, 1203, 1203, 1203, 1204, 1204, 1204, 1204,
+     1204, 1204, 1204, 1204, 1204, 1204, 1204, 1204, 1205, 1205,
+     1205, 1205, 1205, 1205, 1205, 1205, 1205, 1205, 1205, 1205,
+     1206, 1206,    0, 1206, 1206, 1206, 1206, 1206, 1206, 1206,
+     1206, 1206, 1207, 1207,    0, 1207, 1207, 1207, 1207, 1207,
+     1207, 1207, 1207, 1207, 1208, 1208, 1208, 1208, 1208, 1208,
+     1208, 1208, 1208, 1208, 1208, 1208, 1209, 1209, 1209, 1209,
+     1209, 1209, 1209, 1209, 1209, 1209, 1209, 1209, 1210, 1210,
+
+     1210, 1210, 1210, 1210, 1210, 1210, 1210, 1210, 1210, 1210,
+     1211, 1211, 1211, 1211, 1211, 1211, 1211, 1211, 1211, 1211,
+     1211, 1211, 1212, 1212, 1212, 1212, 1212, 1212, 1212, 1212,
+     1212, 1212, 1212, 1212, 1213, 1213, 1213, 1213, 1213, 1213,
+     1213, 1213, 1213, 1213, 1213, 1213, 1214, 1214, 1214, 1214,
+     1214, 1214, 1214, 1214, 1214, 1214, 1214, 1214, 1161, 1161,
+     1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161,
+     1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161,
+     1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161,
+     1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161,
+
+     1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161,
+     1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161,
+     1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161,
+     1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161,
+     1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161
+    } ;
+
+static yy_state_type yy_last_accepting_state;
+static char *yy_last_accepting_cpos;
+
+extern int fortran_flex_debug;
+int fortran_flex_debug = 0;
+
+/* The intent behind this definition is that it'll catch
+ * any uses of REJECT which flex missed.
+ */
+#define REJECT reject_used_but_not_detected
+#define yymore() yymore_used_but_not_detected
+#define YY_MORE_ADJ 0
+#define YY_RESTORE_YY_MORE_OFFSET
+char *fortrantext;
+#line 1 "fortran.lex"
+/******************************************************************************/
+/*                                                                            */
+/*     CONV (converter) for Agrif (Adaptive Grid Refinement In Fortran)       */
+/*                                                                            */
+/* Copyright or   or Copr. Laurent Debreu (Laurent.Debreu@imag.fr)            */
+/*                        Cyril Mazauric (Cyril_Mazauric@yahoo.fr)            */
+/* This software is governed by the CeCILL-C license under French law and     */
+/* abiding by the rules of distribution of free software.  You can  use,      */
+/* modify and/ or redistribute the software under the terms of the CeCILL-C   */
+/* license as circulated by CEA, CNRS and INRIA at the following URL          */
+/* "http://www.cecill.info".                                                  */
+/*                                                                            */
+/* As a counterpart to the access to the source code and  rights to copy,     */
+/* modify and redistribute granted by the license, users are provided only    */
+/* with a limited warranty  and the software's author,  the holder of the     */
+/* economic rights,  and the successive licensors  have only  limited         */
+/* liability.                                                                 */
+/*                                                                            */
+/* In this respect, the user's attention is drawn to the risks associated     */
+/* with loading,  using,  modifying and/or developing or reproducing the      */
+/* software by the user in light of its specific status of free software,     */
+/* that may mean  that it is complicated to manipulate,  and  that  also      */
+/* therefore means  that it is reserved for developers  and  experienced      */
+/* professionals having in-depth computer knowledge. Users are therefore      */
+/* encouraged to load and test the software's suitability as regards their    */
+/* requirements in conditions enabling the security of their systems and/or   */
+/* data to be ensured and,  more generally, to use and operate it in the      */
+/* same conditions as regards security.                                       */
+/*                                                                            */
+/* The fact that you are presently reading this means that you have had       */
+/* knowledge of the CeCILL-C license and that you accept its terms.           */
+/******************************************************************************/
+/* version 1.7                                                                */
+/******************************************************************************/
+
+
+
+
+
+#line 41 "fortran.lex"
+#include <math.h>
+#include <stdlib.h>
+#include <string.h>
+extern FILE * fortranin;
+#define MAX_INCLUDE_DEPTH 30
+#define tabsize 6
+YY_BUFFER_STATE include_stack[MAX_INCLUDE_DEPTH];
+int line_num_fortran=1;
+int line_num_fortran_common=1;
+int newlinef90 = 0;
+char *tmp;
+char tmpc;
+/******************************************************************************/
+/**************PETITS PB NON PREVUS *******************************************/
+/******************************************************************************/
+/* NEXTLINF77 un ligne fortran 77 peut commencer par -      &a=b or on        */
+/*            a prevu seulement       & a=b avec l'espace entre le symbole    */
+/*            de la 7eme et le debut de la ligne de commande                  */
+/*            le ! est aussi interdit comme symbole de la 7 eme colonne       */
+/*            Normalement NEXTLINEF77 \n+[ ]{5}[^ ]                           */
+/******************************************************************************/
+#define YY_USER_ACTION \
+        {\
+           if (firstpass == 0) \
+           {\
+              strcat(curbuf,fortrantext); \
+              Save_Length(curbuf,38); \
+              strcpy(motparse,fortrantext);\
+              Save_Length(motparse,32); \
+              colnum = colnum + strlen(motparse);\
+              ECHO; \
+           }\
+           strcpy(motparse1,fortrantext);\
+/*           printf("fortrantext = %s\n",fortrantext);*/\
+        /*if ( firstpass == 1 ) 
+                      printf("fortrantext = %s %d\n",fortrantext,strlen(fortrantext));*/\
+        }
+#line 2979 "fortran.yy.c"
+
+#define INITIAL 0
+#define parameter 1
+#define character 2
+#define donottreat 3
+#define fortran77style 4
+#define fortran90style 5
+
+#ifndef YY_NO_UNISTD_H
+/* Special case for "unistd.h", since it is non-ANSI. We include it way
+ * down here because we want the user's section 1 to have been scanned first.
+ * The user has a chance to override it with an option.
+ */
+#include <unistd.h>
+#endif
+
+#ifndef YY_EXTRA_TYPE
+#define YY_EXTRA_TYPE void *
+#endif
+
+static int yy_init_globals (void );
+
+/* Accessor methods to globals.
+   These are made visible to non-reentrant scanners for convenience. */
+
+int fortranlex_destroy (void );
+
+int fortranget_debug (void );
+
+void fortranset_debug (int debug_flag  );
+
+YY_EXTRA_TYPE fortranget_extra (void );
+
+void fortranset_extra (YY_EXTRA_TYPE user_defined  );
+
+FILE *fortranget_in (void );
+
+void fortranset_in  (FILE * in_str  );
+
+FILE *fortranget_out (void );
+
+void fortranset_out  (FILE * out_str  );
+
+yy_size_t fortranget_leng (void );
+
+char *fortranget_text (void );
+
+int fortranget_lineno (void );
+
+void fortranset_lineno (int line_number  );
+
+/* Macros after this point can all be overridden by user definitions in
+ * section 1.
+ */
+
+#ifndef YY_SKIP_YYWRAP
+#ifdef __cplusplus
+extern "C" int fortranwrap (void );
+#else
+extern int fortranwrap (void );
+#endif
+#endif
+
+    static void yyunput (int c,char *buf_ptr  );
+    
+#ifndef yytext_ptr
+static void yy_flex_strncpy (char *,yyconst char *,int );
+#endif
+
+#ifdef YY_NEED_STRLEN
+static int yy_flex_strlen (yyconst char * );
+#endif
+
+#ifndef YY_NO_INPUT
+
+#ifdef __cplusplus
+static int yyinput (void );
+#else
+static int input (void );
+#endif
+
+#endif
+
+/* Amount of stuff to slurp up with each read. */
+#ifndef YY_READ_BUF_SIZE
+#define YY_READ_BUF_SIZE 8192
+#endif
+
+/* Copy whatever the last rule matched to the standard output. */
+#ifndef ECHO
+/* This used to be an fputs(), but since the string might contain NUL's,
+ * we now use fwrite().
+ */
+#define ECHO fwrite( fortrantext, fortranleng, 1, fortranout )
+#endif
+
+/* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
+ * is returned in "result".
+ */
+#ifndef YY_INPUT
+#define YY_INPUT(buf,result,max_size) \
+	if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
+		{ \
+		int c = '*'; \
+		yy_size_t n; \
+		for ( n = 0; n < max_size && \
+			     (c = getc( fortranin )) != EOF && c != '\n'; ++n ) \
+			buf[n] = (char) c; \
+		if ( c == '\n' ) \
+			buf[n++] = (char) c; \
+		if ( c == EOF && ferror( fortranin ) ) \
+			YY_FATAL_ERROR( "input in flex scanner failed" ); \
+		result = n; \
+		} \
+	else \
+		{ \
+		errno=0; \
+		while ( (result = fread(buf, 1, max_size, fortranin))==0 && ferror(fortranin)) \
+			{ \
+			if( errno != EINTR) \
+				{ \
+				YY_FATAL_ERROR( "input in flex scanner failed" ); \
+				break; \
+				} \
+			errno=0; \
+			clearerr(fortranin); \
+			} \
+		}\
+\
+
+#endif
+
+/* No semi-colon after return; correct usage is to write "yyterminate();" -
+ * we don't want an extra ';' after the "return" because that will cause
+ * some compilers to complain about unreachable statements.
+ */
+#ifndef yyterminate
+#define yyterminate() return YY_NULL
+#endif
+
+/* Number of entries by which start-condition stack grows. */
+#ifndef YY_START_STACK_INCR
+#define YY_START_STACK_INCR 25
+#endif
+
+/* Report a fatal error. */
+#ifndef YY_FATAL_ERROR
+#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
+#endif
+
+/* end tables serialization structures and prototypes */
+
+/* Default declaration of generated scanner - a define so the user can
+ * easily add parameters.
+ */
+#ifndef YY_DECL
+#define YY_DECL_IS_OURS 1
+
+extern int fortranlex (void);
+
+#define YY_DECL int fortranlex (void)
+#endif /* !YY_DECL */
+
+/* Code executed at the beginning of each rule, after fortrantext and fortranleng
+ * have been set up.
+ */
+#ifndef YY_USER_ACTION
+#define YY_USER_ACTION
+#endif
+
+/* Code executed at the end of each rule. */
+#ifndef YY_BREAK
+#define YY_BREAK break;
+#endif
+
+#define YY_RULE_SETUP \
+	if ( fortranleng > 0 ) \
+		YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \
+				(fortrantext[fortranleng - 1] == '\n'); \
+	YY_USER_ACTION
+
+/** The main scanner function which does all the work.
+ */
+YY_DECL
+{
+	register yy_state_type yy_current_state;
+	register char *yy_cp, *yy_bp;
+	register int yy_act;
+    
+#line 107 "fortran.lex"
+
+  if (infixed) BEGIN(fortran77style) ;
+  if (infree) BEGIN(fortran90style)  ;
+
+#line 3174 "fortran.yy.c"
+
+	if ( !(yy_init) )
+		{
+		(yy_init) = 1;
+
+#ifdef YY_USER_INIT
+		YY_USER_INIT;
+#endif
+
+		if ( ! (yy_start) )
+			(yy_start) = 1;	/* first start state */
+
+		if ( ! fortranin )
+			fortranin = stdin;
+
+		if ( ! fortranout )
+			fortranout = stdout;
+
+		if ( ! YY_CURRENT_BUFFER ) {
+			fortranensure_buffer_stack ();
+			YY_CURRENT_BUFFER_LVALUE =
+				fortran_create_buffer(fortranin,YY_BUF_SIZE );
+		}
+
+		fortran_load_buffer_state( );
+		}
+
+	while ( 1 )		/* loops until end-of-file is reached */
+		{
+		yy_cp = (yy_c_buf_p);
+
+		/* Support of fortrantext. */
+		*yy_cp = (yy_hold_char);
+
+		/* yy_bp points to the position in yy_ch_buf of the start of
+		 * the current run.
+		 */
+		yy_bp = yy_cp;
+
+		yy_current_state = (yy_start);
+		yy_current_state += YY_AT_BOL();
+yy_match:
+		do
+			{
+			register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
+			if ( yy_accept[yy_current_state] )
+				{
+				(yy_last_accepting_state) = yy_current_state;
+				(yy_last_accepting_cpos) = yy_cp;
+				}
+			while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
+				{
+				yy_current_state = (int) yy_def[yy_current_state];
+				if ( yy_current_state >= 1162 )
+					yy_c = yy_meta[(unsigned int) yy_c];
+				}
+			yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
+			++yy_cp;
+			}
+		while ( yy_base[yy_current_state] != 9159 );
+
+yy_find_action:
+		yy_act = yy_accept[yy_current_state];
+		if ( yy_act == 0 )
+			{ /* have to back up */
+			yy_cp = (yy_last_accepting_cpos);
+			yy_current_state = (yy_last_accepting_state);
+			yy_act = yy_accept[yy_current_state];
+			}
+
+		YY_DO_BEFORE_ACTION;
+
+do_action:	/* This label is used only to access EOF actions. */
+
+		switch ( yy_act )
+	{ /* beginning of action switch */
+			case 0: /* must back up */
+			/* undo the effects of YY_DO_BEFORE_ACTION */
+			*yy_cp = (yy_hold_char);
+			yy_cp = (yy_last_accepting_cpos);
+			yy_current_state = (yy_last_accepting_state);
+			goto yy_find_action;
+
+case 1:
+YY_RULE_SETUP
+#line 111 "fortran.lex"
+return TOK_DEBUT;
+	YY_BREAK
+case 2:
+YY_RULE_SETUP
+#line 112 "fortran.lex"
+return TOK_FIN;
+	YY_BREAK
+case 3:
+YY_RULE_SETUP
+#line 113 "fortran.lex"
+return TOK_OMP;
+	YY_BREAK
+case 4:
+YY_RULE_SETUP
+#line 114 "fortran.lex"
+return TOK_DOLLAR;
+	YY_BREAK
+case 5:
+YY_RULE_SETUP
+#line 116 "fortran.lex"
+{return TOK_REAL8;}
+	YY_BREAK
+case 6:
+YY_RULE_SETUP
+#line 117 "fortran.lex"
+{return TOK_SUBROUTINE;}
+	YY_BREAK
+case 7:
+YY_RULE_SETUP
+#line 118 "fortran.lex"
+{return TOK_PROGRAM;}
+	YY_BREAK
+case 8:
+YY_RULE_SETUP
+#line 119 "fortran.lex"
+{inallocate = 1; return TOK_ALLOCATE;}
+	YY_BREAK
+case 9:
+YY_RULE_SETUP
+#line 120 "fortran.lex"
+{return TOK_NULLIFY;}
+	YY_BREAK
+case 10:
+YY_RULE_SETUP
+#line 121 "fortran.lex"
+{inallocate = 1; return TOK_DEALLOCATE;}
+	YY_BREAK
+case 11:
+YY_RULE_SETUP
+#line 122 "fortran.lex"
+{return TOK_RESULT;}
+	YY_BREAK
+case 12:
+YY_RULE_SETUP
+#line 123 "fortran.lex"
+{return TOK_FUNCTION;}
+	YY_BREAK
+case 13:
+YY_RULE_SETUP
+#line 124 "fortran.lex"
+{strcpy(yylval.na,fortrantext);return TOK_ENDSUBROUTINE;}
+	YY_BREAK
+case 14:
+YY_RULE_SETUP
+#line 125 "fortran.lex"
+{strcpy(yylval.na,fortrantext);return TOK_ENDPROGRAM;}
+	YY_BREAK
+case 15:
+YY_RULE_SETUP
+#line 126 "fortran.lex"
+{strcpy(yylval.na,fortrantext);return TOK_ENDFUNCTION;}
+	YY_BREAK
+case 16:
+YY_RULE_SETUP
+#line 127 "fortran.lex"
+{strcpy(yylval.na,fortrantext);return TOK_ENDUNIT;}
+	YY_BREAK
+case 17:
+YY_RULE_SETUP
+#line 128 "fortran.lex"
+return TOK_INCLUDE;
+	YY_BREAK
+case 18:
+YY_RULE_SETUP
+#line 129 "fortran.lex"
+{
+                            strcpy(yylval.na,fortrantext);
+                            tmpc = input();
+                            unput(tmpc);
+                            if ( (
+                               tmpc >= 'a' && tmpc <= 'z'
+                                  ) || (
+                               tmpc >= 'A' && tmpc <= 'Z'
+                               )  )
+                               {
+                                  return TOK_USE;
+                               }
+                               else
+                               {
+                                  return TOK_NAME;
+                               }
+                         }
+	YY_BREAK
+case 19:
+YY_RULE_SETUP
+#line 146 "fortran.lex"
+{return TOK_REWIND;}
+	YY_BREAK
+case 20:
+YY_RULE_SETUP
+#line 147 "fortran.lex"
+return TOK_IMPLICIT;
+	YY_BREAK
+case 21:
+YY_RULE_SETUP
+#line 148 "fortran.lex"
+return TOK_NONE;
+	YY_BREAK
+case 22:
+YY_RULE_SETUP
+#line 149 "fortran.lex"
+return TOK_CALL;
+	YY_BREAK
+case 23:
+YY_RULE_SETUP
+#line 150 "fortran.lex"
+return TOK_TRUE;
+	YY_BREAK
+case 24:
+YY_RULE_SETUP
+#line 151 "fortran.lex"
+return TOK_FALSE;
+	YY_BREAK
+case 25:
+YY_RULE_SETUP
+#line 152 "fortran.lex"
+{return TOK_POINT_TO;}
+	YY_BREAK
+case 26:
+YY_RULE_SETUP
+#line 153 "fortran.lex"
+{strcpy(yylval.na,fortrantext);return TOK_DASTER;}
+	YY_BREAK
+case 27:
+YY_RULE_SETUP
+#line 154 "fortran.lex"
+{strcpy(yylval.na,fortrantext);return TOK_EQV;}
+	YY_BREAK
+case 28:
+YY_RULE_SETUP
+#line 155 "fortran.lex"
+{strcpy(yylval.na,fortrantext);return TOK_EQ;}
+	YY_BREAK
+case 29:
+YY_RULE_SETUP
+#line 156 "fortran.lex"
+{strcpy(yylval.na,fortrantext);return TOK_GT;}
+	YY_BREAK
+case 30:
+YY_RULE_SETUP
+#line 157 "fortran.lex"
+{strcpy(yylval.na,fortrantext);return TOK_GE;}
+	YY_BREAK
+case 31:
+YY_RULE_SETUP
+#line 158 "fortran.lex"
+{strcpy(yylval.na,fortrantext);return TOK_LT;}
+	YY_BREAK
+case 32:
+YY_RULE_SETUP
+#line 159 "fortran.lex"
+{strcpy(yylval.na,fortrantext);return TOK_LE;}
+	YY_BREAK
+case 33:
+YY_RULE_SETUP
+#line 160 "fortran.lex"
+{strcpy(yylval.na,fortrantext);return TOK_NEQV;}
+	YY_BREAK
+case 34:
+YY_RULE_SETUP
+#line 161 "fortran.lex"
+{strcpy(yylval.na,fortrantext);return TOK_NE;}
+	YY_BREAK
+case 35:
+YY_RULE_SETUP
+#line 162 "fortran.lex"
+{strcpy(yylval.na,fortrantext);return TOK_NOT;}
+	YY_BREAK
+case 36:
+YY_RULE_SETUP
+#line 163 "fortran.lex"
+{strcpy(yylval.na,fortrantext);return TOK_OR;}
+	YY_BREAK
+case 37:
+YY_RULE_SETUP
+#line 164 "fortran.lex"
+{strcpy(yylval.na,fortrantext);return TOK_XOR;}
+	YY_BREAK
+case 38:
+YY_RULE_SETUP
+#line 165 "fortran.lex"
+{strcpy(yylval.na,fortrantext);return TOK_AND;}
+	YY_BREAK
+case 39:
+YY_RULE_SETUP
+#line 166 "fortran.lex"
+{return TOK_MODULE;}
+	YY_BREAK
+case 40:
+YY_RULE_SETUP
+#line 167 "fortran.lex"
+{return TOK_DOWHILE;}
+	YY_BREAK
+case 41:
+YY_RULE_SETUP
+#line 168 "fortran.lex"
+return TOK_ENDMODULE;
+	YY_BREAK
+case 42:
+YY_RULE_SETUP
+#line 169 "fortran.lex"
+return TOK_ENDDO;
+	YY_BREAK
+case 43:
+YY_RULE_SETUP
+#line 170 "fortran.lex"
+{return TOK_PLAINDO;}
+	YY_BREAK
+case 44:
+YY_RULE_SETUP
+#line 171 "fortran.lex"
+{strcpy(yylval.na,fortrantext);return TOK_REAL;}
+	YY_BREAK
+case 45:
+YY_RULE_SETUP
+#line 172 "fortran.lex"
+{strcpy(yylval.na,fortrantext);return TOK_INTEGER;}
+	YY_BREAK
+case 46:
+YY_RULE_SETUP
+#line 173 "fortran.lex"
+{strcpy(yylval.na,fortrantext);return TOK_LOGICAL;}
+	YY_BREAK
+case 47:
+YY_RULE_SETUP
+#line 174 "fortran.lex"
+{strcpy(yylval.na,fortrantext);return TOK_CHARACTER;}
+	YY_BREAK
+case 48:
+YY_RULE_SETUP
+#line 175 "fortran.lex"
+{return TOK_ALLOCATABLE;}
+	YY_BREAK
+case 49:
+YY_RULE_SETUP
+#line 176 "fortran.lex"
+return TOK_CLOSE;
+	YY_BREAK
+case 50:
+YY_RULE_SETUP
+#line 177 "fortran.lex"
+return TOK_INQUIRE;
+	YY_BREAK
+case 51:
+YY_RULE_SETUP
+#line 178 "fortran.lex"
+{return TOK_DIMENSION;}
+	YY_BREAK
+case 52:
+YY_RULE_SETUP
+#line 179 "fortran.lex"
+return TOK_PAUSE;
+	YY_BREAK
+case 53:
+YY_RULE_SETUP
+#line 180 "fortran.lex"
+return TOK_EQUIVALENCE;
+	YY_BREAK
+case 54:
+YY_RULE_SETUP
+#line 181 "fortran.lex"
+return TOK_STOP;
+	YY_BREAK
+case 55:
+YY_RULE_SETUP
+#line 182 "fortran.lex"
+return TOK_WHERE;
+	YY_BREAK
+case 56:
+YY_RULE_SETUP
+#line 183 "fortran.lex"
+return TOK_ENDWHERE;
+	YY_BREAK
+case 57:
+YY_RULE_SETUP
+#line 184 "fortran.lex"
+return TOK_ELSEWHERE;
+	YY_BREAK
+case 58:
+YY_RULE_SETUP
+#line 185 "fortran.lex"
+{return TOK_COMPLEX;}
+	YY_BREAK
+case 59:
+YY_RULE_SETUP
+#line 186 "fortran.lex"
+{return TOK_CONTAINS;}
+	YY_BREAK
+case 60:
+YY_RULE_SETUP
+#line 187 "fortran.lex"
+{return TOK_ONLY;}
+	YY_BREAK
+case 61:
+YY_RULE_SETUP
+#line 188 "fortran.lex"
+{return TOK_PARAMETER;}
+	YY_BREAK
+case 62:
+YY_RULE_SETUP
+#line 189 "fortran.lex"
+{return TOK_RECURSIVE;}
+	YY_BREAK
+case 63:
+YY_RULE_SETUP
+#line 190 "fortran.lex"
+{return TOK_COMMON;}
+	YY_BREAK
+case 64:
+YY_RULE_SETUP
+#line 191 "fortran.lex"
+{return TOK_GLOBAL;}
+	YY_BREAK
+case 65:
+YY_RULE_SETUP
+#line 192 "fortran.lex"
+{return TOK_EXTERNAL;}
+	YY_BREAK
+case 66:
+YY_RULE_SETUP
+#line 193 "fortran.lex"
+{return TOK_INTENT;}
+	YY_BREAK
+case 67:
+YY_RULE_SETUP
+#line 194 "fortran.lex"
+{return TOK_POINTER;}
+	YY_BREAK
+case 68:
+YY_RULE_SETUP
+#line 195 "fortran.lex"
+{return TOK_OPTIONAL;}
+	YY_BREAK
+case 69:
+YY_RULE_SETUP
+#line 196 "fortran.lex"
+{return TOK_SAVE;}
+	YY_BREAK
+case 70:
+YY_RULE_SETUP
+#line 197 "fortran.lex"
+{return TOK_TYPE;}
+	YY_BREAK
+case 71:
+YY_RULE_SETUP
+#line 198 "fortran.lex"
+{return TOK_TYPEPAR;}
+	YY_BREAK
+case 72:
+YY_RULE_SETUP
+#line 199 "fortran.lex"
+{if (inallocate == 1) return TOK_STAT; else {strcpy(yylval.na,fortrantext);return TOK_NAME;}}
+	YY_BREAK
+case 73:
+YY_RULE_SETUP
+#line 200 "fortran.lex"
+{return TOK_ENDTYPE;}
+	YY_BREAK
+case 74:
+YY_RULE_SETUP
+#line 201 "fortran.lex"
+return TOK_OPEN;
+	YY_BREAK
+case 75:
+YY_RULE_SETUP
+#line 202 "fortran.lex"
+return TOK_RETURN;
+	YY_BREAK
+case 76:
+/* rule 76 can match eol */
+YY_RULE_SETUP
+#line 203 "fortran.lex"
+return TOK_EXIT;
+	YY_BREAK
+case 77:
+YY_RULE_SETUP
+#line 204 "fortran.lex"
+return TOK_PRINT;
+	YY_BREAK
+case 78:
+YY_RULE_SETUP
+#line 205 "fortran.lex"
+{return TOK_PROCEDURE;}
+	YY_BREAK
+case 79:
+YY_RULE_SETUP
+#line 206 "fortran.lex"
+{return TOK_READ;}
+	YY_BREAK
+case 80:
+YY_RULE_SETUP
+#line 207 "fortran.lex"
+{return TOK_NAMELIST;}
+	YY_BREAK
+case 81:
+YY_RULE_SETUP
+#line 208 "fortran.lex"
+{return TOK_WRITE;}
+	YY_BREAK
+case 82:
+YY_RULE_SETUP
+#line 209 "fortran.lex"
+{return TOK_TARGET;}
+	YY_BREAK
+case 83:
+YY_RULE_SETUP
+#line 210 "fortran.lex"
+{return TOK_PUBLIC;}
+	YY_BREAK
+case 84:
+YY_RULE_SETUP
+#line 211 "fortran.lex"
+{return TOK_PRIVATE;}
+	YY_BREAK
+case 85:
+YY_RULE_SETUP
+#line 212 "fortran.lex"
+{strcpy(yylval.nac,fortrantext);return TOK_IN;}
+	YY_BREAK
+case 86:
+YY_RULE_SETUP
+#line 213 "fortran.lex"
+{strcpy(yylval.na,fortrantext);return TOK_DATA;}
+	YY_BREAK
+case 87:
+YY_RULE_SETUP
+#line 214 "fortran.lex"
+return TOK_CONTINUE;
+	YY_BREAK
+case 88:
+YY_RULE_SETUP
+#line 215 "fortran.lex"
+{return TOK_PLAINGOTO;}
+	YY_BREAK
+case 89:
+YY_RULE_SETUP
+#line 216 "fortran.lex"
+{strcpy(yylval.nac,fortrantext);return TOK_OUT;}
+	YY_BREAK
+case 90:
+YY_RULE_SETUP
+#line 217 "fortran.lex"
+{strcpy(yylval.nac,fortrantext);return TOK_INOUT;}
+	YY_BREAK
+case 91:
+YY_RULE_SETUP
+#line 218 "fortran.lex"
+{return TOK_INTRINSIC;}
+	YY_BREAK
+case 92:
+YY_RULE_SETUP
+#line 219 "fortran.lex"
+{return TOK_THEN;}
+	YY_BREAK
+case 93:
+YY_RULE_SETUP
+#line 220 "fortran.lex"
+{return TOK_ELSEIF;}
+	YY_BREAK
+case 94:
+YY_RULE_SETUP
+#line 221 "fortran.lex"
+{return TOK_ELSE;}
+	YY_BREAK
+case 95:
+YY_RULE_SETUP
+#line 222 "fortran.lex"
+{return TOK_ENDIF;}
+	YY_BREAK
+case 96:
+YY_RULE_SETUP
+#line 223 "fortran.lex"
+{return TOK_LOGICALIF;}
+	YY_BREAK
+case 97:
+YY_RULE_SETUP
+#line 224 "fortran.lex"
+{return TOK_SUM;}
+	YY_BREAK
+case 98:
+YY_RULE_SETUP
+#line 225 "fortran.lex"
+{return TOK_MAX;}
+	YY_BREAK
+case 99:
+YY_RULE_SETUP
+#line 226 "fortran.lex"
+{return TOK_TANH;}
+	YY_BREAK
+case 100:
+YY_RULE_SETUP
+#line 227 "fortran.lex"
+{return TOK_MAXVAL;}
+	YY_BREAK
+case 101:
+YY_RULE_SETUP
+#line 228 "fortran.lex"
+{return TOK_TRIM;}
+	YY_BREAK
+case 102:
+YY_RULE_SETUP
+#line 229 "fortran.lex"
+{return TOK_SQRT;}
+	YY_BREAK
+case 103:
+YY_RULE_SETUP
+#line 230 "fortran.lex"
+{return TOK_SELECTCASE;}
+	YY_BREAK
+case 104:
+YY_RULE_SETUP
+#line 231 "fortran.lex"
+{return TOK_CASE;}
+	YY_BREAK
+case 105:
+YY_RULE_SETUP
+#line 232 "fortran.lex"
+{return TOK_CASEDEFAULT;}
+	YY_BREAK
+case 106:
+YY_RULE_SETUP
+#line 233 "fortran.lex"
+{return TOK_ENDSELECT;}
+	YY_BREAK
+case 107:
+YY_RULE_SETUP
+#line 234 "fortran.lex"
+{return TOK_FILE;}
+	YY_BREAK
+case 108:
+YY_RULE_SETUP
+#line 235 "fortran.lex"
+{return TOK_END;}
+	YY_BREAK
+case 109:
+YY_RULE_SETUP
+#line 236 "fortran.lex"
+{return TOK_ERR;}
+	YY_BREAK
+case 110:
+YY_RULE_SETUP
+#line 237 "fortran.lex"
+{return TOK_EXIST;}
+	YY_BREAK
+case 111:
+YY_RULE_SETUP
+#line 238 "fortran.lex"
+{return TOK_MIN;}
+	YY_BREAK
+case 112:
+YY_RULE_SETUP
+#line 239 "fortran.lex"
+{return TOK_NINT;}
+	YY_BREAK
+case 113:
+YY_RULE_SETUP
+#line 240 "fortran.lex"
+{return TOK_FLOAT;}
+	YY_BREAK
+case 114:
+YY_RULE_SETUP
+#line 241 "fortran.lex"
+{return TOK_EXP;}
+	YY_BREAK
+case 115:
+YY_RULE_SETUP
+#line 242 "fortran.lex"
+{return TOK_COS;}
+	YY_BREAK
+case 116:
+YY_RULE_SETUP
+#line 243 "fortran.lex"
+{return TOK_COSH;}
+	YY_BREAK
+case 117:
+YY_RULE_SETUP
+#line 244 "fortran.lex"
+{return TOK_ACOS;}
+	YY_BREAK
+case 118:
+YY_RULE_SETUP
+#line 245 "fortran.lex"
+{return TOK_SIN;}
+	YY_BREAK
+case 119:
+YY_RULE_SETUP
+#line 246 "fortran.lex"
+{return TOK_SINH;}
+	YY_BREAK
+case 120:
+YY_RULE_SETUP
+#line 247 "fortran.lex"
+{return TOK_ASIN;}
+	YY_BREAK
+case 121:
+YY_RULE_SETUP
+#line 248 "fortran.lex"
+{return TOK_LOG;}
+	YY_BREAK
+case 122:
+YY_RULE_SETUP
+#line 249 "fortran.lex"
+{return TOK_TAN;}
+	YY_BREAK
+case 123:
+YY_RULE_SETUP
+#line 250 "fortran.lex"
+{return TOK_ATAN;}
+	YY_BREAK
+case 124:
+YY_RULE_SETUP
+#line 251 "fortran.lex"
+{return TOK_CYCLE;}
+	YY_BREAK
+case 125:
+YY_RULE_SETUP
+#line 252 "fortran.lex"
+{return TOK_ABS;}
+	YY_BREAK
+case 126:
+YY_RULE_SETUP
+#line 253 "fortran.lex"
+{return TOK_MOD;}
+	YY_BREAK
+case 127:
+YY_RULE_SETUP
+#line 254 "fortran.lex"
+{return TOK_SIGN;}
+	YY_BREAK
+case 128:
+YY_RULE_SETUP
+#line 255 "fortran.lex"
+{return TOK_MINLOC;}
+	YY_BREAK
+case 129:
+YY_RULE_SETUP
+#line 256 "fortran.lex"
+{return TOK_MAXLOC;}
+	YY_BREAK
+case 130:
+YY_RULE_SETUP
+#line 257 "fortran.lex"
+{return TOK_MINVAL;}
+	YY_BREAK
+case 131:
+YY_RULE_SETUP
+#line 258 "fortran.lex"
+{return TOK_BACKSPACE;}
+	YY_BREAK
+case 132:
+YY_RULE_SETUP
+#line 259 "fortran.lex"
+{return TOK_LEFTAB;}
+	YY_BREAK
+case 133:
+YY_RULE_SETUP
+#line 260 "fortran.lex"
+{return TOK_RIGHTAB;}
+	YY_BREAK
+case 134:
+/* rule 134 can match eol */
+YY_RULE_SETUP
+#line 261 "fortran.lex"
+{return TOK_FORMAT;}
+	YY_BREAK
+case 135:
+YY_RULE_SETUP
+#line 262 "fortran.lex"
+{strcpy(yylval.na,fortrantext);return TOK_DOUBLEPRECISION;}
+	YY_BREAK
+case 136:
+YY_RULE_SETUP
+#line 263 "fortran.lex"
+{strcpy(yylval.na,fortrantext);return TOK_DOUBLECOMPLEX;}
+	YY_BREAK
+case 137:
+YY_RULE_SETUP
+#line 264 "fortran.lex"
+{strcpy(yylval.na,fortrantext);return TOK_SLASH;}
+	YY_BREAK
+case 138:
+YY_RULE_SETUP
+#line 265 "fortran.lex"
+{strcpy(yylval.na,fortrantext);return TOK_DSLASH;}
+	YY_BREAK
+case 139:
+/* rule 139 can match eol */
+YY_RULE_SETUP
+#line 266 "fortran.lex"
+{strcpy(yylval.na,fortrantext);return TOK_CHAR_CUT;}
+	YY_BREAK
+case 140:
+YY_RULE_SETUP
+#line 267 "fortran.lex"
+{strcpy(yylval.na,fortrantext);return TOK_CHAR_CONSTANT;}
+	YY_BREAK
+case 141:
+YY_RULE_SETUP
+#line 268 "fortran.lex"
+{strcpy(yylval.na,fortrantext);return TOK_CHAR_MESSAGE;}
+	YY_BREAK
+case 142:
+YY_RULE_SETUP
+#line 269 "fortran.lex"
+{strcpy(yylval.na,fortrantext);return TOK_CHAR_INT;}
+	YY_BREAK
+case 143:
+YY_RULE_SETUP
+#line 270 "fortran.lex"
+{printf("debug interfacer\n");BEGIN(donottreat);}
+	YY_BREAK
+case 144:
+/* rule 144 can match eol */
+YY_RULE_SETUP
+#line 271 "fortran.lex"
+{
+						BEGIN(INITIAL);
+                        if (infixed) BEGIN(fortran77style) ;
+                        if (infree) BEGIN(fortran90style)  ;
+                        line_num_fortran++;line_num_fortran_common++;
+                        return '\n';
+						}
+	YY_BREAK
+case 145:
+YY_RULE_SETUP
+#line 278 "fortran.lex"
+{strcpy(yylval.na,fortrantext);return TOK_NAME;}
+	YY_BREAK
+case 146:
+YY_RULE_SETUP
+#line 279 "fortran.lex"
+{strcpy(yylval.na,fortrantext);return TOK_CSTREAL;}
+	YY_BREAK
+case 147:
+YY_RULE_SETUP
+#line 280 "fortran.lex"
+{strcpy(yylval.na,fortrantext);return TOK_CSTREALDP;}
+	YY_BREAK
+case 148:
+YY_RULE_SETUP
+#line 281 "fortran.lex"
+{strcpy(yylval.na,fortrantext);return TOK_CSTREALQP;}
+	YY_BREAK
+case 149:
+/* rule 149 can match eol */
+*yy_cp = (yy_hold_char); /* undo effects of setting up fortrantext */
+(yy_c_buf_p) = yy_cp -= 1;
+YY_DO_BEFORE_ACTION; /* set up fortrantext again */
+YY_RULE_SETUP
+#line 282 "fortran.lex"
+{strcpy(yylval.na,fortrantext);return TOK_CSTREAL;}
+	YY_BREAK
+case 150:
+YY_RULE_SETUP
+#line 283 "fortran.lex"
+{strcpy(yylval.na,fortrantext);return TOK_CSTINT;}
+	YY_BREAK
+case 151:
+YY_RULE_SETUP
+#line 284 "fortran.lex"
+{}
+	YY_BREAK
+case 152:
+YY_RULE_SETUP
+#line 285 "fortran.lex"
+{return TOK_QUOTE;}
+	YY_BREAK
+case 153:
+YY_RULE_SETUP
+#line 286 "fortran.lex"
+{}
+	YY_BREAK
+case 154:
+YY_RULE_SETUP
+#line 287 "fortran.lex"
+{strcpy(yylval.na,fortrantext);return (int) *fortrantext;}
+	YY_BREAK
+case 155:
+YY_RULE_SETUP
+#line 288 "fortran.lex"
+{afterpercent = 1; strcpy(yylval.na,fortrantext);return (int) *fortrantext;}
+	YY_BREAK
+case 156:
+YY_RULE_SETUP
+#line 289 "fortran.lex"
+{return TOK_SEMICOLON;}
+	YY_BREAK
+case 157:
+YY_RULE_SETUP
+#line 290 "fortran.lex"
+{return (int) *fortrantext;}
+	YY_BREAK
+case 158:
+YY_RULE_SETUP
+#line 291 "fortran.lex"
+{return (int) *fortrantext;}
+	YY_BREAK
+case 159:
+YY_RULE_SETUP
+#line 292 "fortran.lex"
+{return (int) *fortrantext;}
+	YY_BREAK
+case 160:
+YY_RULE_SETUP
+#line 293 "fortran.lex"
+{return (int) *fortrantext;}
+	YY_BREAK
+case 161:
+/* rule 161 can match eol */
+YY_RULE_SETUP
+#line 294 "fortran.lex"
+{colnum=0;line_num_fortran++;line_num_fortran_common++; return (int) *fortrantext;}
+	YY_BREAK
+case 162:
+*yy_cp = (yy_hold_char); /* undo effects of setting up fortrantext */
+(yy_c_buf_p) = yy_cp -= 1;
+YY_DO_BEFORE_ACTION; /* set up fortrantext again */
+YY_RULE_SETUP
+#line 295 "fortran.lex"
+
+	YY_BREAK
+case 163:
+YY_RULE_SETUP
+#line 296 "fortran.lex"
+{if (newlinef90 == 0) return TOK_LABEL; else newlinef90 = 0;}
+	YY_BREAK
+case 164:
+YY_RULE_SETUP
+#line 297 "fortran.lex"
+
+	YY_BREAK
+case 165:
+YY_RULE_SETUP
+#line 298 "fortran.lex"
+{colnum=colnum-1+tabsize;}
+	YY_BREAK
+case 166:
+YY_RULE_SETUP
+#line 299 "fortran.lex"
+;
+	YY_BREAK
+case 167:
+/* rule 167 can match eol */
+YY_RULE_SETUP
+#line 300 "fortran.lex"
+{line_num_fortran++;line_num_fortran_common++;newlinef90=1;colnum=0;}
+	YY_BREAK
+case 168:
+/* rule 168 can match eol */
+YY_RULE_SETUP
+#line 301 "fortran.lex"
+{line_num_fortran++;line_num_fortran_common++;colnum=0;}
+	YY_BREAK
+case 169:
+/* rule 169 can match eol */
+YY_RULE_SETUP
+#line 302 "fortran.lex"
+{
+                           convert2lower(motparse1);
+                           if ( strncasecmp(motparse1,"contains",8) == 0 )
+                           {
+                              return TOK_CONTAINS;
+                           }
+                           else
+                           {
+                            /*  colnum=0;line_num_fortran++;line_num_fortran_common++;*/
+                             if ( !strcasecmp(motparse1,"C$AGRIF_DO_NOT_TREAT\n")) 
+                             return TOK_DONOTTREAT;
+                             if ( !strcasecmp(motparse1,"C$AGRIF_END_DO_NOT_TREAT\n")) return TOK_ENDDONOTTREAT;
+                             unput('\n');
+                           }
+                         }
+	YY_BREAK
+case 170:
+/* rule 170 can match eol */
+YY_RULE_SETUP
+#line 317 "fortran.lex"
+{
+                           convert2lower(&motparse1[1]);
+                           if ( strncasecmp(&motparse1[1],"contains",8) == 0 )
+                           {
+                              return TOK_CONTAINS;
+                           }
+                           else
+                           {
+                             /* colnum=0;line_num_fortran++;line_num_fortran_common++;*/
+                             if ( !strcasecmp(&motparse1[1],"C$AGRIF_DO_NOT_TREAT\n")) 
+                             return TOK_DONOTTREAT;
+                             if ( !strcasecmp(&motparse1[1],"C$AGRIF_END_DO_NOT_TREAT\n")) return TOK_ENDDONOTTREAT;
+                             unput('\n');
+                           }
+                         }                            
+	YY_BREAK
+case 171:
+/* rule 171 can match eol */
+YY_RULE_SETUP
+#line 332 "fortran.lex"
+{
+						BEGIN(donottreat);
+						}
+	YY_BREAK
+case 172:
+/* rule 172 can match eol */
+YY_RULE_SETUP
+#line 335 "fortran.lex"
+{
+						BEGIN(INITIAL);
+                        if (infixed) BEGIN(fortran77style) ;
+                        if (infree) BEGIN(fortran90style)  ;
+                        line_num_fortran++;line_num_fortran_common++;
+                        return '\n';
+						}
+	YY_BREAK
+case 173:
+/* rule 173 can match eol */
+YY_RULE_SETUP
+#line 342 "fortran.lex"
+{line_num_fortran++;line_num_fortran_common++;}
+	YY_BREAK
+case 174:
+/* rule 174 can match eol */
+YY_RULE_SETUP
+#line 343 "fortran.lex"
+{
+                             colnum = 0;
+                             if ( !strcasecmp(motparse1,"!$AGRIF_DO_NOT_TREAT\n")) return TOK_DONOTTREAT;
+                             if ( !strcasecmp(motparse1,"!$AGRIF_END_DO_NOT_TREAT\n")) return TOK_ENDDONOTTREAT;
+                          }
+	YY_BREAK
+case 175:
+YY_RULE_SETUP
+#line 348 "fortran.lex"
+{
+                             colnum = 0;
+                             if ( !strcasecmp(motparse1,"!$AGRIF_DO_NOT_TREAT\n")) return TOK_DONOTTREAT;
+                             if ( !strcasecmp(motparse1,"!$AGRIF_END_DO_NOT_TREAT\n")) return TOK_ENDDONOTTREAT;
+                          }
+	YY_BREAK
+case 176:
+YY_RULE_SETUP
+#line 353 "fortran.lex"
+ECHO;
+	YY_BREAK
+#line 4224 "fortran.yy.c"
+case YY_STATE_EOF(INITIAL):
+case YY_STATE_EOF(parameter):
+case YY_STATE_EOF(character):
+case YY_STATE_EOF(donottreat):
+case YY_STATE_EOF(fortran77style):
+case YY_STATE_EOF(fortran90style):
+	yyterminate();
+
+	case YY_END_OF_BUFFER:
+		{
+		/* Amount of text matched not including the EOB char. */
+		int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
+
+		/* Undo the effects of YY_DO_BEFORE_ACTION. */
+		*yy_cp = (yy_hold_char);
+		YY_RESTORE_YY_MORE_OFFSET
+
+		if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
+			{
+			/* We're scanning a new file or input source.  It's
+			 * possible that this happened because the user
+			 * just pointed fortranin at a new source and called
+			 * fortranlex().  If so, then we have to assure
+			 * consistency between YY_CURRENT_BUFFER and our
+			 * globals.  Here is the right place to do so, because
+			 * this is the first action (other than possibly a
+			 * back-up) that will match for the new input source.
+			 */
+			(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
+			YY_CURRENT_BUFFER_LVALUE->yy_input_file = fortranin;
+			YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
+			}
+
+		/* Note that here we test for yy_c_buf_p "<=" to the position
+		 * of the first EOB in the buffer, since yy_c_buf_p will
+		 * already have been incremented past the NUL character
+		 * (since all states make transitions on EOB to the
+		 * end-of-buffer state).  Contrast this with the test
+		 * in input().
+		 */
+		if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
+			{ /* This was really a NUL. */
+			yy_state_type yy_next_state;
+
+			(yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
+
+			yy_current_state = yy_get_previous_state(  );
+
+			/* Okay, we're now positioned to make the NUL
+			 * transition.  We couldn't have
+			 * yy_get_previous_state() go ahead and do it
+			 * for us because it doesn't know how to deal
+			 * with the possibility of jamming (and we don't
+			 * want to build jamming into it because then it
+			 * will run more slowly).
+			 */
+
+			yy_next_state = yy_try_NUL_trans( yy_current_state );
+
+			yy_bp = (yytext_ptr) + YY_MORE_ADJ;
+
+			if ( yy_next_state )
+				{
+				/* Consume the NUL. */
+				yy_cp = ++(yy_c_buf_p);
+				yy_current_state = yy_next_state;
+				goto yy_match;
+				}
+
+			else
+				{
+				yy_cp = (yy_c_buf_p);
+				goto yy_find_action;
+				}
+			}
+
+		else switch ( yy_get_next_buffer(  ) )
+			{
+			case EOB_ACT_END_OF_FILE:
+				{
+				(yy_did_buffer_switch_on_eof) = 0;
+
+				if ( fortranwrap( ) )
+					{
+					/* Note: because we've taken care in
+					 * yy_get_next_buffer() to have set up
+					 * fortrantext, we can now set up
+					 * yy_c_buf_p so that if some total
+					 * hoser (like flex itself) wants to
+					 * call the scanner after we return the
+					 * YY_NULL, it'll still work - another
+					 * YY_NULL will get returned.
+					 */
+					(yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
+
+					yy_act = YY_STATE_EOF(YY_START);
+					goto do_action;
+					}
+
+				else
+					{
+					if ( ! (yy_did_buffer_switch_on_eof) )
+						YY_NEW_FILE;
+					}
+				break;
+				}
+
+			case EOB_ACT_CONTINUE_SCAN:
+				(yy_c_buf_p) =
+					(yytext_ptr) + yy_amount_of_matched_text;
+
+				yy_current_state = yy_get_previous_state(  );
+
+				yy_cp = (yy_c_buf_p);
+				yy_bp = (yytext_ptr) + YY_MORE_ADJ;
+				goto yy_match;
+
+			case EOB_ACT_LAST_MATCH:
+				(yy_c_buf_p) =
+				&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
+
+				yy_current_state = yy_get_previous_state(  );
+
+				yy_cp = (yy_c_buf_p);
+				yy_bp = (yytext_ptr) + YY_MORE_ADJ;
+				goto yy_find_action;
+			}
+		break;
+		}
+
+	default:
+		YY_FATAL_ERROR(
+			"fatal flex scanner internal error--no action found" );
+	} /* end of action switch */
+		} /* end of scanning one token */
+} /* end of fortranlex */
+
+/* yy_get_next_buffer - try to read in a new buffer
+ *
+ * Returns a code representing an action:
+ *	EOB_ACT_LAST_MATCH -
+ *	EOB_ACT_CONTINUE_SCAN - continue scanning from current position
+ *	EOB_ACT_END_OF_FILE - end of file
+ */
+static int yy_get_next_buffer (void)
+{
+    	register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
+	register char *source = (yytext_ptr);
+	register int number_to_move, i;
+	int ret_val;
+
+	if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
+		YY_FATAL_ERROR(
+		"fatal flex scanner internal error--end of buffer missed" );
+
+	if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
+		{ /* Don't try to fill the buffer, so this is an EOF. */
+		if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
+			{
+			/* We matched a single character, the EOB, so
+			 * treat this as a final EOF.
+			 */
+			return EOB_ACT_END_OF_FILE;
+			}
+
+		else
+			{
+			/* We matched some text prior to the EOB, first
+			 * process it.
+			 */
+			return EOB_ACT_LAST_MATCH;
+			}
+		}
+
+	/* Try to read more data. */
+
+	/* First move last chars to start of buffer. */
+	number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
+
+	for ( i = 0; i < number_to_move; ++i )
+		*(dest++) = *(source++);
+
+	if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
+		/* don't do the read, it's not guaranteed to return an EOF,
+		 * just force an EOF
+		 */
+		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
+
+	else
+		{
+			yy_size_t num_to_read =
+			YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
+
+		while ( num_to_read <= 0 )
+			{ /* Not enough room in the buffer - grow it. */
+
+			/* just a shorter name for the current buffer */
+			YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
+
+			int yy_c_buf_p_offset =
+				(int) ((yy_c_buf_p) - b->yy_ch_buf);
+
+			if ( b->yy_is_our_buffer )
+				{
+				yy_size_t new_size = b->yy_buf_size * 2;
+
+				if ( new_size <= 0 )
+					b->yy_buf_size += b->yy_buf_size / 8;
+				else
+					b->yy_buf_size *= 2;
+
+				b->yy_ch_buf = (char *)
+					/* Include room in for 2 EOB chars. */
+					fortranrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2  );
+				}
+			else
+				/* Can't grow it, we don't own it. */
+				b->yy_ch_buf = 0;
+
+			if ( ! b->yy_ch_buf )
+				YY_FATAL_ERROR(
+				"fatal error - scanner input buffer overflow" );
+
+			(yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
+
+			num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
+						number_to_move - 1;
+
+			}
+
+		if ( num_to_read > YY_READ_BUF_SIZE )
+			num_to_read = YY_READ_BUF_SIZE;
+
+		/* Read in more data. */
+		YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
+			(yy_n_chars), num_to_read );
+
+		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
+		}
+
+	if ( (yy_n_chars) == 0 )
+		{
+		if ( number_to_move == YY_MORE_ADJ )
+			{
+			ret_val = EOB_ACT_END_OF_FILE;
+			fortranrestart(fortranin  );
+			}
+
+		else
+			{
+			ret_val = EOB_ACT_LAST_MATCH;
+			YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
+				YY_BUFFER_EOF_PENDING;
+			}
+		}
+
+	else
+		ret_val = EOB_ACT_CONTINUE_SCAN;
+
+	if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
+		/* Extend the array by 50%, plus the number we really need. */
+		yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
+		YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) fortranrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size  );
+		if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
+			YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
+	}
+
+	(yy_n_chars) += number_to_move;
+	YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
+	YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
+
+	(yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
+
+	return ret_val;
+}
+
+/* yy_get_previous_state - get the state just before the EOB char was reached */
+
+    static yy_state_type yy_get_previous_state (void)
+{
+	register yy_state_type yy_current_state;
+	register char *yy_cp;
+    
+	yy_current_state = (yy_start);
+	yy_current_state += YY_AT_BOL();
+
+	for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
+		{
+		register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
+		if ( yy_accept[yy_current_state] )
+			{
+			(yy_last_accepting_state) = yy_current_state;
+			(yy_last_accepting_cpos) = yy_cp;
+			}
+		while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
+			{
+			yy_current_state = (int) yy_def[yy_current_state];
+			if ( yy_current_state >= 1162 )
+				yy_c = yy_meta[(unsigned int) yy_c];
+			}
+		yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
+		}
+
+	return yy_current_state;
+}
+
+/* yy_try_NUL_trans - try to make a transition on the NUL character
+ *
+ * synopsis
+ *	next_state = yy_try_NUL_trans( current_state );
+ */
+    static yy_state_type yy_try_NUL_trans  (yy_state_type yy_current_state )
+{
+	register int yy_is_jam;
+    	register char *yy_cp = (yy_c_buf_p);
+
+	register YY_CHAR yy_c = 1;
+	if ( yy_accept[yy_current_state] )
+		{
+		(yy_last_accepting_state) = yy_current_state;
+		(yy_last_accepting_cpos) = yy_cp;
+		}
+	while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
+		{
+		yy_current_state = (int) yy_def[yy_current_state];
+		if ( yy_current_state >= 1162 )
+			yy_c = yy_meta[(unsigned int) yy_c];
+		}
+	yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
+	yy_is_jam = (yy_current_state == 1161);
+
+	return yy_is_jam ? 0 : yy_current_state;
+}
+
+    static void yyunput (int c, register char * yy_bp )
+{
+	register char *yy_cp;
+    
+    yy_cp = (yy_c_buf_p);
+
+	/* undo effects of setting up fortrantext */
+	*yy_cp = (yy_hold_char);
+
+	if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
+		{ /* need to shift things up to make room */
+		/* +2 for EOB chars. */
+		register yy_size_t number_to_move = (yy_n_chars) + 2;
+		register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
+					YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
+		register char *source =
+				&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
+
+		while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
+			*--dest = *--source;
+
+		yy_cp += (int) (dest - source);
+		yy_bp += (int) (dest - source);
+		YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
+			(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
+
+		if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
+			YY_FATAL_ERROR( "flex scanner push-back overflow" );
+		}
+
+	*--yy_cp = (char) c;
+
+	(yytext_ptr) = yy_bp;
+	(yy_hold_char) = *yy_cp;
+	(yy_c_buf_p) = yy_cp;
+}
+
+#ifndef YY_NO_INPUT
+#ifdef __cplusplus
+    static int yyinput (void)
+#else
+    static int input  (void)
+#endif
+
+{
+	int c;
+    
+	*(yy_c_buf_p) = (yy_hold_char);
+
+	if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
+		{
+		/* yy_c_buf_p now points to the character we want to return.
+		 * If this occurs *before* the EOB characters, then it's a
+		 * valid NUL; if not, then we've hit the end of the buffer.
+		 */
+		if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
+			/* This was really a NUL. */
+			*(yy_c_buf_p) = '\0';
+
+		else
+			{ /* need more input */
+			yy_size_t offset = (yy_c_buf_p) - (yytext_ptr);
+			++(yy_c_buf_p);
+
+			switch ( yy_get_next_buffer(  ) )
+				{
+				case EOB_ACT_LAST_MATCH:
+					/* This happens because yy_g_n_b()
+					 * sees that we've accumulated a
+					 * token and flags that we need to
+					 * try matching the token before
+					 * proceeding.  But for input(),
+					 * there's no matching to consider.
+					 * So convert the EOB_ACT_LAST_MATCH
+					 * to EOB_ACT_END_OF_FILE.
+					 */
+
+					/* Reset buffer status. */
+					fortranrestart(fortranin );
+
+					/*FALLTHROUGH*/
+
+				case EOB_ACT_END_OF_FILE:
+					{
+					if ( fortranwrap( ) )
+						return 0;
+
+					if ( ! (yy_did_buffer_switch_on_eof) )
+						YY_NEW_FILE;
+#ifdef __cplusplus
+					return yyinput();
+#else
+					return input();
+#endif
+					}
+
+				case EOB_ACT_CONTINUE_SCAN:
+					(yy_c_buf_p) = (yytext_ptr) + offset;
+					break;
+				}
+			}
+		}
+
+	c = *(unsigned char *) (yy_c_buf_p);	/* cast for 8-bit char's */
+	*(yy_c_buf_p) = '\0';	/* preserve fortrantext */
+	(yy_hold_char) = *++(yy_c_buf_p);
+
+	YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n');
+
+	return c;
+}
+#endif	/* ifndef YY_NO_INPUT */
+
+/** Immediately switch to a different input stream.
+ * @param input_file A readable stream.
+ * 
+ * @note This function does not reset the start condition to @c INITIAL .
+ */
+    void fortranrestart  (FILE * input_file )
+{
+    
+	if ( ! YY_CURRENT_BUFFER ){
+        fortranensure_buffer_stack ();
+		YY_CURRENT_BUFFER_LVALUE =
+            fortran_create_buffer(fortranin,YY_BUF_SIZE );
+	}
+
+	fortran_init_buffer(YY_CURRENT_BUFFER,input_file );
+	fortran_load_buffer_state( );
+}
+
+/** Switch to a different input buffer.
+ * @param new_buffer The new input buffer.
+ * 
+ */
+    void fortran_switch_to_buffer  (YY_BUFFER_STATE  new_buffer )
+{
+    
+	/* TODO. We should be able to replace this entire function body
+	 * with
+	 *		fortranpop_buffer_state();
+	 *		fortranpush_buffer_state(new_buffer);
+     */
+	fortranensure_buffer_stack ();
+	if ( YY_CURRENT_BUFFER == new_buffer )
+		return;
+
+	if ( YY_CURRENT_BUFFER )
+		{
+		/* Flush out information for old buffer. */
+		*(yy_c_buf_p) = (yy_hold_char);
+		YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
+		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
+		}
+
+	YY_CURRENT_BUFFER_LVALUE = new_buffer;
+	fortran_load_buffer_state( );
+
+	/* We don't actually know whether we did this switch during
+	 * EOF (fortranwrap()) processing, but the only time this flag
+	 * is looked at is after fortranwrap() is called, so it's safe
+	 * to go ahead and always set it.
+	 */
+	(yy_did_buffer_switch_on_eof) = 1;
+}
+
+static void fortran_load_buffer_state  (void)
+{
+    	(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
+	(yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
+	fortranin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
+	(yy_hold_char) = *(yy_c_buf_p);
+}
+
+/** Allocate and initialize an input buffer state.
+ * @param file A readable stream.
+ * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
+ * 
+ * @return the allocated buffer state.
+ */
+    YY_BUFFER_STATE fortran_create_buffer  (FILE * file, int  size )
+{
+	YY_BUFFER_STATE b;
+    
+	b = (YY_BUFFER_STATE) fortranalloc(sizeof( struct yy_buffer_state )  );
+	if ( ! b )
+		YY_FATAL_ERROR( "out of dynamic memory in fortran_create_buffer()" );
+
+	b->yy_buf_size = size;
+
+	/* yy_ch_buf has to be 2 characters longer than the size given because
+	 * we need to put in 2 end-of-buffer characters.
+	 */
+	b->yy_ch_buf = (char *) fortranalloc(b->yy_buf_size + 2  );
+	if ( ! b->yy_ch_buf )
+		YY_FATAL_ERROR( "out of dynamic memory in fortran_create_buffer()" );
+
+	b->yy_is_our_buffer = 1;
+
+	fortran_init_buffer(b,file );
+
+	return b;
+}
+
+/** Destroy the buffer.
+ * @param b a buffer created with fortran_create_buffer()
+ * 
+ */
+    void fortran_delete_buffer (YY_BUFFER_STATE  b )
+{
+    
+	if ( ! b )
+		return;
+
+	if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
+		YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
+
+	if ( b->yy_is_our_buffer )
+		fortranfree((void *) b->yy_ch_buf  );
+
+	fortranfree((void *) b  );
+}
+
+#ifndef __cplusplus
+extern int isatty (int );
+#endif /* __cplusplus */
+    
+/* Initializes or reinitializes a buffer.
+ * This function is sometimes called more than once on the same buffer,
+ * such as during a fortranrestart() or at EOF.
+ */
+    static void fortran_init_buffer  (YY_BUFFER_STATE  b, FILE * file )
+
+{
+	int oerrno = errno;
+    
+	fortran_flush_buffer(b );
+
+	b->yy_input_file = file;
+	b->yy_fill_buffer = 1;
+
+    /* If b is the current buffer, then fortran_init_buffer was _probably_
+     * called from fortranrestart() or through yy_get_next_buffer.
+     * In that case, we don't want to reset the lineno or column.
+     */
+    if (b != YY_CURRENT_BUFFER){
+        b->yy_bs_lineno = 1;
+        b->yy_bs_column = 0;
+    }
+
+        b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
+    
+	errno = oerrno;
+}
+
+/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
+ * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
+ * 
+ */
+    void fortran_flush_buffer (YY_BUFFER_STATE  b )
+{
+    	if ( ! b )
+		return;
+
+	b->yy_n_chars = 0;
+
+	/* We always need two end-of-buffer characters.  The first causes
+	 * a transition to the end-of-buffer state.  The second causes
+	 * a jam in that state.
+	 */
+	b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
+	b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
+
+	b->yy_buf_pos = &b->yy_ch_buf[0];
+
+	b->yy_at_bol = 1;
+	b->yy_buffer_status = YY_BUFFER_NEW;
+
+	if ( b == YY_CURRENT_BUFFER )
+		fortran_load_buffer_state( );
+}
+
+/** Pushes the new state onto the stack. The new state becomes
+ *  the current state. This function will allocate the stack
+ *  if necessary.
+ *  @param new_buffer The new state.
+ *  
+ */
+void fortranpush_buffer_state (YY_BUFFER_STATE new_buffer )
+{
+    	if (new_buffer == NULL)
+		return;
+
+	fortranensure_buffer_stack();
+
+	/* This block is copied from fortran_switch_to_buffer. */
+	if ( YY_CURRENT_BUFFER )
+		{
+		/* Flush out information for old buffer. */
+		*(yy_c_buf_p) = (yy_hold_char);
+		YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
+		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
+		}
+
+	/* Only push if top exists. Otherwise, replace top. */
+	if (YY_CURRENT_BUFFER)
+		(yy_buffer_stack_top)++;
+	YY_CURRENT_BUFFER_LVALUE = new_buffer;
+
+	/* copied from fortran_switch_to_buffer. */
+	fortran_load_buffer_state( );
+	(yy_did_buffer_switch_on_eof) = 1;
+}
+
+/** Removes and deletes the top of the stack, if present.
+ *  The next element becomes the new top.
+ *  
+ */
+void fortranpop_buffer_state (void)
+{
+    	if (!YY_CURRENT_BUFFER)
+		return;
+
+	fortran_delete_buffer(YY_CURRENT_BUFFER );
+	YY_CURRENT_BUFFER_LVALUE = NULL;
+	if ((yy_buffer_stack_top) > 0)
+		--(yy_buffer_stack_top);
+
+	if (YY_CURRENT_BUFFER) {
+		fortran_load_buffer_state( );
+		(yy_did_buffer_switch_on_eof) = 1;
+	}
+}
+
+/* Allocates the stack if it does not exist.
+ *  Guarantees space for at least one push.
+ */
+static void fortranensure_buffer_stack (void)
+{
+	yy_size_t num_to_alloc;
+    
+	if (!(yy_buffer_stack)) {
+
+		/* First allocation is just for 2 elements, since we don't know if this
+		 * scanner will even need a stack. We use 2 instead of 1 to avoid an
+		 * immediate realloc on the next call.
+         */
+		num_to_alloc = 1;
+		(yy_buffer_stack) = (struct yy_buffer_state**)fortranalloc
+								(num_to_alloc * sizeof(struct yy_buffer_state*)
+								);
+		if ( ! (yy_buffer_stack) )
+			YY_FATAL_ERROR( "out of dynamic memory in fortranensure_buffer_stack()" );
+								  
+		memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
+				
+		(yy_buffer_stack_max) = num_to_alloc;
+		(yy_buffer_stack_top) = 0;
+		return;
+	}
+
+	if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
+
+		/* Increase the buffer to prepare for a possible push. */
+		int grow_size = 8 /* arbitrary grow size */;
+
+		num_to_alloc = (yy_buffer_stack_max) + grow_size;
+		(yy_buffer_stack) = (struct yy_buffer_state**)fortranrealloc
+								((yy_buffer_stack),
+								num_to_alloc * sizeof(struct yy_buffer_state*)
+								);
+		if ( ! (yy_buffer_stack) )
+			YY_FATAL_ERROR( "out of dynamic memory in fortranensure_buffer_stack()" );
+
+		/* zero only the new slots.*/
+		memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
+		(yy_buffer_stack_max) = num_to_alloc;
+	}
+}
+
+/** Setup the input buffer state to scan directly from a user-specified character buffer.
+ * @param base the character buffer
+ * @param size the size in bytes of the character buffer
+ * 
+ * @return the newly allocated buffer state object. 
+ */
+YY_BUFFER_STATE fortran_scan_buffer  (char * base, yy_size_t  size )
+{
+	YY_BUFFER_STATE b;
+    
+	if ( size < 2 ||
+	     base[size-2] != YY_END_OF_BUFFER_CHAR ||
+	     base[size-1] != YY_END_OF_BUFFER_CHAR )
+		/* They forgot to leave room for the EOB's. */
+		return 0;
+
+	b = (YY_BUFFER_STATE) fortranalloc(sizeof( struct yy_buffer_state )  );
+	if ( ! b )
+		YY_FATAL_ERROR( "out of dynamic memory in fortran_scan_buffer()" );
+
+	b->yy_buf_size = size - 2;	/* "- 2" to take care of EOB's */
+	b->yy_buf_pos = b->yy_ch_buf = base;
+	b->yy_is_our_buffer = 0;
+	b->yy_input_file = 0;
+	b->yy_n_chars = b->yy_buf_size;
+	b->yy_is_interactive = 0;
+	b->yy_at_bol = 1;
+	b->yy_fill_buffer = 0;
+	b->yy_buffer_status = YY_BUFFER_NEW;
+
+	fortran_switch_to_buffer(b  );
+
+	return b;
+}
+
+/** Setup the input buffer state to scan a string. The next call to fortranlex() will
+ * scan from a @e copy of @a str.
+ * @param yystr a NUL-terminated string to scan
+ * 
+ * @return the newly allocated buffer state object.
+ * @note If you want to scan bytes that may contain NUL values, then use
+ *       fortran_scan_bytes() instead.
+ */
+YY_BUFFER_STATE fortran_scan_string (yyconst char * yystr )
+{
+    
+	return fortran_scan_bytes(yystr,strlen(yystr) );
+}
+
+/** Setup the input buffer state to scan the given bytes. The next call to fortranlex() will
+ * scan from a @e copy of @a bytes.
+ * @param bytes the byte buffer to scan
+ * @param len the number of bytes in the buffer pointed to by @a bytes.
+ * 
+ * @return the newly allocated buffer state object.
+ */
+YY_BUFFER_STATE fortran_scan_bytes  (yyconst char * yybytes, yy_size_t  _yybytes_len )
+{
+	YY_BUFFER_STATE b;
+	char *buf;
+	yy_size_t n, i;
+    
+	/* Get memory for full buffer, including space for trailing EOB's. */
+	n = _yybytes_len + 2;
+	buf = (char *) fortranalloc(n  );
+	if ( ! buf )
+		YY_FATAL_ERROR( "out of dynamic memory in fortran_scan_bytes()" );
+
+	for ( i = 0; i < _yybytes_len; ++i )
+		buf[i] = yybytes[i];
+
+	buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
+
+	b = fortran_scan_buffer(buf,n );
+	if ( ! b )
+		YY_FATAL_ERROR( "bad buffer in fortran_scan_bytes()" );
+
+	/* It's okay to grow etc. this buffer, and we should throw it
+	 * away when we're done.
+	 */
+	b->yy_is_our_buffer = 1;
+
+	return b;
+}
+
+#ifndef YY_EXIT_FAILURE
+#define YY_EXIT_FAILURE 2
+#endif
+
+static void yy_fatal_error (yyconst char* msg )
+{
+    	(void) fprintf( stderr, "%s\n", msg );
+	exit( YY_EXIT_FAILURE );
+}
+
+/* Redefine yyless() so it works in section 3 code. */
+
+#undef yyless
+#define yyless(n) \
+	do \
+		{ \
+		/* Undo effects of setting up fortrantext. */ \
+        int yyless_macro_arg = (n); \
+        YY_LESS_LINENO(yyless_macro_arg);\
+		fortrantext[fortranleng] = (yy_hold_char); \
+		(yy_c_buf_p) = fortrantext + yyless_macro_arg; \
+		(yy_hold_char) = *(yy_c_buf_p); \
+		*(yy_c_buf_p) = '\0'; \
+		fortranleng = yyless_macro_arg; \
+		} \
+	while ( 0 )
+
+/* Accessor  methods (get/set functions) to struct members. */
+
+/** Get the current line number.
+ * 
+ */
+int fortranget_lineno  (void)
+{
+        
+    return fortranlineno;
+}
+
+/** Get the input stream.
+ * 
+ */
+FILE *fortranget_in  (void)
+{
+        return fortranin;
+}
+
+/** Get the output stream.
+ * 
+ */
+FILE *fortranget_out  (void)
+{
+        return fortranout;
+}
+
+/** Get the length of the current token.
+ * 
+ */
+yy_size_t fortranget_leng  (void)
+{
+        return fortranleng;
+}
+
+/** Get the current token.
+ * 
+ */
+
+char *fortranget_text  (void)
+{
+        return fortrantext;
+}
+
+/** Set the current line number.
+ * @param line_number
+ * 
+ */
+void fortranset_lineno (int  line_number )
+{
+    
+    fortranlineno = line_number;
+}
+
+/** Set the input stream. This does not discard the current
+ * input buffer.
+ * @param in_str A readable stream.
+ * 
+ * @see fortran_switch_to_buffer
+ */
+void fortranset_in (FILE *  in_str )
+{
+        fortranin = in_str ;
+}
+
+void fortranset_out (FILE *  out_str )
+{
+        fortranout = out_str ;
+}
+
+int fortranget_debug  (void)
+{
+        return fortran_flex_debug;
+}
+
+void fortranset_debug (int  bdebug )
+{
+        fortran_flex_debug = bdebug ;
+}
+
+static int yy_init_globals (void)
+{
+        /* Initialization is the same as for the non-reentrant scanner.
+     * This function is called from fortranlex_destroy(), so don't allocate here.
+     */
+
+    (yy_buffer_stack) = 0;
+    (yy_buffer_stack_top) = 0;
+    (yy_buffer_stack_max) = 0;
+    (yy_c_buf_p) = (char *) 0;
+    (yy_init) = 0;
+    (yy_start) = 0;
+
+/* Defined in main.c */
+#ifdef YY_STDINIT
+    fortranin = stdin;
+    fortranout = stdout;
+#else
+    fortranin = (FILE *) 0;
+    fortranout = (FILE *) 0;
+#endif
+
+    /* For future reference: Set errno on error, since we are called by
+     * fortranlex_init()
+     */
+    return 0;
+}
+
+/* fortranlex_destroy is for both reentrant and non-reentrant scanners. */
+int fortranlex_destroy  (void)
+{
+    
+    /* Pop the buffer stack, destroying each element. */
+	while(YY_CURRENT_BUFFER){
+		fortran_delete_buffer(YY_CURRENT_BUFFER  );
+		YY_CURRENT_BUFFER_LVALUE = NULL;
+		fortranpop_buffer_state();
+	}
+
+	/* Destroy the stack itself. */
+	fortranfree((yy_buffer_stack) );
+	(yy_buffer_stack) = NULL;
+
+    /* Reset the globals. This is important in a non-reentrant scanner so the next time
+     * fortranlex() is called, initialization will occur. */
+    yy_init_globals( );
+
+    return 0;
+}
+
+/*
+ * Internal utility routines.
+ */
+
+#ifndef yytext_ptr
+static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
+{
+	register int i;
+	for ( i = 0; i < n; ++i )
+		s1[i] = s2[i];
+}
+#endif
+
+#ifdef YY_NEED_STRLEN
+static int yy_flex_strlen (yyconst char * s )
+{
+	register int n;
+	for ( n = 0; s[n]; ++n )
+		;
+
+	return n;
+}
+#endif
+
+void *fortranalloc (yy_size_t  size )
+{
+	return (void *) malloc( size );
+}
+
+void *fortranrealloc  (void * ptr, yy_size_t  size )
+{
+	/* The cast to (char *) in the following accommodates both
+	 * implementations that use char* generic pointers, and those
+	 * that use void* generic pointers.  It works with the latter
+	 * because both ANSI C and C++ allow castless assignment from
+	 * any pointer type to void*, and deal with argument conversions
+	 * as though doing an assignment.
+	 */
+	return (void *) realloc( (char *) ptr, size );
+}
+
+void fortranfree (void * ptr )
+{
+	free( (char *) ptr );	/* see fortranrealloc() for (char *) cast */
+}
+
+#define YYTABLES_NAME "yytables"
+
+#line 353 "fortran.lex"
+
+
+
+fortranerror(char *s)
+{
+   if (!strcasecmp(curfile,mainfile))
+   {
+      printf("%s line %d, file %s motclef = %s\n",s,line_num_fortran,curfile,fortrantext);
+   }
+   else
+   {
+      printf("%s line %d, file %s motclef = %s curbuf = %s\n",s,line_num_fortran_common,curfile,fortrantext,curbuf);
+   }
+/*   exit(0);*/
+}
+
+int fortranwrap()
+{
+}
+
Index: vendors/AGRIF/r_01/LIB/main.c
===================================================================
--- vendors/AGRIF/r_01/LIB/main.c	(revision 2672)
+++ vendors/AGRIF/r_01/LIB/main.c	(revision 2672)
@@ -0,0 +1,3876 @@
+/* A Bison parser, made by GNU Bison 2.3.  */
+
+/* Skeleton implementation for Bison's Yacc-like parsers in C
+
+   Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+   Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 51 Franklin Street, Fifth Floor,
+   Boston, MA 02110-1301, USA.  */
+
+/* As a special exception, you may create a larger work that contains
+   part or all of the Bison parser skeleton and distribute that work
+   under terms of your choice, so long as that work isn't itself a
+   parser generator using the skeleton or a modified version thereof
+   as a parser skeleton.  Alternatively, if you modify or redistribute
+   the parser skeleton itself, you may (at your option) remove this
+   special exception, which will cause the skeleton and the resulting
+   Bison output files to be licensed under the GNU General Public
+   License without this special exception.
+
+   This special exception was added by the Free Software Foundation in
+   version 2.2 of Bison.  */
+
+/* C LALR(1) parser skeleton written by Richard Stallman, by
+   simplifying the original so-called "semantic" parser.  */
+
+/* All symbols defined below should begin with yy or YY, to avoid
+   infringing on user name space.  This should be done even for local
+   variables, as they might otherwise be expanded by user macros.
+   There are some unavoidable exceptions within include files to
+   define necessary library symbols; they are noted "INFRINGES ON
+   USER NAME SPACE" below.  */
+
+/* Identify Bison output.  */
+#define YYBISON 1
+
+/* Bison version.  */
+#define YYBISON_VERSION "2.3"
+
+/* Skeleton name.  */
+#define YYSKELETON_NAME "yacc.c"
+
+/* Pure parsers.  */
+#define YYPURE 0
+
+/* Using locations.  */
+#define YYLSP_NEEDED 0
+
+
+
+/* Tokens.  */
+#ifndef YYTOKENTYPE
+# define YYTOKENTYPE
+   /* Put the tokens into the symbol table, so that GDB and other debuggers
+      know about them.  */
+   enum yytokentype {
+     TOK_SEP = 258,
+     TOK_USE = 259,
+     TOK_MODULEMAIN = 260,
+     TOK_NOTGRIDDEP = 261,
+     TOK_USEITEM = 262,
+     TOK_NAME = 263,
+     TOK_PROBTYPE = 264
+   };
+#endif
+/* Tokens.  */
+#define TOK_SEP 258
+#define TOK_USE 259
+#define TOK_MODULEMAIN 260
+#define TOK_NOTGRIDDEP 261
+#define TOK_USEITEM 262
+#define TOK_NAME 263
+#define TOK_PROBTYPE 264
+
+
+
+
+/* Copy the first part of user declarations.  */
+#line 35 "convert.y"
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include "decl.h"
+
+
+/* Enabling traces.  */
+#ifndef YYDEBUG
+# define YYDEBUG 1
+#endif
+
+/* Enabling verbose error messages.  */
+#ifdef YYERROR_VERBOSE
+# undef YYERROR_VERBOSE
+# define YYERROR_VERBOSE 1
+#else
+# define YYERROR_VERBOSE 0
+#endif
+
+/* Enabling the token table.  */
+#ifndef YYTOKEN_TABLE
+# define YYTOKEN_TABLE 0
+#endif
+
+#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
+typedef union YYSTYPE
+#line 42 "convert.y"
+{
+       int ival;
+       char na[LONG_C];
+       listnom * ln;
+       }
+/* Line 193 of yacc.c.  */
+#line 127 "convert.tab.c"
+	YYSTYPE;
+# define yystype YYSTYPE /* obsolescent; will be withdrawn */
+# define YYSTYPE_IS_DECLARED 1
+# define YYSTYPE_IS_TRIVIAL 1
+#endif
+
+
+
+/* Copy the second part of user declarations.  */
+
+
+/* Line 216 of yacc.c.  */
+#line 140 "convert.tab.c"
+
+#ifdef short
+# undef short
+#endif
+
+#ifdef YYTYPE_UINT8
+typedef YYTYPE_UINT8 yytype_uint8;
+#else
+typedef unsigned char yytype_uint8;
+#endif
+
+#ifdef YYTYPE_INT8
+typedef YYTYPE_INT8 yytype_int8;
+#elif (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+typedef signed char yytype_int8;
+#else
+typedef short int yytype_int8;
+#endif
+
+#ifdef YYTYPE_UINT16
+typedef YYTYPE_UINT16 yytype_uint16;
+#else
+typedef unsigned short int yytype_uint16;
+#endif
+
+#ifdef YYTYPE_INT16
+typedef YYTYPE_INT16 yytype_int16;
+#else
+typedef short int yytype_int16;
+#endif
+
+#ifndef YYSIZE_T
+# ifdef __SIZE_TYPE__
+#  define YYSIZE_T __SIZE_TYPE__
+# elif defined size_t
+#  define YYSIZE_T size_t
+# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+#  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
+#  define YYSIZE_T size_t
+# else
+#  define YYSIZE_T unsigned int
+# endif
+#endif
+
+#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
+
+#ifndef YY_
+# if defined YYENABLE_NLS && YYENABLE_NLS
+#  if ENABLE_NLS
+#   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
+#   define YY_(msgid) dgettext ("bison-runtime", msgid)
+#  endif
+# endif
+# ifndef YY_
+#  define YY_(msgid) msgid
+# endif
+#endif
+
+/* Suppress unused-variable warnings by "using" E.  */
+#if ! defined lint || defined __GNUC__
+# define YYUSE(e) ((void) (e))
+#else
+# define YYUSE(e) /* empty */
+#endif
+
+/* Identity function, used to suppress warnings about constant conditions.  */
+#ifndef lint
+# define YYID(n) (n)
+#else
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+static int
+YYID (int i)
+#else
+static int
+YYID (i)
+    int i;
+#endif
+{
+  return i;
+}
+#endif
+
+#if ! defined yyoverflow || YYERROR_VERBOSE
+
+/* The parser invokes alloca or malloc; define the necessary symbols.  */
+
+# ifdef YYSTACK_USE_ALLOCA
+#  if YYSTACK_USE_ALLOCA
+#   ifdef __GNUC__
+#    define YYSTACK_ALLOC __builtin_alloca
+#   elif defined __BUILTIN_VA_ARG_INCR
+#    include <alloca.h> /* INFRINGES ON USER NAME SPACE */
+#   elif defined _AIX
+#    define YYSTACK_ALLOC __alloca
+#   elif defined _MSC_VER
+#    include <malloc.h> /* INFRINGES ON USER NAME SPACE */
+#    define alloca _alloca
+#   else
+#    define YYSTACK_ALLOC alloca
+#    if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+#     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
+#     ifndef _STDLIB_H
+#      define _STDLIB_H 1
+#     endif
+#    endif
+#   endif
+#  endif
+# endif
+
+# ifdef YYSTACK_ALLOC
+   /* Pacify GCC's `empty if-body' warning.  */
+#  define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
+#  ifndef YYSTACK_ALLOC_MAXIMUM
+    /* The OS might guarantee only one guard page at the bottom of the stack,
+       and a page size can be as small as 4096 bytes.  So we cannot safely
+       invoke alloca (N) if N exceeds 4096.  Use a slightly smaller number
+       to allow for a few compiler-allocated temporary stack slots.  */
+#   define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
+#  endif
+# else
+#  define YYSTACK_ALLOC YYMALLOC
+#  define YYSTACK_FREE YYFREE
+#  ifndef YYSTACK_ALLOC_MAXIMUM
+#   define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
+#  endif
+#  if (defined __cplusplus && ! defined _STDLIB_H \
+       && ! ((defined YYMALLOC || defined malloc) \
+	     && (defined YYFREE || defined free)))
+#   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
+#   ifndef _STDLIB_H
+#    define _STDLIB_H 1
+#   endif
+#  endif
+#  ifndef YYMALLOC
+#   define YYMALLOC malloc
+#   if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
+#   endif
+#  endif
+#  ifndef YYFREE
+#   define YYFREE free
+#   if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+void free (void *); /* INFRINGES ON USER NAME SPACE */
+#   endif
+#  endif
+# endif
+#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
+
+
+#if (! defined yyoverflow \
+     && (! defined __cplusplus \
+	 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
+
+/* A type that is properly aligned for any stack member.  */
+union yyalloc
+{
+  yytype_int16 yyss;
+  YYSTYPE yyvs;
+  };
+
+/* The size of the maximum gap between one aligned stack and the next.  */
+# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
+
+/* The size of an array large to enough to hold all stacks, each with
+   N elements.  */
+# define YYSTACK_BYTES(N) \
+     ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
+      + YYSTACK_GAP_MAXIMUM)
+
+/* Copy COUNT objects from FROM to TO.  The source and destination do
+   not overlap.  */
+# ifndef YYCOPY
+#  if defined __GNUC__ && 1 < __GNUC__
+#   define YYCOPY(To, From, Count) \
+      __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
+#  else
+#   define YYCOPY(To, From, Count)		\
+      do					\
+	{					\
+	  YYSIZE_T yyi;				\
+	  for (yyi = 0; yyi < (Count); yyi++)	\
+	    (To)[yyi] = (From)[yyi];		\
+	}					\
+      while (YYID (0))
+#  endif
+# endif
+
+/* Relocate STACK from its old location to the new one.  The
+   local variables YYSIZE and YYSTACKSIZE give the old and new number of
+   elements in the stack, and YYPTR gives the new location of the
+   stack.  Advance YYPTR to a properly aligned location for the next
+   stack.  */
+# define YYSTACK_RELOCATE(Stack)					\
+    do									\
+      {									\
+	YYSIZE_T yynewbytes;						\
+	YYCOPY (&yyptr->Stack, Stack, yysize);				\
+	Stack = &yyptr->Stack;						\
+	yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
+	yyptr += yynewbytes / sizeof (*yyptr);				\
+      }									\
+    while (YYID (0))
+
+#endif
+
+/* YYFINAL -- State number of the termination state.  */
+#define YYFINAL  2
+/* YYLAST -- Last index in YYTABLE.  */
+#define YYLAST   23
+
+/* YYNTOKENS -- Number of terminals.  */
+#define YYNTOKENS  18
+/* YYNNTS -- Number of nonterminals.  */
+#define YYNNTS  3
+/* YYNRULES -- Number of rules.  */
+#define YYNRULES  10
+/* YYNRULES -- Number of states.  */
+#define YYNSTATES  24
+
+/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
+#define YYUNDEFTOK  2
+#define YYMAXUTOK   264
+
+#define YYTRANSLATE(YYX)						\
+  ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
+
+/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX.  */
+static const yytype_uint8 yytranslate[] =
+{
+       0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+      17,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+      13,    14,     2,     2,    10,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,    12,    11,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,    15,     2,    16,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     1,     2,     3,     4,
+       5,     6,     7,     8,     9
+};
+
+#if YYDEBUG
+/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
+   YYRHS.  */
+static const yytype_uint8 yyprhs[] =
+{
+       0,     0,     3,     4,     7,     9,    13,    19,    27,    31,
+      36
+};
+
+/* YYRHS -- A `-1'-separated list of the rules' RHS.  */
+static const yytype_int8 yyrhs[] =
+{
+      19,     0,    -1,    -1,    19,    20,    -1,    17,    -1,     9,
+       8,    11,    -1,     9,     8,    10,     8,    11,    -1,     9,
+       8,    10,     8,    10,     8,    11,    -1,     5,     8,    11,
+      -1,     6,     3,     8,    11,    -1,     4,     7,    11,    -1
+};
+
+/* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
+static const yytype_uint8 yyrline[] =
+{
+       0,    63,    63,    64,    66,    67,    68,    69,    71,    74,
+      75
+};
+#endif
+
+#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
+/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
+   First, the terminals, then, starting at YYNTOKENS, nonterminals.  */
+static const char *const yytname[] =
+{
+  "$end", "error", "$undefined", "TOK_SEP", "TOK_USE", "TOK_MODULEMAIN",
+  "TOK_NOTGRIDDEP", "TOK_USEITEM", "TOK_NAME", "TOK_PROBTYPE", "','",
+  "';'", "':'", "'('", "')'", "'['", "']'", "'\\n'", "$accept", "input",
+  "line", 0
+};
+#endif
+
+# ifdef YYPRINT
+/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
+   token YYLEX-NUM.  */
+static const yytype_uint16 yytoknum[] =
+{
+       0,   256,   257,   258,   259,   260,   261,   262,   263,   264,
+      44,    59,    58,    40,    41,    91,    93,    10
+};
+# endif
+
+/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
+static const yytype_uint8 yyr1[] =
+{
+       0,    18,    19,    19,    20,    20,    20,    20,    20,    20,
+      20
+};
+
+/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
+static const yytype_uint8 yyr2[] =
+{
+       0,     2,     0,     2,     1,     3,     5,     7,     3,     4,
+       3
+};
+
+/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
+   STATE-NUM when YYTABLE doesn't specify something else to do.  Zero
+   means the default is an error.  */
+static const yytype_uint8 yydefact[] =
+{
+       2,     0,     1,     0,     0,     0,     0,     4,     3,     0,
+       0,     0,     0,    10,     8,     0,     0,     5,     9,     0,
+       0,     6,     0,     7
+};
+
+/* YYDEFGOTO[NTERM-NUM].  */
+static const yytype_int8 yydefgoto[] =
+{
+      -1,     1,     8
+};
+
+/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
+   STATE-NUM.  */
+#define YYPACT_NINF -10
+static const yytype_int8 yypact[] =
+{
+     -10,     0,   -10,    -4,     2,     8,     4,   -10,   -10,     3,
+       5,     7,    -9,   -10,   -10,     9,    10,   -10,   -10,    -3,
+      11,   -10,    12,   -10
+};
+
+/* YYPGOTO[NTERM-NUM].  */
+static const yytype_int8 yypgoto[] =
+{
+     -10,   -10,   -10
+};
+
+/* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
+   positive, shift that token.  If negative, reduce the rule which
+   number is the opposite.  If zero, do what YYDEFACT says.
+   If YYTABLE_NINF, syntax error.  */
+#define YYTABLE_NINF -1
+static const yytype_uint8 yytable[] =
+{
+       2,    16,    17,     9,     3,     4,     5,    20,    21,     6,
+      10,    11,    12,     0,    13,    15,    14,     7,    19,    22,
+      18,     0,     0,    23
+};
+
+static const yytype_int8 yycheck[] =
+{
+       0,    10,    11,     7,     4,     5,     6,    10,    11,     9,
+       8,     3,     8,    -1,    11,     8,    11,    17,     8,     8,
+      11,    -1,    -1,    11
+};
+
+/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
+   symbol of state STATE-NUM.  */
+static const yytype_uint8 yystos[] =
+{
+       0,    19,     0,     4,     5,     6,     9,    17,    20,     7,
+       8,     3,     8,    11,    11,     8,    10,    11,    11,     8,
+      10,    11,     8,    11
+};
+
+#define yyerrok		(yyerrstatus = 0)
+#define yyclearin	(yychar = YYEMPTY)
+#define YYEMPTY		(-2)
+#define YYEOF		0
+
+#define YYACCEPT	goto yyacceptlab
+#define YYABORT		goto yyabortlab
+#define YYERROR		goto yyerrorlab
+
+
+/* Like YYERROR except do call yyerror.  This remains here temporarily
+   to ease the transition to the new meaning of YYERROR, for GCC.
+   Once GCC version 2 has supplanted version 1, this can go.  */
+
+#define YYFAIL		goto yyerrlab
+
+#define YYRECOVERING()  (!!yyerrstatus)
+
+#define YYBACKUP(Token, Value)					\
+do								\
+  if (yychar == YYEMPTY && yylen == 1)				\
+    {								\
+      yychar = (Token);						\
+      yylval = (Value);						\
+      yytoken = YYTRANSLATE (yychar);				\
+      YYPOPSTACK (1);						\
+      goto yybackup;						\
+    }								\
+  else								\
+    {								\
+      yyerror (YY_("syntax error: cannot back up")); \
+      YYERROR;							\
+    }								\
+while (YYID (0))
+
+
+#define YYTERROR	1
+#define YYERRCODE	256
+
+
+/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
+   If N is 0, then set CURRENT to the empty location which ends
+   the previous symbol: RHS[0] (always defined).  */
+
+#define YYRHSLOC(Rhs, K) ((Rhs)[K])
+#ifndef YYLLOC_DEFAULT
+# define YYLLOC_DEFAULT(Current, Rhs, N)				\
+    do									\
+      if (YYID (N))                                                    \
+	{								\
+	  (Current).first_line   = YYRHSLOC (Rhs, 1).first_line;	\
+	  (Current).first_column = YYRHSLOC (Rhs, 1).first_column;	\
+	  (Current).last_line    = YYRHSLOC (Rhs, N).last_line;		\
+	  (Current).last_column  = YYRHSLOC (Rhs, N).last_column;	\
+	}								\
+      else								\
+	{								\
+	  (Current).first_line   = (Current).last_line   =		\
+	    YYRHSLOC (Rhs, 0).last_line;				\
+	  (Current).first_column = (Current).last_column =		\
+	    YYRHSLOC (Rhs, 0).last_column;				\
+	}								\
+    while (YYID (0))
+#endif
+
+
+/* YY_LOCATION_PRINT -- Print the location on the stream.
+   This macro was not mandated originally: define only if we know
+   we won't break user code: when these are the locations we know.  */
+
+#ifndef YY_LOCATION_PRINT
+# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
+#  define YY_LOCATION_PRINT(File, Loc)			\
+     fprintf (File, "%d.%d-%d.%d",			\
+	      (Loc).first_line, (Loc).first_column,	\
+	      (Loc).last_line,  (Loc).last_column)
+# else
+#  define YY_LOCATION_PRINT(File, Loc) ((void) 0)
+# endif
+#endif
+
+
+/* YYLEX -- calling `yylex' with the right arguments.  */
+
+#ifdef YYLEX_PARAM
+# define YYLEX yylex (YYLEX_PARAM)
+#else
+# define YYLEX yylex ()
+#endif
+
+/* Enable debugging if requested.  */
+#if YYDEBUG
+
+# ifndef YYFPRINTF
+#  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
+#  define YYFPRINTF fprintf
+# endif
+
+# define YYDPRINTF(Args)			\
+do {						\
+  if (yydebug)					\
+    YYFPRINTF Args;				\
+} while (YYID (0))
+
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location)			  \
+do {									  \
+  if (yydebug)								  \
+    {									  \
+      YYFPRINTF (stderr, "%s ", Title);					  \
+      yy_symbol_print (stderr,						  \
+		  Type, Value); \
+      YYFPRINTF (stderr, "\n");						  \
+    }									  \
+} while (YYID (0))
+
+
+/*--------------------------------.
+| Print this symbol on YYOUTPUT.  |
+`--------------------------------*/
+
+/*ARGSUSED*/
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+static void
+yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
+#else
+static void
+yy_symbol_value_print (yyoutput, yytype, yyvaluep)
+    FILE *yyoutput;
+    int yytype;
+    YYSTYPE const * const yyvaluep;
+#endif
+{
+  if (!yyvaluep)
+    return;
+# ifdef YYPRINT
+  if (yytype < YYNTOKENS)
+    YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
+# else
+  YYUSE (yyoutput);
+# endif
+  switch (yytype)
+    {
+      default:
+	break;
+    }
+}
+
+
+/*--------------------------------.
+| Print this symbol on YYOUTPUT.  |
+`--------------------------------*/
+
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+static void
+yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
+#else
+static void
+yy_symbol_print (yyoutput, yytype, yyvaluep)
+    FILE *yyoutput;
+    int yytype;
+    YYSTYPE const * const yyvaluep;
+#endif
+{
+  if (yytype < YYNTOKENS)
+    YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
+  else
+    YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
+
+  yy_symbol_value_print (yyoutput, yytype, yyvaluep);
+  YYFPRINTF (yyoutput, ")");
+}
+
+/*------------------------------------------------------------------.
+| yy_stack_print -- Print the state stack from its BOTTOM up to its |
+| TOP (included).                                                   |
+`------------------------------------------------------------------*/
+
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+static void
+yy_stack_print (yytype_int16 *bottom, yytype_int16 *top)
+#else
+static void
+yy_stack_print (bottom, top)
+    yytype_int16 *bottom;
+    yytype_int16 *top;
+#endif
+{
+  YYFPRINTF (stderr, "Stack now");
+  for (; bottom <= top; ++bottom)
+    YYFPRINTF (stderr, " %d", *bottom);
+  YYFPRINTF (stderr, "\n");
+}
+
+# define YY_STACK_PRINT(Bottom, Top)				\
+do {								\
+  if (yydebug)							\
+    yy_stack_print ((Bottom), (Top));				\
+} while (YYID (0))
+
+
+/*------------------------------------------------.
+| Report that the YYRULE is going to be reduced.  |
+`------------------------------------------------*/
+
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+static void
+yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
+#else
+static void
+yy_reduce_print (yyvsp, yyrule)
+    YYSTYPE *yyvsp;
+    int yyrule;
+#endif
+{
+  int yynrhs = yyr2[yyrule];
+  int yyi;
+  unsigned long int yylno = yyrline[yyrule];
+  YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
+	     yyrule - 1, yylno);
+  /* The symbols being reduced.  */
+  for (yyi = 0; yyi < yynrhs; yyi++)
+    {
+      fprintf (stderr, "   $%d = ", yyi + 1);
+      yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
+		       &(yyvsp[(yyi + 1) - (yynrhs)])
+		       		       );
+      fprintf (stderr, "\n");
+    }
+}
+
+# define YY_REDUCE_PRINT(Rule)		\
+do {					\
+  if (yydebug)				\
+    yy_reduce_print (yyvsp, Rule); \
+} while (YYID (0))
+
+/* Nonzero means print parse trace.  It is left uninitialized so that
+   multiple parsers can coexist.  */
+int yydebug;
+#else /* !YYDEBUG */
+# define YYDPRINTF(Args)
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
+# define YY_STACK_PRINT(Bottom, Top)
+# define YY_REDUCE_PRINT(Rule)
+#endif /* !YYDEBUG */
+
+
+/* YYINITDEPTH -- initial size of the parser's stacks.  */
+#ifndef	YYINITDEPTH
+# define YYINITDEPTH 200
+#endif
+
+/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
+   if the built-in stack extension method is used).
+
+   Do not make this value too large; the results are undefined if
+   YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
+   evaluated with infinite-precision integer arithmetic.  */
+
+#ifndef YYMAXDEPTH
+# define YYMAXDEPTH 10000
+#endif
+
+
+
+
+#if YYERROR_VERBOSE
+
+# ifndef yystrlen
+#  if defined __GLIBC__ && defined _STRING_H
+#   define yystrlen strlen
+#  else
+/* Return the length of YYSTR.  */
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+static YYSIZE_T
+yystrlen (const char *yystr)
+#else
+static YYSIZE_T
+yystrlen (yystr)
+    const char *yystr;
+#endif
+{
+  YYSIZE_T yylen;
+  for (yylen = 0; yystr[yylen]; yylen++)
+    continue;
+  return yylen;
+}
+#  endif
+# endif
+
+# ifndef yystpcpy
+#  if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
+#   define yystpcpy stpcpy
+#  else
+/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
+   YYDEST.  */
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+static char *
+yystpcpy (char *yydest, const char *yysrc)
+#else
+static char *
+yystpcpy (yydest, yysrc)
+    char *yydest;
+    const char *yysrc;
+#endif
+{
+  char *yyd = yydest;
+  const char *yys = yysrc;
+
+  while ((*yyd++ = *yys++) != '\0')
+    continue;
+
+  return yyd - 1;
+}
+#  endif
+# endif
+
+# ifndef yytnamerr
+/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
+   quotes and backslashes, so that it's suitable for yyerror.  The
+   heuristic is that double-quoting is unnecessary unless the string
+   contains an apostrophe, a comma, or backslash (other than
+   backslash-backslash).  YYSTR is taken from yytname.  If YYRES is
+   null, do not copy; instead, return the length of what the result
+   would have been.  */
+static YYSIZE_T
+yytnamerr (char *yyres, const char *yystr)
+{
+  if (*yystr == '"')
+    {
+      YYSIZE_T yyn = 0;
+      char const *yyp = yystr;
+
+      for (;;)
+	switch (*++yyp)
+	  {
+	  case '\'':
+	  case ',':
+	    goto do_not_strip_quotes;
+
+	  case '\\':
+	    if (*++yyp != '\\')
+	      goto do_not_strip_quotes;
+	    /* Fall through.  */
+	  default:
+	    if (yyres)
+	      yyres[yyn] = *yyp;
+	    yyn++;
+	    break;
+
+	  case '"':
+	    if (yyres)
+	      yyres[yyn] = '\0';
+	    return yyn;
+	  }
+    do_not_strip_quotes: ;
+    }
+
+  if (! yyres)
+    return yystrlen (yystr);
+
+  return yystpcpy (yyres, yystr) - yyres;
+}
+# endif
+
+/* Copy into YYRESULT an error message about the unexpected token
+   YYCHAR while in state YYSTATE.  Return the number of bytes copied,
+   including the terminating null byte.  If YYRESULT is null, do not
+   copy anything; just return the number of bytes that would be
+   copied.  As a special case, return 0 if an ordinary "syntax error"
+   message will do.  Return YYSIZE_MAXIMUM if overflow occurs during
+   size calculation.  */
+static YYSIZE_T
+yysyntax_error (char *yyresult, int yystate, int yychar)
+{
+  int yyn = yypact[yystate];
+
+  if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
+    return 0;
+  else
+    {
+      int yytype = YYTRANSLATE (yychar);
+      YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
+      YYSIZE_T yysize = yysize0;
+      YYSIZE_T yysize1;
+      int yysize_overflow = 0;
+      enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
+      char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
+      int yyx;
+
+# if 0
+      /* This is so xgettext sees the translatable formats that are
+	 constructed on the fly.  */
+      YY_("syntax error, unexpected %s");
+      YY_("syntax error, unexpected %s, expecting %s");
+      YY_("syntax error, unexpected %s, expecting %s or %s");
+      YY_("syntax error, unexpected %s, expecting %s or %s or %s");
+      YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
+# endif
+      char *yyfmt;
+      char const *yyf;
+      static char const yyunexpected[] = "syntax error, unexpected %s";
+      static char const yyexpecting[] = ", expecting %s";
+      static char const yyor[] = " or %s";
+      char yyformat[sizeof yyunexpected
+		    + sizeof yyexpecting - 1
+		    + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
+		       * (sizeof yyor - 1))];
+      char const *yyprefix = yyexpecting;
+
+      /* Start YYX at -YYN if negative to avoid negative indexes in
+	 YYCHECK.  */
+      int yyxbegin = yyn < 0 ? -yyn : 0;
+
+      /* Stay within bounds of both yycheck and yytname.  */
+      int yychecklim = YYLAST - yyn + 1;
+      int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
+      int yycount = 1;
+
+      yyarg[0] = yytname[yytype];
+      yyfmt = yystpcpy (yyformat, yyunexpected);
+
+      for (yyx = yyxbegin; yyx < yyxend; ++yyx)
+	if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
+	  {
+	    if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
+	      {
+		yycount = 1;
+		yysize = yysize0;
+		yyformat[sizeof yyunexpected - 1] = '\0';
+		break;
+	      }
+	    yyarg[yycount++] = yytname[yyx];
+	    yysize1 = yysize + yytnamerr (0, yytname[yyx]);
+	    yysize_overflow |= (yysize1 < yysize);
+	    yysize = yysize1;
+	    yyfmt = yystpcpy (yyfmt, yyprefix);
+	    yyprefix = yyor;
+	  }
+
+      yyf = YY_(yyformat);
+      yysize1 = yysize + yystrlen (yyf);
+      yysize_overflow |= (yysize1 < yysize);
+      yysize = yysize1;
+
+      if (yysize_overflow)
+	return YYSIZE_MAXIMUM;
+
+      if (yyresult)
+	{
+	  /* Avoid sprintf, as that infringes on the user's name space.
+	     Don't have undefined behavior even if the translation
+	     produced a string with the wrong number of "%s"s.  */
+	  char *yyp = yyresult;
+	  int yyi = 0;
+	  while ((*yyp = *yyf) != '\0')
+	    {
+	      if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
+		{
+		  yyp += yytnamerr (yyp, yyarg[yyi++]);
+		  yyf += 2;
+		}
+	      else
+		{
+		  yyp++;
+		  yyf++;
+		}
+	    }
+	}
+      return yysize;
+    }
+}
+#endif /* YYERROR_VERBOSE */
+
+
+
+/*-----------------------------------------------.
+| Release the memory associated to this symbol.  |
+`-----------------------------------------------*/
+
+/*ARGSUSED*/
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+static void
+yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
+#else
+static void
+yydestruct (yymsg, yytype, yyvaluep)
+    const char *yymsg;
+    int yytype;
+    YYSTYPE *yyvaluep;
+#endif
+{
+  YYUSE (yyvaluep);
+
+  if (!yymsg)
+    yymsg = "Deleting";
+  YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
+
+  switch (yytype)
+    {
+
+      default:
+	break;
+    }
+}
+
+
+
+/* Prevent warnings from -Wmissing-prototypes.  */
+
+#ifdef YYPARSE_PARAM
+#if defined __STDC__ || defined __cplusplus
+int yyparse (void *YYPARSE_PARAM);
+#else
+int yyparse ();
+#endif
+#else /* ! YYPARSE_PARAM */
+#if defined __STDC__ || defined __cplusplus
+int yyparse (void);
+#else
+int yyparse ();
+#endif
+#endif /* ! YYPARSE_PARAM */
+
+
+
+/* The look-ahead symbol.  */
+int yychar;
+
+/* The semantic value of the look-ahead symbol.  */
+YYSTYPE yylval;
+
+/* Number of syntax errors so far.  */
+int yynerrs;
+
+
+
+/*----------.
+| yyparse.  |
+`----------*/
+
+#ifdef YYPARSE_PARAM
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+int
+yyparse (void *YYPARSE_PARAM)
+#else
+int
+yyparse (YYPARSE_PARAM)
+    void *YYPARSE_PARAM;
+#endif
+#else /* ! YYPARSE_PARAM */
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+int
+yyparse (void)
+#else
+int
+yyparse ()
+
+#endif
+#endif
+{
+  
+  int yystate;
+  int yyn;
+  int yyresult;
+  /* Number of tokens to shift before error messages enabled.  */
+  int yyerrstatus;
+  /* Look-ahead token as an internal (translated) token number.  */
+  int yytoken = 0;
+#if YYERROR_VERBOSE
+  /* Buffer for error messages, and its allocated size.  */
+  char yymsgbuf[128];
+  char *yymsg = yymsgbuf;
+  YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
+#endif
+
+  /* Three stacks and their tools:
+     `yyss': related to states,
+     `yyvs': related to semantic values,
+     `yyls': related to locations.
+
+     Refer to the stacks thru separate pointers, to allow yyoverflow
+     to reallocate them elsewhere.  */
+
+  /* The state stack.  */
+  yytype_int16 yyssa[YYINITDEPTH];
+  yytype_int16 *yyss = yyssa;
+  yytype_int16 *yyssp;
+
+  /* The semantic value stack.  */
+  YYSTYPE yyvsa[YYINITDEPTH];
+  YYSTYPE *yyvs = yyvsa;
+  YYSTYPE *yyvsp;
+
+
+
+#define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N))
+
+  YYSIZE_T yystacksize = YYINITDEPTH;
+
+  /* The variables used to return semantic value and location from the
+     action routines.  */
+  YYSTYPE yyval;
+
+
+  /* The number of symbols on the RHS of the reduced rule.
+     Keep to zero when no symbol should be popped.  */
+  int yylen = 0;
+
+  YYDPRINTF ((stderr, "Starting parse\n"));
+
+  yystate = 0;
+  yyerrstatus = 0;
+  yynerrs = 0;
+  yychar = YYEMPTY;		/* Cause a token to be read.  */
+
+  /* Initialize stack pointers.
+     Waste one element of value and location stack
+     so that they stay on the same level as the state stack.
+     The wasted elements are never initialized.  */
+
+  yyssp = yyss;
+  yyvsp = yyvs;
+
+  goto yysetstate;
+
+/*------------------------------------------------------------.
+| yynewstate -- Push a new state, which is found in yystate.  |
+`------------------------------------------------------------*/
+ yynewstate:
+  /* In all cases, when you get here, the value and location stacks
+     have just been pushed.  So pushing a state here evens the stacks.  */
+  yyssp++;
+
+ yysetstate:
+  *yyssp = yystate;
+
+  if (yyss + yystacksize - 1 <= yyssp)
+    {
+      /* Get the current used size of the three stacks, in elements.  */
+      YYSIZE_T yysize = yyssp - yyss + 1;
+
+#ifdef yyoverflow
+      {
+	/* Give user a chance to reallocate the stack.  Use copies of
+	   these so that the &'s don't force the real ones into
+	   memory.  */
+	YYSTYPE *yyvs1 = yyvs;
+	yytype_int16 *yyss1 = yyss;
+
+
+	/* Each stack pointer address is followed by the size of the
+	   data in use in that stack, in bytes.  This used to be a
+	   conditional around just the two extra args, but that might
+	   be undefined if yyoverflow is a macro.  */
+	yyoverflow (YY_("memory exhausted"),
+		    &yyss1, yysize * sizeof (*yyssp),
+		    &yyvs1, yysize * sizeof (*yyvsp),
+
+		    &yystacksize);
+
+	yyss = yyss1;
+	yyvs = yyvs1;
+      }
+#else /* no yyoverflow */
+# ifndef YYSTACK_RELOCATE
+      goto yyexhaustedlab;
+# else
+      /* Extend the stack our own way.  */
+      if (YYMAXDEPTH <= yystacksize)
+	goto yyexhaustedlab;
+      yystacksize *= 2;
+      if (YYMAXDEPTH < yystacksize)
+	yystacksize = YYMAXDEPTH;
+
+      {
+	yytype_int16 *yyss1 = yyss;
+	union yyalloc *yyptr =
+	  (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
+	if (! yyptr)
+	  goto yyexhaustedlab;
+	YYSTACK_RELOCATE (yyss);
+	YYSTACK_RELOCATE (yyvs);
+
+#  undef YYSTACK_RELOCATE
+	if (yyss1 != yyssa)
+	  YYSTACK_FREE (yyss1);
+      }
+# endif
+#endif /* no yyoverflow */
+
+      yyssp = yyss + yysize - 1;
+      yyvsp = yyvs + yysize - 1;
+
+
+      YYDPRINTF ((stderr, "Stack size increased to %lu\n",
+		  (unsigned long int) yystacksize));
+
+      if (yyss + yystacksize - 1 <= yyssp)
+	YYABORT;
+    }
+
+  YYDPRINTF ((stderr, "Entering state %d\n", yystate));
+
+  goto yybackup;
+
+/*-----------.
+| yybackup.  |
+`-----------*/
+yybackup:
+
+  /* Do appropriate processing given the current state.  Read a
+     look-ahead token if we need one and don't already have one.  */
+
+  /* First try to decide what to do without reference to look-ahead token.  */
+  yyn = yypact[yystate];
+  if (yyn == YYPACT_NINF)
+    goto yydefault;
+
+  /* Not known => get a look-ahead token if don't already have one.  */
+
+  /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol.  */
+  if (yychar == YYEMPTY)
+    {
+      YYDPRINTF ((stderr, "Reading a token: "));
+      yychar = YYLEX;
+    }
+
+  if (yychar <= YYEOF)
+    {
+      yychar = yytoken = YYEOF;
+      YYDPRINTF ((stderr, "Now at end of input.\n"));
+    }
+  else
+    {
+      yytoken = YYTRANSLATE (yychar);
+      YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
+    }
+
+  /* If the proper action on seeing token YYTOKEN is to reduce or to
+     detect an error, take that action.  */
+  yyn += yytoken;
+  if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
+    goto yydefault;
+  yyn = yytable[yyn];
+  if (yyn <= 0)
+    {
+      if (yyn == 0 || yyn == YYTABLE_NINF)
+	goto yyerrlab;
+      yyn = -yyn;
+      goto yyreduce;
+    }
+
+  if (yyn == YYFINAL)
+    YYACCEPT;
+
+  /* Count tokens shifted since error; after three, turn off error
+     status.  */
+  if (yyerrstatus)
+    yyerrstatus--;
+
+  /* Shift the look-ahead token.  */
+  YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
+
+  /* Discard the shifted token unless it is eof.  */
+  if (yychar != YYEOF)
+    yychar = YYEMPTY;
+
+  yystate = yyn;
+  *++yyvsp = yylval;
+
+  goto yynewstate;
+
+
+/*-----------------------------------------------------------.
+| yydefault -- do the default action for the current state.  |
+`-----------------------------------------------------------*/
+yydefault:
+  yyn = yydefact[yystate];
+  if (yyn == 0)
+    goto yyerrlab;
+  goto yyreduce;
+
+
+/*-----------------------------.
+| yyreduce -- Do a reduction.  |
+`-----------------------------*/
+yyreduce:
+  /* yyn is the number of a rule to reduce with.  */
+  yylen = yyr2[yyn];
+
+  /* If YYLEN is nonzero, implement the default value of the action:
+     `$$ = $1'.
+
+     Otherwise, the following line sets YYVAL to garbage.
+     This behavior is undocumented and Bison
+     users should not rely upon it.  Assigning to YYVAL
+     unconditionally makes the parser a bit smaller, and it avoids a
+     GCC warning that YYVAL may be used uninitialized.  */
+  yyval = yyvsp[1-yylen];
+
+
+  YY_REDUCE_PRINT (yyn);
+  switch (yyn)
+    {
+        case 5:
+#line 67 "convert.y"
+    {initdimprob(1,(yyvsp[(2) - (3)].na),"0","0");;}
+    break;
+
+  case 6:
+#line 68 "convert.y"
+    {initdimprob(2,(yyvsp[(2) - (5)].na), (yyvsp[(4) - (5)].na),"0");;}
+    break;
+
+  case 7:
+#line 70 "convert.y"
+    {initdimprob(3,(yyvsp[(2) - (7)].na), (yyvsp[(4) - (7)].na), (yyvsp[(6) - (7)].na));;}
+    break;
+
+  case 8:
+#line 72 "convert.y"
+    {listofmodules = Addtolistnom((yyvsp[(2) - (3)].na),listofmodules,0);
+                                                        Addmoduletothelist((yyvsp[(2) - (3)].na));;}
+    break;
+
+  case 9:
+#line 74 "convert.y"
+    {Add_NotGridDepend_Var_1((yyvsp[(3) - (4)].na));;}
+    break;
+
+  case 10:
+#line 75 "convert.y"
+    {
+                                    if (!strcasecmp((yyvsp[(2) - (3)].na),"FIXED_GRIDS"))
+                                                                 fixedgrids=1;
+                                    if (!strcasecmp((yyvsp[(2) - (3)].na),"ONLY_FIXED_GRIDS"))
+                                                             onlyfixedgrids=1;
+                                 ;}
+    break;
+
+
+/* Line 1267 of yacc.c.  */
+#line 1376 "convert.tab.c"
+      default: break;
+    }
+  YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
+
+  YYPOPSTACK (yylen);
+  yylen = 0;
+  YY_STACK_PRINT (yyss, yyssp);
+
+  *++yyvsp = yyval;
+
+
+  /* Now `shift' the result of the reduction.  Determine what state
+     that goes to, based on the state we popped back to and the rule
+     number reduced by.  */
+
+  yyn = yyr1[yyn];
+
+  yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
+  if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
+    yystate = yytable[yystate];
+  else
+    yystate = yydefgoto[yyn - YYNTOKENS];
+
+  goto yynewstate;
+
+
+/*------------------------------------.
+| yyerrlab -- here on detecting error |
+`------------------------------------*/
+yyerrlab:
+  /* If not already recovering from an error, report this error.  */
+  if (!yyerrstatus)
+    {
+      ++yynerrs;
+#if ! YYERROR_VERBOSE
+      yyerror (YY_("syntax error"));
+#else
+      {
+	YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
+	if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
+	  {
+	    YYSIZE_T yyalloc = 2 * yysize;
+	    if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
+	      yyalloc = YYSTACK_ALLOC_MAXIMUM;
+	    if (yymsg != yymsgbuf)
+	      YYSTACK_FREE (yymsg);
+	    yymsg = (char *) YYSTACK_ALLOC (yyalloc);
+	    if (yymsg)
+	      yymsg_alloc = yyalloc;
+	    else
+	      {
+		yymsg = yymsgbuf;
+		yymsg_alloc = sizeof yymsgbuf;
+	      }
+	  }
+
+	if (0 < yysize && yysize <= yymsg_alloc)
+	  {
+	    (void) yysyntax_error (yymsg, yystate, yychar);
+	    yyerror (yymsg);
+	  }
+	else
+	  {
+	    yyerror (YY_("syntax error"));
+	    if (yysize != 0)
+	      goto yyexhaustedlab;
+	  }
+      }
+#endif
+    }
+
+
+
+  if (yyerrstatus == 3)
+    {
+      /* If just tried and failed to reuse look-ahead token after an
+	 error, discard it.  */
+
+      if (yychar <= YYEOF)
+	{
+	  /* Return failure if at end of input.  */
+	  if (yychar == YYEOF)
+	    YYABORT;
+	}
+      else
+	{
+	  yydestruct ("Error: discarding",
+		      yytoken, &yylval);
+	  yychar = YYEMPTY;
+	}
+    }
+
+  /* Else will try to reuse look-ahead token after shifting the error
+     token.  */
+  goto yyerrlab1;
+
+
+/*---------------------------------------------------.
+| yyerrorlab -- error raised explicitly by YYERROR.  |
+`---------------------------------------------------*/
+yyerrorlab:
+
+  /* Pacify compilers like GCC when the user code never invokes
+     YYERROR and the label yyerrorlab therefore never appears in user
+     code.  */
+  if (/*CONSTCOND*/ 0)
+     goto yyerrorlab;
+
+  /* Do not reclaim the symbols of the rule which action triggered
+     this YYERROR.  */
+  YYPOPSTACK (yylen);
+  yylen = 0;
+  YY_STACK_PRINT (yyss, yyssp);
+  yystate = *yyssp;
+  goto yyerrlab1;
+
+
+/*-------------------------------------------------------------.
+| yyerrlab1 -- common code for both syntax error and YYERROR.  |
+`-------------------------------------------------------------*/
+yyerrlab1:
+  yyerrstatus = 3;	/* Each real token shifted decrements this.  */
+
+  for (;;)
+    {
+      yyn = yypact[yystate];
+      if (yyn != YYPACT_NINF)
+	{
+	  yyn += YYTERROR;
+	  if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
+	    {
+	      yyn = yytable[yyn];
+	      if (0 < yyn)
+		break;
+	    }
+	}
+
+      /* Pop the current state because it cannot handle the error token.  */
+      if (yyssp == yyss)
+	YYABORT;
+
+
+      yydestruct ("Error: popping",
+		  yystos[yystate], yyvsp);
+      YYPOPSTACK (1);
+      yystate = *yyssp;
+      YY_STACK_PRINT (yyss, yyssp);
+    }
+
+  if (yyn == YYFINAL)
+    YYACCEPT;
+
+  *++yyvsp = yylval;
+
+
+  /* Shift the error token.  */
+  YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
+
+  yystate = yyn;
+  goto yynewstate;
+
+
+/*-------------------------------------.
+| yyacceptlab -- YYACCEPT comes here.  |
+`-------------------------------------*/
+yyacceptlab:
+  yyresult = 0;
+  goto yyreturn;
+
+/*-----------------------------------.
+| yyabortlab -- YYABORT comes here.  |
+`-----------------------------------*/
+yyabortlab:
+  yyresult = 1;
+  goto yyreturn;
+
+#ifndef yyoverflow
+/*-------------------------------------------------.
+| yyexhaustedlab -- memory exhaustion comes here.  |
+`-------------------------------------------------*/
+yyexhaustedlab:
+  yyerror (YY_("memory exhausted"));
+  yyresult = 2;
+  /* Fall through.  */
+#endif
+
+yyreturn:
+  if (yychar != YYEOF && yychar != YYEMPTY)
+     yydestruct ("Cleanup: discarding lookahead",
+		 yytoken, &yylval);
+  /* Do not reclaim the symbols of the rule which action triggered
+     this YYABORT or YYACCEPT.  */
+  YYPOPSTACK (yylen);
+  YY_STACK_PRINT (yyss, yyssp);
+  while (yyssp != yyss)
+    {
+      yydestruct ("Cleanup: popping",
+		  yystos[*yyssp], yyvsp);
+      YYPOPSTACK (1);
+    }
+#ifndef yyoverflow
+  if (yyss != yyssa)
+    YYSTACK_FREE (yyss);
+#endif
+#if YYERROR_VERBOSE
+  if (yymsg != yymsgbuf)
+    YYSTACK_FREE (yymsg);
+#endif
+  /* Make sure YYID is used.  */
+  return YYID (yyresult);
+}
+
+
+#line 82 "convert.y"
+
+
+int main(int argc,char *argv[])
+{
+   extern FILE * yyin ;
+   FILE *dependglobaloutput;
+   int i;
+   listnom *parcours;
+   listvar *newvar;
+   int stylegiven = 0;
+   int infreegiven ;
+   int infixedgiven ;
+   int lengthmainfile;
+
+   if (argc < 2)
+   {
+       printf("usage : conv <file> [-rm] [-incdir <directory>] \n");
+       printf(" [-comdirin   <directory>] [-comdirout <directory>]\n");
+       printf(" [-convfile  <FILENAME >] -SubloopScalar -SubloopScalar1 \n");
+       printf(" [-free|-fixed]\n");
+       exit(0);
+   }
+/******************************************************************************/
+/*  1-  Variables initialization                                              */
+/******************************************************************************/
+   List_Global_Var=(listvar *)NULL;
+   List_GlobalParameter_Var=(listvar *)NULL;
+   List_Allocate_Var=(listallocate *)NULL;
+   List_Common_Var=(listvar *)NULL;
+   List_SubroutineWhereAgrifUsed=(listnom *)NULL;
+   List_Subroutine_For_Alloc=(listnom *)NULL;
+   List_Include=(listusemodule *)NULL;
+   List_NameOfModuleUsed=(listusemodule *)NULL;
+   listofmoduletmp=(listusemodule *)NULL;
+   List_SubroutineDeclaration_Var=(listvar *)NULL;
+   List_UsedInSubroutine_Var=(listvar *)NULL;
+   List_NotGridDepend_Var=(listvar *)NULL;
+   Listofavailableindices=(listindice *)NULL;
+   List_CouplePointed_Var=(listvarpointtovar *)NULL;
+   List_ModuleUsed_Var = (listvar *)NULL;
+   List_ModuleUsedInModuleUsed_Var = (listvar *)NULL;
+   List_GlobParamModuleUsed_Var = (listparameter *)NULL;
+   List_GlobParamModuleUsedInModuleUsed_Var = (listparameter *)NULL;
+   List_SubroutineArgument_Var = (listvar *)NULL;
+   List_FunctionType_Var = (listvar *)NULL;
+   tmpuselocallist = (listusemodule *)NULL;
+   List_ContainsSubroutine = (listnom *)NULL;
+   oldfortranout = (FILE *)NULL;
+
+   strcpy(mainfile,argv[1]);
+   strcpy(nomdir,"AGRIF_INC");
+   strcpy(commondirin,".");
+   strcpy(commondirout,".");
+   strcpy(filetoparse," ");
+   strcpy(subofagrifinitgrids,"");
+   strcpy(meetagrifinitgrids,"");
+   strcpy(mpiinitvar,"");
+
+   length_last = 0 ;
+   length_first = 0 ;
+   length_v_typevar = 0 ;
+   length_v_nomvar = 0 ;
+   length_v_dimchar = 0 ;
+   length_v_modulename = 0 ;
+   length_v_commonname = 0 ;
+   length_v_vallengspec = 0 ;
+   length_v_nameinttypename = 0 ;
+   length_v_commoninfile = 0 ;
+   length_v_subroutinename = 0 ;
+   length_v_precision = 0 ;
+   length_v_IntentSpec = 0 ;
+   length_v_initialvalue = 0 ;
+   length_v_readedlistdimension = 0 ;
+   length_u_usemodule = 0 ;
+   length_u_charusemodule = 0 ;
+   length_u_cursubroutine = 0 ;
+   length_u_modulename = 0 ;
+   length_n_name = 0 ;
+   length_c_namevar = 0 ;
+   length_c_namepointedvar = 0 ;
+   length_o_nom = 0 ;
+   length_o_module = 0 ;
+   length_a_nomvar = 0 ;
+   length_a_subroutine = 0 ;
+   length_a_module = 0 ;
+   length_t_usemodule = 0 ;
+   length_t_cursubroutine = 0 ;
+   length_curfilename = 0 ;
+   length_nomfileoutput = 0 ;
+   length_motparse = 0 ;
+   length_mainfile = 0 ;
+   length_nomdir = 0 ;
+   length_commondirout = 0 ;
+   length_commondirin = 0 ;
+   length_filetoparse = 0 ;
+   length_curbuf = 0 ;
+   length_toprintglob = 0 ;
+   length_tmpvargridname = 0 ;
+   length_ligne_Subloop = 0 ;
+   length_lvargridname_toamr = 0 ;
+   length_toprint_utilagrif = 0 ;
+   length_toprinttmp_utilchar = 0 ;
+   length_ligne_writedecl = 0 ;
+   length_newname_toamr = 0 ;
+   length_newname_writedecl = 0 ;
+   length_ligne_toamr = 0 ;
+   length_tmpligne_writedecl = 0 ;
+   value_char_size = 0 ;
+   value_char_size1 = 0 ;
+   value_char_size2 = 0 ;
+   value_char_size3 = 0 ;
+   inallocate = 0;
+   infixed = 1;
+   infree  = 0;
+
+   checkexistcommon=1;
+   todebug=0;
+   onlyfixedgrids=0;
+   fixedgrids=0;
+   InAgrifParentDef = 0;
+   IndicenbmaillesX=0;
+   IndicenbmaillesY=0;
+   IndicenbmaillesZ=0;
+   created_dimensionlist = 1;
+   indicemaxtabvars = 0;   /* current indice in the table tabvars             */
+   SubloopScalar = 0;
+   todebug = 0;
+   todebugfree = 0;
+   retour77 = 1 ;
+   mark = 0 ;
+   shouldincludempif = 0 ;
+   Read_val_max();
+/******************************************************************************/
+/*  2-  Program arguments                                                     */
+/******************************************************************************/
+
+   if ((yyin=fopen(argv[1],"r"))==NULL)
+   {
+      printf("the file %s doesn't exist \n",argv[1]);
+      exit(0);
+   }
+
+   i=2;
+   while (i<argc)
+   {
+      if (!strcasecmp(argv[i],"-incdir"))
+      {
+         strcpy(nomdir,argv[i+1]);
+         i++;
+      }
+      else if (!strcasecmp(argv[i],"-comdirin")) /* input directory           */
+      {
+         strcpy(commondirin,argv[i+1]);
+         i++;
+      }
+      else if (!strcasecmp(argv[i],"-comdirout")) /* output directory         */
+      {
+         strcpy(commondirout,argv[i+1]);
+         i++;
+      }
+      else if (!strcasecmp(argv[i],"-convfile")) /* file to parse             */
+      {
+         strcpy(filetoparse,argv[i+1]);
+         i++;
+         lengthmainfile = strlen(filetoparse);
+         if (!strcasecmp(&filetoparse[lengthmainfile-4],".f90"))
+         {
+         infixed = 0;
+         infree = 1;
+         }
+         else
+         {
+         infixed = 1;
+         infree = 0;
+         }
+      }
+      else if (!strcasecmp(argv[i],"-free")) /* file to parse        */
+      {
+         stylegiven = 1;
+         infreegiven  = 1 ;
+         infixedgiven = 0;
+      }   
+      else if (!strcasecmp(argv[i],"-fixed")) /* file to parse        */
+      {
+         stylegiven = 1;
+         infreegiven  = 0;
+         infixedgiven = 1;
+      }         
+      else if (!strcasecmp(argv[i],"-SubloopScalar")) /* file to parse        */
+      {
+         SubloopScalar = 1 ;
+      }
+      else if (!strcasecmp(argv[i],"-SubloopScalar1")) /* file to parse       */
+      {
+         SubloopScalar = 2 ;
+      }
+      else if (!strcasecmp(argv[i],"-todebug")) /* file to parse       */
+      {
+         todebug = 1 ;
+      }
+      else if (!strcasecmp(argv[i],"-mark")) /* file to parse       */
+      {
+         mark = 1 ;
+      }
+      else if (!strcasecmp(argv[i],"-todebugfree")) /* file to parse       */
+      {
+         todebugfree = 1 ;
+      }
+      else if (!strcasecmp(argv[i],"-rm"))
+      {
+         checkexistcommon=0;
+      }
+      else
+      {
+         printf("Unkwon option : %s\n",argv[i]);
+         exit(0);
+      }
+      i++;
+   }
+
+   if (stylegiven == 1) 
+   {
+   infree = infreegiven;
+   infixed = infixedgiven;   
+   }
+   Save_Length(nomdir,34);
+   Save_Length(commondirout,35);
+   Save_Length(commondirin,36);
+   Save_Length(filetoparse,37);
+
+/******************************************************************************/
+/*  3-  Parsing of the  conv file <name>.in                                   */
+/******************************************************************************/
+
+   if ((yyin=fopen(argv[1],"r"))==NULL)
+   {
+       printf("the file %s doesn't exist \n",argv[1]);
+       exit(0);
+   }
+   strcpy(mainfile,argv[1]);
+   Save_Length(mainfile,33);
+
+   if ( strstr(filetoparse,".f90") ||
+        strstr(filetoparse,".F90") ) retour77 = 0;
+
+   yyparse();
+
+/******************************************************************************/
+/*  4-  Preparation of the file parsing                                       */
+/******************************************************************************/
+   if ((yyin=fopen(filetoparse,"r"))==NULL) /* Is the file to parse exist ?   */
+   {
+      printf("the file %s doesn't exist \n",filetoparse);
+      exit(0);
+   }
+   /* mainfile : the name of the file to parse                                */
+   strcpy(mainfile,filetoparse);
+   /*                                                                         */
+   if ((dependglobaloutput=fopen(".dependglobal_agrif","r"))!=NULL)
+   {
+      fscanf(dependglobaloutput,"%d\n",&indicemaxtabvars);
+      fclose(dependglobaloutput);
+   }
+   Readthedependavailablefile();
+   /* Read the .dependnbxnby file which contains indices of nbmaillsX,        */
+   /*    nbmailleY and nbmailleZ                                              */
+   Readthedependnbxnbyfile();
+   Read_Subroutine_For_Alloc();
+/******************************************************************************/
+/*  5-  Parsing of the input file (2 times)                                   */
+/******************************************************************************/
+   /* Record all variable in list                                             */
+   firstpass = 1;
+   processfortran(filetoparse);
+   /*                                                                         */
+   CompleteThelistvarindoloop();
+   /* Read list of module used                                                */
+   RecordUseModulesVariables();
+   /* Read list of module used in module used                                 */
+   RecordUseModulesUseModulesVariables();
+   /* Save variables are considered as globals ones                           */
+   Update_List_Global_Var_From_List_Save_Var();
+   /* Update all lists                                                        */
+   ListUpdate();
+   /*                                                                         */
+   Clean_List_Global_Var();
+   /* Indice tabvars identification                                           */
+   IndiceTabvarsIdentification();
+   /* Update all lists                                                        */
+   ListUpdate();
+   /* The allocation subroutine is necessary ????                             */
+   New_Allocate_Subroutine_Is_Necessary();
+   /* The allocation subroutine is necessary for common list                  */
+   New_Allocate_Subroutine_For_Common_Is_Necessary();
+   /* Sort List_SubroutineArgument_Var                                        */
+   Sort_List_SubroutineArgument_Var();
+   /* Clean all lists                                                         */
+   ListClean();
+   /* Update Indice of List_UsedInSubroutine_Var from module used             */
+   List_UsedInSubroutine_Var_Update_From_Module_Used();
+   /* Update List_SubroutineWhereAgrifUsed                                    */
+   UpdateList_SubroutineWhereAgrifUsed();
+   /* Update List_UsedInSubroutine_Var with v_readedlistdimension             */
+   UpdateList_UsedInSubroutine_With_dimension();;
+   /*                                                                         */
+   ModifyThelistvarindoloop();
+   /*                                                                         */
+   UpdateListDeclarationWithDimensionList();
+   /*                                                                         */
+   GiveTypeOfVariables();
+   Affiche();
+   /* Build new subroutines                                                   */
+   firstpass = 0;
+   processfortran(filetoparse);
+
+   newvar = (listvar *)NULL;
+/*newvar = List_Global_Var; */
+   while ( newvar )
+   {
+      printf("++++ %s %d %s %s %s\n",
+      newvar->var->v_nomvar,
+      newvar->var->v_nbdim,
+      newvar->var->v_subroutinename,
+      newvar->var->v_modulename,
+      newvar->var->v_typevar
+             );
+      newvar = newvar->suiv;
+   }
+/******************************************************************************/
+/*  6-  Write informations in output files                                    */
+/******************************************************************************/
+
+   /* Write the .dependglobal_agrif file which contain the max indice         */
+   /*    of the tabvars table                                                 */
+   dependglobaloutput = fopen(".dependglobal_agrif","w");
+   fprintf(dependglobaloutput,"%d\n",indicemaxtabvars);
+   fclose(dependglobaloutput);
+   /* Write the list of available indice                                      */
+   Writethedependavailablefile();
+   /* Write the .dependnbxnby file which contains indices of nbmaillsX,       */
+   /*    nbmailleY and nbmailleZ                                              */
+   Writethedependnbxnbyfile();
+   /* Write the .depend<namefile> file which contain general informations     */
+   /*    about variable of this file                                          */
+   parcours = List_NameOfModule;
+   while( parcours )
+   {
+      Writethedependlistofmoduleused(parcours->o_nom);
+      WritedependParameterList(parcours->o_nom);
+      Writethedependfile(parcours->o_nom,List_Global_Var);
+      parcours=parcours->suiv;
+   }
+   parcours = List_NameOfCommon;
+   while( parcours )
+   {
+      Writethedependfile(parcours->o_nom,List_Common_Var);
+      parcours=parcours->suiv;
+   }
+   Write_Subroutine_For_Alloc();
+/******************************************************************************/
+/*  7-  Create files in AGRIF_INC directory                                   */
+/******************************************************************************/
+   creefichieramr(NameTamponfile);
+
+   Write_val_max();
+
+   if ( todebug == 1 ) printf("Out of CONV \n");
+   return 0;
+}
+
+#line 2 "convert.yy.c"
+
+#line 4 "convert.yy.c"
+
+#define  YY_INT_ALIGNED short int
+
+/* A lexical scanner generated by flex */
+
+#define FLEX_SCANNER
+#define YY_FLEX_MAJOR_VERSION 2
+#define YY_FLEX_MINOR_VERSION 5
+#define YY_FLEX_SUBMINOR_VERSION 35
+#if YY_FLEX_SUBMINOR_VERSION > 0
+#define FLEX_BETA
+#endif
+
+/* First, we deal with  platform-specific or compiler-specific issues. */
+
+/* begin standard C headers. */
+#include <stdio.h>
+#include <string.h>
+#include <errno.h>
+#include <stdlib.h>
+
+/* end standard C headers. */
+
+/* flex integer type definitions */
+
+#ifndef FLEXINT_H
+#define FLEXINT_H
+
+/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
+
+#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+
+/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
+ * if you want the limit (max/min) macros for int types. 
+ */
+#ifndef __STDC_LIMIT_MACROS
+#define __STDC_LIMIT_MACROS 1
+#endif
+
+#include <inttypes.h>
+typedef int8_t flex_int8_t;
+typedef uint8_t flex_uint8_t;
+typedef int16_t flex_int16_t;
+typedef uint16_t flex_uint16_t;
+typedef int32_t flex_int32_t;
+typedef uint32_t flex_uint32_t;
+#else
+typedef signed char flex_int8_t;
+typedef short int flex_int16_t;
+typedef int flex_int32_t;
+typedef unsigned char flex_uint8_t; 
+typedef unsigned short int flex_uint16_t;
+typedef unsigned int flex_uint32_t;
+#endif /* ! C99 */
+
+/* Limits of integral types. */
+#ifndef INT8_MIN
+#define INT8_MIN               (-128)
+#endif
+#ifndef INT16_MIN
+#define INT16_MIN              (-32767-1)
+#endif
+#ifndef INT32_MIN
+#define INT32_MIN              (-2147483647-1)
+#endif
+#ifndef INT8_MAX
+#define INT8_MAX               (127)
+#endif
+#ifndef INT16_MAX
+#define INT16_MAX              (32767)
+#endif
+#ifndef INT32_MAX
+#define INT32_MAX              (2147483647)
+#endif
+#ifndef UINT8_MAX
+#define UINT8_MAX              (255U)
+#endif
+#ifndef UINT16_MAX
+#define UINT16_MAX             (65535U)
+#endif
+#ifndef UINT32_MAX
+#define UINT32_MAX             (4294967295U)
+#endif
+
+#endif /* ! FLEXINT_H */
+
+#ifdef __cplusplus
+
+/* The "const" storage-class-modifier is valid. */
+#define YY_USE_CONST
+
+#else	/* ! __cplusplus */
+
+/* C99 requires __STDC__ to be defined as 1. */
+#if defined (__STDC__)
+
+#define YY_USE_CONST
+
+#endif	/* defined (__STDC__) */
+#endif	/* ! __cplusplus */
+
+#ifdef YY_USE_CONST
+#define yyconst const
+#else
+#define yyconst
+#endif
+
+/* Returned upon end-of-file. */
+#define YY_NULL 0
+
+/* Promotes a possibly negative, possibly signed char to an unsigned
+ * integer for use as an array index.  If the signed char is negative,
+ * we want to instead treat it as an 8-bit unsigned char, hence the
+ * double cast.
+ */
+#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
+
+/* Enter a start condition.  This macro really ought to take a parameter,
+ * but we do it the disgusting crufty way forced on us by the ()-less
+ * definition of BEGIN.
+ */
+#define BEGIN (yy_start) = 1 + 2 *
+
+/* Translate the current start state into a value that can be later handed
+ * to BEGIN to return to the state.  The YYSTATE alias is for lex
+ * compatibility.
+ */
+#define YY_START (((yy_start) - 1) / 2)
+#define YYSTATE YY_START
+
+/* Action number for EOF rule of a given start state. */
+#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
+
+/* Special action meaning "start processing a new file". */
+#define YY_NEW_FILE yyrestart(yyin  )
+
+#define YY_END_OF_BUFFER_CHAR 0
+
+/* Size of default input buffer. */
+#ifndef YY_BUF_SIZE
+#define YY_BUF_SIZE 16384
+#endif
+
+/* The state buf must be large enough to hold one state per character in the main buffer.
+ */
+#define YY_STATE_BUF_SIZE   ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
+
+#ifndef YY_TYPEDEF_YY_BUFFER_STATE
+#define YY_TYPEDEF_YY_BUFFER_STATE
+typedef struct yy_buffer_state *YY_BUFFER_STATE;
+#endif
+
+#ifndef YY_TYPEDEF_YY_SIZE_T
+#define YY_TYPEDEF_YY_SIZE_T
+typedef size_t yy_size_t;
+#endif
+
+extern yy_size_t yyleng;
+
+extern FILE *yyin, *yyout;
+
+#define EOB_ACT_CONTINUE_SCAN 0
+#define EOB_ACT_END_OF_FILE 1
+#define EOB_ACT_LAST_MATCH 2
+
+    #define YY_LESS_LINENO(n)
+    
+/* Return all but the first "n" matched characters back to the input stream. */
+#define yyless(n) \
+	do \
+		{ \
+		/* Undo effects of setting up yytext. */ \
+        int yyless_macro_arg = (n); \
+        YY_LESS_LINENO(yyless_macro_arg);\
+		*yy_cp = (yy_hold_char); \
+		YY_RESTORE_YY_MORE_OFFSET \
+		(yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
+		YY_DO_BEFORE_ACTION; /* set up yytext again */ \
+		} \
+	while ( 0 )
+
+#define unput(c) yyunput( c, (yytext_ptr)  )
+
+#ifndef YY_STRUCT_YY_BUFFER_STATE
+#define YY_STRUCT_YY_BUFFER_STATE
+struct yy_buffer_state
+	{
+	FILE *yy_input_file;
+
+	char *yy_ch_buf;		/* input buffer */
+	char *yy_buf_pos;		/* current position in input buffer */
+
+	/* Size of input buffer in bytes, not including room for EOB
+	 * characters.
+	 */
+	yy_size_t yy_buf_size;
+
+	/* Number of characters read into yy_ch_buf, not including EOB
+	 * characters.
+	 */
+	yy_size_t yy_n_chars;
+
+	/* Whether we "own" the buffer - i.e., we know we created it,
+	 * and can realloc() it to grow it, and should free() it to
+	 * delete it.
+	 */
+	int yy_is_our_buffer;
+
+	/* Whether this is an "interactive" input source; if so, and
+	 * if we're using stdio for input, then we want to use getc()
+	 * instead of fread(), to make sure we stop fetching input after
+	 * each newline.
+	 */
+	int yy_is_interactive;
+
+	/* Whether we're considered to be at the beginning of a line.
+	 * If so, '^' rules will be active on the next match, otherwise
+	 * not.
+	 */
+	int yy_at_bol;
+
+    int yy_bs_lineno; /**< The line count. */
+    int yy_bs_column; /**< The column count. */
+    
+	/* Whether to try to fill the input buffer when we reach the
+	 * end of it.
+	 */
+	int yy_fill_buffer;
+
+	int yy_buffer_status;
+
+#define YY_BUFFER_NEW 0
+#define YY_BUFFER_NORMAL 1
+	/* When an EOF's been seen but there's still some text to process
+	 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
+	 * shouldn't try reading from the input source any more.  We might
+	 * still have a bunch of tokens to match, though, because of
+	 * possible backing-up.
+	 *
+	 * When we actually see the EOF, we change the status to "new"
+	 * (via yyrestart()), so that the user can continue scanning by
+	 * just pointing yyin at a new input file.
+	 */
+#define YY_BUFFER_EOF_PENDING 2
+
+	};
+#endif /* !YY_STRUCT_YY_BUFFER_STATE */
+
+/* Stack of input buffers. */
+static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
+static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
+static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
+
+/* We provide macros for accessing buffer states in case in the
+ * future we want to put the buffer states in a more general
+ * "scanner state".
+ *
+ * Returns the top of the stack, or NULL.
+ */
+#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
+                          ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
+                          : NULL)
+
+/* Same as previous macro, but useful when we know that the buffer stack is not
+ * NULL or when we need an lvalue. For internal use only.
+ */
+#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
+
+/* yy_hold_char holds the character lost when yytext is formed. */
+static char yy_hold_char;
+static yy_size_t yy_n_chars;		/* number of characters read into yy_ch_buf */
+yy_size_t yyleng;
+
+/* Points to current character in buffer. */
+static char *yy_c_buf_p = (char *) 0;
+static int yy_init = 0;		/* whether we need to initialize */
+static int yy_start = 0;	/* start state number */
+
+/* Flag which is used to allow yywrap()'s to do buffer switches
+ * instead of setting up a fresh yyin.  A bit of a hack ...
+ */
+static int yy_did_buffer_switch_on_eof;
+
+void yyrestart (FILE *input_file  );
+void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer  );
+YY_BUFFER_STATE yy_create_buffer (FILE *file,int size  );
+void yy_delete_buffer (YY_BUFFER_STATE b  );
+void yy_flush_buffer (YY_BUFFER_STATE b  );
+void yypush_buffer_state (YY_BUFFER_STATE new_buffer  );
+void yypop_buffer_state (void );
+
+static void yyensure_buffer_stack (void );
+static void yy_load_buffer_state (void );
+static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file  );
+
+#define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER )
+
+YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size  );
+YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str  );
+YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,yy_size_t len  );
+
+void *yyalloc (yy_size_t  );
+void *yyrealloc (void *,yy_size_t  );
+void yyfree (void *  );
+
+#define yy_new_buffer yy_create_buffer
+
+#define yy_set_interactive(is_interactive) \
+	{ \
+	if ( ! YY_CURRENT_BUFFER ){ \
+        yyensure_buffer_stack (); \
+		YY_CURRENT_BUFFER_LVALUE =    \
+            yy_create_buffer(yyin,YY_BUF_SIZE ); \
+	} \
+	YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
+	}
+
+#define yy_set_bol(at_bol) \
+	{ \
+	if ( ! YY_CURRENT_BUFFER ){\
+        yyensure_buffer_stack (); \
+		YY_CURRENT_BUFFER_LVALUE =    \
+            yy_create_buffer(yyin,YY_BUF_SIZE ); \
+	} \
+	YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
+	}
+
+#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
+
+/* Begin user sect3 */
+
+typedef unsigned char YY_CHAR;
+
+FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
+
+typedef int yy_state_type;
+
+extern int yylineno;
+
+int yylineno = 1;
+
+extern char *yytext;
+#define yytext_ptr yytext
+
+static yy_state_type yy_get_previous_state (void );
+static yy_state_type yy_try_NUL_trans (yy_state_type current_state  );
+static int yy_get_next_buffer (void );
+static void yy_fatal_error (yyconst char msg[]  );
+
+/* Done after the current pattern has been matched and before the
+ * corresponding action - sets up yytext.
+ */
+#define YY_DO_BEFORE_ACTION \
+	(yytext_ptr) = yy_bp; \
+	yyleng = (size_t) (yy_cp - yy_bp); \
+	(yy_hold_char) = *yy_cp; \
+	*yy_cp = '\0'; \
+	(yy_c_buf_p) = yy_cp;
+
+#define YY_NUM_RULES 12
+#define YY_END_OF_BUFFER 13
+/* This struct is not used in this scanner,
+   but its presence is necessary. */
+struct yy_trans_info
+	{
+	flex_int32_t yy_verify;
+	flex_int32_t yy_nxt;
+	};
+static yyconst flex_int16_t yy_accept[77] =
+    {   0,
+        0,    0,    0,    0,   13,   12,   11,   10,   12,    9,
+       12,   12,   12,    9,    8,    8,    8,    8,    8,    8,
+       11,    0,    4,    7,    7,    7,    5,    8,    8,    8,
+        8,    8,    8,    8,    6,    8,    8,    8,    8,    3,
+        8,    8,    8,    8,    8,    8,    8,    8,    8,    8,
+        8,    8,    8,    8,    8,    8,    8,    8,    8,    8,
+        8,    8,    8,    8,    8,    2,    8,    8,    8,    1,
+        8,    8,    8,    8,    6,    0
+    } ;
+
+static yyconst flex_int32_t yy_ec[256] =
+    {   0,
+        1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    2,    1,    1,    1,    1,    4,    1,    1,    5,
+        6,    1,    1,    7,    1,    1,    1,    8,    9,   10,
+       11,    8,    8,    8,   12,    8,    8,   13,   14,    1,
+        1,    1,    1,    1,   15,   16,   16,   17,   18,   19,
+       20,   16,   21,   16,   16,   22,   23,   24,   25,   26,
+       16,   27,   28,   29,   30,   16,   16,   31,   32,   16,
+       33,    1,   34,    1,   35,    1,   36,   16,   16,   37,
+
+       38,   39,   40,   16,   41,   16,   16,   42,   43,   44,
+       45,   46,   16,   47,   48,   49,   50,   16,   16,   51,
+       52,   16,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1
+    } ;
+
+static yyconst flex_int32_t yy_meta[53] =
+    {   0,
+        1,    1,    2,    1,    1,    1,    1,    3,    3,    3,
+        3,    3,    1,    1,    3,    3,    3,    3,    3,    3,
+        3,    3,    3,    3,    3,    3,    3,    3,    3,    3,
+        3,    3,    1,    1,    3,    3,    3,    3,    3,    3,
+        3,    3,    3,    3,    3,    3,    3,    3,    3,    3,
+        3,    3
+    } ;
+
+static yyconst flex_int16_t yy_base[79] =
+    {   0,
+        0,    0,    0,    0,  150,  164,  147,  164,  144,  164,
+       36,   37,   38,  134,    0,   44,   32,   34,   44,   33,
+      144,  141,  140,  164,  164,  164,  164,    0,  131,   31,
+       34,   42,   39,   49,    0,   50,   49,   38,   56,    0,
+       59,   52,  107,   68,  106,   72,   75,   72,   77,   81,
+       79,   76,   75,   86,   73,   88,   85,   89,   90,   79,
+       93,   86,   99,   97,  103,    0,   37,  115,  114,    0,
+      108,  116,  121,  112,    0,  164,  160,   57
+    } ;
+
+static yyconst flex_int16_t yy_def[79] =
+    {   0,
+       76,    1,    1,    1,   76,   76,   76,   76,   77,   76,
+       76,   76,   76,   76,   78,   78,   78,   78,   78,   78,
+       76,   77,   77,   76,   76,   76,   76,   78,   78,   78,
+       78,   78,   78,   78,   78,   78,   78,   78,   78,   78,
+       78,   78,   78,   78,   78,   78,   78,   78,   78,   78,
+       78,   78,   78,   78,   78,   78,   78,   78,   78,   78,
+       78,   78,   78,   78,   78,   78,   78,   78,   78,   78,
+       78,   78,   78,   78,   78,    0,   76,   76
+    } ;
+
+static yyconst flex_int16_t yy_nxt[217] =
+    {   0,
+        6,    7,    8,    9,   10,   10,   10,    6,   11,   12,
+       13,    6,   14,   10,   15,   15,   15,   15,   16,   15,
+       15,   15,   15,   17,   18,   19,   15,   15,   15,   20,
+       15,   15,   10,   10,   15,   15,   15,   15,   16,   15,
+       15,   15,   15,   17,   18,   19,   15,   15,   15,   20,
+       15,   15,   24,   25,   26,   29,   31,   32,   33,   28,
+       34,   36,   37,   38,   30,   39,   40,   41,   42,   43,
+       44,   69,   24,   25,   26,   45,   31,   32,   46,   33,
+       34,   36,   37,   38,   30,   39,   40,   41,   42,   43,
+       48,   44,   50,   51,   52,   45,   53,   54,   46,   55,
+
+       56,   57,   58,   59,   60,   61,   62,   63,   64,   65,
+       48,   66,   50,   51,   52,   67,   53,   54,   68,   55,
+       56,   57,   58,   59,   60,   61,   62,   63,   64,   65,
+       35,   66,   70,   71,   72,   67,   73,   74,   68,   75,
+       49,   47,   35,   23,   23,   21,   27,   23,   21,   76,
+       35,   76,   70,   71,   72,   76,   73,   74,   76,   75,
+       22,   76,   22,    5,   76,   76,   76,   76,   76,   76,
+       76,   76,   76,   76,   76,   76,   76,   76,   76,   76,
+       76,   76,   76,   76,   76,   76,   76,   76,   76,   76,
+       76,   76,   76,   76,   76,   76,   76,   76,   76,   76,
+
+       76,   76,   76,   76,   76,   76,   76,   76,   76,   76,
+       76,   76,   76,   76,   76,   76
+    } ;
+
+static yyconst flex_int16_t yy_chk[217] =
+    {   0,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,   11,   12,   13,   16,   17,   18,   19,   78,
+       20,   30,   31,   32,   16,   33,   34,   36,   37,   38,
+       39,   67,   11,   12,   13,   41,   17,   18,   42,   19,
+       20,   30,   31,   32,   16,   33,   34,   36,   37,   38,
+       44,   39,   46,   47,   48,   41,   49,   50,   42,   51,
+
+       52,   53,   54,   55,   56,   57,   58,   59,   60,   61,
+       44,   62,   46,   47,   48,   63,   49,   50,   64,   51,
+       52,   53,   54,   55,   56,   57,   58,   59,   60,   61,
+       65,   62,   68,   69,   71,   63,   72,   73,   64,   74,
+       45,   43,   29,   23,   22,   21,   14,    9,    7,    5,
+       65,    0,   68,   69,   71,    0,   72,   73,    0,   74,
+       77,    0,   77,   76,   76,   76,   76,   76,   76,   76,
+       76,   76,   76,   76,   76,   76,   76,   76,   76,   76,
+       76,   76,   76,   76,   76,   76,   76,   76,   76,   76,
+       76,   76,   76,   76,   76,   76,   76,   76,   76,   76,
+
+       76,   76,   76,   76,   76,   76,   76,   76,   76,   76,
+       76,   76,   76,   76,   76,   76
+    } ;
+
+static yy_state_type yy_last_accepting_state;
+static char *yy_last_accepting_cpos;
+
+extern int yy_flex_debug;
+int yy_flex_debug = 0;
+
+/* The intent behind this definition is that it'll catch
+ * any uses of REJECT which flex missed.
+ */
+#define REJECT reject_used_but_not_detected
+#define yymore() yymore_used_but_not_detected
+#define YY_MORE_ADJ 0
+#define YY_RESTORE_YY_MORE_OFFSET
+char *yytext;
+#line 1 "convert.lex"
+/******************************************************************************/
+/*                                                                            */
+/*     CONV (converter) for Agrif (Adaptive Grid Refinement In Fortran)       */
+/*                                                                            */
+/* Copyright or   or Copr. Laurent Debreu (Laurent.Debreu@imag.fr)            */
+/*                        Cyril Mazauric (Cyril_Mazauric@yahoo.fr)            */
+/* This software is governed by the CeCILL-C license under French law and     */
+/* abiding by the rules of distribution of free software.  You can  use,      */
+/* modify and/ or redistribute the software under the terms of the CeCILL-C   */
+/* license as circulated by CEA, CNRS and INRIA at the following URL          */
+/* "http://www.cecill.info".                                                  */
+/*                                                                            */
+/* As a counterpart to the access to the source code and  rights to copy,     */
+/* modify and redistribute granted by the license, users are provided only    */
+/* with a limited warranty  and the software's author,  the holder of the     */
+/* economic rights,  and the successive licensors  have only  limited         */
+/* liability.                                                                 */
+/*                                                                            */
+/* In this respect, the user's attention is drawn to the risks associated     */
+/* with loading,  using,  modifying and/or developing or reproducing the      */
+/* software by the user in light of its specific status of free software,     */
+/* that may mean  that it is complicated to manipulate,  and  that  also      */
+/* therefore means  that it is reserved for developers  and  experienced      */
+/* professionals having in-depth computer knowledge. Users are therefore      */
+/* encouraged to load and test the software's suitability as regards their    */
+/* requirements in conditions enabling the security of their systems and/or   */
+/* data to be ensured and,  more generally, to use and operate it in the      */
+/* same conditions as regards security.                                       */
+/*                                                                            */
+/* The fact that you are presently reading this means that you have had       */
+/* knowledge of the CeCILL-C license and that you accept its terms.           */
+/******************************************************************************/
+/* version 1.7                                                                */
+/******************************************************************************/
+
+#line 37 "convert.lex"
+#include <math.h>
+#include <stdlib.h>
+#include <string.h>
+int line_num=1;
+extern FILE * yyin;
+#define MAX_INCLUDE_DEPTH 30
+YY_BUFFER_STATE include_stack[MAX_INCLUDE_DEPTH];
+#line 565 "convert.yy.c"
+
+#define INITIAL 0
+#define character 1
+
+#ifndef YY_NO_UNISTD_H
+/* Special case for "unistd.h", since it is non-ANSI. We include it way
+ * down here because we want the user's section 1 to have been scanned first.
+ * The user has a chance to override it with an option.
+ */
+#include <unistd.h>
+#endif
+
+#ifndef YY_EXTRA_TYPE
+#define YY_EXTRA_TYPE void *
+#endif
+
+static int yy_init_globals (void );
+
+/* Accessor methods to globals.
+   These are made visible to non-reentrant scanners for convenience. */
+
+int yylex_destroy (void );
+
+int yyget_debug (void );
+
+void yyset_debug (int debug_flag  );
+
+YY_EXTRA_TYPE yyget_extra (void );
+
+void yyset_extra (YY_EXTRA_TYPE user_defined  );
+
+FILE *yyget_in (void );
+
+void yyset_in  (FILE * in_str  );
+
+FILE *yyget_out (void );
+
+void yyset_out  (FILE * out_str  );
+
+yy_size_t yyget_leng (void );
+
+char *yyget_text (void );
+
+int yyget_lineno (void );
+
+void yyset_lineno (int line_number  );
+
+/* Macros after this point can all be overridden by user definitions in
+ * section 1.
+ */
+
+#ifndef YY_SKIP_YYWRAP
+#ifdef __cplusplus
+extern "C" int yywrap (void );
+#else
+extern int yywrap (void );
+#endif
+#endif
+
+    static void yyunput (int c,char *buf_ptr  );
+    
+#ifndef yytext_ptr
+static void yy_flex_strncpy (char *,yyconst char *,int );
+#endif
+
+#ifdef YY_NEED_STRLEN
+static int yy_flex_strlen (yyconst char * );
+#endif
+
+#ifndef YY_NO_INPUT
+
+#ifdef __cplusplus
+static int yyinput (void );
+#else
+static int input (void );
+#endif
+
+#endif
+
+/* Amount of stuff to slurp up with each read. */
+#ifndef YY_READ_BUF_SIZE
+#define YY_READ_BUF_SIZE 8192
+#endif
+
+/* Copy whatever the last rule matched to the standard output. */
+#ifndef ECHO
+/* This used to be an fputs(), but since the string might contain NUL's,
+ * we now use fwrite().
+ */
+#define ECHO fwrite( yytext, yyleng, 1, yyout )
+#endif
+
+/* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
+ * is returned in "result".
+ */
+#ifndef YY_INPUT
+#define YY_INPUT(buf,result,max_size) \
+	if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
+		{ \
+		int c = '*'; \
+		yy_size_t n; \
+		for ( n = 0; n < max_size && \
+			     (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
+			buf[n] = (char) c; \
+		if ( c == '\n' ) \
+			buf[n++] = (char) c; \
+		if ( c == EOF && ferror( yyin ) ) \
+			YY_FATAL_ERROR( "input in flex scanner failed" ); \
+		result = n; \
+		} \
+	else \
+		{ \
+		errno=0; \
+		while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
+			{ \
+			if( errno != EINTR) \
+				{ \
+				YY_FATAL_ERROR( "input in flex scanner failed" ); \
+				break; \
+				} \
+			errno=0; \
+			clearerr(yyin); \
+			} \
+		}\
+\
+
+#endif
+
+/* No semi-colon after return; correct usage is to write "yyterminate();" -
+ * we don't want an extra ';' after the "return" because that will cause
+ * some compilers to complain about unreachable statements.
+ */
+#ifndef yyterminate
+#define yyterminate() return YY_NULL
+#endif
+
+/* Number of entries by which start-condition stack grows. */
+#ifndef YY_START_STACK_INCR
+#define YY_START_STACK_INCR 25
+#endif
+
+/* Report a fatal error. */
+#ifndef YY_FATAL_ERROR
+#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
+#endif
+
+/* end tables serialization structures and prototypes */
+
+/* Default declaration of generated scanner - a define so the user can
+ * easily add parameters.
+ */
+#ifndef YY_DECL
+#define YY_DECL_IS_OURS 1
+
+extern int yylex (void);
+
+#define YY_DECL int yylex (void)
+#endif /* !YY_DECL */
+
+/* Code executed at the beginning of each rule, after yytext and yyleng
+ * have been set up.
+ */
+#ifndef YY_USER_ACTION
+#define YY_USER_ACTION
+#endif
+
+/* Code executed at the end of each rule. */
+#ifndef YY_BREAK
+#define YY_BREAK break;
+#endif
+
+#define YY_RULE_SETUP \
+	YY_USER_ACTION
+
+/** The main scanner function which does all the work.
+ */
+YY_DECL
+{
+	register yy_state_type yy_current_state;
+	register char *yy_cp, *yy_bp;
+	register int yy_act;
+    
+#line 55 "convert.lex"
+
+#line 750 "convert.yy.c"
+
+	if ( !(yy_init) )
+		{
+		(yy_init) = 1;
+
+#ifdef YY_USER_INIT
+		YY_USER_INIT;
+#endif
+
+		if ( ! (yy_start) )
+			(yy_start) = 1;	/* first start state */
+
+		if ( ! yyin )
+			yyin = stdin;
+
+		if ( ! yyout )
+			yyout = stdout;
+
+		if ( ! YY_CURRENT_BUFFER ) {
+			yyensure_buffer_stack ();
+			YY_CURRENT_BUFFER_LVALUE =
+				yy_create_buffer(yyin,YY_BUF_SIZE );
+		}
+
+		yy_load_buffer_state( );
+		}
+
+	while ( 1 )		/* loops until end-of-file is reached */
+		{
+		yy_cp = (yy_c_buf_p);
+
+		/* Support of yytext. */
+		*yy_cp = (yy_hold_char);
+
+		/* yy_bp points to the position in yy_ch_buf of the start of
+		 * the current run.
+		 */
+		yy_bp = yy_cp;
+
+		yy_current_state = (yy_start);
+yy_match:
+		do
+			{
+			register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
+			if ( yy_accept[yy_current_state] )
+				{
+				(yy_last_accepting_state) = yy_current_state;
+				(yy_last_accepting_cpos) = yy_cp;
+				}
+			while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
+				{
+				yy_current_state = (int) yy_def[yy_current_state];
+				if ( yy_current_state >= 77 )
+					yy_c = yy_meta[(unsigned int) yy_c];
+				}
+			yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
+			++yy_cp;
+			}
+		while ( yy_base[yy_current_state] != 164 );
+
+yy_find_action:
+		yy_act = yy_accept[yy_current_state];
+		if ( yy_act == 0 )
+			{ /* have to back up */
+			yy_cp = (yy_last_accepting_cpos);
+			yy_current_state = (yy_last_accepting_state);
+			yy_act = yy_accept[yy_current_state];
+			}
+
+		YY_DO_BEFORE_ACTION;
+
+do_action:	/* This label is used only to access EOF actions. */
+
+		switch ( yy_act )
+	{ /* beginning of action switch */
+			case 0: /* must back up */
+			/* undo the effects of YY_DO_BEFORE_ACTION */
+			*yy_cp = (yy_hold_char);
+			yy_cp = (yy_last_accepting_cpos);
+			yy_current_state = (yy_last_accepting_state);
+			goto yy_find_action;
+
+case 1:
+YY_RULE_SETUP
+#line 56 "convert.lex"
+return TOK_MODULEMAIN; /* name of the module                      */
+	YY_BREAK
+case 2:
+YY_RULE_SETUP
+#line 57 "convert.lex"
+return TOK_NOTGRIDDEP; /* variable which are not grid dependent   */
+	YY_BREAK
+case 3:
+YY_RULE_SETUP
+#line 58 "convert.lex"
+return TOK_USE;
+	YY_BREAK
+case 4:
+YY_RULE_SETUP
+#line 59 "convert.lex"
+{}
+	YY_BREAK
+case 5:
+YY_RULE_SETUP
+#line 60 "convert.lex"
+return TOK_SEP;
+	YY_BREAK
+case 6:
+YY_RULE_SETUP
+#line 61 "convert.lex"
+{strcpy(yylval.na,yytext); return TOK_USEITEM;}
+	YY_BREAK
+case 7:
+YY_RULE_SETUP
+#line 62 "convert.lex"
+{strcpy(yylval.na,yytext); return TOK_PROBTYPE;}
+	YY_BREAK
+/* dimension of the problem                */
+case 8:
+YY_RULE_SETUP
+#line 64 "convert.lex"
+{strcpy(yylval.na,yytext); return TOK_NAME;}
+	YY_BREAK
+case 9:
+YY_RULE_SETUP
+#line 65 "convert.lex"
+{return (int) *yytext;}
+	YY_BREAK
+case 10:
+/* rule 10 can match eol */
+YY_RULE_SETUP
+#line 66 "convert.lex"
+{line_num++;return (int) *yytext;}
+	YY_BREAK
+case 11:
+YY_RULE_SETUP
+#line 67 "convert.lex"
+;
+	YY_BREAK
+case 12:
+YY_RULE_SETUP
+#line 68 "convert.lex"
+ECHO;
+	YY_BREAK
+#line 895 "convert.yy.c"
+case YY_STATE_EOF(INITIAL):
+case YY_STATE_EOF(character):
+	yyterminate();
+
+	case YY_END_OF_BUFFER:
+		{
+		/* Amount of text matched not including the EOB char. */
+		int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
+
+		/* Undo the effects of YY_DO_BEFORE_ACTION. */
+		*yy_cp = (yy_hold_char);
+		YY_RESTORE_YY_MORE_OFFSET
+
+		if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
+			{
+			/* We're scanning a new file or input source.  It's
+			 * possible that this happened because the user
+			 * just pointed yyin at a new source and called
+			 * yylex().  If so, then we have to assure
+			 * consistency between YY_CURRENT_BUFFER and our
+			 * globals.  Here is the right place to do so, because
+			 * this is the first action (other than possibly a
+			 * back-up) that will match for the new input source.
+			 */
+			(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
+			YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
+			YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
+			}
+
+		/* Note that here we test for yy_c_buf_p "<=" to the position
+		 * of the first EOB in the buffer, since yy_c_buf_p will
+		 * already have been incremented past the NUL character
+		 * (since all states make transitions on EOB to the
+		 * end-of-buffer state).  Contrast this with the test
+		 * in input().
+		 */
+		if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
+			{ /* This was really a NUL. */
+			yy_state_type yy_next_state;
+
+			(yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
+
+			yy_current_state = yy_get_previous_state(  );
+
+			/* Okay, we're now positioned to make the NUL
+			 * transition.  We couldn't have
+			 * yy_get_previous_state() go ahead and do it
+			 * for us because it doesn't know how to deal
+			 * with the possibility of jamming (and we don't
+			 * want to build jamming into it because then it
+			 * will run more slowly).
+			 */
+
+			yy_next_state = yy_try_NUL_trans( yy_current_state );
+
+			yy_bp = (yytext_ptr) + YY_MORE_ADJ;
+
+			if ( yy_next_state )
+				{
+				/* Consume the NUL. */
+				yy_cp = ++(yy_c_buf_p);
+				yy_current_state = yy_next_state;
+				goto yy_match;
+				}
+
+			else
+				{
+				yy_cp = (yy_c_buf_p);
+				goto yy_find_action;
+				}
+			}
+
+		else switch ( yy_get_next_buffer(  ) )
+			{
+			case EOB_ACT_END_OF_FILE:
+				{
+				(yy_did_buffer_switch_on_eof) = 0;
+
+				if ( yywrap( ) )
+					{
+					/* Note: because we've taken care in
+					 * yy_get_next_buffer() to have set up
+					 * yytext, we can now set up
+					 * yy_c_buf_p so that if some total
+					 * hoser (like flex itself) wants to
+					 * call the scanner after we return the
+					 * YY_NULL, it'll still work - another
+					 * YY_NULL will get returned.
+					 */
+					(yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
+
+					yy_act = YY_STATE_EOF(YY_START);
+					goto do_action;
+					}
+
+				else
+					{
+					if ( ! (yy_did_buffer_switch_on_eof) )
+						YY_NEW_FILE;
+					}
+				break;
+				}
+
+			case EOB_ACT_CONTINUE_SCAN:
+				(yy_c_buf_p) =
+					(yytext_ptr) + yy_amount_of_matched_text;
+
+				yy_current_state = yy_get_previous_state(  );
+
+				yy_cp = (yy_c_buf_p);
+				yy_bp = (yytext_ptr) + YY_MORE_ADJ;
+				goto yy_match;
+
+			case EOB_ACT_LAST_MATCH:
+				(yy_c_buf_p) =
+				&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
+
+				yy_current_state = yy_get_previous_state(  );
+
+				yy_cp = (yy_c_buf_p);
+				yy_bp = (yytext_ptr) + YY_MORE_ADJ;
+				goto yy_find_action;
+			}
+		break;
+		}
+
+	default:
+		YY_FATAL_ERROR(
+			"fatal flex scanner internal error--no action found" );
+	} /* end of action switch */
+		} /* end of scanning one token */
+} /* end of yylex */
+
+/* yy_get_next_buffer - try to read in a new buffer
+ *
+ * Returns a code representing an action:
+ *	EOB_ACT_LAST_MATCH -
+ *	EOB_ACT_CONTINUE_SCAN - continue scanning from current position
+ *	EOB_ACT_END_OF_FILE - end of file
+ */
+static int yy_get_next_buffer (void)
+{
+    	register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
+	register char *source = (yytext_ptr);
+	register int number_to_move, i;
+	int ret_val;
+
+	if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
+		YY_FATAL_ERROR(
+		"fatal flex scanner internal error--end of buffer missed" );
+
+	if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
+		{ /* Don't try to fill the buffer, so this is an EOF. */
+		if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
+			{
+			/* We matched a single character, the EOB, so
+			 * treat this as a final EOF.
+			 */
+			return EOB_ACT_END_OF_FILE;
+			}
+
+		else
+			{
+			/* We matched some text prior to the EOB, first
+			 * process it.
+			 */
+			return EOB_ACT_LAST_MATCH;
+			}
+		}
+
+	/* Try to read more data. */
+
+	/* First move last chars to start of buffer. */
+	number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
+
+	for ( i = 0; i < number_to_move; ++i )
+		*(dest++) = *(source++);
+
+	if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
+		/* don't do the read, it's not guaranteed to return an EOF,
+		 * just force an EOF
+		 */
+		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
+
+	else
+		{
+			yy_size_t num_to_read =
+			YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
+
+		while ( num_to_read <= 0 )
+			{ /* Not enough room in the buffer - grow it. */
+
+			/* just a shorter name for the current buffer */
+			YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
+
+			int yy_c_buf_p_offset =
+				(int) ((yy_c_buf_p) - b->yy_ch_buf);
+
+			if ( b->yy_is_our_buffer )
+				{
+				yy_size_t new_size = b->yy_buf_size * 2;
+
+				if ( new_size <= 0 )
+					b->yy_buf_size += b->yy_buf_size / 8;
+				else
+					b->yy_buf_size *= 2;
+
+				b->yy_ch_buf = (char *)
+					/* Include room in for 2 EOB chars. */
+					yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2  );
+				}
+			else
+				/* Can't grow it, we don't own it. */
+				b->yy_ch_buf = 0;
+
+			if ( ! b->yy_ch_buf )
+				YY_FATAL_ERROR(
+				"fatal error - scanner input buffer overflow" );
+
+			(yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
+
+			num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
+						number_to_move - 1;
+
+			}
+
+		if ( num_to_read > YY_READ_BUF_SIZE )
+			num_to_read = YY_READ_BUF_SIZE;
+
+		/* Read in more data. */
+		YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
+			(yy_n_chars), num_to_read );
+
+		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
+		}
+
+	if ( (yy_n_chars) == 0 )
+		{
+		if ( number_to_move == YY_MORE_ADJ )
+			{
+			ret_val = EOB_ACT_END_OF_FILE;
+			yyrestart(yyin  );
+			}
+
+		else
+			{
+			ret_val = EOB_ACT_LAST_MATCH;
+			YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
+				YY_BUFFER_EOF_PENDING;
+			}
+		}
+
+	else
+		ret_val = EOB_ACT_CONTINUE_SCAN;
+
+	if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
+		/* Extend the array by 50%, plus the number we really need. */
+		yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
+		YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size  );
+		if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
+			YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
+	}
+
+	(yy_n_chars) += number_to_move;
+	YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
+	YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
+
+	(yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
+
+	return ret_val;
+}
+
+/* yy_get_previous_state - get the state just before the EOB char was reached */
+
+    static yy_state_type yy_get_previous_state (void)
+{
+	register yy_state_type yy_current_state;
+	register char *yy_cp;
+    
+	yy_current_state = (yy_start);
+
+	for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
+		{
+		register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
+		if ( yy_accept[yy_current_state] )
+			{
+			(yy_last_accepting_state) = yy_current_state;
+			(yy_last_accepting_cpos) = yy_cp;
+			}
+		while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
+			{
+			yy_current_state = (int) yy_def[yy_current_state];
+			if ( yy_current_state >= 77 )
+				yy_c = yy_meta[(unsigned int) yy_c];
+			}
+		yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
+		}
+
+	return yy_current_state;
+}
+
+/* yy_try_NUL_trans - try to make a transition on the NUL character
+ *
+ * synopsis
+ *	next_state = yy_try_NUL_trans( current_state );
+ */
+    static yy_state_type yy_try_NUL_trans  (yy_state_type yy_current_state )
+{
+	register int yy_is_jam;
+    	register char *yy_cp = (yy_c_buf_p);
+
+	register YY_CHAR yy_c = 1;
+	if ( yy_accept[yy_current_state] )
+		{
+		(yy_last_accepting_state) = yy_current_state;
+		(yy_last_accepting_cpos) = yy_cp;
+		}
+	while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
+		{
+		yy_current_state = (int) yy_def[yy_current_state];
+		if ( yy_current_state >= 77 )
+			yy_c = yy_meta[(unsigned int) yy_c];
+		}
+	yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
+	yy_is_jam = (yy_current_state == 76);
+
+	return yy_is_jam ? 0 : yy_current_state;
+}
+
+    static void yyunput (int c, register char * yy_bp )
+{
+	register char *yy_cp;
+    
+    yy_cp = (yy_c_buf_p);
+
+	/* undo effects of setting up yytext */
+	*yy_cp = (yy_hold_char);
+
+	if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
+		{ /* need to shift things up to make room */
+		/* +2 for EOB chars. */
+		register yy_size_t number_to_move = (yy_n_chars) + 2;
+		register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
+					YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
+		register char *source =
+				&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
+
+		while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
+			*--dest = *--source;
+
+		yy_cp += (int) (dest - source);
+		yy_bp += (int) (dest - source);
+		YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
+			(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
+
+		if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
+			YY_FATAL_ERROR( "flex scanner push-back overflow" );
+		}
+
+	*--yy_cp = (char) c;
+
+	(yytext_ptr) = yy_bp;
+	(yy_hold_char) = *yy_cp;
+	(yy_c_buf_p) = yy_cp;
+}
+
+#ifndef YY_NO_INPUT
+#ifdef __cplusplus
+    static int yyinput (void)
+#else
+    static int input  (void)
+#endif
+
+{
+	int c;
+    
+	*(yy_c_buf_p) = (yy_hold_char);
+
+	if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
+		{
+		/* yy_c_buf_p now points to the character we want to return.
+		 * If this occurs *before* the EOB characters, then it's a
+		 * valid NUL; if not, then we've hit the end of the buffer.
+		 */
+		if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
+			/* This was really a NUL. */
+			*(yy_c_buf_p) = '\0';
+
+		else
+			{ /* need more input */
+			yy_size_t offset = (yy_c_buf_p) - (yytext_ptr);
+			++(yy_c_buf_p);
+
+			switch ( yy_get_next_buffer(  ) )
+				{
+				case EOB_ACT_LAST_MATCH:
+					/* This happens because yy_g_n_b()
+					 * sees that we've accumulated a
+					 * token and flags that we need to
+					 * try matching the token before
+					 * proceeding.  But for input(),
+					 * there's no matching to consider.
+					 * So convert the EOB_ACT_LAST_MATCH
+					 * to EOB_ACT_END_OF_FILE.
+					 */
+
+					/* Reset buffer status. */
+					yyrestart(yyin );
+
+					/*FALLTHROUGH*/
+
+				case EOB_ACT_END_OF_FILE:
+					{
+					if ( yywrap( ) )
+						return 0;
+
+					if ( ! (yy_did_buffer_switch_on_eof) )
+						YY_NEW_FILE;
+#ifdef __cplusplus
+					return yyinput();
+#else
+					return input();
+#endif
+					}
+
+				case EOB_ACT_CONTINUE_SCAN:
+					(yy_c_buf_p) = (yytext_ptr) + offset;
+					break;
+				}
+			}
+		}
+
+	c = *(unsigned char *) (yy_c_buf_p);	/* cast for 8-bit char's */
+	*(yy_c_buf_p) = '\0';	/* preserve yytext */
+	(yy_hold_char) = *++(yy_c_buf_p);
+
+	return c;
+}
+#endif	/* ifndef YY_NO_INPUT */
+
+/** Immediately switch to a different input stream.
+ * @param input_file A readable stream.
+ * 
+ * @note This function does not reset the start condition to @c INITIAL .
+ */
+    void yyrestart  (FILE * input_file )
+{
+    
+	if ( ! YY_CURRENT_BUFFER ){
+        yyensure_buffer_stack ();
+		YY_CURRENT_BUFFER_LVALUE =
+            yy_create_buffer(yyin,YY_BUF_SIZE );
+	}
+
+	yy_init_buffer(YY_CURRENT_BUFFER,input_file );
+	yy_load_buffer_state( );
+}
+
+/** Switch to a different input buffer.
+ * @param new_buffer The new input buffer.
+ * 
+ */
+    void yy_switch_to_buffer  (YY_BUFFER_STATE  new_buffer )
+{
+    
+	/* TODO. We should be able to replace this entire function body
+	 * with
+	 *		yypop_buffer_state();
+	 *		yypush_buffer_state(new_buffer);
+     */
+	yyensure_buffer_stack ();
+	if ( YY_CURRENT_BUFFER == new_buffer )
+		return;
+
+	if ( YY_CURRENT_BUFFER )
+		{
+		/* Flush out information for old buffer. */
+		*(yy_c_buf_p) = (yy_hold_char);
+		YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
+		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
+		}
+
+	YY_CURRENT_BUFFER_LVALUE = new_buffer;
+	yy_load_buffer_state( );
+
+	/* We don't actually know whether we did this switch during
+	 * EOF (yywrap()) processing, but the only time this flag
+	 * is looked at is after yywrap() is called, so it's safe
+	 * to go ahead and always set it.
+	 */
+	(yy_did_buffer_switch_on_eof) = 1;
+}
+
+static void yy_load_buffer_state  (void)
+{
+    	(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
+	(yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
+	yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
+	(yy_hold_char) = *(yy_c_buf_p);
+}
+
+/** Allocate and initialize an input buffer state.
+ * @param file A readable stream.
+ * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
+ * 
+ * @return the allocated buffer state.
+ */
+    YY_BUFFER_STATE yy_create_buffer  (FILE * file, int  size )
+{
+	YY_BUFFER_STATE b;
+    
+	b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state )  );
+	if ( ! b )
+		YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
+
+	b->yy_buf_size = size;
+
+	/* yy_ch_buf has to be 2 characters longer than the size given because
+	 * we need to put in 2 end-of-buffer characters.
+	 */
+	b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2  );
+	if ( ! b->yy_ch_buf )
+		YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
+
+	b->yy_is_our_buffer = 1;
+
+	yy_init_buffer(b,file );
+
+	return b;
+}
+
+/** Destroy the buffer.
+ * @param b a buffer created with yy_create_buffer()
+ * 
+ */
+    void yy_delete_buffer (YY_BUFFER_STATE  b )
+{
+    
+	if ( ! b )
+		return;
+
+	if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
+		YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
+
+	if ( b->yy_is_our_buffer )
+		yyfree((void *) b->yy_ch_buf  );
+
+	yyfree((void *) b  );
+}
+
+#ifndef __cplusplus
+extern int isatty (int );
+#endif /* __cplusplus */
+    
+/* Initializes or reinitializes a buffer.
+ * This function is sometimes called more than once on the same buffer,
+ * such as during a yyrestart() or at EOF.
+ */
+    static void yy_init_buffer  (YY_BUFFER_STATE  b, FILE * file )
+
+{
+	int oerrno = errno;
+    
+	yy_flush_buffer(b );
+
+	b->yy_input_file = file;
+	b->yy_fill_buffer = 1;
+
+    /* If b is the current buffer, then yy_init_buffer was _probably_
+     * called from yyrestart() or through yy_get_next_buffer.
+     * In that case, we don't want to reset the lineno or column.
+     */
+    if (b != YY_CURRENT_BUFFER){
+        b->yy_bs_lineno = 1;
+        b->yy_bs_column = 0;
+    }
+
+        b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
+    
+	errno = oerrno;
+}
+
+/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
+ * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
+ * 
+ */
+    void yy_flush_buffer (YY_BUFFER_STATE  b )
+{
+    	if ( ! b )
+		return;
+
+	b->yy_n_chars = 0;
+
+	/* We always need two end-of-buffer characters.  The first causes
+	 * a transition to the end-of-buffer state.  The second causes
+	 * a jam in that state.
+	 */
+	b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
+	b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
+
+	b->yy_buf_pos = &b->yy_ch_buf[0];
+
+	b->yy_at_bol = 1;
+	b->yy_buffer_status = YY_BUFFER_NEW;
+
+	if ( b == YY_CURRENT_BUFFER )
+		yy_load_buffer_state( );
+}
+
+/** Pushes the new state onto the stack. The new state becomes
+ *  the current state. This function will allocate the stack
+ *  if necessary.
+ *  @param new_buffer The new state.
+ *  
+ */
+void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
+{
+    	if (new_buffer == NULL)
+		return;
+
+	yyensure_buffer_stack();
+
+	/* This block is copied from yy_switch_to_buffer. */
+	if ( YY_CURRENT_BUFFER )
+		{
+		/* Flush out information for old buffer. */
+		*(yy_c_buf_p) = (yy_hold_char);
+		YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
+		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
+		}
+
+	/* Only push if top exists. Otherwise, replace top. */
+	if (YY_CURRENT_BUFFER)
+		(yy_buffer_stack_top)++;
+	YY_CURRENT_BUFFER_LVALUE = new_buffer;
+
+	/* copied from yy_switch_to_buffer. */
+	yy_load_buffer_state( );
+	(yy_did_buffer_switch_on_eof) = 1;
+}
+
+/** Removes and deletes the top of the stack, if present.
+ *  The next element becomes the new top.
+ *  
+ */
+void yypop_buffer_state (void)
+{
+    	if (!YY_CURRENT_BUFFER)
+		return;
+
+	yy_delete_buffer(YY_CURRENT_BUFFER );
+	YY_CURRENT_BUFFER_LVALUE = NULL;
+	if ((yy_buffer_stack_top) > 0)
+		--(yy_buffer_stack_top);
+
+	if (YY_CURRENT_BUFFER) {
+		yy_load_buffer_state( );
+		(yy_did_buffer_switch_on_eof) = 1;
+	}
+}
+
+/* Allocates the stack if it does not exist.
+ *  Guarantees space for at least one push.
+ */
+static void yyensure_buffer_stack (void)
+{
+	yy_size_t num_to_alloc;
+    
+	if (!(yy_buffer_stack)) {
+
+		/* First allocation is just for 2 elements, since we don't know if this
+		 * scanner will even need a stack. We use 2 instead of 1 to avoid an
+		 * immediate realloc on the next call.
+         */
+		num_to_alloc = 1;
+		(yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
+								(num_to_alloc * sizeof(struct yy_buffer_state*)
+								);
+		if ( ! (yy_buffer_stack) )
+			YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
+								  
+		memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
+				
+		(yy_buffer_stack_max) = num_to_alloc;
+		(yy_buffer_stack_top) = 0;
+		return;
+	}
+
+	if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
+
+		/* Increase the buffer to prepare for a possible push. */
+		int grow_size = 8 /* arbitrary grow size */;
+
+		num_to_alloc = (yy_buffer_stack_max) + grow_size;
+		(yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
+								((yy_buffer_stack),
+								num_to_alloc * sizeof(struct yy_buffer_state*)
+								);
+		if ( ! (yy_buffer_stack) )
+			YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
+
+		/* zero only the new slots.*/
+		memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
+		(yy_buffer_stack_max) = num_to_alloc;
+	}
+}
+
+/** Setup the input buffer state to scan directly from a user-specified character buffer.
+ * @param base the character buffer
+ * @param size the size in bytes of the character buffer
+ * 
+ * @return the newly allocated buffer state object. 
+ */
+YY_BUFFER_STATE yy_scan_buffer  (char * base, yy_size_t  size )
+{
+	YY_BUFFER_STATE b;
+    
+	if ( size < 2 ||
+	     base[size-2] != YY_END_OF_BUFFER_CHAR ||
+	     base[size-1] != YY_END_OF_BUFFER_CHAR )
+		/* They forgot to leave room for the EOB's. */
+		return 0;
+
+	b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state )  );
+	if ( ! b )
+		YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
+
+	b->yy_buf_size = size - 2;	/* "- 2" to take care of EOB's */
+	b->yy_buf_pos = b->yy_ch_buf = base;
+	b->yy_is_our_buffer = 0;
+	b->yy_input_file = 0;
+	b->yy_n_chars = b->yy_buf_size;
+	b->yy_is_interactive = 0;
+	b->yy_at_bol = 1;
+	b->yy_fill_buffer = 0;
+	b->yy_buffer_status = YY_BUFFER_NEW;
+
+	yy_switch_to_buffer(b  );
+
+	return b;
+}
+
+/** Setup the input buffer state to scan a string. The next call to yylex() will
+ * scan from a @e copy of @a str.
+ * @param yystr a NUL-terminated string to scan
+ * 
+ * @return the newly allocated buffer state object.
+ * @note If you want to scan bytes that may contain NUL values, then use
+ *       yy_scan_bytes() instead.
+ */
+YY_BUFFER_STATE yy_scan_string (yyconst char * yystr )
+{
+    
+	return yy_scan_bytes(yystr,strlen(yystr) );
+}
+
+/** Setup the input buffer state to scan the given bytes. The next call to yylex() will
+ * scan from a @e copy of @a bytes.
+ * @param bytes the byte buffer to scan
+ * @param len the number of bytes in the buffer pointed to by @a bytes.
+ * 
+ * @return the newly allocated buffer state object.
+ */
+YY_BUFFER_STATE yy_scan_bytes  (yyconst char * yybytes, yy_size_t  _yybytes_len )
+{
+	YY_BUFFER_STATE b;
+	char *buf;
+	yy_size_t n, i;
+    
+	/* Get memory for full buffer, including space for trailing EOB's. */
+	n = _yybytes_len + 2;
+	buf = (char *) yyalloc(n  );
+	if ( ! buf )
+		YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
+
+	for ( i = 0; i < _yybytes_len; ++i )
+		buf[i] = yybytes[i];
+
+	buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
+
+	b = yy_scan_buffer(buf,n );
+	if ( ! b )
+		YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
+
+	/* It's okay to grow etc. this buffer, and we should throw it
+	 * away when we're done.
+	 */
+	b->yy_is_our_buffer = 1;
+
+	return b;
+}
+
+#ifndef YY_EXIT_FAILURE
+#define YY_EXIT_FAILURE 2
+#endif
+
+static void yy_fatal_error (yyconst char* msg )
+{
+    	(void) fprintf( stderr, "%s\n", msg );
+	exit( YY_EXIT_FAILURE );
+}
+
+/* Redefine yyless() so it works in section 3 code. */
+
+#undef yyless
+#define yyless(n) \
+	do \
+		{ \
+		/* Undo effects of setting up yytext. */ \
+        int yyless_macro_arg = (n); \
+        YY_LESS_LINENO(yyless_macro_arg);\
+		yytext[yyleng] = (yy_hold_char); \
+		(yy_c_buf_p) = yytext + yyless_macro_arg; \
+		(yy_hold_char) = *(yy_c_buf_p); \
+		*(yy_c_buf_p) = '\0'; \
+		yyleng = yyless_macro_arg; \
+		} \
+	while ( 0 )
+
+/* Accessor  methods (get/set functions) to struct members. */
+
+/** Get the current line number.
+ * 
+ */
+int yyget_lineno  (void)
+{
+        
+    return yylineno;
+}
+
+/** Get the input stream.
+ * 
+ */
+FILE *yyget_in  (void)
+{
+        return yyin;
+}
+
+/** Get the output stream.
+ * 
+ */
+FILE *yyget_out  (void)
+{
+        return yyout;
+}
+
+/** Get the length of the current token.
+ * 
+ */
+yy_size_t yyget_leng  (void)
+{
+        return yyleng;
+}
+
+/** Get the current token.
+ * 
+ */
+
+char *yyget_text  (void)
+{
+        return yytext;
+}
+
+/** Set the current line number.
+ * @param line_number
+ * 
+ */
+void yyset_lineno (int  line_number )
+{
+    
+    yylineno = line_number;
+}
+
+/** Set the input stream. This does not discard the current
+ * input buffer.
+ * @param in_str A readable stream.
+ * 
+ * @see yy_switch_to_buffer
+ */
+void yyset_in (FILE *  in_str )
+{
+        yyin = in_str ;
+}
+
+void yyset_out (FILE *  out_str )
+{
+        yyout = out_str ;
+}
+
+int yyget_debug  (void)
+{
+        return yy_flex_debug;
+}
+
+void yyset_debug (int  bdebug )
+{
+        yy_flex_debug = bdebug ;
+}
+
+static int yy_init_globals (void)
+{
+        /* Initialization is the same as for the non-reentrant scanner.
+     * This function is called from yylex_destroy(), so don't allocate here.
+     */
+
+    (yy_buffer_stack) = 0;
+    (yy_buffer_stack_top) = 0;
+    (yy_buffer_stack_max) = 0;
+    (yy_c_buf_p) = (char *) 0;
+    (yy_init) = 0;
+    (yy_start) = 0;
+
+/* Defined in main.c */
+#ifdef YY_STDINIT
+    yyin = stdin;
+    yyout = stdout;
+#else
+    yyin = (FILE *) 0;
+    yyout = (FILE *) 0;
+#endif
+
+    /* For future reference: Set errno on error, since we are called by
+     * yylex_init()
+     */
+    return 0;
+}
+
+/* yylex_destroy is for both reentrant and non-reentrant scanners. */
+int yylex_destroy  (void)
+{
+    
+    /* Pop the buffer stack, destroying each element. */
+	while(YY_CURRENT_BUFFER){
+		yy_delete_buffer(YY_CURRENT_BUFFER  );
+		YY_CURRENT_BUFFER_LVALUE = NULL;
+		yypop_buffer_state();
+	}
+
+	/* Destroy the stack itself. */
+	yyfree((yy_buffer_stack) );
+	(yy_buffer_stack) = NULL;
+
+    /* Reset the globals. This is important in a non-reentrant scanner so the next time
+     * yylex() is called, initialization will occur. */
+    yy_init_globals( );
+
+    return 0;
+}
+
+/*
+ * Internal utility routines.
+ */
+
+#ifndef yytext_ptr
+static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
+{
+	register int i;
+	for ( i = 0; i < n; ++i )
+		s1[i] = s2[i];
+}
+#endif
+
+#ifdef YY_NEED_STRLEN
+static int yy_flex_strlen (yyconst char * s )
+{
+	register int n;
+	for ( n = 0; s[n]; ++n )
+		;
+
+	return n;
+}
+#endif
+
+void *yyalloc (yy_size_t  size )
+{
+	return (void *) malloc( size );
+}
+
+void *yyrealloc  (void * ptr, yy_size_t  size )
+{
+	/* The cast to (char *) in the following accommodates both
+	 * implementations that use char* generic pointers, and those
+	 * that use void* generic pointers.  It works with the latter
+	 * because both ANSI C and C++ allow castless assignment from
+	 * any pointer type to void*, and deal with argument conversions
+	 * as though doing an assignment.
+	 */
+	return (void *) realloc( (char *) ptr, size );
+}
+
+void yyfree (void * ptr )
+{
+	free( (char *) ptr );	/* see yyrealloc() for (char *) cast */
+}
+
+#define YYTABLES_NAME "yytables"
+
+#line 68 "convert.lex"
+
+
+
+
+int yywrap()
+{
+}
+
+
+yyerror(char *s)
+{
+if (!strcasecmp(curfile,mainfile))
+{
+   printf("Dans convert %s line %d, fichier %s\n",s,line_num,curfile);
+}
+else
+{
+   printf("Dans convert %s line %d, fichier %s\n",s,line_num,curfile);
+}
+exit(0);
+}
+
Index: vendors/AGRIF/r_01/LIB/run
===================================================================
--- vendors/AGRIF/r_01/LIB/run	(revision 2672)
+++ vendors/AGRIF/r_01/LIB/run	(revision 2672)
@@ -0,0 +1,2 @@
+gmake -f Makefile.lex clean
+gmake -f Makefile.lex
Index: vendors/AGRIF/r_01/LIB/toamr.c
===================================================================
--- vendors/AGRIF/r_01/LIB/toamr.c	(revision 2672)
+++ vendors/AGRIF/r_01/LIB/toamr.c	(revision 2672)
@@ -0,0 +1,1204 @@
+/******************************************************************************/
+/*                                                                            */
+/*     CONV (converter) for Agrif (Adaptive Grid Refinement In Fortran)       */
+/*                                                                            */
+/* Copyright or   or Copr. Laurent Debreu (Laurent.Debreu@imag.fr)            */
+/*                        Cyril Mazauric (Cyril_Mazauric@yahoo.fr)            */
+/* This software is governed by the CeCILL-C license under French law and     */
+/* abiding by the rules of distribution of free software.  You can  use,      */
+/* modify and/ or redistribute the software under the terms of the CeCILL-C   */
+/* license as circulated by CEA, CNRS and INRIA at the following URL          */
+/* "http://www.cecill.info".                                                  */
+/*                                                                            */
+/* As a counterpart to the access to the source code and  rights to copy,     */
+/* modify and redistribute granted by the license, users are provided only    */
+/* with a limited warranty  and the software's author,  the holder of the     */
+/* economic rights,  and the successive licensors  have only  limited         */
+/* liability.                                                                 */
+/*                                                                            */
+/* In this respect, the user's attention is drawn to the risks associated     */
+/* with loading,  using,  modifying and/or developing or reproducing the      */
+/* software by the user in light of its specific status of free software,     */
+/* that may mean  that it is complicated to manipulate,  and  that  also      */
+/* therefore means  that it is reserved for developers  and  experienced      */
+/* professionals having in-depth computer knowledge. Users are therefore      */
+/* encouraged to load and test the software's suitability as regards their    */
+/* requirements in conditions enabling the security of their systems and/or   */
+/* data to be ensured and,  more generally, to use and operate it in the      */
+/* same conditions as regards security.                                       */
+/*                                                                            */
+/* The fact that you are presently reading this means that you have had       */
+/* knowledge of the CeCILL-C license and that you accept its terms.           */
+/******************************************************************************/
+/* version 1.7                                                                */
+/******************************************************************************/
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include "decl.h"
+char lvargridname[LONG_4C];
+char lvargridname2[LONG_4C];
+
+
+/******************************************************************************/
+/*                       variablenameroottabvars                              */
+/******************************************************************************/
+/* This subroutine is used to create the string                               */
+/******************************************************************************/
+/*                                                                            */
+/*  ----------->  Agrif_Mygrid % tabvars (i) % var                            */
+/*                                                                            */
+/******************************************************************************/
+char *variablenameroottabvars (variable * var)
+{
+  char *ligne;
+
+  ligne = (char *) malloc (LONG_C * sizeof (char));
+  sprintf (ligne, "Agrif_Mygrid %% tabvars(%d) %% var ", var->v_indicetabvars);
+  return ligne;
+}
+
+
+/******************************************************************************/
+/*                        variablenametabvars                                 */
+/******************************************************************************/
+/* This subroutine is used to create the string                               */
+/******************************************************************************/
+/*                                                                            */
+/*  if iorindice = 0 ---------->  Agrif_Gr % tabvars (i) % var                */
+/*                                                                            */
+/*  if iorindice = 1 ---------->  Agrif_Gr % tabvars (12) % var               */
+/*                                                                            */
+/******************************************************************************/
+char *variablenametabvars (variable * var, int iorindice)
+{
+  char *ligne;
+
+  ligne = (char *) malloc (LONG_C * sizeof (char));
+  if ( iorindice == 0 ) sprintf (ligne, " Agrif_Gr %% tabvars(%d)%% var",
+                                 var->v_indicetabvars);
+  else sprintf (ligne, " Agrif_Gr %% tabvars(i)%% var");
+  return ligne;
+}
+
+/******************************************************************************/
+/*                        variablecurgridtabvars                              */
+/******************************************************************************/
+/* This subroutine is used to create the string                               */
+/******************************************************************************/
+/*                                                                            */
+/*  ----------->  Agrif_Curgrid % tabvars (i) % var                           */
+/*                                                                            */
+/******************************************************************************/
+char *variablecurgridtabvars (variable * var,int ParentOrCurgrid)
+{
+  char *ligne;
+
+  ligne = (char *) malloc (LONG_C * sizeof (char));
+  if ( ParentOrCurgrid == 0 ) sprintf (ligne, " Agrif_tabvars(%d) %% var",
+                              var->v_indicetabvars);
+  else if ( ParentOrCurgrid == 1 ) sprintf (ligne,
+                              " Agrif_tabvars(%d) %% parent_var %% var",
+                               var->v_indicetabvars);
+  else if ( ParentOrCurgrid == 2 ) sprintf (ligne,
+                              " Agrif_Mygrid %% tabvars(%d) %% var",
+                               var->v_indicetabvars);
+  else if ( ParentOrCurgrid == 3 ) sprintf (ligne,
+                              " Agrif_Curgrid %% tabvars(%d) %% var",
+                               var->v_indicetabvars);
+  else sprintf (ligne, " AGRIF_Mygrid %% tabvars(%d) %% var",
+                               var->v_indicetabvars);
+  return ligne;
+}
+
+void WARNING_CharSize(variable *var)
+{
+   if ( var->v_nbdim == 0 )
+   {
+      if ( convert2int(var->v_dimchar) > 2050 )
+      {
+         printf("WARNING : The dimension of the character  %s   \n",
+                                                              var->v_nomvar);
+         printf("   is upper than 2050. You must change         \n");
+         printf("   the dimension of carray0                    \n");
+         printf("   in the file AGRIF/AGRIF_FILES/modtypes.F    \n");
+         printf("   line 247. Replace 300 with %d.              \n",
+                                            convert2int(var->v_dimchar)+100);
+      }
+      Save_Length_int(convert2int(var->v_dimchar),1);
+   }
+   else if ( var->v_nbdim == 1 )
+   {
+      if ( convert2int(var->v_dimchar) > 300 )
+      {
+         printf("WARNING : The dimension of the character  %s   \n",
+                                                              var->v_nomvar);
+         printf("   is upper than 300. You must change          \n");
+         printf("   the dimension of carray1                    \n");
+         printf("   in the file AGRIF/AGRIF_FILES/modtypes.F    \n");
+         printf("   line 247. Replace 300 with %d.              \n",
+                                            convert2int(var->v_dimchar)+100);
+      }
+      Save_Length_int(convert2int(var->v_dimchar),2);
+   }
+   else if ( var->v_nbdim == 2 )
+   {
+      if ( convert2int(var->v_dimchar) > 300 )
+      {
+         printf("WARNING : The dimension of the character  %s   \n",
+                                                              var->v_nomvar);
+         printf("   is upper than 300. You must change          \n");
+         printf("   the dimension of carray2                    \n");
+         printf("   in the file AGRIF/AGRIF_FILES/modtypes.F    \n");
+         printf("   line 247. Replace 300 with %d.              \n",
+                                            convert2int(var->v_dimchar)+100);
+      }
+      Save_Length_int(convert2int(var->v_dimchar),3);
+   }
+   else if ( var->v_nbdim == 3 )
+   {
+      if ( convert2int(var->v_dimchar) > 300 )
+      {
+         printf("WARNING : The dimension of the character  %s   \n",
+                                                              var->v_nomvar);
+         printf("   is upper than 300. You must change          \n");
+         printf("   the dimension of carray3                    \n");
+         printf("   in the file AGRIF/AGRIF_FILES/modtypes.F    \n");
+         printf("   line 247. Replace 300 with %d.              \n",
+                                            convert2int(var->v_dimchar)+100);
+      }
+      Save_Length_int(convert2int(var->v_dimchar),4);
+   }
+}
+/******************************************************************************/
+/*                           vargridnametabvars                               */
+/******************************************************************************/
+/* This subroutine is used to create the string                               */
+/******************************************************************************/
+/*                                                                            */
+/*  if iorindice == 0 ----------->  Agrif_Gr % tabvars (i) % var % array1     */
+/*                                                                            */
+/*  if iorindice == 1 ----------->  Agrif_Gr % tabvars (12) % var % array1    */
+/*                                                                            */
+/******************************************************************************/
+char *vargridnametabvars (variable * var,int iorindice)
+{
+  char *tmp;
+  char tmp1[LONG_C];
+
+  tmp = variablenametabvars (var,iorindice);
+  strcpy(tmp1,tmp);
+  if ( todebugfree == 1 ) free(tmp);
+
+  sprintf (lvargridname, "%s", tmp1);
+  if (!strcasecmp (var->v_typevar, "REAL"))
+    {
+      if ( !strcasecmp(var->v_nameinttypename,"8") )
+                           sprintf (lvargridname2, "%% darray%d", var->v_nbdim);
+      else if ( !strcasecmp(var->v_nameinttypename,"4") )
+                           sprintf (lvargridname2, "%% sarray%d", var->v_nbdim);
+      else sprintf (lvargridname2, "%% array%d", var->v_nbdim);
+    }
+  else if (!strcasecmp (var->v_typevar, "INTEGER"))
+    {
+      sprintf (lvargridname2, "%% iarray%d", var->v_nbdim);
+    }
+  else if (!strcasecmp (var->v_typevar, "LOGICAL"))
+    {
+      sprintf (lvargridname2, "%% larray%d", var->v_nbdim);
+    }
+  else if (!strcasecmp (var->v_typevar, "CHARACTER"))
+    {
+      WARNING_CharSize(var);
+      sprintf (lvargridname2, "%% carray%d", var->v_nbdim);
+    }
+
+  strcat (lvargridname, lvargridname2);
+
+  Save_Length(lvargridname,42);
+  Save_Length(lvargridname2,42);
+  return lvargridname;
+}
+
+/******************************************************************************/
+/*                           vargridcurgridtabvars                            */
+/******************************************************************************/
+/* This subroutine is used to create the string                               */
+/******************************************************************************/
+/*                                                                            */
+/* if ParentOrCurgrid == 0 -->  Agrif_Curgrid % tabvars (i) % var % array1    */
+/*                                                                            */
+/* if ParentOrCurgrid == 1 -->  Agrif_tabvars (i) % parent_var %var % array1  */
+/*                                                                            */
+/* if ParentOrCurgrid == 2 -->  Agrif_Gr % tabvars (i) % var % array1         */
+/*                                                                            */
+/******************************************************************************/
+char *vargridcurgridtabvars (variable * var,int ParentOrCurgrid)
+{
+  char *tmp;
+  char tmp1[LONG_C];
+
+ if (!strcasecmp(var->v_typevar,"type"))
+  {
+  strcpy(lvargridname2,"");
+  sprintf(lvargridname,"Agrif_%s_var(Agrif_Curgrid%%fixedrank)%%%s",var->v_modulename,var->v_nomvar);
+  printf("modulename = %s %s\n",var->v_nomvar, var->v_modulename);
+  }
+  else
+  {
+  tmp = variablecurgridtabvars (var,ParentOrCurgrid);
+  strcpy(tmp1,tmp);
+  if ( todebugfree == 1 ) free(tmp);
+
+  sprintf (lvargridname, "%s", tmp1);
+  if (!strcasecmp (var->v_typevar, "REAL"))
+    {
+      if ( !strcasecmp(var->v_nameinttypename,"8") )
+                           sprintf (lvargridname2, "%% darray%d", var->v_nbdim);
+      else if ( !strcasecmp(var->v_nameinttypename,"4") )
+                           sprintf (lvargridname2, "%% sarray%d", var->v_nbdim);
+      else sprintf (lvargridname2, "%% array%d", var->v_nbdim);
+    }
+  else if (!strcasecmp (var->v_typevar, "INTEGER"))
+    {
+      sprintf (lvargridname2, "%% iarray%d", var->v_nbdim);
+    }
+  else if (!strcasecmp (var->v_typevar, "LOGICAL"))
+    {
+      sprintf (lvargridname2, "%% larray%d", var->v_nbdim);
+    }
+  else if (!strcasecmp (var->v_typevar, "CHARACTER"))
+    {
+      WARNING_CharSize(var);
+      sprintf (lvargridname2, "%% carray%d", var->v_nbdim);
+    }
+  }
+
+  strcat (lvargridname, lvargridname2);
+
+  Save_Length(lvargridname,42);
+  Save_Length(lvargridname2,42);
+  return lvargridname;
+}
+
+/******************************************************************************/
+/*                  vargridcurgridtabvarswithoutAgrif_Gr                      */
+/******************************************************************************/
+/* This subroutine is used to create the string                               */
+/******************************************************************************/
+/*                                                                            */
+/******************************************************************************/
+char *vargridcurgridtabvarswithoutAgrif_Gr (variable * var)
+{
+
+  sprintf (lvargridname, "(%d) %% var", var->v_indicetabvars);
+
+  if (!strcasecmp (var->v_typevar, "REAL"))
+    {
+      if ( !strcasecmp(var->v_nameinttypename,"8") )
+                           sprintf (lvargridname2, "%% darray%d", var->v_nbdim);
+      else if ( !strcasecmp(var->v_nameinttypename,"4") )
+                           sprintf (lvargridname2, "%% sarray%d", var->v_nbdim);
+      else sprintf (lvargridname2, "%% array%d", var->v_nbdim);
+    }
+  else if (!strcasecmp (var->v_typevar, "INTEGER"))
+    {
+      sprintf (lvargridname2, "%% iarray%d", var->v_nbdim);
+    }
+  else if (!strcasecmp (var->v_typevar, "LOGICAL"))
+    {
+      sprintf (lvargridname2, "%% larray%d", var->v_nbdim);
+    }
+  else if (!strcasecmp (var->v_typevar, "CHARACTER"))
+    {
+      WARNING_CharSize(var);
+      sprintf (lvargridname2, "%% carray%d", var->v_nbdim);
+    }
+
+  strcat (lvargridname, lvargridname2);
+
+  Save_Length(lvargridname,42);
+  Save_Length(lvargridname2,42);
+  return lvargridname;
+}
+
+/******************************************************************************/
+/*                               vargridparam                                 */
+/******************************************************************************/
+/* This subroutine is used to create the string which contains                */
+/* dimension list                                                             */
+/******************************************************************************/
+/*                                                                            */
+/*  DIMENSION(jpi,0:jpj) ----------->"1:jpi,0:jpj"                            */
+/*                                                                            */
+/******************************************************************************/
+char *vargridparam (variable * v, int whichone)
+{
+  typedim dim;
+  listdim *newdim;
+  char newname[LONG_4C];
+
+  newdim = v->v_dimension;
+  if (!newdim) return "";
+
+  strcpy (tmpvargridname, "(");
+  while (newdim)
+  {
+     dim = newdim->dim;
+
+     strcpy(newname,"");
+     strcpy(newname,
+            ChangeTheInitalvaluebyTabvarsName(dim.first,List_Global_Var,
+                                                                     whichone));
+                                                                     
+        strcpy(newname,ChangeTheInitalvaluebyTabvarsName(newname,
+                       List_Common_Var,whichone));
+
+        strcpy(newname,ChangeTheInitalvaluebyTabvarsName(newname,
+                       List_ModuleUsed_Var,whichone));
+
+     strcat (tmpvargridname, newname);
+     strcat (tmpvargridname, " : ");
+
+     strcpy(newname,"");
+     strcpy(newname,ChangeTheInitalvaluebyTabvarsName
+                        (dim.last,List_Global_Var,whichone));
+                        
+        strcpy(newname,ChangeTheInitalvaluebyTabvarsName
+                       (newname, List_Common_Var,whichone));   
+                       
+        strcpy(newname,ChangeTheInitalvaluebyTabvarsName
+                       (newname, List_ModuleUsed_Var,whichone));                                            
+                        
+     Save_Length(tmpvargridname,46);
+     strcat (tmpvargridname, newname);
+     newdim = newdim->suiv;
+     if (newdim) strcat (tmpvargridname, ",");
+  }
+  strcat (tmpvargridname, ")");
+  strcat (tmpvargridname, "\0");
+  Save_Length(tmpvargridname,40);
+  return tmpvargridname;
+}
+
+/******************************************************************************/
+/*                        write_probdimagrif_file                             */
+/******************************************************************************/
+/* This subroutine is used to create the file probdim_agrif.h                 */
+/******************************************************************************/
+/*                                                                            */
+/*               probdim_agrif.h                                              */
+/*                                                                            */
+/*               Agrif_probdim = <number>                                     */
+/*                                                                            */
+/******************************************************************************/
+void write_probdimagrif_file()
+{
+  FILE *probdim;
+  char ligne[LONG_C];
+
+  probdim = associate("probdim_agrif.h");
+  sprintf (ligne, "Agrif_Probdim = %d", dimprob);
+  tofich (probdim, ligne,1);
+  fclose (probdim);
+}
+
+/******************************************************************************/
+/*                             write_keysagrif_file                           */
+/******************************************************************************/
+/* This subroutine is used to create the file keys_agrif.h                    */
+/******************************************************************************/
+/*                                                                            */
+/*               keys_agrif.h                                                 */
+/*                                                                            */
+/*               AGRIF_USE_FIXED_GRIDS = 0                                    */
+/*               AGRIF_USE_ONLY_FIXED_GRIDS = 0                               */
+/*               AGRIF_USE_(ONLY)_FIXED_GRIDS = 1                             */
+/*                                                                            */
+/******************************************************************************/
+void write_keysagrif_file()
+{
+  FILE *keys;
+
+  keys = associate ("keys_agrif.h");
+  fprintf(keys,"      AGRIF_USE_FIXED_GRIDS = 0\n");
+  fprintf(keys,"      AGRIF_USE_ONLY_FIXED_GRIDS = 0\n");
+  if (fixedgrids     == 1) fprintf(keys,"      AGRIF_USE_FIXED_GRIDS = 1\n");
+  if (onlyfixedgrids == 1)
+                         fprintf(keys,"      AGRIF_USE_ONLY_FIXED_GRIDS = 1\n");
+
+  fclose(keys);
+}
+
+/******************************************************************************/
+/*                      write_modtypeagrif_file                               */
+/******************************************************************************/
+/* This subroutine is used to create the file typedata                        */
+/******************************************************************************/
+/*                                                                            */
+/*               modtype_agrif.h                                              */
+/*                                                                            */
+/*               Agrif_NbVariables =                                          */
+/*                                                                            */
+/******************************************************************************/
+void write_modtypeagrif_file()
+{
+  char ligne[LONG_C];
+  FILE *typedata;
+
+  typedata = associate ("modtype_agrif.h");
+  /* AGRIF_NbVariables : number of variables                                  */
+  sprintf (ligne, "AGRIF_NbVariables = %d",indicemaxtabvars);
+  tofich(typedata,ligne,1);
+  fclose (typedata);
+}
+
+/******************************************************************************/
+/*                   write_createvarnameagrif_file                            */
+/******************************************************************************/
+/* This subroutine is used to create the file  createvarname                  */
+/******************************************************************************/
+/*                                                                            */
+/*    Agrif_Gr % tabvars (i) % var % namevar = "variable"                     */
+/*                                                                            */
+/******************************************************************************/
+void write_createvarnameagrif_file(variable *v,FILE *createvarname,
+                                                       int *InitEmpty)
+{
+  char ligne[LONG_C];
+  char *tmp;
+  char temp1[LONG_C];
+
+  tmp =  variablenametabvars(v,0);
+  strcpy (temp1, tmp);
+  if ( todebugfree == 1 ) free(tmp);
+
+  *InitEmpty = 0 ;
+  sprintf(ligne, "%s %% namevar = \"%s\"",temp1,v->v_nomvar);
+  tofich(createvarname,ligne,1);
+}
+
+/******************************************************************************/
+/*                        write_Setnumberofcells_file                         */
+/******************************************************************************/
+/* This subroutine is used to create the file  setnumberofcells               */
+/******************************************************************************/
+/*                                                                            */
+/*              Agrif_Gr % n(i) = nbmailles                                   */
+/*                                                                            */
+/******************************************************************************/
+void write_Setnumberofcells_file(char *name)
+{
+  char ligne[LONG_C];
+  FILE *setnumberofcells;
+
+  if ( IndicenbmaillesX != 0 )
+  {
+  setnumberofcells=associate(name);
+
+  if (onlyfixedgrids != 1 )
+  {
+  sprintf (ligne,
+           "Agrif_Gr %% nb(1) = Agrif_Gr %% tabvars(%d) %% var %% iarray0",
+           IndicenbmaillesX);
+  }
+  else
+  {
+  sprintf (ligne,
+           "Agrif_Gr %% nb(1) = Agrif_Curgrid %% tabvars(%d) %% var %% iarray0",
+           IndicenbmaillesX);
+  }
+  tofich (setnumberofcells, ligne,1);
+  if (dimprob > 1)
+  {
+     if (onlyfixedgrids != 1 )
+     {
+     sprintf (ligne,
+           "Agrif_Gr %% nb(2) = Agrif_Gr %% tabvars(%d) %% var %% iarray0",
+           IndicenbmaillesY);
+     }
+     else
+     {
+     sprintf (ligne,
+           "Agrif_Gr %% nb(2) = Agrif_Curgrid %% tabvars(%d) %% var %% iarray0",
+           IndicenbmaillesY);
+     }
+
+     tofich (setnumberofcells, ligne,1);
+  }
+  if (dimprob > 2)
+  {
+     if (onlyfixedgrids != 1 )
+     {
+     sprintf (ligne,
+           "Agrif_Gr %% nb(3) = Agrif_Gr %% tabvars(%d) %% var %% iarray0",
+           IndicenbmaillesZ);
+     }
+     else
+     {
+     sprintf (ligne,
+           "Agrif_Gr %% nb(3) = Agrif_Curgrid %% tabvars(%d) %% var %% iarray0",
+           IndicenbmaillesZ);
+     }
+     tofich (setnumberofcells, ligne,1);
+  }
+
+  fclose (setnumberofcells);
+  }
+}
+
+/******************************************************************************/
+/*                       write_Getnumberofcells_file                          */
+/******************************************************************************/
+/* This subroutine is used to create the file  getnumberofcells               */
+/******************************************************************************/
+/*                                                                            */
+/*              nbmailles = Agrif_Gr % n(i)                                   */
+/*                                                                            */
+/******************************************************************************/
+void write_Getnumberofcells_file(char *name)
+{
+  char ligne[LONG_C];
+  FILE *getnumberofcells;
+
+  if ( IndicenbmaillesX != 0 )
+  {
+  getnumberofcells=associate(name);
+  sprintf (ligne,
+           "Agrif_Curgrid %% tabvars(%d) %% var %% iarray0 = Agrif_Gr %% nb(1)",
+           IndicenbmaillesX);
+  tofich (getnumberofcells, ligne,1);
+  if (dimprob > 1)
+    {
+      sprintf (ligne,
+           "Agrif_Curgrid %% tabvars(%d) %% var %% iarray0 = Agrif_Gr %% nb(2)",
+           IndicenbmaillesY);
+      tofich (getnumberofcells, ligne,1);
+    }
+  if (dimprob > 2)
+    {
+      sprintf (ligne,
+           "Agrif_Curgrid %% tabvars(%d) %% var %% iarray0 = Agrif_Gr %% nb(3)",
+           IndicenbmaillesZ);
+      tofich (getnumberofcells, ligne,1);
+    }
+  fclose (getnumberofcells);
+  }
+}
+
+
+/******************************************************************************/
+/*                      write_initialisationsagrif_file                       */
+/******************************************************************************/
+/* This subroutine is used to create the file initproc                        */
+/******************************************************************************/
+/*                                                                            */
+/*              ! variable                                                    */
+/*              Agrif_Gr % tabvars(i) % var % nbdim = 1                       */
+/*                                                                            */
+/******************************************************************************/
+void write_initialisationsagrif_file(variable *v,FILE *initproc,
+                                     int *VarnameEmpty)
+{
+  char ligne[LONG_C];
+  char temp1[LONG_C];
+  char *tmp;
+
+  tmp = variablenameroottabvars (v);
+  strcpy (temp1, tmp);
+  if ( todebugfree == 1 ) free(tmp);
+
+  if ( v->v_nbdim != 0 )
+  {
+     *VarnameEmpty = 0 ;
+     sprintf (ligne, "%s %% nbdim = %d", temp1, v->v_nbdim);
+     tofich (initproc, ligne,1);
+  }
+}
+
+
+void Write_Alloc_Agrif_Files()
+{
+   listnom *parcours;
+   FILE *alloccalls;
+   FILE *AllocUSE;
+
+   AllocUSE= associate("include_use_Alloc_agrif.h");
+   alloccalls = associate("allocations_calls_agrif.h");
+
+   parcours = List_Subroutine_For_Alloc;
+   while ( parcours )
+   {
+      fprintf(AllocUSE,"      USE %s\n", parcours -> o_nom );
+      fprintf (alloccalls,"      Call Alloc_agrif_%s(Agrif_Gr)\n",
+                                                            parcours -> o_nom );
+      parcours = parcours -> suiv;
+   }
+
+   fclose (AllocUSE);
+   fclose (alloccalls);
+}
+
+int IndiceInlist(int indic, listindice *listin)
+{
+   listindice *parcoursindic;
+   int out;
+
+   out = 0 ;
+
+   parcoursindic = listin;
+   while ( parcoursindic && out == 0 )
+   {
+      if ( parcoursindic->i_indice == indic ) out = 1;
+      else parcoursindic = parcoursindic -> suiv;
+   }
+
+   return out;
+}
+void write_allocation_Common_0()
+{
+   listnom *parcours_nom;
+   listnom *neededparameter;
+   listvar *parcours;
+   listvar *parcoursprec;
+   listvar *parcours1;
+   FILE *allocationagrif;
+   FILE *paramtoamr;
+   char ligne[LONGNOM];
+   char ligne2[LONGNOM];   
+   variable *v;
+   int IndiceMax;
+   int IndiceMin;
+   int compteur;
+   int out;
+   int indiceprec;
+   int ValeurMax;
+   char initialvalue[LONG_4C];
+   listindice *list_indic;
+   listindice *parcoursindic;
+   int i;
+
+   parcoursprec = (listvar *)NULL;
+   parcours_nom = List_NameOfCommon;
+   ValeurMax = 2;
+   while ( parcours_nom  )
+   {
+      /*                                                                      */
+      if ( parcours_nom->o_val == 1 )
+      {
+         /* Open the file to create the Alloc_agrif subroutine                */
+         sprintf(ligne,"alloc_agrif_%s.h",parcours_nom->o_nom);
+         allocationagrif = associate (ligne);
+         /*                                                                   */
+         fprintf(allocationagrif,"#include \"Param_toamr_%s.h\" \n",
+                                                           parcours_nom->o_nom);
+         /*                                                                   */
+         sprintf(ligne,"Param_toamr_%s.h",parcours_nom->o_nom);
+         paramtoamr = associate (ligne);
+         neededparameter = (listnom * )NULL;
+         /*                                                                   */
+         list_indic = (listindice *)NULL;
+         /*                                                                   */
+         shouldincludempif = 1 ;
+         parcours = List_Common_Var;
+         while ( parcours )
+         {
+            if ( !strcasecmp(parcours->var->v_commonname,parcours_nom->o_nom) &&
+                  IndiceInlist(parcours->var->v_indicetabvars,list_indic) == 0
+               )
+            {
+               /***************************************************************/
+               /***************************************************************/
+               /***************************************************************/
+               v = parcours->var;
+               IndiceMax = 0;
+               IndiceMin = indicemaxtabvars;
+  /* body of the file                                                         */
+  if ( !strcasecmp(v->v_commoninfile,mainfile) )
+  {
+     if (onlyfixedgrids != 1 && v->v_nbdim!=0)
+     {
+        strcpy (ligne, "If (.not. associated(");
+        strcat (ligne, vargridnametabvars(v,0));
+        strcat (ligne, "))                       then");
+        Save_Length(ligne,48);
+        tofich (allocationagrif, ligne,1);
+     }
+     if ( v->v_allocatable != 1 && ( v->v_dimsempty != 1) )
+     {
+        /*                ALLOCATION                                          */
+        if ( v->v_dimension != 0  )
+        {
+           if ( v->v_indicetabvars < IndiceMin ||
+                v->v_indicetabvars > IndiceMax )
+           {
+              parcours1 = parcours;
+              compteur = -1;
+              out = 0;
+              indiceprec = parcours->var->v_indicetabvars -1 ;
+              while ( parcours1 && out == 0 &&
+                      !strcasecmp(  parcours->var->v_readedlistdimension,
+                                  parcours1->var->v_readedlistdimension) &&
+                      !strcasecmp(  parcours->var->v_typevar,
+                                  parcours1->var->v_typevar) &&
+                            ( parcours1->var->v_indicetabvars == indiceprec+1 )
+                     )
+              {
+
+               if ( !strcasecmp(parcours1->var->v_modulename,
+                                parcours_nom->o_nom) ||
+                    !strcasecmp(parcours1->var->v_commonname,
+                                parcours_nom->o_nom) )
+                 {
+                      compteur = compteur +1 ;
+                      indiceprec = parcours1->var->v_indicetabvars;
+                      parcoursprec = parcours1;
+                      parcours1 = parcours1->suiv;
+                 }
+                 else out = 1;
+              }
+
+              if ( compteur > ValeurMax )
+              {
+                 fprintf(allocationagrif,"      DO i = %d , %d\n",
+                                         parcours->var->v_indicetabvars,
+                                       parcours->var->v_indicetabvars+compteur);
+                 IndiceMin = parcours->var->v_indicetabvars;
+                 IndiceMax = parcours->var->v_indicetabvars+compteur;
+                 strcpy (ligne, "allocate ");
+                 strcat (ligne, "(");
+                 strcat (ligne, vargridnametabvars(v,1));
+                 strcat (ligne, vargridparam(v,0));
+                 strcat (ligne, ")");
+                 Save_Length(ligne,48);
+                 tofich (allocationagrif, ligne,1);
+                 fprintf(allocationagrif,"      end do\n");
+                 i=parcours->var->v_indicetabvars;
+                 do
+                 {
+                    parcoursindic =  (listindice *)malloc(sizeof(listindice));
+                    parcoursindic -> i_indice = i;
+                    parcoursindic -> suiv = list_indic;
+                    list_indic = parcoursindic;
+                    i = i + 1;
+                 } while ( i <= parcours->var->v_indicetabvars+compteur );
+                 parcours = parcoursprec;
+                 /*                                                           */
+              }
+              else
+              {
+                 strcpy (ligne, "allocate ");
+                 strcat (ligne, "(");
+                 strcat (ligne, vargridnametabvars(v,0));
+                 strcat (ligne, vargridparam(v,0));
+                 strcat (ligne, ")");
+                 Save_Length(ligne,48);
+                 tofich (allocationagrif, ligne,1);
+                 /*                                                           */
+                 parcoursindic =  (listindice *)malloc(sizeof(listindice));
+                 parcoursindic -> i_indice = parcours->var->v_indicetabvars;
+                 parcoursindic -> suiv = list_indic;
+                 list_indic = parcoursindic;
+              }
+                neededparameter = writedeclarationintoamr(List_Parameter_Var,
+                              paramtoamr,v,parcours_nom->o_nom,neededparameter,
+                                                               v->v_commonname);
+              /*                                                              */
+           }
+        } /* end of the allocation part                                       */
+        /*                INITIALISATION                                      */
+        if ( strcasecmp(v->v_initialvalue,"") )
+        {
+           strcpy (ligne, "");
+           strcat (ligne, vargridnametabvars(v,0));
+           /* We should modify the initialvalue in the case of variable has   */
+           /*    been defined with others variables                           */
+                      
+           strcpy(initialvalue,
+                  ChangeTheInitalvaluebyTabvarsName
+                                      (v->v_initialvalue,List_Global_Var,0));
+           if ( !strcasecmp(initialvalue,v->v_initialvalue) )
+           {
+              strcpy(initialvalue,"");
+              strcpy(initialvalue,ChangeTheInitalvaluebyTabvarsName
+                                      (v->v_initialvalue,List_Common_Var,0));
+           }
+           if ( !strcasecmp(initialvalue,v->v_initialvalue) )
+           {
+              strcpy(initialvalue,"");
+              strcpy(initialvalue,ChangeTheInitalvaluebyTabvarsName
+                                     (v->v_initialvalue,List_ModuleUsed_Var,0));
+           }
+           strcat (ligne," = ");
+
+           if (v->v_nbdim == 0)
+           {
+           strcpy(ligne2,initialvalue);
+           }
+           else
+           {
+           sprintf(ligne2,"RESHAPE(%s,SHAPE(%s))",initialvalue,vargridnametabvars(v,0));
+           }
+           strcat (ligne,ligne2);
+           /*                                                                 */
+           Save_Length(ligne,48);
+           tofich (allocationagrif, ligne,1);
+        }
+     }
+     if (onlyfixedgrids != 1 && v->v_nbdim!=0)
+     {
+        strcpy (ligne, "   End if");
+        tofich (allocationagrif, ligne,1);
+     }
+  }
+               /***************************************************************/
+               /***************************************************************/
+               /***************************************************************/
+            }
+            parcours = parcours -> suiv;
+         }
+         /* Close the file Alloc_agrif                                        */
+         fclose(allocationagrif);
+         fclose(paramtoamr);
+      }
+      /*                                                                      */
+      parcours_nom = parcours_nom -> suiv;
+   }
+
+}
+
+
+
+void write_allocation_Global_0()
+{
+   listnom *parcours_nom;
+   listvar *parcours;
+   listvar *parcoursprec;
+   listvar *parcours1;
+   FILE *allocationagrif;
+   char ligne[LONGNOM];
+   variable *v;
+   int IndiceMax;
+   int IndiceMin;
+   int compteur;
+   int out;
+   int indiceprec;
+   int ValeurMax;
+   char initialvalue[LONG_4C];
+   int typeiswritten ;
+
+   parcoursprec = (listvar *)NULL;
+   parcours_nom = List_NameOfModule;
+   ValeurMax = 2;
+   while ( parcours_nom  )
+   {
+      /*                                                                      */
+      if ( parcours_nom->o_val == 1 )
+      {
+         IndiceMax = 0;
+         IndiceMin = indicemaxtabvars;
+         /* Open the file to create the Alloc_agrif subroutine                */
+         sprintf(ligne,"alloc_agrif_%s.h",parcours_nom->o_nom);
+         allocationagrif = associate (ligne);
+         /*                                                                   */
+         if ( ModuleIsDefineInInputFile(parcours_nom->o_nom) == 1 )
+         {
+             /* add the call to initworkspace                                 */
+            tofich(allocationagrif,"if ( .NOT. Agrif_Root() ) then ",1);
+            fprintf(allocationagrif,"#include \"GetNumberofcells.h\" \n");
+            tofich(allocationagrif,"else ",1);
+            fprintf(allocationagrif,"#include \"SetNumberofcells.h\" \n");
+            tofich(allocationagrif,"endif ",1);
+            tofich(allocationagrif,"Call Agrif_InitWorkspace ",1);
+         }
+
+         typeiswritten = 0;
+
+         parcours = List_Global_Var;
+         while ( parcours )
+         {
+            if ( !strcasecmp(parcours->var->v_modulename,parcours_nom->o_nom) &&
+                 parcours->var->v_VariableIsParameter == 0                  &&
+                 parcours->var->v_notgrid == 0                              &&
+                 !strcasecmp(parcours->var->v_modulename,parcours_nom->o_nom)  )
+            {
+               /***************************************************************/
+               /***************************************************************/
+               /***************************************************************/
+               v = parcours->var;
+               IndiceMax = 0;
+               IndiceMin = indicemaxtabvars;
+  /* body of the file                                                         */
+  if ( !strcasecmp(v->v_commoninfile,mainfile) )
+  {
+     if (onlyfixedgrids != 1 && v->v_nbdim!=0)
+     {
+        strcpy (ligne, "If (.not. associated(");
+        strcat (ligne, vargridnametabvars(v,0));
+        strcat (ligne, "))                       then");
+        Save_Length(ligne,48);
+        tofich (allocationagrif, ligne,1);
+     }
+     if ( v->v_allocatable != 1 && ( v->v_dimsempty != 1) )
+     {
+        /*                ALLOCATION                                          */
+        if ( v->v_dimension != 0  )
+        {
+           if ( v->v_indicetabvars < IndiceMin ||
+                v->v_indicetabvars > IndiceMax )
+           {
+              parcours1 = parcours;
+              compteur = -1;
+              out = 0;
+              indiceprec = parcours->var->v_indicetabvars -1 ;
+              while ( parcours1 && out == 0 &&
+                      !strcasecmp(  parcours->var->v_readedlistdimension,
+                                  parcours1->var->v_readedlistdimension) &&
+                      !strcasecmp(  parcours->var->v_typevar,
+                                  parcours1->var->v_typevar) &&
+                             ( parcours1->var->v_indicetabvars == indiceprec+1 )
+                     )
+              {
+
+               if ( !strcasecmp(parcours1->var->v_modulename,
+                                parcours_nom->o_nom) ||
+                    !strcasecmp(parcours1->var->v_commonname,
+                                parcours_nom->o_nom) )
+                 {
+                      compteur = compteur +1 ;
+                      indiceprec = parcours1->var->v_indicetabvars;
+                      parcoursprec = parcours1;
+                      parcours1 = parcours1->suiv;
+                 }
+                 else out = 1;
+              }
+              if ( compteur > ValeurMax )
+              {
+                 fprintf(allocationagrif,"      DO i = %d , %d\n",
+                                          parcours->var->v_indicetabvars,
+                                       parcours->var->v_indicetabvars+compteur);
+                 IndiceMin = parcours->var->v_indicetabvars;
+                 IndiceMax = parcours->var->v_indicetabvars+compteur;
+                 strcpy (ligne, "allocate ");
+                 strcat (ligne, "(");
+                 strcat (ligne, vargridnametabvars(v,1));
+                 strcat (ligne, vargridparam(v,0));
+                 strcat (ligne, ")");
+                 Save_Length(ligne,48);
+                 tofich (allocationagrif, ligne,1);
+                 fprintf(allocationagrif,"      end do\n");
+                 parcours = parcoursprec;
+              }
+              else
+              {
+                 strcpy (ligne, "allocate ");
+                 strcat (ligne, "(");
+                 strcat (ligne, vargridnametabvars(v,0));
+                 strcat (ligne, vargridparam(v,0));
+                 strcat (ligne, ")");
+                 Save_Length(ligne,48);
+                 tofich (allocationagrif, ligne,1);
+              }
+           }
+        } /* end of the allocation part                                       */
+
+        /*                INITIALISATION                                      */
+        if ( strcasecmp(v->v_initialvalue,"") )
+        {
+           strcpy (ligne, "");
+           strcat (ligne, vargridnametabvars(v,0));
+           /* We should modify the initialvalue in the case of variable has   */
+           /*    been defined with others variables                           */
+
+           strcpy(initialvalue,
+                  ChangeTheInitalvaluebyTabvarsName
+                                      (v->v_initialvalue,List_Global_Var,0));
+           if ( !strcasecmp(initialvalue,v->v_initialvalue) )
+           {
+              strcpy(initialvalue,"");
+              strcpy(initialvalue,ChangeTheInitalvaluebyTabvarsName
+                                      (v->v_initialvalue,List_Common_Var,0));
+           }
+           if ( !strcasecmp(initialvalue,v->v_initialvalue) )
+           {
+              strcpy(initialvalue,"");
+              strcpy(initialvalue,ChangeTheInitalvaluebyTabvarsName
+                                     (v->v_initialvalue,List_ModuleUsed_Var,0));
+           }
+           strcat (ligne," = ");
+           strcat (ligne,initialvalue);
+           /*                                                                 */
+           Save_Length(ligne,48);
+           tofich (allocationagrif, ligne,1);
+        }
+     }
+/* Case of structure types */
+        if ((typeiswritten == 0) && !strcasecmp(v->v_typevar,"type"))
+        {
+        sprintf(ligne,"If (.Not.Allocated(Agrif_%s_var)) Then",v->v_modulename);
+        tofich(allocationagrif, ligne, 1);
+        sprintf(ligne,"Allocate(Agrif_%s_var(0:Agrif_NbMaxGrids))",v->v_modulename);
+        tofich(allocationagrif, ligne, 1);
+        strcpy(ligne,"End If");
+        tofich(allocationagrif, ligne, 1);
+        typeiswritten = 1;
+        }
+     if (onlyfixedgrids != 1 && v->v_nbdim!=0)
+     {
+        strcpy (ligne, "   End if");
+        tofich (allocationagrif, ligne,1);
+     }
+  }
+               /***************************************************************/
+               /***************************************************************/
+               /***************************************************************/
+            }
+            parcours = parcours -> suiv;
+         }
+         /*                                                                   */
+         if ( ModuleIsDefineInInputFile(parcours_nom->o_nom) == 1 )
+         {
+            /* add the call to initworkspace                                  */
+            tofich(allocationagrif,"if ( .NOT. Agrif_Root() ) then ",1);
+            fprintf(allocationagrif,"#include \"GetNumberofcells.h\" \n");
+            tofich(allocationagrif,"else ",1);
+            fprintf(allocationagrif,"#include \"SetNumberofcells.h\" \n");
+            tofich(allocationagrif,"endif ",1);
+            tofich(allocationagrif,"Call Agrif_InitWorkspace ",1);
+         }
+         /* Close the file Alloc_agrif                                        */
+         fclose(allocationagrif);
+      } /* end parcours_nom == 1                                              */
+      /*                                                                      */
+      parcours_nom = parcours_nom -> suiv;
+   }
+}
+
+/******************************************************************************/
+/*                           creefichieramr                                   */
+/******************************************************************************/
+/* This subroutine is the main one to create AGRIF_INC files                  */
+/******************************************************************************/
+/*                                                                            */
+/******************************************************************************/
+void creefichieramr (char *NameTampon)
+{
+  listvar *newvar;
+  variable *v;
+  int erreur;
+  char filefich[LONG_C];
+  char ligne[LONG_C];
+  int IndiceMax;
+  int IndiceMin;
+  int InitEmpty;
+  int VarnameEmpty;
+  int donotwrite;
+
+  FILE *initproc;
+  FILE *initglobal;
+  FILE *createvarname;
+  FILE *createvarnameglobal;
+
+  if ( todebug == 1 ) printf("Enter in creefichieramr\n");
+  strcpy (filefich, "cd ");
+  strcat (filefich, nomdir);
+  erreur = system (filefich);
+  if (erreur)
+  {
+     strcpy (filefich, "mkdir ");
+     strcat (filefich, nomdir);
+     system (filefich);
+     printf ("%s: Directory created\n", nomdir);
+  }
+
+/******************************************************************************/
+/******************** Creation of AGRIF_INC files *****************************/
+/******************************************************************************/
+
+/*----------------------------------------------------------------------------*/
+  if ( todebug == 1 )
+  {
+     strcpy(ligne,"initialisations_agrif_");
+     strcat(ligne,NameTampon);
+     strcat(ligne,".h");
+     initproc = associate (ligne);
+/*----------------------------------------------------------------------------*/
+     strcpy(ligne,"createvarname_agrif_");
+     strcat(ligne,NameTampon);
+     strcat(ligne,".h");
+     createvarname = associate (ligne);
+/*----------------------------------------------------------------------------*/
+     InitEmpty = 1 ;
+     VarnameEmpty = 1 ;
+
+     newvar = List_Global_Var;
+     while ( newvar && todebug == 1 )
+     {
+        donotwrite = 0;
+        v = newvar->var;
+
+        if ( ( v->v_common == 1 || v->v_module == 1 ) && donotwrite == 0 )
+        {
+          write_createvarnameagrif_file(v,createvarname,&VarnameEmpty);
+          write_initialisationsagrif_file(v,initproc,&InitEmpty);
+        }
+        newvar = newvar->suiv;
+     }
+  /*                                                                          */
+     fclose (createvarname);
+     fclose (initproc);
+  /*--------------------------------------------------------------------------*/
+     if ( Did_filetoparse_readed(curmodulename) == 0 )
+     {
+        if ( InitEmpty != 1  )
+        {
+           initglobal = associateaplus("initialisations_agrif.h");
+           strcpy(ligne,"#include \"initialisations_agrif_");
+           strcat(ligne,NameTampon);
+           strcat(ligne,".h\"\n");
+           fprintf(initglobal,ligne);
+           fclose(initglobal);
+        }
+  /*--------------------------------------------------------------------------*/
+        if ( VarnameEmpty != 1 )
+        {
+           createvarnameglobal= associateaplus("createvarname_agrif.h");
+           strcpy(ligne,"#include \"createvarname_agrif_");
+           strcat(ligne,NameTampon);
+           strcat(ligne,".h\"\n");
+           fprintf(createvarnameglobal,ligne);
+           fclose(createvarnameglobal);
+        }
+     }
+  }
+/*----------------------------------------------------------------------------*/
+/*----------------------------------------------------------------------------*/
+/*----------------------------------------------------------------------------*/
+/*----------------------------------------------------------------------------*/
+/*----------------------------------------------------------------------------*/
+  IndiceMax = 0;
+  IndiceMin = 0;
+
+  write_allocation_Common_0();
+  write_allocation_Global_0();
+
+  Write_Alloc_Agrif_Files();
+  write_probdimagrif_file();
+  write_keysagrif_file();
+  write_modtypeagrif_file();
+  if ( NbMailleXDefined == 1 )
+                             write_Setnumberofcells_file("SetNumberofcells.h");
+  if ( NbMailleXDefined == 1 )
+                             write_Getnumberofcells_file("GetNumberofcells.h");
+  retour77 = 0;
+  if ( NbMailleXDefined == 1 )
+                          write_Setnumberofcells_file("SetNumberofcellsFree.h");
+  if ( NbMailleXDefined == 1 )
+                          write_Getnumberofcells_file("GetNumberofcellsFree.h");
+  retour77 = 1;
+  if ( NbMailleXDefined == 1 )
+                         write_Setnumberofcells_file("SetNumberofcellsFixed.h");
+  if ( NbMailleXDefined == 1 )
+                         write_Getnumberofcells_file("GetNumberofcellsFixed.h");
+  if ( todebug == 1 ) printf("Out of creefichieramr\n");
+}
Index: vendors/AGRIF/r_01/agrif_opa.in
===================================================================
--- vendors/AGRIF/r_01/agrif_opa.in	(revision 2672)
+++ vendors/AGRIF/r_01/agrif_opa.in	(revision 2672)
@@ -0,0 +1,12 @@
+% Number of cells in each direction %
+ 2D nbcellsx,nbcellsy;
+% Name of the common file : an include file (paramfile) OR a module (parammodule) %  
+ parammodule par_oce ;
+
+USE ONLY_FIXED_GRIDS;
+
+% Variables which are not grid dependent %
+% notgriddep :: name of the variable; %
+notgriddep :: nstop;
+
+%USE DEBUG;%
Index: vendors/AGRIF/r_01/efface
===================================================================
--- vendors/AGRIF/r_01/efface	(revision 2672)
+++ vendors/AGRIF/r_01/efface	(revision 2672)
@@ -0,0 +1,9 @@
+rm -f AGRIF_INC/*
+rm -f AGRIF_MODELFILES/*
+rm -f AGRIF_OBJS/*
+rm -f AGRIF_YOURFILES/*
+rm -f SORTIE/*
+
+rm -f .depend*
+rm -f .agrif*
+rm -f LIB/*.o
