Page 1

Statistical Analysis of Local Oceanographic Variability Relative to Abalone Habitats at Isla Natividad

Hyunah Lee

Santa Catalina School

This is the abstract of my research which was part of a larger project overseen by the Micheli Lab of Stanford University's Hopkins Marine Station in Pacific Grove, CA. Research is still in process, and I have been involved in the project since August 2018. The abstract has been accepted by the Ocean Sciences Meeting Program Committee, and I will present my research as the first author of a poster at the Ocean Sciences Meeting 2020. The Ocean Sciences Meeting (OSM) is the flagship conference for the ocean sciences and will take place on 16-21 February in San Diego, California.


Statistical Analysis of Local Oceanographic Variability Relative to Abalone Habitats at Isla Natividad

Rosemary Lee, Chanel Sun

Abalone are an economically and ecologically important marine organism along the Pacific coast. The growth and survival of these species are sensitive to water quality parameters, particularly temperature and dissolved oxygen (DO) concentration. However, climate change is causing ocean warming and deoxygenation. When these large scale trends are combined with natural storm and upwelling events, the frequency, intensity, and duration of temperature and low DO events may affect abalone population persistence at local scales. Here, we undertake a first-pass analysis of the oceanographic conditions of two locations in Baja California as a part of a larger effort to forecast the persistence of spatial refuges. Oceanographic condition data from 2013 to 2018 was provided by a multi-institutional collaboration from two moorings. One mooring off Morro Prieto faces offshore towards the Pacific Ocean; the other, off Punta Prieta, faces the Baja mainland. We used time series analysis methods implemented within R and RStudio to identify extreme values, long-term and short-term variability, as well as the relationship between temperature and dissolved oxygen. In addition to time series analysis, we compared DO and temperature parameters with published observations of stress and mortality in abalone within the two sites. Our results suggest that differences in oceanographic conditions can manifest on a local scale: the total duration of time above the preferred temperature of green abalone in Morro Prieto was roughly 500 hours compared to 156 hours in Punta Prieta, while the time below the threshold of DO was approximately 3756 hours in Morro Prieto compared to 237 hours in Punta Prieta, implying that the environment in Punta Prieta may pose more adaptational challenges compared to conditions in Morro Prieto.


Introd ction Abalone are an economicall and ecologicall important marine species that pla a ke role in sustaining fisheries and coastal economies along the Pacific coast. In Baja California, the commercial pink abalone (​Haliotis corrugata​) and green abalone (​Haliotis fulgens​) fisheries produce an annual profit of appro imatel US $20,000,000 (Micheli ​et al​. 2012), and these fisheries form the main source of income for coastal communities in the area. ​Ho e er, ​climate change has led to the arming and deo

genation of the ocean, and ​the increasing frequenc and

intensit of arming e ents, along ith anomalies in o gen a ailabilit along the California current, has led to rising concern regarding the impact of climate change on ​abalone populations in Baja California.

High temperatures ha e been linked to increased e pression of diseases such as the ithering s ndrome (Ben-Horin ​et al.​ 2013) in abalone, hile lo dissol ed o

gen has been sho n to

ha e a negati e impact on gro th rate and sur i al. Mean hile, ariabilit in temperature ma lead to ulnerabilit in changes to oceanographic conditions. Dail temperature fluctuations can lo er both the optimum and critical ma imum temperatures of thermal reaction norms. () Some abalone mass mortalit e ents ha e been reported to be patch , suggesting local ariabilit regarding oceanographic conditions. In estigating small-scale local ariabilit in Baja California could lead to findings helpful for fisheries, as it ma indicate the e istence of spatial refuges here population reco er occurs more quickl . Our stud e amines the oceanographic en ironments in Isla Nati idad, specificall through the anal sis of temperature and dissol ed o gen.

We acquired data containing temperature and dissol ed o

gen le els of t o sites, Morro Prieto

and Punta Prieta. Both sites are in the kelp forest reefs of Isla Nati idad (27.9 N, 115.2 W), but Morro Prieto is on the Pacific side of the island, and is generall colder and more e posed to up elling e ents. Punta Prieta is on the inland side of the island, and is generall

armer and

more affected b internal tides. We deplo ed statistical methods such as time series anal sis and densit plots through RStudio in order to identif e treme alues, long-term and short-term


ariabilit , as ell as the relationship bet een temperature and dissol ed o

gen. With

information gained through our data anal sis, e looked into abalone biolog and considered the t o sites in terms of biological conditions for abalone.

Method Data Preparation We used the coding language R in RStudio to process our data. We organi ed our orkflo through R Markdo n because it has a user-friendl interface through hich data can be easil sa ed and reproduced. The first step after importing the dataset as to check its summar and head. The dataset contained the temperature and dissol ed o

gen le els in Punta Prieta and

Morro Prieto recorded e er ten minutes from March 11, 2013 to August 16, 2018. Temperature as collected ith Seabird SBE37 loggers, and dissol ed o

gen le el as taken ith PME

MiniDOT. Our first goal as to create a coherent data format that ould allo us to isuali e and anal e the data. Since the date as recogni ed as characters, e used the package lubridate to con ert the date format into POSIXct.

Time Series Anal sis To isuali e potential trends and patterns in our data, e plotted the temperature and dissol ed o gen at the t o sites respecti el as a function of time using the package ggplot2. Additionall , e tested hether the temperature e er e ceeded the upper thermal tolerance limit, measured b the critical thermal ma imum (CTMa ). For the time series of temperature, e added a -intercept of 33.6 degrees celsius, hich is the CTMa at 50% for green abalone according to Dia et al. We also tested the threshold at hich the en ironment becomes ph siologicall stressful for abalone. Y-intercepts are plotted at 25.4 degrees celsius, the threshold of temperature according to Dia et al, and 4.6mg/L, the threshold of DO le els. In order to quantif the le el of stress that temperature or dissol ed o

gen pose for abalone, e

calculated the duration of time abo e prefered temperature or belo prefered o

gen le els.

First, e created a ne dataset containing an additional column for the lag times bet een each obser ation. Ne t, e used the filter function to filter out all the lag times hen the temperature


e ceeded 25.4 degrees celsius or hene er the dissol ed o

gen dropped belo 4.6mg/L. We

then used the sum function to get the total amount of lag times.

Variabilit To measure the ariabilit in oceanographic conditions, e calculated the rolling standard de iation of temperature and dissol ed o

gen in each site. We used the rollappl function from

the oo package to calculate the rolling standard de iation o er a indo si e of 6 hours, 12 hours, 24 hours, and 1 month to test for ariabilit due to tidal, dail , and monthl patterns. We also used ggplot to graph the rolling standard de iation for isual representation to help identif patterns and magnitudes of ariabilit . We also created densit plots using ggplot to isuali e the distribution of temperature and DO in each site. Additionall , e plotted the -intercept of the half ma imum alues to appro imate the idth at half ma imum and to test ho dispersed the data as. Res lts

