Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Python reader for NASA CDF file format

License

NotificationsYou must be signed in to change notification settings

pysat/pysatCDF

Repository files navigation

pysatCDF

pysatCDF

PyPI Package latest releaseBuild StatusCoverage StatusDOI

Self-contained Python reader for NASA CDF file format

Uses standard and extended Fortran CDF interfaces to load Common Data Format (CDF) files into Python.

Example

import pysatCDFwith pysatCDF.CDF(filename) as cdf:    # All variable data loaded into dictionary in .data    cdf.data    data = cdf.data[name]    # Attributes dictionary    cdf.meta    attribute = cdf.meta[name][attr_name]    # CDF variable information available by name    cdf[name]    # Data access similar to other packages    data = cdf[name][...]    attribute = cdf[name].attrs[attr_name]    # Export data to pysat data and metadata format    data, meta = cdf.to_pysat()

Testing

pysatCDF has been tested on Mac OS X and Ubuntu 15.04. Support is includedfor building on windows via Windows Subsystem for Linux.

Motivation

Provide simple, robust access to CDF data in Python and simplifyadding instruments topysat.

Installation in POSIX compatible environments

Actual CDF loading is performed by theNASA CDF librarieswhich are included with pysatCDF.

To install pysatCDF

git clone https://github.com/rstoneback/pysatCDF.gitcd pysatCDFpython setup.py install

Installing pysatCDF in MacOS

MacOS does not ship with a Fortran compiler. One method for getting a suitablebuild environment is to use brew.

brew install gcc

and then install pysatCDF as normal.

Installing pysatCDF in Windows

Install the Windows Subsytem for Linux and proceed as per POSIX installation.


[8]ページ先頭

©2009-2025 Movatter.jp