source: LMDZ5/trunk/tools/Max_diff_nc_with_lib/NR_util/array_copy.f90 @ 1907

Last change on this file since 1907 was 1907, checked in by lguez, 10 years ago

Added a copyright property to every file of the distribution, except
for the fcm files (which have their own copyright). Use svn propget on
a file to see the copyright. For instance:

$ svn propget copyright libf/phylmd/physiq.F90
Name of program: LMDZ
Creation date: 1984
Version: LMDZ5
License: CeCILL version 2
Holder: Laboratoire de m\'et\'eorologie dynamique, CNRS, UMR 8539
See the license file in the root directory

Also added the files defining the CeCILL version 2 license, in French
and English, at the top of the LMDZ tree.

  • Property copyright set to
    Name of program: LMDZ
    Creation date: 1984
    Version: LMDZ5
    License: CeCILL version 2
    Holder: Laboratoire de m\'et\'eorologie dynamique, CNRS, UMR 8539
    See the license file in the root directory
File size: 1.3 KB
Line 
1MODULE array_copy_m
2
3  IMPLICIT NONE
4
5  INTERFACE array_copy
6     MODULE PROCEDURE array_copy_r, array_copy_d, array_copy_i
7  END INTERFACE
8
9  private array_copy_r, array_copy_d, array_copy_i
10
11CONTAINS
12
13  SUBROUTINE array_copy_r(src,dest,n_copied,n_not_copied)
14    REAL, DIMENSION(:), INTENT(IN) :: src
15    REAL, DIMENSION(:), INTENT(OUT) :: dest
16    INTEGER, INTENT(OUT) :: n_copied, n_not_copied
17    n_copied=min(size(src),size(dest))
18    n_not_copied=size(src)-n_copied
19    dest(1:n_copied)=src(1:n_copied)
20  END SUBROUTINE array_copy_r
21  !BL
22  SUBROUTINE array_copy_d(src,dest,n_copied,n_not_copied)
23    double precision, DIMENSION(:), INTENT(IN) :: src
24    double precision, DIMENSION(:), INTENT(OUT) :: dest
25    INTEGER, INTENT(OUT) :: n_copied, n_not_copied
26    n_copied=min(size(src),size(dest))
27    n_not_copied=size(src)-n_copied
28    dest(1:n_copied)=src(1:n_copied)
29  END SUBROUTINE array_copy_d
30  !BL
31  SUBROUTINE array_copy_i(src,dest,n_copied,n_not_copied)
32    INTEGER, DIMENSION(:), INTENT(IN) :: src
33    INTEGER, DIMENSION(:), INTENT(OUT) :: dest
34    INTEGER, INTENT(OUT) :: n_copied, n_not_copied
35    n_copied=min(size(src),size(dest))
36    n_not_copied=size(src)-n_copied
37    dest(1:n_copied)=src(1:n_copied)
38  END SUBROUTINE array_copy_i
39
40END MODULE array_copy_m
Note: See TracBrowser for help on using the repository browser.