コード例 #1
0
        public void CalcEo_AtmosphericPotential(MetData Met, CanopyData Canopy)
        {
            //Get Eo and assign it to the public Eo field for this object.

            //private void soilwat2_priestly_taylor()
            //   {
            double albedo;           //! albedo taking into account plant material

            double eeq;              //! equilibrium evaporation rate (mm)
            double wt_ave_temp;      //! weighted mean temperature for the day (oC)

            //*  ******* calculate potential evaporation from soil surface (eos) ******

            //                ! find equilibrium evap rate as a
            //                ! function of radiation, albedo, and temp.


            albedo = cons.max_albedo - (cons.max_albedo - salb) * (1.0 - Canopy.cover_green_sum);

            // ! wt_ave_temp is mean temp, weighted towards max.
            wt_ave_temp = (0.60 * Met.maxt) + (0.40 * Met.mint);

            eeq = Met.radn * 23.8846 * (0.000204 - 0.000183 * albedo) * (wt_ave_temp + 29.0);

            //! find potential evapotranspiration (eo) from equilibrium evap rate
            Eo = eeq * soilwat2_eeq_fac(Met);
            //    }
        }
コード例 #2
0
        public void CalcCoverForRunoff(CanopyData Canopy, SurfaceCoverData SurfaceCover)
        {
            //private void soilwat2_cover_surface_runoff()
            //    {

            //This does NOT calculate runoff. It calculates an effective cover that is used for runoff.
            //In the process event this is called before the soilwat2_runoff.

            //*+  Purpose
            //*       calculate the effective runoff cover

            //*+  Assumptions
            //*       Assumes that if canopy height is negative it is missing.

            //*+  Mission Statement
            //*     Calculate the Effective Runoff surface Cover

            double canopyfact;           //! canopy factor (0-1)
            int    crop;                 //! crop number
            double effective_crop_cover; //! effective crop cover (0-1)
            double cover_surface_crop;   //! efective total cover (0-1)

            //! cover cn response from perfect   - ML  & dms 7-7-95
            //! nb. perfect assumed crop canopy was 1/2 effect of mulch
            //! This allows the taller canopies to have less effect on runoff
            //! and the cover close to ground to have full effect (jngh)

            //! weight effectiveness of crop canopies
            //!    0 (no effect) to 1 (full effect)

            cover_surface_crop = 0.0;
            for (crop = 0; crop < Canopy.NumberOfCrops; crop++)
            {
                if (Canopy.canopy_height[crop] >= 0.0)
                {
                    bool bDidInterpolate;
                    canopyfact = MathUtilities.LinearInterpReal(Canopy.canopy_height[crop], cons.canopy_fact_height, cons.canopy_fact, out bDidInterpolate);
                }
                else
                {
                    canopyfact = cons.canopy_fact_default;
                }

                effective_crop_cover = Canopy.cover_tot[crop] * canopyfact;
                cover_surface_crop   = add_cover(cover_surface_crop, effective_crop_cover);
            }

            //! add cover known to affect runoff
            //!    ie residue with canopy shading residue
            cover_surface_runoff = add_cover(cover_surface_crop, SurfaceCover.surfaceom_cover);
        }
コード例 #3
0
ファイル: SoilWaterRunoff.cs プロジェクト: hol353/ApsimX
        public void CalcCoverForRunoff(CanopyData Canopy, SurfaceCoverData SurfaceCover)
        {
            //private void soilwat2_cover_surface_runoff()
            //    {

            //This does NOT calculate runoff. It calculates an effective cover that is used for runoff.
            //In the process event this is called before the soilwat2_runoff.

            //*+  Purpose
            //*       calculate the effective runoff cover

            //*+  Assumptions
            //*       Assumes that if canopy height is negative it is missing.

            //*+  Mission Statement
            //*     Calculate the Effective Runoff surface Cover

            double canopyfact;             //! canopy factor (0-1)
            int crop;                   //! crop number
            double effective_crop_cover;   //! effective crop cover (0-1)
            double cover_surface_crop;     //! efective total cover (0-1)

            //! cover cn response from perfect   - ML  & dms 7-7-95
            //! nb. perfect assumed crop canopy was 1/2 effect of mulch
            //! This allows the taller canopies to have less effect on runoff
            //! and the cover close to ground to have full effect (jngh)

            //! weight effectiveness of crop canopies
            //!    0 (no effect) to 1 (full effect)

            cover_surface_crop = 0.0;
            for (crop = 0; crop < Canopy.NumberOfCrops; crop++)
                {
                if (Canopy.canopy_height[crop] >= 0.0)
                    {
                    bool bDidInterpolate;
                    canopyfact = MathUtilities.LinearInterpReal(Canopy.canopy_height[crop], cons.canopy_fact_height, cons.canopy_fact, out bDidInterpolate);
                    }
                else
                    {
                    canopyfact = cons.canopy_fact_default;
                    }

                effective_crop_cover = Canopy.cover_tot[crop] * canopyfact;
                cover_surface_crop = add_cover(cover_surface_crop, effective_crop_cover);
                }

            //! add cover known to affect runoff
            //!    ie residue with canopy shading residue
            cover_surface_runoff = add_cover(cover_surface_crop, SurfaceCover.surfaceom_cover);
        }
コード例 #4
0
ファイル: SoilWater.cs プロジェクト: hut104/ApsimX
        private void OnSimulationCommencing(object sender, EventArgs e)
        {
            SaveModuleConstants();

            //daily inputs
            met = new MetData();
            irrig = new IrrigData();
            canopy = new CanopyData();
            surfaceCover = new SurfaceCoverData();

            //optional daily inputs
            runon = 0.0;
            interception = 0.0;
            residueinterception = 0.0;

            if (Soil.Thickness != null)
                {
                try
                    {
                    SoilObject = new SoilWaterSoil(constants, Soil);  //constructor can throw an Exception
                    surfaceFactory = new SurfaceFactory();
                    surface = surfaceFactory.GetSurface(SoilObject, Clock);  //constructor can throw an Exception (Evap class constructor too)

                //optional inputs (array)
                inflow_lat = null;
                }
                catch (Exception Ex)
                    {
                    throw new ApsimXException(this, Ex.Message);  //catch any constructor Exceptions and rethrow as an ApsimXException.
                    }
                }
            else
                {
                throw new ApsimXException(this, "SoilWater module has detected that the Soil has no layers.");
                }
        }
コード例 #5
0
ファイル: SoilWaterEvap.cs プロジェクト: markje153/ApsimX-1
        public void CalcEos_EoReducedDueToShading(double Eo, CanopyData Canopy, SurfaceCoverData SurfaceCover)
        {
            //private void soilwat2_pot_soil_evaporation()
            //    {
            //eos -> ! (output) potential soil evap after modification for crop cover & residue_w


            double eos_canopy_fract;      //! fraction of potential soil evaporation limited by crop canopy (mm)
            double eos_residue_fract;     //! fraction of potential soil evaporation limited by crop residue (mm)


            //! 1. get potential soil water evaporation


            //!---------------------------------------+
            //! reduce Eo to that under plant CANOPY                    <DMS June 95>
            //!---------------------------------------+

            //!  Based on Adams, Arkin & Ritchie (1976) Soil Sci. Soc. Am. J. 40:436-
            //!  Reduction in potential soil evaporation under a canopy is determined
            //!  the "% shade" (ie cover) of the crop canopy - this should include th
            //!  green & dead canopy ie. the total canopy cover (but NOT near/on-grou
            //!  residues).  From fig. 5 & eqn 2.                       <dms June 95>
            //!  Default value for c%canopy_eos_coef = 1.7
            //!              ...minimum reduction (at cover =0.0) is 1.0
            //!              ...maximum reduction (at cover =1.0) is 0.183.


            eos_canopy_fract = Math.Exp(-1 * cons.canopy_eos_coef * Canopy.cover_tot_sum);

            //   !-----------------------------------------------+
            //   ! reduce Eo under canopy to that under mulch            <DMS June 95>
            //   !-----------------------------------------------+

            //   !1a. adjust potential soil evaporation to account for
            //   !    the effects of surface residue (Adams et al, 1975)
            //   !    as used in Perfect
            //   ! BUT taking into account that residue can be a mix of
            //   ! residues from various crop types <dms june 95>

            if (SurfaceCover.surfaceom_cover >= 1.0)
            {
                //! We test for 100% to avoid log function failure.
                //! The algorithm applied here approaches 0 as cover approaches
                //! 100% and so we use zero in this case.
                eos_residue_fract = 0.0;
            }
            else
            {
                //! Calculate coefficient of residue_wt effect on reducing first
                //! stage soil evaporation rate

                //!  estimate 1st stage soil evap reduction power of
                //!    mixed residues from the area of mixed residues.
                //!    [DM. Silburn unpublished data, June 95 ]
                //!    <temporary value - will reproduce Adams et al 75 effect>
                //!     c%A_to_evap_fact = 0.00022 / 0.0005 = 0.44
                eos_residue_fract = Math.Pow((1.0 - SurfaceCover.surfaceom_cover), cons.A_to_evap_fact);
            }

            //! Reduce potential soil evap under canopy to that under residue (mulch)
            Eos = Eo * eos_canopy_fract * eos_residue_fract;
        }
