Upgrade guide
Only breaking changes that require attention are listed here. For a complete list of changes, see the changelog.
v0.7 to v0.8
Breaking change2:
The minimum Python version is now 3.10.
Behaviours were renamed as Actions.
Changing logging labels for content to type-specific labels (
contentbecomeswater_content,icebecomesice_content,snowbecomessnow_content).The extraction of meteorological data from netCDF files (
spatialize_from_gridded_data) has changed. The function now computes elevation gradients by default for temperature and precipitation. In order to access to the DEM, the class must be initialized with the catchment object (forcing = hb.Forcing(catchment)) instead of the hydro units object. This gradient-based interpolation can be disabled withapply_data_gradient=False.The functions
model.is_ok()andparameters.is_ok()have been renamed tomodel.is_valid()andparameters.are_valid()orparameters.is_valid()respectively.
v0.6 to v0.7
Breaking change:
The
isohypseoption has been renamed toequal_intervalsin the catchment discretization functions.
v0.5 to v0.6
Breaking changes in the Forcing class:
load_from_csv()was renamed toload_station_data_from_csv().define_spatialization()was renamed tospatialize_from_station_data()and is now reserved for spatialization from station data.correct_station_data()was added for applying correction factors to raw station data.spatialize_from_gridded_data()was added for loading from gridded NetCDF files.compute_pet()was added and uses the pyet package.Operations are no longer applied immediately. They are queued and applied automatically before the model run or before saving to a NetCDF file (via
apply_operations(), called internally).
Other changes:
The
Catchmentclass is now part of the mainhydrobricksmodule (previously in a submodule).
v0.4 to v0.5
Breaking change:
Hyphens replaced with underscores in all component names. Any land cover or model component name must use underscores instead of hyphens (e.g.,
glacier_iceinstead ofglacier-ice,slow_reservoirinstead ofslow-reservoir).