WorldClim Version2

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

WorldClim Version2

Andy Bunn-3
Hello all, is anybody aware of a R package that gracefully works with
version 2 of the WorldClim data?

http://worldclim.org/version2


I have all the data extracted locally but I'm wondering if there is
something akin to getData in raster that will work with version 2 and not
1.4 as (the brilliant) raster package currently does.

Many thanks, Andy

_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Reply | Threaded
Open this post in threaded view
|

Re: WorldClim Version2

Marcelino de la Cruz Rot
Hello Andy,

I've been using raster to play with WordlClim 2.0 and it works fine. For
example:

# Download 2.5' arc P data of worldclim 2.0
# The file is 68.5 MB so it takes some time to download
P_url<-
"http://biogeo.ucdavis.edu/data/worldclim/v2.0/tif/base/wc2.0_2.5m_prec.zip"
download.file(P_url, destfile="wc2.0_2.5m_prec.zip")
unzip("wc2.0_2.5m_prec.zip")

#  Generate a stack object  with all monthly precipitation layers
P_filenames<- paste("wc2.0_2.5m_prec_", c(paste(0,1:9, sep=""), 11,12),
".tif",sep="")

prec2.5<- stack(P_filenames)

# Compute annual precipitation as a raster layer
P2.5<- sum(prec2.5)

# etc.

Cheers,

Marcelino


El 25/09/2017 a las 19:42, Andy Bunn escribió:

> Hello all, is anybody aware of a R package that gracefully works with
> version 2 of the WorldClim data?
>
> http://worldclim.org/version2
>
>
> I have all the data extracted locally but I'm wondering if there is
> something akin to getData in raster that will work with version 2 and not
> 1.4 as (the brilliant) raster package currently does.
>
> Many thanks, Andy
>
> _______________________________________________
> R-sig-Geo mailing list
> [hidden email]
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
> .
>

--
Marcelino de la Cruz Rot
Depto. de Biología y Geología
Física y Química Inorgánica
Universidad Rey Juan Carlos
Móstoles España

_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Reply | Threaded
Open this post in threaded view
|

Re: WorldClim Version2

Andy Bunn-3
Great. Thanks Marcelino. I have all the data dowloaded. I'm surprised that
there isn't a dedicated package for worldclim yet ‹ making one that ties
in with packages like BIEN would be great. Perhaps I'll work on it someday.

-A

On 9/25/17, 11:32 AM, "Marcelino de la Cruz Rot"
<[hidden email]> wrote:

>Hello Andy,
>
>I've been using raster to play with WordlClim 2.0 and it works fine. For
>example:
>
># Download 2.5' arc P data of worldclim 2.0
># The file is 68.5 MB so it takes some time to download
>P_url<-
>"http://biogeo.ucdavis.edu/data/worldclim/v2.0/tif/base/wc2.0_2.5m_prec.zi
>p"
>download.file(P_url, destfile="wc2.0_2.5m_prec.zip")
>unzip("wc2.0_2.5m_prec.zip")
>
>#  Generate a stack object  with all monthly precipitation layers
>P_filenames<- paste("wc2.0_2.5m_prec_", c(paste(0,1:9, sep=""), 11,12),
>".tif",sep="")
>
>prec2.5<- stack(P_filenames)
>
># Compute annual precipitation as a raster layer
>P2.5<- sum(prec2.5)
>
># etc.
>
>Cheers,
>
>Marcelino
>
>
>El 25/09/2017 a las 19:42, Andy Bunn escribió:
>> Hello all, is anybody aware of a R package that gracefully works with
>> version 2 of the WorldClim data?
>>
>> http://worldclim.org/version2
>>
>>
>> I have all the data extracted locally but I'm wondering if there is
>> something akin to getData in raster that will work with version 2 and
>>not
>> 1.4 as (the brilliant) raster package currently does.
>>
>> Many thanks, Andy
>>
>> _______________________________________________
>> R-sig-Geo mailing list
>> [hidden email]
>> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>> .
>>
>
>--
>Marcelino de la Cruz Rot
>Depto. de Biología y Geología
>Física y Química Inorgánica
>Universidad Rey Juan Carlos
>Móstoles España
>

_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Reply | Threaded
Open this post in threaded view
|

Re: WorldClim Version2

