SURFEX  V8_0
Surfex V8_0 release
 All Classes Files Functions Variables
read_prep_isba_carbon.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_prep_isba_carbon(HPROGRAM,HRESPSL)
7 ! #######################################################
8 !
9 !!**** *READ_PREP_ISBA_CARBON* - routine to read the configuration for soil
10 !! carbon in ISBA fields preparation
11 !!
12 !! PURPOSE
13 !! -------
14 !!
15 !!** METHOD
16 !! ------
17 !!
18 !! EXTERNAL
19 !! --------
20 !!
21 !!
22 !! IMPLICIT ARGUMENTS
23 !! ------------------
24 !!
25 !! REFERENCE
26 !! ---------
27 !!
28 !!
29 !! AUTHOR
30 !! ------
31 !! A.L. Gibelin *Meteo France*
32 !!
33 !! MODIFICATIONS
34 !! -------------
35 !! Original 03/2009
36 !-------------------------------------------------------------------------------
37 !
38 !* 0. DECLARATIONS
39 ! ------------
40 !
42 USE modd_read_namelist, ONLY : lnam_read
43 !
44 USE mode_pos_surf
46 USE modi_get_luout
47 USE modi_open_namelist
48 USE modi_close_namelist
49 !
50 !
51 USE yomhook ,ONLY : lhook, dr_hook
52 USE parkind1 ,ONLY : jprb
53 !
54 IMPLICIT NONE
55 !
56 !* 0.1 Declarations of arguments
57 ! -------------------------
58 !
59  CHARACTER(LEN=6), INTENT(IN) :: hprogram ! program calling ISBA
60  CHARACTER(LEN=3), INTENT(OUT) :: hrespsl ! Soil respiration
61 
62 !
63 !* 0.2 Declarations of local variables
64 ! -------------------------------
65 !
66 LOGICAL :: gfound ! Return code when searching namelist
67 INTEGER :: iluout ! output file logical unit
68 INTEGER :: ilunam ! namelist file logical unit
69 REAL(KIND=JPRB) :: zhook_handle
70 !
71 !
72 !* 0.3 Declaration of namelists
73 ! ------------------------
74 !
75 !
76 namelist/nam_prep_isba_carbon/crespsl
77 !-------------------------------------------------------------------------------
78 !
79 !* default
80 ! -------
81 !
82 IF (lhook) CALL dr_hook('READ_PREP_ISBA_CARBON',0,zhook_handle)
83 !
84 IF (lnam_read) THEN
85  !
86  crespsl = 'DEF'
87  !
88  CALL get_luout(hprogram,iluout)
89  CALL open_namelist(hprogram,ilunam)
90  !
91  !* reading of namelist
92  ! -------------------
93  !
94  !
95  CALL posnam(ilunam,'NAM_PREP_ISBA_CARBON',gfound,iluout)
96  IF (gfound) READ(unit=ilunam,nml=nam_prep_isba_carbon)
97  !
98  CALL test_nam_var_surf(iluout,'CRESPSL',crespsl,'DEF','PRM','CNT')
99  !
100  CALL close_namelist(hprogram,ilunam)
101 ENDIF
102 !
103 hrespsl = crespsl
104 IF (lhook) CALL dr_hook('READ_PREP_ISBA_CARBON',1,zhook_handle)
105 !-------------------------------------------------------------------------------
106 !-------------------------------------------------------------------------------
107 !
108 END SUBROUTINE read_prep_isba_carbon
subroutine read_prep_isba_carbon(HPROGRAM, HRESPSL)
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)