Changeset 978 for palm/trunk/SOURCE/init_3d_model.f90
 Timestamp:
 Aug 9, 2012 8:28:32 AM (12 years ago)
 Location:
 palm/trunk
 Files:

 3 edited
Legend:
 Unmodified
 Added
 Removed

palm/trunk
 Property svn:mergeinfo changed
/palm/branches/fricke (added) merged: 942944,967968,971972,977
 Property svn:mergeinfo changed

palm/trunk/SOURCE
 Property svn:mergeinfo changed
/palm/branches/fricke/SOURCE (added) merged: 967968,971972,977
 Property svn:mergeinfo changed

palm/trunk/SOURCE/init_3d_model.f90
r850 r978 7 7 ! Current revisions: 8 8 !  9 ! 9 ! outflow damping layer removed 10 ! roughness length for scalar quantites z0h added 11 ! damping zone for the potential temperatur in case of noncyclic lateral 12 ! boundaries added 13 ! initialization of ptdf_x, ptdf_y 14 ! initialization of c_u_m, c_u_m_l, c_v_m, c_v_m_l, c_w_m, c_w_m_l 10 15 ! 11 16 ! Former revisions: … … 164 169 USE control_parameters 165 170 USE cpulog 171 USE grid_variables 166 172 USE indices 167 173 USE interfaces … … 211 217 sums_wsts_bc_l(nzb:nzt+1,0:statistic_regions), & 212 218 ts_value(dots_max,0:statistic_regions) ) 213 ALLOCATE( km_damp_x(nxlg:nxrg), km_damp_y(nysg:nyng) )219 ALLOCATE( ptdf_x(nxlg:nxrg), ptdf_y(nysg:nyng) ) 214 220 215 221 ALLOCATE( rif_1(nysg:nyng,nxlg:nxrg), shf_1(nysg:nyng,nxlg:nxrg), & … … 218 224 uswst_1(nysg:nyng,nxlg:nxrg), & 219 225 vsws_1(nysg:nyng,nxlg:nxrg), & 220 vswst_1(nysg:nyng,nxlg:nxrg), z0(nysg:nyng,nxlg:nxrg) ) 226 vswst_1(nysg:nyng,nxlg:nxrg), z0(nysg:nyng,nxlg:nxrg), & 227 z0h(nysg:nyng,nxlg:nxrg) ) 221 228 222 229 IF ( timestep_scheme(1:5) /= 'runge' ) THEN … … 413 420 c_w(nzb:nzt+1,nxlg:nxrg) ) 414 421 ENDIF 422 IF ( outflow_l .OR. outflow_r .OR. outflow_s .OR. outflow_n ) THEN 423 ALLOCATE( c_u_m_l(nzb:nzt+1), c_v_m_l(nzb:nzt+1), c_w_m_l(nzb:nzt+1) ) 424 ALLOCATE( c_u_m(nzb:nzt+1), c_v_m(nzb:nzt+1), c_w_m(nzb:nzt+1) ) 425 ENDIF 426 415 427 416 428 ! … … 847 859 848 860 z0 = roughness_length 861 z0h = z0h_factor * z0 849 862 850 863 IF ( .NOT. constant_heatflux ) THEN … … 1533 1546 1534 1547 ! 1535 ! Initialize diffusivities used within the outflow damping layer in case of 1536 ! noncyclic lateral boundaries. A linear increase is assumed over the first 1537 ! half of the width of the damping layer 1538 IF ( bc_lr_dirrad ) THEN 1539 1540 DO i = nxlg, nxrg 1541 IF ( i >= nx  outflow_damping_width ) THEN 1542 km_damp_x(i) = km_damp_max * MIN( 1.0, & 1543 ( i  ( nx  outflow_damping_width ) ) / & 1544 REAL( outflow_damping_width/2 ) & 1545 ) 1546 ELSE 1547 km_damp_x(i) = 0.0 1548 ! Initialize damping zone for the potential temperature in case of 1549 ! noncyclic lateral boundaries. The damping zone has the maximum value 1550 ! at the inflow boundary and decreases to zero at pt_damping_width. 1551 ptdf_x = 0.0 1552 ptdf_y = 0.0 1553 IF ( bc_lr_dirrad .OR. bc_lr_dirneu ) THEN 1554 DO i = nxl, nxr 1555 IF ( ( i * dx ) < pt_damping_width ) THEN 1556 ptdf_x(i) = pt_damping_factor * ( SIN( pi * 0.5 * & 1557 REAL( pt_damping_width  i * dx ) / ( & 1558 REAL( pt_damping_width ) ) ) )**2 1548 1559 ENDIF 1549 1560 ENDDO 1550 1551 ELSEIF ( bc_lr_raddir ) THEN 1552 1553 DO i = nxlg, nxrg 1554 IF ( i <= outflow_damping_width ) THEN 1555 km_damp_x(i) = km_damp_max * MIN( 1.0, & 1556 ( outflow_damping_width  i ) / & 1557 REAL( outflow_damping_width/2 ) & 1558 ) 1559 ELSE 1560 km_damp_x(i) = 0.0 1561 ELSEIF ( bc_lr_raddir .OR. bc_lr_neudir ) THEN 1562 DO i = nxl, nxr 1563 IF ( ( i * dx ) > ( nx * dx  pt_damping_width ) ) THEN 1564 ptdf_x(i) = pt_damping_factor * ( SIN( pi * 0.5 * & 1565 REAL( ( i  nx ) * dx + pt_damping_width ) / ( & 1566 REAL( pt_damping_width ) ) ) )**2 1567 ENDIF 1568 ENDDO 1569 ELSEIF ( bc_ns_dirrad .OR. bc_ns_dirneu ) THEN 1570 DO j = nys, nyn 1571 IF ( ( j * dy ) > ( ny * dy  pt_damping_width ) ) THEN 1572 ptdf_y(j) = pt_damping_factor * ( SIN( pi * 0.5 * & 1573 REAL( ( j  ny ) * dy + pt_damping_width ) / ( & 1574 REAL( pt_damping_width ) ) ) )**2 1575 ENDIF 1576 ENDDO 1577 ELSEIF ( bc_ns_raddir .OR. bc_ns_neudir ) THEN 1578 DO j = nys, nyn 1579 IF ( ( j * dy ) < pt_damping_width ) THEN 1580 ptdf_y(j) = pt_damping_factor * ( SIN( pi * 0.5 * & 1581 REAL( pt_damping_width  j * dy ) / ( & 1582 REAL( pt_damping_width ) ) ) )**2 1561 1583 ENDIF 1562 1584 ENDDO 1563 1564 ENDIF1565 1566 IF ( bc_ns_dirrad ) THEN1567 1568 DO j = nysg, nyng1569 IF ( j >= ny  outflow_damping_width ) THEN1570 km_damp_y(j) = km_damp_max * MIN( 1.0, &1571 ( j  ( ny  outflow_damping_width ) ) / &1572 REAL( outflow_damping_width/2 ) &1573 )1574 ELSE1575 km_damp_y(j) = 0.01576 ENDIF1577 ENDDO1578 1579 ELSEIF ( bc_ns_raddir ) THEN1580 1581 DO j = nysg, nyng1582 IF ( j <= outflow_damping_width ) THEN1583 km_damp_y(j) = km_damp_max * MIN( 1.0, &1584 ( outflow_damping_width  j ) / &1585 REAL( outflow_damping_width/2 ) &1586 )1587 ELSE1588 km_damp_y(j) = 0.01589 ENDIF1590 ENDDO1591 1592 1585 ENDIF 1593 1586
Note: See TracChangeset
for help on using the changeset viewer.