Discussion:
psbasemap: GMT SYNTAX ERROR: Must specify -R option
Mxolisi Shongwe
2013-08-05 07:17:08 UTC
Permalink
Hello,

I installed GMT last week and have been trying to run this short script:


#!/bin/bash
R="28/42/-10/4"
M=M15
gmtset GRID_CROSS_SIZE 0 ANOT_FONT_SIZE 15 GRID_PEN_PRIMARY 0.001p
psbasemap -R$R -J$M -Ba3.5/a2.0/WS -P -K > test.ps
pscoast -R$R -J$M -K -O -P -Dh -N1 -I10 -W4 >> test.ps

===
I get the error messages appended below which I've been trying in vain to solve. I already specify R="28/42/-10/4. Before this, I had an error related to libnecdf.so.4 despite that I have the latest version of netcdf which I believe should be compatible with previous versions.


psbasemap: GMT SYNTAX ERROR: Must specify -R option
psbasemap: GMT SYNTAX ERROR: Must specify at least one of -B, -G, -L, -T
pscoast: GMT SYNTAX ERROR: Must specify -R option
pscoast: GMT SYNTAX ERROR: Geographic coastline data require the use of a map projection (use -Jx<scale>d if linear scaling is desired).

==
Please help!

Many thanks,
mxolisi

To unsubscribe, send the message "signoff gmt-help" to ***@lists.hawaii.edu
Seung-Sep Kim
2013-08-05 07:32:59 UTC
Permalink
Not sure what your problem is, because your script lines work fine with me..
Have you make the script file executable?
Before calling GMT programs, you may want to check whether your variables
are assigned properly by doing echo $R $M...

Cheers,
-s



To unsubscribe, send the message "signoff gmt-help" to ***@lists.hawaii.edu
Paul Wessel
2013-08-05 07:43:04 UTC
Permalink
Are you sure the minus sign before each option is really the right minus sign? If you copied/pasted commands from a PDF or HTML documentation or if you are using a fancy editor to copy/paste to make your script, perhaps you are not getting the right character.
Run
od -t a yourscript
and check what the char in front of your R, J, etc is.
What operating system, platform, is this?
-p
Post by Seung-Sep Kim
Not sure what your problem is, because your script lines work fine with me..
Have you make the script file executable?
Before calling GMT programs, you may want to check whether your variables are assigned properly by doing echo $R $M...
Cheers,
-s
To unsubscribe, send the message "signoff gmt-help" to ***@lists.hawaii.edu
Mxolisi Shongwe
2013-08-05 07:55:04 UTC
Permalink
Many thanks Paul and Milton,

I actually typed the characters. The script is much longer than I've pasted here. I'm working on Ubuntu.

od -t a test.bash returns:

0000000 # ! / b i n / b a s h nl s e t sp
0000020 - u x nl R = " 2 8 / 4 2 / - 1 0
0000040 / 4 " nl M = M 1 2 nl g m t s e t
0000060 sp G R I D _ C R O S S _ S I Z E
0000100 sp 0 sp A N O T _ F O N T _ S I Z
0000120 E sp 1 5 sp G R I D _ P E N _ P R
0000140 I M A R Y sp 0 . 0 0 1 p nl p s b
0000160 a s e m a p sp - R $ R sp - J $ M
0000200 sp - B a 3 . 5 / a 2 . 0 / W S sp
0000220 - P sp - K sp > sp t e s t . p s nl
0000240 p s c o a s t sp - R $ R sp - J $
0000260 M sp - K sp - O sp - P sp - D h sp -
0000300 N 1 sp - I 1 0 sp - W 4 sp > > sp t
0000320 e s t . p s nl p s x y sp e a s t


+++++++++++++++++++++++++++++++++++++++++
Mxolisi Shongwe
South African Weather Service
Private Bag X097
Pretoria 0001
Office: (+27) 123676070
Mobile: (+27) 745740190

