MazamaScience / AirFireModeling

Utilities to ease merging of USFS AirFire model output and monitoring data.
0 stars 0 forks source link

ingest GRIB files #38

Open jonathancallahan opened 4 years ago

jonathancallahan commented 4 years ago

Amy sent Jon code to easily read in GRIB files. These are generated from the ??? and ??? models.

GRIB file example

download HRRR from haze...

/data/Met/HRRR/3km/GRIB/2014012004800

library(raster)

file_path <- '/path-to/2014012004800'

this is what I meant by drivers...

success depends on your GDAL/rgdal built including the GRIB driver

rgdal::gdalDrivers()[grep('GRIB', rgdal::gdalDrivers()$name),]

----- Load hourly MASS DENSITY from HRRR GRIB file -----

Band 4: MASSDEN Mass Density (Concentration) [microgramg/m^3]

Band 12: COLMD Column-Integrated Mass Density [kg/m^2]?

massden <- raster(file_path, band = 4)

class(massden)

RasterLayer

massden@crs

has a projection