Skip to main content
ModMS can generate map images (PNG) from weather model data with customizable styling, colormaps, contours, and vector overlays.

Map Generation Endpoint

Base URL: http://modms.devops.arabiaweather.com/q Format: Set format=png to generate a map image instead of JSON data.

Required Parameters

Fields

The fields parameter specifies what to plot. For vector data (wind), use | to separate magnitude and direction:
Format:
  • Scalar data: Single expression (e.g., GFS.GND2M.TMP-273.15)
  • Vector data: Two expressions separated by |:
    • First: Magnitude (e.g., speed(u, v))
    • Second: Direction (e.g., dir(u, v))
Model Run Specification:
  • ModMS: Can use MODEL.LEVEL.VARIABLE (latest) or MODEL@model-run.LEVEL.VARIABLE (e.g., GFS@2218)
  • MAMS: Must use MODEL@timestamp.LEVEL.VARIABLE (e.g., GFS@1766577600)
When querying MAMS, you must use timestamp format (MODEL@timestamp) instead of model-run format.

Time

Specify the timestamp for the data:
Format: Unix timestamp

Location

Specify the geographic bounding box and image size:
Format:
  • Bounding box: (lat1,lon1) to (lat2,lon2) - Southwest to Northeast corners
  • Image size: size (width,height) - Output image dimensions in pixels
Example:

Style Parameters

Color Range

min: Minimum value for color scale (default: 0) max: Maximum value for color scale (default: 100) step: Step size for color bands (default: 1)

Fill Style

fill: How to fill the map
  • gradient - Smooth color gradient
  • band - Discrete color bands
  • none - No fill (contours only)

Colormap

colormap: Color scheme name Available colormaps:
  • Standard: jet, hsv, magma, inferno, plasma, viridis, spectral
  • Diverging: rdylgn, rdbu, burd, piyg, prgn, rdylbu, brbg, rdgy, puor
  • Sequential: orrd, pubu, bupu, oranges, bugn, ylorbr, ylgn, reds, rdpu, greens, ylgnbu, purples, gnbu, greys, ylorrd, purd, blues
  • Custom: shaker1, shakerwind, shakercape, shakercape2
  • Meteorological: temp, temp2, temp3, wind, humid, cape, gph, prec, bprec, bprec2, clouds, thickness

Contours

contour: Enable contour lines (true/false, default: false) linewidth: Contour line width (default: 1) contour_color: Contour line color (default: black)

Vectors

vector: Vector overlay style
  • none - No vectors (default)
  • vector - Arrow vectors
  • barb - Wind barbs
  • direction - Direction only
vector_density: Number of vectors per grid (default: 40)

Grid Numbers

numgrid: Show grid point values (true/false, default: false)

Image Size

image_width: Output image width in pixels (default: auto-calculated) fontsize: Font size for labels (default: 0 = auto)

Saturation

saturate_min: Saturate values below minimum (true/false, default: false) saturate_max: Saturate values above maximum (true/false, default: false)

Example Requests

Temperature Map

Decoded:

Wind Vector Map

Decoded:

Precipitation with Contours

MAMS Query with Timestamp Format

When querying MAMS, use timestamp format for model runs:
Decoded:
Notice the GFS@1766577600 format - MAMS requires Unix timestamp format, not model-run format like GFS@2218.
For information about Crystal layer definitions, see the Layer Definitions documentation.

Vector Data Format

For vector overlays (wind, currents), provide two fields separated by |:
  1. Magnitude field: Speed or magnitude value
  2. Direction field: Direction in degrees
Example:
The magnitude determines vector length, direction determines orientation.

Response Format

When format=png, the API returns a PNG image that can be:
  • Displayed directly in browsers
  • Saved to a file
  • Embedded in web pages or reports