Thank you for your interest in contributing! This document provides guidelines for contributing to AtmosTransport.jl.
- Julia 1.10 or later (install via juliaup)
- Git
- (Optional) NVIDIA GPU with CUDA 12+ drivers for GPU testing
git clone https://github.com/RemoteSensingTools/AtmosTransport.git
cd AtmosTransport
julia --project=. -e 'using Pkg; Pkg.instantiate()'julia --project=. -e 'using Pkg; Pkg.test()'julia --project=docs -e 'using Pkg; Pkg.develop(path="."); Pkg.instantiate()'
julia --project=docs docs/make.jl
# Open docs/build/index.html in your browser- Follow standard Julia conventions:
snake_casefor functions and variables,CamelCasefor types - Use multiple dispatch rather than if-else chains on type tags
- Keep functions short and focused; prefer composing small functions
- Add docstrings (using
DocStringExtensions) to all exported functions and types
AtmosTransport uses an Oceananigans.jl-inspired design with abstract type hierarchies and multiple dispatch:
AbstractAdvection → SlopesAdvection, PPMAdvection, UpwindAdvection, ...
AbstractConvection → TiedtkeConvection, NoConvection, ...
AbstractDiffusion → BoundaryLayerDiffusion, NoDiffusion, ...
AbstractChemistry → NoChemistry, RadioactiveDecay, CompositeChemistry, ...
AbstractGrid → LatitudeLongitudeGrid, CubedSphereGrid
To add a new advection scheme (for example):
-
Define your type in
src/Advection/:struct MyAdvection <: AbstractAdvection end
-
Implement the interface — dispatch on your type:
function advect!(tracers, grid, adv::MyAdvection, mass_fluxes, dt) # your implementation end
-
Add the adjoint (if supporting 4D-Var):
function adjoint_advect!(adj_tracers, grid, adv::MyAdvection, mass_fluxes, dt) # adjoint of your implementation end
-
Export your type from the submodule.
-
Add tests in
test/and verify withPkg.test().
The same pattern applies to convection (AbstractConvection), diffusion
(AbstractDiffusion), and chemistry (AbstractChemistry) operators.
- Fork the repository and create a feature branch
- Make your changes with clear, focused commits
- Ensure all tests pass:
julia --project=. -e 'using Pkg; Pkg.test()' - Open a pull request with a clear description of what changed and why
Please open an issue on GitHub with:
- A clear description of the problem
- Minimal reproducible example (if applicable)
- Julia version and OS information (
versioninfo())