コード例 #1
0
    def setparameters(
            self,
            tr_soil_GW=12.36870481,
            tr_soil_fulda=12.,
            tr_surf=3.560855356,
            tr_GW_l=829.7188064,
            tr_GW_u_fulda=270.05035,
            tr_GW_u_GW_l=270.,
            tr_fulda=2.264612944,
            V0_soil=280.0850875,
            beta_soil_GW=1.158865311,
            beta_fulda=1.1,
            ETV1=2.575261852,
            fETV0=0.014808919,
            meltrate=4.464735097,
            snow_melt_temp=4.51938545,
            Qd_max=0.250552812,
            TW_threshold=10.,
            LAI=2.992013336,
            CanopyClosure=5.,
            Ksat=0.02):  # this list has to be identical with the one above
        """
        sets the parameters, all parameterized connections will be created anew    
        """
        # Get all definitions from init method
        p = self.project
        c = p[0]
        outlet = self.outlet
        fulda = self.fulda
        trinkwasser = self.trinkwasser

        # Adjustment of the evapotranspiration
        c.set_uptakestress(cmf.VolumeStress(ETV1, ETV1 * fETV0))

        # Flux from the surfaces to the river
        cmf.kinematic_wave(c.surfacewater, fulda, tr_surf)
        # flux from surfaces to the soil (infiltration)
        cmf.SimpleInfiltration(c.layers[0], c.surfacewater)

        # change the saturated conductivity of the soil
        c.layers[0].soil.Ksat = Ksat

        # Flux from soil to river (interflow)
        cmf.kinematic_wave(c.layers[0],
                           fulda,
                           tr_soil_fulda / V0_soil,
                           V0=V0_soil)
        # flux from the soil to the upper groundwater (percolation)
        cmf.kinematic_wave(c.layers[0],
                           c.layers[1],
                           tr_soil_GW,
                           exponent=beta_soil_GW)

        # flux from the upper groundwater to the river (baseflow)
        cmf.kinematic_wave(c.layers[1], fulda, tr_GW_u_fulda)
        # flux from upper to lower groundwater (percolation)
        cmf.kinematic_wave(c.layers[1], c.layers[2],
                           tr_GW_u_GW_l)  #, exponent=beta_GW_u_GW_l)

        # flux from the lower groundwater to river (baseflow)
        cmf.kinematic_wave(c.layers[2], fulda, tr_GW_l)
        # Flux from the lower groundwater to the drinking water outlet
        # the fourths argument is the amount that is now allowed to be slurped
        # out of the lower groundwater
        cmf.TechnicalFlux(c.layers[2], trinkwasser, Qd_max, TW_threshold,
                          cmf.day)

        # Flux from drinking water to the river
        cmf.waterbalance_connection(trinkwasser, fulda)

        # flux from the river to the outlet
        cmf.kinematic_wave(fulda, outlet, tr_fulda, exponent=beta_fulda)

        # set snowmelt temperature
        cmf.Weather.set_snow_threshold(snow_melt_temp)
        # Snowmelt at the surfaces
        snowmelt_surf = cmf.SimpleTindexSnowMelt(c.snow,
                                                 c.surfacewater,
                                                 c,
                                                 rate=meltrate)

        # Splits the rainfall in interzeption and throughfall
        cmf.Rainfall(c.canopy, c, False, True)
        cmf.Rainfall(c.surfacewater, c, True, False)
        # Makes a overflow for the interception storage
        cmf.RutterInterception(c.canopy, c.surfacewater, c)
        # Transpiration on the plants is added
        cmf.CanopyStorageEvaporation(c.canopy, c.evaporation, c)
        # Sets the parameters for the interception
        c.vegetation.LAI = LAI
        # Defines how much throughfall there is (in %)
        c.vegetation.CanopyClosure = CanopyClosure
コード例 #2
0
    def setparameters(self,
                      tr_soil_GW = 12.36870481, 
                      tr_soil_fulda = 12.,
                   #   tr_surf = 3.560855356,
                      tr_GW_l = 829.7188064, 
                      tr_GW_u_fulda = 270.05035, 
                      tr_GW_u_GW_l = 270., 
                      tr_fulda = 2.264612944,                     

                      V0_soil = 280.0850875,  
                      
                      beta_soil_GW=1.158865311, 
                      beta_fulda = 1.1,
                      
                      ETV1=2.575261852,
                      fETV0=0.014808919,
                      
                  #    meltrate = 4.464735097,
                #      snow_melt_temp = 4.51938545,
                      
                      Qd_max = 0.250552812,
                      TW_threshold = 10.,
                      
                 #     LAI = 2.992013336,
                #      CanopyClosure = 5.,
                      
                #      Ksat = 0.02
                      ):  # this list has to be identical with the one above
        """
        sets the parameters, all parameterized connections will be created anew    
        """
        # Get all definitions from init method
        p = self.project
        c = p[0]
        outlet = self.outlet
        fulda = self.fulda
        trinkwasser = self.trinkwasser

        # Adjustment of the evapotranspiration
        c.set_uptakestress(cmf.VolumeStress(ETV1,ETV1 * fETV0))
        
        # Flux from the surfaces to the river
   #     cmf.kinematic_wave(c.surfacewater,fulda,tr_surf)
        # flux from surfaces to the soil (infiltration)
     #   cmf.SimpleInfiltration(c.layers[0], c.surfacewater) 

        # change the saturated conductivity of the soil
    #    c.layers[0].soil.Ksat = Ksat
         
        # Flux from soil to river (interflow)
        cmf.kinematic_wave(c.layers[0],fulda,tr_soil_fulda/V0_soil, V0 = V0_soil)        
        # flux from the soil to the upper groundwater (percolation)
        cmf.kinematic_wave(c.layers[0], c.layers[1],tr_soil_GW, exponent=beta_soil_GW) 

        # flux from the upper groundwater to the river (baseflow)
        cmf.kinematic_wave(c.layers[1], fulda, tr_GW_u_fulda)               
        # flux from upper to lower groundwater (percolation)
        cmf.kinematic_wave(c.layers[1], c.layers[2],tr_GW_u_GW_l)#, exponent=beta_GW_u_GW_l) 
        
        # flux from the lower groundwater to river (baseflow)
        cmf.kinematic_wave(c.layers[2], fulda, tr_GW_l)        
        # Flux from the lower groundwater to the drinking water outlet
        # the fourths argument is the amount that is now allowed to be slurped 
        # out of the lower groundwater
        cmf.TechnicalFlux(c.layers[2],trinkwasser,Qd_max,TW_threshold,cmf.day)
        
        # Flux from drinking water to the river
        cmf.waterbalance_connection(trinkwasser, fulda)     
        
        # flux from the river to the outlet
        cmf.kinematic_wave(fulda, outlet, tr_fulda, exponent = beta_fulda)