HWRF
trunk@4391
|
superclass of WRFDomain More...
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.
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 | |
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.
def hwrf.wrfbase.WRFDomainBase.__cmp__ | ( | self, | |
other | |||
) |
integer comparison for sorting, like the cmp function.
Sorts by domain's string name.
other | the 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.
simstart | simulation start time |
simend | simulation end time |
simdt | simulation outer domain timestep |
eta_levels | NMM 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
parent | the parent of this nest |
grid_id | the grid ID |
start | the nest's start time |
end | the 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.
grid_id | the 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.
start | the start time of the simulation |
end | the end time of the simulation |
timestep | the simulation timestep or output frequency |
Definition at line 282 of file wrfbase.py.
Referenced by hwrf.wrfbase.WRFDomainBase.init_as_nest().