      SUBROUTINE PRE2(I2D,LIMIT,IELM,NSTOR,X,Y,Z,CXY)                   MOD04902
      LOGICAL IGET,RGET                                                 MOD04903
      INTEGER AGET,AGETW                                                MOD04904
      DIMENSION NSTOR(LIMIT),X(LIMIT),Y(LIMIT),Z(LIMIT)                 MOD04905
      DIMENSION XID(20,4),IDUM(20)                                      MOD04906
      COMMON/UNIT/IN,IO,IP,INP                                          MOD04907
      DATA BLANK/1H /                                                   MOD04908
      IDD=I2D                                                           MOD04909
      DO 12 I=1,20                                                      MOD04910
      DO 12 J=1,4                                                       MOD04911
      XID(I,J)=0.0                                                      MOD04912
12    CONTINUE                                                          MOD04913
      IF(IDD.NE.2)GO TO 200                                             MOD04914
      DO 2 JJ=3,7                                                       MOD04915
      IJS=AGET(JJ)                                                      MOD04916
2     CONTINUE                                                          MOD04917
      IF(IGET(INCS))CALL PRTERR(0)                                      MOD04918
      IF(IGET(INCT))CALL PRTERR(0)                                      MOD04919
      IF(RGET(PERS))CALL PRTERR(0)                                      MOD04920
      IF(RGET(PERT))CALL PRTERR(0)                                      MOD04921
      IF(IGET(KS1))CALL PRTERR(0)                                       MOD04922
      INCR=1                                                            MOD04923
      PERR=100                                                          MOD04924
20    M=1                                                               MOD04925
21    CALL GETNL(GET001)                                                MOD04926
      IF(IGET(K))CALL PRTERR(0)                                         MOD04927
      IF(K.EQ.-1)GO TO 30                                               MOD04928
      XID(M,1)=K                                                        MOD04929
      IF(RGET(XID(M,2)))CALL PRTERR(0)                                  MOD04930
      IF(RGET(XID(M,3)))CALL PRTERR(0)                                  MOD04931
      IF(RGET(XID(M,4)))CALL PRTERR(0)                                  MOD04932
      M=M+1                                                             MOD04933
      GO TO 21                                                          MOD04934
30    CALL MESHGE(XID,INCS,INCT,INCR,PERS,PERT,PERR,IDD,KS1             MOD04935
     1,LIMIT,NSTOR,X,Y,Z)                                               MOD04936
      RETURN                                                            MOD04937
200   CONTINUE                                                          MOD04938
      IF(IDD.NE.3)GO TO 300                                             MOD04939
      DO 3 JJ=3,6                                                       MOD04940
      IJK=AGET(JJ)                                                      MOD04941
3     CONTINUE                                                          MOD04942
      IF(IGET(INCS))CALL PRTERR(0)                                      MOD04943
      IF(IGET(INCT))CALL PRTERR(0)                                      MOD04944
      IF(IGET(INCR))CALL PRTERR(0)                                      MOD04945
      IF(RGET(PERS))CALL PRTERR(0)                                      MOD04946
      IF(RGET(PERT))CALL PRTERR(0)                                      MOD04947
      IF(RGET(PERR))CALL PRTERR(0)                                      MOD04948
      IF(IGET(KS1))CALL PRTERR(0)                                       MOD04949
      GO TO 20                                                          MOD04950
300   CONTINUE                                                          MOD04951
      IF(IDD.NE.4)GO TO 400                                             MOD04952
      ICO=8                                                             MOD04953
      IDD=2                                                             MOD04954
      IF(IGET(INCS))CALL PRTERR(0)                                      MOD04955
      IF(IGET(INCT))CALL PRTERR(0)                                      MOD04956
      IF(RGET(PERS))CALL PRTERR(0)                                      MOD04957
      IF(RGET(PERT))CALL PRTERR(0)                                      MOD04958
      IF(IGET(KS1))CALL PRTERR(0)                                       MOD04959
      INCR=1                                                            MOD04960
      PERR=100                                                          MOD04961
310   CALL GETNL(GET001)                                                MOD04962
      DO 221 M=1,ICO                                                    MOD04963
      IF(IGET(IDUM(M)))CALL PRTERR(0)                                   MOD04964
221   CONTINUE                                                          MOD04965
      DO 22 M=1,ICO                                                     MOD04966
      K=IDUM(M)                                                         MOD04967
      XID(M,1)=K                                                        MOD04968
      XID(M,2)=X(K)                                                     MOD04969
      XID(M,3)=Y(K)                                                     MOD04970
      XID(M,4)=Z(K)                                                     MOD04971
22    CONTINUE                                                          MOD04972
      GO TO 30                                                          MOD04973
400   CONTINUE                                                          MOD04974
      IDD=3                                                             MOD04975
      IF(IGET(INCS))CALL PRTERR(0)                                      MOD04976
      IF(IGET(INCT))CALL PRTERR(0)                                      MOD04977
      IF(IGET(INCR))CALL PRTERR(0)                                      MOD04978
      IF(RGET(PERS))CALL PRTERR(0)                                      MOD04979
      IF(RGET(PERT))CALL PRTERR(0)                                      MOD04980
      IF(RGET(PERR))CALL PRTERR(0)                                      MOD04981
      IF(IGET(KS1))CALL PRTERR(0)                                       MOD04982
      ICO=20                                                            MOD04983
      GO TO 310                                                         MOD04984
      END                                                               MOD04985
