ETHZ_Logo RAMSES_Logo_Right   RAMSES   RAMSES_Logo_Left Systems Ecology  
Start    search button      Modules:   A-Z   Function   Layer        QuickRefs:   DM   AuxLib   AuxLibE   SciLib   EasyMW   MW   ISIS   RMSLib

DEFINITION MODULE SoilWatBal;

  (*******************************************************************

    Module  SoilWatBal     (Version 1.0)

      Copyright (c) 1995-2006 by Dimitrios Gyalistras and ETH Zurich.

    Purpose   Compute monthly and annual soil water balance
              based on monthly temperature and precipitation
              inputs.

    Remarks   All calculations are based on a simple bucket-type
              model for soil water content.

              This module was based on the submodels ForClim-E
              of the forest patch models ForClim_V2.4.0.2 and
              ForClim_V2.6.

              Procedures ending with a "T" test the input
              data for plausibility and correctness,
              recognize missing input data as
              DMConversions.UndefREAL's, and return
              UndefREAL's if not succesful, but otherwise
              perform exactly the same calculations as
              their faster counterparts without a "T".

              References:
                Thornthwaite, C. W. & Mather, J. R., 1957.
                Instructions and tables for computing potential
                evapotranspiration and the water balance.
                Publ. Climatol., 10: 183-311.

                Fischlin, A., Bugmann, H. & Gyalistras, D., 1995.
                Sensitivity of a forest ecosystem model to climate
                parametrization schemes.  Env. Poll., 87: 267-282.

                Bugmann, H. & Cramer, W., 1998.
                Improving the behaviour of forest gap models
                along drought  gradients.
                ForestÊEcol.Ê&ÊManage. 103(2-3): 247-263.


    Programming

      o Design
        Dimitrios Gyalistras      07/12/1995

      o Implementation
        Dimitrios Gyalistras      08/12/1995


    ETH Zurich
    Systems Ecology
    CHN E 35.1
    Universitaetstrasse 16
    8092 Zurich
    SWITZERLAND

    URLs:
        <mailto:RAMSES@env.ethz.ch>
        <http://www.sysecol.ethz.ch>
        <http://www.sysecol.ethz.ch/SimSoftware/RAMSES>


    Last revision of definition:  21/09/1997  DG

  *******************************************************************)


  PROCEDURE GetSitePars(
              (*PET1,2*) VAR latitude   : REAL;  (* geographical latitude  [deg]  *)
              (*PET1,2*) VAR saModifier : REAL;  (* slope/aspect modifier  [--]   *)
              (*SWB 1 *) VAR fieldCap   : REAL;  (* field capacity         [mm]   *)
              (*SWB 2 *) VAR bucketSize : REAL); (* bucket size            [mm]   *)

  PROCEDURE SetSitePars( latitude   : REAL;
                         saModifier : REAL;
                         fieldCap   : REAL;
                         bucketSize : REAL;
                         VAR errTxt : ARRAY OF CHAR ): BOOLEAN;
  (*
    Get/Set site-specific parameters.
  *)


  (*----------------------------------------------------------------------------*)


  TYPE
    ValueType = ( cur, deflt, min, max );


  PROCEDURE GetSWBPars( valueType : ValueType;
            (*PET1,2*)  VAR k1    : REAL;   (* heat index multiplier         [1/degC]  *)
            (*PET1,2*)  VAR k2    : REAL;   (* heat index exponent                [-]  *)
            (*PET1,2*)  VAR k3    : REAL;   (* PET exponent coefficient           [-]  *)
            (*PET1,2*)  VAR k4    : REAL;   (*           -"-                      [-]  *)
            (*PET1,2*)  VAR k5    : REAL;   (*           -"-                      [-]  *)
            (*PET1,2*)  VAR k6    : REAL;   (*           -"-                      [-]  *)
            (*PET1,2*)  VAR kPM   : REAL;   (* PET multiplier                     [-]  *)
            (*SWB 1 *)  VAR k7    : REAL;   (* used for calc. of water deficit    [-]  *)
            (*SWB 1 *)  VAR k8    : REAL;   (*           -"-                      [-]  *)
            (*SWB 2 *)  VAR kIcpt : REAL;   (* precip. fract. intercepted         [-]  *)
            (*SWB 2 *)  VAR kCw   : REAL ); (* maximum transpiration rate  [mm/month]  *)

  PROCEDURE SetSWBPars( k1, k2, k3, k4, k5, k6, kPM : REAL;
                        k7, k8, kIcpt, kCw          : REAL;
                        VAR errTxt                  : ARRAY OF CHAR ): BOOLEAN;

  (*
    Get/set the parameters for the calculation of the soil water balance.
  *)


  (*----------------------------------------------------------------------------*)


  PROCEDURE CalcHeatIndex ( VAR monTemper : ARRAY OF REAL;  (* VAR for speed-up only *)
                            VAR heatIndex : REAL );

  PROCEDURE CalcHeatIndexT( VAR monTemper : ARRAY OF REAL;  (* VAR for speed-up only *)
                            VAR heatIndex : REAL;
                            VAR errTxt    : ARRAY OF CHAR ): BOOLEAN;
  (*
    Computes heat index for calculation of potential evapotranspiration (PET).
  *)


  (*----------------------------------------------------------------------------*)


  PROCEDURE CalcPET1( VAR monTemper : ARRAY OF REAL;   (* monthly mean temperature     [degC], VAR for speed-up only *)
                      heatIndex     : REAL;            (* heat index *)
                      VAR monPET    : ARRAY OF REAL);  (* potential evapotranspiration [mm/month]  *)

  PROCEDURE CalcPET1T( VAR monTemper : ARRAY OF REAL;  (* VAR for speed-up only *)
                       heatIndex     : REAL;           (* heat index *)
                       VAR monPET    : ARRAY OF REAL;
                       VAR errTxt    : ARRAY OF CHAR ): BOOLEAN;
  (*

    Computes monthly PET for all months of the year according to ForClim_V2.4.0.2.

    NOTE: This procedure is offered for compatibility with ForClim_V2.4.*.
    It is however partially buggy, conceptually questionable, and numerically
    sub-optimal, such that it should not be used normally.
    See allso comments on CalcPET2 below.
  *)


  PROCEDURE CalcMonthlySWB1 (
              monthNr    : INTEGER;
              initialSM  : REAL;    (* soil moisture at begin of month      [mm]       *)
              initialSWD : REAL;    (* soil water deficit at begin of month [mm]       *)
              monPET     : REAL;    (* monthly PET                          [mm/month] *)
              monPrecip  : REAL;    (* monthly total precipitation          [mm]       *)
              VAR monAET : REAL;    (* monthly actual evapotranspiration    [mm/month] *)
              VAR newSM  : REAL;    (* soil moisture at end of month        [mm]       *)
              VAR newSWD : REAL);   (* soil water deficit at end of month   [mm]       *)

  PROCEDURE CalcMonthlySWB1T(
              monthNr    : INTEGER;
              initialSM  : REAL;
              initialSWD : REAL;
              monPET     : REAL;
              monPrecip  : REAL;
              VAR monAET : REAL;
              VAR newSM  : REAL;
              VAR newSWD : REAL;
              VAR errTxt : ARRAY OF CHAR ): BOOLEAN;
  (*
    Computes monthly soil water balance according to ForClim_V2.4.0.2.
  *)


  PROCEDURE CalcAnnualSWB1 (
              initialSM     : REAL;  (* soil moisture at begin of the year    [mm]       *)
              VAR monPET    : ARRAY OF REAL; (* monthly PET,    VAR for speed-up only    *)
              VAR monPrecip : ARRAY OF REAL; (* monthly precip, VAR for speed-up only    *)
              VAR annPET    : REAL;  (* annual mean PET                       [mm/month] *)
              VAR annAET    : REAL;  (* annual mean AET                       [mm/month] *)
              VAR newSM     : REAL); (* soil moisture at end of year          [mm]       *)

  PROCEDURE CalcAnnualSWB1T(
              initialSM     : REAL;
              VAR monPET    : ARRAY OF REAL;
              VAR monPrecip : ARRAY OF REAL;
              VAR annPET    : REAL;
              VAR annAET    : REAL;
              VAR newSM     : REAL;
              VAR errTxt    : ARRAY OF CHAR): BOOLEAN;
  (*
    Computes annual soil water balance according to ForClim_V2.4.0.2.
  *)


  (*----------------------------------------------------------------------------*)


  PROCEDURE CalcPET2 ( monthNr    : INTEGER;
                       heatIndex  : REAL;
                       monTemper  : REAL;   (* monthly mean temperature     [degC]     *)
                       VAR monPET : REAL);  (* potential evapotranspiration [mm/month] *)

  PROCEDURE CalcPET2T( monthNr    : INTEGER;
                       heatIndex  : REAL;
                       monTemper  : REAL;
                       VAR monPET : REAL;
                       VAR errTxt : ARRAY OF CHAR ): BOOLEAN;
  (*
    Computes monthly PET according to ForClim_V2.6.

    The procedure differs from  CalcPET1 in two respects:

    (1) "latitude" is restricted to MIN(latitude,50.0). This was
         a bug in CalcPET1, fixed by hb in ForClimE at 17/2/1995.

    (2) The "heatIndex" presents in this procedure a site-specific
        climatic parameter, i.e. it does not vary from year to year.
        In CalcPET1 the heatIndex is determined anew for each individual
        year, which is actually inconsistent with Thornthwait's original
        parameterization.

    (3) The auxiliary variable "heatIndex^3" is computed directly, not
        using procedure "Power".
  *)


  PROCEDURE CalcMonthlySWB2 (
              initialSM         : REAL;  (* soil moisture at begin of month   [mm]       *)
              monPET            : REAL;  (* monthly PET                       [mm/month] *)
              monPrecip         : REAL;  (* monthly total precipitation       [mm]       *)
              VAR monAET        : REAL;  (* monthly actual evapotranspiration [mm/month] *)
              VAR monEvapOffVeg : REAL;  (* monthly evap. off vegetation      [mm/month] *)
              VAR monETFromSoil : REAL;  (* monthly evapotransp. off the soil [mm/month] *)
              VAR monRunoff     : REAL;  (* monthly runoff                    [mm/month] *)
              VAR newSM         : REAL); (* soil moisture at end of month     [mm]       *)

  PROCEDURE CalcMonthlySWB2T(
              initialSM         : REAL;
              monPET            : REAL;
              monPrecip         : REAL;
              VAR monAET        : REAL;
              VAR monEvapOffVeg : REAL;
              VAR monETFromSoil : REAL;
              VAR monRunoff     : REAL;
              VAR newSM         : REAL;
              VAR errTxt        : ARRAY OF CHAR ): BOOLEAN;
  (*
    Computes monthly soil water balance according to ForClim_V2.6.
  *)


  PROCEDURE CalcAnnualSWB2 (
              initialSM         : REAL;  (* soil moisture at begin of the year    [mm]       *)
              VAR monPET        : ARRAY OF REAL; (* monthly PET,    VAR for speed-up only    *)
              VAR monPrecip     : ARRAY OF REAL; (* monthly precip, VAR for speed-up only    *)
              VAR annPET        : REAL;  (* annual mean PET                       [mm/month] *)
              VAR annAET        : REAL;  (* annual mean AET                       [mm/month] *)
              VAR annEvapOffVeg : REAL;  (* annual mean evap. off vegetation      [mm/month] *)
              VAR annETFromSoil : REAL;  (* annual mean evapotransp. off the soil [mm/month] *)
              VAR annRunoff     : REAL;  (* annual mean runoff                    [mm/month] *)
              VAR newSM         : REAL); (* soil moisture at end of year          [mm]       *)

  PROCEDURE CalcAnnualSWB2T(
              initialSM         : REAL;
              VAR monPET        : ARRAY OF REAL;
              VAR monPrecip     : ARRAY OF REAL;
              VAR annPET        : REAL;
              VAR annAET        : REAL;
              VAR annEvapOffVeg : REAL;
              VAR annETFromSoil : REAL;
              VAR annRunoff     : REAL;
              VAR newSM         : REAL;
              VAR errTxt        : ARRAY OF CHAR): BOOLEAN;
  (*
    Computes annual soil water balance according to ForClim_V2.6.
  *)


END SoilWatBal.

  Contact RAMSES@env.ethz.ch Last updated: 25-Jul-2011 [Top of page]