next up previous index
Next: Boundary and initial conditions Up: Model description Previous: Computational grid   Index

Input grids and data


\begin{picture}(18,0.12)
\thicklines
\put(0,0){\line(1,0){17}}
\put(0,0.1){\line(1,0){17}}
\end{picture}

              | BOTtom      |
              |             |
              | WLEVel      |
              |             |
              |  | CURrent  |
              | <           |
              |  | VX       |
              |  | VY       |
              |             |
INPgrid     (<               >)                                                 &
              | FRiction    |
              |             |
              |  | WInd     |
              | <           |
              |  | WX       |
              |  | WY       |
              |             |
              | NPLAnts     |
              |             |
              | TURBvisc    |
              |             |
              | MUDLayer    |

       | -> REGular [xpinp] [ypinp] [alpinp] [mxinp] [myinp] [dxinp] [dyinp] |
       |                                                                     |
      <     CURVilinear  [stagrx] [stagry] [mxinp] [myinp]                    > &
       |                                                                     |
       |    UNSTRUCtured                                                     |

        (EXCeption  [excval])                                                   &

                                            | -> Sec  |
        (NONSTATionary [tbeginp] [deltinp] <     MIn   >  [tendinp])
                                            |    HR   |
                                            |    DAy  |

\begin{picture}(18,0.12)
\thicklines
\put(0,0){\line(1,0){17}}
\put(0,0.1){\line(1,0){17}}
\end{picture}

OPTIONS CURVILINEAR AND UNSTRUCTURED NOT FOR 1D-MODE.


With this required command the user defines the geographic location, size and orientation of an input grid and also the time characteristics of the variable if it is not stationary. If this is the case (the variable is not stationary), the variable should be given in a sequence of fields, one for each time step [deltinp]. The actual reading of values of bottom levels, currents, etc. from file is controlled by the command READINP. This command INPGRID must precede the following command READINP.


There can be different grids for bottom level (BOTTOM), flow current (CURRENT), bottom friction coefficient (FRICTION), wind velocity (WIND), vegetation density (NPLANTS), turbulent viscosity (TURB) and mud layer thickness (MUDLAY). If the current velocity components are available on different grids, then option VX, VY can define these different grids for the x - and y -component of the current, respectively (but the grids must have identical orientation). Different grids for VX and VY may be useful if the data are generated by a circulation model using a staggered grid. The same holds for the wind velocity components, i.e. WX and WY.


In case of a regular grid (option REGULAR in the INPGRID command) the current and wind velocity vectors are defined with the x - and y -component of the current or wind vector with respect to the x -axis of the input grid.


In case of a curvilinear grid (option CURVILINEAR in the INPGRID command) the current and wind velocity vectors are defined with the x - and y -component of the current or wind vector with respect to the x -axis of the problem coordinate system. So, these velocity components are grid oriented.


In case of an unstructured grid (option UNSTRUC in the INPGRID command) the current and wind velocity vectors are given as Cartesian oriented components, i.e. x - and y -components.


For wind velocity and friction coefficient it is also possible to use a constant value over the computational field (see commands WIND and FRICTION). No grid definition for wind and friction is then required.


Note that in case of option BOTTOM only stationary input field is allowed.


Note that in 1D mode, both x - and y -components of the current and/or wind must be specified. Also, VX and WX must always be followed by VY and WY, respectively.


If the computational grid is unstructured (generated by Triangle or Easymesh), the input grids can be either regular or identical to the used computational grid.


Do not use the command INP BOTTOM when the unstructured grid of ADCIRC is employed! The file fort.14 contains the bottom levels and will be read by SWAN through the command READ UNSTRUC ADCIRC.


If land points remain dry during the computation (no flooding!), then these points can be ignored. In this way, turn-around time and internal memory can be saved. This can be done by indicating bottom level in these points as exception value. See command INPGRID BOTTOM EXCEPTION. For parallel runs using MPI, an exception value for bottom levels should be prescribed in order to have a good load-balancing!


See Section 2.6 for more information on grids.

BOTTOM defines the input grid of the bottom level. (For the definition of the bottom  
  level, see command READINP).  
