Package: pyhomogenize
Homogenize NetCDF files to CF standard: pyhomogenizeVersionsDocumentation and SupportOpen SourceCoding StandardsDevelopment StatusTool to homogenize netCDF to CF standard files using xarraySeehttps://cfconventions.orgDocumentationThe official documentation is athttps://pyhomogenize.readthedocs.io/Featuressome useful functions to read and write large netCDF filesbasics: 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.InstallationYou can install the package directly with pip:pip install pyhomogenizeIf 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 yourPYTHONPATHRequirementspython3.6 or highercftimedaskiteration_utilitiesxarrayContactIn cases of any problems, needs or wishes do not hesitate to contact:ludwig.lierhammer@hereon.deCreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.1.0 (2020-11-12)First release on PyPI.0.1.1 (2022-06-24)Fixed bug in setup.py version number0.1.2 (2022-06-24)pre-commit.ci bug fixed0.1.3 (2022-06-24)Read version number from __init__0.1.4 (2022-06-24)Expand HISTORY.rst0.2.0 (2022-06-30)Outsource useful functions for reading and writing large netCDF files.Use those functiosn directly from pyhomogenize.Calling pyhomogenize classes is not needed.0.2.1 (2022-07-01)rename save_to_netcdf to save_xrdatasetwrite input files to ds attributes0.2.2 (2022-07-05)create chunks if not already existing0.2.3 (2022-07-11)write CF variables to dataset while calling open_xrdataset0.2.4 (2022-07-12)add data via pip install0.2.5 (2023-01-04)precise mid of time rangeadd more dependencies (cftime, netcdf4, h5netcdf)0.2.6 (2023-01-24)adddecode_timesandcombineas keyword argumnets toopen_xrdatasetset default value of parallel inopen_xrdatasetto False0.2.7 (2023-02-03)save_xrdataset is now working if Dataset does not includetime0.2.8 (2023-02-13)convert time axis to CFTimeIndex0.2.9 (2023-02-16)set proleptic_gregorian to standard calendar0.3.0 (2023-02-22)calculate time_bnds and add them to dataset0.3.1 (2023-03-16)get CF_variables0.3.2 (2023-03-22)read and write data with length of time axis is 1add time bounds with length of time axis is 1drop coordinates from non CF variables0.3.3 (2023-03-23)testing for python version 3.8, 3.9 and 3.100.4.0 (2023-03-23)published on zenodo0.5.0 (2023-06-13)add time bounds if length of time axis is 1convert np.datetime64 object to CFTimeIndex0.5.1 (2023-06-14fixing v0.5.10.5.2 (2023-06-30)convert time axis to cftime.datetime objectopen_xrdataset: set decode_cf to parameters0.5.3 (2023-07-19)some restructuring in _convert_time0.5.4 (2023-08-02)use unlimied_dims only if dimension name in ds.coords when saving dataset as netcdf file0.6.0 (2023-09-14)removeSphinxfromrequirements_dev.txtnew frequencytime2:YY1-07-01-YY2-06-30convert time_ranges toCFTimeIndexmake time_control more flexiblenew frequency:yearAC(yyyy1-07-01 to yyyy2-06-30)new_frequency:yearHydro(yyyy1-09-01 to yyyy2-08-31)0.6.1 (2023-10-04)add time bounds for daily datatesting python versions 3.9 to 3.11