Skip to content
forked from manufrn/SHDR

Python implementation of the SHDR upper ocean structure fitting algorithm.

License

Notifications You must be signed in to change notification settings

ignasivalles/SHDR

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SHDR

Python implementation of the upper ocean structure fitting algorithm described in González-Pola et al. (2007). The SHDR algorithm (Sharp Homogenization/Diffusive Retreat) performs a differential evolution search to fit an upper ocean profile to an idealized analytical form. This analytical form defines a constant region (mixed layer), followed by a region defined by a combination of exponential and gaussian decays (seasonal thermocline/pycnocline) and a linear decay (permanent thermocline/pycnocline). The algorithm allows for a physical characterization of the thermocline/pycnocline, but it can also be used as a robust MLD identifying method.

Installation

SHDR is a small package. To keep things simple, we decided to source it as a standalone module in a single file. To use it, download the file SHDR.py and place it in you working directory. This file contains all the routines needed to run SHDR, which should be imported in your preferred programming environment.

A sample call would be

from SHDR import fit_profile # SHDR.py file in working directoy

result = fit_profile(y, z, max_depth=400)

The user manual contains extensive information on how to use the module. For a real use case, please see the example jupyter notebook.

Requisites

  • python >= 3.6.
  • numpy, pandas, tqdm.

Ensure these packages are installed on your system.

If using pip:

pip3 install --user numpy, pandas, tqdm

If using conda:

conda install numpy, pandas

conda install -c conda-forge tqdm

Citation

If you use SHDR in your project, please cite the original work González Pola et al. (2007). The code in this repository can be cited through (TODO: add DOI).

About

Python implementation of the SHDR upper ocean structure fitting algorithm.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 59.8%
  • Python 40.2%