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

Detailed Description

This class should be subclassed to make coupling component
initializers for CoupledWRF.  That is, you should implement a
subclass and send it to the CoupledWRF.couple(...,initer=).  Its
job is to provide input data and initialization checks for the
various coupling components such as ocean and wave.  Note that the
CoupledWRF itself initializes the WRF and coupler, so you do not
need a ComponentIniter for those components.

Definition at line 39 of file coupling.py.

Inheritance diagram for hwrf.coupling.ComponentIniter:
hwrf.hycom.HYCOMIniter hwrf.mpipomtc.POMIniter hwrf.ww3.WW3Initer

Public Member Functions

def check_coupled_inputs (self, logger)
 
def link_coupled_inputs (self, just_check, logger)
 
def make_exe (self, task, exe, ranks)
 

Member Function Documentation

def hwrf.coupling.ComponentIniter.check_coupled_inputs (   self,
  logger 
)
This function implements a very fast (<1 second) check to
see if the components initialization was complete.  Returns
True on success or False on failure.

Definition at line 47 of file coupling.py.

Referenced by hwrf.coupling.ComponentIniter.link_coupled_inputs(), and hwrf.hycom.HYCOMIniter.link_coupled_inputs().

def hwrf.coupling.ComponentIniter.link_coupled_inputs (   self,
  just_check,
  logger 
)
If just_check is True, then this function implements a more
expensive check of whether the initialization for this
component succeeded.  If just_check is False, then this
component should link or copy all files needed to run a
coupled forecast.  The default implementation calls
check_coupled_inputs if just_check is True, and simply returns
True if just_check is False.  Subclasses should re-implement
this function.

Definition at line 53 of file coupling.py.

def hwrf.coupling.ComponentIniter.make_exe (   self,
  task,
  exe,
  ranks 
)
Called when it is time to actually run the coupled forecast
executables.  Returns a produtil.mpiprog.MPIRanksBase for the
MPI ranks for this component of the coupling.  By default,
this returns mpi(task.getexe(exe))*ranks.  However, the caller
can re-implement this function to replace the executable
depending on the results of the initialization.  If that is
desired, the task.getexe (and other task.get*) should be used
so the executable locations can be overridden in the config
files.

Definition at line 65 of file coupling.py.


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