subroutine mbsrfc(arry, title, xlabel, ylabel, zmin, zmax, ixsz, iysz) c;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; c Wed Dec 11 09:18:42 MST 1991 c;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; common /SRFIP1/ ifr, istp, irots, idrx, 1 idry, idrz, iupper, iskirt, 2 ncla, theta, hskirt, chi, 3 cho, cinc, ispval dimension xrry(ixsz,iysz), arry(iysz,ixsz), MM(ixsz,iysz,2) dimension View(6), x(ixsz), y(iysz) c dimension xrry(73,37), arry(37,73), MM(73,37,2) c dimension View(6), x(73), y(37) character*(*) title, xlabel, ylabel integer sizeo data View /400.0, 250.0, 300.0, 180., 0., 0./ data tx /0.44/, ty /0.97/ c These variables can be moved to the parameter list if necessary. c ixsz= 73 c iysz= 37 c Default scaling factor to make a nice looking surface contour, c otherwise figure out a nice looking scale factor. factor= 1.0 zdiff= zmax - zmin if (abs(360.0/zdiff) .lt. 4.4) factor= 360.0/(zdiff*4.4) if (zmin .eq. zmax) goto 10 c Attempt to fix the box size in which the surface is drawn. R0= sqrt((View(1)-View(4))**2 + (View(2)-View(5))**2 & + (View(3)-View(6))**2) call setr (380.0, -20.0, 110.0, -110.0, factor*zmin, & factor*zmax, R0) 10 continue c Set SRFACE COMMON parameters: c (draw surface contours). idrz= 1 c (don't call FRAME) ifr= 0 c (Consider the following as highs and lows) chi= factor*zmax cho= factor*zmin c Put array in proper order for drawing. do i= 1, ixsz do j= 1, iysz ii= (ixsz-i)+1 xrry(ii,j)= factor*arry(j,i) enddo enddo c Set the x and y coordinate points for SRFACE usage. xsrfin= 360.0/(ixsz-1) do i= 1, ixsz x(i)= xsrfin*float(i-1) enddo ysrfin= 180.0/(iysz-1) do j= 1, iysz y(j)= -90.0 + ysrfin*float(j-1) enddo c Select normalization transformation (1-1 mapping). call gselnt (0) c write (6, '("mbsrfc: title= ",a)') title iszt= sizeo(title) call wtstr (tx, ty, title(1:iszt), 2, 0, 0) call srface (x, y, xrry, MM, ixsz, ixsz, iysz, View, 0.0) c Now label stuff call pwrzs (180.0, 105.0, 0.0, xlabel(1:sizeo(xlabel)), 1 sizeo(xlabel), 70, -1, -2, 0) call pwrzs (0.0, 105.0, 0.0, "360.0", 3, 1 62, -1, -2, 0) call pwrzs (360.0, 105.0, 0.0, "0.0", 5, 1 62, -1, -2, 0) call pwrzs (375.0, 0.0, 0.0, ylabel(1:sizeo(ylabel)), 1 sizeo(ylabel), 70, 2, -1, 0) call pwrzs (375.0, 90.0, 0.0, "-90.0", 5, 1 62, -1, -2, 0) call pwrzs (370.0, -90.0, 0.0, "90.0 ", 5, 1 62, -1, -2, 0) call frame c Restore SRFACE internals ifr= 1 idrz= 0 return end