HWRF  trunk@4391
Public Member Functions | Properties | List of all members
hwrf.regrib.GRIBOp Class Reference

This is the abstract base class for all GRIB1 and GRIB2 files and operators. More...

Detailed Description

This is the abstract base class for all GRIB1 and GRIB2 files and operators.

It should never be instantiated directly.

Definition at line 1462 of file regrib.py.

Inheritance diagram for hwrf.regrib.GRIBOp:
hwrf.regrib.GRIBBase hwrf.regrib.GRIB1Op hwrf.regrib.GRIB2Op hwrf.regrib.GRIB1Fetcher hwrf.regrib.GRIB1File hwrf.regrib.GRIB1Selector hwrf.regrib.UpstreamGRIB1 hwrf.tracker.GRIB1VintTave hwrf.regrib.GRIB2File hwrf.regrib.GRIB1Product hwrf.post.EGRIB1Product hwrf.regrib.GRIB2Product

Public Member Functions

def __init__ (self, action, args)
 Creates a GRIBOp that has a number of child GRIBBase objects, with a specified action to perform in the GRIBOp.make method. More...
 
def getaction (self)
 Returns the action, a function or callable object. More...
 
def args (self)
 Iterates over all child GRIBBase objects. More...
 
def is_ready (self, args, kwargs)
 Returns the logical "and" of is_ready(*args,**kwargs) called on all subobjects. More...
 
def input_valid (self, kwargs)
 Returns the logical "and" of input_valid(**kwargs) called on all subobjects. More...
 
def make (self, regrib, kwargs)
 Runs the action specified in the constructor, providing as arguments regrib, and the result of running make on all of the other arguments sent to the constructor. More...
 
def __repr__ (self)
 A string representation of this GRIB operation. More...
 
- Public Member Functions inherited from hwrf.regrib.GRIBBase
def is_ready (self, args, kwargs)
 Returns True if this object and its subobjects are all ready for a call to make, and False otherwise. More...
 
def input_valid (self, kwargs)
 Returns True if the specified kwargs are valid and False otherwise. More...
 
def make (self, regrib, kwargs)
 Runs the action this object should perform and returns another GRIBBase object. More...
 

Properties

 action
 A read-only property: this objects action function. More...
 

Constructor & Destructor Documentation

def hwrf.regrib.GRIBOp.__init__ (   self,
  action,
  args 
)

Creates a GRIBOp that has a number of child GRIBBase objects, with a specified action to perform in the GRIBOp.make method.

The action should be a callable object that takes as input a Regrib, the contents of args and any keyword arguments sent to make.

Parameters
actionthe function that performs the operation
argsarguments to the action

Definition at line 1465 of file regrib.py.

Member Function Documentation

def hwrf.regrib.GRIBOp.__repr__ (   self)

A string representation of this GRIB operation.

Definition at line 1522 of file regrib.py.

Referenced by produtil.prog.Runner.__str__().

def hwrf.regrib.GRIBOp.args (   self)
def hwrf.regrib.GRIBOp.getaction (   self)

Returns the action, a function or callable object.

Definition at line 1475 of file regrib.py.

def hwrf.regrib.GRIBOp.input_valid (   self,
  kwargs 
)

Returns the logical "and" of input_valid(**kwargs) called on all subobjects.

Parameters
kwargsPassed to source.has_data. The meaning is implementation-specific, but generally the kwargs are used for string replacement in an hwrf.config.HWRFConfig

Definition at line 1497 of file regrib.py.

def hwrf.regrib.GRIBOp.is_ready (   self,
  args,
  kwargs 
)

Returns the logical "and" of is_ready(*args,**kwargs) called on all subobjects.

Parameters
args,kwargsPassed to arg.is_ready. The meaning is implementation-specific, but generally the kwargs are used for string replacement in an hwrf.config.HWRFConfig

Definition at line 1487 of file regrib.py.

def hwrf.regrib.GRIBOp.make (   self,
  regrib,
  kwargs 
)

Runs the action specified in the constructor, providing as arguments regrib, and the result of running make on all of the other arguments sent to the constructor.

Parameters
regriba Regrib for data storage
kwargsPassed to the action. The meaning is implementation-specific, but generally the kwargs are used for string replacement in an hwrf.config.HWRFConfig

Definition at line 1507 of file regrib.py.

Property Documentation

hwrf.regrib.GRIBOp.action
static
Initial value:
1 = property(getaction,None,None,
2  )

A read-only property: this objects action function.

Definition at line 1485 of file regrib.py.


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