Ignore:
Timestamp:
Dec 18, 2019 11:55:56 AM (4 years ago)
Author:
motisi
Message:

Introduction of wall_flags_total_0, which currently sets bits based on static topography information used in wall_flags_static_0

File:
1 edited

Legend:

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

    r4329 r4346  
    2727! -----------------
    2828! $Id$
     29! Introduction of wall_flags_total_0, which currently sets bits based on static
     30! topography information used in wall_flags_static_0
     31!
     32! 4329 2019-12-10 15:46:36Z motisi
    2933! Renamed wall_flags_0 to wall_flags_static_0
    3034!
     
    249253    USE indices,                                                                                   &
    250254         ONLY:  advc_flags_s,                                                                      &
    251                 nbgp, nx, nxl, nxlg, nxr, nxrg, ny, nyn, nyng, nys, nysg, nz, nzb, nzt, wall_flags_static_0
     255                nbgp, nx, nxl, nxlg, nxr, nxrg, ny, nyn, nyng, nys, nysg, nz, nzb, nzt,            &
     256                wall_flags_total_0
    252257
    253258    USE pegrid,                                                                                    &
     
    920925                DO  j = nysg, nyng
    921926                   DO  k = nzb+1, nzt
    922                       flag = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_static_0(k,j,i), 0 ) )
     927                      flag = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_total_0(k,j,i), 0 ) )
    923928                      cs_3d(k,j,i) = cs_pr_init(k) * flag
    924929                   ENDDO
     
    945950                DO  j = nysg, nyng
    946951                   DO  k = nzb+1, nzt
    947                       flag = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_static_0(k,j,i), 0 ) )
     952                      flag = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_total_0(k,j,i), 0 ) )
    948953                      cs_3d(k,j,i) = cs_3d(k,j,copied) * flag
    949954                   ENDDO
     
    982987                DO  j = ss, ee
    983988                   DO  k = nzb+1, nzt
    984                       flag = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_static_0(k,j,i), 0 ) )
     989                      flag = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_total_0(k,j,i), 0 ) )
    985990                      cs_3d(k,j,i) = cs_pr_init(k) * flag
    986991                   ENDDO
     
    10081013                DO  j = ss, ee
    10091014                   DO  k = nzb+1, nzt
    1010                       flag = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_static_0(k,j,i), 0 ) )
     1015                      flag = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_total_0(k,j,i), 0 ) )
    10111016                      cs_3d(k,j,i) = cs_3d(k,copied,i) * flag
    10121017                   ENDDO
     
    13311336                                              chem_species(lsp)%conc(k,j,i),                       &
    13321337                                              REAL( fill_value, KIND = wp ),                       &
    1333                                               BTEST( wall_flags_static_0(k,j,i), 0 ) )
     1338                                              BTEST( wall_flags_total_0(k,j,i), 0 ) )
    13341339                      ENDDO
    13351340                   ENDDO
     
    13431348                                              chem_species(lsp)%conc_av(k,j,i),                    &
    13441349                                              REAL( fill_value, KIND = wp ),                       &
    1345                                               BTEST( wall_flags_static_0(k,j,i), 0 ) )
     1350                                              BTEST( wall_flags_total_0(k,j,i), 0 ) )
    13461351                      ENDDO
    13471352                   ENDDO
     
    14391444                                             chem_species(lsp)%conc(k,j,i),   &
    14401445                                             REAL( fill_value, KIND = wp ),   &
    1441                                              BTEST( wall_flags_static_0(k,j,i), 0 ) )
     1446                                             BTEST( wall_flags_total_0(k,j,i), 0 ) )
    14421447                     ENDDO
    14431448                  ENDDO
     
    14521457                                             chem_species(lsp)%conc_av(k,j,i),&
    14531458                                             REAL( fill_value, KIND = wp ),   &
    1454                                              BTEST( wall_flags_static_0(k,j,i), 0 ) )
     1459                                             BTEST( wall_flags_total_0(k,j,i), 0 ) )
    14551460                     ENDDO
    14561461                  ENDDO
     
    15321537                      im = mask_i(mid,i)
    15331538                      jm = mask_j(mid,j)
    1534                       ktt = MINLOC( MERGE( 1, 0, BTEST( wall_flags_static_0(:,jm,im), 5 )), DIM = 1 ) - 1
     1539                      ktt = MINLOC( MERGE( 1, 0, BTEST( wall_flags_total_0(:,jm,im), 5 )), DIM = 1 ) - 1
    15351540                      DO  k = 1, mask_size_l(mid,3)
    15361541                         kk = MIN( ktt+mask_k(mid,k), nzt+1 )
    15371542!--                      Set value if not in building
    1538                          IF ( BTEST( wall_flags_static_0(kk,jm,im), 6 ) )  THEN
     1543                         IF ( BTEST( wall_flags_total_0(kk,jm,im), 6 ) )  THEN
    15391544                            local_pf(i,j,k) = fill_value
    15401545                         ELSE
     
    15681573                      im = mask_i(mid,i)
    15691574                      jm = mask_j(mid,j)
    1570                       ktt = MINLOC( MERGE( 1, 0, BTEST( wall_flags_static_0(:,jm,im), 5 )), DIM = 1 ) - 1
     1575                      ktt = MINLOC( MERGE( 1, 0, BTEST( wall_flags_total_0(:,jm,im), 5 )), DIM = 1 ) - 1
    15711576                      DO  k = 1, mask_size_l(mid,3)
    15721577                         kk = MIN( ktt+mask_k(mid,k), nzt+1 )
    15731578!--                      Set value if not in building
    1574                          IF ( BTEST( wall_flags_static_0(kk,jm,im), 6 ) )  THEN
     1579                         IF ( BTEST( wall_flags_total_0(kk,jm,im), 6 ) )  THEN
    15751580                            local_pf(i,j,k) = fill_value
    15761581                         ELSE
     
    18951900       ALLOCATE( cs_advc_flags_s(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
    18961901!
    1897 !--    In case of decyling, set Neumann boundary conditions for wall_flags_static_0
     1902!--    In case of decyling, set Neumann boundary conditions for wall_flags_total_0
    18981903!--    bit 31 instead of cyclic boundary conditions.
    18991904!--    Bit 31 is used to identify extended degradation zones (please see
     
    19011906!--    Note, since several also other modules like Salsa or other future
    19021907!--    one may access this bit but may have other boundary conditions, the
    1903 !--    original value of wall_flags_static_0 bit 31 must not be modified. Hence,
     1908!--    original value of wall_flags_total_0 bit 31 must not be modified. Hence,
    19041909!--    store the boundary conditions directly on cs_advc_flags_s.
    19051910!--    cs_advc_flags_s will be later overwritten in ws_init_flags_scalar and
     
    19081913       cs_advc_flags_s = 0
    19091914       cs_advc_flags_s = MERGE( IBSET( cs_advc_flags_s, 31 ), 0,               &
    1910                                 BTEST( wall_flags_static_0, 31 ) )
     1915                                BTEST( wall_flags_total_0, 31 ) )
    19111916
    19121917       IF ( decycle_chem_ns )  THEN
     
    27482753                     * ( chem_species(ilsp)%conc(k,j,i) - chem_species(ilsp)%conc_pr_init(k) )     &
    27492754                     )                                                                             &
    2750                      * MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_static_0(k,j,i), 0 ) )
     2755                     * MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_total_0(k,j,i), 0 ) )
    27512756
    27522757                IF ( chem_species(ilsp)%conc_p(k,j,i) < 0.0_wp )  THEN
     
    28582863               )                                                                                   &
    28592864               * MERGE( 1.0_wp, 0.0_wp,                                                            &
    2860                BTEST( wall_flags_static_0(k,j,i), 0 )                                                     &
     2865               BTEST( wall_flags_total_0(k,j,i), 0 )                                               &
    28612866               )
    28622867
     
    30003005                        rmask(j,i,sr)  *                                   &
    30013006                        MERGE( 1.0_wp, 0.0_wp,                             &
    3002                         BTEST( wall_flags_static_0(k,j,i), 22 ) )
     3007                        BTEST( wall_flags_total_0(k,j,i), 22 ) )
    30033008                ENDDO
    30043009             ENDDO
Note: See TracChangeset for help on using the changeset viewer.