Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to find or open the Digital Chart of the World #60

Closed
niclasmattsson opened this issue Sep 19, 2018 · 11 comments
Closed

Unable to find or open the Digital Chart of the World #60

niclasmattsson opened this issue Sep 19, 2018 · 11 comments

Comments

@niclasmattsson
Copy link

Does DCW need to be installed manually or should it be automatically included in GMT? I downloaded version 1.1.4 from the ftp site in the error message, but where should I put it? There doesn't seem to be a DIR_DCW folder anywhere.

julia> using GMT

julia> coast(DCW="AR+p0.25p+gblue", frame=:a)
pscoast [ERROR]: Unable to find or open the Digital Chart of the World for GMT
pscoast [ERROR]: Perhaps you did not install this file in DIR_DCW, the shared dir, or the user dir?
pscoast [ERROR]: Use your package manager to install package dcw-gmt.
pscoast [ERROR]: Alternatively, get the latest dcw-gmt-<version>.tar.gz or dcw-gmt-<version>.zip from the ftp:https://ftp.soest.hawaii.edu/gmt.
pscoast [ERROR]: Internal Error = GMT_MAP_BAD_LAT_MIN
pscoast [ERROR]: Internal Error = i
pscoast (GMT_pscoast): South is outside -90 to +90 degree range
ERROR: Something went wrong when calling the module. GMT error number = 73
Stacktrace:
 [1] error(::String, ::Int32) at .\error.jl:42
 [2] gmt(::String) at C:\Users\niclas\.julia\packages\GMT\SwD1H\src\gmt_main.jl:271
 [3] finish_PS_module(::Dict{Symbol,Any}, ::String, ::String, ::String, ::String, ::String, ::Bool, ::String, ::Array{Any,1}, ::Array{Any,1}, ::Array{Any,1}, ::Array{Any,1}, ::Array{Any,1}, ::Array{Any,1}) at C:\Users\niclas\.julia\packages\GMT\SwD1H\src\common_options.jl:868
 [4] finish_PS_module(::Dict{Symbol,Any}, ::String, ::String, ::String, ::String, ::String, ::Bool, ::String) at C:\Users\niclas\.julia\packages\GMT\SwD1H\src\common_options.jl:847
 [5] #coast#122(::Array{Any,1}, ::Bool, ::Bool, ::Bool, ::Base.Iterators.Pairs{Symbol,Any,Tuple{Symbol,Symbol},NamedTuple{(:DCW, :frame),Tuple{String,Symbol}}}, ::Function, ::String) at C:\Users\niclas\.julia\packages\GMT\SwD1H\src\pscoast.jl:183
 [6] #coast at .\none:0 [inlined] (repeats 2 times)
 [7] top-level scope at none:0
@joa-quim
Copy link
Member

The GMT installer should install everything so something funny is happening to your installation and not unlikely related to your other issue. The mentioned files are stores under gmt6\share\coast and gmt6\share\dcw directories. Please see what you have (the files themselves are netcdf (.nc) files).

@niclasmattsson
Copy link
Author

The coast folder seems OK, but there is no dcw folder.

C:\Program Files\gmt6\share>dir coast
 Volume in drive C has no label.
 Volume Serial Number is 7657-45C0

 Directory of C:\Program Files\gmt6\share\coast

2018-09-19  20:07    <DIR>          .
2018-09-19  20:07    <DIR>          ..
2017-06-15  05:19            60 813 binned_border_c.nc
2017-06-15  05:19         2 131 261 binned_border_f.nc
2017-06-15  05:19           509 728 binned_border_h.nc
2017-06-15  05:19           217 433 binned_border_i.nc
2017-06-15  05:19            98 738 binned_border_l.nc
2017-06-15  05:19           136 598 binned_GSHHS_c.nc
2016-09-06  15:46        32 215 163 binned_GSHHS_f.nc
2017-06-15  05:19         8 437 674 binned_GSHHS_h.nc
2017-06-15  05:19         2 206 533 binned_GSHHS_i.nc
2017-06-15  05:19           550 248 binned_GSHHS_l.nc
2017-06-15  05:19           229 095 binned_river_c.nc
2017-06-15  05:19         7 619 434 binned_river_f.nc
2017-06-15  05:19         2 266 940 binned_river_h.nc
2017-06-15  05:19           908 481 binned_river_i.nc
2017-06-15  05:19           364 773 binned_river_l.nc
2016-08-19  21:21             7 651 COPYING.LESSERv3
2016-08-19  21:20             1 352 LICENSE.TXT
2016-08-19  21:21            14 690 README.TXT
              18 File(s)     57 976 605 bytes
               2 Dir(s)  127 108 050 944 bytes free

