Daniel,
> Hello Dave and Mary
If you wish to communicate with me and Mary, you should send your
e-mail to "kennison@ucar.edu" and "haley@ucar.edu", rather than to
"ncarg-talk@ucar.edu", which sends it to all the members on a list of
subscribing NCAR Graphics users ...
... snip ... snip ... snip ... snip ... snip ... snip ... snip ...
> In the example program cttd01.f should I take IDIM to be the number
> of distinct longitude points? or is it IDM1? or something else?
IDM1 ( = IDIM-1) is the number of distinct longitude points. The arrays
XLAT, XLON, and ZDAT all have one point of overlap in longitude (so that
they can be effectively wrapped around the globe and meet along a seam).
Thus, one-degree data covering the whole globe is dimensioned 361x181;
the first subscript steps through 361 longitudes, beginning and ending
with 0 degrees, and the second subscript steps through 181 latitudes,
from -90 degrees to +90 degrees.
> I am having some difficulty getting the plots to look correct using
> my data which is contained in an 2D array cur(nlat,nlon). This is
> how I assign the RPNT data value:
>
> iptp = 0
> do 103 lat=1,nlat
> do 104 lon=1,nlon
> rpnt(iptp+4) = cur(lat,lon)
> iptp = iptp + lopn
> end do
> end do
>
> I suspect that I should probably transpose cur(lat,lon) to cur(lon,lat)
> but this alone is not fixing the plot.
The coordinate data are not placed in RPNT in an easily predictable order.
The routine CTTMRG, which is called by GTTD01 to generate the triangular
mesh from a rectangular array, does process the triangles in a predictable
order, but the nodes in the point array RPNT are generated as needed and
are only approximately in the order specified by the rectangular arrays.
The easiest thing for you to do would probably be to put your data in the
array ZDAT that is passed to GTTD01. If you want to put the data in the
RPNT array that you get back, you would have to use something like this:
> do i=0,npnt-lopn,lopn
> [Using the X, Y, and Z coordinates from rpnt(i+1), rpnt(i+2),
> and rpnt(i+3), compute a latitude and longitude and use those
> to figure out what element of "cur" to put in rpnt(i+4).]
> end do
This may or may not be possible, of course, depending on the nature of
the transformation effected by the contents of the arrays XLAT and XLON
that you are passing to GTTD01.
Keep in mind, too, that what the routine GTTD01 gives you back is a
triangular mesh on the surface of the globe. Subsequent code deforms
the triangular mesh to create the dumbbell shape that is seen in the
graphical output. I don't know what surface you wish to represent or
how you plan to deform the spherical mesh to fit on that surface ...
Dave Kennison
_______________________________________________
ncarg-talk mailing list
ncarg-talk@ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncarg-talk
This archive was generated by hypermail 2b29 : Mon May 24 2004 - 15:44:21 MDT