
	program read_nhb

	
	integer nfcst,nbc,list,idtad
	real dum
	logical sigma

	parameter (im=61,jm=99,lm=38,jam=6+2*(jm-10))
        integer*4 itb,jtb,itbq,jtbq,JJ
        parameter (itb=76,jtb=134
     .          ,itbq=152,jtbq=440)

	integer*4 khla(jam),khha(jam),kvla(jam),kvha(jam)
     .         ,khl2(jm),khh2(jm),kvl2(jm),kvh2(jm)

	integer idum2(im,jm),idum2b(im,jm)
	real dum2(im,jm),dumlm1(lm),em(jam),emt(jam)
	real dumlm2(lm),dumlm3(lm),dumlm4(lm),dumlm5(lm)
	real dumlm6(lm),dumlm7(lm),eta1(lm+1)

	real stheq(itbq),the0q(itbq),ttblq(jtbq,itbq),
     +	ptbl(itb,jtb),ttbl(jtb,itb),
     .  qs0(jtb),sqs(jtb),the0(itb),sthe(itb)


C	write(6,*) 'khla values ', khla



	open (unit=1,file='cnst.file',access='sequential',form='unformatted')
	open (unit=2,file='cnst.file.newsoil',
     +			access='sequential',form='unformatted')

	read(1) nfcst,nbc,list,dt,idtad,sigma,hla,
     +	hha,vla,vha,hl2,hh2,vl2,vh2

	read(2) nfcst,nbc,list,dt,idtad,sigma,hla,
     +	hha,vla,vha,hl2,hh2,vl2,vh2

	write(6,*) nfcst,nbc,list,dt,idtad,sigma

	read(1) idum2
	read(2) idum2b

        do J=1,jm
	do I=1,im
	if (idum2(I,J) .ne. idum2b(I,J)) then
	write(6,*) 'LMH DIFF: ', I,J,IDUM2(I,J),IDUM2B(I,J)
	endif
	enddo
        enddo

	STOP

  643   format(41(I2,1x))

	read(1) dum2

        do J=jm,1,-1
C        write(6,643) (dum2(I,J),I=1,IM)
        enddo

	STOP

	read(1) dum2
	read(1) dum2
	read(1) dum2

C	sm
	read(1) dum2

C	sice
	read(1) dum2

C	htm
	do L=1,LM
	read(1) dum2
	enddo

C	vtm
	do L=1,LM
	read(1) dum2
	enddo

	read(1) dy,cpgfv,en,ent,r,pt,tddamp,f4d,f4q
     +		ef4t,dumlm2,dumlm3,dumlm4,dumlm5,dumlm6,
     +		dumlm7,em,emt

	write(6,*) nfcst,nbc,list,dt,idtad,sigma
	write(6,*) dy,cpgfv,en,ent,r,pt,tddamp

C	STOP


C	dx
	read(1) dum2

C	wpdar
	read(1) dum2

C	cpgfu
	read(1) dum2

C	curv
	read(1) dum2

c	fcp
	read(1) dum2

c	fdiv
	read(1) dum2

C	fad
	read(1) dum2

c	f
	read(1) dum2

c	ddmpu
	read(1) dum2

C	ddmpv
	read(1) dum2

C	pt,lat
	read(1) pt2,dum2

c	lon
	read(1) dum2

	
	read(1) plq,rdpq,rdtheq,stheq,the0q
	read(1)  ros,cs,ds,roi,ci,di
     .        ,pl,thl,rdq,rdth,rdp,rdthe
     .        ,dumlm1,dumlm2,dumlm3
     .        ,qs0,sqs,sthe,the0


C	wfk
	read(1) dum2

c	epsr
	read(1) dum2
	
c	tg
	read(1) dum2

c	gffc
	read(1) dum2

c	sst
	read(1) dum2

c	alb1d
	read(1) dum2

c	hdac
	read(1) dum2

c	hdacv
	read(1) dum2

	read(1) ttblq
	read(1) ptbl,ttbl,
     .	r1,pt1,tsph,
     .        wbd,sbd,tlm0d,tph0d,dlmd,dphd,tlm0d,dp30
     .        ,x1p,y1p,ixm,iym
     .	      ,dumlm1,dumlm2,eta1

	write(6,*) 'wbd,sbd,tlm0d,tph0d,dlmd,dphd ', 
     +	wbd,sbd,tlm0d,tph0d,dlmd,dphd



	




	close(1)

	end
