Description Usage Arguments Value Author(s) References See Also Examples
This function is useful if you have a series of cloud product byte tifs, and need to extract a bit from each, and then add up (e.g. to get the total number of cloudy observations).
1 2 | sum_bitgrid(fns, numits = length(fns), bitnums, ydim_new,
xdim_new, test_for_1 = 1)
|
fns |
A list of filenames which can be auto-read by readGDAL (e.g. geoTIFFs) |
numits |
Number of iterations to run for (default = length(fns)) |
bitnums |
The bit(s) you would like to extract. If length(bitnums) = 1, do default behavior. If the length is 2, then run the alternative function. |
ydim_new |
The dimensions of the extracted image. This is REQUIRED, since each day of a MODIS image may have different pixel dimensions over the same location. readGDAL will sample each image (nearest neighbor pixel) to the correct dimensions. |
xdim_new |
The dimensions of the extracted image. This is REQUIRED, since each day of a MODIS image may have different pixel dimensions over the same location. readGDAL will sample each image (nearest neighbor pixel) to the correct dimensions. |
test_for_1 |
What your extracted bit(s) should match. If 1 (default), just count up 1s. If a string, e.g. "!=11", use that in an if-then statement to get the 1s to count |
grdr_vals_bits
, a matrix of 0/1 values for the bit
in question
Nicholas J. Matzke matzke@berkeley.edu
Ackerman S, Frey R, Strabala K, Liu Y, Gumley L, Baum B and Menzel P (2010). "Discriminating clear-sky from cloud with MODIS algorithm theoretical basis document (MOD35)." MODIS Cloud Mask Team, Cooperative Institute for Meteorological Satellite Studies, University of Wisconsin - Madison. <URL: http://modis-atmos.gsfc.nasa.gov/_docs/MOD35_ATBD_Collection6.pdf>.
GoldsmithMatzkeDawson2013
1 | # See numslist_to_grd example for an idea of how this works.
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.