HWRF  trunk@4391
Public Member Functions | Public Attributes | List of all members
hwrf.relocate.RelocationInfo Class Reference

Passes information about relocation status between relocation stages. More...

Detailed Description

Passes information about relocation status between relocation stages.

This class is used to pass information between the relocate stages. There are three public member variables that ARE meant to be written depending on logic within the relocation Stage1, Stage2 and Stage3 classes. One then writes out the relocation status information to an intermediate file at the end of each relocation stage using self.write_info. It is read in by a later step of the relocation, or by the merge, via RelocationInfo(filename,...)

Definition at line 66 of file relocate.py.

Inheritance diagram for hwrf.relocate.RelocationInfo:

Public Member Functions

def __init__
 Creates a new RelocationInfo object by reading in the specified *.info file. More...
 
def __str__ (self)
 A Pythonic string representation of this object. More...
 
def make_warm_cold
 Returns the module-level constants COLD or WARM, or None, for the specified string value. More...
 
def warm_cold_str (self)
 This is the opposite of the make_warm_cold routine: it returns "COLD", "WARM", or "None" for the constants COLD, WARM or None based on self.warm_cold_flag.
 
def read_info
 Reads the relocation information into this object from the specified filename. More...
 
def write_info
 Writes this object's relocation information to the specified *.info file. More...
 

Public Attributes

 iflag_cold
 An int 0 or 1 used by several of the Fortran relocation programs to trigger based on warm or cold starts. More...
 
 warm_cold_flag
 The constants WARM, COLD or None to indicate warm vs. More...
 
 cold_ok
 Set to True if the relocation intentionally vetoes warm starting. More...
 
 initopt
 Initialization flag variable for the relocation. More...
 
 ensda_relocate
 
 ensda_relocate_continue
 
 from_file
 The file that was read in. More...
 

Constructor & Destructor Documentation

def hwrf.relocate.RelocationInfo.__init__ (   self,
  filename = None 
)

Creates a new RelocationInfo object by reading in the specified *.info file.

Definition at line 89 of file relocate.py.

Member Function Documentation

def hwrf.relocate.RelocationInfo.__str__ (   self)

A Pythonic string representation of this object.

Definition at line 122 of file relocate.py.

def hwrf.relocate.RelocationInfo.make_warm_cold (   self,
  value,
  logger = None 
)

Returns the module-level constants COLD or WARM, or None, for the specified string value.

Parameters
valueA string that is "WARM", "COLD" or "NONE" and is case-insensitive. If it has any other value, None is returned and a message is logged at ERROR level (if a logger is given).
loggera logging.Logger for log messages.

Definition at line 129 of file relocate.py.

Referenced by hwrf.relocate.RelocationInfo.read_info().

def hwrf.relocate.RelocationInfo.read_info (   self,
  filename,
  logger = None 
)

Reads the relocation information into this object from the specified filename.

This is called automatically by the constructor. Error messages are logged to the given logger, if one is provided.

Parameters
filenamethe name of the file to read
loggera logging.Logger for log messages

Definition at line 154 of file relocate.py.

def hwrf.relocate.RelocationInfo.write_info (   self,
  filename,
  logger = None 
)

Writes this object's relocation information to the specified *.info file.

Logs errors to the specified logger, if one is present.

Parameters
filenamethe file to write
loggera logging.Logger for log messages

Definition at line 181 of file relocate.py.

Member Data Documentation

hwrf.relocate.RelocationInfo.cold_ok

Set to True if the relocation intentionally vetoes warm starting.

This is done, for example, if the storm is weak or shallow.

Definition at line 94 of file relocate.py.

Referenced by hwrf.relocate.RelocationInfo.__str__(), hwrf.relocate.RelocationInfo.read_info(), and hwrf.relocate.RelocationInfo.write_info().

hwrf.relocate.RelocationInfo.from_file

The file that was read in.

Definition at line 100 of file relocate.py.

hwrf.relocate.RelocationInfo.iflag_cold

An int 0 or 1 used by several of the Fortran relocation programs to trigger based on warm or cold starts.

Definition at line 92 of file relocate.py.

Referenced by hwrf.relocate.RelocationInfo.__str__(), hwrf.relocate.RelocationInfo.read_info(), and hwrf.relocate.RelocationInfo.write_info().

hwrf.relocate.RelocationInfo.initopt

Initialization flag variable for the relocation.

Definition at line 95 of file relocate.py.

Referenced by hwrf.relocate.RelocationInfo.__str__(), hwrf.relocate.RelocationInfo.read_info(), and hwrf.relocate.RelocationInfo.write_info().

hwrf.relocate.RelocationInfo.warm_cold_flag

The constants WARM, COLD or None to indicate warm vs.

cold starts.

  • WARM — this is a warm start (prior cycle vortex is in use)
  • COLD — this is a cold start (no prior cycle vortex in use)
  • None — it is not known whether this is a cold or warm start.

Definition at line 93 of file relocate.py.

Referenced by hwrf.relocate.RelocationInfo.read_info(), and hwrf.relocate.RelocationInfo.warm_cold_str().


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