SURFEX v8.1
General documentation of Surfex
sfx_xios_readnam_ol.F90
Go to the documentation of this file.
1 SUBROUTINE sfx_xios_readnam_ol(HNAMELIST)
2 !!
3 !!
4 !! PURPOSE : Assess if XIOS output mode is required
5 !! --------
6 !!
7 !!
8 !! METHOD
9 !! ------
10 !!
11 !! Check namelist to assess if XIOS is required as diags output format and set
12 !! MODD_XIOS::LXIOS accordingly
13 !!
14 !! EXTERNAL
15 !! --------
16 !!
17 !!
18 !! REFERENCE
19 !! ---------
20 !!
21 !! AUTHOR
22 !! ------
23 !!
24 !! S.Sénési, CNRM
25 !!
26 !! MODIFICATION
27 !! --------------
28 !!
29 !! Original 08/2015
30 !!
31 !-------------------------------------------------------------------------------
32 !
33 !* 0. DECLARATIONS
34 ! ------------
35 !
36 USE modi_abor1_sfx
37 USE modi_get_luout
38 
40 
41 USE modi_open_namelist
42 USE modi_close_namelist
43 USE mode_pos_surf
44 !
45 USE modd_xios, ONLY : lxios, lxios_def_closed
46 !
47 USE yomhook ,ONLY : lhook, dr_hook
48 USE parkind1 ,ONLY : jprb
49 !
50 IMPLICIT NONE
51 !
52 !* 0.1 Declarations of arguments
53 ! -------------------------
54 !
55  CHARACTER(LEN=28), INTENT(IN ) :: HNAMELIST
56 !
57 !* 0.2 Declarations of local variables
58 ! -------------------------------
59 !
60 INTEGER :: ILUNAM
61 INTEGER :: ILUOUT
62 LOGICAL :: GFOUND
63 !
64 ! For now, some issued if DrHook is called before Oasis setup, hence :
65 !
66 lxios = .false.
67 lxios_def_closed= .false.
68 !
69  CALL open_namelist('ASCII ',ilunam,hnamelist)
70 !
71  CALL get_luout('OFFLINE',iluout)
72  CALL posnam(ilunam,'NAM_IO_OFFLINE',gfound,iluout)
73 IF (gfound) THEN
74  READ (unit=ilunam,nml=nam_io_offline)
75 ELSE
76  CALL abor1_sfx('SFX_XIOS_READNAM_OL : CANNOT READ NAMELIST FILE '//hnamelist//' FOR NAMELIST NAM_IO_OFFLINE')
77 ENDIF
78 lxios = (trim(ctimeseries_filetype) == 'XIOS')
79 !
80 !
81  CALL close_namelist('ASCII ',ilunam)
82 !
83 IF (lxios) THEN
84 !
85 #ifndef WXIOS
86  CALL abor1_sfx('SFX_XIOS_READNAM_OL : CANNOT USE "CTIMESERIES_FILETYPE = XIOS" : THIS BINARY WAS COMPILED WITHOUT XIOS SUPPORT')
87 #endif
88 !
89 ENDIF
90 !
91 !-------------------------------------------------------------------------------
92 !
93 END SUBROUTINE sfx_xios_readnam_ol
logical lxios
Definition: modd_xios.F90:41
subroutine posnam(KULNAM, HDNAML, OFOUND, KLUOUT)
subroutine abor1_sfx(YTEXT)
Definition: abor1_sfx.F90:7
logical lxios_def_closed
Definition: modd_xios.F90:54
subroutine sfx_xios_readnam_ol(HNAMELIST)
integer, parameter jprb
Definition: parkind1.F90:32
subroutine close_namelist(HPROGRAM, KLUNAM)
subroutine get_luout(HPROGRAM, KLUOUT)
Definition: get_luout.F90:7
logical lhook
Definition: yomhook.F90:15
character(len=6) ctimeseries_filetype
subroutine open_namelist(HPROGRAM, KLUNAM, HFILE)