wavebitscientific / wavy

Licence: BSD-3-Clause license
A spectral ocean wave modeling framework

Programming Languages

fortran
972 projects
CMake
9771 projects
Makefile
30231 projects

Projects that are alternatives of or similar to wavy

Harris-Hawks-Optimization-Algorithm-and-Applications
Source codes for HHO paper: Harris hawks optimization: Algorithm and applications: https://www.sciencedirect.com/science/article/pii/S0167739X18313530. In this paper, a novel population-based, nature-inspired optimization paradigm is proposed, which is called Harris Hawks Optimizer (HHO).
Stars: ✭ 31 (+106.67%)
Mutual labels:  modeling
DTA
This repository documents MATLAB implementation of a dynamic user equilibrium solver, including a dynamic network loading sub-routine
Stars: ✭ 55 (+266.67%)
Mutual labels:  modeling
cfdm
A Python reference implementation of the CF data model
Stars: ✭ 24 (+60%)
Mutual labels:  ocean
Android-Wave-Recorder
A powerful and efficient library to record WAVE form audio files (WAV) in Android
Stars: ✭ 137 (+813.33%)
Mutual labels:  wave
geostan
Bayesian spatial analysis
Stars: ✭ 40 (+166.67%)
Mutual labels:  modeling
gis-snippets
Some code snippets for GIS tasks
Stars: ✭ 45 (+200%)
Mutual labels:  modeling
hodur-visualizer-schema
Hodur is a domain modeling approach and collection of libraries to Clojure. By using Hodur you can define your domain model as data, parse and validate it, and then either consume your model via an API or use one of the many plugins to help you achieve mechanical results faster and in a purely functional manner.
Stars: ✭ 16 (+6.67%)
Mutual labels:  modeling
rec-core
Data pipelining service
Stars: ✭ 19 (+26.67%)
Mutual labels:  modeling
Unity-Raymarched-Clouds-Simple-Wave
Unity project showcasing clouds volume rendering with raymarching, and a simple coloured wave.
Stars: ✭ 17 (+13.33%)
Mutual labels:  wave
classy blocks
Python classes for easier creation of OpenFOAM's blockMesh dictionaries.
Stars: ✭ 53 (+253.33%)
Mutual labels:  modeling
JHSoundWaveView
音波图,声波图
Stars: ✭ 22 (+46.67%)
Mutual labels:  wave
enmSdm
Faster, better, smarter ecological niche modeling and species distribution modeling
Stars: ✭ 39 (+160%)
Mutual labels:  modeling
dots
digital ocean api typescript/javascript wrapper
Stars: ✭ 65 (+333.33%)
Mutual labels:  ocean
hydrotools
Suite of tools for retrieving USGS NWIS observations and evaluating National Water Model (NWM) data.
Stars: ✭ 36 (+140%)
Mutual labels:  modeling
SwiftyWave
Siri Waves View in Swift
Stars: ✭ 66 (+340%)
Mutual labels:  wave
scan
DeFi Scan, everything one-stop location for DeFi Blockchain. Powered by jellyfish & ocean network.
Stars: ✭ 31 (+106.67%)
Mutual labels:  ocean
OpenMAS
OpenMAS is an open source multi-agent simulator based in Matlab for the simulation of decentralized intelligent systems defined by arbitrary behaviours and dynamics.
Stars: ✭ 80 (+433.33%)
Mutual labels:  modeling
react-native-art-wave
A concise water wave animation process view write by React Native Art.
Stars: ✭ 45 (+200%)
Mutual labels:  wave
radar
OpenGL 4 PBR engine
Stars: ✭ 25 (+66.67%)
Mutual labels:  ocean
exemplary-ml-pipeline
Exemplary, annotated machine learning pipeline for any tabular data problem.
Stars: ✭ 23 (+53.33%)
Mutual labels:  modeling

wavy

A spectral ocean wave modeling framework.

Getting started

Building wavy

git clone --recursive https://github.com/wavebitscientific/wavy.git
FC=gfortran make
mkdir build
cd build
FC=gfortran cmake ..
make
ctest

Change the FC value if building with a different Fortran compiler.

By default, wavy will be built in single precision (32-bit reals). To build it in double (64-bit reals) or quadruple precision (128-bit reals), use the -DREAL argument when invoking cmake:

FC=gfortran cmake .. -DREAL=64 # for double precision

or:

FC=gfortran cmake .. -DREAL=128 # for quad precision

wavy needs gcc-6.3.0 or later to succesfully build and pass all tests.

Building a simple program with wavy

If you compiled wavy in wavy/build, then the module files and the library are located in wavy/build/include and wavy/build/lib, respectively. For example, if we want to build a simple wavy hello world program from the base directory, we could do it like this:

gfortran hello.f90 -o hello -Ibuild/include -Lbuild/lib -lwavy

Examples

