Skip to Main Content U.S. Department of Energy
EARTH at PNNL

Frames 1x

Software & Development Tools - Module SDK


SDK Section 2.0

2.0 Example Inclusion of a Legacy Vadose Zone Model

To make a concrete example of the process of introducing a legacy model to FRAMES, we will assume that a simple vadose zone model needs to be incorporated into FRAMES.  The model is a simple plug flow which assumes only that the constituent flows from one place to another and disperses in the direction of flow as it moves.  The input file is documented in Table 2.0.1 and the output is documented in Table 2.0.2.  In a real model inclusion, the data for the model might be spread across a number of files each of which has a special format.  This example is simplified to make it clear which interactions are required with FRAMES. This simple model demonstrates all necessary mechanisms.

Often an input/output file is documented in a style that is consistent with using punch cards.  This style is used here to demonstrate that even models that have a long history (i.e. exists when punch cards were actually used) can potentially be included into FRAMES.  The Variable Name column gives name in code that input/output is associated with.  The Columns column describes which columns in input file are used for this input/output.  The Units defines units expected for the given parameter. The Description contains a more detailed description of the input/output.

Table 2.0.1 Documentation of input file for legacy vadose zone model
Variable Name Columns Units Description
Card 1
NumCon 1-10 N/A Number of constituents in this file
Length 11-20 m Length of source area
Width 21-30 m Width of source area
Veloc 31-40 m/yr Darcy velocity of water
TotPor 41-50 % Total porosity in vadose zone
BulkD 51-60 g/cm^3 Dry Bulk density of soil in vadose zone
FieldC 61-70 % Field capacity of soil in vadose zone
Conduc 71-80 m/yr Saturated Hydraulic Conductivity
Card2
Thick 1-10 m Thickness of vadose zone
Disp 11-20 m Dispersivity in direction of flow
Card 3 (one for each constituent)
Kd 1-10 ml/g Equilibrium Coefficient
TotMass 11-20 g Total Mass of this constituent
NumQTimes 21-30 N/A Number of Flux/Time pairs for this constituent
Card 4 (one for each constituent Flux/Time pair)
QTime 1-10 yr Time of reported mass flux
Q 11-20 g/yr Mass flux 

Table 2.0.2 Documentation for output of legacy vadose zone model
Variable Name Columns Units Description
Card 1
NumCon 1-10 N/A Number of constituents reported in output
Length 11-20 m Length of area contaminated at bottom of vadose zone
Width 21-30 m Width of area contaminated at bottom of vadose zone
Veloc 31-40 m/yr Flow rate of water through bottom of vadose zone
Card 2 (one for each constituent)
NumQTimes 1-10 N/A Number of Flux/Time pairs computed by vadose zone model
Card 3 (one for each constituent and flux/time pair) 
QTime 1-10 yr Time of reported mass flux
Q 11-20 g/yr Mass flux

This models name is LegVad.exe and is run in following manner.  At a DOS Prompt type:

    LegVad.exe InputFile OutputFile<Enter>

Where InputFile is replaced with name of input file that is to be read, and OutputFile is replaced with name of output file that will be produced.  So command line "LegVad.exe MyInput MyOutput" would read MyInput and produce MyOutput.


SDK Introduction - introduction page for Software Developer Kit.
SDK 1.1-1.3 - Call Arguments, ERR file, GID file and Reading module sections in FRAMES specified files.
SDK 2.0 - Example of module inclusion
SDK Tools - Software Development Tools
Go to Module Specifications for more information on modules.


EARTH

APPLICATION

DESIGN

SOFTWARE &
DEVELOPMENT TOOLS

TRAINING

Related EARTH Links