c c------------------------------------------------------------------ c Begin file /home/sting/foster/tracsat/maptrac.f c------------------------------------------------------------------ c subroutine maptrac(satut,satlat,satlon,npts,chsize) c c Generate global cylindrical equidistant map c with line showing sat track c containing npts data points c Assume proper set call has been made c Label uses chsize for character size c npts = number of points for x-axis (ut) c c include 'orb.h' character*56 toplab dimension satut(npts),satlat(npts),satlon(npts) c c Declarations for axes labeling: c parameter (nx=7,ny=7) dimension xx(nx),yy(ny) dimension utlat(3),utlon(3) data xx/-180.,-120.,-60.,0.,60.,120.,180./ data yy/-90.,-60.,-30.,0.,30.,60.,90./ character*8 utlab character*16 labx,laby data laby/' LATITUDE (DEG) '/ data labx/' LONGITUDE (DEG)'/ data utlat/-45.,0.,45./, utlon/-90.,0.,90./ c c Save current set: call getset(pl,pr,pb,pt,wl,wr,wb,wt,lty) c c Set up ezmap: proj = 'CE ' plat = 0. plon = 0. call cpseti('MAP - mapping flag',1) rot = 0. call mappos(pl,pr,pb,pt) call mapsti('EL',0) call mapstc('OU','CO') call mapsti('DO',1) call maproj(proj,plat,plon,rot) call mapset('MA',0.,0.,0.,0.) call mapsti('G1',1) call mapsti('G2',2) call mapsti('VS',0) call mapint c c Draw sat track across projection: c (do not draw line when it wraps around from ~ -180 to +180) c c (mark beginning of orbit with 'B', and end with 'E') call maptrn(satlat(1),satlon(1),xpos,ypos) call plchmq(xpos,ypos,'B',.015,0.,-1.) offs = .01 do 100 i=2,npts call maptrn(satlat(i),satlon(i),xpos1,ypos1) if (xpos.ne.1.e12.and.ypos.ne.1.e12.and. + xpos1.ne.1.e12.and.ypos1.ne.1.e12.and. + abs(satlon(i)-satlon(i-1)).lt.300.) then c c Mark ut along the track: c do 105 ii=1,3 c if ((satlon(i-1).le.utlon(ii).and.satlon(i).ge.utlon(ii)).or. c + (satlon(i-1).ge.utlon(ii).and.satlon(i).le.utlon(ii)).or. c + (satlat(i-1).le.utlat(ii).and.satlat(i).ge.utlat(ii)).or. c + (satlat(i-1).ge.utlat(ii).and.satlat(i).le.utlat(ii)))then c c if (abs(satut(i)-float(ifix(satut(i)))).le..02) then c write(utlab,"(' ',f4.1,3x)") satut(i) c c Track is 'horizontal' on the map: c c if (abs(xpos-xpos1).gt.abs(ypos-ypos1)) then c if (satlat(i).lt.-60.) then c call plchhq(xpos1,ypos1,utlab,.01,90.,-1.) c elseif (satlat(i).gt.60.) then c write(utlab,"(3x,f4.1,' ')") satut(i) c call plchhq(xpos1,ypos1,utlab,.01,90.,1.) c else c call plchhq(xpos1,ypos1,utlab,.01,0.,-1.) c endif c c Track is 'vertical' on the map: c else c if (satlon(i).gt.140.) then c write(utlab,"(3x,f4.1,' ')") satut(i) c call plchhq(xpos1,ypos1,utlab,.01,0.,1.) c else c call plchhq(xpos1,ypos1,utlab,.01,0.,-1.) c endif c endif c call plchmq(xpos1,ypos1,'x',.01,0.,0.) c endif c105 continue c c Draw the sat track for current points: call line(xpos,ypos,xpos1,ypos1) endif xpos = xpos1 ypos = ypos1 100 continue c c Mark end of track: call plchmq(xpos,ypos,'E',.015,0.,1.) c c Label axes: call labrect(xx,nx,yy,ny,labx,laby,chsize) c c Add continental outlines: call maplot call set(pl,pr,pb,pt,wl,wr,wb,wt,lty) c c Add top label: write(toplab,"('UARS sat track (npts = ',i4,')',28x)") npts c c (vl < 0 -> put left end of string at abs(vl)) call wrlab(toplab(1:lenstr(toplab)),0.5*(pl+pr),pt+.02,0.) c return end