Giter VIP home page Giter VIP logo

climapy's Introduction

climapy

Build Status

DOI

Purpose

Support data analysis of climate model data.

Installation

python setup.py install

In addition to installing climapy, this will automatically generate version.py which provides version information including the git revision. The following dependencies are specified in setup.py: numpy and xarray.

Testing

Tests, for use with pytest, are contained in tests/. The tests can be run from the root directory of the repository:

pytest

Functions contained in climapy

    cesm_time_from_bnds(xr_data, min_year=1701):
        Use mid-points from time_bnds in CESM output data to populate time dimension with
        numpy.datetime64 values.

    dt_convert_to_datetime64(data, units='days since 1-1-1 00:00:00', calendar='365_day'):
        Convert numbers to array of numpy.datetime64 objects.

    stats_fdr(p_values, alpha=0.10):
        Control the false discovery rate (FDR). Useful when applying multiple hypothesis tests.

    xr_check_lon_lat_match(xr_data_1, xr_data_2, lon_name='lon', lat_name='lat'):
        Check whether longitude and latitude coordinates of xarray Datasets/DataArrays are equal.

    xr_shift_lon(xr_data, lon_min=-180., lon_name='lon'):
        Shift longitudes of an xarray Dataset or DataArray.

    xr_area(xr_data, lon_name='lon', lat_name='lat'):
        Calculate grid-cell areas of an xarray Dataset or DataArray.

    xr_mask_bounds(xr_data, lon_bounds=(-180, 180), lat_bounds=(-90, 90), select_how='inside',
                   lon_name='lon', lat_name='lat'):
        Select inside/outside specified region bounds, and mask elsewhere.

    xr_area_weighted_stat(xr_data, stat='mean', lon_bounds=None, lat_bounds=None,
                          lon_name='lon', lat_name='lat'):
        Calculate area-weighted mean or sum across globe (default) or a specified region.

Author

Benjamin S. Grandey, 2017

Acknowledgements

This software has been developed in order to facilitate research conducted at the Singapore-MIT Alliance for Research and Technology (SMART), supported by the National Research Foundation (NRF), Prime Minister’s Office, Singapore under its Campus for Research Excellence and Technological Enterprise (CREATE) programme.

climapy's People

Contributors

grandey avatar

Watchers

 avatar

climapy's Issues

Develop unittests for climapy_xr.py

Testing of climapy_xr.py currently performed by dev_climapy_xr.ipynb. It would be preferable to replace this with some automated unittests.

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.