search for: precipit

Displaying 20 results from an estimated 163 matches for "precipit".

Did you mean: precipi
2010 May 18
2
Function that is giving me a headache- any help appreciated (automatic read )
note: whole function is below- I am sure I am doing something silly. when I use it like USGS(input="precipitation") it is choking on the precip.1 <- subset(DF, precipitation!="NA") b <- ddply(precip.1$precipitation, .(precip.1$gauge_name), cumsum) DF.precip <- precip.1 DF.precip$precipitation <- b$.data part, but runs fine outside of the function: days=7 input="precipit...
2007 May 24
6
Sum per hour
Dear all, I have a list of precipitation record and a list of time I would like to sum them up per hour, or per day. Does such a function exist ? example: time<-c("2000-10-03 14:00:00","2000-10-03 14:10:00","2000-10-03 14:20:00","2000-10-03 15:30:00","2000-10-03 16:40:00","2...
2010 Jun 06
2
Color scale graphic
Hello Recently, I've been dealing with a seemingly simple problem. I have a table with two columns filled with values from a test I made (say, amount of precipitation and Months measured). Now, instead of plotting a typical linear graphic with precipitation on the y-axis and the months in the x-axys, I would like to "convert" the values of precipitation in a color gradient, resulting in a vertical gradient throughout the x-axis. In this way, month...
2013 Feb 23
1
Extract, sum and Loop in R
Hi all, I have gone through some basics of R in eclipse environment. What I need to work is more than basic level so I could not find out the solution by myself. could anyone help me ? My case, I have climate data (precipitation) in nc format with single layer for each time interval in a day. That means for January 1, 2013, I have 8 separate files each containing 3 hrs cumulative precipitation in a grid of 0.5 X 0.5 deg - lat, long. (lets say, p3,p6,p9,....,p24.nc) 1. What I need to do is, I have to extract a precipi...
2009 Aug 18
2
value of nth percentile
Dear All, I have to get the value of say 90th percentile of precipitation time series.. The series is of daily precipitation value of 96 years, I have to to get 90the percentile value of daily precipitation each year. If you know the R code or command for this please let me know. I would appreciate your early response. Thanking you, Sincerely, Ajay. ---------------...
2008 Dec 11
2
Principal Component Analysis - Selecting components? + right choice?
Dear R gurus, I have some climatic data for a region of the world. They are monthly averages 1950 -2000 of precipitation (12 months), minimum temperature (12 months), maximum temperature (12 months). I have scaled them to 2 km x 2km cells, and I have around 75,000 cells. I need to feed them into a statistical model as co-variates, to use them to predict a response variable. The climatic data are obviously c...
2010 Jan 20
2
Plot frame border to start at zero?
Hello, I am creating plots of hourly precipitation and accumulated precipitation (on different axis, see attached image). I was wondering how can I have the plot frame (black border) start at zero, it looks like it is plotted less than zero? The code I use to create the png files is below: CairoPNG(PNG_file,width=1000, height=600, points...
2011 Jun 07
1
count length of continues elements in a vector
I am performing a precipitation analysis. data is in the form of daily precipitation amounts, e.g. x<- c(4,5,3,0,0,0,2,4,6,4,0,0,0,2,2,0,3,4,1,0,...) I would like to find the length of the "storm", length of storm would be defined as the number of days with continues precipitation. in this case the returned ve...
2012 Sep 15
2
qplot: plotting precipitation data
Dear list, I wish to plot chromatin precipitation data: I would like to have a rectangles (x:end-start, y:peak) but I do not have an idea how to define x (in terms of qplot syntax) and to choose the correct geom. mydata is a subset of a larger file. > mydata chrom start end peak 1 chr11 5291000 5291926 8 2 chr11 1098...
2012 Mar 07
2
Problems with generalized linear model (glm) coefficients.
...to everyone. I´m writing you because I´m feeling a bit frustrated with my work. My work consists in finding the relation between the amount of fires and the weather, so, my response variable is the amount of fires in a fire season and the explanatory variables are the temperature, the amount of precipitation and the some others…. my problem is this; I keep getting the wrong sign in the coefficients estimated, I get a negative sign for temperature and a positive sign for precipitation, which is unreasonable, the greater the temperature I would expect more fire, on the contrary, the greater the prec...
2010 Oct 19
1
Problems with a specific calculate.
Hello friends of R, My name is Toni, i'm 25 and I'm working on the Meteorological Investigation team from Balearic Islands. I had contact to you because I have a problem: I done a file for every day since 1912 about precipitation. That file has the following structure: > str(Ast) Loading required package: sp Formal class 'SpatialPixelsDataFrame' [package "sp"] with 7 slots ..@ data :'data.frame': 499105 obs. of 2 variables: .. ..$ PRECIP.pred: num [1:499105] 0.000536 0.000536 0....
2007 Jun 06
1
spgrass6 and aggregation (bis)
...rary(spgrass6) # I have 3 map I am working with a MASK map of a specific area. # 1) a landuse map landuse<-readRAST6("landuse_mapname_in_grass") # 2) a catchment map which divide the area in several catchements catchment<-readRAST6("catchement_mapname_in_grass") # 3) a precipitation map precipitation<-readRAST6("precipitation_mapname_in_grass") # then I would like to sum the precipitation spatialy over each catchment and landuse. So, first I cbind all maps with cbind MAP<-cbind(landuse,catchment,precipitation) # then I use the aggregate function SUM&lt...
2009 Oct 06
1
ggplot2 applying a function based on facet
...take advantage of the agency column) L.USGS <- grep("^USGS", L, value = TRUE) DF <- read.table(textConnection(L.USGS), fill = TRUE) colnames(DF) <- c("agency", "gauge", "date", "time", "gauge_height", "discharge", "precipitation") pat <- "^# +USGS +([0-9]+) +(.*)" L.DD <- grep(pat, L, value = TRUE) library(gsubfn) DD <- strapply(L.DD, pat, c, simplify = rbind) DDdf <- data.frame(gauge = as.numeric(DD[,1]), gauge_name = DD[,2]) both <- merge(DF, DDdf, by = "gauge", all.x = TRUE)...
2017 Sep 13
2
compounding precipitation based on whether falls within a day
...; based on whether or not the corresponding hours fall within a given day. So, at the end of the small example below, there are two variables that I'm left with, prec_idx (an hourly sequence from beg_time to end_time) whose length is equal to the first index (the time index) of the 3D array of precipitation called prec. That is, I'd like to get a 3D array called prec*_daily* that has dimension prec*_daily*[21, 3, 4], where 21 is the number of days and the value in say prec*_daily*[1,x,y] is equal to prec[1,x,y] + prec[2,x,y] + ... + prec[24,x,y] ndays <- 21 base_time <- as.character(...
2007 May 08
3
plot time series
[This email is either empty or too large to be displayed at this time]
2017 Sep 13
0
compounding precipitation based on whether falls within a day
...r not the corresponding hours > fall within a given day. So, at the end of the small example below, there > are two variables that I'm left with, prec_idx (an hourly sequence from > beg_time to end_time) whose length is equal to the first index (the time > index) of the 3D array of precipitation called prec. That is, I'd like to > get a 3D array called prec*_daily* that has dimension prec*_daily*[21, 3, > 4], > where 21 is the number of days and the value in say prec*_daily*[1,x,y] is > equal to prec[1,x,y] + prec[2,x,y] + ... + prec[24,x,y] > > > ndays <-...
2009 Oct 06
2
ggplot cumsum refined question (?)
OK, so maybe last night was a little too much at one throw, so I have reduced the data to two stations- one that has precipitation and one that does not. This is going to be in the context of a larger data set. I would like to be able to issue a ggplot command and have cum sum just act on the facets (factors) to apply this. library(chron) library(ggplot2) DF <- structure(list(date_time = structure(c(14522, 14522.010...
2011 Feb 14
2
how to overlay a map of US on image plot
Dear all, I have a data set which has latitude, longitude (not in increasing order) and observed precipitation corresponding to those locations. I am using image.plot command for that. But I want to overlay a map of US on that plot. I know we can use map('usa') to draw it, but I dont know how can I overlay it on the plot of the precipitation data. Can anyone please help me with it? Thanks in...
2008 Sep 04
2
using complete.cases() with nested factors
Hello, This maybe a newbie question. I have a dataframe that looks like the sample at the bottom of the email. I have monthly precipitation data from several sites over several years. For each site, I need to extract years that have a complete series of 12 monthly precipitation values, while excluding that year for sites with incomplete data. I can't figure out how to do this gracefully (i.e. without a silly for loop). Any...
2013 Apr 18
1
Arranging two different types of ggplot2 plots with axes lined up
...mple way to do this? I know I could do this using facetting if they were both the same type of plot (for example, if they were both boxplots), but I haven't been able to figure it out for two different types of plots. Below is my test case: library(ggplot2) library(gridExtra) #generate test precipitation data year<-c(2000,2001,2002,2003,2004) precip<-c(46,100,80,74,20) yp<-data.frame(year, precip) #generate test fecal coliform data year2<-c(2000,2000,2000,2000,2000,2000,2000,2000,2000,2000, 2001,2001,2001,2001,2001,2001,2001,2001,2001,2001, 2002,2002,2002,2002,2002,2002,2002,2002,...