A GRIBBase that subsets GRIB files, keeping only certain parameters.
More...
A GRIBBase that subsets GRIB files, keeping only certain parameters.
Definition at line 1366 of file regrib.py.
|
def | __init__ |
| GRIBSubsetter 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 | getsubsetname (self) |
| Returns a name of this subset for use in filenames. More...
|
|
def | getgrib1sub (self) |
| Returns an iterator that takes as its only argument an array of lines of wgrib -s output. More...
|
|
def | getgrib2sub (self) |
| This is a placeholder for future GRIB2 subsetting support. More...
|
|
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...
|
|
def hwrf.regrib.GRIBSubsetter.__init__ |
( |
|
self, |
|
|
|
subsetname, |
|
|
|
grib1sub = None , |
|
|
|
grib2sub = None |
|
) |
| |
GRIBSubsetter constructor.
Creates a GRIBSubsetter with a given name, a callable object grib1sub that will be sent to produtil.gribop.grib1subset, and an unused grib2sub that will be used for GRIB2 subsetting one day.
- Parameters
-
grib1sub | Callable object that iterates over wgrib -s output and yields only fields that should be kept, potentially in a new order. |
grib2sub | Unsupported: GRIB2 subsetter. |
subsetname | The subsetname is mandatory and will be used to generate temporary filenames. |
Definition at line 1368 of file regrib.py.
def hwrf.regrib.GRIBSubsetter.getgrib1sub |
( |
|
self | ) |
|
Returns an iterator that takes as its only argument an array of lines of wgrib -s output.
Definition at line 1402 of file regrib.py.
def hwrf.regrib.GRIBSubsetter.getgrib2sub |
( |
|
self | ) |
|
This is a placeholder for future GRIB2 subsetting support.
Definition at line 1406 of file regrib.py.
def hwrf.regrib.GRIBSubsetter.getsubsetname |
( |
|
self | ) |
|
Returns a name of this subset for use in filenames.
Definition at line 1399 of file regrib.py.
def hwrf.regrib.GRIBSubsetter.input_valid |
( |
|
self, |
|
|
|
kwargs |
|
) |
| |
Returns True.
The subsetter's product (itself) does not vary with the kwargs, so any input is valid.
- Parameters
-
kwargs | Ignored, but used by subclasses. |
Definition at line 1390 of file regrib.py.
def hwrf.regrib.GRIBSubsetter.is_ready |
( |
|
self, |
|
|
|
args, |
|
|
|
kwargs |
|
) |
| |
Returns True.
The subsetter is its own product, so it is always "ready."
- Parameters
-
args,kwargs | Ignored, but used by subclasses. |
Definition at line 1385 of file regrib.py.
def hwrf.regrib.GRIBSubsetter.make |
( |
|
self, |
|
|
|
args, |
|
|
|
kwargs |
|
) |
| |
Returns self.
The subsetter is its own product.
- Parameters
-
args,kwargs | Ignored, but used by subclasses. |
Definition at line 1395 of file regrib.py.
hwrf.regrib.GRIBSubsetter.grib1sub |
|
static |
Initial value: 1 = property(getgrib1sub,
None,
None,
Read-only property: a callable object that chooses the fields to keep and their order.
Definition at line 1420 of file regrib.py.
hwrf.regrib.GRIBSubsetter.grib2sub |
|
static |
Initial value: 1 = property(getgrib2sub,
None,
None,
Unused: the grib2 subsetter.
Definition at line 1426 of file regrib.py.
hwrf.regrib.GRIBSubsetter.subsetname |
|
static |
Initial value: 1 = property(getsubsetname,
None,
None,
Read-only property: the name of the subset.
Definition at line 1413 of file regrib.py.
The documentation for this class was generated from the following file:
- /mnt/pan2/projects/hwrfv3/Samuel.Trahan/trunk/ush/hwrf/regrib.py