Title: | Precipitation Intensity, Concentration and Anomaly Analysis |
---|---|
Description: | It contains functions to analyze the precipitation intensity, concentration and anomaly. |
Authors: | Lucas Venezian Povoa [aut, cre], Jonas Teixeira Nery [ctb] |
Maintainer: | Lucas Venezian Povoa <[email protected]> |
License: | GPL (>= 2) |
Version: | 2.3.0 |
Built: | 2025-02-17 03:59:58 UTC |
Source: | https://github.com/lucasvenez/precintcon |
It calculates the amount and percentage of precipitation contributed by a such percent of rainiest days.
app(..., percent = 25)
app(..., percent = 25)
percent |
is the percentage of the rainiest days to be considered (default = 25). |
... |
a set of daily precipitation series. |
data.frame containing the following variables:
dataset
is the dataset name of the precipitation serie;
percentage
is the percentage of the rainiest days;
absolute
is the absolute amount of precipitation generated by percentage
relative
is the percentage of precipitation benerated by percentage
Lucas Venezian Povoa [email protected]
## # Loading the daily precipitation serie data(daily) ## # Calculating amount and percentage of precipitation using different parameters app(daily) app(daily, percent = 20) app(daily, percent = c(10, 15, 20, 25))
## # Loading the daily precipitation serie data(daily) ## # Calculating amount and percentage of precipitation using different parameters app(daily) app(daily, percent = 20) app(daily, percent = c(10, 15, 20, 25))
Converts a daily, monthly, or seasonal precipitation serie to an annual serie.
as.annual(object)
as.annual(object)
object |
a precintcon.daily, precintcon.monthly, or precintcon.seasonal object or a data.frame containing 33 or 3 columns. |
A data.frame (precintcon.annual) containing the following variables:
year
is the year.
precipitation
is the precipitation amount in millimeters.
Lucas Venezian Povoa [email protected]
as.daily
as.monthly
as.seasonal
pplot.lorenz
read.data
## # Loading the daily precipitation serie. data(daily) ## # Converting precipitation as.annual(daily)
## # Loading the daily precipitation serie. data(daily) ## # Converting precipitation as.annual(daily)
Converts a data.frame
to a precintcon.daily
.
as.daily(object, na.value = NA)
as.daily(object, na.value = NA)
object |
a precintcon.daily or a data.frame containing 33 columns. |
na.value |
the value used for representing non-existent values (Default value: NA). |
A data.frame
(precintcon.daily
) containing the
following variables:
year
is the year.
month
is the month.
d1
is the precipitation value in millimeters of the 1st day
of the month.
d2
is the precipitation value in millimeters of the 2nd day
of the month.
d3
is the precipitation value in millimeters of the 3rd day
of the month.
d4
is the precipitation value in millimeters of the 4th day
of the month.
d5
is the precipitation value in millimeters of the 5th day
of the month.
d6
is the precipitation value in millimeters of the 6th day
of the month.
d7
is the precipitation value in millimeters of the 7th day
of the month.
d8
is the precipitation value in millimeters of the 8th day
of the month.
d9
is the precipitation value in millimeters of the 9th day
of the month.
d10
is the precipitation value in millimeters of the 10th day
of the month.
d11
is the precipitation value in millimeters of the 11th day
of the month.
d12
is the precipitation value in millimeters of the 12th day
of the month.
d13
is the precipitation value in millimeters of the 13th day
of the month.
d14
is the precipitation value in millimeters of the 14th day
of the month.
d15
is the precipitation value in millimeters of the 15th day
of the month.
d16
is the precipitation value in millimeters of the 16th day
of the month.
d17
is the precipitation value in millimeters of the 17th day
of the month.
d18
is the precipitation value in millimeters of the 18th day
of the month.
d19
is the precipitation value in millimeters of the 19th day
of the month.
d20
is the precipitation value in millimeters of the 20th day
of the month.
d21
is the precipitation value in millimeters of the 21th day
of the month.
d22
is the precipitation value in millimeters of the 22th day
of the month.
d23
is the precipitation value in millimeters of the 23th day
of the month.
d24
is the precipitation value in millimeters of the 24th day
of the month.
d25
is the precipitation value in millimeters of the 25th day
of the month.
d26
is the precipitation value in millimeters of the 26th day
of the month
d27
is the precipitation value in millimeters of the 27th day
of the month.
d28
is the precipitation value in millimeters of the 28th day
of the month.
d29
is the precipitation value in millimeters of the 29th day
of the month.
d30
is the precipitation value in millimeters of the 30th day
of the month.
d31
is the precipitation value in millimeters of the 31th day
of the month.
Lucas Venezian Povoa [email protected]
as.decade
as.annual
as.seasonal
as.monthly
## # Loading the daily precipitation serie. data(daily) ## # Converting precipitation as.daily(daily)
## # Loading the daily precipitation serie. data(daily) ## # Converting precipitation as.daily(daily)
It converts a daily, monthly or annual precipitation serie to a decade serie.
as.decade(object)
as.decade(object)
object |
a precintcon.daily, precintcon.monthly, precintcon.seasonal, precintcon.annual object or a data.frame containing 33 or 3 columns. |
It excludes no complete decades for converting the serie, e.g., a serie starting in 1977 and finishing in 2008 will have the year 1977 to 1979 and 2000 to 2008 excluded, resulting into a serie of the years 1980 and 1990.
A data.frame (precintcon.decade) containing the following variables:
year
is the year.
precipitation
is the decade's precipitation in millimeters.
Lucas Venezian Povoa [email protected]
as.precintcon.annual
as.precintcon.seasonal
as.precintcon.monthly
as.precintcon.daily
## # Loading the daily precipitation serie. data(daily) ## # Converting precipitation as.decade(daily)
## # Loading the daily precipitation serie. data(daily) ## # Converting precipitation as.decade(daily)
Groups the monthly precipitation into decis, i.e., it splits a precipitation serie into ten equal parts in crescent order, from the lower to the highest precipitation.
as.precintcon.deciles(object)
as.precintcon.deciles(object)
object |
a daily or monthly precipitation serie. |
A data.frame (precintcon.deciles) containing the following variables:
D1
corresponds to the precipitation values not exceeding 10%
of the lowest values.
D2
corresponds to the precipitation values not exceeding 20
of the lowest values.
D3
corresponds to the precipitation values not exceeding 30
of the lowest values.
D4
corresponds to the precipitation values not exceeding 40%
of the lowest values.
D5
is equals to the median that corresponds to the precipitation
values not exceeding 50% of the lowest values.
D6
corresponds to the precipitation values not exceeding 60%
of the lowest values.
D7
corresponds to the precipitation values not exceeding 70
of the lowest values.
D8
corresponds to the precipitation values not exceeding 80
of the lowest values.
D9
corresponds to the precipitation values not exceeding 90
of the lowest values.
D10
corresponds to the precipitation values not exceeding 100
of the lowest values.
Lucas Venezian Povoa [email protected]
Calculates the frequency distribution of a daily precipitation
serie based on interval
.
as.precintcon.fd(object, interval = 1)
as.precintcon.fd(object, interval = 1)
object |
a daily precipitation serie. |
interval |
the interval in millimeters for calculating the frequency distribution. |
A data.frame (precintcon.fd) containing the following variables:
initial.class
is the initial value of the class.
final.class
is the final value of the class.
midpoint
is the middle point of the class.
n
is the absolute freqnecy, i.e., the number of days in each
class.
sum.n
is the cumulative frequency, obtained by adding the absolute
frequencies of all the classes up to the one under consideration.
P
is the pluviometric total of each class, obtained by multiplying
midpoint
by n
.
sum.P
is the cummulative class's pluviometric total, obtained by
adding the pluviometric total of all the classes up to the one under consideration.
p.sum.n
is the cumulative percentage of rainy days.
p.sum.P
is the cumulative percentage of rainfall amounts.
Lucas Venezian Povoa [email protected]
## # Loading the daily precipitation serie data(daily) ## # Performing the frequency distribution as.precintcon.fd(daily)
## # Loading the daily precipitation serie data(daily) ## # Performing the frequency distribution as.precintcon.fd(daily)
Converts a daily precipitation serie to a monthly serie.
as.monthly(object)
as.monthly(object)
object |
a precintcon.daily object or a data.frame containing 33 or 3 columns |
A data.frame (precintcon.monthly) containing the following variables:
year
is the year.
month
is the month.
precipitation
is the precipitation amount in millimeters.
Lucas Venezian Povoa [email protected]
## Loading the daily precipitation serie. # data(daily) ## Converting precipitation # as.monthly(daily)
## Loading the daily precipitation serie. # data(daily) ## Converting precipitation # as.monthly(daily)
It converts a daily or monthly precipitation serie to a seasonal serie according to meteorological seasons.
as.seasonal(object)
as.seasonal(object)
object |
a precintcon.daily, or precintcon.monthly object or a data.frame containing 33 or 3 columns. |
If the serie has no a month of a season, it is waived in convertion, e.g., if a serie has January and February of 1975, but no December of 1974, the first two months are removed of the resulting serie because the season that depends all of them is not complete.
A data.frame (precintcon.seasonal) containing the following variables:
year
is the year.
season
is the season.
precipitation
is the precipitation amount in millimeters.
Lucas Venezian Povoa [email protected]
## # Loading the daily precipitation serie. data(daily) ## # Converting precipitation as.seasonal(daily)
## # Loading the daily precipitation serie. data(daily) ## # Converting precipitation as.seasonal(daily)
Calculates the Concentration Index (CI) on a daily precipitation serie.
ci(..., interval = 1)
ci(..., interval = 1)
interval |
the interval in millimeters applied for calculating the concentration index. (Default value: 1) |
... |
a set of daily precipitation series. |
A data.frame containing the following variables:
dataset
is the precipitation serie name.
a
is the constant of the exponential curve defined via the
least-squares method.
b
is the constant of the exponential curve defined via the
least-squares method.
r2
is the determination of coefficient of determination (R2) of
the exponential model.
A
is the area over the exponential curve.
S
is the are compressed for the exponential curve.
ci
is the concentration index.
Lucas Venezian Povoa [email protected]
pplot.lorenz
read.data
as.daily
## # Loading the daily precipitation serie. data(daily) ## # Performing the Concentration Index Analysis ci(daily, interval = 1)
## # Loading the daily precipitation serie. data(daily) ## # Performing the Concentration Index Analysis ci(daily, interval = 1)
Calculates the Concentration Index (CI) per year on a daily precipitation serie.
ci.per.year(object, interval = 1)
ci.per.year(object, interval = 1)
object |
a daily precipitation serie. |
interval |
the interval in millimeters applied for calculating the concentration index. (Default value: 1) |
A data.frame (precintcon.ci) containing the following variables:
year
is the year.
ci
is the concentration index.
Lucas Venezian Povoa [email protected]
pplot.lorenz
read.data
as.daily
## # Loading the daily precipitation serie. data(daily) ## # Performing the Concentration Index Analysis ci.per.year(daily, interval = 1)
## # Loading the daily precipitation serie. data(daily) ## # Performing the Concentration Index Analysis ci.per.year(daily, interval = 1)
It calculates the coefficient of variance of a monthly precipitation.
cv(object)
cv(object)
object |
is a daily or monthly precipitation serie. |
A daily precipitation serie is transformed to a monthly serie.
the coefficient of variance
Lucas Venezian Povoa [email protected]
## # Loading the montly precipitation serie. data(monthly) ## # Calculating the Coefficient of Variance cv(monthly)
## # Loading the montly precipitation serie. data(monthly) ## # Calculating the Coefficient of Variance cv(monthly)
This data set gives the daily precipitation (in millimeters) between 1976 and 2010, as compiled by the National Water Agency (ANA), Brazil.
data(daily)
data(daily)
A data frame with 420 observations on the following 33 variables:
year
the year.
month
the month.
d1
the precipitation value in millimeters of the day #1 of the month.
d2
the precipitation value in millimeters of the day #2 of the month.
d3
the precipitation value in millimeters of the day #3 of the month.
d4
the precipitation value in millimeters of the day #4 of the month.
d5
the precipitation value in millimeters of the day #5 of the month.
d6
the precipitation value in millimeters of the day #6 of the month.
d7
the precipitation value in millimeters of the day #7 of the month.
d8
the precipitation value in millimeters of the day #8 of the month.
d9
the precipitation value in millimeters of the day #9 of the month.
d10
the precipitation value in millimeters of the day #10 of the month.
d11
the precipitation value in millimeters of the day #11 of the month.
d12
the precipitation value in millimeters of the day #12 of the month.
d13
the precipitation value in millimeters of the day #13 of the month.
d14
the precipitation value in millimeters of the day #14 of the month.
d15
the precipitation value in millimeters of the day #15 of the month.
d16
the precipitation value in millimeters of the day #16 of the month.
d17
the precipitation value in millimeters of the day #17 of the month.
d18
the precipitation value in millimeters of the day #18 of the month.
d19
the precipitation value in millimeters of the day #19 of the month.
d20
the precipitation value in millimeters of the day #20 of the month.
d21
the precipitation value in millimeters of the day #21 of the month.
d22
the precipitation value in millimeters of the day #22 of the month.
d23
the precipitation value in millimeters of the day #23 of the month.
d24
the precipitation value in millimeters of the day #24 of the month.
d25
the precipitation value in millimeters of the day #25 of the month.
d26
the precipitation value in millimeters of the day #26 of the month.
d27
the precipitation value in millimeters of the day #27 of the month.
d28
the precipitation value in millimeters of the day #28 of the month.
d29
the precipitation value in millimeters of the day #29 of the month.
d30
the precipitation value in millimeters of the day #30 of the month.
d31
the precipitation value in millimeters of the day #31 of the month.
National Water Agency (ANA) http://www2.ana.gov.br/Paginas/default.aspx
data(daily) ## maybe pci(daily) ; rai(daily) ...
data(daily) ## maybe pci(daily) ; rai(daily) ...
It calculates the Approximated Rainfall Erosivity Factor according to the ff index.
ff.index(object)
ff.index(object)
object |
is a daily or monthly precipitation serie |
the ff index in millimeters
Lucas Venezian Povoa
Ferro, V., Giordano, G., Iovino, M. (1991). Isoerosivity and Erosion Risk Map for Sicily. Hydrolog. Sci. J. 36, 549-564
## # Loading the daily precipitation serie. data(daily) ## # Calculating ff index ff.index(daily)
## # Loading the daily precipitation serie. data(daily) ## # Calculating ff index ff.index(daily)
Calculates the upper and lower limit on a set of daily or monthly precipitation series.
limits(...)
limits(...)
... |
a set of daily or monthly precipitation series. |
A data.frame containing the following variables:
dataset
is the precipitation serie name.
max
is the maximum value in the precipitation serie.
max.date
is the first date of the maximum precipitation serie.
min
is the minimum value in the precipitation serie.
min.date
is the first date of the minimum precipitation serie.
Lucas Venezian Povoa [email protected]
## # Loading the monthly precipitation serie. data(monthly) ## # Performing the Concentration Index Analysis limits(monthly)
## # Loading the monthly precipitation serie. data(monthly) ## # Performing the Concentration Index Analysis limits(monthly)
This dataset gives the monthly precipitation (in millimeters) between 1950 and 1992, as compiled by the National Water Agency (ANA), Brazil.
data(monthly)
data(monthly)
A data frame with 516 observations on the following 3 variables:
year
the year.
month
the month.
precipitation
the precipitation amount in millimeters.
National Water Agency (ANA) http://www2.ana.gov.br/Paginas/default.aspx
data(monthly) ## maybe pci(monthly) ; rai(monthly) ...
data(monthly) ## maybe pci(monthly) ; rai(monthly) ...
Calculates the Precipitation Concentration Degree (PCD) on a daily or monthly precipitation serie.
pcd(object)
pcd(object)
object |
a daily or monthly precipitation serie. |
A data.frame containing the following variables:
year
is the year.
pcd
is the percentage of precipitation concentration corresponding to a year.
Values closer to 0 mean precipitation dispersion among all months and 1 concentration into only a month.
Lucas Venezian Povoa [email protected]
Zhang LJ, Qian YF (2003) Annual distribution features of precipitation in China and their interannual variations. J Acta Meteorological Sinica 17:146-163
pplot.pcd
read.data
as.daily
as.monthly
## # Loading the monthly precipitation serie. data(monthly) ## # Performing the Precipitation Concentration Index analysis pcd(monthly)
## # Loading the monthly precipitation serie. data(monthly) ## # Performing the Precipitation Concentration Index analysis pcd(monthly)
It calculates the Precipitation Concentration Index (PCI) on a daily or monthly precipitation serie.
pci(object)
pci(object)
object |
a daily or monthly precipitation serie. |
A data.frame containing the following variables:
year
is the year.
pci
is the precipitation concentration index.
Lucas Venezian Povoa [email protected]
pplot.pci
read.data
as.daily
as.monthly
## # Loading the monthly precipitation serie. data(monthly) ## # Performing the Precipitation Concentration Index analysis pci(monthly)
## # Loading the monthly precipitation serie. data(monthly) ## # Performing the Precipitation Concentration Index analysis pci(monthly)
It calculates the Precipitation Concentration Index (PCI) in a seasonal granularity on a daily or monthly precipitation serie.
pci.seasonal(object, hemisthere)
pci.seasonal(object, hemisthere)
object |
is a daily or monthly precipitation serie |
hemisthere |
is the hemisthere, "n" for northern and "s" for south, of the precipitation serie |
A data.frame containing the following variables:
year
is the year;
season
is the meteorological season; and
pci.seasonal
is the seasonal perceptation concentration index.
Lucas Venezian Povoa [email protected]
## # Loading the daily precipitation serie data(daily) ## # Calculating the seasonal perceptation concentration index pci.seasonal(daily, hemisthere = "s")
## # Loading the daily precipitation serie data(daily) ## # Calculating the seasonal perceptation concentration index pci.seasonal(daily, hemisthere = "s")
It calculates the supraseasonal precipitation concentration index.
pci.supraseasonal(object, hemisthere = c("n", "s"))
pci.supraseasonal(object, hemisthere = c("n", "s"))
object |
is a daily or monthly precipitation serie. |
hemisthere |
is the hemisthere, "n" for northern and "s" for south, of the precipitation serie. |
A data.frame containing the following variables:
year
is the year;
season
is the meteorological supraseason, wet or dry; and
pci.season
is the seasonal perceptation concentration index.
Lucas Venezian Povoa [email protected]
M. de Luis, J. C. Gonz\'alez-Hidalgo, M. Brunetti, L. A. Longares (2011). Precipitation concentration changes in Spain 1946-2005. Natural Hazards and Earth System Science, 5:11, pp. 1259–1265
## # Loading the daily precipitation serie data(daily) ## # Calculating the supraseasonal precipitation concentration index pci.supraseasonal(daily, hemisthere = "s")
## # Loading the daily precipitation serie data(daily) ## # Calculating the supraseasonal precipitation concentration index pci.supraseasonal(daily, hemisthere = "s")
Calculates the Precipitation Concentration Period (PCP) on a daily or monthly precipitation serie.
pcp(object)
pcp(object)
object |
a daily or monthly precipitation serie. |
A data.frame containing the following variables:
year
is the year.
pcp
is the precipitation concentration period, in degree, corresponding to a year.
Results correspond to a month like below when using the 'azimuth' default values:
0 = January, 30 = February, 60 = March, ..., 300 = November, and 330 = December.
Lucas Venezian Povoa [email protected]
Zhang L.J., Qian Y.F. (2003) Annual distribution features of precipitation in China and their interannual variations. J Acta Meteorological Sinica 17:146-163
pplot.pcp
read.data
as.daily
as.monthly
## # Loading the monthly precipitation serie. data(monthly) ## # Performing the Precipitation Concentration Degree analysis pcd(monthly)
## # Loading the monthly precipitation serie. data(monthly) ## # Performing the Precipitation Concentration Degree analysis pcd(monthly)
Calculates the Percentage of Normal (PN) on a daily or monthly precipitation serie.
pn(object, interval = 30, scale = "a")
pn(object, interval = 30, scale = "a")
object |
a daily or monthly precipitation serie. |
interval |
the number of months applied for calculating the percentage of normal. |
scale |
the scale used for calculating the percentage of normal, which should be either "w" for weak (not supported yet), "m" for month, "s" for season, or "d" for decades. |
A data.frame (precintcon.pn) containing the following variables:
year
is the year.
month
is the month. It exists only whether scale = "m".
pn
is the percentage of normal.
Lucas Venezian Povoa [email protected]
pplot.pn
read.data
as.daily
as.monthly
## # Loading the monthly precipitation serie. data(monthly) ## # Performing the Percentage of Normal analysis pn(monthly)
## # Loading the monthly precipitation serie. data(monthly) ## # Performing the Percentage of Normal analysis pn(monthly)
Plots the deciles of a precipitation serie.
pplot.deciles(..., ylab = "Precipitation", legend.title = "Legend", legend = NULL, fontsize = 10, axis.text.color = "black", export = FALSE, export.name = "deciles_plot.png", width = 8.6, height = 7.5, units = "cm", grouped = FALSE)
pplot.deciles(..., ylab = "Precipitation", legend.title = "Legend", legend = NULL, fontsize = 10, axis.text.color = "black", export = FALSE, export.name = "deciles_plot.png", width = 8.6, height = 7.5, units = "cm", grouped = FALSE)
ylab |
the text for the y axis. (Default value: "Precipitation") |
legend.title |
the text for the legend title. (Default value: "Legend") |
legend |
the text vector for the legend items. If NULL the legends will be equals to the variable names. (Default value: NULL) |
fontsize |
the font size value in pt. (Default value: 10) |
axis.text.color |
the legend colors. (Default value: "black") |
export |
the logical value for defining whether the graph should be export to a file or not. (Default value: FALSE) |
export.name |
the text for defining the exported file name. It is only used if export = TRUE. (Default value: "deciles_plot.png") |
width |
the number for defining the exported graph width. It is only used if export = TRUE. (Default value: 8.6) |
height |
the number for defining the exported graph height. It is only used if export = TRUE. (Default value: 7.5) |
units |
the text for defining the units of the height and width parameters. It is only used if export = TRUE. (Default value: "cm") |
grouped |
the logical value for defining whether the graphs should be plotted in group. |
... |
a set of daily or monthly precipitation serie. |
Lucas Venezian Povoa [email protected]
## Loading the monthly precipitation serie. # data(monthly) ## Performing the a set of statistical analysis # pplot.deciles(monthly)
## Loading the monthly precipitation serie. # data(monthly) ## Performing the a set of statistical analysis # pplot.deciles(monthly)
Plots the histogram of a precipitation serie.
pplot.histogram(..., density = FALSE, xlab = "Precipitation (mm)", ylab = "Frequency", legend.title = "Legend", legend = NULL, fontsize = 10, axis.text.color = "black", export = FALSE, export.name = "histogram_plot.png", width = 10, height = 10, units = "cm")
pplot.histogram(..., density = FALSE, xlab = "Precipitation (mm)", ylab = "Frequency", legend.title = "Legend", legend = NULL, fontsize = 10, axis.text.color = "black", export = FALSE, export.name = "histogram_plot.png", width = 10, height = 10, units = "cm")
density |
the logical value for defining whether the graph should be plotted with bars or lines. (Default value: FALSE) |
xlab |
the text for the x axis. (Default value: "Precipitation (mm)") |
ylab |
the text for the y axis. (Default value: "Frequency") |
legend.title |
the text for the legend title. (Default value: "Legend") |
legend |
the text vector for the legend items. If NULL the legends will be equals to the variable names. (Default value: NULL) |
fontsize |
the font size value in pt. (Default value: 10) |
axis.text.color |
the legend colors. (Default value: "black") |
export |
the logical value for defining whether the graph should be export to a file or not. (Default value: FALSE) |
export.name |
the text for defining the exported file name. It is only used if export = TRUE. (Default value: "histogram_plot.png") |
width |
the number for defining the exported graph width. It is only used if export = TRUE. (Default value: 10) |
height |
the number for defining the exported graph height. It is only used if export = TRUE. (Default value: 10) |
units |
the text for defining the units of the height and width parameters. It is only used if export = TRUE. (Default value: "cm") |
... |
a set of daily or monthly precipitation series. |
Lucas Venezian Povoa [email protected]
## # Loading the daily precipitation serie. data(daily) ## # Performing the a set of statistical analysis pplot.histogram(daily)
## # Loading the daily precipitation serie. data(daily) ## # Performing the a set of statistical analysis pplot.histogram(daily)
Plots the Lorenz's curve of a precipitation serie.
pplot.lorenz(..., interval = 1, grouped = FALSE, xlab = expression(sum(n[i]), i==1), ylab = expression(sum(P[i]), i==1), legend.title = "Legend", legend = NULL, fontsize = 10, axis.text.color = "black", export = FALSE, export.name = "lorenz_plot.png", width = 8.6, height = 7.5, units = "cm")
pplot.lorenz(..., interval = 1, grouped = FALSE, xlab = expression(sum(n[i]), i==1), ylab = expression(sum(P[i]), i==1), legend.title = "Legend", legend = NULL, fontsize = 10, axis.text.color = "black", export = FALSE, export.name = "lorenz_plot.png", width = 8.6, height = 7.5, units = "cm")
interval |
the interval in millimeters applied for calculating the Lorenz's curve. (Default value: 1) |
grouped |
the logical value for defining whether all series should be plotted in the same graph or not. (Default value: FALSE) |
xlab |
the text for the x axis. (Default value: expression(sum(n[i]), i==1) |
ylab |
the text for the y axis. (Default value: expression(sum(P[i]), i==1)) |
legend.title |
the text for the legend title. (Default value: "Legend") |
legend |
the text vector for the legend items. If NULL the legends will be equals to the variable names. (Default value: NULL) |
fontsize |
the font size value in pt. (Default value: 10) |
axis.text.color |
the legend colors. (Default value: "black") |
export |
the logical value for defining whether the graph should be export to a file or not. (Default value: FALSE) |
export.name |
the text for defining the exported file name. It is only used if export = TRUE. (Default value: "histogram_plot.png") |
width |
the number for defining the exported graph width. It is only used if export = TRUE. (Default value: 10) |
height |
the number for defining the exported graph height. It is only used if export = TRUE. (Default value: 10) |
units |
the text for defining the units of the height and width parameters. It is only used if export = TRUE. (Default value: "cm") |
... |
a set of daily precipitation series. |
Lucas Venezian Povoa [email protected]
## # Loading the daily precipitation serie. data(daily) ## # Performing the a set of statistical analysis pplot.ci(daily, interval = 1)
## # Loading the daily precipitation serie. data(daily) ## # Performing the a set of statistical analysis pplot.ci(daily, interval = 1)
Plots the Precipitation Concentraition Degre per year of a precipitation serie.
pplot.pcd(..., xlab = "Year", ylab = "PCD", ylim = c(0,360), legend = NULL, fontsize = 10, axis.text.color = "black", export = FALSE, export.name = "pcd_plot.png", width = 8.6, height = 7.5, units = "cm")
pplot.pcd(..., xlab = "Year", ylab = "PCD", ylim = c(0,360), legend = NULL, fontsize = 10, axis.text.color = "black", export = FALSE, export.name = "pcd_plot.png", width = 8.6, height = 7.5, units = "cm")
xlab |
the text for the x axis. (Default value: "Year") |
ylab |
the text for the y axis. (Default value: "PCD") |
ylim |
the limits of the y axis. (Default value: c(0, 360)) |
legend |
the text vector for the legend items. If NULL the legends will be equals to the variable names. (Default value: NULL) |
fontsize |
the font size value in pt. (Default value: 10) |
axis.text.color |
the legend colors. (Default value: "black") |
export |
the logical value for defining whether the graph should be export to a file or not. (Default value: FALSE) |
export.name |
the text for defining the exported file name. It is only used if export = TRUE. (Default value: "pcd_plot.png") |
width |
the number for defining the exported graph width. It is only used if export = TRUE. (Default value: 8.6) |
height |
the number for defining the exported graph height. It is only used if export = TRUE. (Default value: 7.5) |
units |
the text for defining the units of the height and width parameters. It is only used if export = TRUE. (Default value: "cm") |
... |
a set of daily or monthly precipitation series. |
Lucas Venezian Povoa [email protected]
Zhang LJ, Qian YF (2003) Annual distribution features of precipitation in China and their interannual variations. J Acta Meteorological Sinica 17:146-163
## # Loading the daily precipitation serie. data(daily) ## # Plotting PCD index per year pplot.pcd(daily)
## # Loading the daily precipitation serie. data(daily) ## # Plotting PCD index per year pplot.pcd(daily)
Plots the Precipitation Concentration Index of a precipitation serie.
pplot.pci(..., xlab = "Years", ylab = "PCI", legend = NULL, fontsize = 10, axis.text.color = "black", export = FALSE, export.name = "pci_plot.png", width = 10, height = 10, units = "cm")
pplot.pci(..., xlab = "Years", ylab = "PCI", legend = NULL, fontsize = 10, axis.text.color = "black", export = FALSE, export.name = "pci_plot.png", width = 10, height = 10, units = "cm")
xlab |
the text for the x axis. (Default value: "Years" |
ylab |
the text for the y axis. (Default value: "PCI") |
legend |
the text vector for the legend items. If NULL the legends will be equals to the variable names. (Default value: NULL) |
fontsize |
the font size value in pt. (Default value: 10) |
axis.text.color |
the legend colors. (Default value: "black") |
export |
the logical value for defining whether the graph should be export to a file or not. (Default value: FALSE) |
export.name |
the text for defining the exported file name. It is only used if export = TRUE. (Default value: "pci_plot.png") |
width |
the number for defining the exported graph width. It is only used if export = TRUE. (Default value: 10) |
height |
the number for defining the exported graph height. It is only used if export = TRUE. (Default value: 10) |
units |
the text for defining the units of the height and width parameters. It is only used if export = TRUE. (Default value: "cm") |
... |
a set of daily precipitation series. |
Lucas Venezian Povoa [email protected]
## # Loading the daily precipitation serie. data(daily) ## # Performing the a set of statistical analysis pplot.pci(daily)
## # Loading the daily precipitation serie. data(daily) ## # Performing the a set of statistical analysis pplot.pci(daily)
Plots the Precipitation Concentration Period per year of a precipitation serie.
pplot.pcp(..., xlab = "Year", ylab = "PCP", ylim = c(0,360), legend = NULL, fontsize = 10, axis.text.color = "black", export = FALSE, export.name = "pcd_plot.png", width = 8.6, height = 7.5, units = "cm")
pplot.pcp(..., xlab = "Year", ylab = "PCP", ylim = c(0,360), legend = NULL, fontsize = 10, axis.text.color = "black", export = FALSE, export.name = "pcd_plot.png", width = 8.6, height = 7.5, units = "cm")
xlab |
the text for the x axis. (Default value: "Year") |
ylab |
the text for the y axis. (Default value: "PCD") |
ylim |
the limits of the y axis. (Default value: c(0, 360)) |
legend |
the text vector for the legend items. If NULL the legends will be equals to the variable names. (Default value: NULL) |
fontsize |
the font size value in pt. (Default value: 10) |
axis.text.color |
the legend colors. (Default value: "black") |
export |
the logical value for defining whether the graph should be export to a file or not. (Default value: FALSE) |
export.name |
the text for defining the exported file name. It is only used if export = TRUE. (Default value: "pcd_plot.png") |
width |
the number for defining the exported graph width. It is only used if export = TRUE. (Default value: 8.6) |
height |
the number for defining the exported graph height. It is only used if export = TRUE. (Default value: 7.5) |
units |
the text for defining the units of the height and width parameters. It is only used if export = TRUE. (Default value: "cm") |
... |
a set of daily or monthly precipitation series. |
Lucas Venezian Povoa [email protected]
Zhang LJ, Qian YF (2003) Annual distribution features of precipitation in China and their interannual variations. J Acta Meteorological Sinica 17:146-163
## # Loading the daily precipitation serie. data(daily) ## # Plotting PCP per year pplot.pcp(daily)
## # Loading the daily precipitation serie. data(daily) ## # Plotting PCP per year pplot.pcp(daily)
Plots the Percent of Normal of a precipitation serie.
pplot.pn(..., interval = 30, scale = "a", xlab = NA, ylab = "PN", fontsize = 10, axis.text.color = "black", legend = NULL, export = FALSE, export.name = "pn_plot.png", width = 10, height = 10, units = "cm")
pplot.pn(..., interval = 30, scale = "a", xlab = NA, ylab = "PN", fontsize = 10, axis.text.color = "black", legend = NULL, export = FALSE, export.name = "pn_plot.png", width = 10, height = 10, units = "cm")
interval |
the number of months applied for calculating the percentage of normal. |
scale |
the scale used for calculating the percentage of normal, which should be either "w" for weak (not supported yet), "m" for month, "s" for season, or "d" for decades. |
xlab |
the text for the x axis. (Default value: NA) |
ylab |
the text for the y axis. (Default value: "PN") |
fontsize |
the font size value in pt. (Default value: 10) |
axis.text.color |
the legend colors. (Default value: "black") |
legend |
the text vector for the legend items. If NULL the legends will be equals to the variable names. (Default value: NULL) |
export |
the logical value for defining whether the graph should be export to a file or not. (Default value: FALSE) |
export.name |
the text for defining the exported file name. It is only used if export = TRUE. (Default value: "pci_plot.png") |
width |
the number for defining the exported graph width. It is only used if export = TRUE. (Default value: 10) |
height |
the number for defining the exported graph height. It is only used if export = TRUE. (Default value: 10) |
units |
the text for defining the units of the height and width parameters. It is only used if export = TRUE. (Default value: "cm") |
... |
a set of daily or monthly precipitation serie. |
Lucas Venezian Povoa [email protected]
## # Loading the daily precipitation serie. data(daily) ## # Performing the a set of statistical analysis pplot.pn(daily)
## # Loading the daily precipitation serie. data(daily) ## # Performing the a set of statistical analysis pplot.pn(daily)
Plots the Rainfall Anomaly Index of a precipitation serie.
pplot.rai(..., granularity = "m", xlab = "Month", ylab = "RAI", ylim = c(-3,3), legend = NULL, fontsize = 10, axis.text.color = "black", export = FALSE, export.name = "rai_plot.png", width = 8.6, height = 7.5, units = "cm")
pplot.rai(..., granularity = "m", xlab = "Month", ylab = "RAI", ylim = c(-3,3), legend = NULL, fontsize = 10, axis.text.color = "black", export = FALSE, export.name = "rai_plot.png", width = 8.6, height = 7.5, units = "cm")
granularity |
the granularity applied for calculating the rainfall anomaly index, which should be either "a" for annual granularity or "m" for monthly granularity ". (Default value: "m") |
xlab |
the text for the x axis. (Default value: "Month") |
ylab |
the text for the y axis. (Default value: "RAI") |
ylim |
the limits of the y axis. (Default value: c(-3, 3)) |
legend |
the text vector for the legend items. If NULL the legends will be equals to the variable names. (Default value: NULL) |
fontsize |
the font size value in pt. (Default value: 10) |
axis.text.color |
the legend colors. (Default value: "black") |
export |
the logical value for defining whether the graph should be export to a file or not. (Default value: FALSE) |
export.name |
the text for defining the exported file name. It is only used if export = TRUE. (Default value: "rai_plot.png") |
width |
the number for defining the exported graph width. It is only used if export = TRUE. (Default value: 8.6) |
height |
the number for defining the exported graph height. It is only used if export = TRUE. (Default value: 7.5) |
units |
the text for defining the units of the height and width parameters. It is only used if export = TRUE. (Default value: "cm") |
... |
a set of daily or monthly precipitation series. |
Lucas Venezian Povoa [email protected]
Rooy, M. P. van. A Rainfall anomaly index independent of time and space, Notos. v.14, p.43-48, 1965.
## # Loading the daily precipitation serie. data(daily) ## # Performing the a set of statistical analysis pplot.rai(daily, granularity = "m")
## # Loading the daily precipitation serie. data(daily) ## # Performing the a set of statistical analysis pplot.rai(daily, granularity = "m")
Plots the Standardized Precipitation Index of a precipitation serie.
pplot.spi(..., period = 3, distribution = "Gamma", xlab = "Months", ylab = "SPI", ylim = c(-3,3), legend = NULL, fontsize = 10, axis.text.color = "black", export = FALSE, export.name = "spi_plot.png", width = 8.6, height = 7.5, units = "cm")
pplot.spi(..., period = 3, distribution = "Gamma", xlab = "Months", ylab = "SPI", ylim = c(-3,3), legend = NULL, fontsize = 10, axis.text.color = "black", export = FALSE, export.name = "spi_plot.png", width = 8.6, height = 7.5, units = "cm")
period |
the number of months to be aggregated for calculating the standardized precipitation index. (Default value: 3) |
distribution |
it has no effect yet. (Default value: "Gamma") |
xlab |
the text for the x axis. (Default value: "Months") |
ylab |
the text for the y axis. (Default value: "SPI") |
ylim |
the limits of the y axis. (Default value: c(-3, 3)) |
legend |
the text vector for the legend items. If NULL the legends will be equals to the variable names. (Default value: NULL) |
fontsize |
the font size value in pt. (Default value: 10) |
axis.text.color |
the legend colors. (Default value: "black") |
export |
the logical value for defining whether the graph should be export to a file or not. (Default value: FALSE) |
export.name |
the text for defining the exported file name. It is only used if export = TRUE. (Default value: "spi_plot.png") |
width |
the number for defining the exported graph width. It is only used if export = TRUE. (Default value: 8.6) |
height |
the number for defining the exported graph height. It is only used if export = TRUE. (Default value: 7.5) |
units |
the text for defining the units of the height and width parameters. It is only used if export = TRUE. (Default value: "cm") |
... |
a set of daily or monthly precipitation series. |
Lucas Venezian Povoa [email protected]
## # Loading the daily precipitation serie. data(daily) ## # Performing the a set of statistical analysis pplot.spi(daily)
## # Loading the daily precipitation serie. data(daily) ## # Performing the a set of statistical analysis pplot.spi(daily)
It contains functions to analyze the precipitation intensity, concentration and anomaly.
Lucas Venezian Povoa [email protected]
Jonas Teixeira Nery [email protected]
Michael J. Hayes (2015). Comparison of Major Drought Indices. National Drought Mitigation Center. http://goo.gl/skHfs9.
Gibbs, W. J. (1967). Rainfall deciles as drought indicators. Bureau of Meteorology Bulletin, n. 48. Commonwealth of Australia.
Luis, M. D., Gonzolez-Hidalgo, J. C., Brunetti, M., Longares, L. A. (2011). Precipitation concentration changes in Spain 1946-2005. Natural Hazards and Earth System Science, v. 11, n. 5, p. 1259–1265.
Martin-Vide, J. (2004). Spatial distribution of a daily precipitation concentration index in peninsular Spain. International Journal of Climatology, v. 24, n. 8, p. 959–971.
Guttman, N. B. (1999). Accepting the standardized precipitation index: a calculation algorithm. Journal of the American Water Resources Association, v. 35, n. 2, p. 311–322. Blackwell Publishing Ltd.
Barring, L., Hulme, M. (1991). Filters and approximate confidence intervals for interpreting rainfall anomaly indices. Journal of climate, v. 4, n. 8, p. 837–847.
Calculates the Rainfall Anomaly Index (RAI) on a daily or monthly precipitation serie.
rai(object, granularity = "m")
rai(object, granularity = "m")
object |
a daily or monthly precipitation serie. |
granularity |
the granularity applied for calculating the rainfall anomaly index, which should be either "m" for monthly granularity or "a" for annual granularity. (Default value: "m") |
A data.frame (precintcon.rai) containing the following variables:
year
is the year.
month
is the month. This attribute exists only when granularity = "m".
rai
is the rainfall anomaly index.
Lucas Venezian Povoa [email protected]
Van Rooy, M. P. "A rainfall anomaly index independent of time and space." Notos 14.43 (1965): 6.
## # Loading the monthly precipitation serie. data(monthly) ## # Performing the Rainfall Anomaly Index analysis rai(monthly, granularity = "m")
## # Loading the monthly precipitation serie. data(monthly) ## # Performing the Rainfall Anomaly Index analysis rai(monthly, granularity = "m")
Load a file with a daily or monthly precipitation series.
read.data(file, sep = ",", dec = ".", header = TRUE, na.value = NA)
read.data(file, sep = ",", dec = ".", header = TRUE, na.value = NA)
file |
a string containing the file path. |
sep |
the character applied for delimited columns. (Default value: ",") |
dec |
the character applied for defined decimal point. (Default value: ".") |
header |
a logical value defining whether the first line of the file refers to column names. (Default value: TRUE) |
na.value |
the value used for representing missing values. (Default value: NA) |
A data frame
containing a representation of the
data in the file
. The file
is addressed as precintcon.daily or
precintcon.monthly depending of its structure.
The file should contains three columns when loading monthly series and thirty three columns when loading daily series.
The first columns refers to years and the second one refers to months. When dealing with daily datasets, the thirty one remaining columns refers to the amount of precipitation in the days of the months. Otherwise, the remaining column refers to the amount of precipitation in each month.
Lucas Venezian Povoa [email protected]
daily
monthly
read.table
read.csv
read.csv2
## # Loading a serie on Windows ## Not run: d1 <- read.data("C:\PRECINTCON\203040.csv", sep = ";", dec = ".", header = TRUE) ## # Loading a serie on Unix-like ## Not run: d1 <- read.data("/home/precintcon/203040.csv", sep = ";", dec = ".", header = TRUE)
## # Loading a serie on Windows ## Not run: d1 <- read.data("C:\PRECINTCON\203040.csv", sep = ";", dec = ".", header = TRUE) ## # Loading a serie on Unix-like ## Not run: d1 <- read.data("/home/precintcon/203040.csv", sep = ";", dec = ".", header = TRUE)
Calculates the Standardized Precipitation Index (SPI) on a daily or monthly precipitation serie.
spi(object, period = 3, distribution = "Gamma")
spi(object, period = 3, distribution = "Gamma")
object |
a daily or monthly precipitation serie. |
period |
the number of months to be aggregated in the calculation of the standardized precipitation index. (Default value: 3) |
distribution |
it has no effect yet. (Default value: "Gamma") |
A data.frame (precintcon.spi) containing the following variables:
year
is the year.
month
is the month.
spi
is the standardized precipitation index.
Lucas Venezian Povoa [email protected]
## # Loading the monthly precipitation serie. data(monthly) ## # Performing the Standardized Precipitation Index spi(monthly, period = 3)
## # Loading the monthly precipitation serie. data(monthly) ## # Performing the Standardized Precipitation Index spi(monthly, period = 3)
Calculates the Standardized Precipitation Index (SPI) per year on a daily or monthly precipitation serie.
spi.per.year(object, period = 3, distribution = "Gamma", FUN = mean)
spi.per.year(object, period = 3, distribution = "Gamma", FUN = mean)
object |
a daily or monthly precipitation serie. |
period |
the number of months to be aggregate in the calculation of the standardized precipitation index. (Default value: 3) |
distribution |
(it has no effect yet). |
FUN |
the function used to summarize the standardized precipitation index per year. (Default function: mean). |
A data.frame (precintcon.spi.per.year) containing the following variables:
year
is the year.
spi
is the standardized precipitation index.
Lucas Venezian Povoa [email protected]
## # Loading the monthly precipitation serie. data(monthly) ## # Performing the Standardized Precipitation Index spi.per.year(monthly, period = 3)
## # Loading the monthly precipitation serie. data(monthly) ## # Performing the Standardized Precipitation Index spi.per.year(monthly, period = 3)
Perform the calculation of basic statistics of precipitation datasets.
stat(...)
stat(...)
... |
a set of daily or monthly precipitation serie. |
A data.frame (precintcon.stat) containing the following variables:
dataset
is the precipitation serie name.
mean.daily
is the daily average precipitation.
It exists only for daily datasets.
sd.daily
is the standard deviation of a daily precipitation serie.
It exists only for daily datasets.
var.daily
is the variance of a daily precipitation serie.
It exists only for daily datasets.
mean.monthly
is the monthly average precipitation.
sd.monthly
is the standard deviation of a monthly precipitation serie.
var.monthly
is the variance of a monthly precipitation serie.
total
is the total precipitation.
Lucas Venezian Povoa [email protected]
## # Loading the monthly precipitation serie. data(monthly) ## # Plotting the deciles. stat(monthly)
## # Loading the monthly precipitation serie. data(monthly) ## # Plotting the deciles. stat(monthly)
It calculates the temporaly irregularity index according to the function sum(log(Pi+1/Pi))/(n-1), where Pi is the precipitation amount of year i, and n is the number of years.
tii(object)
tii(object)
object |
is a daily or monthly precipitation serie |
Daily or monthly precipitation series are transformed to annual series.
the temporaly irregularity index according to the function sum(log(Pi+1/Pi))/(n-1)
Lucas Venezian Povoa
## # Loading the monthly precipitation serie data(monthly) ## # Calculationg the Temporaly Irregularity Index tii(monthly)
## # Loading the monthly precipitation serie data(monthly) ## # Calculationg the Temporaly Irregularity Index tii(monthly)
It calculates a trend test using the rank-based nonparametric Mann-Kendall method.
trend.test(object, significance.level = 0.05)
trend.test(object, significance.level = 0.05)
object |
is a daily or monthly precipitation serie. |
significance.level |
is the significance level to be considered in the analysis. It is usually equals to 5% (default: 0.05). |
A trend test index.
Lucas Venezian Povoa [email protected]
H. B. Mann (1945). Nonparametric tests against trend. Econometrica, vol. 13, pp. 245-259. M. G. Kendall (1975). Rank Correlation Methods. Griffin, London, UK.