McIDAS User's Guide
Version 2019.1

[Search Manual] [Table of Contents] [Go to Previous] [Go to Next]


GRDIMG

Converts a grid to a digital image.


Format

GRDIMG sdataset ddataset [keywords]


Parameters

sdataset

source ADDE grid dataset name and absolute position; specify one of the following formats:

 

 

group/descriptor.position
alias.position

 

use only positive integers or ALL (all positions) for position (no default for group/descriptor or alias; default=ALL for position)

ddataset

destination ADDE image dataset


Search Keywords

DAY=

selects first grid with this day

DRAnge=

bday eday inc

selects the first grid in the range of days bday through eday incremented by inc days (no default for bday; eday default=bday; inc default=1)

ENSemble=

e1 . . en

selects grids with the specified ensemble numbers; each ensemble number must include a + or - sign, e.g., -1 -0 +0 +1

FDAy=

selects the first grid with this forecast day; a grid's forecast day is determined by adding the forecast hour to the day and time, e.g., a 12 UTC grid from day 2000100 with a forecast hour of 72 has a forecast day of 2000103; you cannot use FDAY with the FHOUR or FRANGE keyword

FHOur=

selects the first grid with this forecast hour; you cannot use FHOUR with the FRANGE, FDAY or FTIME keyword

FRANGe=

bhr ehr inc

selects the first grid in the range of forecast hours bhr through ehr incremented by inc hours (no default for bhr; ehr default=bhr; inc default=1); you cannot use FRANGE with the FHOUR, FDAY or FTIME keyword

FTIme=

selects the first grid with this forecast time; a grid's forecast time is determined by adding the forecast hour to the time, e.g., a 12 UTC grid with a forecast hour of 18 has a forecast time of 6 on the following day; you cannot use FTIME with the FHOUR or FRANGE keyword

GPRo=

selects the first grid with this projection; valid entries include MERC, PS, LAMB and EQUI

GRIB=

geo par model level

selects the first grid with the specified GRIB codes; the four values are the geographic, parameter, model and level codes that can be listed with GRDLIST FORM=ALL; values specified as an X (a placeholder) or not specified at all will match any GRIB code

GRId=

selects the grid with this grid number or LAST (for last grid); when using this keyword, all other search keywords are ignored and the default position value in sdataset (ALL) is invalid so you must specify a position number

LEV=

lev [unit]

selects the first grid with this level and units, e.g., SFC, 1000[MB], 5000[M]; units are optional but must be in square brackets if specified; if [MB] or [HPA] is specified for units then grids with either of those units are selected; if [NONE] is specified for units then grids with no assigned units are selected

PARam=

selects the first grid with this parameter, e.g., T, Z, RH

SRC=

s1 . . sn

selects the first grid with any of these sources, e.g., MDX, GFS, ETA

TIMe=

selects the first grid with this time

TRAnge=

btim etim inc

selects the first grid in the range of times btim through etim incremented by inc hours (no default for btim; etim default=btim; inc default=1)


Output Keywords

MAGnify=

rmag cmag

grid row and column magnification factors; both values must be greater than 0; these values determine the number of lines and elements in the destination image; see the Remarks (default=1 rmag)

PUNit=

units to assign to the pressure grid that is output as an image; the valid options are MB or HPA and will be used regardless of which of the two units appear in the source grid (default=units in source grid)

SCAle=

prodlo prodhi britlo brithi

source grid's product value range to retain in the destination image, and the corresponding brightness value range to assign to the product value range; see the Remarks (default=mingridvalue maxgridvalue 0 255)

SUBsect=

slat nlat elon wlon incrow inccol

geographic region to subsect from the source grid, and row and column reduction intervals to use within the subsect region, where:

 

slat, nlat

southern and northern latitudes of the subsect region

 

elon, wlon

eastern and western longitudes of the subsect region (slat, nlat, elon, wlon defaults=source grid bounds)

 

