source: LMDZ5/branches/LMDZ5-DOFOCO/libf/dyn3dmem/getparam.F90 @ 1934

Last change on this file since 1934 was 1632, checked in by Laurent Fairhead, 12 years ago

Import initial du répertoire dyn3dmem

Attention! ceci n'est qu'une version préliminaire du code "basse mémoire":
le code contenu dans ce répertoire est basé sur la r1320 et a donc besoin
d'être mis à jour par rapport à la dynamique parallèle d'aujourd'hui.
Ce code est toutefois mis à disposition pour circonvenir à des problèmes
de mémoire que certaines configurations du modèle pourraient rencontrer.
Dans l'état, il compile et tourne sur vargas et au CCRT


Initial import of dyn3dmem

Warning! this is just a preliminary version of the memory light code:
it is based on r1320 of the code and thus needs to be updated before
it can replace the present dyn3dpar code. It is nevertheless put at your
disposal to circumvent some memory problems some LMDZ configurations may
encounter. In its present state, it will compile and run on vargas and CCRT

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