Skip to content

LamaH-ICE

Overview

LamaH-ICE is the Iceland large-sample hydrological dataset. Large-sample hydrological dataset for Iceland, featuring volcanic and glacial-influenced catchments with unique characteristics.

Dataset Information

  • Region: Iceland
  • Project: LamaH (Large-sample hydrological data and models)
  • Module: hydrodataset.lamah_ice
  • Class: LamahIce

About LamaH

LamaH (Large-sample hydrological data and models) provides comprehensive hydrological data for research and modeling:

Key Features

  • High-quality, quality-controlled data
  • Extensive catchment attributes
  • Multiple temporal resolutions
  • Detailed metadata
  • Suitable for large-sample hydrology studies

Research Applications

  • Hydrological model development and testing
  • Climate change impact studies
  • Regionalization studies
  • Machine learning applications
  • Comparative hydrology

Features

Static Attributes

Comprehensive static catchment attributes: - Basin geometry and area - Topographic characteristics (elevation, slope) - Land cover information - Soil properties and classes - Geological characteristics - Climate indices - Human influence indicators

Dynamic Variables

Timeseries variables available: - Streamflow (observed) - Precipitation - Temperature (min, max, mean) - Potential evapotranspiration - Snow water equivalent - Solar radiation - Humidity - And more...

Usage

Basic Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
from hydrodataset.lamah_ice import LamahIce
from hydrodataset import SETTING

# Initialize dataset
data_path = SETTING["local_data_path"]["datasets-origin"]
ds = LamahIce(data_path)

# Get basin IDs
basin_ids = ds.read_object_ids()
print(f"Number of basins: {len(basin_ids)}")

# Check available features
print("Static features:", ds.available_static_features)
print("Dynamic features:", ds.available_dynamic_features)

# Check default time range
print(f"Default time range: {ds.default_t_range}")

# Read timeseries data
timeseries = ds.read_ts_xrdataset(
    gage_id_lst=basin_ids[:5],
    t_range=ds.default_t_range,
    var_lst=["streamflow", "precipitation"]
)
print(timeseries)

# Read attribute data
attributes = ds.read_attr_xrdataset(
    gage_id_lst=basin_ids[:5],
    var_lst=["area", "p_mean"]
)
print(attributes)

Advanced Analysis

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
# Read multiple variables for detailed analysis
ts_data = ds.read_ts_xrdataset(
    gage_id_lst=basin_ids[:10],
    t_range=["1990-01-01", "2020-12-31"],
    var_lst=[
        "streamflow",
        "precipitation", 
        "temperature_mean",
        "temperature_min",
        "temperature_max",
        "pet",
        "snow_water_equivalent"
    ]
)

# Analyze snow-influenced catchments
import xarray as xr
winter_months = ts_data.sel(time=ts_data.time.dt.month.isin([12, 1, 2]))
mean_swe = winter_months["snow_water_equivalent"].mean(dim="time")
print("Mean winter SWE:", mean_swe)

Reading Specific Variables

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
# Read with specific time range
ts_data = ds.read_ts_xrdataset(
    gage_id_lst=basin_ids[:10],
    t_range=["2000-01-01", "2010-12-31"],
    var_lst=["streamflow", "precipitation", "temperature_mean"]
)

# Read basin area
areas = ds.read_area(gage_id_lst=basin_ids[:10])

# Read mean precipitation
mean_precip = ds.read_mean_prcp(gage_id_lst=basin_ids[:10])

Data Quality and Completeness

LamaH datasets feature: - Rigorous quality control procedures - Documentation of data gaps - Metadata completeness - Peer-reviewed methodology - Regular updates

Regional Characteristics

LamaH-CE

  • Alpine and pre-Alpine catchments
  • Snow-influenced hydrology
  • Elevation range from lowlands to high mountains
  • Mixed land use patterns

LamaH-ICE

  • Volcanic landscapes
  • Glacial-influenced catchments
  • Geothermal activity impact
  • Unique geological conditions

API Reference

hydrodataset.lamah_ice.LamahIce

Bases: HydroDataset

LamaHICE dataset class extending HydroDataset.

This class uses a custom data reading implementation to support a newer dataset version than the one supported by the underlying aquafetch library. It overrides the download URLs and provides updated methods.

Attributes:

Name Type Description
region

Geographic region identifier

download

Whether to download data automatically