"Watching the weather to protect life and property"
++++++++++++++++++++++++++++++++++++++++++++
________________________________________
From: World-Wide GMT Usage and Help Mailing List [GMT-***@LISTS.HAWAII.EDU] On Behalf Of Paul Wessel [***@HAWAII.EDU]
Sent: Monday, August 05, 2013 9:43 AM
To: GMT-***@LISTS.HAWAII.EDU
Subject: Re: [GMT-HELP] psbasemap: GMT SYNTAX ERROR: Must specify -R option

Are you sure the minus sign before each option is really the right minus sign? If you copied/pasted commands from a PDF or HTML documentation or if you are using a fancy editor to copy/paste to make your script, perhaps you are not getting the right character.
Run
od -t a yourscript
and check what the char in front of your R, J, etc is.
What operating system, platform, is this?
-p
Post by Seung-Sep Kim
Not sure what your problem is, because your script lines work fine with me..
Have you make the script file executable?
Before calling GMT programs, you may want to check whether your variables are assigned properly by doing echo $R $M...
Cheers,
-s
To unsubscribe, send the message "signoff gmt-help" to ***@lists.hawaii.edu

To unsubscribe, send the message "signoff gmt-help" to ***@lists.hawaii.edu
Paul Wessel
2013-08-05 08:08:14 UTC
Permalink
Weird, there must be tons of people running GMT on ubuntu, so what makes your system different? is there some odd LOCALE setting that is interfering? And this is GMT 4.5.9, i.e., if you just type
psbasemap -

it will say so?
I dont think netcdf issues enter here as psbasemap calls no netcdf functions.

Did you install from source via our install script? If so, did the example run correctly?

-p
Post by Mxolisi Shongwe
Many thanks Paul and Milton,
I actually typed the characters. The script is much longer than I've pasted here. I'm working on Ubuntu.
0000000 # ! / b i n / b a s h nl s e t sp
0000020 - u x nl R = " 2 8 / 4 2 / - 1 0
0000040 / 4 " nl M = M 1 2 nl g m t s e t
0000060 sp G R I D _ C R O S S _ S I Z E
0000100 sp 0 sp A N O T _ F O N T _ S I Z
0000120 E sp 1 5 sp G R I D _ P E N _ P R
0000140 I M A R Y sp 0 . 0 0 1 p nl p s b
0000160 a s e m a p sp - R $ R sp - J $ M
0000200 sp - B a 3 . 5 / a 2 . 0 / W S sp
0000220 - P sp - K sp > sp t e s t . p s nl
0000240 p s c o a s t sp - R $ R sp - J $
0000260 M sp - K sp - O sp - P sp - D h sp -
0000300 N 1 sp - I 1 0 sp - W 4 sp > > sp t
0000320 e s t . p s nl p s x y sp e a s t
+++++++++++++++++++++++++++++++++++++++++
Mxolisi Shongwe
South African Weather Service
Private Bag X097
Pretoria 0001
Office: (+27) 123676070
Mobile: (+27) 745740190
"Watching the weather to protect life and property"
++++++++++++++++++++++++++++++++++++++++++++
________________________________________
Sent: Monday, August 05, 2013 9:43 AM
Subject: Re: [GMT-HELP] psbasemap: GMT SYNTAX ERROR: Must specify -R option
Are you sure the minus sign before each option is really the right minus sign? If you copied/pasted commands from a PDF or HTML documentation or if you are using a fancy editor to copy/paste to make your script, perhaps you are not getting the right character.
Run
od -t a yourscript
and check what the char in front of your R, J, etc is.
What operating system, platform, is this?
-p
Post by Seung-Sep Kim
Not sure what your problem is, because your script lines work fine with me..
Have you make the script file executable?
Before calling GMT programs, you may want to check whether your variables are assigned properly by doing echo $R $M...
Cheers,
-s
To unsubscribe, send the message "signoff gmt-help" to ***@lists.hawaii.edu
Mxolisi Shongwe
2013-08-05 08:46:23 UTC
Permalink
I'm still not sure what the source of this weird error is.

I had this before:
psbasemap -
psbasemap 4.5.1 [64-bit] - To plot PostScript basemaps