WLEV defines the input grid of the water level. (For the definition of the water  
  level, see command READINP).  
CURRENT defines the input grid of the current field (same grid for x - and y -components).  
VX defines the input grid of the x -component of the current field (different grid  
  than y -component but same orientation).  
VY defines the input grid of the y -component of the current field (different grid  
  than x -component but same orientation).  
FRICTION defines the input grid of the bottom friction coefficient (defined in command  
  FRICTION, not to be confused with this option FRICTION!).  
WIND defines the input grid of the wind velocity field (same grid for x - and  
  y -component).  
  If neither of the commands WIND and READINP WIND is used it is  
  assumed that there is no wind.  
WX defines the input grid of the x -component of the wind velocity field  
  (different grid than y -component but same orientation).  
WY defines the input grid of the y -component of the wind velocity field  
  (different grid than x -component but same orientation).  
NPLANTS defines input grid of the horizontally varying vegetation density (defined  
  in command VEGETATION).  
TURBVISC defines input grid of the horizontally varying turbulent viscosity (defined  
  in command TURBULENCE).  
MUDLAYER defines input grid of the horizontally varying mud layer thickness (defined  
  in command MUD).  
REGULAR means that the input grid is uniform and rectangular.  
CURVILINEAR means that the input grid is curvilinear; this option is available only if the  
  computational grid is curvilinear as well. The input grid is identical  
  (which is default) to the computational grid, or it is staggered in x - and/or  
  y -direction.  
  NOT FOR 1D-MODE.  
UNSTRUCTURE means that the input grid is unstructured; this option is available only if the  
  computational grid is unstructured as well. The input grid must be identical  
  to the computational grid.  
  NOT FOR 1D-MODE.  

For a REGULAR grid:

[xpinp] geographic location (x -coordinate) of the origin of the input grid in  
  problem coordinates (in m) if Cartesian coordinates are used or in degrees if  
  spherical coordinates are use (see command COORD).  
  Default: [xpinp] = 0. In case of spherical coordinates there is no default, the  
  user must give a value.  
[ypinp] geographic location (y -coordinate) of the origin of the input grid in  
  problem coordinates (in m) if Cartesian coordinates are used or in degrees if  
  spherical coordinates are use (see command COORD).  
  Default: [ypinp] = 0. In case of spherical coordinates there is no default, the  
  user must give a value.  
[alpinp] direction of the positive x -axis of the input grid (in degrees, Cartesian convention).  
  See command COORD.  
  Default: [alpinp] = 0.  
[mxinp] number of meshes in x -direction of the input grid (this number is one less  
  than the number of grid points in this direction!).  
[myinp] number of meshes in y -direction of the input grid (this number is one less  
  than the number of grid points in this direction!).  
  In 1D-mode, [myinp] should be 0.  
[dxinp] mesh size in x -direction of the input grid,  
  in m in case of Cartesian coordinates or  
  in degrees if spherical coordinates are used, see command COORD.  
[dyinp] mesh size in y -direction of the input grid,  
  in m in case of Cartesian coordinates or  
  in degrees if spherical coordinates are used, see command COORD.  
  In 1D-mode, [dyinp] may have any value.  
  Default: [dyinp] = [dxinp].  

For a CURVILINEAR input (not fully tested for spherical coordinates):

[mxinp] number of meshes in $ \xi$ -direction of the input grid (this number is one less  
  than the number of grid points in this direction!).  
  Default: [mxinp] = [mxc].  
[myinp] number of meshes in $ \eta$ -direction of the input grid (this number is one less  
  than the number of grid points in this direction!).  
  Default: [myinp] = [myc].  
[stagrx] staggered x' -direction with respect to computational grid; default: 0.  
  Note: e.g. [stagrx]=0.5 means that the input grid points are shifted a half  
  step in x' -direction; in many flow models x -velocities are defined in points  
  shifted a half step in x' -direction.  
[stagry] staggered y' -direction with respect to computational grid; default: 0.  
  Note: e.g. [stagry]=0.5 means that the input grid points are shifted a half  
  step in y' -direction; in many flow models y -velocities are defined in points  
  shifted a half step in y' -direction.  
