ROPO
Loading...
Searching...
No Matches
ropo_realtime Namespace Reference

Classes

class  options
 Class used to organize options and argument values to ropo. More...
 

Functions

 init ()
 Initializes the ARGS dictionary by reading content from XML file.
 
 get_options (inobj)
 Based on the /what/source attribute, find site-specific options/arguments.
 
 copy_topwhat (ino, outo)
 Copies the top-level 'what' attributes from one object to another.
 
 process_scan (scan, options, quality_control_mode=QUALITY_CONTROL_MODE_ANALYZE_AND_APPLY)
 TODO: activate parameters list.
 
 process_pvol (pvol, options, quality_control_mode=QUALITY_CONTROL_MODE_ANALYZE_AND_APPLY)
 Loops through a volume and processes scans using process_scan.
 
 generate (inobj, reprocess_quality_flag=True, quality_control_mode=QUALITY_CONTROL_MODE_ANALYZE_AND_APPLY)
 Generate - does the real work.
 
 PadNrays (scan, options)
 Internal function to wrap rays near 360-0 degrees.
 
 UnpadNrays (scan, classification, gates)
 Internal function to unwrap a scan from overlapping rays.
 

Variables

 CONFIG_FILE
 Contains site-specific argument settings.
 
dict THRESHOLDS
 Dictionary containing static reflectivity thresholds, one for each month of the year.
 
int initialized = 0
 
dict ARGS = {}
 

Detailed Description

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

This file is part of the bRopo extension to 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

◆ copy_topwhat()

copy_topwhat ( ino,
outo )

Copies the top-level 'what' attributes from one object to another.

Fixes /what/source in the process, if it doesn't contain the NOD identifier.

Parameters
inoinput PVOL or SCAN object
outooutput PVOL or SCAN object

Definition at line 130 of file ropo_realtime.py.

◆ generate()

generate ( inobj,
reprocess_quality_flag = True,
quality_control_mode = QUALITY_CONTROL_MODE_ANALYZE_AND_APPLY )

Generate - does the real work.

Parameters
inobjSCAN or PVOL object
reprocess_quality_flagSpecifies if the quality flag should be reprocessed or not.
Returns
SCAN or PVOL object, with anomalies hopefully identified and removed

Definition at line 218 of file ropo_realtime.py.

◆ get_options()

get_options ( inobj)

Based on the /what/source attribute, find site-specific options/arguments.

Parameters
inobjinput SCAN or PVOL object
Returns
options object. If the look-up fails, then default options are returned

Definition at line 117 of file ropo_realtime.py.

◆ init()

init ( )

Initializes the ARGS dictionary by reading content from XML file.

Definition at line 68 of file ropo_realtime.py.

◆ PadNrays()

PadNrays ( scan,
options )

Internal function to wrap rays near 360-0 degrees.

This addresses a design flaw in ropo's original C code that leads to data being removed in this sector. NOTE that this fix is only being made available at the Python level.

Parameters
scaninput scan object

ref options instance containing options and their values.

Returns
tuple containing scan object and int gates, which is the number of gates the scan should be wrapped with.

Definition at line 254 of file ropo_realtime.py.

◆ process_pvol()

process_pvol ( pvol,
options,
quality_control_mode = QUALITY_CONTROL_MODE_ANALYZE_AND_APPLY )

Loops through a volume and processes scans using process_scan.

Parameters
pvolinput PVOL object
optionsvariable-length object containing argument names and values
Returns
PVOL object containing detected and removed anomalies

Definition at line 191 of file ropo_realtime.py.

◆ process_scan()

process_scan ( scan,
options,
quality_control_mode = QUALITY_CONTROL_MODE_ANALYZE_AND_APPLY )

TODO: activate parameters list.

This first version uses only the default, assumes DBZH. TODO: separation of probability fields.

Parameters
scaninput SCAN object
optionsvariable-length object containing argument names and values
Returns
scan object containing detected and removed anomalies

Definition at line 145 of file ropo_realtime.py.

◆ UnpadNrays()

UnpadNrays ( scan,
classification,
gates )

Internal function to unwrap a scan from overlapping rays.

Parameters
scaninput scan object
classificationinput RaveField object containing probability of anomaly
gatesint number of gates the scan has been wrapped with.
Returns
tuple containing scan object and classification, both unpadded

Definition at line 284 of file ropo_realtime.py.

Variable Documentation

◆ ARGS

dict ARGS = {}

Definition at line 65 of file ropo_realtime.py.

◆ CONFIG_FILE

CONFIG_FILE
Initial value:
1= os.path.join(os.path.join(os.path.split(os.path.split(_ropogenerator.__file__)[0])[0],
2 'config'), 'ropo_options.xml')

Contains site-specific argument settings.

Definition at line 43 of file ropo_realtime.py.

◆ initialized

int initialized = 0

Definition at line 63 of file ropo_realtime.py.

◆ THRESHOLDS

dict THRESHOLDS
Initial value:
1= {"COLD" : (-6, -4, -2, 0, 2, 4, 6, 4, 2, 0, -2, -4),
2 "VERY_COLD" : (-12, -10, -6, -4, 0, 4, 6, 4, -4, -8, -10, -12),
3 "TEMPERATE" : (0, 2, 4, 6, 8, 10, 10, 8, 6, 4, 2, 0),
4 "FLAT-10" : (-10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10),
5 "FLAT-24" : (-24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24),
6 "FLAT-30" : (-30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, -30),
7 "NONE" : None
8 }

Dictionary containing static reflectivity thresholds, one for each month of the year.

To be used when initially thresholding reflectivity data. Add and use entries as you please.

Definition at line 53 of file ropo_realtime.py.