All Projects → Climdyn → qgs

Climdyn / qgs

Licence: MIT license
A 2-layer quasi-geostrophic atmospheric model in Python. Can be coupled to a simple land or shallow-water ocean component.

Programming Languages

python
139335 projects - #7 most used programming language
Jupyter Notebook
11667 projects

Projects that are alternatives of or similar to qgs

Memex Explorer
Viewers for statistics and dashboarding of Domain Search Engine data
Stars: ✭ 115 (+379.17%)
Mutual labels:  anaconda
gis4wrf
QGIS toolkit 🧰 for pre- and post-processing 🔨, visualizing 🔍, and running simulations 💻 in the Weather Research and Forecasting (WRF) model 🌀
Stars: ✭ 137 (+470.83%)
Mutual labels:  meteorology
PSCondaEnvs
Implementation of Conda's activate/deactivate functions in Powershell.
Stars: ✭ 84 (+250%)
Mutual labels:  anaconda
Ml Workspace
🛠 All-in-one web-based IDE specialized for machine learning and data science.
Stars: ✭ 2,337 (+9637.5%)
Mutual labels:  anaconda
Setup Miniconda
Set up your GitHub Actions workflow with conda via miniconda
Stars: ✭ 222 (+825%)
Mutual labels:  anaconda
online-python-training
Repo for materials associated with the Online Python Training (OPT) project
Stars: ✭ 49 (+104.17%)
Mutual labels:  meteorology
Blivet
A python module for configuration of block devices
Stars: ✭ 68 (+183.33%)
Mutual labels:  anaconda
Keras-LSTM-Trajectory-Prediction
A Keras multi-input multi-output LSTM-based RNN for object trajectory forecasting
Stars: ✭ 88 (+266.67%)
Mutual labels:  anaconda
Installations mac ubuntu windows
Installations for Data Science. Anaconda, RStudio, Spark, TensorFlow, AWS (Amazon Web Services).
Stars: ✭ 231 (+862.5%)
Mutual labels:  anaconda
aerobulk
AeroBulk is a modern-FORTRAN-based package/library that gathers state-of-the-art aerodynamic bulk formulae algorithms used to compute turbulent air-sea fluxes of momentum, heat and freshwater.
Stars: ✭ 24 (+0%)
Mutual labels:  meteorology
Anaconda Project
Tool for encapsulating, running, and reproducing data science projects
Stars: ✭ 153 (+537.5%)
Mutual labels:  anaconda
Magnetloss Pytorch
PyTorch implementation of a deep metric learning technique called "Magnet Loss" from Facebook AI Research (FAIR) in ICLR 2016.
Stars: ✭ 217 (+804.17%)
Mutual labels:  anaconda
ruck
🧬 Modularised Evolutionary Algorithms For Python with Optional JIT and Multiprocessing (Ray) support. Inspired by PyTorch Lightning
Stars: ✭ 50 (+108.33%)
Mutual labels:  numba
Mbp Fedora
Stars: ✭ 129 (+437.5%)
Mutual labels:  anaconda
scipy-crash-course
Material for a 24 hours course on Scientific Python
Stars: ✭ 98 (+308.33%)
Mutual labels:  numba
Cs231n
My Solution to Assignments of CS231n in Winter2016
Stars: ✭ 71 (+195.83%)
Mutual labels:  anaconda
warp-drive
Extremely Fast End-to-End Deep Multi-Agent Reinforcement Learning Framework on a GPU (JMLR 2022)
Stars: ✭ 364 (+1416.67%)
Mutual labels:  numba
python-training
Notebooks teaching Python for use meteorology and atmospheric and climate sciences.
Stars: ✭ 99 (+312.5%)
Mutual labels:  meteorology
BenchmarksPythonJuliaAndCo
Benchmark(s) of numerical programs with Python (and Scipy, Pythran, Numba), Julia and C++.
Stars: ✭ 19 (-20.83%)
Mutual labels:  numba
skan
Python module to analyse skeleton (thin object) images
Stars: ✭ 92 (+283.33%)
Mutual labels:  numba

Quasi-Geostrophic Spectral model (qgs)

DOI DOI Documentation Status License: MIT

General Information

