Sunday, October 25, 2015

Fluxes reservoirs and sinks - the one box model with labcasts

In this blog post I intend to display the one box model of fluxes and sinks using a series of lab casts.



First lets go through the mathematical terms we intend to use

$$ Reservoir - Q $$
$$Time - t $$


A reservoir is the "box" from the one box model, where the substances are accumulated. It is denoted by the letter Q which suggest that it is an expression of the quantity of substance in the reservoir.
Time denotes the times since the reservoir started filling and is denoted by the letter t
$$Flux - \nu $$


These terms are demonstrated in the following Lab-Cast




This model forecast

Reservoir size is equal to the time since the flux began doubled by the flux
$$ Q={\nu}*{t} $$ 
 The flux is equal to the size of the reservoir devided by the time since the flux began 
$$\nu = \frac{Q}{t}$$ 
The time since the flux began is equal to the reservoir size devided by the flux 
 $$t=\frac{Q}{\nu}$$ 
Naturlly, fluxes can come in many different shapes and can be combined or detached. For instance,  lets add another flux of dissolved tracer to our water flux.
Nothing changes in our mathematics the only thing we need to adjust is that we need for each tracer using the appropriate terms. The link between the water and the tracer flux is the Concentration in the flux and in the reservoir.
reservoir concentration - $C_r$ and flux concentration - $C_f$
So the terms used for tracer calculation (marked as tr):
$$Q_{tr}=t*\nu*C_f = C_r*Q$$
$$\nu_{tr}=\nu_{tr}*C_{f}$$
$$t=\frac{Q_{tr}}{\nu_{tr}}$$

The most important statement in this post is:

In the real world every flux has an opposing  flux (outflux), otherwize, Reservoir size (Q) will reach infinity.


So lets introduce a new term:
$$Removal - R$$

In the following lab cast an example of influx and removal is given:

And now for some math, this time using the two fluxes situation.
Let us try and calculate the change of tracer concentration $Q_{tr}$ per unit of time:
$$\frac{dQ_{tr}}{dt}= \Sigma sources - \Sigma sinks=f_{tr}-R_{tr}$$
In our simple example the only source is the particulate source through the tap and the only sink is the particles settling. The size of the sink is linearly related to the size of the tracer reservoir $Q_{tr}$. Let us define the linear relationas k.
$$\frac{dQ}{dt}=f_{tr}-kQ_{tr}$$ after doing some algebra: $$\frac{dQ}{f_{tr}-k*Q_{tr}}=dt$$ And by integrating both sides of the equation over time we are getting: $$\left(\frac{1}{k}\right) * ln \left(f_{tr}-k*Q_{tr}\right) \int_0^t= t \int_0^t $$ Which gives $$\left(\frac{1}{k}\right) * ln \left(\frac{f_{tr}-k*Q_{tr(t=t)}}{f_{tr}-k*Q_{tr(t=0)}}\right) = t $$ And again, Rearranging: $$Q_{tr(t=t)}=Q_{tr(t=0)}*e^{-kt}+\frac{f_{tr}}{k}*\left(1-e^{-kt}\right)$$


Bear in mind that the natural environment is usually a "pseudo steady state", the environmental properties change in time but are kept between thresholds. This means that the influx and outflux are equal and therefore can be calculated using the following formulas give us a good first order approximation of the fluxes. $$f_{tr}=R_{tr}$$ or $$\frac{d{tr}}{dt}=0$$ or $$\frac{dQ}{dT}=0$$

Wednesday, October 7, 2015

On relative sediment sinking rate and sediment composition

When I teach my chemical oceanography student about the factors determining sediment composition I found out that understanding the concept of relative flux rate is not trivial. Therefore, I present a simple experiment demonstrating those concepts.

First, let me ask you a question:
Why the most abundant type of sediment in deep water (>3.7Km) at the middle of the ocean is red clayes of continental origin?
To answer that we must first understand that sediment is formed by settling of particles from the sea surface or particles that are formed within the water column on the bottom of the ocean. The settled particles are defined as sediment. This is demonstrated in the following clip
As you can see, when only one type of sediment settles the sediment is composed of only that type of sediment. But what is the sediment composition when several types of sediments are settled together?


  Now we are getting closer to solving our question. When sedimentation of several types of sediments is simultaneous, the sediment composition will be determined by their relative flux (amount of sediment sinking in a unit of time) and their decomposition within the sediment.


Lets see if its clear

And now lets see if you can implement the concepts I introduced to help people in need

A group of arts wants to find meteorites to make jewels where would you suggest them to look fo

    At river outfalls
    At the Mediterranean
    Where red clays are found
    On continental ridge

Saturday, June 13, 2015

Ecological community statistics using the PAST statistical software

In this post I want to run you guys through a series of screencasts describing how to perform ecological community statistical analysis using the PAST statistical software.
PAST is a statistical software developed by Oyvind Hammer from the Norwegian natural history museum. Initially it was designed to perform paleontological statistics, but has become an  extremely useful and easy to learn statistical software. The fact that PAST is distributed free of charge makes it an alternative to other programs, in my case I use it as an alternative to PRIMER-E when performing benthic statistics. In the PAST website you can also find a very lightweight easy to understand user guide.


