local globeIdentifier = asset.require("scene/solarsystem//planets/mars/mars").Mars.Identifier

local layer = {
  Identifier = "TES_Thermal_Inertia",
  Name = [[MGS TES, Global Thermal Inertia]],
  FilePath = asset.localResource("TES_Thermal_Inertia.vrt"),
  Description = [[The Thermal Emission Spectrometer (TES) is one of the instruments aboard the Mars Global Surveyor spacecraft. TES is designed to measure the thermal infrared energy (heat) emitted from Mars. This technique, called thermal emission spectroscopy, can tell us much about the geology and atmosphere of Mars. One of the objectives of the MGS TES instrument is the derivation of thermal inertia of the surface at 3-km spatial resolution. Thermal inertia represents the ability of a material to conduct and store heat, and in the context of planetary science, it is a measure of the subsurface's ability to store heat during the day and reradiate it during the night. While compositional differences (ie, mineralogy) will have some effect, for a terrestrial planetary surface such as that of Mars, thermal inertia will depend predominantly on the physical properties of the near surface materials such as particle size, degree of induration (ie, cementation of grains), rock abundance, and exposure of bedrock (rocks will have a much higher thermal inertia than sand or dust - that is, it takes longer to heat rocks up during the day and to cool them off at night). For example, on a visit to the desert you may notice that sandy areas are much hotter at midday than adjacent rocks, and the sand cools off quickly after sunset whereas the rocks remain warm well into the evening. Map resolution/scale: 20 ppd/3km. Putzig et al, 2005, Icarus 173, 325-341]]
}
  
asset.onInitialize(function()
  openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer)
end)
  
asset.onDeinitialize(function()
  openspace.globebrowsing.deleteLayer(globeIdentifier, "ColorLayers", layer.Identifier)
end)
  
asset.export("layer", layer)


asset.meta = {
  Name = [[MGS TES, Global Thermal Inertia]],
  Version = "1.0",
  Author = "NASA/Treks",
  URL = "https://trek.nasa.gov/mars/#v=0.1&x=0&y=0&z=1&p=urn:ogc:def:crs:EPSG::104905&d=&l=TES_Thermal_Inertia%2Ctrue%2C1&b=mars&e=-180.0%2C-90.0%2C180.0%2C90.0&sfv=&w=",
  License = "NASA/Treks",
  Description = [[MGS TES, Global Thermal Inertia layer from NASA/Treks for Mars]]
}
