WXP version 5
Resource Reference

Resource: name

Resource name
Command Line -na=name
Environment Variable wxpname
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:

   grbcalc.data_path: /usr/local/data/hds

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: /usr/local/convert/intnl
   intnl.city_file: syn.cty

The program can then be set up to use international data with:

   sfcwx -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:

   grbcalc*data_path: /usr/local/data/hds
   grbcalc.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 grbcalc uses at any time.  This would mean a search through any resource specification to see if pertains to grbcalc.  With named globals, you need to only specify data_path once for grbcalc.  

In this case, the full name specification would be grbcalc.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:

   grbcalc -na=+prec

By using the "+" before the "prec", you tell the program to prepend the name of the program (grbcalc in this case).


Last updated July 30, 1998