Resource: plot_domain
Resource | plot_domain |
Command Line | -pd=domain |
Environment Variable | wxpdomain |
Default Value | Usually left to user prompt |
The plot_domain resource is used to specify the exact domain to plot the data or contour the grid. This resource specifies the projection, location, aspect ratio of the plot, and the size of the domain:
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
- mo - mollweide
- or - orthographic
- sat - satellite
NON-MAP PROJECTIONS
- XY
- XlogY
- category
- skewt
- stuve
- therm
- hodo
- vert
- polar
- 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
"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 | |
proj:params,clat,clon,nx,ny,dx,dy | |
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 |
clat,clon | proj=ps nx=25 ny=17 dx=1.2 dy=1.2 |
file:region | look up domain in file |
region | look up domain in wxp.reg file |
proj | null projection |
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:
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. |
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 here.
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 |
For further information about WXP, email technical-support@weather.unisys.com
Last updated by Dan Vietor on Mar 5, 1998