Format for linking to L-THIA
Introduction
Example 1
Example 2
Example 3
Appendices
Users who want to generate L-THIA
simulations automatically can do so by providing data in the URL to L-THIA. In
the URL the user needs to provide the input requirements of the spreadsheet
version of L-THIA; this includes the land use areas and the corresponding
hydrologic soil groups.
This process eliminates the step of
manually entering the values through the input screens. Based on the URL
provided, 'Output' screens or 'L-THIA Results' will be automatically generated
for the corresponding L-THIA simulations.
This document details the steps
required and the information that needs to be passed in the URL for generating
L-THIA results.
The
path to run the lthia cgi is : http://danpatch.ecn.purdue.edu/~sprawl/LTHIA7/lthia/cgi-bin/lthia_urld.cgi?
In order to pass the variables to the
cgi, all the variables and their values follow the '?' (question mark) above.
In passing data with the URL, however,
it is important to take care of some special characters such as / (front slash
in e.g. lu1=Grass/Pasture), ^ (e.g. unit=km^2), and white spaces (e.g. scenario1=SCENARIO
1)
a.) In order to pass the variable
lu1=Grass/Pasture, the input url should have variable lu1 assigned to
lu1=Grass%2FPasture, where / is replaced by %2F.
b.) In order to pass the variable
unit=km^2, the input url should have variable unit assigned to unit=km%5E2,
where ^ is replaced by %5E.
c.) Similarly, in order to pass white space between the names like scenario1=SCENARIO 1, the input url should have the variable assigned to scenario1=SCENARIO+1, where white space is replaced by +.
Three examples have been provided to
better explain how to form the URL for particular input sets.

(figure
1)
Example
1
(see Figure 1)
for the URL
The URL
http://danpatch.ecn.purdue.edu/~sprawl/LTHIA7/lthia/cgi-bin/lthia_urld.cgi?
is the pointer to the cgi.
The 'Scenario Name' or 'scenname' for the test runoff is basicrun.
It is for the state 'Indiana' and county 'Tippecanoe'.
Land area is measured in the unit 'acres'.
The name for 'scenario1' is 'yr1'.
Note that since there is a white space between SCENARIO and 1. This is replaced by a + sign in URL.
The name for 'scenario2' is 'yr2'.
The name for 'scenario3' is 'yr3'.
The landuse 'lu1' is 'Forest'.
The hydrologic soil group 'hsg1' is 'A'.
The area for 'yr1_1' is '20'
The area for 'yr1_2' is '15'
The area for 'yr1_3' is '5'
The landuse 'lu2' is 'Agricultural'.
The hydrologic soil group 'hsg2' is 'A'.
The area for 'yr2_1' is '25'
The area for 'yr2_2' is '16'
The area for 'yr2_3' is '10'
The landuse 'lu3' is 'Commercial'.
The hydrologic soil group 'hsg3' is 'A'.
The area for 'yr3_1' is '0'
The area for 'yr3_2' is '10'
The area for 'yr3_3' is '15'
The landuse 'lu4' is 'High Density Residential'.
The hydrologic soil group 'hsg4' is 'A'.
The area for 'yr4_1' is '5'
The area for 'yr4_2' is '12'
The area for 'yr4_3' is '25'
The landuse 'lu5' is 'Grass/Pasture'.
The hydrologic soil group 'hsg5' is 'A'.
The area for 'yr5_1' is '20'
The area for 'yr5_2' is '17'
The area for 'yr5_3' is '3'
The landuse 'lu6' is 'Water/Wetlands'.
The hydrologic soil group 'hsg6' is 'A'.
The area for 'yr6_1' is '17'
The area for 'yr6_2' is '9'
The area for 'yr6_3' is '2'
The landuse 'lu7' is 'Low Density Residential'.
The hydrologic soil group 'hsg7' is 'A'.
The area for 'yr7_1' is '4'
The area for 'yr7_2' is '15'
The area for 'yr7_3' is '21'
The landuse 'lu8' is 'Industrial'.
The hydrologic soil group 'hsg8' is 'A'.
The area for 'yr8_1' is '9'
The area for 'yr8_2' is '6'
The area for 'yr8_3' is '19'
Total variable 'total1, total2 and total3' sums up to '100' each.
No other variable is passed.
Note that the variable 'inputtype' is 1 indicating “basic”
land uses are used.

(figure
2)
Example
2
(see figure 2)
for the URL
This URL has as its input 'Scenario name' or 'scenname'=detailed.
It is for the state 'Ohio' and county 'Butler'.
Land area is measured in the unit 'hectares'.
The name for 'scenario1' is 'year1'.
Note that since there is a white space between SCENARIO and 1. This is replaced by a + sign in URL.
The name for 'scenario2' is 'year2'.
The name for 'scenario3' is 'year3'.
The landuse 'lu1' is 'Custom Land Use, 56'.
The hydrologic soil group 'hsg1' is 'B'.
The area for 'yr1_1' is '23'
The area for 'yr1_2' is '11'
The area for 'yr1_3' is '4'
The 'nps1' is 'Grass/Pasture'
The landuse 'lu2' is 'Commercial'.
The hydrologic soil group 'hsg2' is 'B'.
The area for 'yr2_1' is '2'
The area for 'yr2_2' is '9'
The area for 'yr2_3' is '17'
The landuse 'lu3' is 'Water/Wetland'.
The hydrologic soil group 'hsg3' is 'B'.
The area for 'yr3_1' is '21'
The area for 'yr3_2' is '16'
The area for 'yr3_3' is '4'
The landuse 'lu4' is 'Forest'.
The hydrologic soil group 'hsg4' is 'B'.
The area for 'yr4_1' is '1'
The area for 'yr4_2' is '11'
The area for 'yr4_3' is '22'
Total variable 'total1,
total2 and total3' sums up to '47'
each.
The variable 'inputtype'=2 indicates this is input type “detailed”.
Note that
special characters like / are replaced by %2F and white spaces are replaced by
a + sign, while the input input values are passed from the URL.

