Changeset 336 for palm/trunk/SOURCE
- Timestamp:
- Jun 10, 2009 11:19:35 AM (15 years ago)
- Location:
- palm/trunk/SOURCE
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/CURRENT_MODIFICATIONS
r335 r336 78 78 skip_particles_for_tail (init_particles) 79 79 80 Value of vertical_particle_advection may differ for each particle group 81 (advec_particles, header, modules) 82 80 83 First constant in array den also defined as type double. (eqn_state_seawater) 81 84 … … 115 118 on. (time_integration) 116 119 120 Bugfix: qsws was calculated in case of constant heatflux = .FALSE. (prandtl_fluxes) 121 122 Bugfix: averaging along z is not allowed for 2d quantities (e.g. u* and z0) (data_output_2d) 123 117 124 Typographical errors (netcdf) 118 125 … … 122 129 Small bugfix concerning 3d 64bit netcdf output format (header) 123 130 131 Bugfix: dt_fixed removed from the restart file, because otherwise, no change 132 from a fixed to a variable timestep would be possible in restart runs. 133 (read_var_list, write_var_list) 124 134 125 advec_particles, check_parameters, cpu_log, header, init_3d_model, init_particles, modules, netcdf, time_integration135 advec_particles, check_parameters, cpu_log, data_output_2d, header, init_3d_model, init_particles, modules, netcdf, prandtl_fluxes, read_var_list, time_integration, write_var_list -
palm/trunk/SOURCE/advec_particles.f90
r276 r336 5 5 ! ----------------- 6 6 ! Particle attributes are set with new routine set_particle_attributes. 7 ! Vertical particle advection depends on the particle group. 7 8 ! Output of NetCDF messages with aid of message handling routine. 8 9 ! Output of messages replaced by message handling routine … … 898 899 !-- Same procedure for interpolation of the w velocity-component (adopt 899 900 !-- index i from v velocity-component) 900 IF ( vertical_particle_advection ) THEN901 IF ( vertical_particle_advection(particles(n)%group) ) THEN 901 902 j = particles(n)%y * ddy 902 903 k = particles(n)%z / dz + offset_ocean_nzt_m1 -
palm/trunk/SOURCE/data_output_2d.f90
r291 r336 6 6 ! simulated_time in NetCDF output replaced by time_since_reference_point. 7 7 ! Output of NetCDF messages with aid of message handling routine. 8 ! Bugfix: averaging along z is not allowed for 2d quantities (e.g. u* and z0) 8 9 ! Output of messages replaced by message handling routine. 9 10 ! … … 578 579 ! 579 580 !-- If required, carry out averaging along z 580 IF ( section(is,s) == -1 ) THEN581 IF ( section(is,s) == -1 .AND. .NOT. two_d ) THEN 581 582 582 583 local_2d = 0.0 -
palm/trunk/SOURCE/eqn_state_seawater.f90
r231 r336 76 76 ! 77 77 !-- Pressure is needed in dbar 78 p1 = hyp(0) * 1E-4 78 ! p1 = hyp(0) * 1E-4 79 ! p1 = 0.0 80 p1 = hyp(k) * 1E-4 79 81 p2 = p1 * p1 80 82 p3 = p2 * p1 … … 132 134 ! 133 135 !-- Pressure is needed in dbar 134 p1 = hyp(0) * 1E-4 136 ! p1 = hyp(0) * 1E-4 137 ! p1 = 0.0 138 p1 = hyp(k) * 1E-4 135 139 p2 = p1 * p1 136 140 p3 = p2 * p1 -
palm/trunk/SOURCE/header.f90
r328 r336 7 7 ! Coupling with independent precursor runs. 8 8 ! Output of messages replaced by message handling routine. 9 ! Output of cluster_size9 ! Output of several additional dvr parameters 10 10 ! +canyon_height, canyon_width_x, canyon_width_y, canyon_wall_left, 11 11 ! canyon_wall_south, conserve_volume_flow_mode, dp_external, dp_level_b, … … 108 108 109 109 INTEGER :: av, bh, blx, bly, bxl, bxr, byn, bys, ch, cwx, cwy, cxl, cxr, & 110 cyn, cys, i, ihost, io, j, l, ll, m pi_type110 cyn, cys, i, ihost, io, j, l, ll, m, mpi_type 111 111 REAL :: cpuseconds_per_simulated_second 112 112 … … 1019 1019 i = 1 1020 1020 l = 0 1021 m = 0 1021 1022 DO WHILE ( mode_dvrp(i) /= ' ' ) 1022 1023 IF ( mode_dvrp(i)(1:10) == 'isosurface' ) THEN … … 1024 1025 l = l + 1 1025 1026 IF ( do3d(0,j) /= ' ' ) THEN 1026 WRITE ( io, 361 ) TRIM( do3d(0,j) ), threshold(l) 1027 WRITE ( io, 361 ) TRIM( do3d(0,j) ), threshold(l), & 1028 isosurface_color(:,l) 1027 1029 ENDIF 1028 1030 ELSEIF ( mode_dvrp(i)(1:6) == 'slicer' ) THEN 1029 1031 READ ( mode_dvrp(i), '(6X,I2)' ) j 1030 IF ( do2d(0,j) /= ' ' ) WRITE ( io, 362 ) TRIM( do2d(0,j) ) 1032 m = m + 1 1033 IF ( do2d(0,j) /= ' ' ) THEN 1034 WRITE ( io, 362 ) TRIM( do2d(0,j) ), & 1035 slicer_range_limits_dvrp(:,m) 1036 ENDIF 1031 1037 ELSEIF ( mode_dvrp(i)(1:9) == 'particles' ) THEN 1032 WRITE ( io, 363 ) 1038 WRITE ( io, 363 ) dvrp_psize 1039 IF ( particle_dvrpsize /= 'none' ) THEN 1040 WRITE ( io, 364 ) 'size', TRIM( particle_dvrpsize ), & 1041 dvrpsize_interval 1042 ENDIF 1043 IF ( particle_color /= 'none' ) THEN 1044 WRITE ( io, 364 ) 'color', TRIM( particle_color ), & 1045 color_interval 1046 ENDIF 1033 1047 ENDIF 1034 1048 i = i + 1 1035 1049 ENDDO 1036 1050 1037 IF ( TRIM( topography ) /= 'flat' .AND. cluster_size > 1 ) THEN 1038 WRITE ( io, 364 ) cluster_size 1051 WRITE ( io, 365 ) groundplate_color, superelevation_x, & 1052 superelevation_y, superelevation, clip_dvrp_l, & 1053 clip_dvrp_r, clip_dvrp_s, clip_dvrp_n 1054 1055 IF ( TRIM( topography ) /= 'flat' ) THEN 1056 WRITE ( io, 366 ) topography_color 1057 IF ( cluster_size > 1 ) THEN 1058 WRITE ( io, 367 ) cluster_size 1059 ENDIF 1039 1060 ENDIF 1040 1061 … … 1301 1322 IF ( particles_per_point > 1 ) WRITE ( io, 489 ) particles_per_point 1302 1323 WRITE ( io, 495 ) total_number_of_particles 1303 IF ( .NOT. vertical_particle_advection ) WRITE ( io, 482 )1304 1324 IF ( maximum_number_of_tailpoints /= 0 ) THEN 1305 1325 WRITE ( io, 483 ) maximum_number_of_tailpoints … … 1343 1363 WRITE ( io, 493 ) psl(i), psr(i), pss(i), psn(i), psb(i), pst(i), & 1344 1364 pdx(i), pdy(i), pdz(i) 1365 IF ( .NOT. vertical_particle_advection(i) ) WRITE ( io, 482 ) 1345 1366 ENDDO 1346 1367 … … 1602 1623 ' Directory: ',A// & 1603 1624 ' The sequence contains:') 1604 361 FORMAT (' Isosurface of ',A,' Threshold value: ', E12.3) 1605 362 FORMAT (' Sectional plane ',A) 1606 363 FORMAT (' Particles') 1607 364 FORMAT (/' Polygon reduction for topography: cluster_size = ', I1) 1625 361 FORMAT (' Isosurface of ',A,' Threshold value: ', E12.3/ & 1626 ' Isosurface color: (',F4.2,',',F4,2,',',F4.2,') (R,G,B)') 1627 362 FORMAT (' Slicer plane ',A/ & 1628 ' Slicer limits: [',F6.2,',',F6.2,']') 1629 363 FORMAT (' Particles'/ & 1630 ' particle size: ',F7.2,' m') 1631 364 FORMAT (' particle ',A,' controlled by "',A,'" with interval [', & 1632 F6.2,',',F6.2,']') 1633 365 FORMAT (/' Groundplate color: (',F4.2,',',F4,2,',',F4.2,') (R,G,B)'/ & 1634 ' Superelevation along (x,y,z): (',F4.1,',',F4.1,',',F4.1, & 1635 ')'/ & 1636 ' Clipping limits: from x = ',F9.1,' m to x = ',F9.1,' m'/ & 1637 ' from y = ',F9.1,' m to y = ',F9.1,' m') 1638 366 FORMAT (/' Topography color: (',F4.2,',',F4,2,',',F4.2,') (R,G,B)') 1639 367 FORMAT (' Polygon reduction for topography: cluster_size = ', I1) 1608 1640 #endif 1609 1641 #if defined( __spectra ) … … 1715 1747 ' Particles are sorted every ',F9.1,' s'/) 1716 1748 481 FORMAT (' Particles have random start positions'/) 1717 482 FORMAT (' Particles are advected only horizontally'/)1749 482 FORMAT (' Particles are advected only horizontally'/) 1718 1750 483 FORMAT (' Particles have tails with a maximum of ',I3,' points') 1719 1751 484 FORMAT (' Number of tails of the total domain: ',I10/ & -
palm/trunk/SOURCE/init_ocean.f90
r139 r336 24 24 USE control_parameters 25 25 USE eqn_state_seawater_mod 26 USE pegrid 26 27 USE grid_variables 27 28 USE indices … … 29 30 IMPLICIT NONE 30 31 31 INTEGER :: k 32 INTEGER :: k, n 32 33 33 34 REAL :: sa_l, pt_l, rho_l 35 36 REAL, DIMENSION(nzb:nzt+1) :: rho_init 34 37 35 38 ALLOCATE( hyp(nzb:nzt+1) ) … … 45 48 46 49 hyp(nzt) = hyp(nzt+1) + rho_surface * g * 0.5 * dzu(nzt+1) 47 rho_ reference = rho_surface * 0.5 * dzu(nzt+1)50 rho_init(nzt) = rho_surface 48 51 49 52 DO k = nzt-1, 0, -1 53 hyp(k) = hyp(k+1) + rho_surface * g * dzu(k) 54 ENDDO 50 55 51 sa_l = 0.5 * ( sa_init(k) + sa_init(k+1) ) 52 pt_l = 0.5 * ( pt_init(k) + pt_init(k+1) ) 56 IF ( myid == 0 ) THEN 57 print*,'hydro pres using rho_surface' 58 DO k = nzt+1, 0, -1 59 print*, 'k = ', k, ' hyp = ', hyp(k) 60 ENDDO 61 print*, ' ' 62 ENDIF 53 63 54 rho_l = eqn_state_seawater_func( hyp(k+1), pt_l, sa_l )64 DO n = 1, 5 55 65 56 hyp(k) = hyp(k+1) + rho_l * g * dzu(k+1) 57 rho_reference = rho_reference + rho_l * dzu(k+1) 66 rho_reference = rho_surface * 0.5 * dzu(nzt+1) 67 68 DO k = nzt-1, 0, -1 69 70 sa_l = 0.5 * ( sa_init(k) + sa_init(k+1) ) 71 pt_l = 0.5 * ( pt_init(k) + pt_init(k+1) ) 72 73 rho_init(k) = eqn_state_seawater_func( hyp(k), pt_l, sa_l ) 74 75 rho_reference = rho_reference + rho_init(k) * dzu(k+1) 76 77 ENDDO 78 79 rho_reference = rho_reference / ( zw(nzt) - zu(nzb) ) 80 81 DO k = nzt-1, 0, -1 82 hyp(k) = hyp(k+1) + g * 0.5 * ( rho_init(k) + rho_init(k+1 ) ) * & 83 dzu(k+1) 84 ENDDO 85 86 IF ( myid == 0 ) THEN 87 print*,'hydro pres / rho n = ', n 88 DO k = nzt+1, 0, -1 89 print*, 'k = ', k, ' hyp = ', hyp(k), ' rho = ', rho_init(k) 90 ENDDO 91 print*, ' ' 92 ENDIF 58 93 59 94 ENDDO 60 61 rho_reference = rho_reference / ( zw(nzt) - zu(nzb) )62 95 63 96 ! … … 70 103 71 104 prho_reference = prho_reference + dzu(k+1) * & 72 eqn_state_seawater_func( hyp(0), pt_l, sa_l )105 eqn_state_seawater_func( 0.0, pt_l, sa_l ) 73 106 74 107 ENDDO -
palm/trunk/SOURCE/init_particles.f90
r277 r336 54 54 USE arrays_3d 55 55 USE control_parameters 56 USE dvrp_variables 56 57 USE grid_variables 57 58 USE indices … … 441 442 442 443 ! 444 !-- Particles will probably become none-uniform, if their size and color 445 !-- will be determined by flow variables 446 IF ( particle_color /= 'none' .OR. particle_dvrpsize /= 'none' ) THEN 447 uniform_particles = .FALSE. 448 ENDIF 449 450 ! 443 451 !-- Set the beginning of the particle tails and their age 444 452 IF ( use_particle_tails ) THEN -
palm/trunk/SOURCE/modules.f90
r318 r336 10 10 ! interval_*_dvrp_prt, isosurface_color, particle_color, particle_dvrpsize, 11 11 ! topography color in dvrp_variables, 12 ! vertical_particle_advection is a 1d-array, 12 13 ! +canyon_height, canyon_width_x, canyon_width_y, canyon_wall_left, 13 14 ! canyon_wall_south, conserve_volume_flow_mode, coupling_start_time, … … 971 972 uniform_particles = .TRUE., use_particle_tails = .FALSE., & 972 973 use_sgs_for_particles = .FALSE., & 973 vertical_particle_advection = .TRUE., &974 974 write_particle_statistics = .FALSE. 975 976 LOGICAL, DIMENSION(max_number_of_particle_groups) :: & 977 vertical_particle_advection = .TRUE. 978 975 979 LOGICAL, DIMENSION(:), ALLOCATABLE :: particle_mask, tail_mask 976 980 -
palm/trunk/SOURCE/package_parin.f90
r284 r336 52 52 dt_dvrp, dvrpsize_interval, dvrp_directory, & 53 53 dvrp_file, dvrp_host, dvrp_output, & 54 dvrp_password, dvrp_ username,&54 dvrp_password, dvrp_psize, dvrp_username, & 55 55 groundplate_color, isosurface_color, & 56 56 mode_dvrp, particle_color, particle_dvrpsize,& … … 67 67 density_ratio, radius, dt_dopts, & 68 68 dt_min_part, dt_prel, dt_sort_particles, & 69 dt_write_particle_data, dvrp_psize,&69 dt_write_particle_data, & 70 70 end_time_prel, initial_weighting_factor, & 71 71 maximum_number_of_particles, & -
palm/trunk/SOURCE/read_var_list.f90
r328 r336 4 4 ! Current revisions: 5 5 ! ----------------- 6 ! dt_fixed is read into a dummy variable. 6 7 ! Output of messages replaced by message handling routine. 7 8 ! +canyon_height, canyon_width_x, canyon_width_y, canyon_wall_left, … … 77 78 CHARACTER (LEN=10) :: binary_version, version_on_file 78 79 CHARACTER (LEN=30) :: variable_chr 80 81 LOGICAL :: ldum 79 82 80 83 … … 266 269 READ ( 13 ) drag_coefficient 267 270 CASE ( 'dt_fixed' ) 268 READ ( 13 ) dt_fixed 271 READ ( 13 ) ldum ! restart files created before rev 333 272 ! contained dt_fixed by mistake; it is still 273 ! read here in order to allow usage of these 274 ! older restart files; can be removed in a 275 ! later version 269 276 CASE ( 'dt_pr_1d' ) 270 277 READ ( 13 ) dt_pr_1d -
palm/trunk/SOURCE/write_var_list.f90
r291 r336 4 4 ! Actual revisions: 5 5 ! ----------------- 6 ! bugfix: -dt_fixed, because otherwise, restart runs cannot change from a 7 ! fixed to a free timestep. 6 8 ! +canyon_height, canyon_width_x, canyon_width_y, canyon_wall_left, 7 9 ! canyon_wall_south, conserve_volume_flow_mode, coupling_start_time, … … 194 196 WRITE ( 14 ) 'drag_coefficient ' 195 197 WRITE ( 14 ) drag_coefficient 196 WRITE ( 14 ) 'dt_fixed '197 WRITE ( 14 ) dt_fixed198 198 WRITE ( 14 ) 'dt_pr_1d ' 199 199 WRITE ( 14 ) dt_pr_1d
Note: See TracChangeset
for help on using the changeset viewer.