c subroutine sltxax(glonl,glonr,ut,vp,yoffset) c c Add local time axis to existing longitude axis, at given ut c Existing lon axis range is glonl (left) to glonr (right) c (glonl,glonr given in the range -180. to 180.) c This is usually called with glonl=glonr meaning 360 degrees longitude c is being plotted, but it should work with narrower range of lons. c character*8 str character*32 xlab real vp(4) data nmjr/6/ data xlab/'LOCAL TIME (HRS) '/ c c write(6,"('enter sltxax: glonl=',f8.2,' glonr=',f8.2,' ut=', c + f6.2,' yoffset=',f9.3,/' vp=',4f9.3)") glonl,glonr,ut, c + yoffset,vp c c 12/95: c Yoffset from user is fraction of viewport height. c Chsize, ticlen, ynumoff are set as fractions of viewport width c c yoff = .035 yoff = .12 if (yoffset.gt.0.) yoff = yoffset*(vp(2)-vp(1)) chsize = .020*(vp(2)-vp(1)) ticlen = .02*(vp(2)-vp(1)) ynumoff = .05*(vp(2)-vp(1)) c glon0 = glonl+180. glon1 = glonr+180. dlon = glon1-glon0 if (dlon.eq.0.) dlon = 360. if (dlon.lt.0.) dlon = glon1+(360.-glon0) dhrs = dlon/15. ! delta hours across axis slt0 = fslt(dum,ut,glonl,1) wlslt = slt0 idel= int(dhrs)/nmjr ! delta hrs between major slt tics if (idel.le.0) idel = 1 nmnr = idel c c Below error fixed 12/13/95: c if (slt0-ifix(slt0).ne.0.) slt0 = rnd(slt0,del) if (slt0-ifix(slt0).ne.0.) slt0 = rnd(slt0,float(idel)) c call getset(sl,sr,sb,st, wl,wr,wb,wt, log) call set(0.,1.,0.,1.,0.,1.,0.,1.,1) vl = vp(1) vr = vp(2) vb = vp(3) vt = vp(4) xpos0 = vl + (slt-wlslt)*(vr-vl)/dhrs xpos1 = vl + (slt+idel-wlslt)*(vr-vl)/dhrs dmnr = 1./nmnr * (xpos1-xpos0) yposax = vb-yoff call line(vl,yposax,vr,yposax) slt = slt0 ypos = vb-yoff-ynumoff do i=1,100 xpos = vl + (slt-wlslt)*(vr-vl)/dhrs if (xpos.lt.vl) goto 100 if (xpos.gt.vr) goto 101 call line(xpos,yposax,xpos,yposax+ticlen) call clearstr(str) sltlab = slt if (sltlab.ge.24.) sltlab = sltlab-24. write(str,"(f5.1)") sltlab call rmblnk(str) len = lenstr(str) call plchmq(xpos,ypos,str(1:len),chsize,0.,0.) call line(xpos,yposax,xpos,yposax+ticlen) do ii=1,nmnr-1 xmnr = xpos-ii*dmnr if (xmnr.ge.vl.and.xmnr.le.vr) + call line(xmnr,yposax,xmnr,yposax+.5*ticlen) enddo 100 continue slt = slt+idel enddo 101 continue call plchmq(0.5*(vl+vr),vb-yoff-2.2*ynumoff,xlab(1:lenstr(xlab)), + chsize,0.,0.) call set(sl,sr,sb,st, wl,wr,wb,wt, log) return end c