Description Usage Arguments Value Author(s) Examples
Here you get to define your own reference depth and temperature difference to determine where the mixed layer ends based on the slope of each linear regression between each consecutive depth point pair. This function will return the the bottom depth that does fit the condition; it does not return most shallow depth which no longer fits the mixed layer condition. This function doesn't care about units, so you are responsible for your own. Also note that this function will return a thermocline depth even for inverted profiles (surface temperature colder than depth), although it will print a warning for you as well.
If you data is in excel, be sure to download the file into a dataframe, then open that dataframe to figure out the names of the columns you are interested in or rename columns. This will be easiest with a worksheet that only contains columns of data. Ex:
library(gdata)
mydata = read.xls("mydata.xls") #Reads from the first sheet only
1 | mldthermocline(df, depthname, tempname)
|
df |
Data frame which has one column for depth and another column for temperatures. Can contain additional columns. See the example below for help on assembling a dataframe from two vectors or lists. |
depthname |
The name of the df column that contains depth data, input as a string (i.e., 'depth' not depth.) |
tempname |
The name of the df column that contains temperature data, input as a string (i.e., 'temp' not temp.) |
Returns a sungle numeric value that is the minimum of the depths you provided that still is part of the mixed layer.
Kate Evans, University of Montana/Flathead Lake Biological Station
1 2 3 4 5 6 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.