Re: grdtrack (gmt5) - possible bug?

Shahar Barak <[email protected]>
Newsgroups gmane.comp.gis.gmt.user
Message-ID <CAL6UvMpt_0=vHJm=p81jvmR6ZWtdOF4R9fsOMPf+SOodp33i=g@mail.gmail.com>
It works ok when I use endpoints instead of center and azimuth:
gmt grdtrack -G${grd_file} -E${LON1}/${LAT1}/${LON2}/${LAT2}+i10k -fg
-118 33.5 0 -0.0834747254848
-117.891972704 33.5016893489 10.0320097066 -0.0514965094364
-117.78393195 33.5032850827 20.0648907822 -0.0154709378555
-117.675878504 33.5047871606 30.0985935729 0.0234193657155
-117.567813133 33.5061955445 40.1330684004 0.0922054396147
-117.459736603 33.5075101984 50.1682655635 0.135183957513
-117.351649682 33.5087310886 60.2041353393 0.174436957097
-117.243553138 33.5098581842 70.2406279852 0.169260887889
-117.135447739 33.5108914563 80.2776937398 0.151650094147




On Thu, Mar 20, 2014 at 2:33 PM, Shahar Barak <[email protected]> wrote:

> 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.