Vizualizing Hurricane Joaquin

More
8 months 2 weeks ago #120 by Kari_Pohl
Kari_Pohl created the topic: Vizualizing Hurricane Joaquin
This Plot of the Month will be the seeds to a case study looking at the signal of Hurricane Joaquin as it moved up the United States east coast. The National Estuarine Research Reserve System (NERRS) and the Intergrated Ocean Observing System (IOOS) is partnering to look at this event from the near-shore (NERRS) to offshore (IOOS) perspective.

So let’s plot a few images to visually investigate Hurricane Joaquin!

First thing first: I downloaded the 2015 water quality file for each real-time sonde from each NERR on the east coast: from Florida to Maine. This was done as a zip download from the CDMO.
#Load in the packages SWMPr 
install.packages(“SWMPr”)
library(SWMPr)
#Set your path directly to that zip download of all your data
path<-"C:/Users/Kari/Documents/RData/DELAWARE/09172016.zip"
#Import the file for each Reserve
delwq<-import_local(path,'delllwq', trace = F)

For this first glimpse, we only want to look at the window from September 1 to October 30, 2021 in order to see the before, during, and 'return to normal' impacts of Hurricane Joaquin. So we can use the subset function. Additionally, salinity was decided to be the first parameter to investigate, so we can use select function to select just salinity.

One line gets us our desired time range and parameter!

For less clutter, I also decided to aggregate by days using the aggreswmp function. You can skip this step if you want to keep the time step to 15 minutes!
delwq<-subset(delwq, subset = c('2021-09-01 0:00','2021-10-30 23:45'), select = c('sal','clevel'))
delwq<-aggreswmp(delwq,'days', params = c('sal'))

Now repeat that for all desired stations! I have a total of 14 stations.

Next up is to plot! I will add vertical lines from September 28 to October 7th since that is when Hurricane Joaquin came by the east coast. We include some time before and after to help understand the magnitude and duration of that disturbance.
#Create a fun color palette with 14 unique colors; use [1-14] as the col="" for each station 
color<-rainbow(14)
#Plot!
plot(gtmwq$datetimestamp,gtmwq$sal,xaxt="n", pch=16,col=color[1],ylim=c(0,35),
xlab="",ylab="Salinity (ppt)",cex=1.25,cex.lab=1.25,cex.axis=1.25)
#This adds the connecting line between dots. You can also use type='o' above, but I like to change it up occasionally.
lines(gtmwq$datetimestamp,gtmwq$sal, col = color[1])
par(new=T)
plot(sapwq$datetimestamp,sapwq$sal,xaxt="n",yaxt="n", pch=16,col=color[2],ylim=c(0,35),
xlab="",ylab="")
lines(sapwq$datetimestamp,sapwq$sal, col = color[2])
#Repeat with each station...I don't want to clog your screen
#Now to format our x-axis to look nice
axis.Date(1,at=acewq$datetimestamp, format="%m-%d") 
#adds the vertical lines to denote when Joaquin hit the US
abline(v=as.Date("2015-09-28"))
abline(v=as.Date("2015-10-07"))
legend("bottomleft", legend = c("GTM-FL","Sap-GA","ACE-SC","NIW-SC","NC",
"VA","MD","DE","NJ","Hudson-NY","RI","MA","Nh","ME"), 
bty = "o", bg = 'white',  border = NA,lwd = 3, cex = 0.5, 
col = color[1:14], lty = c(1, 1,1), pch = c(NA, NA, NA),ncol=1,inset=0.01,0.01)


Pretty but overwhelming! It is clear that not all NERR stations on the east coast where impacted, and some where really impacted. So we need to look at fewer stations. Let's plot the South Carolina, North Caroline, Delaware, Virginia, and Maryland stations.
color<-rainbow(6)
plot(acewq$datetimestamp,acewq$sal,xaxt="n", pch=16,col=color[1],ylim=c(0,35),
xlab="",ylab="Salinity (ppt)",cex=1.25,cex.lab=1.25,cex.axis=1.25)
lines(acewq$datetimestamp,acewq$sal, col = color[1])
par(new=T)
plot(niwwq$datetimestamp,niwwq$sal,xaxt="n",yaxt="n", pch=16,col=color[2],ylim=c(0,35),
xlab="",ylab="")
lines(niwwq$datetimestamp,niwwq$sal, col = color[2])
par(new=T)
plot(nocwq$datetimestamp,nocwq$sal,xaxt="n",yaxt="n", pch=16,col=color[3],ylim=c(0,35),
xlab="",ylab="")
lines(nocwq$datetimestamp,nocwq$sal, col = color[3])
#And repeat! There may be an easier way to do this, but I just copy/paste/replace!
abline(v=as.POSIXct("2015-09-28 00:00:00 EST"))
abline(v=as.POSIXct("2015-10-07 23:00:00 EST"))
#Create a nice x-axis
axis.Date(1, at=seq(acewq$datetimestamp[1],
 acewq$datetimestamp[60], by="day"), format="%m-%d")
abline(v=as.Date("2015-09-28"))
abline(v=as.Date("2015-10-07"))
legend("topright", legend = c("ACE-SC","NIW-SC","NC",
"VA","MD","DE"), bty = "o", bg = 'white',  border = NA,lwd = 3, cex = 0.5, 
col = color[1:14], lty = c(1, 1,1), pch = c(NA, NA, NA),ncol=3,inset=0.01,0.01)



That's a little better! Without getting too into the analysis, there are a lot of interesting things here. For example, that salinity dip in Delaware is at nearly the same magnitude as a previous event in the beginning of September, possibly related to a tidal cycle. However, the amount of time at a lower salinity was longer. A better look a tidal decomposition and local precipitation combined with water level will help us better understand the storm's impacts vs other factors like tides and local precipitation.

I enjoy R for this reason: visualizing the data often leads to a research design and what questions need to be investigated. Lot's more to do here!

Stay tuned for next time!
-Kari
Attachments:
The following user(s) said Thank You: Marcus Beck, Kim_Cressman

Please Log in to join the conversation.

More
8 months 2 weeks ago #121 by Marcus Beck
Marcus Beck replied the topic: Vizualizing Hurricane Joaquin
Awesome, thanks Kari! This reminds me of an exercise we used for the very first R, SWMPr training. We looked at water quality and weather data from the Jacques Cousteau reserve with the passing of Hurricane Sandy. Check it out here: fawda123.github.io/swmp_workshop_2016/sandy_ex.html

Please Log in to join the conversation.

Time to create page: 0.370 seconds
Powered by Kunena Forum