tessl install tessl/pypi-h5netcdf@1.6.0netCDF4 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%
A utility for creating and managing time series data in a netCDF file with support for fixed and growable dimensions.
Create a netCDF file that includes both fixed-size spatial dimensions and an unlimited time dimension to support growing time series data.
Store temperature measurements as a 3D variable linked to the time and spatial dimensions.
Support adding new time steps by resizing the unlimited time dimension.
@generates
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
"""
passProvides netCDF4 file format support for hierarchical scientific data storage.
@satisfied-by
Provides support for numerical array operations.
@satisfied-by