Resource: name
Resource | name |
---|---|
Overview | Specifies the name used in resource file parsing. |
Command Line | -na=name |
Environment Variable | wxpname |
Possible Values | |
Default Value | the program name |
This resource is used to specify the name to be used in resource file parsing. By default, the program uses any global resources:
*name_conv: ymdh
or any resource that has a name equivalent to the name of the program:
gridplot.data_path: /data/model
Named Resources
If you want to use a specialized list of resources, you must specify the name resource to activate those resources. For example, if you want to plot international synoptic data rather than using domestic data, you might set up the following in the resource file:
intnl.con_path: /data/convert/intnl
intnl.city_file: syn.cty
The program can then be set up to use international data with:
sfcplot -na=intnl
Named Global Resources
In some cases, the resources for a particular program need to be used in a global and a local sense. The resource file allows you to set up program specific or named global defaults:
gridplot*data_path: /data/model
gridplot.prec.color_fill: prec.cfl
In this case, if you wanted to use specific named resources, you would have to repeat the data_path resource in the specific resources (prec.data_path and prec.color_fill) but this can be cumbersome if you ever need to modify the directory that gridplot uses at any time. This would mean a search through any resource specification to see if pertains to gridplot. With named globals, you need to only specify data_path once for gridplot.
In this case, the full name specification would be gridplot.prec which you could specify with the name resource. WXP does offer a shorthand if the first part of the name is the name of the program:
gridplot -na=+prec
By using the "+" before the "prec", you tell the program to prepend the name of the program (gridplot in this case).
Last updated October 2013