TSUnami FLow INversion from Deposits
Hui Tang and I think that this is a clever name. In this blog, I would like to show what is needed to run the code. You can download the code from github.com. Note that the code is not pretty at the moment. Hui and I will be working on making it easier to understand. We plan to make it possible to interact with the code via an ipython/jupyter notebook instead of an input file and also actually write a real manual. To run TSUFLIND you need to have python with some extra libraries or modules installed. To keep this simple, you can download the full stack from Enthought or Anaconda. A quick google search will help you to get started on this. Here, I am going to assume that you have python available. TSUFLIND runs, at least theoretically, on any machine. We have tested it on OSX and Linux (my preference). I also tested it with the pythonista app on the iPad..it runs like a charm. For more information about TSUFLIND from a scientific point of view please read Tang and Weiss (2015, link).
1. Installation
To install the TSUFLIND, I will assume that you will use the command line to retrieve it from github. There are desktop Applications for those less familiar with the command line that you could use instead. If you want to brave the command line, here is how you do it:
2. Parameters
All the parameter necessary to run TSUFLIND are in the file parameter_P14abc.txt. The filename does not make much sense, but please don't change it. If you open the file in a text editor, you will see that there are 59 lines in that file, and every line not containing # is important. However, most of the lines do not need to be changed and most of the parameters are self explanatory. The first important line is 37: water_run_up, which is exactly what you have. Line 39 is also important, which contains the slope given as 1/ . Lines 37 and 39 are both used in the Soulsby model. If you do not know these values, please estimate them. While it is good to know these parameters in great detail, I will provide more information on that topic in a later blog post. Line 43 denotes the number of samples you have and line 47 gives the file name (sample_P14abc.csv) containing the respective grain-size distributions of the samples. The last important line is 53. The named file (test.csv) contains the location along the slope and the total thicknesses of the deposits.
Running TSUFLIND and Final Remarks
When you are done with your modifications of parameter_P14abc.txt and test.csv you will need to run main.py. From the command line you can type python main.py. If you see something like the following..you are good:
bash prompt$ python main.py
# Outputting to File[data_process.csv]:
[>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>]
# Outputting to File[sample00.csv]:
[>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>]
# Outputting to File[sample01.csv]:
[>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>]
and then:
====================================running====================================
...everything is fine. Just give it some time to do the magic.
Let me make some final remarks: TSUFLIND is a research code at is present stage and this not a full manual. However, it gives a software to "play" around and learn about sensitivities. Playing around with models is extremely important in order to learn what they can and cannot do. If you did not change any the files ending with py and the model does not run you did not screw up the model...just the input files. I hope to write another blog post about TSUFLIND soon that will serve more as a tutorial. If you have any questions, trouble, or want to use TSUFLIND for a specific example that you cannot get to run, please to not hesitate to contact me at [email protected]
1. Installation
To install the TSUFLIND, I will assume that you will use the command line to retrieve it from github. There are desktop Applications for those less familiar with the command line that you could use instead. If you want to brave the command line, here is how you do it:
- Navigate to the directory into which you want install TSUFLIND
- Type git clone https://github.com/CoastalHazardsVT/TSUFLIND_pd.git
- Enjoy.
2. Parameters
All the parameter necessary to run TSUFLIND are in the file parameter_P14abc.txt. The filename does not make much sense, but please don't change it. If you open the file in a text editor, you will see that there are 59 lines in that file, and every line not containing # is important. However, most of the lines do not need to be changed and most of the parameters are self explanatory. The first important line is 37: water_run_up, which is exactly what you have. Line 39 is also important, which contains the slope given as 1/
Running TSUFLIND and Final Remarks
When you are done with your modifications of parameter_P14abc.txt and test.csv you will need to run main.py. From the command line you can type python main.py. If you see something like the following..you are good:
bash prompt$ python main.py
# Outputting to File[data_process.csv]:
[>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>]
# Outputting to File[sample00.csv]:
[>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>]
# Outputting to File[sample01.csv]:
[>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>]
and then:
====================================running====================================
...everything is fine. Just give it some time to do the magic.
Let me make some final remarks: TSUFLIND is a research code at is present stage and this not a full manual. However, it gives a software to "play" around and learn about sensitivities. Playing around with models is extremely important in order to learn what they can and cannot do. If you did not change any the files ending with py and the model does not run you did not screw up the model...just the input files. I hope to write another blog post about TSUFLIND soon that will serve more as a tutorial. If you have any questions, trouble, or want to use TSUFLIND for a specific example that you cannot get to run, please to not hesitate to contact me at [email protected]