The temperature in Punta Prieta and Morro Prieto ne er reaches 33.6 C, hich is the CTMa at 50% for green abalone (Dia ​et al​). Seasonalit is isible in the pattern of roughl a ear, and temperatures are lo er during the middle of the ear and t picall reach their high point approaching the end of the ear. The spikes ma be caused b sensor anomalies. Temperature and DO plotted together


The duration of time abo e 25.4 C, the preferred temperature of abalone (Dia et al.), adds up to a total of 29980 minutes for Morro Prieto and 9370 minutes for Punta Prieta, demonstrating that the temperature in Morro Prieto is greater than 25.4 C for a longer duration of time than in Punta Prieta. For DO, the time belo 4.6mg/L is 225340 minutes in Morro Prieto and 14230 minutes in Punta Prieta. This indicates that temperature as higher and DO le els ere lo er for a longer duration of time in Morro Prieto than Punta Prieta from 2013 to 2018, suggesting that Morro Prieto ma be a more stressful en ironment for abalone. Densit Plot


Higher temperatures and higher DO le els occur more frequentl in Punta Prieta. This data sho s that real differences in oceanographic conditions manifest ith small differences in distance. The ma imum height of the densit plot for temperature in Morro Prieto is 0.1377, for DO in MP 0.4850, for temperature in PP 0.1996, for DO in PP 0.5891. The idth at half ma imum is appro imatel 7 for temperature in MP, 2 for DO in MP, 4 for temperature in PP, and 2 for DO in PP. This suggests that ariabilit in temperature is greater in MP compared to PP. In Morro Prieto, there is greater ariabilit and has generall lo er temperatures but rises to abo e 25.4 for a longer time, hile in PP temperature is generall higher but doesn t spend as much time abo e 25.4. Variabilit Rolling standard de iation. blue for T & gra for DO 1 month


We see a seasonalit dissol ed o

ith the indo si e o er 1 month. In Punta Prieta, both temperature and

gen le el peaked to ards the middle of each ear. Ho e er, there ere se eral

peaks of high ariabilit of temperature in 2015. The ariabilit of temperature as relati el high during the middle of 2016 and 2017, e ceeding 2.0. In Morro Prieto, here e do not see an seasonalit after 2015, the ariabilit of temperature as lo er across the board. The ma ima of the temperature ariabilit took place in 2014 and 2015. In 2014, the ariabilit of temperature as relati el high throughout the second half of the ear, hereas in 2015, it reached a slightl lo er peak for a shorter amount of time. In 2013, the ariabilit of temperature e ceeded 2.5, hich e assume to be caused b a sensor anomal ; ho e er, it ma also be authentic and caused b an ENSO e ent or change of season. There are gro ing gaps in the plots as e increased the indo si e for une plained reasons. 12hr


;

We see a seasonalit temperature and dissol ed o

ith the indo si e o er 12 hours. In both sites, the ariabilit of gen peaks to ards the middle of the ear. The ariabilit of

temperature in Punta Prieta is has a larger range and more significant fluctuations. From 2016 to 2018, it had higher peaks of ariabilit . In 2015 and 2016, hile the ariabilit of dissol ed o gen remained relati el lo (around 1.0) in Punta Prieta, it reached up to 1.5 in Morro Prieto. Correlation bet een temperature and dissol ed o

gen


When e e amined the correlation bet een temperature and dissol ed o gen in terms of ears, dissol ed o

gen le el increased as temperature increased at lo temperature at both sites. We

sa no correlation at high temperatures. In Punta Prieta, the correlation as not clear in 2014, 2015, and 2017.

Looking at the correlation in respect to months in Morro Prieto, e sa a slight increase of dissol ed o

gen le el as temperature increased during Feb and March. The graph sho ed

dramatic increase of DO as T increases from April to June during hich T is generall lo and has a lo er range. From Jul to Januar , there as no correlation bet een dissol ed o gen le el and temperature; dissol ed o

gen slight fluctuated during these months. The graph also

sho ed that the temperature has its ma ima and largest range of the ear from August to October.


In Punta Prieta, there as a slight increase in DO as T increases at lo T from Februar to Ma . From June to Januar , there as no fluctuation of o gen trend related ith temperature. Furthermore, like in Morro Prieto, the highest temperature range appeared during August to October. Disc ssion Our results suggest that differences in oceanographic conditions can manifest on a local scale; the total duration of time abo e the preferred temperature of green abalone in Morro Prieto as roughl three times longer than in Punta Prieta, hile the time belo the threshold of DO as appro imatel t ice as long in Morro Prieto compared to Punta Prieta. In the face of changing oceanographic conditions and abalone mass mortalit e ents, our stud demonstrates the importance of identif ing spatial refuges in preparing for climate change-induced damage to abalone populations.

Temperature ariation makes ectotherms more sensiti e to climate change through potentiall lo ering both the optimum and critical ma imum temperatures of thermal reaction norms.(cite) Our stud indicates that the en ironment in Punta Prieta ma pose more adaptational challenges compared to the en ironment in Morro Prieto. The dail

ariation of temperature in Punta Prieta

is significantl higher to ards the middle of the ear. The increase of ariabilit in recent ears ma ha e changed some adaptational features of abalones.


Temperature ariabilit and range are important factors hen considering abalone patholog . In the case of Withering S ndrome, hich causes issues in digesti e tubules, follo ed b loss of appetite, depletion of gl cogen, a loss in bod mass, and e entual death, dail temperature range and the risk of WS-RLO infection are positi el correlated. Mean hile, lo er temperature lo ers the risk of infection and prohibits the e pression of WS in spite of the spreading WS-RLO. Under arm temperatures, the e pression of WS occurs, and the transmission of WS-RLO accelerates.(cite) Further stud is needed to testif

hether temperature ariabilit and

range in Morro Prieta or Punta Prieta impact local pathogens.

Because our dataset onl contained the temperature and dissol ed o gen le els o er time, e ere unable to obtain a complete picture of ho such conditions impacted abalone. This implies the need for field ork and inclusion of biological data, such as an estimate of abalone populations during the time data as collected, in future studies. Such data ma also help compare the biological and beha ioral impacts of high temperatures ith longer duration and less ariabilit (as in Morro Prieto) to high temperatures ith shorter durations and greater ariabilit (as in Punta Prieta) on abalone. Further studies on the capacit of ju enile abalone to acclimate to higher temperatures if e posed to increased temperatures for a longer period of time ma also help predict abalone responses to climate change. Additionall , including other ariables that ma affect abalone beha ior and biolog such as pH and salinit ma also offer a more comprehensi e and accurate reading of the impact of oceanographic conditions on abalone. In particular, studies ha e reported that ocean acidification ma ha e a detrimental impact on the de elopment and calcification of abalone lar ae.


Natividad project Read in the data Using the recent dataset that was supposedly cleaned by Brock File originally called: natividad_temp_do_2013_2018.csv This dataset contains temperature and DO levels at Morro Prieto and Punta Prieta at Baja California from 2013 to 2018. Morro Prieto is the Pacific side of the island, generally colder and more exposed to upwelling events, and Punta Prieta is the inland side of the island, generally warmer and less exposed to upwelling. natividad_temp_do_2013_2018 <- read_csv("Downloads/natividad_temp_do_2013_2018.csv")

