source: LMDZ6/branches/Amaury_dev/libf/dyn3dmem/getparam.F90 @ 5106

Last change on this file since 5106 was 5103, checked in by abarral, 4 months ago

Handle CPP_INLANDSIS in lmdz_cppkeys_wrapper.F90
Remove obsolete key wrgrads_thermcell, _ADV_HALO, _ADV_HALLO, isminmax
Remove redundant uses of CPPKEY_INCA (thanks acozic)
Remove obsolete misc/write_field.F90
Remove unused ioipsl_* wrappers
Remove calls to WriteField_u with wrong signature
Convert .F -> .[fF]90
(lint) uppercase fortran operators
[note: 1d and iso still broken - working on it]

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