PoisotLab / SimpleSDMLayers.jl

Simple layers for species distribution modeling and bioclimatic data
https://docs.ecojulia.org/SimpleSDMLayers.jl/stable/
MIT License
19 stars 2 forks source link

Fix CHELSA download url #44

Closed gabrieldansereau closed 3 years ago

gabrieldansereau commented 3 years ago

What the pull request does

Previous tests failed in the test/chelsa.jl script with:

julia> lc1 = bioclim(1; left=-5.0, right=7.0, bottom=30.0, top=45.0)
ERROR: DNSError: envidatrepo.wsl.ch, unknown node or service (EAI_NONAME)

I believe it's because the URL of the CHELSA FTP server has changed from ftp://envidatrepo.wsl.ch to ftp://envicloud.wsl.ch (That's the link on the CHELSA website). Hopefully this should fix it.

Type of change

Please indicate the relevant option(s)

Checklist

gabrieldansereau commented 3 years ago

@tpoisot Is there a reason we're using the FTP URL to download the data instead of the HTTPS one?

The tests still failed with FTP, but I've changed it to HTTPS and they now pass (and the CHELSA website recommends HTTPS). Unless you prefer FTP, I suggest to leave it like this.

Here's the FTP error in case (it's not the same as before). I don't know why the URL is not found, it works to download the files in Firefox.

ERROR: HTTP.ExceptionRequest.StatusError(404, "GET", "/chelsa/chelsa_V1/climatologies/bio/CHELSA_bio10_01.tif", HTTP.Messages.Response:
"""
HTTP/1.1 404 Not Found
Date: Tue, 05 Jan 2021 19:48:34 GMT
Server: Apache/2.4.41 (Ubuntu)
Content-Length: 279
Content-Type: text/html; charset=iso-8859-1

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL was not found on this server.</p>
<hr>
<address>Apache/2.4.41 (Ubuntu) Server at envicloud.wsl.ch Port 443</address>
</body></html>
""")