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%
Build a climate data processing utility that creates, reads, and manages netCDF files for storing temperature measurements from multiple weather stations.
Create netCDF files with:
Read existing netCDF files to:
Append data to existing files:
@generates
def create_climate_file(filepath, num_stations):
"""
Create a new netCDF file for climate data storage.
Args:
filepath: Path where the netCDF file should be created
num_stations: Number of weather stations (fixed dimension size)
Returns:
None (file is created and closed)
"""
pass
def read_file_metadata(filepath):
"""
Read metadata from an existing netCDF file.
Args:
filepath: Path to the netCDF file
Returns:
dict: Dictionary containing:
- 'title': Global title attribute
- 'time_size': Current size of time dimension
- 'station_size': Size of station dimension
"""
pass
def append_measurements(filepath, temperature_data):
"""
Append new temperature measurements to an existing file.
Args:
filepath: Path to the netCDF file
temperature_data: List or array of temperature values to append
Returns:
int: New size of the time dimension after append
"""
passProvides netCDF4 file format access via h5py.