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

Error in "01_download_black_marble_annual" Script #38

Open
GIS243 opened this issue Apr 13, 2024 · 0 comments
Open

Error in "01_download_black_marble_annual" Script #38

GIS243 opened this issue Apr 13, 2024 · 0 comments

Comments

@GIS243
Copy link

GIS243 commented Apr 13, 2024

Hi

I encountered an error while processing the "01_download_black_marble_annual" file. The script halted with the message:

Error in bm_mk_raster(loc_sf = survey_buff_sf, product_id = "VNP46A3", :
could not find function "bm_mk_raster"

> months <- seq(from = ymd("2012-01-01"), to = ymd("2021-12-01"), by=1) %>%
+   substring(1, 7) %>%
+   unique()
> 
> for(year_month_i in months){
+   
+   OUT_FILE <- file.path(ntl_bm_dir, "FinalData", "monthly_rasters", 
+                         paste0("bm_vnp46A3_",
+                                year_month_i %>% str_replace_all("-", "_"),
+                                ".tif"))
+   
+   if(!file.exists(OUT_FILE)){
+     print(year_month_i)
+     
+     r <- bm_mk_raster(loc_sf = survey_buff_sf,
+                       product_id = "VNP46A3",
+                       time = year_month_i,
+                       bearer = BEARER,
+                       mask = F)
+     
+     writeRaster(r, OUT_FILE)
+   }
+ }

[1] "2012-01"

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

1 participant