Skip to content

Cannot reproduce wind visualisation Raster MTS example #216

@jimjam-slam

Description

@jimjam-slam

We are looking to use the Raster MTS to serve NetCDFs, but we've struggled with our uploaded Tilesets reporting sum_area: 0 and not having any data when we open them in Mapbox Studio. Eventually, we tried to reproduce the wind visualisation example exactly, but even this appears to have this problem.

I've downloaded the NetCDF supplied on the page as gfs-wind.nc. Here's the recipe, as specified on the example page (I've substituted in our account name and the source name), saved as recipe-gfs.json:

{
  "version": 1,
  "type": "rasterarray",
  "sources": [
    {
      "uri": "mapbox://tileset-source/example-org/gfs-wind"
    }
  ],
  "minzoom": 0,
  "maxzoom": 3,
  "layers": {
    "10winds": {
      "tilesize": 256,
      "resampling": "bilinear",
      "buffer": 1,
      "source_rules": {
        "filter":
        [
		      ["all",["==",["get","NETCDF_VARNAME"],"u-component_of_wind_height_above_ground"],
        	["==",["get","NETCDF_DIM_height_above_ground2"],"10"]],
        	["all",["==",["get","NETCDF_VARNAME"],"v-component_of_wind_height_above_ground"],
        	["==",["get","NETCDF_DIM_height_above_ground2"],"10"]]
				],
        "name": ["to-number", ["get", "NETCDF_DIM_time"]],
				"sort_key":["to-number",["get","NETCDF_DIM_time"]],
        "order": "asc"
			}
    }
  }
}

Then I've run:

tilesets upload-raster-source example-org gfs-wind ./gfs-wind.nc
tilesets create example-org.tiles-gfs-wind --recipe recipe-gfs.json --name "Test - GFS wind"
tilesets publish example-org.tiles-gfs-wind

When I run tilesets job, I get output that includes:

"layer_stats": {
    "10winds": {
      "minzoom": 0,
      "maxzoom": 3,
      "zooms": {
        "0": {
          "sum_area": 0
        }
      }
    }
  },

And in Mapbox Studio link supplied by tilesets job we see the following:

Screenshot of Mapbox Studio showing a Tileset. No data appears on the map, and the the zoom levels on the left report 0kb.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions