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



local Name = "Japan Tsunami: Wave Propagation - March 11, 2011"
local Identifier = "noaa-sos-oceans-japan_tsunami_waves"
local Description = [[On March 11, 2011 at 2:45 p.m. local time, a 9.0 magnitude
earthquake occurred 81 miles (130 km) off the east coast of Sendai, Honshu, Japan,
triggering a massive tsunami. A tsunami is a series of ocean waves generated by sudden
displacements in the sea floor, landslides, or volcanic activity. In the deep ocean, the
tsunami wave may only be a few inches high. The tsunami wave may come gently ashore or
may increase in height to become a fast moving wall of turbulent water several meters
high. Forecasted wave heights in Japan were up to 66 ft (20 m) and there were many
reports of tsunami waves three stories high in parts of Japan. Across the Pacific Ocean,
many countries issued evacuations along the coasts because of the predicted tsunami
waves. Propagation of the tsunami was computed with the NOAA forecast method using the
MOST (Method of Splitting Tsunami) model with the tsunami source inferred from DART.
Approximately 25 minutes after the earthquake, the tsunami was first recorded by one of
the DART buoys]]
local URL = "https://sos.noaa.gov/catalog/datasets/japan-tsunami-wave-propagation-march-11-2011/"


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 .. "4096",
  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/"
}
