SURFEX  V8_0
Surfex V8_0 release
 All Classes Files Functions Variables
read_buffer.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 ! #######################
7 ! #######################
8 INTERFACE read_buffer
9 !
10  SUBROUTINE read_bufx1(HNAME,PFIELD,KRET)
11  CHARACTER(LEN=*), INTENT(IN) :: hname ! name of field
12 REAL, DIMENSION(:), INTENT(OUT) :: pfield ! array containing the data field
13 INTEGER, INTENT(OUT) :: kret ! error code
14 !
15 END SUBROUTINE read_bufx1
16 !
17  SUBROUTINE read_bufx0(HNAME,PFIELD,KRET)
18  CHARACTER(LEN=*), INTENT(IN) :: hname ! name of field
19 REAL, INTENT(OUT) :: pfield ! array containing the data field
20 INTEGER, INTENT(OUT) :: kret ! error code
21 !
22 END SUBROUTINE read_bufx0
23 !
24  SUBROUTINE read_bufn0(HNAME,KFIELD,KRET)
25  CHARACTER(LEN=*), INTENT(IN) :: hname ! name of field
26 INTEGER, INTENT(OUT) :: kfield ! array containing the data field
27 INTEGER, INTENT(OUT) :: kret ! error code
28 !
29 END SUBROUTINE read_bufn0
30 !
31  SUBROUTINE read_bufn1(HNAME,KFIELD,KRET)
32  CHARACTER(LEN=*), INTENT(IN) :: hname ! name of field
33 INTEGER, DIMENSION(:), INTENT(OUT) :: kfield ! array containing the data field
34 INTEGER, INTENT(OUT) :: kret ! error code
35 !
36 END SUBROUTINE read_bufn1
37 !
38  SUBROUTINE read_bufc0(HNAME,HFIELD,KRET)
39  CHARACTER(LEN=*), INTENT(IN) :: hname ! name of field
40  CHARACTER(LEN=*), INTENT(OUT) :: hfield ! array containing the data field
41 INTEGER, INTENT(OUT) :: kret ! error code
42 !
43 END SUBROUTINE read_bufc0
44 !
45 END INTERFACE
46 END MODULE modi_read_buffer
47 ! #######################################################
48  SUBROUTINE read_bufc0(HNAME,HFIELD,KRET)
49 ! #######################################################
50 !
51 !!**** *READ_BUFC0* - routine to read a character (LEN=6) in a buffer from SURFEX
52 !!
53 !! PURPOSE
54 !! -------
55 !!
56 !!** METHOD
57 !! ------
58 !!
59 !! EXTERNAL
60 !! --------
61 !!
62 !!
63 !! IMPLICIT ARGUMENTS
64 !! ------------------
65 !!
66 !! REFERENCE
67 !! ---------
68 !!
69 !!
70 !! AUTHOR
71 !! ------
72 !! S.Malardel *Meteo France*
73 !!
74 !! MODIFICATIONS
75 !! -------------
76 !! Original 03/2005
77 !-------------------------------------------------------------------------------
78 !
79 !* 0. DECLARATIONS
80 ! ------------
81 !
82 !
83 USE modi_get_luout
84 !
85 !
86 USE yomhook ,ONLY : lhook, dr_hook
87 USE parkind1 ,ONLY : jprb
88 !
89 IMPLICIT NONE
90 !
91 !* 0.1 Declarations of arguments
92 ! -------------------------
93 !
94  CHARACTER(LEN=*), INTENT(IN) :: hname ! name of field
95  CHARACTER(LEN=*), INTENT(OUT) :: hfield ! array containing the data field
96 INTEGER, INTENT(OUT) :: kret ! error code
97 !
98 !
99 !* 0.2 Declarations of local variables
100 ! -------------------------------
101 !
102 INTEGER :: iluout ! Listing file number
103 REAL(KIND=JPRB) :: zhook_handle
104 !
105 !-------------------------------------------------------------------------------
106 !
107 IF (lhook) CALL dr_hook('MODI_READ_BUFFER:READ_BUFC0',0,zhook_handle)
108  CALL get_luout('AROME ',iluout)
109 !
110 #ifdef SFX_ARO
111  CALL get_bufc0(hname,hfield,len(hfield),kret)
112 #endif
113 !
114 IF (kret /=0) THEN
115  WRITE(iluout,*) ' '
116  WRITE(iluout,*) 'ERROR'
117  WRITE(iluout,*) '-------'
118  WRITE(iluout,*) ' '
119  WRITE(iluout,*) 'error when de-burrering article', hname,' KRET=',kret
120  WRITE(iluout,*) ' '
121 ENDIF
122 IF (lhook) CALL dr_hook('MODI_READ_BUFFER:READ_BUFC0',1,zhook_handle)
123 !
124 END SUBROUTINE read_bufc0
125 ! #######################################################
126  SUBROUTINE read_bufn0(HNAME,KFIELD,KRET)
127 ! #######################################################
128 !
129 !!**** *READ_BUFN0* - routine to read an integer in a buffer from SURFEX
130 !!
131 !! PURPOSE
132 !! -------
133 !!
134 !!** METHOD
135 !! ------
136 !!
137 !! EXTERNAL
138 !! --------
139 !!
140 !!
141 !! IMPLICIT ARGUMENTS
142 !! ------------------
143 !!
144 !! REFERENCE
145 !! ---------
146 !!
147 !!
148 !! AUTHOR
149 !! ------
150 !! S.Malardel *Meteo France*
151 !!
152 !! MODIFICATIONS
153 !! -------------
154 !! Original 03/2005
155 !-------------------------------------------------------------------------------
156 !
157 !* 0. DECLARATIONS
158 ! ------------
159 !
160 !
161 USE modi_get_luout
162 !
163 !
164 USE yomhook ,ONLY : lhook, dr_hook
165 USE parkind1 ,ONLY : jprb
166 !
167 IMPLICIT NONE
168 !
169 !* 0.1 Declarations of arguments
170 ! -------------------------
171 !
172  CHARACTER(LEN=*), INTENT(IN) :: hname ! name of field
173 INTEGER, INTENT(OUT) :: kfield ! array containing the data field
174 INTEGER, INTENT(OUT) :: kret ! error code
175 !
176 !
177 !* 0.2 Declarations of local variables
178 ! -------------------------------
179 !
180 INTEGER :: iluout ! Listing file number
181 REAL(KIND=JPRB) :: zhook_handle
182 !
183 !-------------------------------------------------------------------------------
184 !
185 IF (lhook) CALL dr_hook('MODI_READ_BUFFER:READ_BUFN0',0,zhook_handle)
186  CALL get_luout('AROME ',iluout)
187 !
188 #ifdef SFX_ARO
189  CALL get_bufn0(hname,kfield,kret)
190 #endif
191 !
192 IF (kret /=0) THEN
193  WRITE(iluout,*) ' '
194  WRITE(iluout,*) 'ERROR'
195  WRITE(iluout,*) '-------'
196  WRITE(iluout,*) ' '
197  WRITE(iluout,*) 'error when de-burrering article', hname,' KRET=',kret
198  WRITE(iluout,*) ' '
199 ENDIF
200 IF (lhook) CALL dr_hook('MODI_READ_BUFFER:READ_BUFN0',1,zhook_handle)
201 !
202 END SUBROUTINE read_bufn0
203 ! #######################################################
204  SUBROUTINE read_bufn1(HNAME,KFIELD,KRET)
205 ! #######################################################
206 !
207 !!**** *READ_BUFN1* - routine to read a 1D integer array in a buffer from SURFEX
208 !!
209 !! PURPOSE
210 !! -------
211 !!
212 !!** METHOD
213 !! ------
214 !!
215 !! EXTERNAL
216 !! --------
217 !!
218 !!
219 !! IMPLICIT ARGUMENTS
220 !! ------------------
221 !!
222 !! REFERENCE
223 !! ---------
224 !!
225 !!
226 !! AUTHOR
227 !! ------
228 !! S.Malardel *Meteo France*
229 !!
230 !! MODIFICATIONS
231 !! -------------
232 !! Original 03/2005
233 !-------------------------------------------------------------------------------
234 !
235 !* 0. DECLARATIONS
236 ! ------------
237 !
238 !
239 USE modi_get_luout
240 !
241 !
242 USE yomhook ,ONLY : lhook, dr_hook
243 USE parkind1 ,ONLY : jprb
244 !
245 IMPLICIT NONE
246 !
247 !* 0.1 Declarations of arguments
248 ! -------------------------
249 !
250  CHARACTER(LEN=*), INTENT(IN) :: hname ! name of field
251 INTEGER, DIMENSION(:), INTENT(OUT) :: kfield ! array containing the data field
252 INTEGER, INTENT(OUT) :: kret ! error code
253 !
254 !
255 !* 0.2 Declarations of local variables
256 ! -------------------------------
257 !
258 INTEGER :: iluout ! Listing file number
259 REAL(KIND=JPRB) :: zhook_handle
260 !
261 !-------------------------------------------------------------------------------
262 !
263 IF (lhook) CALL dr_hook('MODI_READ_BUFFER:READ_BUFN1',0,zhook_handle)
264  CALL get_luout('AROME ',iluout)
265 !
266 #ifdef SFX_ARO
267  CALL get_bufn1(hname,SIZE(kfield),kfield,kret)
268 #endif
269 !
270 IF (kret /=0) THEN
271  WRITE(iluout,*) ' '
272  WRITE(iluout,*) 'ERROR'
273  WRITE(iluout,*) '-------'
274  WRITE(iluout,*) ' '
275  WRITE(iluout,*) 'error when de-burrering article', hname,' KRET=',kret
276  WRITE(iluout,*) ' '
277 ENDIF
278 IF (lhook) CALL dr_hook('MODI_READ_BUFFER:READ_BUFN1',1,zhook_handle)
279 !
280 END SUBROUTINE read_bufn1
281 ! #######################################################
282  SUBROUTINE read_bufx0(HNAME,PFIELD,KRET)
283 ! #######################################################
284 !
285 !!**** *READ_BUFX0* - routine to read a real in a buffer from SURFEX
286 !!
287 !! PURPOSE
288 !! -------
289 !!
290 !!** METHOD
291 !! ------
292 !!
293 !! EXTERNAL
294 !! --------
295 !!
296 !!
297 !! IMPLICIT ARGUMENTS
298 !! ------------------
299 !!
300 !! REFERENCE
301 !! ---------
302 !!
303 !!
304 !! AUTHOR
305 !! ------
306 !! S.Malardel *Meteo France*
307 !!
308 !! MODIFICATIONS
309 !! -------------
310 !! Original 03/2005
311 !-------------------------------------------------------------------------------
312 !
313 !* 0. DECLARATIONS
314 ! ------------
315 !
316 !
317 USE modi_get_luout
318 !
319 !
320 USE yomhook ,ONLY : lhook, dr_hook
321 USE parkind1 ,ONLY : jprb
322 !
323 IMPLICIT NONE
324 !
325 !* 0.1 Declarations of arguments
326 ! -------------------------
327 !
328  CHARACTER(LEN=*), INTENT(IN) :: hname ! name of field
329 REAL, INTENT(OUT) :: pfield ! array containing the data field
330 INTEGER, INTENT(OUT) :: kret ! error code
331 !
332 !
333 !* 0.2 Declarations of local variables
334 ! -------------------------------
335 !
336 INTEGER :: iluout ! Listing file number
337 REAL(KIND=JPRB) :: zhook_handle
338 !
339 !-------------------------------------------------------------------------------
340 !
341 IF (lhook) CALL dr_hook('MODI_READ_BUFFER:READ_BUFX0',0,zhook_handle)
342  CALL get_luout('AROME ',iluout)
343 !
344 #ifdef SFX_ARO
345  CALL get_bufx0(hname,pfield,kret)
346 #endif
347 !
348 IF (kret /=0) THEN
349  WRITE(iluout,*) ' '
350  WRITE(iluout,*) 'ERROR'
351  WRITE(iluout,*) '-------'
352  WRITE(iluout,*) ' '
353  WRITE(iluout,*) 'error when de-burrering article', hname,' KRET=',kret
354  WRITE(iluout,*) ' '
355 ENDIF
356 IF (lhook) CALL dr_hook('MODI_READ_BUFFER:READ_BUFX0',1,zhook_handle)
357 !
358 END SUBROUTINE read_bufx0
359 ! #######################################################
360  SUBROUTINE read_bufx1(HNAME,PFIELD,KRET)
361 ! #######################################################
362 !
363 !!**** *READ_BUFX1* - routine to read a 1D real array in a buffer from SURFEX
364 !!
365 !! PURPOSE
366 !! -------
367 !!
368 !!** METHOD
369 !! ------
370 !!
371 !! EXTERNAL
372 !! --------
373 !!
374 !!
375 !! IMPLICIT ARGUMENTS
376 !! ------------------
377 !!
378 !! REFERENCE
379 !! ---------
380 !!
381 !!
382 !! AUTHOR
383 !! ------
384 !! S.Malardel *Meteo France*
385 !!
386 !! MODIFICATIONS
387 !! -------------
388 !! Original 03/2005
389 !-------------------------------------------------------------------------------
390 !
391 !* 0. DECLARATIONS
392 ! ------------
393 !
394 !
395 USE modi_get_luout
396 !
397 !
398 USE yomhook ,ONLY : lhook, dr_hook
399 USE parkind1 ,ONLY : jprb
400 !
401 IMPLICIT NONE
402 !
403 !* 0.1 Declarations of arguments
404 ! -------------------------
405 !
406  CHARACTER(LEN=*), INTENT(IN) :: hname ! name of field
407 REAL, DIMENSION(:), INTENT(OUT) :: pfield ! array containing the data field
408 INTEGER, INTENT(OUT) :: kret ! error code
409 !
410 !
411 !* 0.2 Declarations of local variables
412 ! -------------------------------
413 !
414 INTEGER :: iluout ! Listing file number
415 REAL(KIND=JPRB) :: zhook_handle
416 !
417 !-------------------------------------------------------------------------------
418 !
419 IF (lhook) CALL dr_hook('MODI_READ_BUFFER:READ_BUFX1',0,zhook_handle)
420  CALL get_luout('AROME ',iluout)
421 !
422 #ifdef SFX_ARO
423  CALL get_bufx1(hname,SIZE(pfield),pfield,kret)
424 #endif
425 !
426 IF (kret /=0) THEN
427  WRITE(iluout,*) ' '
428  WRITE(iluout,*) 'ERROR'
429  WRITE(iluout,*) '-------'
430  WRITE(iluout,*) ' '
431  WRITE(iluout,*) 'error when de-burrering article', hname,' KRET=',kret
432  WRITE(iluout,*) ' '
433 ENDIF
434 IF (lhook) CALL dr_hook('MODI_READ_BUFFER:READ_BUFX1',1,zhook_handle)
435 !
436 END SUBROUTINE read_bufx1
subroutine read_bufn0(HNAME, KFIELD, KRET)
subroutine read_bufn1(HNAME, KFIELD, KRET)
subroutine read_bufx1(HNAME, PFIELD, KRET)
subroutine read_bufc0(HNAME, HFIELD, KRET)
Definition: read_buffer.F90:48
subroutine get_luout(HPROGRAM, KLUOUT)
Definition: get_luout.F90:6
subroutine read_bufx0(HNAME, PFIELD, KRET)