Changeset 4272 for palm/trunk/SOURCE
- Timestamp:
- Oct 23, 2019 3:18:57 PM (5 years ago)
- Location:
- palm/trunk/SOURCE
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/boundary_conds.f90
r4268 r4272 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Further modularization of boundary conditions: moved boundary conditions to 28 ! respective modules 29 ! 30 ! 4268 2019-10-17 11:29:38Z schwenkel 27 31 ! Removing bulk cloud variables to respective module 28 32 ! … … 68 72 ONLY: c_u, c_u_m, c_u_m_l, c_v, c_v_m, c_v_m_l, c_w, c_w_m, c_w_m_l, & 69 73 dzu, pt, pt_init, pt_p, q, & 70 q_p, s, s_p, sa, sa_p,u, u_init, u_m_l, u_m_n, &74 q_p, s, s_p, u, u_init, u_m_l, u_m_n, & 71 75 u_m_r, u_m_s, u_p, v, v_init, v_m_l, v_m_n, v_m_r, v_m_s, v_p, & 72 76 w, w_p, w_m_l, w_m_n, w_m_r, w_m_s 73 77 74 USE chemistry_model_mod, &75 ONLY: chem_boundary_conds76 77 78 USE control_parameters, & 78 ONLY: air_chemistry,bc_dirichlet_l, &79 ONLY: bc_dirichlet_l, & 79 80 bc_dirichlet_s, bc_radiation_l, bc_radiation_n, bc_radiation_r, & 80 81 bc_radiation_s, bc_pt_t_val, bc_q_t_val, bc_s_t_val, & … … 82 83 humidity, ibc_pt_b, ibc_pt_t, ibc_q_b, ibc_q_t, ibc_s_b, & 83 84 ibc_s_t, ibc_uv_b, ibc_uv_t, intermediate_timestep_count, & 84 nesting_offline, neutral, nudging, ocean_mode,passive_scalar, &85 tsc, salsa,use_cmax85 nesting_offline, neutral, nudging, passive_scalar, & 86 tsc, use_cmax 86 87 87 88 USE grid_variables, & … … 92 93 93 94 USE kinds 94 95 USE ocean_mod, &96 ONLY: ibc_sa_t97 95 98 96 USE pegrid … … 101 99 ONLY : nesting_mode 102 100 103 USE salsa_mod, &104 ONLY: salsa_boundary_conds105 106 101 USE surface_mod, & 107 102 ONLY : bc_h … … 188 183 !$ACC PRESENT(bc_h, pt_p) 189 184 DO m = 1, bc_h(l)%ns 190 i = bc_h(l)%i(m) 185 i = bc_h(l)%i(m) 191 186 j = bc_h(l)%j(m) 192 187 k = bc_h(l)%k(m) … … 215 210 ENDIF 216 211 ! 217 !-- Boundary conditions for salinity218 IF ( ocean_mode ) THEN219 !220 !-- Bottom boundary: Neumann condition because salinity flux is always221 !-- given.222 DO l = 0, 1223 !$OMP PARALLEL DO PRIVATE( i, j, k )224 DO m = 1, bc_h(l)%ns225 i = bc_h(l)%i(m)226 j = bc_h(l)%j(m)227 k = bc_h(l)%k(m)228 sa_p(k+bc_h(l)%koff,j,i) = sa_p(k,j,i)229 ENDDO230 ENDDO231 !232 !-- Top boundary: Dirichlet or Neumann233 IF ( ibc_sa_t == 0 ) THEN234 sa_p(nzt+1,:,:) = sa(nzt+1,:,:)235 ELSEIF ( ibc_sa_t == 1 ) THEN236 sa_p(nzt+1,:,:) = sa_p(nzt,:,:)237 ENDIF238 239 ENDIF240 241 !242 212 !-- Boundary conditions for total water content, 243 213 !-- bottom and top boundary (see also temperature) … … 327 297 !-- Set boundary conditions for subgrid TKE and dissipation (RANS mode) 328 298 CALL tcm_boundary_conds 329 !330 !-- Top/bottom boundary conditions for chemical species331 IF ( air_chemistry ) CALL chem_boundary_conds( 'set_bc_bottomtop' )332 299 ! 333 300 !-- In case of inflow or nest boundary at the south boundary the boundary for v … … 386 353 IF ( passive_scalar ) s_p(:,:,nxr+1) = s_p(:,:,nxr) 387 354 ENDIF 388 389 !390 !-- Lateral boundary conditions for chemical species391 IF ( air_chemistry ) CALL chem_boundary_conds( 'set_bc_lateral' )392 355 393 356 ! … … 883 846 ENDDO 884 847 885 #if defined( __parallel ) 848 #if defined( __parallel ) 886 849 IF ( collective_wait ) CALL MPI_BARRIER( comm1dy, ierr ) 887 850 CALL MPI_ALLREDUCE( c_u_m_l(nzb+1), c_u_m(nzb+1), nzt-nzb, MPI_REAL, & 888 MPI_SUM, comm1dy, ierr ) 851 MPI_SUM, comm1dy, ierr ) 889 852 IF ( collective_wait ) CALL MPI_BARRIER( comm1dy, ierr ) 890 853 CALL MPI_ALLREDUCE( c_v_m_l(nzb+1), c_v_m(nzb+1), nzt-nzb, MPI_REAL, & 891 MPI_SUM, comm1dy, ierr ) 854 MPI_SUM, comm1dy, ierr ) 892 855 IF ( collective_wait ) CALL MPI_BARRIER( comm1dy, ierr ) 893 856 CALL MPI_ALLREDUCE( c_w_m_l(nzb+1), c_w_m(nzb+1), nzt-nzb, MPI_REAL, & 894 MPI_SUM, comm1dy, ierr ) 857 MPI_SUM, comm1dy, ierr ) 895 858 #else 896 859 c_u_m = c_u_m_l … … 952 915 ENDIF 953 916 954 IF ( salsa ) THEN955 CALL salsa_boundary_conds956 ENDIF957 958 917 END SUBROUTINE boundary_conds -
palm/trunk/SOURCE/chemistry_model_mod.f90
r4268 r4272 27 27 ! ----------------- 28 28 ! $Id$ 29 ! Further modularization of boundary conditions: moved boundary conditions to 30 ! respective modules 31 ! 32 ! 4268 2019-10-17 11:29:38Z schwenkel 29 33 ! Moving module specific boundary conditions from time_integration to module 30 34 ! … … 819 823 820 824 ! 821 !-- Boundary conditions for prognostic quantitites of other modules: 822 !-- Here, only decycling is carried out 823 824 DO lsp = 1, nvar 825 lsp_usr = 1 826 DO WHILE ( TRIM( cs_name( lsp_usr ) ) /= 'novalue' ) 827 IF ( TRIM( chem_species(lsp)%name ) == TRIM( cs_name(lsp_usr) ) ) THEN 828 CALL chem_boundary_conds( chem_species(lsp)%conc_p, & 829 chem_species(lsp)%conc_pr_init ) 830 ENDIF 831 lsp_usr = lsp_usr + 1 832 ENDDO 833 ENDDO 825 !-- Top/bottom boundary conditions for chemical species 826 CALL chem_boundary_conds( 'set_bc_bottomtop' ) 827 ! 828 !-- Lateral boundary conditions for chemical species 829 CALL chem_boundary_conds( 'set_bc_lateral' ) 830 831 ! 832 !-- Boundary conditions for prognostic quantitites of other modules: 833 !-- Here, only decycling is carried out 834 DO lsp = 1, nvar 835 lsp_usr = 1 836 DO WHILE ( TRIM( cs_name( lsp_usr ) ) /= 'novalue' ) 837 IF ( TRIM( chem_species(lsp)%name ) == TRIM( cs_name(lsp_usr) ) ) THEN 838 CALL chem_boundary_conds( chem_species(lsp)%conc_p, & 839 chem_species(lsp)%conc_pr_init ) 840 ENDIF 841 lsp_usr = lsp_usr + 1 842 ENDDO 843 ENDDO 834 844 835 845 -
palm/trunk/SOURCE/module_interface.f90
r4268 r4272 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Further modularization of boundary conditions: moved boundary conditions to 28 ! respective modules 29 ! 30 ! 4268 2019-10-17 11:29:38Z schwenkel 27 31 ! Introduction of module_interface_boundary_conditions 28 32 ! … … 375 379 ocean_actions, & 376 380 ocean_prognostic_equations, & 381 ocean_boundary_conditions, & 377 382 ocean_swap_timelevel, & 378 383 ocean_3d_data_averaging, & … … 1296 1301 IF ( bulk_cloud_model ) CALL bcm_boundary_conditions 1297 1302 IF ( air_chemistry ) CALL chem_boundary_conditions 1303 IF ( ocean_mode ) CALL ocean_boundary_conditions 1298 1304 IF ( salsa ) CALL salsa_boundary_conditions 1299 1305 -
palm/trunk/SOURCE/ocean_mod.f90
r4196 r4272 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Further modularization of boundary conditions: moved boundary conditions to 28 ! respective modules 29 ! 30 ! 4196 2019-08-29 11:02:06Z gronemeier 27 31 ! Consider rotation of model domain for calculating the Stokes drift 28 32 ! … … 81 85 ONLY: sums_wssas_ws_l 82 86 87 USE indices, & 88 ONLY: advc_flags_s, nxl, nxr, nyn, nys, nzb, nzt, wall_flags_0 89 90 USE surface_mod, & 91 ONLY: bc_h, surf_def_v, surf_def_h, surf_lsm_h, surf_lsm_v, & 92 surf_usm_h, surf_usm_v 83 93 84 94 IMPLICIT NONE … … 192 202 END INTERFACE ocean_prognostic_equations 193 203 204 INTERFACE ocean_boundary_conditions 205 MODULE PROCEDURE ocean_boundary_conditions 206 END INTERFACE ocean_boundary_conditions 207 194 208 INTERFACE ocean_swap_timelevel 195 209 MODULE PROCEDURE ocean_swap_timelevel … … 236 250 ocean_swap_timelevel, ocean_rrd_global, ocean_rrd_local, & 237 251 ocean_wrd_global, ocean_wrd_local, ocean_3d_data_averaging, & 238 stokes_drift_terms, wave_breaking_term252 ocean_boundary_conditions, stokes_drift_terms, wave_breaking_term 239 253 240 254 … … 257 271 USE indices, & 258 272 ONLY: nxl, nxr, nyn, nys, nzb, nzt 259 260 USE surface_mod, &261 ONLY : bc_h262 273 263 274 IMPLICIT NONE … … 370 381 USE indices, & 371 382 ONLY: nzb, nzt 372 373 USE surface_mod, &374 ONLY : bc_h375 383 376 384 IMPLICIT NONE … … 1585 1593 USE diffusion_s_mod, & 1586 1594 ONLY: diffusion_s 1587 1588 USE indices, &1589 ONLY: advc_flags_s, nxl, nxr, nyn, nys, nzb, nzt, wall_flags_01590 1591 USE surface_mod, &1592 ONLY: surf_def_v, surf_def_h, surf_lsm_h, surf_lsm_v, surf_usm_h, &1593 surf_usm_v1594 1595 1595 1596 IMPLICIT NONE … … 1757 1758 USE diffusion_s_mod, & 1758 1759 ONLY: diffusion_s 1759 1760 USE indices, &1761 ONLY: advc_flags_s, nzb, nzt, wall_flags_01762 1763 USE surface_mod, &1764 ONLY: surf_def_v, surf_def_h, surf_lsm_h, surf_lsm_v, surf_usm_h, &1765 surf_usm_v1766 1760 1767 1761 IMPLICIT NONE … … 1862 1856 END SUBROUTINE ocean_prognostic_equations_ij 1863 1857 1858 !------------------------------------------------------------------------------! 1859 ! Description: 1860 ! ------------ 1861 !> Boundary conditions for ocean model 1862 !------------------------------------------------------------------------------! 1863 SUBROUTINE ocean_boundary_conditions 1864 1865 IMPLICIT NONE 1866 1867 INTEGER(iwp) :: i !< grid index x direction. 1868 INTEGER(iwp) :: j !< grid index y direction. 1869 INTEGER(iwp) :: k !< grid index z direction. 1870 INTEGER(iwp) :: l !< running index boundary type, for up- and downward-facing walls. 1871 INTEGER(iwp) :: m !< running index surface elements. 1872 1873 ! 1874 !-- Boundary conditions for salinity 1875 !-- Bottom boundary: Neumann condition because salinity flux is always 1876 !-- given. 1877 DO l = 0, 1 1878 !$OMP PARALLEL DO PRIVATE( i, j, k ) 1879 DO m = 1, bc_h(l)%ns 1880 i = bc_h(l)%i(m) 1881 j = bc_h(l)%j(m) 1882 k = bc_h(l)%k(m) 1883 sa_p(k+bc_h(l)%koff,j,i) = sa_p(k,j,i) 1884 ENDDO 1885 ENDDO 1886 ! 1887 !-- Top boundary: Dirichlet or Neumann 1888 IF ( ibc_sa_t == 0 ) THEN 1889 sa_p(nzt+1,:,:) = sa(nzt+1,:,:) 1890 ELSEIF ( ibc_sa_t == 1 ) THEN 1891 sa_p(nzt+1,:,:) = sa_p(nzt,:,:) 1892 ENDIF 1893 1894 END SUBROUTINE ocean_boundary_conditions 1864 1895 1865 1896 !------------------------------------------------------------------------------! -
palm/trunk/SOURCE/salsa_mod.f90
r4270 r4272 26 26 ! ----------------- 27 27 ! $Id$ 28 ! Further modularization of boundary conditions: moved boundary conditions to 29 ! respective modules 30 ! 31 ! 4270 2019-10-23 10:46:20Z monakurppa 28 32 ! - Implement offline nesting for salsa 29 33 ! - Alphabetic ordering for module interfaces … … 8090 8094 INTEGER(iwp) :: ig !< index for salsa gases 8091 8095 8096 8097 ! 8098 !-- moved from boundary_conds 8099 CALL salsa_boundary_conds 8092 8100 ! 8093 8101 !-- Boundary conditions for prognostic quantitites of other modules:
Note: See TracChangeset
for help on using the changeset viewer.