コード例 #6
0
ファイル: SoilWaterEvap.cs プロジェクト: hol353/ApsimX
        public void CalcEo_AtmosphericPotential(MetData Met, CanopyData Canopy)
        {
            //Get Eo and assign it to the public Eo field for this object.

            //private void soilwat2_priestly_taylor()
            //   {
            double albedo;           //! albedo taking into account plant material

            double eeq;              //! equilibrium evaporation rate (mm)
            double wt_ave_temp;      //! weighted mean temperature for the day (oC)

            //*  ******* calculate potential evaporation from soil surface (eos) ******

            //                ! find equilibrium evap rate as a
            //                ! function of radiation, albedo, and temp.

            albedo = cons.max_albedo - (cons.max_albedo - salb) * (1.0 - Canopy.cover_green_sum);

            // ! wt_ave_temp is mean temp, weighted towards max.
            wt_ave_temp = (0.60 * Met.maxt) + (0.40 * Met.mint);

            eeq = Met.radn * 23.8846 * (0.000204 - 0.000183 * albedo) * (wt_ave_temp + 29.0);

            //! find potential evapotranspiration (eo) from equilibrium evap rate
            Eo = eeq * soilwat2_eeq_fac(Met);
            //    }
        }
コード例 #7
0
ファイル: SoilWaterEvap.cs プロジェクト: hol353/ApsimX
        public void CalcEos_EoReducedDueToShading(CanopyData Canopy, SurfaceCoverData SurfaceCover)
        {
            //private void soilwat2_pot_soil_evaporation()
            //    {
            //eos -> ! (output) potential soil evap after modification for crop cover & residue_w

            double eos_canopy_fract;      //! fraction of potential soil evaporation limited by crop canopy (mm)
            double eos_residue_fract;     //! fraction of potential soil evaporation limited by crop residue (mm)

            //! 1. get potential soil water evaporation

            //!---------------------------------------+
            //! reduce Eo to that under plant CANOPY                    <DMS June 95>
            //!---------------------------------------+

            //!  Based on Adams, Arkin & Ritchie (1976) Soil Sci. Soc. Am. J. 40:436-
            //!  Reduction in potential soil evaporation under a canopy is determined
            //!  the "% shade" (ie cover) of the crop canopy - this should include th
            //!  green & dead canopy ie. the total canopy cover (but NOT near/on-grou
            //!  residues).  From fig. 5 & eqn 2.                       <dms June 95>
            //!  Default value for c%canopy_eos_coef = 1.7
            //!              ...minimum reduction (at cover =0.0) is 1.0
            //!              ...maximum reduction (at cover =1.0) is 0.183.

            eos_canopy_fract = Math.Exp(-1 * cons.canopy_eos_coef * Canopy.cover_tot_sum);

            //   !-----------------------------------------------+
            //   ! reduce Eo under canopy to that under mulch            <DMS June 95>
            //   !-----------------------------------------------+

            //   !1a. adjust potential soil evaporation to account for
            //   !    the effects of surface residue (Adams et al, 1975)
            //   !    as used in Perfect
            //   ! BUT taking into account that residue can be a mix of
            //   ! residues from various crop types <dms june 95>

            if (SurfaceCover.surfaceom_cover >= 1.0)
                {
                //! We test for 100% to avoid log function failure.
                //! The algorithm applied here approaches 0 as cover approaches
                //! 100% and so we use zero in this case.
                eos_residue_fract = 0.0;
                }
            else
                {
                //! Calculate coefficient of residue_wt effect on reducing first
                //! stage soil evaporation rate

                //!  estimate 1st stage soil evap reduction power of
                //!    mixed residues from the area of mixed residues.
                //!    [DM. Silburn unpublished data, June 95 ]
                //!    <temporary value - will reproduce Adams et al 75 effect>
                //!     c%A_to_evap_fact = 0.00022 / 0.0005 = 0.44
                eos_residue_fract = Math.Pow((1.0 - SurfaceCover.surfaceom_cover), cons.A_to_evap_fact);
                }

            //! Reduce potential soil evap under canopy to that under residue (mulch)
            Eos = Eo * eos_canopy_fract * eos_residue_fract;
        }