#1 (permalink)  
Old 05-06-2003, 09:31 PM
jeremy.nitka
Member
 
Posts: n/a
Rain User Defined Input

Can anyone help me set up the B2 line for the Rain module for the user
defined rainfall data set below?

1940/01/01 00:00 0.000
1940/01/01 01:00 0.000
1940/01/01 02:00 0.000
1940/01/01 03:00 0.000
1940/01/01 04:00 0.000
1940/01/01 05:00 0.000
1940/01/01 06:00 0.000
1940/01/01 07:00 0.000
1940/01/01 08:00 0.000
1940/01/01 09:00 0.000
1940/01/01 10:00 0.000
1940/01/01 11:00 0.000
1940/01/01 12:00 0.000
1940/01/01 13:00 0.000
1940/01/01 14:00 0.000
1940/01/01 15:00 0.000
1940/01/01 16:00 0.000
1940/01/01 17:00 0.000
1940/01/01 18:00 0.000
1940/01/01 19:00 0.000
1940/01/01 20:00 0.000
1940/01/01 21:00 0.000
1940/01/01 22:00 0.000
1940/01/01 23:00 0.000
1940/01/02 00:00 0.000

Thank you

Jeremy
jeremy.nitka@TRIADENGINEERING.COM
Reply With Quote
  #2 (permalink)  
Old 05-06-2003, 09:32 PM
jeremy.nitka
Member
 
Posts: n/a
Re: Rain User Defined Input

Thank you Mitchell for you help. I was able to run the model and achieve the desired results. Can you recommend any Fortran references to learn more about how to set up variable like the FIRMAT, the SWMM manual is lacking in this area?

Rob, I am having trouble sending you email directly. Please send me an email off the list to review the method of bringing the rainfall data in through PCSWMM.

Jeremy jeremy
nitka@TRIADENGINEERING.COM
Reply With Quote
  #3 (permalink)  
Old 05-06-2003, 09:33 PM
heinemanm
Member
 
Posts: n/a
Re: Rain User Defined Input

Back in the days when the SWMM manual was written (and dinosaurs still roamed the earth), it was probably assumed that modelers knew Fortran. Alas, Fortran is now becoming the Latin of computer languages. A quick Google search for fortran format statements turned up numerous promising looking narratives, including this one: http://www.phy.nau.edu/~bowman/PHY52...17_format.html

Mitch Heineman
HeinemanM@CDM.COM
Reply With Quote
  #4 (permalink)  
Old 05-06-2003, 09:34 PM
rob
Member
 
Posts: n/a
Re: Rain User Defined Input

Jeremy,

I'm not sure how to get the program to read and discard non numeric characters, I would try something like 'I4,I1,I2,I1,I2,I3,I1,I2,F10.0' with the columns assigned:

year=1 month=3 day=5 hour=6 minute=8 value=9

The I1's should probably be replaced with a string type, but I'm not sure of what that is. However there are two alternatives, one is to process the file to remove all slashes and colons, giving you:

19400101 0000 0.000
19400101 0100 0.000
19400101 0200 0.000

In which case 'I4,2I2,I3,I2,F10.0' should work fine. The other is to load the file into PCSWMM's graph tool and choose the Export to User-defined rainfall file option. If you need help with the latter, you can contact us directly.

Sincerely,

Rob James, P.Eng.
rob@COMPUTATIONALHYDRAULICS.COM
Reply With Quote
  #5 (permalink)  
Old 05-06-2003, 09:35 PM
heinemanm
Member
 
Posts: n/a
Re: Rain User Defined Input

Jeremy,

I'm not sure how to get the program to read and discard non numeric characters, I would try something like 'I4,I1,I2,I1,I2,I3,I1,I2,F10.0' with the columns assigned:

year=1 month=3 day=5 hour=6 minute=8 value=9

The I1's should probably be replaced with a string type, but I'm not sure of what that is. However there are two alternatives, one is to process the file to remove all slashes and colons, giving you:I don't know if Rob's idea would work, but here's how I'd do it:

SW 1 8 9
MM 5 11 12 13 14 15
@ 8 rain.dat
@ 9 rain.int
$RAIN
A1 '60 min precip'
A1 ' '
* IFORM ISTA IDECID IYBEG IYEND IYEAR ISUM MIT NPTS IFILE A
NOSTAT
B1 3 0 1 0 0 0 1 12 100 0 0 0
* THISTO METRIC KUNIT FIRMAT CONV F1 - F7
B2 60 0 1 '(i4,4(1x,i2),f6.3)' 1 0 1 2 3 4 5 6
$ENDPROGRAM

Regards,
Mitch Heineman, P.E. DEE
HeinemanM@CDM.COM
Reply With Quote
  #6 (permalink)  
Old 05-06-2003, 09:36 PM
njordan
Member
 
Posts: n/a
Re: Rain User Defined Input

I just finished using RAIN block for an interevent time analysis using 26 years of hourly precipitation records provided by WRCC. I used the following FIRMAT statement to read around the non-numeric characters:

I4,2I3,4X,I4,1X,23(I3,1X)

The 1X parts in the FIRMAT format instruct the read to skip the footnote characters in the record. Each line in the record consisted of Year, Month, Day, Number of non-zero entries, and up to 24 precipitation entries in units of hundredths. Some of the precipitation entries were followed by character notes. Most of the non-rainfall entries were blank, and not 0. Some of the entries were 0T. The absence of an entry carried as much significance as a numeric entry.

Neil Jordan
NJordan@EXPONENT.COM
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 09:46 AM.