## Parsed with column specification: ## cols( ## `Date Time (LST)` = col_character(), ## `MP Temperature (oC)` = col_double(), ## `MP dissolved oxygen (mg/L)` = col_double(), ## `PP Temperature (oC)` = col_double(), ## `PP dissolved oxygen (mg/L)` = col_double() ## )

attach(natividad_temp_do_2013_2018)

Check the data Find the summary and head of the dataset. summary(natividad_temp_do_2013_2018)


## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ##

Date Time (LST) Length:285679 Class :character Mode :character

MP Temperature (oC) MP dissolved oxygen (mg/L) Min. :11.02 Min. :2.289 1st Qu.:14.54 1st Qu.:5.587 Median :16.46 Median :6.432 Mean :16.97 Mean :6.231 3rd Qu.:18.91 3rd Qu.:7.007 Max. :28.46 Max. :9.364 NA's :2229 NA's :2388 PP Temperature (oC) PP dissolved oxygen (mg/L) Min. :11.82 Min. : 2.359 1st Qu.:16.80 1st Qu.: 6.556 Median :18.15 Median : 7.235 Mean :18.41 Mean : 7.205 3rd Qu.:19.59 3rd Qu.: 7.674 Max. :28.68 Max. :12.634 NA's :3053 NA's :24893

head(natividad_temp_do_2013_2018)

## ## ## ## ## ## ## ## ## ##

# A tibble: 6 x 5 `Date Time (LST)` `MP Temperature … `MP dissolved oxy… `PP Temperature … <chr> <dbl> <dbl> <dbl> 1 3/11/13 9:00 12.3 4.95 15.0 2 3/11/13 9:10 12.3 4.95 15.0 3 3/11/13 9:20 12.3 4.93 15.0 4 3/11/13 9:30 12.3 4.93 15.0 5 3/11/13 9:40 12.3 4.95 15.0 6 3/11/13 9:50 12.3 4.99 15.0 # ... with 1 more variable: `PP dissolved oxygen (mg/L)` <dbl>

Fix the date format The format of the date in the original dataset is in character, so convert it into POSIXct using the lubridate package. natividadDate<-mdy_hm(natividad_temp_do_2013_2018$`Date Time (LST)`) head(natividadDate)

## [1] "2013-03-11 09:00:00 UTC" "2013-03-11 09:10:00 UTC" ## [3] "2013-03-11 09:20:00 UTC" "2013-03-11 09:30:00 UTC" ## [5] "2013-03-11 09:40:00 UTC" "2013-03-11 09:50:00 UTC"


natividad_tempDOdate<-add_column(natividad_temp_do_2013_2018,natividadDate) natividad_tempDOdate$`Date Time (LST)` <- NULL head(natividad_tempDOdate)

## ## ## ## ## ## ## ## ## ##

# A tibble: 6 x 5 `MP Temperature … `MP dissolved oxy… `PP Temperature … `PP dissolved ox… <dbl> <dbl> <dbl> <dbl> 1 12.3 4.95 15.0 8.14 2 12.3 4.95 15.0 8.25 3 12.3 4.93 15.0 8.11 4 12.3 4.93 15.0 7.95 5 12.3 4.95 15.0 7.91 6 12.3 4.99 15.0 7.92 # ... with 1 more variable: natividadDate <dttm>

CTMax for 50% green abalone, PuntaPrieta Check if the temperature in Punta Prieta reaches 33.6 degrees celsius, which is the CTMax at 50% for green abalone according to Diaz et al. We can see that the temperature never reaches the CTMax of green abalone at Punta Prieta. The variability of temperature appears to be greater than the variability shown in Morro Prieto, and temperatures are lower during the middle of the year and typically reach their high point approaching the end of the year. sp<-ggplot(data =natividad_tempDOdate,aes(natividadDate,`PP Temperature (oC)`))+geom_ line() sp+geom_hline(yintercept = 33.6,linetype="dashed",color="red")


CTMax for 50% green abalone, MorroPrieto Do the same for Morro Prieto. We can see that the temperature never reaches the CTMax at Morro Prieto. There appears to be seasonality in the patterns of temperature of roughly a year, and the variability is smaller compared to the variability of temperature in Punta Prieta. Temperatures are lower during the middle of the year and typically reach their highest point approaching the end of the year. morroprietotemp<-ggplot(data = natividad_tempDOdate,aes(natividadDate,`MP Temperature (oC)`))+geom_line() morroprietotemp+geom_hline(yintercept = 33.6,linetype="dashed",color="red")


MP Temperature and DO graphed together plainplot is a graph with temperature and DO levels of Morro Prieto graphed together. Horizontal dashed lines at 25.4 degrees celsius, the threshold of temperature, and 4.6mg/L, the threshold of DO levels, are added. High temperatures do not frequently coincide with low DO levels. 25.4 degrees celsius is the median preferred temperature of green abalone according to Diaz et al, while 4.6mg/L was the threshold DO level used by Boch et al. as a physiologically stressful level for many marine invertebrates. plainplot<-ggplot(data = natividad_tempDOdate,aes(natividadDate))+ geom_line(aes(y=`MP Temperature (oC)`),color="red")+ geom_line(aes(y=`MP dissolved oxygen (mg/L)`),color="blue")+ labs(x="Date",y="MP Temperature and DO",title="MP Temperature and DO") both<-plainplot+geom_hline(yintercept = 25.4, linetype="dashed",color="black") both2<-both+geom_hline(yintercept=4.6, linetype="dashed",color="purple3") both2


PP Temperature and DO graphed together justplot is a ggplot of Punta Prieta DO level and temperature shown together. Horizontal dashed lines at 25.4 degrees celsius, the threshold of temperature, and 4.6mg/L, the threshold of DO levels, are added. High temperatures do not necessarily coincide with low DO levels. justplot<-ggplot(data = natividad_tempDOdate,aes(natividadDate))+ geom_line(aes(y=`PP Temperature (oC)`,color="red"))+ geom_line(aes(y=`PP dissolved oxygen (mg/L)`),color="blue")+ labs(x="Date",y="PP Temperature and DO",title="PP Temperature and DO") bothPP<-justplot+geom_hline(yintercept = 25.4,linetype="dashed",color="black") bothPP2<-bothPP+geom_hline(yintercept=4.6, linetype="dashed",color="purple3") bothPP2


Duration of time above preferred temperature of abalone MP lagtime is a dataset containing all the data from the original dataset with an additional column for the lag times between each observation. Use the filter function to filter out all the lag times whenever the temperature exceeds 25.4 degrees celsius, which is the median preferred temperature of green abalone according to Diaz et al. Then use the sum function to get the total amount of minutes the temperature exceeds 25.4 degrees celsius in Morro Prieto. lagtime<-mutate(natividad_temp_do_2013_2018,natividadDate-lag(natividadDate)) df<-filter(lagtime,lagtime$`MP Temperature (oC)`>25.4) head(df$`natividadDate - lag(natividadDate)`)

## Time differences in mins ## [1] 10 10 10 10 10 10

sum(df$`natividadDate - lag(natividadDate)`)


## Time difference of 29980 mins

Duration of time above preferred temperature of abalone PP Do the same for Punta Prieta. lagtime<-mutate(natividad_temp_do_2013_2018,natividadDate-lag(natividadDate)) df<-filter(lagtime,lagtime$`PP Temperature (oC)`>25.4) head(df$`natividadDate - lag(natividadDate)`)

## Time differences in mins ## [1] 10 10 10 10 10 10

sum(df$`natividadDate - lag(natividadDate)`)

## Time difference of 9370 mins

Above 25.4 temperature MP Make a graph showing when the temperature exceeds 25.4 degrees celsius in Morro Prieto to check if the results make sense graphically. morroprietotemp+geom_hline(yintercept = 25.4,linetype="dashed",color="red")


## Above 25.4 temperature PP sp+geom_hline(yintercept=25.4,linetype="dashed",color="red")


## Below 4.6 DO level MP The total amount of time the DO level is below 4.6mg/L in Morro Prieto, in minutes. dissolved<-filter(lagtime,lagtime$`MP dissolved oxygen (mg/L)`<4.6) head(dissolved$`natividadDate - lag(natividadDate)`)

## Time differences in mins ## [1] 10 10 10 10 10 10

sum(dissolved$`natividadDate - lag(natividadDate)`)

## Time difference of 225340 mins

Below 4.6mg/l DO level PP The total amount of time the DO level is below 4.6mg/L in Punta Prieta, in minutes. dissolvedPP<-filter(lagtime,lagtime$`PP dissolved oxygen (mg/L)`<4.6) head(dissolvedPP$`natividadDate - lag(natividadDate)`)


## Time differences in mins ## [1] 10 10 10 10 10 10

sum(dissolvedPP$`natividadDate - lag(natividadDate)`)

## Time difference of 14230 mins

Rolling standard deviation for 6 hrs Calculate the rolling standard deviation of temperature and DO in both sites for 6 hours. The window size of 6 hours is selected to test for variability due to tidal patterns. We can see that the variability in temperature is greater in Punta Prieta compared to Morro Prieto, and the variability in DO in Morro Prieto is more regular compared to Punta Prieta. We see higher variability in the middle of the year and lower variability in the beginning of the year for both DO and temperature. rollingMPtemp<-rollapply(natividad_tempDOdate$`MP Temperature (oC)`,width=36,FUN=sd, na.pad=TRUE)

## Warning in rollapply.zoo(zoo(data), ...): na.pad argument is deprecated

rollingMPdo<-rollapply(natividad_tempDOdate$`MP dissolved oxygen (mg/L)`,width=36,FUN =sd,na.pad=TRUE)

## Warning in rollapply.zoo(zoo(data), ...): na.pad argument is deprecated

rollingPPtemp<- rollapply(`PP Temperature (oC)`, width = 36, FUN = sd, na.pad = TRUE)

## Warning in rollapply.zoo(zoo(data), ...): na.pad argument is deprecated

rollingPPdo<- rollapply(`PP dissolved oxygen (mg/L)`, width = 36, FUN = sd, na.pad = TRUE)

## Warning in rollapply.zoo(zoo(data), ...): na.pad argument is deprecated

rollingsd<-cbind(natividad_tempDOdate,rollingMPdo,rollingMPtemp,rollingPPdo,rollingPP temp) head(rollingsd)


## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ##

1 2 3 4 5 6 1 2 3 4 5 6 1 2 3 4 5 6

MP Temperature (oC) MP dissolved oxygen (mg/L) PP Temperature (oC) 12.342 4.9456 14.993 12.336 4.9527 15.013 12.326 4.9330 15.019 12.330 4.9273 15.022 12.335 4.9536 15.018 12.338 4.9883 15.008 PP dissolved oxygen (mg/L) natividadDate rollingMPdo rollingMPtemp 8.1389 2013-03-11 09:00:00 NA NA 8.2548 2013-03-11 09:10:00 NA NA 8.1069 2013-03-11 09:20:00 NA NA 7.9498 2013-03-11 09:30:00 NA NA 7.9057 2013-03-11 09:40:00 NA NA 7.9164 2013-03-11 09:50:00 NA NA rollingPPdo rollingPPtemp NA NA NA NA NA NA NA NA NA NA NA NA

ggplot(data = rollingsd,aes(rollingsd$natividadDate))+ geom_line(aes(y=rollingsd$rollingMPdo),color="gray")+ labs(title="Rolling standard deviation of DO over 6 hrs in MP")

## Warning: Removed 35 rows containing missing values (geom_path).


ggplot(data = rollingsd,aes(rollingsd$natividadDate))+ geom_line(aes(y=rollingsd$rollingMPtemp),color="blue")+ labs(title="Rolling standard deviation of temperature over 6 hrs in MP")

## Warning: Removed 35 rows containing missing values (geom_path).


ggplot(data = rollingsd,aes(rollingsd$natividadDate))+ geom_line(aes(y=rollingsd$rollingPPdo),color="gray")+ labs(title="Rolling standard deviation of DO over 6 hrs in PP")

## Warning: Removed 35 rows containing missing values (geom_path).


ggplot(data = rollingsd,aes(rollingsd$natividadDate))+ geom_line(aes(y=rollingsd$rollingPPtemp),color="blue")+ labs(title="Rolling standard deviation of temperature over 6 hrs in PP")

## Warning: Removed 35 rows containing missing values (geom_path).


Rolling sd for 12 hrs Calculate and graph the rolling standard deviation of temperature and DO for each site over a window size of 12 hours. rollingMPtemp12<-rollapply(natividad_tempDOdate$`MP Temperature (oC)`,width=72,FUN=sd , na.pad=TRUE)

## Warning in rollapply.zoo(zoo(data), ...): na.pad argument is deprecated

rollingMPdo12<-rollapply(natividad_tempDOdate$`MP dissolved oxygen (mg/L)`,width=72,F UN=sd,na.pad=TRUE)

## Warning in rollapply.zoo(zoo(data), ...): na.pad argument is deprecated

rollingPPtemp12<- rollapply(`PP Temperature (oC)`, width = 72, FUN = sd, na.pad = TRU E)


## Warning in rollapply.zoo(zoo(data), ...): na.pad argument is deprecated

rollingPPdo12<- rollapply(`PP dissolved oxygen (mg/L)`, width = 72, FUN = sd, na.pad = TRUE)

## Warning in rollapply.zoo(zoo(data), ...): na.pad argument is deprecated

rollingsd12<-cbind(natividad_tempDOdate,rollingMPdo12,rollingMPtemp12,rollingPPdo12,r ollingPPtemp12) head(rollingsd12)

## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ##

1 2 3 4 5 6 1 2 3 4 5 6 1 2 3 4 5 6

MP Temperature (oC) MP dissolved oxygen (mg/L) PP Temperature (oC) 12.342 4.9456 14.993 12.336 4.9527 15.013 12.326 4.9330 15.019 12.330 4.9273 15.022 12.335 4.9536 15.018 12.338 4.9883 15.008 PP dissolved oxygen (mg/L) natividadDate rollingMPdo12 8.1389 2013-03-11 09:00:00 NA 8.2548 2013-03-11 09:10:00 NA 8.1069 2013-03-11 09:20:00 NA 7.9498 2013-03-11 09:30:00 NA 7.9057 2013-03-11 09:40:00 NA 7.9164 2013-03-11 09:50:00 NA rollingMPtemp12 rollingPPdo12 rollingPPtemp12 NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA

ggplot(data = rollingsd12,aes(rollingsd12$natividadDate))+ geom_line(aes(y=rollingsd12$rollingMPdo12),color="gray")+ labs(title="Rolling standard deviation of DO in MP over 12 hrs")

## Warning: Removed 71 rows containing missing values (geom_path).


ggplot(data = rollingsd12,aes(rollingsd12$natividadDate))+ geom_line(aes(y=rollingsd12$rollingMPtemp12),color="blue")+ labs(title="Rolling standard deviation of temperature in MP for 12 hrs")

## Warning: Removed 71 rows containing missing values (geom_path).


ggplot(data = rollingsd12,aes(rollingsd12$natividadDate))+ geom_line(aes(y=rollingsd12$rollingPPdo12),color="gray")+ labs(title="Rolling standard deviation of DO in PP over 12 hrs")

## Warning: Removed 71 rows containing missing values (geom_path).


ggplot(data = rollingsd12,aes(rollingsd12$natividadDate))+ geom_line(aes(y=rollingsd12$rollingPPtemp12),color="blue")

## Warning: Removed 71 rows containing missing values (geom_path).


labs(title="Rolling standard deviation in PP for 12 hrs")

## ## ## ## ##

$title [1] "Rolling standard deviation in PP for 12 hrs" attr(,"class") [1] "labels"

Rolling sd for 24 hrs Calculate and graph the rolling standard of temperature and DO for each site over a window size of 24 hours. The window size of 24 hours is selected to test for daily patterns. The variability in temperature is greater in Punta Prieta compared to the variability in Morro Prieto. rollingMPtemp24hr<-rollapply(natividad_tempDOdate$`MP Temperature (oC)`,width=144,FUN =sd, na.pad=TRUE)

## Warning in rollapply.zoo(zoo(data), ...): na.pad argument is deprecated


rollingMPdo24hr<-rollapply(natividad_tempDOdate$`MP dissolved oxygen (mg/L)`,width=14 4,FUN=sd,na.pad=TRUE)

## Warning in rollapply.zoo(zoo(data), ...): na.pad argument is deprecated

rollingPPtemp24hr<- rollapply(`PP Temperature (oC)`, width = 144, FUN = sd, na.pad = TRUE)

## Warning in rollapply.zoo(zoo(data), ...): na.pad argument is deprecated

rollingPPdo24hr<- rollapply(`PP dissolved oxygen (mg/L)`, width = 144, FUN = sd, na.p ad = TRUE)

## Warning in rollapply.zoo(zoo(data), ...): na.pad argument is deprecated

rollingsd24hr<-cbind(natividad_tempDOdate,rollingMPdo24hr,rollingMPtemp24hr,rollingPP do24hr,rollingPPtemp24hr) head(rollingsd24hr)

## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ##

1 2 3 4 5 6 1 2 3 4 5 6 1 2 3 4 5 6

MP Temperature (oC) MP dissolved oxygen (mg/L) PP Temperature (oC) 12.342 4.9456 14.993 12.336 4.9527 15.013 12.326 4.9330 15.019 12.330 4.9273 15.022 12.335 4.9536 15.018 12.338 4.9883 15.008 PP dissolved oxygen (mg/L) natividadDate rollingMPdo24hr 8.1389 2013-03-11 09:00:00 NA 8.2548 2013-03-11 09:10:00 NA 8.1069 2013-03-11 09:20:00 NA 7.9498 2013-03-11 09:30:00 NA 7.9057 2013-03-11 09:40:00 NA 7.9164 2013-03-11 09:50:00 NA rollingMPtemp24hr rollingPPdo24hr rollingPPtemp24hr NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA


ggplot(data = rollingsd24hr,aes(rollingsd24hr$natividadDate))+ geom_line(aes(y=rollingsd24hr$rollingMPdo24hr),color="gray")+ labs(title="Rolling standard deviation for DO over 24 hrs in MP")

## Warning: Removed 143 rows containing missing values (geom_path).

ggplot(data = rollingsd24hr,aes(rollingsd24hr$natividadDate))+ geom_line(aes(y=rollingsd24hr$rollingMPtemp24hr),color="blue")+ labs(title="Rolling standard deviation for temperature over 24 hrs in MP")

## Warning: Removed 143 rows containing missing values (geom_path).


ggplot(data = rollingsd24hr,aes(rollingsd24hr$natividadDate))+ geom_line(aes(y=rollingsd24hr$rollingPPdo24hr),color="gray")+ labs(title="Rolling standard deviation for DO over 24 hrs in PP")

## Warning: Removed 143 rows containing missing values (geom_path).


ggplot(data = rollingsd24hr,aes(rollingsd24hr$natividadDate))+ geom_line(aes(y=rollingsd24hr$rollingPPtemp24hr),color="blue")+ labs(title="Rolling standard deviation of temperature for 24 hrs in PP")

## Warning: Removed 143 rows containing missing values (geom_path).


Rolling sd for 1 month Calculate and graph the rolling standard deviation of temperature and DO for each site over a widow size of 1 month. rollingMPtemp1m<-rollapply(natividad_tempDOdate$`MP Temperature (oC)`,width=4320,FUN= sd, na.pad=TRUE)

## Warning in rollapply.zoo(zoo(data), ...): na.pad argument is deprecated

rollingMPdo1m<-rollapply(natividad_tempDOdate$`MP dissolved oxygen (mg/L)`,width=4320 ,FUN=sd,na.pad=TRUE)

## Warning in rollapply.zoo(zoo(data), ...): na.pad argument is deprecated

rollingPPtemp1m<- rollapply(`PP Temperature (oC)`, width = 4320, FUN = sd, na.pad = T RUE)


## Warning in rollapply.zoo(zoo(data), ...): na.pad argument is deprecated

rollingPPdo1m<- rollapply(`PP dissolved oxygen (mg/L)`, width = 4320, FUN = sd, na.pa d = TRUE)

## Warning in rollapply.zoo(zoo(data), ...): na.pad argument is deprecated

rollingsd1m<-cbind(natividad_tempDOdate,rollingMPdo1m,rollingMPtemp1m,rollingPPdo1m,r ollingPPtemp1m) head(rollingsd1m)

## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ##

1 2 3 4 5 6 1 2 3 4 5 6 1 2 3 4 5 6