Initialize a omnidirectional spectrum instance in the frequency range from 0.04 to 2 Hz with logarithmic increment of 1.1, in mean water depth of 1000 m:

use mod_spectrum,only:spectrum_type
type(spectrum_type) :: spec

! initialize a spectrum instance
spec = spectrum_type(fmin=0.04,fmax=2.,df=1.1,ndirs=1,depth=1000.)

Same as above, but directional spectrum with 36 directional bins:

spec = spectrum_type(fmin=0.04,fmax=2.,df=1.1,ndirs=36,depth=1000.)

Initialize omnidirectional spectrum with JONSWAP shape at wind speed of 10 m/s, and fetch of 100 km:

use mod_spectrum,only:spectrum_type
use mod_spectral_shapes,only:jonswap

type(spectrum_type) :: spec

! initialize a spectrum instance
spec = spectrum_type(fmin=0.04,fmax=2.,df=1.1,ndirs=1,depth=1000.)

! assign a JONSWAP-shape spectrum to the instance
spec = jonswap(spec % getFrequency(),wspd=10.,fetch=1e5,grav=9.8)

Above examples will work with default precision (REAL32). To write code that is always compatible with precision specified at build time, use mod_precision module:

use mod_precision,only:rk => realkind
use mod_spectrum,only:spectrum_type
use mod_spectral_shapes,only:jonswap

type(spectrum_type) :: spec

! initialize a spectrum instance
spec = spectrum_type(fmin=0.04_rk,fmax=2._rk,df=1.1_rk,ndirs=1,depth=1000._rk)

! assign a JONSWAP-shape spectrum to the instance
spec = jonswap(spec % getFrequency(),wspd=10._rk,fetch=1e5_rk,grav=9.8_rk)

There are many pre-built diagnostics that can be output from a spectrum instance, here is a taste of a few:

write(*,*)'Significant wave height [m]: ',spec % significantWaveHeight()
write(*,*)'       Mean wave period [s]: ',spec % meanPeriod()
write(*,*)'      Mean square slope [-]: ',spec % meanSquareSlope()
write(*,*)'         Stokes drift [m/s]: ',spec % stokesDrift([0._rk])

outputs:

 Significant wave height [m]:    2.13949418    
        Mean wave period [s]:    5.20506239    
       Mean square slope [-]:    2.39831898E-02
          Stokes drift [m/s]:    4.87080999E-02

Design principles

  • Pure Fortran goodness
  • Object-oriented for high-level abstractions, functional for the computational kernels
  • Framework to construct arbitrary wave models
  • Provides a rich set of source functions, parametric shapes, numerical schemes, and wave diagnostics
  • Easy to use by existing atmosphere and ocean models
  • Supports single (32-bit), double (64-bit), and quadruple (128-bit) precision floating point arithmetic
  • Self-documented
  • Fully unit-tested

Features

  • Classes:

    • Spectrum class: supports omnidirectional and directional spectra
    • Grid class: supports regular 1-d and 2-d grids
    • Domain class: built from Grid and Spectrum instances.
  • Source functions:

    • Sin, Sds, Sdt, Snl, Sbf (Donelan et al., 2012)
    • Sin, Sds, WAM cycle 3 (Komen et al., 1984)
    • Sin, Sds (Tolman and Chalikov, 1996)
    • Sin, Sds, WAM cycle 4 (Janssen, 2004)
    • Sin, Sds, (Ardhuin et al., 2010)
    • Snl, DIA (Hasselmann et al., 1985)
  • Parametric spectra:

    • Donelan, Hamilton & Hui (1985)
    • JONSWAP (1973)
    • Phillips (1956)
    • Pierson-Moskowitz (1964)
  • Grid projections:

    • Cartesian
    • Spherical
  • Time integration scheme:

    • First order, forward Euler (explicit)
    • First order, backward Euler (implicit)
    • Exact exponential
  • Advection schemes:

    • Upwind differences, 1st order, 1-d
    • Upwind differences, 1st order, 2-d
    • Upwind differences, 2nd order, 1-d
    • Upwind differences, 2nd order, 2-d
    • Centered differences, 2nd order, 1-d
    • Centered differences, 2nd order, 2-d
    • Flux corrected transport (Zalesak, 1979)
    • Smolarkiewitz anti-diffusive velocity scheme (Smolarkiewitz, 1981)
    • MPDATA (Smolarkiewitz, 1983)
    • ULTIMATE QUICKEST (Wavewatch III)
  • Stokes drift:

    • Monochromatic
    • Exact
    • Webb and Fox-Kemper (2011)
    • Breivik et al. (2015)
  • Parallel execution:

    • Fortran Coarrays
  • Input/Output:

    • NetCDF
    • JSON

API Documentation

Full API documentation is available here.

Development status

wavy is in early development. Contributors are highly needed, especially for implementing source functions. You can start contributing by opening an issue.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].