Changeset 3035 for palm/trunk/SOURCE
- Timestamp:
- May 24, 2018 9:35:20 AM (7 years ago)
- Location:
- palm/trunk/SOURCE
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/check_parameters.f90
r3034 r3035 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Add option to initialize warm air bubble close to surface 28 ! 29 ! 3034 2018-05-24 08:41:20Z raasch 27 30 ! bugfix: check that initializing_actions has been set 28 31 ! … … 1366 1369 CASE ( 'set_constant_profiles', 'set_1d-model_profiles', & 1367 1370 'by_user', 'initialize_vortex', 'initialize_ptanom', & 1368 'ini for' )1371 'initialize_bubble', 'inifor' ) 1369 1372 action = action(position+1:) 1370 1373 -
palm/trunk/SOURCE/init_3d_model.f90
r3014 r3035 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Add option to initialize warm air bubble close to surface 28 ! 29 ! 3014 2018-05-09 08:42:38Z maronga 27 30 ! Bugfix: initialization of ts_value missing 28 31 ! … … 1586 1589 1587 1590 ! 1588 !-- Impose temperature anomaly (advection test only) 1589 IF ( INDEX( initializing_actions, 'initialize_ptanom' ) /= 0 ) THEN 1591 !-- Impose temperature anomaly (advection test only) or warm air bubble 1592 !-- close to surface 1593 IF ( INDEX( initializing_actions, 'initialize_ptanom' ) /= 0 .OR. & 1594 INDEX( initializing_actions, 'initialize_bubble' ) /= 0 ) THEN 1590 1595 CALL init_pt_anomaly 1591 1596 ENDIF 1592 1597 1593 1598 ! 1594 1599 !-- If required, change the surface temperature at the start of the 3D run -
palm/trunk/SOURCE/init_pt_anomaly.f90
r2718 r3035 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Add option to initialize warm air bubble close to surface 28 ! 29 ! 2718 2018-01-02 08:49:38Z maronga 27 30 ! Corrected "Former revisions" section 28 31 ! … … 72 75 ONLY: pt, zu 73 76 77 USE control_parameters 78 74 79 USE grid_variables, & 75 80 ONLY: dx, dy 76 81 77 82 USE indices, & 78 ONLY: nbgp, nx, nxl, nxr, ny n, nys, nzb, nzt83 ONLY: nbgp, nx, nxl, nxr, ny, nyn, nys, nzb, nzt 79 84 80 85 USE kinds … … 82 87 IMPLICIT NONE 83 88 84 INTEGER(iwp) :: i !< 85 INTEGER(iwp) :: ic !< 86 INTEGER(iwp) :: j !< 87 INTEGER(iwp) :: jc !< 88 INTEGER(iwp) :: k !< 89 INTEGER(iwp) :: kc !< 89 INTEGER(iwp) :: i !< grid index along x 90 INTEGER(iwp) :: ic !< center index along x 91 INTEGER(iwp) :: j !< grid index along y 92 INTEGER(iwp) :: jc !< center index along y 93 INTEGER(iwp) :: k !< grid index along z 94 INTEGER(iwp) :: kc !< center index along z 90 95 91 REAL(wp) :: betrag !< 92 REAL(wp) :: radius !< 93 REAL(wp) :: rc !< 94 REAL(wp) :: x !< 95 REAL(wp) :: y !< 96 REAL(wp) :: z !< 96 REAL(wp) :: amount !< amount of temperature perturbation 97 REAL(wp) :: bubble_center_y !< center of bubble in y 98 REAL(wp) :: bubble_center_z = 170.0 !< center of bubble in z 99 REAL(wp) :: bubble_sigma_y = 300.0 !< width of bubble in y 100 REAL(wp) :: bubble_sigma_z = 150.0 !< width of bubble in z 101 REAL(wp) :: initial_temperature_difference = 0.4 !< temperature perturbation for bubble in K 102 REAL(wp) :: radius !< radius of pt anomaly 103 REAL(wp) :: rc !< radius of pt anomaly 104 REAL(wp) :: x !< x dimension of pt anomaly 105 REAL(wp) :: y !< y dimension of pt anomaly 106 REAL(wp) :: z !< z dimension of pt anomaly 107 97 108 98 109 ! 99 110 !-- Defaults: radius rc, strength z, 100 !-- position of cent re: ic, jc, kc111 !-- position of center: ic, jc, kc 101 112 rc = 10.0_wp * dx 102 113 ic = ( nx+1 ) / 2 103 114 jc = ic 104 115 kc = nzt / 2 116 117 IF ( INDEX( initializing_actions, 'initialize_ptanom' ) /= 0 ) THEN 118 ! 119 !-- Compute the perturbation. 120 DO i = nxl, nxr 121 DO j = nys, nyn 122 DO k = nzb+1, nzt 123 x = ( i - ic ) * dx 124 y = ( j - jc ) * dy 125 z = ABS( zu(k) - zu(kc) ) 126 radius = SQRT( x**2 + y**2 + z**2 ) 127 IF ( radius <= rc ) THEN 128 amount = 5.0_wp * EXP( -( radius * 0.001_wp / 2.0_wp )**2 ) 129 ELSE 130 amount = 0.0_wp 131 ENDIF 105 132 106 ! 107 !-- Compute the perturbation. 108 DO i = nxl, nxr 109 DO j = nys, nyn 110 DO k = nzb+1, nzt 111 x = ( i - ic ) * dx 112 y = ( j - jc ) * dy 113 z = ABS( zu(k) - zu(kc) ) 114 radius = SQRT( x**2 + y**2 + z**2 ) 115 IF ( radius <= rc ) THEN 116 betrag = 5.0_wp * EXP( -( radius * 0.001_wp / 2.0_wp )**2 ) 117 ELSE 118 betrag = 0.0_wp 119 ENDIF 133 pt(k,j,i) = pt(k,j,i) + amount 120 134 121 pt(k,j,i) = pt(k,j,i) + betrag 122 135 ENDDO 123 136 ENDDO 124 137 ENDDO 125 ENDDO 138 139 ! 140 !-- Initialize warm air bubble close to surface and homogenous elegonated 141 !-- along x-Axis 142 ELSEIF ( INDEX( initializing_actions, 'initialize_bubble' ) /= 0 ) THEN 143 ! 144 !-- Calculate y-center of model domain 145 bubble_center_y = ( ny + 1.0 ) * dy / 2.0 146 147 ! 148 !-- Compute perturbation for potential temperaure 149 DO i = nxl, nxr 150 DO j = nys, nyn 151 DO k = nzb+1, nzt 152 pt(k,j,i) = pt(k,j,i) + & 153 EXP( -0.5 * ( (j* dy - bubble_center_y) / & 154 bubble_sigma_y )**2) * & 155 EXP( -0.5 * ( (zu(k) - bubble_center_z) / & 156 bubble_sigma_z)**2) * & 157 initial_temperature_difference 158 ENDDO 159 ENDDO 160 ENDDO 161 ENDIF 126 162 127 163 !
Note: See TracChangeset
for help on using the changeset viewer.