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

This subclass of GRIB2Op represents a GRIB2 file on disk that is ALREADY PRESENT. More...

Detailed Description

This subclass of GRIB2Op represents a GRIB2 file on disk that is ALREADY PRESENT.

Its is_ready function is overridden to assume the file is always ready, and its "make" method simply returns self.

Definition at line 1787 of file regrib.py.

Inheritance diagram for hwrf.regrib.GRIB2File:
hwrf.regrib.GRIB2Op hwrf.regrib.GRIBOp hwrf.regrib.GRIBBase hwrf.regrib.GRIB2Product

Public Member Functions

def __init__ (self, grib2file, grib2index, grib2grid)
 GRIB2File constructor. More...
 
def is_ready (self, args, kwargs)
 Returns True. More...
 
def input_valid (self, kwargs)
 Returns True. More...
 
def make (self, args, kwargs)
 Returns self. More...
 
def getgrib2file (self)
 Returns the GRIB2 file's location. More...
 
def getgrib2index (self)
 This is a placeholder for future development. More...
 
def getgrib2grid (self)
 This is a placeholder for future development. More...
 
- Public Member Functions inherited from hwrf.regrib.GRIB2Op
def __init__ (self, action, args)
 GRIB2Op constructor. More...
 
def to_grib1 (self)
 Returns a GRIB2Op that converts this operation's output to GRIB1.
 
def to_grib2 (self)
 Returns self (converting GRIB2 to GRIB2 is a no-op)
 
def __mul__ (self, grid)
 If grid is the special constant GRIB1, this is the same as to_grib1(), if GRIB2, then returns self. 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...
 

Properties

 resultfile
 The path to the result file, in this case the GRIB2 file. More...
 
 grib2file
 The path to the GRIB2 file which is assumed to already exist. More...
 
 grib2index
 This is a placeholder for future GRIB2 subsetting support. More...
 
 grib2grid
 This is a placeholder for future GRIB2 regridding support. More...
 
- Properties inherited from hwrf.regrib.GRIBOp
 action
 A read-only property: this objects action function. More...
 

Constructor & Destructor Documentation

def hwrf.regrib.GRIB2File.__init__ (   self,
  grib2file,
  grib2index,
  grib2grid 
)

GRIB2File constructor.

Parameters
grib2fileThe grib2 file path.
grib2indexThe grib 2 index file path.
grib2gridGRIB2 grid information.

Definition at line 1792 of file regrib.py.

Member Function Documentation

def hwrf.regrib.GRIB2File.getgrib2file (   self)

Returns the GRIB2 file's location.

Definition at line 1816 of file regrib.py.

def hwrf.regrib.GRIB2File.getgrib2grid (   self)

This is a placeholder for future development.

It returns the grib2grid argument from the constructor.

Definition at line 1823 of file regrib.py.

def hwrf.regrib.GRIB2File.getgrib2index (   self)

This is a placeholder for future development.

It returns the grib2index argument from the constructor.

Definition at line 1819 of file regrib.py.

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

Returns True.

The file is already present, so any kwargs make a valid input.

Parameters
kwargsIgnored.

Definition at line 1806 of file regrib.py.

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

Returns True.

The operation is ready to run because it has nothing to do: the file is already present.

Parameters
args,kwargsIgnored.

Definition at line 1801 of file regrib.py.

def hwrf.regrib.GRIB2File.make (   self,
  args,
  kwargs 
)

Returns self.

This class represents a GRIB2 file, so it is its own output.

Parameters
args,kwargsIgnored.

Definition at line 1811 of file regrib.py.

Property Documentation

hwrf.regrib.GRIB2File.grib2file
static
Initial value:
1 = property(getgrib2file,None,None,
2  'The path to the GRIB2 file which is assumed to already exist.')

The path to the GRIB2 file which is assumed to already exist.

Definition at line 1835 of file regrib.py.

hwrf.regrib.GRIB2File.grib2grid
static
Initial value:
1 = property(getgrib2grid,None,None,
2  "This is a placeholder for future GRIB2 regridding support")

This is a placeholder for future GRIB2 regridding support.

Definition at line 1845 of file regrib.py.

Referenced by hwrf.regrib.GRIB2Product.deliver(), and hwrf.regrib.GRIB2Product.undeliver().

hwrf.regrib.GRIB2File.grib2index
static
Initial value:
1 = property(getgrib2index,None,None,
2  'This is a placeholder for future GRIB2 subsetting support')

This is a placeholder for future GRIB2 subsetting support.

Definition at line 1840 of file regrib.py.

Referenced by hwrf.regrib.GRIB2Product.deliver(), and hwrf.regrib.GRIB2Product.undeliver().

hwrf.regrib.GRIB2File.resultfile
static
Initial value:
1 = property(getgrib2file,None,None,
2  'The path to the result file, in this case the GRIB2 file.')

The path to the result file, in this case the GRIB2 file.

Definition at line 1830 of file regrib.py.


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