HWRF
trunk@4391
|
abstract base class of wrf/real_nmm input providers More...
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.
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 | |
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.
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.
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.
product | the produtil.datastore.Product to link |
excclass | the class of Exception to raise on error |
logger | the logging.Logger to use for logging |
just_check | if True, just check for data, but link nothing |
target | the 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().