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

superclass of WRFDomain More...

Detailed Description

superclass of WRFDomain

This is the superclass of WRFDomain and it should not be instantiated directly. It exists to eliminate a cyclic dependency in the module imports.

Definition at line 144 of file wrfbase.py.

Inheritance diagram for hwrf.wrfbase.WRFDomainBase:
hwrf.wrf.WRFDomain

Public Member Functions

def __init__
 Creates a new WRFDomainBase. More...
 
def __hash__ (self)
 an integer representation for hashing
 
def __repr__ (self)
 a detailed string representation
 
def __cmp__ (self, other)
 integer comparison for sorting, like the cmp function. More...
 
def __str__ (self)
 synonym for repr()
 
def get_anl_time (self)
 returns the analysis time More...
 
def get_grid_id (self)
 Raises NotImplementedError. More...
 
def remove_forbidden (self)
 removes forbidden namelist entries More...
 
def copy (self)
 Returns a copy of this object. More...
 
def set_timing (self, start, end, timestep)
 sets the start and end times of this domain, and the domain timestep More...
 
def init_domain (self, grid_id)
 initializes grid ID and non-nesting-related variables More...
 
def init_as_moad (self, simstart, simend, simdt, eta_levels)
 initializes this domain as the outermost domain More...
 
def init_as_nest (self, parent, grid_id, start, end)
 initializes this domain as a nest More...
 
def make_namelist (self)
 creates the wrf namelist as a string, and returns it. More...
 

Public Attributes

 nestlevel
 the wrf nesting level
 
 parent
 the parent domain
 
 nocolons
 should colons be eliminated from filenames?
 
 nl
 the hwrf.namelist.Conf2Namelist with namelist information for this domain
 
 name
 the name of this domain
 

Constructor & Destructor Documentation

def hwrf.wrfbase.WRFDomainBase.__init__ (   self,
  conf,
  section,
  name = None,
  copy = None 
)

Creates a new WRFDomainBase.

conf - an HWRFConfig with configuration information section - the section to read for information about this domain name - the name of the domain. Default: section name. copy - do not specify this. It is used by self.copy() to copy a WRFDomainBase.

Definition at line 150 of file wrfbase.py.

Member Function Documentation

def hwrf.wrfbase.WRFDomainBase.__cmp__ (   self,
  other 
)

integer comparison for sorting, like the cmp function.

Sorts by domain's string name.

Parameters
otherthe domain to compare against

Definition at line 209 of file wrfbase.py.

def hwrf.wrfbase.WRFDomainBase.copy (   self)

Returns a copy of this object.

The copy has its own data structures, so modifying the copy will not modify the original.

Definition at line 248 of file wrfbase.py.

Referenced by produtil.mpiprog.MPIRanksSPMD.__add__(), produtil.mpiprog.MPIRank.__add__(), produtil.mpiprog.MPIRank.__getitem__(), and produtil.prog.ImmutableRunner.runner().

def hwrf.wrfbase.WRFDomainBase.get_anl_time (   self)

returns the analysis time

Returns the parent _start time if there is a parent, otherwise returns this domain's analysis time.

Definition at line 217 of file wrfbase.py.

Referenced by hwrf.wrf.WRFDomain.trackpatcf_file().

def hwrf.wrfbase.WRFDomainBase.get_grid_id (   self)

Raises NotImplementedError.

The WRFDomain overrides this to return the grid id.

Definition at line 226 of file wrfbase.py.

def hwrf.wrfbase.WRFDomainBase.init_as_moad (   self,
  simstart,
  simend,
  simdt,
  eta_levels 
)

initializes this domain as the outermost domain

Initializes this domain's variables so it knows to act as the Mother Of All Domains (MOAD) - the outermost domain. The grid ID is set to 1 and the parent to None.

Parameters
simstartsimulation start time
simendsimulation end time
simdtsimulation outer domain timestep
eta_levelsNMM eta vertical levels as set in the eta_levels namelist value.

Definition at line 301 of file wrfbase.py.

def hwrf.wrfbase.WRFDomainBase.init_as_nest (   self,
  parent,
  grid_id,
  start,
  end 
)

initializes this domain as a nest

Initializes this domain's variables to make it a nest within the given parent WRFDomain

Parameters
parentthe parent of this nest
grid_idthe grid ID
startthe nest's start time
endthe nest's end time

Definition at line 316 of file wrfbase.py.

def hwrf.wrfbase.WRFDomainBase.init_domain (   self,
  grid_id 
)

initializes grid ID and non-nesting-related variables

Initializes this domain's variables that are unrelated to nesting.

Parameters
grid_idthe grid id in WRF (1=moad, 2=...)

Definition at line 295 of file wrfbase.py.

Referenced by hwrf.wrfbase.WRFDomainBase.init_as_nest().

def hwrf.wrfbase.WRFDomainBase.make_namelist (   self)

creates the wrf namelist as a string, and returns it.

Definition at line 334 of file wrfbase.py.

def hwrf.wrfbase.WRFDomainBase.remove_forbidden (   self)

removes forbidden namelist entries

Removes all namelist entries that the conf files are forbidden from specifying. Generally this is anything related to domain start, end, size, I/O or timesteps.

Definition at line 231 of file wrfbase.py.

def hwrf.wrfbase.WRFDomainBase.set_timing (   self,
  start,
  end,
  timestep 
)

sets the start and end times of this domain, and the domain timestep

Validates the provided inputs through _validate_timespan(). If accepted, sets the start and end times, and the timestep.

Parameters
startthe start time of the simulation
endthe end time of the simulation
timestepthe simulation timestep or output frequency

Definition at line 282 of file wrfbase.py.

Referenced by hwrf.wrfbase.WRFDomainBase.init_as_nest().


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