Giter Site home page Giter Site logo

qgw's Introduction

Overview

Finite differences QG model that rely on FFTW for the elliptic solver.

Dependencies:

For single core execution, compile with

gcc -O3 -Wall qg.c -o qg.e -lm -lfftw3 -llapacke -lnetcdf

For parallel execution, compile with

mpicc -D_MPI -O3 qg.c -o qg.e -lfftw3_mpi -lfftw3 -lm -llapacke -lnetcdf

There are several test cases in test/

you can run the model with

./qg.e params.in

or

mpirun -np 4 ./qg.e params.in

The number of processor is arbitrary.

QG equations

$$\frac{∂ q}{∂ t} = -J(ψ,q) - β v + ν Δ q$$

For a single layer configuration, we have

$$q = Δ ψ$$

and for multi layer

$$q = Δ ψ + \frac{∂}{∂ z} \frac{f_0^2}{N^2}\frac{∂}{∂ z} ψ$$

with $f_0$ the Coriolis parameter and $N^2$ the Brunt Vaisala frequency.

Discretization

The model is written with finite differences. For closed domains, variables are discretized at cell corner. For periodic domain, variables are discretized at cell center.

to access the value of a field at index i,j,k one uses

psi[idx(i,j,k)]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.