In most cases you will perform the sampling on field and organize the data using Microsoft excel  where columns represents the taxa and rows represent each sample the values in the cells are a measure of taxa aboundance in each sample. the first two screencast describes how to organize your ecological data and upload it to PAST.


The procedures the help you get a "feeling" of your data includes non metric multi-dimensional scaling (Kenkel and Laszlo, 1986) and cluster analysis, the analysis results help you see if there are trends in your data, to better see the internal organization of the data you can use a "grouping" variable to add color to you results. this is all described in the following two screencasts.

After distinct sample groups were identified in your data you will want to determine if they are significantly different from one another. This can be performed using ANOSIM (analysis of similarity, Anderson, 2001).

The last step in the screencast series is understanding which species control the community change, this can be performed using a statistical test called SIMPER (similarity percentage, Clarke1993) as displayed in the last screencast.




Anderson, M. J. 2001. A new method for non-parametric multivariate analysis of variance. Austral Ecology 26: 32-46.
Clarke, K.R. 1993. Non-parametric multivariate analyses of changes in community structure. Australian Journal of Ecology, 18, 117143.
Kenkel, Norm C., and Laszlo Orlóci. "Applying metric and nonmetric multidimensional scaling to ecological studies: some new results." Ecology(1986): 919-928.

Thursday, February 19, 2015

Preparing Seabird CTD data for Ocean Data View (ODV)

In this post I will give a tutorial explaining the procedure I use to prepare sampled marine data (mostly SeaBird CTD data) to be plotted using the Ocean Data View (ODV) software.



Both ODV and SeaBird CTD are near Oceanographic standard, but getting used to processing the CTD data for ODV takes some time. With the hope of saving some time I detail the procedure we usually take at the Israeli School of Marine Sciences.

Step one: 
Convert the hex file downloaded frome the CTD or saved while sampling using SeaSave software to .cnv file. This step is conducted using the Data Conversion option in SeaBird data processing software (SBEDataProcessing).
Step two:
Align the CTD data. Since the CTD instrument is a combination of several sensors, each having a typical time lag the readings in one data scan does not really represent a single point in time for all water quantities. To compensate for this, CTD alignment is performed using the Align CTD option at the SBEDataProcessing.

Step three:
Average the CTD data by depth. Many times, having data values at fixed depth intervals (eg. 1m) is more convenient. To achieve that we use the Bin Average option in SBEDataProcessing.
Step four:
Exporting the data to text file. The .cnv files include header, metadata and only then the sampled values. To be separate the metadata from the data we export the data to text file using the Ascii Out option in SBEDataConversion.
Step five:
Data Validation. Many times some of the sensor reading is noisy or in someway inaccurate, before we go on with plotting the data we validate that all data are correct. This is conducted by plotting a scatter plot of the data using MS. Excel and visually observing the plots.
Step six:
Preparation of ODV compatible spreadsheet. ODV has very strict laws for importing spreadsheet data. To prepare the data in ODV format we use an MS. Excel template (you can grab it here) and save it as a delimeted text file.

Last step (seven):
Import the data to ODV and plot it.

Thanks to my teacher Gitai Yahel who tought me this process.

ENJOY

Thursday, January 1, 2015

Seawater Oxygen saturation function for Microsoft excel

Hi all
For some time now I searched for a Microsoft oxygen saturation function with no success so I had to write one.
If you are interested, you can download the code here and paste it in a VBA Module in your workbook. Or you can just download the sample spreadsheet here:

The code:

Public Function O2Sat(ByVal T As Single, ByVal S As Single) As Single


' SW_SATO2   Satuaration of O2 in sea water
'=========================================================================
' sw_satO2 $30/12/2014 By yair Suari, Ruppin Academic Center$
'
'
' to use, Formulas>Insert Function =O2Sat(S,T,P)
'
' More:
'    Solubility of Oxygen as O2 in sea water
'
'
'   S = salinity    [psu      (PSS-78)]
'   T = temperature [degree C (IPTS-68)]
'
' Output Units:
'   O2  [µMol/l]
' After:
'    Weiss, R. F. 1970
'    "The solubility of nitrogen, oxygen and argon in water and seawater."
'    Deap-Sea Research., 1970, Vol 17, pp721-735
.
' convert to Kelvin
T = 273.15 + T

'constants for Eqn (4) of Weiss 1970

a1 = -173.4292
a2 = 249.6339
a3 = 143.3483
a4 = -21.8492
B1 = -0.033096
b2 = 0.014259
b3 = -0.0017

'Eqn (4) of Weiss 1970

lnC = A1 + a2 * (100 / T) + a3 * Log(T / 100) + a4 * (T / 100) + S * (B1 + b2 * (T/ 100) + b3 * ((T / 100) ^ 2))

c = Exp(lnC)
O2Sat = c / 22.414 * 1000

End Function



Happy new 2015
Yair