C-----------------------------------------------------------------------
C  TDB_CHKPROF -- CHECK THAT POINTERS ARE IN ORDER FOR TRDAT MAPPED PROFILES
C
C  ** GENERATED CODE ** TRDATGEN / DMC 3 MAY 1991
C
      SUBROUTINE TDB_CHKPROF(d,ISTOP)
C
      use trdatbuf_obj
      IMPLICIT NONE
 
      type (trdatbuf) :: d
!============
! idecl:  explicitize implicit INTEGER declarations:
      INTEGER istop,ier,i,j
!============
      CHARACTER*25 ZZLABEL    ! build label for 3d profile
C
C-----------------------------------------------------------------------
C
      ISTOP=0
C
C=>TRDATGEN+
!
!    ******************************************
!    * TRDATGEN GENERATED CODE -- DO NOT EDIT *
!    ******************************************
!
!    code generation ends at C=>TRDATGEN- line
!
!
C
      CALL TDBSUB_CK2A(d,'AXR',
     >     D%LFAXR,D%LXAXR,D%NXAXR,D%NRIAXR,D%NSYAXR,IER)
      IF(IER.NE.0) ISTOP=1
C
      CALL TDBSUB_CK2A(d,'BOL',
     >     D%LFBOL,D%LXBOL,D%NXBOL,D%NRIBOL,D%NSYBOL,IER)
      IF(IER.NE.0) ISTOP=1
C
      CALL TDBSUB_CK2A(d,'BPA',
     >     D%LFBPA,D%LXBPA,D%NXBPA,D%NRIBPA,D%NSYBPA,IER)
      IF(IER.NE.0) ISTOP=1
C
      CALL TDBSUB_CK2A(d,'BPB',
     >     D%LFBPB,D%LXBPB,D%NXBPB,D%NRIBPB,D%NSYBPB,IER)
      IF(IER.NE.0) ISTOP=1
C
      CALL TDBSUB_CK2A(d,'D2F',
     >     D%LFD2F,D%LXD2F,D%NXD2F,D%NRID2F,D%NSYD2F,IER)
      IF(IER.NE.0) ISTOP=1
C
      CALL TDBSUB_CK2A(d,'DE2',
     >     D%LFDE2,D%LXDE2,D%NXDE2,D%NRIDE2,D%NSYDE2,IER)
      IF(IER.NE.0) ISTOP=1
C
      CALL TDBSUB_CK2A(d,'DF3',
     >     D%LFDF3,D%LXDF3,D%NXDF3,D%NRIDF3,D%NSYDF3,IER)
      IF(IER.NE.0) ISTOP=1
C
      CALL TDBSUB_CK2A(d,'DF4',
     >     D%LFDF4,D%LXDF4,D%NXDF4,D%NRIDF4,D%NSYDF4,IER)
      IF(IER.NE.0) ISTOP=1
C
      CALL TDBSUB_CK2A(d,'DF6',
     >     D%LFDF6,D%LXDF6,D%NXDF6,D%NRIDF6,D%NSYDF6,IER)
      IF(IER.NE.0) ISTOP=1
C
      CALL TDBSUB_CK2A(d,'DFD',
     >     D%LFDFD,D%LXDFD,D%NXDFD,D%NRIDFD,D%NSYDFD,IER)
      IF(IER.NE.0) ISTOP=1
C
      CALL TDBSUB_CK2A(d,'DFH',
     >     D%LFDFH,D%LXDFH,D%NXDFH,D%NRIDFH,D%NSYDFH,IER)
      IF(IER.NE.0) ISTOP=1
C
      CALL TDBSUB_CK2A(d,'DFT',
     >     D%LFDFT,D%LXDFT,D%NXDFT,D%NRIDFT,D%NSYDFT,IER)
      IF(IER.NE.0) ISTOP=1
C
      CALL TDBSUB_CK2A(d,'ECF',
     >     D%LFECF,D%LXECF,D%NXECF,D%NRIECF,D%NSYECF,IER)
      IF(IER.NE.0) ISTOP=1
C
      CALL TDBSUB_CK2A(d,'FEH',
     >     D%LFFEH,D%LXFEH,D%NXFEH,D%NRIFEH,D%NSYFEH,IER)
      IF(IER.NE.0) ISTOP=1
