- Timestamp:
- Oct 19, 2018 12:38:28 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/init_pt_anomaly.f90
r3035 r3379 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Added topography flags 28 ! 29 ! 3035 2018-05-24 09:35:20Z schwenkel 27 30 ! Add option to initialize warm air bubble close to surface 28 31 ! … … 70 73 !------------------------------------------------------------------------------! 71 74 SUBROUTINE init_pt_anomaly 72 75 73 76 74 77 USE arrays_3d, & 75 78 ONLY: pt, zu 76 79 77 USE control_parameters 78 80 USE control_parameters 81 79 82 USE grid_variables, & 80 83 ONLY: dx, dy 81 84 82 85 USE indices, & 83 ONLY: nbgp, nx, nxl, nxr, ny, nyn, nys, nzb, nzt 84 86 ONLY: nbgp, nx, nxl, nxr, ny, nyn, nys, nzb, nzt, wall_flags_0 87 85 88 USE kinds 86 89 … … 93 96 INTEGER(iwp) :: k !< grid index along z 94 97 INTEGER(iwp) :: kc !< center index along z 95 98 96 99 REAL(wp) :: amount !< amount of temperature perturbation 97 100 REAL(wp) :: bubble_center_y !< center of bubble in y … … 99 102 REAL(wp) :: bubble_sigma_y = 300.0 !< width of bubble in y 100 103 REAL(wp) :: bubble_sigma_z = 150.0 !< width of bubble in z 104 REAL(wp) :: flag !< flag to mask topography grid points 101 105 REAL(wp) :: initial_temperature_difference = 0.4 !< temperature perturbation for bubble in K 102 106 REAL(wp) :: radius !< radius of pt anomaly … … 105 109 REAL(wp) :: y !< y dimension of pt anomaly 106 110 REAL(wp) :: z !< z dimension of pt anomaly 107 108 111 112 109 113 ! 110 114 !-- Defaults: radius rc, strength z, … … 114 118 jc = ic 115 119 kc = nzt / 2 116 120 117 121 IF ( INDEX( initializing_actions, 'initialize_ptanom' ) /= 0 ) THEN 118 122 ! … … 121 125 DO j = nys, nyn 122 126 DO k = nzb+1, nzt 127 ! 128 !-- Predetermine flag to mask topography 129 flag = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j,i), 0 ) ) 130 123 131 x = ( i - ic ) * dx 124 132 y = ( j - jc ) * dy … … 131 139 ENDIF 132 140 133 pt(k,j,i) = pt(k,j,i) + amount 141 pt(k,j,i) = pt(k,j,i) + amount * flag 134 142 135 143 ENDDO 136 144 ENDDO 137 145 ENDDO 138 146 139 147 ! 140 148 !-- Initialize warm air bubble close to surface and homogenous elegonated … … 144 152 !-- Calculate y-center of model domain 145 153 bubble_center_y = ( ny + 1.0 ) * dy / 2.0 146 154 147 155 ! 148 156 !-- Compute perturbation for potential temperaure 149 157 DO i = nxl, nxr 150 158 DO j = nys, nyn 151 DO k = nzb+1, nzt 159 DO k = nzb+1, nzt 160 ! 161 !-- Predetermine flag to mask topography 162 flag = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j,i), 0 ) ) 163 152 164 pt(k,j,i) = pt(k,j,i) + & 153 165 EXP( -0.5 * ( (j* dy - bubble_center_y) / & … … 155 167 EXP( -0.5 * ( (zu(k) - bubble_center_z) / & 156 168 bubble_sigma_z)**2) * & 157 initial_temperature_difference 169 initial_temperature_difference * flag 158 170 ENDDO 159 171 ENDDO
Note: See TracChangeset
for help on using the changeset viewer.