C:\Program Files\gmt6\share>dir dcw
 Volume in drive C has no label.
 Volume Serial Number is 7657-45C0

 Directory of C:\Program Files\gmt6\share

File Not Found

C:\Program Files\gmt6\share>

@joa-quim
Copy link
Member

Ah, finally remember this. It's a dumb issue we have with our installer that insists in having the DCW install set to optional. Old bug still waiting for a solution. Till than, just make sure that you select the DCW option from within the installer.

@niclasmattsson
Copy link
Author

OK. I know I set the option while installing a few times, but at this point I've uninstalled and reinstalled so many times that I may have missed to check that option above. Sorry about that. Anyway, it's working now with the new installer you linked in the other issue.

@joa-quim
Copy link
Member

Yes, I know it's very easy to skip option and I want to get that fixed. I remember to tried it once but than it caused some other problem and I drop it.

@niclasmattsson
Copy link
Author

By "it's working now" I meant that dcw-gmt.nc now actually gets installed into GMT6/share/dcw. But I still get the exact same error as in the first post above, even with the new installer. Does DCW need an environmental variable or something?

@joa-quim
Copy link
Member

joa-quim commented Sep 20, 2018

The installer declares only one env variable called GMT5_SHAREDIR. From memory I'm not sure if is used all the times or only when its need to find where the share directory is. Anyway, this variable is removed when one do uninstall. One possibility is if, by any reason, your installs and uninstalls left one behind pointing a wrong directory. Please check in your environmental variables that its pointing to the correct location.

As another test please run this on the command line (the dos cmd)

pscoast -EAR+p0.25p+gblue -Ba -JM10 -P > argentina.ps

It should create the (almost) same figure in postscript as the one we are trying to create with the Julia wrapper.

@niclasmattsson
Copy link
Author

Same result.

C:\Users\niclas\Downloads>pscoast -EAR+p0.25p+gblue -Ba -JM10 -P > argentina.ps
pscoast [ERROR]: Unable to find or open the Digital Chart of the World for GMT
pscoast [ERROR]: Perhaps you did not install this file in DIR_DCW, the shared dir, or the user dir?
pscoast [ERROR]: Use your package manager to install package dcw-gmt.
pscoast [ERROR]: Alternatively, get the latest dcw-gmt-<version>.tar.gz or dcw-gmt-<version>.zip from the ftp:https://ftp.soest.hawaii.edu/gmt.
pscoast [ERROR]: Internal Error = GMT_MAP_BAD_LAT_MIN
pscoast [ERROR]: Internal Error = i
pscoast (GMT_pscoast): South is outside -90 to +90 degree range

C:\Users\niclas\Downloads>

@joa-quim
Copy link
Member

OK, what is it different that you get when running this in the cmd shell?

gmt --show-library
c:/Program Files/gmt6/bin/gmt_w64.dll

gmt --show-sharedir
c:/Program Files/gmt6/share

dir "c:\Program Files\gmt6\share\dcw\*.nc"
 Volume in drive C has no label.
 Volume Serial Number is DC74-D5D7

 Directory of c:\Program Files\gmt6\share\dcw

29/06/2018  08:54        24 350 471 dcw-gmt.nc
               1 File(s)     24 350 471 bytes
               0 Dir(s)  843 004 915 712 bytes free

@niclasmattsson
Copy link
Author

The problem was the shared folder environment variable after all. It was missing before so I had to enter it from scratch. I must have been misled by the name GMT5_sharedir because I pointed it to gmt5/share instead of gmt6/share. I really need to stop trying to debug stuff after midnight ...

Now the pscoast command works perfectly in the CLI. Running coast() from Julia still doesn't work, probably because the tests still fail, see the other issue.

@joa-quim
Copy link
Member

Yes, the GMT5_SHAREDIR env var may be missing (I think) but cannot be pointing to a false location.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants