Re: [R] Classification of wind events

2020-05-19 Thread Abby Spurdle
I was impressed by Jim's effort. So, I thought I'd try to produce an exploratory plot. I've adapted some of his code. The following script produces a heatmap for a cylindrical density estimate. Bright areas are (mathematical) regions of high density. However, the interpretation is complicated by t

Re: [R] Classification of wind events

2020-05-18 Thread Jim Lemon
Sorry, I should know better: rollmean<-function(x,width=2) { lenx<-length(x) result<-rep(NA,lenx) for(i in 1:lenx) { chunk<-i:(i+width-1) if(i(lenx-width)) chunk<-c(i:lenx,rep(lenx,i-(width-1))) result[i]<-mean(x[chunk]) } return(result) } I forgot to replace this with: library(zoo) r

Re: [R] Classification of wind events

2020-05-18 Thread Jeff Newmiller
? source("../rollmean.R") ? On May 18, 2020 4:11:52 AM PDT, Jim Lemon wrote: >Hi Stefano, >If I understand your request, this may also help, Uses the same data >transformations as my previous email. > >png("SS_foehn.png") >plot(mydf$data_POSIX, > ifelse(mydf$main_dir %in% c("WSW","SW"),mydf$max_s

Re: [R] Classification of wind events

2020-05-18 Thread Jeff Newmiller
--- > > >Da: Jeff Newmiller [jdnew...@dcn.davis.ca.us] >Inviato: sabato 16 maggio 2020 21.04 >A: Stefano Sofia; Jim Lemon; r-help mailing list >Oggetto: RE: [R] Classification of wind events > >Please run your code before posting it... y

Re: [R] Classification of wind events

2020-05-18 Thread Jim Lemon
Hi Stefano, If I understand your request, this may also help, Uses the same data transformations as my previous email. png("SS_foehn.png") plot(mydf$data_POSIX, ifelse(mydf$main_dir %in% c("WSW","SW"),mydf$max_speed,NA), type="b",main="Wind speed (WSW or SW) by time", xlab="Time of day",ylab="W

Re: [R] Classification of wind events

2020-05-18 Thread Stefano Sofia
: Stefano Sofia; Jim Lemon; r-help mailing list Oggetto: RE: [R] Classification of wind events Please run your code before posting it... you forgot the quotes in your main_dir column. first_day_POSIX <- as.POSIXct("2020-02-19-00-00", format="%Y-%m-%d-%H-%M") last_day_POSIX

Re: [R] Classification of wind events

2020-05-17 Thread Jim Lemon
t_day_POSIX, by="10 > > > min")) > > > > > > mydf$main_dir <- c(WSW, WSW, SW, SW, W, WSW, WSW, WSW, W, W, SW, WSW, > > > SSW, S, SW, SW, WSW, WNW, W, WSW, WSW, SE, SE, SE, NW, NNE, ENE, SE, NNW, > > > NW, NW, NW, NW, NW, NW, NE, NW, NW, NW,

Re: [R] Classification of wind events

2020-05-17 Thread Abby Spurdle
ur attention > > Stefano > > > > > > (oo) > > --oOO--( )--OOo-------- > > Stefano Sofia PhD > > Civil Protection - Marche Region > > Meteo Section > > Snow Section > > Via del Colle Ameno 5 > > 60126 Torrette di Ancona, A

Re: [R] Classification of wind events

2020-05-17 Thread Abby Spurdle
Colle Ameno 5 > 60126 Torrette di Ancona, Ancona > Uff: 071 806 7743 > E-mail: stefano.so...@regione.marche.it > ---Oo-oO > > > Da: Jim Lemon [drjimle...@gmail.com] > Inviato: mercoledì 13 maggio 2020 11.01 >

Re: [R] Classification of wind events

2020-05-16 Thread Jeff Newmiller
, NW, NW, NW, N, WNW, NW, NNW, >NNW, NW, NW, NW, WNW, ESE, W, WSW, SW, SW, SW, WSW, SW, S, S, SSW, SW, >WSW, WSW, WSW, WSW, WSW, WSW, WSW, SW, WSW, WSW, WSW, WSW, SW, SW, WSW, >WSW, WSW, WSW, WSW, SW, SW, SW, SW, SW, SW, SW, SW, SW, WSW, WSW, WSW, >WSW, SW, SW, SW, SW, WSW, SW, SW, SW, SW, SW, WSW, SW, SW, W, WSW, WSW, >SSW, S, WNW, SW

Re: [R] Classification of wind events

2020-05-16 Thread Stefano Sofia
__ Da: Jim Lemon [drjimle...@gmail.com] Inviato: mercoledì 13 maggio 2020 11.01 A: Stefano Sofia; r-help mailing list Oggetto: Re: [R] Classification of wind events Hi Stefano, Given only one observation point you will find it difficult. If your automatic weather station is in the low area wher

Re: [R] Classification of wind events

2020-05-13 Thread Jim Lemon
Hi Stefano, Given only one observation point you will find it difficult. If your automatic weather station is in the low area where the foehn wind is felt, it can only be distinguished from a dry katabatic wind if the upwind conditions are known. There is a similar but milder version of this in eas

Re: [R] Classification of wind events

2020-05-12 Thread Jeff Newmiller
Please make a reproducible R example of input and output. On May 12, 2020 1:11:41 AM PDT, Stefano Sofia wrote: >Dear R list users, >I am aware that this question is not strictly related, at the present >moment, to R code and it is more general. Please forgive me, but I need >to share my thoughts

[R] Classification of wind events

2020-05-12 Thread Stefano Sofia
Dear R list users, I am aware that this question is not strictly related, at the present moment, to R code and it is more general. Please forgive me, but I need to share my thoughts with you. Foehn conditions on the southern slope of Alps happen with strong northerly flows that impact perpendic