-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
I am encountering 404 errors when downloading VNP46A3 (monthly) data because bm_extract generates incorrect URLs for the .csv files. It appears the "Day of Year" (DOY) calculation is off by one day: it seems to treat leap years as non-leap years, and non-leap years as leap years.
Package Version
0.2.5
Examples
-
Leap Year (2024)
- Date: 2024-09-01
- Actual DOY: 245
- Generated URL: .../2024/244.csv (DOY 244)
- Result: 404 Error (File not found).
- Observation: It behaves as if February had 28 days.
-
Non-Leap Year (2025)
- Date: 2025-04-01
- Actual DOY: 91
- Generated URL: .../2025/092.csv (DOY 92)
- Result: 404 Error.
- Observation: It behaves as if February had 29 days.
Minimal Reproducible Example
library(blackmarbler)
library(sf)
# Dummy ROI
roi <- st_as_sf(data.frame(id=1, lat=0, lon=0), coords = c("lon", "lat"), crs=4326)
# Case 1: Leap Year (2024) - calculated DOY is one too low (244 vs 245)
try(bm_extract(roi_sf=roi, product_id="VNP46A3", date="2024-09-01", bearer="MY_TOKEN"))
# Case 2: Non-Leap Year (2025) - calculated DOY is one too high (092 vs 091)
try(bm_extract(roi_sf=roi, product_id="VNP46A3", date="2025-04-01", bearer="MY_TOKEN"))Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels