CtrlK
CommunityDocumentationLog inGet started
Tessl Logo

tessl/pypi-h5netcdf

tessl install tessl/pypi-h5netcdf@1.6.0

netCDF4 file access via h5py with hierarchical and legacy APIs for scientific computing

Agent Success

Agent success rate when using this tile

69%

Improvement

Agent success rate improvement when using this tile compared to baseline

0.83x

Baseline

Agent success rate without this tile

83%

task.mdevals/scenario-9/

Time Series Data Manager

A utility for creating and managing time series data in a netCDF file with support for fixed and growable dimensions.

Capabilities

Creates file with fixed and unlimited dimensions

Create a netCDF file that includes both fixed-size spatial dimensions and an unlimited time dimension to support growing time series data.

  • Creates a new netCDF file with one unlimited dimension named "time" and two fixed dimensions named "x" (size 10) and "y" (size 20) @test
  • The "time" dimension reports as unlimited when queried @test

Stores temperature data with proper dimension association

Store temperature measurements as a 3D variable linked to the time and spatial dimensions.

  • Creates a variable "temperature" with dimensions ("time", "x", "y") and float32 data type @test
  • Writes a 10x20 temperature array to the first time step and verifies data is retrievable @test

Extends time dimension dynamically

Support adding new time steps by resizing the unlimited time dimension.

  • Initially creates the time dimension with size 0, then resizes it to size 5 @test
  • After resizing time dimension from 0 to 5, the temperature variable shape reflects the new time dimension size @test

Implementation

@generates

API

def create_timeseries_file(filename):
    """
    Creates a new netCDF file with dimensions for time series data.

    Creates one unlimited dimension 'time' and two fixed dimensions
    'x' (size 10) and 'y' (size 20).

    Args:
        filename: Path to the netCDF file to create

    Returns:
        File object (should be closed by caller)
    """
    pass

def add_temperature_variable(file_obj):
    """
    Adds a temperature variable to the file with proper dimensions.

    Creates a 3D variable named 'temperature' with dimensions
    ('time', 'x', 'y') and float32 data type.

    Args:
        file_obj: Open netCDF file object

    Returns:
        The created variable object
    """
    pass

def write_temperature_step(file_obj, time_index, data):
    """
    Writes temperature data for a specific time step.

    Args:
        file_obj: Open netCDF file object
        time_index: Time step index to write to
        data: 2D array of shape (10, 20) with temperature values
    """
    pass

def extend_time_dimension(file_obj, new_size):
    """
    Resizes the unlimited time dimension to a new size.

    Args:
        file_obj: Open netCDF file object
        new_size: New size for the time dimension
    """
    pass

Dependencies { .dependencies }

h5netcdf { .dependency }

Provides netCDF4 file format support for hierarchical scientific data storage.

@satisfied-by

numpy { .dependency }

Provides support for numerical array operations.

@satisfied-by

Version

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
pypipkg:pypi/h5netcdf@1.6.x
tile.json