#
I've just upgraded the version using the package available here https://launchpad.net/ubuntu/saucy/amd64/gmt/4.5.9-1

After upgrading, this is what I get:
psbasemap -
psbasemap: error while loading shared libraries: libnetcdf.so.4: cannot open shared object file: No such file or directory

I have libnetcdf.so.7 on my /usr/lib/ and I have run export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib


________________________________________
From: World-Wide GMT Usage and Help Mailing List [GMT-***@LISTS.HAWAII.EDU] On Behalf Of Paul Wessel [***@HAWAII.EDU]
Sent: Monday, August 05, 2013 10:08 AM
To: GMT-***@LISTS.HAWAII.EDU
Subject: Re: [GMT-HELP] psbasemap: GMT SYNTAX ERROR: Must specify -R option

Weird, there must be tons of people running GMT on ubuntu, so what makes your system different? is there some odd LOCALE setting that is interfering? And this is GMT 4.5.9, i.e., if you just type
psbasemap -

it will say so?
I dont think netcdf issues enter here as psbasemap calls no netcdf functions.

Did you install from source via our install script? If so, did the example run correctly?

-p
Post by Mxolisi Shongwe
Many thanks Paul and Milton,
I actually typed the characters. The script is much longer than I've pasted here. I'm working on Ubuntu.
0000000 # ! / b i n / b a s h nl s e t sp
0000020 - u x nl R = " 2 8 / 4 2 / - 1 0
0000040 / 4 " nl M = M 1 2 nl g m t s e t
0000060 sp G R I D _ C R O S S _ S I Z E
0000100 sp 0 sp A N O T _ F O N T _ S I Z
0000120 E sp 1 5 sp G R I D _ P E N _ P R
0000140 I M A R Y sp 0 . 0 0 1 p nl p s b
0000160 a s e m a p sp - R $ R sp - J $ M
0000200 sp - B a 3 . 5 / a 2 . 0 / W S sp
0000220 - P sp - K sp > sp t e s t . p s nl
0000240 p s c o a s t sp - R $ R sp - J $
0000260 M sp - K sp - O sp - P sp - D h sp -
0000300 N 1 sp - I 1 0 sp - W 4 sp > > sp t
0000320 e s t . p s nl p s x y sp e a s t
+++++++++++++++++++++++++++++++++++++++++
Mxolisi Shongwe
South African Weather Service
Private Bag X097
Pretoria 0001
Office: (+27) 123676070
Mobile: (+27) 745740190
"Watching the weather to protect life and property"
++++++++++++++++++++++++++++++++++++++++++++
________________________________________
Sent: Monday, August 05, 2013 9:43 AM
Subject: Re: [GMT-HELP] psbasemap: GMT SYNTAX ERROR: Must specify -R option
Are you sure the minus sign before each option is really the right minus sign? If you copied/pasted commands from a PDF or HTML documentation or if you are using a fancy editor to copy/paste to make your script, perhaps you are not getting the right character.
Run
od -t a yourscript
and check what the char in front of your R, J, etc is.
What operating system, platform, is this?
-p
Post by Seung-Sep Kim
Not sure what your problem is, because your script lines work fine with me..
Have you make the script file executable?
Before calling GMT programs, you may want to check whether your variables are assigned properly by doing echo $R $M...
Cheers,
-s
To unsubscribe, send the message "signoff gmt-help" to ***@lists.hawaii.edu

