Learn R Programming

modiscloud (version 0.14)

extract_time_from_MODISfn: Extract the year, day, and hour from a MODIS filename

Description

The filenames of MODIS images contain the following date information: MOD35_L2.Ayyyyddd.hhhh.etc.

Usage

extract_time_from_MODISfn(fn)

Arguments

fn
The MODIS filename of interest

Value

newdate A list with three items: $month, $day, $year

Details

MODLAND Level 2 products ESDT.AYYYYDDD.HHMM.CCC.YYYYDDDHHMMSS.hdf

ESDT = Earth Science Data Type name (e.g., MOD14) YYYYDDD = MODIS acquisition year and Julian day HHMM = MODIS acquisition UTC time CCC = Collection number YYYYDDDHHMMSS = Processing Year, Julian day and UTC Time hdf = Suffix denoting HDF file

DDD is the day of the year, from 001 to 365 (or 366 for leap years)

References

NASA (2001). "MODLAND Product Filename Convention." .

See Also

dates_from_fileslist

http://landweb.nascom.nasa.gov/cgi-bin/QA_WWW/newPage.cgi?fileName=hdf_filename

Examples

Run this code
yearday_to_date(year=2012, day=364)
# $month
# [1] 12
#
# $day
# [1] 29
#
# $year
# [1] 2008

fn = "MOD03.A2008001.0400.005.2010216170200.hdf"
extract_time_from_MODISfn(fn)

Run the code above in your browser using DataLab