MP Temperature (oC) MP dissolved oxygen (mg/L) PP Temperature (oC) 12.342 4.9456 14.993 12.336 4.9527 15.013 12.326 4.9330 15.019 12.330 4.9273 15.022 12.335 4.9536 15.018 12.338 4.9883 15.008 PP dissolved oxygen (mg/L) natividadDate rollingMPdo1m 8.1389 2013-03-11 09:00:00 NA 8.2548 2013-03-11 09:10:00 NA 8.1069 2013-03-11 09:20:00 NA 7.9498 2013-03-11 09:30:00 NA 7.9057 2013-03-11 09:40:00 NA 7.9164 2013-03-11 09:50:00 NA rollingMPtemp1m rollingPPdo1m rollingPPtemp1m NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA

Graph rolling sd for 1 month Get a visualization of the rolling standard deviation with a window size of 1 month. ggplot(data = rollingsd1m,aes(rollingsd1m$natividadDate))+ geom_line(aes(y=rollingsd1m$rollingMPdo1m),color="gray")+ labs(title="Rolling standard deviation for DO over 1 month in MP")

## Warning: Removed 4319 rows containing missing values (geom_path).


ggplot(data = rollingsd1m,aes(rollingsd1m$natividadDate))+ geom_line(aes(y=rollingsd1m$rollingMPtemp1m),color="blue")+ labs(title="Rolling standard deviation for temperature over 1 month in MP")

## Warning: Removed 4319 rows containing missing values (geom_path).


ggplot(data = rollingsd1m,aes(rollingsd1m$natividadDate))+ geom_line(aes(y=rollingsd1m$rollingPPdo1m),color="gray")+ labs(title="Rolling standard deviation for DO over 1 month in PP")

## Warning: Removed 4319 rows containing missing values (geom_path).


ggplot(data = rollingsd1m,aes(rollingsd1m$natividadDate))+ geom_line(aes(y=rollingsd1m$rollingPPtemp1m),color="blue")+ labs(title="Rolling standard deviation of temperature for 1 month in PP")

## Warning: Removed 4319 rows containing missing values (geom_path).


ggplot(data = rollingsd1m,aes(rollingsd1m$natividadDate))+ geom_line(aes(y=rollingsd1m$rollingPPdo1m),color="gray")+ geom_line(aes(y=rollingsd1m$rollingPPtemp1m),color="blue")+ labs(title="Rolling standard deviation for 1 month in PP")

## Warning: Removed 4319 rows containing missing values (geom_path). ## Warning: Removed 4319 rows containing missing values (geom_path).


ggplot(data = rollingsd1m,aes(rollingsd1m$natividadDate))+ geom_line(aes(y=rollingsd1m$rollingMPdo1m),color="gray")+ geom_line(aes(y=rollingsd1m$rollingMPtemp1m),color="blue")+ labs(title="Rolling standard deviation for 1 month in MP")

## Warning: Removed 4319 rows containing missing values (geom_path). ## Warning: Removed 4319 rows containing missing values (geom_path).


Summary of rolling sd for 12 hrs summary(rollingsd12$rollingMPdo12)

## ##

Min. 1st Qu. 0.009 0.107

Median 0.178

Mean 3rd Qu. 0.236 0.308

Max. 1.542

NA's 3169

Max. 3.2064

NA's 2939

Max. 2.092

NA's 25817

summary(rollingsd12$rollingMPtemp12)

## ##

Min. 1st Qu. 0.0045 0.0951

Median 0.1837

Mean 3rd Qu. 0.2274 0.3082

summary(rollingsd12$rollingPPdo12)

## ##

Min. 1st Qu. 0.013 0.123

Median 0.209

Mean 3rd Qu. 0.292 0.375


summary(rollingsd12$rollingPPtemp12)

## ##

Min. 1st Qu. 0.005 0.113

Median 0.378

Mean 3rd Qu. 0.574 0.922

Max. 4.222

NA's 3692

Summary of rolling standard deviation for 6 hrs summary(rollingsd$rollingMPdo)

## ##

Min. 1st Qu. 0.0046 0.0640

Median 0.1140

Mean 3rd Qu. 0.1588 0.2051

Max. 1.5907

NA's 2773

Max. 2.7679

NA's 2579

Max. 2.235

NA's 25349

Max. 3.717

NA's 3368

summary(rollingsd$rollingMPtemp)

## ##

Min. 1st Qu. 0.0015 0.0545

Median 0.1132

Mean 3rd Qu. 0.1535 0.2054

summary(rollingsd$rollingPPdo)

## ##

Min. 1st Qu. 0.005 0.075

Median 0.136

Mean 3rd Qu. 0.207 0.255

summary(rollingsd$rollingPPtemp)

## ##

Min. 1st Qu. 0.001 0.067

Median 0.208

Mean 3rd Qu. 0.413 0.618

Summary of rolling standard deviation for 24 hrs summary(rollingsd24hr$rollingMPdo24hr)

## ##

Min. 1st Qu. 0.017 0.154

Median 0.247

Mean 3rd Qu. 0.311 0.411

Max. 1.675

NA's 3961

Max. 2.847

NA's 3659

summary(rollingsd24hr$rollingMPtemp24hr)

## ##

Min. 1st Qu. 0.010 0.154

Median 0.266

Mean 3rd Qu. 0.305 0.414


summary(rollingsd24hr$rollingPPdo24hr)

## ##

Min. 1st Qu. 0.026 0.169

Median 0.268

Mean 3rd Qu. 0.351 0.464

Max. 2.011

NA's 26753

Max. 4.355

NA's 4340

summary(rollingsd24hr$rollingPPtemp24hr)

## ##

Min. 1st Qu. 0.016 0.168

Median 0.506

Mean 3rd Qu. 0.670 1.062

Add year and month as additional columns to dataset Using the lubridate package, add year and month as additional columns to the original dataset so that we can graph the correlation between temperature and DO faceted by year. Year<-year(natividadDate) head(Year)

## [1] 2013 2013 2013 2013 2013 2013

Month<-month(natividadDate) head(Month)

## [1] 3 3 3 3 3 3

natividad_tempDOdate<-add_column(natividad_temp_do_2013_2018,natividadDate,Year,Month )

Correlation between temperature and DO We plot the dissolved oxygen as a function of temperature in order to examine whether there is a positive/negative correlation between them. We see a positive correlation between dissolved oxygen and temperature at lower temperature range (13-16oC) in both MP and PP. Even though colder fluid can hold more gas, dissolved oxygen can be depleted biologically especially in deep waters where removal by respiration would not be countered by photosysnthesis. When we examine the correlation by month, there is a strong positive correlation between the temperature and dissolved oxygen in MP.


ggplot(data = natividad_tempDOdate,aes(`MP Temperature (oC)`,`MP dissolved oxygen (mg /L)`)) + geom_line() + geom_smooth()+facet_wrap(~Year, nrow=2)+labs(x="Temperature (o C)", y="Dissolved Oxygen (mg/L)",title = "Correlation between T and DO in Morro Priet o (Year)")

## `geom_smooth()` using method = 'gam'

## Warning: Removed 2394 rows containing non-finite values (stat_smooth).

