SURFEX  V8_0
Surfex V8_0 release
 All Classes Files Functions Variables
read_nam_pgd_chemistry.F90
Go to the documentation of this file.
1 !SFX_LIC Copyright 1994-2014 CNRS, Meteo-France and Universite Paul Sabatier
2 !SFX_LIC This is part of the SURFEX software governed by the CeCILL-C licence
3 !SFX_LIC version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt
4 !SFX_LIC for details. version 1.
5 ! #########
6  SUBROUTINE read_nam_pgd_chemistry(HPROGRAM, HCH_EMIS )
7 ! ##############################################################
8 !
9 !!**** *READ_NAM_PGD_CHEMISTRY* reads namelist for CHEMISTRY
10 !!
11 !! PURPOSE
12 !! -------
13 !!
14 !! METHOD
15 !! ------
16 !!
17 !
18 !! EXTERNAL
19 !! --------
20 !!
21 !! IMPLICIT ARGUMENTS
22 !! ------------------
23 !!
24 !! REFERENCE
25 !! ---------
26 !!
27 !! AUTHOR
28 !! ------
29 !!
30 !! S. Queguiner Meteo-France
31 !!
32 !! MODIFICATION
33 !! ------------
34 !!
35 !! Original 09/2011
36 !----------------------------------------------------------------------------
37 !
38 !* 0. DECLARATION
39 ! -----------
40 !
41 !
42 USE modi_get_luout
43 USE modi_open_namelist
44 USE modi_close_namelist
46 !
47 USE mode_pos_surf
48 !
49 !
50 USE yomhook ,ONLY : lhook, dr_hook
51 USE parkind1 ,ONLY : jprb
52 !
53 IMPLICIT NONE
54 !
55 !* 0.1 Declaration of arguments
56 ! ------------------------
57 !
58  CHARACTER(LEN=6), INTENT(IN) :: hprogram ! Type of program
59  CHARACTER(LEN=4), INTENT(OUT) :: hch_emis ! Option for emissions computations
60 !
61 !
62 !* 0.2 Declaration of local variables
63 ! ------------------------------
64 !
65 INTEGER :: iluout ! output listing logical unit
66 INTEGER :: ilunam ! namelist file logical unit
67 LOGICAL :: gfound ! flag when namelist is present
68 !
69 !* 0.3 Declaration of namelists
70 ! ------------------------
71 !
72  CHARACTER(LEN=4) :: cch_emis
73 REAL(KIND=JPRB) :: zhook_handle
74 !
75 namelist/nam_ch_emissions/ cch_emis
76 !
77 !-------------------------------------------------------------------------------
78 !
79 !* 1. Initializations of defaults
80 ! ---------------------------
81 !
82 IF (lhook) CALL dr_hook('READ_NAM_PGD_CHEMISTRY',0,zhook_handle)
83  cch_emis = 'NONE'
84 !
85  CALL get_luout(hprogram,iluout)
86 !
87 !-------------------------------------------------------------------------------
88 !
89 !* 2. Reading of namelist
90 ! -------------------
91 !
92  CALL open_namelist(hprogram,ilunam)
93 !
94  CALL posnam(ilunam,'NAM_CH_EMISSIONS',gfound,iluout)
95 IF (gfound) READ(unit=ilunam,nml=nam_ch_emissions)
96 !
97  CALL test_nam_var_surf(iluout,'CCH_EMIS',cch_emis,'NONE','AGGR','SNAP')
98 !
99  CALL close_namelist(hprogram,ilunam)
100 !
101 !-------------------------------------------------------------------------------
102 !
103 hch_emis = cch_emis
104 !
105 IF (lhook) CALL dr_hook('READ_NAM_PGD_CHEMISTRY',1,zhook_handle)
106 !
107 !-------------------------------------------------------------------------------
108 !
109 END SUBROUTINE read_nam_pgd_chemistry
subroutine read_nam_pgd_chemistry(HPROGRAM, HCH_EMIS)
subroutine close_namelist(HPROGRAM, KLUNAM)
subroutine posnam(KULNAM, HDNAML, OFOUND, KLUOUT)
subroutine get_luout(HPROGRAM, KLUOUT)
Definition: get_luout.F90:6
subroutine open_namelist(HPROGRAM, KLUNAM, HFILE)