Coder Social home page Coder Social logo

oceanlyz's Introduction

OCEANLYZ

OCEANLYZ, Ocean Wave Analyzing Toolbox, is a toolbox for analyzing the wave time series data collected by sensors in open body of water such as ocean, sea, and lake or in a laboratory.

OCEANLYZ GUI is a graphical user interface for the OCEANLYZ toolbox.

This toolbox provides spectral and zero-crossing wave analysis. It can calculate wave properties such as zero-moment wave height, significant wave height, mean wave height, peak wave period and mean period. This toolbox can correct and account for the pressure attention (pressure loss) in the water column for data collected by a pressure sensor. This toolbox can separate wind sea and swell energies and reports their properties.

Name:OCEANLYZ
Description:Ocean Wave Analyzing Toolbox
Version:2.0 (GUI 1.2)
Requirements:MATLAB or GNU Octave | Python (3 or later) | GUI Version (Microsoft Windows 10 (64-bit))
Developer:Arash Karimpour | https://www.arashkarimpour.com
Documentation:https://oceanlyz.readthedocs.io
Tutorial Video:YouTube Playlist
Source Code:https://github.com/akarimp/Oceanlyz
Report Issues:https://github.com/akarimp/Oceanlyz/issues

GUI Version

Installing (GUI Version)

To use stand-alone GUI version of OCEANLYZ (Microsoft Windows (64-bit)):

MATLAB Version

Installing (MATLAB)

To use MATLAB version of OCEANLYZ toolbox:

Add OCEANLYZ folder to MATLAB or GNU Octave path

For example, if OCEANLYZ files are in "C:\OCEANLYZ" folder, then:

To add OCEANLYZ to MATLAB or GNU Octave path, run following commands in the Command Window:

OceanlyzPath = genpath('C:\oceanlyz'); %Generating path for OCEANLYZ folder and its sub-folders
addpath(OceanlyzPath); %Add OCEANLYZ folder to path

Required Package for MATLAB

MATLAB users need to install MATLAB Signal Processing Toolbox (https://www.mathworks.com/products/signal.html) for running the OCEANLYZ spectral analysis. It gives OCEANLYZ access to MATLAB Welch's power spectral density calculation. However, MATLAB Signal Processing Toolbox is not required for zero-crossing analysis.

Required Package for GNU Octave

GNU Octave users need to install/load GNU Octave Signal package (https://gnu-octave.github.io/packages/signal) for running the OCEANLYZ spectral analysis. It gives OCEANLYZ access to GNU Octave Welch's power spectral density calculation. However, GNU Octave Signal package is not required for zero-crossing analysis. To find the list of the GNU Octave's pre-installed packages, run the following command in the Command Window:

>> pkg list

GNU Octave comes with Signal package but it needs to loaded every time GNU Octave starts. The Signal package can be loaded inside GNU Octave by running the following command in the Command Window (This should be done every time GNU Octave is opened):

>> pkg load signal

If GNU Octave Signal Package is not already installed, it should be first installed from https://packages.octave.org, and then get loaded by running the following commands in the Command Window:

>> pkg install "https://downloads.sourceforge.net/project/octave/Octave%20Forge%20Packages/Individual%20Package%20Releases/signal-1.4.5.tar.gz"
>> pkg load signal

Quick Start (MATLAB)

  • Open MATLAB or GNU Octave
  • Change a current folder (current directory) to a folder that contains OCEANLYZ toolbox, for example “C:\oceanlyz”, in MATLAB or GNU Octave.
  • Open a file named “oceanlyzinput.m” in MATLAB or GNU Octave editor and modify it based on the properties of the collected dataset and required analysis.
  • Run a file named “RunOceanlyz.m” in MATLAB or GNU Octave to start calculations.

Python Version

Installing (Python)

To use Python version of OCEANLYZ toolbox:

  • Install Python
  • Install OCEANLYZ

1) Install Python

First, we need to install Python programming language.

  • Method 1:
    Install Python from https://www.python.org and then use the pip command to install required packages
  • Method 2 (Recommended):
    Install Anaconda Python distribution from https://www.anaconda.com and then use the conda command to install required packages

2) Install OCEANLYZ

