Path problem

Added by Thomas 10 months ago

Hello to all.

I'm taking my first steps on GMT, and I'm blocking on a simple thing ..

GMT can not find my file.

I wrote these command lines in a .bat file and even directly in the "cmd" of windows, but nothing works.

gmt grdcut Chilie.grd -R-80.5683/-61.4381/-30/-14 -V
gmt grdinfo
gmt grdcontour -JM7i -C250 -A1000 -P -Ba>
gmt psconvert -Tf

the error message:
- Error for input file: No such file (Chilie.grd).
But I do have this file.
How do we draw a path?
I am on Windows

Thank you

Replies (6)

RE: Path problem - Added by Paul 10 months ago

Hi Thomas-

If the file Chilie.grd is not in your current directory then that is the message you will get.
The @ syntax if for files residing on the GMT server and that are used for documentation examples and tests. You will never use that syntax on any of your own files.
Since you are discussing a grid I do not understand what drawing a path means.
Reading and following the tutorial might be a good start to get up to speed on the basics.

RE: Path problem - Added by Thomas 10 months ago

what i call a path is a windows directory by example , C:\...\
the current directory is the directory where my file.bat is ? or on the GMT bin?
Thanks for the @, i didn't get it!


RE: Path problem - Added by Engelbert 9 months ago

Thomas, better use an Unix-like operating system!

RE: Path problem - Added by Joaquim 9 months ago


RE: Path problem - Added by Paul 9 months ago

You were talking about drawing a path, which implies plotting, hence the confusion. The current directory is whatever you set it to in the command prompt. If you type dir and do not see your file then it is not going to work of course. User cd to move around. To second Engelbert's point, if you are on Windows 10 then I would strongly recommend looking into Ubuntu Bash for Windows 10 [google it] as there are just too many limitations using bat.

RE: Path problem - Added by Thomas 9 months ago

My problem is solved!
i just add a path like Matlab, was stupid, sorry guy !
Thanks for the help