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