source: LMDZ4/branches/LMDZ4-dev-20091210/libf/dyn3d/getparam.F90 @ 5005

Last change on this file since 5005 was 1186, checked in by Ehouarn Millour, 15 years ago

Cleanup around IOIPSL, so that LMDZ dynamics may be used without IOIPSL.

  • moved ersatz IOIPSL routines (ioipsl_* , taken from IOIPSLv2_1_8, so that 'getin' function may be used even if not using the IOIPSL library) from dyn3d/dyn3dpar to bibio.
  • enclosed 'use ioipsl' instruction with #ifdef CPP_IOIPSL cpp keys.

EM

  • 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 1186 2009-06-18 09:20:44Z dcugnet $
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.