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

This subclass of GRIBOp produces GRIB1 files. More...

Detailed Description

This subclass of GRIBOp produces GRIB1 files.

It introduces a number of convenience calls:

These can be combined, of course, and follow the usual Python order of precedence:

As with the GRIB2Op, there are also to_grib1() and to_grib2() methods which return self, and a GRIB2 conversion of self, respectively.

Definition at line 1552 of file regrib.py.

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

Public Member Functions

def __init__ (self, action, args)
 Creates a new GRIB1Op, passing all arguments to the superclass constructor. More...
 
def to_grib1 (self)
 Returns self. More...
 
def to_grib2 (self)
 Returns a GRIB2Op that will make a GRIB2 version of this operation's output. More...
 
def regridmerge (self, grid, other)
 Returns a GRIB1Op that will ask copygb to merge the other grid on top of this one. More...
 
def make_grbindex (self)
 Returns a GRIB1Op that will run grbindex and save the results, unless that has already been done. More...
 
def __div__ (self, subsetter)
 Returns a GRIB1Op that will subset this one using the specified subsetter. More...
 
def __mul__ (self, grid)
 If the grid is a GRIBGridBase, returns a GRIB1Op that will regrid this GRIB1Op's output to that grid. More...
 
def __add__ (self, other)
 If the argument is a GRIBOp, returns a GRIB1Op that will paste a GRIB1 version of that operations output onto this operation's output. More...
 
- Public Member Functions inherited from hwrf.regrib.GRIBOp
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...
 

Additional Inherited Members

- Properties inherited from hwrf.regrib.GRIBOp
 action
 A read-only property: this objects action function. More...
 

Constructor & Destructor Documentation

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

Creates a new GRIB1Op, passing all arguments to the superclass constructor.

Parameters
action,argsPassed to GRIBOp.__init__

Definition at line 1570 of file regrib.py.

Member Function Documentation

def hwrf.regrib.GRIB1Op.__add__ (   self,
  other 
)

If the argument is a GRIBOp, returns a GRIB1Op that will paste a GRIB1 version of that operations output onto this operation's output.

For any other argument type, returns NotImplemented.

Parameters
othera GRIBOp whose output will be interpolated on top of this one.

Definition at line 1618 of file regrib.py.

def hwrf.regrib.GRIB1Op.__div__ (   self,
  subsetter 
)

Returns a GRIB1Op that will subset this one using the specified subsetter.

Parameters
subsettera GRIBSubsetter to do the subsetting.

Definition at line 1597 of file regrib.py.

def hwrf.regrib.GRIB1Op.__mul__ (   self,
  grid 
)

If the grid is a GRIBGridBase, returns a GRIB1Op that will regrid this GRIB1Op's output to that grid.

If grid is the special constant GRIB2, returns self.to_grib2. If it is the constant GRIB1, returns self.to_grib1. Otherwise, returns NotImplemented.

Parameters
gridConstants GRIB1, GRIB2, or a GRIBGridBase

Definition at line 1604 of file regrib.py.

def hwrf.regrib.GRIB1Op.make_grbindex (   self)

Returns a GRIB1Op that will run grbindex and save the results, unless that has already been done.

Definition at line 1593 of file regrib.py.

def hwrf.regrib.GRIB1Op.regridmerge (   self,
  grid,
  other 
)

Returns a GRIB1Op that will ask copygb to merge the other grid on top of this one.

Parameters
gridThe target grid (GRIBGrid) for both objects
otherThe other GRIB1 file producer to regrid.

Definition at line 1582 of file regrib.py.

def hwrf.regrib.GRIB1Op.to_grib1 (   self)

Returns self.

The GRIB1Op already produces a GRIB1 file.

Definition at line 1575 of file regrib.py.

Referenced by hwrf.regrib.GRIB1Op.__mul__().

def hwrf.regrib.GRIB1Op.to_grib2 (   self)

Returns a GRIB2Op that will make a GRIB2 version of this operation's output.

Definition at line 1578 of file regrib.py.

Referenced by hwrf.regrib.GRIB1Op.__mul__().


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