WXP
User's Guide
filenames <<
plot_domain
>> forecast

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 plotting coordinates.

In most cases, data are 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, clat, and longitude, clon.
  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,clat,clon,nx,ny,dx,dy None
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
clat,clon proj=ps nx=25 ny=17 dx=1.2 dy=1.2
fi:region look up domain in file. Domain specification in first line of file
file:region
look up domain in file file
region look up domain in wxp.reg file

NOTE: clat,clon can be replaced by id:xxxx or XXXX which will look up location in sao.cty file using station identifier xxxx. Use id:file:xxxx to look up location in file file.

The proj specification can always contain the [:params] specification.

Selecting a Domain for a Map Projection

In selecting a plot domain, first determine the center latitude and longitude of the domain. Next, determine the rough size of the domain to capture all the data of interest. Since domain is established as a grid, the size is dependent on number of gridpoints and grid spacing. The horizontal size is (nx-1)*dx in 100s of kilometers. Since the default grid is 25x17, the dx can be estimated by dividing size in kms by 2400. 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.

NOTE: 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
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
ps,38.5,-97,2800,2000,0.02,0.02 Polar stereographic grid over US used for radar mosaics
sat:e:0:-75::1:,0.7,-74.9,1024,1024,0.1266,0.147
Satellite image projection. The satellite is centered over 75W and the image is centered at 0.7N, 74.9W. It uses an ellipsoidal earth computation. Since no distance is specified, this is geostationary orbit. The angle toggle is on so distances are in radians*earth radius. The nx,ny specify the image size which is 1024x1024. The dx,dy specify the distance between pixels in projection coordinates which is roughly 12.6 by 14.7 km. In most satellite image cases, these values will not be equal.

Selecting a Domain for a non-Map Projection

This is done very similar to the map projections. First a center point is determined. Use X for clat and Y for clon. The grid and grid size is the same. If the projection is xlogp. The Y distance is actually in log P.

Plot Domain Description
xy,0,5,20,10 XY plot ranging from -10 to 10 in X and 0 to 10 in Y
pixel,512,512,1024,1024,1,1 Satellite image with 1024x1024 resolution.

Selecting a Domain for Thermodynamic Projection

The difference with thermodynamic projections is that the vertical coordinate is either log P, log theta (tephigram) or some function of P (as in stuve). The central point is in temperature (C) and pressure (mb/hPa).

Plot Domain Description
skewt,-40,325,12,11,9,.235 Standard skewt projection
stuve,-20,394,12,11,11,.36 Standard stuve projection
ema,-20,325,12,11,11,.235 Standard emagram projection
teph,-36,332,12,11,9.09,.033 Standard tephigram projection
rteph,-25,400,12,11,13.6,.049 Standard rotated tephigram projection

Selecting a Domain from a File

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

Region File

Specifying a full plot domain can be difficult. Therefore, a region file can be created to alias plot domain specifications. This default region file is wxp.reg. New regions can be added to this file. Here is an example line from the file:

us Contiguous_US 1 39,-97,2.3 ne New_England 1 42,-76,.9 at Atlantic 1 37,-82,.9 se Southeastern 1 31,-88,1.1 mw Midwestern 1 43,-93,1.1 cp Central_Plains 1 37,-95,1.1 sp Southern_Plains 1 32,-100,1.1 nw Northwestern 1 44,-114,1 sw Southwestern 1 37,-114,1 -- ------------ 1 --------- wcan Western_Canada 1 55,-110,1.4 ecan Eastern_Canada 1 53,-72,1.4 nhem North_Hemisphere 0 90,-90,25,25,8 shem South_Hemisphere 0 -90,-90,25,25,8 us02 US_2km 0 ps,38.5,-97,2800,2000,0.02,0.02

The alias is listed first, followed by a long name (all spaces must be underscores), followed by a menu toggle (not used) and finally the plot domain specification.

NOTE: Menu toggle is ignored in WXP 6.

This alias can now be specified as:

sfcplot -pd=us


Updated January 2021

filenames <<
plot_domain
>> forecast