source: LMDZ5/branches/LMDZ5_SPLA/libf/dyn3d/getparam.F90 @ 5080

Last change on this file since 5080 was 1907, checked in by lguez, 11 years ago

Added a copyright property to every file of the distribution, except
for the fcm files (which have their own copyright). Use svn propget on
a file to see the copyright. For instance:

$ svn propget copyright libf/phylmd/physiq.F90
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

Also added the files defining the CeCILL version 2 license, in French
and English, at the top of the LMDZ tree.

  • 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.4 KB
Line 
1!
2! $Id: getparam.F90 1907 2013-11-26 13:10:46Z abarral $
3!
4MODULE getparam
5#ifdef CPP_IOIPSL
6   USE IOIPSL
7#else
8! if not using IOIPSL, we still need to use (a local version of) getin
9   USE ioipsl_getincom
10#endif
11
12   INTERFACE getpar
13     MODULE PROCEDURE ini_getparam,fin_getparam,getparamr,getparami,getparaml
14   END INTERFACE
15
16   INTEGER, PARAMETER :: out_eff=99
17
18CONTAINS
19  SUBROUTINE ini_getparam(fichier)
20    !
21    IMPLICIT NONE
22    !
23    CHARACTER*(*) :: fichier
24    open(out_eff,file=fichier,status='unknown',form='formatted')
25  END SUBROUTINE ini_getparam
26
27  SUBROUTINE fin_getparam
28    !
29    IMPLICIT NONE
30    !
31    close(out_eff)
32
33  END SUBROUTINE fin_getparam
34
35  SUBROUTINE getparamr(TARGET,def_val,ret_val,comment)
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    write(out_eff,*) '######################################'
53    write(out_eff,*) '#### ',comment,' #####'
54    write(out_eff,*) TARGET,'=',ret_val
55
56  END SUBROUTINE getparamr
57
58  SUBROUTINE getparami(TARGET,def_val,ret_val,comment)
59    !
60    IMPLICIT NONE
61    !
62    !   Get a real scalar. We first check if we find it
63    !   in the database and if not we get it from the run.def
64    !
65    !   getinr1d and getinr2d are written on the same pattern
66    !
67    CHARACTER*(*) :: TARGET
68    INTEGER :: def_val
69    INTEGER :: ret_val
70    CHARACTER*(*) :: comment
71
72    ret_val=def_val
73    call getin(TARGET,ret_val)
74
75    write(out_eff,*) '######################################'
76    write(out_eff,*) '#### ',comment,' #####'
77    write(out_eff,*) comment
78    write(out_eff,*) TARGET,'=',ret_val
79
80  END SUBROUTINE getparami
81
82  SUBROUTINE getparaml(TARGET,def_val,ret_val,comment)
83    !
84    IMPLICIT NONE
85    !
86    !   Get a real scalar. We first check if we find it
87    !   in the database and if not we get it from the run.def
88    !
89    !   getinr1d and getinr2d are written on the same pattern
90    !
91    CHARACTER*(*) :: TARGET
92    LOGICAL :: def_val
93    LOGICAL :: ret_val
94    CHARACTER*(*) :: comment
95
96    ret_val=def_val
97    call getin(TARGET,ret_val)
98
99    write(out_eff,*) '######################################'
100    write(out_eff,*) '#### ',comment,' #####'
101    write(out_eff,*) TARGET,'=',ret_val
102
103  END SUBROUTINE getparaml
104
105
106END MODULE getparam
Note: See TracBrowser for help on using the repository browser.