C
      CALL TDBSUB_CK2A(d,'FEL',
     >     D%LFFEL,D%LXFEL,D%NXFEL,D%NRIFEL,D%NSYFEL,IER)
      IF(IER.NE.0) ISTOP=1
C
      CALL TDBSUB_CK2A(d,'GRB',
     >     D%LFGRB,D%LXGRB,D%NXGRB,D%NRIGRB,D%NSYGRB,IER)
      IF(IER.NE.0) ISTOP=1
C
      CALL TDBSUB_CK2A(d,'IBE',
     >     D%LFIBE,D%LXIBE,D%NXIBE,D%NRIIBE,D%NSYIBE,IER)
      IF(IER.NE.0) ISTOP=1
C
      CALL TDBSUB_CK2A(d,'IBI',
     >     D%LFIBI,D%LXIBI,D%NXIBI,D%NRIIBI,D%NSYIBI,IER)
      IF(IER.NE.0) ISTOP=1
C
      CALL TDBSUB_CK2A(d,'JBM',
     >     D%LFJBM,D%LXJBM,D%NXJBM,D%NRIJBM,D%NSYJBM,IER)
      IF(IER.NE.0) ISTOP=1
C
      CALL TDBSUB_CK2A(d,'JEC',
     >     D%LFJEC,D%LXJEC,D%NXJEC,D%NRIJEC,D%NSYJEC,IER)
      IF(IER.NE.0) ISTOP=1
C
      CALL TDBSUB_CK2A(d,'JIC',
     >     D%LFJIC,D%LXJIC,D%NXJIC,D%NRIJIC,D%NSYJIC,IER)
      IF(IER.NE.0) ISTOP=1
C
      CALL TDBSUB_CK2A(d,'LF3',
     >     D%LFLF3,D%LXLF3,D%NXLF3,D%NRILF3,D%NSYLF3,IER)
      IF(IER.NE.0) ISTOP=1
C
      CALL TDBSUB_CK2A(d,'LF4',
     >     D%LFLF4,D%LXLF4,D%NXLF4,D%NRILF4,D%NSYLF4,IER)
      IF(IER.NE.0) ISTOP=1
C
      CALL TDBSUB_CK2A(d,'LF6',
     >     D%LFLF6,D%LXLF6,D%NXLF6,D%NRILF6,D%NSYLF6,IER)
      IF(IER.NE.0) ISTOP=1
C
      CALL TDBSUB_CK2A(d,'LFD',
     >     D%LFLFD,D%LXLFD,D%NXLFD,D%NRILFD,D%NSYLFD,IER)
      IF(IER.NE.0) ISTOP=1
C
      CALL TDBSUB_CK2A(d,'LFH',
     >     D%LFLFH,D%LXLFH,D%NXLFH,D%NRILFH,D%NSYLFH,IER)
      IF(IER.NE.0) ISTOP=1
C
      CALL TDBSUB_CK2A(d,'LFT',
     >     D%LFLFT,D%LXLFT,D%NXLFT,D%NRILFT,D%NSYLFT,IER)
      IF(IER.NE.0) ISTOP=1
C
      CALL TDBSUB_CK2A(d,'LHE',
     >     D%LFLHE,D%LXLHE,D%NXLHE,D%NRILHE,D%NSYLHE,IER)
      IF(IER.NE.0) ISTOP=1
C
      CALL TDBSUB_CK2A(d,'LHJ',
     >     D%LFLHJ,D%LXLHJ,D%NXLHJ,D%NRILHJ,D%NSYLHJ,IER)
      IF(IER.NE.0) ISTOP=1
C
      CALL TDBSUB_CK2A(d,'NER',
     >     D%LFNER,D%LXNER,D%NXNER,D%NRINER,D%NSYNER,IER)
      IF(IER.NE.0) ISTOP=1
C
      CALL TDBSUB_CK2A(d,'NI3',
     >     D%LFNI3,D%LXNI3,D%NXNI3,D%NRINI3,D%NSYNI3,IER)
      IF(IER.NE.0) ISTOP=1
C
      CALL TDBSUB_CK2A(d,'NI4',
     >     D%LFNI4,D%LXNI4,D%NXNI4,D%NRINI4,D%NSYNI4,IER)
      IF(IER.NE.0) ISTOP=1
C
      CALL TDBSUB_CK2A(d,'NI6',
     >     D%LFNI6,D%LXNI6,D%NXNI6,D%NRINI6,D%NSYNI6,IER)
      IF(IER.NE.0) ISTOP=1
