MazamaScience / AirFireModeling

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

update raster_createTimes() #40

Closed jonathancallahan closed 3 years ago

jonathancallahan commented 4 years ago

See #46

After modelBrick returned from bluesky_load() has names like:

  # > names(stats_DF)
  # [1] "min.X1586912400"  "min.X1586916000"  "min.X1586919600"  "min.X1586923200" 
  # [5] "min.X1586926800"  "min.X1586930400"  "min.X1586934000"  "min.X1586937600" 
  # [9] "min.X1586941200"  "min.X1586944800"  "min.X1586948400"  "min.X1586952000" 
  # ...

But if we multiply it by something and thus read it into memory we end up with names like:

> names(stats_DF)
  [1] "min.layer.1"   "min.layer.2"   "min.layer.3"   "min.layer.4"   "min.layer.5"  
  [6] "min.layer.6"   "min.layer.7"   "min.layer.8"   "min.layer.9"   "min.layer.10" 
 [11] "min.layer.11"  "min.layer.12"  "min.layer.13"  "min.layer.14"  "min.layer.15" 
 [16] "min.layer.16"  "min.layer.17"  "min.layer.18"  "min.layer.19"  "min.layer.20" 
...

Ideally, the raster_createTimes() function would create times from the information in the grid information rather than the hack of parsing the layer names.