## Warning: Removed 144 rows containing missing values (geom_path).

ggplot(data = natividad_tempDOdate, aes(natividad_tempDOdate$`PP Temperature (oC)`,na tividad_tempDOdate$`PP dissolved oxygen (mg/L)`)) + geom_line() + geom_smooth() + fac et_wrap(~Year,nrow = 2) + labs(x="Temperature (oC)", y="Dissolved Oxygen (mg/L)",titl e = "Correlation between T and DO in Punta Prieta (Year)")

## `geom_smooth()` using method = 'gam'


## Warning: Removed 24893 rows containing non-finite values (stat_smooth).

## Warning: Removed 68 rows containing missing values (geom_path).

ggplot(data = natividad_tempDOdate, aes(natividad_tempDOdate$`MP Temperature (oC)`,na tividad_tempDOdate$`MP dissolved oxygen (mg/L)`)) + geom_line() + geom_smooth() + fac et_wrap(~Month,nrow = 4) + labs(x="Temperature (oC)", y="Dissolved Oxygen (mg/L)",tit le = "Correlation between T and DO in Morro Prieto (Month)")

## `geom_smooth()` using method = 'gam'

## Warning: Removed 2394 rows containing non-finite values (stat_smooth).

## Warning: Removed 144 rows containing missing values (geom_path).


ggplot(data = natividad_tempDOdate, aes(natividad_tempDOdate$`PP Temperature (oC)`,na tividad_tempDOdate$`PP dissolved oxygen (mg/L)`)) + geom_line() + geom_smooth() + fac et_wrap(~Month,nrow = 4) + labs(x="Temperature (oC)", y="Dissolved Oxygen (mg/L)",tit le = "Correlation between T and DO in Punta Prieta (Month)")

## `geom_smooth()` using method = 'gam'

## Warning: Removed 24893 rows containing non-finite values (stat_smooth).

## Warning: Removed 68 rows containing missing values (geom_path).


ggplot(data = natividad_tempDOdate, aes(natividad_tempDOdate$`MP Temperature (oC)`,na tividad_tempDOdate$`MP dissolved oxygen (mg/L)`)) + geom_line() + geom_smooth() + la bs(x="Temperature (oC)", y="Dissolved Oxygen (mg/L)",title = "Correlation between T a nd DO in Morro Prieto")

## `geom_smooth()` using method = 'gam'

## Warning: Removed 2394 rows containing non-finite values (stat_smooth).

## Warning: Removed 2229 rows containing missing values (geom_path).


ggplot(data = natividad_tempDOdate, aes(natividad_temp_do_2013_2018$`PP Temperature ( oC)`,natividad_tempDOdate$`PP dissolved oxygen (mg/L)`)) + geom_line() + geom_smooth( ) + labs(x="Temperature (oC)", y="Dissolved Oxygen (mg/L)",title = "Correlation betwe en T and DO in Punta Prieta")

## `geom_smooth()` using method = 'gam'

## Warning: Removed 24893 rows containing non-finite values (stat_smooth).

## Warning: Removed 3053 rows containing missing values (geom_path).


#Correlation between variability of temperature and dissolved oxygen in MP 1M with rolling standard deviation of temperature and do (window size = 1month) The correlation coefficient (0.188) suggests that there is not likely to be a linear relationship between the variablity of T and DO. As the variability for temperature increases, DO does not follow the same pattern. However, since MP is strongly affected by offshore upwelling during which colder and oxygen-depleted water is brought up to the surface, we expected there to be a linear relationship. As temperature and dissolved oxygen return to a normal level, their variability is assumed to correspond. In this case, we suppose that there is a lag time between or different rate of change when temperature and dissolved oxygen return to their normal level since DO is changed by biological activity, which may be slower, and temperature might be governed by diffusion/mixing. ggplot(data = rollingsd1m, aes(rollingsd1m$rollingMPtemp1m,rollingsd1m$rollingMPdo1m) ) + geom_line() + geom_smooth() + labs(title = "MPTDOsd1M")

## `geom_smooth()` using method = 'gam'

## Warning: Removed 49903 rows containing non-finite values (stat_smooth).

## Warning: Removed 45419 rows containing missing values (geom_path).


cor(rollingsd1m$rollingMPtemp1m,rollingsd1m$rollingMPdo1m,use = "complete.obs")

## [1] 0.1879982

lmsd1mMP <- lm(rollingsd1m$rollingMPdo1m ~ rollingsd1m$rollingMPtemp1m, data=rollings d1m) print(lmsd1mMP)

## ## Call: ## lm(formula = rollingsd1m$rollingMPdo1m ~ rollingsd1m$rollingMPtemp1m, ## data = rollingsd1m) ## ## Coefficients: ## (Intercept) rollingsd1m$rollingMPtemp1m ## 0.5136 0.1511

summary(lmsd1mMP)


## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ##

Call: lm(formula = rollingsd1m$rollingMPdo1m ~ rollingsd1m$rollingMPtemp1m, data = rollingsd1m) Residuals: Min 1Q Median -0.53270 -0.25320 -0.00456

3Q 0.23740

Max 0.61109

Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 0.513572 0.001617 317.54 <2e-16 *** rollingsd1m$rollingMPtemp1m 0.151056 0.001625 92.94 <2e-16 *** --Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.2783 on 235774 degrees of freedom (49903 observations deleted due to missingness) Multiple R-squared: 0.03534, Adjusted R-squared: 0.03534 F-statistic: 8638 on 1 and 235774 DF, p-value: < 2.2e-16

Correlation between variability of temperature and dissolved oxygen in PP 1M The correlation coeďŹ&#x192;ent (0.630) suggests that as T becomes more variable, DO may follow the same pattern. The pattern can potentially be a result of seasonal cycle. However, since PP experiences relatively strong tidal currents and more intense internal waves, we expect the variability of T and DO to be correlated at a smaller window size. ggplot(data = rollingsd1m, aes(rollingsd1m$rollingPPtemp1m,rollingsd1m$rollingPPdo1m) ) + geom_line() + geom_smooth() + labs(title = "PPTDOsd1M")

## `geom_smooth()` using method = 'gam'

## Warning: Removed 80437 rows containing non-finite values (stat_smooth).

## Warning: Removed 41924 rows containing missing values (geom_path).


cor(rollingsd1m$rollingPPtemp1m,rollingsd1m$rollingPPdo1m,use = "complete.obs")

## [1] 0.6297654

lmsd1mPP <- lm(rollingsd1m$rollingPPdo1m ~ rollingsd1m$rollingPPtemp1m, data=rollings d1m) print(lmsd1mPP)

## ## Call: ## lm(formula = rollingsd1m$rollingPPdo1m ~ rollingsd1m$rollingPPtemp1m, ## data = rollingsd1m) ## ## Coefficients: ## (Intercept) rollingsd1m$rollingPPtemp1m ## 0.08976 0.37907

summary(lmsd1mPP)


## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ##

Call: lm(formula = rollingsd1m$rollingPPdo1m ~ rollingsd1m$rollingPPtemp1m, data = rollingsd1m) Residuals: Min 1Q Median -0.47500 -0.16257 -0.05982

