SMS:PTM Source File

From XMS Wiki
Jump to: navigation, search

The PTM sediment source file contains the time varying location and parameters assigned to a source.

File Overview

The first line contains the number of Instant Mass Sources, NIMS. This is a single integer value. Any comments can follow on the line, e.g.:

    1 Instant Mass Source(s)

This is followed by NIMS blocks of data. Each block of data contains:

  • An identification line giving the source id number, the number of instructions, NIS, and a label. In this example, there is one instant mass source, known as “My Instant Mass Source”, that has an id of zero and two instructions:
    0  2  My Instant Mass Source
  • NIS lines of instructions giving the time to issue the instruction (year, month, day, hour, minute, second), the x, y, and z location of the point at that time (m), the mass of each parcel (kg), the horizontal radius of the source (m), the vertical radius of the source, the mass of the source (kg), the grain size (m), the standard deviation of the sediment distribution (Phi-units), the density (kg/m^3), the fall velocity (-1 to have PTM compute) (m/sec), Tau critical initiation (-1 to have PTM compute) (N/m^2), and Tau critical deposition (-1 to have PTM compute) (N/m^2) e.g.;
    2004 10 6 12 0 0 4.76400000000000e+003 2.63800000000000e+003 8 2 1 1 180 2e-007 0.8 2650 -1 -1 -1
    2004 10 7 20 0 0 4.76400000000000e+003 2.63800000000000e+003 8 2 1 1 180 2e-007 0.8 2650 -1 -1 -1

The next set of data contains information for Point Mass Rate Sources. This begins with the number of Point Mass Rate sources, NPMRS. This is a single integer value. Any comments can follow on the line, e.g.:

    2 Point Mass Rate Source(s)

This is followed by NPMRS blocks of data. Each block of data contains:

  • An identification line giving the source id number, the number of instructions, NIS, and a label. e.g.:
    0  4  My Mass Rate Source
  • NIS lines of instructions giving the time to issue the instruction (year, month, day, hour, minute, second), the x, y, and z location of the point at that time (m), the horizontal radius of the source (m), the vertical radius of the source, the mass rate of the source (kg/s), the grain size (m), the standard deviation of the sediment distribution (Phi-units), the density (kg/m^3), the fall velocity (-1 to have PTM compute) (m/sec), Tau critical initiation (-1 to have PTM compute) (N/m^2), and Tau critical deposition (-1 to have PTM compute) (N/m^2) e.g.;
    2004 10 6 10 0 0 4.74500000000000e+003 3.76200000000000e+003 10 2 2 2 0.05 2e-006 0.8 2650 -1 -1 -1
    2004 10 6 11 0 0 4.74500000000000e+003 3.76200000000000e+003 10 2 2 2 0.05 2e-006 0.8 2650 -1 -1 -1
    2004 10 6 11 0 1 4.74500000000000e+003 3.76200000000000e+003 10 2 2 2 0    2e-006 0.8 2650 -1 -1 -1
    2004 10 7 20 0 0 4.74500000000000e+003 3.76200000000000e+003 10 2 2 2 0    2e-006 0.8 2650 -1 -1 -1

The next set of data contains information for Line Sources. This begines with the number of Line Sources, NLS. This is a single integer value. Any comments can follow on the line, e.g.:

   1 Line Source(s)

This is followed by NLS blocks of data. Each block of data contains:

  • An identification line giving the line source id number, the number of insturctions, NIS, and a label, e.g.:
    1  4  My Horizontal Line Source
  • NIS lines of instructions giving the time to issue the instruction (year, month, day, hour, minute, second), the x, y, and z location of the first end point of the line at that time (m), the x, y, and z location of the second end point of the line at that time (m), the horizontal radius of the source (m), the vertical radius of the source, the mass rate of the source (kg/s/m), the grain size (m), the standard deviation of the sediment distribution (Phi-units), the density (kg/m^3), the fall velocity (-1 to have PTM compute) (m/sec), Tau critical initiation (-1 to have PTM compute) (N/m^2), and Tau critical deposition (-1 to have PTM compute) (N/m^2) e.g.;
    2004 10 6 18 0 0 3.57500000000000e+003 3.84500000000000e+003 10 3.57500000000000e+003 1.57000000000000e+003 10 2 1 1 2.2e-005 2.5e-008 0.8 2650 -1 -1 -1
    2004 10 6 19 0 0 3.57500000000000e+003 3.84500000000000e+003 10 3.57500000000000e+003 1.57000000000000e+003 10 2 1 1 2.2e-005 2.5e-008 0.8 2650 -1 -1 -1
    2004 10 6 19 0 1 3.57500000000000e+003 3.84500000000000e+003 10 3.57500000000000e+003 1.57000000000000e+003 10 2 1 1 0        2.5e-008 0.8 2650 -1 -1 -1
    2004 10 7 20 0 0 3.57500000000000e+003 3.84500000000000e+003 10 3.57500000000000e+003 1.57000000000000e+003 10 2 1 1 0        2.5e-008 0.8 2650 -1 -1 -1

