在攻坚的路上,v20221119
library(rgee) library(sf) library(dplyr) library(Ipaper) # library(missInfo) devtools::load_all() # ee_Initialize() ee_init() get_date_imgcol <- function(id) { col = ee$ImageCollection(id)$ filterDate("2000-01-01", "2022-12-31") dates <- ee_systemtime(col) dates <- substr(dates, 1, 10) %>% as.Date() dates } get_dateInfo <- function(dates) data.table(date = dates) %>% .[, .N, .(year(date))] id = "projects/gee-hydro/INPUT/MCD43A3_V060_Albedo_8day_raw" id = "projects/gee-hydro/INPUT/MOD11A2_V061_Emiss_8day_gapfilled_v1" id = "MODIS/061/MOD11A2" id = "projects/gee-hydro/INPUT/EAR5L_8day" id = "projects/gee-hydro/INPUT/GLDASv21_8day" id = "projects/gee-hydro/INPUT/CFSV2_8day" id = "MODIS/061/MOD15A2H" dates = get_date_imgcol(id) print(length(dates)) info = get_dateInfo(dates) print(info, n=40) # 有4景缺失 # "2001-06-18" "2001-06-26" "2016-02-18" "2022-10-16"
id = "MODIS/061/MOD15A2H" id = "NASA/GLDAS/V022/CLSM/G025/DA1D" # 滞后4月 id = "NASA/GLDAS/V021/NOAH/G025/T3H" # 实时更新,滞后2周 id = "ECMWF/ERA5_LAND/HOURLY" # 滞后4月 col = ee$ImageCollection(id)$ filterDate("2022-01-01", "2022-12-31") dates = ee_systemtime(col) %>% substr(1, 10) %>% as.Date() dates
查看之前的缺测情况
dates_full = get_date_dn(dn = 8) info = match2(dates, dates_full) dates_miss = dates_full[-info$I_y] data.table(date = dates_miss) %>% .[, .N, year(date)]
c("2001-06-18", "2001-06-26", "2002-01-09", "2002-02-26", "2002-03-06", "2002-03-14", "2002-03-22", "2016-02-18") # 2001, 2002, 2016存在缺失
years = 2000:2021 fs = dir2("Z:/MODIS/Terra_LAI_v061", "*.tif", recursive = TRUE) years = basename(fs) %>% str_extract("\\d{4}") table(years)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.