35 SUBROUTINE get_bits(IBM,SGDS,LEN,MG,G,ISCALE,GROUND, &
41 REal,
DIMENSION(LEN),
intent(in):: g
42 real,
DIMENSION(LEN),
intent(inout) :: ground
43 integer,
DIMENSION(LEN),
intent(in):: mg
44 integer,
intent(in) :: ibm,len
45 integer,
intent(inout) :: iscale,nbit
46 real,
intent(out) :: gmax,gmin
62 IF(mg(i)/=0.AND.i1==0) i1=i
64 IF(i1>0.AND.i1<=len)
THEN
81 CALL fndbit( gmin, gmax, sgds, nbit, iscale, irett)
114 SUBROUTINE fndbit ( rmin, rmax, rdb, nmbts, iscale, iret )
117 integer,
intent(inout) :: iscale,nmbts
118 real,
intent(inout) :: rmin,rmax,rdb
119 real :: range,rr,rng2,po,rln2
120 integer :: iret,icnt,ipo,le,ibin
122 DATA rln2/0.69314718/
128 IF ( range <= 0.00 )
THEN
133 IF ( rdb == 0.0 )
THEN
136 ELSE IF ( rdb > 0.0 )
THEN
137 ipo = int(alog10( range ))
138 IF ( range < 1.00 ) ipo = ipo - 1
139 po = float(ipo) - rdb + 1.
141 rr = range * 10. ** ( -po )
142 nmbts = int( alog( rr ) / rln2 ) + 1
145 rng2 = range * 2. ** ibin
146 nmbts = int( alog( rng2 ) / rln2 ) + 1
151 IF(abs(rmin)>=1.)
THEN
152 iscale=-int(alog10(abs(rmin)))
153 ELSE IF (abs(rmin)<1.0.AND.abs(rmin)>0.0)
THEN
154 iscale=-int(alog10(abs(rmin)))+1