Skip to main content

A package to detect the boundaries of the active mesopelagic zone

Project description

RUBALIZ

RUBALIZ_logo


RUBALIZ stands for RUpture-Based detection method for the Active mesopeLagIc Zone. It determines the active mesopelagic zone boundaries from CTD casts, using five variables:

  • Fluorescence
  • [02]
  • Potential temperature
  • Salinity
  • Density

RUBALIZ was introduced in Fuchs, Baumas et al. (2022).

Installation

The package can be installed using pip or conda. If you do not have python installed, the simplest is to install Anaconda3 on the host machine. During the installation: Please make sure to tick the "Add Anaconda3 to my Path" box, even if Anaconda displays a red message (see screenshot below). If you did not, please uninstall and reinstall Anaconda3.

conda_install
conda_install2

Then, open a command-line console (e.g. cmd, prompt, bash, etc.) and please copy-paste the corresponding line in it: Using pip:

pip install rubaliz

or alternatively using conda (from Anaconda3):

conda install -c robee rubaliz

Getting started

The metadata have to be filled in a dictionary as shown below:

from rubaliz import rubaliz

# Define CTD files info
info_dict = {'cruise_name': 'DY032',
'station_name': 'PAP',
'ub_range': [280, 320],
'lb_range': [1000, 1300],
'pres_col': 'PRES',
'Fluorescence': 'flC',
'Oxygen': 'oxygen',
'Pot. temp.': 'potemperature',
'Salinity': 'PSAL',   
'Density': 'sigma-00',
'files_format': '.cnv',
'sep': None,
'data_folder': 'your_path_to_data'}

The cruise and station names are optional, one can set them to None if not wanted. The maximum depth ranges to look for the upper bound and lower boundaries of the active mesopelagic zone, ub_range and lb_range, are set to [280, 320] and [1000, 1300] by default, respectively. These values have been chosen as the mesopelagic layer is classically assumed to lie between 200 and 1000 meters. These maximum ranges take into account this a priori knowledge with a security margin (max. 280m deep instead of 200m for the upper boundary.)

The pres_col is the name of the column containing the pressure data in the CTD cast. Similarly, the Fluorescence, Oxygen, Pot. temp., Salinity and Density stand for the column names of the fluorescence, oxygen, potential temperature, salinity data, and density, respectively. If one of these five signals is missing, please set it to None. Please ensure that your files contain only CTD downward casts (no upward casts) to avoid potential unexpected behaviors.

The data_folder contains all the CTD casts for a given (cruise, station) couple. An example of such a cast is given in the data folder. Be careful on Windows machines, you will have to replace "\" in the path with the standard "/".

RUBALIZ can handle '.cnv', '.txt' and '.csv' raw files (please do not use pre-processed files such as bodc-processed files). For '.csv' and '.txt' files, a separator (sep) has to be set (e.g. "," or ";" or "\s+" or "\t"). CTD casts present a significant format variety and this package has tried to handle most of them. Yet, it might be the case that you need to pre-process your CTD casts a bit to make things work. Besides, please be careful to have the same column names in info_dict as in your raw files (many errors stem from the encoding of special characters).

The model can be run in the following way in Spyder/via the console, etc.:

ruba = rubaliz(info_dict) # Fetch the pieces of information
ruba.fit() # Adjust the mode

Then the results are accessible in this way:

print(ruba.boundaries) # Upper and lower boundaries estimates and standard deviations.
print(ruba.nb_ctd_ub) # The number of ctd used for the upper boundary determination
print(ruba.nb_ctd_lb) # The number of ctd used for the lower boundary determination
README_cmd1

As we are using the example file given in the data_folder, there is only one CTD cast to determine the upper and lower boundaries.

To graphically analyze the boundaries found:

ruba.display_boundaries()
README_cmd2

To make an estimation of the sensibility of the boundaries to each input variable:

ruba.sensitivity_analysis()
README_cmd3

Finally, users interested in only determining the upper bound of the active mesopelagic layer (i.e. the limit of the upper ocean zone) can do it by running:

ruba = rubaliz(info_dict)
ruba.fit()
upper_data = ruba.format_data([0, ruba.ub_range[1]])
upper_bound= ruba.rupture_confidence_interval(ruba.ub_data, 1, [ruba.ub_range[0], ruba.ub_range[1]])
print(upper_bound)
README_cmd4

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rubaliz-0.1.11.tar.gz (34.5 kB view hashes)

Uploaded Source

Built Distribution

rubaliz-0.1.11-py3-none-any.whl (39.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page