source: trunk/LMDZ.COMMON/libf/dyn3dpar/getparam.F90 @ 3000

Last change on this file since 3000 was 1391, checked in by emillour, 10 years ago

Common dynamical core:
Updates in the dynamics to keeup up with updates in LMDZ5
(up to LMDZ5 trunk rev 2200):

  • compilation:
  • create_make_gcm : added processing of .f & .f90 files (not just .F and .F90)
  • makelmdz: add "mix" option for -io (ouptut with both IOIPSL and XIOS)
  • makelmdz_fcm: add "mix" option for -io
  • filtrez:
  • acc.F and eigen.F : add "implicit none" and variable declarations
  • bibio:
  • handle_err_m.F90: replace "stop" with call to abort_gcm()
  • i1mach.F, j4save.F: add "implicit none" and variable declarations
  • xercnt.F, xermsg.F, xerprn.F, xersve.F, xgetua.F: add "implicit none" and variable declarations
  • dyn3d_common:
  • disvert.F90 : added comments on meaning of "pa" variable
  • grid_atob.F : better control on level of default ouputs
  • infotrac.F90: update Earth-specific stuff (nqo water tracers)
  • interpre.F: correction on the size of input array w
  • juldate.F, massbar.F, ppm3d.F, ran1.F: add "implicit none" and variable declarations
  • sortvarc.F: code cleanup
  • iniacademic.F90: cleanup and extra sanity check.
  • dyn3d:
  • abort_gcm.F: additions for XIOS
  • conf_gcm.F90: transformed to free form from conf_gcm.F
  • gcm.F: added test to check that iphysiq is a multiple of iperiod
  • getparam.F90, guidz_mod.F: update from LMDZ5
  • integrd.F: replace stop with call_abort()
  • dyn3dpar:
  • abort_gcm.F: minor cleanup
  • gcm.F: added test to check that iphysiq is a multiple of iperiod
  • getparam.F90, guide_p_mod.F90: update from LMDZ5
  • integrd_p.F: abort with call_abort when there is negative surface pressure
  • leapfrog_p.F: add INCA specific stuff to keep up with current LMDZ5
  • conf_gcm.F90: transformed to free form from conf_gcm.F

EM

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