qgs is a Python implementation of an atmospheric model for midlatitudes. It models the dynamics of a 2-layer quasi-geostrophic channel atmosphere on a beta-plane, coupled to a simple land or shallow-water ocean component.

About

(c) 2020-2022 qgs Developers and Contributors

Part of the code originates from the Python MAOOAM implementation by Maxime Tondeur and Jonathan Demaeyer.

See LICENSE.txt for license information.

Please cite the code description article if you use (a part of) this software for a publication:

  • Demaeyer J., De Cruz, L. and Vannitsem, S. , (2020). qgs: A flexible Python framework of reduced-order multiscale climate models. Journal of Open Source Software, 5(56), 2597, https://doi.org/10.21105/joss.02597.

Please consult the qgs code repository for updates.

Installation

The easiest way to run qgs is to use an appropriate environment created through Anaconda.

First install Anaconda and clone the repository:

git clone https://github.com/Climdyn/qgs.git

Then install and activate the Python3 Anaconda environment:

conda env create -f environment.yml
conda activate qgs

You can then perform a test by running the script

python qgs_rp.py

to see if everything runs smoothly (this should take less than a minute).

Note for Windows and MacOS users

Presently, qgs is compatible with Windows and MacOS but users wanting to use qgs inside their Python scripts must guard the main script with a

if __name__ == "__main__":

clause and add the following lines below

  from multiprocessing import freeze_support
  freeze_support()

About this usage, see for example the main scripts qgs_rp.py and qgs_maooam.py in the root folder. Note that the Jupyter notebooks are not concerned by this recommendation and work perfectly well on both operating systems.

Why? These lines are required to make the multiprocessing library works with these operating systems. See here for more details, and in particular this section.

Activating DifferentialEquations.jl optional support

In addition to the qgs builtin Runge-Kutta integrator, the qgs model can alternatively be integrated with a package called DifferentialEquations.jl written in Julia, and available through the diffeqpy python package. The diffeqpy package first installation step is done by Anaconda in the qgs environment but then you must install Julia and follow the final manual installation instruction found in the diffeqpy README.

These can be summed up as opening a terminal and doing:

conda activate qgs
python

and then inside the Python command line interface do:

>>> import diffeqpy
>>> diffeqpy.install()

which will then finalize the installation. An example of a notebook using this package is available in the documentation and on readthedocs.

Documentation

To build the documentation, please run (with the conda environment activated):

cd documentation
make html

You may need to install make if it is not already present on your system. Once built, the documentation is available here.

The documentation is also available online on read the docs: https://qgs.readthedocs.io/

Usage

qgs can be used by editing and running the script qgs_rp.py and qgs_maooam.py found in the main folder.

For more advanced usages, please read the User Guides.

Examples

Another nice way to run the model is through the use of Jupyter notebooks. Simple examples can be found in the notebooks folder. For instance, running

conda activate qgs
cd notebooks
jupyter-notebook

will lead you to your favorite browser where you can load and run the examples.

Dependencies

qgs needs mainly:

  • Numpy for numeric support
  • sparse for sparse multidimensional arrays support
  • Numba for code acceleration
  • Sympy for symbolic manipulation of inner products

Check the yaml file environment.yml for the dependencies.

Forthcoming developments

  • Scientific development (short-to-mid-term developments)
    • Non-autonomous equation (seasonality, etc...)
    • Energy diagnostics
  • Technical mid-term developments
    • Dimensionally robust Parameter class operation
  • Long-term development track
    • Active advection
    • True quasi-geostrophic ocean when using ocean model version
    • Salinity in the ocean
    • Symbolic PDE equation specification
    • Numerical basis of function

Contributing to qgs

If you want to contribute actively to the roadmap detailed above, please contact the main authors.

In addition, if you have made changes that you think will be useful to others, please feel free to suggest these as a pull request on the qgs Github repository.

More information and guidance about how to do a pull request for qgs can be found in the documentation here.

Other atmospheric models in Python

Non-exhaustive list:

  • Q-GCM: A mid-latitude grid based ocean-atmosphere model like MAOOAM. Code in Fortran, interface is in Python.
  • pyqg: A pseudo-spectral python solver for quasi-geostrophic systems.
  • Isca: Research GCM written in Fortran and largely configured with Python scripts, with internal coding changes required for non-standard cases.
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].