Skip to main content

A simple module reproducing limited I/O API functions

Project description

fauxioapi

A simple approximation of a limited set of functions from the I/O API targeted at gridded atmospheric emissions QA in a netCDF container such as those created by SMOKE for CMAQ

Overview

I/O API is a programming interface used for storage and access primarily of meterological and atmospheric pollution data for CMAQ, WRF, SMOKE and other applications. I/O API is currently hosted by both GitHub and the CMAS center. It is maintained by Carlie J. Coats, Jr., Ph.D., the original architect of both CMAQ and SMOKE. This module is unofficial and has no connection to the CMAS center or the I/O API developers. This library is not considered 100% compatible with I/O API. Currently the fauxioapi library supports gridded hourly files and can read the grid description format file. Do not contact the I/O API author or developers about issues with this module or files generated by this module.

Requirements

Python 3.5 or later is required. The library is tested with numpu 1.16 and netCDF4 1.2.9. Variations in module versions may introduce incompatibilities.

Installation

Installation may be done using Python setuptools. Simply run python3 setup.py install to begin the process.

Usage example

import fauxioapi as io

Initialize grid variables from griddesc file: gridname = '12US2' grid_description = 'GRIDDESC.txt' grid = io.Grid(gridname, grid_description)

Open I/O API dataset for reading and read a variable: fn = 'input_data.ncf' with io.IODataset(fn) as iodf: var = iodf['NOX']

Open I/O API dataset for writing, set dimensions, write a variable, set attributes, and write the TFLAG: fn = 'output_data.ncf' with io.IODataset(fn, 'w') as iodf: iodf.set_dimensions(LAY=1, ROW=200, COL=200, VAR=1) iodf_var = iodf.create_variable('NOX', 'REAL', ('TSTEP','LAY','ROW','COL')) iodf_var[:] = np.zeros([25,1,200,200]) iodf.set_attributes('20200101', grid) iodf.write_TFLAG()

Project details


Download files

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

Source Distribution

fauxioapi-0.1.6.tar.gz (8.3 kB view details)

Uploaded Source

File details

Details for the file fauxioapi-0.1.6.tar.gz.

File metadata

  • Download URL: fauxioapi-0.1.6.tar.gz
  • Upload date:
  • Size: 8.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.8.3 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.6.1

File hashes

Hashes for fauxioapi-0.1.6.tar.gz
Algorithm Hash digest
SHA256 3d6813a2ebdc02c9c6777686d0bf048d243db1eb06293eb45490f68c913d9dc0
MD5 7a4ada10ce0330adae46a59282875bed
BLAKE2b-256 489e254f14a2102c3c19074d53d017d92f4457815dfc0513f6234b1d700f9e33

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page