easy_vic_build.tools.params_func.build_Param_interface

Interfaces for building VIC parameter datasets.

Classes

buildParam_level0_interface(evb_dir, logger, ...)

Build level-0 soil and terrain parameter fields for VIC.

buildParam_level0_interface_ARNO_spatially_uniform(...)

Level-0 builder variant with spatially uniform ARNO baseflow parameters.

buildParam_level0_interface_Nijssen_spatially_uniform(...)

Level-0 builder variant with spatially uniform Nijssen baseflow parameters.

buildParam_level1_interface(evb_dir, logger, ...)

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: object

Build 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.

buildParam_level0_basic()[source]
buildParam_level0_by_g_tf()[source]
set_coord_map()[source]
create_parameter_dataset()[source]
set_dims()[source]
set_depths_vertical_aggregation()[source]
set_ele_std()[source]
set_b_infilt()[source]
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

set_soil_texture()[source]
set_ksat()[source]
set_mean_slope()[source]
set_phi_s()[source]
set_psis()[source]
set_b_retcurve()[source]
set_expt()[source]
set_fc()[source]
set_d4()[source]
set_cexpt()[source]
set_arno_baseflow_layer_num()[source]
set_d1()[source]
set_d2()[source]
set_d3()[source]
set_Dsmax()[source]
set_Ds()[source]
set_Ws()[source]
set_init_moist()[source]
set_elev()[source]
set_dp()[source]
set_bubble()[source]
set_quartz()[source]
set_bulk_density()[source]
set_soil_density()[source]
set_Wcr_FRACT()[source]
set_wp()[source]
set_Wpwp_FRACT()[source]
set_rough()[source]
set_snow_rough()[source]
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

__init__(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]
buildParam_level1_basic()[source]
buildParam_level1_by_tf()[source]
set_coord_map()[source]
create_parameter_dataset()[source]
set_dims()[source]
set_run_cell()[source]
set_grid_cell()[source]
set_off_gmt()[source]
set_avg_T()[source]
set_annual_prec()[source]
set_resid_moist()[source]
set_fs_active()[source]
set_Nveg()[source]
set_Cv()[source]
set_veg_params_json()[source]
set_root_depth()[source]
set_root_fract()[source]
set_rarc()[source]
set_rmin()[source]
set_overstory_wind_h()[source]
set_displacement()[source]
set_veg_rough()[source]
set_RGL()[source]
set_rad_atten()[source]
set_wind_atten()[source]
set_trunk_ratio()[source]
set_LAI()[source]
set_albedo()[source]
set_fcanopy()[source]
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_interface

Level-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, and Ws. Parameters d1, d2, and d3 are 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.

set_depths_vertical_aggregation()[source]
set_b_infilt()[source]
set_d1()[source]
set_d2()[source]
set_d3()[source]
set_Dsmax()[source]
set_Ds()[source]
set_Ws()[source]
__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_interface

Level-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, and d3.

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.

set_depths_vertical_aggregation()[source]
set_b_infilt()[source]
set_d1()[source]
set_d2()[source]
set_d3()[source]
__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()