To unsubscribe, send the message "signoff gmt-help" to ***@lists.hawaii.edu
Paul Wessel
2013-08-05 19:18:22 UTC
Permalink
I guess this needs to be sorted out before dealing the the errors. I dont know why ubuntu says GMT is linked with letnetcdf.so.4, I would have thought the version number would not be part of that. You will probably have to add a link called libnetcdf.so.4 that points to the real library for this to work. And I dont know if that would fix it but worth a try.
Post by Mxolisi Shongwe
I'm still not sure what the source of this weird error is.
psbasemap -
psbasemap 4.5.1 [64-bit] - To plot PostScript basemaps
#
I've just upgraded the version using the package available here https://launchpad.net/ubuntu/saucy/amd64/gmt/4.5.9-1
psbasemap -
psbasemap: error while loading shared libraries: libnetcdf.so.4: cannot open shared object file: No such file or directory
I have libnetcdf.so.7 on my /usr/lib/ and I have run export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib
________________________________________
Sent: Monday, August 05, 2013 10:08 AM
Subject: Re: [GMT-HELP] psbasemap: GMT SYNTAX ERROR: Must specify -R option
Weird, there must be tons of people running GMT on ubuntu, so what makes your system different? is there some odd LOCALE setting that is interfering? And this is GMT 4.5.9, i.e., if you just type
psbasemap -
it will say so?
I dont think netcdf issues enter here as psbasemap calls no netcdf functions.
Did you install from source via our install script? If so, did the example run correctly?
-p
Post by Mxolisi Shongwe
Many thanks Paul and Milton,
I actually typed the characters. The script is much longer than I've pasted here. I'm working on Ubuntu.
0000000 # ! / b i n / b a s h nl s e t sp
0000020 - u x nl R = " 2 8 / 4 2 / - 1 0
0000040 / 4 " nl M = M 1 2 nl g m t s e t
0000060 sp G R I D _ C R O S S _ S I Z E
0000100 sp 0 sp A N O T _ F O N T _ S I Z
0000120 E sp 1 5 sp G R I D _ P E N _ P R
0000140 I M A R Y sp 0 . 0 0 1 p nl p s b
0000160 a s e m a p sp - R $ R sp - J $ M
0000200 sp - B a 3 . 5 / a 2 . 0 / W S sp
0000220 - P sp - K sp > sp t e s t . p s nl
0000240 p s c o a s t sp - R $ R sp - J $
0000260 M sp - K sp - O sp - P sp - D h sp -
0000300 N 1 sp - I 1 0 sp - W 4 sp > > sp t
0000320 e s t . p s nl p s x y sp e a s t
+++++++++++++++++++++++++++++++++++++++++
Mxolisi Shongwe
South African Weather Service
Private Bag X097
Pretoria 0001
Office: (+27) 123676070
Mobile: (+27) 745740190
"Watching the weather to protect life and property"
++++++++++++++++++++++++++++++++++++++++++++
________________________________________
Sent: Monday, August 05, 2013 9:43 AM
Subject: Re: [GMT-HELP] psbasemap: GMT SYNTAX ERROR: Must specify -R option
Are you sure the minus sign before each option is really the right minus sign? If you copied/pasted commands from a PDF or HTML documentation or if you are using a fancy editor to copy/paste to make your script, perhaps you are not getting the right character.
Run
od -t a yourscript
and check what the char in front of your R, J, etc is.
What operating system, platform, is this?
-p
Post by Seung-Sep Kim
Not sure what your problem is, because your script lines work fine with me..
Have you make the script file executable?
Before calling GMT programs, you may want to check whether your variables are assigned properly by doing echo $R $M...
Cheers,
-s
To unsubscribe, send the message "signoff gmt-help" to ***@lists.hawaii.edu
Mxolisi Shongwe
2013-08-06 08:06:40 UTC
Permalink
Thanks Paul.

Creating the link solves the previous problem. But this one resurfaces:

R=28/42/-10/4
M=M12
gmtset GRID_CROSS_SIZE 0 ANOT_FONT_SIZE 15 GRID_PEN_PRIMARY 0.001p
psbasemap -R28/42/-10/4 -JM12 -Ba3.5/a2.0/WS -P -K
psbasemap: GMT SYNTAX ERROR: Must specify -R option
psbasemap: GMT SYNTAX ERROR: Must specify at least one of -B, -G, -L, -T
pscoast -R28/42/-10/4 -JM12 -K -O -P -Dh -N1 -I10 -W4
pscoast: GMT SYNTAX ERROR: Must specify -R option
pscoast: GMT SYNTAX ERROR: Geographic coastline data require the use of a map projection (use -Jx<scale>d if linear scaling is desired).


