modiscloud: R tools for processing Level 2 Cloud Mask products from MODIS

Package 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). The package will be most effective if the user installs MRTSwath (MODIS Reprojection Tool for swath products;, and adds the directory with the MRTSwath executable to the default R PATH by editing ~/.Rprofile.

Install the latest version of this package by entering the following in R:
AuthorNicholas J. Matzke, Dept. of Integrative Biology, U.C. Berkeley
Date of publication2013-02-09 07:43:26
MaintainerNicholas J. Matzke <>
LicenseGPL (>= 2)

View on CRAN

Man pages

adf: Convert to data.frame, without factors

adf2: Convert to data.frame, without factors

byteint2bit: Convert a byte integer (0-255) to a list of 8 bits

byteint2bit_list: Convert a list of byte integer (0-255) to a table of 8 bits...

check_for_matching_geolocation_files: Checks that every MODIS cloud project HDF has a matching...

dates_from_fileslist: Convert each MODIS filename to year, month, day, hourmin

extract_bit: Get the value of a particular bit in a byte

extract_fn_from_path: Get the filename from a path

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

fermat.test: Test an integer for primality with Fermat's little theorem

foo: Test function

foo2: Test function

get_bitgrid: Extract the value of a particular bit at each pixel

get_bitgrid_2bits: extract the value of 2 particular bits at each pixel

get_date_from_POSIXct: Get the time information from a POSIXct time

get_dates_from_POSIXct: Get the time information from POSIXct times

is.pseudoprime: Check an integer for pseudo-primality to an arbitrary...

is.pseudoprime2: Check an integer for pseudo-primality to an arbitrary...

make_cloudcount_product: Take a cloudcount raster and a number-of-observations raster...

make_POSIXct_date: Take year, month, day, hourmin, convert to POSIXct

make_weeks_list: Make a list of numbered weeks

modfns_to_ftp_download_cmd: Make download commands for MODIS files

modiscloud-package: Process MODIS cloud mask product files to TIF

numslist_to_grd: Convert a list of numbers to a grid

run_swath2grid: Run MRTSwath swath2grid tool

slashslash: Remove double slash (slash a slash)

sum_bitgrid: Take a series of byte tifs, extract the values of a bit, and...

unlist_df: Unlist the columns in a data.frame

unlist_df2: Unlist the columns in a data.frame, with more checks

write_MRTSwath_param_file: Write a parameter control file for MRTSwath

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

yearmonthday_to_julianday: Get the julian day for a year/month/day date


adf Man page
adf2 Man page
byteint2bit Man page
byteint2bit_list Man page
check_for_matching_geolocation_files Man page
dates_from_fileslist Man page
extract_bit Man page
extract_fn_from_path Man page
extract_time_from_MODISfn Man page
fermat.test Man page
foo Man page
foo2 Man page
get_bitgrid Man page
get_bitgrid_2bits Man page
get_date_from_POSIXct Man page
get_dates_from_POSIXct Man page
is.pseudoprime Man page
is.pseudoprime2 Man page
make_cloudcount_product Man page
make_POSIXct_date Man page
make_weeks_list Man page
modfns_to_ftp_download_cmd Man page
modiscloud Man page
modiscloud-package Man page
numslist_to_grd Man page
run_swath2grid Man page
slashslash Man page
sum_bitgrid Man page
unlist_df Man page
unlist_df2 Man page
write_MRTSwath_param_file Man page
yearday_to_date Man page
yearmonthday_to_julianday Man page

Questions? Problems? Suggestions? or email at

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.