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
Thefields parameter specifies what to plot. For vector data (wind), use | to separate magnitude and direction:
- 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))
- First: Magnitude (e.g.,
- ModMS: Can use
MODEL.LEVEL.VARIABLE(latest) orMODEL@model-run.LEVEL.VARIABLE(e.g.,GFS@2218) - MAMS: Must use
MODEL@timestamp.LEVEL.VARIABLE(e.g.,GFS@1766577600)
Time
Specify the timestamp for the data:Location
Specify the geographic bounding box and image size:- Bounding box:
(lat1,lon1) to (lat2,lon2)- Southwest to Northeast corners - Image size:
size (width,height)- Output image dimensions in pixels
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 gradientband- Discrete color bandsnone- 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 vectorsbarb- Wind barbsdirection- 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
Wind Vector Map
Precipitation with Contours
MAMS Query with Timestamp Format
When querying MAMS, use timestamp format for model runs: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|:
- Magnitude field: Speed or magnitude value
- Direction field: Direction in degrees
Response Format
Whenformat=png, the API returns a PNG image that can be:
- Displayed directly in browsers
- Saved to a file
- Embedded in web pages or reports
Related Documentation
- Query Guide - Query syntax and expressions
- API Examples - Example queries
- Crystal - Frontend for viewing maps

