Changeset 75 for palm/trunk
- Timestamp:
- Mar 22, 2007 9:54:05 AM (18 years ago)
- Location:
- palm/trunk
- Files:
-
- 46 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/DOC/app/chapter_4.1.html
r72 r75 88 88 <span style="font-weight: bold;">bc_lr</span> may 89 89 also be 90 assigned the values <span style="font-style: italic;">'dirichlet/ neumann'</span>91 (inflow from left, outflow to the right) or <span style="font-style: italic;">' neumann/dirichlet'</span>90 assigned the values <span style="font-style: italic;">'dirichlet/radiation'</span> 91 (inflow from left, outflow to the right) or <span style="font-style: italic;">'radiation/dirichlet'</span> 92 92 (inflow from 93 93 right, outflow to the left). This requires the multi-grid method to be 94 94 used for solving the Poisson equation for perturbation pressure (see <a href="http://www.muk.uni-hannover.de/%7Eraasch/PALM_group/doc/app/chapter_4.2.html#psolver">psolver</a>) 95 and it also requires cyclic boundary conditions along y (see <br><a href="#bc_ns">bc_ns</a>).<br> <br>95 and it also requires cyclic boundary conditions along y (see <a href="#bc_ns">bc_ns</a>).<br> <br> 96 96 In case of these non-cyclic lateral boundaries, a Dirichlet condition 97 97 is used at the inflow for all quantities (initial vertical profiles - 98 98 see <a href="#initializing_actions">initializing_actions</a> 99 99 - are fixed during the run) except u, to which a Neumann (zero 100 gradient) condition is applied. At the outflow, a Neumann (zero 101 gradient) condition is used for all quantities except v, which is set 102 to its horizontal average along the outflow (e.g. v(k,:,nx+1) = 103 average_along_y( v(k,:,nx)), and except w, which is set to zero 104 (Dirichlet condition). These conditions ensure the velocity field to be 105 free of divergence at the inflow and at the outflow. For perturbation 100 gradient) condition is applied. At the outflow, a radiation condition is used for all velocity components, while a Neumann (zero 101 gradient) condition is used for the scalars. For perturbation 106 102 pressure Neumann (zero gradient) conditions are assumed both at the 107 103 inflow and at the outflow.<br> <br> … … 137 133 <span style="font-weight: bold;">bc_ns</span> may 138 134 also be 139 assigned the values <span style="font-style: italic;">'dirichlet/ neumann'</span>140 (inflow from rear ("north"), outflow to the front ("south")) or <span style="font-style: italic;">' neumann/dirichlet'</span>135 assigned the values <span style="font-style: italic;">'dirichlet/radiation'</span> 136 (inflow from rear ("north"), outflow to the front ("south")) or <span style="font-style: italic;">'radiation/dirichlet'</span> 141 137 (inflow from front ("south"), outflow to the rear ("north")). This 142 138 requires the multi-grid … … 146 142 In case of these non-cyclic lateral boundaries, a Dirichlet condition 147 143 is used at the inflow for all quantities (initial vertical profiles - 148 see <a href="#initializing_actions">initializing_actions</a> 149 - are fixed during the run) except v, to which a Neumann (zero 150 gradient) condition is applied. At the outflow, a Neumann (zero 151 gradient) condition is used for all quantities except u, which is set 152 to its horizontal average along the outflow (e.g. u(k,ny+1,:) = 153 average_along_x( u(k,ny,:)), and except w, which is set to zero 154 (Dirichlet condition). These conditions ensure the velocity field to be 155 free of divergence at the inflow and at the outflow. For perturbation 144 see <a href="chapter_4.1.html#initializing_actions">initializing_actions</a> 145 - are fixed during the run) except u, to which a Neumann (zero 146 gradient) condition is applied. At the outflow, a radiation condition is used for all velocity components, while a Neumann (zero 147 gradient) condition is used for the scalars. For perturbation 156 148 pressure Neumann (zero gradient) conditions are assumed both at the 157 149 inflow and at the outflow.<br> <br> … … 428 420 Also cloud-top cooling by longwave radiation can be utilized (see <a href="#radiation">radiation</a>)<br> <b><br> 429 421 cloud_physics =</b> <span style="font-style: italic;">.TRUE. 430 </span>requires <a href="#moisture">moisture</a>422 </span>requires <a href="#humidity">humidity</a> 431 423 =<span style="font-style: italic;"> .TRUE.</span> .<br> 432 424 Detailed information about the condensation scheme is given in the … … 890 882 the so-called Blackadar mixing length is used (l = kappa * z / ( 1 + 891 883 kappa * z / lambda ) with the limiting value lambda = 2.7E-4 * u_g / f).<br> 892 </td> </tr> <tr> <td style="vertical-align: top;"> <p><a name=" moisture"></a><b>moisture</b></p>884 </td> </tr> <tr> <td style="vertical-align: top;"> <p><a name="humidity"></a><b>humidity</b></p> 893 885 </td> <td style="vertical-align: top;">L</td> 894 886 <td style="vertical-align: top;"><i>.F.</i></td> … … 953 945 <br> <span style="font-weight: bold;">Important: </span>The 954 946 upstream-spline scheme is not implemented for humidity and passive 955 scalars (see <a href="#moisture">moisture</a>947 scalars (see <a href="#humidity">humidity</a> 956 948 and <a href="#passive_scalar">passive_scalar</a>) 957 949 and requires the use of a 2d-domain-decomposition. The last conditions … … 1206 1198 With <span style="font-weight: bold;">passive_scalar</span> 1207 1199 switched 1208 on, the simultaneous use of humidity (see <a href="#moisture">moisture</a>)1200 on, the simultaneous use of humidity (see <a href="#humidity">humidity</a>) 1209 1201 is impossible.</p> </td> </tr> <tr> <td style="vertical-align: top;"> <p><a name="phi"></a><b>phi</b></p> 1210 1202 </td> <td style="vertical-align: top;">R</td> … … 1367 1359 <br> <b>_level</b></p> </td> <td style="vertical-align: top;">R (10)</td> <td style="vertical-align: top;"> <p><i>10 *</i> 1368 1360 <i>0.0</i></p> </td> <td style="vertical-align: top;"> <p>Height level from 1369 which on the moisturegradient defined by <a href="#q_vertical_gradient">q_vertical_gradient</a>1361 which on the humidity gradient defined by <a href="#q_vertical_gradient">q_vertical_gradient</a> 1370 1362 is effective (in m). </p> <p>The height levels 1371 1363 are to be assigned in ascending order. The … … 1533 1525 </p> <p style="margin-left: 40px;"><span style="font-weight: bold;">Important: </span>The 1534 1526 upstream-spline scheme is not implemented for humidity and passive 1535 scalars (see <a href="#moisture">moisture</a>1527 scalars (see <a href="#humidity">humidity</a> 1536 1528 and <a href="#passive_scalar">passive_scalar</a>) 1537 1529 and requires the use of a 2d-domain-decomposition. The last conditions … … 1823 1815 <i> </i><a href="#alpha_surface">alpha_surface</a> 1824 1816 = 0.0, <a href="#bc_lr">bc_lr</a> = <a href="#bc_ns">bc_ns</a> = <span style="font-style: italic;">'cyclic'</span>, <a style="" href="#galilei_transformation">galilei_transformation</a> 1825 = <span style="font-style: italic;">.F.</span>, <a href="#cloud_physics">cloud_physics </a> = <span style="font-style: italic;">.F.</span>, <a href="#cloud_droplets">cloud_droplets</a> = <span style="font-style: italic;">.F.</span>, <a href="#moisture">moisture</a> = <span style="font-style: italic;">.F.</span>, and <a href="#prandtl_layer">prandtl_layer</a> = .T..<br>1817 = <span style="font-style: italic;">.F.</span>, <a href="#cloud_physics">cloud_physics </a> = <span style="font-style: italic;">.F.</span>, <a href="#cloud_droplets">cloud_droplets</a> = <span style="font-style: italic;">.F.</span>, <a href="#humidity">humidity</a> = <span style="font-style: italic;">.F.</span>, and <a href="#prandtl_layer">prandtl_layer</a> = .T..<br> 1826 1818 <font color="#000000"><br> 1827 1819 Note that an inclined model domain requires the use of <span style="font-weight: bold;">topography</span> = <span style="font-style: italic;">'flat'</span> and a -
palm/trunk/DOC/app/chapter_4.2.html
r72 r75 394 394 = <span style="font-style: italic;">.TRUE.</span></td></tr><tr><td style="width: 106px; vertical-align: top;"><span style="font-style: italic;">pt</span></td><td style="width: 196px; vertical-align: top;">potential 395 395 temperature<br></td><td style="vertical-align: top;">K</td><td style="vertical-align: top;"></td></tr><tr><td style="width: 106px; vertical-align: top;"><span style="font-style: italic;">q</span></td><td style="width: 196px; vertical-align: top;">specific humidity 396 (or total water content, if cloud physics is switched on)</td><td style="vertical-align: top;">kg/kg</td><td style="vertical-align: top;">requires <a href="chapter_4.1.html#moisture">moisture</a> = <span style="font-style: italic;">.TRUE.</span></td></tr><tr><td style="width: 106px; vertical-align: top;"><span style="font-style: italic;">ql</span></td><td style="width: 196px; vertical-align: top;">liquid water396 (or total water content, if cloud physics is switched on)</td><td style="vertical-align: top;">kg/kg</td><td style="vertical-align: top;">requires <a href="chapter_4.1.html#humidity">humidity</a> = <span style="font-style: italic;">.TRUE.</span></td></tr><tr><td style="width: 106px; vertical-align: top;"><span style="font-style: italic;">ql</span></td><td style="width: 196px; vertical-align: top;">liquid water 397 397 content</td><td style="vertical-align: top;">kg/kg</td><td style="vertical-align: top;">requires <a href="chapter_4.1.html#cloud_physics">cloud_physics</a> 398 398 = <span style="font-style: italic;">.TRUE.</span> … … 414 414 is allowed</td></tr><tr><td style="width: 106px; vertical-align: top;"><span style="font-style: italic;">v</span></td><td style="width: 196px; vertical-align: top;">v-component of 415 415 the velocity</td><td style="vertical-align: top;">m/s</td><td style="vertical-align: top;"></td></tr><tr><td style="width: 106px; vertical-align: top;"><span style="font-style: italic;">vpt</span></td><td style="width: 196px; vertical-align: top;">virtual potential 416 temperature</td><td style="vertical-align: top;">K</td><td style="vertical-align: top;">requires <a href="chapter_4.1.html#moisture">moisture</a> = <span style="font-style: italic;">.TRUE.</span></td></tr><tr><td style="width: 106px; vertical-align: top;"><span style="font-style: italic;">w</span></td><td style="width: 196px; vertical-align: top;">w-component of416 temperature</td><td style="vertical-align: top;">K</td><td style="vertical-align: top;">requires <a href="chapter_4.1.html#humidity">humidity</a> = <span style="font-style: italic;">.TRUE.</span></td></tr><tr><td style="width: 106px; vertical-align: top;"><span style="font-style: italic;">w</span></td><td style="width: 196px; vertical-align: top;">w-component of 417 417 the velocity</td><td style="vertical-align: top;">m/s</td><td style="vertical-align: top;"></td></tr><tr><td style="vertical-align: top;"><span style="font-style: italic;">z0*</span></td><td style="vertical-align: top;">roughness length</td><td style="vertical-align: top;">m</td><td></td></tr></tbody></table><br>Multiple 418 418 quantities can be assigned, e.g. <span style="font-weight: bold;">data_output</span> -
palm/trunk/DOC/app/chapter_4.6.html
r72 r75 652 652 <td style="vertical-align: middle;" width="57%"> <p>Variable 653 653 to adjust the subdomain sizes in parallel runs.</p> </td> </tr> 654 <tr> <td style="vertical-align: middle;"><b><a href="chapter_4.1.html#inflow_disturbance_begin"><b>inflow_disturbance_begin</b></a></b></td> 654 <tr><td><b><a href="chapter_4.1.html#humidity"><b>humidity</b></a></b></td><td>I</td><td>L</td><td><span style="font-style: italic;">.F.</span></td><td>Parameter 655 to switch on the prognostic equation for 656 specific 657 humidity q.</td></tr><tr> <td style="vertical-align: middle;"><b><a href="chapter_4.1.html#inflow_disturbance_begin"><b>inflow_disturbance_begin</b></a></b></td> 655 658 <td style="vertical-align: middle;">I<br> </td> 656 659 <td style="vertical-align: middle;">I<br> </td> … … 749 752 which are 750 753 to be created by the <span style="font-weight: bold;">dvrp</span> 751 software. <br> </p> </td> </tr> <tr> 752 <td style="vertical-align: middle;" width="15%"> <p><a href="chapter_4.1.html#moisture"><b>moisture</b></a></p> 753 </td> <td style="vertical-align: middle;" width="5%"> 754 <p>I</p> </td> <td style="vertical-align: middle;" width="7%"> <p>L</p> 755 </td> <td style="vertical-align: middle;" width="16%"> 756 <p><i>.F.</i></p> </td> <td style="vertical-align: middle;" width="57%"> <p>Parameter 757 to switch on the prognostic equation for 758 specific 759 humidity q.</p> </td> </tr> <tr> <td style="vertical-align: middle;" width="15%"> <p><a href="chapter_4.1.html#momentum_advec"><b>momentum_advec</b></a></p> 754 software. <br> </p> </td> </tr> <tr> <td style="vertical-align: middle;" width="15%"> <p><a href="chapter_4.1.html#momentum_advec"><b>momentum_advec</b></a></p> 760 755 </td> <td style="vertical-align: middle;" width="5%"> 761 756 <p>I</p> </td> <td style="vertical-align: middle;" width="7%"> <p>C … … 1105 1100 (10)</p> </td> <td style="vertical-align: middle;" width="16%"> <p><i>10 *</i> <i>0.0</i></p> 1106 1101 </td> <td style="vertical-align: middle;" width="57%"> 1107 <p>Height level from which on the moisturegradient defined1102 <p>Height level from which on the humidity gradient defined 1108 1103 by <a href="chapter_4.1.html#q_vertical_gradient">q_vertical_gradient</a> 1109 1104 is effective (in m). </p> </td> </tr> <tr> -
palm/trunk/SCRIPTS/mbuild
r69 r75 1395 1395 fi # ENDE UEBERSETZUNG DER UTILITY-PROGRAMME 1396 1396 1397 rm -rf ${remote_host}_last_make_protokoll 1397 1398 1398 1399 # NUR AUF EINEM HLRN-RECHNER UEBERSETZEN -
palm/trunk/SCRIPTS/mrun
r74 r75 2688 2688 # NAMELIST-DATEI MIT WERTEN VON ENVIRONMENT-VARIABLEN ERZEUGEN (ZU 2689 2689 # LESEN VON PALM) 2690 # DAZU VORHER DIE "GLOBAL REVISION" VON SUBVERSION ERMITTELN, FALLS 2691 # DIE SOURCEN UNTER SUBVERSION-KONTROLLE STEHEN 2692 global_revision=`svnversion $source_path` 2693 global_revision="Rev: $global_revision" 2694 2690 2695 cat > ENVPAR << %%END%% 2691 2696 &envpar run_identifier = '$fname', host = '$localhost', 2692 2697 write_binary = '$write_binary', tasks_per_node = $tasks_per_node, 2693 maximum_cpu_time_allowed = ${cpumax}. / 2698 maximum_cpu_time_allowed = ${cpumax}., 2699 revision = '$global_revision' / 2694 2700 2695 2701 %%END%% -
palm/trunk/SOURCE/CURRENT_MODIFICATIONS
r73 r75 33 33 Changed: 34 34 ------- 35 General revision of non-cyclic horizontal boundary conditions: radiation boundary conditions are now used instead of Neumann conditions at the outflow (calculation needs velocity values for t-dt, which are stored on new arrays u_m_l, u_m_r, etc.), calculation of mean outflow is not needed any more, additional gridpoints along x and y (uxrp, vynp) are not needed any more, routine "boundary_conds" now operates on timelevel t+dt and is not split in two parts (main, uvw_outflow) any more, Neumann boundary conditions at inflow/outflow in case of non-cyclic boundary conditions for all 2d-arrays that are handled by exchange_horiz_2d35 General revision of non-cyclic horizontal boundary conditions: radiation boundary conditions are now used instead of Neumann conditions at the outflow (calculation needs velocity values for t-dt, which are stored on new arrays u_m_l, u_m_r, etc.), calculation of mean outflow is not needed any more, volume flow control is added for the outflow boundary (currently only for the north boundary!!), additional gridpoints along x and y (uxrp, vynp) are not needed any more, routine "boundary_conds" now operates on timelevel t+dt and is not split in two parts (main, uvw_outflow) any more, Neumann boundary conditions at inflow/outflow in case of non-cyclic boundary conditions for all 2d-arrays that are handled by exchange_horiz_2d 36 36 37 37 +age_m in particle_type … … 48 48 q is not allowed to become negative (prognostic_equations). 49 49 50 poisfft_init is only called if fft-solver is switched on (init_pegrid). 51 52 d3par-parameter moisture renamed to humidity. 53 54 Subversion global revision number is read from mrun and added to the run description header and to the run control (_rc) file. 55 50 56 __vtk directives removed from main program. 51 57 52 58 The uitility routine interpret_config reads PALM environment variables from NAMELIST instead using the system call GETENV. 53 59 54 check_parameters, data_output_dvrp, data_output_ptseries, data_output_ts, exchange_horiz_2d, flow_statistics, header, init_particles, init_pegrid, init_3d_model, modules, palm, package_parin, parin, prognostic_equations, read_3d_binary, time_integration, write_3d_binary60 advec_u_pw, advec_u_up, advec_v_pw, advec_v_up, asselin_filter, check_parameters, coriolis, data_output_dvrp, data_output_ptseries, data_output_ts, data_output_2d, data_output_3d, diffusion_u, diffusion_v, exchange_horiz, exchange_horiz_2d, flow_statistics, header, init_grid, init_particles, init_pegrid, init_rankine, init_pt_anomaly, init_1d_model, init_3d_model, modules, palm, package_parin, parin, poismg, prandtl_fluxes, pres, production_e, prognostic_equations, read_var_list, read_3d_binary, sor, swap_timelevel, time_integration, write_var_list, write_3d_binary 55 61 56 62 -
palm/trunk/SOURCE/advec_particles.f90
r64 r75 9 9 ! + user_advec_particles, particles-package is now part of the defaut code, 10 10 ! array arguments in sendrecv calls have to refer to first element (1) due to 11 ! mpich (mpiI) interface requirements 11 ! mpich (mpiI) interface requirements, 12 ! 2nd+3rd argument removed from exchange horiz 12 13 ! TEST: PRINT statements on unit 9 (commented out) 13 14 ! … … 662 663 ! 663 664 !-- Lateral boundary conditions 664 CALL exchange_horiz( de_dx , 0, 0)665 CALL exchange_horiz( de_dy , 0, 0)666 CALL exchange_horiz( de_dz , 0, 0)667 CALL exchange_horiz( diss , 0, 0)665 CALL exchange_horiz( de_dx ) 666 CALL exchange_horiz( de_dy ) 667 CALL exchange_horiz( de_dz ) 668 CALL exchange_horiz( diss ) 668 669 669 670 ! -
palm/trunk/SOURCE/advec_u_pw.f90
r4 r75 4 4 ! Actual revisions: 5 5 ! ----------------- 6 ! 6 ! uxrp eliminated 7 7 ! 8 8 ! Former revisions: … … 54 54 gu = 2.0 * u_gtrans 55 55 gv = 2.0 * v_gtrans 56 DO i = nxl, nxr +uxrp56 DO i = nxl, nxr 57 57 DO j = nys, nyn 58 58 DO k = nzb_u_inner(j,i)+1, nzt -
palm/trunk/SOURCE/advec_u_up.f90
r4 r75 4 4 ! Actual revisions: 5 5 ! ----------------- 6 ! 6 ! uxrp eliminated 7 7 ! 8 8 ! Former revisions: … … 53 53 54 54 55 DO i = nxl, nxr +uxrp55 DO i = nxl, nxr 56 56 DO j = nys, nyn 57 57 DO k = nzb_u_inner(j,i)+1, nzt -
palm/trunk/SOURCE/advec_v_pw.f90
r4 r75 4 4 ! Actual revisions: 5 5 ! ----------------- 6 ! 6 ! vynp eliminated 7 7 ! 8 8 ! Former revisions: … … 56 56 gv = 2.0 * v_gtrans 57 57 DO i = nxl, nxr 58 DO j = nys, nyn +vynp58 DO j = nys, nyn 59 59 DO k = nzb_v_inner(j,i)+1, nzt 60 60 tend(k,j,i) = tend(k,j,i) - 0.25 * ( & -
palm/trunk/SOURCE/advec_v_up.f90
r4 r75 4 4 ! Actual revisions: 5 5 ! ----------------- 6 ! 6 ! vynp eliminated 7 7 ! 8 8 ! Former revisions: … … 53 53 54 54 DO i = nxl, nxr 55 DO j = nys, nyn +vynp55 DO j = nys, nyn 56 56 DO k = nzb_v_inner(j,i)+1, nzt 57 57 ! -
palm/trunk/SOURCE/asselin_filter.f90
r4 r75 4 4 ! Actual revisions: 5 5 ! ----------------- 6 ! 6 ! moisture renamed humidity 7 7 ! 8 8 ! Former revisions: … … 72 72 ENDIF 73 73 74 IF ( ( moisture.OR. passive_scalar ) .AND. &74 IF ( ( humidity .OR. passive_scalar ) .AND. & 75 75 scalar_advec /= 'bc-scheme' ) THEN 76 76 DO k = nzb_2d(j,i), nzt+1 … … 96 96 ENDIF 97 97 98 IF ( ( moisture.OR. passive_scalar ) .AND. &98 IF ( ( humidity .OR. passive_scalar ) .AND. & 99 99 scalar_advec /= 'bc-scheme' ) THEN 100 100 q = q + asselin_filter_factor * ( q_p - 2.0 * q + q_m ) -
palm/trunk/SOURCE/boundary_conds.f90
r73 r75 4 4 ! Actual revisions: 5 5 ! ----------------- 6 ! The "main" part sets conditions for time level t+dt insteat of level t, 7 ! outflow boundary conditions changed from Neumann to radiation condition 6 ! The "main" part sets conditions for time level t+dt instead of level t, 7 ! outflow boundary conditions changed from Neumann to radiation condition, 8 ! uxrp, vynp eliminated, moisture renamed humidity 8 9 ! 9 10 ! Former revisions: … … 126 127 !-- Boundary conditions for total water content or scalar, 127 128 !-- bottom and surface boundary (see also temperature) 128 IF ( moisture.OR. passive_scalar ) THEN129 ! 130 !-- Surface conditions for constant_ moisture_flux129 IF ( humidity .OR. passive_scalar ) THEN 130 ! 131 !-- Surface conditions for constant_humidity_flux 131 132 IF ( ibc_q_b == 0 ) THEN 132 133 DO i = nxl-1, nxr+1 … … 154 155 v_p(:,nys,:) = v_p(:,nys-1,:) 155 156 ELSEIF ( inflow_n ) THEN 156 v_p(:,nyn +vynp,:) = v_p(:,nyn+vynp+1,:)157 v_p(:,nyn,:) = v_p(:,nyn+1,:) 157 158 ELSEIF ( inflow_l ) THEN 158 159 u_p(:,:,nxl) = u_p(:,:,nxl-1) 159 160 ELSEIF ( inflow_r ) THEN 160 u_p(:,:,nxr +uxrp) = u_p(:,:,nxr+uxrp+1)161 u_p(:,:,nxr) = u_p(:,:,nxr+1) 161 162 ENDIF 162 163 … … 166 167 pt_p(:,nys-1,:) = pt_p(:,nys,:) 167 168 IF ( .NOT. constant_diffusion ) e_p(:,nys-1,:) = e_p(:,nys,:) 168 IF ( moisture.OR. passive_scalar ) q_p(:,nys-1,:) = q_p(:,nys,:)169 IF ( humidity .OR. passive_scalar ) q_p(:,nys-1,:) = q_p(:,nys,:) 169 170 ELSEIF ( outflow_n ) THEN 170 171 pt_p(:,nyn+1,:) = pt_p(:,nyn,:) 171 172 IF ( .NOT. constant_diffusion ) e_p(:,nyn+1,:) = e_p(:,nyn,:) 172 IF ( moisture.OR. passive_scalar ) q_p(:,nyn+1,:) = q_p(:,nyn,:)173 IF ( humidity .OR. passive_scalar ) q_p(:,nyn+1,:) = q_p(:,nyn,:) 173 174 ELSEIF ( outflow_l ) THEN 174 175 pt_p(:,:,nxl-1) = pt_p(:,:,nxl) 175 176 IF ( .NOT. constant_diffusion ) e_p(:,:,nxl-1) = e_p(:,:,nxl) 176 IF ( moisture .OR. passive_scalar ) q_p(:,:,nxl-1) = q_p(:,:,nxl)177 IF ( humidity .OR. passive_scalar ) q_p(:,:,nxl-1) = q_p(:,:,nxl) 177 178 ELSEIF ( outflow_r ) THEN 178 179 pt_p(:,:,nxr+1) = pt_p(:,:,nxr) 179 180 IF ( .NOT. constant_diffusion ) e_p(:,:,nxr+1) = e_p(:,:,nxr) 180 IF ( moisture.OR. passive_scalar ) q_p(:,:,nxr+1) = q_p(:,:,nxr)181 IF ( humidity .OR. passive_scalar ) q_p(:,:,nxr+1) = q_p(:,:,nxr) 181 182 ENDIF 182 183 183 184 ENDIF 184 185 185 IF ( range == 'outflow_uvw' ) THEN 186 ! 187 !-- Radiation boundary condition for the velocities at the respective outflow 188 IF ( outflow_s ) THEN 189 ! v(:,nys-1,:) = v(:,nys,:) 190 ! w(:,nys-1,:) = 0.0 191 !! 192 !!-- Compute the mean horizontal wind parallel to and within the outflow 193 !!-- wall and use this as boundary condition for u 194 !#if defined( __parallel ) 195 ! CALL MPI_ALLREDUCE( uvmean_outflow_l, uvmean_outflow, nzt-nzb+2, & 196 ! MPI_REAL, MPI_SUM, comm1dx, ierr ) 197 ! uvmean_outflow = uvmean_outflow / ( nx + 1.0 ) 198 !#else 199 ! uvmean_outflow = uvmean_outflow_l / ( nx + 1.0 ) 200 !#endif 201 ! DO k = nzb, nzt+1 202 ! u(k,nys-1,:) = uvmean_outflow(k) 203 ! ENDDO 204 ENDIF 205 206 IF ( outflow_n .AND. & 207 intermediate_timestep_count == intermediate_timestep_count_max ) & 208 THEN 209 210 c_max = dy / dt_3d 211 212 DO i = nxl-1, nxr+1 213 DO k = nzb+1, nzt+1 214 215 ! 216 !-- First calculate the phase speeds for u,v, and w 217 denom = u_m_n(k,ny,i,-2) - u_m_n(k,ny-1,i,-2) 218 219 IF ( denom /= 0.0 ) THEN 220 c_u = -c_max * ( u_m_n(k,ny,i,-1)-u_m_n(k,ny,i,-2) ) / denom 221 IF ( c_u < 0.0 ) THEN 222 c_u = 0.0 223 ELSEIF ( c_u > c_max ) THEN 224 c_u = c_max 225 ENDIF 226 ELSE 186 ! 187 !-- Radiation boundary condition for the velocities at the respective outflow 188 IF ( outflow_s .AND. & 189 intermediate_timestep_count == intermediate_timestep_count_max ) & 190 THEN 191 192 c_max = dy / dt_3d 193 194 DO i = nxl-1, nxr+1 195 DO k = nzb+1, nzt+1 196 197 ! 198 !-- First calculate the phase speeds for u,v, and w 199 denom = u_m_s(k,0,i) - u_m_s(k,1,i) 200 201 IF ( denom /= 0.0 ) THEN 202 c_u = -c_max * ( u(k,0,i) - u_m_s(k,0,i) ) / denom 203 IF ( c_u < 0.0 ) THEN 204 c_u = 0.0 205 ELSEIF ( c_u > c_max ) THEN 227 206 c_u = c_max 228 207 ENDIF 229 230 denom = v_m_n(k,ny,i,-2) - v_m_n(k,ny-1,i,-2) 231 232 IF ( denom /= 0.0 ) THEN 233 c_v = -c_max * ( v_m_n(k,ny,i,-1)-v_m_n(k,ny,i,-2) ) / denom 234 IF ( c_v < 0.0 ) THEN 235 c_v = 0.0 236 ELSEIF ( c_v > c_max ) THEN 237 c_v = c_max 238 ENDIF 239 ELSE 208 ELSE 209 c_u = c_max 210 ENDIF 211 denom = v_m_s(k,0,i) - v_m_s(k,1,i) 212 213 IF ( denom /= 0.0 ) THEN 214 c_v = -c_max * ( v(k,0,i) - v_m_s(k,0,i) ) / denom 215 IF ( c_v < 0.0 ) THEN 216 c_v = 0.0 217 ELSEIF ( c_v > c_max ) THEN 240 218 c_v = c_max 241 219 ENDIF 242 243 denom = w_m_n(k,ny,i,-2) - w_m_n(k,ny-1,i,-2)244 245 IF ( denom /= 0.0 ) THEN 246 c_w = -c_max * ( w_m_n(k,ny,i,-1)-w_m_n(k,ny,i,-2) ) / denom247 IF ( c_w < 0.0 ) THEN 248 c_w = 0.0249 ELSEIF ( c_w > c_max ) THEN250 c_w = c_max251 ENDIF252 ELSE 220 ELSE 221 c_v = c_max 222 ENDIF 223 224 denom = w_m_s(k,0,i) - w_m_s(k,1,i) 225 226 IF ( denom /= 0.0 ) THEN 227 c_w = -c_max * ( w(k,0,i) - w_m_s(k,0,i) ) / denom 228 IF ( c_w < 0.0 ) THEN 229 c_w = 0.0 230 ELSEIF ( c_w > c_max ) THEN 253 231 c_w = c_max 254 232 ENDIF 255 256 ! 257 !-- Calculate the new velocities 258 u(k,ny+1,i) = u_m_n(k,ny+1,i,-1) - dt_3d * c_u * & 259 ( u_m_n(k,ny+1,i,-1) - u_m_n(k,ny,i,-1) ) * ddy 260 261 v(k,ny+1,i) = v_m_n(k,ny+1,i,-1) - dt_3d * c_v * & 262 ( v_m_n(k,ny+1,i,-1) - v_m_n(k,ny,i,-1) ) * ddy 263 264 w(k,ny+1,i) = w_m_n(k,ny+1,i,-1) - dt_3d * c_w * & 265 ( w_m_n(k,ny+1,i,-1) - w_m_n(k,ny,i,-1) ) * ddy 266 267 ! 268 !-- Swap timelevels for the next timestep 269 u_m_n(k,:,i,-2) = u_m_n(k,:,i,-1) 270 u_m_n(k,:,i,-1) = u(k,ny-1:ny+1,i) 271 v_m_n(k,:,i,-2) = v_m_n(k,:,i,-1) 272 v_m_n(k,:,i,-1) = v(k,ny-1:ny+1,i) 273 w_m_n(k,:,i,-2) = w_m_n(k,:,i,-1) 274 w_m_n(k,:,i,-1) = w(k,ny-1:ny+1,i) 275 276 ENDDO 277 ENDDO 278 279 ! 280 !-- Bottom boundary at the outflow 281 IF ( ibc_uv_b == 0 ) THEN 282 u(nzb,ny+1,:) = -u(nzb+1,ny+1,:) 283 v(nzb,ny+1,:) = -v(nzb+1,ny+1,:) 284 ELSE 285 u(nzb,ny+1,:) = u(nzb+1,ny+1,:) 286 v(nzb,ny+1,:) = v(nzb+1,ny+1,:) 287 ENDIF 288 w(nzb,ny+1,:) = 0.0 289 290 ! 291 !-- Top boundary at the outflow 292 IF ( ibc_uv_t == 0 ) THEN 293 u(nzt+1,ny+1,:) = ug(nzt+1) 294 v(nzt+1,ny+1,:) = vg(nzt+1) 295 ELSE 296 u(nzt+1,ny+1,:) = u(nzt,nyn+1,:) 297 v(nzt+1,ny+1,:) = v(nzt,nyn+1,:) 298 ENDIF 299 w(nzt:nzt+1,ny+1,:) = 0.0 300 301 ENDIF 302 303 IF ( outflow_l ) THEN 304 ! u(:,:,nxl-1) = u(:,:,nxl) 305 ! w(:,:,nxl-1) = 0.0 306 ! 307 !-- Compute the mean horizontal wind parallel to and within the outflow 308 !-- wall and use this as boundary condition for v 309 !#if defined( __parallel ) 310 ! CALL MPI_ALLREDUCE( uvmean_outflow_l, uvmean_outflow, nzt-nzb+2, & 311 ! MPI_REAL, MPI_SUM, comm1dy, ierr ) 312 ! uvmean_outflow = uvmean_outflow / ( ny + 1.0 ) 313 !#else 314 ! uvmean_outflow = uvmean_outflow_l / ( ny + 1.0 ) 315 !#endif 316 ! DO k = nzb, nzt+1 317 ! v(k,:,nxl-1) = uvmean_outflow(k) 318 ! ENDDO 319 ! 320 ENDIF 321 322 IF ( outflow_r .AND. & 323 intermediate_timestep_count == intermediate_timestep_count_max ) & 324 THEN 325 326 c_max = dx / dt_3d 327 328 DO j = nys-1, nyn+1 329 DO k = nzb+1, nzt+1 330 331 ! 332 !-- First calculate the phase speeds for u,v, and w 333 denom = u_m_r(k,j,nx,-2) - u_m_r(k,j,nx-1,-2) 334 335 IF ( denom /= 0.0 ) THEN 336 c_u = -c_max * ( u_m_r(k,j,nx,-1)-u_m_r(k,j,nx,-2) ) / denom 337 IF ( c_u < 0.0 ) THEN 338 c_u = 0.0 339 ELSEIF ( c_u > c_max ) THEN 340 c_u = c_max 341 ENDIF 342 ELSE 233 ELSE 234 c_w = c_max 235 ENDIF 236 237 ! 238 !-- Calculate the new velocities 239 u_p(k,-1,i) = u(k,-1,i) + dt_3d * c_u * & 240 ( u(k,-1,i) - u(k,0,i) ) * ddy 241 242 v_p(k,-1,i) = v(k,-1,i) + dt_3d * c_v * & 243 ( v(k,-1,i) - v_m_s(k,0,i) ) * ddy 244 245 w_p(k,-1,i) = w(k,-1,i) + dt_3d * c_w * & 246 ( w(k,-1,i) - w(k,0,i) ) * ddy 247 248 ! 249 !-- Save old timelevels for the next timestep 250 u_m_s(k,:,i) = u(k,-1:1,i) 251 v_m_s(k,:,i) = v(k,-1:1,i) 252 w_m_s(k,:,i) = w(k,-1:1,i) 253 254 ENDDO 255 ENDDO 256 257 ! 258 !-- Bottom boundary at the outflow 259 IF ( ibc_uv_b == 0 ) THEN 260 u_p(nzb,-1,:) = -u_p(nzb+1,-1,:) 261 v_p(nzb,-1,:) = -v_p(nzb+1,-1,:) 262 ELSE 263 u_p(nzb,-1,:) = u_p(nzb+1,-1,:) 264 v_p(nzb,-1,:) = v_p(nzb+1,-1,:) 265 ENDIF 266 w_p(nzb,ny+1,:) = 0.0 267 268 ! 269 !-- Top boundary at the outflow 270 IF ( ibc_uv_t == 0 ) THEN 271 u_p(nzt+1,-1,:) = ug(nzt+1) 272 v_p(nzt+1,-1,:) = vg(nzt+1) 273 ELSE 274 u_p(nzt+1,-1,:) = u(nzt,-1,:) 275 v_p(nzt+1,-1,:) = v(nzt,-1,:) 276 ENDIF 277 w_p(nzt:nzt+1,-1,:) = 0.0 278 279 ENDIF 280 281 IF ( outflow_n .AND. & 282 intermediate_timestep_count == intermediate_timestep_count_max ) & 283 THEN 284 285 c_max = dy / dt_3d 286 287 DO i = nxl-1, nxr+1 288 DO k = nzb+1, nzt+1 289 290 ! 291 !-- First calculate the phase speeds for u,v, and w 292 denom = u_m_n(k,ny,i) - u_m_n(k,ny-1,i) 293 294 IF ( denom /= 0.0 ) THEN 295 c_u = -c_max * ( u(k,ny,i) - u_m_n(k,ny,i) ) / denom 296 IF ( c_u < 0.0 ) THEN 297 c_u = 0.0 298 ELSEIF ( c_u > c_max ) THEN 343 299 c_u = c_max 344 300 ENDIF 345 346 denom = v_m_r(k,j,nx,-2) - v_m_r(k,j,nx-1,-2)347 348 IF ( denom /= 0.0 ) THEN 349 c_v = -c_max * ( v_m_r(k,j,nx,-1)-v_m_r(k,j,nx,-2) ) / denom350 IF ( c_v < 0.0 ) THEN 351 c_v = 0.0352 ELSEIF ( c_v > c_max ) THEN353 c_v = c_max354 ENDIF355 ELSE 301 ELSE 302 c_u = c_max 303 ENDIF 304 305 denom = v_m_n(k,ny,i) - v_m_n(k,ny-1,i) 306 307 IF ( denom /= 0.0 ) THEN 308 c_v = -c_max * ( v(k,ny,i) - v_m_n(k,ny,i) ) / denom 309 IF ( c_v < 0.0 ) THEN 310 c_v = 0.0 311 ELSEIF ( c_v > c_max ) THEN 356 312 c_v = c_max 357 313 ENDIF 358 359 denom = w_m_r(k,j,nx,-2) - w_m_r(k,j,nx-1,-2)360 361 IF ( denom /= 0.0 ) THEN 362 c_w = -c_max * ( w_m_r(k,j,nx,-1)-w_m_n(k,j,nx,-2) ) / denom363 IF ( c_w < 0.0 ) THEN 364 c_w = 0.0365 ELSEIF ( c_w > c_max ) THEN366 c_w = c_max367 ENDIF368 ELSE 314 ELSE 315 c_v = c_max 316 ENDIF 317 318 denom = w_m_n(k,ny,i) - w_m_n(k,ny-1,i) 319 320 IF ( denom /= 0.0 ) THEN 321 c_w = -c_max * ( w(k,ny,i) - w_m_n(k,ny,i) ) / denom 322 IF ( c_w < 0.0 ) THEN 323 c_w = 0.0 324 ELSEIF ( c_w > c_max ) THEN 369 325 c_w = c_max 370 326 ENDIF 371 372 ! 373 !-- Calculate the new velocities 374 u(k,j,nx+1) = u_m_r(k,j,nx+1,-1) - dt_3d * c_u * & 375 ( u_m_r(k,j,nx+1,-1) - u_m_r(k,j,nx,-1) ) * ddx 376 377 v(k,j,nx+1) = v_m_r(k,j,nx+1,-1) - dt_3d * c_v * & 378 ( v_m_r(k,j,nx+1,-1) - v_m_r(k,j,nx,-1) ) * ddx 379 380 w(k,j,nx+1) = w_m_r(k,j,nx+1,-1) - dt_3d * c_w * & 381 ( w_m_r(k,j,nx+1,-1) - w_m_r(k,j,nx,-1) ) * ddx 382 383 ! 384 !-- Swap timelevels for the next timestep 385 u_m_r(k,j,:,-2) = u_m_r(k,j,:,-1) 386 u_m_r(k,j,:,-1) = u(k,j,nx-1:nx+1) 387 v_m_r(k,j,:,-2) = v_m_r(k,j,:,-1) 388 v_m_r(k,j,:,-1) = v(k,j,nx-1:nx+1) 389 w_m_r(k,j,:,-2) = w_m_r(k,j,:,-1) 390 w_m_r(k,j,:,-1) = w(k,j,nx-1:nx+1) 391 392 ENDDO 393 ENDDO 394 395 ! 396 !-- Bottom boundary at the outflow 397 IF ( ibc_uv_b == 0 ) THEN 398 u(nzb,ny+1,:) = -u(nzb+1,ny+1,:) 399 v(nzb,ny+1,:) = -v(nzb+1,ny+1,:) 400 ELSE 401 u(nzb,ny+1,:) = u(nzb+1,ny+1,:) 402 v(nzb,ny+1,:) = v(nzb+1,ny+1,:) 403 ENDIF 404 w(nzb,ny+1,:) = 0.0 405 406 ! 407 !-- Top boundary at the outflow 408 IF ( ibc_uv_t == 0 ) THEN 409 u(nzt+1,ny+1,:) = ug(nzt+1) 410 v(nzt+1,ny+1,:) = vg(nzt+1) 411 ELSE 412 u(nzt+1,ny+1,:) = u(nzt,nyn+1,:) 413 v(nzt+1,ny+1,:) = v(nzt,nyn+1,:) 414 ENDIF 415 w(nzt:nzt+1,ny+1,:) = 0.0 416 417 ENDIF 327 ELSE 328 c_w = c_max 329 ENDIF 330 331 ! 332 !-- Calculate the new velocities 333 u_p(k,ny+1,i) = u(k,ny+1,i) - dt_3d * c_u * & 334 ( u(k,ny+1,i) - u(k,ny,i) ) * ddy 335 336 v_p(k,ny+1,i) = v(k,ny+1,i) - dt_3d * c_v * & 337 ( v(k,ny+1,i) - v(k,ny,i) ) * ddy 338 339 w_p(k,ny+1,i) = w(k,ny+1,i) - dt_3d * c_w * & 340 ( w(k,ny+1,i) - w(k,ny,i) ) * ddy 341 342 ! 343 !-- Swap timelevels for the next timestep 344 u_m_n(k,:,i) = u(k,ny-1:ny+1,i) 345 v_m_n(k,:,i) = v(k,ny-1:ny+1,i) 346 w_m_n(k,:,i) = w(k,ny-1:ny+1,i) 347 348 ENDDO 349 ENDDO 350 351 ! 352 !-- Bottom boundary at the outflow 353 IF ( ibc_uv_b == 0 ) THEN 354 u_p(nzb,ny+1,:) = -u_p(nzb+1,ny+1,:) 355 v_p(nzb,ny+1,:) = -v_p(nzb+1,ny+1,:) 356 ELSE 357 u_p(nzb,ny+1,:) = u_p(nzb+1,ny+1,:) 358 v_p(nzb,ny+1,:) = v_p(nzb+1,ny+1,:) 359 ENDIF 360 w_p(nzb,ny+1,:) = 0.0 361 362 ! 363 !-- Top boundary at the outflow 364 IF ( ibc_uv_t == 0 ) THEN 365 u_p(nzt+1,ny+1,:) = ug(nzt+1) 366 v_p(nzt+1,ny+1,:) = vg(nzt+1) 367 ELSE 368 u_p(nzt+1,ny+1,:) = u_p(nzt,nyn+1,:) 369 v_p(nzt+1,ny+1,:) = v_p(nzt,nyn+1,:) 370 ENDIF 371 w_p(nzt:nzt+1,ny+1,:) = 0.0 372 373 ENDIF 374 375 IF ( outflow_l .AND. & 376 intermediate_timestep_count == intermediate_timestep_count_max ) & 377 THEN 378 379 c_max = dx / dt_3d 380 381 DO j = nys-1, nyn+1 382 DO k = nzb+1, nzt+1 383 384 ! 385 !-- First calculate the phase speeds for u,v, and w 386 denom = u_m_l(k,j,0) - u_m_l(k,j,1) 387 388 IF ( denom /= 0.0 ) THEN 389 c_u = -c_max * ( u(k,j,0) - u_m_r(k,j,0) ) / denom 390 IF ( c_u > 0.0 ) THEN 391 c_u = 0.0 392 ELSEIF ( c_u < -c_max ) THEN 393 c_u = -c_max 394 ENDIF 395 ELSE 396 c_u = -c_max 397 ENDIF 398 399 denom = v_m_l(k,j,0) - v_m_l(k,j,1) 400 401 IF ( denom /= 0.0 ) THEN 402 c_v = -c_max * ( v(k,j,0) - v_m_l(k,j,0) ) / denom 403 IF ( c_v < 0.0 ) THEN 404 c_v = 0.0 405 ELSEIF ( c_v > c_max ) THEN 406 c_v = c_max 407 ENDIF 408 ELSE 409 c_v = c_max 410 ENDIF 411 412 denom = w_m_l(k,j,0) - w_m_l(k,j,1) 413 414 IF ( denom /= 0.0 ) THEN 415 c_w = -c_max * ( w(k,j,0) - w_m_l(k,j,0) ) / denom 416 IF ( c_w < 0.0 ) THEN 417 c_w = 0.0 418 ELSEIF ( c_w > c_max ) THEN 419 c_w = c_max 420 ENDIF 421 ELSE 422 c_w = c_max 423 ENDIF 424 425 ! 426 !-- Calculate the new velocities 427 u_p(k,j,-1) = u(k,j,-1) + dt_3d * c_u * & 428 ( u(k,j,-1) - u(k,j,0) ) * ddx 429 430 v_p(k,j,-1) = v(k,j,-1) + dt_3d * c_v * & 431 ( v(k,j,-1) - v(k,j,0) ) * ddx 432 433 w_p(k,j,-1) = w(k,j,-1) + dt_3d * c_w * & 434 ( w(k,j,-1) - w(k,j,0) ) * ddx 435 436 ! 437 !-- Swap timelevels for the next timestep 438 u_m_l(k,j,:) = u(k,j,-1:1) 439 v_m_l(k,j,:) = v(k,j,-1:1) 440 w_m_l(k,j,:) = w(k,j,-1:1) 441 442 ENDDO 443 ENDDO 444 445 ! 446 !-- Bottom boundary at the outflow 447 IF ( ibc_uv_b == 0 ) THEN 448 u_p(nzb,:,-1) = -u_p(nzb+1,:,-1) 449 v_p(nzb,:,-1) = -v_p(nzb+1,:,-1) 450 ELSE 451 u_p(nzb,:,-1) = u_p(nzb+1,:,-1) 452 v_p(nzb,:,-1) = v_p(nzb+1,:,-1) 453 ENDIF 454 w_p(nzb,:,-1) = 0.0 455 456 ! 457 !-- Top boundary at the outflow 458 IF ( ibc_uv_t == 0 ) THEN 459 u_p(nzt+1,:,-1) = ug(nzt+1) 460 v_p(nzt+1,:,-1) = vg(nzt+1) 461 ELSE 462 u_p(nzt+1,:,-1) = u_p(nzt,:,-1) 463 v_p(nzt+1,:,-1) = v_p(nzt,:,-1) 464 ENDIF 465 w_p(nzt:nzt+1,:,-1) = 0.0 466 467 ENDIF 468 469 IF ( outflow_r .AND. & 470 intermediate_timestep_count == intermediate_timestep_count_max ) & 471 THEN 472 473 c_max = dx / dt_3d 474 475 DO j = nys-1, nyn+1 476 DO k = nzb+1, nzt+1 477 478 ! 479 !-- First calculate the phase speeds for u,v, and w 480 denom = u_m_r(k,j,nx) - u_m_r(k,j,nx-1) 481 482 IF ( denom /= 0.0 ) THEN 483 c_u = -c_max * ( u(k,j,nx) - u_m_r(k,j,nx) ) / denom 484 IF ( c_u < 0.0 ) THEN 485 c_u = 0.0 486 ELSEIF ( c_u > c_max ) THEN 487 c_u = c_max 488 ENDIF 489 ELSE 490 c_u = c_max 491 ENDIF 492 493 denom = v_m_r(k,j,nx) - v_m_r(k,j,nx-1) 494 495 IF ( denom /= 0.0 ) THEN 496 c_v = -c_max * ( v(k,j,nx) - v_m_r(k,j,nx) ) / denom 497 IF ( c_v < 0.0 ) THEN 498 c_v = 0.0 499 ELSEIF ( c_v > c_max ) THEN 500 c_v = c_max 501 ENDIF 502 ELSE 503 c_v = c_max 504 ENDIF 505 506 denom = w_m_r(k,j,nx) - w_m_r(k,j,nx-1) 507 508 IF ( denom /= 0.0 ) THEN 509 c_w = -c_max * ( w(k,j,nx) - w_m_r(k,j,nx) ) / denom 510 IF ( c_w < 0.0 ) THEN 511 c_w = 0.0 512 ELSEIF ( c_w > c_max ) THEN 513 c_w = c_max 514 ENDIF 515 ELSE 516 c_w = c_max 517 ENDIF 518 519 ! 520 !-- Calculate the new velocities 521 u_p(k,j,nx+1) = u(k,j,nx+1) - dt_3d * c_u * & 522 ( u(k,j,nx+1) - u(k,j,nx) ) * ddx 523 524 v_p(k,j,nx+1) = v(k,j,nx+1) - dt_3d * c_v * & 525 ( v(k,j,nx+1) - v(k,j,nx) ) * ddx 526 527 w_p(k,j,nx+1) = w(k,j,nx+1) - dt_3d * c_w * & 528 ( w(k,j,nx+1) - w(k,j,nx) ) * ddx 529 530 ! 531 !-- Swap timelevels for the next timestep 532 u_m_r(k,j,:) = u(k,j,nx-1:nx+1) 533 v_m_r(k,j,:) = v(k,j,nx-1:nx+1) 534 w_m_r(k,j,:) = w(k,j,nx-1:nx+1) 535 536 ENDDO 537 ENDDO 538 539 ! 540 !-- Bottom boundary at the outflow 541 IF ( ibc_uv_b == 0 ) THEN 542 u_p(nzb,:,nx+1) = -u_p(nzb+1,:,nx+1) 543 v_p(nzb,:,nx+1) = -v_p(nzb+1,:,nx+1) 544 ELSE 545 u_p(nzb,:,nx+1) = u_p(nzb+1,:,nx+1) 546 v_p(nzb,:,nx+1) = v_p(nzb+1,:,nx+1) 547 ENDIF 548 w_p(nzb,:,nx+1) = 0.0 549 550 ! 551 !-- Top boundary at the outflow 552 IF ( ibc_uv_t == 0 ) THEN 553 u_p(nzt+1,:,nx+1) = ug(nzt+1) 554 v_p(nzt+1,:,nx+1) = vg(nzt+1) 555 ELSE 556 u_p(nzt+1,:,nx+1) = u_p(nzt,:,nx+1) 557 v_p(nzt+1,:,nx+1) = v_p(nzt,:,nx+1) 558 ENDIF 559 w(nzt:nzt+1,:,nx+1) = 0.0 418 560 419 561 ENDIF -
palm/trunk/SOURCE/check_parameters.f90
r73 r75 6 6 ! "by_user" allowed as initializing action, -data_output_ts, 7 7 ! leapfrog with non-flat topography not allowed any more, loop_optimization 8 ! and pt_reference are checked, 8 ! and pt_reference are checked, moisture renamed humidity, 9 9 ! output of precipitation amount/rate and roughnes length + check 10 10 ! possible negative humidities are avoided in initial profile, 11 ! dirichlet/neumann changed to dirichlet/radiation, etc. 11 ! dirichlet/neumann changed to dirichlet/radiation, etc., 12 ! revision added to run_description_header 12 13 ! 13 14 ! Former revisions: … … 80 81 run_time = time(1:2)//':'//time(3:4)//':'//time(5:6) 81 82 82 WRITE ( run_description_header, '(A,2X,A,A,A,I2.2,2X,A,A,2X,A,1X,A)' ) & 83 TRIM( version ),'run: ', TRIM( run_identifier ), '.', & 83 WRITE ( run_description_header, '(A,2X,A,2X,A,A,A,I2.2,2X,A,A,2X,A,1X,A)' )& 84 TRIM( version ), TRIM( revision ), & 85 'run: ', TRIM( run_identifier ), '.', & 84 86 runnr, 'host: ', TRIM( host ), run_date, run_time 85 87 … … 131 133 WRITE( action, '(A)' ) 'cloud_droplets = .TRUE.' 132 134 ENDIF 133 IF ( moisture) THEN134 WRITE( action, '(A)' ) ' moisture= .TRUE.'135 IF ( humidity ) THEN 136 WRITE( action, '(A)' ) 'humidity = .TRUE.' 135 137 ENDIF 136 138 IF ( .NOT. prandtl_layer ) THEN … … 353 355 ENDIF 354 356 355 IF ( cloud_physics .AND. .NOT. moisture) THEN357 IF ( cloud_physics .AND. .NOT. humidity ) THEN 356 358 IF ( myid == 0 ) PRINT*, '+++ check_parameters: cloud_physics =', & 357 359 cloud_physics, ' is not allowed with ', & 358 ' moisture =', moisture360 'humidity =', humidity 359 361 CALL local_stop 360 362 ENDIF … … 367 369 ENDIF 368 370 369 IF ( moisture.AND. sloping_surface ) THEN370 IF ( myid == 0 ) PRINT*, '+++ check_parameters: moisture= TRUE', &371 IF ( humidity .AND. sloping_surface ) THEN 372 IF ( myid == 0 ) PRINT*, '+++ check_parameters: humidity = TRUE', & 371 373 'and hang = TRUE are not', & 372 374 ' allowed simultaneously' … … 374 376 ENDIF 375 377 376 IF ( moisture.AND. scalar_advec == 'ups-scheme' ) THEN378 IF ( humidity .AND. scalar_advec == 'ups-scheme' ) THEN 377 379 IF ( myid == 0 ) PRINT*, '+++ check_parameters: UPS-scheme', & 378 'is not implemented for moisture'380 'is not implemented for humidity' 379 381 CALL local_stop 380 382 ENDIF 381 383 382 IF ( passive_scalar .AND. moisture) THEN383 IF ( myid == 0 ) PRINT*, '+++ check_parameters: moisture= TRUE and', &384 IF ( passive_scalar .AND. humidity ) THEN 385 IF ( myid == 0 ) PRINT*, '+++ check_parameters: humidity = TRUE and', & 384 386 'passive_scalar = TRUE is not allowed ', & 385 387 'simultaneously' … … 410 412 v_init = vg_surface 411 413 pt_init = pt_surface 412 IF ( moisture) q_init = q_surface414 IF ( humidity ) q_init = q_surface 413 415 IF ( passive_scalar ) q_init = s_surface 414 416 … … 552 554 ENDIF 553 555 554 IF ( moisture.OR. passive_scalar ) THEN556 IF ( humidity .OR. passive_scalar ) THEN 555 557 556 558 i = 1 … … 760 762 CALL local_stop 761 763 ENDIF 762 IF ( conserve_volume_flow ) THEN763 IF ( myid == 0 ) THEN764 PRINT*, '+++ check_parameters:'765 PRINT*, ' non-cyclic lateral boundaries do not allow', &766 ' conserve_volume_flow = .T.'767 ENDIF768 CALL local_stop769 ENDIF764 ! IF ( conserve_volume_flow ) THEN 765 ! IF ( myid == 0 ) THEN 766 ! PRINT*, '+++ check_parameters:' 767 ! PRINT*, ' non-cyclic lateral boundaries do not allow', & 768 ! ' conserve_volume_flow = .T.' 769 ! ENDIF 770 ! CALL local_stop 771 ! ENDIF 770 772 ENDIF 771 773 … … 907 909 908 910 ! 909 !-- In case of moistureor passive scalar, set boundary conditions for total911 !-- In case of humidity or passive scalar, set boundary conditions for total 910 912 !-- water content / scalar 911 IF ( moisture.OR. passive_scalar ) THEN912 IF ( moisture) THEN913 IF ( humidity .OR. passive_scalar ) THEN 914 IF ( humidity ) THEN 913 915 sq = 'q' 914 916 ELSE … … 942 944 ! 943 945 !-- A given surface humidity implies Dirichlet boundary condition for 944 !-- moisture. In this case specification of a constant water flux is946 !-- humidity. In this case specification of a constant water flux is 945 947 !-- forbidden. 946 948 IF ( ibc_q_b == 0 .AND. constant_waterflux ) THEN … … 1552 1554 1553 1555 CASE ( 'w"qv"' ) 1554 IF ( moisture.AND. .NOT. cloud_physics ) &1556 IF ( humidity .AND. .NOT. cloud_physics ) & 1555 1557 THEN 1556 1558 dopr_index(i) = 48 1557 1559 hom(:,2,48,:) = SPREAD( zw, 2, statistic_regions+1 ) 1558 ELSEIF( moisture.AND. cloud_physics ) THEN1560 ELSEIF( humidity .AND. cloud_physics ) THEN 1559 1561 dopr_index(i) = 51 1560 1562 hom(:,2,51,:) = SPREAD( zw, 2, statistic_regions+1 ) … … 1564 1566 data_output_pr(i), & 1565 1567 ' is not implemented for cloud_physics = FALSE', & 1566 ' and moisture= FALSE'1568 ' and humidity = FALSE' 1567 1569 ENDIF 1568 1570 CALL local_stop … … 1570 1572 1571 1573 CASE ( 'w*qv*' ) 1572 IF ( moisture.AND. .NOT. cloud_physics ) &1574 IF ( humidity .AND. .NOT. cloud_physics ) & 1573 1575 THEN 1574 1576 dopr_index(i) = 49 1575 1577 hom(:,2,49,:) = SPREAD( zw, 2, statistic_regions+1 ) 1576 ELSEIF( moisture.AND. cloud_physics ) THEN1578 ELSEIF( humidity .AND. cloud_physics ) THEN 1577 1579 dopr_index(i) = 52 1578 1580 hom(:,2,52,:) = SPREAD( zw, 2, statistic_regions+1 ) … … 1582 1584 data_output_pr(i), & 1583 1585 ' is not implemented for cloud_physics = FALSE', & 1584 ' and moisture= FALSE'1586 ' and humidity = FALSE' 1585 1587 ENDIF 1586 1588 CALL local_stop … … 1588 1590 1589 1591 CASE ( 'wqv' ) 1590 IF ( moisture.AND. .NOT. cloud_physics ) &1592 IF ( humidity .AND. .NOT. cloud_physics ) & 1591 1593 THEN 1592 1594 dopr_index(i) = 50 1593 1595 hom(:,2,50,:) = SPREAD( zw, 2, statistic_regions+1 ) 1594 ELSEIF( moisture.AND. cloud_physics ) THEN1596 ELSEIF( humidity .AND. cloud_physics ) THEN 1595 1597 dopr_index(i) = 53 1596 1598 hom(:,2,53,:) = SPREAD( zw, 2, statistic_regions+1 ) … … 1600 1602 data_output_pr(i), & 1601 1603 ' is not implemented for cloud_physics = FALSE', & 1602 ' and moisture= FALSE'1604 ' and humidity = FALSE' 1603 1605 ENDIF 1604 1606 CALL local_stop … … 1819 1821 1820 1822 CASE ( 'q', 'vpt' ) 1821 IF ( .NOT. moisture) THEN1823 IF ( .NOT. humidity ) THEN 1822 1824 IF ( myid == 0 ) THEN 1823 1825 PRINT*, '+++ check_parameters: output of "', TRIM( var ), & 1824 '" requires moisture= .TRUE.'1826 '" requires humidity = .TRUE.' 1825 1827 ENDIF 1826 1828 CALL local_stop -
palm/trunk/SOURCE/coriolis.f90
r4 r75 4 4 ! Actual revisions: 5 5 ! ----------------- 6 ! 6 ! uxrp, vynp eliminated 7 7 ! 8 8 ! Former revisions: … … 56 56 !-- u-component 57 57 CASE ( 1 ) 58 DO i = nxl, nxr +uxrp58 DO i = nxl, nxr 59 59 DO j = nys, nyn 60 60 DO k = nzb_u_inner(j,i)+1, nzt … … 74 74 CASE ( 2 ) 75 75 DO i = nxl, nxr 76 DO j = nys, nyn +vynp76 DO j = nys, nyn 77 77 DO k = nzb_v_inner(j,i)+1, nzt 78 78 tend(k,j,i) = tend(k,j,i) - f * ( 0.25 * & -
palm/trunk/SOURCE/data_output_2d.f90
r72 r75 4 4 ! Actual revisions: 5 5 ! ----------------- 6 ! Output of precipitation amount/rate and roughness length 6 ! Output of precipitation amount/rate and roughness length, 7 ! 2nd+3rd argument removed from exchange horiz 7 8 ! 8 9 ! Former revisions: … … 208 209 IF ( av == 0 ) THEN 209 210 tend = prt_count 210 CALL exchange_horiz( tend , 0, 0)211 CALL exchange_horiz( tend ) 211 212 DO i = nxl-1, nxr+1 212 213 DO j = nys-1, nyn+1 … … 218 219 resorted = .TRUE. 219 220 ELSE 220 CALL exchange_horiz( pc_av , 0, 0)221 CALL exchange_horiz( pc_av ) 221 222 to_be_resorted => pc_av 222 223 ENDIF … … 243 244 ENDDO 244 245 ENDDO 245 CALL exchange_horiz( tend , 0, 0)246 CALL exchange_horiz( tend ) 246 247 DO i = nxl-1, nxr+1 247 248 DO j = nys-1, nyn+1 … … 253 254 resorted = .TRUE. 254 255 ELSE 255 CALL exchange_horiz( pr_av , 0, 0)256 CALL exchange_horiz( pr_av ) 256 257 to_be_resorted => pr_av 257 258 ENDIF -
palm/trunk/SOURCE/data_output_3d.f90
r4 r75 4 4 ! Actual revisions: 5 5 ! ----------------- 6 ! 6 ! 2nd+3rd argument removed from exchange horiz 7 7 ! 8 8 ! Former revisions: … … 129 129 IF ( av == 0 ) THEN 130 130 tend = prt_count 131 CALL exchange_horiz( tend , 0, 0)131 CALL exchange_horiz( tend ) 132 132 DO i = nxl-1, nxr+1 133 133 DO j = nys-1, nyn+1 … … 139 139 resorted = .TRUE. 140 140 ELSE 141 CALL exchange_horiz( pc_av , 0, 0)141 CALL exchange_horiz( pc_av ) 142 142 to_be_resorted => pc_av 143 143 ENDIF … … 164 164 ENDDO 165 165 ENDDO 166 CALL exchange_horiz( tend , 0, 0)166 CALL exchange_horiz( tend ) 167 167 DO i = nxl-1, nxr+1 168 168 DO j = nys-1, nyn+1 … … 174 174 resorted = .TRUE. 175 175 ELSE 176 CALL exchange_horiz( pr_av , 0, 0)176 CALL exchange_horiz( pr_av ) 177 177 to_be_resorted => pr_av 178 178 ENDIF -
palm/trunk/SOURCE/data_output_dvrp.f90
r60 r75 32 32 ! Actual revisions: 33 33 ! ----------------- 34 ! Particles-package is now part of the default code. 34 ! Particles-package is now part of the default code, 35 ! moisture renamed humidity 35 36 ! TEST: write statements 36 37 ! … … 391 392 392 393 CASE ( 'q', 'q_xy', 'q_xz', 'q_yz' ) 393 IF ( moisture.OR. passive_scalar ) THEN394 IF ( humidity .OR. passive_scalar ) THEN 394 395 DO i = nxl, nxr+1 395 396 DO j = nys, nyn+1 … … 401 402 ELSE 402 403 IF ( myid == 0 ) THEN 403 PRINT*, '+++ data_output_dvrp: if moisture/passive_scalar = ', &404 PRINT*, '+++ data_output_dvrp: if humidity/passive_scalar = ', & 404 405 'FALSE output of ', output_variable, & 405 406 'is not provided' -
palm/trunk/SOURCE/diffusion_u.f90
r57 r75 5 5 ! ----------------- 6 6 ! Wall functions now include diabatic conditions, call of routine wall_fluxes, 7 ! z0 removed from argument list 7 ! z0 removed from argument list, uxrp eliminated 8 8 ! 9 9 ! Former revisions: … … 65 65 REAL, DIMENSION(:,:), POINTER :: usws 66 66 REAL, DIMENSION(:,:,:), POINTER :: km, u, v, w 67 REAL, DIMENSION(nzb:nzt+1,nys:nyn,nxl:nxr +uxrp) :: usvs67 REAL, DIMENSION(nzb:nzt+1,nys:nyn,nxl:nxr) :: usvs 68 68 69 69 ! … … 71 71 !-- if neccessary 72 72 IF ( topography /= 'flat' ) THEN 73 CALL wall_fluxes( usvs, 1.0, 0.0, 0.0, 0.0, uxrp, 0,nzb_u_inner, &73 CALL wall_fluxes( usvs, 1.0, 0.0, 0.0, 0.0, nzb_u_inner, & 74 74 nzb_u_outer, wall_u ) 75 75 ENDIF 76 76 77 DO i = nxl, nxr +uxrp77 DO i = nxl, nxr 78 78 DO j = nys,nyn 79 79 ! -
palm/trunk/SOURCE/diffusion_v.f90
r57 r75 5 5 ! ----------------- 6 6 ! Wall functions now include diabatic conditions, call of routine wall_fluxes, 7 ! z0 removed from argument list 7 ! z0 removed from argument list, vynp eliminated 8 8 ! 9 9 ! Former revisions: … … 63 63 REAL, DIMENSION(:,:), POINTER :: vsws 64 64 REAL, DIMENSION(:,:,:), POINTER :: km, u, v, w 65 REAL, DIMENSION(nzb:nzt+1,nys:nyn +vynp,nxl:nxr) :: vsus65 REAL, DIMENSION(nzb:nzt+1,nys:nyn,nxl:nxr) :: vsus 66 66 67 67 ! … … 69 69 !-- if neccessary 70 70 IF ( topography /= 'flat' ) THEN 71 CALL wall_fluxes( vsus, 0.0, 1.0, 0.0, 0.0, 0, vynp,nzb_v_inner, &71 CALL wall_fluxes( vsus, 0.0, 1.0, 0.0, 0.0, nzb_v_inner, & 72 72 nzb_v_outer, wall_v ) 73 73 ENDIF 74 74 75 75 DO i = nxl, nxr 76 DO j = nys, nyn +vynp76 DO j = nys, nyn 77 77 ! 78 78 !-- Compute horizontal diffusion -
palm/trunk/SOURCE/diffusion_w.f90
r57 r75 69 69 !-- walls, if neccessary 70 70 IF ( topography /= 'flat' ) THEN 71 CALL wall_fluxes( wsus, 0.0, 0.0, 0.0, 1.0, 0, 0,nzb_w_inner, &71 CALL wall_fluxes( wsus, 0.0, 0.0, 0.0, 1.0, nzb_w_inner, & 72 72 nzb_w_outer, wall_w_x ) 73 CALL wall_fluxes( wsvs, 0.0, 0.0, 1.0, 0.0, 0, 0,nzb_w_inner, &73 CALL wall_fluxes( wsvs, 0.0, 0.0, 1.0, 0.0, nzb_w_inner, & 74 74 nzb_w_outer, wall_w_y ) 75 75 ENDIF -
palm/trunk/SOURCE/disturb_field.f90
r4 r75 1 SUBROUTINE disturb_field( nzb_uv_inner, dist1, field , xrp, ynp)1 SUBROUTINE disturb_field( nzb_uv_inner, dist1, field ) 2 2 3 3 !------------------------------------------------------------------------------! 4 4 ! Actual revisions: 5 5 ! ----------------- 6 ! 6 ! xrp, ynp eliminated, 2nd+3rd argument removed from exchange horiz 7 7 ! 8 8 ! Former revisions: … … 36 36 IMPLICIT NONE 37 37 38 INTEGER :: i, j, k , xrp, ynp38 INTEGER :: i, j, k 39 39 INTEGER :: nzb_uv_inner(nys-1:nyn+1,nxl-1:nxr+1) 40 40 41 41 REAL :: randomnumber, & 42 42 dist1(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1), & 43 field(nzb:nzt+1,nys-1:nyn+ ynp+1,nxl-1:nxr+xrp+1)43 field(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1) 44 44 REAL, DIMENSION(:,:,:), ALLOCATABLE :: dist2 45 45 … … 94 94 ! 95 95 !-- Exchange of ghost points for the random perturbation 96 CALL exchange_horiz( dist1 , 0, 0)96 CALL exchange_horiz( dist1 ) 97 97 98 98 ! … … 114 114 !-- Exchange of ghost points for the filtered perturbation. 115 115 !-- Afterwards, filter operation and exchange of ghost points are repeated. 116 CALL exchange_horiz( dist2 , 0, 0)116 CALL exchange_horiz( dist2 ) 117 117 DO i = nxl, nxr 118 118 DO j = nys, nyn … … 125 125 ENDDO 126 126 ENDDO 127 CALL exchange_horiz( dist1 , 0, 0)127 CALL exchange_horiz( dist1 ) 128 128 129 129 ! -
palm/trunk/SOURCE/exchange_horiz.f90
r4 r75 1 SUBROUTINE exchange_horiz( ar , xrp, ynp)1 SUBROUTINE exchange_horiz( ar ) 2 2 3 3 !------------------------------------------------------------------------------! 4 4 ! Actual revisions: 5 5 ! ----------------- 6 ! 6 ! Special cases for additional gridpoints along x or y in case of non-cyclic 7 ! boundary conditions are not regarded any more 7 8 ! 8 9 ! Former revisions: … … 32 33 IMPLICIT NONE 33 34 34 INTEGER :: xrp, ynp35 36 35 #if defined( __parallel ) 37 INTEGER :: typexz38 36 INTEGER, DIMENSION(4) :: req 39 37 INTEGER, DIMENSION(MPI_STATUS_SIZE,4) :: wait_stat 40 38 #endif 41 39 42 REAL :: ar(nzb:nzt+1,nys-1:nyn+ ynp+1,nxl-1:nxr+xrp+1)40 REAL :: ar(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1) 43 41 44 42 … … 59 57 60 58 ELSE 59 61 60 req = 0 62 61 ! … … 76 75 ar(nzb,nys-1,nxl-1), ngp_yz(grid_level), MPI_REAL, pleft, 1, & 77 76 comm2d, req(4), ierr ) 78 call MPI_Waitall (4,req,wait_stat,ierr) 77 CALL MPI_WAITALL( 4, req, wait_stat, ierr ) 78 79 79 ENDIF 80 80 … … 90 90 91 91 ELSE 92 !93 !-- Set the MPI data type, which depends on the size of the array94 !-- (the v array has an additional gridpoint along y in case of non-cyclic95 !-- boundary conditions)96 IF ( ynp == 0 ) THEN97 typexz = type_xz(grid_level)98 ELSE99 typexz = type_xz_p100 ENDIF101 92 102 93 req = 0 103 94 ! 104 95 !-- Send front boundary, receive rear one 105 CALL MPI_ISEND( ar(nzb,nys,nxl-1), 1, type xz, psouth, 0, comm2d, &106 req(1), ierr )107 CALL MPI_IRECV( ar(nzb,nyn+1,nxl-1), 1, type xz, pnorth, 0, comm2d, &108 req(2), ierr )96 CALL MPI_ISEND( ar(nzb,nys,nxl-1), 1, type_xz(grid_level), psouth, 0, & 97 comm2d, req(1), ierr ) 98 CALL MPI_IRECV( ar(nzb,nyn+1,nxl-1), 1, type_xz(grid_level), pnorth, 0, & 99 comm2d, req(2), ierr ) 109 100 ! 110 101 !-- Send rear boundary, receive front one 111 CALL MPI_ISEND( ar(nzb,nyn,nxl-1), 1, typexz, pnorth, 1, comm2d, & 112 req(3), ierr ) 113 CALL MPI_IRECV( ar(nzb,nys-1,nxl-1), 1, typexz, psouth, 1, comm2d, & 114 req(4), ierr ) 115 call MPI_Waitall (4,req,wait_stat,ierr) 102 CALL MPI_ISEND( ar(nzb,nyn,nxl-1), 1, type_xz(grid_level), pnorth, 1, & 103 comm2d, req(3), ierr ) 104 CALL MPI_IRECV( ar(nzb,nys-1,nxl-1), 1, type_xz(grid_level), psouth, 1, & 105 comm2d, req(4), ierr ) 106 call MPI_WAITALL( 4, req, wait_stat, ierr ) 107 116 108 ENDIF 117 109 -
palm/trunk/SOURCE/flow_statistics.f90
r51 r75 5 5 ! ----------------- 6 6 ! Collection of time series quantities moved from routine flow_statistics to 7 ! here, routine user_statistics is called for each statistic region 7 ! here, routine user_statistics is called for each statistic region, 8 ! moisture renamed humidity 8 9 ! 9 10 ! Former revisions: … … 115 116 !-- total water content, specific humidity and liquid water potential 116 117 !-- temperature 117 IF ( moisture) THEN118 IF ( humidity ) THEN 118 119 !$OMP DO 119 120 DO i = nxl, nxr … … 164 165 sums_l(:,2,0) = sums_l(:,2,0) + sums_l(:,2,i) 165 166 sums_l(:,4,0) = sums_l(:,4,0) + sums_l(:,4,i) 166 IF ( moisture) THEN167 IF ( humidity ) THEN 167 168 sums_l(:,41,0) = sums_l(:,41,0) + sums_l(:,41,i) 168 169 sums_l(:,44,0) = sums_l(:,44,0) + sums_l(:,44,i) … … 187 188 CALL MPI_ALLREDUCE( sums_l(nzb,4,0), sums(nzb,4), nzt+2-nzb, MPI_REAL, & 188 189 MPI_SUM, comm2d, ierr ) 189 IF ( moisture) THEN190 IF ( humidity ) THEN 190 191 CALL MPI_ALLREDUCE( sums_l(nzb,44,0), sums(nzb,44), nzt+2-nzb, & 191 192 MPI_REAL, MPI_SUM, comm2d, ierr ) … … 208 209 sums(:,2) = sums_l(:,2,0) 209 210 sums(:,4) = sums_l(:,4,0) 210 IF ( moisture) THEN211 IF ( humidity ) THEN 211 212 sums(:,44) = sums_l(:,44,0) 212 213 sums(:,41) = sums_l(:,41,0) … … 231 232 ! 232 233 !-- Humidity and cloud parameters 233 IF ( moisture) THEN234 IF ( humidity ) THEN 234 235 sums(:,44) = sums(:,44) / ngp_2dh_outer(:,sr) 235 236 sums(:,41) = sums(:,41) / ngp_2dh_outer(:,sr) … … 365 366 ! 366 367 !-- Buoyancy flux, water flux (humidity flux) w"q" 367 IF ( moisture) THEN368 IF ( humidity ) THEN 368 369 sums_l(k,45,tn) = sums_l(k,45,tn) & 369 370 - 0.5 * ( kh(k,j,i) + kh(k+1,j,i) ) & … … 407 408 sums_l(nzb,61,tn) = sums_l(nzb,61,tn) + & 408 409 0.0 * rmask(j,i,sr) ! v"pt" 409 IF ( moisture) THEN410 IF ( humidity ) THEN 410 411 sums_l(nzb,48,tn) = sums_l(nzb,48,tn) + & 411 412 qsws(j,i) * rmask(j,i,sr) ! w"q" (w"qv") … … 437 438 sums_l(nzt,61,tn) = sums_l(nzt,61,tn) + & 438 439 0.0 * rmask(j,i,sr) ! v"pt" 439 IF ( moisture) THEN440 IF ( humidity ) THEN 440 441 sums_l(nzt,48,tn) = sums_l(nzt,48,tn) + & 441 442 qswst(j,i) * rmask(j,i,sr) ! w"q" (w"qv") … … 499 500 !-- Buoyancy flux, water flux, humidity flux and liquid water 500 501 !-- content 501 IF ( moisture) THEN502 IF ( humidity ) THEN 502 503 pts = 0.5 * ( vpt(k,j,i) - hom(k,1,44,sr) + & 503 504 vpt(k+1,j,i) - hom(k+1,1,44,sr) ) -
palm/trunk/SOURCE/header.f90
r63 r75 5 5 ! ----------------- 6 6 ! Output of netcdf_64bit_3d, particles-package is now part of the default code, 7 ! output of the loop optimization method. 7 ! output of the loop optimization method, moisture renamed humidity, 8 ! output of subversion revision number 8 9 ! 9 10 ! Former revisions: … … 52 53 CHARACTER (LEN=10) :: coor_chr, host_chr 53 54 CHARACTER (LEN=16) :: begin_chr 55 CHARACTER (LEN=21) :: ver_rev 54 56 CHARACTER (LEN=40) :: output_format 55 57 CHARACTER (LEN=70) :: char1, char2, coordinates, gradients, dopr_chr, & … … 95 97 !-- Run-identification, date, time, host 96 98 host_chr = host(1:10) 97 WRITE ( io, 100 ) version, TRIM( run_classification ), run_date, & 99 ver_rev = TRIM( version ) // ' ' // TRIM( revision ) 100 WRITE ( io, 100 ) ver_rev, TRIM( run_classification ), run_date, & 98 101 run_identifier, run_time, runnr, ADJUSTR( host_chr ) 99 102 #if defined( __parallel ) … … 217 220 WRITE ( io, 123 ) rayleigh_damping_height, rayleigh_damping_factor 218 221 ENDIF 219 IF ( moisture) THEN222 IF ( humidity ) THEN 220 223 IF ( .NOT. cloud_physics ) THEN 221 224 WRITE ( io, 129 ) … … 370 373 ENDIF 371 374 372 IF ( moisture.OR. passive_scalar ) THEN373 IF ( moisture) THEN375 IF ( humidity .OR. passive_scalar ) THEN 376 IF ( humidity ) THEN 374 377 IF ( ibc_q_b == 0 ) THEN 375 378 runten = 'q(0) = q_surface' … … 405 408 IF ( random_heatflux ) WRITE ( io, 307 ) 406 409 ENDIF 407 IF ( moisture.AND. constant_waterflux ) THEN410 IF ( humidity .AND. constant_waterflux ) THEN 408 411 WRITE ( io, 311 ) surface_waterflux 409 412 ENDIF … … 418 421 WRITE ( io, 306 ) top_heatflux 419 422 ENDIF 420 IF ( moisture.OR. passive_scalar ) THEN423 IF ( humidity .OR. passive_scalar ) THEN 421 424 WRITE ( io, 315 ) 422 425 ENDIF … … 426 429 WRITE ( io, 305 ) zu(1), roughness_length, kappa, rif_min, rif_max 427 430 IF ( .NOT. constant_heatflux ) WRITE ( io, 308 ) 428 IF ( moisture.AND. .NOT. constant_waterflux ) THEN431 IF ( humidity .AND. .NOT. constant_waterflux ) THEN 429 432 WRITE ( io, 312 ) 430 433 ENDIF … … 955 958 !-- Initial humidity profile 956 959 !-- Building output strings, starting with surface humidity 957 IF ( moisture.OR. passive_scalar ) THEN960 IF ( humidity .OR. passive_scalar ) THEN 958 961 WRITE ( temperatures, '(E8.1)' ) q_surface 959 962 gradients = '--------' … … 978 981 ENDDO 979 982 980 IF ( moisture) THEN983 IF ( humidity ) THEN 981 984 WRITE ( io, 421 ) TRIM( coordinates ), TRIM( temperatures ), & 982 985 TRIM( gradients ), TRIM( slices ) … … 1021 1024 WRITE ( io, 475 ) pt_surface_initial_change 1022 1025 ENDIF 1023 IF ( moisture.AND. q_surface_initial_change /= 0.0 ) THEN1026 IF ( humidity .AND. q_surface_initial_change /= 0.0 ) THEN 1024 1027 WRITE ( io, 476 ) q_surface_initial_change 1025 1028 ENDIF … … 1113 1116 1114 1117 99 FORMAT (1X,78('-')) 1115 100 FORMAT (/1 0X,'****************',11X,28('-')/&1116 1 0X,'* ',A12,'*',11X,A/&1117 1 0X,'****************',11X,28('-')//&1118 100 FORMAT (/1X,'*************************',11X,28('-')/ & 1119 1X,'* ',A,' *',11X,A/ & 1120 1X,'*************************',11X,28('-')// & 1118 1121 ' Date: ',A8,11X,'Run: ',A20/ & 1119 1122 ' Time: ',A8,11X,'Run-No.: ',I2.2/ & -
palm/trunk/SOURCE/init_1d_model.f90
r46 r75 4 4 ! Actual revisions: 5 5 ! ----------------- 6 ! Bugfix: preset of tendencies te_em, te_um, te_vm 6 ! Bugfix: preset of tendencies te_em, te_um, te_vm, 7 ! moisture renamed humidity 7 8 ! 8 9 ! Former revisions: … … 125 126 vsws1d = 0.0; vsws1d_m = 0.0 126 127 z01d = roughness_length 127 IF ( moisture.OR. passive_scalar ) qs1d = 0.0128 IF ( humidity .OR. passive_scalar ) qs1d = 0.0 128 129 129 130 ! … … 216 217 kmzm = 0.5 * ( km1d_m(k-1) + km1d_m(k) ) 217 218 kmzp = 0.5 * ( km1d_m(k) + km1d_m(k+1) ) 218 IF ( .NOT. moisture) THEN219 IF ( .NOT. humidity ) THEN 219 220 pt_0 = pt_init(k) 220 221 flux = ( pt_init(k+1)-pt_init(k-1) ) * dd2zu(k) … … 256 257 kmzm = 0.5 * ( km1d_m(k-1) + km1d_m(k) ) 257 258 kmzp = 0.5 * ( km1d_m(k) + km1d_m(k+1) ) 258 IF ( .NOT. moisture) THEN259 IF ( .NOT. humidity ) THEN 259 260 pt_0 = pt_init(k) 260 261 flux = ( pt_init(k+1)-pt_init(k-1) ) * dd2zu(k) … … 450 451 451 452 IF ( prandtl_layer ) THEN 452 IF ( .NOT. moisture) THEN453 IF ( .NOT. humidity ) THEN 453 454 pt_0 = pt_init(nzb+1) 454 455 flux = ts1d … … 462 463 463 464 DO k = nzb_diff, nzt 464 IF ( .NOT. moisture) THEN465 IF ( .NOT. humidity ) THEN 465 466 pt_0 = pt_init(k) 466 467 flux = ( pt_init(k+1) - pt_init(k-1) ) * dd2zu(k) … … 544 545 e1d(nzb) = e1d(nzb+1) 545 546 546 IF ( moisture.OR. passive_scalar ) THEN547 IF ( humidity .OR. passive_scalar ) THEN 547 548 ! 548 549 !-- Compute q* -
palm/trunk/SOURCE/init_3d_model.f90
r73 r75 9 9 ! Arrays for radiation boundary conditions are allocated (u_m_l, u_m_r, etc.), 10 10 ! bugfix for cases with the outflow damping layer extending over more than one 11 ! subdomain, 12 ! New initializing action "by_user" calls user_init_3d_model,11 ! subdomain, moisture renamed humidity, 12 ! new initializing action "by_user" calls user_init_3d_model, 13 13 ! precipitation_amount/rate, ts_value are allocated, +module netcdf_control, 14 14 ! initial velocities at nzb+1 are regarded for volume 15 15 ! flow control in case they have been set zero before (to avoid small timesteps) 16 ! -uvmean_outflow, uxrp, vynp eliminated 16 17 ! 17 18 ! Former revisions: … … 76 77 sums_divnew_l(0:statistic_regions), & 77 78 sums_divold_l(0:statistic_regions) ) 78 ALLOCATE( rdf(nzb+1:nzt), uvmean_outflow(nzb:nzt+1), & 79 uvmean_outflow_l(nzb:nzt+1) ) 79 ALLOCATE( rdf(nzb+1:nzt) ) 80 80 ALLOCATE( hom_sum(nzb:nzt+1,var_hom,0:statistic_regions), & 81 81 ngp_2dh_outer(nzb:nzt+1,0:statistic_regions), & … … 105 105 ENDIF 106 106 107 ALLOCATE( d(nzb+1:nzta,nys:nyna,nxl:nxra), 108 e_1(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1), 109 e_2(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1), 110 e_3(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1), 111 kh_1(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1), 112 km_1(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1), 113 p(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1), 114 pt_1(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1), 115 pt_2(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1), 116 pt_3(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1), 117 tend(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1), 118 u_1(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1 +uxrp),&119 u_2(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1 +uxrp),&120 u_3(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1 +uxrp),&121 v_1(nzb:nzt+1,nys-1:nyn+1 +vynp,nxl-1:nxr+1), &122 v_2(nzb:nzt+1,nys-1:nyn+1 +vynp,nxl-1:nxr+1), &123 v_3(nzb:nzt+1,nys-1:nyn+1 +vynp,nxl-1:nxr+1), &124 w_1(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1), 125 w_2(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1), 107 ALLOCATE( d(nzb+1:nzta,nys:nyna,nxl:nxra), & 108 e_1(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1), & 109 e_2(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1), & 110 e_3(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1), & 111 kh_1(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1), & 112 km_1(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1), & 113 p(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1), & 114 pt_1(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1), & 115 pt_2(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1), & 116 pt_3(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1), & 117 tend(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1), & 118 u_1(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1), & 119 u_2(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1), & 120 u_3(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1), & 121 v_1(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1), & 122 v_2(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1), & 123 v_3(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1), & 124 w_1(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1), & 125 w_2(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1), & 126 126 w_3(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1) ) 127 127 … … 131 131 ENDIF 132 132 133 IF ( moisture.OR. passive_scalar ) THEN134 ! 135 !-- 2D- moisture/scalar arrays133 IF ( humidity .OR. passive_scalar ) THEN 134 ! 135 !-- 2D-humidity/scalar arrays 136 136 ALLOCATE ( qs(nys-1:nyn+1,nxl-1:nxr+1), & 137 137 qsws_1(nys-1:nyn+1,nxl-1:nxr+1), & … … 143 143 ENDIF 144 144 ! 145 !-- 3D- moisture/scalar arrays145 !-- 3D-humidity/scalar arrays 146 146 ALLOCATE( q_1(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1), & 147 147 q_2(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1), & … … 149 149 150 150 ! 151 !-- 3D-arrays needed for moistureonly152 IF ( moisture) THEN151 !-- 3D-arrays needed for humidity only 152 IF ( humidity ) THEN 153 153 ALLOCATE( vpt_1(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1) ) 154 154 … … 212 212 !-- conditions 213 213 IF ( outflow_l ) THEN 214 ALLOCATE( u_m_l(nzb:nzt+1,nys-1:nyn+1,-1:1 ,-2:-1), &215 v_m_l(nzb:nzt+1,nys-1:nyn+1,-1:1 ,-2:-1), &216 w_m_l(nzb:nzt+1,nys-1:nyn+1,-1:1 ,-2:-1) )214 ALLOCATE( u_m_l(nzb:nzt+1,nys-1:nyn+1,-1:1), & 215 v_m_l(nzb:nzt+1,nys-1:nyn+1,-1:1), & 216 w_m_l(nzb:nzt+1,nys-1:nyn+1,-1:1) ) 217 217 ENDIF 218 218 IF ( outflow_r ) THEN 219 ALLOCATE( u_m_r(nzb:nzt+1,nys-1:nyn+1,nx-1:nx+1 ,-2:-1), &220 v_m_r(nzb:nzt+1,nys-1:nyn+1,nx-1:nx+1 ,-2:-1), &221 w_m_r(nzb:nzt+1,nys-1:nyn+1,nx-1:nx+1 ,-2:-1) )219 ALLOCATE( u_m_r(nzb:nzt+1,nys-1:nyn+1,nx-1:nx+1), & 220 v_m_r(nzb:nzt+1,nys-1:nyn+1,nx-1:nx+1), & 221 w_m_r(nzb:nzt+1,nys-1:nyn+1,nx-1:nx+1) ) 222 222 ENDIF 223 223 IF ( outflow_s ) THEN 224 ALLOCATE( u_m_s(nzb:nzt+1,-1:1,nxl-1:nxr+1 ,-2:-1), &225 v_m_s(nzb:nzt+1,-1:1,nxl-1:nxr+1 ,-2:-1), &226 w_m_s(nzb:nzt+1,-1:1,nxl-1:nxr+1 ,-2:-1) )224 ALLOCATE( u_m_s(nzb:nzt+1,-1:1,nxl-1:nxr+1), & 225 v_m_s(nzb:nzt+1,-1:1,nxl-1:nxr+1), & 226 w_m_s(nzb:nzt+1,-1:1,nxl-1:nxr+1) ) 227 227 ENDIF 228 228 IF ( outflow_n ) THEN 229 ALLOCATE( u_m_n(nzb:nzt+1,ny-1:ny+1,nxl-1:nxr+1 ,-2:-1), &230 v_m_n(nzb:nzt+1,ny-1:ny+1,nxl-1:nxr+1 ,-2:-1), &231 w_m_n(nzb:nzt+1,ny-1:ny+1,nxl-1:nxr+1 ,-2:-1) )229 ALLOCATE( u_m_n(nzb:nzt+1,ny-1:ny+1,nxl-1:nxr+1), & 230 v_m_n(nzb:nzt+1,ny-1:ny+1,nxl-1:nxr+1), & 231 w_m_n(nzb:nzt+1,ny-1:ny+1,nxl-1:nxr+1) ) 232 232 ENDIF 233 233 … … 249 249 w_m => w_1; w => w_2; w_p => w_3; tw_m => w_3 250 250 251 IF ( moisture.OR. passive_scalar ) THEN251 IF ( humidity .OR. passive_scalar ) THEN 252 252 qsws_m => qsws_1; qsws => qsws_2 253 253 qswst_m => qswst_1; qswst => qswst_2 254 254 q_m => q_1; q => q_2; q_p => q_3; tq_m => q_3 255 IF ( moisture) vpt_m => vpt_1; vpt => vpt_2255 IF ( humidity ) vpt_m => vpt_1; vpt => vpt_2 256 256 IF ( cloud_physics ) ql => ql_1 257 257 IF ( cloud_droplets ) THEN … … 276 276 w => w_1; w_p => w_2; tw_m => w_3; w_m => w_3 277 277 278 IF ( moisture.OR. passive_scalar ) THEN278 IF ( humidity .OR. passive_scalar ) THEN 279 279 qsws => qsws_1 280 280 qswst => qswst_1 281 281 q => q_1; q_p => q_2; tq_m => q_3; q_m => q_3 282 IF ( moisture) vpt => vpt_1282 IF ( humidity ) vpt => vpt_1 283 283 IF ( cloud_physics ) ql => ql_1 284 284 IF ( cloud_droplets ) THEN … … 309 309 km(:,j,i) = km1d 310 310 pt(:,j,i) = pt_init 311 ENDDO312 ENDDO313 DO i = nxl-1, nxr+uxrp+1314 DO j = nys-1, nyn+1315 311 u(:,j,i) = u1d 316 ENDDO317 ENDDO318 DO i = nxl-1, nxr+1319 DO j = nys-1, nyn+vynp+1320 312 v(:,j,i) = v1d 321 313 ENDDO 322 314 ENDDO 323 315 324 IF ( moisture.OR. passive_scalar ) THEN316 IF ( humidity .OR. passive_scalar ) THEN 325 317 DO i = nxl-1, nxr+1 326 318 DO j = nys-1, nyn+1 … … 368 360 !-- This could actually be computed more accurately in the 1D model. 369 361 !-- Update when opportunity arises! 370 IF ( moisture.OR. passive_scalar ) qs = 0.0362 IF ( humidity .OR. passive_scalar ) qs = 0.0 371 363 372 364 ! … … 419 411 DO j = nys-1, nyn+1 420 412 pt(:,j,i) = pt_init 421 ENDDO422 ENDDO423 DO i = nxl-1, nxr+uxrp+1424 DO j = nys-1, nyn+1425 413 u(:,j,i) = u_init 426 ENDDO427 ENDDO428 DO i = nxl-1, nxr+1429 DO j = nys-1, nyn+vynp+1430 414 v(:,j,i) = v_init 431 415 ENDDO 432 416 ENDDO 417 433 418 ! 434 419 !-- Set initial horizontal velocities at the lowest computational grid levels … … 458 443 ENDIF 459 444 460 IF ( moisture.OR. passive_scalar ) THEN445 IF ( humidity .OR. passive_scalar ) THEN 461 446 DO i = nxl-1, nxr+1 462 447 DO j = nys-1, nyn+1 … … 482 467 usws = 0.0 483 468 vsws = 0.0 484 IF ( moisture.OR. passive_scalar ) qs = 0.0469 IF ( humidity .OR. passive_scalar ) qs = 0.0 485 470 486 471 ! … … 499 484 ! 500 485 !-- Calculate virtual potential temperature 501 IF ( moisture) vpt = pt * ( 1.0 + 0.61 * q )486 IF ( humidity ) vpt = pt * ( 1.0 + 0.61 * q ) 502 487 503 488 ! … … 515 500 516 501 517 IF ( moisture) THEN502 IF ( humidity ) THEN 518 503 ! 519 504 !-- Store initial profile of total water content, virtual potential … … 564 549 ! 565 550 !-- Determine the near-surface water flux 566 IF ( moisture.OR. passive_scalar ) THEN551 IF ( humidity .OR. passive_scalar ) THEN 567 552 IF ( constant_waterflux ) THEN 568 553 qsws = surface_waterflux … … 585 570 IF ( ASSOCIATED( tswst_m ) ) tswst_m = tswst 586 571 587 IF ( moisture.OR. passive_scalar ) THEN572 IF ( humidity .OR. passive_scalar ) THEN 588 573 qswst = 0.0 589 574 IF ( ASSOCIATED( qswst_m ) ) qswst_m = qswst … … 610 595 ENDIF 611 596 612 IF ( moisture.OR. passive_scalar ) THEN597 IF ( humidity .OR. passive_scalar ) THEN 613 598 IF ( .NOT. constant_waterflux ) THEN 614 599 qsws = 0.0 … … 709 694 !-- If required, change the surface humidity/scalar at the start of the 3D 710 695 !-- run 711 IF ( ( moisture.OR. passive_scalar ) .AND. &696 IF ( ( humidity .OR. passive_scalar ) .AND. & 712 697 q_surface_initial_change /= 0.0 ) THEN 713 698 q(nzb,:,:) = q(nzb,:,:) + q_surface_initial_change … … 722 707 !-- remove the divergences from the velocity field 723 708 IF ( create_disturbances ) THEN 724 CALL disturb_field( nzb_u_inner, tend, u , uxrp, 0)725 CALL disturb_field( nzb_v_inner, tend, v , 0, vynp)709 CALL disturb_field( nzb_u_inner, tend, u ) 710 CALL disturb_field( nzb_v_inner, tend, v ) 726 711 n_sor = nsor_ini 727 712 CALL pres … … 746 731 e_p = e; pt_p = pt; u_p = u; v_p = v; w_p = w 747 732 748 IF ( moisture.OR. passive_scalar ) THEN733 IF ( humidity .OR. passive_scalar ) THEN 749 734 IF ( ASSOCIATED( q_m ) ) q_m = q 750 735 IF ( timestep_scheme(1:5) == 'runge' ) tq_m = 0.0 751 736 q_p = q 752 IF ( moisture.AND. ASSOCIATED( vpt_m ) ) vpt_m = vpt737 IF ( humidity .AND. ASSOCIATED( vpt_m ) ) vpt_m = vpt 753 738 ENDIF 754 739 … … 756 741 !-- Initialize old timelevels needed for radiation boundary conditions 757 742 IF ( outflow_l ) THEN 758 u_m_l(:,:,:,-2) = u(:,:,-1:1) 759 v_m_l(:,:,:,-2) = v(:,:,-1:1) 760 w_m_l(:,:,:,-2) = w(:,:,-1:1) 761 u_m_l(:,:,:,-1) = u(:,:,-1:1) 762 v_m_l(:,:,:,-1) = v(:,:,-1:1) 763 w_m_l(:,:,:,-1) = w(:,:,-1:1) 743 u_m_l(:,:,:) = u(:,:,-1:1) 744 v_m_l(:,:,:) = v(:,:,-1:1) 745 w_m_l(:,:,:) = w(:,:,-1:1) 764 746 ENDIF 765 747 IF ( outflow_r ) THEN 766 u_m_r(:,:,:,-2) = u(:,:,nx-1:nx+1) 767 v_m_r(:,:,:,-2) = v(:,:,nx-1:nx+1) 768 w_m_r(:,:,:,-2) = w(:,:,nx-1:nx+1) 769 u_m_r(:,:,:,-1) = u(:,:,nx-1:nx+1) 770 v_m_r(:,:,:,-1) = v(:,:,nx-1:nx+1) 771 w_m_r(:,:,:,-1) = w(:,:,nx-1:nx+1) 748 u_m_r(:,:,:) = u(:,:,nx-1:nx+1) 749 v_m_r(:,:,:) = v(:,:,nx-1:nx+1) 750 w_m_r(:,:,:) = w(:,:,nx-1:nx+1) 772 751 ENDIF 773 752 IF ( outflow_s ) THEN 774 u_m_s(:,:,:,-2) = u(:,-1:1,:) 775 v_m_s(:,:,:,-2) = v(:,-1:1,:) 776 w_m_s(:,:,:,-2) = w(:,-1:1,:) 777 u_m_s(:,:,:,-1) = u(:,-1:1,:) 778 v_m_s(:,:,:,-1) = v(:,-1:1,:) 779 w_m_s(:,:,:,-1) = w(:,-1:1,:) 753 u_m_s(:,:,:) = u(:,-1:1,:) 754 v_m_s(:,:,:) = v(:,-1:1,:) 755 w_m_s(:,:,:) = w(:,-1:1,:) 780 756 ENDIF 781 757 IF ( outflow_n ) THEN 782 u_m_n(:,:,:,-2) = u(:,ny-1:ny+1,:) 783 v_m_n(:,:,:,-2) = v(:,ny-1:ny+1,:) 784 w_m_n(:,:,:,-2) = w(:,ny-1:ny+1,:) 785 u_m_n(:,:,:,-1) = u(:,ny-1:ny+1,:) 786 v_m_n(:,:,:,-1) = v(:,ny-1:ny+1,:) 787 w_m_n(:,:,:,-1) = w(:,ny-1:ny+1,:) 758 u_m_n(:,:,:) = u(:,ny-1:ny+1,:) 759 v_m_n(:,:,:) = v(:,ny-1:ny+1,:) 760 w_m_n(:,:,:) = w(:,ny-1:ny+1,:) 788 761 ENDIF 789 762 … … 803 776 !-- including ghost points) 804 777 e_p = e; pt_p = pt; u_p = u; v_p = v; w_p = w 805 IF ( moisture.OR. passive_scalar ) q_p = q778 IF ( humidity .OR. passive_scalar ) q_p = q 806 779 807 780 ELSE -
palm/trunk/SOURCE/init_grid.f90
r49 r75 4 4 ! Actual revisions: 5 5 ! ----------------- 6 ! storage of topography height arrays zu_s_inner and zw_s_inner 6 ! storage of topography height arrays zu_s_inner and zw_s_inner, 7 ! 2nd+3rd argument removed from exchange horiz 7 8 ! 8 9 ! Former revisions: … … 823 824 ! 824 825 !-- Need to set lateral boundary conditions for l_wall 825 CALL exchange_horiz( l_wall , 0, 0)826 CALL exchange_horiz( l_wall ) 826 827 827 828 DEALLOCATE( corner_nl, corner_nr, corner_sl, corner_sr, nzb_local, & -
palm/trunk/SOURCE/init_pegrid.f90
r73 r75 5 5 ! ----------------- 6 6 ! uxrp, vynp eliminated, 7 ! dirichlet/neumann changed to dirichlet/radiation, etc. 7 ! dirichlet/neumann changed to dirichlet/radiation, etc., 8 ! poisfft_init is only called if fft-solver is switched on 8 9 ! 9 10 ! Former revisions: … … 493 494 nzta = nz 494 495 nnz = nz 495 496 !497 !-- For non-cyclic boundaries extend array u (v) by one gridpoint498 ! IF ( bc_lr /= 'cyclic' ) uxrp = 1499 ! IF ( bc_ns /= 'cyclic' ) vynp = 1500 496 501 497 ! … … 757 753 inflow_r = .TRUE. 758 754 ENDIF 759 ! uxrp = 1760 755 ENDIF 761 756 … … 774 769 outflow_n = .TRUE. 775 770 ENDIF 776 ! vynp = 1 777 ENDIF 778 779 ! 780 !-- Additional MPI derived data type for the exchange of ghost points along x 781 !-- needed in case of non-cyclic boundary conditions along y on the northmost 782 !-- processors (for the exchange of the enlarged v array) 783 IF ( bc_ns /= 'cyclic' .AND. pnorth == MPI_PROC_NULL ) THEN 784 ngp_yz_p = ( nzt - nzb + 2 ) * ( nyn + vynp - nys + 3 ) 785 CALL MPI_TYPE_VECTOR( nxr-nxl+3, nzt-nzb+2, ngp_yz_p, & 786 MPI_REAL, type_xz_p, ierr ) 787 CALL MPI_TYPE_COMMIT( type_xz_p, ierr ) 788 ENDIF 771 ENDIF 772 789 773 #else 790 774 IF ( bc_lr == 'dirichlet/radiation' ) THEN 791 775 inflow_l = .TRUE. 792 776 outflow_r = .TRUE. 793 ! uxrp = 1794 777 ELSEIF ( bc_lr == 'radiation/dirichlet' ) THEN 795 778 outflow_l = .TRUE. … … 803 786 outflow_n = .TRUE. 804 787 inflow_s = .TRUE. 805 ! vynp = 1806 788 ENDIF 807 789 #endif … … 809 791 IF ( psolver == 'poisfft_hybrid' ) THEN 810 792 CALL poisfft_hybrid_ini 811 ELSE 793 ELSEIF ( psolver == 'poisfft' ) THEN 812 794 CALL poisfft_init 813 795 ENDIF -
palm/trunk/SOURCE/init_pt_anomaly.f90
r39 r75 4 4 ! Actual revisions: 5 5 ! ----------------- 6 ! 6 ! 2nd+3rd argument removed from exchange horiz 7 7 ! 8 8 ! Former revisions: … … 70 70 ! 71 71 !-- Exchange of boundary values for temperature 72 CALL exchange_horiz( pt , 0, 0)72 CALL exchange_horiz( pt ) 73 73 74 74 -
palm/trunk/SOURCE/init_rankine.f90
r4 r75 4 4 ! Actual revisions: 5 5 ! ----------------- 6 ! 6 ! uxrp, vynp eliminated, 2nd+3rd argument removed from exchange horiz 7 7 ! 8 8 ! Former revisions: … … 129 129 ! 130 130 !-- Exchange of boundary values for the velocities. 131 CALL exchange_horiz( u , uxrp, 0)132 CALL exchange_horiz( v , 0, vynp)131 CALL exchange_horiz( u ) 132 CALL exchange_horiz( v ) 133 133 ! 134 134 !-- Make velocity field nondivergent. -
palm/trunk/SOURCE/modules.f90
r73 r75 9 9 ! +loop_optimization, netcdf_64bit_3d, zu_s_inner, zw_w_inner, id_var_zusi_*, 10 10 ! id_var_zwwi_*, ts_value, u_nzb_p1_for_vfc, v_nzb_p1_for_vfc, pt_reference, 11 ! use_pt_reference, precipitation_amount_interval 12 ! +age_m in particle_type 13 ! -data_output_ts, dots_n 14 ! arrays dots_label and dots_unit now dimensioned with dots_max 11 ! use_pt_reference, precipitation_amount_interval, revision 12 ! +age_m in particle_type, moisture renamed humidity, 13 ! -data_output_ts, dots_n, uvmean_outflow, uxrp, vynp, 14 ! arrays dots_label and dots_unit now dimensioned with dots_max, 15 ! setting of palm version moved to main program 15 16 ! 16 17 ! Former revisions: … … 81 82 REAL, DIMENSION(:), ALLOCATABLE :: & 82 83 ddzu, dd2zu, dzu, ddzw, dzw, km_damp_x, km_damp_y, l_grid, pt_init, & 83 q_init, rdf, ug, u vmean_outflow, uvmean_outflow_l, u_init,&84 u_nzb_p1_for_vfc, vg, v_init,v_nzb_p1_for_vfc, zu, zw84 q_init, rdf, ug, u_init, u_nzb_p1_for_vfc, vg, v_init, & 85 v_nzb_p1_for_vfc, zu, zw 85 86 86 87 REAL, DIMENSION(:,:), ALLOCATABLE :: & … … 96 97 97 98 REAL, DIMENSION(:,:,:), ALLOCATABLE :: & 98 d, diss, l_wall, tend 99 d, diss, l_wall, tend, u_m_l, u_m_n, u_m_r, u_m_s, v_m_l, v_m_n, & 100 v_m_r, v_m_s, w_m_l, w_m_n, w_m_r, w_m_s 99 101 100 102 REAL, DIMENSION(:,:,:), ALLOCATABLE, TARGET :: & … … 111 113 vpt, vpt_m, w, w_m, w_p 112 114 113 REAL, DIMENSION(:,:,:,:), ALLOCATABLE :: rif_wall, u_m_l, u_m_n, u_m_r, & 114 u_m_s, v_m_l, v_m_n, v_m_r, v_m_s, w_m_l, w_m_n, w_m_r, w_m_s 115 115 REAL, DIMENSION(:,:,:,:), ALLOCATABLE :: rif_wall 116 116 117 117 SAVE … … 217 217 CHARACTER (LEN=8) :: run_date, run_time 218 218 CHARACTER (LEN=9) :: simulated_time_chr 219 CHARACTER (LEN=12) :: version = ' PALM 3.2'219 CHARACTER (LEN=12) :: version = ' ', revision = ' ' 220 220 CHARACTER (LEN=16) :: loop_optimization = 'default', & 221 221 momentum_advec = 'pw-scheme', & … … 236 236 CHARACTER (LEN=40) :: avs_data_file, topography = 'flat' 237 237 CHARACTER (LEN=64) :: host 238 CHARACTER (LEN=80) :: log_message, run_ description_header, run_identifier239 CHARACTER (LEN=100) :: initializing_actions = ' ' 238 CHARACTER (LEN=80) :: log_message, run_identifier 239 CHARACTER (LEN=100) :: initializing_actions = ' ', run_description_header 240 240 241 241 CHARACTER (LEN=7), DIMENSION(100) :: do3d_comp_prec = ' ' … … 293 293 first_call_advec_particles = .TRUE., & 294 294 force_print_header = .FALSE., galilei_transformation = .FALSE.,& 295 inflow_l = .FALSE., inflow_n = .FALSE., inflow_r= .FALSE., &296 inflow_ s = .FALSE., iso2d_output = .FALSE.,&297 mg_switch_to_pe0 = .FALSE., moisture = .FALSE.,&295 humidity = .FALSE., inflow_l = .FALSE., inflow_n = .FALSE., & 296 inflow_r = .FALSE., inflow_s = .FALSE., iso2d_output = .FALSE.,& 297 mg_switch_to_pe0 = .FALSE., & 298 298 netcdf_output = .FALSE., netcdf_64bit = .FALSE., & 299 299 netcdf_64bit_3d = .TRUE., & … … 528 528 INTEGER :: ngp_sums, nnx, nx = 0, nxa, nxl, nxr, nxra, nny, ny = 0, nya, & 529 529 nyn, nyna, nys, nnz, nz = 0, nza, nzb, nzb_diff, nzt, nzta, & 530 nzt_diff , uxrp = 0, vynp = 0530 nzt_diff 531 531 532 532 INTEGER, DIMENSION(:), ALLOCATABLE :: & … … 889 889 #if defined( __parallel ) 890 890 INTEGER :: comm1dx, comm1dy, comm2d, comm_palm, ierr, myidx, myidy, & 891 ndim = 2, ngp_y, ngp_yz_p, pleft, pnorth, pright, psouth,&891 ndim = 2, ngp_y, pleft, pnorth, pright, psouth, & 892 892 sendrecvcount_xy, sendrecvcount_yz, sendrecvcount_zx, & 893 893 sendrecvcount_zyd, sendrecvcount_yxd, & 894 type_x, type_x_int, type_xz_p, ibuf(12), pcoord(2), pdims(2),&894 type_x, type_x_int, ibuf(12), pcoord(2), pdims(2), & 895 895 status(MPI_STATUS_SIZE) 896 896 -
palm/trunk/SOURCE/palm.f90
r70 r75 5 5 ! ----------------- 6 6 ! __vtk directives removed, write_particles is called only in case of particle 7 ! advection switched on, open unit 9 for debug output 7 ! advection switched on, open unit 9 for debug output, 8 ! setting of palm version moved from modules to here 8 9 ! 9 10 ! Former revisions: … … 57 58 CHARACTER (LEN=1) :: cdum 58 59 INTEGER :: i, run_description_header_i(80) 60 61 version = 'PALM 3.2' 59 62 60 63 #if defined( __parallel ) -
palm/trunk/SOURCE/parin.f90
r72 r75 5 5 ! ----------------- 6 6 ! +dt_max, netcdf_64bit_3d, precipitation_amount_interval in d3par, 7 ! +loop_optimization, pt_reference in inipar, -data_output_ts 7 ! +loop_optimization, pt_reference in inipar, -data_output_ts, 8 ! moisture renamed humidity 8 9 ! 9 10 ! Former revisions: … … 58 59 dz_stretch_factor, dz_stretch_level, e_min, & 59 60 end_time_1d, fft_method, galilei_transformation, & 60 grid_matching, inflow_disturbance_begin, &61 grid_matching, humidity, inflow_disturbance_begin, & 61 62 inflow_disturbance_end, initializing_actions, & 62 63 km_constant, km_damp_max, long_filter_factor, & 63 loop_optimization, mixing_length_1d, moisture,&64 loop_optimization, mixing_length_1d, & 64 65 momentum_advec, netcdf_precision, npex, npey, nsor_ini, & 65 66 nx, ny, nz, omega, outflow_damping_width, & … … 117 118 118 119 119 NAMELIST /envpar/ host, maximum_cpu_time_allowed, r un_identifier, &120 tasks_per_node, write_binary120 NAMELIST /envpar/ host, maximum_cpu_time_allowed, revision, & 121 run_identifier, tasks_per_node, write_binary 121 122 122 123 -
palm/trunk/SOURCE/poismg.f90
r4 r75 8 8 ! Actual revisions: 9 9 ! ----------------- 10 ! 10 ! 2nd+3rd argument removed from exchange horiz 11 11 ! 12 12 ! Former revisions: … … 59 59 ! 60 60 !-- Some boundaries have to be added to divergence array 61 CALL exchange_horiz( d , 0, 0)61 CALL exchange_horiz( d ) 62 62 d(nzb,:,:) = d(nzb+1,:,:) 63 63 … … 164 164 ! 165 165 !-- Horizontal boundary conditions 166 CALL exchange_horiz( r , 0, 0)166 CALL exchange_horiz( r ) 167 167 168 168 IF ( bc_lr /= 'cyclic' ) THEN … … 257 257 ! 258 258 !-- Horizontal boundary conditions 259 CALL exchange_horiz( f_mg , 0, 0)259 CALL exchange_horiz( f_mg ) 260 260 261 261 IF ( bc_lr /= 'cyclic' ) THEN … … 355 355 ! 356 356 !-- Horizontal boundary conditions 357 CALL exchange_horiz( temp , 0, 0)357 CALL exchange_horiz( temp ) 358 358 359 359 IF ( bc_lr /= 'cyclic' ) THEN … … 627 627 ! 628 628 !-- Horizontal boundary conditions 629 CALL exchange_horiz( p_mg , 0, 0)629 CALL exchange_horiz( p_mg ) 630 630 631 631 IF ( bc_lr /= 'cyclic' ) THEN -
palm/trunk/SOURCE/prandtl_fluxes.f90
r4 r75 4 4 ! Actual revisions: 5 5 ! ----------------- 6 ! 6 ! moisture renamed humidity 7 7 ! 8 8 ! Former revisions: … … 97 97 ! 98 98 !-- Compute z_p/L (corresponds to the Richardson-flux number) 99 IF ( .NOT. moisture )THEN99 IF ( .NOT. humidity ) THEN 100 100 !$OMP PARALLEL DO PRIVATE( k, z_p ) 101 101 DO i = nxl-1, nxr+1 … … 274 274 ! 275 275 !-- If required compute q* 276 IF ( moisture.OR. passive_scalar ) THEN276 IF ( humidity .OR. passive_scalar ) THEN 277 277 IF ( constant_waterflux ) THEN 278 278 ! … … 332 332 CALL exchange_horiz_2d( usws ) 333 333 CALL exchange_horiz_2d( vsws ) 334 IF ( moisture.OR. passive_scalar ) CALL exchange_horiz_2d( qsws )334 IF ( humidity .OR. passive_scalar ) CALL exchange_horiz_2d( qsws ) 335 335 336 336 ! … … 347 347 ! 348 348 !-- Compute the vertical water/scalar flux 349 IF ( .NOT. constant_heatflux .AND. ( moisture.OR. passive_scalar ) ) THEN349 IF ( .NOT. constant_heatflux .AND. ( humidity .OR. passive_scalar ) ) THEN 350 350 !$OMP PARALLEL DO 351 351 DO i = nxl-1, nxr+1 -
palm/trunk/SOURCE/pres.f90
r73 r75 4 4 ! Actual revisions: 5 5 ! ----------------- 6 ! 6 ! Volume flow control for non-cyclic boundary conditions added (currently only 7 ! for the north boundary!!), 2nd+3rd argument removed from exchange horiz 7 8 ! 8 9 ! Former revisions: … … 54 55 ALLOCATE( d(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1) ) 55 56 ENDIF 57 58 ! 59 !-- Conserve the volume flow at the outflow in case of non-cyclic lateral 60 !-- boundary conditions 61 IF ( conserve_volume_flow .AND. bc_ns == 'radiation/dirichlet') THEN 62 63 volume_flow(2) = 0.0 64 volume_flow_l(2) = 0.0 65 66 IF ( nyn == ny ) THEN 67 j = ny+1 68 DO i = nxl, nxr 69 ! 70 !-- Sum up the volume flow through the north boundary 71 DO k = nzb_2d(j,i) + 1, nzt 72 volume_flow_l(2) = volume_flow_l(2) + v(k,j,i) * dzu(k) 73 ENDDO 74 ENDDO 75 ENDIF 76 #if defined( __parallel ) 77 CALL MPI_ALLREDUCE( volume_flow_l(2), volume_flow(2), 1, MPI_REAL, & 78 MPI_SUM, comm1dx, ierr ) 79 #else 80 volume_flow = volume_flow_l 81 #endif 82 volume_flow_offset(2) = ( volume_flow_initial(2) - volume_flow(2) ) & 83 / volume_flow_area(2) 84 85 IF ( outflow_n ) THEN 86 j = nyn+1 87 DO i = nxl, nxr 88 DO k = nzb_v_inner(j,i) + 1, nzt 89 v(k,j,i) = v(k,j,i) + volume_flow_offset(2) 90 ENDDO 91 ENDDO 92 ENDIF 93 94 CALL exchange_horiz( v ) 95 96 ENDIF 97 56 98 57 99 ! … … 322 364 ! 323 365 !-- Exchange boundaries for p 324 CALL exchange_horiz( tend , 0, 0)366 CALL exchange_horiz( tend ) 325 367 326 368 ELSEIF ( psolver == 'sor' ) THEN … … 365 407 !-- Correction of the provisional velocities with the current perturbation 366 408 !-- pressure just computed 367 IF ( bc_lr /= 'cyclic' .OR. bc_ns /= 'cyclic' ) uvmean_outflow_l = 0.0368 IF ( conserve_volume_flow) THEN409 IF ( conserve_volume_flow .AND. & 410 ( bc_lr == 'cyclic' .OR. bc_ns == 'cyclic' ) ) THEN 369 411 volume_flow_l(1) = 0.0 370 412 volume_flow_l(2) = 0.0 … … 393 435 394 436 ! 395 !-- Sum up the horizontal velocity along the outflow plane (in case396 !-- of non-cyclic boundary conditions). The respective mean velocity397 !-- is calculated from this in routine boundary_conds.398 ! IF ( outflow_l .AND. i == nxl ) THEN399 ! !$OMP CRITICAL400 ! DO k = nzb, nzt+1401 ! uvmean_outflow_l(k) = uvmean_outflow_l(k) + v(k,j,nxl)402 ! ENDDO403 ! !$OMP END CRITICAL404 ! ELSEIF ( outflow_r .AND. i == nxr ) THEN405 ! !$OMP CRITICAL406 ! DO k = nzb, nzt+1407 ! uvmean_outflow_l(k) = uvmean_outflow_l(k) + v(k,j,nxr)408 ! ENDDO409 ! !$OMP END CRITICAL410 ! ELSEIF ( outflow_s .AND. j == nys ) THEN411 ! !$OMP CRITICAL412 ! DO k = nzb, nzt+1413 ! uvmean_outflow_l(k) = uvmean_outflow_l(k) + u(k,nys,i)414 ! ENDDO415 ! !$OMP END CRITICAL416 ! ELSEIF ( outflow_n .AND. j == nyn ) THEN417 ! !$OMP CRITICAL418 ! DO k = nzb, nzt+1419 ! uvmean_outflow_l(k) = uvmean_outflow_l(k) + u(k,nyn,i)420 ! ENDDO421 ! !$OMP END CRITICAL422 ! ENDIF423 424 !425 437 !-- Sum up the volume flow through the right and north boundary 426 IF ( conserve_volume_flow .AND. i == nx ) THEN 438 IF ( conserve_volume_flow .AND. bc_lr == 'cyclic' .AND. & 439 i == nx ) THEN 427 440 !$OMP CRITICAL 428 441 DO k = nzb_2d(j,i) + 1, nzt … … 431 444 !$OMP END CRITICAL 432 445 ENDIF 433 IF ( conserve_volume_flow .AND. j == ny ) THEN 446 IF ( conserve_volume_flow .AND. bc_ns == 'cyclic' .AND. & 447 j == ny ) THEN 434 448 !$OMP CRITICAL 435 449 DO k = nzb_2d(j,i) + 1, nzt … … 445 459 ! 446 460 !-- Conserve the volume flow 447 IF ( conserve_volume_flow ) THEN 461 IF ( conserve_volume_flow .AND. & 462 ( bc_lr == 'cyclic' .OR. bc_ns == 'cyclic' ) ) THEN 448 463 449 464 #if defined( __parallel ) … … 461 476 DO i = nxl, nxr 462 477 DO j = nys, nyn 463 DO k = nzb_u_inner(j,i) + 1, nzt 464 u(k,j,i) = u(k,j,i) + volume_flow_offset(1) 465 ENDDO 466 DO k = nzb_v_inner(j,i) + 1, nzt 467 v(k,j,i) = v(k,j,i) + volume_flow_offset(2) 468 ENDDO 478 IF ( bc_lr == 'cyclic' ) THEN 479 DO k = nzb_u_inner(j,i) + 1, nzt 480 u(k,j,i) = u(k,j,i) + volume_flow_offset(1) 481 ENDDO 482 ENDIF 483 IF ( bc_ns == 'cyclic' ) THEN 484 DO k = nzb_v_inner(j,i) + 1, nzt 485 v(k,j,i) = v(k,j,i) + volume_flow_offset(2) 486 ENDDO 487 ENDIF 469 488 ENDDO 470 489 ENDDO … … 475 494 ! 476 495 !-- Exchange of boundaries for the velocities 477 CALL exchange_horiz( u , uxrp, 0)478 CALL exchange_horiz( v , 0, vynp)479 CALL exchange_horiz( w , 0, 0)496 CALL exchange_horiz( u ) 497 CALL exchange_horiz( v ) 498 CALL exchange_horiz( w ) 480 499 481 500 ! -
palm/trunk/SOURCE/production_e.f90
r73 r75 5 5 ! ----------------- 6 6 ! Wall functions now include diabatic conditions, call of routine wall_fluxes_e, 7 ! reference temperature pt_reference can be used in buoyancy term 7 ! reference temperature pt_reference can be used in buoyancy term, 8 ! moisture renamed humidity 8 9 ! 9 10 ! Former revisions: … … 358 359 ! 359 360 !-- Calculate TKE production by buoyancy 360 IF ( .NOT. moisture) THEN361 IF ( .NOT. humidity ) THEN 361 362 362 363 IF ( use_pt_reference ) THEN … … 756 757 ! 757 758 !-- Calculate TKE production by buoyancy 758 IF ( .NOT. moisture) THEN759 IF ( .NOT. humidity ) THEN 759 760 760 761 IF ( use_pt_reference ) THEN -
palm/trunk/SOURCE/prognostic_equations.f90
r73 r75 5 5 ! ----------------- 6 6 ! checking for negative q and limiting for positive values, 7 ! z0 removed from arguments in calls of diffusion_u/v/w, 8 ! subroutine names changed to .._noopt, .._cache, and .._vector 7 ! z0 removed from arguments in calls of diffusion_u/v/w, uxrp, vynp eliminated, 8 ! subroutine names changed to .._noopt, .._cache, and .._vector, 9 ! moisture renamed humidity 9 10 ! 10 11 ! Former revisions: … … 102 103 !-- global communication 103 104 CALL calc_mean_pt_profile( pt, 4 ) 104 IF ( moisture) CALL calc_mean_pt_profile( vpt, 44 )105 IF ( humidity ) CALL calc_mean_pt_profile( vpt, 44 ) 105 106 106 107 ! … … 117 118 ! 118 119 !-- u-tendency terms with no communication 119 DO i = nxl, nxr +uxrp120 DO i = nxl, nxr 120 121 DO j = nys, nyn 121 122 ! … … 186 187 !-- v-tendency terms with no communication 187 188 DO i = nxl, nxr 188 DO j = nys, nyn +vynp189 DO j = nys, nyn 189 190 ! 190 191 !-- Tendency terms … … 273 274 ENDIF 274 275 CALL coriolis( i, j, 3 ) 275 IF ( .NOT. moisture) THEN276 IF ( .NOT. humidity ) THEN 276 277 CALL buoyancy( i, j, pt, 3, 4 ) 277 278 ELSE … … 410 411 ! 411 412 !-- If required, compute prognostic equation for total water content / scalar 412 IF ( moisture.OR. passive_scalar ) THEN413 IF ( humidity .OR. passive_scalar ) THEN 413 414 414 415 CALL cpu_log( log_point(29), 'q/s-equation', 'start' ) … … 550 551 IF ( scalar_advec == 'bc-scheme' .AND. & 551 552 .NOT. use_upstream_for_tke ) THEN 552 IF ( .NOT. moisture) THEN553 IF ( .NOT. humidity ) THEN 553 554 CALL diffusion_e( i, j, ddzu, dd2zu, ddzw, diss, e, km, & 554 555 l_grid, pt, rif, tend, zu ) … … 575 576 IF ( tsc(2) == 2.0 .AND. timestep_scheme(1:8) == 'leapfrog' )& 576 577 THEN 577 IF ( .NOT. moisture) THEN578 IF ( .NOT. humidity ) THEN 578 579 CALL diffusion_e( i, j, ddzu, dd2zu, ddzw, diss, e_m, & 579 580 km_m, l_grid, pt_m, rif_m, tend, zu ) … … 583 584 ENDIF 584 585 ELSE 585 IF ( .NOT. moisture) THEN586 IF ( .NOT. humidity ) THEN 586 587 CALL diffusion_e( i, j, ddzu, dd2zu, ddzw, diss, e, km, & 587 588 l_grid, pt, rif, tend, zu ) … … 661 662 !-- global communication 662 663 CALL calc_mean_pt_profile( pt, 4 ) 663 IF ( moisture) CALL calc_mean_pt_profile( vpt, 44 )664 IF ( humidity ) CALL calc_mean_pt_profile( vpt, 44 ) 664 665 IF ( .NOT. constant_diffusion ) CALL production_e_init 665 666 … … 669 670 !$OMP PARALLEL private (i,j,k) 670 671 !$OMP DO 671 DO i = nxl, nxr +uxrp ! Additional levels for non cyclic boundary672 DO j = nys, nyn +vynp ! conditions are included672 DO i = nxl, nxr 673 DO j = nys, nyn 673 674 ! 674 675 !-- Tendency terms for u-velocity component … … 789 790 ENDIF 790 791 CALL coriolis( i, j, 3 ) 791 IF ( .NOT. moisture) THEN792 IF ( .NOT. humidity ) THEN 792 793 CALL buoyancy( i, j, pt, 3, 4 ) 793 794 ELSE … … 881 882 !-- If required, compute prognostic equation for total water content / 882 883 !-- scalar 883 IF ( moisture.OR. passive_scalar ) THEN884 IF ( humidity .OR. passive_scalar ) THEN 884 885 885 886 ! … … 954 955 IF ( tsc(2) == 2.0 .AND. timestep_scheme(1:8) == 'leapfrog' )& 955 956 THEN 956 IF ( .NOT. moisture) THEN957 IF ( .NOT. humidity ) THEN 957 958 CALL diffusion_e( i, j, ddzu, dd2zu, ddzw, diss, e_m, & 958 959 km_m, l_grid, pt_m, rif_m, tend, zu ) … … 962 963 ENDIF 963 964 ELSE 964 IF ( .NOT. moisture) THEN965 IF ( .NOT. humidity ) THEN 965 966 CALL diffusion_e( i, j, ddzu, dd2zu, ddzw, diss, e, km, & 966 967 l_grid, pt, rif, tend, zu ) … … 1032 1033 !-- global communication 1033 1034 CALL calc_mean_pt_profile( pt, 4 ) 1034 IF ( moisture) CALL calc_mean_pt_profile( vpt, 44 )1035 IF ( humidity ) CALL calc_mean_pt_profile( vpt, 44 ) 1035 1036 1036 1037 ! … … 1068 1069 ! 1069 1070 !-- Prognostic equation for u-velocity component 1070 DO i = nxl, nxr +uxrp1071 DO i = nxl, nxr 1071 1072 DO j = nys, nyn 1072 1073 DO k = nzb_u_inner(j,i)+1, nzt … … 1085 1086 IF ( timestep_scheme(1:5) == 'runge' ) THEN 1086 1087 IF ( intermediate_timestep_count == 1 ) THEN 1087 DO i = nxl, nxr +uxrp1088 DO i = nxl, nxr 1088 1089 DO j = nys, nyn 1089 1090 DO k = nzb_u_inner(j,i)+1, nzt … … 1094 1095 ELSEIF ( intermediate_timestep_count < & 1095 1096 intermediate_timestep_count_max ) THEN 1096 DO i = nxl, nxr +uxrp1097 DO i = nxl, nxr 1097 1098 DO j = nys, nyn 1098 1099 DO k = nzb_u_inner(j,i)+1, nzt … … 1140 1141 !-- Prognostic equation for v-velocity component 1141 1142 DO i = nxl, nxr 1142 DO j = nys, nyn +vynp1143 DO j = nys, nyn 1143 1144 DO k = nzb_v_inner(j,i)+1, nzt 1144 1145 v_p(k,j,i) = ( 1.0-tsc(1) ) * v_m(k,j,i) + tsc(1) * v(k,j,i) + & … … 1157 1158 IF ( intermediate_timestep_count == 1 ) THEN 1158 1159 DO i = nxl, nxr 1159 DO j = nys, nyn +vynp1160 DO j = nys, nyn 1160 1161 DO k = nzb_v_inner(j,i)+1, nzt 1161 1162 tv_m(k,j,i) = tend(k,j,i) … … 1166 1167 intermediate_timestep_count_max ) THEN 1167 1168 DO i = nxl, nxr 1168 DO j = nys, nyn +vynp1169 DO j = nys, nyn 1169 1170 DO k = nzb_v_inner(j,i)+1, nzt 1170 1171 tv_m(k,j,i) = -9.5625 * tend(k,j,i) + 5.3125 * tv_m(k,j,i) … … 1206 1207 ENDIF 1207 1208 CALL coriolis( 3 ) 1208 IF ( .NOT. moisture) THEN1209 IF ( .NOT. humidity ) THEN 1209 1210 CALL buoyancy( pt, 3, 4 ) 1210 1211 ELSE … … 1355 1356 ! 1356 1357 !-- If required, compute prognostic equation for total water content / scalar 1357 IF ( moisture.OR. passive_scalar ) THEN1358 IF ( humidity .OR. passive_scalar ) THEN 1358 1359 1359 1360 CALL cpu_log( log_point(29), 'q/s-equation', 'start' ) … … 1493 1494 IF ( scalar_advec == 'bc-scheme' .AND. .NOT. use_upstream_for_tke ) & 1494 1495 THEN 1495 IF ( .NOT. moisture) THEN1496 IF ( .NOT. humidity ) THEN 1496 1497 CALL diffusion_e( ddzu, dd2zu, ddzw, diss, e, km, l_grid, pt, & 1497 1498 rif, tend, zu ) … … 1516 1517 ENDIF 1517 1518 IF ( tsc(2) == 2.0 .AND. timestep_scheme(1:8) == 'leapfrog' ) THEN 1518 IF ( .NOT. moisture) THEN1519 IF ( .NOT. humidity ) THEN 1519 1520 CALL diffusion_e( ddzu, dd2zu, ddzw, diss, e_m, km_m, l_grid, & 1520 1521 pt_m, rif_m, tend, zu ) … … 1524 1525 ENDIF 1525 1526 ELSE 1526 IF ( .NOT. moisture) THEN1527 IF ( .NOT. humidity ) THEN 1527 1528 CALL diffusion_e( ddzu, dd2zu, ddzw, diss, e, km, l_grid, pt, & 1528 1529 rif, tend, zu ) -
palm/trunk/SOURCE/read_var_list.f90
r63 r75 4 4 ! Actual revisions: 5 5 ! ----------------- 6 ! +loop_optimization, pt_reference 6 ! +loop_optimization, pt_reference, moisture renamed humidity 7 7 ! 8 8 ! Former revisions: … … 212 212 CASE ( 'mixing_length_1d' ) 213 213 READ ( 13 ) mixing_length_1d 214 CASE ( ' moisture' )215 READ ( 13 ) moisture214 CASE ( 'humidity' ) 215 READ ( 13 ) humidity 216 216 CASE ( 'momentum_advec' ) 217 217 READ ( 13 ) momentum_advec -
palm/trunk/SOURCE/sor.f90
r4 r75 4 4 ! Actual revisions: 5 5 ! ----------------- 6 ! 6 ! 2nd+3rd argument removed from exchange horiz 7 7 ! 8 8 ! Former revisions: … … 98 98 ! 99 99 !-- Exchange of boundary values for p. 100 CALL exchange_horiz( p , 0, 0)100 CALL exchange_horiz( p ) 101 101 102 102 ! … … 143 143 ! 144 144 !-- Exchange of boundary values for p. 145 CALL exchange_horiz( p , 0, 0)145 CALL exchange_horiz( p ) 146 146 147 147 ! -
palm/trunk/SOURCE/swap_timelevel.f90
r39 r75 4 4 ! Actual revisions: 5 5 ! ----------------- 6 ! 6 ! moisture renamed humidity 7 7 ! 8 8 ! Former revisions: … … 56 56 e_m => e_1; e => e_2; e_p => e_3 57 57 ENDIF 58 IF ( moisture.OR. passive_scalar ) THEN58 IF ( humidity .OR. passive_scalar ) THEN 59 59 q_m => q_1; q => q_2; q_p => q_3 60 60 ENDIF … … 69 69 e_m => e_2; e => e_3; e_p => e_1 70 70 ENDIF 71 IF ( moisture.OR. passive_scalar ) THEN71 IF ( humidity .OR. passive_scalar ) THEN 72 72 q_m => q_2; q => q_3; q_p => q_1 73 73 ENDIF … … 82 82 e_m => e_3; e => e_1; e_p => e_2 83 83 ENDIF 84 IF ( moisture.OR. passive_scalar ) THEN84 IF ( humidity .OR. passive_scalar ) THEN 85 85 q_m => q_3; q => q_1; q_p => q_2 86 86 ENDIF … … 105 105 e => e_1; e_p => e_2 106 106 ENDIF 107 IF ( moisture.OR. passive_scalar ) THEN107 IF ( humidity .OR. passive_scalar ) THEN 108 108 q => q_1; q_p => q_2 109 109 ENDIF … … 119 119 vsws_m => vsws_1; vsws => vsws_2 120 120 shf_m => shf_1; shf => shf_2 121 IF ( moisture.OR. passive_scalar ) THEN121 IF ( humidity .OR. passive_scalar ) THEN 122 122 qsws_m => qsws_1; qsws => qsws_2 123 123 ENDIF … … 128 128 IF ( use_top_fluxes ) THEN 129 129 tswst_m => tswst_1; tswst => tswst_2 130 IF ( moisture.OR. passive_scalar ) THEN130 IF ( humidity .OR. passive_scalar ) THEN 131 131 qswst_m => qswst_1; qswst => qswst_2 132 132 ENDIF … … 134 134 ENDIF 135 135 136 IF ( moisture) THEN136 IF ( humidity ) THEN 137 137 vpt_m => vpt_1; vpt => vpt_2 138 138 ENDIF … … 151 151 e => e_2; e_p => e_1 152 152 ENDIF 153 IF ( moisture.OR. passive_scalar ) THEN153 IF ( humidity .OR. passive_scalar ) THEN 154 154 q => q_2; q_p => q_1 155 155 ENDIF … … 164 164 vsws_m => vsws_2; vsws => vsws_1 165 165 shf_m => shf_2; shf => shf_1 166 IF ( moisture.OR. passive_scalar ) THEN166 IF ( humidity .OR. passive_scalar ) THEN 167 167 qsws_m => qsws_2; qsws => qsws_1 168 168 ENDIF … … 173 173 IF ( use_top_fluxes ) THEN 174 174 tswst_m => tswst_2; tswst => tswst_1 175 IF ( moisture.OR. passive_scalar ) THEN175 IF ( humidity .OR. passive_scalar ) THEN 176 176 qswst_m => qswst_2; qswst => qswst_1 177 177 ENDIF … … 179 179 ENDIF 180 180 181 IF ( moisture) THEN181 IF ( humidity ) THEN 182 182 vpt_m => vpt_2; vpt => vpt_1 183 183 ENDIF -
palm/trunk/SOURCE/time_integration.f90
r73 r75 7 7 ! and counters, 8 8 ! calls of prognostic_equations_.. changed to .._noopt, .._cache, and 9 ! .._vector, these calls are now controlled by switch loop_optimization 9 ! .._vector, these calls are now controlled by switch loop_optimization, 10 ! uxrp, vynp eliminated, 2nd+3rd argument removed from exchange horiz, 11 ! moisture renamed humidity 10 12 ! 11 13 ! Former revisions: … … 136 138 !-- Exchange of ghost points (lateral boundary conditions) 137 139 CALL cpu_log( log_point(26), 'exchange-horiz-progn', 'start' ) 138 CALL exchange_horiz( u_p , uxrp, 0)139 CALL exchange_horiz( v_p , 0, vynp)140 CALL exchange_horiz( w_p , 0, 0)141 CALL exchange_horiz( pt_p , 0, 0)142 IF ( .NOT. constant_diffusion ) CALL exchange_horiz( e_p , 0, 0)143 IF ( moisture .OR. passive_scalar ) CALL exchange_horiz( q_p, 0, 0)140 CALL exchange_horiz( u_p ) 141 CALL exchange_horiz( v_p ) 142 CALL exchange_horiz( w_p ) 143 CALL exchange_horiz( pt_p ) 144 IF ( .NOT. constant_diffusion ) CALL exchange_horiz( e_p ) 145 IF ( humidity .OR. passive_scalar ) CALL exchange_horiz( q_p ) 144 146 IF ( cloud_droplets ) THEN 145 CALL exchange_horiz( ql , 0, 0)146 CALL exchange_horiz( ql_c , 0, 0)147 CALL exchange_horiz( ql_v , 0, 0)148 CALL exchange_horiz( ql_vp , 0, 0)147 CALL exchange_horiz( ql ) 148 CALL exchange_horiz( ql_c ) 149 CALL exchange_horiz( ql_v ) 150 CALL exchange_horiz( ql_vp ) 149 151 ENDIF 150 152 … … 182 184 IF ( time_disturb >= dt_disturb ) THEN 183 185 IF ( hom(nzb+5,1,var_hom,0) < disturbance_energy_limit ) THEN 184 CALL disturb_field( nzb_u_inner, tend, u , uxrp, 0)185 CALL disturb_field( nzb_v_inner, tend, v , 0, vynp)186 CALL disturb_field( nzb_u_inner, tend, u ) 187 CALL disturb_field( nzb_v_inner, tend, v ) 186 188 ELSEIF ( bc_lr /= 'cyclic' .OR. bc_ns /= 'cyclic' ) THEN 187 189 ! … … 189 191 !-- near the inflow throughout the whole simulation 190 192 dist_range = 1 191 CALL disturb_field( nzb_u_inner, tend, u , uxrp, 0)192 CALL disturb_field( nzb_v_inner, tend, v , 0, vynp)193 CALL disturb_field( nzb_u_inner, tend, u ) 194 CALL disturb_field( nzb_v_inner, tend, v ) 193 195 dist_range = 0 194 196 ENDIF … … 208 210 !-- In case of a non-cyclic lateral wall, set the boundary conditions for 209 211 !-- the velocities at the outflow 210 IF ( bc_lr /= 'cyclic' .OR. bc_ns /= 'cyclic' ) THEN211 CALL boundary_conds( 'outflow_uvw' )212 ENDIF212 ! IF ( bc_lr /= 'cyclic' .OR. bc_ns /= 'cyclic' ) THEN 213 ! CALL boundary_conds( 'outflow_uvw' ) 214 ! ENDIF 213 215 214 216 ! 215 217 !-- If required, compute virtuell potential temperature 216 IF ( moisture) CALL compute_vpt218 IF ( humidity ) CALL compute_vpt 217 219 218 220 ! … … 235 237 !-- Compute the diffusion coefficients 236 238 CALL cpu_log( log_point(17), 'diffusivities', 'start' ) 237 IF ( .NOT. moisture) THEN239 IF ( .NOT. humidity ) THEN 238 240 CALL diffusivities( pt ) 239 241 ELSE -
palm/trunk/SOURCE/wall_fluxes.f90
r60 r75 37 37 ! Call for all grid points 38 38 !------------------------------------------------------------------------------! 39 SUBROUTINE wall_fluxes( wall_flux, a, b, c1, c2, ixp, jyp,nzb_uvw_inner, &39 SUBROUTINE wall_fluxes( wall_flux, a, b, c1, c2, nzb_uvw_inner, & 40 40 nzb_uvw_outer, wall ) 41 41 … … 48 48 IMPLICIT NONE 49 49 50 INTEGER :: i, ixp, j, jyp, k, wall_index50 INTEGER :: i, j, k, wall_index 51 51 52 52 INTEGER, DIMENSION(nys-1:nyn+1,nxl-1:nxr+1) :: nzb_uvw_inner, & … … 55 55 REAL :: pts, pt_i, rifs, u_i, v_i, us_wall, vel_total, ws, wspts 56 56 57 REAL, DIMENSION(nys-1:nyn+1,nxl-1:nxr+1) 58 REAL, DIMENSION(nzb:nzt+1,nys:nyn +jyp,nxl:nxr+ixp) :: wall_flux57 REAL, DIMENSION(nys-1:nyn+1,nxl-1:nxr+1) :: wall 58 REAL, DIMENSION(nzb:nzt+1,nys:nyn,nxl:nxr) :: wall_flux 59 59 60 60 … … 63 63 wall_index = NINT( a+ 2*b + 3*c1 + 4*c2 ) 64 64 65 DO i = nxl, nxr +ixp66 DO j = nys, nyn +jyp65 DO i = nxl, nxr 66 DO j = nys, nyn 67 67 68 68 IF ( wall(j,i) /= 0.0 ) THEN -
palm/trunk/SOURCE/write_3d_binary.f90
r73 r75 5 5 ! ----------------- 6 6 ! +precipitation_amount, precipitation_rate_av, rif_wall, u_m_l, u_m_r, etc., 7 ! z0_av 7 ! z0_av, moisture renamed humidity 8 8 ! 9 9 ! Former revisions: … … 107 107 ENDIF 108 108 WRITE ( 14 ) 'pt_m '; WRITE ( 14 ) pt_m 109 IF ( moisture.OR. passive_scalar ) THEN109 IF ( humidity .OR. passive_scalar ) THEN 110 110 WRITE ( 14 ) 'q '; WRITE ( 14 ) q 111 111 IF ( ALLOCATED( q_av ) ) THEN … … 209 209 WRITE ( 14 ) 'v_m_s '; WRITE ( 14 ) v_m_s 210 210 ENDIF 211 IF ( moisture) THEN211 IF ( humidity ) THEN 212 212 WRITE ( 14 ) 'vpt '; WRITE ( 14 ) vpt 213 213 IF ( ALLOCATED( vpt_av ) ) THEN -
palm/trunk/SOURCE/write_var_list.f90
r63 r75 4 4 ! Actual revisions: 5 5 ! ----------------- 6 ! +loop_optimization, pt_refrence 6 ! +loop_optimization, pt_refrence, moisture renamed humidity 7 7 ! 8 8 ! Former revisions: … … 178 178 WRITE ( 14 ) 'mixing_length_1d ' 179 179 WRITE ( 14 ) mixing_length_1d 180 WRITE ( 14 ) ' moisture'181 WRITE ( 14 ) moisture180 WRITE ( 14 ) 'humidity ' 181 WRITE ( 14 ) humidity 182 182 WRITE ( 14 ) 'momentum_advec ' 183 183 WRITE ( 14 ) momentum_advec
Note: See TracChangeset
for help on using the changeset viewer.