 Timestamp:
 Jun 6, 2019 2:57:48 PM (2 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

palm/trunk/SOURCE/lagrangian_particle_model_mod.f90
r4018 r4020 25 25 !  26 26 ! $Id$ 27 ! Removing submodules 28 ! 29 ! 4018 20190606 13:41:50Z eckhard 27 30 ! Bugfix for former revision 28 31 ! … … 301 304 REAL(wp) :: z0_av_global !< horizontal mean value of z0 302 305 306 REAL(wp) :: rclass_lbound !< 307 REAL(wp) :: rclass_ubound !< 308 309 REAL(wp), PARAMETER :: c_0 = 3.0_wp !< parameter for lagrangian timescale 310 303 311 REAL(wp), DIMENSION(max_number_of_particle_groups) :: density_ratio = 9999999.9_wp !< namelist parameter (see documentation) 304 312 REAL(wp), DIMENSION(max_number_of_particle_groups) :: pdx = 9999999.9_wp !< namelist parameter (see documentation) … … 315 323 REAL(wp), DIMENSION(:), ALLOCATABLE :: log_z_z0 !< Precalculate LOG(z/z0) 316 324 325 INTEGER(iwp), PARAMETER :: NR_2_direction_move = 10000 !< 326 INTEGER(iwp) :: nr_move_north !< 327 INTEGER(iwp) :: nr_move_south !< 328 329 TYPE(particle_type), DIMENSION(:), ALLOCATABLE :: move_also_north 330 TYPE(particle_type), DIMENSION(:), ALLOCATABLE :: move_also_south 317 331 332 REAL(wp) :: epsilon !< 333 REAL(wp) :: urms !< 334 335 REAL(wp), DIMENSION(:), ALLOCATABLE :: epsclass !< dissipation rate class 336 REAL(wp), DIMENSION(:), ALLOCATABLE :: radclass !< radius class 337 REAL(wp), DIMENSION(:), ALLOCATABLE :: winf !< 318 338 319 320 INTEGER(iwp) :: ip 321 INTEGER(iwp) :: jp 322 INTEGER(iwp) :: kp 323 339 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: ec !< 340 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: ecf !< 341 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: gck !< 342 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: hkernel !< 343 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: hwratio !< 344 345 REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: ckernel !< 346 324 347 INTEGER(iwp), PARAMETER :: PHASE_INIT = 1 !< 325 348 INTEGER(iwp), PARAMETER, PUBLIC :: PHASE_RELEASE = 2 !< … … 340 363 lpm_rrd_local, & 341 364 lpm_check_parameters 342 ! lpm_check_data_output343 365 344 366 PUBLIC lagrangian_particle_model, & 345 ip, &346 jp, &347 kp, &348 367 max_number_particles_per_gridbox, & 349 368 radius_merge, & … … 358 377 MODULE PROCEDURE lpm_check_parameters 359 378 END INTERFACE lpm_check_parameters 360 !361 ! INTERFACE lpm_check_data_output362 ! MODULE PROCEDURE lpm_check_data_output363 ! END INTERFACE lpm_check_data_output364 379 365 380 INTERFACE lpm_parin … … 403 418 END INTERFACE lpm_wrd_global 404 419 405 INTERFACE 406 MODULE SUBROUTINE lpm_advec(ip,jp,kp) 407 END SUBROUTINE 420 INTERFACE lpm_advec 421 MODULE PROCEDURE lpm_advec 422 END INTERFACE lpm_advec 423 424 INTERFACE lpm_calc_liquid_water_content 425 MODULE PROCEDURE lpm_calc_liquid_water_content 408 426 END INTERFACE 409 427 410 INTERFACE 411 MODULE SUBROUTINE lpm_calc_liquid_water_content 412 END SUBROUTINE 428 INTERFACE lpm_boundary_conds 429 MODULE PROCEDURE lpm_boundary_conds 430 END INTERFACE lpm_boundary_conds 431 432 INTERFACE lpm_droplet_condensation 433 MODULE PROCEDURE lpm_droplet_condensation 413 434 END INTERFACE 414 435 415 INTERFACE 416 MODULE SUBROUTINE lpm_boundary_conds(location_bc, i,j,k) 417 CHARACTER (LEN=*), INTENT(IN) :: location_bc !< case statement for boundary conditions 418 INTEGER(iwp), INTENT(IN) :: i !< grid index of particle box along x 419 INTEGER(iwp), INTENT(IN) :: j !< grid index of particle box along y 420 INTEGER(iwp), INTENT(IN) :: k !< grid index of particle box along z 421 422 END SUBROUTINE 423 END INTERFACE 436 INTERFACE lpm_droplet_collision 437 MODULE PROCEDURE lpm_droplet_collision 438 END INTERFACE lpm_droplet_collision 424 439 425 INTERFACE 426 MODULE SUBROUTINE lpm_droplet_condensation(i,j,k) 427 INTEGER(iwp), INTENT(IN) :: i !< grid index of particle box along x 428 INTEGER(iwp), INTENT(IN) :: j !< grid index of particle box along y 429 INTEGER(iwp), INTENT(IN) :: k !< grid index of particle box along z 430 END SUBROUTINE 431 END INTERFACE 440 INTERFACE lpm_init_kernels 441 MODULE PROCEDURE lpm_init_kernels 442 END INTERFACE lpm_init_kernels 432 443 433 INTERFACE 434 MODULE SUBROUTINE lpm_droplet_collision(i,j,k) 435 INTEGER(iwp), INTENT(IN) :: i !< grid index of particle box along x 436 INTEGER(iwp), INTENT(IN) :: j !< grid index of particle box along y 437 INTEGER(iwp), INTENT(IN) :: k !< grid index of particle box along z 438 END SUBROUTINE 439 END INTERFACE 444 INTERFACE lpm_splitting 445 MODULE PROCEDURE lpm_splitting 446 END INTERFACE lpm_splitting 440 447 441 INTERFACE 442 MODULE SUBROUTINE lpm_init_kernels 443 END SUBROUTINE 444 END INTERFACE 448 INTERFACE lpm_merging 449 MODULE PROCEDURE lpm_merging 450 END INTERFACE lpm_merging 445 451 446 INTERFACE 447 MODULE SUBROUTINE lpm_splitting 448 END SUBROUTINE 449 END INTERFACE 452 INTERFACE lpm_exchange_horiz 453 MODULE PROCEDURE lpm_exchange_horiz 454 END INTERFACE lpm_exchange_horiz 455 456 INTERFACE lpm_move_particle 457 MODULE PROCEDURE lpm_move_particle 458 END INTERFACE lpm_move_particle 459 460 INTERFACE realloc_particles_array 461 MODULE PROCEDURE realloc_particles_array 462 END INTERFACE realloc_particles_array 463 464 INTERFACE dealloc_particles_array 465 MODULE PROCEDURE dealloc_particles_array 466 END INTERFACE dealloc_particles_array 450 467 451 INTERFACE 452 MODULE SUBROUTINE lpm_merging 453 END SUBROUTINE 454 END INTERFACE 468 INTERFACE lpm_sort_in_subboxes 469 MODULE PROCEDURE lpm_sort_in_subboxes 470 END INTERFACE lpm_sort_in_subboxes 471 472 INTERFACE lpm_sort_timeloop_done 473 MODULE PROCEDURE lpm_sort_timeloop_done 474 END INTERFACE lpm_sort_timeloop_done 455 475 456 INTERFACE 457 MODULE SUBROUTINE lpm_exchange_horiz 458 END SUBROUTINE 459 END INTERFACE 460 461 INTERFACE 462 MODULE SUBROUTINE lpm_move_particle 463 END SUBROUTINE 464 END INTERFACE 465 466 INTERFACE 467 MODULE SUBROUTINE realloc_particles_array(i,j,k,size_in) 468 INTEGER(iwp), INTENT(IN) :: i !< grid index of particle box along x 469 INTEGER(iwp), INTENT(IN) :: j !< grid index of particle box along y 470 INTEGER(iwp), INTENT(IN) :: k !< grid index of particle box along z 471 INTEGER(iwp), INTENT(IN), OPTIONAL :: size_in !< grid index of particle box along z 472 END SUBROUTINE 473 END INTERFACE 474 475 INTERFACE 476 MODULE SUBROUTINE dealloc_particles_array 477 END SUBROUTINE 478 END INTERFACE 479 480 INTERFACE 481 MODULE SUBROUTINE lpm_sort_in_subboxes 482 END SUBROUTINE 483 END INTERFACE 484 485 INTERFACE 486 MODULE SUBROUTINE lpm_sort_timeloop_done 487 END SUBROUTINE 488 END INTERFACE 489 490 INTERFACE 491 MODULE SUBROUTINE lpm_pack 492 END SUBROUTINE 493 END INTERFACE 476 INTERFACE lpm_pack 477 MODULE PROCEDURE lpm_pack 478 END INTERFACE lpm_pack 494 479 495 480 … … 3108 3093 END SUBROUTINE lpm_rrd_global 3109 3094 3110 3111 END MODULE lagrangian_particle_model_mod3112 3113 3095 3114 3096 !! … … 3119 3101 !> grid scale) as well as the boundary conditions of particles. As a next step 3120 3102 !> this submodule should be excluded as an own file. 3121 !! 3122 SUBMODULE (lagrangian_particle_model_mod) lpm_dynamics 3123 3124 REAL(wp), PARAMETER :: c_0 = 3.0_wp !< parameter for lagrangian timescale 3125 3126 CONTAINS 3127 3128 MODULE SUBROUTINE lpm_advec (ip,jp,kp) 3103 !! 3104 SUBROUTINE lpm_advec (ip,jp,kp) 3129 3105 3130 3106 LOGICAL :: subbox_at_wall !< flag to see if the current subgridbox is adjacent to a wall … … 4121 4097 !> (see offset_ocean_*) 4122 4098 !! 4123 MODULESUBROUTINE lpm_boundary_conds( location_bc , i, j, k )4099 SUBROUTINE lpm_boundary_conds( location_bc , i, j, k ) 4124 4100 4125 4101 CHARACTER (LEN=*), INTENT(IN) :: location_bc !< general mode: boundary conditions at bottom/top of the model domain … … 4624 4600 4625 4601 4626 END SUBMODULE 4627 4628 4629 !! 4630 ! Description: 4631 !  4632 !> This is a submodule of the lagrangian particle model. It contains all 4633 !> microphysical processes of the lpm. This includes activation, condensation 4634 !> and collision of cloud and rain droplets. 4635 !> As a next step this submodule should be excluded as an own file. 4636 !! 4637 SUBMODULE (lagrangian_particle_model_mod) lpm_microphysics 4638 4639 REAL(wp) :: epsilon !< 4640 REAL(wp) :: urms !< 4641 4642 REAL(wp), DIMENSION(:), ALLOCATABLE :: epsclass !< dissipation rate class 4643 REAL(wp), DIMENSION(:), ALLOCATABLE :: radclass !< radius class 4644 REAL(wp), DIMENSION(:), ALLOCATABLE :: winf !< 4645 4646 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: ec !< 4647 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: ecf !< 4648 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: gck !< 4649 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: hkernel !< 4650 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: hwratio !< 4651 4652 REAL(wp) :: rclass_lbound !< 4653 REAL(wp) :: rclass_ubound !< 4654 REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: ckernel !< 4655 4656 CONTAINS 4657 4658 MODULE SUBROUTINE lpm_droplet_condensation (i,j,k) 4602 SUBROUTINE lpm_droplet_condensation (i,j,k) 4659 4603 4660 4604 INTEGER(iwp), INTENT(IN) :: i !< … … 4925 4869 !> Calculate the liquid water content for each grid box. 4926 4870 !! 4927 MODULESUBROUTINE lpm_calc_liquid_water_content4871 SUBROUTINE lpm_calc_liquid_water_content 4928 4872 4929 4873 … … 4995 4939 !> collision efficiencies. 4996 4940 !! 4997 MODULESUBROUTINE lpm_droplet_collision (i,j,k)4941 SUBROUTINE lpm_droplet_collision (i,j,k) 4998 4942 4999 4943 INTEGER(iwp), INTENT(IN) :: i !< … … 5222 5166 !> dissipation classes, calculated at simulation start only. 5223 5167 !! 5224 MODULESUBROUTINE lpm_init_kernels5168 SUBROUTINE lpm_init_kernels 5225 5169 5226 5170 INTEGER(iwp) :: i !< … … 6015 5959 ! Unterstrasser and Soelch, 2014. 6016 5960 !! 6017 MODULESUBROUTINE lpm_splitting5961 SUBROUTINE lpm_splitting 6018 5962 6019 5963 INTEGER(iwp) :: i !< … … 6541 6485 ! Unterstrasser and Soelch, 2014. 6542 6486 !! 6543 MODULESUBROUTINE lpm_merging6487 SUBROUTINE lpm_merging 6544 6488 6545 6489 INTEGER(iwp) :: i !< … … 6606 6550 6607 6551 6608 END SUBMODULE 6609 6610 6611 !! 6612 ! Description: 6613 !  6614 !> Exchange of particles between the subdomains. 6615 !! 6616 SUBMODULE(lagrangian_particle_model_mod) lpm_utilities 6617 6618 INTEGER(iwp), PARAMETER :: NR_2_direction_move = 10000 !< 6619 INTEGER(iwp) :: nr_move_north !< 6620 INTEGER(iwp) :: nr_move_south !< 6621 6622 TYPE(particle_type), DIMENSION(:), ALLOCATABLE :: move_also_north 6623 TYPE(particle_type), DIMENSION(:), ALLOCATABLE :: move_also_south 6624 6625 CONTAINS 6552 6626 6553 6627 6554 !! … … 6639 6566 !> be adjusted. 6640 6567 !! 6641 MODULESUBROUTINE lpm_exchange_horiz6568 SUBROUTINE lpm_exchange_horiz 6642 6569 6643 6570 INTEGER(iwp) :: i !< grid index (x) of particle positition … … 7454 7381 !> cell. 7455 7382 !! 7456 MODULESUBROUTINE lpm_move_particle7383 SUBROUTINE lpm_move_particle 7457 7384 7458 7385 INTEGER(iwp) :: i !< grid index (x) of particle position … … 7587 7514 !> particle array to assure enough memory is available. 7588 7515 !! 7589 MODULESUBROUTINE realloc_particles_array ( i, j, k, size_in )7516 SUBROUTINE realloc_particles_array ( i, j, k, size_in ) 7590 7517 7591 7518 INTEGER(iwp), INTENT(IN) :: i !< … … 7645 7572 !> Not needed but allocated space for particles is dealloced. 7646 7573 !! 7647 MODULESUBROUTINE dealloc_particles_array7574 SUBROUTINE dealloc_particles_array 7648 7575 7649 7576 … … 7723 7650 !> Sort all particles into the 8 respective subgrid boxes 7724 7651 !! 7725 MODULESUBROUTINE lpm_sort_in_subboxes7652 SUBROUTINE lpm_sort_in_subboxes 7726 7653 7727 7654 INTEGER(iwp) :: i !< … … 7802 7729 !> Move all particles not marked for deletion to lowest indices (packing) 7803 7730 !! 7804 MODULESUBROUTINE lpm_pack7731 SUBROUTINE lpm_pack 7805 7732 7806 7733 INTEGER(iwp) :: n !< … … 7845 7772 !> complete the LES timestep. 7846 7773 !! 7847 MODULESUBROUTINE lpm_sort_timeloop_done7774 SUBROUTINE lpm_sort_timeloop_done 7848 7775 7849 7776 INTEGER(iwp) :: end_index !< particle end index for each subbox … … 7924 7851 7925 7852 END SUBROUTINE lpm_sort_timeloop_done 7926 7927 7928 END SUBMODULE 7853 7854 END MODULE lagrangian_particle_model_mod
Note: See TracChangeset
for help on using the changeset viewer.