________________________________________
From: World-Wide GMT Usage and Help Mailing List [GMT-***@LISTS.HAWAII.EDU] On Behalf Of Paul Wessel [***@HAWAII.EDU]
Sent: Monday, August 05, 2013 9:18 PM
To: GMT-***@LISTS.HAWAII.EDU
Subject: Re: [GMT-HELP] psbasemap: GMT SYNTAX ERROR: Must specify -R option

I guess this needs to be sorted out before dealing the the errors. I dont know why ubuntu says GMT is linked with letnetcdf.so.4, I would have thought the version number would not be part of that. You will probably have to add a link called libnetcdf.so.4 that points to the real library for this to work. And I dont know if that would fix it but worth a try.
Post by Mxolisi Shongwe
I'm still not sure what the source of this weird error is.
psbasemap -
psbasemap 4.5.1 [64-bit] - To plot PostScript basemaps
#
I've just upgraded the version using the package available here https://launchpad.net/ubuntu/saucy/amd64/gmt/4.5.9-1
psbasemap -
psbasemap: error while loading shared libraries: libnetcdf.so.4: cannot open shared object file: No such file or directory
I have libnetcdf.so.7 on my /usr/lib/ and I have run export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib
________________________________________
Sent: Monday, August 05, 2013 10:08 AM
Subject: Re: [GMT-HELP] psbasemap: GMT SYNTAX ERROR: Must specify -R option
Weird, there must be tons of people running GMT on ubuntu, so what makes your system different? is there some odd LOCALE setting that is interfering? And this is GMT 4.5.9, i.e., if you just type
psbasemap -
it will say so?
I dont think netcdf issues enter here as psbasemap calls no netcdf functions.
Did you install from source via our install script? If so, did the example run correctly?
-p
Post by Mxolisi Shongwe
Many thanks Paul and Milton,
I actually typed the characters. The script is much longer than I've pasted here. I'm working on Ubuntu.
0000000 # ! / b i n / b a s h nl s e t sp
0000020 - u x nl R = " 2 8 / 4 2 / - 1 0
0000040 / 4 " nl M = M 1 2 nl g m t s e t
0000060 sp G R I D _ C R O S S _ S I Z E
0000100 sp 0 sp A N O T _ F O N T _ S I Z
0000120 E sp 1 5 sp G R I D _ P E N _ P R
0000140 I M A R Y sp 0 . 0 0 1 p nl p s b
0000160 a s e m a p sp - R $ R sp - J $ M
0000200 sp - B a 3 . 5 / a 2 . 0 / W S sp
0000220 - P sp - K sp > sp t e s t . p s nl
0000240 p s c o a s t sp - R $ R sp - J $
0000260 M sp - K sp - O sp - P sp - D h sp -
0000300 N 1 sp - I 1 0 sp - W 4 sp > > sp t
0000320 e s t . p s nl p s x y sp e a s t
+++++++++++++++++++++++++++++++++++++++++
Mxolisi Shongwe
South African Weather Service
Private Bag X097
Pretoria 0001
Office: (+27) 123676070
Mobile: (+27) 745740190
"Watching the weather to protect life and property"
++++++++++++++++++++++++++++++++++++++++++++
________________________________________
Sent: Monday, August 05, 2013 9:43 AM
Subject: Re: [GMT-HELP] psbasemap: GMT SYNTAX ERROR: Must specify -R option
Are you sure the minus sign before each option is really the right minus sign? If you copied/pasted commands from a PDF or HTML documentation or if you are using a fancy editor to copy/paste to make your script, perhaps you are not getting the right character.
Run
od -t a yourscript
and check what the char in front of your R, J, etc is.
What operating system, platform, is this?
-p
Post by Seung-Sep Kim
Not sure what your problem is, because your script lines work fine with me..
Have you make the script file executable?
Before calling GMT programs, you may want to check whether your variables are assigned properly by doing echo $R $M...
Cheers,
-s
To unsubscribe, send the message "signoff gmt-help" to ***@lists.hawaii.edu

