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

abstract base class of wrf/real_nmm input providers More...

Detailed Description

abstract base class of wrf/real_nmm input providers

This is the abstract base class of anything that gets, or creates, input files for a WRF simulation without running another Task. For example, something that copies the geogrid output would be a subclass of Input2Fcst

Definition at line 59 of file fcsttask.py.

Inheritance diagram for hwrf.fcsttask.Input2Fcst:
hwrf.fcsttask.Fort652WRF hwrf.fcsttask.Geog2WRF hwrf.fcsttask.Met2WRF hwrf.fcsttask.Prep2WRF hwrf.fcsttask.WRFAnl2WRF hwrf.fcsttask.WRFBdy2WRF hwrf.fcsttask.WRFInput2WRF

Public Member Functions

def __init__ (self, src)
 creates a new Input2Fcst with the specified src. More...
 
def get_inputs (self, just_check=False, kwargs)
 copies or links input files. More...
 
def link_product
 helper function that links data More...
 

Public Attributes

 src
 the implementation-defined source, used by subclasses
 

Constructor & Destructor Documentation

def hwrf.fcsttask.Input2Fcst.__init__ (   self,
  src 
)

creates a new Input2Fcst with the specified src.

The src is implementation-dependent and can be interpreted as desired by subclasses. If no "src" is needed, None is acceptable.

Definition at line 66 of file fcsttask.py.

Member Function Documentation

def hwrf.fcsttask.Input2Fcst.get_inputs (   self,
  just_check = False,
  kwargs 
)

copies or links input files.

This function is unimplemented: subclasses are expected to replace it. If just_check=True, checks to see if inputs are available, returning True if they are and False otherwise. If just_check=False, then the files are actually copied or linked.

This default implementation does nothing and returns True.

Returns
True on success, False otherwise

Definition at line 73 of file fcsttask.py.

Referenced by hwrf.mpipomtc.POMInit.run().

def hwrf.fcsttask.Input2Fcst.link_product (   self,
  product,
  excclass,
  logger,
  target = None,
  just_check = False 
)

helper function that links data

If just_check=True, checks to see if data is available, returning True if it is, and False otherwise. If just_check is False, then the file is linked from the given product to the target location (basename(product.location) if no target is provided). If the product is not yet available or has no location, then the given exception class excclass is raised.

Returns
True on success, False otherwise
Parameters
productthe produtil.datastore.Product to link
excclassthe class of Exception to raise on error
loggerthe logging.Logger to use for logging
just_checkif True, just check for data, but link nothing
targetthe name of the link

Definition at line 86 of file fcsttask.py.

Referenced by hwrf.fcsttask.Input2Fcst.get_inputs(), hwrf.fcsttask.Geog2WRF.get_inputs(), hwrf.fcsttask.Met2WRF.get_inputs(), hwrf.fcsttask.WRFInput2WRF.get_inputs(), hwrf.fcsttask.Fort652WRF.get_inputs(), hwrf.fcsttask.WRFAnl2WRF.get_inputs(), hwrf.fcsttask.WRFBdy2WRF.get_inputs(), and hwrf.fcsttask.Prep2WRF.get_inputs().


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