Converting to C++ and how to inverse ... PreviousNext
CAESAR discussion board > Model development >
Message/Author
Next message Tom Coulthard (Tom)  posted on Monday, September 06, 2010 - 11:53 am
Hello Florian
Back from Holiday...
OK, converting from C to C# took me about a weekend working fairly hard...
The hard bit will be the graphics. The basic calcs and some of the file input output will be fairly straightforward. A matter of changing the notation for arrays for example which can largely be done with find and replace. If you choose to stick with global variables it would me much easier (but not really in the c++ OO ethos..) if you make everything properly OO then it will take alot longer.

So, not too bad without any of the graphics or menu’s (just running from a file) but I have not got a clue about the forms/menu’s/graphics parts of c++ which always looked pretty hard to me..

Regarding the inverse modelling of the hydrology – there is a check box next to the rainfall data file box on the first tab (I think). This then reads in a text file with the discharge divided by they number of cells in the DEM (not including no-data’s). So you need to take your discharge record and divide it by #of cells (e.g. in excel etc..) then create a simple text file in the format of the rain data file...
Tom

From: florian
Subject: Estimated time for transfering CAESAR to C++

Hi Tom,

How are you doing? I hope everything is going fine!

Here we have discussed a bit the plan, which you have suggested, that I may rewrite CAESAR in C++ for the project in order to speed up the model. However, we have not even a rough idea how long it will take me to do so (some weeks, several months, a whole year...?). What would you estimate, how much time I will need?

You have mentioned that CAESAR is capable of doing hydrology backwards i.e. using the outflow of a catchment to calculate precipitation and flows (and as resulting sediment transport) within the catchment. Unfortunately, I haven't found this feature yet in the model. Where is it located in the GUI and especially in the code?

All the best,
Florian
Next message Tom Coulthard (Tom)  posted on Wednesday, October 06, 2010 - 09:30 am
An update on the inverse modelling of hydrology:

quote

Regarding the inverse modelling of the hydrology – there is a check box next to the rainfall data file box on the first tab (I think). This then reads in a text file with the discharge divided by they number of cells in the DEM (not including no-data’s). So you need to take your discharge record and divide it by #of cells (e.g. in excel etc..) then create a simple text file in the format of the rain data file...
Tom

/quote

No need to divide by the number of cells in the DEM in version 6.2m onwards - it now reads in the discharge directly.
Back to top
Add Your Message Here
Post:
Bold text Italics Underline Create a hyperlink Insert a clipart image

Username: Posting Information:
This is a private posting area. Only registered users and moderators may post messages here.
Password:
Options: Enable HTML code in message
Automatically activate URLs in message
Action: