MapWindow 4 - Plugins : MapWindow Discussion Forum
Goodevening I'm using mapwindow since one week for a project in my univesity. My knowledges in this kind of programs aren't very good. I have to use the plug in MWSWAT. I hope some people have already used this. With this plug in, you can delineate watersheds. T
Pages: 12Next
Current Page: 1 of 2
MWSWAT
Posted by: tygo ()
Date: August 11, 2008 01:29PM

Goodevening

I'm using mapwindow since one week for a project in my univesity. My knowledges in this kind of programs aren't very good.
I have to use the plug in MWSWAT. I hope some people have already used this.

With this plug in, you can delineate watersheds. There are three steps of processing when you build a project with mwsmat. I succed the first one wich is the watershed delineation. The second one is to activate the "hydrologicalresponse units" HRUs.
When I ask to the software to read, I have o problem and the sofware advertises for an error telling me this : "System.Data.OleDb.OleDbException:The number of values of the application must coincide with the number of fields destination"

I would like to know if someone, when he was using this plug-in as beginner like me, had had to face with this problem. I have chocked all my projections which are correct.
This represent a big problem for me because I have make a presentation of this project in ten days.
THank you for helping me and so sorry for my english :)

Options: ReplyQuote
Re: MWSWAT
Posted by: Chris George ()
Date: August 11, 2008 09:54PM

Hi,

Sorry you have a problem. I have had the same error reported once before. We never found out a cause - when I built a new version with more diagnostics the error went away: it looked like some kind of corruption. So let's hope it will disappear again.

I don't have an email address for you, and I can't make attachments to forum messages, so I have placed mwswatdlls.zip in our ftp site ftp.iist.unu.edu in /pub/cwg/mwswat. In the zip file are CreateHRU.dll and MWSWAT.dll. These need to be unpacked into C:\Program Files\MapWindow\Plugins\MWSWAT, where they should replace two files of the same names.

If the error persists you will find a file dberrors.txt in your project folder (same folder as the .mwprj file) and in the same folder there is a .mdb file (Access database). You should send the database and the dberrors.txt file to me at cwg@iist.unu.edu.

Let's hope that is not necessary. Let me know how it goes.

Regards,

Chris

PS It is generally better to report bugs to [bugs.mapwindow.org]

Options: ReplyQuote
Re: MWSWAT
Posted by: tygo ()
Date: August 12, 2008 02:54AM

Hi chris,

I would like to thank you so much, my problem is resolved. I placed the .dll files in the plug in folder as you said and tried to create my HRU's and it succed !
I can now go on with no stress !

Thank you!

Laurent

Options: ReplyQuote
Re: MWSWAT
Posted by: pmeems ()
Date: August 12, 2008 12:32PM

@Chris George,

It looks like you've fixed a bug. Could you add your changes to SVN so in the next release this bug is fixed for everyone?

Thanks.

Paul

--
Don't forget to read the new documentation: www.mapwindow.org/documentation/mapwingis4.8
Join us Google+: MapWindow GIS Google+ Community
Join the MapWindow Group on LinkedIn! LinkedIn - MapWindow Group

Download the latest beta installer at:
tinyurl.com/mwMonthly 32-Bit
tinyurl.com/mwMonthlyx64 64-Bit
Follow me on Twitter MapWindow_nl to read when a new installer is published.

---
Paul Meems
The Netherlands
[www.bontepaarden.nl]
Release manager, configuration manager and
forum moderator of MapWindow GIS

Owner of MapWindow.nl - Support for
Dutch speaking users: www.mapwindow.nl

*******
Everything I say or write is my personal opinion and
not the opinion of the company I work for.
*******
View my profile on LinkedIn

Options: ReplyQuote
How to Create HRU from shapefile data?
Posted by: Gandjar GR ()
Date: March 18, 2009 02:30AM

I am using my own landuse and soil data in shp format whereas mwswat using tiff format from global data. What should I do?

Options: ReplyQuote
Re: How to Create HRU from shapefile data?
Posted by: Chris George ()
Date: March 21, 2009 03:48PM

MWSWAT actually uses a rasters for landuse and soil: the example datasets happen to be GeoTiff rasters: any raster format is OK.

MWSWAT cannot convert from shape to raster. There is a function ShapefileToGrid available in MapWinGeoProc:Utils but you would have to write a small plugin to use this. Otherwise you can look for another tool: ArcGIS can certainly do this and GRASS has a v.to.rast command.

If you are completely stuck you can send me (cwg at iist.unu.edu) the files and I will try to convert them, but please be aware I am travelling at present and may not be able to respond very quickly.

Options: ReplyQuote
Re: MWSWAT
Posted by: kulenbek ()
Date: August 15, 2012 02:26PM

Hello,
I have faced a problem to read the landuse and soil type classifications in different colors which are coded in HRUs step of MWSWAT model. I have not found the answer in the input/output documentation. How to read them? I mean what does the land use code like URMD or CRDY? Please I need your help.

e.g. in the legend of land cover map I have the folowing:
URMD, CRDY, CRIR, CRIR, CRGR ect. and

in the legend of soil map I have the following:
I-Bh-2c-3094, XI16-26-3315, I-K-2c-3715 ect.

Options: ReplyQuote
Re: MWSWAT
Posted by: kulenbek ()
Date: August 16, 2012 05:57AM

Dear Chris George,

Hello,
I have faced a problem to read the landuse and soil type classifications in different colors which are coded in HRUs step of MWSWAT model. I have not found the answer in the input/output documentation. How to read them? I mean what does the land use code like URMD or CRDY? Please I need your help.

e.g. in the legend of land cover map I have the folowing:
URMD, CRDY, CRIR, CRIR, CRGR ect. and

in the legend of soil map I have the following:
I-Bh-2c-3094, XI16-26-3315, I-K-2c-3715 ect.

Thanks in advance,

I look forward tó hearing from you soon.

Kind regards,

Kulenbek

Options: ReplyQuote
Re: MWSWAT
Posted by: Chris George ()
Date: August 16, 2012 12:25PM

For the meaning of the landuse abbreviations, look in
C:\Program Files\MapWindow\Plugins\MWSWAT\Databases\SWAT2005.mdb or
C:\Program Files\MapWindow\Plugins\MWSWAT2009\Databases\SWAT2009.mdb
at the table "crop". There you will find an expansion of the name, so CRDY for example is "dryland cropland and pasture". The other fields in this table are described in the SWAT I/O documentation, chapter 14.

For landuses starting with "U" the table is "urban" instead of "crop", and the relevant chapter is 18.

For soils, look in the table "usersoil" in your project database, or
C:\Program Files\MapWindow\Plugins\MWSWAT\mwswat.mdb or
C:\Program Files\MapWindow\Plugins\MWSWAT2009\mwswat2009.mdb. For the meanings of the fields look in chapter 22 of the SWAT I/O documentation.

Chris

Options: ReplyQuote
Re: MWSWAT
Posted by: kulenbek ()
Date: August 16, 2012 01:13PM

Dear Chris George,

Thank you very much for your reply. Now everything is much more clear and understanable.

Kind regards,

Kulenbek

Options: ReplyQuote
Re: MWSWAT
Posted by: kulenbek ()
Date: August 20, 2012 02:21AM

Dear Chris,

I am using MWSWAT v2.0. based on MW 4.8.6. I have an issue in the step 4 (Visualise). Step by step I have chosen "subbasin" as SWAT output, then static data, then the variables like "SURQmm","GW_Qmm", "PRECIPmm", "ETmm" ect., after that the summary "Annual means", then clicked on "save", finally I have got an error message like

MWSWAT "Cannot parse 0 0.00 for variable CBODU mg/l at position 224 and width 10. Using zero for value" and
"Cannot parse 0 0.00 for variable DOXQ mg/l at position 234 and width 10. Using zero for value."

Waht is this error? How could I fix this issue?

Please I nead your help.

Kulenbek

Options: ReplyQuote
Re: MWSWAT
Posted by: Chris George ()
Date: August 20, 2012 04:47PM

The error is in the structure of the subbasins output file output.sub. I reported it to the SWAT maintainers some time ago but it persists. To fix it just delete the last two fields, CBODU and DOXQ, from the "Choose variables" list before saving.

