importers.cathy_inputs.read_soil

Contents

importers.cathy_inputs.read_soil#

importers.cathy_inputs.read_soil(soilfile, dem_parm, MAXVEG, scf_per_veg=False)[source]#

Read soil file

This is an example of 3 layers and 2 zones; The inner reading cycle is by zone, and the outer one by layers, i.e.:

PERMX_z1_str1 PERMY_z1_str1 PERMZ_z1_str1 ELSTOR_z1_str1 POROS_z1_str1 VGNCELL_z1_str1 VGRMCCELL__z1_str1 VGPSATCELL__z1_str1 PERMX_z2_str1 PERMY_z2_str1 PERMZ_z2_str1 ELSTOR_z2_str1 POROS_z2_str1 VGNCELL_z2_str1 VGRMCCELL__z2_str1 VGPSATCELL__z2_str1 PERMX_z1_str2 PERMY_z1_str2 PERMZ_z1_str2 ELSTOR_z1_str2 POROS_z1_str2 VGNCELL_z1_str2 VGRMCCELL__z1_str2 VGPSATCELL__z1_str2 PERMX_z2_str2 PERMY_z2_str2 PERMZ_z2_str2 ELSTOR_z2_str2 POROS_z2_str2 VGNCELL_z2_str2 VGRMCCELL__z2_str2 VGPSATCELL__z2_str2 PERMX_z1_str3 PERMY_z1_str3 PERMZ_z1_str3 ELSTOR_z1_str3 POROS_z1_str3 VGNCELL_z1_str3 VGRMCCELL__z1_str3 VGPSATCELL__z1_str3 PERMX_z2_str3 PERMY_z2_str3 PERMZ_z2_str3 ELSTOR_z2_str3 POROS_z2_str3 VGNCELL_z2_str3 VGRMCCELL__z2_str3 VGPSATCELL__z2_str3

Zone indexing starts from 1 while layers indexing starts from 0! :param soilfile: filename (including abs path). :type soilfile: str :param dem_parm: dict of dem parameters (from read_dem_parameters) :type dem_parm: dict :param MAXVEG: number of vegetation types. :type MAXVEG: int :param scf_per_veg: SCF-VEG: must match the “scf_per_veg” flag the file was written

with (see cathy_tools.py’s version_config.py / CATHY_SOIL_FORMAT, keyed by version – “SCF_variable” uses True, everything else False). When True, expects an extra per-vegetation-type SCF block of MAXVEG lines right after the 6-column Feddes table and before IVGHU, and returns it as an ‘SCF’ column in df_FP. When False (default), the file format – and this function’s behavior – is exactly what it was before SCF-VEG existed.

Returns:

  • dataframe – df containing soil properties

  • dict – Header of the dem file