GithubHelp home page GithubHelp logo

csyhuang / hn2016_falwa Goto Github PK

View Code? Open in Web Editor NEW
29.0 4.0 15.0 232.44 MB

Python library for computing Finite-Amplitude Local Wave Activity from climate data.

Home Page: https://hn2016-falwa.readthedocs.io/en/latest/

License: MIT License

Python 3.18% Fortran 0.47% Jupyter Notebook 96.35% Batchfile 0.01% Shell 0.01%
hacktoberfest science science-research climate-analysis python climate-data-analysis climate-data climate climate-science

hn2016_falwa's Introduction

Python Library: falwa (v1.2.1)

Build Statuscodecov.ioDocumentation StatusDOI

Important: this python package has been renamed from hn2016_falwa to falwa since version v1.0.0.

hn2016_falwa_diagram

Compute from gridded climate data the Finite-amplitude Local Wave Activity (FALWA) and flux terms introduced in:

Package Installation

This current version works for Python 3.x. Note that since v0.3.0, some functions have backend in Fortran. To build the package from source, you need a fortran compiler (e.g. gfortran) to implement the installation.

Since the package is still being actively developed, please use the develop mode for installation.

To install the package for the first time, clone the GitHub repo and install via develop mode:

git clone https://github.com/csyhuang/hn2016_falwa.git
cd hn2016_falwa
python setup.py develop

To incorporate updates, pull the new version of the code from GitHub. Remove any existing f2py modules and recompile.

# Assume you are already in the hn2016_falwa/ repo
git pull
rm falwa/*.so
python setup.py develop
pytest tests/ # to check if the package can be run properly

Quick start

There are some readily run python scripts (in scripts/) and jupyter notebooks (in notebooks/) which you can start with. The netCDF files needed can be found in Clare's Dropbox folder.

Depending on what you want to do, the methods to be use may be different.

  1. If you solely want to compute equivalent latitude and local wave activity from a 2D field, you can refer to notebooks/simple/Example_barotropic.ipynb. This is useful for users who want to use LWA to quantify field anomalies.

  2. If you want to compute zonal wind reference states and wave activity fluxes in QG Formalism, look at notebooks/nh2018_science/demo_script_for_nh2018.ipynb for the usage of QGField. This notebook demonstrates how to compute wave activity and reference states presented in Nakamura and Huang (2018). To make sure the package is properly installed in your environment, run through the notebook after installation to see if there is error.

THe conda environment for running the notebook can be found in environment.yml. To create the conda environment, execute:

conda env create -f environment.yml

Sponsorship acknowledgement

This project is sponsored by JetBrains as one of the non-commercial open source projects. JetBrains provides core project contributors with a set of best-in-class developer tools free of charge. Please check out their Open Source Support page for details.

Inquiries / Issues reporting

  • If you are interested in using the package, please leave your contact here or email me([email protected]) such that I can keep you updated of any changes made.
  • If you encounter coding issues/bugs when using the package, please create an Issue ticket.
  • If you have scientific questions, please contact Clare S. Y. Huang via email([email protected]).

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.