      SUBROUTINE NSURF

C     Compile with options /c (compile only) and /4Yb (error tracing)

C     COMMON DECK "SS" INSERTED HERE

      DOUBLE PRECISION MODSURF

      COMMON/SS/ MODSURF(4)

      COMMON/SS/U,PUR,PURR,PURTH,PURPH

      COMMON/SS/PUTH,PUPH,PUTHTH,PUPHPH,PUTHPH,USELECT,UTIME

C     COMMON DECK "WW" INSERTED HERE

      PARAMETER (NWARSZ=1000) 

      COMMON/WW/dum(10),MAXW,W(NWARSZ)

C     COMMON DECK "CB11" INSERTED HERE

      INTEGER SMX,SNTBL,SITBL,SFRMTBL,IDSS(10)

      COMMON/B11/SMX,SNTBL(10),SITBL(10),SFRMTBL(10),SGP(11)

      EQUIVALENCE (SGP,IDSS),(ANS,SGP(11))

C

      INTEGER SPX    ,SQTBL(10),SLTBL(10),SIRMTBL(10)

C

      DATA SPX/1/

      DATA SQTBL/1,11,8*0/

      DATA SLTBL/1,9*0/

      DATA SIRMTBL/1,9*0/

C

C

      ENTRY SETSUR

C

      SMX=SPX

      CALL IMOVE(SNTBL,SQTBL,10)

      CALL IMOVE(SITBL,SLTBL,10)

      CALL IMOVE(SFRMTBL,SIRMTBL,10)

      CALL SETPSR

C

      RETURN

C

      ENTRY ISURFAC 

C

      IF(W(350) .NE. 0.) THEN

           PRINT*,' Model check number mismatch: '

           STOP ' W(350) should be 0 if you are using model NSURF.'

      endif

C

      MODSURF(1)=5HNSURF

      MODSURF(2)=0

      RETURN

C

      ENTRY SURFACE 

      U=1.

      CALL CLEAR(PUR,9)

      END 

