Description Usage Arguments Value Author(s) Examples
calculate UTC from Local Solar Time, as provided e.g. in MODIS viewtime rasters
1 |
LocST |
Local solar time vector in mm:hh format or as a viewtime raster in decimal format or decimal format only |
utc |
UTC day that was provided e.g. via filename or the corresponding UTC day (converted to UTC time from the local time zone the local solar time was reported for), format = '%Y-%m-%d' or as POSIXlt date |
lon |
required only if no raster is used for LocST, to provide as decimal point numeric |
data frame with lon and lat, as well as decimal format local solar time ("LocST"), hour format local solar time "LocST_h",UTC date calculated from LocST "utc_from_LocST", the original UTC input provided ("orgUTC") and a time difference between provided and calculated UTC times in case a POSIXlt format UTC date was provided (available e.g. in case of MODIS L2 / swath data)
Maite Lezama Valdes
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | library(raster)
#using MODIS L2 product's viewtime raster
vtr_s <-raster(system.file("extdata", "vtr_s.tif", package="LocST"))
utcdate <- strptime("2018-01-19 13:50", format='%Y-%m-%d %H:%M', tz="UTC") # info derived from MOD11_L2 filename A2018019.1350
LocST_UTC(LocST=vtr_s, utc=utcdate)
#using MODIS viewtime raster from daily products, where no UTC capture time is available
vtr_s <- load(vt_raster)
LocST_UTC(LocST=vtr_s, utc="2018-01-19")
#using LocST without raster, lon input is required
LocST_UTC(LocST="23:36", lon=137.8628, utc="2018-01-19")
LocST_UTC(LocST=23.6, lon=137.8628, utc="2018-01-19")
#using multiple LocST inputs for the same longitude
LocST_UTC(LocST=c(23.0, 22.1), lon=137.8628, utc="2018-01-19")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.