HWRF  trunk@4391
Public Member Functions | List of all members
hwrf.config.ConfTimeFormatter Class Reference

internal function that implements time formatting More...

Detailed Description

internal function that implements time formatting

Like its superclass, ConfFormatter, this class is part of the implementation of HWRFConfig, and is used to interpolate strings in a way similar to string.format(). It works the same way as ConfFormatter, but accepts additional keys generated based on the forecast and analysis times:

fYMDHM - 201409171200 = forecast time September 17, 2014 at 12:00 UTC
fYMDH  - 2014091712
fYMD   - 20140917
fyear  - 2014
fYYYY  - 2014
fYY    - 14   (year % 100)
fCC    - 20   (century)
fcen   - 20
fmonth - 09
fMM    - 09
fday   - 17
fDD    - 17
fhour  - 12
fcyc   - 12
fHH    - 12
fminute - 00
fmin   - 00

Replace the initial "f" with "a" for analysis times. In addition, the following are available for the time difference between forecast and analysis time. Suppose the forecast is twenty-three hours and nineteen minutes (23:19) after the analysis time:

fahr - 23
famin - 1399   ( = 23*60+19)
fahrmin - 19   

Definition at line 201 of file config.py.

Inheritance diagram for hwrf.config.ConfTimeFormatter:
hwrf.config.ConfFormatter

Public Member Functions

def __init__ (self)
 constructor for ConfTimeFormatter
 
def get_value (self, key, args, kwargs)
 return the value of a variable, or a substitution More...
 
- Public Member Functions inherited from hwrf.config.ConfFormatter
def __init__ (self)
 Constructor for ConfFormatter.
 
def get_value (self, key, args, kwargs)
 Return the value of variable, or a substitution. More...
 

Member Function Documentation

def hwrf.config.ConfTimeFormatter.get_value (   self,
  key,
  args,
  kwargs 
)

return the value of a variable, or a substitution

Never call this function. It is called automatically by str.format. It provides the value of an variable, or a string substitution.

Parameters
keythe string key being analyzed by str.format()
argsthe indexed arguments to str.format()
kwargsthe keyword arguments to str.format()

Definition at line 239 of file config.py.


The documentation for this class was generated from the following file: