Custom Site Weather Generation: Is it sufficient to add records to userwgn table in SWAT2005.mdb?

238 views
Skip to first unread message

Michael

unread,
Apr 4, 2008, 4:02:54 PM4/4/08
to ArcSWAT
Best wishes SWAT community,

I have custom international weather data suitable for .wgn files that
I want to programmatically enter into SWAT2005.mdb.

I have already programmatically converted the custom data into .wgn
files.

It appears to me that i need to (programmatically) transfer the data
(or .wgn files) into the userwgn table of SWAT2005.mdb. Is that so?
What else do I need to do?

Or is there a way to get the .wgn files' data into ArcSWAT so that I
can use them through the ArcSWAT interface in my ArcSWAT projects?

Also is there any purpose to having .wgn ASCII files in ArcSWAT? If
so please let me know.

I built my own application to create .wgn files according to the SWAT
I/O spec because my weather data source is idiosyncratic (SRDN daily
prcp and a lot of new_locclim autoworkbench files). In short order I
can enhance application also to write to SWAT2005.mdb.

(The (Arc)SWAT manuals dont seem to help on this issue. Sorry the
SwatEditors are not much help to me because I dont want to manually
and probably erroneously type in numbers, and the source data is not
in a format that the editors deal with. It would be cool to be able
to type in the name of a DLL and stuff so that SWAT editor could use
the DLL to extract the data from the source files as it likes.)

Best of luck and peace

Michael

unread,
Apr 4, 2008, 4:04:17 PM4/4/08
to ArcSWAT

Michael Winchell

unread,
Apr 7, 2008, 10:32:21 PM4/7/08
to ArcSWAT
If you want to use your custom international stations within ArcSWAT,
probably the best thing to do would be, as you suggest, to
programmatically enter your new station information into the "userwgn"
table in the SWAT2005.mdb database. This way, you'll have the stations
loaded in the database for future models

If you don't need to use the stations in other models, you'll be fine
with the .wgn files that you've already created.

Mike

Michael

unread,
Apr 9, 2008, 10:45:45 AM4/9/08
to ArcSWAT
Thanks Mike,

it seems like I also need to add a dbf file to the databases/weather/
subdirectory that lists these wgn stations. It seems like the dbf
file is necessary for the ArcSWAT Write Input Tables interface to get
past the Weather STations step, because i need to choose either the
included weather or choose custom.
> > Best of luck and peace- Hide quoted text -
>
> - Show quoted text -

Michael

unread,
Apr 11, 2008, 6:09:18 PM4/11/08
to ArcSWAT
How is it created, and what is required to create the Subwgn table in
my project's .mdb ?
Of course it is created using the ArcSWAT interface Write Input
Tables -> Weather Data Defintion -> Weather Generator Data. More
information please.

Does ArcSWAT use the SWAT2005.mdb? or does ArcSWAT use the weather
generator information in the /Databases/weather/ subdirectory in the
install location? or both?


The latest ArcSWAT manual on page 141 is excerpted below. The format
of the dbf table described in Section 3 referred to by p 141 is not
loaded by the above named interface because of error.


In the SWAT2005.mdb when does the US/weatherstations feature class get
created.

How can I create a feature class for my international weather
stations? The ArcSWAT interface doesnt permit browsing the install
SWAT2005.mdb.


IT SHOULD NOT BE THIS DIFFICULT TO IMPORT CUSTOM WEATHER.
WITH ALL DUE RESPECT, WHY ARE THE INTERFACE AND MANUAL SO DUMBED DOWN?


-------------------
excerpt p 141
--------------------
i. US database: The US database contains weather information for
1,041 stations around the United States and is provided with the
interface.
In order to load and geocode the US database, select the US
Database radio button .
Click the button.
ii. Custom database: This option is used to load custom weather
generator data stored in the User Weather Stations database.
Select the Custom database radio button .
Click the open file folder button next to the Locations Table text
box.
A file browser (Figure 7.3) allows you to select the location table
for
the weather generator stations. This table may be a dBASE or text
table format. The location table is prepared by the user following the
format described in Section 3.
--------------
end p 141
--------------


