Changeset 150 for palm

Ignore:
Timestamp:
Feb 29, 2008 8:19:58 AM (16 years ago)
Message:

particle advection allowed for ocean runs

Location:
palm/trunk/SOURCE
Files:
6 edited

Unmodified
Removed
• palm/trunk/SOURCE/CURRENT_MODIFICATIONS

 r139 ! Actual revisions: ! ----------------- ! ! Bottom boundary condition and vertical index calculations adjusted for ! ocean runs. ! TEST: PRINT statements on unit 9 (commented out) ! i = particles(n)%x * ddx j = particles(n)%y * ddy k = ( particles(n)%z + 0.5 * dz ) / dz  ! only exact if equidistant k = ( particles(n)%z + 0.5 * dz * atmos_ocean_sign ) / dz  & + offset_ocean_nzt                     ! only exact if equidistant x  = particles(n)%x - i * dx i = ( particles(n)%x + 0.5 * dx ) * ddx j = ( particles(n)%y + 0.5 * dy ) * ddy k = particles(n)%z / dz + 1  ! only exact if equidistant k = particles(n)%z / dz + 1 + offset_ocean_nzt_m1 ! only exact if equidistant ql_c(k,j,i) = ql_c(k,j,i) + particles(n)%weight_factor *            & i = ( particles(n)%x + 0.5 * dx ) * ddx j =   particles(n)%y * ddy k = ( particles(n)%z + 0.5 * dz ) / dz  ! only exact if equidistant k = ( particles(n)%z + 0.5 * dz * atmos_ocean_sign ) / dz  & + offset_ocean_nzt                     ! only exact if equidistant ! IF ( vertical_particle_advection )  THEN j = particles(n)%y * ddy k = particles(n)%z / dz k = particles(n)%z / dz + offset_ocean_nzt_m1 x  = particles(n)%x - i * dx i = particles(n)%x * ddx j = particles(n)%y * ddy k = ( particles(n)%z + 0.5 * dz ) / dz  ! only exact if eq.dist k = ( particles(n)%z + 0.5 * dz * atmos_ocean_sign ) / dz  & + offset_ocean_nzt                      ! only exact if eq.dist IF ( topography == 'flat' )  THEN ENDIF ENDIF IF ( particles(n)%z < 0.0  .AND.  particle_mask(n) )  THEN IF ( particles(n)%z < zw(0)  .AND.  particle_mask(n) )  THEN IF ( ibc_par_b == 1 )  THEN ! ! !--             Particle reflection particles(n)%z       = -particles(n)%z particles(n)%z       = 2.0 * zw(0) - particles(n)%z particles(n)%speed_z = -particles(n)%speed_z IF ( use_sgs_for_particles  .AND. & ENDIF IF ( use_particle_tails  .AND.  nn /= 0 )  THEN particle_tail_coordinates(1,3,nn) = & -particle_tail_coordinates(1,3,nn) particle_tail_coordinates(1,3,nn) = 2.0 * zw(0) - & particle_tail_coordinates(1,3,nn) ENDIF ENDIF i = ( particles(n)%x + 0.5 * dx ) * ddx j = ( particles(n)%y + 0.5 * dy ) * ddy k = particles(n)%z / dz + 1  ! only exact if equidistant k = particles(n)%z / dz + 1 + offset_ocean_nzt_m1 ! only exact if equidistant prt_count(k,j,i) = prt_count(k,j,i) + 1 i = ( particles(n)%x + 0.5 * dx ) * ddx j = ( particles(n)%y + 0.5 * dy ) * ddy k = particles(n)%z / dz + 1  ! only exact if equidistant k = particles(n)%z / dz + 1 + offset_ocean_nzt_m1 ! only exact if equidistant particles_temp(prt_start_index(k,j,i)) = particles(n)
• palm/trunk/SOURCE/init_particles.f90

 r139 ! Actual revisions: ! ----------------- ! ! Set offset_ocean_* needed for calculating vertical indices within ocean runs ! ! Former revisions: CALL MPI_TYPE_COMMIT( mpi_particle_type, ierr ) #endif ! !-- In case of oceans runs, the vertical index calculations need an offset, !-- because otherwise the k indices will become negative IF ( ocean )  THEN offset_ocean_nzt    = nzt offset_ocean_nzt_m1 = nzt - 1 ENDIF !
• palm/trunk/SOURCE/modules.f90

 r147 ! ----------------- ! +hor_index_bounds, hor_index_bounds_previous_run, numprocs_previous_run, ! nx_on_file, ny_on_file ! nx_on_file, ny_on_file, offset_ocean_* ! -myid_char_14 ! number_of_initial_particles = 0, number_of_particles = 0,      & number_of_particle_groups = 1, number_of_tails = 0,            & number_of_initial_tails = 0, particles_per_point = 1,          & number_of_initial_tails = 0, offset_ocean_nzt = 0,             & offset_ocean_nzt_m1 = 0, particles_per_point = 1,              & particle_file_count = 0, skip_particles_for_tail = 100,        & total_number_of_particles, total_number_of_tails = 0
• palm/trunk/SOURCE/particle_boundary_conds.f90

 r61 ! Actual revisions: ! ----------------- ! ! Vertical index calculations adjusted for ocean runs. ! ! Former revisions: !        reflection conditions is basically the same for all four cases, so it !        should be possible to further simplify/shorten it. ! THIS ROUTINE HAS NOT BEEN TESTED FOR OCEAN RUNS SO FAR! (see offset_ocean_*) !------------------------------------------------------------------------------! i2 = ( particles(n)%x + 0.5 * dx ) * ddx j2 = ( particles(n)%y + 0.5 * dy ) * ddy k2 = particles(n)%z / dz + 1 k2 = particles(n)%z / dz + 1 + offset_ocean_nzt_m1 prt_x = particles(n)%x i1 = ( pos_x_old + 0.5 * dx ) * ddx j1 = ( pos_y_old + 0.5 * dy ) * ddy k1 = pos_z_old / dz k1 = pos_z_old / dz + offset_ocean_nzt_m1 ! i3 = ( pos_x + 0.5 * dx ) * ddx j3 = ( pos_y + 0.5 * dy ) * ddy k3 = pos_z / dz k3 = pos_z / dz + offset_ocean_nzt_m1 i5 = pos_x * ddx j5 = pos_y * ddy k5 = pos_z / dz k5 = pos_z / dz + offset_ocean_nzt_m1 IF ( k5 <= nzb_s_inner(j5,i3)  .AND. & i3 = ( pos_x + 0.5 * dx ) * ddx j3 = ( pos_y + 0.5 * dy ) * ddy k3 = pos_z / dz k3 = pos_z / dz + offset_ocean_nzt_m1 i5 = pos_x * ddx j5 = pos_y * ddy k5 = pos_z / dz k5 = pos_z / dz + offset_ocean_nzt_m1 IF ( k5 <= nzb_s_inner(j3,i5)  .AND. & i3 = ( pos_x + 0.5 * dx ) * ddx j3 = ( pos_y + 0.5 * dy ) * ddy k3 =  pos_z / dz k3 = pos_z / dz + offset_ocean_nzt_m1 i5 = pos_x * ddx j5 = pos_y * ddy k5 = pos_z / dz k5 = pos_z / dz + offset_ocean_nzt_m1 IF ( k5 <= nzb_s_inner(j5,i3)  .AND. & i3 = ( pos_x + 0.5 * dx ) * ddx j3 = ( pos_y + 0.5 * dy ) * ddy k3 = pos_z / dz k3 = pos_z / dz + offset_ocean_nzt_m1 i5 = pos_x * ddx j5 = pos_y * ddy k5 = pos_z / dz k5 = pos_z / dz + offset_ocean_nzt_m1 IF ( k3 <= nzb_s_inner(j3,i3)  .AND. &