Changeset 2801 for palm/trunk/SOURCE/lpm.f90
- Timestamp:
- Feb 14, 2018 4:01:55 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/lpm.f90
r2718 r2801 1 MODULE lpm_mod 2 1 3 !> @file lpm.f90 2 4 !------------------------------------------------------------------------------! … … 25 27 ! ----------------- 26 28 ! $Id$ 29 ! Changed lpm from subroutine to module. 30 ! Introduce particle transfer in nested models. 31 ! 32 ! 2718 2018-01-02 08:49:38Z maronga 27 33 ! Corrected "Former revisions" section 28 34 ! … … 139 145 !> Particle advection 140 146 !------------------------------------------------------------------------------! 141 SUBROUTINE lpm142 147 143 148 … … 163 168 ONLY: lpm_create_particle, PHASE_RELEASE 164 169 165 USE lpm_pack_and_sort_mod, & 166 ONLY: lpm_sort_in_subboxes, lpm_sort_timeloop_done 170 USE lpm_pack_and_sort_mod 167 171 168 172 USE particle_attributes, & … … 179 183 USE pegrid 180 184 185 USE pmc_particle_interface, & 186 ONLY: pmcp_c_get_particle_from_parent, pmcp_p_fill_particle_win, & 187 pmcp_c_send_particle_to_parent, pmcp_p_empty_particle_win, & 188 pmcp_p_delete_particles_in_fine_grid_area 189 190 USE pmc_interface, & 191 ONLY: nested_run 192 193 IMPLICIT NONE 194 PRIVATE 195 SAVE 196 197 INTERFACE lpm 198 MODULE PROCEDURE lpm 199 END INTERFACE lpm 200 201 PUBLIC lpm 202 203 CONTAINS 204 SUBROUTINE lpm 181 205 IMPLICIT NONE 182 206 … … 424 448 !-- Horizontal boundary conditions including exchange between subdmains 425 449 CALL lpm_exchange_horiz 426 ! 427 !-- Pack particles (eliminate those marked for deletion), 428 !-- determine new number of particles 429 CALL lpm_sort_in_subboxes 430 ! 431 !-- Initialize variables for the next (sub-) timestep, i.e., for marking 432 !-- those particles to be deleted after the timestep 433 deleted_particles = 0 450 451 IF ( .NOT. dt_3d_reached .OR. .NOT. nested_run ) THEN ! IF .FALSE., lpm_sort_in_subboxes is done inside pcmp 452 ! 453 !-- Pack particles (eliminate those marked for deletion), 454 !-- determine new number of particles 455 CALL lpm_sort_in_subboxes 456 ! 457 !-- Initialize variables for the next (sub-) timestep, i.e., for marking 458 !-- those particles to be deleted after the timestep 459 deleted_particles = 0 460 ENDIF 434 461 435 462 IF ( dt_3d_reached ) EXIT … … 437 464 first_loop_stride = .FALSE. 438 465 ENDDO ! timestep loop 466 ! 467 !-- in case of nested runs do the transfer of particles after every full model time step 468 IF ( nested_run ) THEN 469 CALL particles_from_parent_to_child 470 CALL particles_from_child_to_parent 471 CALL pmcp_p_delete_particles_in_fine_grid_area 472 473 CALL lpm_sort_in_subboxes 474 475 deleted_particles = 0 476 ENDIF 439 477 440 478 ! … … 469 507 470 508 END SUBROUTINE lpm 509 510 SUBROUTINE particles_from_parent_to_child 511 IMPLICIT NONE 512 513 CALL pmcp_c_get_particle_from_parent ! Child actions 514 CALL pmcp_p_fill_particle_win ! Parent actions 515 516 RETURN 517 END SUBROUTINE particles_from_parent_to_child 518 519 SUBROUTINE particles_from_child_to_parent 520 IMPLICIT NONE 521 522 CALL pmcp_c_send_particle_to_parent ! Child actions 523 CALL pmcp_p_empty_particle_win ! Parent actions 524 525 RETURN 526 END SUBROUTINE particles_from_child_to_parent 527 528 529 END MODULE lpm_mod
Note: See TracChangeset
for help on using the changeset viewer.