RAVE
Lib.odc_hac Namespace Reference

Classes

class  HAC
 

Functions

 init ()
 Initializes the ARGS dictionary by reading config from XML file.
 
 lastMonth (YYYYMM)
 Convenience functions.
 
 hacFile (scan, lastmonth=False)
 Derives a file string from the input object.
 
 hacIncrement (obj, quant="DBZH")
 Increments the HAC file(s) for the given object.
 
 incrementScan (scan, quant="DBZH")
 Increments the HAC file for this scan.
 
 incrementPvol (pvol, quant="DBZH")
 Increments all the HAC files for the scans in a volume, assuming we only wanty to deal with DBZH.
 
 hacFilter (obj, quant="DBZH")
 Filters the given object.
 
 filterScan (scan, quant="DBZH")
 Filters this scan.
 
 filterPvol (pvol, quant="DBZH")
 Filters this scan.
 
 multi_increment (fstrs, procs=None)
 Multiprocesses the incrementation.
 
 zdiffScan (scan, thresh=40.0)
 Odds and ends below.
 
 zdiffPvol (pvol, thresh=40.0)
 
 zdiff (obj, thresh=40.0)
 

Variables

str HACDATA = rave_defines.RAVEROOT + '/share/hac/data'
 
str CONFIG_FILE = rave_defines.RAVECONFIG + '/hac_options.xml'
 
int initialized = 0
 
dict ARGS = {}
 

Detailed Description

Copyright (C) 2013- Swedish Meteorological and Hydrological Institute (SMHI)

This file is part of RAVE.

RAVE is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

RAVE is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License
along with RAVE.  If not, see <http://www.gnu.org/licenses/>.

Function Documentation

◆ filterPvol()

Lib.odc_hac.filterPvol ( pvol,
quant = "DBZH" )

Filters this scan.

We will assume we only want to deal with DBZH.

Parameters
scanpolar scan object

◆ filterScan()

Lib.odc_hac.filterScan ( scan,
quant = "DBZH" )

Filters this scan.

We will assume we only want to deal with DBZH.

Parameters
scanpolar scan object

◆ hacFile()

Lib.odc_hac.hacFile ( scan,
lastmonth = False )

Derives a file string from the input object.

Parameters
scanthat must be an individual SCAN. This SCAN's /what/source must contain a valid NOD identifier.
lastmonthboolean specifying whether to read the previous month's file.
Returns
string file string

◆ hacFilter()

Lib.odc_hac.hacFilter ( obj,
quant = "DBZH" )

Filters the given object.

Parameters
objinput SCAN or PVOL

◆ hacIncrement()

Lib.odc_hac.hacIncrement ( obj,
quant = "DBZH" )

Increments the HAC file(s) for the given object.

Parameters
objinput SCAN or PVOL, can also be a file string

◆ incrementPvol()

Lib.odc_hac.incrementPvol ( pvol,
quant = "DBZH" )

Increments all the HAC files for the scans in a volume, assuming we only wanty to deal with DBZH.

Parameters
pvolpolar volume object

◆ incrementScan()

Lib.odc_hac.incrementScan ( scan,
quant = "DBZH" )

Increments the HAC file for this scan.

We will assume we only want to deal with DBZH.

Parameters
scanpolar scan object

◆ init()

Lib.odc_hac.init ( )

Initializes the ARGS dictionary by reading config from XML file.

◆ lastMonth()

Lib.odc_hac.lastMonth ( YYYYMM)

Convenience functions.

Takes a year-month string and returns the previous month's equivalent string.

Parameters
YYYYMMyear-month string
Returns
year-month string

◆ multi_increment()

Lib.odc_hac.multi_increment ( fstrs,
procs = None )

Multiprocesses the incrementation.

Parameters
fstrslist of input file strings
procsint number of concurrent processes, defaults to the max allowed
Returns
list of returned tuples from hacIncrement

◆ zdiffScan()

Lib.odc_hac.zdiffScan ( scan,
thresh = 40.0 )

Odds and ends below.

Z-diff quality indicator. Takes the difference between uncorrected and corrected reflectivities and derives a quality indicator out of it. The threshold is the maximum difference in dBZ giving the equivalent of zero quality.

Parameters
scanPolar scan
threshfloat maximum Z-diff allowed