EXCEPTION certain points inside the given grid that are to be ignored during the  
  computation can be identified by means of an exception value as given in  
  the corresponding input file as controlled by the command READINP.  
  NOT FOR 1D-MODE.  
[excval] exception value; required if the option EXCEPTION is used.  
  Note: if [fac] $ \neq$ 1 (see command READINP), [excval] must be given as  
  [fac] times the exception value.  
NONSTATION the variable is nonstationary (given in a time sequence of fields).  
  NOT FOR 1D-MODE.  
[tbeginp] begin time of the first field of the variable, the format is:  
  1 : ISO-notation 19870530.153000  
  2 : (as in HP compiler) '30-May-87 15:30:00'  
  3 : (as in Lahey compiler) 05/30/87.15:30:00  
  4 : 15:30:00  
  5 : 87/05/30 15:30:00'  
  6 : as in WAM 8705301530  
  This format is installation dependent. See Implementation Manual or ask the  
  person who installed SWAN on your computer. Default is ISO-notation.  
[deltinp] time interval between fields, the unit is indicated in the next option:  
  SEC unit seconds  
  MIN unit minutes  
  HR unit hours  
  DAY unit days  
[tendinp] end time of the last field of the variable, the format is:  
  1 : ISO-notation 19870530.153000  
  2 : (as in HP compiler) '30-May-87 15:30:00'  
  3 : (as in Lahey compiler) 05/30/87.15:30:00  
  4 : 15:30:00  
  5 : 87/05/30 15:30:00'  
  6 : as in WAM 8705301530  
  This format is installation dependent. See Implementation Manual or ask the  
  person who installed SWAN on your computer. Default is ISO-notation.  


\begin{picture}(18,0.12)
\thicklines
\put(0,0){\line(1,0){17}}
\put(0,0.1){\line(1,0){17}}
\end{picture}

          |  BOTtom      |
          |              |
          |  WLEVel      |
          |              |
          |  CURrent     |
          |              |           |  'fname1'            |
READinp  <   WInd         >  [fac]  <                        >   [idla]    &
          |              |           |  SERIes   'fname2'   |
          |  FRiction    |
          |              |
          |  NPLAnts     |
          |              |
          |  TURBvisc    |
          |              |
          |  MUDLayer    |

                                           | -> FREe                       |
                                           |                               |
                                           |                 | 'form' |    |
           [nhedf] ([nhedt]) ([nhedvec])  <     FORmat      <          >    >
                                           |                 | [idfm] |    |
                                           |                               |
                                           |    UNFormatted                |

\begin{picture}(18,0.12)
\thicklines
\put(0,0){\line(1,0){17}}
\put(0,0.1){\line(1,0){17}}
\end{picture}

With this required command the user controls the reading of values of the indicated variables from file. This command READINP must follow a command INPGRID. Note that for each stationary or nonstationary field, one combination of INPGRID and READINP suffices if one has more than one COMPUTE command in a run.


If the variables are in one file, then the READINP commands should be given in the same sequence as the sequence in which the variables appear in the file.

BOTTOM with this option the user indicates that bottom levels (in m) are to be read from  
  file (bottom level positive downward relative to an arbitrary horizontal datum  
  level). The sign of the input can be changed with option [fac] = -1. (see below).  
WLEV with this option the user indicates that water levels (in m) are to be read from  
  file (water level positive upward relative to the same datum level as used in  
  option BOTTOM). Sign of input can be changed with option [fac] = -1. If the  
  water level is constant in space and time, the user can use the command SET  
  to add this water level to the water depth.  
