picles

Particle-In-CelL for Efficient Swell - An efficient surface wave model for Earth System Models

https://github.com/mochell/picles

Science Score: 67.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 6 DOI reference(s) in README
  • Academic publication links
    Links to: zenodo.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (15.7%) to scientific vocabulary
Last synced: 6 months ago · JSON representation ·

Repository

Particle-In-CelL for Efficient Swell - An efficient surface wave model for Earth System Models

Basic Info
  • Host: GitHub
  • Owner: mochell
  • License: apache-2.0
  • Language: Julia
  • Default Branch: main
  • Homepage:
  • Size: 78.2 MB
Statistics
  • Stars: 13
  • Watchers: 4
  • Forks: 3
  • Open Issues: 15
  • Releases: 1
Created about 2 years ago · Last pushed about 1 year ago
Metadata Files
Readme License Citation

README.md

Particle-in-Cell for Efficient Swell - PiCLES Build Status

PiCLES is a fast and efficient wave model for Earth System Models, using Particle-in-Cell methods for better performance.

The PiCLES on a Surfboard|200px

PiCLES: DOI

Paper draft version: DOI

Quick Start

A brief guide on how to use PiCLES.

How to Install

Step 1: Install Julia

  1. Download Julia v1.10.2 or higher from the official Julia website.
  2. Follow the installation instructions for your operating system.

Step 2: Download PiCLES Repository

(Once registered as a Package this will be simpler, sry for the delay)

  1. Open a terminal or command prompt.
  2. Clone the PiCLES repository using Git: git clone https://github.com/mochell/PiCLES.git
  3. Navigate into the cloned repository directory: cd PiCLES

Step 3: Install Dependencies and Activate Environment

  1. Start Julia by typing julia in your terminal within the PiCLES.jl directory.
  2. Activate the project environment: julia using Pkg Pkg.activate(".")
  3. Install the required dependencies: julia Pkg.instantiate()

You are now ready to use PiCLES for your simulations.

How to Run Tests

To run the T04_2D_reg_test.jl file from the command line, follow these steps:

  1. Open a terminal or command prompt.
  2. Navigate to the directory where the T04_2D_reg_test.jl file is located.
  3. Start Julia by typing julia in your terminal.
  4. In the Julia REPL, include the T04_2D_reg_test.jl file: julia include("T04_2D_reg_test.jl")
  5. The test will run and display the results in the terminal.

Basic model structure

PiCLES follows the modular model structure from Oceananigans.jl, but it does not currently share objects. Functionality from Oceananigans does not work in PiCLES.

A minimal working example is the following examples/example00minimal.jl:

```julia using Pkg # This will be replaced by the module load in the future Pkg.activate("PiCLES/") # Activate the PiCLES package

using PiCLES using PiCLES.Operators.core_2D: ParticleDefaults using PiCLES.Models.WaveGrowthModels2D: WaveGrowth2D using PiCLES.Simulations using PiCLES.Grids.CartesianGrid: TwoDCartesianGridMesh, ProjetionKernel, TwoDCartesianGridStatistics

using PiCLES.ParticleSystems: particlewavesv5 as PW using Oceananigans.Units

# just for simple plotting import Plots as plt

# Parameters U10, V10 = 10.0, 10.0 DT = 10minutes rg0 = 0.85 # ratio of c / cg (phase velocity/ group velocity).

# Define wind functions u(x, y, t) = U10 v(x, y, t) = V10 winds = (u=u, v=v)

# Define grid grid = TwoDCartesianGridMesh(100e3, 51, 100e3, 51)

# Define ODE parameters ODEpars, ConstID, ConstScg = PW.ODEParameters(rg=rg0)

# Define particle equations particlesystem = PW.particleequations(u, v, γ=ConstID.γ, q=ConstID.q);

# Calculate minimal wind sea based on characteristic winds WindSeamin = FetchRelations.MinimalWindsea(U10, V10, DT)

# Define default particle defaultparticle = ParticleDefaults(WindSeamin["lne"], WindSeamin["cgbarx"], WindSeamin["cgbar_y"], 0.0, 0.0)

# Define ODE settings ODEsettings = PW.ODESettings( Parameters=ODEpars, # define mininum energy threshold logenergyminimum=WindSeamin["lne"], savingstep=DT, timestep=DT, totaltime=T = 6days, dt=1e-3, dtmin=1e-4, forcedtmin=true)

# Build wave model wavemodel = WaveGrowth2D(; grid=grid, winds=winds, ODEsys=particlesystem, ODEsets=ODEsettings, periodicboundary=false, minimal_particle=FetchRelations.MinimalParticle(U10, V10, DT), movie=true)

# Build simulation wavesimulation = Simulation(wavemodel, Δt=DT, stop_time=2hour)#1hours)

# Run simulation run!(wavesimulation, cashstore=true)

# Plot initial state istate = wave_simulation.store.store[end]; p1 = plt.heatmap(grid.data.x[:,1] / 1e3, grid.data.y[1,:] / 1e3, istate[:, :, 1])

```

How to Cite

Owner

  • Name: M.Hell
  • Login: mochell
  • Kind: user
  • Location: San Diego
  • Company: SIO

Grad Student

Citation (CITATION.cff)

cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
- family-names: "Hell"
  given-names: "Momme Claus"
  orcid: "https://orcid.org/0000-0002-5754-3925"
title: "Particle-in-Cell for efficient Swell - PiCLES"
version: 0.1
doi: 10.5281/zenodo.13799205
date-released: 2024-06-06
url: "https://github.com/mochell/PiCLES"

GitHub Events

Total
  • Issues event: 5
  • Watch event: 14
  • Push event: 10
  • Pull request event: 5
  • Fork event: 2
  • Create event: 1
Last Year
  • Issues event: 5
  • Watch event: 14
  • Push event: 10
  • Pull request event: 5
  • Fork event: 2
  • Create event: 1

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 1
  • Total pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Total issue authors: 1
  • Total pull request authors: 0
  • Average comments per issue: 0.0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 1
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 1
  • Pull request authors: 0
  • Average comments per issue: 0.0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • mochell (1)
Pull Request Authors
  • tomprotin (1)
Top Labels
Issue Labels
bug (1)
Pull Request Labels