Index: palm/trunk/SOURCE/chemistry_model_mod.f90
===================================================================
--- palm/trunk/SOURCE/chemistry_model_mod.f90	(revision 4306)
+++ palm/trunk/SOURCE/chemistry_model_mod.f90	(revision 4329)
@@ -27,4 +27,7 @@
 ! -----------------
 ! $Id$
+! Renamed wall_flags_0 to wall_flags_static_0
+! 
+! 4306 2019-11-25 12:04:48Z banzhafs
 ! Corretion for r4304 commit
 !
@@ -246,5 +249,5 @@
     USE indices,                                                                                   &
          ONLY:  advc_flags_s,                                                                      &
-                nbgp, nx, nxl, nxlg, nxr, nxrg, ny, nyn, nyng, nys, nysg, nz, nzb, nzt, wall_flags_0
+                nbgp, nx, nxl, nxlg, nxr, nxrg, ny, nyn, nyng, nys, nysg, nz, nzb, nzt, wall_flags_static_0
 
     USE pegrid,                                                                                    &
@@ -917,5 +920,5 @@
                 DO  j = nysg, nyng
                    DO  k = nzb+1, nzt
-                      flag = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j,i), 0 ) )
+                      flag = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_static_0(k,j,i), 0 ) )
                       cs_3d(k,j,i) = cs_pr_init(k) * flag
                    ENDDO
@@ -942,5 +945,5 @@
                 DO  j = nysg, nyng
                    DO  k = nzb+1, nzt
-                      flag = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j,i), 0 ) )
+                      flag = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_static_0(k,j,i), 0 ) )
                       cs_3d(k,j,i) = cs_3d(k,j,copied) * flag
                    ENDDO
@@ -979,5 +982,5 @@
                 DO  j = ss, ee
                    DO  k = nzb+1, nzt
-                      flag = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j,i), 0 ) )
+                      flag = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_static_0(k,j,i), 0 ) )
                       cs_3d(k,j,i) = cs_pr_init(k) * flag
                    ENDDO
@@ -1005,5 +1008,5 @@
                 DO  j = ss, ee
                    DO  k = nzb+1, nzt
-                      flag = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j,i), 0 ) )
+                      flag = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_static_0(k,j,i), 0 ) )
                       cs_3d(k,j,i) = cs_3d(k,copied,i) * flag
                    ENDDO
@@ -1328,5 +1331,5 @@
                                               chem_species(lsp)%conc(k,j,i),                       &
                                               REAL( fill_value, KIND = wp ),                       &
-                                              BTEST( wall_flags_0(k,j,i), 0 ) )
+                                              BTEST( wall_flags_static_0(k,j,i), 0 ) )
                       ENDDO
                    ENDDO
@@ -1340,5 +1343,5 @@
                                               chem_species(lsp)%conc_av(k,j,i),                    &
                                               REAL( fill_value, KIND = wp ),                       &
-                                              BTEST( wall_flags_0(k,j,i), 0 ) )
+                                              BTEST( wall_flags_static_0(k,j,i), 0 ) )
                       ENDDO
                    ENDDO
@@ -1436,5 +1439,5 @@
                                              chem_species(lsp)%conc(k,j,i),   &
                                              REAL( fill_value, KIND = wp ),   &
-                                             BTEST( wall_flags_0(k,j,i), 0 ) )
+                                             BTEST( wall_flags_static_0(k,j,i), 0 ) )
                      ENDDO
                   ENDDO
@@ -1449,5 +1452,5 @@
                                              chem_species(lsp)%conc_av(k,j,i),&
                                              REAL( fill_value, KIND = wp ),   &
-                                             BTEST( wall_flags_0(k,j,i), 0 ) )
+                                             BTEST( wall_flags_static_0(k,j,i), 0 ) )
                      ENDDO
                   ENDDO
@@ -1529,9 +1532,9 @@
                       im = mask_i(mid,i)
                       jm = mask_j(mid,j)