CURRENT rectilinear (curvilinear) input grid: with this option the user indicates that  
  the x - and y -component ($ \xi$ - and $ \eta$ -component) (in m/s) are to be read from  
  one and the same file (with one READINP command). With this option SWAN  
  reads first all x -components ($ \xi$ -components), and then all y -components  
  ($ \eta$ -components) (see [idla]). The first component (x - or $ \xi$ -component) is  
  always eastward oriented and the second one (y - or $ \eta$ -component) is always  
  northward oriented. The components $ \xi$ and $ \eta$ are taken along the directions of  
  the grid lines of the curvilinear grid! If the current velocity is relatively large,  
  i.e. the Froude number U/$ \sqrt{{gd}}$ is larger than 0.8, it will be reduced such  
  that the Froude number becomes equal to 0.8.  
  unstructured input grid: with this option the user indicates that the x - and  
  y -component (in m/s) are to be read from one and the same file (with one  
  READINP command). With this option SWAN reads first all x -components,  
  and then all y -components. The order of these values to be read is identical  
  to that of the unstructured computational grid.  
WIND rectilinear (curvilinear) input grid: with this option the user indicates that  
  the x - and y -component ($ \xi$ - and $ \eta$ -component) (in m/s) are to be read from  
  one and the same file (with one READINP command). With this option SWAN  
  reads first all x -components ($ \xi$ -components), and then all y -component  
  ($ \eta$ -components) (see [idla]). The components $ \xi$ and $ \eta$ are taken along the  
  directions of the grid lines of the curvilinear grid! If the wind is constant, see  
  command WIND.  
  unstructured input grid: with this option the user indicates that the x - and  
  y -component (in m/s) are to be read from one and the same file (with one  
  READINP command). With this option SWAN reads first all x -components,  
  and then all y -components. The order of these values to be read is identical  
  to that of the unstructured computational grid.  
FRICTION with this option the user indicates that friction coefficient is to be read from  
  file for Collins: [cfw] and for Madsen: [kn] (no space- or time-variable  
  coefficient for the Jonswap expression, see command FRICTION). If the  
  coefficients are constant in space and time: see command FRICTION.  
NPLANTS with this option the user indicates that horizontally varying vegetation  
  density (per m2) is to be read from file. If the density is constant then  
  see command VEGETATION for specification.  
TURBVISC with this option the user indicates that horizontally varying turbulent  
  viscosity (m2/s) is to be read from file. If the viscosity is constant  
  then see command TURBULENCE for specification.  
MUDLAYER with this option the user indicates that horizontally varying mud layer  
  thickness (in m) is to be read from file. If the thickness is constant then  
  see command MUD for specification.  
[fac] SWAN multiplies all values that are read from file with [fac]. For instance  
  if the bottom levels are given in unit decimeter, one should make [fac]=0.1 to  
  obtain levels in m. To change sign of bottom level use a negative value of [fac].  
  Note that [fac] = 0 is not allowed!  
  Default: [fac]=1.  
'fname1' name of the file with the values of the variable.  
SERIES with this option (only for MODE NONSTATIONARY) the user indicates that the  
  names of the files containing the nonstationary variable(s) are located in a  
  separate file with name 'fname2' (see below).  
'fname2' name of file that contains the names of the files where the variables  
  are given. These names are to be given in proper time sequence. SWAN reads  
  the next file when the previous file end has been encountered. In these files the  
  input should be given in the same format as in the above file 'fname1' (that  
  implies that a file should start with the start of an input time step).  
[idla] prescribes the order in which the values of bottom levels and other fields  
  should be given in the file.  
  =1: SWAN reads the map from left to right starting in the upper-left-hand  
  corner of the map (it is assumed that the x -axis of the grid is pointing  
  to the right and the y -axis upwards). A new line in the map should  
  start on a new line in the file. The lay-out is as follows:  
  1,myc+1 2,myc+1 ... mxc+1, myc+1  
  1,myc 2,myc ... mxc+1, myc  
  ... ... ... ...  
  1,1 2,1 ... mxc+1, 1  
     
  =2: as [idla]=1 but a new line in the map need not start on a new line in  
  the file.  
  =3: SWAN reads the map from left to right starting in the lower-left-hand  
  corner of the map. A new line in the map should start on a new line in  
  the file. The lay-out is as follows:  
  1,1 2,1 ... mxc+1, 1  
  1,2 2,2 ... mxc+1, 2  
  ... ... ... ...  
  1,myc+1 2,myc+1 ... mxc+1, myc+1  
     
  =4: as [idla]=3 but a new line in the map need not start on a new line  
  in the file.  
  =5: SWAN reads the map from top to bottom starting in the lower-left-hand  
  corner of the map. A new column in the map should start on a new line in  
  the file. The lay-out is as follows:  
  1,1 1,2 ... 1, myc+1  
  2,1 2,2 ... 2, myc+1  
  ... ... ... ...  
  mxc+1,1 mxc+1,2 ... mxc+1, myc+1  
     
  =6: as [idla]=5 but a new column in the map need not start on a new line  
  in the file.  
  Default: [idla]=1.  
  ONLY MEANT FOR STRUCTURED GRIDS.  