The next set of data contains information for Polygon Sources. The points must be ordered using a standard counter-clockwise convention. This begins with the number of Polygon Sources, NPS. This is a single integer value. Comments can follow on the line, e.g.:

    1 Polygon Source(s)

This is followed by NPS blocks of data. Each block of data contains:

  • An identification line giving the source id number, the number of instructions, NIS, and a label, e.g.:
    1 2 My Polygon Source
  • NIS blocks of instructions. Each block of instructions contains:

A line with the time to issue the instruction (year, month, day, hour, minute, second). For each point in the polygon (1 point per line), the x, y, and z location of the point (m). The final line of the block of instructions contains the horizontal radius of the source (m), the vertical radius of the source (m), the mass rate of the source (kg/s/m^2), the grain size (m), the standard deviation of the sediment distribution (Phi-units), the density (kg/m^3), the fall velocity (-1 to have PTM compute) (m/sec), Tau critical initiation (-1 to have PTM compute) (N/m^2), and Tau critical deposition (-1 to have PTM compute) (N/m^2) e.g.;

    2000  1    1 8 0 0
     2451 4195 2
     2453 4560 2
     2183 4544 2
     2000 4342 2
     2261 4129 2
    1     0    0 .00001 0.0003 0.4 2650 -1 -1 -1

The following list summarizes the rules for construction of a sediment source file:

  • Data files must contain an entry stating the number of each type of sediment source, even if one or more sediment source types are not used.
  • All sediment sources are time varying and are accompanied by a list of instructions.
  • Linear interpolation between instructions is used to obtain source characteristics at a given time. All characteristics are interpolated. A constant source can be defined by two instructions with all data, except the start and stop times constant.
  • The final instruction must have a time later than the stop time of the model.

Example Source File

1 Instant Mass Source(s)
 3  2  My Instant Mass Source
  2004 10 6 12 0 0 4.76400000000000e+003 2.63800000000000e+003 8 2 1 1 180 2e-007 0.8 2650 -1 -1 -1
  2005 10 6 20 0 0 4.76400000000000e+003 2.63800000000000e+003 8 2 1 1 180 2e-007 0.8 2650 -1 -1 -1
2 Point Mass Rate Source(s)
 2  4  My Moving Point Mass Rate Source
  2004 10 6 16 0 0 4.09100000000000e+003 3.37500000000000e+003 8 2 3 3 0.05 5e-008 0.8 2650 -1 -1 -1
  2004 10 6 17 0 0 4.18600000000000e+003 1.90700000000000e+003 8 2 3 3 0.05 5e-008 0.8 2650 -1 -1 -1
  2004 10 6 17 1 0 4.09100000000000e+003 3.37500000000000e+003 8 2 3 3 0 5e-008 0.8 2650 -1 -1 -1
  2005 10 6 20 0 0 4.09100000000000e+003 3.37500000000000e+003 8 2 3 3 0 5e-008 0.8 2650 -1 -1 -1
 1  4  My Point Mass Rate Source
  2004 10 6 10 0 0 4.74500000000000e+003 3.76200000000000e+003 10 2 2 2 0.05 2e-006 0.8 2650 -1 -1 -1
  2004 10 6 11 0 0 4.74500000000000e+003 3.76200000000000e+003 10 2 2 2 0.05 2e-006 0.8 2650 -1 -1 -1
  2004 10 6 11 1 0 4.74500000000000e+003 3.76200000000000e+003 10 2 2 2 0 2e-006 0.8 2650 -1 -1 -1
  2005 10 6 20 0 0 4.74500000000000e+003 3.76200000000000e+003 10 2 2 2 0 2e-006 0.8 2650 -1 -1 -1
1 Line Source(s)
 4  4  My Horizontal Line Source
  2004 10 6 18 0 0 3.57500000000000e+003 3.84500000000000e+003 10 3.57500000000000e+003 1.57000000000000e+003 10 2 1 1 2.2e-005 2.5e-008 0.8 2650 -1 -1 -1
  2004 10 6 19 0 0 3.57500000000000e+003 3.84500000000000e+003 10 3.57500000000000e+003 1.57000000000000e+003 10 2 1 1 2.2e-005 2.5e-008 0.8 2650 -1 -1 -1
  2004 10 6 19 1 0 3.57500000000000e+003 3.84500000000000e+003 10 3.57500000000000e+003 1.57000000000000e+003 10 2 1 1 0 2.5e-008 0.8 2650 -1 -1 -1
  2005 10 6 20 0 0 3.57500000000000e+003 3.84500000000000e+003 10 3.57500000000000e+003 1.57000000000000e+003 10 2 1 1 0 2.5e-008 0.8 2650 -1 -1 -1