incrow, inccol

row and column reduction intervals; 1 means use every row/column of grid points in the subsect region, 2 means use every other row/column, etc.; when subsecting a conformal projection grid, the incrow and inccol values must be the same (default=1 for both)

 

Note: If the source grid is a McIDAS grid, you can subsect it by row and column instead of latitude and longitude. To do so, specify row and column numbers instead of latitudes and longitudes in the first four parameters, and specify ROWCOL as the seventh parameter. For example, SUBSECT=10 40 80 160 1 2 ROWCOL uses rows 10, 11, 12, ..., 40 and columns 80, 82, 84, ..., 160 for the subsect region. (If you don't include the ROWCOL at the end, it will treat 10 and 40 as latitudes, and 80 and 160 as longitudes.)

UNIt=

output units for the selected parameter (default=from grid header)


Remarks

By default, GRDIMG converts each source grid point to a single pixel in the destination image. Use the MAGNIFY keyword to make the image larger. The equations below calculate rmag and cmag values that will create an image large enough to fill the frame. Round the values up to the nearest integer since MAGNIFY accepts only integer values.

rmag = (number of lines in frame - 1) / (number of rows in grid - 1)
cmag = (number of elements in frame - 1) / (number of columns in grid - 1)

The values specified in the prodlo, prodhi, britlo, and brithi parameters in the SCALE keyword define a linear product-to-brightness calibration for displaying the destination image. Source grid product values outside of the specified prodlo-prodhi range are assigned a missing data value if the britlo value is greater than 0 and/or the brithi value is less than 255. They are assigned the appropriate prodlo or prodhi value if britlo is 0 and brithi is 255. Brightness levels are assigned for missing values using linear interpolation above and below the prodlo and prodhi values.


Examples

GRDIMG LOCAL/GRIDS.100 LOCAL/AREAS.10

This entry uses the data in the first grid in position 100 of dataset LOCAL/GRIDS to create the image in position 10 of dataset LOCAL/AREAS. The minimum and maximum grid values are assigned brightness values 0 and 255, respectively. Grid values between the minimum and maximum are assigned brightness values linearly interpolated between 0 and 255.

GRDIMG GRIDS/ETA IMAGES/ETA.1 PARAM=PRE LEV=SFC SCALE=1010 1020

This entry uses the data in the surface pressure grid in dataset GRIDS/ETA to create the image in position 1 of dataset IMAGES/ETA. Grid pressures between 1010 and 1020 are retained in their image product values and are assigned brightness levels linearly interpolated between 0 and 255. Grid pressures less than 1010 are assigned an image product value of 1010 and a brightness value of 0. Grid pressures greater than 1020 are assigned an image product value of 1020 and a brightness value of 255.

GRDIMG GRIDS/ETA IMAGES/ETA.1 PARAM=PRE LEV=SFC SCALE=1010 1020 100 200

This entry uses the data in the surface pressure grid in dataset GRIDS/ETA to create the image in position 1 of dataset IMAGES/ETA. Grid pressures between 1010 and 1020 are retained in their image product values and are assigned brightness levels linearly interpolated between 100 and 200. Grid pressures less than 1010 are assigned missing product values and brightness values linearly interpolated between 0 and 100. Grid pressures greater than 1020 are assigned missing product values and brightness values linearly interpolated between 200 and 255.

GRDIMG GRIDS/GLOBALGFS IMAGES/GFSUSA.4000 PARAM=T LEV=500 SUBSECT=25 50 65 130

This entry uses the data in the 500-mb temperature grid in dataset GRIDS/GLOBALGFS to create the image in position 4000 of dataset IMAGES/GFSUSA. Only the grid points within the latitude and longitude ranges specified in the SUBSECT keyword are used, so the destination image contains only that subset of the data in the source grid.


[Search Manual] [Table of Contents] [Go to Previous] [Go to Next]