Re: grdtrack (gmt5) - possible bug?

Shahar Barak <[email protected]>
Newsgroups gmane.comp.gis.gmt.user
Message-ID <CAL6UvMogqG0AhkG0dAeeAF7RhvBwuXDsZahgZBdJYUdVc-tO8Q@mail.gmail.com>
It is a geographic grid. the x/y locations are in lon/lat degrees.
grdinfo gives:
tomo_slice.grd: Title: Data gridded with continuous surface splines in
tension
tomo_slice.grd: Command:
tomo_slice.grd: Remark:
tomo_slice.grd: Gridline node registration used [Cartesian grid]
tomo_slice.grd: Grid file format: nf = GMT netCDF format (32-bit float),
COARDS, CF-1.5
tomo_slice.grd: x_min: -124.5 x_max: -104.5 x_inc: 0.05 name: x nx: 401
tomo_slice.grd: y_min: 27 y_max: 47 y_inc: 0.05 name: y ny: 401
tomo_slice.grd: z_min: -0.347601979971 z_max: 0.446707308292 name: z
tomo_slice.grd: scale_factor: 1 add_offset: 0
tomo_slice.grd: format: netCDF-4 chunk_size: 134,134 shuffle: on
deflation_level: 3

Why does it thinks it is a Cartesian grid?

When I add -fig it still outputs the distance in degrees, not in km.



On Thu, Mar 20, 2014 at 2:12 PM, Paul Wessel <[email protected]> wrote:

> Is your file a geographic grid? I.e., when you do grdinfo on it, does it
> say so?  If not then you will need to add -fg to force that.
> -p
>
> On Mar 20, 2014, at 10:54 AM, Shahar Barak <[email protected]> wrote:
>
>
> The manual says:
> "You may append +iinc*[**u*] to set the sampling interval (append
> appropriate unit); if not given then we default to half the minimum grid
> interval, and *if geographic we select great circle distances in km as
> the default unit and method*."
>
> However, when I run:
> gmt grdtrack -G${grd_file} -E${LON}/${LAT}+o${AZ}+l5
> I get:
> -118 33.5 -2.5 -0.0740850940347
> .
> .
> .
> -113 33.5 2.5 0.0141758602113
>
> So the distances are in degrees, not in km, as I understand from the
> manual. Why?
> Also, it seems like that one can only specify +l in degrees, and not in
> km. Why?
>
> I also tried specifying the units in km with +i :
> gmt grdtrack -G${grd_file} -E${LON}/${LAT}+o${AZ}+l5+i0.1k
>
> However, I get intervals of 0.1 degrees instead of 0.1 km:
> -118 33.5  -2.5 -0.0834747254848
> -117.9 33.5 -2.4 -0.0538280569017
> -117.8 33.5 -2.3 -0.0227038227022
> -117.7 33.5  -2.2 0.0134101686999
> -117.6 33.5 -2.1 0.0674700662494
> -117.5 33.5 -2 0.12702396512
>
> Is this a bug?
>
> To unsubscribe, send the message "signoff gmt-help" to
> [email protected]
>
>
> To unsubscribe, send the message "signoff gmt-help" to
> [email protected]

To unsubscribe, send the message "signoff gmt-help" to [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.