Coverage for C:\src\imod-python\imod\msw\scaling_factors.py: 100%

15 statements  

« prev     ^ index     » next       coverage.py v7.5.1, created at 2024-05-08 14:15 +0200

1from imod.msw.fixed_format import VariableMetaData 

2from imod.msw.pkgbase import MetaSwapPackage 

3 

4 

5class ScalingFactors(MetaSwapPackage): 

6 """ 

7 This package allows you to do three things: 

8 1. Set scaling factors for some inputs in the soil physical database, 

9 namely the soil moisture content and the saturated hydraulic 

10 conductivity. 

11 2. Set a scaling factor for pressure head related parameters in the 

12 landuse class lookup table (LUSE_SVAT.INP). 

13 3. Set the depth of the perched watertable base. 

14 

15 This class is useful for sensitivity and uncertainty analyses, as well as 

16 model calibration. Scaling factors are multiplied with their corresponding 

17 parameters in the soil physical database. 

18 

19 Parameters 

20 ---------- 

21 scale_soil_moisture: array of floats (xr.DataArray) 

22 Scaling factor which adjusts the saturated soil moisture content, the 

23 residual soil moisture content, and the soil moisture content of 

24 macropores. This array must have a subunit coordinate to describe 

25 different landuses. 

26 scale_hydraulic_conductivity: array of floats (xr.DataArray) 

27 Scaling factor which adjusts the (vertical) saturated hydraulic 

28 conductivity of the soil. This array must have a subunit coordinate to describe 

29 different landuses. 

30 scale_pressure_head: array of floats (xr.DataArray) 

31 Scaling factor which adjusts the pressure head applied to the pressure 

32 parameters defined in LUSE_SVAT.INP. This array must have a subunit coordinate to describe 

33 different landuses. 

34 depth_perched_water_table: array of floats (xr.DataArray) 

35 Sets the depth of the perched watertable base. If the groundwater depth 

36 exeeds this depth, the capillary rise is set to zero. This option has 

37 been included in the model on the request of a specific project (MIPWA), 

38 and is only sound for depths exceeding 2 meters. For more shallow 

39 presences of loam causing a perched watertable, it is advised to 

40 generate a new soil physical unit. This array must not have a subunit 

41 coordinate. 

42 """ 

43 

44 _file_name = "uscl_svat.inp" 

45 _metadata_dict = { 

46 "svat": VariableMetaData(10, 1, 99999999, int), 

47 "scale_soil_moisture": VariableMetaData(8, 0.1, 10.0, float), 

48 "scale_hydraulic_conductivity": VariableMetaData(8, 0.1, 10.0, float), 

49 "scale_pressure_head": VariableMetaData(8, 0.1, 10.0, float), 

50 "depth_perched_water_table": VariableMetaData(8, 0.1, 10.0, float), 

51 } 

52 

53 _with_subunit = ( 

54 "scale_soil_moisture", 

55 "scale_hydraulic_conductivity", 

56 "scale_pressure_head", 

57 ) 

58 _without_subunit = ("depth_perched_water_table",) 

59 _to_fill = () 

60 

61 def __init__( 

62 self, 

63 scale_soil_moisture, 

64 scale_hydraulic_conductivity, 

65 scale_pressure_head, 

66 depth_perched_water_table, 

67 ): 

68 super().__init__() 

69 self.dataset["scale_soil_moisture"] = scale_soil_moisture 

70 self.dataset["scale_hydraulic_conductivity"] = scale_hydraulic_conductivity 

71 self.dataset["scale_pressure_head"] = scale_pressure_head 

72 self.dataset["depth_perched_water_table"] = depth_perched_water_table 

73 

74 self._pkgcheck()