Tool to homogenize netCDF files to CF standard
Homogenize NetCDF files to CF standard: pyhomogenize
Documentation and Support
Tool to homogenize netCDF to CF standard files using xarray
The official documentation is at https://pyhomogenize.readthedocs.io/
some useful functions to read and write large netCDF files
basics: This class creates a fixed frequency CFTimeIndex from user-given start and end dates. You can manipulate the CFTimeIndex and crop it to user-specific conditions.
netcdf_basics: This class opens one or multiple netCDF files by calling the class. You can manipulate the netCDF attributes and write it to a new file.
time_control: This class is a time checker for NetCDF files following CF Metadata Conventions. It is based on pyhomogenize’s netcdf_basics class. Thus it opens the netCDF files by calling the class.
time_compare: This class compares the time axes of list entires of multiple xr.datasets, netCDF files and/or time_control objects.
You can install the package directly with pip:
pip install pyhomogenize
If you want to contribute, I recommend cloning the repository and installing the package in development mode, e.g.
git clone https://github.com/ludwiglierhammer/pyhomogenize.git cd pyhomogenize pip install -e .
This will install the package but you can still edit it and you don’t need the package in your
python3.6 or higher
In cases of any problems, needs or wishes do not hesitate to contact:
First release on PyPI.
Fixed bug in setup.py version number
pre-commit.ci bug fixed
Read version number from __init__
Outsource useful functions for reading and writing large netCDF files.
Use those functiosn directly from pyhomogenize.
Calling pyhomogenize classes is not needed.
rename save_to_netcdf to save_xrdataset
write input files to ds attributes
create chunks if not already existing
write CF variables to dataset while calling open_xrdataset
add data via pip install
precise mid of time range
add more dependencies (cftime, netcdf4, h5netcdf)
add decode_times and combine as keyword argumnets to open_xrdataset
set default value of parallel in open_xrdataset to False
save_xrdataset is now working if Dataset does not include time
convert time axis to CFTimeIndex
set proleptic_gregorian to standard calendar
calculate time_bnds and add them to dataset
read and write data with length of time axis is 1
add time bounds with length of time axis is 1
drop coordinates from non CF variables
testing for python version 3.8, 3.9 and 3.10
published on zenodo
add time bounds if length of time axis is 1
convert np.datetime64 object to CFTimeIndex
convert time axis to cftime.datetime object
open_xrdataset: set decode_cf to parameters
some restructuring in _convert_time
use unlimied_dims only if dimension name in ds.coords when saving dataset as netcdf file
remove Sphinx from requirements_dev.txt
new frequency time2: YY1-07-01 - YY2-06-30
convert time_ranges to CFTimeIndex
make time_control more flexible
new frequency: yearAC (yyyy1-07-01 to yyyy2-06-30)
new_frequency: yearHydro (yyyy1-09-01 to yyyy2-08-31)
add time bounds for daily data
testing python versions 3.9 to 3.11
Release history Release notifications | RSS feed
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Hashes for pyhomogenize-0.6.1-py3-none-any.whl