Jump to content
TUFLOW Forum
peteraylett

Copying models...

Recommended Posts

Hi chaps,

Thanks for the introduction of the -ca flag to TUFLOW.exe, it's really useful for bundling up all related files in one go for model handover.

A couple of thoughts that could make it even more helpful in some cases:

1) Only produce place-holders for check files, rather than the full files. If you're just trying to handover the model input files, then you don't need the final versions of these, which are often relatively large (you wouldn't want to email them).

2) Be able to specify where the copy is written. A fellow modeller is working on a very limited network drive for doing the model build (lots of small files), but then writes all results and check files to a local external drive (large files). Not an unusual set-up I suspect. Unfortunately, the network drive in question isn't up to dealing with the check files his copy wants to produce!! That perhaps is more unusual. :) If he could tell it to make the copy to his local drive, that would solve his problems... As indeed, would idea 1 above.

Might either of those be possible? Can they already be done?! Any thoughts welcome.

Thanks,

PHA.

Share this post


Link to post
Share on other sites

Hi PHA,

Good suggestion about the option to specify the location for a model copy.

In regards to 1) is it possible to just comment out the Write Check Files commands from the .tcf and .ecf before running the model in copy mode? As the copy model doesn't do any hydraulic calcs (it bails out before writing the .2dm), the results files for the model copy should be small (less than 1Mb depending on the size of the 1D model)?

Cheers

Phillip

Share this post


Link to post
Share on other sites

Hi Peter

It's on the list! Regarding the check files, try commenting out or using "Write Check Files == OFF" in both the .tcf and .ecf files as Phil has suggested. This shouldn't write any check files.

Cheers

Bill

Share this post


Link to post
Share on other sites

Hi guys,

Thanks for the suggestion of just switching off the check file output; that is indeed what we did in the event. I normally make them and just delete them before sending; to have the place-marker check files and leave the wrote check file command would mean that the recipient of the model could tell that we had made check files and they would sit /here/ in the file structure. The recipient is then in a position where they can state that they just ran the model as provided with no alterations, but they still get the check files.

I guess it's not going to take long to comment out the line, make the copy and un-comment out the line in the copy (one could suggest I'm just being lazy by asking for this at all!) but I do think it's a neater solution to make the place-markers for the files, if it's not too much trouble for you... :)

Thanks for reading!

PHA.

Share this post


Link to post
Share on other sites

Further to above posts for Build 2010-10-AC two new options were added to the -c or -ca options:

1. Add "ncf" to not write check files.

2. Add "p <path>" to specify an alternative path for the model to be copied to.

For example, -cap "C:\put_model_here" will write all model files including original layers into a folder C:\put_model_here (make sure there is a space after -cap and use quotes if there are spaces in the pathname).

Another example would be -cncf which would copy the essential input files excluding the check files.

Also note that the minor bugs below were fixed in Build 2011-09-AD:

1. Fixed bug that did not copy a file when using –c or –ca if the path to the file included a forward slash. TUFLOW is happy to accept forward slashes in pathnames, but when copying a model these files were omitted.

2. Fixed bug that when copying a model using –c or –ca the existing .xmdf file was deleted (and therefore the results for that simulation were lost!). This bug does not occur for .dat files.

Cheers

Bill

Share this post


Link to post
Share on other sites

I can't seem to get the -cap flag to work. This would be useful for the model I'm currently trying to copy, as it isn't able to compile just using the -ca flag. I suspect the filepath is too long, exceeding the 1000 character limit.

 

Could anyone clarify the syntax of the command? I've tried the following to no avail:

 

TUFLOW.exe -cap "C:\put_model_here" my_model.tcf

 

Thanks

Share this post


Link to post
Share on other sites

TUFLOW.exe -cap "C:\put_model_here" my_model.tcf

 

Hi Stephanie,

 

Having the exact error message or description of the behaviour would make it easier to help out.  However, the .tcf filename should include the filepath when running TUFLOW in copy mode.  The following works for me.

 

start "TUFLOW" C:\TUFLOW\Releases\2012-05\w64\TUFLOW_iSP_w64.exe -cap c:\temp\ C:\TUFLOW\Tutorial_Wiki\TUFLOW\runs\M04_5m_001_MI.tcf

 

Let us know if this doesn't resolve the issue.

 

Cheers

Phillip

Share this post


Link to post
Share on other sites

Hi Phillip,

 

Thanks for looking into this. I've figured out what the problem is. The -cap flag doesn't seem to be supported for 32bit TUFLOW. When the batch file is run in 32bit, TUFLOW is started but the copying of the model is not, i.e. the behaviour is the same as if I double-clicked on the TUFLOW exe. When run in 64bit, the model successfully copies to the specified location in the batch file. I've tested this for 2010 and 2012 32/64bit versions of TUFLOW with the same result.

Share this post


Link to post
Share on other sites

Thanks for the update Stephanie. We'll investigate, as the behaviour should be the same for 32 and 64 bit versions of TUFLOW!

Share this post


Link to post
Share on other sites

HI Stephanie,

 

It seems to be working here for me.  Are you able to email through the log files  (.tlf) for the 32 bit and 64 bit copy runs to support@tuflow.com.  Can you also include the batch file, however, to get around email filters, can you please change the extension from .bat to .txt.

 

Thanks

Phillip

 

Share this post


Link to post
Share on other sites

Hi all,

 

Is the "Copy All" -ca command meant to copy over source files used for generating xf files?

I noticed that, for the .txt files that I used for the Read Grid ZPTs == command, some of the original .txt files were not copied over.

 

The problem can be fixed by turning XF files off in the .tcf, but it would be nice if it was possible through the batch -ca command.

 

Regards,

Danny

Share this post


Link to post
Share on other sites

Old thread alert! ^_^ However, it seems a good place for the following...

I wonder if we could have quite the opposite of what I first asked for way back when, and have an option to make the copied model much larger! This time, by looking in the place where model results would be being written, if the simulation was actually happening, and if there is anything there (with the right name) then copy that into the copy of the model. Just to make things easier to bundle up together for issue.

It may be that this would fit much better with the -pm option, rather than -c, but I'm still a little wary of -pm as it's done the occasional funny thing when dealing with a model with lots of scenarios (while -c will always perform flawlessly).

Alternatively, perhaps a completely separate utility that just goes and gets the results (I don't always want another copy of the model, I just want the results collated) ight be a good idea..?

Thoughts very welcome! It may be that there's some neat and clever way of doing the above already? I normally just do it manually, but copying a few files from the main Results/ folder, then some from plot/, then csv/ and gis/, then the .flts from grids/ all gets a little tedious! So anything to speed up the process would be appreciated.

Thanks!

Peter.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...