If you need these fields, then you need to make the entry for CHOLA in output.sub finish in column 223 instead of 224. The easiest way (thought I can't guarantee this will work for all values of this field) is to do a global edit to replace " ." with "."

Chris

Options: ReplyQuote
Re: MWSWAT
Posted by: kulenbek ()
Date: August 21, 2012 04:15AM

Dear Chris,

It is working. I really appraciate your help.

Kulenbek

Options: ReplyQuote
Re: MWSWAT
Posted by: kulenbek ()
Date: August 24, 2012 02:03AM

Dear Chris,

I would like to ask about using wgn.file by the MWSwat modelling.
I have got 22 wgn.files for each 22 weather stations in the watershed of my study area, which was calculated using the WGNmaker4 program which is developed by Mr. Gabrielle Boisrame.
The MWSwat model actually uses only one wgn.file for all stations at a time doesn't it? Is that correct or not? However, if it is so the WGNmaker4 program has no a tool which can combine all wgn.files of 22 stations and cannot make one combined wgn.file.
My question is should I run MWSwat modelling 22 times using each 22 wgn.files of 22 weather stations separately or I should combine 22 wgn.file (I mean to calculate an avarage of those data) into one wgn.file and then use this combined wgn.file in MWSwat modelling?

I need your help.

Kulenbek

Options: ReplyQuote
Re: MWSWAT
Posted by: Chris George ()
Date: August 24, 2012 01:09PM

Dear Kulenbek,

MWSWAT can use multiple sets of wgn data if the data is made into a table like the wgn_US table in your project database. Copy the structure of this table using Access (make a copy and choose structure, and give it a name incluing "wgn", like "my_wgn") and then insert your data - sorry I don't know a way to do this other than manually. Then MWSWAT will make a wgn file for each subbasin, using the data from the nearest station.

Chris

Options: ReplyQuote
Re: MWSWAT
Posted by: kulenbek ()
Date: August 26, 2012 02:07AM

Dear Chris,

Thnak you for your reply and help.
I have followed your instructions and filled in new database table (copied and chose structure) with my data (called wgn_IK). I have got pop-up message on the step 3 of mvSWAT model during writing a file. I quess I did something wrong. That message is following:

Cannot read wgn table wgn_IK: System.IO.Invalid data Exception: Cannot read system double field as string
at creat HRU.mwSWATUtils: read filedAsString (Ole DbDataReader reader, Int32.indx)
at creat HRU.mwSWATDbUtils: Populate wgn table (SortedDictionary '2basins, mwSWAT Globals globals)

What should I do?

Kulenbek

Options: ReplyQuote
Re: MWSWAT
Posted by: Chris George ()
Date: August 27, 2012 06:55AM

Dear Kulenbek,

The only field in the wgn_IK table that is read as a string is the second, so make sure in Access (choose design view of your table) that the second field, "STATION", is type Text.

Chris

Options: ReplyQuote
Re: MWSWAT
Posted by: kulenbek ()
Date: August 27, 2012 10:35AM

Dear Chris,

Thank you very much for your help. That is great. It works fine.

Kulenbek

Options: ReplyQuote
Re: MWSWAT
Posted by: doxter zaib ()
Date: April 26, 2013 11:53AM

What is the procedure to make WGN file of each station,please send me a sample file,how to make precipitation and temperature file,either they are in same file or i have to make each file separately ?

Options: ReplyQuote
Re: MWSWAT
Posted by: doxter zaib ()
Date: April 26, 2013 11:55AM

my land use data shows error in MWSWAT, when i am ging to reproject it it shows "microsoft visual c++ runtime error"
only for land use data i face this error in Map Window 4.8.7.5 version,while for soil data there is no error.

Attachments: land error.png (171.2 KB)  
Options: ReplyQuote
Pages: 12Next
Current Page: 1 of 2


Sorry, only registered users may post in this forum.





Banner Exchange




GISCP.com




Send us your banner logo (160x120) for the space above, and add this MapWindow banner ad to your site:

Just paste this text in your page: