Enter a ZIP code to get a forecast:
Setup Location

WRN Logo

Plot Domains

For the plotting programs, the output is defined by a specific domain which either can be geographical or Cartesian.  The plot_domain resource specifies this output domain.

Plot Domain

In most cases data is plotted based on a latitude longitude location.  Since this is a spherical coordinate system and the plot will be of two dimensions, a transformation must occur.  In the case of geographic plots, this is called a projection.  

To locate the plot, a simple set of parameters must be specified.

  1. the projection must be specified.  By default, this is polar stereographic.
  2. the central point must be determined which for map projections is by latitude and longitude.
  3. the domain size must be specified.  This is simply done by specifying a size parameter dx. For regional plots, this size is 1.  For the entire contiguous United States, the size is around 2.5.  For hemispheric plots, use 8.

The default aspect ratio for the plot is 3 to 2.  Once the domain has been determined, all data are then remapped to this domain before plotting.

Often there is more to the domain that needs to be specified.  There are projection coordinates such as the projection latitude and longitude, the true latitudes and mapping factor corrections. These can all be specified with the full plot domain specification:

proj[:params],clat,clon,[nx,ny,]dx,dy

where:

  • proj - The projection.

    MAP PROJECTIONS

    • ll or lat - latitude-longitude
    • ps or polar - polar stereographic
    • me or merc - mercator
    • lc or lamb - lambert conformal
    • gn - gnomic
    • mo - mollweide
    • or - orthographic
    • sat - satellite

    NON-MAP PROJECTIONS

    • XY - X Y plot (cartesian)
    • XlogY - X log Y plot
    • category - category plot
    • skewt - SkewT Log P thermodynamic plot
    • stuve - Stuve thermodynamic plot
    • ema - Emagram thermodynamic plot
    • therm - thermodynamic plot
    • hodo - hodograph plot
    • vert - vertical cross section
    • polar - polar plot
  • param - A colon ":" delimited list of projection specific parameters. The parameters are:

    plat:plon:tlat1:tlat2:factor

    Any number of these can be specified.
    plat and plon define the projection latitude and longitude.
    tlat1 and tlat2 are the true latitudes for the projection.
    factor is the map factor necessary to give true distances in 100s km for the projection. This is required for finite differencing and is somewhat arbitrary.

  • clat,clon - For map projections, this is the central latitude and longitude of the domain. The clat,clon can be replaced with "id:station" where the latitude and longitude are read in from a city database file (sao.cty by default).  If you want to use a different database file, you need to specify it as "id:database_file:station".

    For non-map projections, this represents the coordinate of the lower left corner of the domain.
  • nx,ny - Specifies the number of grid points or pixels in each direction.  For non-grid plots, this acts as the aspect ratio of the domain as nx-1 to ny-1. The default is 25,17 which gives a region with an aspect ratio of 3 to 2. This can be useful in the case where overlays might need to be drawn where the underlying data or image does not adhere to the true projection coordinate system. This is especially true of satellite images where the height of a scan line is not equal to the width of each picture element and therefore dx cannot be equal to dy to give a proper projection. Also, the number of gridpoints is used to scale wind vector length. The longest wind vector is scaled to one grid distance. (OPTIONAL, DEFAULT: 25,17)

    For map projections, this is the number of gridpoints in each direction. For non-map projections, this is just the aspect ratio and does not go into the domain size computation.

  • dx,dy - Specifies the domain size based on the nx,ny parameters.  The larger the value, the larger the domain.  For map projections, this is the grid spacing in the X and Y direction. The full domain size is (nx-1)*dx by (ny-1)*dy. In some cases, this can be used to correct for unequal distances. This is especially true of satellite images where the width of one element on a scan line is not equal to the height on the scan line.

    For non-map projections, this is strictly the size in X and Y.  The origin is defined by clat,clon.

Specifying the Domain

There are several ways to specify the domain.  Not all of the above parameters need to be specified in order for the program to know what to plot

Parameters to specify Assumed values for others
proj,plon,clat,clon,nx,ny,dx,dy None
proj:params,clat,clon,nx,ny,dx,dy None
proj,plon,clat,clon,dx,dy  nx=25,ny=17
proj,clat,clon,nx,ny,dx dy=dx
proj,clat,clon,dx,dy nx=25,ny=17
proj,clat,clon,dx nx=25 ny=17 dy=dx
clat,clon,nx,ny proj=ps dx=1.2 dy=1.2
clat,clon,dx proj=ps nx=25 ny=17 dy=dx
size,nx,ny used for images
proj,clat,clon nx=25 ny=17 dx=1.2 dy=1.2 (1 for zoom projection)
clat,clon proj=ps nx=25 ny=17 dx=1.2 dy=1.2
file:region look up domain in file
fi:file  look up domain in wxp.reg file
region  look up domain in wxp.reg file
proj

NOTE: clat,clon can be replaced by id:xxx

Selecting a Domain for a Map Projection

In selecting a plot domain, first determine the center latitude and longitude of the domain. This is centered on some meteorological event such as a low pressure system or on a station of interest. Next, determine the rough size of the domain to capture all the data of interest. This is done by estimating the horizontal size of the domain in kilometers and dividing by 100*(nx-1) to get dx and dy. By default, most plots use nx,ny of 25x17. So in other words, a value of 2400 can be use as the divisor. This makes a value of 1 for dx,dy adequate for regional plots and a value of just larger than 2 adequate for the continental US. This is a rough computation because different projections will yield slightly different domain sizes. Finally, adjust the aspect ratio of the plot by changing the nx,ny parameters. These may not need to be changed unless the domain is square or oblong.  Here are some examples:

Plot Domain Description
39,-97,2.3 United States
id:KORD,.5 Small region centered over Chicago
ll,0,0,37,19,10 The whole globe on a lat-lon projection
ps,90,-90,8 Northern hemisphere
sat:0:-75,34.95,-82.95,640,427,0.108,0.095 Satellite image projection.  The satellite is centered over 75W and the image is centered at 34.95,-82.95.  The nx,ny specify the image size which is 640x427.  The dx,dy specify the distance between pixels in projection coordinates. In most satellite image cases, these values will not be equal.
zoom,40,-100,2 Zooms in on an image at a particular location (40,-100) and zoom factor (2).

Selecting a Domain for a non-Map Projection

In selecting a plot domain, first determine the coordinate of the lower left coordinate of the domain and that will be clat and clon. For simplicity, X is latitude and Y is longitude in this specification. Next determine the rough size of the domain to capture all the data of interest. The X distance is dx and the Y dy. Finally, adjust the aspect ratio of the plot by changing the nx,ny parameters. Remember 2,2 is the smallest possible value.

xy,-10,0,20,10 XY plot ranging from -10 to 10 in X and 0 to 10 in Y
cat,0,0,10,75 Category plot, plotting first 11 items with a Y range of 0 to 75

Selecting a Domain from a File

There are two ways to select a domain from a file.

  • Single Domain -- in this case the file only contains the plot domain specification such as:
   sat:0:-75,34.95,-82.95,640,427,0.108,0.095

where the plot domain would be -pd=fi:domfile

  • Domain File -- in this case the region string is looked up in the domain file.  For example, the plot domain would be "-pd=sat.reg:goes_east" and the region goes_east would be looked up in the sat.reg file. See the section on regions in the Users Guide.


For further information about WXP, email technical-support@weather.unisys.com
Last updated by Dan Vietor on June 6, 1998