source: LMDZ6/branches/contrails/libf/dyn3dmem/getparam.f90 @ 5456

Last change on this file since 5456 was 5268, checked in by abarral, 2 months ago

.f90 <-> .F90 depending on cpp key use

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