Changeset 4517 for palm/trunk/SOURCE/bulk_cloud_model_mod.f90
- Timestamp:
- May 3, 2020 2:29:30 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/bulk_cloud_model_mod.f90
r4506 r4517 25 25 ! ----------------- 26 26 ! $Id$ 27 ! added restart with MPI-IO for reading local arrays 28 ! 29 ! 4506 2020-04-21 10:57:45Z schwenkel 27 30 ! Use correct magnus formula for liquid water temperature 28 31 ! … … 183 186 184 187 USE restart_data_mpi_io_mod, & 185 ONLY: r rd_mpi_io, wrd_mpi_io188 ONLY: rd_mpi_io_check_array, rrd_mpi_io, wrd_mpi_io 186 189 187 190 USE statistics, & … … 404 407 405 408 INTERFACE bcm_rrd_local 406 MODULE PROCEDURE bcm_rrd_local 409 MODULE PROCEDURE bcm_rrd_local_ftn 410 MODULE PROCEDURE bcm_rrd_local_mpi 407 411 END INTERFACE bcm_rrd_local 408 412 … … 3397 3401 ! Description: 3398 3402 ! ------------ 3399 !> This routine reads the respective restart data for the bulk cloud module.3400 !------------------------------------------------------------------------------! 3401 SUBROUTINE bcm_rrd_local ( k, nxlf, nxlc, nxl_on_file, nxrf, nxrc, &3402 nxr_on_file, nynf, nync, nyn_on_file, nysf, &3403 nysc, nys_on_file, tmp_2d, tmp_3d, found )3403 !> Read module-specific local restart data arrays (Fortran binary format). 3404 !------------------------------------------------------------------------------! 3405 SUBROUTINE bcm_rrd_local_ftn( k, nxlf, nxlc, nxl_on_file, nxrf, nxrc, & 3406 nxr_on_file, nynf, nync, nyn_on_file, nysf, & 3407 nysc, nys_on_file, tmp_2d, tmp_3d, found ) 3404 3408 3405 3409 … … 3432 3436 REAL(wp), DIMENSION(nzb:nzt+1,nys_on_file-nbgp:nyn_on_file+nbgp,nxl_on_file-nbgp:nxr_on_file+nbgp) :: tmp_3d !< 3433 3437 3434 !3435 !-- Here the reading of user-defined restart data follows:3436 !-- Sample for user-defined output3437 3438 3438 3439 3439 found = .TRUE. … … 3561 3561 3562 3562 3563 END SUBROUTINE bcm_rrd_local 3563 END SUBROUTINE bcm_rrd_local_ftn 3564 3565 3566 !------------------------------------------------------------------------------! 3567 ! Description: 3568 ! ------------ 3569 !> Read module-specific local restart data arrays (MPI-IO). 3570 !------------------------------------------------------------------------------! 3571 SUBROUTINE bcm_rrd_local_mpi 3572 3573 LOGICAL :: array_found !< 3574 3575 3576 CALL rd_mpi_io_check_array( 'prr' , found = array_found ) 3577 IF ( array_found ) THEN 3578 IF ( .NOT. ALLOCATED( prr ) ) ALLOCATE( prr(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) 3579 CALL rrd_mpi_io( 'prr', prr ) 3580 ENDIF 3581 3582 CALL rd_mpi_io_check_array( 'prr_av' , found = array_found ) 3583 IF ( array_found ) THEN 3584 IF ( .NOT. ALLOCATED( prr_av ) ) ALLOCATE( prr_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) 3585 CALL rrd_mpi_io( 'prr_av', prr_av ) 3586 ENDIF 3587 3588 CALL rd_mpi_io_check_array( 'precipitation_amount' , found = array_found ) 3589 IF ( array_found ) THEN 3590 IF ( .NOT. ALLOCATED( precipitation_amount ) ) THEN 3591 ALLOCATE( precipitation_amount(nysg:nyng,nxlg:nxrg) ) 3592 ENDIF 3593 CALL rrd_mpi_io( 'precipitation_amount', precipitation_amount ) 3594 ENDIF 3595 3596 CALL rrd_mpi_io( 'ql', ql ) 3597 3598 CALL rd_mpi_io_check_array( 'ql_av' , found = array_found ) 3599 IF ( array_found ) THEN 3600 IF ( .NOT. ALLOCATED( ql_av ) ) ALLOCATE( ql_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) 3601 CALL rrd_mpi_io( 'ql_av', ql_av ) 3602 ENDIF 3603 3604 CALL rrd_mpi_io( 'qc', qc ) 3605 3606 CALL rd_mpi_io_check_array( 'qc_av' , found = array_found ) 3607 IF ( array_found ) THEN 3608 IF ( .NOT. ALLOCATED( qc_av ) ) ALLOCATE( qc_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) 3609 CALL rrd_mpi_io( 'qc_av', qc_av ) 3610 ENDIF 3611 3612 IF ( microphysics_morrison ) THEN 3613 3614 CALL rrd_mpi_io( 'nc', nc ) 3615 3616 CALL rd_mpi_io_check_array( 'nc_av' , found = array_found ) 3617 IF ( array_found ) THEN 3618 IF ( .NOT. ALLOCATED( nc_av ) ) ALLOCATE( nc_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) 3619 CALL rrd_mpi_io( 'nc_av', nc_av ) 3620 ENDIF 3621 3622 ENDIF 3623 3624 IF ( microphysics_seifert ) THEN 3625 3626 CALL rrd_mpi_io( 'nr', nr ) 3627 3628 CALL rd_mpi_io_check_array( 'nr_av' , found = array_found ) 3629 IF ( array_found ) THEN 3630 IF ( .NOT. ALLOCATED( nr_av ) ) ALLOCATE( nr_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) 3631 CALL rrd_mpi_io( 'nr_av', nr_av ) 3632 ENDIF 3633 3634 CALL rrd_mpi_io( 'qr', qr ) 3635 3636 CALL rd_mpi_io_check_array( 'qr_av' , found = array_found ) 3637 IF ( array_found ) THEN 3638 IF ( .NOT. ALLOCATED( qr_av ) ) ALLOCATE( qr_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) 3639 CALL rrd_mpi_io( 'qr_av', qr_av ) 3640 ENDIF 3641 3642 ENDIF 3643 3644 IF ( microphysics_ice_extension ) THEN 3645 3646 CALL rrd_mpi_io( 'ni', ni ) 3647 3648 CALL rd_mpi_io_check_array( 'ni_av' , found = array_found ) 3649 IF ( array_found ) THEN 3650 IF ( .NOT. ALLOCATED( ni_av ) ) ALLOCATE( ni_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) 3651 CALL rrd_mpi_io( 'ni_av', ni_av ) 3652 ENDIF 3653 3654 CALL rrd_mpi_io( 'qi', qi ) 3655 3656 CALL rd_mpi_io_check_array( 'qi_av' , found = array_found ) 3657 IF ( array_found ) THEN 3658 IF ( .NOT. ALLOCATED( qi_av ) ) ALLOCATE( qi_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) 3659 CALL rrd_mpi_io( 'qi_av', qi_av ) 3660 ENDIF 3661 3662 ENDIF 3663 3664 3665 END SUBROUTINE bcm_rrd_local_mpi 3564 3666 3565 3667
Note: See TracChangeset
for help on using the changeset viewer.