Enter a ZIP code to get a forecast:
Setup Location

WRN Logo

Resource: num_hour

Resource num_hour
Command Line -nh=hours[,skip]
Environment Variable wxpnumhour
Default Value Generally 0

The num_hour resource is used specify a range of hours to use in the program.  Most decoding and plotting programs work with only a single hour at a time.  This resource tells the programs to use more than one hour.

The default direction is forward in time.  If you specify -nh=5, the program will use the current data file plus the 5 hourly files forward in time.  In order to go backwards, specify a negative number.  

As with the current and hour resources, the num_hour resource can be specified in hours and minutes:


For example, in decoding data, the data could be located in several files over a range of hours.  To decode all data for a specific time, several files must be parsed:

   sacvt -cu=1 -nh=1

The number of hours specified represents the requested file plus one hour.  Thus two hours of data files are decoded.

Creating Loops

This can be used with plotting programs to set up loops.

   sfcwx -cu=la -nh=-5

In this case, a loop of 6 hours, current plus the 5 previous hours, will be generated.   The number can represent hours and minutes such as "-nh=-3:20" in which the program will loop through all files within the previous 3 hours and 20 minutes.  This is useful for radar data which comes in every 5 minutes.  The programs will delete any frames where the data file does not exist.

Skipping hours

Often not every hour is important and thus skipping hours may be desirable.  The skip parameter sets the skip factor in hours and minutes:


The first example goes back 2 days (48 hours) every 3 hours.  The second example goes back 3 hours 20 minutes in steps on 20 minutes.

For example, a plot of 21Z temperatures is needed over 4 days.  This can be done as follows:

   sfcwx -cu=la -ho=21 -nh=-96,24 -va=temp ...

For further information about WXP, email technical-support@weather.unisys.com
Last updated by Dan Vietor on July 30, 1998