To unsubscribe, send the message "signoff gmt-help" to ***@lists.hawaii.edu
Mxolisi Shongwe
2013-08-06 11:54:32 UTC
Permalink
I had to reinstall everything from the source and now problem solved.

Many thanks for all your help and patience.

-----Original Message-----
From: World-Wide GMT Usage and Help Mailing List [mailto:GMT-***@LISTS.HAWAII.EDU] On Behalf Of Paul Wessel
Sent: Monday, August 05, 2013 9:18 PM
To: GMT-***@LISTS.HAWAII.EDU
Subject: Re: [GMT-HELP] psbasemap: GMT SYNTAX ERROR: Must specify -R option

I guess this needs to be sorted out before dealing the the errors. I dont know why ubuntu says GMT is linked with letnetcdf.so.4, I would have thought the version number would not be part of that. You will probably have to add a link called libnetcdf.so.4 that points to the real library for this to work. And I dont know if that would fix it but worth a try.
Post by Mxolisi Shongwe
I'm still not sure what the source of this weird error is.
psbasemap -
psbasemap 4.5.1 [64-bit] - To plot PostScript basemaps
#
I've just upgraded the version using the package available here
https://launchpad.net/ubuntu/saucy/amd64/gmt/4.5.9-1
psbasemap -
cannot open shared object file: No such file or directory
I have libnetcdf.so.7 on my /usr/lib/ and I have run export
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib
________________________________________
From: World-Wide GMT Usage and Help Mailing List
Sent: Monday, August 05, 2013 10:08 AM
Subject: Re: [GMT-HELP] psbasemap: GMT SYNTAX ERROR: Must specify -R option
Weird, there must be tons of people running GMT on ubuntu, so what
makes your system different? is there some odd LOCALE setting that is
interfering? And this is GMT 4.5.9, i.e., if you just type psbasemap -
it will say so?
I dont think netcdf issues enter here as psbasemap calls no netcdf functions.
Did you install from source via our install script? If so, did the example run correctly?
-p
Post by Mxolisi Shongwe
Many thanks Paul and Milton,
I actually typed the characters. The script is much longer than I've pasted here. I'm working on Ubuntu.
0000000 # ! / b i n / b a s h nl s e t sp
0000020 - u x nl R = " 2 8 / 4 2 / - 1 0
0000040 / 4 " nl M = M 1 2 nl g m t s e t
0000060 sp G R I D _ C R O S S _ S I Z E
0000100 sp 0 sp A N O T _ F O N T _ S I Z
0000120 E sp 1 5 sp G R I D _ P E N _ P R
0000140 I M A R Y sp 0 . 0 0 1 p nl p s b
0000160 a s e m a p sp - R $ R sp - J $ M
0000200 sp - B a 3 . 5 / a 2 . 0 / W S sp
0000220 - P sp - K sp > sp t e s t . p s nl
0000240 p s c o a s t sp - R $ R sp - J $
0000260 M sp - K sp - O sp - P sp - D h sp -
0000300 N 1 sp - I 1 0 sp - W 4 sp > > sp t
0000320 e s t . p s nl p s x y sp e a s t
+++++++++++++++++++++++++++++++++++++++++
Mxolisi Shongwe
South African Weather Service
Private Bag X097
Pretoria 0001
Office: (+27) 123676070
Mobile: (+27) 745740190
"Watching the weather to protect life and property"
++++++++++++++++++++++++++++++++++++++++++++
________________________________________
From: World-Wide GMT Usage and Help Mailing List
Sent: Monday, August 05, 2013 9:43 AM
Subject: Re: [GMT-HELP] psbasemap: GMT SYNTAX ERROR: Must specify -R option
Are you sure the minus sign before each option is really the right minus sign? If you copied/pasted commands from a PDF or HTML documentation or if you are using a fancy editor to copy/paste to make your script, perhaps you are not getting the right character.
Run
od -t a yourscript
and check what the char in front of your R, J, etc is.
What operating system, platform, is this?
-p
Post by Seung-Sep Kim
Not sure what your problem is, because your script lines work fine with me..
Have you make the script file executable?
Before calling GMT programs, you may want to check whether your variables are assigned properly by doing echo $R $M...
Cheers,
-s
To unsubscribe, send the message "signoff gmt-help" to
To unsubscribe, send the message "signoff gmt-help" to
To unsubscribe, send the message "signoff gmt-help" to
To unsubscribe, send the message "signoff gmt-help" to
To unsubscribe, send the message "signoff gmt-help" to
To unsubscribe, send the message "signoff gmt-help" to ***@lists.hawaii.edu