On Apr 7, 7:32 pm, Michael Winchell <mwinch...@stone-env.com> wrote:

Michael Winchell

unread,
Apr 12, 2008, 3:33:21 PM4/12/08
to ArcSWAT
Michael,

The process for implementing custom weather generator stations in an
ArcSWAT project is as follows:

1.) Create a weather generator station location file as described on
page 20 of the ArcSWAT manual. Note that there is a sample file in the
"\Databases\Example1\" folder.
2.) Load this weather generator location file as described on page 141
of the ArcSWAT manual.
3.) Load observed daily time series if you are using observed data.
4) When you have finished the inputs in the "Weather Data
Definition" , you will have created the "SubWgn" table in your project
geodatabase.
5.) Assuming you don't want to enter your weather station parameters
through the editor interface, import your custom weather stations into
the User Weather Stations database (table "userwgn" in the
SWAT2005.mdb database). The simplest way to do this is to open the
database in Access and use the Access import functionality to import
your stations directly into the "userwgn" table. The other option is
to append the new records using ArcCatalog Append Tool. The ArcCatalog
approach is described on page 338 of the ArcSWAT manual.


The WGN files in the "\Database\Weather\" folder are only used by the
potential heat units program (PHU) that runs when generating the SWAT
management files. Currently, the potential heat units program will
only run using this set of stations for the US.

Mike

Michael

unread,
Apr 14, 2008, 3:51:45 PM4/14/08
to ArcSWAT
Thank you very much.

Please see my notes intercalated with yours, below.

Actually i think the order you gave is incorrect. Step 5 must be done
first in order for the subwgn file correctly to be created in the
project geodatabase.

On Apr 12, 12:33 pm, Michael Winchell <mwinch...@stone-env.com> wrote:
> Michael,
>
> The process for implementing custom weather generator stations in an
> ArcSWAT project is as follows:
>
> 1.) Create a weather generator station location file as described on
> page 20 of the ArcSWAT manual. Note that there is a sample file in the
> "\Databases\Example1\" folder.

I did this. I copied the sample, renamed it, emptied it, then added
my record. See below.

> 2.) Load this weather generator location file as described on page 141
> of the ArcSWAT manual.

Does not work for the alternative table schemas as on page 20 with lat
and lon. Only works if i copy the sample table, clear it, then
populate it with my own data.
Even on loading the sample you specify, ArcSWAT generates an error
message: "Error in Loading the Table". However the error message is
misleading, because the subwgn is generated in the project
geodatabase. WHAT A PAIN!!! Ok so I have my subwgn in the project
database and it is populated with references to the correct weather
station data that was pre-loaded into the SWAT2005.mdb. I know this
because the MinDist offset has been correctly calculated.


> 3.) Load observed daily time series if you are using observed data.

nope. i have monthly stats, plus the precipitation stats derived from
daily.

> 4) When you have finished the inputs in the "Weather Data
> Definition" , you will have created the "SubWgn" table in your project
> geodatabase.

Yes see above.


> 5.) Assuming you don't want to enter your weather station parameters
> through the editor interface, import your custom weather stations into
> the User Weather Stations database (table "userwgn" in the
> SWAT2005.mdb database). The simplest way to do this is to open the
> database in Access and use the Access import functionality to import
> your stations directly into the "userwgn" table. The other option is
> to append the new records using ArcCatalog Append Tool. The ArcCatalog
> approach is described on page 338 of the ArcSWAT manual.

As mentioned before, i did this step ahead of time and
programmatically. Easier for me to write a program than doing Access
import or ArcCatalog append.
> > > - Show quoted text -- Hide quoted text -
Reply all
Reply to author
Forward
0 new messages