yearday_to_date: Convert a year + a day number to a date

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

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

Usage

1
  yearday_to_date(year = 2012, day = 1)

Arguments

year

The year, read as numeric

day

The day of the year, read as numeric, from 1 to 366

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)

This is mildly annoying to interpret as e.g. months for graphing cloudy days per month, so yearday_to_date converts a (numeric) year and day to the calendar date.

Value

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

Author(s)

Nicholas J. Matzke matzke@berkeley.edu

References

NASA (2001). "MODLAND Product Filename Convention." <URL: http://landweb.nascom.nasa.gov/cgi-bin/QA_WWW/newPage.cgi?fileName=hdf_filename>.

See Also

make_POSIXct_date

yearday_to_date

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

Examples

1
2
3
4
5
6
7
8
9
yearday_to_date(year=2012, day=364)
# $month
# [1] 12
#
# $day
# [1] 29
#
# $year
# [1] 2008

modiscloud documentation built on May 2, 2019, 5:19 p.m.