Git Product home page Git Product logo

analysis-scripts's Introduction

analysis-scripts

A framework for analyzing GFDL model output

Motivation

The goal of this project is to provide a simple API to guide the development of scripts that produce figures and tables from GFDL model output. This work will be used by a simple web application to provide users an easy interface to interact with model output data.

Requirements

The code in this repository is broken up into components:

  • analysis-scripts - A very simple package that just defines an abstract base class that all user-created plugins should inherit from.
  • figure_tools - An optional package that contains some helper functions and classes for making common plots.
  • freanalysis - A package that is designed to be used by whatever workflow is responsible for running the analysis.
  • freanalysis_aerosol - A plugin that creates aerosl mass figures.
  • freanalysis_clouds - A plugin that creates cloud amount figures.
  • freanalysis_radiation - A plugin that creates radiative flux figures.

How to install everything

For now I'd recommend creating a virtual enviroment, and then installing each of the packages listed above:

$ python3 -m venv env
$ source env/bin/activate
$ pip install --upgrade pip
$ cd analysis-scripts; pip install .; cd ..
$ cd figure_tools; pip install .; cd ..
$ cd freanalysis; pip install .; cd ..
$ cd freanalysis_aerosol; pip install .; cd ..
$ cd freanalysis_clouds; pip install .; cd ..
$ cd freanalysis_radiation; pip install .; cd ..

Running an analysis plugin

In order to run a plugin, you must first create a data catalog and can then perform the analysis:

from freanalysis.create_catalog import create_catalog
from freanalysis.plugins import list_plugins, plugin_requirements, run_plugin


# Create a data catalog.
create_catalog(pp_dir, "catalog.json")

# Show the installed plugins.
list_plugins()

# Run the radiative fluxes plugin.
name = "freanalysis_radiation"
reqs = plugin_requirements(name)
print(reqs)
run_plugin(name, "catalog.json", "pngs")

analysis-scripts's People

Contributors

aradhakrishnangfdl avatar menzel-gfdl avatar ceblanton avatar

Stargazers

Anthony Preucil avatar Ian avatar

Watchers

Tara McQueen avatar  avatar Ian avatar Chan Wilson avatar  avatar  avatar

analysis-scripts's Issues

Add CI test for cloud-radiation analysis script

  1. Copy some public example pp output from mdtf repos (Aparna)

  2. Create catalog based on example pp output. (Aparna)

  3. Validate the catalog. (Ciheim)

  4. Run cloud-radiation using the generated catalog. (Ray)

Update tests to use new catalog builder calls

Catalog builder is now a conda package and the usage is slightly different in terms of the conda packaging structure. It is also now in noaa-gfdl org. This issue tracks the updates to the tests to ensure analysis scripts work okay with the new changes and that the tests are updated to reflect that.

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.