Change folder for earth relief

Dear Paul,

Due to the limitation of the size of my home folder, is there any option to put downloaded earth relief to another folder?

Thank you


Probably make a folder wherever you want and add a symbolic link called .gmt in your home dir to point to that dir.

Another way is setting the environment variable GMT_USERDIR (default to ~/.gmt) to the directory you want to use.

1 Like

Dear Paul and seisman

Thank you very much


How exactly can I do this? With gmt set DIR_DATA ?

No, environmental parameter, e.g.

export GMT_USERDIR=/some/other/place/.gmt

for bash.

I have an student that her user folders names is Melisa Juliá on win10. So she get errors like this:

grdcut [ERROR]: ERROR - Unable to produce blended grid from C:/Users/Melisa Juliß/.gmt/sessions/gmt_session.884/=tiled_91_GX.000000

I know that it is better to avoid symbols like á in the folder/file names. Does she should rename her users folder? Is something that can be modified in GMT to properly identified the users folders and avoid this issue?

This is how we determine the users how directory. I am not sure why the á becomes ß though so this is a character set issue. We are not converting whatever the getenv returns to us:

	/* Determine HOMEDIR (user home directory) */

	if ((this_c = getenv ("HOME")) != NULL)				/* HOME was set */
		GMT->session.HOMEDIR = gmt_strdup_noquote (this_c);
#ifdef WIN32
	else if ((this_c = getenv ("USERPROFILE")) != NULL)	/* USERPROFILE was set */
		GMT->session.HOMEDIR = gmt_strdup_noquote (this_c);
	else if ((this_c = getenv ("HOMEPATH")) != NULL)	/* HOMEPATH was set */
		GMT->session.HOMEDIR = gmt_strdup_noquote (this_c);
	else {
		/* If HOME not set: use root directory instead ( */
		GMT->session.HOMEDIR = strdup ("/"); /* Note: Windows will use the current drive if drive letter unspecified. */
#ifdef DEBUG
		GMT_Report (API, GMT_MSG_WARNING, "HOME environment not set. Using root directory instead.\n");

I have that situation several times with students. Unfortunately it’s a completely lost battle. They don’t give a f. when you warn them that they shouldn’t do it. Mobile messages are far more important/interessing. Then latter “Ai ai, it doesn’t work for me”. The problem (I think) is that since we are not using UTF the characters above 127 in what we call ASCII (which is only 7 bits) are code page dependent, and that is not standard. So those characters may get changed to something else.

I should add that we Norwegians have the same shits with æ, ø, and å, the latter being used in my first name…

Ah, the pain of character encoding.

Ref. Joaquim’s post; does gmt not use utf-8? What does it use?

Never really understood how this UTF things work (external libs + OS provided libs = unintelligible mess) but I think GMT uses what the the OS decides to provide.

Disclaimer: ignorance may be present

I’ve never understood why not absolutely everything these days use utf-8.
I mean, you can represent all(?) symbols and characters ever created AND it’s completely compatible with ASCII as utf-8 is a superset of ASCII (chars 0 - 127 in ASCII is the same as chars 0 - 127 in utf-8 - precisely because we want them to be backwards compatible).

Does PostScript support utf-8? I guess not since PS_CHAR_ENCODING exists?

I suspect that having no funny characters in the English and American alphabet has a lot to do with this.

Yes, but it’s not like English/American people would suffer if they used utf-8; they wouldn’t even know!(?)

Oh, they wouldn’t, but it is just extra work to implement it.