Error with WorldClim BioClim and Transfer to New Time

321 views
Skip to first unread message

Abigail Minnekine

unread,
Apr 10, 2023, 9:11:47 PM4/10/23
to Wallace Ecological Modeling App

Dear Wallace Team, 

I am using Wallace for my undergraduate research and am trying to create SDMs by using Transfer by New Time. We are experiencing issues regarding the import of the WorldClim BioClim for both the “Obtain Environmental Data” module and the “Transfer Model” module. Are others experiencing this issue?

As it was not working in the app, we have resorted to carrying out the process in R with the RMD file available in the “Reproduce” module. We have since been able to download the specific raster files of all 19 variables (2.5m) from the WorldClim website and imported them with the user-specified option in “Obtain Environmental Data”, but that is causing an issue further into the process. At the “Transfer Model” step, we are getting a warning to use the geodata package rather than getData with an error of “error in evaluating the argument 'x' in selecting a method for function '%in%': error in evaluating the argument 'x' in selecting a method for function 'res': object 'bgMask_Ws' not found”. We instead imported the CMIP6 data as the CMIP5 is no longer available through WorldClim. We used the raster() function to successfully bring in the wc2.5m.2061-2080.tif file into R. In Chunk 11, we get an error when changing the names to match the names from the “Obtain Environmental Data” module: Error in `names<-`(`*tmp*`, value = c("wc2.1_2.5m_bio_1", "wc2.1_2.5m_bio_2",  : incorrect number of layer names. Could this happen because the function is expecting a set of 19 rasters, and CMIP6 is just 1 raster? If so, does anyone have access to the old CMIP5 files? If not, any suggestions on obtaining the 19 rasters out of the 1 CMIP6 raster would be much appreciated.

Rachel Harman

unread,
Apr 11, 2023, 11:41:54 AM4/11/23
to Wallace Ecological Modeling App
Hi! 

I am using Wallace to calculate the probability of distribution for stored product pests. I have also been experiencing similar but slightly different issues.

For the past couple of days, I have had this error when I have tried to download the "WorldClim Bioclims" variables with the "Env Data" tab: 
trying URL 'https://biogeo.ucdavis.edu/data/climate/worldclim/1_4/grid/cur/bio_2-5m_bil.zip' Warning in utils::download.file(url = aurl, destfile = fn, quiet = FALSE, : URL 'https://biogeo.ucdavis.edu/data/climate/worldclim/1_4/grid/cur/bio_2-5m_bil.zip': Timeout of 600 seconds was reached Warning: Error in utils::download.file: cannot open URL 'https://biogeo.ucdavis.edu/data/climate/worldclim/1_4/grid/cur/bio_2-5m_bil.zip'

Is perhaps the link broken, or is the website experiencing a technical issue? Wallace crashes each time I attempt to use this function, and the error is recorded in R. 

I am able to upload my own downloaded bioclim world rasters with User-specified. The problem then is that I can not transfer to a new time. I received this error in the log window:
      "Your model is using non-bioclimatic variables or non-conventional names (i.e., wc2.1_2.5m_bio_2, wc2.1_2.5m_bio_3, wc2.1_2.5m_bio_8, wc2.1_2.5m_bio_10, wc2.1_2.5m_bio_11,         wc2.1_2.5m_bio_13, wc2.1_2.5m_bio_14, wc2.1_2.5m_bio_15, wc2.1_2.5m_bio_18, wc2.1_2.5m_bio_19). You can not transfer to a New Time."

These files are named by the WorldClim website. Is there a conventional name that I can change for each of the world rasters that would allow Wallace to recognize them as BioClims and thus be able to project to other times? If so, this may solve both of our problems.

Usually, the platform works brilliantly, and I am swiftly meeting the objectives of my fellowship. Thank you, Wallace team, for putting this together! I have been touting the platform to my colleagues and will be presenting my work at several regional and national conferences this year. I can not wait to see what future versions of Wallace have in store!

Thank you!
Rachel R. Harman, PhD
Post-Doctoral Fellow
USDA-ARS

Wallace Ecological Modeling App

unread,
Apr 11, 2023, 4:34:05 PM4/11/23
to Wallace Ecological Modeling App

AJM & Rachel,

Unfortunately, it appears the WorldClim site is down (the error message Warning: Error in utils::download.file: cannot open URL 'https://biogeo.ucdavis.edu/data/climate/worldclim/1_4/grid/cur/bio_10m_bil.zip' is letting us know Wallace can't connect). This happens from time to time and we're working on trying to prevent this from crashing Wallace. 

You are both right in that the work around for this is to download data directly from the WorldClim site and use the "User-Specified" module to upload your environmental rasters. The good news is this will allow you to use the newer WorldClim version 2 variables, instead of the version1.4 that the getdata() function is pulling.

However, this also means that Wallace will not allow you to use the "Transfer to New Time" module. You'll instead need to use the "Transfer to User Environments" and upload your future(or past) environmental rasters. The tricky part is they will need to be named the same way as the environmental rasters you used in the Environmental Data component. Wallace will give you a recommendation on how they should be named (Your files must be named as: ...)  but as an example, if you uploaded four rasters named wc2.1_2.5m_bio_2, wc2.1_2.5m_bio_3, wc2.1_2.5m_bio_8, and wc2.1_2.5m_bio_10, you will need to upload, in the same order, four identically named rasters. They will also need to be the same resolution and extent. My recommendation is to keep your files organized because it can be problematic to have identically named present and future (or past) data.
Rachel- making sure your file names are identical should help you with your issue with the "non-conventional naming".

AJM- the error message "object 'bgMask_Ws' not found" means you may have forgotten to set your background extent (Component: Process Environmental Data). Also, I am not sure about CMIP6 being only 1 raster instead of 19, I think it depends which GCM you are using, but the error message about incorrect number of layer names would have to do with that. You can download the future climate data here (https://www.worldclim.org/data/cmip6/cmip6_clim10m.html), rename them accordingly, and upload it within the Transfer to User Environments

I hope this answered both your questions. Let me know if things still aren't working, and hopefully the WorldClim site will be back up shortly.
Also, let us know which conferences you'll be attending! We are a diverse team and several of us will also be attending summer conferences as well, and feel free to use our #WallaceEcoMod hashtag on social media posts to spread your research. 

-Bethany
The Wallace Team

Rachel Harman

unread,
Apr 13, 2023, 4:23:44 PM4/13/23
to Wallace Ecological Modeling App
Bethany,

Thank you for your fast reply! Actually, that does help a lot. So, if I use "Transfer to User Environments", I can change any variable as long as I have a before and after named the same? For instance, I have bioclim 1, 3, and 5 for current and 2070 as well as forest cover data current and 2070. It does not matter what the data is, as long as its name, projection, and scale are the same, it will run the transfer based on the occurrence data and background data points. If this is true, then if a data point does not change (altitude, for instance), then I just upload the same raster for the "Transfer to User Environments" (assuming you need the same number of rasters to build the model and transfer). 

I have watched a few seminars on Wallace, done the vignette, and read the papers the team has published. I do not remember any mention of Wallace being used to transfer with environments (forest cover, soil type, etc) outside of the bioclim selections. If what I am assuming is the case, I would suggest adding this as a mention in a future tutorial or elaborating on it in the help pages that Wallace provides. 

I will be attending the North Central Branch meeting of the Entomological Society of America next week. Also, the national conference for the Entomological Society of America and the Ecological Society of America. I plan to use Wallace quite a bit in my work and would love to chat with anyone who is attending these meetings as well! 

Cheers,

Wallace Ecological Modeling App

unread,
Apr 13, 2023, 4:48:19 PM4/13/23
to Wallace Ecological Modeling App
Basically, the Transfer component is taking the algorithm you built with the present environmental variables, and using it with new data (i.e., the future variables) to estimate a future suitability prediction. This is why the present-future variables need to match (For example, you can't build a model with soil data and then predict the future with forest cover- they have to be the same variable). You can further use the Calculate Environmental Similarity module to compare similarity between present and future environments.

I appreciate your suggestion! Our team is working on expanding our tutorials and outreach (we finally have the vignette available in Spanish thanks to Dr. Andrea Paz!) and we've discussed increasing our YouTube catalog. 

I know a few people attending the Ecology Meeting in Portland- I'll tell them to look out for you!
Reply all
Reply to author
Forward
0 new messages