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