Functions List (Python)#
Here is a list of the ScientiMate functions (Python):
Colormap#
Function |
Description |
---|---|
Generate a colormap from input colors |
|
Generate sequential colormap for drawing lines |
|
Export a topographic colormap |
Data Downloading#
Function |
Description |
---|---|
Download meteorological data from NOAA National Data Buoy Center |
|
Download meteorological data from NOAA’s Center for Operational Oceanographic Products and Services (CO-OPS) |
Data Manipulating#
Function |
Description |
---|---|
Downsample x data and retain given ratio |
|
Downsample x and y data and retain given ratio |
|
Downsample x, y, and z data and retain given ratio |
|
Interpolate 2d gridded data on given scatter point(s) using nearest neighbor method |
|
Interpolate x (longitude), y (latitude) and z (elevation) data into a defined mesh |
|
Interpolate 2d scattered data on given point(s) by down-sampling the input data |
|
Replace missing data points in 1d data such as time series |
|
Replace missing data points in 2d array |
|
Remove outliers in the time series using moving z-score window |
|
Remove spikes in the time series based on 3D phase space method by Goring and Nikora (2002) |
|
Remove spikes in the time series using a local difference of data respect to a moving average window |
|
Remove spikes in the time series that are outside a defined envelope |
Data Reading#
Function |
Description |
---|---|
Read and extract data from ASCII, text, Comma Separated Values (CSV), and spreadsheet (xlsx, xls, ods) file |
|
Read and extract data from ASCII, text, Comma Separated Values (CSV), Matlab .mat file |
|
Read and extract time-series data from ASCII, text, Comma Separated Values (CSV), and spreadsheet (xlsx, xls, ods) file |
|
Read and extract x (longitude), y (latitude) and z (elevation) data from ASCII gridded (tabular) xyz file |
Hurricane#
Function |
Description |
---|---|
Calculate and add background wind velocity due to hurricane front motion to hurricane rotational wind velocity |
|
Calculate hurricane central pressure (Pc) intensity change over time (dPc/dt) |
|
Generate hurricane pressure data on given (x,y) points using method from Holland (1980) |
|
Calculate hurricane center translational (forward motion) velocity |
|
Calculates hurricane wave height field (contours) on given mesh using method from Shore Protection Manual (SPM), U.S. Army Corps of Engineers (1984), and Young (1988) |
|
Calculates hurricane wave height and wave period field (contours) on given mesh using method from Hwang (2016) and Hwang & Walsh (2016) |
|
Calculate hurricane wave height field (contours) on given mesh using method from Young (1988) |
|
Calculate hurricane maximum wave height and wave period at a location of maximum wind |
|
Generate hurricane wind and pressure data on (x,y) points using method from Holland (2008) |
|
Generate hurricane wind and pressure data on given (x,y) points using method from Holland (1980) |
|
Calculate hurricane velocity tangential and inflow angle and inflow velocity in x (East) and y (North) directions |
|
Generate hurricane wind velocity data on given (x,y) points |
|
Calculate hurricane maximum wind velocity at the surface level |
|
Calculate hurricane maximum wind velocity at the gradient level using Holland (2008) method |
|
Calculate hurricane maximum wind velocity at the gradient level using Holland (1980) method |
|
Read and extracts hurricane data from National Hurricane Center (NHC) HURDAT2 file |
|
Calculate one dimensional storm surge using Dean Dalrymple (1991) method |
Mapping#
Function |
Description |
---|---|
Convert direction from one system to another one |
|
Calculate distance from (x1,y1) to (x2,y2) on cartesian coordinate |
|
Calculate distance and azimuth (bearing) between (Latitude,Longitude) points using Great Circle |
|
Find an end point of the straight line segment from its starting point (x1,y1) and its angle on cartesian coordinate |
|
Return x (longitude), y (latitude) and z (elevation) data from ETOPO1 Global Relief Model (Amante & Eakins, 2009) interpolated on 0.08 degree grid |
|
Generate 2d x-y grid |
|
Find intersection point between two line segments (line edges) on Great Circle |
|
Find intersection point between two line segments (line edges) |
|
Generate points between point (x1,y1) and (x2,y2) on cartesian coordinate |
|
Calculate end point (Latitude,Longitude) from start point (Latitude,Longitude) and distance and azimuth (bearing) using Great Circle |
|
Generate (Latitude,Longitude) points between two (Latitude,Longitude) points using Great Circle |
|
Calculate a wind fecth and z (elevation) profile along a path over water for a given 2d x-y domain (map, image, …) |
|
Calculate z (elevation, …) profile along a path over a given 2d x-y domain (map, image, …) |
Ocean Wave Data Analysis#
Function |
Description |
---|---|
Replace a spectrum tail with JONSWAP (Hasselmann et al., 1973) or TMA Spectrum (Bouws et al., 1985) |
|
Calculate water surface elevation time series from water pressure time series by using Fast Fourier Transform |
|
Calculate water surface elevation time series from water pressure time series by using an upward zero crossing method |
|
Partition (separate) wind sea from swell in a power spectral density using an one dimensional method |
|
Calculate water surface elevation time series from wave orbital velocity time series by using Fast Fourier Transform |
|
Calculate wave properties from wave orbital velocity by using an upward zero crossing method |
|
Calculate wave properties from water pressure by converting it to water surface elevation power spectral density |
|
Calculate wave properties from water pressure by using an upward zero crossing method |
|
Calculate wave properties from water surface elevation power spectral density |
|
Calculate wave properties from water surface elevation by using an upward zero crossing method |
|
Calculate wave properties from wave orbital velocity by converting it to water surface elevation power spectral density |
|
Calculate wave properties from wave orbital velocity by using an upward zero crossing method |
|
Calculate wave properties from a power spectral density |
Ocean Wave Directional Analysis#
Function |
Description |
---|---|
Calculate wave directional spectrum using parametric directional spreading function |
|
Calculate wave directional spectrum using water surface elevation and horizontal orbital velocity |
|
Calculate wave directional spectrum using pressure and horizontal orbital velocity |
|
Convert mathematical direction (angle) from ENU (East North Up) coordinate system to compass direction with respect to true north |
|
Calculate wave direction using water surface elevation and horizontal orbital velocity |
|
Calculate wave direction using pressure and horizontal orbital velocity |
Ocean Wave Parametric Model#
Function |
Description |
---|---|
Calculate dimensionless asymptotic limits of wind wave growth in shallow and intermediate water |
|
Calculate an equivalent wind fetch for duration limited wave growth in deep water |
|
Calculate an equivalent wind fetch for duration limited wave growth in shallow and intermediate water |
|
Calculate a fully developed condition for wind wave growth |
|
Calculate a minimum required wind duration for wave to be fetch limited in deep water |
|
Calculate a minimum required wind duration for wave to be fetch limited in shallow and intermediate water |
|
Calculate wave properties using parametric wave models in deep water |
|
Calculate wave properties using parametric wave models in shallow and intermediate water |
|
Calculate dimensionless numbers from dimensional numbers |
|
Calculate dimensional numbers from dimensionless numbers |
Ocean Wave Properties#
Function |
Description |
---|---|
Separate incident and reflected waves |
|
Generate linear waves |
|
Superposition linear waves |
|
Calculate a pressure response factor |
|
Generate second order stokes’ waves |
|
Superposition second order stokes’ waves |
|
Calculate the bottom shear velocity and shear stress from current velocity and wave |
|
Solve water wave dispersion relation |
|
Solve water wave dispersion relation with presence of current (Doppler shift) |
|
Calculate maximum wave orbital velocity and maximum wave orbital excursion using linear wave theory |
|
Calculate wave power |
|
Calculate wave energy and wave power from power spectral density |
|
Generate random water wave data from a given water wave spectrum using wave superposition |
|
Calculate a water particle horizontal orbital velocity to the water surface elevation conversion factor |
Ocean Wave Spectrum#
Function |
Description |
---|---|
Calculate Bretschneider spectrum (power spectral density), (Bretschneider, 1959), ITTC spectrum |
|
Calculate Donelan spectrum (power spectral density), (Donelan et al. 1985) |
|
Calculate JONSWAP spectrum (power spectral density), (Hasselmann et al. 1973) |
|
Calculate Pierson-Moskowitz spectrum (power spectral density), (Pierson and Moskowitz 1964) |
|
Calculate TMA spectrum (power spectral density), (Bouws et al. 1985) |
Plotting#
Function |
Description |
---|---|
Plot x and y data in 2-d plot |
|
Plot x and y data in 2-d subplots |
|
Plot x data in 2-d timeseries |
|
Plot x , y, and z data in 2-d/3-d contour/surface plot |
|
Plot x (longitude), y (latitude) and z (elevation) data into a defined mesh |
|
Plot hillshades (shaded relief) of x (longitude), y (latitude) and z (elevation) data |
|
Plot x (longitude), y (latitude) and z (elevation) data into a defined mesh |
Signal Processing#
Function |
Description |
---|---|
Calculate power spectral density using Bartlett’s method |
|
Return frequencies for Fast Fourier Transform |
|
Filter time-series to retain signals with frequencies of fcL <= f <= fcH |
|
Calculate power spectral density using periodogram method |
|
Generate random wave data from a given spectrum |
|
Smooth input data using a window function |
|
Calculate spectrogram following Welch’s method without averaging |
|
Calculate power spectral density using Welch’s method |
Statistics#
Function |
Description |
---|---|
Fit curve to 2 dimensinal input dataset |
|
Fit curve to 3 dimensinal input dataset |
|
Display an overview of the input data |
|
Find local extremum (minimum and maximum) in data |
|
Find k-nearest neighbors using Euclidean distance |
|
Calculate goodness of fit parameters |
|
Calculate crossing point for a given level by using an upward zero crossing method |
|
Calculate statistics of moving window through 1-d x data |
|
Calculate 1D probability density distribution for a given dataset |
|
Calculate 2D (joint) probability density distribution for two given datasets |
|
Measure similarity between two arrays |
SWAN Wave Model#
Function |
Description |
---|---|
Generate SWAN depth file and its associated x-y grid file |
|
Generate SWAN file for spatially constant vector variable |
|
Generate SWAN file for spatially varied vector variable from gridded input data |
|
Generate SWAN file for spatially varied vector variable from scattered input data |
|
Generate SWAN water level file for spatially constant water level |
|
Generate SWAN water level file for spatially varied water level from gridded input data |
|
Generate SWAN water level file for spatially varied water level from scattered input data |
|
Generate SWAN wind file for spatially constant wind |
|
Generate SWAN wind file for spatially varied wind from gridded input data |
|
Generate SWAN wind file for spatially varied wind from scattered input data |
Wind Engineering#
Function |
Description |
---|---|
Average direction |
|
Smooth wind data using moving average window |
|
Calculate shear velocity and surface roughness from a given velocity profile using Karimpour et al. (2012) method |
|
Calculate the sustained wind duration |
|
Average wind velocity and wind direction |
|
Calculate wind drag coefficient, wind shear stress, and wind shear velocity |
|
Convert wind velocity of duration t0 to t |
|
Calculate wind spectrum with 513 frequencies |
|
Generate zero-mean wind velocity time series from a given spectrum |
|
Convert wind velocity from first height, z1 (m), to second height, z2 (m), (e.g. 10 (m)) above surface |