[nhedf] is the number of header lines at the start of the file. The text in the header  
  lines is reproduced in the print file created by SWAN (see Section 3.3). The  
  file may start with more header lines than [nhedf] because the start of the  
  file is often also the start of a time step and possibly also of a vector  
  variable (each having header lines, see below, [nhedt] and [nhedvec]).  
  Default: [nhedf]=0.  
[nhedt] only if variable is time dependent: number of header lines in the file at the  
  start of each time level. A time step may start with more header lines than  
  [nhedt] because the variable may be a vector variable which has its own header  
  lines (see below [nhedvec]).  
  Default: [nhedt]=0.  
[nhedvec] for each vector variable: number of header lines in the file at the start of  
  each component (e.g., x - or y -component).  
  Default: [nhedvec]=0.  
FREE With this option the user indicates that the values are to be read with free  
  format. Free format is a standard of the computer programming language  
  FORTRAN. The free format conventions in reading from a file are almost the  
  same as the conventions for the command syntax given elsewhere in this manual;  
  the most important differences are:  
  1. There are no continuation marks, reading continues until the required  
  number of data has been read, or until a slash (/) is encountered.  
  2. Input lines can be longer than 80 characters (depending on the operating  
  system of the computer).  
  3. Comment is not allowed.  
  With free format empty fields, repetition factors, and closure of a line by a slash,  
  can be used.  
FORMAT with this option the user indicates that fixed format (FORTRAN convention) is  
  to be used when reading the values from file. The format can be defined in one  
  of two ways, by giving the format number [idfm] or the format string 'form'.  
'form' a user-specified format string according to Fortran convention, e.g.  
  '(10X,12F5.0)'.  
[idfm] this format number is interpreted as follows:  
  =1: Format according to BODKAR convention (a standard of the Ministry  
  of Transport and Public Works in the Netherlands).  
  Format string: (10X,12F5.0).  
  =5: Format (16F5.0), i.e. an input line consists of 16 fields of 5 places each.  
  =6: Format (12F6.0), i.e. an input line consists of 12 fields of 6 places each.  
  =8: Format (10F8.0), i.e. an input line consists of 10 fields of 8 places each.  
UNFORMATTED is a form of reading without conversion (binary files). Not recommended for  
  ordinary use.  

If the file does not contain a sufficient number of data (i.e. less than the number of grid points of the input grid), SWAN will write an error message to the PRINT file, and if [itest]>0 (see command TEST) it will reproduce the data in the PRINT file, using the lay-out according to [idla]=1. This echo of the data to print file is also made if the READINP command is embedded between two TEST commands in the command file as follows:
   TEST 120
   READINP ....
   TEST 0


\begin{picture}(18,0.12)
\thicklines
\put(0,0){\line(1,0){17}}
\put(0,0.1){\line(1,0){17}}
\end{picture}

WIND  [vel] [dir]

\begin{picture}(18,0.12)
\thicklines
\put(0,0){\line(1,0){17}}
\put(0,0.1){\line(1,0){17}}
\end{picture}

With this optional command the user indicates that the wind is constant.

[vel] wind velocity at 10 m elevation (m/s).  
[dir] wind direction at 10 m elevation (in degrees, Cartesian or Nautical  
  convention, see command SET).  

Both quantities [vel] and [dir] are required if this command is used except when the command READINP WIND is specified.


next up previous index
Next: Boundary and initial conditions Up: Model description Previous: Computational grid   Index
The SWAN team 2017-03-23