"modiscloud" is a R package by Nicholas J. Matzke for processing downloaded MODIS cloud product HDF files and derived files. Specifically, MOD35_L2 cloud product files, and the associated MOD03 geolocation files (for MODIS-TERRA); and MYD35_L2 cloud product files, and the associated MYD03 geolocation files (for MODIS-AQUA).

Functions include extraction of MODIS bit codes from the bytes; calculating sum cloudy days and percentage cloudy days; and translation of the dates on the MODIS filenames. Each of these tasks required a fair bit of sleuthing in the MODIS documentation, and is far from obvious to the naive reseacher who wishes to use MODIS cloud products.

This code was developed for processing MODIS cloud products for this paper on cloud forests in Costa Rica:

Goldsmith, Gregory; Matzke, Nicholas J.; Dawson, Todd (2012). "The incidence and implications of clouds for cloud forest plant water relations." Ecology Letters, accepted. DOI:


The data for the examples in modiscloud is stored in the modiscdata package (CRAN prefers that large datasets be stored in data-only packages).


The package has been accepted by CRAN. It can be downloaded at: Downloads of the package and PDF/example files are also available at this page. See "Files", below.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License