To unsubscribe, send the message "signoff gmt-help" to ***@lists.hawaii.edu
Nico Fournier
2013-08-05 09:22:28 UTC
Permalink
Perhaps a basic suggestion: is bash the default shell in the OS in question? Adding #!/bin/bash at the start of the script, as suggested before, would solve that problem.

Cheers

Nico

Sent from my iThingy
Post by Paul Wessel
Weird, there must be tons of people running GMT on ubuntu, so what makes your system different? is there some odd LOCALE setting that is interfering? And this is GMT 4.5.9, i.e., if you just type
psbasemap -
it will say so?
I dont think netcdf issues enter here as psbasemap calls no netcdf functions.
Did you install from source via our install script? If so, did the example run correctly?
-p
Post by Mxolisi Shongwe
Many thanks Paul and Milton,
I actually typed the characters. The script is much longer than I've pasted here. I'm working on Ubuntu.
0000000 # ! / b i n / b a s h nl s e t sp
0000020 - u x nl R = " 2 8 / 4 2 / - 1 0
0000040 / 4 " nl M = M 1 2 nl g m t s e t
0000060 sp G R I D _ C R O S S _ S I Z E
0000100 sp 0 sp A N O T _ F O N T _ S I Z
0000120 E sp 1 5 sp G R I D _ P E N _ P R
0000140 I M A R Y sp 0 . 0 0 1 p nl p s b
0000160 a s e m a p sp - R $ R sp - J $ M
0000200 sp - B a 3 . 5 / a 2 . 0 / W S sp
0000220 - P sp - K sp > sp t e s t . p s nl
0000240 p s c o a s t sp - R $ R sp - J $
0000260 M sp - K sp - O sp - P sp - D h sp -
0000300 N 1 sp - I 1 0 sp - W 4 sp > > sp t
0000320 e s t . p s nl p s x y sp e a s t
+++++++++++++++++++++++++++++++++++++++++
Mxolisi Shongwe
South African Weather Service
Private Bag X097
Pretoria 0001
Office: (+27) 123676070
Mobile: (+27) 745740190
"Watching the weather to protect life and property"
++++++++++++++++++++++++++++++++++++++++++++
________________________
________________
Post by Mxolisi Shongwe
Sent: Monday, August 05, 2013 9:43 AM
Subject: Re: [GMT-HELP] psbasemap: GMT SYNTAX ERROR: Must specify -R option
Are you sure the minus sign before each option is really the right minus sign? If you copied/pasted commands from a PDF or HTML documentation or if you are using a fancy editor to copy/paste to make your script, perhaps you are not getting the right character.
Run
od -t a yourscript
and check what the char in front of your R, J, etc is.
What operating system, platform, is this?
-p
Post by Seung-Sep Kim
Not sure what your problem is, because your script lines work fine with me..
Have you make the script file executable?
Before calling GMT programs, you may want to check whether your variables are assigned properly by doing echo $R $M...
Cheers,
-s
Notice: This email and any attachments are confidential.
If received in error please destroy and immediately notify us.
Do not copy or disclose the contents.

To unsubscribe, send the message "signoff gmt-help" to ***@lists.hawaii.edu
Mxolisi Shongwe
2013-08-05 07:39:50 UTC
Permalink
Thanks Seung-Sep,

I'm suspecting that the problem could be with the NetCDF libraries. The error message I had before was related to libnetcdf.so.4 yet I have the latest libnetcdf.so.7, which should be compatible with previous ones.

