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

Last change on this file since 5185 was 5116, checked in by abarral, 5 months ago

rename modules properly lmdz_*
move ismin, ismax, minmax into new lmdz_libmath.f90
(lint) uppercase fortran keywords

  • 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
RevLine 
[5099]1
[1632]2! $Id: getparam.F90 1279 2009-12-10 09:02:56Z fairhead $
[5099]3
[1632]4MODULE getparam
5   USE IOIPSL
6
7   INTERFACE getpar
[2094]8     MODULE PROCEDURE getparamr,getparami,getparaml
[1632]9   END INTERFACE
[5113]10   PRIVATE getparamr,getparami,getparaml
[1632]11
12   INTEGER, PARAMETER :: out_eff=99
13
14CONTAINS
15  SUBROUTINE ini_getparam(fichier)
[1823]16  USE parallel_lmdz
[5099]17
[1632]18    IMPLICIT NONE
[5099]19
[1632]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
[1823]26  USE parallel_lmdz
[5099]27
[1632]28    IMPLICIT NONE
[5099]29
[1632]30      IF (mpi_rank==0) CLOSE(out_eff)
31
32  END SUBROUTINE fin_getparam
33
34  SUBROUTINE getparamr(TARGET,def_val,ret_val,comment)
[1823]35  USE parallel_lmdz
[5099]36
[1632]37    IMPLICIT NONE
[5099]38
[1632]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
[5099]41
[1632]42    !   getinr1d and getinr2d are written on the same pattern
[5099]43
[1632]44    CHARACTER*(*) :: TARGET
45    REAL :: def_val
46    REAL :: ret_val
47    CHARACTER*(*) :: comment
48
49    ret_val=def_val
[5101]50    CALL getin(TARGET,ret_val)
[1632]51
52    IF (mpi_rank==0) THEN
[5116]53      WRITE(out_eff,*) '######################################'
54      WRITE(out_eff,*) '#### ',comment,' #####'
55      WRITE(out_eff,*) TARGET,'=',ret_val
[1632]56    ENDIF
57   
58  END SUBROUTINE getparamr
59
60  SUBROUTINE getparami(TARGET,def_val,ret_val,comment)
[1823]61  USE parallel_lmdz
[5099]62
[1632]63    IMPLICIT NONE
[5099]64
[1632]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
[5099]67
[1632]68    !   getinr1d and getinr2d are written on the same pattern
[5099]69
[1632]70    CHARACTER*(*) :: TARGET
71    INTEGER :: def_val
72    INTEGER :: ret_val
73    CHARACTER*(*) :: comment
74
75    ret_val=def_val
[5101]76    CALL getin(TARGET,ret_val)
[1632]77
78    IF (mpi_rank==0) THEN
[5116]79      WRITE(out_eff,*) '######################################'
80      WRITE(out_eff,*) '#### ',comment,' #####'
81      WRITE(out_eff,*) comment
82      WRITE(out_eff,*) TARGET,'=',ret_val
[1632]83    ENDIF
84   
85  END SUBROUTINE getparami
86
87  SUBROUTINE getparaml(TARGET,def_val,ret_val,comment)
[1823]88  USE parallel_lmdz
[5099]89
[1632]90    IMPLICIT NONE
[5099]91
[1632]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
[5099]94
[1632]95    !   getinr1d and getinr2d are written on the same pattern
[5099]96
[1632]97    CHARACTER*(*) :: TARGET
98    LOGICAL :: def_val
99    LOGICAL :: ret_val
100    CHARACTER*(*) :: comment
101
102    ret_val=def_val
[5101]103    CALL getin(TARGET,ret_val)
[1632]104
105    IF (mpi_rank==0) THEN
[5116]106      WRITE(out_eff,*) '######################################'
107      WRITE(out_eff,*) '#### ',comment,' #####'
108      WRITE(out_eff,*) TARGET,'=',ret_val
[1632]109    ENDIF
110       
111  END SUBROUTINE getparaml
112
113
114END MODULE getparam
Note: See TracBrowser for help on using the repository browser.