314 | | Summarized, the surface data-structure {{{surf_type}}} is used to store and access all surface related quantities in an optimized memory demand. Several adjoining surfaces at a grid cell (e.g. at corners) are treated separately. The new data-structure is also applied in the flat case without any topography. |
| 314 | Summarized, the surface data-structure {{{surf_type}}} is used to store and access all surface related quantities in an optimized memory demand. Several adjoining surfaces at a grid cell (e.g. at corners) are treated separately. The data-structure is also applied in the flat case without any topography. //// |
| 315 | |
| 316 | '''Remarks''' |
| 317 | |
| 318 | In order to modify surface properties at given grid point ''(j,i)'', it is recommended to follow the subsequent code structure to obtain the type of the respective surface at given ''(j,i)'' and the corresponding index of the surface element in the data type. |
| 319 | {{{ |
| 320 | #!Latex |
| 321 | \begin{verbatim} |
| 322 | LOGICAL :: default_surface |
| 323 | LOGICAL :: natural_surface |
| 324 | LOGICAL :: urban_surface |
| 325 | |
| 326 | ... |
| 327 | |
| 328 | default_surface = surf_def_h(0)%start_index(j,i) <= & |
| 329 | surf_def_h(0)%end_index(j,i) |
| 330 | natural_surface = surf_lsm_h%start_index(j,i) <= & |
| 331 | surf_lsm_h%end_index(j,i) |
| 332 | urban_surface = surf_usm_h%start_index(j,i) <= & |
| 333 | surf_usm_h%end_index(j,i) |
| 334 | |
| 335 | ... |
| 336 | |
| 337 | IF ( natural_surface ) THEN |
| 338 | m = surf_lsm_h%start_index(j,i) |
| 339 | surf_lsm_h%z0(m) = 0.2_wp |
| 340 | ENDIF |
| 341 | |
| 342 | ... |
| 343 | \end{verbatim} |
| 344 | }}} |