Changeset 4294


Ignore:
Timestamp:
Nov 13, 2019 6:34:16 PM (18 months ago)
Author:
suehring
Message:

init_grid: always set bit 5 and 6 of wall_flags, indicating terrain- and building surfaces in all cases, in order to enable terrain-following output also when no land- or urban-surface model is applied

File:
1 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/SOURCE/init_grid.f90

    r4265 r4294  
    2525! -----------------
    2626! $Id$
     27! Bugfix, always set bit 5 and 6 of wall_flags, indicating terrain- and
     28! building surfaces in all  cases, in order to enable terrain-following output
     29! also when no land- or urban-surface model is applied.
     30!
     31! 4265 2019-10-15 16:16:24Z suehring
    2732! Bugfix for last commit, exchange oro_max variable only when it is allocated
    2833! (not necessarily the case when topography is input from ASCII file).
     
    23002305
    23012306    USE control_parameters,                                                    &
    2302         ONLY:  bc_lr_cyc, bc_ns_cyc, constant_flux_layer, land_surface,        &
    2303                scalar_advec, topography, use_surface_fluxes, use_top_fluxes,   &
    2304                urban_surface
     2307        ONLY:  bc_lr_cyc, bc_ns_cyc, constant_flux_layer,                      &
     2308               scalar_advec, topography, use_surface_fluxes, use_top_fluxes
    23052309
    23062310    USE indices,                                                               &
     
    25692573!-- when topography is read from file. In order to run the land-surface model
    25702574!-- also without topography information, set bit 1 explicitely in this case.
    2571     IF ( land_surface )  THEN
    2572 !
    2573 !--    If no topography is initialized, the land-surface is at k = nzb.
    2574        IF ( TRIM( topography ) /= 'read_from_file' )  THEN
    2575           wall_flags_0(nzb,:,:) = IBSET( wall_flags_0(nzb,:,:), 5 )
    2576        ELSE
    2577           DO i = nxl, nxr
    2578              DO j = nys, nyn
    2579                 DO k = nzb, nzt+1
    2580 !         
    2581 !--                Natural terrain grid point
    2582                    IF ( BTEST( topo(k,j,i), 1 ) )                              &
    2583                       wall_flags_0(k,j,i) = IBSET( wall_flags_0(k,j,i), 5 )
    2584                 ENDDO
    2585              ENDDO
    2586           ENDDO
    2587        ENDIF
    2588     ENDIF
    2589 !
    2590 !-- Building grid points.
    2591     IF ( urban_surface )  THEN
     2575!--
     2576!-- Natural terrain grid points
     2577!-- If no topography is initialized, the land-surface is at k = nzb.
     2578    IF ( TRIM( topography ) /= 'read_from_file' )  THEN
     2579       wall_flags_0(nzb,:,:) = IBSET( wall_flags_0(nzb,:,:), 5 )
     2580    ELSE
    25922581       DO i = nxl, nxr
    25932582          DO j = nys, nyn
    25942583             DO k = nzb, nzt+1
    2595                 IF ( BTEST( topo(k,j,i), 2 ) )                                 &
    2596                    wall_flags_0(k,j,i) = IBSET( wall_flags_0(k,j,i), 6 )
     2584!         
     2585!--             Natural terrain grid point
     2586                IF ( BTEST( topo(k,j,i), 1 ) )                                 &
     2587                   wall_flags_0(k,j,i) = IBSET( wall_flags_0(k,j,i), 5 )
    25972588             ENDDO
    25982589          ENDDO
    25992590       ENDDO
    26002591    ENDIF
     2592!
     2593!-- Building grid points.
     2594    DO i = nxl, nxr
     2595       DO j = nys, nyn
     2596          DO k = nzb, nzt+1
     2597             IF ( BTEST( topo(k,j,i), 2 ) )                                    &
     2598                wall_flags_0(k,j,i) = IBSET( wall_flags_0(k,j,i), 6 )
     2599          ENDDO
     2600       ENDDO
     2601    ENDDO
    26012602!
    26022603!-- Exchange ghost points for wall flags
Note: See TracChangeset for help on using the changeset viewer.