Source code in hydrodataset/lamah_ice.py
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
class LamahIce(HydroDataset):
    """LamaHICE dataset class extending HydroDataset.

    This class uses a custom data reading implementation to support a newer
    dataset version than the one supported by the underlying aquafetch library.
    It overrides the download URLs and provides updated methods.

    Attributes:
        region: Geographic region identifier
        download: Whether to download data automatically
    """

    def __init__(
        self, data_path: str, region: Optional[str] = None, download: bool = False
    ) -> None:
        """Initialize LamaHICE dataset.

        Args:
            data_path: Path to the LamaHICE data directory
            region: Geographic region identifier (optional)
            download: Whether to download data automatically (default: False)
        """
        super().__init__(data_path)
        self.region = region
        self.download = download

        # Use the custom LamaHIce class defined at module level
        self.aqua_fetch = LamaHIce(data_path)

    @property
    def _attributes_cache_filename(self):
        return "lamahice_attributes.nc"

    @property
    def _timeseries_cache_filename(self):
        return "lamahice_timeseries.nc"

    @property
    def default_t_range(self):
        return ["1950-01-01", "2021-12-31"]

    # Define standardized static variable mappings
    # Based on aqua_fetch LamaHIce static_map
    # information of features get from pdf  https://www.hydroshare.org/resource/705d69c0f77c48538d83cf383f8c63d6/
    _subclass_static_definitions = {
        "p_mean": {"specific_name": "p_mean_basin", "unit": "mm"},
        "area": {"specific_name": "area_km2", "unit": "km^2"},
    }

    # Define standardized dynamic variable mappings
    # Based on aqua_fetch LamaHIce dyn_map
    _dynamic_variable_mapping = {
        StandardVariable.STREAMFLOW: {
            "default_source": "lamah_ice",
            "sources": {"lamah_ice": {"specific_name": "q_cms_obs", "unit": "m^3/s"}},
            "sources": {"carra": {"specific_name": "runoff_carra", "unit": "mm"}},
        },
        StandardVariable.PRECIPITATION: {
            "default_source": "lamah_ice",
            "sources": {"lamah_ice": {"specific_name": "pcp_mm", "unit": "mm"}},
            "sources": {"carra": {"specific_name": "prec_carra", "unit": "mm"}},
            "sources": {"rav": {"specific_name": "prec_rav", "unit": "mm"}},
        },
        StandardVariable.TEMPERATURE_MIN: {
            "default_source": "lamah_ice",
            "sources": {
                "lamah_ice": {"specific_name": "airtemp_c_2m_min", "unit": "°C"}
            },
            "sources": {"dp": {"specific_name": "2m_dp_temp_min", "unit": "°C"}},
            "sources": {"carra": {"specific_name": "2m_temp_min_carra", "unit": "°C"}},
        },
        StandardVariable.TEMPERATURE_MAX: {
            "default_source": "lamah_ice",
            "sources": {
                "lamah_ice": {"specific_name": "airtemp_c_2m_max", "unit": "°C"}
            },
            "sources": {"dp": {"specific_name": "2m_dp_temp_max", "unit": "°C"}},
            "sources": {"carra": {"specific_name": "2m_temp_max_carra", "unit": "°C"}},
        },
        StandardVariable.TEMPERATURE_MEAN: {
            "default_source": "lamah_ice",
            "sources": {
                "lamah_ice": {"specific_name": "airtemp_c_mean_2m", "unit": "°C"}
            },
            "sources": {"dp": {"specific_name": "2m_dp_temp_mean", "unit": "°C"}},
            "sources": {"rav": {"specific_name": "2m_temp_rav", "unit": "°C"}},
            "sources": {"carra": {"specific_name": "2m_temp_carra", "unit": "°C"}},
        },
        StandardVariable.POTENTIAL_EVAPOTRANSPIRATION: {
            "default_source": "lamah_ice",
            "sources": {"lamah_ice": {"specific_name": "pet_mm", "unit": "mm/day"}},
        },
        StandardVariable.EVAPOTRANSPIRATION: {
            "default_source": "rav",
            "sources": {"ref": {"specific_name": "ref_et_mm", "unit": "mm/day"}},
            "sources": {"rav": {"specific_name": "total_et_rav", "unit": "mm/day"}},
            "sources": {"carra": {"specific_name": "total_et_carra", "unit": "mm/day"}},
        },
        StandardVariable.U_WIND_SPEED: {
            "default_source": "lamah_ice",
            "sources": {"lamah_ice": {"specific_name": "10m_wind_u", "unit": "m/s"}},
            "sources": {"rav": {"specific_name": "10m_wind_u_rav", "unit": "m/s"}},
        },
        StandardVariable.V_WIND_SPEED: {
            "default_source": "lamah_ice",
            "sources": {"lamah_ice": {"specific_name": "10m_wind_v", "unit": "m/s"}},
            "sources": {"rav": {"specific_name": "10m_wind_v_rav", "unit": "m/s"}},
        },
        StandardVariable.WIND_SPEED: {
            "default_source": "carra",
            "sources": {
                "carra": {"specific_name": "10m_wind_speed_carra", "unit": "m/s"}
            },
        },
        StandardVariable.WIND_DIR: {
            "default_source": "carra",
            "sources": {
                "carra": {"specific_name": "10m_wind_dir_carra", "unit": "degree"}
            },
        },
        StandardVariable.SNOW_WATER_EQUIVALENT: {
            "default_source": "lamah_ice",
            "sources": {"lamah_ice": {"specific_name": "swe", "unit": "mm"}},
            "sources": {"carra": {"specific_name": "swe_carra", "unit": "mm"}},
        },
        StandardVariable.SOLAR_RADIATION: {
            "default_source": "lamah_ice",
            "sources": {
                "lamah_ice": {
                    "specific_name": "surf_net_solar_rad_mean",
                    "unit": "W/m^2",
                }
            },
            "sources": {
                "rav": {"specific_name": "surf_dwn_solar_rad_rav", "unit": "W/m^2"}
            },
            "sources": {
                "carra": {"specific_name": "surf_net_solar_rad_carra", "unit": "W/m^2"}
            },
            "sources": {
                "dwn_carra": {
                    "specific_name": "surf_dwn_solar_rad_carra",
                    "unit": "W/m^2",
                }
            },
        },
        StandardVariable.SOLAR_RADIATION_MAX: {
            "default_source": "lamah_ice",
            "sources": {
                "lamah_ice": {
                    "specific_name": "surf_net_solar_rad_max",
                    "unit": "W/m^2",
                }
            },
        },
        StandardVariable.THERMAL_RADIATION: {
            "default_source": "lamah_ice",
            "sources": {
                "lamah_ice": {
                    "specific_name": "surf_net_therm_rad_mean",
                    "unit": "W/m^2",
                }
            },
            "sources": {
                "outg": {"specific_name": "surf_outg_therm_rad_rav", "unit": "W/m^2"}
            },
            "sources": {
                "dwn": {"specific_name": "surf_dwn_therm_rad_rav", "unit": "W/m^2"}
            },
            "sources": {
                "carra": {"specific_name": "surf_net_therm_rad_carra", "unit": "W/m^2"}
            },
            "sources": {
                "dwn_carra": {
                    "specific_name": "surf_dwn_therm_rad_carra",
                    "unit": "W/m^2",
                }
            },
        },
        StandardVariable.THERMAL_RADIATION_MAX: {
            "default_source": "lamah_ice",
            "sources": {
                "lamah_ice": {
                    "specific_name": "surf_net_therm_rad_max",
                    "unit": "W/m^2",
                }
            },
        },
        StandardVariable.SURFACE_PRESSURE: {
            "default_source": "lamah_ice",
            "sources": {"lamah_ice": {"specific_name": "surf_press", "unit": "Pa"}},
            "sources": {"rav": {"specific_name": "surf_press_rav", "unit": "Pa"}},
        },
        StandardVariable.POTENTIAL_EVAPOTRANSPIRATION: {
            "default_source": "lamah_ice",
            "sources": {"lamah_ice": {"specific_name": "pet_mm", "unit": "mm"}},
            "sources": {
                "caravan": {
                    "specific_name": "potential_evaporation_sum_fao_penman_monteith_from_caravan",
                    "unit": "mm/day",
                }
            },
        },
        StandardVariable.VOLUMETRIC_SOIL_WATER_LAYER1: {
            "default_source": "rav",
            "sources": {"rav": {"specific_name": "volsw_123", "unit": "mm"}},
        },
        StandardVariable.VOLUMETRIC_SOIL_WATER_LAYER4: {
            "default_source": "rav",
            "sources": {"rav": {"specific_name": "volsw_4", "unit": "mm"}},
        },
        StandardVariable.RELATIVE_HUMIDITY: {
            "default_source": "rav",
            "sources": {"rav": {"specific_name": "2m_qv_rav", "unit": "m/s"}},
            "sources": {"carra": {"specific_name": "2m_rel_hum_carra", "unit": "m/s"}},
        },
        StandardVariable.SPECIFIC_HUMIDITY: {
            "default_source": "carra",
            "sources": {"carra": {"specific_name": "2m_spec_hum_carra", "unit": "m/s"}},
        },
        StandardVariable.GROUND_HEAT_FLUX: {
            "default_source": "rav",
            "sources": {"rav": {"specific_name": "grdflx_rav", "unit": "W/m^2"}},
            "sources": {
                "sens": {
                    "specific_name": "surf_dwn_sens_heat_flux_carra",
                    "unit": "W/m^2",
                }
            },
            "sources": {
                "lat": {
                    "specific_name": "surf_dwn_lat_heat_flux_carra",
                    "unit": "W/m^2",
                }
            },
        },
        StandardVariable.SNOW_SUBLIMATION: {
            "default_source": "carra",
            "sources": {
                "carra": {"specific_name": "snow_sublimation_carra", "unit": "mm"}
            },
        },
        StandardVariable.SOIL_MOISTURE: {
            "default_source": "carra",
            "sources": {"carra": {"specific_name": "percolation_carra", "unit": "mm"}},
        },
    }

default_t_range property

__init__(data_path, region=None, download=False)

Initialize LamaHICE dataset.

Parameters:

Name Type Description Default
data_path str

Path to the LamaHICE data directory

required
region Optional[str]

Geographic region identifier (optional)

None
download bool

Whether to download data automatically (default: False)

False
Source code in hydrodataset/lamah_ice.py
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
def __init__(
    self, data_path: str, region: Optional[str] = None, download: bool = False
) -> None:
    """Initialize LamaHICE dataset.

    Args:
        data_path: Path to the LamaHICE data directory
        region: Geographic region identifier (optional)
        download: Whether to download data automatically (default: False)
    """
    super().__init__(data_path)
    self.region = region
    self.download = download

    # Use the custom LamaHIce class defined at module level
    self.aqua_fetch = LamaHIce(data_path)