local globe = asset.require("../../earth")



local Name = "Volcanic Ash Eruption: Iceland"
local Identifier = "noaa-sos-atmosphere-volcano_ash"
local Description = [[Eyjafjallajokull, a glacier covered volcano in southern Iceland,
erupted explosively on April 14, 2010. The name Eyjafjallajokull is Icelandic for
island-mountain glacier. The volcano initially erupted on March 20, but this original
eruption was much smaller and only caused a brief evacuation of the local area. The April
14 event was 10 to 20 times more powerful and had international impacts. Locally, the
eruption and resulting lava melted the surrounding glacier, causing major flooding.
Internationally, air traffic was impacted for several days following the eruption. The
volcano ejected ash over 30,000ft into the atmosphere, causing significant disruptions to
the European and Trans-Atlantic air travel. Airspace over much of northern Europe was
closed from April 15 through April 23 for concerns over the abrasive volcanic ash causing
engine failures]]
local URL = "https://sos.noaa.gov/catalog/datasets/volcanic-ash-eruption-iceland/"


local syncedDirectory = asset.syncedResource({
  Name = Name,
  Type = "HttpSynchronization",
  Identifier = Identifier,
  Version = 1,
  UnzipFiles = true
})


local Layer = {
  Identifier = Identifier,
  Name = Name,
  Enabled = asset.enabled,
  Type = "ImageSequenceTileLayer",
  FolderPath = syncedDirectory .. "2992",
  Description = Description
}


asset.onInitialize(function()
  openspace.globebrowsing.addLayer(globe.Earth.Identifier, "ColorLayers", Layer)
end)

asset.onDeinitialize(function()
  openspace.globebrowsing.deleteLayer(globe.Earth.Identifier, "ColorLayers", Layer)
end)

asset.export(Layer)



asset.meta = {
  Name = Name,
  Version = "1.0",
  Description = Description .. "Data provided by the National Oceanic and Atmospheric Administration",
  Author = "National Oceanic and Atmospheric Administration",
  URL = URL,
  License = "https://sos.noaa.gov/copyright/"
}
