Function Repository Resource:

NASALayerBackground

Source Notebook

Retrieve NASA-provided tiles for geographical functions

Contributed by: Cesar Loli

ResourceFunction["NASALayerBackground"][]

shows a list of all available layers.

ResourceFunction["NASALayerBackground"][layer].

creates the GeoServer option value for the given layer.

Details and Options

NASALayerBackground will connect to the geographical layers as developed by NASA using an API described .
NASALayerBackground will attempt to download a listing of all the layers and relevant information for each layer the first time the function is used. The output is suitable for use as an option setting for GeoServer in functions such as GeoGraphics.
NASALayerBackground accepts a "Timestamp" option to select the latest tiles in the database before the given date.
The

Examples

Basic Examples (2) 

List all available layers:

In[1]:=
Short[ResourceFunction[
  "NASALayerBackground", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"][]]
Out[1]=

Create the template for a given layer:

In[2]:=
ResourceFunction[
 "NASALayerBackground", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"]["2-meter Air Temperature, (Monthly, MERRA2)"]
Out[2]=

Scope (1) 

Use the output as a the GeoServer option value to retrieve the requested tiles:

In[3]:=
GeoGraphics[
 GeoServer -> ResourceFunction[
   "NASALayerBackground", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"]["2-meter Air Temperature, (Monthly, MERRA2)"]]
Out[3]=
In[4]:=
GeoImage[Entity["Country", "Peru"], GeoServer -> ResourceFunction[
   "NASALayerBackground", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"]["2-meter Air Temperature, (Monthly, MERRA2)"]]
Out[4]=

Options (1) 

The "Timestamp" option can be used to ask for the data from a specific date:

In[5]:=
GeoGraphics[
 GeoServer -> ResourceFunction[
   "NASALayerBackground", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"]["2-meter Air Temperature, (Monthly, MERRA2)",
    "Timestamp" -> {1990}]]
Out[5]=
In[6]:=
GeoGraphics[
 GeoServer -> ResourceFunction[
   "NASALayerBackground", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"]["2-meter Air Temperature, (Monthly, MERRA2)",
    "Timestamp" -> DateObject[{2025, 8}, "Month"]]]
Out[6]=

Possible Issues (2) 

If not given a correct layer as input the function will return Automatic:

In[7]:=
ResourceFunction[
 "NASALayerBackground", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"]["LAYER"]
Out[7]=

If given an incorrect date the function will use the default. The same is said if given a date outside the data range:

In[8]:=
res = ResourceFunction[
  "NASALayerBackground", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"]["2-meter Air Temperature, (Monthly, MERRA2)",
   "Timestamp" -> "ARG"]
Out[8]=
In[9]:=
GeoGraphics[GeoServer -> res]
Out[9]=
In[10]:=
GeoGraphics[
 GeoServer -> ResourceFunction[
   "NASALayerBackground", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"]["2-meter Air Temperature, (Monthly, MERRA2)",
    "Timestamp" -> {1500}]]
Out[10]=

Publisher

Cesar Loli

Requirements

Wolfram Language 13.0 (December 2021) or above

Version History

  • 1.0.1 – 28 January 2026
  • 1.0.0 – 16 January 2026

Related Resources

License Information