(figure
3)
Example 3
(see Figure 3)
for the URL
This URL has as its input 'Scenario name' or 'scenname'=conserv.
It is for the state 'Indiana' and county 'Howard'.
Land area is measured in units 'mi^2'.
The name for 'scenario1' is '1991'.
Note that since there is a white space between SCENARIO and 1. This is replaced by a + sign in URL.
The name for 'scenario2' is '2001'
The name for 'scenario3' is '2011'
The landuse 'lu1' is 'Residential'.
The %impervious 'imp1' is '25'
The hydrologic soil group 'hsg1' is 'D'.
The area for 'yr1_1' is '9'
The area for 'yr1_2' is '3'
The area for 'yr1_3' is '0'
The 'nps1' is 'Low Density Residential'
The landuse 'lu2' is 'Commercial'.
The %impervious 'imp2' is '5'
The hydrologic soil group 'hsg2' is 'A'.
The area for 'yr2_1' is '2'
The area for 'yr2_2' is '8'
The area for 'yr2_3' is '11'
The 'nps2' is 'Commercial'
The variable 'inputtype'=3 indicates this is input type “impervious”.
Appendices
Required and
necessary variables for the lthia cgi.
1.)
scenname :This variable describes the name of the model run ( for eg. test1)
2.)
state :This variable describes the name of the state, where the site is
located.
3.)
county :This variable describes the name of the county, in the above mentioned
state where the site is located.
4.)
unit :This variable describes the unit of area, required for land use and soil
combination.
The unit can be either of one of the following:
a.) acres
b.) km^2
c.) hectares
d.) mi^2
5.) At least
one of the variables from the following is necessary.
a.) scenario1
b.) scenario2
c.) scenario3
There can be more than one and the maximum is all of them.
6.) At least one of the variables from the
following is necessary. This variable describes the landuse of the site in the
specified county and state.
a.) lu1
b.) lu2
c.) lu3
d.) lu4
e.) lu5
f.) lu6
g.) lu7
h.) lu8
i.) lu9
There
can be more than one and a maximum of all of them in the same input string.
These
variables are assigned one of the following valid values for “basic” land uses
(see the WWW L-TIHA for valid values for other land use types):
* Commercial
* Industrial
* High Density Residential
* Low Density Residential
* Grass/Pasture
* Forest
* Water/Wetlands
* Agricultural
7.) For every
landuse variable passed, the hydrologic soil group is necessary.
The variable is hsg.
A hsg variable is required for every landuse:
a.) hsg1
b.) hsg2
c.) hsg3
d.) hsg4
e.) hsg5
f.) hsg6
g.) hsg7
h.) hsg8
i.) hsg9
There can be more than one and a maximum of all of them in the same input
string. This depends on the variable landuse lu passed.
The variables hsg above are assigned one of the following values:
*A
*B
*C
*D
8.)
For every landuse variable passed, the corresponding area (for eg. yr1_1), for
any scenario name, is necessary.
For
an easy explanation
landuse
hsg
scenario1
scenario2
scenario3
lu1
hsg1
yr1_1
yr1_2
yr1_3
lu2
hsg2
yr2_1
yr2_2
yr2_3
lu3
hsg3
yr3_1
yr3_2
yr3_3
lu4
hsg4
yr4_1
yr4_2
yr4_3
lu5
hsg5
yr5_1
yr5_2
yr5_3
lu6
hsg6
yr6_1
yr6_2
yr6_3
lu7
hsg7
yr7_1
yr7_2
yr7_3
lu8
hsg8
yr8_1
yr8_2
yr8_3
lu9
hsg9
yr9_1
yr9_2
yr9_3
total1
total2
total3
yr1_1
describes the area of each landuse and soil combination for each scenario. For
example yr1_1 describes the area of landuse lu1=Commercial, soil combination
hsg1=A and scenario1=SCENARIO1.
Thus,
for every landuse variable (lets say lu1=Commercial) which is used, a
variable from yr1_1, yr1_2, yr1_3 is necessary.
The
value assigned to this variable can be any positive integer (including zero).
9.)
For all the area variables assigned, the corresponding total variable is
necessary.
Following are the total variables:
a.) total1
b.) total2
c.) total3
The
total variable is the sum of the area variables in the respective column.
For example, if yr1_1=1, yr3_1=4, then total1=5. If any year variable in any
column is not used then, there is no need to pass the corresponding total
variable.
10.)
Irrespective of any variable passed, the variable inputtype=value is
compulsory. Value can be 1 (for “basic” land use input), 2 (for “detailed” land
use input), or 3 (for “impervious” area land use descriptions). This variable
is required by the cgi and is required in all circumstances.