HWRF
trunk@4391
|
A class that provides information about WRF output and input files. More...
A class that provides information about WRF output and input files.
This class is used throughout the HWRF scripts to identify WRF input and output filenames. The underlying implementation knows how to deal with the odd rounding issues involved in predicting WRF filenames based on timesteps, including fractional timesteps. This class also tracks the analysis time, forecast time, stream and full path to the file.
Definition at line 46 of file wrfbase.py.
Public Member Functions | |
def | __init__ |
Creates a WRFOutput object that knows the path to its file (self.path()), the output time as a datetime (self.validtime()), the simulation start time as a datetime (self.anltime()), the output forecast second as a timedelta (self.fcstdelta()), the name of the WRF stream (self.stream()), and the WRF domain object (self.domain()). More... | |
def | __hash__ (self) |
provides an integer hash value so this object can be used as a key in a dict | |
def | __eq__ (self, other) |
does this WRFOutput equal that one? More... | |
def | __str__ (self) |
a string representation of this output file | |
def | __repr__ (self) |
a detailed string representation of this output file | |
def | path (self) |
Returns the full path to the output file. More... | |
def | stream (self) |
Returns the lower-case name of the WRF stream. More... | |
def | domain (self) |
the hwrf.wrf.WRFDomain object More... | |
def | fcstdelta (self) |
the difference between the analysis and forecast time. More... | |
def | validtime (self) |
Returns the output time as a datetime.datetime. More... | |
def | anltime (self) |
Returns the analysis time as a datetime.datetime. More... | |
def hwrf.wrfbase.WRFOutput.__init__ | ( | self, | |
anltime, | |||
stream, | |||
domain, | |||
path, | |||
validtime = None , |
|||
fcstdelta = None |
|||
) |
Creates a WRFOutput object that knows the path to its file (self.path()), the output time as a datetime (self.validtime()), the simulation start time as a datetime (self.anltime()), the output forecast second as a timedelta (self.fcstdelta()), the name of the WRF stream (self.stream()), and the WRF domain object (self.domain()).
Do not modify the domain object or many things may break.
You must specify exactly one of validtime or fcstdelta. If you specify both, OverspecifiedOutputTime will be raised. If you specify neither, NoOutputTime will be raised.
Definition at line 56 of file wrfbase.py.
def hwrf.wrfbase.WRFOutput.__eq__ | ( | self, | |
other | |||
) |
does this WRFOutput equal that one?
Returns True if the other WRFOutput object is identical to this one, and False if it is not. For anything other than a WRFOutput, returns NotImplemented.
other | another object |
Definition at line 93 of file wrfbase.py.
def hwrf.wrfbase.WRFOutput.anltime | ( | self | ) |
Returns the analysis time as a datetime.datetime.
Definition at line 138 of file wrfbase.py.
Referenced by hwrf.wrfbase.WRFOutput.__repr__().
def hwrf.wrfbase.WRFOutput.domain | ( | self | ) |
the hwrf.wrf.WRFDomain object
Returns the domain object for this output file's WRF domain. Do not modify the returned object or many things will break.
Definition at line 123 of file wrfbase.py.
Referenced by hwrf.wrfbase.WRFOutput.__repr__(), and hwrf.wrfbase.WRFOutput.__str__().
def hwrf.wrfbase.WRFOutput.fcstdelta | ( | self | ) |
the difference between the analysis and forecast time.
Returns the time difference between the valid (output) time and the analysis (simulation start) time.
Definition at line 129 of file wrfbase.py.
def hwrf.wrfbase.WRFOutput.path | ( | self | ) |
Returns the full path to the output file.
Definition at line 117 of file wrfbase.py.
Referenced by hwrf.wrfbase.WRFOutput.__repr__(), and hwrf.wrfbase.WRFOutput.__str__().
def hwrf.wrfbase.WRFOutput.stream | ( | self | ) |
Returns the lower-case name of the WRF stream.
Definition at line 120 of file wrfbase.py.
Referenced by hwrf.wrfbase.WRFOutput.__repr__(), and hwrf.wrfbase.WRFOutput.__str__().
def hwrf.wrfbase.WRFOutput.validtime | ( | self | ) |
Returns the output time as a datetime.datetime.
Definition at line 135 of file wrfbase.py.
Referenced by hwrf.wrfbase.WRFOutput.__repr__().