C
      CALL TDBSUB_CK2A(d,'NID',
     >     D%LFNID,D%LXNID,D%NXNID,D%NRINID,D%NSYNID,IER)
      IF(IER.NE.0) ISTOP=1
C
      CALL TDBSUB_CK2A(d,'NIH',
     >     D%LFNIH,D%LXNIH,D%NXNIH,D%NRINIH,D%NSYNIH,IER)
      IF(IER.NE.0) ISTOP=1
C
      CALL TDBSUB_CK2A(d,'NIM',
     >     D%LFNIM,D%LXNIM,D%NXNIM,D%NRINIM,D%NSYNIM,IER)
      IF(IER.NE.0) ISTOP=1
C
      CALL TDBSUB_CK2A(d,'NIT',
     >     D%LFNIT,D%LXNIT,D%NXNIT,D%NRINIT,D%NSYNIT,IER)
      IF(IER.NE.0) ISTOP=1
C
      CALL TDBSUB_CK2A(d,'NMR',
     >     D%LFNMR,D%LXNMR,D%NXNMR,D%NRINMR,D%NSYNMR,IER)
      IF(IER.NE.0) ISTOP=1
C
      CALL TDBSUB_CK2A(d,'OMG',
     >     D%LFOMG,D%LXOMG,D%NXOMG,D%NRIOMG,D%NSYOMG,IER)
      IF(IER.NE.0) ISTOP=1
C
      CALL TDBSUB_CK2A(d,'PRS',
     >     D%LFPRS,D%LXPRS,D%NXPRS,D%NRIPRS,D%NSYPRS,IER)
      IF(IER.NE.0) ISTOP=1
C
      CALL TDBSUB_CK2A(d,'QBE',
     >     D%LFQBE,D%LXQBE,D%NXQBE,D%NRIQBE,D%NSYQBE,IER)
      IF(IER.NE.0) ISTOP=1
C
      CALL TDBSUB_CK2A(d,'QBI',
     >     D%LFQBI,D%LXQBI,D%NXQBI,D%NRIQBI,D%NSYQBI,IER)
      IF(IER.NE.0) ISTOP=1
C
      CALL TDBSUB_CK2A(d,'QEC',
     >     D%LFQEC,D%LXQEC,D%NXQEC,D%NRIQEC,D%NSYQEC,IER)
      IF(IER.NE.0) ISTOP=1
C
      CALL TDBSUB_CK2A(d,'QIC',
     >     D%LFQIC,D%LXQIC,D%NXQIC,D%NRIQIC,D%NSYQIC,IER)
      IF(IER.NE.0) ISTOP=1
C
      CALL TDBSUB_CK2A(d,'QPR',
     >     D%LFQPR,D%LXQPR,D%NXQPR,D%NRIQPR,D%NSYQPR,IER)
      IF(IER.NE.0) ISTOP=1
C
      CALL TDBSUB_CK2A(d,'RES',
     >     D%LFRES,D%LXRES,D%NXRES,D%NRIRES,D%NSYRES,IER)
      IF(IER.NE.0) ISTOP=1
C
      CALL TDBSUB_CK2A(d,'SBI',
     >     D%LFSBI,D%LXSBI,D%NXSBI,D%NRISBI,D%NSYSBI,IER)
      IF(IER.NE.0) ISTOP=1
C
      CALL TDBSUB_CK2A(d,'TER',
     >     D%LFTER,D%LXTER,D%NXTER,D%NRITER,D%NSYTER,IER)
      IF(IER.NE.0) ISTOP=1
C
      CALL TDBSUB_CK2A(d,'TI2',
     >     D%LFTI2,D%LXTI2,D%NXTI2,D%NRITI2,D%NSYTI2,IER)
      IF(IER.NE.0) ISTOP=1
C
      CALL TDBSUB_CK2A(d,'TQI',
     >     D%LFTQI,D%LXTQI,D%NXTQI,D%NRITQI,D%NSYTQI,IER)
      IF(IER.NE.0) ISTOP=1
C
      CALL TDBSUB_CK2A(d,'V2F',
     >     D%LFV2F,D%LXV2F,D%NXV2F,D%NRIV2F,D%NSYV2F,IER)
      IF(IER.NE.0) ISTOP=1
