Error when uploading environmental rasters

660 views
Skip to first unread message

Martín Enrique Timaná De La Flor

unread,
Feb 14, 2023, 12:03:39 PM2/14/23
to Wallace Ecological Modeling App
Hello all: I've trying to upload my environmental layers but I keep getting this error warning: "Input rasters have unmatching NAs pixel values" ...any suggestion/solution? Thanks!

Simon H

unread,
Feb 23, 2023, 4:49:38 AM2/23/23
to Wallace Ecological Modeling App
I've experienced similar errors, which I have yet to fully resolve. In my case I suspect it has to do with scale and offset settings in some raster files. I would guess that the NAflag is improperly read by Wallace, depending on which driver was used to write the raster during my env data pre processing. In my case it could also be the other way around, that the NA settings are improperly implemented in the writeraster function.

Wallace Ecological Modeling App

unread,
Feb 23, 2023, 3:09:52 PM2/23/23
to Wallace Ecological Modeling App
Hello to both,

This warning is just an indication that your environmental rasters have unidentical/unmatching pixels with NA values. You should be able to carry on with your analyses, however, this warning will prevent you from running the three modules within the 'Env Space' (Characterize Environmental Space) component. Wallace removes pixels with NA values where an occurrence record falls, so if multiple species are uploaded and the NA values don't match, it would crash. So to eliminate problems, we added the warning. If you'd like to run the Characterize Environmental space, I can give you code to process your rasters so the NA values match, although I wouldn't advise modeling with these rasters, as it is removing information in place of NA values.

I hope that settled your confusion and let me know if you are having any problems.

Bethany Johnson

M Duchoslav

unread,
Mar 8, 2023, 4:49:28 AM3/8/23
to Wallace Ecological Modeling App
Hallo,
thanks for this discussion, I have the same problem when using Chelsa climatic variables downloaded from their server. Bio variables work fine but when using some others, I encounter the same problem as mentioned above. I am also interested in code to process my rasters so the NA values match.
Thanks!
Martin

Dne čtvrtek 23. února 2023 v 21:09:52 UTC+1 uživatel Wallace Ecological Modeling App napsal:

Juan Roggero Luque

unread,
Apr 24, 2023, 10:13:34 AM4/24/23
to Wallace Ecological Modeling App
Hi everyone!

I'm having the same problem when uploading environmental variables. I´m working with occurrence points of a plant species. None of the sampled points fall in areas with NA values, but when I try to upload environmental variables (some CHELSA bios at 30 arc-sec resolution, and some Soil grids variables at the same resolution) the message " ! ERROR : Input rasters have unmatching NAs pixel values" appears (and I can't continue running the analysis). It might be advisable to use the "raster conversion" function in QGIS and create a new raster from an original one (for example, BIO13), and assign a value of -999999999... in the option "Assigned an specified nodata value to output bands [optional]"?

Any suggestions?

Thanks!

Wallace Ecological Modeling App

unread,
Apr 24, 2023, 1:58:42 PM4/24/23
to Wallace Ecological Modeling App
You should be able to carry on with your analyses despite getting this error message- this warning will only prevent you from running anything within the Env Space component. If you need to run the environmental ordination, density grid, and/or niche overlap within Env Space, I suggest using the mask() function within the terra package to mask NA values for all your rasters, and then upload the new rasters into Wallace. This way each raster has an NA in the same pixel. However, since you are removing data, I would NOT recommend modeling with these rasters.

Juan Roggero Luque

unread,
Apr 24, 2023, 6:31:00 PM4/24/23
to Wallace Ecological Modeling App
Unfortunately, in my case, I can't carry on with the analysis when the Error message appears within the Env Data component. If I try to load the background region within the Process Environm Data component, the following message appears: 
"  ! ERROR : x-species | Environmental variables missing. Obtain them in component 3". 

In my case, the presence of rasters with unmatching NA values prevents the load of those rasters in the Env Data component (I'm not using the Env Space component).

Thanks for the quick reply!

Message has been deleted

Wallace Ecological Modeling App

unread,
May 18, 2023, 2:35:59 PM5/18/23
to Wallace Ecological Modeling App

Sorry for the delayed response. We are looking into fixing this now.

Diego Bermudez

unread,
Jun 8, 2023, 1:57:19 PM6/8/23
to Wallace Ecological Modeling App
I have the same issue. I'm trying to upload my environmental layers but I couldn't run anything cause they don't load because of that error. 

Juan Roggero Luque

unread,
Jun 8, 2023, 2:14:37 PM6/8/23
to Wallace Ecological Modeling App
I everyone!
I dealt with this issue by using the Raster -> Conversion ->"Translate (convert format)" function of QGIS.  After loading into QGIS the raster that I could not load into Wallace's Env Data component, I assigned the value -999 in the "Assign a specified nodata value to output bands" box. Then, in the "Output data type" box, I chose the Float64 option. 

Marek Banton

unread,
Nov 22, 2023, 6:46:28 PM11/22/23
to Wallace Ecological Modeling App
i got the same warning, can you explain theese steps on Terra package to mask the na values, please? 

What  juanrogg...@gmail.com says " using the Raster -> Conversion ->"Translate (convert format)" function of QGIS" it works, i could load the rasters, but i don't know if is the same or is better to do with terra().

thanks in advance

Wallace Ecological Modeling App

unread,
Nov 29, 2023, 2:13:57 PM11/29/23
to Wallace Ecological Modeling App

You can use GIS or R; either will work. You may want to use the terra::mask() function with the is.na() function to find and replace NA values within your rasters.

Francisca Z.

unread,
Mar 28, 2024, 4:52:26 PM3/28/24
to Wallace Ecological Modeling App
Hi, i've used to have any problems with my rasters, but since wallace was updated became to show the same error of :  ! ERROR : Input rasters have unmatching NAs pixel values. My layers are the same that i used in the past and there was one time that i re installed all the packages in their last version and work again... But that was the past, now it shows the same error. Is this going to happen every time a packages gots an upgrate? There is any way to make it easer instead re installing all again?
Reply all
Reply to author
Forward
0 new messages