source: LMDZ5/branches/testing/libf/dyn3d/getparam.F90 @ 4057

Last change on this file since 4057 was 2160, checked in by Laurent Fairhead, 10 years ago

Merged trunk changes -r2070:2158 into testing branch. Compilation problems introduced by revision r2155 have been corrected by hand

  • 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
  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.5 KB
RevLine 
[524]1!
[1279]2! $Id: getparam.F90 2160 2014-11-28 15:36:29Z dcugnet $
[524]3!
4MODULE getparam
[1279]5#ifdef CPP_IOIPSL
[524]6   USE IOIPSL
[1279]7#else
8! if not using IOIPSL, we still need to use (a local version of) getin
9   USE ioipsl_getincom
10#endif
11
[524]12   INTERFACE getpar
[2160]13     MODULE PROCEDURE getparamr,getparami,getparaml
[524]14   END INTERFACE
[2160]15   private getparamr,getparami,getparaml
[524]16
17   INTEGER, PARAMETER :: out_eff=99
18
19CONTAINS
20  SUBROUTINE ini_getparam(fichier)
21    !
22    IMPLICIT NONE
23    !
24    CHARACTER*(*) :: fichier
25    open(out_eff,file=fichier,status='unknown',form='formatted')
26  END SUBROUTINE ini_getparam
27
28  SUBROUTINE fin_getparam
29    !
30    IMPLICIT NONE
31    !
32    close(out_eff)
33
34  END SUBROUTINE fin_getparam
35
36  SUBROUTINE getparamr(TARGET,def_val,ret_val,comment)
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    write(out_eff,*) '######################################'
54    write(out_eff,*) '#### ',comment,' #####'
55    write(out_eff,*) TARGET,'=',ret_val
56
57  END SUBROUTINE getparamr
58
59  SUBROUTINE getparami(TARGET,def_val,ret_val,comment)
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    write(out_eff,*) '######################################'
77    write(out_eff,*) '#### ',comment,' #####'
78    write(out_eff,*) comment
79    write(out_eff,*) TARGET,'=',ret_val
80
81  END SUBROUTINE getparami
82
83  SUBROUTINE getparaml(TARGET,def_val,ret_val,comment)
84    !
85    IMPLICIT NONE
86    !
87    !   Get a real scalar. We first check if we find it
88    !   in the database and if not we get it from the run.def
89    !
90    !   getinr1d and getinr2d are written on the same pattern
91    !
92    CHARACTER*(*) :: TARGET
93    LOGICAL :: def_val
94    LOGICAL :: ret_val
95    CHARACTER*(*) :: comment
96
97    ret_val=def_val
98    call getin(TARGET,ret_val)
99
100    write(out_eff,*) '######################################'
101    write(out_eff,*) '#### ',comment,' #####'
102    write(out_eff,*) TARGET,'=',ret_val
103
104  END SUBROUTINE getparaml
105
106
107END MODULE getparam
Note: See TracBrowser for help on using the repository browser.