C
      CALL TDBSUB_CK2A(d,'VB2',
     >     D%LFVB2,D%LXVB2,D%NXVB2,D%NRIVB2,D%NSYVB2,IER)
      IF(IER.NE.0) ISTOP=1
C
      CALL TDBSUB_CK2A(d,'VC3',
     >     D%LFVC3,D%LXVC3,D%NXVC3,D%NRIVC3,D%NSYVC3,IER)
      IF(IER.NE.0) ISTOP=1
C
      CALL TDBSUB_CK2A(d,'VC4',
     >     D%LFVC4,D%LXVC4,D%NXVC4,D%NRIVC4,D%NSYVC4,IER)
      IF(IER.NE.0) ISTOP=1
C
      CALL TDBSUB_CK2A(d,'VC6',
     >     D%LFVC6,D%LXVC6,D%NXVC6,D%NRIVC6,D%NSYVC6,IER)
      IF(IER.NE.0) ISTOP=1
C
      CALL TDBSUB_CK2A(d,'VCD',
     >     D%LFVCD,D%LXVCD,D%NXVCD,D%NRIVCD,D%NSYVCD,IER)
      IF(IER.NE.0) ISTOP=1
C
      CALL TDBSUB_CK2A(d,'VCH',
     >     D%LFVCH,D%LXVCH,D%NXVCH,D%NRIVCH,D%NSYVCH,IER)
      IF(IER.NE.0) ISTOP=1
C
      CALL TDBSUB_CK2A(d,'VCT',
     >     D%LFVCT,D%LXVCT,D%NXVCT,D%NRIVCT,D%NSYVCT,IER)
      IF(IER.NE.0) ISTOP=1
C
      CALL TDBSUB_CK2A(d,'VEE',
     >     D%LFVEE,D%LXVEE,D%NXVEE,D%NRIVEE,D%NSYVEE,IER)
      IF(IER.NE.0) ISTOP=1
C
      CALL TDBSUB_CK2A(d,'VIE',
     >     D%LFVIE,D%LXVIE,D%NXVIE,D%NRIVIE,D%NSYVIE,IER)
      IF(IER.NE.0) ISTOP=1
C
      CALL TDBSUB_CK2A(d,'VMO',
     >     D%LFVMO,D%LXVMO,D%NXVMO,D%NRIVMO,D%NSYVMO,IER)
      IF(IER.NE.0) ISTOP=1
C
      CALL TDBSUB_CK2A(d,'VP2',
     >     D%LFVP2,D%LXVP2,D%NXVP2,D%NRIVP2,D%NSYVP2,IER)
      IF(IER.NE.0) ISTOP=1
C
      CALL TDBSUB_CK2A(d,'VPO',
     >     D%LFVPO,D%LXVPO,D%NXVPO,D%NRIVPO,D%NSYVPO,IER)
      IF(IER.NE.0) ISTOP=1
C
      CALL TDBSUB_CK2A(d,'VPR',
     >     D%LFVPR,D%LXVPR,D%NXVPR,D%NRIVPR,D%NSYVPR,IER)
      IF(IER.NE.0) ISTOP=1
C
      CALL TDBSUB_CK2A(d,'VTR',
     >     D%LFVTR,D%LXVTR,D%NXVTR,D%NRIVTR,D%NSYVTR,IER)
      IF(IER.NE.0) ISTOP=1
C
      CALL TDBSUB_CK2A(d,'ZF2',
     >     D%LFZF2,D%LXZF2,D%NXZF2,D%NRIZF2,D%NSYZF2,IER)
      IF(IER.NE.0) ISTOP=1
C
      CALL TDBSUB_CK2A(d,'ZXR',
     >     D%LFZXR,D%LXZXR,D%NXZXR,D%NRIZXR,D%NSYZXR,IER)
      IF(IER.NE.0) ISTOP=1
C
      DO I = 1, 300
        J = D%NISSIM(I)
        IF (J==0) EXIT
        WRITE(ZZLABEL,'(A,I3,A,I5)') 'SIM SET:',J,', TOT:',I
        CALL TDBSUB_CK2A(d,ZZLABEL,D%LFSIM(I),D%LXSIM(J),
     >              D%NXSIM(J),D%NRISIM(J),D%NSYSIM(J),IER)
        IF(IER.NE.0) ISTOP=1
      END DO
C
C
C=>TRDATGEN-
C
      RETURN
      END
! 20jan2003 fgtok -s r8_precision.sub all.sub "r8con.csh conversion"
