Changeset 336 for palm/trunk/SOURCE


Ignore:
Timestamp:
Jun 10, 2009 11:19:35 AM (16 years ago)
Author:
raasch
Message:

several small bugfixes; some more dvrp changes

Location:
palm/trunk/SOURCE
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/SOURCE/CURRENT_MODIFICATIONS

    r335 r336  
    7878skip_particles_for_tail (init_particles)
    7979
     80Value of vertical_particle_advection may differ for each particle group
     81(advec_particles, header, modules)
     82
    8083First constant in array den also defined as type double. (eqn_state_seawater)
    8184
     
    115118on. (time_integration)
    116119
     120Bugfix: qsws was calculated in case of constant heatflux = .FALSE. (prandtl_fluxes)
     121
     122Bugfix: averaging along z is not allowed for 2d quantities (e.g. u* and z0) (data_output_2d)
     123
    117124Typographical errors (netcdf)
    118125
     
    122129Small bugfix concerning 3d 64bit netcdf output format (header)
    123130
     131Bugfix: dt_fixed removed from the restart file, because otherwise, no change
     132from a fixed to a variable timestep would be possible in restart runs.
     133(read_var_list, write_var_list)
    124134
    125 advec_particles, check_parameters, cpu_log, header, init_3d_model, init_particles, modules, netcdf, time_integration
     135advec_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  
    55! -----------------
    66! Particle attributes are set with new routine set_particle_attributes.
     7! Vertical particle advection depends on the particle group.
    78! Output of NetCDF messages with aid of message handling routine.
    89! Output of messages replaced by message handling routine
     
    898899!--       Same procedure for interpolation of the w velocity-component (adopt
    899900!--       index i from v velocity-component)
    900           IF ( vertical_particle_advection )  THEN
     901          IF ( vertical_particle_advection(particles(n)%group) )  THEN
    901902             j = particles(n)%y * ddy
    902903             k = particles(n)%z / dz + offset_ocean_nzt_m1
  • palm/trunk/SOURCE/data_output_2d.f90

    r291 r336  
    66! simulated_time in NetCDF output replaced by time_since_reference_point.
    77! 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)
    89! Output of messages replaced by message handling routine.
    910!
     
    578579!
    579580!--                If required, carry out averaging along z
    580                    IF ( section(is,s) == -1 )  THEN
     581                   IF ( section(is,s) == -1  .AND.  .NOT. two_d )  THEN
    581582
    582583                      local_2d = 0.0
  • palm/trunk/SOURCE/eqn_state_seawater.f90

    r231 r336  
    7676!
    7777!--             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
    7981                p2 = p1 * p1
    8082                p3 = p2 * p1
     
    132134!
    133135!--       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
    135139          p2 = p1 * p1
    136140          p3 = p2 * p1
  • palm/trunk/SOURCE/header.f90

    r328 r336  
    77! Coupling with independent precursor runs.
    88! Output of messages replaced by message handling routine.
    9 ! Output of cluster_size
     9! Output of several additional dvr parameters
    1010! +canyon_height, canyon_width_x, canyon_width_y, canyon_wall_left,
    1111! canyon_wall_south, conserve_volume_flow_mode, dp_external, dp_level_b,
     
    108108
    109109    INTEGER ::  av, bh, blx, bly, bxl, bxr, byn, bys, ch, cwx, cwy, cxl, cxr, &
    110                 cyn, cys, i, ihost, io, j, l, ll, mpi_type
     110                cyn, cys, i, ihost, io, j, l, ll, m, mpi_type
    111111    REAL    ::  cpuseconds_per_simulated_second
    112112
     
    10191019       i = 1
    10201020       l = 0
     1021       m = 0
    10211022       DO WHILE ( mode_dvrp(i) /= ' ' )
    10221023          IF ( mode_dvrp(i)(1:10) == 'isosurface' )  THEN
     
    10241025             l = l + 1
    10251026             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)
    10271029             ENDIF
    10281030          ELSEIF ( mode_dvrp(i)(1:6) == 'slicer' )  THEN
    10291031             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
    10311037          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
    10331047          ENDIF
    10341048          i = i + 1
    10351049       ENDDO
    10361050
    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
    10391060       ENDIF
    10401061
     
    13011322       IF ( particles_per_point > 1 )  WRITE ( io, 489 )  particles_per_point
    13021323       WRITE ( io, 495 )  total_number_of_particles
    1303        IF ( .NOT. vertical_particle_advection )  WRITE ( io, 482 )
    13041324       IF ( maximum_number_of_tailpoints /= 0 )  THEN
    13051325          WRITE ( io, 483 )  maximum_number_of_tailpoints
     
    13431363          WRITE ( io, 493 )  psl(i), psr(i), pss(i), psn(i), psb(i), pst(i), &
    13441364                             pdx(i), pdy(i), pdz(i)
     1365          IF ( .NOT. vertical_particle_advection(i) )  WRITE ( io, 482 )
    13451366       ENDDO
    13461367
     
    16021623            '       Directory:        ',A// &
    16031624            '       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)
     1625361 FORMAT ('       Isosurface of ',A,'  Threshold value: ', E12.3/ &
     1626            '       Isosurface color: (',F4.2,',',F4,2,',',F4.2,') (R,G,B)')
     1627362 FORMAT ('       Slicer plane ',A/ &
     1628            '       Slicer limits: [',F6.2,',',F6.2,']')
     1629363 FORMAT ('       Particles'/ &
     1630            '          particle size:  ',F7.2,' m')
     1631364 FORMAT ('          particle ',A,' controlled by "',A,'" with interval [', &
     1632                       F6.2,',',F6.2,']')
     1633365 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')
     1638366 FORMAT (/'       Topography color: (',F4.2,',',F4,2,',',F4.2,') (R,G,B)')
     1639367 FORMAT ('       Polygon reduction for topography: cluster_size = ', I1)
    16081640#endif
    16091641#if defined( __spectra )
     
    17151747            '       Particles are sorted every ',F9.1,' s'/)
    17161748481 FORMAT ('       Particles have random start positions'/)
    1717 482 FORMAT ('       Particles are advected only horizontally'/)
     1749482 FORMAT ('          Particles are advected only horizontally'/)
    17181750483 FORMAT ('       Particles have tails with a maximum of ',I3,' points')
    17191751484 FORMAT ('            Number of tails of the total domain: ',I10/ &
  • palm/trunk/SOURCE/init_ocean.f90

    r139 r336  
    2424    USE control_parameters
    2525    USE eqn_state_seawater_mod
     26    USE pegrid
    2627    USE grid_variables
    2728    USE indices
     
    2930    IMPLICIT NONE
    3031
    31     INTEGER ::  k
     32    INTEGER ::  k, n
    3233
    3334    REAL    ::  sa_l, pt_l, rho_l
     35
     36    REAL, DIMENSION(nzb:nzt+1) ::  rho_init
    3437
    3538    ALLOCATE( hyp(nzb:nzt+1) )
     
    4548
    4649    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
    4851
    4952    DO  k = nzt-1, 0, -1
     53       hyp(k) = hyp(k+1) + rho_surface * g * dzu(k)
     54    ENDDO
    5055
    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
    5363
    54        rho_l = eqn_state_seawater_func( hyp(k+1), pt_l, sa_l )
     64    DO  n = 1, 5
    5565
    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
    5893
    5994    ENDDO
    60 
    61     rho_reference = rho_reference / ( zw(nzt) - zu(nzb) )
    6295
    6396!
     
    70103
    71104       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 )
    73106
    74107    ENDDO
  • palm/trunk/SOURCE/init_particles.f90

    r277 r336  
    5454    USE arrays_3d
    5555    USE control_parameters
     56    USE dvrp_variables
    5657    USE grid_variables
    5758    USE indices
     
    441442
    442443!
     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!
    443451!--    Set the beginning of the particle tails and their age
    444452       IF ( use_particle_tails )  THEN
  • palm/trunk/SOURCE/modules.f90

    r318 r336  
    1010! interval_*_dvrp_prt, isosurface_color, particle_color, particle_dvrpsize,
    1111! topography color in dvrp_variables,
     12! vertical_particle_advection is a 1d-array,
    1213! +canyon_height, canyon_width_x, canyon_width_y, canyon_wall_left,
    1314! canyon_wall_south, conserve_volume_flow_mode, coupling_start_time,
     
    971972                uniform_particles = .TRUE., use_particle_tails = .FALSE.,      &
    972973                use_sgs_for_particles = .FALSE.,                               &
    973                 vertical_particle_advection = .TRUE.,                          &
    974974                write_particle_statistics = .FALSE.
     975
     976    LOGICAL, DIMENSION(max_number_of_particle_groups) ::                       &
     977                vertical_particle_advection = .TRUE.
     978
    975979    LOGICAL, DIMENSION(:), ALLOCATABLE ::  particle_mask, tail_mask
    976980
  • palm/trunk/SOURCE/package_parin.f90

    r284 r336  
    5252                                  dt_dvrp, dvrpsize_interval, dvrp_directory,  &
    5353                                  dvrp_file, dvrp_host, dvrp_output,           &
    54                                   dvrp_password, dvrp_username,                &
     54                                  dvrp_password, dvrp_psize, dvrp_username,    &
    5555                                  groundplate_color, isosurface_color,         &
    5656                                  mode_dvrp, particle_color, particle_dvrpsize,&
     
    6767                                  density_ratio, radius, dt_dopts,             &
    6868                                  dt_min_part, dt_prel, dt_sort_particles,     &
    69                                   dt_write_particle_data, dvrp_psize,          &
     69                                  dt_write_particle_data,                      &
    7070                                  end_time_prel, initial_weighting_factor,     &
    7171                                  maximum_number_of_particles,                 &
  • palm/trunk/SOURCE/read_var_list.f90

    r328 r336  
    44! Current revisions:
    55! -----------------
     6! dt_fixed is read into a dummy variable.
    67! Output of messages replaced by message handling routine.
    78! +canyon_height, canyon_width_x, canyon_width_y, canyon_wall_left,
     
    7778    CHARACTER (LEN=10) ::  binary_version, version_on_file
    7879    CHARACTER (LEN=30) ::  variable_chr
     80
     81    LOGICAL ::  ldum
    7982
    8083
     
    266269             READ ( 13 )  drag_coefficient
    267270          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
    269276          CASE ( 'dt_pr_1d' )
    270277             READ ( 13 )  dt_pr_1d
  • palm/trunk/SOURCE/write_var_list.f90

    r291 r336  
    44! Actual revisions:
    55! -----------------
     6! bugfix: -dt_fixed, because otherwise, restart runs cannot change from a
     7! fixed to a free timestep.
    68! +canyon_height, canyon_width_x, canyon_width_y, canyon_wall_left,
    79! canyon_wall_south, conserve_volume_flow_mode, coupling_start_time,
     
    194196    WRITE ( 14 )  'drag_coefficient              '
    195197    WRITE ( 14 )  drag_coefficient
    196     WRITE ( 14 )  'dt_fixed                      '
    197     WRITE ( 14 )  dt_fixed
    198198    WRITE ( 14 )  'dt_pr_1d                      '
    199199    WRITE ( 14 )  dt_pr_1d
Note: See TracChangeset for help on using the changeset viewer.