Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

A simple python library to find the CF standard name equivalent of an EPIC code.

Project Description

# epic2cf

#### A simple python library to find the CF standard name equivalent of an EPIC code.

[EPIC codes](
[CF standard names](

## Installation

##### Stable

pip install epic2cf

##### Development

pip install git+

## Usage

##### Return contents

A `dict` like object is returned from a call to `get` and contains the following:
'cell_methods': None, # If there are any cell_methods associated with this variable
'cf_units': None, # The units of the CF standard name
'convert': None, # A function to convert values from EPIC to CF
'long_name': None, # A description of the variable
'standard_name': None, # The CF standard_name
'units': None # The EPIC units

##### Get a CF mapping from an EPIC code

from epic2cf import mapping

'cell_methods': None,
'cf_units': 'm',
'convert': <function<lambda>>,
'long_name': 'Sea Surface Height',
'standard_name': 'sea_surface_height',
'units': 'm'

'cell_methods': 'time: minimum',
'cf_units': 'K',
'convert': <function<lambda>>,
'long_name': 'Water Temperature',
'standard_name': 'sea_water_temperature',
'units': 'degree_Celsius'

##### Convert existing EPIC values into CF values

###### Pass in a numpy array to the convert function

import numpy as np
from epic2cf import mapping

epic = mapping.get(9)
print epic
'cell_methods': None,
'cf_units': 'dbar',
'convert': <function<lambda>>,
'long_name': 'Sea Water Pressure',
'standard_name': 'sea_water_pressure',
'units': 'mbar'

values = np.random.random(6)
print values # EPIC values in 'mbar'
array([ 0.57136167, 0.98046873, 0.64963954, 0.39981203, 0.72433581, 0.16820297])

cf_values = epic.convert(values)
print cf_values # CF values in 'dbar'
array([ 0.00571362, 0.00980469, 0.0064964 , 0.00399812, 0.00724336, 0.00168203])

## Contributing

Not all EPIC codes have been mapped to CF standard names. If you require
a mappnig that has not been done you can do one of the following:

1. Create an issue with the EPIC code number you would like mapped and as much
information about the variable as possible (how it is used, the units, etc).
It may take some time for these to be included in `epic2cf`, especially if we
can not verify a correct mapping to CF.

2. Fork the repository and add the mapping yourself into `epic2cf/`.
I will accept pull requests for updated mapping very quickly.

Release History

This version
History Node


History Node


History Node


History Node


History Node


Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, Size & Hash SHA256 Hash Help File Type Python Version Upload Date
(24.8 kB) Copy SHA256 Hash SHA256
Source None Jul 21, 2015

Supported By

Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Google Google Cloud Servers DreamHost DreamHost Log Hosting