easy_vic_build.tools.params_func.build_Param_interface
Interfaces for building VIC parameter datasets.
Classes
|
Build level-0 soil and terrain parameter fields for VIC. |
Level-0 builder variant with spatially uniform ARNO baseflow parameters. |
|
Level-0 builder variant with spatially uniform Nijssen baseflow parameters. |
|
|
- class easy_vic_build.tools.params_func.build_Param_interface.buildParam_level0_interface(evb_dir, logger, dpc_VIC_level0, g_params, soillayerresampler: SoilLayerResampler, TF_VIC: TF_VIC, reverse_lat=True, stand_grids_lat_level0=None, stand_grids_lon_level0=None, rows_index_level0=None, cols_index_level0=None, basin_hierarchy=None)[source]
Bases:
objectBuild level-0 soil and terrain parameter fields for VIC.
Initialize level-0 parameter builder.
- Parameters:
evb_dir (object) – Project directory/config object with output paths.
logger (object) – Logger instance.
dpc_VIC_level0 (object) – Data-processing container that provides merged grid data.
g_params (dict) – Parameter dictionary used by transfer functions.
soillayerresampler (SoilLayerResampler) – Resampler for aggregating source soil layers to VIC layers.
TF_VIC (TF_VIC) – VIC transfer-function class.
reverse_lat (bool, optional) – Whether standard latitude order is reversed.
stand_grids_lat_level0 (array-like, optional) – Precomputed standard latitude coordinates.
stand_grids_lon_level0 (array-like, optional) – Precomputed standard longitude coordinates.
rows_index_level0 (array-like, optional) – Precomputed row indices for mapping grid shapefile to array.
cols_index_level0 (array-like, optional) – Precomputed column indices for mapping grid shapefile to array.
basin_hierarchy (dict, optional) – Nested-basin hierarchy used to assign sub-basin-specific parameters.
- __init__(evb_dir, logger, dpc_VIC_level0, g_params, soillayerresampler: SoilLayerResampler, TF_VIC: TF_VIC, reverse_lat=True, stand_grids_lat_level0=None, stand_grids_lon_level0=None, rows_index_level0=None, cols_index_level0=None, basin_hierarchy=None)[source]
Initialize level-0 parameter builder.
- Parameters:
evb_dir (object) – Project directory/config object with output paths.
logger (object) – Logger instance.
dpc_VIC_level0 (object) – Data-processing container that provides merged grid data.
g_params (dict) – Parameter dictionary used by transfer functions.
soillayerresampler (SoilLayerResampler) – Resampler for aggregating source soil layers to VIC layers.
TF_VIC (TF_VIC) – VIC transfer-function class.
reverse_lat (bool, optional) – Whether standard latitude order is reversed.
stand_grids_lat_level0 (array-like, optional) – Precomputed standard latitude coordinates.
stand_grids_lon_level0 (array-like, optional) – Precomputed standard longitude coordinates.
rows_index_level0 (array-like, optional) – Precomputed row indices for mapping grid shapefile to array.
cols_index_level0 (array-like, optional) – Precomputed column indices for mapping grid shapefile to array.
basin_hierarchy (dict, optional) – Nested-basin hierarchy used to assign sub-basin-specific parameters.
- static cal_ssc_percentile_grid_array(grid_shp_level0, orig_depths, depth_layer_start, depth_layer_end, stand_grids_lat, stand_grids_lon, rows_index, cols_index)[source]
Compute weighted sand/silt/clay fractions for an aggregated layer range.
- Parameters:
grid_shp_level0 (GeoDataFrame) – Grid shapefile data containing soil texture attributes.
orig_depths (sequence of float) – Original soil-layer thicknesses used as aggregation weights.
depth_layer_start (int) – Start index (inclusive) of source soil layers.
depth_layer_end (int) – End index (inclusive) of source soil layers.
stand_grids_lat (list) – Standard latitude coordinates.
stand_grids_lon (list) – Standard longitude coordinates.
rows_index (array-like) – Row indices mapping grid records to array rows.
cols_index (array-like) – Column indices mapping grid records to array columns.
- Returns:
(grid_array_sand, grid_array_silt, grid_array_clay)as aggregated percentage arrays.- Return type:
tuple
- static cal_bd_grid_array(grid_shp_level0, orig_depths, depth_layer_start, depth_layer_end, stand_grids_lat, stand_grids_lon, rows_index, cols_index)[source]
Compute weighted bulk density for an aggregated layer range.
- Parameters:
grid_shp_level0 (GeoDataFrame) – Grid shapefile data containing bulk-density attributes.
orig_depths (sequence of float) – Original soil-layer thicknesses used as aggregation weights.
depth_layer_start (int) – Start index (inclusive) of source soil layers.
depth_layer_end (int) – End index (inclusive) of source soil layers.
stand_grids_lat (list) – Standard latitude coordinates.
stand_grids_lon (list) – Standard longitude coordinates.
rows_index (array-like) – Row indices mapping grid records to array rows.
cols_index (array-like) – Column indices mapping grid records to array columns.
- Returns:
Aggregated bulk density array converted to
kg/m3.- Return type:
ndarray
- class easy_vic_build.tools.params_func.build_Param_interface.buildParam_level1_interface(evb_dir, logger, dpc_VIC_level1, TF_VIC: TF_VIC, reverse_lat=True, domain_dataset=None, stand_grids_lat_level1=None, stand_grids_lon_level1=None, rows_index_level1=None, cols_index_level1=None)[source]
Bases:
object
- class easy_vic_build.tools.params_func.build_Param_interface.buildParam_level0_interface_ARNO_spatially_uniform(evb_dir, logger, dpc_VIC_level0, g_params, soillayerresampler: SoilLayerResampler, TF_VIC: TF_VIC, reverse_lat=True, stand_grids_lat_level0=None, stand_grids_lon_level0=None, rows_index_level0=None, cols_index_level0=None, basin_hierarchy=None)[source]
Bases:
buildParam_level0_interfaceLevel-0 builder variant with spatially uniform ARNO baseflow parameters.
Notes
This variant keeps selected sensitive parameters spatially uniform:
total_depths,soil_layers_breakpoints,b_infilt,Ds,Dsmax, andWs. Parametersd1,d2, andd3are disabled.Initialize level-0 parameter builder.
- Parameters:
evb_dir (object) – Project directory/config object with output paths.
logger (object) – Logger instance.
dpc_VIC_level0 (object) – Data-processing container that provides merged grid data.
g_params (dict) – Parameter dictionary used by transfer functions.
soillayerresampler (SoilLayerResampler) – Resampler for aggregating source soil layers to VIC layers.
TF_VIC (TF_VIC) – VIC transfer-function class.
reverse_lat (bool, optional) – Whether standard latitude order is reversed.
stand_grids_lat_level0 (array-like, optional) – Precomputed standard latitude coordinates.
stand_grids_lon_level0 (array-like, optional) – Precomputed standard longitude coordinates.
rows_index_level0 (array-like, optional) – Precomputed row indices for mapping grid shapefile to array.
cols_index_level0 (array-like, optional) – Precomputed column indices for mapping grid shapefile to array.
basin_hierarchy (dict, optional) – Nested-basin hierarchy used to assign sub-basin-specific parameters.
- __init__(evb_dir, logger, dpc_VIC_level0, g_params, soillayerresampler: SoilLayerResampler, TF_VIC: TF_VIC, reverse_lat=True, stand_grids_lat_level0=None, stand_grids_lon_level0=None, rows_index_level0=None, cols_index_level0=None, basin_hierarchy=None)
Initialize level-0 parameter builder.
- Parameters:
evb_dir (object) – Project directory/config object with output paths.
logger (object) – Logger instance.
dpc_VIC_level0 (object) – Data-processing container that provides merged grid data.
g_params (dict) – Parameter dictionary used by transfer functions.
soillayerresampler (SoilLayerResampler) – Resampler for aggregating source soil layers to VIC layers.
TF_VIC (TF_VIC) – VIC transfer-function class.
reverse_lat (bool, optional) – Whether standard latitude order is reversed.
stand_grids_lat_level0 (array-like, optional) – Precomputed standard latitude coordinates.
stand_grids_lon_level0 (array-like, optional) – Precomputed standard longitude coordinates.
rows_index_level0 (array-like, optional) – Precomputed row indices for mapping grid shapefile to array.
cols_index_level0 (array-like, optional) – Precomputed column indices for mapping grid shapefile to array.
basin_hierarchy (dict, optional) – Nested-basin hierarchy used to assign sub-basin-specific parameters.
- buildParam_level0_basic()
- buildParam_level0_by_g_tf()
- static cal_bd_grid_array(grid_shp_level0, orig_depths, depth_layer_start, depth_layer_end, stand_grids_lat, stand_grids_lon, rows_index, cols_index)
Compute weighted bulk density for an aggregated layer range.
- Parameters:
grid_shp_level0 (GeoDataFrame) – Grid shapefile data containing bulk-density attributes.
orig_depths (sequence of float) – Original soil-layer thicknesses used as aggregation weights.
depth_layer_start (int) – Start index (inclusive) of source soil layers.
depth_layer_end (int) – End index (inclusive) of source soil layers.
stand_grids_lat (list) – Standard latitude coordinates.
stand_grids_lon (list) – Standard longitude coordinates.
rows_index (array-like) – Row indices mapping grid records to array rows.
cols_index (array-like) – Column indices mapping grid records to array columns.
- Returns:
Aggregated bulk density array converted to
kg/m3.- Return type:
ndarray
- static cal_ssc_percentile_grid_array(grid_shp_level0, orig_depths, depth_layer_start, depth_layer_end, stand_grids_lat, stand_grids_lon, rows_index, cols_index)
Compute weighted sand/silt/clay fractions for an aggregated layer range.
- Parameters:
grid_shp_level0 (GeoDataFrame) – Grid shapefile data containing soil texture attributes.
orig_depths (sequence of float) – Original soil-layer thicknesses used as aggregation weights.
depth_layer_start (int) – Start index (inclusive) of source soil layers.
depth_layer_end (int) – End index (inclusive) of source soil layers.
stand_grids_lat (list) – Standard latitude coordinates.
stand_grids_lon (list) – Standard longitude coordinates.
rows_index (array-like) – Row indices mapping grid records to array rows.
cols_index (array-like) – Column indices mapping grid records to array columns.
- Returns:
(grid_array_sand, grid_array_silt, grid_array_clay)as aggregated percentage arrays.- Return type:
tuple
- create_parameter_dataset()
- set_Wcr_FRACT()
- set_Wpwp_FRACT()
- set_arno_baseflow_layer_num()
- set_b_retcurve()
- set_bubble()
- set_bulk_density()
- set_cexpt()
- set_coord_map()
- set_d4()
- set_dims()
- set_dp()
- set_ele_std()
- set_elev()
- set_expt()
- set_fc()
- set_init_moist()
- set_ksat()
- set_mean_slope()
- set_phi_s()
- set_psis()
- set_quartz()
- set_rough()
- set_snow_rough()
- set_soil_density()
- set_soil_texture()
- set_wp()
- class easy_vic_build.tools.params_func.build_Param_interface.buildParam_level0_interface_Nijssen_spatially_uniform(evb_dir, logger, dpc_VIC_level0, g_params, soillayerresampler: SoilLayerResampler, TF_VIC: TF_VIC, reverse_lat=True, stand_grids_lat_level0=None, stand_grids_lon_level0=None, rows_index_level0=None, cols_index_level0=None, basin_hierarchy=None)[source]
Bases:
buildParam_level0_interfaceLevel-0 builder variant with spatially uniform Nijssen baseflow parameters.
Notes
This variant keeps selected sensitive parameters spatially uniform:
total_depths,soil_layers_breakpoints,b_infilt,d1,d2, andd3.Initialize level-0 parameter builder.
- Parameters:
evb_dir (object) – Project directory/config object with output paths.
logger (object) – Logger instance.
dpc_VIC_level0 (object) – Data-processing container that provides merged grid data.
g_params (dict) – Parameter dictionary used by transfer functions.
soillayerresampler (SoilLayerResampler) – Resampler for aggregating source soil layers to VIC layers.
TF_VIC (TF_VIC) – VIC transfer-function class.
reverse_lat (bool, optional) – Whether standard latitude order is reversed.
stand_grids_lat_level0 (array-like, optional) – Precomputed standard latitude coordinates.
stand_grids_lon_level0 (array-like, optional) – Precomputed standard longitude coordinates.
rows_index_level0 (array-like, optional) – Precomputed row indices for mapping grid shapefile to array.
cols_index_level0 (array-like, optional) – Precomputed column indices for mapping grid shapefile to array.
basin_hierarchy (dict, optional) – Nested-basin hierarchy used to assign sub-basin-specific parameters.
- __init__(evb_dir, logger, dpc_VIC_level0, g_params, soillayerresampler: SoilLayerResampler, TF_VIC: TF_VIC, reverse_lat=True, stand_grids_lat_level0=None, stand_grids_lon_level0=None, rows_index_level0=None, cols_index_level0=None, basin_hierarchy=None)
Initialize level-0 parameter builder.
- Parameters:
evb_dir (object) – Project directory/config object with output paths.
logger (object) – Logger instance.
dpc_VIC_level0 (object) – Data-processing container that provides merged grid data.
g_params (dict) – Parameter dictionary used by transfer functions.
soillayerresampler (SoilLayerResampler) – Resampler for aggregating source soil layers to VIC layers.
TF_VIC (TF_VIC) – VIC transfer-function class.
reverse_lat (bool, optional) – Whether standard latitude order is reversed.
stand_grids_lat_level0 (array-like, optional) – Precomputed standard latitude coordinates.
stand_grids_lon_level0 (array-like, optional) – Precomputed standard longitude coordinates.
rows_index_level0 (array-like, optional) – Precomputed row indices for mapping grid shapefile to array.
cols_index_level0 (array-like, optional) – Precomputed column indices for mapping grid shapefile to array.
basin_hierarchy (dict, optional) – Nested-basin hierarchy used to assign sub-basin-specific parameters.
- buildParam_level0_basic()
- buildParam_level0_by_g_tf()
- static cal_bd_grid_array(grid_shp_level0, orig_depths, depth_layer_start, depth_layer_end, stand_grids_lat, stand_grids_lon, rows_index, cols_index)
Compute weighted bulk density for an aggregated layer range.
- Parameters:
grid_shp_level0 (GeoDataFrame) – Grid shapefile data containing bulk-density attributes.
orig_depths (sequence of float) – Original soil-layer thicknesses used as aggregation weights.
depth_layer_start (int) – Start index (inclusive) of source soil layers.
depth_layer_end (int) – End index (inclusive) of source soil layers.
stand_grids_lat (list) – Standard latitude coordinates.
stand_grids_lon (list) – Standard longitude coordinates.
rows_index (array-like) – Row indices mapping grid records to array rows.
cols_index (array-like) – Column indices mapping grid records to array columns.
- Returns:
Aggregated bulk density array converted to
kg/m3.- Return type:
ndarray
- static cal_ssc_percentile_grid_array(grid_shp_level0, orig_depths, depth_layer_start, depth_layer_end, stand_grids_lat, stand_grids_lon, rows_index, cols_index)
Compute weighted sand/silt/clay fractions for an aggregated layer range.
- Parameters:
grid_shp_level0 (GeoDataFrame) – Grid shapefile data containing soil texture attributes.
orig_depths (sequence of float) – Original soil-layer thicknesses used as aggregation weights.
depth_layer_start (int) – Start index (inclusive) of source soil layers.
depth_layer_end (int) – End index (inclusive) of source soil layers.
stand_grids_lat (list) – Standard latitude coordinates.
stand_grids_lon (list) – Standard longitude coordinates.
rows_index (array-like) – Row indices mapping grid records to array rows.
cols_index (array-like) – Column indices mapping grid records to array columns.
- Returns:
(grid_array_sand, grid_array_silt, grid_array_clay)as aggregated percentage arrays.- Return type:
tuple
- create_parameter_dataset()
- set_Ds()
- set_Dsmax()
- set_Wcr_FRACT()
- set_Wpwp_FRACT()
- set_Ws()
- set_arno_baseflow_layer_num()
- set_b_retcurve()
- set_bubble()
- set_bulk_density()
- set_cexpt()
- set_coord_map()
- set_d4()
- set_dims()
- set_dp()
- set_ele_std()
- set_elev()
- set_expt()
- set_fc()
- set_init_moist()
- set_ksat()
- set_mean_slope()
- set_phi_s()
- set_psis()
- set_quartz()
- set_rough()
- set_snow_rough()
- set_soil_density()
- set_soil_texture()
- set_wp()