SURFEX v8.1
General documentation of Surfex
read_dummyn.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_dummy_n (DUU, KSIZE_FULL, HPROGRAM)
7 ! #################################
8 !
9 !!**** *READ_DUMMY_n* - routine to READ dummy surface fields
10 !!
11 !! PURPOSE
12 !! -------
13 !!
14 !! AUTHOR
15 !! ------
16 !! V. Masson *Meteo France*
17 !!
18 !! MODIFICATIONS
19 !! -------------
20 !! Original 03/2004
21 !! P.Tulet 2015 Bug depassement de tableau YRECFM
22 !-------------------------------------------------------------------------------
23 !
24 !* 0. DECLARATIONS
25 ! ------------
26 !
28 !
30 !
31 !
32 USE yomhook ,ONLY : lhook, dr_hook
33 USE parkind1 ,ONLY : jprb
34 !
35 IMPLICIT NONE
36 !
37 !* 0.1 Declarations of arguments
38 ! -------------------------
39 !
40 !
41 !
42 !
43 TYPE(dummy_surf_fields_t), INTENT(INOUT) :: DUU
44 INTEGER, INTENT(IN) :: KSIZE_FULL
45 !
46  CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM !
47 !
48 !* 0.2 Declarations of local variables
49 ! -------------------------------
50 !
51 INTEGER :: JDUMMY ! loop counter
52 !
53  CHARACTER(LEN=20 ):: YSTRING20 ! string
54  CHARACTER(LEN=3 ):: YSTRING03 ! string
55 !
56 INTEGER :: IRESP ! IRESP : return-code if a problem appears
57  CHARACTER(LEN=12) :: YRECFM ! Name of the article to be read
58  CHARACTER(LEN=100):: YCOMMENT ! Comment string
59 REAL(KIND=JPRB) :: ZHOOK_HANDLE
60 !
61 !-------------------------------------------------------------------------------
62 !
63 !* 2. Number of dummy fields :
64 ! ----------------------
65 !
66 IF (lhook) CALL dr_hook('READ_DUMMY_N',0,zhook_handle)
67 yrecfm='DUMMY_GR_NBR'
68 ycomment=' '
69 !
70  CALL read_surf(hprogram,yrecfm,duu%NDUMMY_NBR,iresp,hcomment=ycomment)
71 !
72 !-------------------------------------------------------------------------------
73 !
74 !* 3. Dummy fields :
75 ! ------------
76 !
77 ALLOCATE(duu%CDUMMY_NAME(duu%NDUMMY_NBR))
78 ALLOCATE(duu%CDUMMY_AREA(duu%NDUMMY_NBR))
79 ALLOCATE(duu%XDUMMY_FIELDS(ksize_full,duu%NDUMMY_NBR))
80 duu%CDUMMY_NAME(:) = ' '
81 duu%CDUMMY_AREA(:) = ' '
82 !
83 !
84 DO jdummy=1,duu%NDUMMY_NBR
85  !
86  WRITE(yrecfm,fmt='(A8,I3.3,A1)') 'DUMMY_GR',jdummy,' '
87  CALL read_surf(hprogram,yrecfm,duu%XDUMMY_FIELDS(:,jdummy),iresp,hcomment=ycomment)
88  !
89  !
90  ystring20=ycomment(21:40)
91  ystring03=ycomment(41:43)
92  !
93  duu%CDUMMY_NAME(jdummy) = ystring20
94  duu%CDUMMY_AREA(jdummy) = ystring03
95  !
96 END DO
97 IF (lhook) CALL dr_hook('READ_DUMMY_N',1,zhook_handle)
98 !
99 !-------------------------------------------------------------------------------
100 !
101 END SUBROUTINE read_dummy_n
integer, parameter jprb
Definition: parkind1.F90:32
logical lhook
Definition: yomhook.F90:15
subroutine read_dummy_n(DUU, KSIZE_FULL, HPROGRAM)
Definition: read_dummyn.F90:7