C C----------------------------------------------------------------------- C SUBROUTINE CPMPXY (IMAP,XINP,YINP,XOTP,YOTP) include 'uars.h' common/cpmpcom/ pltl,pltr,npoints data ncalls/0/ save ncalls C C By default, CONPACK draws contour lines using X coordinates in the C range from XAT1 to XATM and Y coordinates in the range from YAT1 to C YATN. Setting the flag 'MAP' non-zero causes those coordinates to be C transformed by calling the subroutine CPMPXY. By default, 'MAP' = 1 C selects the EZMAP transformations and 'MAP' = 2 selects the polar C coordinate transformations. The user of CONPACK may replace this C subroutine as desired to transform the final coordinates and thus to C transform the objects drawn. C ncalls=ncalls+1 IF (IMAP.EQ.1) THEN CALL MAPTRN (YINP,XINP,XOTP,YOTP) ELSE IF (IMAP.EQ.2) THEN XOTP=XINP*COS(.017453292519943*YINP) YOTP=XINP*SIN(.017453292519943*YINP) elseif (imap.eq.3) then xxinp = 1.+(xinp-pltl) / (pltr-pltl) * (npoints-1) i = ifix(xxinp) s = xxinp-float(i) xotp = s * satut(i+1) + (1.-s) * satut(i) c if (mod(ncalls,500).eq.0) c + write(6,"('cpmpxy: xinp=',f9.3,' i=',i4,' s=',f9.3,' xotp=', c + f9.3,' pltl,r=',2f9.3,' satut=',2f9.3,' yotp=',f9.3)") c + xinp,i,s,xotp,pltl,pltr,satut(i),satut(i+1) yotp = yinp ELSE XOTP=XINP YOTP=YINP END IF C C Done. C RETURN END