211 | | |
212 | | |
| 211 | To execute surface-bounded code, a new Fortran data-structure {{{surf_type}}} is introduced, encompassing all required surface attributes. |
| 212 | Arrays belonging to these data-structure are allocated for the exact number of surface elements on a local processor, and loops can run on the exact number of surface elements without any need of IF-ELSE clauses. |
| 213 | Following example shows the general structure of the data-structure: |
| 214 | |
| 215 | {{{ |
| 216 | #!Latex |
| 217 | \begin{verbatim} |
| 218 | TYPE surf_type |
| 219 | INTEGER(iwp), DIMENSION(:), ALLOCATABLE :: I, j, k |
| 220 | REAL(wp), DIMENSION(:), ALLOCATABLE :: shf |
| 221 | . |
| 222 | . |
| 223 | . |
| 224 | END TYPE surf_type |
| 225 | \end{verbatim} |
| 226 | }}} |
| 227 | |
| 228 | Using this data structure approach, new arrays for different surface types are defined: |
| 229 | {{{ |
| 230 | #!Latex |
| 231 | \begin{verbatim} |
| 232 | TYPE (surf_type), DIMENSION(0:2) :: surf_def_h |
| 233 | TYPE (surf_type), DIMENSION(0:3) :: surf_def_v |
| 234 | TYPE (surf_type) :: surf_lsm_h |
| 235 | TYPE (surf_type), DIMENSION(0:3) :: surf_lsm_v |
| 236 | TYPE (surf_type) :: surf_usm_h |
| 237 | TYPE (surf_type), DIMENSION(0:3) :: surf_usm_v |
| 238 | \end{verbatim} |
| 239 | }}} |
| 240 | |
| 241 | The term ''def'', ''lsm'', ''usm'' indicates the type of surface, i.e. default-type, natural-type, or urban-type, respectively, while the term at the end indicates either horizontal ''h'' or vertical surfaces ''v''. For the different kinds of surfaces, partly different code is executed. \\ |
| 242 | |
| 243 | For all the different surface types, MOST (see ...) is applied to model surface fluxes of momentum. |
| 244 | For default-type surfaces, surface fluxes of latent and sensible heat as well as scalars are either prescribed or model by MOST. |
| 245 | In contrast, for natural- and urban-type surfaces, an energy-balance solver is applied in order to model surface fluxes of sensible and latent heat. \\ |
| 246 | |
| 247 | Further, in addition to the different types of surfaces, surface elements are further distinguished according to its orientation: \\ |
| 248 | ''surf_X_h(0)'' encompass all horizontally upward-facing surfaces of its respective type, \\ |
| 249 | ''surf_X_h(1)'' encompass all horizontally downward-facing surfaces of its respective type, \\ |
| 250 | ''surf_X_h(0)'' encompass the model top grid points. \\ |
| 251 | |
| 252 | Please note, downward-facing (and model top) surfaces belong always to the default type at the moment. |
| 253 | |
| 254 | ''surf_X_v(0)'' encompass all vertically northward-facing surfaces of its respective type, \\ |
| 255 | ''surf_X_v(1)'' encompass all vertically southward-facing surfaces of its respective type, \\ |
| 256 | ''surf_X_v(2)'' encompass all vertically eastward-facing surfaces of its respective type, \\ |
| 257 | ''surf_X_v(3)'' encompass all vertically westward-facing surfaces of its respective type. \\ |
| 258 | |
| 259 | '''Remark:''' At the moment it is only possible to have one surface type at once, .e.g. only natural surfaces treated by the land-surface model. |
| 260 | In the future, however, different surface types can co-exist next to each other, i.e. it is possible to define areas where the urban-surface model and areas where the land-surface model is executed at the same time. |
| 261 | |