1 | ! |
---|
2 | ! $Header$ |
---|
3 | ! |
---|
4 | MODULE getparam |
---|
5 | USE IOIPSL |
---|
6 | INTERFACE getpar |
---|
7 | MODULE PROCEDURE ini_getparam,fin_getparam,getparamr,getparami,getparaml |
---|
8 | END INTERFACE |
---|
9 | |
---|
10 | INTEGER, PARAMETER :: out_eff=99 |
---|
11 | |
---|
12 | CONTAINS |
---|
13 | SUBROUTINE ini_getparam(fichier) |
---|
14 | USE parallel |
---|
15 | ! |
---|
16 | IMPLICIT NONE |
---|
17 | ! |
---|
18 | CHARACTER*(*) :: fichier |
---|
19 | IF (mpi_rank==0) OPEN(out_eff,file=fichier,status='unknown',form='formatted') |
---|
20 | |
---|
21 | END SUBROUTINE ini_getparam |
---|
22 | |
---|
23 | SUBROUTINE fin_getparam |
---|
24 | USE parallel |
---|
25 | ! |
---|
26 | IMPLICIT NONE |
---|
27 | ! |
---|
28 | IF (mpi_rank==0) CLOSE(out_eff) |
---|
29 | |
---|
30 | END SUBROUTINE fin_getparam |
---|
31 | |
---|
32 | SUBROUTINE getparamr(TARGET,def_val,ret_val,comment) |
---|
33 | USE parallel |
---|
34 | ! |
---|
35 | IMPLICIT NONE |
---|
36 | ! |
---|
37 | ! Get a real scalar. We first check if we find it |
---|
38 | ! in the database and if not we get it from the run.def |
---|
39 | ! |
---|
40 | ! getinr1d and getinr2d are written on the same pattern |
---|
41 | ! |
---|
42 | CHARACTER*(*) :: TARGET |
---|
43 | REAL :: def_val |
---|
44 | REAL :: ret_val |
---|
45 | CHARACTER*(*) :: comment |
---|
46 | |
---|
47 | ret_val=def_val |
---|
48 | call getin(TARGET,ret_val) |
---|
49 | |
---|
50 | IF (mpi_rank==0) THEN |
---|
51 | write(out_eff,*) '######################################' |
---|
52 | write(out_eff,*) '#### ',comment,' #####' |
---|
53 | write(out_eff,*) TARGET,'=',ret_val |
---|
54 | ENDIF |
---|
55 | |
---|
56 | END SUBROUTINE getparamr |
---|
57 | |
---|
58 | SUBROUTINE getparami(TARGET,def_val,ret_val,comment) |
---|
59 | USE parallel |
---|
60 | ! |
---|
61 | IMPLICIT NONE |
---|
62 | ! |
---|
63 | ! Get a real scalar. We first check if we find it |
---|
64 | ! in the database and if not we get it from the run.def |
---|
65 | ! |
---|
66 | ! getinr1d and getinr2d are written on the same pattern |
---|
67 | ! |
---|
68 | CHARACTER*(*) :: TARGET |
---|
69 | INTEGER :: def_val |
---|
70 | INTEGER :: ret_val |
---|
71 | CHARACTER*(*) :: comment |
---|
72 | |
---|
73 | ret_val=def_val |
---|
74 | call getin(TARGET,ret_val) |
---|
75 | |
---|
76 | IF (mpi_rank==0) THEN |
---|
77 | write(out_eff,*) '######################################' |
---|
78 | write(out_eff,*) '#### ',comment,' #####' |
---|
79 | write(out_eff,*) comment |
---|
80 | write(out_eff,*) TARGET,'=',ret_val |
---|
81 | ENDIF |
---|
82 | |
---|
83 | END SUBROUTINE getparami |
---|
84 | |
---|
85 | SUBROUTINE getparaml(TARGET,def_val,ret_val,comment) |
---|
86 | USE parallel |
---|
87 | ! |
---|
88 | IMPLICIT NONE |
---|
89 | ! |
---|
90 | ! Get a real scalar. We first check if we find it |
---|
91 | ! in the database and if not we get it from the run.def |
---|
92 | ! |
---|
93 | ! getinr1d and getinr2d are written on the same pattern |
---|
94 | ! |
---|
95 | CHARACTER*(*) :: TARGET |
---|
96 | LOGICAL :: def_val |
---|
97 | LOGICAL :: ret_val |
---|
98 | CHARACTER*(*) :: comment |
---|
99 | |
---|
100 | ret_val=def_val |
---|
101 | call getin(TARGET,ret_val) |
---|
102 | |
---|
103 | IF (mpi_rank==0) THEN |
---|
104 | write(out_eff,*) '######################################' |
---|
105 | write(out_eff,*) '#### ',comment,' #####' |
---|
106 | write(out_eff,*) TARGET,'=',ret_val |
---|
107 | ENDIF |
---|
108 | |
---|
109 | END SUBROUTINE getparaml |
---|
110 | |
---|
111 | |
---|
112 | END MODULE getparam |
---|