Changeset 4735 for palm/trunk/SOURCE
- Timestamp:
- Oct 13, 2020 7:00:22 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/restart_data_mpi_io_mod.f90
r4694 r4735 25 25 ! ----------------- 26 26 ! $Id$ 27 ! interface for 3d logical arrays added 28 ! 29 ! 4694 2020-09-23 15:09:19Z pavelkrc 27 30 ! Fix name of subroutine in message 28 31 ! … … 334 337 MODULE PROCEDURE rrd_mpi_io_int8_3d 335 338 MODULE PROCEDURE rrd_mpi_io_logical 339 MODULE PROCEDURE rrd_mpi_io_logical_3d 336 340 MODULE PROCEDURE rrd_mpi_io_real 337 341 MODULE PROCEDURE rrd_mpi_io_real_2d … … 372 376 MODULE PROCEDURE wrd_mpi_io_int8_3d 373 377 MODULE PROCEDURE wrd_mpi_io_logical 378 MODULE PROCEDURE wrd_mpi_io_logical_3d 374 379 MODULE PROCEDURE wrd_mpi_io_real 375 380 MODULE PROCEDURE wrd_mpi_io_real_2d … … 1939 1944 ! Description: 1940 1945 ! ------------ 1946 !> Read 3D-LOGICAL with MPI-IO 1947 !--------------------------------------------------------------------------------------------------! 1948 SUBROUTINE rrd_mpi_io_logical_3d( name, data ) 1949 1950 IMPLICIT NONE 1951 1952 CHARACTER(LEN=*), INTENT(IN) :: name !< 1953 1954 INTEGER(iwp), DIMENSION(nzb:nzt+1,nysg:nyng,nxlg:nxrg) :: logical_as_integer !< 1955 1956 LOGICAL, INTENT(OUT), DIMENSION(nzb:nzt+1,nysg:nyng,nxlg:nxrg) :: data !< 1957 1958 1959 CALL rrd_mpi_io_int4_3d( name, logical_as_integer ) 1960 data(:,:,:) = ( logical_as_integer(:,:,:) == 1 ) 1961 1962 END SUBROUTINE rrd_mpi_io_logical_3d 1963 1964 1965 1966 !--------------------------------------------------------------------------------------------------! 1967 ! Description: 1968 ! ------------ 1941 1969 !> Write INTEGER with MPI-IO 1942 1970 !--------------------------------------------------------------------------------------------------! … … 2462 2490 2463 2491 END SUBROUTINE wrd_mpi_io_logical 2492 2493 2494 2495 !--------------------------------------------------------------------------------------------------! 2496 ! Description: 2497 ! ------------ 2498 !> Write 3D-LOGICAL with MPI-IO 2499 !--------------------------------------------------------------------------------------------------! 2500 SUBROUTINE wrd_mpi_io_logical_3d( name, data ) 2501 2502 IMPLICIT NONE 2503 2504 CHARACTER(LEN=*), INTENT(IN) :: name !< 2505 2506 INTEGER(iwp) :: i !< loop index 2507 INTEGER(iwp) :: j !< loop index 2508 INTEGER(iwp) :: k !< loop index 2509 2510 INTEGER(iwp), DIMENSION(nzb:nzt+1,nysg:nyng,nxlg:nxrg) :: logical_as_integer !< 2511 2512 LOGICAL, INTENT(IN), DIMENSION(nzb:nzt+1,nysg:nyng,nxlg:nxrg) :: data !< 2513 2514 2515 DO i = nxlg, nxrg 2516 DO j = nysg, nyng 2517 DO k = nzb, nzt+1 2518 IF ( data(k,j,i) ) THEN 2519 logical_as_integer(k,j,i) = 1 2520 ELSE 2521 logical_as_integer(k,j,i) = 0 2522 ENDIF 2523 ENDDO 2524 ENDDO 2525 ENDDO 2526 2527 CALL wrd_mpi_io_int4_3d( name, logical_as_integer ) 2528 2529 END SUBROUTINE wrd_mpi_io_logical_3d 2464 2530 2465 2531
Note: See TracChangeset
for help on using the changeset viewer.