Bacou, Melanie

I would assume `raster::getData("worldclim", ...)` uses WorldClim version 2?

--Mel.


On 09/25/2017 05:14 PM, Andy Bunn wrote:
Great. Thanks Marcelino. I have all the data dowloaded. I'm surprised that
there isn't a dedicated package for worldclim yet ‹ making one that ties
in with packages like BIEN would be great. Perhaps I'll work on it someday.

-A

On 9/25/17, 11:32 AM, "Marcelino de la Cruz Rot"
[hidden email] wrote:

Hello Andy,

I've been using raster to play with WordlClim 2.0 and it works fine. For
example:

# Download 2.5' arc P data of worldclim 2.0
# The file is 68.5 MB so it takes some time to download
P_url<- 
"http://biogeo.ucdavis.edu/data/worldclim/v2.0/tif/base/wc2.0_2.5m_prec.zi
p"
download.file(P_url, destfile="wc2.0_2.5m_prec.zip")
unzip("wc2.0_2.5m_prec.zip")

#  Generate a stack object  with all monthly precipitation layers
P_filenames<- paste("wc2.0_2.5m_prec_", c(paste(0,1:9, sep=""), 11,12),
".tif",sep="")

prec2.5<- stack(P_filenames)

# Compute annual precipitation as a raster layer
P2.5<- sum(prec2.5)

# etc.

Cheers,

Marcelino


El 25/09/2017 a las 19:42, Andy Bunn escribió:
Hello all, is anybody aware of a R package that gracefully works with
version 2 of the WorldClim data?

http://worldclim.org/version2


I have all the data extracted locally but I'm wondering if there is
something akin to getData in raster that will work with version 2 and
not
1.4 as (the brilliant) raster package currently does.

Many thanks, Andy

_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo
.

-- 
Marcelino de la Cruz Rot
Depto. de Biología y Geología
Física y Química Inorgánica
Universidad Rey Juan Carlos
Móstoles España

_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo


_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Reply | Threaded
Open this post in threaded view
|

Re: WorldClim Version2

Marcelino de la Cruz Rot
I'm afraid it don't.

At least in version 2.5.8, as it  appears from  this line in .wordclim():

  theurl <-
paste("http://biogeo.ucdavis.edu/data/climate/worldclim/1_4/grid/cur/",
             zip, sep = "")

Marcelino


El 28/09/2017 a las 4:31, Bacou, Melanie escribió:

>
> I would assume `raster::getData("worldclim", ...)` uses WorldClim
> version 2?
>
> --Mel.
>
>
> On 09/25/2017 05:14 PM, Andy Bunn wrote:
>> Great. Thanks Marcelino. I have all the data dowloaded. I'm surprised that
>> there isn't a dedicated package for worldclim yet ‹ making one that ties
>> in with packages like BIEN would be great. Perhaps I'll work on it someday.
>>
>> -A
>>
>> On 9/25/17, 11:32 AM, "Marcelino de la Cruz Rot"
>> <[hidden email]>  wrote:
>>
>>> Hello Andy,
>>>
>>> I've been using raster to play with WordlClim 2.0 and it works fine. For
>>> example:
>>>
>>> # Download 2.5' arc P data of worldclim 2.0
>>> # The file is 68.5 MB so it takes some time to download
>>> P_url<-
>>> "http://biogeo.ucdavis.edu/data/worldclim/v2.0/tif/base/wc2.0_2.5m_prec.zi 
>>> p"
>>> download.file(P_url, destfile="wc2.0_2.5m_prec.zip")
>>> unzip("wc2.0_2.5m_prec.zip")
>>>
>>> #  Generate a stack object  with all monthly precipitation layers
>>> P_filenames<- paste("wc2.0_2.5m_prec_", c(paste(0,1:9, sep=""), 11,12),
>>> ".tif",sep="")
>>>
>>> prec2.5<- stack(P_filenames)
>>>
>>> # Compute annual precipitation as a raster layer
>>> P2.5<- sum(prec2.5)
>>>
>>> # etc.
>>>
>>> Cheers,
>>>
>>> Marcelino
>>>
>>>
>>> El 25/09/2017 a las 19:42, Andy Bunn escribió:
>>>> Hello all, is anybody aware of a R package that gracefully works with
>>>> version 2 of the WorldClim data?
>>>>
>>>> http://worldclim.org/version2
>>>>
>>>>
>>>> I have all the data extracted locally but I'm wondering if there is
>>>> something akin to getData in raster that will work with version 2 and
>>>> not
>>>> 1.4 as (the brilliant) raster package currently does.
>>>>
>>>> Many thanks, Andy
>>>>
>>>> _______________________________________________
>>>> R-sig-Geo mailing list
>>>> [hidden email]
>>>> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>>>> .
>>>>
>>> --
>>> Marcelino de la Cruz Rot
>>> Depto. de Biología y Geología
>>> Física y Química Inorgánica
>>> Universidad Rey Juan Carlos
>>> Móstoles España
>>>
>> _______________________________________________
>> R-sig-Geo mailing list
>> [hidden email]
>> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>
> .


