Coder Social home page Coder Social logo

cmpdata's Introduction

Pre-process CMIP6 data

image

image

image

cmpdata package can handle and analyze raw CMIP6 data.

Features

  • Handle raw CMIP6 data
  • Analyze any specific models/experiments/variables
  • Perform regridding for model ensemble means
  • Data preprocessing
  • Statistical analysis

Installation

Installation via conda -

conda install -c thassan cmpdata

Requires python v3.6 or v3.7. Make sure you have added the conda-forge channel in your environment. :

conda create --name cmpdata python=3.7 (or 3.6)
conda activate cmpdata
conda config --env --add channels conda-forge
conda install -c thassan cmpdata 

Alternatively, use the YAML file to create a virtual conda enviroment (cmpdata)

conda env create -f environment.yml

And then activate cmpdata to use cmpdata

conda activate cmpdata

Supports both OSX and Linux. Windows users can use Windows Subsystem.

Usage

cmpdata can be used to handle and analyze raw CMIP6 data. A lot of the options available in acccmip6 is available in cmpdata, especially for selecting models, experiments and variables. cmpdata also tries to be a good command-line interface (CLI). Run cmpdata -h to see a help message with all the arguments you can pass.

cmpdata -h :

usage: cmpdata.py [-h] -o {info,rm,mm,stats,ts} [-dir DIR] [-m M] [-e E] [-v V] [-r R] [-out OUT] [-f F] [-init INIT] [-end END] [-t] [-z] [-s S] [-mm]
[-std] [-clim] [-anom] [-manom] [-trend] [-aggr] [-freq FREQ] [-reg REG] [-rm] [-a] [-curve] [-w] [-ci CI] [-regrid]

options:
-h, --help            show this help message and exit
-o {info,rm,mm,stats,ts}, --output-options {info,rm,mm,stats,ts}
        Select an output option
-dir DIR              Select directory.
-m M                  Model names
-e E                  Experiment names
-v V                  Variable names
-r R                  Realization
-out OUT              Output file name
-f F                  Input filenames for stats
-init INIT            Initial year
-end END              Ending year
-t                    Temporal mean option
-z                    Zonal mean option
-s S                  Seasonal mean option
-mm                   Calculate model ensemble mean
-std                  Calculate model std
-clim                 Calculate monthly climatology
-anom                 Calculate monthly anomaly
-manom                Calculate model anomaly
-trend                Calculate variable grid-by-grid trends
-aggr                 Calculate model aggreement
-freq FREQ            Temporal mean frequency: annual/daily/monthly
-reg REG              Select region for timeseries output (choices: NH/SH/NH-mid/SH-mid/NH-pole/SH-pole/NA/NAT/CONUS)
-rm                   Use the realization means
-a                    Use cell areas for spatial mean calculations
-curve                Regridding to curvilinear grids
-w                    All model means as ens dim (used by -std, -mm, -aggr stats options)
-ci CI                confidence interval used in -trend and -aggr options
-regrid               regridding on/off

Demo

All demonstrations are done using a small number of test data files, but these are applicable for any number of files/models/variables/experiments and so on.

  • Get info: Get available CMIP6 data information in a directory with cmpdata -o info.

image

License

This code is licensed under the MIT License.

cmpdata's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

pkufubo cycy1320

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.