After Python is installed, you need to install OCEANLYZ package.

If you installed Python, then you need to install OCEANLYZ via pip (https://pypi.org/project/oceanlyz). To do that, open the Command Prompt (or Terminal) and run:

pip install oceanlyz

If you installed Anaconda Python distribution, then you need to install OCEANLYZ via Anaconda cloud (https://anaconda.org/akarimp/oceanlyz). To do that, open the Command Prompt (or Terminal) and run:

conda install -c akarimp oceanlyz

Required Package for Python

Following packages are required:

Quick Start (Python)

  • Open Python
  • Import OCEANLYZ package by using "import oceanlyz"
  • Create OCEANLYZ object such as “ocn=oceanlyz.oceanlyz()” in Python and set/modify its properties based on the dataset and required analysis.
  • Run a method as “ocn.runoceanlyz()” in Python to start calculations.

About

Operating System

OCEANLYZ code can be run on Microsoft Windows, Mac, and Linux. However, make sure any given path is compatible with a running operating system. In particular, “\” is used in Windows path, while “/” is used in Mac or Linux path. For example, if a path is “C:\” on Windows machine, it would be “C:/” on Mac or Linux.

OCEANLYZ GUI can be run on Microsoft Windows (64-bit) machine.

Required Programming Language

OCEANLYZ toolbox can be run by using MATLAB (https://www.mathworks.com), GNU Octave (https://octave.org), or Python (https://www.python.org).

Citation

Cite OCEANLYZ as:

Karimpour, A., & Chen, Q. (2017). Wind Wave Analysis in Depth Limited Water Using OCEANLYZ, a MATLAB toolbox. Computers & Geosciences.

Link: https://www.sciencedirect.com/science/article/pii/S0098300417306489

Recommended Books

figures/Figure_Book_Coastal.jpg
figures/Figure_Book_Matlab.jpg
figures/Figure_Book_Python.jpg
Ocean Wave Data Analysis
Introduction to Time Series Analysis, Signal Processing, and Wave Prediction.


Fundamentals of Data Science with MATLAB
Introduction to Scientific Computing, Data Analysis, and Data Visualization.


Principles of Data Science with Python
Introduction to Scientific Computing, Data Analysis, and Data Visualization.


Recommended Applications

figures/Figure_Oceanlyz_Logo.png
figures/Figure_ScientiMate_Logo.png
figures/Figure_AsanPlot_Screenshot.jpg
OCEANLYZ
Ocean Wave Analyzing Toolbox

ScientiMate
Coastal and Ocean Data Analysis Library

AsanPlot
Data cleaning and plotting software

License Agreement and Disclaimer

OCEANLYZ: Ocean Wave Analyzing Toolbox

Copyright (c) 2023 Arash Karimpour

All rights reserved

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

oceanlyz's People

Contributors

akarimp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

oceanlyz's Issues

a typo in oceanlyz.m?

Hi Arash, in oceanlyz.m, Line 150 - 153, SeparateSeaSwell='yes' means "Separates wind sea and swell waves", right? It is stated oppositely in the code.

OCEANLYZ-Python TypeError

Dear @akarimp, First I am extremely thankful to you for providing such a excellent module to calculate wave parameters. I tried with one of my own water surface elevation data, recorded by Directional Wave Rider buoy. It shows TypeError, n_burst = 1, burst_duration = 1800 seconds, sampling frequency = 1.28 Hz. Kindly see the code, error report and help me out.

import scientimate as sm
import os
import numpy as np
import matplotlib.pyplot as plt

os.chdir("/WINDOWS/Mahesh R/Python/Wave Data Analysis/OCEANLYZ") # Change the folder that contains data file
water_level = np.genfromtxt("2001-10-09T00h21_For Mullai.csv") # load data file

"""Data type - waterlevel,
Number of recorded burst (n_burst) -1,
Sampling frequency (fs) - 1.28 Hz,
burst_duration - 1800 seconds"""

Create OCEANLYZ object

ocn = sm.oceanlyz()

Input data

ocn.data = water_level.copy()

Set up OCEANLYZ properties

ocn.InputType = "waterlevel"
ocn.OutputType = "wave"
ocn.AnalysisMethod = "spectral"
ocn.n_burst = 1
ocn.burst_duration = 1800
ocn.fs = 1.28
ocn.fmin = 0.05
ocn.fmax = ocn.fs / 2
ocn.dispout = "yes"
ocn.Rho = 1024 # Seawater density (varies)
ocn.runoceanlyz()

print(ocn.wave.keys())

Output:


OCEANLYZ Ver 2.0
www.ArashKarimpour.com
Copyright (C) 2012 - 2021 Arash Karimpour

Parameters (only required ones used)

InputType : waterlevel
OutputType : wave

AnalysisMethod : spectral

n_burst : 1
burst_duration : 1800
fs : 1.28

fmin : 0.05
fmax : 0.64

fmaxpcorrCalcMethod : auto
Kpafterfmaxpcorr : constant
fminpcorr : 0.15
fmaxpcorr : 0.55
heightfrombed : 0.0

dispout : yes

Rho : 1024
nfft : 512

SeparateSeaSwell : no
fpminswell : 0.1
fmaxswell : 0.25

tailcorrection : off
ftailcorrection : 0.9
tailpower : -5

Calculation Method: module=1
Description : Calculate wave parameters
Calculation Method: spectral analysis
Input Data : water depth or surface elevation data
Output : wave parameters

Calculating wave properties
Traceback (most recent call last):
File "/WINDOWS/Mahesh R/Python/Wave Data Analysis/OCEANLYZ_DWR buoy data.py", line 38, in
ocn.runoceanlyz()
File "/home/arun/anaconda3/lib/python3.8/site-packages/scientimate/oceanlyz/oceanlyz.py", line 1044, in runoceanlyz
self.wave=self.oceanlyzecalcwave()
File "/home/arun/anaconda3/lib/python3.8/site-packages/scientimate/oceanlyz/oceanlyz.py", line 897, in oceanlyzecalcwave
ini_arr_Eta=np.zeros((self.n_burst,n_sample)) #Initialize array to store surface elevation data
TypeError: 'float' object cannot be interpreted as an integer

Matlab bug

Hi,

I've tried to run the example in Matlab, but following error occured:

...
Copyright (C) 2012-2021 Arash Karimpour
Error using oceanlyz/oceanlyzmodule
Too many input arguments.

Error in oceanlyz/runoceanlyz (line 1093)
[obj.module]=obj.oceanlyzmodule(obj);

Is there any solution for this?

Best regards!

OCEANLYZ - Too Many Input Arguments

Hi Dr. Karimpour,

My name is Jay Merrill and I am a master's student here at Louisiana State University. We recently installed several RBR pressure sensors in Barataria Bay and I am in the process of analyzing the raw pressure data. I came across your OCEANLYZ MatLab code and felt it would be the perfect method to begin assessing the data.

I did, however, run into the same issue as the previous request that was closed in May. After trying a variety of inputs (.csv, .mat, .txt, all as one column vectors), I continue to receive, "Error using oceanlyz/oceanlyzemodule. Too many input arguments - Error in oceanlyz/runoceanlyz (line 1093) [obj.module]=obj.oceanlyzmodule(obj);

I understand your previous comment was regarding Octave, but as a student I am running all this analysis in MatLab R2020B. Do you have any advice on how to resolve this issue?

Thank you for your time and for providing what I hope will be a great method to analyze wave data.

Best,

Jay Merrill

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.