{"id":39760858,"url":"https://github.com/wavebitscientific/wavy","last_synced_at":"2026-01-18T11:37:48.648Z","repository":{"id":69954535,"uuid":"94924775","full_name":"wavebitscientific/wavy","owner":"wavebitscientific","description":"A spectral ocean wave modeling framework","archived":false,"fork":false,"pushed_at":"2017-07-03T17:05:29.000Z","size":1207,"stargazers_count":17,"open_issues_count":4,"forks_count":6,"subscribers_count":8,"default_branch":"master","last_synced_at":"2024-03-27T05:04:56.078Z","etag":null,"topics":["fortran","modeling","ocean","wave"],"latest_commit_sha":null,"homepage":"https://wavebitscientific.github.io/wavy/","language":"Fortran","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wavebitscientific.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2017-06-20T18:52:13.000Z","updated_at":"2024-01-27T18:39:24.000Z","dependencies_parsed_at":null,"dependency_job_id":"2f967a04-a761-4d7a-be23-e6022344a851","html_url":"https://github.com/wavebitscientific/wavy","commit_stats":{"total_commits":11,"total_committers":1,"mean_commits":11.0,"dds":0.0,"last_synced_commit":"76c871487f31c25190d6a3359a0e990ea39691b7"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/wavebitscientific/wavy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wavebitscientific%2Fwavy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wavebitscientific%2Fwavy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wavebitscientific%2Fwavy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wavebitscientific%2Fwavy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wavebitscientific","download_url":"https://codeload.github.com/wavebitscientific/wavy/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wavebitscientific%2Fwavy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28535169,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-18T10:13:46.436Z","status":"ssl_error","status_checked_at":"2026-01-18T10:13:11.045Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["fortran","modeling","ocean","wave"],"created_at":"2026-01-18T11:37:47.949Z","updated_at":"2026-01-18T11:37:48.639Z","avatar_url":"https://github.com/wavebitscientific.png","language":"Fortran","funding_links":[],"categories":[],"sub_categories":[],"readme":"## wavy\n\nA spectral ocean wave modeling framework.\n\n* [Getting started](#getting-started)\n  - [Building wavy](#building-wavy)\n  - [Building a simple program with wavy](#building-a-simple-program-with-wavy)\n  - [Examples](#examples)\n* [Design principles](#design-principles)\n* [Features](#features)\n* [API Documentation](#api-documentation)\n* [Development status](#development-status)\n\n### Getting started\n\n#### Building wavy\n\n```\ngit clone --recursive https://github.com/wavebitscientific/wavy.git\nFC=gfortran make\nmkdir build\ncd build\nFC=gfortran cmake ..\nmake\nctest\n```\nChange the `FC` value if building with a different Fortran compiler.\n\nBy default, wavy will be built in single precision (32-bit reals).\nTo build it in double (64-bit reals) or quadruple precision (128-bit reals),\nuse the `-DREAL` argument when invoking `cmake`:\n```\nFC=gfortran cmake .. -DREAL=64 # for double precision\n```\nor:\n```\nFC=gfortran cmake .. -DREAL=128 # for quad precision\n```\n\nwavy needs gcc-6.3.0 or later to succesfully build and pass all tests.\n\n#### Building a simple program with wavy\n\nIf you compiled wavy in `wavy/build`, then the module files and the library\nare located in `wavy/build/include` and `wavy/build/lib`, respectively. \nFor example, if we want to build a simple wavy hello world program from\nthe base directory, we could do it like this: \n\n```\ngfortran hello.f90 -o hello -Ibuild/include -Lbuild/lib -lwavy\n```\n\n#### Examples\n\nInitialize a omnidirectional spectrum instance in the frequency range from \n0.04 to 2 Hz with logarithmic increment of 1.1, in mean water depth of 1000 m:\n\n```fortran\nuse mod_spectrum,only:spectrum_type\ntype(spectrum_type) :: spec\n\n! initialize a spectrum instance\nspec = spectrum_type(fmin=0.04,fmax=2.,df=1.1,ndirs=1,depth=1000.)\n```\n\nSame as above, but directional spectrum with 36 directional bins:\n\n```fortran\nspec = spectrum_type(fmin=0.04,fmax=2.,df=1.1,ndirs=36,depth=1000.)\n```\n\nInitialize omnidirectional spectrum with JONSWAP shape at wind speed of 10 m/s,\nand fetch of 100 km:\n\n```fortran\nuse mod_spectrum,only:spectrum_type\nuse mod_spectral_shapes,only:jonswap\n\ntype(spectrum_type) :: spec\n\n! initialize a spectrum instance\nspec = spectrum_type(fmin=0.04,fmax=2.,df=1.1,ndirs=1,depth=1000.)\n\n! assign a JONSWAP-shape spectrum to the instance\nspec = jonswap(spec % getFrequency(),wspd=10.,fetch=1e5,grav=9.8)\n```\n\nAbove examples will work with default precision (`REAL32`). \nTo write code that is always compatible with precision specified at \nbuild time, use `mod_precision` module:\n\n```fortran\nuse mod_precision,only:rk =\u003e realkind\nuse mod_spectrum,only:spectrum_type\nuse mod_spectral_shapes,only:jonswap\n\ntype(spectrum_type) :: spec\n\n! initialize a spectrum instance\nspec = spectrum_type(fmin=0.04_rk,fmax=2._rk,df=1.1_rk,ndirs=1,depth=1000._rk)\n\n! assign a JONSWAP-shape spectrum to the instance\nspec = jonswap(spec % getFrequency(),wspd=10._rk,fetch=1e5_rk,grav=9.8_rk)\n``` \nThere are many pre-built diagnostics that can be output from a `spectrum`\ninstance, here is a taste of a few:\n\n```fortran\nwrite(*,*)'Significant wave height [m]: ',spec % significantWaveHeight()\nwrite(*,*)'       Mean wave period [s]: ',spec % meanPeriod()\nwrite(*,*)'      Mean square slope [-]: ',spec % meanSquareSlope()\nwrite(*,*)'         Stokes drift [m/s]: ',spec % stokesDrift([0._rk])\n```\noutputs:\n```\n Significant wave height [m]:    2.13949418    \n        Mean wave period [s]:    5.20506239    \n       Mean square slope [-]:    2.39831898E-02\n          Stokes drift [m/s]:    4.87080999E-02\n```\n\n### Design principles\n\n  * Pure Fortran goodness\n  * Object-oriented for high-level abstractions, functional for the computational kernels\n  * Framework to construct arbitrary wave models\n  * Provides a rich set of source functions, parametric shapes, numerical schemes, and wave diagnostics\n  * Easy to use by existing atmosphere and ocean models\n  * Supports single (32-bit), double (64-bit), and quadruple (128-bit)  precision floating point arithmetic\n  * Self-documented\n  * Fully unit-tested\n\n### Features\n\n* Classes:\n    - [x] Spectrum class: supports omnidirectional and directional spectra\n    - [x] Grid class: supports regular 1-d and 2-d grids\n    - [x] Domain class: built from Grid and Spectrum instances.\n\n* Source functions:\n    - [x] Sin, Sds, Sdt, Snl, Sbf (Donelan et al., 2012)\n    - [ ] Sin, Sds, WAM cycle 3 (Komen et al., 1984)\n    - [ ] Sin, Sds (Tolman and Chalikov, 1996)\n    - [ ] Sin, Sds, WAM cycle 4 (Janssen, 2004)\n    - [ ] Sin, Sds, (Ardhuin et al., 2010) \n    - [ ] Snl, DIA (Hasselmann et al., 1985)\n\n* Parametric spectra:\n    - [x] Donelan, Hamilton \u0026 Hui (1985)\n    - [x] JONSWAP (1973)\n    - [x] Phillips (1956)\n    - [x] Pierson-Moskowitz (1964)\n\n* Grid projections:\n    - [x] Cartesian\n    - [ ] Spherical\n\n* Time integration scheme:\n    - [x] First order, forward Euler (explicit)\n    - [x] First order, backward Euler (implicit)\n    - [x] Exact exponential\n\n* Advection schemes:\n    - [x] Upwind differences, 1st order, 1-d\n    - [x] Upwind differences, 1st order, 2-d\n    - [x] Upwind differences, 2nd order, 1-d\n    - [x] Upwind differences, 2nd order, 2-d\n    - [x] Centered differences, 2nd order, 1-d\n    - [x] Centered differences, 2nd order, 2-d\n    - [ ] Flux corrected transport (Zalesak, 1979)\n    - [ ] Smolarkiewitz anti-diffusive velocity scheme (Smolarkiewitz, 1981)\n    - [ ] MPDATA (Smolarkiewitz, 1983)\n    - [ ] ULTIMATE QUICKEST (Wavewatch III)\n\n* Stokes drift:\n    - [ ] Monochromatic\n    - [x] Exact\n    - [ ] Webb and Fox-Kemper (2011)\n    - [ ] Breivik et al. (2015)\n\n* Parallel execution:\n    - [ ] Fortran Coarrays\n\n* Input/Output:\n    - [ ] NetCDF\n    - [x] JSON\n\n### API Documentation\n\nFull API documentation is available [here](https://wavebitscientific.github.io/wavy).\n\n### Development status\n\nwavy is in early development. Contributors are highly needed,\nespecially for implementing source functions. You can start \ncontributing by opening an [issue](https://github.com/wavebitscientific/wavy/issues/new).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwavebitscientific%2Fwavy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwavebitscientific%2Fwavy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwavebitscientific%2Fwavy/lists"}