GAM Backfit Algorithm

A Python implementation of the Backfit algorithm for fitting to Generalized Additive Models. Python Implementation of the Backfit algorithm described by Wood, Simon. (2017). Generalized Additive Models: an introduction with R (CRC Press).

USAGE: yr, alpha = GAMapply(X,mod,pp,hdr,Y).

INPUT: (works with pandas dataframes only) X = N x d dataframe, Environmental inputs or corelates; this variable should be standardized. mod = list() data type of Cubic spline fits to each column in X. Y = N x 1, instrument response pp = polynomial fit to mass 18, not presently implemented. hdr = column names to subindex.

OUTPUT: yr = reconstructed series of y from the model. alpha = mean of y. This should be zero if already standardized.


Gas Solubilities for Matlab, Python and R!

Since March 2017, Geotracerkitchen and the students of OCG 521 here at GSO have been assembling solubility functions for gases of interest in ocean and atmospheric chemistry. To date, we have solubility functions for 26 gases including the noble gases, CFCs/SF6, and the HFCs among others. Solubility functions are available in Matlab, Python, and R but the list is a work in progress, so not all gases are available in all languages.

keff in the Sea Ice Zone

Processes leading turbulence production in the sea ice zone.

Processes leading turbulence production in the sea ice zone.


Version 3 is now available. Sep 2017

In addition to routines from previous versions, we also added a formulation that takes into account the effects of wave attenuation and fetch limitation, improving the consistency and performance of the code. The link to source code and examples:

Download the new version now!!

or at

Reference : Wave Attenuation and Gas Exchange in Marginal Sea Ice Zone

Version 2 has been released . This version fixes an inconsistency in the way that we represented the gas transfer velocity from fetch-limited waves. Field data from 2015 and 2016 have given new insights into the TKE dissipation caused by these short period waves and the new formulation for keff is based on an entirely consistent forcing from shear, convection and fetch-limited waves. This eliminates a pre-existing bias in open water and at high wind speeds.

The Matlab routines contained in this distribution calculate the effective gas transfer velocity (keff) for sea-ice-covered waters where turbulence can arise from (1) ice-water drag, (2) air-water drag and (3) buoyant convection. The routines are based on the parameter model described in:

Version 2:
Reference: Loose, B., W. R. McGillis, D. Perovich, C. J. Zappa, and P. Schlosser (2014), A parameter model of gas exchange for the seasonal sea ice zone. Ocean Science, 10(4), doi:10.5194/os-10-1-2014.


The program Saltywatr1.0.0 is collection of Matlab routines that implement a numerical solution of the shallow-water flow equations for rivers, estuaries, and the coastal sea. Imagine a two-dimensional planar flow, as in a shallow estuary, with spatial variations in velocity, water height, and salt. The model calculates the above flow variables using the conservation equations for water, salt, and momentum. To simulate flow driven by differ- ences in salt concentration, the momentum equation is coupled to the conservation of salt through the hydrostatic pressure term. Saltywatr is capable of modeling domains of irreg- ular geometry, such as estuaries and rivers.

Download: Saltywatr1.0.0.tar
Manual: Saltywatr_manual