--
Marcelino de la Cruz Rot
Depto. de Biología y Geología
Física y Química Inorgánica
Universidad Rey Juan Carlos
Móstoles España

_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Reply | Threaded
Open this post in threaded view
|

Re: WorldClim Version2

Mirza Cengic
Hi Andy,

for quick and dirty solution you can replace the url that the getData()
function reads for bioclim data. You can find the source code of the
function here https://github.com/cran/raster/blob/master/R/getData.R#L277
(note
that there's if/else flow for different resolutions of climate data). From
there you can make a custom function, or recompile the package if you
prefer it that way.

URL for the bioclimatic layers is
http://biogeo.ucdavis.edu/data/worldclim/v2.0/tif/base/wc2.0_RES_bio.zip,
where "RES" can be 10m, 5m, 2.5m, or 30s, and you'll need to play around a
bit with how the theurl string is being created in relation with the
resolution.

M

On Wed, Oct 4, 2017 at 2:00 PM, Mirza Cengic <[hidden email]> wrote:

> Hi Andy,
>
> for quick and dirty solution you can replace the url that the getData()
> function reads for bioclim data. You can find the source code of the
> function here
> <https://github.com/cran/raster/blob/master/R/getData.R#L277>(note that
> there's if/else flow for different resolutions of climate data). From there
> you can make a custom function, or recompile the package if you prefer it
> that way.
>
> URL for the bioclimatic layers is http://biogeo.ucdavis.edu/
> data/worldclim/v2.0/tif/base/wc2.0_RES_bio.zip, where "RES" can be 10m,
> 5m, 2.5m, or 30s, and you'll need to play around a bit with how the theurl
> string is being created in relation with the resolution.
>
> M
>
> On Thu, Sep 28, 2017 at 9:44 AM, Marcelino de la Cruz Rot <
> [hidden email]> wrote:
>
>> I'm afraid it don't.
>>
>> At least in version 2.5.8, as it  appears from  this line in .wordclim():
>>
>>  theurl <- paste("http://biogeo.ucdavis.edu/data/climate/worldclim/1_4/
>> grid/cur/",
>>             zip, sep = "")
>>
>> Marcelino
>>
>>
>>
>> El 28/09/2017 a las 4:31, Bacou, Melanie escribió:
>>
>>>
>>> I would assume `raster::getData("worldclim", ...)` uses WorldClim
>>> version 2?
>>>
>>> --Mel.
>>>
>>>
>>> On 09/25/2017 05:14 PM, Andy Bunn wrote:
>>>
>>>> Great. Thanks Marcelino. I have all the data dowloaded. I'm surprised
>>>> that
>>>> there isn't a dedicated package for worldclim yet ‹ making one that ties
>>>> in with packages like BIEN would be great. Perhaps I'll work on it
>>>> someday.
>>>>
>>>> -A
>>>>
>>>> On 9/25/17, 11:32 AM, "Marcelino de la Cruz Rot"
>>>> <[hidden email]>  wrote:
>>>>
>>>> Hello Andy,
>>>>>
>>>>> I've been using raster to play with WordlClim 2.0 and it works fine.
>>>>> For
>>>>> example:
>>>>>
>>>>> # Download 2.5' arc P data of worldclim 2.0
>>>>> # The file is 68.5 MB so it takes some time to download
>>>>> P_url<-
>>>>> "http://biogeo.ucdavis.edu/data/worldclim/v2.0/tif/base/wc2.
>>>>> 0_2.5m_prec.zi p"
>>>>> download.file(P_url, destfile="wc2.0_2.5m_prec.zip")
>>>>> unzip("wc2.0_2.5m_prec.zip")
>>>>>
>>>>> #  Generate a stack object  with all monthly precipitation layers
>>>>> P_filenames<- paste("wc2.0_2.5m_prec_", c(paste(0,1:9, sep=""), 11,12),
>>>>> ".tif",sep="")
>>>>>
>>>>> prec2.5<- stack(P_filenames)
>>>>>
>>>>> # Compute annual precipitation as a raster layer
>>>>> P2.5<- sum(prec2.5)
>>>>>
>>>>> # etc.
>>>>>
>>>>> Cheers,
>>>>>
>>>>> Marcelino
>>>>>
>>>>>
>>>>> El 25/09/2017 a las 19:42, Andy Bunn escribió:
>>>>>
>>>>>> Hello all, is anybody aware of a R package that gracefully works with
>>>>>> version 2 of the WorldClim data?
>>>>>>
>>>>>> http://worldclim.org/version2
>>>>>>
>>>>>>
>>>>>> I have all the data extracted locally but I'm wondering if there is
>>>>>> something akin to getData in raster that will work with version 2 and
>>>>>> not
>>>>>> 1.4 as (the brilliant) raster package currently does.
>>>>>>
>>>>>> Many thanks, Andy
>>>>>>
>>>>>> _______________________________________________
>>>>>> R-sig-Geo mailing list
>>>>>> [hidden email]
>>>>>> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>>>>>> .
>>>>>>
>>>>>> --
>>>>> Marcelino de la Cruz Rot
>>>>> Depto. de Biología y Geología
>>>>> Física y Química Inorgánica
>>>>> Universidad Rey Juan Carlos
>>>>> Móstoles España
>>>>>
>>>>> _______________________________________________
>>>> R-sig-Geo mailing list
>>>> [hidden email]
>>>> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>>>>
>>>
>>> .
>>>
>>
>>
>> --
>> Marcelino de la Cruz Rot
>> Depto. de Biología y Geología
>> Física y Química Inorgánica
>> Universidad Rey Juan Carlos
>> Móstoles España
>>
>> _______________________________________________
>> R-sig-Geo mailing list
>> [hidden email]
>> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>>
>
>
>
> --
> *Mirza Čengić*
>
> *Junior Researcher | Department of Environmental Science*
> Radboud University | Heyendaalseweg 135
> 6525 AJ Nijmegen | The Netherlands
>
> +31 657020823 <+31%206%2057020823> | +38761908392 <+387%2061%20908%20392>
> Skype: mirzacengic
> <https://www.linkedin.com/in/mirzacengic>
>



--
*Mirza Čengić*

*Junior Researcher | Department of Environmental Science*
Radboud University | Heyendaalseweg 135
6525 AJ Nijmegen | The Netherlands

+31 657020823 | +38761908392
Skype: mirzacengic
<https://www.linkedin.com/in/mirzacengic>

        [[alternative HTML version deleted]]

_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Reply | Threaded
Open this post in threaded view
|

Re: WorldClim Version2

Andy Bunn-3
Clever! Thanks.

From: Mirza Cengic <[hidden email]<mailto:[hidden email]>>
Date: Wednesday, October 4, 2017 at 10:32 AM
To: Marcelino de la Cruz Rot <[hidden email]<mailto:[hidden email]>>
Cc: Melanie Bacou <[hidden email]<mailto:[hidden email]>>, Andy Bunn <[hidden email]<mailto:[hidden email]>>, R-sig-Geo <[hidden email]<mailto:[hidden email]>>
Subject: Re: [R-sig-Geo] WorldClim Version2

Hi Andy,

for quick and dirty solution you can replace the url that the getData()
function reads for bioclim data. You can find the source code of the
function here https://github.com/cran/raster/blob/master/R/getData.R#L277 (note
that there's if/else flow for different resolutions of climate data). From
there you can make a custom function, or recompile the package if you
prefer it that way.

URL for the bioclimatic layers is
http://biogeo.ucdavis.edu/data/worldclim/v2.0/tif/base/wc2.0_RES_bio.zip,
where "RES" can be 10m, 5m, 2.5m, or 30s, and you'll need to play around a
bit with how the theurl string is being created in relation with the
resolution.

M

On Wed, Oct 4, 2017 at 2:00 PM, Mirza Cengic <[hidden email]<mailto:[hidden email]>> wrote:
Hi Andy,

for quick and dirty solution you can replace the url that the getData() function reads for bioclim data. You can find the source code of the function here <https://github.com/cran/raster/blob/master/R/getData.R#L277> (note that there's if/else flow for different resolutions of climate data). From there you can make a custom function, or recompile the package if you prefer it that way.

URL for the bioclimatic layers is http://biogeo.ucdavis.edu/data/worldclim/v2.0/tif/base/wc2.0_RES_bio.zip, where "RES" can be 10m, 5m, 2.5m, or 30s, and you'll need to play around a bit with how the theurl string is being created in relation with the resolution.

M

On Thu, Sep 28, 2017 at 9:44 AM, Marcelino de la Cruz Rot <[hidden email]<mailto:[hidden email]>> wrote:
I'm afraid it don't.

At least in version 2.5.8, as it  appears from  this line in .wordclim():

 theurl <- paste("http://biogeo.ucdavis.edu/data/climate/worldclim/1_4/grid/cur/",
            zip, sep = "")

Marcelino



El 28/09/2017 a las 4:31, Bacou, Melanie escribió:

I would assume `raster::getData("worldclim", ...)` uses WorldClim version 2?

--Mel.


On 09/25/2017 05:14 PM, Andy Bunn wrote:
Great. Thanks Marcelino. I have all the data dowloaded. I'm surprised that
there isn't a dedicated package for worldclim yet ‹ making one that ties
in with packages like BIEN would be great. Perhaps I'll work on it someday.

-A

On 9/25/17, 11:32 AM, "Marcelino de la Cruz Rot"
<[hidden email]<mailto:[hidden email]>>  wrote:

Hello Andy,

I've been using raster to play with WordlClim 2.0 and it works fine. For
example:

# Download 2.5' arc P data of worldclim 2.0
# The file is 68.5 MB so it takes some time to download
P_url<-
"http://biogeo.ucdavis.edu/data/worldclim/v2.0/tif/base/wc2.0_2.5m_prec.zi p"
download.file(P_url, destfile="wc2.0_2.5m_prec.zip")
unzip("wc2.0_2.5m_prec.zip")

#  Generate a stack object  with all monthly precipitation layers
P_filenames<- paste("wc2.0_2.5m_prec_", c(paste(0,1:9, sep=""), 11,12),
".tif",sep="")

prec2.5<- stack(P_filenames)

# Compute annual precipitation as a raster layer
P2.5<- sum(prec2.5)

# etc.

Cheers,

Marcelino


El 25/09/2017 a las 19:42, Andy Bunn escribió:
Hello all, is anybody aware of a R package that gracefully works with
version 2 of the WorldClim data?

http://worldclim.org/version2


I have all the data extracted locally but I'm wondering if there is
something akin to getData in raster that will work with version 2 and
not
1.4 as (the brilliant) raster package currently does.

Many thanks, Andy

_______________________________________________
R-sig-Geo mailing list
[hidden email]<mailto:[hidden email]>
https://stat.ethz.ch/mailman/listinfo/r-sig-geo
.

--
Marcelino de la Cruz Rot
Depto. de Biología y Geología
Física y Química Inorgánica
Universidad Rey Juan Carlos
Móstoles España

_______________________________________________
R-sig-Geo mailing list
[hidden email]<mailto:[hidden email]>
https://stat.ethz.ch/mailman/listinfo/r-sig-geo

.


--
Marcelino de la Cruz Rot
Depto. de Biología y Geología
Física y Química Inorgánica
Universidad Rey Juan Carlos
Móstoles España

_______________________________________________
R-sig-Geo mailing list
[hidden email]<mailto:[hidden email]>
https://stat.ethz.ch/mailman/listinfo/r-sig-geo



--
Mirza Čengić

Junior Researcher | Department of Environmental Science
Radboud University | Heyendaalseweg 135
6525 AJ Nijmegen | The Netherlands

+31 657020823<tel:+31%206%2057020823> | +38761908392<tel:+387%2061%20908%20392>
Skype: mirzacengic
[http://tecd.client.shareholder.com/common/images/share/linkedin_icon.gif]<https://www.linkedin.com/in/mirzacengic>



--
Mirza Čengić

Junior Researcher | Department of Environmental Science
Radboud University | Heyendaalseweg 135
6525 AJ Nijmegen | The Netherlands

+31 657020823 | +38761908392
Skype: mirzacengic
[http://tecd.client.shareholder.com/common/images/share/linkedin_icon.gif]<https://www.linkedin.com/in/mirzacengic>

        [[alternative HTML version deleted]]

_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Reply | Threaded
Open this post in threaded view
|

Re: WorldClim Version2

Alex Mandel-2
In reply to this post by Marcelino de la Cruz Rot
It uses WorldClim 1.4

The paper for WorldClim 2 was recently published and we are still
working on adding more additional variables and refinements. I expect
the getData function to be updated in the near future.

Thanks,
Alex

On 09/28/2017 12:44 AM, Marcelino de la Cruz Rot wrote:

> I'm afraid it don't.
>
> At least in version 2.5.8, as it  appears from  this line in .wordclim():
>
>  theurl <-
> paste("http://biogeo.ucdavis.edu/data/climate/worldclim/1_4/grid/cur/",
>             zip, sep = "")
>
> Marcelino
>
>
> El 28/09/2017 a las 4:31, Bacou, Melanie escribió:
>>
>> I would assume `raster::getData("worldclim", ...)` uses WorldClim
>> version 2?
>>
>> --Mel.
>>
>>
>> On 09/25/2017 05:14 PM, Andy Bunn wrote:
>>> Great. Thanks Marcelino. I have all the data dowloaded. I'm surprised
>>> that
>>> there isn't a dedicated package for worldclim yet ‹ making one that ties
>>> in with packages like BIEN would be great. Perhaps I'll work on it
>>> someday.
>>>
>>> -A
>>>
>>> On 9/25/17, 11:32 AM, "Marcelino de la Cruz Rot"
>>> <[hidden email]>  wrote:
>>>
>>>> Hello Andy,
>>>>
>>>> I've been using raster to play with WordlClim 2.0 and it works fine.
>>>> For
>>>> example:
>>>>
>>>> # Download 2.5' arc P data of worldclim 2.0
>>>> # The file is 68.5 MB so it takes some time to download
>>>> P_url<-
>>>> "http://biogeo.ucdavis.edu/data/worldclim/v2.0/tif/base/wc2.0_2.5m_prec.zi
>>>> p"
>>>> download.file(P_url, destfile="wc2.0_2.5m_prec.zip")
>>>> unzip("wc2.0_2.5m_prec.zip")
>>>>
>>>> #  Generate a stack object  with all monthly precipitation layers
>>>> P_filenames<- paste("wc2.0_2.5m_prec_", c(paste(0,1:9, sep=""), 11,12),
>>>> ".tif",sep="")
>>>>
>>>> prec2.5<- stack(P_filenames)
>>>>
>>>> # Compute annual precipitation as a raster layer
>>>> P2.5<- sum(prec2.5)
>>>>
>>>> # etc.
>>>>
>>>> Cheers,
>>>>
>>>> Marcelino
>>>>
>>>>
>>>> El 25/09/2017 a las 19:42, Andy Bunn escribió:
>>>>> Hello all, is anybody aware of a R package that gracefully works with
>>>>> version 2 of the WorldClim data?
>>>>>
>>>>> http://worldclim.org/version2
>>>>>
>>>>>
>>>>> I have all the data extracted locally but I'm wondering if there is
>>>>> something akin to getData in raster that will work with version 2 and
>>>>> not
>>>>> 1.4 as (the brilliant) raster package currently does.
>>>>>
>>>>> Many thanks, Andy
>>>>>
>>>>> _______________________________________________
>>>>> R-sig-Geo mailing list
>>>>> [hidden email]
>>>>> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>>>>> .
>>>>>
>>>> -- 
>>>> Marcelino de la Cruz Rot
>>>> Depto. de Biología y Geología
>>>> Física y Química Inorgánica
>>>> Universidad Rey Juan Carlos
>>>> Móstoles España
>>>>
>>> _______________________________________________
>>> R-sig-Geo mailing list
>>> [hidden email]
>>> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>>
>> .
>
>

_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Reply | Threaded
Open this post in threaded view
|

Re: WorldClim Version2

Andy Bunn-3
Wonderful. Thanks.

On 10/11/17, 10:31 AM, "Alex Mandel" <[hidden email]> wrote:

    It uses WorldClim 1.4
   
    The paper for WorldClim 2 was recently published and we are still
    working on adding more additional variables and refinements. I expect
    the getData function to be updated in the near future.
   
    Thanks,
    Alex
   
    On 09/28/2017 12:44 AM, Marcelino de la Cruz Rot wrote:
    > I'm afraid it don't.
    >
    > At least in version 2.5.8, as it  appears from  this line in .wordclim():
    >
    >  theurl <-
    > paste("http://biogeo.ucdavis.edu/data/climate/worldclim/1_4/grid/cur/",
    >             zip, sep = "")
    >
    > Marcelino
    >
    >
    > El 28/09/2017 a las 4:31, Bacou, Melanie escribió:
    >>
    >> I would assume `raster::getData("worldclim", ...)` uses WorldClim
    >> version 2?
    >>
    >> --Mel.
    >>
    >>
    >> On 09/25/2017 05:14 PM, Andy Bunn wrote:
    >>> Great. Thanks Marcelino. I have all the data dowloaded. I'm surprised
    >>> that
    >>> there isn't a dedicated package for worldclim yet ‹ making one that ties
    >>> in with packages like BIEN would be great. Perhaps I'll work on it
    >>> someday.
    >>>
    >>> -A
    >>>
    >>> On 9/25/17, 11:32 AM, "Marcelino de la Cruz Rot"
    >>> <[hidden email]>  wrote:
    >>>
    >>>> Hello Andy,
    >>>>
    >>>> I've been using raster to play with WordlClim 2.0 and it works fine.
    >>>> For
    >>>> example:
    >>>>
    >>>> # Download 2.5' arc P data of worldclim 2.0
    >>>> # The file is 68.5 MB so it takes some time to download
    >>>> P_url<-
    >>>> "http://biogeo.ucdavis.edu/data/worldclim/v2.0/tif/base/wc2.0_2.5m_prec.zi
    >>>> p"
    >>>> download.file(P_url, destfile="wc2.0_2.5m_prec.zip")
    >>>> unzip("wc2.0_2.5m_prec.zip")
    >>>>
    >>>> #  Generate a stack object  with all monthly precipitation layers
    >>>> P_filenames<- paste("wc2.0_2.5m_prec_", c(paste(0,1:9, sep=""), 11,12),
    >>>> ".tif",sep="")
    >>>>
    >>>> prec2.5<- stack(P_filenames)
    >>>>
    >>>> # Compute annual precipitation as a raster layer
    >>>> P2.5<- sum(prec2.5)
    >>>>
    >>>> # etc.
    >>>>
    >>>> Cheers,
    >>>>
    >>>> Marcelino
    >>>>
    >>>>
    >>>> El 25/09/2017 a las 19:42, Andy Bunn escribió:
    >>>>> Hello all, is anybody aware of a R package that gracefully works with
    >>>>> version 2 of the WorldClim data?
    >>>>>
    >>>>> http://worldclim.org/version2
    >>>>>
    >>>>>
    >>>>> I have all the data extracted locally but I'm wondering if there is
    >>>>> something akin to getData in raster that will work with version 2 and
    >>>>> not
    >>>>> 1.4 as (the brilliant) raster package currently does.
    >>>>>
    >>>>> Many thanks, Andy
    >>>>>
    >>>>> _______________________________________________
    >>>>> R-sig-Geo mailing list
    >>>>> [hidden email]
    >>>>> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
    >>>>> .
    >>>>>
    >>>> --
    >>>> Marcelino de la Cruz Rot
    >>>> Depto. de Biología y Geología
    >>>> Física y Química Inorgánica
    >>>> Universidad Rey Juan Carlos
    >>>> Móstoles España
    >>>>
    >>> _______________________________________________
    >>> R-sig-Geo mailing list
    >>> [hidden email]
    >>> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
    >>
    >> .
    >
    >
   
   

_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo