Appendix A:

Draft variable definitions and I/O specifications for POULIT

Version bnmf2v.for

By H.D. Scott and D.L. Baker ©2000
 You are visitor number

 to this page since 9/19/2000

Topics

Introduction  (up)

   This is a draft I/O specification for the version bnmf2v.for of POULIT. Since this code was intended only for calibrating the flow portion of the model to laboratory and field measurements, the thermal and transport code has been stripped out. Most of the variables and subroutines actually used in this version are defined here. But it was not convenient to remove variables from the common block statements relating to the deleted routines. So not all of the variables defined below are used in this version, and not all of the variables shown below are defined. This is meant only to help those interested in understanding the Fortran code to keep track of the many variables. It may be difficult to follow unless one prints out a copy of the Fortran code, bnmf2v.for, and the numerical development, and tracks the use of the variables.

 

Common Types  (up)

The common block statements are divided into three types: profile, series and flags, and four subtypes: real arrays, real scalars, integer arrays and integer scalars.

Soil Profile Info

Time Series Info

Logical Flags

Real Arrays / pr1 /

Real Arrays / ts1 /

/ lo1 /

Real Scalars / pr2 /

Real Scalars / ts2 /

Integer Arrays / pr3 /

Integer Arrays / ts3 /

Integer Scalars / pr4 /

Integer Scalars / ts4 /

The variables used for soil profile information are in the commons labeled /pr*/, where * is a number. The index of the arrays runs from 0 to izm, with 0 generally referring to the soil surface, and the index referring to positive depth below the surface. Most array variables are functions of time and depth, where depth is z(i) = i*dz -dz/2, z(0) = 0, and dz is the finite difference space step (cm). "Grid cell centers" refers to the position z(i), while "grid cell boundaries" refers to the position z(i) + dz/2. Unless otherwise stated, the index, i, refers to grid cell centers.

The variables used for time series information, usually weather processes, are in the common statements labeled /ts*/. The index of the arrays runs from 0 to iwm, with 1 generally referring to the first day of simulation time, and the index referring to days from start of either simulation or the last application of the litter. The remaining common statement labeled /lo1/ contains logical flags to help with model processing decisions.

Of the subtypes, the common statements labeled /**1/ are double precision real arrays, /**2/ are double precision real scalar variables, /**3/ are integer arrays, and /**4/ are integer scalar variables. Thus, the common statement labeled /pr2/ contains real scalar variables. All real scalars and arrays are double precision whether in common blocks or not.

There is only one subtype for logical flags, since there are so few of them in use.

Note - Many of the dimensions which show as (cm/x) are really (cm3/(x-cm2)), a volumetric measurement per square area of land surface.

Note: some variables may be in the wrong common statement. Not all are defined yet.

 

Common array and variable definitions  (up)

common /pr1/

aa(i), bb(i), cc(i) - dummy coefficient arrays for left-hand-side of tridiagonal solution method for diffusive finite difference equations: aai pi-1 + bbi pi + cci pi+1 = ri

at(i) - air entry suction head in saturation relation (cm).

bc(i) - exponent that converts effective saturation to relative conductivity (dimensionless).

c(i) - ammonium concentration in soil solution (ug/ml).

ch(i) - water capacity function, ¶q/¶h, (1/cm) at grid cell centers, z(i).

ck(i) - partially saturated soil hydraulic conductivities (cm/h) at grid cell centers.

cv(i) - interblock hydraulic conductivity means (cm/h) at grid cell boundaries, z(i) + dz/2.

ht(i) - total hydraulic head (cm), p(i)-z(i), at cell centers.

ofp(i) - objective function for soil water pressure and water content used to calibrate to field measurements.

oft(i) - objective function for soil temperature used to calibrate to field measurements.

p(i) - soil water pressure head (cm) at cell centers (positive below the water table, always).

pm(i) - field piezometer measurement of soil water pressure head (cm)

qme(i) - Imax (ug/(h-cm)) maximum rate of plant nitrogen uptake per unit root length in the Michaelis-Menten model.

r(i) - dummy array for right-hand-side of tri-diagonal solution for diffusive finite difference methods.

rdist(i) - distribution of root length (cm/cm3) .

rdn(i) - denitrification coefficient, k2 (1/h)

rex(i) - ammonium distribution coefficient, Kd (cm3/h).

rkd(i) - composite Freundlich adsorption coefficient, r·Kd (g/cm3)·(cm3/g), for NH4.

rnt(i) - nitrification ratio, k1 (1/h).

rob(i) - soil bulk density, r (g/cm3).

rx(i) - root extraction rate of water (1/h), (cm3/(cm3-h)).

sc(i) - saturated hydraulic conductivity, Ks (cm/h).

t(i) - soil temperature (°C).

tdif(i) - soil heat diffusion coefficient (cm2/h).

th(i) - volumetric water content (cm3/cm3).

thj(i) - th(i) (cm3/cm3) solved at lst time step.

thp(i) - the equivalent of th(i) (cm3/cm3) solved at the partial time step, prk*dt.

thr(i) - residual soil water content (cm3/cm3).

ths(i) - saturated soil water content (cm3/cm3).

tm(i) - field temperature measurements (°C)

udl(i) - upper drainage limit (cm3/cm3) , the water content at p(i) = -0.1 bar

v(i) - unsaturated water flux (cm3/(cm2-h)) at grid cell boundary.

vm(i) - exponent of ratio of suction head to displacement pressure in soil saturation relation.

vn(i) - exponent, divided by vm, of effective saturation in soil saturation relation.

wm(i) - field water content sensor measurement reading (cm3/cm3).

wv(i) - intergrid Darcien weight of the upper grid point conductivity to the mean conductivity between grid points with respect to pressure (dimensionless).

y(i) - NO3 concentration in soil solution (ug/ml)

z(i) - depth from soil surface (cm) positive downwards at finite difference grid cell centers, z(i) = (i*dz - dz/2), z(0) = 0.

common /pr2/

a1 - Runge-Kutta parameter, the coefficient of the partial time step contribution at the full time step (dimensionless).

a2 - Runge-Kutta parameter, the coefficient of the full time step contribution at the full time step (dimensionless).

cl - length of soil column (cm) from the surface to the bottom of modeled soil layer.

cn - SCS curve number.

disp - solute dispersion coefficient (cm2/h).

dt - finite difference method time step size (h).

dtt - maximum time step allowed (h).

dz - finite difference method space step size (cm).

dzg - height of insulating grass (cm).

dzl - distance from the bottom of the modeled soil layer to the water table (cm).

dzp - depth increment (cm) for writing soil profile data to file *1.out.

evs - actual surface evaporation (cm/h) limited by soil surface conductivity.

fcu - flux of ammonium (ug/(cm2-h)) at the soil suface (due to infiltration of litter ammonium).

pl - soil water pressure head (cm) at depth zl (pl = 0 at water table).

pmax - upper limit of soil water pressure head (cm) allowed by model (not used in this version).

prk - Runge-Kutta parameter, 0 < prk < 0.5, the relative size of the partial time step (dimensionless).

qe - soil or rain pond surface evaporation (cm/h).

qin - water flux (cm/h) entering the soil surface at the full time step.

qinp - water flux (cm/h) entering the soil surface at the partial time step.

qk - Michaelis constant for root nitrogen uptake (ug/ml).

ql - water flux density (cm/h) from bottom of the modeled soil layer to water table at the full time step.

qlp - water flux density (cm/h) from the bottom of the soil column at the partial time step.

qm - maximum rate of nitrogen uptake per root length (ug/(cm-h)) in the Michaelis-Menten approach without temperature adjustment.

qn - net water flux into the soil column (cm/h), qin-ql, at the full time step.

qnp - net water flux into the soil column (cm/h), qin-ql, at the partial time step.

res - residual mass balance (cm) calculated at the full time step.

resp - residual mass balance (cm) calculated at the partial time step.

sev - potential soil surface evaporation (cm/h).

sxrp - cumulative root water extraction rate (1/h) from the surface to depth cl at the partial time step.

tdg - thermal diffusion rate of insulating grass layer, (cm2/h).

thr - residual saturation (cm3/cm3) common to all soil layers.

ths1, ths2, ths3 - maximum saturation or porosity (cm3/cm3) for soils layers 1, 2 & 3.

tl - bottom boundary condition constant temperature (°C).

tnfin - total nitrogen in the soil column (ug/cm2) to depth cl at the end of the current day.

wfin - equivalent depth of water (cm) in the soil column to depth cl at the end of the current day.

wilt - plant wilting point soil water pressure head (cm), used to limit root water extraction.

winit - equivalent depth of water (cm) in the soil column to depth cl at the start of day.

wk1 - up-gravity weight (0.5 to 1.0) used to create vertical interblock mean hydraulic conductivities from grid cell center conductivities (not used in this version).

wk2 - down-gravity weight, (1-wk1, not used in this version).

zl - depth (cm) to a supposed water table or other constant head boundary.

zr - height of ponded water above the soil surface (cm) at the full time step.

zrj - height of ponded water above the soil surface (cm) at the last time step.

zrp - height of ponded water above the soil surface (cm) at the partial time step.

ztl - depth of the bottom boundary condition for temperature (cm).

common /pr4/

inewt - index of the current iteration in Newton's method for the partial or full time step.

lt - depth index for bottom boundary of temperature model.

maxit - the maximum number of iterations allowed in Newton's method.

n - depth index such that z(n) = cl.

nm1 - (n-1).

np1 - (n+1), depth index for z(np1) = zl.

 

common /ts1/

crain(n) - cumulative rain (cm) since start of model or nth application of litter.

crdaly(k) - daily rain (0.001 in) from the input weather file weather.dat.

csno3(k) - concentration of NO3 (ug/ml) in rain infiltration (zero in this version).

et(k) - rate of potential evapotranspiration (cm/h) apportioned to plant transpiration.

fam(n) - fraction of the total nitrogen in the nth litter application mineralized to NH4.

fav(n) - fraction of the total nitrogen in the nth litter application lost to NH3 volatilization.

fion(n) - fraction of the total nitrogen in the nth litter application apportioned to inorganic nitrogen.

pet(k) - total potential evapotranspiration (cm/h).

runof(k) - rainfall runoff (cm).

tappn(n) - total nitrogen (ug/cm2) in the nth litter application.

tempmn(k) - daily minimum air temperature (°C).

tempmx(k) - daily maximum air temperature (°C).

xinfl(k) - depth of rain (cm) apportioned to surface infiltration and evaporation.

 

common /ts2/

accevp - cumulative total evaporation (cm) (not used in this version).

accpln - cumulative total nitrogen (ug/cm2) absorbed by plants.

ampd - amount of NH4 in the litter (ug/cm2) generated per day by mineralization.

aplr - application rate (tons/acre) of litter to land in nth application.

avpd - amount of volatile ammonia (ug/cm2) generated per day.

blt -

cam - total supply of mineralized ammonium in the litter (ug/cm2) available for rainwater leaching.

caml - cam for the previous day.

cav -

cavl -

cev - cumulative evaporation for one day in equivalent water depth (cm).

cev1 - cev of the previous day.

csin - total mass of inorganic nitrogen (ug/cm2) remaining in all n applications of litter.

csinl - csin of the previous day.

csln - NH4 (ug/cm2) leached from the litter to the soil in one rain.

cslo -

cslr - total nitrogen remaining undecomposed in the litter (ug/cm2).

csls -

csom - cumulative total nitrogen (ug/cm2) released by the litter to soil organic matter on completion of mineralization.

cson - total mass of organic nitrogen (ug/cm2) remaining in all n applications of litter.

csonl - cson of the previous day.

dfam - the fraction of the total nitrogen mineralized to NH4 in the nth litter application in one time step.

dfav - the fraction of the total nitrogen converted to volatile ammonia in the nth litter application in one time step.

dnitr1 - dnitrf of the previous day.

dnitrf - cumulative denitrification (ug/cm2) of NO3 over time.

fci - the fraction of the nth litter application total nitrogen apportioned to inorganic nitrogen.

gwn - total nitrogen released to the groundwater (ug/cm2) at the end of the day.

gwn1 - gwn of the previous day.

gwn2 -

gwnh4 - cumulative mass of NH4 (ug/cm2) passing from the soil column to the ground water.

gwno3 - cumulative mass of NO3 (ug/cm2) passing from the soil column to the ground water.

gww1 - cumulative volume of water (cm3/cm2) passing from the soil column to the ground water by the end of the current day.

gww2 - gww1 for the previous day.

mdoy - day of year number of next field measurement (day).

myr - year number minus 1900 of next field measurement (yr).

percen - percent of the total litter application mass apportioned to all types of nitrogen.

pln - total nitrogen (ug/cm2) absorbed by plants in one day.

pln1 - pln for the previous day.

plnh4 - cumulative mass of NH4 (ug/cm2) absorbed by plants from the soil column.

plnh41 - plnh4 of the previous day.

plno3 - cumulative mass of NO3 (ug/cm2) absorbed by plants from the soil column.

plno31 - plno3 of the previous day.

plnw - cumulative depth of water (cm3/cm2) absorbed by plants from the soil column.

plnw1 - plnw of the previous day.

qlnh4 -

qlno3 -

rad - ?

sumcn -

sumtns -

sumyn -

tave - daily average temperature (°C).

tavek - daily average temperature (°K).

time - simulated time (h) since the start of the model.

timnw - time of the next write to output files (h).

tinf - time since midnight (h) over which the program spreads the daily rain.

tmax - daily maximum temperature (°C).

tmaxf - daily maximum temperature (°F).

tmin - daily minimum temperature (°C).

tminf - daily minimum temperature (°F).

tnfin -

tninit - total nitrogen (ug/cm2) in the soil column to depth cl.

twrite - simulation time (h) of the next scheduled output to data files.

xkt - ?

xno3 - total NO3 in the soil solution to depth cl (ug/cm2) .

xtnh4 - total NH4 in the soil column (ug/cm2) to depth cl.

common /ts3/

kdoy(k) - day of year for kth input from input file weather.dat

kyer(k) - (year number - 1900) for the kth input from weather.dat

common /ts4/

idd - day of month of weather data input.

imm - month of year of weather data input.

iyr - scalar for kyer(klm).

kday - day of year of the litter application.

klm - number of simulation days since the start of the model or last litter application.

kyr - (year - 1900) of the litter application..

napp - total number of litter applications to date.

nday - scalar for kdoy(klm).

common /lo1/

rday - rain day flag, .true. if rain is currently infiltrating the soil.

vd(i) - soil water flux direction flag, .true. if the direction of the water flux, v(i), is downwards (z-positive) in the soil column at depth z(i) + dz/2.

 

Input Files  (up)

 

unit# file

1 outday.dat

15 soils.dat

16 sinit.dat

20 weather.dat

77 appinfo.dat

 

Input File Descriptions  (up)

 

outday.dat  (up)

This file is used only for calibration runs. It consists of field measurements in a soil column for a particular day, in space- and comma-delineated ascii. The input variables on one line are the measurement year, myr, the measurement day of year, mdoy, the tensiometer soil water hydraulic pressure measurements at depths of 30, 60, 90, 120 and 200 cm, pm(1) to pm(5) (cm), the soil temperature measurements at 10.16 and 30.48 cm (° C), tm(1) and tm(2), and the "water content" measurements from an electrode sensor, wm(1) and wm(2) (supposedly cm3/cm3). These data are compared to the end-of-day data in the model in subroutine output and used to construct objective functions for calibrating the model. (Since this work is not yet finished, it is subject to change.)

 

example:

 

91 309 -37.92, -55.08, -61.60, -93.60, -46.10, 5.75, 6.67, 0.2045, 0.1879 (all on one line)

 

soils.dat  (up)

This file contains soil hydraulic, temperature and chemical property information for the three soil layers allowed by the model, as well as other miscellaneous information that the program needs to run. Except where specified otherwise, the input format is FORTRAN *-unformated. The program will read space- or comma-delineated ASCII numerical information until its needs are filled. The reader should refer to the definitions of variables already supplied for common blocks, if not supplied here.

Calibration grid point arrays for soil hydraulic and chemical parameters follow the scalar parameters. For each set, the number of values, nin (i3 format), is followed by separate lines of the depth coordinates and then the soil parameters, in order of increasing depth. On the depth and parameter lines, there must be at least two values, spanning the entire model column from the surface to the water table. The depth and parameter lines can each take up as many lines as necessary the program will read values for each until the limit, nin, is reached. The parameter arrays do not have to correspond with the modeling grid for either flow or transport. The program will use linear interpolation to fill out the arrays in the positions of the modeling grid. The parameter arrays used here, such as sci and bci, are dummy names, corresponding to the interpolated (sc and bc) arrays used at the model grid points.

 

line input

1 dtt, dzz, dzp - user-supplied time step (h), space step (cm), and profile output step (cm)

2 qm, qk, disp - maximum nitrogen uptake rate (ug/(cm-h)) without temperature adjustment, Michaelis constant for root nitrogen uptake (ug/l), solute dispersion coefficient (cm2/h)

3 cl - depth of modeled soil column (cm)

4 zl, pl, wk1 - depth to water table (cm), hydraulic pressure at water table (cm), wk1 not used in this version, but read

5 dzg, tdg, tl, ztl - height of insulating grass (cm), thermal diffusion coefficient of grass (cm2/h), temperature at constant-temperature boundary (°C), depth to constant-temperature boundary (cm)

6 tinf, twrite - time for infiltration (not used in this version but read), time between output file writes (h)

7 nin (i3 integer format + comment) - number of data points for saturated conductivity

8 x(1), ... x(nin) - depth values (cm) of the data points

9 sci(1), ... sci(nin) - soil saturated hydraulic conductivity values (cm/h) cda

10 nin - (i3 format) number of data points for the conductivity exponent

11 x(1), ... x(nin) - depth values (cm)

12 bci(1), ... bci(nin) - conductivity exponents (dimensionless)

13 nin - number of saturated porosities

14 x(1), ... x(nin) - depth values (cm)

15 thsi(1), ... thsi(nin) - saturated porosities (cm3/cm3)

16 nin - number of residual saturations

17 x(1), ... x(nin) - depths in the soil profile (cm)

18 thri(1), ... thri(nin) - residual saturations (cm3/cm3)

19 nin - number of air entry pressures

20 x(1), ... x(nin) - depth values (cm)

21 ati(1), ... ati(nin) - air entry suction pressures (cm, positive values)

22 nin - number of n-exponents

23 x(1), ... x(nin) - depth values (cm)

24 vni(1), ... vni(nin) - van Genuchten-style exponent (dimensionless)

25 nin - number of van Genuchten m-exponents

26 x(1), ... x(nin) - depth values (cm)

27 vmi(1), ... vmi(nin) - van Genuchten-style exponent (dimensionless)

28 nin - number of bulk densities

29 x(1), ... x(nin) - depth values (cm)

30 robi(1), ... robi(nin) - soil bulk density (g/cm3)

31 nin - number of ammonium distribution coefficients

32 x(1), ... x(nin) - depth values (cm)

33 rexi(1), ... rexi(nin) - ammonium distribution coefficient (cm3/g)

34 nin - number of nitrification rates

35 x(1), ... x(nin) - depth values (cm)

36 rnti(1), ... rnti(nin) - nitrification rate (1/h)

37 nin - number of denitrification rates

38 x(1), ... x(nin) - depth values (cm)

39 rdni(1), ... rdni(nin) - denitrification rate (1/h)

 

example:

1.0d0 2.00d0 4.0d0

0.001d0 1.0d0 2.5d0

210.d0

5000.0d0 0.0d0 0.5d0

5.0d0 3.33d0 15.0d0 171.0d0

10.d0 24.d0

11 saturated conductivity, sc

0.d0 15.d0 30.d0 45.d0 61.d0 76.d0 91.d0 106.d0 122.d0 137.d0 5000.d0

3.493d0 11.522d0 37.826d0 27.706d0 8.729d0 3.537d0 1.735d0 0.9836d0

0.6084d0 0.6084d0 0.6084d0

11 conductivity exponent, bc

0.d0 15.d0 30.d0 45.d0 61.d0 76.d0 91.d0 106.d0 122.d0 137.d0 5000.d0

11.9978d0 12.1086d0 11.3102d0 12.651d0 10.1186 8.3603d0 7.8089d0 7.1767d0 7.5152d0 7.7875d0 7.7875d0

11 saturated porosity, ths

0.d0 15.d0 30.d0 45.d0 61.d0 76.d0 91.d0 106.d0 122.d0 137.d0 5000.d0

.537d0 .479d0 .461d0 .462d0 .449d0 .447d0 .458d0 .434d0 .422d0 .465d0

.465d0

11 residual porosity, thr

0.d0 15.d0 30.d0 45.d0 61.d0 76.d0 91.d0 106.d0 122.d0 137.d0 5000.d0

0.010703d0 0.023178d0 0.102071d0 0.110965d0 0.160129d0 0.185075d0 0.194355d0

0.025027d0 0.203067d0 0.21184d0 0.21184d0

11 air entry pressure, at

0.d0 15.d0 30.d0 45.d0 61.d0 76.d0 91.d0 106.d0 122.d0 137.d0 5000.d0

757.67d0 634.34d0 275.73d0 327.44d0 341.47d0 391.98d0 472.16d0 523.91d0

589.41d0 323.24d0 323.24d0

11 vG n-exponent, vn

0.d0 15.d0 30.d0 45.d0 61.d0 76.d0 91.d0 106.d0 122.d0 137.d0 5000.d0

0.577482d0 0.541061d0 0.523747d0 0.423754d0 0.421374d0 0.403633d0 0.40068d0

0.426339d0 0.447182d0 0.479269d0 0.479269d0

11 vG m-exponent, vm

0.d0 15.d0 30.d0 45.d0 61.d0 76.d0 91.d0 106.d0 122.d0 137.d0 5000.d0

1.001d0 1.04237d0 1.05353d0 1.03324d0 1.001d0 1.06708d0 1.08486d0 1.02654d0

1.001d0 1.00355d0 1.00355d0

11 bulk density, rob

0.d0 15.d0 30.d0 45.d0 61.d0 76.d0 91.d0 106.d0 122.d0 137.d0 5000.d0

1.28d0 1.38d0 1.38d0 1.44d0 1.52d0 1.51d0 1.48d0 1.53d0 1.5d0 1.39d0

1.39d0

4 ammonium dist. coef., rex

0.d0 45.d0 45.1d0 5000.d0

.15d0 .15d0 .25d0 .25d0

4 nitrification rate, rnt

0.d0 15.d0 15.1d0 5000.d0

.02d0 .02d0 .001d0 .001d0

2 denitrification rate, rdn

0.d0 5000.d0

.01d0 .01d0

 

 

sinit.dat  (up)

This file contains the necessary initial soil profile data for soil water pressure head, ammonium concentration, nitrate concentration and soil temperature. The data need not match the model finite difference space grid, since they will be linearly interpolated to that grid. Nor do the data for separate variables have to match each other in depth, since they are interpolated from their own depth independent grids. The data can be taken by different means at different depth spacings for each variable.

The first eight lines are dummy or descriptive text comments. Each of the four data variables needs at least three lines of input. The first line contains the integer number of the number of (z,y) data points, nin. The next line contains the z depth ordinates. If that satisfies the nin requirement, the last line contains the y initial variable values. Since the input format is FORTRAN *-unformatted, the program will keep reading lines as necessary until the data requirement is filled.

If one assumes that the data are sparse enough to fit on one line each, the remaining lines would be as follows.

line data

  1. comment line
  2. comment line
  3. comment line
  4. comment line
  5. comment line
  6. comment line
  7. comment line
  8. blank line
  9. nin - number of data points, (z,p) in the profile
  10. p1, p2, ... pnin - initial soil water pressure heads (cm)
  11. z1, z2, ... znin - at depths zi (cm) below the soil surface
  12. nin - number of points (z,c) in the profile
  13. c(1), ... c(nin) - initial ammonium concentration (ug/ml)
  14. z1, z2, ... znin - at depths zi (cm)
  15. nin - number of data points, (z,y) in the profile
  16. y1, y2, ... ynin - initial nitrate concentrations (ug/ml)
  17. z1, z2, ... znin - at depths zi (cm)
  18. nin - number of data points, (z,T) in the profile
  19. T1, T2, ... Tnin - initial soil temperatures (°C)
  20. z1, z2, ... znin - at depths zi (cm)

 

example:

Each set of data consists of three lines. 1st line

is number of soil measurements, 2nd line is soil depth

and third line is the associated soil data.

The soil data in each of the 3rd lines are initial

values in this order: pressure heads,

NH4-N concentration, NO3-N concentration, and

soil temperature.

7

7 22 37 52 67 82 120

-5000 -2000 -1000 -750 -500 -350 -280

7

7 22 37 52 67 82 120

3.6 0.9 0.3 0.0 0.0 2.2 2.0

7

7 22 37 52 67 82 120

0.8 0.0 0.0 0.0 0.0 .2 .2

7

7 22 37 52 67 82 120

28.6 25 20 19 18 18 18

 

 

weather.dat  (up)

This input file contains the date, air temperature, and daily rain information. The input data must be contiguous and consecutive from start to end date. The program will stop when it exhausts this file. The reader should refer to the common variable definitions already supplied. FORTRAN i/o format standards are applied. Each line contains the variables:

kyer(klm), kdoy(klm), tempmx(klm), tempmn(klm), crdaly(klm)

in the FORTRAN format (i2, i3, f3.0, f3.0, f5.0). Note that the input value of crdaly is in thousanths of an inch. So, 2000 means 2.000 inches. Directly after input, the program converts the value to centimeters.

 

 

example:

90 88 51 43 0

90 89 58 49 2000

90 90 56 47 100

90 91 64 46 25

90 92 76 41 0

90 93 59 31 0

90 94 62 38 0

90 95 77 46 0

90 96 63 37 0

90 97 51 28 0

90 98 61 35 0

90 99 62 52 0

90100 66 54 0

90101 55 35 0

90102 49 35 0

90103 62 40 0

90104 62 43 0

90105 69 46 1000

90106 69 46 0

90107 78 40 0

 

 

appinfo.dat  (up)

This file contains the Natural Resource Conservation Service (NRCS) curve number for rain runoff in the first line, followed by lines describing the application of poultry litter, if any. The reader should refer to the common variable definitions already supplied. The program will read space- or comma-delineated ASCII numerical information until its needs are filled.

 

line variable(s)

1 cn - the NRCS curve number for rainfall runoff.

2 kyr, kday, aplr, percen, fci (1st application)

3 kyr, kday, aplr, percen, fci (2nd application)

...

n kyr, kday, aplr, percen, fci (nth application)

 

example:

71

90 88 4 3.79 0.15

90 100 4 3.79 0.15

 

 

Output Files  (up)

unit# file

12   *1.out
14   *2.out
25   *3.out
18   *4.out
07   *5.out

 

Output File Descriptions  (up)

 

File outfs(1)//1.out - water, nitrogen and temperature soil profile data (disabled in this version)

This output file contains data for water, nitrogen and temperature in the soil profile. The first part is essentially a header that reflects the data from the soils.dat input file, including explanatory descriptions. The second part consists of three similar sections that repeat every day with rain. The first section gives profile and summary data at the very beginning of the rain day, showing how the soil water, temperature and nitrogen have redistributed since the last rain. The second section gives the same information for the end of the rain infiltration period (ten hours past midnight in this version). Because there is significant redistribution of soil water from the end ot the rain to the end of the day, the third section gives the same information at the end of the day.

Each section has two subsections, profile and summary data. The profile data reports at increasing depth from the soil surface to the bottom of soil layer 3 (z = cl) in the nearest finite difference grid steps to intervals of dzp (cm). Each line contains the variables:

z(i), p(i), th(i), v(i)*24, c(i), y(i), t(i), ck(i)*24

in the FORTRAN format:

(f6.1, 2x, f10.2, 5x, f8.4, 5x, f8.4, 5x, f8.3, 5x, f8.3, 2x, f5.1, 3f8.5)

where the variables are as defined in the section on common blocks.

In this version v(0) is taken to be the same as the upper boundary condition, a combination of evaporation and infiltration. The second subsection displays summary data for :

xno3, xnh4, enh4, xtnh4, xno3+xtnh4, dnit, Dplno3, Dplnh4 and gwn, where

enh4 = total NH4 in the soil exchangeable phase (ug/cm2) ,
dnit = total nitrogen denitrified (ug/cm2) for the day,
Dplno3 = plant uptake of NO3- (ug/cm2) for the day,
Dplnh4 = plant uptake of NH4+ (ug/cm2) for the day, and the other variables are as earlier defined.

 

 

File outfs(1)//2.out - soil nitrogen mass balance data (disabled in this version)

Each line after the header shows the following variables:

klm, iyr, imm, idd, nday, tninit/10, tnfin/10, csln/10, pln/10, accpln/10, dnit/10, gwn/10, tnbal/10, avpd/10, cslr/10

in FORTRAN format (1x, i4, 3i3, i4, 7f9.3, g13.3, 2f9.3), where

tnbal = (tninit - tnfin + csln - pln - dnit - gwn), and
the remaining variables are as defined earlier. Note that dividing the variables by 10 converts from (ug/cm2) to (kg/ha).

 

File outfs(1)//3.out - soil water mass balance data

Each line after the header shows the following variables:

klm, iyr, imm, idd, nday, winit, wfin, crdaly(klm), xinfl(klm), dev, runof(klm), gwater, plnup, pet(klm), wbal

in FORTRAN format (1x, i2, 2i3, i4, 9f9.3, g13.3), where

dev = total soil surface evaporation (cm) during one day,

gwater = amount of water (cm) passing from the bottom of soil layer 3 to the ground water since the start of day,

plnup = amount of water (cm) taken up by plants during one day,

wbal = (winit - wfin + crdaly(klm) - runof(klm) - dev - plnup - gwater), the imbalance in soil profile water volume during one day, and the remaining variables are as defined earlier.

Note the dimension of (cm) is actually cm3 of soil water volume per cm2 of land surface (cm3/cm2).

 

 

File outfs(1)//4.out - volatilization, mineralization summary

Each line after the header shows the variables:

iyr, nday, napp, csinl/10, csin/10, avpd/10, csonl/10, cson/10, ampd/10, cam/10, csln/10, cson/10, tave

in FORTRAN format (i2, 2i4, 10f9.3),

where all the variables are as defined earlier. Note that dividing (ug/cm2) converts to (kg/ha).

 

 

File outfs(1)//5.out - nutrient release to ground water (disabled in this version)

Each line after the header shows the following variables:

iyr, nday, (xno3+xnh4), c(n), y(n), gwn

in FORTRAN format (i4, i5, 4f12.3), where

c(n) = the concentration of NH4 (ug/ml) at the bottom of soil layer 3,

y(n) = the concentration of NO (ug/ml) at the bottom of soil layer 3, and the remaining variables are as defined before.

 

 

Subroutine Parameters  (up)

 

subroutine compute (ifc, noluck, cqin)

 

Calls the subroutines to calculate water and heat flow, and contaminant transport for one time step.

ifc - output, integer, the number of times compute has been called in the current simulation day, or, the number of time steps, dt, calculated in the simulation day.

noluck - output, failure flag for subroutines pwater and water; noluck = -1 ® Newton's iteration failed to converge in maxit tries, noluck = 0 ® success, noluck = 1 ® endless loop in pwater or water (no convergence), noluck = 3 ® number of time steps exceeds 100,000 in compute, noluck = 4 ® dt goes to zero in pwater or water as adaptive time step tries for covergence.

cqin - cumulative soil surface inflow (cm) from rain on rain day, used only for console display.

 

subroutine dgsl (n, c, d, e, b, info)

 

Solves the tridiagonal problem central to the finite difference solution of Richards' equation.

n - number of elements in the tridiagonal array

c - array elements for the subdiagonal, destroyed

d - array elements for the diagonal, destroyed

e - array elements for the superdiagonal, destroyed

b - array elements for the right hand side vector, returns the answer

info - output, integer, 0 if successful, k if the kth element of the diagonal becomes zero (failure).

 

function dink (p1, p2, sc, bc, at, vm, vn)

 

Calculates the integral mean hydraulic conductivity with respect to matric suction.

p1 - matric suction (cm) at the lower grid point

p2 - matric suction (cm) at the lower grid point

sc - mean saturated hydraulic conductivity (cm/h)

bc - mean conductivity exponent (dimensionless)

at - mean displacement pressure (cm)

vm - mean van-Genuchten exponent (dimensionless)

vn - mean van-Genuchten exponent (dimensionless)

 

 

subroutine dmkh (kk1, kk2, hh1, hh2, sc, bc, at, vm, vn, dz, wv)

 

Calculates the approximate Darcian intergrid conductivity mean km = wv*kk2 + (1-wv)*kh, where kh is the integral mean of conductivity between grid points 1 and 2 with respect to hydraulic pressure head

kk1 - hydraulic conductivity (cm/h) of the lower grid point (z1)

kk2 - hydraulic conductivity (cm/h) of the upper grid point (z2)

hh1 = hydraulic pressure head (cm) of the soil water at the lower grid point

hh2 - hydraulic pressure head (cm) of the soil water at the upper grid point

sc - mean saturated conductivity (cm/h) between the grid points

bc - mean conductivity exponent (dimensionless) between the grid points

at - mean displacement pressure (cm) between the grid points

vm - mean van-Genuchten exponent (dimensionless) between the grid points

vn - mean van-Genuchten exponent (dimensionless) between the grid points

dz - separation between grid points (cm)

wv - Darcian weight (dimensionless)

 

subroutine idist2 (sval)

 

sval - output, array of 1 ... n, the values of the soil profile variables are linearly interpolated from sparse input file data (sinit.dat) to the finite difference method grid positions, zi, i = 1 to n.

 

subroutine interp (z, v, zv, sval)

 

given the known data set, (zi, vi), i = 0 to n, this routine linearly interpolates from the known z-value, zv, not in the set, to the v-value, sval; used to interpolate between data points in the model soil column from z = 0 to z = cl.

 

subroutine nextapp (allok)

 

This subroutine reads information regarding the next poultry litter application and verifies compatibility with the current weather data.

allok - output, logical flag, set to .false. if the next litter application date from the input file precedes the current simulation date, but does not change from year 1999 to 2000 (not yet y2k compliant).

 

subroutine output (eod, sofp, soft, ifc)

 

Generates the output files, *1.out, *2.out, et cetera.

eod - input, logical flag, set to .true. if subroutine output has been called at the end of the simulation day; .false. suppresses output to files *2.out, *3.out, *4.out and *5.out to avoid filling them with partially-calculated data.

sofp - sum of objective functions over field soil water pressure measurements

soft - sum of objective functions over field soil temperature measurements

ifc - input, integer, the number of times subroutine compute has been called in the current simulation day.

 

function ptc (ps, sc, bc, at, vm, vn)

 

Converts matric suction to hydraulic conductivity

ps - matric suction (cm)

sc - mean saturated hydraulic conductivity (cm/h)

bc - mean conductivity exponent (dimensionless)

at - mean displacement pressure (cm)

vm - mean van-Genuchten exponent (dimensionless)

vn - mean van-Genuchten exponent (dimensionless)

 

pwater (ifc, noluck)

 

Calculates soil water flow at the partial time step, prk*dt.

ifc - integer, the number of times subroutine compute has been called

noluck - integer, noluck = -1 ® Newton's iteration failed to converge in maxit tries, noluck = 0 ® success, noluck = 1 ® endless loop in pwater or water (no convergence), noluck = 4 ® dt goes to zero in pwater or water as adaptive time step tries for covergence.

 

subroutine readit (allok)

 

Reads in the next day's weather data.

allok - output, logical flag, set .false. if weather.dat file is exhausted

 

subroutine water (ifc, noluck, cqin, dtfl)

 

Calculates the soil water flow at the full time step, dt.

ifc - integer, number of time compute has been called

noluck - integer, noluck = -1 ® Newton's iteration failed to converge in maxit tries, noluck = 0 ® success, noluck = 1 ® endless loop in pwater or water (no convergence), noluck = 4 ® dt goes to zero in pwater or water as adaptive time step tries for covergence.

cqin - cumulative soil surface inflow (cm) from rain on rain day, used only for console display.

dtfl - flag, dtfl = 1.0 if the ponded infiltration on a rain day has just gone to zero, 0.0 otherwise, marks the exact time step in which infiltration completes.

 

subroutine weather (allok)

 

This subroutine reads in weather data from a dataset in an input data file it calls the readit subroutine. it also calculates some of the constants required by hargreaves formula for estimating evapotranspiration, and calls the evapo subroutine to calculate the daily evapotranspiration.

allok - output, logical flag, .true. if weather.dat file is not exhausted

 

subroutine wpset (ll, lu)

 

Calculates soil hydraulic and thermal characteristics at the grid points in the index range from ll to lu.

ll - input, integer, lowest depth position index of profile properties to be calculated

lu - input, integer, upper depth position index (farther from soil surface) to be calculated


Questions? mailto:dscott@cleora.uark.edu (no spam please)