WXP version 5
User's Guide

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:

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.

   sat:0:-75,34.95,-82.95,640,427,0.108,0.095

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


Last updated June 6, 1998