1 Polygon Source(s)
5 12 2 My Polygon Source
2004 10 6 12 0 0
 4.25800000000000e+003 1.88400000000000e+003 0
 4.13900000000000e+003 2.04000000000000e+003 0
 4.14400000000000e+003 2.19100000000000e+003 0
 4.19600000000000e+003 2.28900000000000e+003 0
 4.37700000000000e+003 2.34100000000000e+003 0
 4.53300000000000e+003 2.31000000000000e+003 0
 4.59500000000000e+003 2.27900000000000e+003 0
 4.64700000000000e+003 2.17500000000000e+003 0
 4.64700000000000e+003 2.08200000000000e+003 0
 4.58500000000000e+003 1.96800000000000e+003 0
 4.50700000000000e+003 1.91600000000000e+003 0
 4.37700000000000e+003 1.90000000000000e+003 0
2 1 1 0.05 0.0001 0.8 2650 -1 -1 -1
2005 10 6 20 0 0
 4.25800000000000e+003 1.88400000000000e+003 0
 4.13900000000000e+003 2.04000000000000e+003 0
 4.14400000000000e+003 2.19100000000000e+003 0
 4.19600000000000e+003 2.28900000000000e+003 0
 4.37700000000000e+003 2.34100000000000e+003 0
 4.53300000000000e+003 2.31000000000000e+003 0
 4.59500000000000e+003 2.27900000000000e+003 0
 4.64700000000000e+003 2.17500000000000e+003 0
 4.64700000000000e+003 2.08200000000000e+003 0
 4.58500000000000e+003 1.96800000000000e+003 0
 4.50700000000000e+003 1.91600000000000e+003 0
 4.37700000000000e+003 1.90000000000000e+003 0
2 1 1 0.05 0.0001 0.8 2650 -1 -1 -1
*********************************************************************************************************
* Guide:
*********************************************************************************************************
Number of Instant Mass Source(s)
   time(6), x_location, y_location, z_location, Pmass(kg), Hradius(m), Vradius(m), mass(kg), grain_size(m), standard_dev(Phi-units), density(kg/m^3), fall_velocity(m/s) (-1 = compute), TAU_critical_initiation(N/m^2) (-1 = compute), TAU_critical_deposition(N/m^2 (-1 = compute)
Number of Point Mass Rate Source(s)
   time(6), x_location, y_location, z_location, Pmass(kg), Hradius(m), Vradius(m), rate(kg/s), grain_size(m), standard_dev(Phi-units), density(kg/m^3), fall_velocity(m/s) (-1 = compute), TAU_critical_initiation(N/m^2) (-1 = compute), TAU_critical_deposition(N/m^2 (-1 = compute)
Number of Line Source(s)
   time(6), x1_loc, y1_loc, z1_loc, x2_loc, y2_loc, z2_loc, Pmass(kg), Hradius(m), Vradius(m), rate(kg/s/m), grain_size(m), phi_sd(Phi-units), density(kg/m^3), fall_velocity(m/s) (-1 = compute), TAU_critical_initiation(N/m^2) (-1 = compute), TAU_critical_deposition(N/m^2 (-1 = compute)
Number of Polygon Source(s)
   time(6)
   For each point (1 point per line): x_location, y_location, z_location
   Pmass(kg), Hradius(m), Vradius(m), rate(kg/s/m^2), grain_size(m), standard_dev(Phi-units), density(kg/m^3), fall_velocity(m/s) (-1 = compute), TAU_critical_initiation(N/m^2) (-1 = compute), TAU_critical_deposition(N/m^2 (-1 = compute)
*********************************************************************************************************
* Source file written by SMS 10.0.0 Development
* SMS Build Date: Jun 20 2007
* Date saved: 06/20/07
* Time saved: 09:43:14
*********************************************************************************************************

Vertical Line Source Datums

The source file format has been changed to allow the specification of vertical line source datums:

Old Format

# Line Source(s)
 LineSourceID  #Instructions   SourceName

New Format

# Line Source(s)
 LineSourceID  #Instructions   SourceName  SourceDatum

The values available for the SourceDatum field are:

  • beddatum (default)
  • surfacedatum
  • depthdistributed

The Sourcedatum has a default value of beddatum. If no datum is given in the file, then it is assumed to use the bed as the datum. Therefore, PTM will still process source files in the old format correctly.

Relative to the bed

This is the default and is what was already in PTM. Given the following input from the source file:

Time	X1	Y1	Z1	X2	Y2	Z2	PMass	Hrad	Vrad	Rate	Additional Info

Relative to the water surface

If the SourceDatum is surfacedatum then the code takes Z1 and Z2 as relative to the water surface. The rate is given in kg/m/s.

Depth-distributed

If the SourceDatum is depth distributed then the code takes the Z1 and Z2 as percentages of the water depth. The rate is given in kg/s in this case. An example is if wanting to distribute the source over a fraction of the water depth, set z1=0.33 and z2=0.67 to introduce the source over the middle third of the water column. The depth-distributed source is taken as a percentage from the bed. So if z1 = 0 and z2 is 0.5, this suggests a segment that is the lower one half of the water depth.

Related Topics