Releases: joshua-hampton/ncas_amof_netcdf_template
2.5.1
Release notes
Fixed a bug where the platform global attribute wasn't being set with the correct value for instruments in the vocab list with a fixed location.
What's Changed
- Wrong platform value in global attribute by @joshua-hampton in #168
Full Changelog: 2.5.0...2.5.1
2.5.0
Release notes
This release includes needed updates for working with the 2.1.0 version of the NCAS General standard, in which the instrument information has been abstracted into its own repository. This means that previous versions of this package won't work properly with NCAS General 2.1.0, and those versions will error unless the tag
option is specified as 2.0.0
.
The way in which this data, and the data for the standard, is retrieved and stored has been changed from a dictionary produced by tsv2dict.instrument_dict
to a class object file_info.FileInfo
. Using the class allows clearer labelling over the data and the structure of the data within each property, whereas previously the dictionary had multiple layers of nesting with differing complexity. This could cause confusion as to where data should be, and would lead to potentially misleading messages from IDE plugins.
With this version, support for Python 3.8 has been removed as this is now end of life, and support for Python 3.13 has been added.
Additional functionality includes:
- user defining QC flag values and meanings
- options to chunk, compress and shuffle variable data
- type hints added
What's Changed
- Use rst2pdf module for PDF documentation by @joshua-hampton in #129
- Define QC flag values and meanings by @joshua-hampton in #140
- Change conversion of flag values to list in error message by @joshua-hampton in #142
- New instrument vocabs by @joshua-hampton in #146
- Chunk and compress options by @joshua-hampton in #147
- Allow dimensionless variables by @joshua-hampton in #148
- Add type hints by @joshua-hampton in #150
- Replace very nested instrument dictionary with FileInfo class by @joshua-hampton in #155
- Added missing tag variable by @joshua-hampton in #156
- Deprecations by @joshua-hampton in #157
- Added option for local file use instead of AMF_CVs by @joshua-hampton in #159
Full Changelog: 2.4.0...2.5.0
2.5.0-alpha
Release notes
Preliminary release of version 2.5.0, including new location of instrument data, option to define QC flag values and meanings, and type hints added to code.
Still some changes before full v2.5.0 release, but needed for a version that works with latest NCAS General standard.
2.4.0
Release notes
This release adds a couple of new options to the module:
- The ability to overwrite the default platform in both the file name and the global attribute - this is particularly useful for mobile instruments where the default is "mobile" and always needs changing before submitting the data files to CEDA. This can be accessed using the
platform
option in thecreate_netcdf.main
andcreate_netcdf.make_product_netcdf
functions. - Metadata files can now be provided in YAML, JSON or XML formats, as well as CSV. The expected layout for these formats is described in a new page in the documentation.
Additionally, the return_open
option in some functions has had its default option changed to True
, in line with the deprecation policy, and the instrument_loc
option in tsv2dict.product_dict
and create_netcdf.make_product_netcdf
is being deprecated in favour of platform
.
What's Changed
- New metadata file formats by @joshua-hampton in #124
- Overwrite platform by @joshua-hampton in #125
- Updates and deprecates by @joshua-hampton in #126
Full Changelog: 2.3.2...2.4.0
2.3.2
Release notes
Small bug fixes and more unit tests.
- Correct handling of microseconds in
util.get_times
- Neatly add string numbers from metadata csv file
What's Changed
- More tests by @joshua-hampton in #119
- Correct handling of microseconds by @joshua-hampton in 79d7e6a
- String numbers in metadata by @joshua-hampton in #120
Full Changelog: 2.3.1...2.3.2
2.3.1
Release notes
Small bug fix with very minor changes.
- Added package version number to text in the history global attribute.
util.get_times
returnsday_of_year
as a list rather than an array, in line with other times returned.
What's Changed
- Return day-of-year variable as list by @joshua-hampton in #111
- Add version number to history global attribute by @joshua-hampton in #112
- Use raw string for regular expression by @joshua-hampton in #114
Full Changelog: 2.3.0...2.3.1
2.3.0
Release notes
This release adds the option to keep netCDF files open after creation. Previously, when calling create_netcdf.main
, the netCDF file would be closed after it was made, meaning it then had to be opened again in append mode before data could be added. Now, the option has been added to keep the netCDF file open and return the open file from the function, saving the need to re-open the file. The previous method is still the default and is being deprecated, with the new method available using return_open=True
in the create_netcdf.main
, create_netcdf.make_netcdf
, and create_netcdf.make_product_netcdf
functions. The new method will be the default option in 2.4.0, and the old method removed from 2.5.0.
This led to the need for a deprecation policy, which has been added to the documentation, along with a revision history starting with 2.3.0; this may later be backfilled.
Other highlights include:
- changing supported python versions from 3.7-3.11 to 3.8-3.12
- raising errors (with option to warn instead) when trying to add invalid flag values to quality control variables
- option to use locally saved tsv files
What's Changed
- Changes and updates for 2.3 by @joshua-hampton in #107
Full Changelog: 2.2.2...2.3.0
2.2.2
Release notes
Fix a few bugs as mentioned in issues #97 and #98, looking at dimensions that have a length defined by the standard and dealing with the existence of multiple variables with the same name.
Removal of Python 3.7 checking delayed to release of version 2.3.0.
What's Changed
- Bug fixes by @joshua-hampton in #99
Full Changelog: 2.2.1...2.2.2
2.2.1
Release notes
Small change to checking variable attributes have a value, now checking that they are a string first before checking to see if they are an empty string (as is the case when they have no value). The latest update to Numpy (v1.25) means that when an array is compared to an empty string, previously a warning was issued which we could safely ignore, now an exception is raised. This release addresses this issue.
Also note, as Python 3.7 has reached end of life, this will be the last release that is tested against Python 3.7. While future releases might continue to work with Python 3.7, this will no longer be required or supported.
What's Changed
- Update README.md by @joshua-hampton in #87
- Check variable attribute value is string before comparing it to a string by @joshua-hampton in #93
Full Changelog: 2.2.0...2.2.1
2.2.0
Release notes
This release adds a new way to create netCDF files that align with the NCAS-GENERAL standard - by data product. Files can now be made for any instrument - not just those associated with NCAS and AMOF - that use the data products as defined by the standard, helpful for new instruments that haven't made it onto the list yet, instrument prototypes, or anyone who wishes to use the NCAS metadata standards.
There is also an update to the value given to the history global attribute: rather than just stating the file was created at a certain time, information about the user and this package are included, as suggested in the netCDF Users Guide.
This version also sees some smaller changes behind the scenes, with a push to produce tidier and easier-to-read code, filling in some gaps in the documentation, and adding further badges to the README to help spot quicker when things might be breaking.
What's Changed
- Build status badge by @joshua-hampton in #74
- Add link to build test results from badge by @joshua-hampton in #75
- Add documentation about dimensions by @joshua-hampton in #79
- Tidy repository and code. by @joshua-hampton in #80
- Updates for version 2.2.0 by @joshua-hampton in #84
- Version Update PR by @github-actions in #85
Full Changelog: 2.1.2...2.2.0