Skip to main content

File format conversions to cfdb

Project description

cfdb-ingest

Convert meteorological model output to cfdb with standardized CF conventions

build codecov PyPI version


Documentation: https://mullenkamp.github.io/cfdb-ingest/

Source Code: https://github.com/mullenkamp/cfdb-ingest


Overview

cfdb-ingest converts meteorological file formats (netCDF4/HDF5) from various model outputs into cfdb. It standardizes variable names and attributes to be consistent with CF conventions, making it straightforward to work with datasets from different sources through a single interface.

Key features:

  • Automatic variable mapping -- source variable names are translated to CF-standard names with proper metadata
  • Wind rotation -- grid-relative wind components are rotated to earth-relative
  • 3D level interpolation -- eta-level variables are interpolated to user-specified height or pressure levels
  • WPS intermediate file export -- convert cfdb datasets to WPS intermediate format for metgrid.exe
  • Spatial and temporal filtering -- subset by bounding box and/or date range
  • Multi-file support -- seamlessly spans multiple input files

Installation

Requires Python >= 3.10.

pip install cfdb-ingest

Quick Start

from cfdb_ingest import WrfIngest

wrf = WrfIngest('wrfout_d01_2023-02-12_00:00:00.nc')
wrf.convert(
    cfdb_path='output.cfdb',
    variables=['T2', 'WIND10'],
    start_date='2023-02-12T06:00',
    end_date='2023-02-12T18:00',
)
cfdb-ingest wrf wrfout_d01_*.nc output.cfdb -v T2,WIND10 -s 2023-02-12T06:00 -e 2023-02-12T18:00

For WPS export, use the --preset wps flag:

cfdb-ingest wrf /path/to/wrfout/ output.cfdb --preset wps -s 2023-02-10 -e 2023-02-10_06
cfdb-to-int output.cfdb -s 2023-02-10 -e 2023-02-10_06

See the full documentation for details.

License

This project is licensed under the terms of the Apache Software License 2.0.

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

cfdb_ingest-0.2.1.tar.gz (22.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cfdb_ingest-0.2.1-py3-none-any.whl (23.6 kB view details)

Uploaded Python 3

File details

Details for the file cfdb_ingest-0.2.1.tar.gz.

File metadata

  • Download URL: cfdb_ingest-0.2.1.tar.gz
  • Upload date:
  • Size: 22.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.7

File hashes

Hashes for cfdb_ingest-0.2.1.tar.gz
Algorithm Hash digest
SHA256 23f03f12ffcb0066dff0b0ff31c8be31620e1d43d33d805df074ae8d5236d216
MD5 462b6af47027d899328c60f172ee12a6
BLAKE2b-256 3b84536883d006551af0e6c68720ff565ee89d95f5a93176d86d1e77d555a976

See more details on using hashes here.

File details

Details for the file cfdb_ingest-0.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for cfdb_ingest-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 64f8a9bb5f25aec2361d8562d66045c15c9a42e667d036f7e566a12e3e09e3bb
MD5 bb2b4b01f708a90be2d60f9c315f1593
BLAKE2b-256 1ffce9fda46419e2b0f9a064e61bf81b592e16ba68e0d71a66585ea9bfaf5e92

See more details on using hashes here.

Supported by

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