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

missing is not materialized when elementwise dividing two rasters? #797

Open
asinghvi17 opened this issue Oct 11, 2024 · 3 comments
Open

Comments

@asinghvi17
Copy link
Collaborator

MWE:

using Rasters, RasterDataSources, ArchGDAL
precip = Raster(WorldClim{Climate}, :prec; month = 6)
areas = cellarea(precip)
precip ./ areas

download-32

but the precip dataset has a bunch of missings. I'm not really sure how this happened.

@asinghvi17 asinghvi17 changed the title missing is not materialized when elementwise multiplying two rasters? missing is not materialized when elementwise dividing two rasters? Oct 11, 2024
@asinghvi17
Copy link
Collaborator Author

The workaround I used was to mask both the rasters by the same geometry. But that's not generally applicable.

@rafaqz
Copy link
Owner

rafaqz commented Oct 11, 2024

You need to replace_missing first until the cf PR is merged

@asinghvi17
Copy link
Collaborator Author

Ah perfect, if that fixes it then I'll just leave the code in for now.

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