3Q 0.14272

Max 0.79549

Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 0.089758 0.001248 71.9 <2e-16 *** rollingsd1m$rollingPPtemp1m 0.379072 0.001032 367.3 <2e-16 *** --Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.2367 on 205240 degrees of freedom (80437 observations deleted due to missingness) Multiple R-squared: 0.3966, Adjusted R-squared: 0.3966 F-statistic: 1.349e+05 on 1 and 205240 DF, p-value: < 2.2e-16

Correlation between variability of temperature and dissolved oxygen in PP 6hr The variability of temperature and dissolved oxygen has a linear relationship with a smaller window size. As we assumed, the relationship may be caused by the tidal currents and internal waves. ggplot(data = rollingsd, aes(rollingsd$rollingPPtemp,rollingsd$rollingPPdo)) + geom_l ine() + geom_smooth() + labs(title = "PPTDOsd6hr")

## `geom_smooth()` using method = 'gam'

## Warning: Removed 25349 rows containing non-finite values (stat_smooth).

## Warning: Removed 3368 rows containing missing values (geom_path).


cor(rollingsd$rollingPPtemp,rollingsd$rollingPPdo,use = "complete.obs")

## [1] 0.5818152

Correlation between variability of temperature and dissolved oxygen in MP 6hr In MP, where we did not expect a strong correlation, there is a linear correaltion between the variability temperature and dissolved oxygen with a greater slope comparing to PP. ggplot(data = rollingsd, aes(rollingsd$rollingMPtemp,rollingsd$rollingMPdo)) + geom_l ine() + geom_smooth() + labs(title = "MPTDOsd6hr")

## `geom_smooth()` using method = 'gam'


## Warning: Removed 2779 rows containing non-finite values (stat_smooth).

## Warning: Removed 2579 rows containing missing values (geom_path).

cor(rollingsd$rollingMPtemp,rollingsd$rollingMPdo,use = "complete.obs")

## [1] 0.6339568

Density plot Create a density plot outlining the frequency of temperature and DO level values. This makes it easier to visualize and understand the characteristics and distribution of temperature and DO in the two sites. We can see that higher temperatures and higher DO levels occur more frequently in Punta Prieta. This data shows that real diďŹ&#x20AC;erences in oceanographic conditions manifest with small diďŹ&#x20AC;erences in distance. The maximum height of the density plot for temperature in Morro Prieto is 0.1377, for DO in MP 0.4850, for temperature in PP 0.1996, for DO in PP 0.5891. The width at half maximum is approximately 7 for temperature in MP, 2 for DO in MP, 4 for temperature in PP, and 2 for DO in PP. This suggests that there is more variability in temperature in MP compared to PP.


library(e1071)

## Warning: package 'e1071' was built under R version 3.4.4

par(mfrow=c(2,2)) ggplot(data = natividad_tempDOdate,aes(natividad_tempDOdate$`MP Temperature (oC)`))+g eom_density(color="darkblue", fill="lightblue")+geom_hline(yintercept = 0.06885,linet ype="dashed",color="red")+labs(title="Density plot MP Temperature",x="MP Temperature (oC)",y="Frequency")+xlim(10,30)+ylim(0.00,0.20)

## Warning: Removed 2229 rows containing non-finite values (stat_density).

ggplot(data = natividad_tempDOdate,aes(natividad_tempDOdate$`MP dissolved oxygen (mg/ L)`))+geom_density(color="darkblue", fill="lightblue")+geom_hline(yintercept = 0.2425 ,linetype="dashed",color="red")+labs(title="Density plot MP DO",x="MP DO (mg/L)",y="F requency")+xlim(2,12)+ylim(0.0,0.6)


## Warning: Removed 2388 rows containing non-finite values (stat_density).

ggplot(data = natividad_tempDOdate,aes(natividad_tempDOdate$`PP Temperature (oC)`))+g eom_density(color="darkblue", fill="lightblue")+geom_hline(yintercept = 0.0998,linety pe="dashed",color="red")+labs(title="Density plot PP Temperature",x="PP Temperature ( oC)",y="Frequency")+xlim(10,30)+ylim(0.00,0.20)

## Warning: Removed 3053 rows containing non-finite values (stat_density).


ggplot(data = natividad_tempDOdate,aes(natividad_tempDOdate$`PP dissolved oxygen (mg/ L)`))+geom_density(color="darkblue", fill="lightblue")+geom_hline(yintercept = 0.2945 5,linetype="dashed",color="red")+labs(title="Density plot PP DO",x="PP DO (mg/L)",y=" Frequency")+xlim(2,12)+ylim(0.0,0.6)

## Warning: Removed 24957 rows containing non-finite values (stat_density).


plot(density(natividad_tempDOdate$`MP Temperature (oC)`,na.rm = TRUE),xlim=c(10,30),y lim=c(0.00,0.20),main = "Density Plot MPT",ylab = "Frequency",sub = paste("Skewness:" ,round(e1071::skewness(natividad_tempDOdate$`MP Temperature (oC)`),2))) polygon(density(natividad_tempDOdate$`MP Temperature (oC)`,na.rm = TRUE),col = "blue" ) plot(density(natividad_tempDOdate$`PP Temperature (oC)`,na.rm = TRUE),xlim=c(10,30),m ain = "PP Temperature",ylab = "Frequency",sub = paste("Skewness:",round(e1071::skewne ss(natividad_tempDOdate$`PP Temperature (oC)`),2))) polygon(density(natividad_tempDOdate$`PP Temperature (oC)`,na.rm = TRUE),col = "blue" ) plot(density(natividad_tempDOdate$`MP dissolved oxygen (mg/L)`,na.rm = TRUE),xlim=c(2 ,12),ylim=c(0.00,0.6),main = "Density Plot MP DO",ylab = "Frequency",sub = paste("Ske wness:",round(e1071::skewness(natividad_tempDOdate$`MP dissolved oxygen (mg/L)`),2))) polygon(density(natividad_tempDOdate$`MP dissolved oxygen (mg/L)`,na.rm = TRUE),col = "grey") plot(density(natividad_tempDOdate$`PP dissolved oxygen (mg/L)`,na.rm = TRUE),xlim=c(2 ,12),main = "Density Plot PP DO",ylab = "Frequency",sub = paste("Skewness:",round(e10 71::skewness(natividad_tempDOdate$`PP dissolved oxygen (mg/L)`),2))) polygon(density(natividad_tempDOdate$`PP dissolved oxygen (mg/L)`,na.rm = TRUE),col = "grey")


Profile for rosemary.lee20

Statistical Analysis of Local Oceanographic Variability Relative to Abalone Habitats at Isla Nativid  

This publication contains information regarding my research, which was part of a larger project overseen by the Micheli Lab of Stanford Univ...

Statistical Analysis of Local Oceanographic Variability Relative to Abalone Habitats at Isla Nativid  

This publication contains information regarding my research, which was part of a larger project overseen by the Micheli Lab of Stanford Univ...