RAVE
Lib.gadjust.gra Namespace Reference

Classes

class  gra_coefficient
class  gra
 Gauge-Radar Analysis class. More...

Functions

 generate (points, DATE, TIME, LOGFILE=GADJUST_STATFILE)
 Generator of gauge-adjustment coefficients.
 general_correlation (points)
 Computes the correlation coefficient between gauge and radar (dBR).

Variables

 logger = rave_pgf_logger.create_logger()
str A

Detailed Description

Copyright (C) 2012- 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

◆ general_correlation()

general_correlation ( points)

Computes the correlation coefficient between gauge and radar (dBR).

Parameters
pointslist of rave_synop.gra points
Returns
tuple containing correlation coefficient, sample size, and boolean string 'T' or 'F' as to whether the correlation is statistically significant.

◆ generate()

generate ( points,
DATE,
TIME,
LOGFILE = GADJUST_STATFILE )

Generator of gauge-adjustment coefficients.

Parameters
pointslist of rave_synop.gra points
DATEstring date in format YYYYMMDD
TIMEstring time in format HHmm
LOGFILEfile name of the file to which to write statistics

Variable Documentation

◆ A

str Lib.gadjust.gra.A
Initial value:
= """
from rave_synop import point
gr = [0.12, 1.0, 1.25, 1.5, 2.0, 2.25, 3.0, 4.0, 5.0, 6.0, 8.0]
dist = [2.0, 25.0, 50.0, 75.0, 100.0, 125.0, 150.0, 175.0, 200.0, 225.0, 250.0]
points = []
# gr.append(-20.0)
# dist.append(110.0)
for i in range(len(gr)):
p = point()
p.dist = dist[i]
p.gr = gr[i]
points.append(p)
g = gra(points)
a, b, c, m, dev, loss = g.get_2nd_order_adjustment()
print g.significant, len(g.points), loss, g.corr_coeff, a, b, c, m, dev
"""