subroutine caqdry(kutill,kuutil,qdry) c c +++PURPOSE+++ c This function calculates the heat flow based on equation 3.1.4 c from the WEPP manual, August 1989. The actual calculation used c here is a reduction of K uf * [T uf / Z uf]. When calculating c K uf the term Zsrf is ultimately found in the numerator and c denominator of the calculation and is therefore cancelled out c when doing the actual calculation here. c c Author(s): John Witte, UofMn WCES @ USDA-ARS-NCSRL c Date: 04/06/93 c Verified and tested by Reza Savabi, USDA-ARS, NSERL 317-494-5051 c August 1994 c c +++ARGUMENT DECLARATIONS+++ real kutill,kuutil,qdry c c +++ARGUMENT DEFINITIONS+++ c kutill - Thermal conductivity of unfrozen tilled layer (W/min C). c kuutil - Thermal conductivity of unfrozen untilled soil (W/min C). c qdry - Heat flow from stable soil temperature to the bottom c of the frost layer (W/m^2). c c +++PARAMETERS+++ include 'pmxtil.inc' include 'pmxtls.inc' include 'pmxpln.inc' include 'pmxhil.inc' include 'pmxnsl.inc' c c +++COMMON BLOCKS+++ c include 'cwint.inc' c read: frdp(mxplan) c include 'cstruc.inc' c read: iplane c c +++LOCAL VARIABLES+++ c c XXX Use of the global SAVE does not follow the WEPP coding conventions c This needs to be fixed so that only the local variables which c need to have their values retained are saved. dcf 5/18/94 save real numer,denom,ufutil,uftill,stbltp,tctill,tcutil c c +++LOCAL DEFINITIONS+++ c numer - Temporary variable for numerator part of 3.1.4. c denom - Temporary variable for denominator part of 3.1.4. c ufutil - Depth of unfrozen untilled layer (m). c uftill - Depth of unfrozen tilled layer (m). c stbltp - Temp of stable soil 1 m below 0-degree isotherm (deg C). c tctill - Thermal cond. of the unfrozen, tilled soil layer (W/m C). c tcutil - Thermal cond. of the unfrozen, untilled soil layer (W/m C). c c +++DATA INITIALIZATIONS+++ c data stbltp/7.0/ c c +++END SPECIFICATIONS+++ stbltp = 7.0 tctill = 1.0 tcutil = 1.0 numer = 0.0 denom = 0.0 qdry = 0.0 if ((frdp(iplane) .gt. tilld(iplane)) .or. 1 (tilld(iplane) .lt. 0.0001)) then tcutil = kuutil uftill = 0.0 ufutil = 1.0 else tctill = kutill tcutil = kuutil uftill = tilld(iplane) - frdp(iplane) ufutil = (frdp(iplane) + 1.0) - tilld(iplane) endif numer = tctill * tcutil * stbltp denom = (tctill * ufutil) + (uftill * tcutil) if (denom .gt. 0.0) then qdry = numer / denom else qdry = 0.0 endif return end