-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
25 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,17 @@ | ||
function make_rain_input(n) | ||
% create moisture_input.txt for a given number of time steps | ||
% should give 1.723 fotr 14-hour wetting time lag | ||
mm=[14*[0:n]'/n,ones(n+1,1)*[300,1e5,0.01],1e3*[0:n]'/n]; | ||
save('moisture_input.txt','mm','-ascii') | ||
function make_rain_input(n,mmph,hours) | ||
% create moisture_input.txt for moisture_test.exe | ||
% usage: make_rain_input(n,mmph) | ||
% input: | ||
% n number of time steps | ||
% mmph rain intensity mm/h | ||
% hours length of simulation in hours | ||
% example | ||
% make_rain_input(n,100,14) should give 1.723 for 14-hour wetting time lag | ||
% | ||
% note: the last line in the output from moisture_test.exe | ||
% should not depend on n | ||
|
||
mm=[hours*[0:n]'/n,ones(n+1,1)*[300,1e5,0.01],mmph*hours*[0:n]'/n]; | ||
save('moisture_input.txt','mm','-ascii') | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
0.0000000e+00 3.0000000e+02 1.0000000e+05 1.0000000e-02 0.0000000e+00 | ||
2.0000000e+00 3.0000000e+02 1.0000000e+05 1.0000000e-02 1.4285714e+02 | ||
4.0000000e+00 3.0000000e+02 1.0000000e+05 1.0000000e-02 2.8571429e+02 | ||
6.0000000e+00 3.0000000e+02 1.0000000e+05 1.0000000e-02 4.2857143e+02 | ||
8.0000000e+00 3.0000000e+02 1.0000000e+05 1.0000000e-02 5.7142857e+02 | ||
1.0000000e+01 3.0000000e+02 1.0000000e+05 1.0000000e-02 7.1428571e+02 | ||
1.2000000e+01 3.0000000e+02 1.0000000e+05 1.0000000e-02 8.5714286e+02 | ||
1.4000000e+01 3.0000000e+02 1.0000000e+05 1.0000000e-02 1.0000000e+03 | ||
2.0000000e+00 3.0000000e+02 1.0000000e+05 1.0000000e-02 2.0000000e+02 | ||
4.0000000e+00 3.0000000e+02 1.0000000e+05 1.0000000e-02 4.0000000e+02 | ||
6.0000000e+00 3.0000000e+02 1.0000000e+05 1.0000000e-02 6.0000000e+02 | ||
8.0000000e+00 3.0000000e+02 1.0000000e+05 1.0000000e-02 8.0000000e+02 | ||
1.0000000e+01 3.0000000e+02 1.0000000e+05 1.0000000e-02 1.0000000e+03 | ||
1.2000000e+01 3.0000000e+02 1.0000000e+05 1.0000000e-02 1.2000000e+03 | ||
1.4000000e+01 3.0000000e+02 1.0000000e+05 1.0000000e-02 1.4000000e+03 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters