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

This subclass of GRIB1Op represents a GRIB1 file on disk that is ALREADY PRESENT. More...

Detailed Description

This subclass of GRIB1Op represents a GRIB1 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 1667 of file regrib.py.

Inheritance diagram for hwrf.regrib.GRIB1File:
hwrf.regrib.GRIB1Op hwrf.regrib.GRIBOp hwrf.regrib.GRIBBase hwrf.regrib.GRIB1Product

Public Member Functions

def __init__
 GRIB1File constructor. More...
 
def input_valid (self, kwargs)
 Returns True. More...
 
def is_ready (self, args, kwargs)
 Returns True. More...
 
def make (self, args, kwargs)
 Returns self. More...
 
def getnscenter (self)
 Returns the domain center latitude. More...
 
def getewcenter (self)
 Returns the domain center longitude. More...
 
def getgrib1file (self)
 Returns the GRIB1 file's location. More...
 
def getgrib1index (self)
 Returns the location of the file that stores the output of wgrib -s. More...
 
def getgrib1grbindex (self)
 Returns the location of the file that stores the output of the grbindex program run on the GRIB1 file. More...
 
def setgrib1grbindex (self, here)
 Sets the location of the file that stores the output of the grbindex program run on the GRIB1 file. More...
 
def getgrib1grid (self)
 Returns the GRIB1 grid information as a string. More...
 
def wgrib_s (self, regrib)
 Returns the output of wgrib -s run on this file, which may be from cached data. More...
 
- Public Member Functions inherited from hwrf.regrib.GRIB1Op
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...
 

Properties

 resultfile
 Read-only: the path to the result file, in this case the GRIB1 file. More...
 
 grib1file
 Read-only: the path to the GRIB1 file which is assumed to already exist. More...
 
 grib1index
 Read-only: either None or the wgrib -s index file for the GRIB1 file. More...
 
 grib1grbindex
 Mutable property: either None or the grbindex binary index file for the GRIB1 file. More...
 
 grib1grid
 Read-only: either None or the copygb -g argument data for the GRIB1 file's grid. More...
 
 nscenter
 Read-only: the center latitude of this GRIB1 file in degrees North. More...
 
 ewcenter
 Read-only: the center longitude of this GRIB1 file in degrees East. More...
 
- Properties inherited from hwrf.regrib.GRIBOp
 action
 A read-only property: this objects action function. More...
 

Constructor & Destructor Documentation

def hwrf.regrib.GRIB1File.__init__ (   self,
  grib1file,
  grib1index,
  grib1grid,
  nscenter = None,
  ewcenter = None,
  grib1grbindex = None 
)

GRIB1File constructor.

Parameters
grib1fileThe file path.
grib1indexPath to the wgrib -s output
grib1gridGrid information.
nscenter,ewcenterLatitude and longitude of the grid center point, in degrees North and East
grib1grbindexPath to the grbindex output.

Definition at line 1673 of file regrib.py.

Member Function Documentation

def hwrf.regrib.GRIB1File.getewcenter (   self)

Returns the domain center longitude.

Definition at line 1713 of file regrib.py.

def hwrf.regrib.GRIB1File.getgrib1file (   self)

Returns the GRIB1 file's location.

Definition at line 1716 of file regrib.py.

def hwrf.regrib.GRIB1File.getgrib1grbindex (   self)

Returns the location of the file that stores the output of the grbindex program run on the GRIB1 file.

Definition at line 1723 of file regrib.py.

def hwrf.regrib.GRIB1File.getgrib1grid (   self)

Returns the GRIB1 grid information as a string.

Definition at line 1731 of file regrib.py.

def hwrf.regrib.GRIB1File.getgrib1index (   self)

Returns the location of the file that stores the output of wgrib -s.

Definition at line 1719 of file regrib.py.

def hwrf.regrib.GRIB1File.getnscenter (   self)

Returns the domain center latitude.

Definition at line 1710 of file regrib.py.

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

Returns True.

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

Parameters
kwargsIgnored.

Definition at line 1695 of file regrib.py.

def hwrf.regrib.GRIB1File.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 1700 of file regrib.py.

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

Returns self.

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

Parameters
args,kwargsIgnored.

Definition at line 1705 of file regrib.py.

def hwrf.regrib.GRIB1File.setgrib1grbindex (   self,
  here 
)

Sets the location of the file that stores the output of the grbindex program run on the GRIB1 file.

Definition at line 1727 of file regrib.py.

def hwrf.regrib.GRIB1File.wgrib_s (   self,
  regrib 
)

Returns the output of wgrib -s run on this file, which may be from cached data.

Parameters
regriba Regrib for data storage

Definition at line 1734 of file regrib.py.

Property Documentation

hwrf.regrib.GRIB1File.ewcenter
static
Initial value:
1 = property(getewcenter,None,None,
2  'Returns None or the center longitude of this GRIB1 file.')

Read-only: the center longitude of this GRIB1 file in degrees East.

Definition at line 1784 of file regrib.py.

hwrf.regrib.GRIB1File.grib1file
static
Initial value:
1 = property(getgrib1file,None,None,
2  'The path to the GRIB1 file which is assumed to already exist.')

Read-only: the path to the GRIB1 file which is assumed to already exist.

Definition at line 1759 of file regrib.py.

Referenced by hwrf.regrib.GRIB1File.wgrib_s().

hwrf.regrib.GRIB1File.grib1grbindex
static
Initial value:
1 = property(getgrib1grbindex,setgrib1grbindex,None,
2  'Either None or the grbindex binary index file for the GRIB1 file.')

Mutable property: either None or the grbindex binary index file for the GRIB1 file.

Definition at line 1769 of file regrib.py.

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

hwrf.regrib.GRIB1File.grib1grid
static
Initial value:
1 = property(getgrib1grid,None,None,
2  "Either None or the copygb -g argument data for the GRIB1 file's grid")

Read-only: either None or the copygb -g argument data for the GRIB1 file's grid.

Definition at line 1774 of file regrib.py.

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

hwrf.regrib.GRIB1File.grib1index
static
Initial value:
1 = property(getgrib1index,None,None,
2  'Either None or the wgrib -s index file for the GRIB1 file.')

Read-only: either None or the wgrib -s index file for the GRIB1 file.

Definition at line 1764 of file regrib.py.

Referenced by hwrf.regrib.GRIB1Product.deliver(), hwrf.regrib.GRIB1Product.undeliver(), and hwrf.regrib.GRIB1File.wgrib_s().

hwrf.regrib.GRIB1File.nscenter
static
Initial value:
1 = property(getnscenter,None,None,
2  'Returns None or the center latitude of this GRIB1 file.')

Read-only: the center latitude of this GRIB1 file in degrees North.

Definition at line 1779 of file regrib.py.

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

Read-only: the path to the result file, in this case the GRIB1 file.

Definition at line 1754 of file regrib.py.


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