SUBROUTINE init_pt_anomaly !------------------------------------------------------------------------------! ! Current revisions: ! ----------------- ! ! Modification of the amplitude to obtain a visible temperature perturbation. ! ! Former revisions: ! ----------------- ! $Id: init_pt_anomaly.f90 861 2012-03-26 14:18:34Z suehring $ ! ! 667 2010-12-23 12:06:00Z suehring/gryschka ! Call of exchange_horiz are modified. ! ! 75 2007-03-22 09:54:05Z raasch ! 2nd+3rd argument removed from exchange horiz ! ! 19 2007-02-23 04:53:48Z raasch ! Calculation extended for gridpoint nzt ! ! RCS Log replace by Id keyword, revision history cleaned up ! ! Revision 1.7 2005/03/26 20:36:55 raasch ! Arguments for non-cyclic boundary conditions added to argument list of ! routine exchange_horiz ! ! Revision 1.1 1997/08/29 08:58:56 raasch ! Initial revision ! ! ! Description: ! ------------ ! Impose a temperature perturbation for an advection test. !------------------------------------------------------------------------------! USE arrays_3d USE constants USE grid_variables USE indices USE control_parameters IMPLICIT NONE INTEGER :: i, ic, j, jc, k, kc REAL :: betrag, radius, rc, x, y, z ! !-- Defaults: radius rc, strength z, !-- position of centre: ic, jc, kc rc = 10.0 * dx ic = ( nx+1 ) / 2 jc = ic kc = nzt / 2 ! !-- Compute the perturbation. DO i = nxl, nxr DO j = nys, nyn DO k = nzb+1, nzt x = ( i - ic ) * dx y = ( j - jc ) * dy z = ABS( zu(k) - zu(kc) ) radius = SQRT( x**2 + y**2 + z**2 ) IF ( radius <= rc ) THEN betrag = 5.0 * EXP( -( radius * 0.001 / 2.0 )**2 ) ELSE betrag = 0.0 ENDIF pt(k,j,i) = pt(k,j,i) + betrag ENDDO ENDDO ENDDO ! !-- Exchange of boundary values for temperature CALL exchange_horiz( pt, nbgp ) END SUBROUTINE init_pt_anomaly