Nctoolkit

Latest version: v1.1.10

Safety actively analyzes 629765 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 9 of 11

0.3.9

This is a minor release focusing on under-the-hood improvements.

A new method, ``from_xarray`` is added for converting xarray datasets to nctoolkit datasets.

Methods for identifying how many missing values appear in datasets have been added: `na_count` and `na_frac`. These will identify the number or fraction of values that are missing values in each grid cell. The methods operate the same way as the temporal methods. So `ds.na_frac("year")` will give you the fraction of values are missing values each year.

Methods for better upscaling of datasets will be added: ``box_mean``, ``box_sum``, ``box_max``. This will allow you to upscale to, for example, each 10 by 10 grid box using the mean of that grid box. This is useful for upscaling things like population data where you want the upscaled grid boxes to represent the entirety of the grid box, not the centre.

Improvements to ``merge`` have been made. When variables are not included in all files nctoolkit will now only merge those in each file in a multi-file dataset. Previously it threw an error.

Functions for finding the times and months in netCDF files are now available: ``nc_years`` and ``nc_months`.

The attribute ``variables_detailed`` has been changed to ``contents``. It will also now give the number of time steps available for each variable.

``cdo_command`` now allows users to specify whether the CDO command used is an ensemble method. Previously methods applied on a file by file basis.

0.3.8

This is a minor release, focusing on under-the-hood improvements and introducing better handling of files with varying vertical layers.

New methods

A method, ``vertical_integration`` for calculating vertically integrated totals for netCDF data of the likes of oceanic data, where the vertical levels vary spatially, is introduced. ``vertical_mean`` has been improved and can now calculate vertical mean in cases where the cell thickness varies in space.

Deprecations

``merge_time`` is deprecated, and its functionality will be incorporated into ``merge``. So, following this release ensemble merging operations should use ``merge``.

Improvements

``open_url`` is now able to handle multiple urls. Previously it could only handle one.

Some under-the-hood improvements have been made to ``assign`` to ensure that truth statements do not occassionally throw an error.

**Full Changelog**: https://github.com/pmlmodelling/nctoolkit/compare/v0.3.7...v0.3.8

0.3.7

This is a minor release with new features and one bug fix.

New methods

New mathematical methods for simple operations on variables will be added: ``abs``, ``power``, ``square``, ``sqrt``, ``exp``, ``log`` and ``log10``. These methods match numpy names.

Bug fix

``assign`` previously did not accept ``log10`` in the lambda function. Now fixed.

0.3.6

This is a minor release.

New methods
New methods ``ensemble_mean`` and ``ensemble_stdev`` are introduced for calculating variance and standard deviation across ensembles.

Method renaming
The method ``tvariance`` is deprecated and is now renamed ``tvar`` for naming consistency.

0.3.5

This is a minor release focusing on some under-the-hood improvements in performance and a couple of new methods.

It drops support for CDO version 1.9.3, as this is becoming too time-consuming to continue given the increasingly low reward.

A couple of new methods have been added. ``distribute`` enables files to be split up spatially into equally sized m by n rectangles. ``collect`` is the reverse of ``distribute``. It will collect distributed data into one file.

In prior releases ``assign`` calls could not be split over multiple lines. This is now fixed.

There was a bug in previous releases where ``regrid`` did not work with multi-file datasets. This was due to the enabling of parallel processing with nctoolkit. The issue is now fixed.

The deprecated methods ``mutate`` and ``assign`` have now been removed. Variable creation should use ``assign``.

0.3.4

This is a minor release. All non-deprecated methods are unchanged from the prior release.

A new method fill_na has been introduced that allows missing values to be filled with the distanced weighted average neighbour.

The previously deprecated methods remove_variables and cell_areas have been removed and are replaced permanently by drop and cell_area.

Page 9 of 11

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.