c c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . c . . c . copyright (c) 1998 by UCAR . c . . c . University Corporation for Atmospheric Research . c . . c . all rights reserved . c . . c . . c . SPHEREPACK . c . . c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . c c ... file visgau.f c c contains documentation and code for subroutine visgau c c SUBROUTINE VISGAU (NLAT,NLON,H,LEN,EYER,EYELAT,EYELON, c 1 THETA,WK,LWK,IWK,LIWK,IERROR) c c subroutine visgau produces a three dimensional visible rendering c of the function h(i,j) which is tabulated on a gauss distributed c colatitude grid. c c requires setgau alfk lfpt gaqd drst dintql dpytha c visgau embed intrpg sptcg diag stride c trigau vsurf vsurf1 prjct box icvmg projct c c tvisgau uses the ncar graphics package. c compile with: ncargf77 (all programs above) c c execute with: a.out c c on screen display with: ctrans -d x11 gmeta c c print with: ctrans -d ps.color gmeta > gmeta.ps c lpr -p(your printer) gmeta.ps c c input parameters c c nlat the number of gauss colatitudes. c if nlat is odd the equator is located at c grid point i=(nlat+1)/2. if nlat is even the equator is c located half way between points i=nlat/2 and i=nlat/2+1. c nlat must be at least 3. note: on the half sphere, the c number of grid points in the colatitudinal direction is c nlat/2 if nlat is even or (nlat+1)/2 if nlat is odd. c c nlon the number of distinct londitude points. nlon determines c the grid increment in longitude as 2*pi/nlon. for example c nlon = 72 for a five degree grid. nlon must be greater c than or equal to 4. the efficiency of the computation is c improved when nlon is a product of small prime numbers. c c c h a two dimensional array that contains the discrete c function to be displayed. h(i,j) is the distance from the c center of the sphere to the surface at gauss colatitude c point theta(i) and longitude point c phi(j) = (j-1)*2*pi/nlon. c c len the first dimension of the array h as it appears in the c program that calls sphere. c c eyer the distance from the center of the sphere to the eye. c c eyelat the colatitudinal coordinate of the eye (in degrees). c c eyelon the longitudinal coordinate of the eye (in degrees). c c theta a double precision array with nlat gauss colatitudes c computed by subroutine gaqd c c wk a real work array c c lwk the dimension of the array wk as it appears in the c program that calls visgau. lwk must be at least c 46*(nlat+2)*(nlon+1). c c iwk an integer work array c c liwk the dimension of the array iwk as it appears in the c program that calls visgau. liwk must be at least c 14*(nlat+2)*(nlon+1). c c ierror = 0 no error c = 1 the eye is positioned inside the sphere c = 2 lwk is less than 46*(nlat+2)*(nlon+1) c = 3 liwk is less than 14*(nlat+2)*(nlon+1) c c