Changeset 150 for palm/trunk/SOURCE
- Timestamp:
- Feb 29, 2008 8:19:58 AM (17 years ago)
- Location:
- palm/trunk/SOURCE
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/CURRENT_MODIFICATIONS
r148 r150 21 21 'read_data_for_recycling'). 22 22 23 Particle advection adjusted for ocean runs. 24 25 23 26 User-defined spectra. 24 27 25 calc_spectra, check_open, check_parameters, data_output_spectra, init_pegrid, init_3d_model, modules, netcdf, read_var_list, read_3d_binary, user_interface, write_var_list, write_3d_binary28 advec_particles, calc_spectra, check_open, check_parameters, data_output_spectra, init_particles, init_pegrid, init_3d_model, modules, netcdf, particle_boundary_conds, read_var_list, read_3d_binary, user_interface, write_var_list, write_3d_binary 26 29 27 30 … … 63 66 64 67 68 65 69 flow_statistics, local_stop, plant_canopy_model, read_3d_binary, user_interface, write_3d_binary 66 70 -
palm/trunk/SOURCE/advec_particles.f90
r139 r150 4 4 ! Actual revisions: 5 5 ! ----------------- 6 ! 6 ! Bottom boundary condition and vertical index calculations adjusted for 7 ! ocean runs. 7 8 ! TEST: PRINT statements on unit 9 (commented out) 8 9 ! … … 207 208 i = particles(n)%x * ddx 208 209 j = particles(n)%y * ddy 209 k = ( particles(n)%z + 0.5 * dz ) / dz ! only exact if equidistant 210 k = ( particles(n)%z + 0.5 * dz * atmos_ocean_sign ) / dz & 211 + offset_ocean_nzt ! only exact if equidistant 210 212 211 213 x = particles(n)%x - i * dx … … 295 297 i = ( particles(n)%x + 0.5 * dx ) * ddx 296 298 j = ( particles(n)%y + 0.5 * dy ) * ddy 297 k = particles(n)%z / dz + 1 ! only exact if equidistant 299 k = particles(n)%z / dz + 1 + offset_ocean_nzt_m1 300 ! only exact if equidistant 298 301 299 302 ql_c(k,j,i) = ql_c(k,j,i) + particles(n)%weight_factor * & … … 832 835 i = ( particles(n)%x + 0.5 * dx ) * ddx 833 836 j = particles(n)%y * ddy 834 k = ( particles(n)%z + 0.5 * dz ) / dz ! only exact if equidistant 837 k = ( particles(n)%z + 0.5 * dz * atmos_ocean_sign ) / dz & 838 + offset_ocean_nzt ! only exact if equidistant 835 839 836 840 ! … … 889 893 IF ( vertical_particle_advection ) THEN 890 894 j = particles(n)%y * ddy 891 k = particles(n)%z / dz 895 k = particles(n)%z / dz + offset_ocean_nzt_m1 892 896 893 897 x = particles(n)%x - i * dx … … 925 929 i = particles(n)%x * ddx 926 930 j = particles(n)%y * ddy 927 k = ( particles(n)%z + 0.5 * dz ) / dz ! only exact if eq.dist 931 k = ( particles(n)%z + 0.5 * dz * atmos_ocean_sign ) / dz & 932 + offset_ocean_nzt ! only exact if eq.dist 928 933 929 934 IF ( topography == 'flat' ) THEN … … 3117 3122 ENDIF 3118 3123 ENDIF 3119 IF ( particles(n)%z < 0.0.AND. particle_mask(n) ) THEN3124 IF ( particles(n)%z < zw(0) .AND. particle_mask(n) ) THEN 3120 3125 IF ( ibc_par_b == 1 ) THEN 3121 3126 ! … … 3130 3135 ! 3131 3136 !-- Particle reflection 3132 particles(n)%z = -particles(n)%z3137 particles(n)%z = 2.0 * zw(0) - particles(n)%z 3133 3138 particles(n)%speed_z = -particles(n)%speed_z 3134 3139 IF ( use_sgs_for_particles .AND. & … … 3141 3146 ENDIF 3142 3147 IF ( use_particle_tails .AND. nn /= 0 ) THEN 3143 particle_tail_coordinates(1,3,nn) = &3144 -particle_tail_coordinates(1,3,nn)3148 particle_tail_coordinates(1,3,nn) = 2.0 * zw(0) - & 3149 particle_tail_coordinates(1,3,nn) 3145 3150 ENDIF 3146 3151 ENDIF … … 3883 3888 i = ( particles(n)%x + 0.5 * dx ) * ddx 3884 3889 j = ( particles(n)%y + 0.5 * dy ) * ddy 3885 k = particles(n)%z / dz + 1 ! only exact if equidistant 3890 k = particles(n)%z / dz + 1 + offset_ocean_nzt_m1 3891 ! only exact if equidistant 3886 3892 3887 3893 prt_count(k,j,i) = prt_count(k,j,i) + 1 … … 3917 3923 i = ( particles(n)%x + 0.5 * dx ) * ddx 3918 3924 j = ( particles(n)%y + 0.5 * dy ) * ddy 3919 k = particles(n)%z / dz + 1 ! only exact if equidistant 3925 k = particles(n)%z / dz + 1 + offset_ocean_nzt_m1 3926 ! only exact if equidistant 3920 3927 3921 3928 particles_temp(prt_start_index(k,j,i)) = particles(n) -
palm/trunk/SOURCE/init_particles.f90
r139 r150 4 4 ! Actual revisions: 5 5 ! ----------------- 6 ! 6 ! Set offset_ocean_* needed for calculating vertical indices within ocean runs 7 7 ! 8 8 ! Former revisions: … … 79 79 CALL MPI_TYPE_COMMIT( mpi_particle_type, ierr ) 80 80 #endif 81 82 ! 83 !-- In case of oceans runs, the vertical index calculations need an offset, 84 !-- because otherwise the k indices will become negative 85 IF ( ocean ) THEN 86 offset_ocean_nzt = nzt 87 offset_ocean_nzt_m1 = nzt - 1 88 ENDIF 89 81 90 82 91 ! -
palm/trunk/SOURCE/modules.f90
r147 r150 6 6 ! ----------------- 7 7 ! +hor_index_bounds, hor_index_bounds_previous_run, numprocs_previous_run, 8 ! nx_on_file, ny_on_file 8 ! nx_on_file, ny_on_file, offset_ocean_* 9 9 ! -myid_char_14 10 10 ! … … 880 880 number_of_initial_particles = 0, number_of_particles = 0, & 881 881 number_of_particle_groups = 1, number_of_tails = 0, & 882 number_of_initial_tails = 0, particles_per_point = 1, & 882 number_of_initial_tails = 0, offset_ocean_nzt = 0, & 883 offset_ocean_nzt_m1 = 0, particles_per_point = 1, & 883 884 particle_file_count = 0, skip_particles_for_tail = 100, & 884 885 total_number_of_particles, total_number_of_tails = 0 -
palm/trunk/SOURCE/particle_boundary_conds.f90
r61 r150 4 4 ! Actual revisions: 5 5 ! ----------------- 6 ! 6 ! Vertical index calculations adjusted for ocean runs. 7 7 ! 8 8 ! Former revisions: … … 18 18 ! reflection conditions is basically the same for all four cases, so it 19 19 ! should be possible to further simplify/shorten it. 20 ! THIS ROUTINE HAS NOT BEEN TESTED FOR OCEAN RUNS SO FAR! (see offset_ocean_*) 20 21 !------------------------------------------------------------------------------! 21 22 … … 54 55 i2 = ( particles(n)%x + 0.5 * dx ) * ddx 55 56 j2 = ( particles(n)%y + 0.5 * dy ) * ddy 56 k2 = particles(n)%z / dz + 1 57 k2 = particles(n)%z / dz + 1 + offset_ocean_nzt_m1 57 58 58 59 prt_x = particles(n)%x … … 69 70 i1 = ( pos_x_old + 0.5 * dx ) * ddx 70 71 j1 = ( pos_y_old + 0.5 * dy ) * ddy 71 k1 = pos_z_old / dz 72 k1 = pos_z_old / dz + offset_ocean_nzt_m1 72 73 73 74 ! … … 132 133 i3 = ( pos_x + 0.5 * dx ) * ddx 133 134 j3 = ( pos_y + 0.5 * dy ) * ddy 134 k3 = pos_z / dz 135 k3 = pos_z / dz + offset_ocean_nzt_m1 135 136 136 137 i5 = pos_x * ddx 137 138 j5 = pos_y * ddy 138 k5 = pos_z / dz 139 k5 = pos_z / dz + offset_ocean_nzt_m1 139 140 140 141 IF ( k5 <= nzb_s_inner(j5,i3) .AND. & … … 246 247 i3 = ( pos_x + 0.5 * dx ) * ddx 247 248 j3 = ( pos_y + 0.5 * dy ) * ddy 248 k3 = pos_z / dz 249 k3 = pos_z / dz + offset_ocean_nzt_m1 249 250 250 251 i5 = pos_x * ddx 251 252 j5 = pos_y * ddy 252 k5 = pos_z / dz 253 k5 = pos_z / dz + offset_ocean_nzt_m1 253 254 254 255 IF ( k5 <= nzb_s_inner(j3,i5) .AND. & … … 361 362 i3 = ( pos_x + 0.5 * dx ) * ddx 362 363 j3 = ( pos_y + 0.5 * dy ) * ddy 363 k3 = pos_z / dz364 k3 = pos_z / dz + offset_ocean_nzt_m1 364 365 365 366 i5 = pos_x * ddx 366 367 j5 = pos_y * ddy 367 k5 = pos_z / dz 368 k5 = pos_z / dz + offset_ocean_nzt_m1 368 369 369 370 IF ( k5 <= nzb_s_inner(j5,i3) .AND. & … … 476 477 i3 = ( pos_x + 0.5 * dx ) * ddx 477 478 j3 = ( pos_y + 0.5 * dy ) * ddy 478 k3 = pos_z / dz 479 k3 = pos_z / dz + offset_ocean_nzt_m1 479 480 480 481 i5 = pos_x * ddx 481 482 j5 = pos_y * ddy 482 k5 = pos_z / dz 483 k5 = pos_z / dz + offset_ocean_nzt_m1 483 484 484 485 IF ( k3 <= nzb_s_inner(j3,i3) .AND. & -
palm/trunk/SOURCE/read_3d_binary.f90
r147 r150 63 63 CHARACTER (LEN=20) :: field_chr 64 64 65 INTEGER :: files_to_be_opened, i, idum1, j, myid_on_file,&65 INTEGER :: files_to_be_opened, i, j, myid_on_file, & 66 66 numprocs_on_file, nxlc, nxlf, nxlpr, nxl_on_file, nxrc, nxrf, & 67 67 nxrpr, nxr_on_file, nync, nynf, nynpr, nyn_on_file, nysc, &
Note: See TracChangeset
for help on using the changeset viewer.