Changeset 2228 for LMDZ5/trunk/libf/bibio
- Timestamp:
- Mar 12, 2015, 2:15:18 PM (10 years ago)
- Location:
- LMDZ5/trunk/libf/bibio
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ5/trunk/libf/bibio/arth.F90
r1907 r2228 7 7 INTERFACE arth 8 8 ! Returns an arithmetic progression, given a first term "first", an 9 ! increment and a number of terms "n" .9 ! increment and a number of terms "n" (including "first"). 10 10 11 11 MODULE PROCEDURE arth_r, arth_i 12 ! The difference between the procedures is the type of13 ! arguments "first" and "increment"and of function result.12 ! The difference between the procedures is the kind and type of 13 ! arguments first and increment and of function result. 14 14 END INTERFACE 15 15 … … 22 22 REAL, INTENT(IN) :: first,increment 23 23 INTEGER, INTENT(IN) :: n 24 REAL , DIMENSION(n) :: arth_r24 REAL arth_r(n) 25 25 26 ! Variables local to the procedure: 27 26 ! Local: 28 27 INTEGER :: k,k2 29 28 REAL :: temp … … 50 49 end do 51 50 end if 51 52 52 END FUNCTION arth_r 53 53 … … 57 57 58 58 INTEGER, INTENT(IN) :: first,increment,n 59 INTEGER, DIMENSION(n) :: arth_i 59 INTEGER arth_i(n) 60 61 ! Local: 60 62 INTEGER :: k,k2,temp 63 64 !--------------------------------------- 65 61 66 if (n > 0) arth_i(1)=first 62 67 if (n <= NPAR_ARTH) then … … 78 83 end do 79 84 end if 85 80 86 END FUNCTION arth_i 81 87 -
LMDZ5/trunk/libf/bibio/nrtype.F90
r2218 r2228 3 3 implicit none 4 4 5 integer, parameter:: wp = kind(0.) ! working precision for real type5 integer, parameter:: k8 = selected_real_kind(13) 6 6 7 7 ! Frequently used mathematical constants (with precision to spare): … … 13 13 REAL, PARAMETER :: EULER=0.5772156649015328606065120900824024310422 14 14 15 DOUBLE PRECISION, PARAMETER:: & 16 PI_D = 3.141592653589793238462643383279502884197d0 17 DOUBLE PRECISION, PARAMETER:: & 18 PIO2_D=1.57079632679489661923132169163975144209858d0 19 DOUBLE PRECISION, PARAMETER:: & 20 TWOPI_D=6.283185307179586476925286766559005768394d0 21 22 ! Derived data types for sparse matrices, single and double 23 ! precision (see use in Chapter B2): 24 25 TYPE sprs2_sp 26 INTEGER :: n,len 27 REAL, DIMENSION(:), POINTER :: val 28 INTEGER, DIMENSION(:), POINTER :: irow 29 INTEGER, DIMENSION(:), POINTER :: jcol 30 END TYPE sprs2_sp 31 32 TYPE sprs2_dp 33 INTEGER :: n,len 34 DOUBLE PRECISION, DIMENSION(:), POINTER :: val 35 INTEGER, DIMENSION(:), POINTER :: irow 36 INTEGER, DIMENSION(:), POINTER :: jcol 37 END TYPE sprs2_dp 15 REAL(K8), PARAMETER:: & 16 PI_D = 3.141592653589793238462643383279502884197_k8 17 REAL(K8), PARAMETER:: & 18 PIO2_D=1.57079632679489661923132169163975144209858_k8 19 REAL(K8), PARAMETER:: & 20 TWOPI_D=6.283185307179586476925286766559005768394_k8 38 21 39 22 END MODULE nrtype
Note: See TracChangeset
for help on using the changeset viewer.