I tried to make a script that allow you download your data. Sadly seems NASA dont have a each file already generated but create them 'on-fly'. This can be assumed given the 'RenderData?' into url. Thats why we can't create a jpg or tif file before 'save as' command.
I made the follow:
## Set your dates
myDates <- c('2000-11-11', '2002-11-11', '2004-11-11')
for(d in myDates){
webDwnld <- readLines(paste0('https://neo.sci.gsfc.nasa.gov/view.php?datasetId=CERES_INSOL_M&date=', d))
imgLines <- grep('<td><strong><a href="https\\:\\/\\/neo\\.sci\\.gsfc\\.nasa\\.gov\\/servlet\\/RenderData\\?si\\=', webDwnld, value = TRUE)[3]
url0 <- strsplit(strsplit(imgLines, 'href=')[[1]][2], 'class=')[[1]][1]
url1 <- gsub(' |"', '', url0)
#url2 <- gsub('format=JPEG', 'format=TIFF', url1)
#download.file(url2, destfile = paste0('C:/OneDrive/stackOverFlow/q5NASA/tif_.TIFF'))
download.file(url1, destfile = paste0('C:/OneDrive/stackOverFlow/jpg_.jpg'))
print(url1)
}
This will try to download a corrupt jpg (tif dont even save a image). Instead of that yo can get your url an make a manual process of saving your image.
If you want change parameters use the follow into the ´paste´:
- CERES_INSOL_D : day
- CERES_INSOL_E : week
CERES_INSOL_M : month
format=JPEG: jpeg (non-georreferenced)
format=TIFF: tiff (georreferenced)
width=360&height=180 ncol, nrow
- width=720&height=360 ncol, nrow
- width=1440&height=720 ncol, nrow