Changeset 4102 for palm/trunk/SOURCE/chemistry_model_mod.f90
- Timestamp:
- Jul 17, 2019 4:00:03 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/chemistry_model_mod.f90
r4080 r4102 27 27 ! ----------------- 28 28 ! $Id$ 29 ! Slightly revise setting of boundary conditions at horizontal walls, use 30 ! data-structure offset index instead of pre-calculate it for each facing 31 ! 32 ! 4080 2019-07-09 18:17:37Z suehring 29 33 ! Restore accidantly removed limitation to positive values 30 34 ! … … 804 808 INTEGER(iwp) :: j !< grid index y direction. 805 809 INTEGER(iwp) :: k !< grid index z direction. 806 INTEGER(iwp) :: kb !< variable to set respective boundary value, depends on facing.807 810 INTEGER(iwp) :: l !< running index boundary type, for up- and downward-facing walls. 808 811 INTEGER(iwp) :: m !< running index surface elements. … … 839 842 CASE ( 'set_bc_bottomtop' ) 840 843 ! 841 !-- Bottom boundary condtions for chemical species844 !-- Boundary condtions for chemical species at horizontal walls 842 845 DO lsp = 1, nspec 843 IF ( ibc_cs_b == 0 ) THEN 846 IF ( ibc_cs_b == 0 ) THEN 844 847 DO l = 0, 1 845 !846 !-- Set index kb: For upward-facing surfaces (l=0), kb=-1, i.e.847 !-- the chem_species(nspec)%conc_p value at the topography top (k-1)848 !-- is set; for downward-facing surfaces (l=1), kb=1, i.e. the849 !-- value at the topography bottom (k+1) is set.850 851 kb = MERGE( -1, 1, l == 0 )852 848 !$OMP PARALLEL DO PRIVATE( i, j, k ) 853 849 DO m = 1, bc_h(l)%ns … … 855 851 j = bc_h(l)%j(m) 856 852 k = bc_h(l)%k(m) 857 chem_species(lsp)%conc_p(k+kb,j,i) = chem_species(lsp)%conc(k+kb,j,i) 853 chem_species(lsp)%conc_p(k+bc_h(l)%koff,j,i) = & 854 chem_species(lsp)%conc(k+bc_h(l)%koff,j,i) 858 855 ENDDO 859 856 ENDDO … … 863 860 !-- in boundary_conds there is som extra loop over m here for passive tracer 864 861 DO l = 0, 1 865 kb = MERGE( -1, 1, l == 0 )866 862 !$OMP PARALLEL DO PRIVATE( i, j, k ) 867 863 DO m = 1, bc_h(l)%ns … … 869 865 j = bc_h(l)%j(m) 870 866 k = bc_h(l)%k(m) 871 chem_species(lsp)%conc_p(k+kb,j,i) = chem_species(lsp)%conc_p(k,j,i) 867 chem_species(lsp)%conc_p(k+bc_h(l)%koff,j,i) = & 868 chem_species(lsp)%conc_p(k,j,i) 872 869 873 870 ENDDO
Note: See TracChangeset
for help on using the changeset viewer.