goesaodc_createScanTibble: Create a tibble from a ncdf4 handle

Description Usage Arguments Value Examples

View source: R/goesaodc_createTibble.R

Description

Creates a tibble from a netCDF file with columns: AOD, DQF, lon and lat.

Usage

1
goesaodc_createScanTibble(nc = NULL, bbox = bbox_CONUS, dqfLevel = 3)

Arguments

nc

ncdf4 handle or a list of handles.

bbox

Bounding box for the region of interest. All points outside of this area will be removed. Defaults to CONUS.

dqfLevel

Allowed data quality level. All readings with a DQF value above this level will have their AOD values set to NA. Must be either 0, 1, 2, or 3, with 0 being the highest quality. Defaults to 3.

Value

tibble with netCDF variables and associated locations.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# Tibble based on full extent of Gridfile
library(MazamaSatelliteUtils)

setSatelliteDataDir("~/Data/Satellite")

scanFile <- goesaodc_downloadScanFiles(
  satID = "G17", 
  datetime = "2019-10-27 10:00",
  timezone = "America/Los_Angeles" 
)

nc <- goesaodc_openScanFile(scanFile)

tbl <- goesaodc_createScanTibble(nc)
head(tbl)

# Tibble based on bbox filtered region

# Kincade fire region
bbox <- c(-124, -120, 36, 39)

filtered_tbl <- goesaodc_createScanTibble(nc, bbox)
head(filtered_tbl)

MazamaScience/MazamaSatelliteUtils documentation built on Dec. 17, 2021, 3:20 a.m.