- Timestamp:
- Oct 16, 2017 5:12:01 PM (7 years ago)
- Location:
- palm/trunk/SOURCE
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/check_parameters.f90
r2513 r2550 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Added checks for complex terrain simulations 28 ! 29 ! 2513 2017-10-04 09:24:39Z kanani 27 30 ! Bugfix for some dopr(_initial)_index values and units connected to 28 31 ! passive-scalar output … … 3901 3904 ENDIF 3902 3905 3906 ! 3903 3907 !-- Vertical nesting: check fine and coarse grid compatibility for data exchange 3904 3908 IF ( vnested ) CALL vnest_check_parameters 3909 3910 ! 3911 !-- Check if topography is read from file in case of complex terrain simulations 3912 IF ( complex_terrain .AND. TRIM( topography ) /= 'read_from_file' ) THEN 3913 message_string = 'complex_terrain requires topography' // & 3914 ' = ''read_from_file''' 3915 CALL message( 'check_parameters', 'PA0472', 1, 2, 0, 6, 0 ) 3916 ENDIF 3917 3918 ! 3919 !-- Check if vertical grid stretching is switched off in case of complex 3920 !-- terrain simulations 3921 IF ( complex_terrain .AND. dz_stretch_level < 100000.0_wp ) THEN 3922 message_string = 'Vertical grid stretching is not allowed for ' // & 3923 'complex_terrain = .T.' 3924 CALL message( 'check_parameters', 'PA0473', 1, 2, 0, 6, 0 ) 3925 ENDIF 3905 3926 3906 3927 CALL location_message( 'finished', .TRUE. ) -
palm/trunk/SOURCE/header.f90
r2544 r2550 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Added output for complex terrain simulations 28 ! 29 ! 2544 2017-10-13 18:09:32Z maronga 27 30 ! Moved initial day of year and time to inipar. 28 31 ! … … 403 406 404 407 USE surface_mod, & 405 ONLY: surf_def_h 408 ONLY: surf_def_h, get_topography_top_index 406 409 407 410 USE synthetic_turbulence_generator_mod, & … … 972 975 ELSEIF ( TRIM( topography_grid_convention ) == 'cell_center' ) THEN 973 976 WRITE ( io, 279 ) 977 ENDIF 978 ENDIF 979 980 !-- Complex terrain 981 IF ( complex_terrain ) THEN 982 WRITE( io, 280 ) 983 IF ( turbulent_inflow ) THEN 984 WRITE( io, 281 ) zu( get_topography_top_index( 0, 0, 's' ) ) 985 ENDIF 986 IF ( TRIM( initializing_actions ) == 'cyclic_fill' ) THEN 987 WRITE( io, 282 ) 974 988 ENDIF 975 989 ENDIF … … 2051 2065 279 FORMAT (' Topography grid definition convention:'/ & 2052 2066 ' cell center (scalar grid points)' /) 2067 280 FORMAT (' Complex terrain simulation is activated.') 2068 281 FORMAT (' --> Mean inflow profiles are adjusted.' / & 2069 ' --> Elevation of inflow boundary: ', F7.1, ' m' ) 2070 282 FORMAT (' --> Initial data from 3D-precursor run is shifted' / & 2071 ' vertically depending on local surface height.') 2053 2072 300 FORMAT (//' Boundary conditions:'/ & 2054 2073 ' -------------------'// & -
palm/trunk/SOURCE/init_3d_model.f90
r2513 r2550 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Modifications to cyclic fill method and turbulence recycling method in case of 28 ! complex terrain simulations 29 ! 30 ! 2513 2017-10-04 09:24:39Z kanani 27 31 ! Bugfix in storing initial scalar profile (wrong index) 28 32 ! … … 436 440 USE surface_mod, & 437 441 ONLY : init_surface_arrays, init_surfaces, surf_def_h, surf_lsm_h, & 438 surf_usm_h 442 surf_usm_h, get_topography_top_index 439 443 440 444 USE transpose_indices … … 477 481 REAL(wp), DIMENSION(:), ALLOCATABLE :: ngp_3d_inner_tmp !< 478 482 483 INTEGER(iwp) :: nz_u_shift !< 484 INTEGER(iwp) :: nz_v_shift !< 485 INTEGER(iwp) :: nz_w_shift !< 486 INTEGER(iwp) :: nz_s_shift !< 487 INTEGER(iwp) :: nz_u_shift_l !< 488 INTEGER(iwp) :: nz_v_shift_l !< 489 INTEGER(iwp) :: nz_w_shift_l !< 490 INTEGER(iwp) :: nz_s_shift_l !< 479 491 480 492 CALL location_message( 'allocating arrays', .FALSE. ) … … 1457 1469 1458 1470 ! 1471 !-- In case of complex terrain and cyclic fill method as initialization, 1472 !-- shift initial data in the vertical direction for each point in the 1473 !-- x-y-plane depending on local surface height 1474 IF ( complex_terrain .AND. & 1475 TRIM( initializing_actions ) == 'cyclic_fill' ) THEN 1476 DO i = nxlg, nxrg 1477 DO j = nysg, nyng 1478 nz_u_shift = get_topography_top_index( j, i, 'u' ) 1479 nz_v_shift = get_topography_top_index( j, i, 'v' ) 1480 nz_w_shift = get_topography_top_index( j, i, 'w' ) 1481 nz_s_shift = get_topography_top_index( j, i, 's' ) 1482 1483 u(nz_u_shift:nzt+1,j,i) = u(0:nzt+1-nz_u_shift,j,i) 1484 1485 v(nz_v_shift:nzt+1,j,i) = v(0:nzt+1-nz_v_shift,j,i) 1486 1487 w(nz_w_shift:nzt+1,j,i) = w(0:nzt+1-nz_w_shift,j,i) 1488 1489 e(nz_s_shift:nzt+1,j,i) = e(0:nzt+1-nz_s_shift,j,i) 1490 p(nz_s_shift:nzt+1,j,i) = p(0:nzt+1-nz_s_shift,j,i) 1491 pt(nz_s_shift:nzt+1,j,i) = pt(0:nzt+1-nz_s_shift,j,i) 1492 km(nz_s_shift:nzt+1,j,i) = km(0:nzt+1-nz_s_shift,j,i) 1493 kh(nz_s_shift:nzt+1,j,i) = kh(0:nzt+1-nz_s_shift,j,i) 1494 ENDDO 1495 ENDDO 1496 ENDIF 1497 1498 ! 1459 1499 !-- Initialization of the turbulence recycling method 1460 1500 IF ( TRIM( initializing_actions ) == 'cyclic_fill' .AND. & … … 1480 1520 IF ( passive_scalar ) & 1481 1521 mean_inflow_profiles(:,7) = hom_sum(:,115,0) ! s 1522 ! 1523 !-- In case of complex terrain, determine vertical displacement at inflow 1524 !-- boundary and adjust mean inflow profiles 1525 IF ( complex_terrain ) THEN 1526 IF ( nxlg <= 0 .AND. nxrg >= 0 .AND. nysg <= 0 .AND. nyng >= 0 ) THEN 1527 nz_u_shift_l = get_topography_top_index( 0, 0, 'u' ) 1528 nz_v_shift_l = get_topography_top_index( 0, 0, 'v' ) 1529 nz_w_shift_l = get_topography_top_index( 0, 0, 'w' ) 1530 nz_s_shift_l = get_topography_top_index( 0, 0, 's' ) 1531 ELSE 1532 nz_u_shift_l = 0 1533 nz_v_shift_l = 0 1534 nz_w_shift_l = 0 1535 nz_s_shift_l = 0 1536 ENDIF 1537 1538 #if defined( __parallel ) 1539 CALL MPI_ALLREDUCE(nz_u_shift_l, nz_u_shift, 1, MPI_INTEGER, & 1540 MPI_MAX, comm2d, ierr) 1541 CALL MPI_ALLREDUCE(nz_v_shift_l, nz_v_shift, 1, MPI_INTEGER, & 1542 MPI_MAX, comm2d, ierr) 1543 CALL MPI_ALLREDUCE(nz_w_shift_l, nz_w_shift, 1, MPI_INTEGER, & 1544 MPI_MAX, comm2d, ierr) 1545 CALL MPI_ALLREDUCE(nz_s_shift_l, nz_s_shift, 1, MPI_INTEGER, & 1546 MPI_MAX, comm2d, ierr) 1547 #else 1548 nz_u_shift = nz_u_shift_l 1549 nz_v_shift = nz_v_shift_l 1550 nz_w_shift = nz_w_shift_l 1551 nz_s_shift = nz_s_shift_l 1552 #endif 1553 1554 mean_inflow_profiles(:,1) = 0.0_wp 1555 mean_inflow_profiles(nz_u_shift:nzt+1,1) = hom_sum(0:nzt+1-nz_u_shift,1,0) ! u 1556 1557 mean_inflow_profiles(:,2) = 0.0_wp 1558 mean_inflow_profiles(nz_v_shift:nzt+1,2) = hom_sum(0:nzt+1-nz_v_shift,2,0) ! v 1559 1560 mean_inflow_profiles(nz_s_shift:nzt+1,4) = hom_sum(0:nzt+1-nz_s_shift,4,0) ! pt 1561 mean_inflow_profiles(nz_s_shift:nzt+1,5) = hom_sum(0:nzt+1-nz_s_shift,8,0) ! e 1562 1563 ENDIF 1482 1564 1483 1565 ! -
palm/trunk/SOURCE/init_grid.f90
r2478 r2550 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Set lateral boundary conditions for topography on all three ghost layers 28 ! 29 ! 2478 2017-09-18 13:37:24Z suehring 27 30 ! Bugfix, correct flag for use_top 28 31 ! … … 1041 1044 1042 1045 IF ( .NOT. bc_ns_cyc ) THEN 1043 IF ( nys == 0 ) nzb_local(-1,:) = nzb_local(0,:) 1044 IF ( nyn == ny ) nzb_local(ny+1,:) = nzb_local(ny,:) 1046 IF ( nys == 0 ) THEN 1047 nzb_local(-1,:) = nzb_local(0,:) 1048 nzb_local(-2,:) = nzb_local(0,:) 1049 nzb_local(-3,:) = nzb_local(0,:) 1050 ELSEIF ( nyn == ny ) THEN 1051 nzb_local(ny+1,:) = nzb_local(ny,:) 1052 nzb_local(ny+2,:) = nzb_local(ny,:) 1053 nzb_local(ny+3,:) = nzb_local(ny,:) 1054 ENDIF 1045 1055 ENDIF 1046 1056 1047 1057 IF ( .NOT. bc_lr_cyc ) THEN 1048 IF ( nxl == 0 ) nzb_local(:,-1) = nzb_local(:,0) 1049 IF ( nxr == nx ) nzb_local(:,nx+1) = nzb_local(:,nx) 1058 IF ( nxl == 0 ) THEN 1059 nzb_local(:,-1) = nzb_local(:,0) 1060 nzb_local(:,-2) = nzb_local(:,0) 1061 nzb_local(:,-3) = nzb_local(:,0) 1062 ELSEIF ( nxr == nx ) THEN 1063 nzb_local(:,nx+1) = nzb_local(:,nx) 1064 nzb_local(:,nx+2) = nzb_local(:,nx) 1065 nzb_local(:,nx+3) = nzb_local(:,nx) 1066 ENDIF 1050 1067 ENDIF 1051 1068 -
palm/trunk/SOURCE/modules.f90
r2508 r2550 25 25 ! ----------------- 26 26 ! $Id$ 27 ! complex_terrain namelist parameter added 28 ! 29 ! 2508 2017-10-02 08:57:09Z suehring 27 30 ! Change default value for pt/q/s/sa_vertical_gradient_level 28 31 ! … … 1154 1157 LOGICAL :: cloud_physics = .FALSE. !< namelist parameter 1155 1158 LOGICAL :: cloud_top_radiation = .FALSE. !< namelist parameter 1159 LOGICAL :: complex_terrain = .FALSE. !< namelist parameter 1156 1160 LOGICAL :: conserve_volume_flow = .FALSE. !< namelist parameter 1157 1161 LOGICAL :: constant_diffusion = .FALSE. !< diffusion coefficient constant? … … 1923 1927 1924 1928 CHARACTER (LEN=40) :: region(0:9) !< label for statistic region 1925 1926 INTEGER(iwp) :: pr_palm = 130 !< maximum number of output profiles1929 1930 INTEGER(iwp) :: pr_palm = 200 !< maximum number of output profiles 1927 1931 INTEGER(iwp) :: statistic_regions = 0 !< identifier for statistic regions 1928 1932 1929 1933 INTEGER(iwp) :: u_max_ijk(3) = -1 !< index values (i,j,k) of location where u_max occurs 1930 1934 INTEGER(iwp) :: v_max_ijk(3) = -1 !< index values (i,j,k) of location where v_max occurs -
palm/trunk/SOURCE/parin.f90
r2544 r2550 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Added complex_terrain 28 ! 29 ! 2544 2017-10-13 18:09:32Z maronga 27 30 ! Moved day_of_year_init and time_utc_init to inipar. 28 31 ! … … 394 397 cloud_physics, cloud_scheme, cloud_top_radiation, & 395 398 cloud_water_sedimentation, & 396 collective_wait, collision_turbulence, conserve_volume_flow, & 399 collective_wait, collision_turbulence, complex_terrain, & 400 conserve_volume_flow, & 397 401 conserve_volume_flow_mode, constant_flux_layer, & 398 402 coupling_start_time, curvature_solution_effects_bulk, &
Note: See TracChangeset
for help on using the changeset viewer.