Package: rubaliz
RUBALIZRUBALIZ 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 temperatureSalinityDensityRUBALIZ was introduced in Fuchs, Baumas et al. (2022).InstallationThe package can be installed using pip or conda.
If you do not have python installed, the simplest is to installAnaconda3on 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.Then, open a command-line console (e.g. cmd, prompt, bash, etc.) and please copy-paste the corresponding line in it:
Using pip:pipinstallrubalizor alternatively using conda (from Anaconda3):condainstall-crobeerubalizGetting startedThe metadata have to be filled in a dictionary as shown below:fromrubalizimportrubaliz# Define CTD files infoinfo_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 informationruba.fit()# Adjust the modeThen 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 determinationprint(ruba.nb_ctd_lb)# The number of ctd used for the lower boundary determinationAs 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()To make an estimation of the sensibility of the boundaries to each input variable:ruba.sensitivity_analysis()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)