I checked the R as shown in the error message appended below.

+ R=28/42/-10/4
+ M=M15
+ gmtset GRID_CROSS_SIZE 0 ANOT_FONT_SIZE 15 GRID_PEN_PRIMARY 0.001p
+ psbasemap -R28/42/-10/4 -JM15 -Ba3.5/a2.0/WS -P -K
psbasemap: GMT SYNTAX ERROR: Must specify -R option
psbasemap: GMT SYNTAX ERROR: Must specify at least one of -B, -G, -L, -T
+ pscoast -R28/42/-10/4 -JM15 -K -O -P -Dh -N1 -I10 -W4

________________________________________
From: World-Wide GMT Usage and Help Mailing List [GMT-***@LISTS.HAWAII.EDU] On Behalf Of Seung-Sep Kim [***@CNU.KR]
Sent: Monday, August 05, 2013 9:32 AM
To: GMT-***@LISTS.HAWAII.EDU
Subject: Re: [GMT-HELP] psbasemap: GMT SYNTAX ERROR: Must specify -R option

Not sure what your problem is, because your script lines work fine with me..
Have you make the script file executable?
Before calling GMT programs, you may want to check whether your variables are assigned properly by doing echo $R $M...

Cheers,
-s

To unsubscribe, send the message "signoff gmt-help" to ***@lists.hawaii.edu

To unsubscribe, send the message "signoff gmt-help" to ***@lists.hawaii.edu
Milton P. Plasencia Linares
2013-08-05 07:44:37 UTC
Permalink
Hi,

I modified your script and test on GMT5.

#!/bin/bash

R="28/42/-10/4"
M=M12
#gmtset GRID_CROSS_SIZE 0 ANOT_FONT_SIZE 15 GRID_PEN_PRIMARY 0.001p
psbasemap -R$R -J$M -Ba3.5/a2.0/WeSn -P -K -Y4 > test.ps
pscoast -R$R -J$M -O -P -Dh -N1 -I10 -W1 >> test.ps


I delete -K in the pscoast command, if you add -K in the last
GMT command not "end" the ps file.

Another thing consider not paste the script and check or retype
the - signs.

HTH,

Cheers



**********************************
Milton P. PLASENCIA LINARES

Dipartimento Centro di Ricerche Sismologiche
Istituto Nazionale di Oceanografia e di Geofisica Sperimentale - OGS

Borgo Grotta Gigante 42/C
(34010) Sgonico - TRIESTE - ITALIA
Tel: +39-040-2140 256/141
Fax: +39-040-327307

E-mail: ***@inogs.it

ASAIN (Antarctic Seismographic Argentinean Italian Network)
*********************************
Post by Mxolisi Shongwe
Hello,
#!/bin/bash
R="28/42/-10/4"
M=M15
gmtset GRID_CROSS_SIZE 0 ANOT_FONT_SIZE 15 GRID_PEN_PRIMARY 0.001p
psbasemap -R$R -J$M -Ba3.5/a2.0/WS -P -K > test.ps
pscoast -R$R -J$M -K -O -P -Dh -N1 -I10 -W4 >> test.ps
===
I get the error messages appended below which I've been trying in
vain to solve. I already specify R="28/42/-10/4. Before this, I had
an error related to libnecdf.so.4 despite that I have the latest
version of netcdf which I believe should be compatible with previous
versions.
psbasemap: GMT SYNTAX ERROR: Must specify -R option
psbasemap: GMT SYNTAX ERROR: Must specify at least one of -B, -G, -L, -T
pscoast: GMT SYNTAX ERROR: Must specify -R option
pscoast: GMT SYNTAX ERROR: Geographic coastline data require the
use of a map projection (use -Jx<scale>d if linear scaling is
desired).
==
Please help!
Many thanks,
mxolisi
To unsubscribe, send the message "signoff gmt-help" to
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.

To unsubscribe, send the message "signoff gmt-help" to ***@lists.hawaii.edu
Loading...