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 weather station data management system that stores and retrieves temperature and precipitation measurements using a hierarchical file format.
Create a Python program that implements the following functionality:
weather_data.nc that organizes weather stations by regionYour solution should:
File: test_weather.py
def test_file_structure():
"""Verify the file has proper hierarchical organization"""
# File should exist and contain regional organization
# Each region should have temperature and precipitation variables
assert file_exists('weather_data.nc')
assert has_regional_hierarchy()File: test_weather.py
def test_compressed_storage():
"""Verify data is stored with compression enabled"""
# Temperature and precipitation variables should use compression
assert uses_compression('temperature')
assert uses_compression('precipitation')File: test_weather.py
def test_time_range_query():
"""Test retrieval of data for specific time ranges"""
# Should retrieve temperature data for time indices 2 through 5
temps = get_temperature_range(2, 5)
assert temps.shape[0] == 4 # 4 time pointsFile: test_weather.py
def test_missing_data_handling():
"""Verify missing measurements use the fill value"""
# Unwritten data should return the fill value -999.9
data = read_uninitialized_region()
assert all(val == -999.9 for val in data.flatten())Provides netCDF4 file format support with hierarchical data organization and efficient array storage.