194 | | |
195 | | |
196 | | they can be directly incorporated into the standard loop structure of the Fortran code as lower vertical index |
197 | | for all integration loops. Therefore, PALM employs two 2-D height index arrays (e.g., '''''nzb_w_inner(j, i)''''' and '''''nzb_w_outer(j, i)''''' for the velocity component ''w'') to separate the domain into four regions based on the vertical index ''k'' (see Fig. 4 in Sect. [wiki:/doc/tec/bc#Topography boundary conditions]): |
198 | | {{{ |
199 | | #!Latex |
200 | | \begin{itemize} |
201 | | \item[A.] \texttt{0 $\leq$ k} $<$ \texttt{nzb\_w\_inner}, grid points |
202 | | within obstacles or in the ground that are excluded from |
203 | | calculations, |
204 | | \item[B.] \texttt{nzb\_w\_inner} \texttt{$\leq$} \texttt{k} $<$ |
205 | | \texttt{nzb\_w\_outer}, grid points next to vertical walls, where |
206 | | wall-bounded code is executed, |
207 | | \item[C.] \texttt{k} $=$ \texttt{nzb\_w\_inner} $=$ |
208 | | \texttt{nzb\_w\_outer}, grid points next to horizontal walls, where |
209 | | wall-bounded code is executed, |
210 | | \item[D.] all other $k$, grid points in free fluid. |
211 | | \end{itemize} |
212 | | }}} |
213 | | The additional topography code is executed in regions B and C only. As the velocity components are defined on a different (staggered) grid |
214 | | than the scalar quantities (see Fig. 1 in Sect. [wiki:doc/tec/discret discretization]), three extra pairs of 2-D height index arrays are defined; two for the horizontal velocities and one for scalar quantities (e.g., '''''nzb_s_inner''''' and '''''nzb_s_outer''''' for scalar quantities). \\\\ |
| 194 | With revision -r 2232, it is also possible to prescribe topography via NetCDF data format (ASCII still exists). |
| 195 | Topography input via NetCDF enables two different modes. |
| 196 | 1) Topography height can be prescribed for each grid point, similar to the rastered ASCII iput. |
| 197 | 2) Topography is prescribed via a three-dimension Integer input array which is 1 for topography grid points and 0 everywhere else. |
| 198 | This enables the user to prescribe three-dimensional topography structures like bridges, etc. . |
| 199 | The input mode is determined internally according to the NetCDF file attribute {{{lod}}}, which is part of the NetCDF input file. |
| 200 | lod = 1 for method 1, lod = 2 for method 2. |
| 201 | |
| 202 | '''Remark''' concerning still existing 2-D index arrays: Even though 2-D index arrays, as e.g. {{{nzb_s_inner}}}, are removed from the integration loops, they can still be used by the user for a while, e.g. for setting user-defined topography. |
218 | | In case there are holes in the topography that are resolved by only one grid point, the topography array in filtered so that such holes are filled up to the minimum topography height of the directly adjoining grid points in the x- and the y-direction. This is necessary, because for such chimney-like features resolved by one grid point, the continuity equation is not fulfilled on a discrete grid, as the only degree of freedom for the pressure solver is the vertical. Such holes are suspected to lead to unrealistic velocity blow-ups, hence, they are filled up. |
| 206 | In case there are holes in the topography that are resolved by only one grid point, the topography array in filtered so that such holes are filled up to the minimum topography height of the directly adjoining grid points in the x- and the y-direction. This is necessary, because for such chimney-like features resolved by one grid point, the continuity equation is not fulfilled on a discrete grid, as the only degree of freedom for the pressure solver is the vertical. Such holes are suspected to lead to unrealistic velocity blow-ups, hence, they are filled up. |
| 207 | |
| 208 | == Surface-bounded code == |
| 209 | |
| 210 | |
| 211 | |