-                      ktt = MINLOC( MERGE( 1, 0, BTEST( wall_flags_0(:,jm,im), 5 )), DIM = 1 ) - 1
+                      ktt = MINLOC( MERGE( 1, 0, BTEST( wall_flags_static_0(:,jm,im), 5 )), DIM = 1 ) - 1
                       DO  k = 1, mask_size_l(mid,3)
                          kk = MIN( ktt+mask_k(mid,k), nzt+1 )
 !--                      Set value if not in building
-                         IF ( BTEST( wall_flags_0(kk,jm,im), 6 ) )  THEN
+                         IF ( BTEST( wall_flags_static_0(kk,jm,im), 6 ) )  THEN
                             local_pf(i,j,k) = fill_value
                          ELSE
@@ -1565,9 +1568,9 @@
                       im = mask_i(mid,i)
                       jm = mask_j(mid,j)
-                      ktt = MINLOC( MERGE( 1, 0, BTEST( wall_flags_0(:,jm,im), 5 )), DIM = 1 ) - 1
+                      ktt = MINLOC( MERGE( 1, 0, BTEST( wall_flags_static_0(:,jm,im), 5 )), DIM = 1 ) - 1
                       DO  k = 1, mask_size_l(mid,3)
                          kk = MIN( ktt+mask_k(mid,k), nzt+1 )
 !--                      Set value if not in building
-                         IF ( BTEST( wall_flags_0(kk,jm,im), 6 ) )  THEN
+                         IF ( BTEST( wall_flags_static_0(kk,jm,im), 6 ) )  THEN
                             local_pf(i,j,k) = fill_value
                          ELSE
@@ -1892,5 +1895,5 @@
        ALLOCATE( cs_advc_flags_s(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
 !
-!--    In case of decyling, set Neumann boundary conditions for wall_flags_0 
+!--    In case of decyling, set Neumann boundary conditions for wall_flags_static_0 
 !--    bit 31 instead of cyclic boundary conditions.
 !--    Bit 31 is used to identify extended degradation zones (please see
@@ -1898,5 +1901,5 @@
 !--    Note, since several also other modules like Salsa or other future 
 !--    one may access this bit but may have other boundary conditions, the 
-!--    original value of wall_flags_0 bit 31 must not be modified. Hence, 
+!--    original value of wall_flags_static_0 bit 31 must not be modified. Hence, 
 !--    store the boundary conditions directly on cs_advc_flags_s. 
 !--    cs_advc_flags_s will be later overwritten in ws_init_flags_scalar and
@@ -1905,5 +1908,5 @@
        cs_advc_flags_s = 0
        cs_advc_flags_s = MERGE( IBSET( cs_advc_flags_s, 31 ), 0,               &
-                                BTEST( wall_flags_0, 31 ) )
+                                BTEST( wall_flags_static_0, 31 ) )
 
        IF ( decycle_chem_ns )  THEN
@@ -2745,5 +2748,5 @@
                      * ( chem_species(ilsp)%conc(k,j,i) - chem_species(ilsp)%conc_pr_init(k) )     &
                      )                                                                             &
-                     * MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j,i), 0 ) )
+                     * MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_static_0(k,j,i), 0 ) )
 
                 IF ( chem_species(ilsp)%conc_p(k,j,i) < 0.0_wp )  THEN
@@ -2855,5 +2858,5 @@
                )                                                                                   &
                * MERGE( 1.0_wp, 0.0_wp,                                                            &
-               BTEST( wall_flags_0(k,j,i), 0 )                                                     &
+               BTEST( wall_flags_static_0(k,j,i), 0 )                                                     &
                )
 
@@ -2997,5 +3000,5 @@
                         rmask(j,i,sr)  *                                   &
                         MERGE( 1.0_wp, 0.0_wp,                             &
-                        BTEST( wall_flags_0(k,j,i), 22 ) )
+                        BTEST( wall_flags_static_0(k,j,i), 22 ) )
                 ENDDO
              ENDDO
